@angular/material 20.1.0-next.1 → 20.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +28 -37
- package/autocomplete/_m2-autocomplete.scss +10 -22
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +46 -59
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +16 -33
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +33 -49
- package/button/_m2-button.scss +135 -158
- package/button/_m2-fab.scss +60 -69
- package/button/_m2-icon-button.scss +30 -50
- package/button/_m3-button.scss +1 -2
- package/button/_m3-fab.scss +1 -2
- package/button/_m3-icon-button.scss +1 -2
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +58 -81
- package/button-toggle/_m3-button-toggle.scss +1 -2
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +30 -45
- package/checkbox/_checkbox-theme.scss +37 -50
- package/checkbox/_m2-checkbox.scss +30 -40
- package/checkbox/_m3-checkbox.scss +1 -2
- package/chips/_chips-theme.scss +27 -30
- package/chips/_m2-chip.scss +40 -53
- package/chips/_m3-chip.scss +1 -2
- package/core/_core-theme.scss +48 -67
- package/core/_m2-app.scss +11 -23
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +36 -41
- package/core/option/_m2-optgroup.scss +13 -25
- package/core/option/_m2-option.scss +16 -22
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +8 -20
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +22 -13
- package/core/theming/_inspection.scss +0 -12
- package/core/theming/_m2-inspection.scss +0 -33
- package/core/theming/_theming.scss +4 -172
- package/core/tokens/_m2-utils.scss +16 -68
- package/core/tokens/_m3-utils.scss +2 -14
- package/core/tokens/_token-utils.scss +7 -27
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +16 -0
- package/core/tokens/m2/_md-sys-motion.scss +36 -0
- package/core/tokens/m2/_md-sys-shape.scss +22 -0
- package/core/tokens/m2/_md-sys-state.scss +15 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_md-sys-color.scss +2 -2
- package/core/tokens/m3/_md-sys-typescale.scss +1 -1
- package/core/tokens/m3/_theme.scss +14 -26
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/_m2-datepicker.scss +26 -40
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +34 -48
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +10 -21
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +52 -67
- package/expansion/_m3-expansion.scss +3 -2
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/{form-field-C9DZXojn.mjs.map → form-field-CFbrnFED.mjs.map} +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +97 -13
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +343 -122
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
- package/fesm2022/{module-BDiw_nWS.mjs.map → module-B0CLRw5e.mjs.map} +1 -1
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/{module-DzZHEh7B.mjs.map → module-B62K-792.mjs.map} +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/sidenav.mjs +2 -4
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/timepicker.mjs +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +125 -146
- package/form-field/_m3-form-field.scss +1 -2
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +16 -29
- package/icon/_icon-theme.scss +40 -41
- package/icon/_m2-icon.scss +7 -21
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +57 -53
- package/list/_m2-list.scss +84 -108
- package/list/_m3-list.scss +1 -2
- package/menu/_m2-menu.scss +33 -46
- package/menu/_menu-theme.scss +28 -33
- package/menu/index.d.ts +145 -61
- package/menu/testing/index.d.ts +50 -2
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +38 -58
- package/paginator/_m3-paginator.scss +1 -2
- package/paginator/_paginator-theme.scss +28 -33
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_m2-progress-bar.scss +11 -24
- package/progress-bar/_progress-bar-theme.scss +35 -43
- package/progress-spinner/_m2-progress-spinner.scss +9 -20
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +30 -40
- package/radio/_m3-radio.scss +1 -2
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/theme-color/schema.json +1 -1
- package/select/_m2-select.scss +23 -30
- package/select/_m3-select.scss +1 -2
- package/select/_select-theme.scss +38 -51
- package/sidenav/_m2-sidenav.scss +26 -36
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +111 -143
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +42 -80
- package/slider/_m2-slider.scss +34 -55
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +16 -36
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +7 -18
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +39 -57
- package/stepper/_m3-stepper.scss +1 -2
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +54 -72
- package/table/_m3-table.scss +1 -2
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +31 -46
- package/tabs/_m3-tabs.scss +1 -2
- package/tabs/_tabs-theme.scss +41 -49
- package/timepicker/_m2-timepicker.scss +10 -22
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +26 -46
- package/toolbar/_m3-toolbar.scss +1 -2
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +16 -34
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +21 -38
- package/tree/_m3-tree.scss +1 -2
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slide-toggle.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/slide-toggle-config.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/slide-toggle.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/slide-toggle.html","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '../core';\n\n/** Default `mat-slide-toggle` options that can be overridden. */\nexport interface MatSlideToggleDefaultOptions {\n /** Whether toggle action triggers value changes in slide toggle. */\n disableToggleValue?: boolean;\n\n /**\n * Default theme color of the slide toggle. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/slide-toggle/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Whether to hide the icon inside the slide toggle. */\n hideIcon?: boolean;\n\n /** Whether disabled slide toggles should remain interactive. */\n disabledInteractive?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nexport const MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new InjectionToken<MatSlideToggleDefaultOptions>(\n 'mat-slide-toggle-default-options',\n {\n providedIn: 'root',\n factory: () => ({disableToggleValue: false, hideIcon: false, disabledInteractive: false}),\n },\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject,\n HostAttributeToken,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport {_IdGenerator, FocusMonitor} from '@angular/cdk/a11y';\nimport {\n MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS,\n MatSlideToggleDefaultOptions,\n} from './slide-toggle-config';\nimport {\n _animationsDisabled,\n _MatInternalFormField,\n _StructuralStylesLoader,\n MatRipple,\n} from '../core';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\n\n/** Change event object emitted by a slide toggle. */\nexport class MatSlideToggleChange {\n constructor(\n /** The source slide toggle of the event. */\n public source: MatSlideToggle,\n /** The new `checked` value of the slide toggle. */\n public checked: boolean,\n ) {}\n}\n\n@Component({\n selector: 'mat-slide-toggle',\n templateUrl: 'slide-toggle.html',\n styleUrl: 'slide-toggle.css',\n host: {\n 'class': 'mat-mdc-slide-toggle',\n '[id]': 'id',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.name]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[class.mat-mdc-slide-toggle-focused]': '_focused',\n '[class.mat-mdc-slide-toggle-checked]': 'checked',\n '[class._mat-animation-noopable]': '_noopAnimations',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n },\n exportAs: 'matSlideToggle',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSlideToggle),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: MatSlideToggle,\n multi: true,\n },\n ],\n imports: [MatRipple, _MatInternalFormField],\n})\nexport class MatSlideToggle\n implements OnDestroy, AfterContentInit, OnChanges, ControlValueAccessor, Validator\n{\n private _elementRef = inject(ElementRef);\n protected _focusMonitor = inject(FocusMonitor);\n protected _changeDetectorRef = inject(ChangeDetectorRef);\n defaults = inject<MatSlideToggleDefaultOptions>(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS);\n\n private _onChange = (_: any) => {};\n private _onTouched = () => {};\n private _validatorOnChange = () => {};\n\n private _uniqueId: string;\n private _checked: boolean = false;\n\n private _createChangeEvent(isChecked: boolean) {\n return new MatSlideToggleChange(this, isChecked);\n }\n\n /** Unique ID for the label element. */\n _labelId: string;\n\n /** Returns the unique id for the visual hidden button. */\n get buttonId(): string {\n return `${this.id || this._uniqueId}-button`;\n }\n\n /** Reference to the MDC switch element. */\n @ViewChild('switch') _switchElement: ElementRef<HTMLElement>;\n\n /** Focuses the slide-toggle. */\n focus(): void {\n this._switchElement.nativeElement.focus();\n }\n /** Whether noop animations are enabled. */\n _noopAnimations = _animationsDisabled();\n\n /** Whether the slide toggle is currently focused. */\n _focused: boolean;\n\n /** Name value will be applied to the input element if present. */\n @Input() name: string | null = null;\n\n /** A unique id for the slide-toggle input. If none is supplied, it will be auto-generated. */\n @Input() id: string;\n\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Used to set the aria-label attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string | null = null;\n\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** Used to set the aria-describedby attribute on the underlying input element. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether the slide-toggle is required. */\n @Input({transform: booleanAttribute}) required: boolean;\n\n // TODO(crisbeto): this should be a ThemePalette, but some internal apps were abusing\n // the lack of type checking previously and assigning random strings.\n /**\n * Theme color of the slide toggle. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/slide-toggle/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input() color: string | undefined;\n\n /** Whether the slide toggle is disabled. */\n @Input({transform: booleanAttribute}) disabled: boolean = false;\n\n /** Whether the slide toggle has a ripple. */\n @Input({transform: booleanAttribute}) disableRipple: boolean = false;\n\n /** Tabindex of slide toggle. */\n @Input({transform: (value: unknown) => (value == null ? 0 : numberAttribute(value))})\n tabIndex: number = 0;\n\n /** Whether the slide-toggle element is checked or not. */\n @Input({transform: booleanAttribute})\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: boolean) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Whether to hide the icon inside of the slide toggle. */\n @Input({transform: booleanAttribute}) hideIcon: boolean;\n\n /** Whether the slide toggle should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute}) disabledInteractive: boolean;\n\n /** An event will be dispatched each time the slide-toggle changes its value. */\n @Output() readonly change = new EventEmitter<MatSlideToggleChange>();\n\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed.\n */\n @Output() readonly toggleChange: EventEmitter<void> = new EventEmitter<void>();\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\n const defaults = this.defaults;\n\n this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\n this.color = defaults.color || 'accent';\n this.id = this._uniqueId = inject(_IdGenerator).getId('mat-mdc-slide-toggle-');\n this.hideIcon = defaults.hideIcon ?? false;\n this.disabledInteractive = defaults.disabledInteractive ?? false;\n this._labelId = this._uniqueId + '-label';\n }\n\n ngAfterContentInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n this._focused = true;\n this._changeDetectorRef.markForCheck();\n } else if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's ng-touched) will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._focused = false;\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['required']) {\n this._validatorOnChange();\n }\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value: any): void {\n this.checked = !!value;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /** Implemented as a part of Validator. */\n validate(control: AbstractControl<boolean>): ValidationErrors | null {\n return this.required && control.value !== true ? {'required': true} : null;\n }\n\n /** Implemented as a part of Validator. */\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Toggles the checked state of the slide-toggle. */\n toggle(): void {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n protected _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n }\n\n /** Method being called whenever the underlying button is clicked. */\n _handleClick() {\n if (!this.disabled) {\n this.toggleChange.emit();\n\n if (!this.defaults.disableToggleValue) {\n this.checked = !this.checked;\n this._onChange(this.checked);\n this.change.emit(new MatSlideToggleChange(this, this.checked));\n }\n }\n }\n\n _getAriaLabelledBy() {\n if (this.ariaLabelledby) {\n return this.ariaLabelledby;\n }\n\n // Even though we have a `label` element with a `for` pointing to the button, we need the\n // `aria-labelledby`, because the button gets flagged as not having a label by tools like axe.\n return this.ariaLabel ? null : this._labelId;\n }\n}\n","<div mat-internal-form-field [labelPosition]=\"labelPosition\">\n <button\n class=\"mdc-switch\"\n role=\"switch\"\n type=\"button\"\n [class.mdc-switch--selected]=\"checked\"\n [class.mdc-switch--unselected]=\"!checked\"\n [class.mdc-switch--checked]=\"checked\"\n [class.mdc-switch--disabled]=\"disabled\"\n [class.mat-mdc-slide-toggle-disabled-interactive]=\"disabledInteractive\"\n [tabIndex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [disabled]=\"disabled && !disabledInteractive\"\n [attr.id]=\"buttonId\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"_getAriaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-required]=\"required || null\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_handleClick()\"\n #switch>\n <span class=\"mdc-switch__track\"></span>\n <span class=\"mdc-switch__handle-track\">\n <span class=\"mdc-switch__handle\">\n <span class=\"mdc-switch__shadow\">\n <span class=\"mdc-elevation-overlay\"></span>\n </span>\n <span class=\"mdc-switch__ripple\">\n <span class=\"mat-mdc-slide-toggle-ripple mat-focus-indicator\" mat-ripple\n [matRippleTrigger]=\"switch\"\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleCentered]=\"true\"></span>\n </span>\n @if (!hideIcon) {\n <span class=\"mdc-switch__icons\">\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--on\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" />\n </svg>\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--off\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path d=\"M20 13H4v-2h16v2z\" />\n </svg>\n </span>\n }\n </span>\n </span>\n </button>\n\n <!--\n Clicking on the label will trigger another click event from the button.\n Stop propagation here so other listeners further up in the DOM don't execute twice.\n -->\n <label class=\"mdc-label\" [for]=\"buttonId\" [attr.id]=\"_labelId\" (click)=\"$event.stopPropagation()\">\n <ng-content></ng-content>\n </label>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatSlideToggle} from './slide-toggle';\n\n@NgModule({\n imports: [MatSlideToggle, MatCommonModule],\n exports: [MatSlideToggle, MatCommonModule],\n})\nexport class MatSlideToggleModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA+BA;MACa,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC,EAClC;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,EAAC,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAC,CAAC;AAC1F,CAAA;;ACYH;MACa,oBAAoB,CAAA;AAGtB,IAAA,MAAA;AAEA,IAAA,OAAA;AAJT,IAAA,WAAA;;IAES,MAAsB;;IAEtB,OAAgB,EAAA;QAFhB,IAAM,CAAA,MAAA,GAAN,MAAM;QAEN,IAAO,CAAA,OAAA,GAAP,OAAO;;AAEjB;MAoCY,cAAc,CAAA;AAGjB,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAC9B,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACxD,IAAA,QAA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ggle/slide-toggle-config.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/slide-toggle.ts","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/slide-toggle.html","../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/slide-toggle/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '../core';\n\n/** Default `mat-slide-toggle` options that can be overridden. */\nexport interface MatSlideToggleDefaultOptions {\n /** Whether toggle action triggers value changes in slide toggle. */\n disableToggleValue?: boolean;\n\n /**\n * Default theme color of the slide toggle. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/slide-toggle/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n color?: ThemePalette;\n\n /** Whether to hide the icon inside the slide toggle. */\n hideIcon?: boolean;\n\n /** Whether disabled slide toggles should remain interactive. */\n disabledInteractive?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nexport const MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = new InjectionToken<MatSlideToggleDefaultOptions>(\n 'mat-slide-toggle-default-options',\n {\n providedIn: 'root',\n factory: () => ({disableToggleValue: false, hideIcon: false, disabledInteractive: false}),\n },\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n numberAttribute,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject,\n HostAttributeToken,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport {_IdGenerator, FocusMonitor} from '@angular/cdk/a11y';\nimport {\n MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS,\n MatSlideToggleDefaultOptions,\n} from './slide-toggle-config';\nimport {\n _animationsDisabled,\n _MatInternalFormField,\n _StructuralStylesLoader,\n MatRipple,\n} from '../core';\nimport {_CdkPrivateStyleLoader} from '@angular/cdk/private';\n\n/** Change event object emitted by a slide toggle. */\nexport class MatSlideToggleChange {\n constructor(\n /** The source slide toggle of the event. */\n public source: MatSlideToggle,\n /** The new `checked` value of the slide toggle. */\n public checked: boolean,\n ) {}\n}\n\n@Component({\n selector: 'mat-slide-toggle',\n templateUrl: 'slide-toggle.html',\n styleUrl: 'slide-toggle.css',\n host: {\n 'class': 'mat-mdc-slide-toggle',\n '[id]': 'id',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.name]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[class.mat-mdc-slide-toggle-focused]': '_focused',\n '[class.mat-mdc-slide-toggle-checked]': 'checked',\n '[class._mat-animation-noopable]': '_noopAnimations',\n '[class]': 'color ? \"mat-\" + color : \"\"',\n },\n exportAs: 'matSlideToggle',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatSlideToggle),\n multi: true,\n },\n {\n provide: NG_VALIDATORS,\n useExisting: MatSlideToggle,\n multi: true,\n },\n ],\n imports: [MatRipple, _MatInternalFormField],\n})\nexport class MatSlideToggle\n implements OnDestroy, AfterContentInit, OnChanges, ControlValueAccessor, Validator\n{\n private _elementRef = inject(ElementRef);\n protected _focusMonitor = inject(FocusMonitor);\n protected _changeDetectorRef = inject(ChangeDetectorRef);\n defaults = inject<MatSlideToggleDefaultOptions>(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS);\n\n private _onChange = (_: any) => {};\n private _onTouched = () => {};\n private _validatorOnChange = () => {};\n\n private _uniqueId: string;\n private _checked: boolean = false;\n\n private _createChangeEvent(isChecked: boolean) {\n return new MatSlideToggleChange(this, isChecked);\n }\n\n /** Unique ID for the label element. */\n _labelId: string;\n\n /** Returns the unique id for the visual hidden button. */\n get buttonId(): string {\n return `${this.id || this._uniqueId}-button`;\n }\n\n /** Reference to the MDC switch element. */\n @ViewChild('switch') _switchElement: ElementRef<HTMLElement>;\n\n /** Focuses the slide-toggle. */\n focus(): void {\n this._switchElement.nativeElement.focus();\n }\n /** Whether noop animations are enabled. */\n _noopAnimations = _animationsDisabled();\n\n /** Whether the slide toggle is currently focused. */\n _focused: boolean;\n\n /** Name value will be applied to the input element if present. */\n @Input() name: string | null = null;\n\n /** A unique id for the slide-toggle input. If none is supplied, it will be auto-generated. */\n @Input() id: string;\n\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Used to set the aria-label attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string | null = null;\n\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** Used to set the aria-describedby attribute on the underlying input element. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether the slide-toggle is required. */\n @Input({transform: booleanAttribute}) required: boolean;\n\n // TODO(crisbeto): this should be a ThemePalette, but some internal apps were abusing\n // the lack of type checking previously and assigning random strings.\n /**\n * Theme color of the slide toggle. This API is supported in M2 themes only,\n * it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/slide-toggle/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input() color: string | undefined;\n\n /** Whether the slide toggle is disabled. */\n @Input({transform: booleanAttribute}) disabled: boolean = false;\n\n /** Whether the slide toggle has a ripple. */\n @Input({transform: booleanAttribute}) disableRipple: boolean = false;\n\n /** Tabindex of slide toggle. */\n @Input({transform: (value: unknown) => (value == null ? 0 : numberAttribute(value))})\n tabIndex: number = 0;\n\n /** Whether the slide-toggle element is checked or not. */\n @Input({transform: booleanAttribute})\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: boolean) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Whether to hide the icon inside of the slide toggle. */\n @Input({transform: booleanAttribute}) hideIcon: boolean;\n\n /** Whether the slide toggle should remain interactive when it is disabled. */\n @Input({transform: booleanAttribute}) disabledInteractive: boolean;\n\n /** An event will be dispatched each time the slide-toggle changes its value. */\n @Output() readonly change = new EventEmitter<MatSlideToggleChange>();\n\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed.\n */\n @Output() readonly toggleChange: EventEmitter<void> = new EventEmitter<void>();\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n constructor(...args: unknown[]);\n\n constructor() {\n inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n const tabIndex = inject(new HostAttributeToken('tabindex'), {optional: true});\n const defaults = this.defaults;\n\n this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\n this.color = defaults.color || 'accent';\n this.id = this._uniqueId = inject(_IdGenerator).getId('mat-mdc-slide-toggle-');\n this.hideIcon = defaults.hideIcon ?? false;\n this.disabledInteractive = defaults.disabledInteractive ?? false;\n this._labelId = this._uniqueId + '-label';\n }\n\n ngAfterContentInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n this._focused = true;\n this._changeDetectorRef.markForCheck();\n } else if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's ng-touched) will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._focused = false;\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['required']) {\n this._validatorOnChange();\n }\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value: any): void {\n this.checked = !!value;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /** Implemented as a part of Validator. */\n validate(control: AbstractControl<boolean>): ValidationErrors | null {\n return this.required && control.value !== true ? {'required': true} : null;\n }\n\n /** Implemented as a part of Validator. */\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n\n /** Toggles the checked state of the slide-toggle. */\n toggle(): void {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n protected _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n }\n\n /** Method being called whenever the underlying button is clicked. */\n _handleClick() {\n if (!this.disabled) {\n this.toggleChange.emit();\n\n if (!this.defaults.disableToggleValue) {\n this.checked = !this.checked;\n this._onChange(this.checked);\n this.change.emit(new MatSlideToggleChange(this, this.checked));\n }\n }\n }\n\n _getAriaLabelledBy() {\n if (this.ariaLabelledby) {\n return this.ariaLabelledby;\n }\n\n // Even though we have a `label` element with a `for` pointing to the button, we need the\n // `aria-labelledby`, because the button gets flagged as not having a label by tools like axe.\n return this.ariaLabel ? null : this._labelId;\n }\n}\n","<div mat-internal-form-field [labelPosition]=\"labelPosition\">\n <button\n class=\"mdc-switch\"\n role=\"switch\"\n type=\"button\"\n [class.mdc-switch--selected]=\"checked\"\n [class.mdc-switch--unselected]=\"!checked\"\n [class.mdc-switch--checked]=\"checked\"\n [class.mdc-switch--disabled]=\"disabled\"\n [class.mat-mdc-slide-toggle-disabled-interactive]=\"disabledInteractive\"\n [tabIndex]=\"disabled && !disabledInteractive ? -1 : tabIndex\"\n [disabled]=\"disabled && !disabledInteractive\"\n [attr.id]=\"buttonId\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"_getAriaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-required]=\"required || null\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-disabled]=\"disabled && disabledInteractive ? 'true' : null\"\n (click)=\"_handleClick()\"\n #switch>\n <span class=\"mdc-switch__track\"></span>\n <span class=\"mdc-switch__handle-track\">\n <span class=\"mdc-switch__handle\">\n <span class=\"mdc-switch__shadow\">\n <span class=\"mdc-elevation-overlay\"></span>\n </span>\n <span class=\"mdc-switch__ripple\">\n <span class=\"mat-mdc-slide-toggle-ripple mat-focus-indicator\" mat-ripple\n [matRippleTrigger]=\"switch\"\n [matRippleDisabled]=\"disableRipple || disabled\"\n [matRippleCentered]=\"true\"></span>\n </span>\n @if (!hideIcon) {\n <span class=\"mdc-switch__icons\">\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--on\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\" />\n </svg>\n <svg\n class=\"mdc-switch__icon mdc-switch__icon--off\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\">\n <path d=\"M20 13H4v-2h16v2z\" />\n </svg>\n </span>\n }\n </span>\n </span>\n </button>\n\n <!--\n Clicking on the label will trigger another click event from the button.\n Stop propagation here so other listeners further up in the DOM don't execute twice.\n -->\n <label class=\"mdc-label\" [for]=\"buttonId\" [attr.id]=\"_labelId\" (click)=\"$event.stopPropagation()\">\n <ng-content></ng-content>\n </label>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatSlideToggle} from './slide-toggle';\n\n@NgModule({\n imports: [MatSlideToggle, MatCommonModule],\n exports: [MatSlideToggle, MatCommonModule],\n})\nexport class MatSlideToggleModule {}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA+BA;MACa,gCAAgC,GAAG,IAAI,cAAc,CAChE,kCAAkC,EAClC;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO,EAAC,kBAAkB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAC,CAAC;AAC1F,CAAA;;ACYH;MACa,oBAAoB,CAAA;AAGtB,IAAA,MAAA;AAEA,IAAA,OAAA;AAJT,IAAA,WAAA;;IAES,MAAsB;;IAEtB,OAAgB,EAAA;QAFhB,IAAM,CAAA,MAAA,GAAN,MAAM;QAEN,IAAO,CAAA,OAAA,GAAP,OAAO;;AAEjB;MAoCY,cAAc,CAAA;AAGjB,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAC9B,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACxD,IAAA,QAAQ,GAAG,MAAM,CAA+B,gCAAgC,CAAC;AAEzE,IAAA,SAAS,GAAG,CAAC,CAAM,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12.0.0", version: "20.0.0", ngImport: i0, type: MatSnackBarContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
502
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: MatSnackBarContainer, isStandalone: true, selector: "mat-snack-bar-container", host: { listeners: { "animationend": "onAnimationEnd($event.animationName)", "animationcancel": "onAnimationEnd($event.animationName)" }, properties: { "class.mat-snack-bar-container-enter": "_animationState === \"visible\"", "class.mat-snack-bar-container-exit": "_animationState === \"hidden\"", "class.mat-snack-bar-container-animations-enabled": "!_animationsDisabled" }, classAttribute: "mdc-snackbar mat-mdc-snack-bar-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "_label", first: true, predicate: ["label"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled)
|
|
502
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0", type: MatSnackBarContainer, isStandalone: true, selector: "mat-snack-bar-container", host: { listeners: { "animationend": "onAnimationEnd($event.animationName)", "animationcancel": "onAnimationEnd($event.animationName)" }, properties: { "class.mat-snack-bar-container-enter": "_animationState === \"visible\"", "class.mat-snack-bar-container-exit": "_animationState === \"hidden\"", "class.mat-snack-bar-container-animations-enabled": "!_animationsDisabled" }, classAttribute: "mdc-snackbar mat-mdc-snack-bar-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "_label", first: true, predicate: ["label"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
503
503
|
}
|
|
504
504
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MatSnackBarContainer, decorators: [{
|
|
505
505
|
type: Component,
|
|
@@ -510,7 +510,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
510
510
|
'[class.mat-snack-bar-container-animations-enabled]': '!_animationsDisabled',
|
|
511
511
|
'(animationend)': 'onAnimationEnd($event.animationName)',
|
|
512
512
|
'(animationcancel)': 'onAnimationEnd($event.animationName)',
|
|
513
|
-
}, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled)
|
|
513
|
+
}, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"] }]
|
|
514
514
|
}], ctorParameters: () => [], propDecorators: { _portalOutlet: [{
|
|
515
515
|
type: ViewChild,
|
|
516
516
|
args: [CdkPortalOutlet, { static: true }]
|
package/fesm2022/timepicker.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { D as DateAdapter, a as MAT_DATE_FORMATS } from './date-formats-K6TQue-Y
|
|
|
10
10
|
import { _ as _animationsDisabled } from './animation-DfMFjxHu.mjs';
|
|
11
11
|
import { M as MatOption, c as MAT_OPTION_PARENT_COMPONENT } from './option-BzhYL_xC.mjs';
|
|
12
12
|
import { Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
13
|
-
import { h as MAT_FORM_FIELD } from './form-field-
|
|
13
|
+
import { h as MAT_FORM_FIELD } from './form-field-CFbrnFED.mjs';
|
|
14
14
|
import { M as MAT_INPUT_VALUE_ACCESSOR } from './input-value-accessor-D1GvPuqO.mjs';
|
|
15
15
|
import { M as MatIconButton } from './icon-button-DxiIc1ex.mjs';
|
|
16
16
|
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
@@ -1,73 +1,59 @@
|
|
|
1
1
|
@use './m2-form-field';
|
|
2
2
|
@use './m3-form-field';
|
|
3
|
-
@use '../core/theming/theming';
|
|
4
3
|
@use '../core/theming/inspection';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
|
-
@use '../core/style/sass-utils';
|
|
7
5
|
@use '../core/tokens/token-utils';
|
|
8
6
|
@use 'sass:map';
|
|
9
7
|
|
|
10
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
|
-
/// for the mat-form-field.
|
|
12
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: map.get(m2-form-field.get-tokens($theme), base);
|
|
14
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-form-field.get-unthemable-tokens());
|
|
19
|
-
}
|
|
11
|
+
$tokens: map.get(m3-form-field.get-tokens($theme), base);
|
|
20
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
21
15
|
}
|
|
22
16
|
|
|
23
17
|
/// Outputs color theme styles for the mat-form-field.
|
|
24
18
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
25
19
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
26
20
|
@mixin color($theme, $color-variant: null) {
|
|
21
|
+
$tokens: map.get(m2-form-field.get-tokens($theme), color);
|
|
27
22
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@include token-utils.create-token-values-mixed(m2-form-field.get-color-tokens($theme));
|
|
33
|
-
}
|
|
23
|
+
$tokens: map.get(m3-form-field.get-tokens($theme, $color-variant), color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include token-utils.values($tokens);
|
|
34
27
|
|
|
28
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
35
29
|
.mat-mdc-form-field.mat-accent {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
);
|
|
30
|
+
$tokens: m2-form-field.private-get-color-palette-color-tokens($theme, secondary);
|
|
31
|
+
@include token-utils.values($tokens);
|
|
39
32
|
}
|
|
40
33
|
|
|
41
34
|
.mat-mdc-form-field.mat-warn {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
35
|
+
$tokens: m2-form-field.private-get-color-palette-color-tokens($theme, error);
|
|
36
|
+
@include token-utils.values($tokens);
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
|
|
49
|
-
/// Outputs typography theme styles for the mat-form-field.
|
|
50
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
51
41
|
@mixin typography($theme) {
|
|
42
|
+
$tokens: map.get(m2-form-field.get-tokens($theme), typography);
|
|
52
43
|
@if inspection.get-theme-version($theme) == 1 {
|
|
53
|
-
|
|
54
|
-
} @else {
|
|
55
|
-
@include sass-utils.current-selector-or-root() {
|
|
56
|
-
@include token-utils.create-token-values-mixed(m2-form-field.get-typography-tokens($theme));
|
|
57
|
-
}
|
|
44
|
+
$tokens: map.get(m3-form-field.get-tokens($theme), typography);
|
|
58
45
|
}
|
|
46
|
+
|
|
47
|
+
@include token-utils.values($tokens);
|
|
59
48
|
}
|
|
60
49
|
|
|
61
|
-
/// Outputs density theme styles for the mat-form-field.
|
|
62
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
63
50
|
@mixin density($theme) {
|
|
51
|
+
$tokens: map.get(m2-form-field.get-tokens($theme), density);
|
|
64
52
|
@if inspection.get-theme-version($theme) == 1 {
|
|
65
|
-
|
|
66
|
-
} @else {
|
|
67
|
-
@include sass-utils.current-selector-or-root() {
|
|
68
|
-
@include token-utils.create-token-values-mixed(m2-form-field.get-density-tokens($theme));
|
|
69
|
-
}
|
|
53
|
+
$tokens: map.get(m3-form-field.get-tokens($theme), density);
|
|
70
54
|
}
|
|
55
|
+
|
|
56
|
+
@include token-utils.values($tokens);
|
|
71
57
|
}
|
|
72
58
|
|
|
73
59
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -90,23 +76,21 @@
|
|
|
90
76
|
/// @param {Map} $theme The theme to generate styles for.
|
|
91
77
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
92
78
|
@mixin theme($theme, $color-variant: null) {
|
|
93
|
-
@
|
|
94
|
-
@
|
|
95
|
-
|
|
96
|
-
|
|
79
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
80
|
+
@include base($theme);
|
|
81
|
+
@include color($theme, $color-variant);
|
|
82
|
+
@include density($theme);
|
|
83
|
+
@include typography($theme);
|
|
84
|
+
} @else {
|
|
85
|
+
@include base($theme);
|
|
86
|
+
@if inspection.theme-has($theme, color) {
|
|
87
|
+
@include color($theme);
|
|
88
|
+
}
|
|
89
|
+
@if inspection.theme-has($theme, density) {
|
|
97
90
|
@include density($theme);
|
|
91
|
+
}
|
|
92
|
+
@if inspection.theme-has($theme, typography) {
|
|
98
93
|
@include typography($theme);
|
|
99
|
-
} @else {
|
|
100
|
-
@include base($theme);
|
|
101
|
-
@if inspection.theme-has($theme, color) {
|
|
102
|
-
@include color($theme);
|
|
103
|
-
}
|
|
104
|
-
@if inspection.theme-has($theme, density) {
|
|
105
|
-
@include density($theme);
|
|
106
|
-
}
|
|
107
|
-
@if inspection.theme-has($theme, typography) {
|
|
108
|
-
@include typography($theme);
|
|
109
|
-
}
|
|
110
94
|
}
|
|
111
95
|
}
|
|
112
96
|
}
|
|
@@ -8,107 +8,133 @@
|
|
|
8
8
|
@use 'sass:math';
|
|
9
9
|
@use 'sass:meta';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
// but may be in a future version of the theming API.
|
|
13
|
-
@function get-unthemable-tokens() {
|
|
14
|
-
@return (
|
|
15
|
-
form-field-filled-active-indicator-height: 1px,
|
|
16
|
-
form-field-filled-focus-active-indicator-height: 2px,
|
|
17
|
-
form-field-filled-container-shape: 4px,
|
|
18
|
-
form-field-outlined-outline-width: 1px,
|
|
19
|
-
form-field-outlined-focus-outline-width: 2px,
|
|
20
|
-
form-field-outlined-container-shape: 4px,
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
25
|
-
@function get-color-tokens($theme) {
|
|
11
|
+
@function get-tokens($theme) {
|
|
26
12
|
$system: m2-utils.get-system($theme);
|
|
27
|
-
|
|
28
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
29
|
-
$surface: map.get($system, surface);
|
|
30
|
-
$color-tokens: private-get-color-palette-color-tokens($theme, primary);
|
|
31
13
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
32
14
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
form-field-error-text-color: map.get($system, error),
|
|
38
|
-
|
|
39
|
-
// On dark themes we set the native `select` color to some shade of white,
|
|
40
|
-
// however the color propagates to all of the `option` elements, which are
|
|
41
|
-
// always on a white background inside the dropdown, causing them to blend in.
|
|
42
|
-
// Since we can't change background of the dropdown, we need to explicitly
|
|
43
|
-
// reset the color of the options to something dark.
|
|
44
|
-
form-field-select-option-text-color: if($is-dark, m2-palette.$dark-primary-text, inherit),
|
|
45
|
-
// Note the spelling of the `GrayText` here which is a system color. See:
|
|
46
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/system-color
|
|
47
|
-
form-field-select-disabled-option-text-color:
|
|
48
|
-
if($is-dark, m2-palette.$dark-disabled-text, GrayText),
|
|
49
|
-
|
|
50
|
-
// These tokens are necessary for M3. MDC has them built in already, but:
|
|
51
|
-
// 1. They are too specific, breaking a lot of internal clients.
|
|
52
|
-
// 2. The larger selectors result in a larger bundle.
|
|
53
|
-
// Note: MDC has tokens for all the various states of the icons. Some of them are ommitted,
|
|
54
|
-
// because they resolve to the same value (e.g. focus and base states for the leading icon
|
|
55
|
-
// are the same).
|
|
56
|
-
form-field-leading-icon-color: unset,
|
|
57
|
-
form-field-disabled-leading-icon-color: unset,
|
|
58
|
-
form-field-trailing-icon-color: unset,
|
|
59
|
-
form-field-disabled-trailing-icon-color: unset,
|
|
60
|
-
form-field-error-focus-trailing-icon-color: unset,
|
|
61
|
-
form-field-error-hover-trailing-icon-color: unset,
|
|
62
|
-
form-field-error-trailing-icon-color: unset,
|
|
63
|
-
form-field-enabled-select-arrow-color: map.get($system, on-surface-variant),
|
|
64
|
-
form-field-disabled-select-arrow-color: $disabled,
|
|
65
|
-
form-field-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
66
|
-
form-field-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
67
|
-
form-field-filled-container-color: map.get($system, surface-variant),
|
|
68
|
-
form-field-filled-disabled-container-color:
|
|
69
|
-
m3-utils.color-with-opacity(map.get($system, on-surface), 4%),
|
|
70
|
-
form-field-filled-label-text-color: map.get($system, on-surface-variant),
|
|
71
|
-
form-field-filled-hover-label-text-color: map.get($system, on-surface-variant),
|
|
72
|
-
form-field-filled-disabled-label-text-color: $disabled,
|
|
73
|
-
form-field-filled-input-text-color: map.get($system, on-surface),
|
|
74
|
-
form-field-filled-disabled-input-text-color: $disabled,
|
|
75
|
-
form-field-filled-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
76
|
-
form-field-filled-error-hover-label-text-color: map.get($system, error),
|
|
77
|
-
form-field-filled-error-focus-label-text-color: map.get($system, error),
|
|
78
|
-
form-field-filled-error-label-text-color: map.get($system, error),
|
|
79
|
-
form-field-filled-error-caret-color: map.get($system, error),
|
|
80
|
-
form-field-filled-active-indicator-color: map.get($system, on-surface-variant),
|
|
81
|
-
form-field-filled-disabled-active-indicator-color:
|
|
82
|
-
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
83
|
-
form-field-filled-hover-active-indicator-color: map.get($system, on-surface),
|
|
84
|
-
form-field-filled-error-active-indicator-color: map.get($system, error),
|
|
85
|
-
form-field-filled-error-focus-active-indicator-color: map.get($system, error),
|
|
86
|
-
form-field-filled-error-hover-active-indicator-color: map.get($system, error),
|
|
87
|
-
form-field-outlined-label-text-color: map.get($system, on-surface-variant),
|
|
88
|
-
form-field-outlined-hover-label-text-color: map.get($system, on-surface),
|
|
89
|
-
form-field-outlined-disabled-label-text-color: $disabled,
|
|
90
|
-
form-field-outlined-input-text-color: map.get($system, on-surface),
|
|
91
|
-
form-field-outlined-disabled-input-text-color: $disabled,
|
|
92
|
-
form-field-outlined-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
93
|
-
form-field-outlined-error-caret-color: map.get($system, error),
|
|
94
|
-
form-field-outlined-error-focus-label-text-color: map.get($system, error),
|
|
95
|
-
form-field-outlined-error-label-text-color: map.get($system, error),
|
|
96
|
-
form-field-outlined-error-hover-label-text-color: map.get($system, error),
|
|
97
|
-
form-field-outlined-outline-color: map.get($system, outline-variant),
|
|
98
|
-
form-field-outlined-disabled-outline-color:
|
|
99
|
-
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
100
|
-
form-field-outlined-hover-outline-color: map.get($system, on-surface),
|
|
101
|
-
form-field-outlined-error-focus-outline-color: map.get($system, error),
|
|
102
|
-
form-field-outlined-error-hover-outline-color: map.get($system, error),
|
|
103
|
-
form-field-outlined-error-outline-color: map.get($system, error),
|
|
104
|
-
));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@function _variable-safe-mix($first-color, $second-color, $amount) {
|
|
108
|
-
@if (meta.type-of($first-color) == color and meta.type-of($second-color) == color) {
|
|
109
|
-
@return color.mix($first-color, $second-color, $amount);
|
|
15
|
+
// TODO: Use system colors instead of checking theme type
|
|
16
|
+
$is-dark: false;
|
|
17
|
+
@if (meta.type-of($theme) == map and map.get($theme, color)) {
|
|
18
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
110
19
|
}
|
|
111
|
-
|
|
20
|
+
|
|
21
|
+
@return (
|
|
22
|
+
base: (
|
|
23
|
+
form-field-filled-active-indicator-height: 1px,
|
|
24
|
+
form-field-filled-focus-active-indicator-height: 2px,
|
|
25
|
+
form-field-filled-container-shape: 4px,
|
|
26
|
+
form-field-outlined-outline-width: 1px,
|
|
27
|
+
form-field-outlined-focus-outline-width: 2px,
|
|
28
|
+
form-field-outlined-container-shape: 4px,
|
|
29
|
+
),
|
|
30
|
+
color: map.merge(private-get-color-palette-color-tokens($theme, primary), (
|
|
31
|
+
// MDC has a token for the enabled placeholder, but not for the disabled one.
|
|
32
|
+
form-field-disabled-input-text-placeholder-color: $disabled,
|
|
33
|
+
form-field-state-layer-color: map.get($system, on-surface),
|
|
34
|
+
form-field-error-text-color: map.get($system, error),
|
|
35
|
+
|
|
36
|
+
// On dark themes we set the native `select` color to some shade of white,
|
|
37
|
+
// however the color propagates to all of the `option` elements, which are
|
|
38
|
+
// always on a white background inside the dropdown, causing them to blend in.
|
|
39
|
+
// Since we can't change background of the dropdown, we need to explicitly
|
|
40
|
+
// reset the color of the options to something dark.
|
|
41
|
+
form-field-select-option-text-color: if($is-dark, m2-palette.$dark-primary-text, inherit),
|
|
42
|
+
// Note the spelling of the `GrayText` here which is a system color. See:
|
|
43
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/system-color
|
|
44
|
+
form-field-select-disabled-option-text-color:
|
|
45
|
+
if($is-dark, m2-palette.$dark-disabled-text, GrayText),
|
|
46
|
+
|
|
47
|
+
// These tokens are necessary for M3. MDC has them built in already, but:
|
|
48
|
+
// 1. They are too specific, breaking a lot of internal clients.
|
|
49
|
+
// 2. The larger selectors result in a larger bundle.
|
|
50
|
+
// Note: MDC has tokens for all the various states of the icons. Some of them are ommitted,
|
|
51
|
+
// because they resolve to the same value (e.g. focus and base states for the leading icon
|
|
52
|
+
// are the same).
|
|
53
|
+
form-field-leading-icon-color: unset,
|
|
54
|
+
form-field-disabled-leading-icon-color: unset,
|
|
55
|
+
form-field-trailing-icon-color: unset,
|
|
56
|
+
form-field-disabled-trailing-icon-color: unset,
|
|
57
|
+
form-field-error-focus-trailing-icon-color: unset,
|
|
58
|
+
form-field-error-hover-trailing-icon-color: unset,
|
|
59
|
+
form-field-error-trailing-icon-color: unset,
|
|
60
|
+
form-field-enabled-select-arrow-color: map.get($system, on-surface-variant),
|
|
61
|
+
form-field-disabled-select-arrow-color: $disabled,
|
|
62
|
+
form-field-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
63
|
+
form-field-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
64
|
+
form-field-filled-container-color: map.get($system, surface-variant),
|
|
65
|
+
form-field-filled-disabled-container-color:
|
|
66
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 4%),
|
|
67
|
+
form-field-filled-label-text-color: map.get($system, on-surface-variant),
|
|
68
|
+
form-field-filled-hover-label-text-color: map.get($system, on-surface-variant),
|
|
69
|
+
form-field-filled-disabled-label-text-color: $disabled,
|
|
70
|
+
form-field-filled-input-text-color: map.get($system, on-surface),
|
|
71
|
+
form-field-filled-disabled-input-text-color: $disabled,
|
|
72
|
+
form-field-filled-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
73
|
+
form-field-filled-error-hover-label-text-color: map.get($system, error),
|
|
74
|
+
form-field-filled-error-focus-label-text-color: map.get($system, error),
|
|
75
|
+
form-field-filled-error-label-text-color: map.get($system, error),
|
|
76
|
+
form-field-filled-error-caret-color: map.get($system, error),
|
|
77
|
+
form-field-filled-active-indicator-color: map.get($system, on-surface-variant),
|
|
78
|
+
form-field-filled-disabled-active-indicator-color:
|
|
79
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
80
|
+
form-field-filled-hover-active-indicator-color: map.get($system, on-surface),
|
|
81
|
+
form-field-filled-error-active-indicator-color: map.get($system, error),
|
|
82
|
+
form-field-filled-error-focus-active-indicator-color: map.get($system, error),
|
|
83
|
+
form-field-filled-error-hover-active-indicator-color: map.get($system, error),
|
|
84
|
+
form-field-outlined-label-text-color: map.get($system, on-surface-variant),
|
|
85
|
+
form-field-outlined-hover-label-text-color: map.get($system, on-surface),
|
|
86
|
+
form-field-outlined-disabled-label-text-color: $disabled,
|
|
87
|
+
form-field-outlined-input-text-color: map.get($system, on-surface),
|
|
88
|
+
form-field-outlined-disabled-input-text-color: $disabled,
|
|
89
|
+
form-field-outlined-input-text-placeholder-color: map.get($system, on-surface-variant),
|
|
90
|
+
form-field-outlined-error-caret-color: map.get($system, error),
|
|
91
|
+
form-field-outlined-error-focus-label-text-color: map.get($system, error),
|
|
92
|
+
form-field-outlined-error-label-text-color: map.get($system, error),
|
|
93
|
+
form-field-outlined-error-hover-label-text-color: map.get($system, error),
|
|
94
|
+
form-field-outlined-outline-color: map.get($system, outline-variant),
|
|
95
|
+
form-field-outlined-disabled-outline-color:
|
|
96
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
97
|
+
form-field-outlined-hover-outline-color: map.get($system, on-surface),
|
|
98
|
+
form-field-outlined-error-focus-outline-color: map.get($system, error),
|
|
99
|
+
form-field-outlined-error-hover-outline-color: map.get($system, error),
|
|
100
|
+
form-field-outlined-error-outline-color: map.get($system, error),
|
|
101
|
+
)),
|
|
102
|
+
typography: (
|
|
103
|
+
// MDC uses `subtitle1` for the input value, placeholder and floating label. The spec
|
|
104
|
+
// shows `body1` for text fields though, so we manually override the typography.
|
|
105
|
+
// Note: Form controls inherit the typography from the parent form field.
|
|
106
|
+
form-field-container-text-font: map.get($system, body-large-font),
|
|
107
|
+
form-field-container-text-line-height: map.get($system, body-large-line-height),
|
|
108
|
+
form-field-container-text-size: map.get($system, body-large-size),
|
|
109
|
+
form-field-container-text-tracking: map.get($system, body-large-tracking),
|
|
110
|
+
form-field-container-text-weight: map.get($system, body-large-weight),
|
|
111
|
+
|
|
112
|
+
// In container styles, we updated the floating label to use the `body-1` typography level.
|
|
113
|
+
// The MDC notched outline overrides this accidentally (only when the label floats) to a
|
|
114
|
+
// `rem`-based value. This results in different label widths when floated/docked and then
|
|
115
|
+
// breaks the notch width as it has been measured in the docked state (where `body-1` is
|
|
116
|
+
// applied). We try to unset these styles set by the `mdc-notched-outline`:
|
|
117
|
+
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-notched-outline/_mixins.scss#L272-L292.
|
|
118
|
+
// This is why we can't use their `label-text-populated-size` token and we have to declare
|
|
119
|
+
// our own version of it.
|
|
120
|
+
form-field-outlined-label-text-populated-size: map.get($system, body-large-size),
|
|
121
|
+
|
|
122
|
+
form-field-subscript-text-font: map.get($system, body-small-font),
|
|
123
|
+
form-field-subscript-text-line-height: map.get($system, body-small-line-height),
|
|
124
|
+
form-field-subscript-text-size: map.get($system, body-small-size),
|
|
125
|
+
form-field-subscript-text-tracking: map.get($system, body-small-tracking),
|
|
126
|
+
form-field-subscript-text-weight: map.get($system, body-small-weight),
|
|
127
|
+
form-field-filled-label-text-font: map.get($system, body-large-font),
|
|
128
|
+
form-field-filled-label-text-size: map.get($system, body-large-size),
|
|
129
|
+
form-field-filled-label-text-tracking: map.get($system, body-large-tracking),
|
|
130
|
+
form-field-filled-label-text-weight: map.get($system, body-large-weight),
|
|
131
|
+
form-field-outlined-label-text-font: map.get($system, body-large-font),
|
|
132
|
+
form-field-outlined-label-text-size: map.get($system, body-large-size),
|
|
133
|
+
form-field-outlined-label-text-tracking: map.get($system, body-large-tracking),
|
|
134
|
+
form-field-outlined-label-text-weight: map.get($system, body-large-weight),
|
|
135
|
+
),
|
|
136
|
+
density: get-density-tokens($theme),
|
|
137
|
+
);
|
|
112
138
|
}
|
|
113
139
|
|
|
114
140
|
// Generates the mapping for the properties that change based on the form field color.
|
|
@@ -130,57 +156,10 @@
|
|
|
130
156
|
);
|
|
131
157
|
}
|
|
132
158
|
|
|
133
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
134
|
-
@function get-typography-tokens($theme) {
|
|
135
|
-
@return (
|
|
136
|
-
// MDC uses `subtitle1` for the input value, placeholder and floating label. The spec
|
|
137
|
-
// shows `body1` for text fields though, so we manually override the typography.
|
|
138
|
-
// Note: Form controls inherit the typography from the parent form field.
|
|
139
|
-
form-field-container-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
140
|
-
form-field-container-text-line-height:
|
|
141
|
-
inspection.get-theme-typography($theme, body-1, line-height),
|
|
142
|
-
form-field-container-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
143
|
-
form-field-container-text-tracking:
|
|
144
|
-
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
145
|
-
form-field-container-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
146
|
-
|
|
147
|
-
// In the container styles, we updated the floating label to use the `body-1` typography level.
|
|
148
|
-
// The MDC notched outline overrides this accidentally (only when the label floats) to a
|
|
149
|
-
// `rem`-based value. This results in different label widths when floated/docked and ultimately
|
|
150
|
-
// breaks the notch width as it has been measured in the docked state (where `body-1` is
|
|
151
|
-
// applied). We try to unset these styles set by the `mdc-notched-outline`:
|
|
152
|
-
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-notched-outline/_mixins.scss#L272-L292.
|
|
153
|
-
// This is why we can't use their `label-text-populated-size` token and we have to declare
|
|
154
|
-
// our own version of it.
|
|
155
|
-
form-field-outlined-label-text-populated-size:
|
|
156
|
-
inspection.get-theme-typography($theme, body-1, font-size),
|
|
157
|
-
|
|
158
|
-
form-field-subscript-text-font: inspection.get-theme-typography($theme, caption, font-family),
|
|
159
|
-
form-field-subscript-text-line-height:
|
|
160
|
-
inspection.get-theme-typography($theme, caption, line-height),
|
|
161
|
-
form-field-subscript-text-size: inspection.get-theme-typography($theme, caption, font-size),
|
|
162
|
-
form-field-subscript-text-tracking:
|
|
163
|
-
inspection.get-theme-typography($theme, caption, letter-spacing),
|
|
164
|
-
form-field-subscript-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
|
|
165
|
-
form-field-filled-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
166
|
-
form-field-filled-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
167
|
-
form-field-filled-label-text-tracking:
|
|
168
|
-
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
169
|
-
form-field-filled-label-text-weight:
|
|
170
|
-
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
171
|
-
form-field-outlined-label-text-font:
|
|
172
|
-
inspection.get-theme-typography($theme, body-1, font-family),
|
|
173
|
-
form-field-outlined-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
174
|
-
form-field-outlined-label-text-tracking:
|
|
175
|
-
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
176
|
-
form-field-outlined-label-text-weight:
|
|
177
|
-
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
159
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
182
160
|
@function get-density-tokens($theme) {
|
|
183
|
-
$
|
|
161
|
+
$system: m2-utils.get-system($theme);
|
|
162
|
+
$density-scale: theming.clamp-density(map.get($system, density-scale), -5);
|
|
184
163
|
$size-scale: (
|
|
185
164
|
0: 56px,
|
|
186
165
|
-1: 52px,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use 'sass:list';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
-
@use '../core/theming/inspection';
|
|
6
5
|
@use '../core/tokens/m3';
|
|
7
6
|
|
|
8
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -117,7 +116,7 @@ $prefix: (mat, form-field);
|
|
|
117
116
|
form-field-filled-label-text-weight: map.get($system, body-large-weight),
|
|
118
117
|
form-field-outlined-label-text-populated-size: null,
|
|
119
118
|
),
|
|
120
|
-
density: get-density-tokens(map.get($
|
|
119
|
+
density: get-density-tokens(map.get($system, density-scale)),
|
|
121
120
|
);
|
|
122
121
|
}
|
|
123
122
|
|