diff --git a/src/framework/bootstrap/styles/_globals.scss b/src/framework/bootstrap/styles/_globals.scss index 94694a8998..7d24865210 100644 --- a/src/framework/bootstrap/styles/_globals.scss +++ b/src/framework/bootstrap/styles/_globals.scss @@ -18,12 +18,4 @@ @import 'layout'; @mixin nb-bootstrap-global() { - @include nb-b-buttons-theme(); - @include nb-b-button-group-theme(); - @include nb-b-dropdowns-theme(); - @include nb-b-icon-buttons-theme(); - @include nb-b-forms-theme(); - @include nb-b-input-group-theme(); - @include nb-b-modals-theme(); - @include nb-b-layout-theme(); } diff --git a/src/framework/theme/components/checkbox/checkbox.component.ts b/src/framework/theme/components/checkbox/checkbox.component.ts index 5f19a65ea8..3c86ee0ad0 100644 --- a/src/framework/theme/components/checkbox/checkbox.component.ts +++ b/src/framework/theme/components/checkbox/checkbox.component.ts @@ -182,18 +182,7 @@ export class NbCheckboxComponent implements ControlValueAccessor { * Possible values are: `primary` (default), `success`, `warning`, `danger`, `info` */ @Input() - get status(): NbComponentStatus { - return this._status; - } - set status(value: NbComponentStatus) { - if (value === '') { - this._status = this._defaultStatus; - } else { - this._status = value; - } - } - private readonly _defaultStatus: NbComponentStatus = 'primary'; - private _status: NbComponentStatus = this._defaultStatus; + status: NbComponentStatus = 'primary'; /** diff --git a/src/framework/theme/components/checkbox/checkbox.spec.ts b/src/framework/theme/components/checkbox/checkbox.spec.ts index f27ef786a9..17f93dd1cd 100644 --- a/src/framework/theme/components/checkbox/checkbox.spec.ts +++ b/src/framework/theme/components/checkbox/checkbox.spec.ts @@ -83,11 +83,6 @@ describe('Component: NbCheckbox', () => { expect(testContainerEl.classList.contains('status-info')).toBeTruthy(); }); - it(`should set default status if no status was passed`, () => { - checkbox.status = ''; - expect(checkbox.status).toEqual('primary'); - }); - it('should emit change event when changed', fakeAsync(() => { checkbox.change .pipe(take(1)) diff --git a/src/framework/theme/components/component-shape.ts b/src/framework/theme/components/component-shape.ts new file mode 100644 index 0000000000..5e7833dbcb --- /dev/null +++ b/src/framework/theme/components/component-shape.ts @@ -0,0 +1 @@ +export type NbComponentShape = 'rectangle' | 'semi-round' | 'round'; diff --git a/src/framework/theme/components/component-size.ts b/src/framework/theme/components/component-size.ts index df67d2c591..e02ead41ac 100644 --- a/src/framework/theme/components/component-size.ts +++ b/src/framework/theme/components/component-size.ts @@ -1 +1 @@ -export type NbComponentSize = '' | 'tiny' | 'small' | 'medium' | 'large' | 'giant'; +export type NbComponentSize = 'tiny' | 'small' | 'medium' | 'large' | 'giant'; diff --git a/src/framework/theme/components/component-status.ts b/src/framework/theme/components/component-status.ts index 93d1138d0b..4b92e88b25 100644 --- a/src/framework/theme/components/component-status.ts +++ b/src/framework/theme/components/component-status.ts @@ -1 +1 @@ -export type NbComponentStatus = '' | 'primary' | 'success' | 'warning' | 'danger' | 'info'; +export type NbComponentStatus = 'primary' | 'success' | 'warning' | 'danger' | 'info'; diff --git a/src/framework/theme/components/input/_input-colors.scss b/src/framework/theme/components/input/_input-colors.scss deleted file mode 100644 index 8ceabbf487..0000000000 --- a/src/framework/theme/components/input/_input-colors.scss +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @license - * Copyright Akveo. All Rights Reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - */ - -@mixin input-colors() { - &.input-info { - border-color: nb-theme(form-control-info-border-color); - } - &.input-success { - border-color: nb-theme(form-control-success-border-color); - } - &.input-warning { - border-color: nb-theme(form-control-warning-border-color); - } - &.input-danger { - border-color: nb-theme(form-control-danger-border-color); - } -} diff --git a/src/framework/theme/components/input/_input-shapes.scss b/src/framework/theme/components/input/_input-shapes.scss index 863de13264..d27b4d2820 100644 --- a/src/framework/theme/components/input/_input-shapes.scss +++ b/src/framework/theme/components/input/_input-shapes.scss @@ -5,13 +5,9 @@ */ @mixin input-shapes() { - &.input-rectangle { - border-radius: nb-theme(form-control-border-radius); - } - &.input-semi-round { - border-radius: nb-theme(form-control-semi-round-border-radius); - } - &.input-round { - border-radius: nb-theme(form-control-round-border-radius); + @each $shape in nb-get-shapes() { + &.shape-#{$shape} { + border-radius: nb-theme(input-#{$shape}-border-radius); + } } } diff --git a/src/framework/theme/components/input/_input-sizes.scss b/src/framework/theme/components/input/_input-sizes.scss index 6154e07be1..5cd4c31870 100644 --- a/src/framework/theme/components/input/_input-sizes.scss +++ b/src/framework/theme/components/input/_input-sizes.scss @@ -5,16 +5,18 @@ */ @mixin input-sizes() { - &.input-sm { - font-size: nb-theme(form-control-font-size-sm); - padding: nb-theme(form-control-padding-sm); - } - &.input-md { - font-size: nb-theme(form-control-font-size); - padding: nb-theme(form-control-padding); - } - &.input-lg { - font-size: nb-theme(form-control-font-size-lg); - padding: nb-theme(form-control-padding-lg); + @each $size in nb-get-sizes() { + &.size-#{$size} { + font-size: nb-theme(input-#{$size}-text-font-size); + font-weight: nb-theme(input-#{$size}-text-font-weight); + line-height: nb-theme(input-#{$size}-text-line-height); + padding: nb-theme(input-#{$size}-padding); + + &::placeholder { + font-size: nb-theme(input-#{$size}-placeholder-text-font-size); + font-weight: nb-theme(input-#{$size}-placeholder-text-font-weight); + line-height: nb-theme(input-#{$size}-placeholder-text-line-height); + } + } } } diff --git a/src/framework/theme/components/input/_input-statuses.scss b/src/framework/theme/components/input/_input-statuses.scss new file mode 100644 index 0000000000..9a94343d1a --- /dev/null +++ b/src/framework/theme/components/input/_input-statuses.scss @@ -0,0 +1,19 @@ +/** + * @license + * Copyright Akveo. All Rights Reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + */ + +@mixin input-statuses() { + @each $status in nb-get-statuses() { + &:enabled.status-#{$status} { + border-color: nb-theme(input-#{$status}-border-color); + &:focus { + border-color: nb-theme(input-#{$status}-hover-border-color); + } + &:hover { + border-color: nb-theme(input-#{$status}-focus-border-color); + } + } + } +} diff --git a/src/framework/theme/components/input/_input.directive.theme.scss b/src/framework/theme/components/input/_input.directive.theme.scss index d948144638..8ac26ac2ff 100644 --- a/src/framework/theme/components/input/_input.directive.theme.scss +++ b/src/framework/theme/components/input/_input.directive.theme.scss @@ -4,45 +4,56 @@ * Licensed under the MIT License. See License.txt in the project root for license information. */ -@import './input-colors'; +@import './input-statuses'; @import './input-sizes'; @import './input-shapes'; @mixin nb-input-theme() { - $border-width: nb-theme(form-control-border-width); - $border-type: nb-theme(form-control-border-type); - $border-color: nb-theme(form-control-border-color); [nbInput] { - background-color: nb-theme(form-control-bg); - border: $border-width $border-type $border-color; - color: nb-theme(form-control-text-primary-color); + background-color: nb-theme(input-background-color); + border-color: nb-theme(input-border-color); + border-style: nb-theme(input-border-style); + border-width: nb-theme(input-border-width); + color: nb-theme(input-text-color); + font-size: nb-theme(input-text-font-size); + font-family: nb-theme(input-text-font-family); + font-weight: nb-theme(input-text-font-weight); + line-height: nb-theme(input-text-line-height); + padding: nb-theme(input-padding); + @include nb-component-animation(border, background-color, color); + + &::placeholder { + color: nb-theme(input-placeholder-text-color); + font-family: nb-theme(input-placeholder-text-font-family); + text-overflow: ellipsis; + } &:focus { outline: none; - background-color: nb-theme(form-control-focus-bg); - border-color: nb-theme(form-control-selected-border-color); + border-color: nb-theme(input-focus-border-color); } - &[disabled] { - @include install-placeholder( - nb-theme(form-control-placeholder-color), - nb-theme(form-control-placeholder-font-size), - 0.5 - ); + &:hover { + border-color: nb-theme(input-hover-border-color); + } + + &:disabled { + background-color: nb-theme(input-disabled-background-color); + border-color: nb-theme(input-disabled-border-color); + color: nb-theme(input-disabled-text-color); + + &::placeholder { + color: nb-theme(input-disabled-placeholder-text-color); + } } &.input-full-width { width: 100%; } - @include input-colors(); + @include input-statuses(); @include input-sizes(); @include input-shapes(); - - @include install-placeholder( - nb-theme(form-control-placeholder-color), - nb-theme(form-control-placeholder-font-size) - ); } } diff --git a/src/framework/theme/components/input/input.directive.ts b/src/framework/theme/components/input/input.directive.ts index 01cd4e96b7..5d7188640e 100644 --- a/src/framework/theme/components/input/input.directive.ts +++ b/src/framework/theme/components/input/input.directive.ts @@ -5,7 +5,11 @@ */ import { Directive, Input, HostBinding } from '@angular/core'; + import { convertToBoolProperty } from '../helpers'; +import { NbComponentSize } from '../component-size'; +import { NbComponentShape } from '../component-shape'; +import { NbComponentStatus } from '../component-status'; /** * Basic input directive. @@ -20,7 +24,7 @@ import { convertToBoolProperty } from '../helpers'; * ```ts * @NgModule({ * imports: [ - * // ... + * // ... * NbInputModule, * ], * }) @@ -52,133 +56,173 @@ import { convertToBoolProperty } from '../helpers'; * * @styles * - * form-control-bg: - * form-control-border-width: - * form-control-border-type: - * form-control-border-color: - * form-control-text-primary-color: - * form-control-focus-bg: - * form-control-selected-border-color: - * form-control-placeholder-font-size: - * form-control-placeholder-color: - * form-control-font-size: - * form-control-padding: - * form-control-font-size-sm: - * form-control-padding-sm: - * form-control-font-size-lg: - * form-control-padding-lg: - * form-control-border-radius: - * form-control-semi-round-border-radius: - * form-control-round-border-radius: - * form-control-info-border-color: - * form-control-success-border-color: - * form-control-warning-border-color: - * form-control-danger-border-color: + * input-background-color: + * input-border-width: + * input-border-style: + * input-placeholder-text-color: + * input-placeholder-text-font-family: + * input-text-color: + * input-text-font-family: + * input-border-color: + * input-focus-border-color: + * input-hover-border-color: + * input-disabled-border-color: + * input-disabled-background-color: + * input-disabled-text-color: + * input-disabled-placeholder-text-color: + * input-primary-border-color: + * input-primary-focus-border-color: + * input-primary-hover-border-color: + * input-success-border-color: + * input-success-focus-border-color: + * input-success-hover-border-color: + * input-info-border-color: + * input-info-focus-border-color: + * input-info-hover-border-color: + * input-warning-border-color: + * input-warning-focus-border-color: + * input-warning-hover-border-color: + * input-danger-border-color: + * input-danger-focus-border-color: + * input-danger-hover-border-color: + * input-rectangle-border-radius: + * input-semi-round-border-radius: + * input-round-border-radius: + * input-tiny-text-font-size: + * input-tiny-text-font-weight: + * input-tiny-text-line-height: + * input-tiny-placeholder-text-font-size: + * input-tiny-placeholder-text-font-weight: + * input-tiny-placeholder-text-line-height: + * input-tiny-padding: + * input-small-text-font-size: + * input-small-text-font-weight: + * input-small-text-line-height: + * input-small-placeholder-text-font-size: + * input-small-placeholder-text-font-weight: + * input-small-placeholder-text-line-height: + * input-small-padding: + * input-medium-text-font-size: + * input-medium-text-font-weight: + * input-medium-text-line-height: + * input-medium-placeholder-text-font-size: + * input-medium-placeholder-text-font-weight: + * input-medium-placeholder-text-line-height: + * input-medium-padding: + * input-large-text-font-size: + * input-large-text-font-weight: + * input-large-text-line-height: + * input-large-placeholder-text-font-size: + * input-large-placeholder-text-font-weight: + * input-large-placeholder-text-line-height: + * input-large-padding: + * input-giant-text-font-size: + * input-giant-text-font-weight: + * input-giant-text-line-height: + * input-giant-placeholder-text-font-size: + * input-giant-placeholder-text-font-weight: + * input-giant-placeholder-text-line-height: + * input-giant-padding: */ @Directive({ selector: 'input[nbInput],textarea[nbInput]', }) export class NbInputDirective { - static readonly SIZE_SMALL = 'small'; - static readonly SIZE_MEDIUM = 'medium'; - static readonly SIZE_LARGE = 'large'; - - static readonly STATUS_INFO = 'info'; - static readonly STATUS_SUCCESS = 'success'; - static readonly STATUS_WARNING = 'warning'; - static readonly STATUS_DANGER = 'danger'; - - static readonly SHAPE_RECTANGLE = 'rectangle'; - static readonly SHAPE_SEMI_ROUND = 'semi-round'; - static readonly SHAPE_ROUND = 'round'; - - size: string = NbInputDirective.SIZE_MEDIUM; - /** - * Field size, available sizes: - * `small`, `medium`, `large` - * @param {string} val + * Field size modifications. Possible values: `small`, `medium` (default), `large`. */ - @Input('fieldSize') - set setSize(value: string) { - this.size = value; - } + @Input() + fieldSize: NbComponentSize = 'medium'; /** * Field status (adds specific styles): - * `info`, `success`, `warning`, `danger` - * @param {string} val + * `primary`, `info`, `success`, `warning`, `danger` */ - @Input('status') - status: string; + @Input() + status: '' | NbComponentStatus = ''; /** - * Field shapes: `rectangle`, `round`, `semi-round` - * @param {string} val + * Field shapes modifications. Possible values: `rectangle` (default), `round`, `semi-round`. */ - @Input('shape') - shape: string = NbInputDirective.SHAPE_RECTANGLE; + @Input() + shape: NbComponentShape = 'rectangle'; /** - * If set element will fill container - * @param {string} + * If set element will fill container. `false` by default. */ - @Input('fullWidth') - set setFullWidth(value) { - this.fullWidth = convertToBoolProperty(value); + @Input() + @HostBinding('class.input-full-width') + get fullWidth(): boolean { + return this._fullWidth; } + set fullWidth(value: boolean) { + this._fullWidth = convertToBoolProperty(value); + } + private _fullWidth = false; - @HostBinding('class.input-full-width') - fullWidth = false; + @HostBinding('class.size-tiny') + get tiny() { + return this.fieldSize === 'tiny'; + } - @HostBinding('class.input-sm') + @HostBinding('class.size-small') get small() { - return this.size === NbInputDirective.SIZE_SMALL; + return this.fieldSize === 'small'; } - @HostBinding('class.input-md') + @HostBinding('class.size-medium') get medium() { - return this.size === NbInputDirective.SIZE_MEDIUM; + return this.fieldSize === 'medium'; } - @HostBinding('class.input-lg') + @HostBinding('class.size-large') get large() { - return this.size === NbInputDirective.SIZE_LARGE; + return this.fieldSize === 'large'; + } + + @HostBinding('class.size-giant') + get giant() { + return this.fieldSize === 'giant'; + } + + @HostBinding('class.status-primary') + get primary() { + return this.status === 'primary'; } - @HostBinding('class.input-info') + @HostBinding('class.status-info') get info() { - return this.status === NbInputDirective.STATUS_INFO; + return this.status === 'info'; } - @HostBinding('class.input-success') + @HostBinding('class.status-success') get success() { - return this.status === NbInputDirective.STATUS_SUCCESS; + return this.status === 'success'; } - @HostBinding('class.input-warning') + @HostBinding('class.status-warning') get warning() { - return this.status === NbInputDirective.STATUS_WARNING; + return this.status === 'warning'; } - @HostBinding('class.input-danger') + @HostBinding('class.status-danger') get danger() { - return this.status === NbInputDirective.STATUS_DANGER; + return this.status === 'danger'; } - @HostBinding('class.input-rectangle') + @HostBinding('class.shape-rectangle') get rectangle() { - return this.shape === NbInputDirective.SHAPE_RECTANGLE; + return this.shape === 'rectangle'; } - @HostBinding('class.input-semi-round') + @HostBinding('class.shape-semi-round') get semiRound() { - return this.shape === NbInputDirective.SHAPE_SEMI_ROUND; + return this.shape === 'semi-round'; } - @HostBinding('class.input-round') + @HostBinding('class.shape-round') get round() { - return this.shape === NbInputDirective.SHAPE_ROUND; + return this.shape === 'round'; } } diff --git a/src/framework/theme/components/input/input.spec.ts b/src/framework/theme/components/input/input.spec.ts index 68e15d6f18..952b2a38fa 100644 --- a/src/framework/theme/components/input/input.spec.ts +++ b/src/framework/theme/components/input/input.spec.ts @@ -6,7 +6,10 @@ import { Component, ViewChild, ElementRef, Input } from '@angular/core' import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { NbInputDirective } from './input.directive'; +import { NbInputDirective } from '@nebular/theme'; +import { NbComponentStatus } from '../component-status'; +import { NbComponentSize } from '../component-size'; +import { NbComponentShape } from '../component-shape'; import { NbInputModule } from './input.module'; @Component({ @@ -17,6 +20,8 @@ import { NbInputModule } from './input.module'; `, }) class InputTestComponent { + @ViewChild('inputEl', { read: NbInputDirective }) inputDirective: NbInputDirective; + @ViewChild('inputEl', { read: ElementRef }) inputElementRef: ElementRef; @@ -31,9 +36,9 @@ class InputTestComponent { return this.textareaElementRef.nativeElement; } - @Input() size = NbInputDirective.SIZE_MEDIUM; - @Input() status; - @Input() shape = NbInputDirective.SHAPE_RECTANGLE; + @Input() size: NbComponentSize; + @Input() status: NbComponentStatus; + @Input() shape: NbComponentShape; @Input() fullWidth = false; } @@ -43,6 +48,7 @@ describe('Directive: NbInput', () => { let fixture: ComponentFixture; let inputElement: Element; let textareaElement: Element; + let inputDirective: NbInputDirective; beforeEach(() => { @@ -53,32 +59,33 @@ describe('Directive: NbInput', () => { .createComponent(InputTestComponent); inputTestComponent = fixture.componentInstance; + inputDirective = inputTestComponent.inputDirective; inputElement = inputTestComponent.inputElement; textareaElement = inputTestComponent.textareaElement; }); it('should set status', () => { - inputTestComponent.status = NbInputDirective.STATUS_DANGER; + inputTestComponent.status = 'danger'; fixture.detectChanges(); - expect(inputElement.classList).toContain('input-danger'); - expect(textareaElement.classList).toContain('input-danger'); + expect(inputElement.classList).toContain('status-danger'); + expect(textareaElement.classList).toContain('status-danger'); }); it('should set size', () => { - inputTestComponent.size = NbInputDirective.SIZE_LARGE; + inputTestComponent.size = 'large'; fixture.detectChanges(); - expect(inputElement.classList).toContain('input-lg'); - expect(textareaElement.classList).toContain('input-lg'); + expect(inputElement.classList).toContain('size-large'); + expect(textareaElement.classList).toContain('size-large'); }); it('should set shape class', () => { - inputTestComponent.shape = NbInputDirective.SHAPE_SEMI_ROUND; + inputTestComponent.shape = 'semi-round'; fixture.detectChanges(); - expect(inputElement.classList).toContain('input-semi-round'); - expect(textareaElement.classList).toContain('input-semi-round'); + expect(inputElement.classList).toContain('shape-semi-round'); + expect(textareaElement.classList).toContain('shape-semi-round'); }); it('should set full width', () => { @@ -88,4 +95,5 @@ describe('Directive: NbInput', () => { expect(inputElement.classList).toContain('input-full-width'); expect(textareaElement.classList).toContain('input-full-width'); }); + }); diff --git a/src/framework/theme/styles/_theming.scss b/src/framework/theme/styles/_theming.scss index c69a818912..a7b73e0235 100644 --- a/src/framework/theme/styles/_theming.scss +++ b/src/framework/theme/styles/_theming.scss @@ -277,3 +277,7 @@ $nb-themes-export: () !global; @function nb-get-sizes() { @return 'tiny', 'small', 'medium', 'large', 'giant'; } + +@function nb-get-shapes() { + @return 'rectangle', 'semi-round', 'round'; +} diff --git a/src/framework/theme/styles/themes/_default.scss b/src/framework/theme/styles/themes/_default.scss index ad833536d1..cdf028888f 100644 --- a/src/framework/theme/styles/themes/_default.scss +++ b/src/framework/theme/styles/themes/_default.scss @@ -604,37 +604,86 @@ $theme: ( btn-group-fg: color-fg-heading, btn-group-separator: #dadfe6, - form-control-text-primary-color: color-fg-heading, - form-control-bg: color-bg, - form-control-focus-bg: color-bg, - - form-control-border-width: 2px, - form-control-border-type: solid, - form-control-border-radius: radius, - form-control-semi-round-border-radius: 0.75rem, - form-control-round-border-radius: 1.5rem, - form-control-border-color: #dadfe6, - form-control-selected-border-color: color-success, - - form-control-info-border-color: color-info, - form-control-success-border-color: color-success, - form-control-danger-border-color: color-danger, - form-control-warning-border-color: color-warning, - - form-control-placeholder-color: color-fg, - form-control-placeholder-font-size: 1rem, - - form-control-font-size: 1rem, - form-control-padding: 0.75rem 1.125rem, - form-control-font-size-sm: font-size-sm, - form-control-padding-sm: 0.375rem 1.125rem, - form-control-font-size-lg: font-size-lg, - form-control-padding-lg: 1.125rem, - - form-control-label-font-weight: 400, - - form-control-feedback-font-size: 0.875rem, - form-control-feedback-font-weight: font-weight-normal, + input-background-color: color-basic-100, + input-border-style: solid, + input-border-width: 0.125rem, + input-placeholder-text-color: text-hint-color, + input-placeholder-text-font-family: text-paragraph-font-family, + input-text-color: text-dark-color, + input-text-font-family: text-subtitle-font-family, + + input-border-color: color-basic-100, + input-focus-border-color: color-primary-focus, + input-hover-border-color: color-primary-hover, + + input-disabled-border-color: color-basic-200, + input-disabled-background-color: color-basic-200, + input-disabled-text-color: text-disabled-color, + input-disabled-placeholder-text-color: text-disabled-color, + + input-primary-border-color: color-primary, + input-primary-focus-border-color: color-primary-focus, + input-primary-hover-border-color: color-primary-hover, + + input-success-border-color: color-success, + input-success-focus-border-color: color-success-focus, + input-success-hover-border-color: color-success-hover, + + input-info-border-color: color-info, + input-info-focus-border-color: color-info-focus, + input-info-hover-border-color: color-info-hover, + + input-warning-border-color: color-warning, + input-warning-focus-border-color: color-warning-focus, + input-warning-hover-border-color: color-warning-hover, + + input-danger-border-color: color-danger, + input-danger-focus-border-color: color-danger-focus, + input-danger-hover-border-color: color-danger-hover, + + input-rectangle-border-radius: 0.5rem, + input-semi-round-border-radius: 0.75rem, + input-round-border-radius: 1.5rem, + + input-tiny-text-font-size: text-subtitle-2-font-size, + input-tiny-text-font-weight: text-subtitle-2-font-weight, + input-tiny-text-line-height: text-subtitle-2-line-height, + input-tiny-placeholder-text-font-size: text-paragraph-font-size, + input-tiny-placeholder-text-font-weight: text-paragraph-font-weight, + input-tiny-placeholder-text-line-height: text-paragraph-line-height, + input-tiny-padding: 0.1875rem 1.125rem, + + input-small-text-font-size: text-subtitle-2-font-size, + input-small-text-font-weight: text-subtitle-2-font-weight, + input-small-text-line-height: text-subtitle-2-line-height, + input-small-placeholder-text-font-size: text-paragraph-font-size, + input-small-placeholder-text-font-weight: text-paragraph-font-weight, + input-small-placeholder-text-line-height: text-paragraph-line-height, + input-small-padding: 0.375rem 1.125rem, + + input-medium-text-font-size: text-subtitle-font-size, + input-medium-text-font-weight: text-subtitle-font-weight, + input-medium-text-line-height: text-subtitle-line-height, + input-medium-placeholder-text-font-size: text-paragraph-font-size, + input-medium-placeholder-text-font-weight: text-paragraph-font-weight, + input-medium-placeholder-text-line-height: text-paragraph-line-height, + input-medium-padding: 0.625rem 1rem, + + input-large-text-font-size: text-subtitle-font-size, + input-large-text-font-weight: text-subtitle-font-weight, + input-large-text-line-height: text-subtitle-line-height, + input-large-placeholder-text-font-size: text-paragraph-font-size, + input-large-placeholder-text-font-weight: text-paragraph-font-weight, + input-large-placeholder-text-line-height: text-paragraph-line-height, + input-large-padding: 1.125rem, + + input-giant-text-font-size: text-heading-6-font-size, + input-giant-text-font-weight: text-heading-6-font-weight, + input-giant-text-line-height: text-heading-6-line-height, + input-giant-placeholder-text-font-size: text-paragraph-font-size, + input-giant-placeholder-text-font-weight: text-paragraph-font-weight, + input-giant-placeholder-text-line-height: text-paragraph-line-height, + input-giant-padding: 1.5rem 1.125rem, checkbox-height: 1.125rem, checkbox-width: 1.125rem, @@ -945,8 +994,8 @@ $theme: ( select-max-height: 20rem, select-bg: color-bg, - select-checkbox-color: form-control-border-color, - select-checkmark-color: form-control-border-color, + select-checkbox-color: input-border-color, + select-checkmark-color: input-border-color, select-option-disabled-bg: #f2f4f7, select-option-disabled-opacity: 0.3, @@ -963,7 +1012,7 @@ $theme: ( radio-fg: color-fg-text, radio-size: 1.25rem, radio-border-size: 2px, - radio-border-color: form-control-border-color, + radio-border-color: input-border-color, radio-checkmark: transparent, radio-checked-bg: transparent, radio-checked-size: 1.25rem, diff --git a/src/playground/with-layout/input/input-colors.component.ts b/src/playground/with-layout/input/input-colors.component.ts index 06ccc9f012..875cda1542 100644 --- a/src/playground/with-layout/input/input-colors.component.ts +++ b/src/playground/with-layout/input/input-colors.component.ts @@ -10,6 +10,8 @@ import { Component } from '@angular/core'; template: ` + + diff --git a/src/playground/with-layout/input/input-showcase.component.ts b/src/playground/with-layout/input/input-showcase.component.ts index 44b0487467..bfe3cf6d48 100644 --- a/src/playground/with-layout/input/input-showcase.component.ts +++ b/src/playground/with-layout/input/input-showcase.component.ts @@ -8,7 +8,11 @@ import { Component } from '@angular/core'; @Component({ template: ` - + + + + + `, styleUrls: ['./input-component.scss'], }) diff --git a/src/playground/with-layout/input/input-sizes.component.ts b/src/playground/with-layout/input/input-sizes.component.ts index ef6938b875..b0b345675d 100644 --- a/src/playground/with-layout/input/input-sizes.component.ts +++ b/src/playground/with-layout/input/input-sizes.component.ts @@ -10,9 +10,11 @@ import { Component } from '@angular/core'; template: ` + + `,