@material/web 2.4.1 → 2.4.2-nightly.067f9cd.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/button/internal/button.d.ts +2 -21
- package/button/internal/button.js +4 -43
- package/button/internal/button.js.map +1 -1
- package/button/internal/elevated-styles.d.ts +2 -0
- package/button/internal/elevated-styles.js +1 -0
- package/button/internal/elevated-styles.js.map +1 -1
- package/button/internal/filled-styles.d.ts +2 -0
- package/button/internal/filled-styles.js +1 -0
- package/button/internal/filled-styles.js.map +1 -1
- package/button/internal/filled-tonal-styles.d.ts +2 -0
- package/button/internal/filled-tonal-styles.js +1 -0
- package/button/internal/filled-tonal-styles.js.map +1 -1
- package/button/internal/outlined-styles.d.ts +2 -0
- package/button/internal/outlined-styles.js +1 -0
- package/button/internal/outlined-styles.js.map +1 -1
- package/button/internal/shared-elevation-styles.d.ts +2 -0
- package/button/internal/shared-elevation-styles.js +1 -0
- package/button/internal/shared-elevation-styles.js.map +1 -1
- package/button/internal/shared-styles.d.ts +2 -0
- package/button/internal/shared-styles.js +1 -0
- package/button/internal/shared-styles.js.map +1 -1
- package/button/internal/text-styles.d.ts +2 -0
- package/button/internal/text-styles.js +1 -0
- package/button/internal/text-styles.js.map +1 -1
- package/checkbox/internal/checkbox-styles.d.ts +2 -0
- package/checkbox/internal/checkbox-styles.js +1 -0
- package/checkbox/internal/checkbox-styles.js.map +1 -1
- package/chips/internal/assist-styles.d.ts +2 -0
- package/chips/internal/assist-styles.js +1 -0
- package/chips/internal/assist-styles.js.map +1 -1
- package/chips/internal/chip-set-styles.d.ts +2 -0
- package/chips/internal/chip-set-styles.js +1 -0
- package/chips/internal/chip-set-styles.js.map +1 -1
- package/chips/internal/elevated-styles.d.ts +2 -0
- package/chips/internal/elevated-styles.js +1 -0
- package/chips/internal/elevated-styles.js.map +1 -1
- package/chips/internal/filter-styles.d.ts +2 -0
- package/chips/internal/filter-styles.js +1 -0
- package/chips/internal/filter-styles.js.map +1 -1
- package/chips/internal/input-styles.d.ts +2 -0
- package/chips/internal/input-styles.js +1 -0
- package/chips/internal/input-styles.js.map +1 -1
- package/chips/internal/selectable-styles.d.ts +2 -0
- package/chips/internal/selectable-styles.js +1 -0
- package/chips/internal/selectable-styles.js.map +1 -1
- package/chips/internal/shared-styles.d.ts +2 -0
- package/chips/internal/shared-styles.js +1 -0
- package/chips/internal/shared-styles.js.map +1 -1
- package/chips/internal/suggestion-styles.d.ts +2 -0
- package/chips/internal/suggestion-styles.js +1 -0
- package/chips/internal/suggestion-styles.js.map +1 -1
- package/chips/internal/trailing-icon-styles.d.ts +2 -0
- package/chips/internal/trailing-icon-styles.js +1 -0
- package/chips/internal/trailing-icon-styles.js.map +1 -1
- package/dialog/internal/dialog-styles.d.ts +2 -0
- package/dialog/internal/dialog-styles.js +1 -0
- package/dialog/internal/dialog-styles.js.map +1 -1
- package/divider/internal/divider-styles.d.ts +2 -0
- package/divider/internal/divider-styles.js +1 -0
- package/divider/internal/divider-styles.js.map +1 -1
- package/elevation/internal/elevation-styles.d.ts +2 -0
- package/elevation/internal/elevation-styles.js +1 -0
- package/elevation/internal/elevation-styles.js.map +1 -1
- package/fab/internal/fab-branded-styles.d.ts +2 -0
- package/fab/internal/fab-branded-styles.js +1 -0
- package/fab/internal/fab-branded-styles.js.map +1 -1
- package/fab/internal/fab-styles.d.ts +2 -0
- package/fab/internal/fab-styles.js +1 -0
- package/fab/internal/fab-styles.js.map +1 -1
- package/fab/internal/forced-colors-styles.d.ts +2 -0
- package/fab/internal/forced-colors-styles.js +1 -0
- package/fab/internal/forced-colors-styles.js.map +1 -1
- package/fab/internal/shared-styles.d.ts +2 -0
- package/fab/internal/shared-styles.js +1 -0
- package/fab/internal/shared-styles.js.map +1 -1
- package/field/internal/field.js +12 -1
- package/field/internal/field.js.map +1 -1
- package/field/internal/filled-styles.d.ts +2 -0
- package/field/internal/filled-styles.js +1 -0
- package/field/internal/filled-styles.js.map +1 -1
- package/field/internal/outlined-styles.d.ts +2 -0
- package/field/internal/outlined-styles.js +1 -0
- package/field/internal/outlined-styles.js.map +1 -1
- package/field/internal/shared-styles.d.ts +2 -0
- package/field/internal/shared-styles.js +1 -0
- package/field/internal/shared-styles.js.map +1 -1
- package/focus/internal/focus-ring-styles.d.ts +2 -0
- package/focus/internal/focus-ring-styles.js +1 -0
- package/focus/internal/focus-ring-styles.js.map +1 -1
- package/icon/internal/icon-styles.d.ts +2 -0
- package/icon/internal/icon-styles.js +1 -0
- package/icon/internal/icon-styles.js.map +1 -1
- package/iconbutton/internal/filled-styles.d.ts +2 -0
- package/iconbutton/internal/filled-styles.js +1 -0
- package/iconbutton/internal/filled-styles.js.map +1 -1
- package/iconbutton/internal/filled-tonal-styles.d.ts +2 -0
- package/iconbutton/internal/filled-tonal-styles.js +1 -0
- package/iconbutton/internal/filled-tonal-styles.js.map +1 -1
- package/iconbutton/internal/icon-button.d.ts +2 -32
- package/iconbutton/internal/icon-button.js +33 -84
- package/iconbutton/internal/icon-button.js.map +1 -1
- package/iconbutton/internal/outlined-styles.d.ts +2 -0
- package/iconbutton/internal/outlined-styles.js +1 -0
- package/iconbutton/internal/outlined-styles.js.map +1 -1
- package/iconbutton/internal/shared-styles.d.ts +2 -0
- package/iconbutton/internal/shared-styles.js +1 -0
- package/iconbutton/internal/shared-styles.js.map +1 -1
- package/iconbutton/internal/standard-styles.d.ts +2 -0
- package/iconbutton/internal/standard-styles.js +1 -0
- package/iconbutton/internal/standard-styles.js.map +1 -1
- package/internal/events/dispatch-hooks.js +10 -1
- package/internal/events/dispatch-hooks.js.map +1 -1
- package/labs/badge/internal/badge-styles.d.ts +2 -0
- package/labs/badge/internal/badge-styles.js +1 -0
- package/labs/badge/internal/badge-styles.js.map +1 -1
- package/labs/behaviors/form-associated.d.ts +10 -8
- package/labs/behaviors/form-associated.js +4 -4
- package/labs/behaviors/form-associated.js.map +1 -1
- package/{internal/controller → labs/behaviors}/form-submitter.d.ts +11 -17
- package/labs/behaviors/form-submitter.js +87 -0
- package/labs/behaviors/form-submitter.js.map +1 -0
- package/labs/card/internal/elevated-styles.d.ts +2 -0
- package/labs/card/internal/elevated-styles.js +1 -0
- package/labs/card/internal/elevated-styles.js.map +1 -1
- package/labs/card/internal/filled-styles.d.ts +2 -0
- package/labs/card/internal/filled-styles.js +1 -0
- package/labs/card/internal/filled-styles.js.map +1 -1
- package/labs/card/internal/outlined-styles.d.ts +2 -0
- package/labs/card/internal/outlined-styles.js +1 -0
- package/labs/card/internal/outlined-styles.js.map +1 -1
- package/labs/card/internal/shared-styles.d.ts +2 -0
- package/labs/card/internal/shared-styles.js +1 -0
- package/labs/card/internal/shared-styles.js.map +1 -1
- package/labs/item/internal/item-styles.d.ts +2 -0
- package/labs/item/internal/item-styles.js +1 -0
- package/labs/item/internal/item-styles.js.map +1 -1
- package/labs/navigationbar/internal/navigation-bar-styles.d.ts +2 -0
- package/labs/navigationbar/internal/navigation-bar-styles.js +1 -0
- package/labs/navigationbar/internal/navigation-bar-styles.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.d.ts +2 -0
- package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js +1 -0
- package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-styles.d.ts +2 -0
- package/labs/navigationdrawer/internal/navigation-drawer-styles.js +1 -0
- package/labs/navigationdrawer/internal/navigation-drawer-styles.js.map +1 -1
- package/labs/navigationdrawer/internal/shared-styles.d.ts +2 -0
- package/labs/navigationdrawer/internal/shared-styles.js +1 -0
- package/labs/navigationdrawer/internal/shared-styles.js.map +1 -1
- package/labs/navigationtab/internal/navigation-tab-styles.d.ts +2 -0
- package/labs/navigationtab/internal/navigation-tab-styles.js +1 -0
- package/labs/navigationtab/internal/navigation-tab-styles.js.map +1 -1
- package/labs/segmentedbutton/internal/outlined-styles.d.ts +2 -0
- package/labs/segmentedbutton/internal/outlined-styles.js +1 -0
- package/labs/segmentedbutton/internal/outlined-styles.js.map +1 -1
- package/labs/segmentedbutton/internal/shared-styles.d.ts +2 -0
- package/labs/segmentedbutton/internal/shared-styles.js +1 -0
- package/labs/segmentedbutton/internal/shared-styles.js.map +1 -1
- package/labs/segmentedbuttonset/internal/outlined-styles.d.ts +2 -0
- package/labs/segmentedbuttonset/internal/outlined-styles.js +1 -0
- package/labs/segmentedbuttonset/internal/outlined-styles.js.map +1 -1
- package/labs/segmentedbuttonset/internal/shared-styles.d.ts +2 -0
- package/labs/segmentedbuttonset/internal/shared-styles.js +1 -0
- package/labs/segmentedbuttonset/internal/shared-styles.js.map +1 -1
- package/list/internal/list-styles.d.ts +2 -0
- package/list/internal/list-styles.js +1 -0
- package/list/internal/list-styles.js.map +1 -1
- package/list/internal/listitem/_list-item.scss +3 -0
- package/list/internal/listitem/list-item-styles.css +1 -1
- package/list/internal/listitem/list-item-styles.css.map +1 -1
- package/list/internal/listitem/list-item-styles.d.ts +2 -0
- package/list/internal/listitem/list-item-styles.js +2 -1
- package/list/internal/listitem/list-item-styles.js.map +1 -1
- package/menu/internal/menu-styles.d.ts +2 -0
- package/menu/internal/menu-styles.js +1 -0
- package/menu/internal/menu-styles.js.map +1 -1
- package/menu/internal/menuitem/_menu-item.scss +3 -0
- package/menu/internal/menuitem/menu-item-styles.css +1 -1
- package/menu/internal/menuitem/menu-item-styles.css.map +1 -1
- package/menu/internal/menuitem/menu-item-styles.d.ts +2 -0
- package/menu/internal/menuitem/menu-item-styles.js +2 -1
- package/menu/internal/menuitem/menu-item-styles.js.map +1 -1
- package/menu/internal/submenu/sub-menu-styles.d.ts +2 -0
- package/menu/internal/submenu/sub-menu-styles.js +1 -0
- package/menu/internal/submenu/sub-menu-styles.js.map +1 -1
- package/package.json +24 -2
- package/progress/internal/circular-progress-styles.d.ts +2 -0
- package/progress/internal/circular-progress-styles.js +1 -0
- package/progress/internal/circular-progress-styles.js.map +1 -1
- package/progress/internal/linear-progress-styles.d.ts +2 -0
- package/progress/internal/linear-progress-styles.js +1 -0
- package/progress/internal/linear-progress-styles.js.map +1 -1
- package/radio/internal/radio-styles.d.ts +2 -0
- package/radio/internal/radio-styles.js +1 -0
- package/radio/internal/radio-styles.js.map +1 -1
- package/ripple/internal/ripple-styles.d.ts +2 -0
- package/ripple/internal/ripple-styles.js +1 -0
- package/ripple/internal/ripple-styles.js.map +1 -1
- package/sass/ext/_assert.scss +82 -0
- package/sass/ext/_list_ext.scss +114 -0
- package/sass/ext/_map_ext.scss +222 -0
- package/sass/ext/_string_ext.scss +153 -0
- package/sass/ext/_throw.scss +83 -0
- package/sass/ext/_type.scss +66 -0
- package/{internal/sass → sass/ext}/_var.scss +86 -96
- package/sass/ext/tests.css +1 -0
- package/sass/ext/tests.css.map +1 -0
- package/sass/ext/tests.scss +18 -0
- package/select/internal/filled-select-styles.d.ts +2 -0
- package/select/internal/filled-select-styles.js +1 -0
- package/select/internal/filled-select-styles.js.map +1 -1
- package/select/internal/outlined-select-styles.d.ts +2 -0
- package/select/internal/outlined-select-styles.js +1 -0
- package/select/internal/outlined-select-styles.js.map +1 -1
- package/select/internal/select.js +2 -0
- package/select/internal/select.js.map +1 -1
- package/select/internal/shared-styles.d.ts +2 -0
- package/select/internal/shared-styles.js +1 -0
- package/select/internal/shared-styles.js.map +1 -1
- package/slider/internal/_slider.scss +1 -0
- package/slider/internal/forced-colors-styles.d.ts +2 -0
- package/slider/internal/forced-colors-styles.js +1 -0
- package/slider/internal/forced-colors-styles.js.map +1 -1
- package/slider/internal/slider-styles.css +1 -1
- package/slider/internal/slider-styles.css.map +1 -1
- package/slider/internal/slider-styles.d.ts +2 -0
- package/slider/internal/slider-styles.js +2 -1
- package/slider/internal/slider-styles.js.map +1 -1
- package/switch/internal/switch-styles.d.ts +2 -0
- package/switch/internal/switch-styles.js +1 -0
- package/switch/internal/switch-styles.js.map +1 -1
- package/tabs/internal/_tab.scss +0 -1
- package/tabs/internal/primary-tab-styles.d.ts +2 -0
- package/tabs/internal/primary-tab-styles.js +1 -0
- package/tabs/internal/primary-tab-styles.js.map +1 -1
- package/tabs/internal/secondary-tab-styles.d.ts +2 -0
- package/tabs/internal/secondary-tab-styles.js +1 -0
- package/tabs/internal/secondary-tab-styles.js.map +1 -1
- package/tabs/internal/tab-styles.css.map +1 -1
- package/tabs/internal/tab-styles.d.ts +2 -0
- package/tabs/internal/tab-styles.js +1 -0
- package/tabs/internal/tab-styles.js.map +1 -1
- package/tabs/internal/tabs-styles.d.ts +2 -0
- package/tabs/internal/tabs-styles.js +1 -0
- package/tabs/internal/tabs-styles.js.map +1 -1
- package/textfield/internal/filled-styles.d.ts +2 -0
- package/textfield/internal/filled-styles.js +1 -0
- package/textfield/internal/filled-styles.js.map +1 -1
- package/textfield/internal/outlined-styles.d.ts +2 -0
- package/textfield/internal/outlined-styles.js +1 -0
- package/textfield/internal/outlined-styles.js.map +1 -1
- package/textfield/internal/shared-styles.d.ts +2 -0
- package/textfield/internal/shared-styles.js +1 -0
- package/textfield/internal/shared-styles.js.map +1 -1
- package/tokens/versions/v30_0/sass/_index.scss +239 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar-large-flexible.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar-large.scss +35 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar-medium-flexible.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar-medium.scss +35 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar-small.scss +42 -0
- package/tokens/versions/v30_0/sass/_md-comp-app-bar.scss +59 -0
- package/tokens/versions/v30_0/sass/_md-comp-assist-chip.scss +134 -0
- package/tokens/versions/v30_0/sass/_md-comp-badge.scss +53 -0
- package/tokens/versions/v30_0/sass/_md-comp-banner.scss +147 -0
- package/tokens/versions/v30_0/sass/_md-comp-banners-basic.scss +86 -0
- package/tokens/versions/v30_0/sass/_md-comp-banners-rich.scss +89 -0
- package/tokens/versions/v30_0/sass/_md-comp-banners.scss +43 -0
- package/tokens/versions/v30_0/sass/_md-comp-bottom-app-bar.scss +37 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-elevated.scss +125 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-filled.scss +125 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-connected-large.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-connected-medium.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-connected-small.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-connected-xlarge.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-connected-xsmall.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-standard-large.scss +29 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-standard-medium.scss +29 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-standard-small.scss +29 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-standard-xlarge.scss +29 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-group-standard-xsmall.scss +29 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-large.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-medium.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-outlined.scss +124 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-small.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-text.scss +60 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-tonal.scss +125 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-xlarge.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-button-xsmall.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-button.scss +163 -0
- package/tokens/versions/v30_0/sass/_md-comp-carousel-item.scss +79 -0
- package/tokens/versions/v30_0/sass/_md-comp-checkbox.scss +216 -0
- package/tokens/versions/v30_0/sass/_md-comp-circular-progress-indicator.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-data-table.scss +110 -0
- package/tokens/versions/v30_0/sass/_md-comp-date-input-modal.scss +80 -0
- package/tokens/versions/v30_0/sass/_md-comp-date-picker-docked.scss +241 -0
- package/tokens/versions/v30_0/sass/_md-comp-date-picker-modal.scss +295 -0
- package/tokens/versions/v30_0/sass/_md-comp-dialog.scss +157 -0
- package/tokens/versions/v30_0/sass/_md-comp-divider.scss +23 -0
- package/tokens/versions/v30_0/sass/_md-comp-drag-handle.scss +54 -0
- package/tokens/versions/v30_0/sass/_md-comp-elevated-button.scss +112 -0
- package/tokens/versions/v30_0/sass/_md-comp-elevated-card.scss +75 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-branded.scss +100 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-large.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-medium.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-primary-container.scss +61 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-primary.scss +174 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-secondary-container.scss +61 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-secondary.scss +174 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-small.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-surface.scss +108 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-tertiary-container.scss +61 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab-tertiary.scss +174 -0
- package/tokens/versions/v30_0/sass/_md-comp-extended-fab.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-branded-large.scss +79 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-branded.scss +75 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-large.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-medium.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-primary-close-button.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-primary-container.scss +59 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-secondary-close-button.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-secondary-container.scss +59 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-tertiary-close-button.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu-tertiary-container.scss +59 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-menu.scss +53 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-primary-container.scss +53 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-primary-large.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-primary-small.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-primary.scss +131 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-secondary-container.scss +53 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-secondary-large.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-secondary-small.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-secondary.scss +131 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-small.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-surface-large.scss +83 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-surface.scss +83 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-tertiary-container.scss +53 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-tertiary-large.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-tertiary-small.scss +77 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab-tertiary.scss +131 -0
- package/tokens/versions/v30_0/sass/_md-comp-fab.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-autocomplete.scss +279 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-button.scss +128 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-card.scss +75 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-icon-button.scss +102 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-menu-button.scss +118 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-select.scss +269 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-text-field.scss +221 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-tonal-button.scss +108 -0
- package/tokens/versions/v30_0/sass/_md-comp-filled-tonal-icon-button.scss +102 -0
- package/tokens/versions/v30_0/sass/_md-comp-filter-chip.scss +276 -0
- package/tokens/versions/v30_0/sass/_md-comp-full-screen-dialog.scss +199 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-filled.scss +82 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-large.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-medium.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-outlined.scss +86 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-small.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-standard.scss +72 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-tonal.scss +82 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-xlarge.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button-xsmall.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-icon-button.scss +193 -0
- package/tokens/versions/v30_0/sass/_md-comp-input-chip.scss +300 -0
- package/tokens/versions/v30_0/sass/_md-comp-linear-progress-indicator.scss +60 -0
- package/tokens/versions/v30_0/sass/_md-comp-list-expand.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-list-reorder.scss +45 -0
- package/tokens/versions/v30_0/sass/_md-comp-list-reveal.scss +50 -0
- package/tokens/versions/v30_0/sass/_md-comp-list.scss +408 -0
- package/tokens/versions/v30_0/sass/_md-comp-loading-indicator.scss +38 -0
- package/tokens/versions/v30_0/sass/_md-comp-menu.scss +218 -0
- package/tokens/versions/v30_0/sass/_md-comp-menus-standard.scss +188 -0
- package/tokens/versions/v30_0/sass/_md-comp-menus-vibrant.scss +160 -0
- package/tokens/versions/v30_0/sass/_md-comp-menus.scss +141 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-bar-item-horizontal.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-bar-item-vertical.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-bar.scss +68 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail-collapsed.scss +35 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail-expanded.scss +47 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail-item-horizontal.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail-item-vertical.scss +33 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail-item.scss +39 -0
- package/tokens/versions/v30_0/sass/_md-comp-nav-rail.scss +48 -0
- package/tokens/versions/v30_0/sass/_md-comp-navigation-bar.scss +150 -0
- package/tokens/versions/v30_0/sass/_md-comp-navigation-drawer.scss +187 -0
- package/tokens/versions/v30_0/sass/_md-comp-navigation-rail.scss +233 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-autocomplete.scss +275 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-button.scss +108 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-card.scss +87 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-menu-button.scss +117 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-segmented-button.scss +121 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-select.scss +266 -0
- package/tokens/versions/v30_0/sass/_md-comp-outlined-text-field.scss +216 -0
- package/tokens/versions/v30_0/sass/_md-comp-plain-tooltip.scss +45 -0
- package/tokens/versions/v30_0/sass/_md-comp-primary-navigation-tab.scss +130 -0
- package/tokens/versions/v30_0/sass/_md-comp-progress-indicator-circular.scss +47 -0
- package/tokens/versions/v30_0/sass/_md-comp-progress-indicator-linear.scss +65 -0
- package/tokens/versions/v30_0/sass/_md-comp-progress-indicator.scss +48 -0
- package/tokens/versions/v30_0/sass/_md-comp-radio-button.scss +72 -0
- package/tokens/versions/v30_0/sass/_md-comp-rich-tooltip.scss +113 -0
- package/tokens/versions/v30_0/sass/_md-comp-scrim.scss +23 -0
- package/tokens/versions/v30_0/sass/_md-comp-search-bar.scss +102 -0
- package/tokens/versions/v30_0/sass/_md-comp-search-view.scss +84 -0
- package/tokens/versions/v30_0/sass/_md-comp-secondary-navigation-tab.scss +104 -0
- package/tokens/versions/v30_0/sass/_md-comp-sheet-bottom.scss +52 -0
- package/tokens/versions/v30_0/sass/_md-comp-sheet-floating.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-sheet-side.scss +96 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider-large.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider-medium.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider-small.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider-xlarge.scss +31 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider-xsmall.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-comp-slider.scss +307 -0
- package/tokens/versions/v30_0/sass/_md-comp-snackbar.scss +115 -0
- package/tokens/versions/v30_0/sass/_md-comp-split-button-large.scss +43 -0
- package/tokens/versions/v30_0/sass/_md-comp-split-button-medium.scss +43 -0
- package/tokens/versions/v30_0/sass/_md-comp-split-button-small.scss +43 -0
- package/tokens/versions/v30_0/sass/_md-comp-split-button-xlarge.scss +43 -0
- package/tokens/versions/v30_0/sass/_md-comp-split-button-xsmall.scss +45 -0
- package/tokens/versions/v30_0/sass/_md-comp-standard-menu-button.scss +103 -0
- package/tokens/versions/v30_0/sass/_md-comp-suggestion-chip.scss +134 -0
- package/tokens/versions/v30_0/sass/_md-comp-switch.scss +191 -0
- package/tokens/versions/v30_0/sass/_md-comp-text-button.scss +94 -0
- package/tokens/versions/v30_0/sass/_md-comp-time-input.scss +206 -0
- package/tokens/versions/v30_0/sass/_md-comp-time-picker.scss +257 -0
- package/tokens/versions/v30_0/sass/_md-comp-toolbar-docked.scss +36 -0
- package/tokens/versions/v30_0/sass/_md-comp-toolbar-floating-fab.scss +51 -0
- package/tokens/versions/v30_0/sass/_md-comp-toolbar-floating.scss +75 -0
- package/tokens/versions/v30_0/sass/_md-comp-toolbar-standard.scss +87 -0
- package/tokens/versions/v30_0/sass/_md-comp-toolbar-vibrant.scss +87 -0
- package/tokens/versions/v30_0/sass/_md-comp-top-app-bar-large.scss +62 -0
- package/tokens/versions/v30_0/sass/_md-comp-top-app-bar-medium.scss +62 -0
- package/tokens/versions/v30_0/sass/_md-comp-top-app-bar-small-centered.scss +72 -0
- package/tokens/versions/v30_0/sass/_md-comp-top-app-bar-small.scss +70 -0
- package/tokens/versions/v30_0/sass/_md-ref-palette.scss +495 -0
- package/tokens/versions/v30_0/sass/_md-ref-typeface.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-sys-color.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-color__dark.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-color__dark__high-contrast.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-color__dark__medium-contrast.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-color__high-contrast.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-color__medium-contrast.scss +209 -0
- package/tokens/versions/v30_0/sass/_md-sys-elevation.scss +35 -0
- package/tokens/versions/v30_0/sass/_md-sys-motion.scss +107 -0
- package/tokens/versions/v30_0/sass/_md-sys-shape.scss +67 -0
- package/tokens/versions/v30_0/sass/_md-sys-state-focus-indicator.scss +23 -0
- package/tokens/versions/v30_0/sass/_md-sys-state.scss +27 -0
- package/tokens/versions/v30_0/sass/_md-sys-typescale-emphasized.scss +559 -0
- package/tokens/versions/v30_0/sass/_md-sys-typescale.scss +571 -0
- package/typography/md-typescale-styles.d.ts +2 -0
- package/typography/md-typescale-styles.js +1 -0
- package/typography/md-typescale-styles.js.map +1 -1
- package/internal/controller/form-submitter.js +0 -69
- package/internal/controller/form-submitter.js.map +0 -1
- package/internal/sass/_string-ext.scss +0 -195
|
@@ -132,7 +132,16 @@ export function setupDispatchHooks(element, ...eventTypes) {
|
|
|
132
132
|
// Re-dispatch the event. We can't reuse `redispatchEvent()` since we
|
|
133
133
|
// need to add the hooks to the copy before it's dispatched.
|
|
134
134
|
isRedispatching = true;
|
|
135
|
-
const
|
|
135
|
+
const composedPathIncludesAnchor = event
|
|
136
|
+
.composedPath()
|
|
137
|
+
.some((el) => el?.matches?.('a'));
|
|
138
|
+
if (event.type === 'click' && composedPathIncludesAnchor) {
|
|
139
|
+
// For legacy reasons, synthetic click events dispatching on
|
|
140
|
+
// HTMLAnchorElement will trigger link behavior. Prevent this since
|
|
141
|
+
// we will dispatch a copy of the same click event.
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
}
|
|
144
|
+
const dispatched = event.composedPath()[0].dispatchEvent(eventCopy);
|
|
136
145
|
isRedispatching = false;
|
|
137
146
|
if (!dispatched) {
|
|
138
147
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch-hooks.js","sourceRoot":"","sources":["dispatch-hooks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAS9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY,EAAE,QAAoB;IAC9D,MAAM,KAAK,GAAI,KAAgC,CAAC,aAAa,CAAC,CAAC;IAC/D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,qCAAqC,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,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DX-License-Identifier: Apache-2.0\n */\n\n/**\n * A symbol used to access dispatch hooks on an event.\n */\nconst dispatchHooks = Symbol('dispatchHooks');\n\n/**\n * An `Event` with additional symbols for dispatch hooks.\n */\ninterface EventWithDispatchHooks extends Event {\n [dispatchHooks]: EventTarget;\n}\n\n/**\n * Add a hook for an event that is called after the event is dispatched and\n * propagates to other event listeners.\n *\n * This is useful for behaviors that need to check if an event is canceled.\n *\n * The callback is invoked synchronously, which allows for better integration\n * with synchronous platform APIs (like `<form>` or `<label>` clicking).\n *\n * Note: `setupDispatchHooks()` must be called on the element before adding any\n * other event listeners. Call it in the constructor of an element or\n * controller.\n *\n * @example\n * ```ts\n * class MyControl extends LitElement {\n * constructor() {\n * super();\n * setupDispatchHooks(this, 'click');\n * this.addEventListener('click', event => {\n * afterDispatch(event, () => {\n * if (event.defaultPrevented) {\n * return\n * }\n *\n * // ... perform logic\n * });\n * });\n * }\n * }\n * ```\n *\n * @example\n * ```ts\n * class MyController implements ReactiveController {\n * constructor(host: ReactiveElement) {\n * // setupDispatchHooks() may be called multiple times for the same\n * // element and events, making it safe for multiple controllers to use it.\n * setupDispatchHooks(host, 'click');\n * host.addEventListener('click', event => {\n * afterDispatch(event, () => {\n * if (event.defaultPrevented) {\n * return;\n * }\n *\n * // ... perform logic\n * });\n * });\n * }\n * }\n * ```\n *\n * @param event The event to add a hook to.\n * @param callback A hook that is called after the event finishes dispatching.\n */\nexport function afterDispatch(event: Event, callback: () => void) {\n const hooks = (event as EventWithDispatchHooks)[dispatchHooks];\n if (!hooks) {\n throw new Error(`'${event.type}' event needs setupDispatchHooks().`);\n }\n\n hooks.addEventListener('after', callback);\n}\n\n/**\n * A lookup map of elements and event types that have a dispatch hook listener\n * set up. Used to ensure we don't set up multiple hook listeners on the same\n * element for the same event.\n */\nconst ELEMENT_DISPATCH_HOOK_TYPES = new WeakMap<Element, Set<string>>();\n\n/**\n * Sets up an element to add dispatch hooks to given event types. This must be\n * called before adding any event listeners that need to use dispatch hooks\n * like `afterDispatch()`.\n *\n * This function is safe to call multiple times with the same element or event\n * types. Call it in the constructor of elements, mixins, and controllers to\n * ensure it is set up before external listeners.\n *\n * @example\n * ```ts\n * class MyControl extends LitElement {\n * constructor() {\n * super();\n * setupDispatchHooks(this, 'click');\n * this.addEventListener('click', this.listenerUsingAfterDispatch);\n * }\n * }\n * ```\n *\n * @param element The element to set up event dispatch hooks for.\n * @param eventTypes The event types to add dispatch hooks to.\n */\nexport function setupDispatchHooks(\n element: Element,\n ...eventTypes: [string, ...string[]]\n) {\n let typesAlreadySetUp = ELEMENT_DISPATCH_HOOK_TYPES.get(element);\n if (!typesAlreadySetUp) {\n typesAlreadySetUp = new Set();\n ELEMENT_DISPATCH_HOOK_TYPES.set(element, typesAlreadySetUp);\n }\n\n for (const eventType of eventTypes) {\n // Don't register multiple dispatch hook listeners. A second registration\n // would lead to the second listener re-dispatching a re-dispatched event,\n // which can cause an infinite loop inside the other one.\n if (typesAlreadySetUp.has(eventType)) {\n continue;\n }\n\n // When we re-dispatch the event, it's going to immediately trigger this\n // listener again. Use a flag to ignore it.\n let isRedispatching = false;\n element.addEventListener(\n eventType,\n (event: Event) => {\n if (isRedispatching) {\n return;\n }\n\n // Do not let the event propagate to any other listener (not just\n // bubbling listeners with `stopPropagation()`).\n event.stopImmediatePropagation();\n // Make a copy.\n const eventCopy = Reflect.construct(event.constructor, [\n event.type,\n event,\n ]);\n\n // Add hooks onto the event.\n const hooks = new EventTarget();\n (eventCopy as EventWithDispatchHooks)[dispatchHooks] = hooks;\n\n // Re-dispatch the event. We can't reuse `redispatchEvent()` since we\n // need to add the hooks to the copy before it's dispatched.\n isRedispatching = true;\n const composedPathIncludesAnchor = event\n .composedPath()\n .some((el) => (el as Partial<HTMLElement>)?.matches?.('a'));\n if (event.type === 'click' && composedPathIncludesAnchor) {\n // For legacy reasons, synthetic click events dispatching on\n // HTMLAnchorElement will trigger link behavior. Prevent this since\n // we will dispatch a copy of the same click event.\n event.preventDefault();\n }\n const dispatched = event.composedPath()[0].dispatchEvent(eventCopy);\n isRedispatching = false;\n if (!dispatched) {\n event.preventDefault();\n }\n\n // Synchronously call afterDispatch() hooks.\n hooks.dispatchEvent(new Event('after'));\n },\n {\n // Ensure this listener runs before other listeners.\n // `setupDispatchHooks()` should be called in constructors to also\n // ensure they run before any other externally-added capture listeners.\n capture: true,\n },\n );\n\n typesAlreadySetUp.add(eventType);\n }\n}\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=badge-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-styles.js","sourceRoot":"","sources":["badge-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/badge/internal/badge-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"badge-styles.js","sourceRoot":"","sources":["badge-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/badge/internal/badge-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_color: var(--md-badge-color, var(--md-sys-color-error, #b3261e));--_large-color: var(--md-badge-large-color, var(--md-sys-color-error, #b3261e));--_large-label-text-color: var(--md-badge-large-label-text-color, var(--md-sys-color-on-error, #fff));--_large-label-text-font: var(--md-badge-large-label-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));--_large-label-text-line-height: var(--md-badge-large-label-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));--_large-label-text-size: var(--md-badge-large-label-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));--_large-label-text-weight: var(--md-badge-large-label-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-shape: var(--md-badge-large-shape, var(--md-sys-shape-corner-full, 9999px));--_large-size: var(--md-badge-large-size, 16px);--_shape: var(--md-badge-shape, var(--md-sys-shape-corner-full, 9999px));--_size: var(--md-badge-size, 6px)}.md3-badge{inset-inline-start:50%;margin-inline-start:6px;margin-block-start:4px;position:absolute;inset-block-start:0px;background-color:var(--_color);border-radius:var(--_shape);height:var(--_size)}.md3-badge:not(.md3-badge--large){width:var(--_size)}.md3-badge.md3-badge--large{display:flex;flex-direction:column;justify-content:center;margin-inline-start:2px;margin-block-start:1px;background-color:var(--_large-color);border-radius:var(--_large-shape);height:var(--_large-size);min-width:var(--_large-size);color:var(--_large-label-text-color)}.md3-badge.md3-badge--large .md3-badge__value{padding:0px 4px;text-align:center}.md3-badge__value{font-family:var(--_large-label-text-font);font-size:var(--_large-label-text-size);line-height:var(--_large-label-text-line-height);font-weight:var(--_large-label-text-weight)}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -38,14 +38,15 @@ export interface FormAssociated {
|
|
|
38
38
|
*/
|
|
39
39
|
disabled: boolean;
|
|
40
40
|
/**
|
|
41
|
-
* Gets the current form value of a component.
|
|
41
|
+
* Gets the current form value of a component. Defaults to the component's
|
|
42
|
+
* `value` attribute.
|
|
42
43
|
*
|
|
43
44
|
* @return The current form value.
|
|
44
45
|
*/
|
|
45
46
|
[getFormValue](): FormValue | null;
|
|
46
47
|
/**
|
|
47
48
|
* Gets the current form state of a component. Defaults to the component's
|
|
48
|
-
* `[
|
|
49
|
+
* `[getFormValue]()` result.
|
|
49
50
|
*
|
|
50
51
|
* Use this when the state of an element is different from its value, such as
|
|
51
52
|
* checkboxes (internal boolean state and a user string value).
|
|
@@ -61,24 +62,25 @@ export interface FormAssociated {
|
|
|
61
62
|
*/
|
|
62
63
|
formDisabledCallback(disabled: boolean): void;
|
|
63
64
|
/**
|
|
64
|
-
*
|
|
65
|
-
* default value that is reset is represented in the attribute
|
|
65
|
+
* An optional callback for when the form requests to reset its value.
|
|
66
|
+
* Typically, the default value that is reset is represented in the attribute
|
|
67
|
+
* of an element.
|
|
66
68
|
*
|
|
67
69
|
* This means the attribute used for the value should not update as the value
|
|
68
70
|
* changes. For example, a checkbox should not change its default `checked`
|
|
69
71
|
* attribute when selected. Ensure form values do not reflect.
|
|
70
72
|
*/
|
|
71
|
-
formResetCallback(): void;
|
|
73
|
+
formResetCallback?(): void;
|
|
72
74
|
/**
|
|
73
|
-
*
|
|
74
|
-
* example, when a page is reloaded or forms are autofilled.
|
|
75
|
+
* An optional callback for when the form restores the state of a component.
|
|
76
|
+
* For example, when a page is reloaded or forms are autofilled.
|
|
75
77
|
*
|
|
76
78
|
* @param state The state to restore, or null to reset the form control's
|
|
77
79
|
* value.
|
|
78
80
|
* @param reason The reason state was restored, either `'restore'` or
|
|
79
81
|
* `'autocomplete'`.
|
|
80
82
|
*/
|
|
81
|
-
formStateRestoreCallback(state: FormRestoreState | null, reason: FormRestoreReason): void;
|
|
83
|
+
formStateRestoreCallback?(state: FormRestoreState | null, reason: FormRestoreReason): void;
|
|
82
84
|
/**
|
|
83
85
|
* An optional callback for when the associated form changes.
|
|
84
86
|
*
|
|
@@ -119,7 +119,9 @@ export function mixinFormAssociated(base) {
|
|
|
119
119
|
return this.hasAttribute('disabled');
|
|
120
120
|
}
|
|
121
121
|
set disabled(disabled) {
|
|
122
|
-
|
|
122
|
+
// Coerce `disabled` in `Boolean()` to ensure that setting to `null` or
|
|
123
|
+
// `undefined` sets the attribute to `false`.
|
|
124
|
+
this.toggleAttribute('disabled', Boolean(disabled));
|
|
123
125
|
// We don't need to call `requestUpdate()` since it's called synchronously
|
|
124
126
|
// in `attributeChangedCallback()`.
|
|
125
127
|
}
|
|
@@ -151,9 +153,7 @@ export function mixinFormAssociated(base) {
|
|
|
151
153
|
this[internals].setFormValue(this[getFormValue](), this[getFormState]());
|
|
152
154
|
}
|
|
153
155
|
[getFormValue]() {
|
|
154
|
-
|
|
155
|
-
// implementation is needed.
|
|
156
|
-
throw new Error('Implement [getFormValue]');
|
|
156
|
+
return this.getAttribute('value');
|
|
157
157
|
}
|
|
158
158
|
[getFormState]() {
|
|
159
159
|
return this[getFormValue]();
|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B;IACF,oCAAc,GAAG,IAAI,CAAC;IAiBtC;QADC,QAAQ,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC;qDAG5B;IASD;QADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;yDAG3C;IAmEH,OAAO,qBAAqB,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement, PropertyDeclaration} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {internals, WithElementInternals} from './element-internals.js';\nimport {MixinBase, MixinReturn} from './mixin.js';\n\n/**\n * A form-associated element.\n *\n * IMPORTANT: Requires declares for lit-analyzer\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n * class MyControl extends base {\n * // Writable mixin properties for lit-html binding, needed for lit-analyzer\n * declare disabled: boolean;\n * declare name: string;\n * }\n * ```\n */\nexport interface FormAssociated {\n /**\n * The associated form element with which this element's value will submit.\n */\n readonly form: HTMLFormElement | null;\n\n /**\n * The labels this element is associated with.\n */\n readonly labels: NodeList;\n\n /**\n * The HTML name to use in form submission.\n */\n name: string;\n\n /**\n * Whether or not the element is disabled.\n */\n disabled: boolean;\n\n /**\n * Gets the current form value of a component.\n *\n * @return The current form value.\n */\n [getFormValue](): FormValue | null;\n\n /**\n * Gets the current form state of a component. Defaults to the component's\n * `[formValue]`.\n *\n * Use this when the state of an element is different from its value, such as\n * checkboxes (internal boolean state and a user string value).\n *\n * @return The current form state, defaults to the form value.\n */\n [getFormState](): FormValue | null;\n\n /**\n * A callback for when a form component should be disabled or enabled. This\n * can be called in a variety of situations, such as disabled `<fieldset>`s.\n *\n * @param disabled Whether or not the form control should be disabled.\n */\n formDisabledCallback(disabled: boolean): void;\n\n /**\n * A callback for when the form requests to reset its value. Typically, the\n * default value that is reset is represented in the attribute of an element.\n *\n * This means the attribute used for the value should not update as the value\n * changes. For example, a checkbox should not change its default `checked`\n * attribute when selected. Ensure form values do not reflect.\n */\n formResetCallback(): void;\n\n /**\n * A callback for when the form restores the state of a component. For\n * example, when a page is reloaded or forms are autofilled.\n *\n * @param state The state to restore, or null to reset the form control's\n * value.\n * @param reason The reason state was restored, either `'restore'` or\n * `'autocomplete'`.\n */\n formStateRestoreCallback(\n state: FormRestoreState | null,\n reason: FormRestoreReason,\n ): void;\n\n /**\n * An optional callback for when the associated form changes.\n *\n * @param form The new associated form, or `null` if there is none.\n */\n formAssociatedCallback?(form: HTMLFormElement | null): void;\n}\n\n/**\n * The constructor of a `FormAssociated` element.\n */\nexport interface FormAssociatedConstructor {\n /**\n * Indicates that an element is participating in form association.\n */\n readonly formAssociated: true;\n}\n\n/**\n * A symbol property to retrieve the form value for an element.\n */\nexport const getFormValue = Symbol('getFormValue');\n\n/**\n * A symbol property to retrieve the form state for an element.\n */\nexport const getFormState = Symbol('getFormState');\n\n/**\n * Mixes in form-associated behavior for a class. This allows an element to add\n * values to `<form>` elements.\n *\n * Implementing classes should provide a `[formValue]` to return the current\n * value of the element, as well as reset and restore callbacks.\n *\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n *\n * class MyControl extends base {\n * \\@property()\n * value = '';\n *\n * override [getFormValue]() {\n * return this.value;\n * }\n *\n * override formResetCallback() {\n * const defaultValue = this.getAttribute('value');\n * this.value = defaultValue;\n * }\n *\n * override formStateRestoreCallback(state: string) {\n * this.value = state;\n * }\n * }\n * ```\n *\n * Elements may optionally provide a `[formState]` if their values do not\n * represent the state of the component.\n *\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n *\n * class MyCheckbox extends base {\n * \\@property()\n * value = 'on';\n *\n * \\@property({type: Boolean})\n * checked = false;\n *\n * override [getFormValue]() {\n * return this.checked ? this.value : null;\n * }\n *\n * override [getFormState]() {\n * return String(this.checked);\n * }\n *\n * override formResetCallback() {\n * const defaultValue = this.hasAttribute('checked');\n * this.checked = defaultValue;\n * }\n *\n * override formStateRestoreCallback(state: string) {\n * this.checked = Boolean(state);\n * }\n * }\n * ```\n *\n * IMPORTANT: Requires declares for lit-analyzer\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n * class MyControl extends base {\n * // Writable mixin properties for lit-html binding, needed for lit-analyzer\n * declare disabled: boolean;\n * declare name: string;\n * }\n * ```\n *\n * @param base The class to mix functionality into. The base class must use\n * `mixinElementInternals()`.\n * @return The provided class with `FormAssociated` mixed in.\n */\nexport function mixinFormAssociated<\n T extends MixinBase<LitElement & WithElementInternals>,\n>(base: T): MixinReturn<T & FormAssociatedConstructor, FormAssociated> {\n abstract class FormAssociatedElement extends base implements FormAssociated {\n /** @nocollapse */\n static readonly formAssociated = true;\n\n get form() {\n return this[internals].form;\n }\n\n get labels() {\n return this[internals].labels;\n }\n\n // Use @property for the `name` and `disabled` properties to add them to the\n // `observedAttributes` array and trigger `attributeChangedCallback()`.\n //\n // We don't use Lit's default getter/setter (`noAccessor: true`) because\n // the attributes need to be updated synchronously to work with synchronous\n // form APIs, and Lit updates attributes async by default.\n @property({noAccessor: true})\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n // Note: setting name to null or empty does not remove the attribute.\n this.setAttribute('name', name);\n // We don't need to call `requestUpdate()` since it's called synchronously\n // in `attributeChangedCallback()`.\n }\n\n @property({type: Boolean, noAccessor: true})\n get disabled() {\n return this.hasAttribute('disabled');\n }\n set disabled(disabled: boolean) {\n this.toggleAttribute('disabled', disabled);\n // We don't need to call `requestUpdate()` since it's called synchronously\n // in `attributeChangedCallback()`.\n }\n\n override attributeChangedCallback(\n name: string,\n old: string | null,\n value: string | null,\n ) {\n // Manually `requestUpdate()` for `name` and `disabled` when their\n // attribute or property changes.\n // The properties update their attributes, so this callback is invoked\n // immediately when the properties are set. We call `requestUpdate()` here\n // instead of letting Lit set the properties from the attribute change.\n // That would cause the properties to re-set the attribute and invoke this\n // callback again in a loop. This leads to stale state when Lit tries to\n // determine if a property changed or not.\n if (name === 'name' || name === 'disabled') {\n // Disabled's value is only false if the attribute is missing and null.\n const oldValue = name === 'disabled' ? old !== null : old;\n // Trigger a lit update when the attribute changes.\n this.requestUpdate(name, oldValue);\n return;\n }\n\n super.attributeChangedCallback(name, old, value);\n }\n\n override requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration,\n ) {\n super.requestUpdate(name, oldValue, options);\n // If any properties change, update the form value, which may have changed\n // as well.\n // Update the form value synchronously in `requestUpdate()` rather than\n // `update()` or `updated()`, which are async. This is necessary to ensure\n // that form data is updated in time for synchronous event listeners.\n this[internals].setFormValue(this[getFormValue](), this[getFormState]());\n }\n\n [getFormValue](): FormValue | null {\n // Closure does not allow abstract symbol members, so a default\n // implementation is needed.\n throw new Error('Implement [getFormValue]');\n }\n\n [getFormState](): FormValue | null {\n return this[getFormValue]();\n }\n\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n abstract formResetCallback(): void;\n\n abstract formStateRestoreCallback(\n state: FormRestoreState | null,\n reason: FormRestoreReason,\n ): void;\n }\n\n return FormAssociatedElement;\n}\n\n/**\n * A value that can be provided for form submission and state.\n */\nexport type FormValue = File | string | FormData;\n\n/**\n * A value to be restored for a component's form value. If a component's form\n * state is a `FormData` object, its entry list of name and values will be\n * provided.\n */\nexport type FormRestoreState =\n | File\n | string\n | Array<[string, FormDataEntryValue]>;\n\n/**\n * The reason a form component is being restored for, either `'restore'` for\n * browser restoration or `'autocomplete'` for restoring user values.\n */\nexport type FormRestoreReason = 'restore' | 'autocomplete';\n"]}
|
|
1
|
+
{"version":3,"file":"form-associated.js","sourceRoot":"","sources":["form-associated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAC,SAAS,EAAuB,MAAM,wBAAwB,CAAC;AA4GvE;;GAEG;AACH,MA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AC;AAC/B,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement, PropertyDeclaration} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {internals, WithElementInternals} from './element-internals.js';\nimport {MixinBase, MixinReturn} from './mixin.js';\n\n/**\n * A form-associated element.\n *\n * IMPORTANT: Requires declares for lit-analyzer\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n * class MyControl extends base {\n * // Writable mixin properties for lit-html binding, needed for lit-analyzer\n * declare disabled: boolean;\n * declare name: string;\n * }\n * ```\n */\nexport interface FormAssociated {\n /**\n * The associated form element with which this element's value will submit.\n */\n readonly form: HTMLFormElement | null;\n\n /**\n * The labels this element is associated with.\n */\n readonly labels: NodeList;\n\n /**\n * The HTML name to use in form submission.\n */\n name: string;\n\n /**\n * Whether or not the element is disabled.\n */\n disabled: boolean;\n\n /**\n * Gets the current form value of a component. Defaults to the component's\n * `value` attribute.\n *\n * @return The current form value.\n */\n [getFormValue](): FormValue | null;\n\n /**\n * Gets the current form state of a component. Defaults to the component's\n * `[getFormValue]()` result.\n *\n * Use this when the state of an element is different from its value, such as\n * checkboxes (internal boolean state and a user string value).\n *\n * @return The current form state, defaults to the form value.\n */\n [getFormState](): FormValue | null;\n\n /**\n * A callback for when a form component should be disabled or enabled. This\n * can be called in a variety of situations, such as disabled `<fieldset>`s.\n *\n * @param disabled Whether or not the form control should be disabled.\n */\n formDisabledCallback(disabled: boolean): void;\n\n /**\n * An optional callback for when the form requests to reset its value.\n * Typically, the default value that is reset is represented in the attribute\n * of an element.\n *\n * This means the attribute used for the value should not update as the value\n * changes. For example, a checkbox should not change its default `checked`\n * attribute when selected. Ensure form values do not reflect.\n */\n formResetCallback?(): void;\n\n /**\n * An optional callback for when the form restores the state of a component.\n * For example, when a page is reloaded or forms are autofilled.\n *\n * @param state The state to restore, or null to reset the form control's\n * value.\n * @param reason The reason state was restored, either `'restore'` or\n * `'autocomplete'`.\n */\n formStateRestoreCallback?(\n state: FormRestoreState | null,\n reason: FormRestoreReason,\n ): void;\n\n /**\n * An optional callback for when the associated form changes.\n *\n * @param form The new associated form, or `null` if there is none.\n */\n formAssociatedCallback?(form: HTMLFormElement | null): void;\n}\n\n/**\n * The constructor of a `FormAssociated` element.\n */\nexport interface FormAssociatedConstructor {\n /**\n * Indicates that an element is participating in form association.\n */\n readonly formAssociated: true;\n}\n\n/**\n * A symbol property to retrieve the form value for an element.\n */\nexport const getFormValue = Symbol('getFormValue');\n\n/**\n * A symbol property to retrieve the form state for an element.\n */\nexport const getFormState = Symbol('getFormState');\n\n/**\n * Mixes in form-associated behavior for a class. This allows an element to add\n * values to `<form>` elements.\n *\n * Implementing classes should provide a `[formValue]` to return the current\n * value of the element, as well as reset and restore callbacks.\n *\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n *\n * class MyControl extends base {\n * \\@property()\n * value = '';\n *\n * override [getFormValue]() {\n * return this.value;\n * }\n *\n * override formResetCallback() {\n * const defaultValue = this.getAttribute('value');\n * this.value = defaultValue;\n * }\n *\n * override formStateRestoreCallback(state: string) {\n * this.value = state;\n * }\n * }\n * ```\n *\n * Elements may optionally provide a `[formState]` if their values do not\n * represent the state of the component.\n *\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n *\n * class MyCheckbox extends base {\n * \\@property()\n * value = 'on';\n *\n * \\@property({type: Boolean})\n * checked = false;\n *\n * override [getFormValue]() {\n * return this.checked ? this.value : null;\n * }\n *\n * override [getFormState]() {\n * return String(this.checked);\n * }\n *\n * override formResetCallback() {\n * const defaultValue = this.hasAttribute('checked');\n * this.checked = defaultValue;\n * }\n *\n * override formStateRestoreCallback(state: string) {\n * this.checked = Boolean(state);\n * }\n * }\n * ```\n *\n * IMPORTANT: Requires declares for lit-analyzer\n * @example\n * ```ts\n * const base = mixinFormAssociated(mixinElementInternals(LitElement));\n * class MyControl extends base {\n * // Writable mixin properties for lit-html binding, needed for lit-analyzer\n * declare disabled: boolean;\n * declare name: string;\n * }\n * ```\n *\n * @param base The class to mix functionality into. The base class must use\n * `mixinElementInternals()`.\n * @return The provided class with `FormAssociated` mixed in.\n */\nexport function mixinFormAssociated<\n T extends MixinBase<LitElement & WithElementInternals>,\n>(base: T): MixinReturn<T & FormAssociatedConstructor, FormAssociated> {\n abstract class FormAssociatedElement extends base implements FormAssociated {\n /** @nocollapse */\n static readonly formAssociated = true;\n\n get form() {\n return this[internals].form;\n }\n\n get labels() {\n return this[internals].labels;\n }\n\n // Use @property for the `name` and `disabled` properties to add them to the\n // `observedAttributes` array and trigger `attributeChangedCallback()`.\n //\n // We don't use Lit's default getter/setter (`noAccessor: true`) because\n // the attributes need to be updated synchronously to work with synchronous\n // form APIs, and Lit updates attributes async by default.\n @property({noAccessor: true})\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n // Note: setting name to null or empty does not remove the attribute.\n this.setAttribute('name', name);\n // We don't need to call `requestUpdate()` since it's called synchronously\n // in `attributeChangedCallback()`.\n }\n\n @property({type: Boolean, noAccessor: true})\n get disabled() {\n return this.hasAttribute('disabled');\n }\n set disabled(disabled: boolean) {\n // Coerce `disabled` in `Boolean()` to ensure that setting to `null` or\n // `undefined` sets the attribute to `false`.\n this.toggleAttribute('disabled', Boolean(disabled));\n // We don't need to call `requestUpdate()` since it's called synchronously\n // in `attributeChangedCallback()`.\n }\n\n override attributeChangedCallback(\n name: string,\n old: string | null,\n value: string | null,\n ) {\n // Manually `requestUpdate()` for `name` and `disabled` when their\n // attribute or property changes.\n // The properties update their attributes, so this callback is invoked\n // immediately when the properties are set. We call `requestUpdate()` here\n // instead of letting Lit set the properties from the attribute change.\n // That would cause the properties to re-set the attribute and invoke this\n // callback again in a loop. This leads to stale state when Lit tries to\n // determine if a property changed or not.\n if (name === 'name' || name === 'disabled') {\n // Disabled's value is only false if the attribute is missing and null.\n const oldValue = name === 'disabled' ? old !== null : old;\n // Trigger a lit update when the attribute changes.\n this.requestUpdate(name, oldValue);\n return;\n }\n\n super.attributeChangedCallback(name, old, value);\n }\n\n override requestUpdate(\n name?: PropertyKey,\n oldValue?: unknown,\n options?: PropertyDeclaration,\n ) {\n super.requestUpdate(name, oldValue, options);\n // If any properties change, update the form value, which may have changed\n // as well.\n // Update the form value synchronously in `requestUpdate()` rather than\n // `update()` or `updated()`, which are async. This is necessary to ensure\n // that form data is updated in time for synchronous event listeners.\n this[internals].setFormValue(this[getFormValue](), this[getFormState]());\n }\n\n [getFormValue](): FormValue | null {\n return this.getAttribute('value');\n }\n\n [getFormState](): FormValue | null {\n return this[getFormValue]();\n }\n\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n }\n\n return FormAssociatedElement;\n}\n\n/**\n * A value that can be provided for form submission and state.\n */\nexport type FormValue = File | string | FormData;\n\n/**\n * A value to be restored for a component's form value. If a component's form\n * state is a `FormData` object, its entry list of name and values will be\n * provided.\n */\nexport type FormRestoreState =\n | File\n | string\n | Array<[string, FormDataEntryValue]>;\n\n/**\n * The reason a form component is being restored for, either `'restore'` for\n * browser restoration or `'autocomplete'` for restoring user values.\n */\nexport type FormRestoreReason = 'restore' | 'autocomplete';\n"]}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Copyright 2023 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { WithElementInternals } from '
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
import { WithElementInternals } from './element-internals.js';
|
|
8
|
+
import { MixinBase, MixinReturn } from './mixin.js';
|
|
8
9
|
/**
|
|
9
10
|
* A string indicating the form submission behavior of the element.
|
|
10
11
|
*
|
|
@@ -19,7 +20,7 @@ export type FormSubmitterType = 'button' | 'submit' | 'reset';
|
|
|
19
20
|
* An element that can submit or reset a `<form>`, similar to
|
|
20
21
|
* `<button type="submit">`.
|
|
21
22
|
*/
|
|
22
|
-
export interface FormSubmitter
|
|
23
|
+
export interface FormSubmitter {
|
|
23
24
|
/**
|
|
24
25
|
* A string indicating the form submission behavior of the element.
|
|
25
26
|
*
|
|
@@ -29,7 +30,7 @@ export interface FormSubmitter extends ReactiveElement, WithElementInternals {
|
|
|
29
30
|
* - reset: The element resets the form.
|
|
30
31
|
* - button: The element does nothing.
|
|
31
32
|
*/
|
|
32
|
-
type:
|
|
33
|
+
type: string;
|
|
33
34
|
/**
|
|
34
35
|
* The HTML name to use in form submission. When combined with a `value`, the
|
|
35
36
|
* submitting button's name/value will be added to the form.
|
|
@@ -43,28 +44,21 @@ export interface FormSubmitter extends ReactiveElement, WithElementInternals {
|
|
|
43
44
|
*/
|
|
44
45
|
value: string;
|
|
45
46
|
}
|
|
46
|
-
type FormSubmitterConstructor = (new () => FormSubmitter) | (abstract new () => FormSubmitter);
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* instance should be form associated and have a `type` property.
|
|
48
|
+
* Mixes in form submitter behavior for a class.
|
|
50
49
|
*
|
|
51
50
|
* A click listener is added to each element instance. If the click is not
|
|
52
51
|
* default prevented, it will submit the element's form, if any.
|
|
53
52
|
*
|
|
54
53
|
* @example
|
|
55
54
|
* ```ts
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* setupFormSubmitter(MyElement);
|
|
59
|
-
* }
|
|
60
|
-
*
|
|
55
|
+
* const base = mixinFormSubmitter(mixinElementInternals(LitElement));
|
|
56
|
+
* class MyButton extends base {
|
|
61
57
|
* static formAssociated = true;
|
|
62
|
-
*
|
|
63
|
-
* type: FormSubmitterType = 'submit';
|
|
64
58
|
* }
|
|
65
59
|
* ```
|
|
66
60
|
*
|
|
67
|
-
* @param
|
|
61
|
+
* @param base The class to mix functionality into.
|
|
62
|
+
* @return The provided class with `FormSubmitter` mixed in.
|
|
68
63
|
*/
|
|
69
|
-
export declare function
|
|
70
|
-
export {};
|
|
64
|
+
export declare function mixinFormSubmitter<T extends MixinBase<LitElement & WithElementInternals>>(base: T): MixinReturn<T, FormSubmitter>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { __decorate } from "tslib";
|
|
7
|
+
import { isServer } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { afterDispatch, setupDispatchHooks, } from '../../internal/events/dispatch-hooks.js';
|
|
10
|
+
import { internals } from './element-internals.js';
|
|
11
|
+
/**
|
|
12
|
+
* Mixes in form submitter behavior for a class.
|
|
13
|
+
*
|
|
14
|
+
* A click listener is added to each element instance. If the click is not
|
|
15
|
+
* default prevented, it will submit the element's form, if any.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const base = mixinFormSubmitter(mixinElementInternals(LitElement));
|
|
20
|
+
* class MyButton extends base {
|
|
21
|
+
* static formAssociated = true;
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param base The class to mix functionality into.
|
|
26
|
+
* @return The provided class with `FormSubmitter` mixed in.
|
|
27
|
+
*/
|
|
28
|
+
export function mixinFormSubmitter(base) {
|
|
29
|
+
class FormSubmitterElement extends base {
|
|
30
|
+
// Name attribute must reflect synchronously for form integration.
|
|
31
|
+
get name() {
|
|
32
|
+
return this.getAttribute('name') ?? '';
|
|
33
|
+
}
|
|
34
|
+
set name(name) {
|
|
35
|
+
this.setAttribute('name', name);
|
|
36
|
+
}
|
|
37
|
+
// Mixins must have a constructor with `...args: any[]`
|
|
38
|
+
// tslint:disable-next-line:no-any
|
|
39
|
+
constructor(...args) {
|
|
40
|
+
super(...args);
|
|
41
|
+
this.type = 'submit';
|
|
42
|
+
this.value = '';
|
|
43
|
+
if (isServer)
|
|
44
|
+
return;
|
|
45
|
+
setupDispatchHooks(this, 'click');
|
|
46
|
+
this.addEventListener('click', async (event) => {
|
|
47
|
+
const isReset = this.type === 'reset';
|
|
48
|
+
const isSubmit = this.type === 'submit';
|
|
49
|
+
const elementInternals = this[internals];
|
|
50
|
+
const { form } = elementInternals;
|
|
51
|
+
if (!form || !(isSubmit || isReset)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
afterDispatch(event, () => {
|
|
55
|
+
if (event.defaultPrevented) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (isReset) {
|
|
59
|
+
form.reset();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// form.requestSubmit(submitter) does not work with form associated custom
|
|
63
|
+
// elements. This patches the dispatched submit event to add the correct
|
|
64
|
+
// `submitter`.
|
|
65
|
+
// See https://github.com/WICG/webcomponents/issues/814
|
|
66
|
+
form.addEventListener('submit', (submitEvent) => {
|
|
67
|
+
Object.defineProperty(submitEvent, 'submitter', {
|
|
68
|
+
configurable: true,
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: () => this,
|
|
71
|
+
});
|
|
72
|
+
}, { capture: true, once: true });
|
|
73
|
+
elementInternals.setFormValue(this.value);
|
|
74
|
+
form.requestSubmit();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
__decorate([
|
|
80
|
+
property()
|
|
81
|
+
], FormSubmitterElement.prototype, "type", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property({ reflect: true })
|
|
84
|
+
], FormSubmitterElement.prototype, "value", void 0);
|
|
85
|
+
return FormSubmitterElement;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=form-submitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-submitter.js","sourceRoot":"","sources":["form-submitter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,QAAQ,EAAa,MAAM,KAAK,CAAC;AACzC,OAAO,EA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AAC;oBAED,IAAI,OAAO,EAAE,CAAC;wBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;wBACb,OAAO;oBACT,CAAC;oBAED,0EAA0E;oBAC1E,wEAAwE;oBACxE,eAAe;oBACf,uDAAuD;oBACvD,IAAI,CAAC,gBAAgB,CACnB,QAAQ,EACR,CAAC,WAAkB,EAAE,EAAE;wBACrB,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;4BAC9C,YAAY,EAAE,IAAI;4BAClB,UAAU,EAAE,IAAI;4BAChB,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI;yBAChB,CAAC,CAAC;oBACL,CAAC,EACD,EAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,CAC5B,CAAC;oBAEF,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC1C,IAAI,CAAC,aAAa,EAAE,CAAC;gBACvB,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KACF;IAzDa;QAAX,QAAQ,EAAE;sDAAiB;IACD;QAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;uDAAY;IA0DxC,OAAO,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {isServer, LitElement} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {\n afterDispatch,\n setupDispatchHooks,\n} from '../../internal/events/dispatch-hooks.js';\nimport {internals, WithElementInternals} from './element-internals.js';\nimport {MixinBase, MixinReturn} from './mixin.js';\n\n/**\n * A string indicating the form submission behavior of the element.\n *\n * - submit: The element submits the form. This is the default value if the\n * attribute is not specified, or if it is dynamically changed to an empty or\n * invalid value.\n * - reset: The element resets the form.\n * - button: The element does nothing.\n */\nexport type FormSubmitterType = 'button' | 'submit' | 'reset';\n\n/**\n * An element that can submit or reset a `<form>`, similar to\n * `<button type=\"submit\">`.\n */\nexport interface FormSubmitter {\n /**\n * A string indicating the form submission behavior of the element.\n *\n * - submit: The element submits the form. This is the default value if the\n * attribute is not specified, or if it is dynamically changed to an empty or\n * invalid value.\n * - reset: The element resets the form.\n * - button: The element does nothing.\n */\n type: string;\n\n /**\n * The HTML name to use in form submission. When combined with a `value`, the\n * submitting button's name/value will be added to the form.\n *\n * Names must reflect to a `name` attribute for form integration.\n */\n name: string;\n\n /**\n * The value of the button. When combined with a `name`, the submitting\n * button's name/value will be added to the form.\n */\n value: string;\n}\n\n/**\n * Mixes in form submitter behavior for a class.\n *\n * A click listener is added to each element instance. If the click is not\n * default prevented, it will submit the element's form, if any.\n *\n * @example\n * ```ts\n * const base = mixinFormSubmitter(mixinElementInternals(LitElement));\n * class MyButton extends base {\n * static formAssociated = true;\n * }\n * ```\n *\n * @param base The class to mix functionality into.\n * @return The provided class with `FormSubmitter` mixed in.\n */\nexport function mixinFormSubmitter<\n T extends MixinBase<LitElement & WithElementInternals>,\n>(base: T): MixinReturn<T, FormSubmitter> {\n abstract class FormSubmitterElement extends base implements FormSubmitter {\n @property() type = 'submit';\n @property({reflect: true}) value = '';\n\n // Name attribute must reflect synchronously for form integration.\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n // Mixins must have a constructor with `...args: any[]`\n // tslint:disable-next-line:no-any\n constructor(...args: any[]) {\n super(...args);\n if (isServer) return;\n setupDispatchHooks(this, 'click');\n this.addEventListener('click', async (event: Event) => {\n const isReset = this.type === 'reset';\n const isSubmit = this.type === 'submit';\n const elementInternals = this[internals];\n const {form} = elementInternals;\n if (!form || !(isSubmit || isReset)) {\n return;\n }\n\n afterDispatch(event, () => {\n if (event.defaultPrevented) {\n return;\n }\n\n if (isReset) {\n form.reset();\n return;\n }\n\n // form.requestSubmit(submitter) does not work with form associated custom\n // elements. This patches the dispatched submit event to add the correct\n // `submitter`.\n // See https://github.com/WICG/webcomponents/issues/814\n form.addEventListener(\n 'submit',\n (submitEvent: Event) => {\n Object.defineProperty(submitEvent, 'submitter', {\n configurable: true,\n enumerable: true,\n get: () => this,\n });\n },\n {capture: true, once: true},\n );\n\n elementInternals.setFormValue(this.value);\n form.requestSubmit();\n });\n });\n }\n }\n\n return FormSubmitterElement;\n}\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_container-color: var(--md-elevated-card-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-card-container-elevation, 1);--_container-shadow-color: var(--md-elevated-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-elevated-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=elevated-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elevated-styles.js","sourceRoot":"","sources":["elevated-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qEAAqE;AACrE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/elevated-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-elevated-card-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-card-container-elevation, 1);--_container-shadow-color: var(--md-elevated-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-elevated-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"elevated-styles.js","sourceRoot":"","sources":["elevated-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qEAAqE;AACrE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/elevated-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-elevated-card-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-card-container-elevation, 1);--_container-shadow-color: var(--md-elevated-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-elevated-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_container-color: var(--md-filled-card-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_container-elevation: var(--md-filled-card-container-elevation, 0);--_container-shadow-color: var(--md-filled-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-filled-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=filled-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filled-styles.js","sourceRoot":"","sources":["filled-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/filled-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-filled-card-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_container-elevation: var(--md-filled-card-container-elevation, 0);--_container-shadow-color: var(--md-filled-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-filled-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"filled-styles.js","sourceRoot":"","sources":["filled-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/filled-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-filled-card-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_container-elevation: var(--md-filled-card-container-elevation, 0);--_container-shadow-color: var(--md-filled-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-filled-card-container-shape, var(--md-sys-shape-corner-medium, 12px))}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_container-color: var(--md-outlined-card-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-outlined-card-container-elevation, 0);--_container-shadow-color: var(--md-outlined-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-outlined-card-container-shape, var(--md-sys-shape-corner-medium, 12px));--_outline-color: var(--md-outlined-card-outline-color, var(--md-sys-color-outline-variant, #cac4d0));--_outline-width: var(--md-outlined-card-outline-width, 1px)}.outline{border-color:var(--_outline-color);border-width:var(--_outline-width)}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=outlined-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outlined-styles.js","sourceRoot":"","sources":["outlined-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qEAAqE;AACrE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/outlined-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-outlined-card-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-outlined-card-container-elevation, 0);--_container-shadow-color: var(--md-outlined-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-outlined-card-container-shape, var(--md-sys-shape-corner-medium, 12px));--_outline-color: var(--md-outlined-card-outline-color, var(--md-sys-color-outline-variant, #cac4d0));--_outline-width: var(--md-outlined-card-outline-width, 1px)}.outline{border-color:var(--_outline-color);border-width:var(--_outline-width)}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"outlined-styles.js","sourceRoot":"","sources":["outlined-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qEAAqE;AACrE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/outlined-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-outlined-card-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-outlined-card-container-elevation, 0);--_container-shadow-color: var(--md-outlined-card-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-shape: var(--md-outlined-card-container-shape, var(--md-sys-shape-corner-medium, 12px));--_outline-color: var(--md-outlined-card-outline-color, var(--md-sys-color-outline-variant, #cac4d0));--_outline-width: var(--md-outlined-card-outline-width, 1px)}.outline{border-color:var(--_outline-color);border-width:var(--_outline-width)}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{border-radius:var(--_container-shape);box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:0}md-elevation,.background,.outline{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color);z-index:-1}.outline{border:1px solid rgba(0,0,0,0);z-index:1}md-elevation{z-index:-1;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}slot{border-radius:inherit}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=shared-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-styles.js","sourceRoot":"","sources":["shared-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/shared-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{border-radius:var(--_container-shape);box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:0}md-elevation,.background,.outline{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color);z-index:-1}.outline{border:1px solid rgba(0,0,0,0);z-index:1}md-elevation{z-index:-1;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}slot{border-radius:inherit}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"shared-styles.js","sourceRoot":"","sources":["shared-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/card/internal/shared-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{border-radius:var(--_container-shape);box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:0}md-elevation,.background,.outline{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color);z-index:-1}.outline{border:1px solid rgba(0,0,0,0);z-index:1}md-elevation{z-index:-1;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}slot{border-radius:inherit}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=item-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-styles.js","sourceRoot":"","sources":["item-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iEAAiE;AACjE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/item/internal/item-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"item-styles.js","sourceRoot":"","sources":["item-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iEAAiE;AACjE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/item/internal/item-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_active-indicator-color: var(--md-navigation-bar-active-indicator-color, var(--md-sys-color-secondary-container, #e8def8));--_active-indicator-height: var(--md-navigation-bar-active-indicator-height, 32px);--_active-indicator-shape: var(--md-navigation-bar-active-indicator-shape, var(--md-sys-shape-corner-full, 9999px));--_active-indicator-width: var(--md-navigation-bar-active-indicator-width, 64px);--_active-focus-icon-color: var(--md-navigation-bar-active-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-focus-label-text-color: var(--md-navigation-bar-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-focus-state-layer-color: var(--md-navigation-bar-active-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-navigation-bar-active-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-hover-label-text-color: var(--md-navigation-bar-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-navigation-bar-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-icon-color: var(--md-navigation-bar-active-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-label-text-color: var(--md-navigation-bar-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-label-text-weight: var(--md-navigation-bar-active-label-text-weight, var(--md-sys-typescale-label-medium-weight-prominent, var(--md-ref-typeface-weight-bold, 700)));--_active-pressed-icon-color: var(--md-navigation-bar-active-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-pressed-label-text-color: var(--md-navigation-bar-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-navigation-bar-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-navigation-bar-container-color, var(--md-sys-color-surface-container, #f3edf7));--_container-elevation: var(--md-navigation-bar-container-elevation, 2);--_container-height: var(--md-navigation-bar-container-height, 80px);--_container-shape: var(--md-navigation-bar-container-shape, var(--md-sys-shape-corner-none, 0px));--_focus-state-layer-opacity: var(--md-navigation-bar-focus-state-layer-opacity, 0.12);--_hover-state-layer-opacity: var(--md-navigation-bar-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-navigation-bar-icon-size, 24px);--_inactive-focus-icon-color: var(--md-navigation-bar-inactive-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-label-text-color: var(--md-navigation-bar-inactive-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-state-layer-color: var(--md-navigation-bar-inactive-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-icon-color: var(--md-navigation-bar-inactive-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-label-text-color: var(--md-navigation-bar-inactive-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-state-layer-color: var(--md-navigation-bar-inactive-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-icon-color: var(--md-navigation-bar-inactive-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-label-text-color: var(--md-navigation-bar-inactive-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-pressed-icon-color: var(--md-navigation-bar-inactive-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-label-text-color: var(--md-navigation-bar-inactive-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-state-layer-color: var(--md-navigation-bar-inactive-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-navigation-bar-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-navigation-bar-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-navigation-bar-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-tracking: var(--md-navigation-bar-label-text-tracking, );--_label-text-type: var(--md-navigation-bar-label-text-type, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)) var(--md-sys-typescale-label-medium-size, 0.75rem) / var(--md-sys-typescale-label-medium-line-height, 1rem) var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-weight: var(--md-navigation-bar-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-state-layer-opacity: var(--md-navigation-bar-pressed-state-layer-opacity, 0.12);--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);width:100%}.md3-navigation-bar{display:flex;position:relative;width:100%;background-color:var(--_container-color);border-radius:var(--_container-shape);height:var(--_container-height)}.md3-navigation-bar .md3-navigation-bar__tabs-slot-container{display:inherit;width:inherit}md-elevation{transition-duration:280ms;z-index:0}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=navigation-bar-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-bar-styles.js","sourceRoot":"","sources":["navigation-bar-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oFAAoF;AACpF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/navigationbar/internal/navigation-bar-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_active-indicator-color: var(--md-navigation-bar-active-indicator-color, var(--md-sys-color-secondary-container, #e8def8));--_active-indicator-height: var(--md-navigation-bar-active-indicator-height, 32px);--_active-indicator-shape: var(--md-navigation-bar-active-indicator-shape, var(--md-sys-shape-corner-full, 9999px));--_active-indicator-width: var(--md-navigation-bar-active-indicator-width, 64px);--_active-focus-icon-color: var(--md-navigation-bar-active-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-focus-label-text-color: var(--md-navigation-bar-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-focus-state-layer-color: var(--md-navigation-bar-active-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-navigation-bar-active-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-hover-label-text-color: var(--md-navigation-bar-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-navigation-bar-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-icon-color: var(--md-navigation-bar-active-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-label-text-color: var(--md-navigation-bar-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-label-text-weight: var(--md-navigation-bar-active-label-text-weight, var(--md-sys-typescale-label-medium-weight-prominent, var(--md-ref-typeface-weight-bold, 700)));--_active-pressed-icon-color: var(--md-navigation-bar-active-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-pressed-label-text-color: var(--md-navigation-bar-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-navigation-bar-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-navigation-bar-container-color, var(--md-sys-color-surface-container, #f3edf7));--_container-elevation: var(--md-navigation-bar-container-elevation, 2);--_container-height: var(--md-navigation-bar-container-height, 80px);--_container-shape: var(--md-navigation-bar-container-shape, var(--md-sys-shape-corner-none, 0px));--_focus-state-layer-opacity: var(--md-navigation-bar-focus-state-layer-opacity, 0.12);--_hover-state-layer-opacity: var(--md-navigation-bar-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-navigation-bar-icon-size, 24px);--_inactive-focus-icon-color: var(--md-navigation-bar-inactive-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-label-text-color: var(--md-navigation-bar-inactive-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-state-layer-color: var(--md-navigation-bar-inactive-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-icon-color: var(--md-navigation-bar-inactive-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-label-text-color: var(--md-navigation-bar-inactive-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-state-layer-color: var(--md-navigation-bar-inactive-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-icon-color: var(--md-navigation-bar-inactive-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-label-text-color: var(--md-navigation-bar-inactive-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-pressed-icon-color: var(--md-navigation-bar-inactive-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-label-text-color: var(--md-navigation-bar-inactive-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-state-layer-color: var(--md-navigation-bar-inactive-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-navigation-bar-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-navigation-bar-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-navigation-bar-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-tracking: var(--md-navigation-bar-label-text-tracking, );--_label-text-type: var(--md-navigation-bar-label-text-type, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)) var(--md-sys-typescale-label-medium-size, 0.75rem) / var(--md-sys-typescale-label-medium-line-height, 1rem) var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-weight: var(--md-navigation-bar-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-state-layer-opacity: var(--md-navigation-bar-pressed-state-layer-opacity, 0.12);--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);width:100%}.md3-navigation-bar{display:flex;position:relative;width:100%;background-color:var(--_container-color);border-radius:var(--_container-shape);height:var(--_container-height)}.md3-navigation-bar .md3-navigation-bar__tabs-slot-container{display:inherit;width:inherit}md-elevation{transition-duration:280ms;z-index:0}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"navigation-bar-styles.js","sourceRoot":"","sources":["navigation-bar-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oFAAoF;AACpF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/navigationbar/internal/navigation-bar-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_active-indicator-color: var(--md-navigation-bar-active-indicator-color, var(--md-sys-color-secondary-container, #e8def8));--_active-indicator-height: var(--md-navigation-bar-active-indicator-height, 32px);--_active-indicator-shape: var(--md-navigation-bar-active-indicator-shape, var(--md-sys-shape-corner-full, 9999px));--_active-indicator-width: var(--md-navigation-bar-active-indicator-width, 64px);--_active-focus-icon-color: var(--md-navigation-bar-active-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-focus-label-text-color: var(--md-navigation-bar-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-focus-state-layer-color: var(--md-navigation-bar-active-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-navigation-bar-active-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-hover-label-text-color: var(--md-navigation-bar-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-navigation-bar-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-icon-color: var(--md-navigation-bar-active-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-label-text-color: var(--md-navigation-bar-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-label-text-weight: var(--md-navigation-bar-active-label-text-weight, var(--md-sys-typescale-label-medium-weight-prominent, var(--md-ref-typeface-weight-bold, 700)));--_active-pressed-icon-color: var(--md-navigation-bar-active-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_active-pressed-label-text-color: var(--md-navigation-bar-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-navigation-bar-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-navigation-bar-container-color, var(--md-sys-color-surface-container, #f3edf7));--_container-elevation: var(--md-navigation-bar-container-elevation, 2);--_container-height: var(--md-navigation-bar-container-height, 80px);--_container-shape: var(--md-navigation-bar-container-shape, var(--md-sys-shape-corner-none, 0px));--_focus-state-layer-opacity: var(--md-navigation-bar-focus-state-layer-opacity, 0.12);--_hover-state-layer-opacity: var(--md-navigation-bar-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-navigation-bar-icon-size, 24px);--_inactive-focus-icon-color: var(--md-navigation-bar-inactive-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-label-text-color: var(--md-navigation-bar-inactive-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-focus-state-layer-color: var(--md-navigation-bar-inactive-focus-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-icon-color: var(--md-navigation-bar-inactive-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-label-text-color: var(--md-navigation-bar-inactive-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-hover-state-layer-color: var(--md-navigation-bar-inactive-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-icon-color: var(--md-navigation-bar-inactive-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-label-text-color: var(--md-navigation-bar-inactive-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_inactive-pressed-icon-color: var(--md-navigation-bar-inactive-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-label-text-color: var(--md-navigation-bar-inactive-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_inactive-pressed-state-layer-color: var(--md-navigation-bar-inactive-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-navigation-bar-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-navigation-bar-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-navigation-bar-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-tracking: var(--md-navigation-bar-label-text-tracking, );--_label-text-type: var(--md-navigation-bar-label-text-type, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)) var(--md-sys-typescale-label-medium-size, 0.75rem) / var(--md-sys-typescale-label-medium-line-height, 1rem) var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-weight: var(--md-navigation-bar-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-state-layer-opacity: var(--md-navigation-bar-pressed-state-layer-opacity, 0.12);--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);width:100%}.md3-navigation-bar{display:flex;position:relative;width:100%;background-color:var(--_container-color);border-radius:var(--_container-shape);height:var(--_container-height)}.md3-navigation-bar .md3-navigation-bar__tabs-slot-container{display:inherit;width:inherit}md-elevation{transition-duration:280ms;z-index:0}\n`;\nexport default styles.styleSheet!;\n"]}
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
export const styles = css `:host{--_container-color: var(--md-navigation-drawer-modal-container-color, #fff);--_container-height: var(--md-navigation-drawer-modal-container-height, 100%);--_container-shape: var(--md-navigation-drawer-modal-container-shape, 0 16px 16px 0);--_container-width: var(--md-navigation-drawer-modal-container-width, 360px);--_divider-color: var(--md-navigation-drawer-modal-divider-color, #000);--_modal-container-elevation: var(--md-navigation-drawer-modal-modal-container-elevation, 1);--_scrim-color: var(--md-navigation-drawer-modal-scrim-color, );--_scrim-opacity: var(--md-navigation-drawer-modal-scrim-opacity, 0.04);--_standard-container-elevation: var(--md-navigation-drawer-modal-standard-container-elevation, 0);--md-elevation-level: var(--_modal-container-elevation)}.md3-navigation-drawer-modal{bottom:0;box-sizing:border-box;display:flex;justify-content:flex-end;overflow:hidden;position:absolute;top:0;inline-size:0;transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--opened{transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}.md3-navigation-drawer-modal--pivot-at-start{justify-content:flex-start}.md3-navigation-drawer-modal__slot-content{display:flex;flex-direction:column;position:relative}.md3-navigation-drawer-modal__scrim{inset:0;opacity:0;position:absolute;visibility:hidden;background-color:var(--_scrim-color);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--scrim-visible{visibility:visible;opacity:var(--_scrim-opacity);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}
|
|
9
9
|
`;
|
|
10
|
+
export default styles.styleSheet;
|
|
10
11
|
//# sourceMappingURL=navigation-drawer-modal-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-drawer-modal-styles.js","sourceRoot":"","sources":["navigation-drawer-modal-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,gGAAgG;AAChG,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/navigationdrawer/internal/navigation-drawer-modal-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-navigation-drawer-modal-container-color, #fff);--_container-height: var(--md-navigation-drawer-modal-container-height, 100%);--_container-shape: var(--md-navigation-drawer-modal-container-shape, 0 16px 16px 0);--_container-width: var(--md-navigation-drawer-modal-container-width, 360px);--_divider-color: var(--md-navigation-drawer-modal-divider-color, #000);--_modal-container-elevation: var(--md-navigation-drawer-modal-modal-container-elevation, 1);--_scrim-color: var(--md-navigation-drawer-modal-scrim-color, );--_scrim-opacity: var(--md-navigation-drawer-modal-scrim-opacity, 0.04);--_standard-container-elevation: var(--md-navigation-drawer-modal-standard-container-elevation, 0);--md-elevation-level: var(--_modal-container-elevation)}.md3-navigation-drawer-modal{bottom:0;box-sizing:border-box;display:flex;justify-content:flex-end;overflow:hidden;position:absolute;top:0;inline-size:0;transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--opened{transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}.md3-navigation-drawer-modal--pivot-at-start{justify-content:flex-start}.md3-navigation-drawer-modal__slot-content{display:flex;flex-direction:column;position:relative}.md3-navigation-drawer-modal__scrim{inset:0;opacity:0;position:absolute;visibility:hidden;background-color:var(--_scrim-color);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--scrim-visible{visibility:visible;opacity:var(--_scrim-opacity);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"navigation-drawer-modal-styles.js","sourceRoot":"","sources":["navigation-drawer-modal-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,gGAAgG;AAChG,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/navigationdrawer/internal/navigation-drawer-modal-styles.css.\nimport {css} from 'lit';\nexport const styles = css`:host{--_container-color: var(--md-navigation-drawer-modal-container-color, #fff);--_container-height: var(--md-navigation-drawer-modal-container-height, 100%);--_container-shape: var(--md-navigation-drawer-modal-container-shape, 0 16px 16px 0);--_container-width: var(--md-navigation-drawer-modal-container-width, 360px);--_divider-color: var(--md-navigation-drawer-modal-divider-color, #000);--_modal-container-elevation: var(--md-navigation-drawer-modal-modal-container-elevation, 1);--_scrim-color: var(--md-navigation-drawer-modal-scrim-color, );--_scrim-opacity: var(--md-navigation-drawer-modal-scrim-opacity, 0.04);--_standard-container-elevation: var(--md-navigation-drawer-modal-standard-container-elevation, 0);--md-elevation-level: var(--_modal-container-elevation)}.md3-navigation-drawer-modal{bottom:0;box-sizing:border-box;display:flex;justify-content:flex-end;overflow:hidden;position:absolute;top:0;inline-size:0;transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--opened{transition:inline-size .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}.md3-navigation-drawer-modal--pivot-at-start{justify-content:flex-start}.md3-navigation-drawer-modal__slot-content{display:flex;flex-direction:column;position:relative}.md3-navigation-drawer-modal__scrim{inset:0;opacity:0;position:absolute;visibility:hidden;background-color:var(--_scrim-color);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) .25s}.md3-navigation-drawer-modal--scrim-visible{visibility:visible;opacity:var(--_scrim-opacity);transition:opacity .25s cubic-bezier(0.4, 0, 0.2, 1) 0s,visibility 0s cubic-bezier(0.4, 0, 0.2, 1) 0s}\n`;\nexport default styles.styleSheet!;\n"]}
|