@material/web 1.0.0-pre.5 → 1.0.0-pre.7
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/README.md +7 -7
- package/aria/aria.d.ts +43 -0
- package/aria/aria.js +56 -0
- package/aria/aria.js.map +1 -0
- package/aria/delegate.d.ts +37 -0
- package/aria/delegate.js +53 -0
- package/aria/delegate.js.map +1 -0
- package/badge/badge.d.ts +0 -1
- package/badge/badge.js +0 -1
- package/badge/badge.js.map +1 -1
- package/badge/lib/badge-styles.css.js +1 -1
- package/badge/lib/badge-styles.css.js.map +1 -1
- package/badge/lib/badge.d.ts +8 -7
- package/badge/lib/badge.js +5 -6
- package/badge/lib/badge.js.map +1 -1
- package/button/lib/_elevation.scss +15 -11
- package/button/lib/_outlined-button.scss +1 -1
- package/button/lib/_shared.scss +5 -0
- package/button/lib/_text-button.scss +1 -1
- package/button/lib/_tonal-button.scss +1 -1
- package/button/lib/button.d.ts +13 -11
- package/button/lib/button.js +51 -60
- package/button/lib/button.js.map +1 -1
- package/button/lib/elevated-button.d.ts +3 -0
- package/button/lib/elevated-button.js +4 -2
- package/button/lib/elevated-button.js.map +1 -1
- package/button/lib/elevated-styles.css.js +1 -1
- package/button/lib/elevated-styles.css.js.map +1 -1
- package/button/lib/filled-button.d.ts +3 -1
- package/button/lib/filled-button.js +4 -3
- package/button/lib/filled-button.js.map +1 -1
- package/button/lib/filled-styles.css.js +1 -1
- package/button/lib/filled-styles.css.js.map +1 -1
- package/button/lib/outlined-button.d.ts +3 -0
- package/button/lib/outlined-button.js +3 -1
- package/button/lib/outlined-button.js.map +1 -1
- package/button/lib/outlined-styles.css.js +1 -1
- package/button/lib/outlined-styles.css.js.map +1 -1
- package/button/lib/shared-elevation-styles.css.js +1 -1
- package/button/lib/shared-elevation-styles.css.js.map +1 -1
- package/button/lib/shared-styles.css.js +1 -1
- package/button/lib/shared-styles.css.js.map +1 -1
- package/button/lib/text-button.d.ts +3 -0
- package/button/lib/text-button.js +3 -1
- package/button/lib/text-button.js.map +1 -1
- package/button/lib/text-styles.css.js +1 -1
- package/button/lib/text-styles.css.js.map +1 -1
- package/button/lib/tonal-button.d.ts +3 -1
- package/button/lib/tonal-button.js +4 -3
- package/button/lib/tonal-button.js.map +1 -1
- package/button/lib/tonal-styles.css.js +1 -1
- package/button/lib/tonal-styles.css.js.map +1 -1
- package/checkbox/lib/checkbox-styles.css.js +1 -1
- package/checkbox/lib/checkbox-styles.css.js.map +1 -1
- package/checkbox/lib/checkbox.d.ts +0 -1
- package/checkbox/lib/checkbox.js +33 -43
- package/checkbox/lib/checkbox.js.map +1 -1
- package/chips/_filter-chip.scss +6 -0
- package/chips/filter-chip.d.ts +20 -0
- package/chips/filter-chip.js +24 -0
- package/chips/filter-chip.js.map +1 -0
- package/chips/lib/_filter-chip.scss +141 -0
- package/chips/lib/_shared.scss +71 -37
- package/chips/lib/assist-styles.css.js +1 -1
- package/chips/lib/assist-styles.css.js.map +1 -1
- package/chips/lib/chip.d.ts +8 -3
- package/chips/lib/chip.js +30 -31
- package/chips/lib/chip.js.map +1 -1
- package/chips/lib/filter-chip.d.ts +21 -0
- package/chips/lib/filter-chip.js +47 -0
- package/chips/lib/filter-chip.js.map +1 -0
- package/chips/lib/filter-styles.css.js +9 -0
- package/chips/lib/filter-styles.css.js.map +1 -0
- package/{fab/lib/fab-extended-styles.scss → chips/lib/filter-styles.scss} +3 -3
- package/chips/lib/shared-styles.css.js +1 -1
- package/chips/lib/shared-styles.css.js.map +1 -1
- package/chips/lib/suggestion-styles.css.js +1 -1
- package/chips/lib/suggestion-styles.css.js.map +1 -1
- package/circularprogress/_circular-progress.scss +6 -0
- package/circularprogress/circular-progress.d.ts +24 -0
- package/circularprogress/circular-progress.js +27 -0
- package/circularprogress/circular-progress.js.map +1 -0
- package/circularprogress/harness.d.ts +13 -0
- package/circularprogress/harness.js +16 -0
- package/circularprogress/harness.js.map +1 -0
- package/circularprogress/lib/_circular-progress.scss +282 -0
- package/circularprogress/lib/circular-progress-styles.css.js +9 -0
- package/circularprogress/lib/circular-progress-styles.css.js.map +1 -0
- package/circularprogress/lib/circular-progress-styles.scss +8 -0
- package/circularprogress/lib/circular-progress.d.ts +28 -0
- package/circularprogress/lib/circular-progress.js +95 -0
- package/circularprogress/lib/circular-progress.js.map +1 -0
- package/dialog/lib/_dialog.scss +9 -14
- package/dialog/lib/dialog-styles.css.js +1 -1
- package/dialog/lib/dialog-styles.css.js.map +1 -1
- package/dialog/lib/dialog.js +26 -50
- package/dialog/lib/dialog.js.map +1 -1
- package/divider/lib/divider.js +4 -7
- package/divider/lib/divider.js.map +1 -1
- package/elevation/lib/_elevation.scss +14 -51
- package/elevation/lib/elevation-styles.css.js +1 -1
- package/elevation/lib/elevation-styles.css.js.map +1 -1
- package/elevation/lib/elevation.d.ts +0 -8
- package/elevation/lib/elevation.js +1 -25
- package/elevation/lib/elevation.js.map +1 -1
- package/fab/_fab.scss +1 -0
- package/fab/branded-fab.d.ts +53 -0
- package/fab/branded-fab.js +56 -0
- package/fab/branded-fab.js.map +1 -0
- package/fab/fab.d.ts +25 -5
- package/fab/fab.js +27 -10
- package/fab/fab.js.map +1 -1
- package/fab/harness.d.ts +1 -2
- package/fab/harness.js +1 -1
- package/fab/harness.js.map +1 -1
- package/fab/lib/_fab-branded.scss +27 -0
- package/fab/lib/_fab.scss +144 -16
- package/fab/lib/_shared.scss +153 -131
- package/fab/lib/fab-branded-styles.css.js +9 -0
- package/fab/lib/fab-branded-styles.css.js.map +1 -0
- package/fab/lib/fab-branded-styles.scss +10 -0
- package/fab/lib/fab-styles.css.js +1 -1
- package/fab/lib/fab-styles.css.js.map +1 -1
- package/fab/lib/fab.d.ts +14 -10
- package/fab/lib/fab.js +19 -12
- package/fab/lib/fab.js.map +1 -1
- package/fab/lib/forced-colors-styles.css.js +9 -0
- package/fab/lib/forced-colors-styles.css.js.map +1 -0
- package/fab/lib/forced-colors-styles.scss +26 -0
- package/fab/lib/shared-styles.css.d.ts +1 -0
- package/fab/lib/shared-styles.css.js +9 -0
- package/fab/lib/shared-styles.css.js.map +1 -0
- package/fab/lib/{fab-shared-styles.scss → shared-styles.scss} +1 -1
- package/fab/lib/{fab-shared.d.ts → shared.d.ts} +24 -16
- package/fab/lib/shared.js +137 -0
- package/fab/lib/shared.js.map +1 -0
- package/field/lib/field.js +14 -27
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-styles.css.js +1 -1
- package/field/lib/filled-styles.css.js.map +1 -1
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/focus/focus-ring.d.ts +0 -1
- package/focus/focus-ring.js +0 -1
- package/focus/focus-ring.js.map +1 -1
- package/focus/lib/_focus-ring.scss +30 -20
- package/focus/lib/focus-ring-styles.css.js +1 -1
- package/focus/lib/focus-ring-styles.css.js.map +1 -1
- package/focus/lib/focus-ring.js +2 -3
- package/focus/lib/focus-ring.js.map +1 -1
- package/focus/strong-focus.d.ts +11 -0
- package/focus/strong-focus.js +16 -1
- package/focus/strong-focus.js.map +1 -1
- package/icon/icon.d.ts +0 -1
- package/icon/icon.js +0 -1
- package/icon/icon.js.map +1 -1
- package/icon/lib/_icon.scss +2 -0
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/icon/lib/icon.d.ts +5 -4
- package/icon/lib/icon.js +3 -2
- package/icon/lib/icon.js.map +1 -1
- package/iconbutton/filled-icon-button.js +1 -0
- package/iconbutton/filled-icon-button.js.map +1 -1
- package/iconbutton/filled-tonal-icon-button.js +1 -0
- package/iconbutton/filled-tonal-icon-button.js.map +1 -1
- package/iconbutton/harness.d.ts +1 -2
- package/iconbutton/harness.js.map +1 -1
- package/iconbutton/lib/filled-styles.css.js +1 -1
- package/iconbutton/lib/filled-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/lib/icon-button.d.ts +31 -4
- package/iconbutton/lib/icon-button.js +105 -37
- package/iconbutton/lib/icon-button.js.map +1 -1
- package/iconbutton/lib/outlined-styles.css.js +1 -1
- package/iconbutton/lib/outlined-styles.css.js.map +1 -1
- package/iconbutton/lib/standard-styles.css.js +1 -1
- package/iconbutton/lib/standard-styles.css.js.map +1 -1
- package/linearprogress/_linear-progress.scss +6 -0
- package/linearprogress/harness.d.ts +13 -0
- package/linearprogress/harness.js +18 -0
- package/linearprogress/harness.js.map +1 -0
- package/linearprogress/lib/_linear-progress.scss +380 -0
- package/linearprogress/lib/linear-progress-styles.css.d.ts +1 -0
- package/linearprogress/lib/linear-progress-styles.css.js +9 -0
- package/linearprogress/lib/linear-progress-styles.css.js.map +1 -0
- package/linearprogress/lib/linear-progress-styles.scss +8 -0
- package/linearprogress/lib/linear-progress.d.ts +35 -0
- package/linearprogress/lib/linear-progress.js +127 -0
- package/linearprogress/lib/linear-progress.js.map +1 -0
- package/linearprogress/linear-progress.d.ts +23 -0
- package/linearprogress/linear-progress.js +26 -0
- package/linearprogress/linear-progress.js.map +1 -0
- package/list/harness.d.ts +1 -0
- package/list/harness.js +1 -0
- package/list/harness.js.map +1 -1
- package/list/lib/_list.scss +6 -50
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/list.d.ts +1 -3
- package/list/lib/list.js +20 -34
- package/list/lib/list.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +19 -82
- package/list/lib/listitem/forced-colors-styles.css.d.ts +1 -0
- package/list/lib/listitem/forced-colors-styles.css.js +9 -0
- package/list/lib/listitem/forced-colors-styles.css.js.map +1 -0
- package/list/lib/listitem/forced-colors-styles.scss +23 -0
- package/list/lib/listitem/list-item-styles.css.js +1 -1
- package/list/lib/listitem/list-item-styles.css.js.map +1 -1
- package/list/lib/listitem/list-item.d.ts +5 -7
- package/list/lib/listitem/list-item.js +27 -56
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/lib/listitemlink/list-item-link.js +4 -6
- package/list/lib/listitemlink/list-item-link.js.map +1 -1
- package/list/list-item-link.js +2 -1
- package/list/list-item-link.js.map +1 -1
- package/list/list-item.js +2 -1
- package/list/list-item.js.map +1 -1
- package/menu/harness.d.ts +1 -0
- package/menu/harness.js +1 -0
- package/menu/harness.js.map +1 -1
- package/menu/lib/_menu.scss +10 -37
- package/menu/lib/forced-colors-styles.css.d.ts +1 -0
- package/menu/lib/forced-colors-styles.css.js +9 -0
- package/menu/lib/forced-colors-styles.css.js.map +1 -0
- package/menu/lib/forced-colors-styles.scss +12 -0
- package/menu/lib/menu-styles.css.js +1 -1
- package/menu/lib/menu-styles.css.js.map +1 -1
- package/menu/lib/menu.d.ts +13 -3
- package/menu/lib/menu.js +78 -65
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/_menu-item.scss +18 -43
- package/menu/lib/menuitem/forced-colors-styles.css.d.ts +1 -0
- package/menu/lib/menuitem/forced-colors-styles.css.js +9 -0
- package/menu/lib/menuitem/forced-colors-styles.css.js.map +1 -0
- package/menu/lib/menuitem/forced-colors-styles.scss +22 -0
- package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
- package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
- package/menu/lib/menuitem/menu-item.d.ts +1 -1
- package/menu/lib/menuitem/menu-item.js +4 -6
- package/menu/lib/menuitem/menu-item.js.map +1 -1
- package/menu/lib/menuitemlink/menu-item-link.d.ts +0 -2
- package/menu/lib/menuitemlink/menu-item-link.js +3 -6
- package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
- package/menu/lib/shared.d.ts +16 -2
- package/menu/lib/shared.js +23 -0
- package/menu/lib/shared.js.map +1 -1
- package/menu/lib/submenuitem/sub-menu-item.d.ts +4 -2
- package/menu/lib/submenuitem/sub-menu-item.js +17 -13
- package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
- package/menu/lib/typeaheadController.d.ts +10 -2
- package/menu/lib/typeaheadController.js +20 -14
- package/menu/lib/typeaheadController.js.map +1 -1
- package/menu/menu-item-link.js +3 -1
- package/menu/menu-item-link.js.map +1 -1
- package/menu/menu-item.js +4 -2
- package/menu/menu-item.js.map +1 -1
- package/menu/menu.js +2 -1
- package/menu/menu.js.map +1 -1
- package/menu/sub-menu-item.js +3 -1
- package/menu/sub-menu-item.js.map +1 -1
- package/navigationbar/lib/_navigation-bar.scss +9 -6
- package/navigationbar/lib/navigation-bar-styles.css.js +1 -1
- package/navigationbar/lib/navigation-bar-styles.css.js.map +1 -1
- package/navigationbar/lib/navigation-bar.d.ts +5 -5
- package/navigationbar/lib/navigation-bar.js +19 -20
- package/navigationbar/lib/navigation-bar.js.map +1 -1
- package/navigationbar/navigation-bar.d.ts +0 -1
- package/navigationbar/navigation-bar.js +0 -1
- package/navigationbar/navigation-bar.js.map +1 -1
- package/navigationdrawer/lib/_navigation-drawer-modal.scss +10 -11
- package/navigationdrawer/lib/_navigation-drawer.scss +9 -14
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +1 -1
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer-modal.d.ts +5 -10
- package/navigationdrawer/lib/navigation-drawer-modal.js +19 -41
- package/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer-styles.css.js +1 -1
- package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -1
- package/navigationdrawer/lib/navigation-drawer.d.ts +5 -9
- package/navigationdrawer/lib/navigation-drawer.js +18 -39
- package/navigationdrawer/lib/navigation-drawer.js.map +1 -1
- package/navigationdrawer/navigation-drawer-modal.d.ts +0 -1
- package/navigationdrawer/navigation-drawer-modal.js +0 -1
- package/navigationdrawer/navigation-drawer-modal.js.map +1 -1
- package/navigationdrawer/navigation-drawer.d.ts +0 -1
- package/navigationdrawer/navigation-drawer.js +0 -1
- package/navigationdrawer/navigation-drawer.js.map +1 -1
- package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
- package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
- package/navigationtab/lib/navigation-tab.d.ts +19 -24
- package/navigationtab/lib/navigation-tab.js +48 -68
- package/navigationtab/lib/navigation-tab.js.map +1 -1
- package/navigationtab/navigation-tab.d.ts +0 -1
- package/navigationtab/navigation-tab.js +0 -1
- package/navigationtab/navigation-tab.js.map +1 -1
- package/package.json +2 -1
- package/radio/lib/radio-styles.css.js +1 -1
- package/radio/lib/radio-styles.css.js.map +1 -1
- package/radio/lib/radio.d.ts +0 -1
- package/radio/lib/radio.js +30 -37
- package/radio/lib/radio.js.map +1 -1
- package/ripple/lib/_md-comp-ripple.scss +3 -3
- package/ripple/lib/ripple-styles.css.js +1 -1
- package/ripple/lib/ripple-styles.css.js.map +1 -1
- package/ripple/lib/ripple.js +7 -13
- package/ripple/lib/ripple.js.map +1 -1
- package/segmentedbutton/lib/outlined-segmented-button.d.ts +16 -7
- package/segmentedbutton/lib/outlined-segmented-button.js +3 -3
- package/segmentedbutton/lib/outlined-segmented-button.js.map +1 -1
- package/segmentedbutton/lib/outlined-styles.css.js +1 -1
- package/segmentedbutton/lib/outlined-styles.css.js.map +1 -1
- package/segmentedbutton/lib/segmented-button.d.ts +27 -33
- package/segmentedbutton/lib/segmented-button.js +42 -75
- package/segmentedbutton/lib/segmented-button.js.map +1 -1
- package/segmentedbutton/outlined-segmented-button.d.ts +0 -1
- package/segmentedbutton/outlined-segmented-button.js +0 -1
- package/segmentedbutton/outlined-segmented-button.js.map +1 -1
- package/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +6 -4
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js +3 -2
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +1 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
- package/segmentedbuttonset/lib/segmented-button-set.d.ts +3 -9
- package/segmentedbuttonset/lib/segmented-button-set.js +14 -20
- package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
- package/segmentedbuttonset/outlined-segmented-button-set.d.ts +0 -1
- package/segmentedbuttonset/outlined-segmented-button-set.js +0 -1
- package/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -1
- package/select/_filled-select.scss +6 -0
- package/select/_outlined-select.scss +6 -0
- package/select/filled-select.d.ts +41 -0
- package/select/filled-select.js +46 -0
- package/select/filled-select.js.map +1 -0
- package/select/harness.d.ts +24 -0
- package/select/harness.js +53 -0
- package/select/harness.js.map +1 -0
- package/select/lib/_filled-select.scss +163 -0
- package/select/lib/_outlined-select.scss +146 -0
- package/select/lib/_shared.scss +48 -0
- package/select/lib/filled-forced-colors-styles.css.d.ts +1 -0
- package/select/lib/filled-forced-colors-styles.css.js +9 -0
- package/select/lib/filled-forced-colors-styles.css.js.map +1 -0
- package/select/lib/filled-forced-colors-styles.scss +29 -0
- package/select/lib/filled-select-styles.css.d.ts +1 -0
- package/select/lib/filled-select-styles.css.js +9 -0
- package/select/lib/filled-select-styles.css.js.map +1 -0
- package/select/lib/filled-select-styles.scss +10 -0
- package/select/lib/filled-select.d.ts +10 -0
- package/select/lib/filled-select.js +16 -0
- package/select/lib/filled-select.js.map +1 -0
- package/select/lib/outlined-forced-colors-styles.css.d.ts +1 -0
- package/select/lib/outlined-forced-colors-styles.css.js +9 -0
- package/select/lib/outlined-forced-colors-styles.css.js.map +1 -0
- package/select/lib/outlined-forced-colors-styles.scss +29 -0
- package/select/lib/outlined-select-styles.css.d.ts +1 -0
- package/select/lib/outlined-select-styles.css.js +9 -0
- package/select/lib/outlined-select-styles.css.js.map +1 -0
- package/select/lib/outlined-select-styles.scss +10 -0
- package/select/lib/outlined-select.d.ts +10 -0
- package/select/lib/outlined-select.js +16 -0
- package/select/lib/outlined-select.js.map +1 -0
- package/select/lib/select.d.ts +218 -0
- package/select/lib/select.js +587 -0
- package/select/lib/select.js.map +1 -0
- package/select/lib/selectoption/harness.d.ts +11 -0
- package/select/lib/selectoption/harness.js +12 -0
- package/select/lib/selectoption/harness.js.map +1 -0
- package/select/lib/selectoption/select-option.d.ts +30 -0
- package/select/lib/selectoption/select-option.js +71 -0
- package/select/lib/selectoption/select-option.js.map +1 -0
- package/select/lib/shared-styles.css.d.ts +1 -0
- package/select/lib/shared-styles.css.js +9 -0
- package/select/lib/shared-styles.css.js.map +1 -0
- package/select/lib/shared-styles.scss +10 -0
- package/select/lib/shared.d.ts +52 -0
- package/select/lib/shared.js +41 -0
- package/select/lib/shared.js.map +1 -0
- package/select/outlined-select.d.ts +41 -0
- package/select/outlined-select.js +46 -0
- package/select/outlined-select.js.map +1 -0
- package/select/select-option.d.ts +44 -0
- package/select/select-option.js +51 -0
- package/select/select-option.js.map +1 -0
- package/slider/harness.d.ts +1 -0
- package/slider/harness.js +5 -0
- package/slider/harness.js.map +1 -1
- package/slider/lib/_slider.scss +147 -171
- package/slider/lib/forced-colors-styles.css.js +1 -1
- package/slider/lib/forced-colors-styles.css.js.map +1 -1
- package/slider/lib/forced-colors-styles.scss +2 -2
- package/slider/lib/slider-styles.css.js +1 -1
- package/slider/lib/slider-styles.css.js.map +1 -1
- package/slider/lib/slider.d.ts +2 -7
- package/slider/lib/slider.js +65 -119
- package/slider/lib/slider.js.map +1 -1
- package/switch/lib/switch-styles.css.js +1 -1
- package/switch/lib/switch-styles.css.js.map +1 -1
- package/switch/lib/switch.d.ts +0 -2
- package/switch/lib/switch.js +32 -54
- package/switch/lib/switch.js.map +1 -1
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/text-field.d.ts +0 -10
- package/textfield/lib/text-field.js +45 -115
- package/textfield/lib/text-field.js.map +1 -1
- package/tokens/_index.scss +6 -0
- package/tokens/_md-comp-assist-chip.scss +81 -21
- package/tokens/_md-comp-badge.scss +8 -1
- package/tokens/_md-comp-banner.scss +1 -1
- package/tokens/_md-comp-bottom-app-bar.scss +1 -1
- package/tokens/_md-comp-carousel-item.scss +1 -1
- package/tokens/_md-comp-checkbox.scss +1 -1
- package/tokens/_md-comp-circular-progress-indicator.scss +17 -2
- package/tokens/_md-comp-data-table.scss +1 -1
- package/tokens/_md-comp-date-input-modal.scss +1 -1
- package/tokens/_md-comp-date-picker-docked.scss +1 -1
- package/tokens/_md-comp-date-picker-modal.scss +1 -1
- package/tokens/_md-comp-dialog.scss +10 -1
- package/tokens/_md-comp-divider.scss +1 -1
- package/tokens/_md-comp-elevated-button.scss +80 -20
- package/tokens/_md-comp-elevated-card.scss +1 -1
- package/tokens/_md-comp-elevation.scss +24 -0
- package/tokens/_md-comp-extended-fab-branded.scss +8 -1
- package/tokens/_md-comp-extended-fab-primary.scss +8 -1
- package/tokens/_md-comp-extended-fab-secondary.scss +8 -1
- package/tokens/_md-comp-extended-fab-surface.scss +8 -1
- package/tokens/_md-comp-extended-fab-tertiary.scss +8 -1
- package/tokens/_md-comp-fab-branded-large.scss +1 -1
- package/tokens/_md-comp-fab-branded.scss +110 -2
- package/tokens/_md-comp-fab-primary-large.scss +1 -1
- package/tokens/_md-comp-fab-primary-small.scss +1 -1
- package/tokens/_md-comp-fab-primary.scss +1 -1
- package/tokens/_md-comp-fab-secondary-large.scss +1 -1
- package/tokens/_md-comp-fab-secondary-small.scss +1 -1
- package/tokens/_md-comp-fab-secondary.scss +1 -1
- package/tokens/_md-comp-fab-surface-large.scss +1 -1
- package/tokens/_md-comp-fab-surface-small.scss +1 -1
- package/tokens/_md-comp-fab-surface.scss +1 -1
- package/tokens/_md-comp-fab-tertiary-large.scss +1 -1
- package/tokens/_md-comp-fab-tertiary-small.scss +1 -1
- package/tokens/_md-comp-fab-tertiary.scss +1 -1
- package/tokens/_md-comp-fab.scss +290 -0
- package/tokens/_md-comp-filled-autocomplete.scss +1 -1
- package/tokens/_md-comp-filled-button.scss +80 -20
- package/tokens/_md-comp-filled-card.scss +1 -1
- package/tokens/_md-comp-filled-icon-button.scss +1 -1
- package/tokens/_md-comp-filled-menu-button.scss +1 -1
- package/tokens/_md-comp-filled-select.scss +151 -2
- package/tokens/_md-comp-filled-text-field.scss +10 -1
- package/tokens/_md-comp-filled-tonal-button.scss +80 -20
- package/tokens/_md-comp-filled-tonal-icon-button.scss +1 -1
- package/tokens/_md-comp-filter-chip.scss +211 -11
- package/tokens/_md-comp-focus-ring.scss +46 -0
- package/tokens/_md-comp-full-screen-dialog.scss +1 -1
- package/tokens/_md-comp-icon-button.scss +1 -1
- package/tokens/_md-comp-input-chip.scss +186 -11
- package/tokens/_md-comp-linear-progress-indicator.scss +15 -2
- package/tokens/_md-comp-list-item.scss +201 -0
- package/tokens/_md-comp-list.scss +110 -12
- package/tokens/_md-comp-menu-item.scss +76 -0
- package/tokens/_md-comp-menu.scss +53 -3
- package/tokens/_md-comp-navigation-bar.scss +1 -1
- package/tokens/_md-comp-navigation-drawer.scss +1 -1
- package/tokens/_md-comp-navigation-rail.scss +1 -1
- package/tokens/_md-comp-outlined-autocomplete.scss +1 -1
- package/tokens/_md-comp-outlined-button.scss +77 -19
- package/tokens/_md-comp-outlined-card.scss +1 -1
- package/tokens/_md-comp-outlined-icon-button.scss +1 -1
- package/tokens/_md-comp-outlined-menu-button.scss +1 -1
- package/tokens/_md-comp-outlined-segmented-button.scss +10 -1
- package/tokens/_md-comp-outlined-select.scss +151 -2
- package/tokens/_md-comp-outlined-text-field.scss +10 -1
- package/tokens/_md-comp-plain-tooltip.scss +1 -1
- package/tokens/_md-comp-primary-navigation-tab.scss +10 -1
- package/tokens/_md-comp-radio-button.scss +1 -1
- package/tokens/_md-comp-rich-tooltip.scss +1 -1
- package/tokens/_md-comp-scrim.scss +1 -1
- package/tokens/_md-comp-search-bar.scss +1 -1
- package/tokens/_md-comp-search-view.scss +1 -1
- package/tokens/_md-comp-secondary-navigation-tab.scss +9 -1
- package/tokens/_md-comp-sheet-bottom.scss +1 -1
- package/tokens/_md-comp-sheet-floating.scss +1 -1
- package/tokens/_md-comp-sheet-side.scss +1 -1
- package/tokens/_md-comp-slider.scss +23 -2
- package/tokens/_md-comp-snackbar.scss +1 -1
- package/tokens/_md-comp-standard-menu-button.scss +1 -1
- package/tokens/_md-comp-suggestion-chip.scss +83 -24
- package/tokens/_md-comp-switch.scss +1 -1
- package/tokens/_md-comp-test-table.scss +31 -0
- package/tokens/_md-comp-text-button.scss +70 -19
- package/tokens/_md-comp-time-input.scss +1 -1
- package/tokens/_md-comp-time-picker.scss +1 -1
- package/tokens/_md-comp-top-app-bar-large.scss +1 -1
- package/tokens/_md-comp-top-app-bar-medium.scss +1 -1
- package/tokens/_md-comp-top-app-bar-small-centered.scss +1 -1
- package/tokens/_md-comp-top-app-bar-small.scss +1 -1
- package/tokens/_md-ref-palette.scss +1 -1
- package/tokens/_md-ref-typeface.scss +24 -2
- package/tokens/_md-sys-color.scss +1 -1
- package/tokens/_md-sys-elevation.scss +1 -1
- package/tokens/_md-sys-motion.scss +1 -1
- package/tokens/_md-sys-shape.scss +1 -1
- package/tokens/_md-sys-state.scss +1 -1
- package/tokens/_md-sys-typescale.scss +36 -2
- package/tokens/_values.scss +114 -0
- package/tokens/{v0_161 → v0_172}/_md-comp-assist-chip.scss +3 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-badge.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-banner.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-bottom-app-bar.scss +3 -5
- package/tokens/{v0_161 → v0_172}/_md-comp-carousel-item.scss +1 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-checkbox.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-circular-progress-indicator.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-data-table.scss +2 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-date-input-modal.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-date-picker-docked.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-date-picker-modal.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-dialog.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-divider.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-elevated-button.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-elevated-card.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-extended-fab-branded.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-extended-fab-primary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-extended-fab-secondary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-extended-fab-surface.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-extended-fab-tertiary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-branded-large.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-branded.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-primary-large.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-primary-small.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-primary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-secondary-large.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-secondary-small.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-secondary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-surface-large.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-surface-small.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-surface.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-tertiary-large.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-tertiary-small.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-fab-tertiary.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-autocomplete.scss +4 -6
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-card.scss +3 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-icon-button.scss +2 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-menu-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-select.scss +4 -6
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-text-field.scss +3 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-tonal-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-filled-tonal-icon-button.scss +2 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-filter-chip.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-full-screen-dialog.scss +3 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-icon-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-input-chip.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-linear-progress-indicator.scss +2 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-list.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-menu.scss +3 -5
- package/tokens/{v0_161 → v0_172}/_md-comp-navigation-bar.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-navigation-drawer.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-navigation-rail.scss +1 -16
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-autocomplete.scss +4 -6
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-card.scss +1 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-icon-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-menu-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-segmented-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-select.scss +4 -6
- package/tokens/{v0_161 → v0_172}/_md-comp-outlined-text-field.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-plain-tooltip.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-primary-navigation-tab.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-radio-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-rich-tooltip.scss +3 -5
- package/tokens/{v0_161 → v0_172}/_md-comp-scrim.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-search-bar.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-search-view.scss +2 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-secondary-navigation-tab.scss +3 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-sheet-bottom.scss +3 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-sheet-floating.scss +3 -5
- package/tokens/{v0_161 → v0_172}/_md-comp-sheet-side.scss +4 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-slider.scss +3 -2
- package/tokens/{v0_161 → v0_172}/_md-comp-snackbar.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-standard-menu-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-suggestion-chip.scss +3 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-switch.scss +13 -11
- package/tokens/{v0_161 → v0_172}/_md-comp-text-button.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-time-input.scss +3 -4
- package/tokens/{v0_161 → v0_172}/_md-comp-time-picker.scss +5 -5
- package/tokens/{v0_161 → v0_172}/_md-comp-top-app-bar-large.scss +1 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-top-app-bar-medium.scss +1 -3
- package/tokens/{v0_161 → v0_172}/_md-comp-top-app-bar-small-centered.scss +3 -1
- package/tokens/{v0_161 → v0_172}/_md-comp-top-app-bar-small.scss +3 -3
- package/tokens/{v0_161 → v0_172}/_md-ref-palette.scss +23 -23
- package/tokens/{v0_161 → v0_172}/_md-ref-typeface.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-sys-color.scss +9 -9
- package/tokens/{v0_161 → v0_172}/_md-sys-elevation.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-sys-motion.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-sys-shape.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-sys-state.scss +1 -1
- package/tokens/{v0_161 → v0_172}/_md-sys-typescale.scss +1 -1
- package/tokens/v0_172/index.test.css.d.ts +1 -0
- package/tokens/v0_172/lib.test.css.d.ts +1 -0
- package/types/aria.d.ts +61 -1
- package/actionelement/action-element.d.ts +0 -79
- package/actionelement/action-element.js +0 -97
- package/actionelement/action-element.js.map +0 -1
- package/button/elevated-link-button.d.ts +0 -36
- package/button/elevated-link-button.js +0 -41
- package/button/elevated-link-button.js.map +0 -1
- package/button/filled-link-button.d.ts +0 -34
- package/button/filled-link-button.js +0 -39
- package/button/filled-link-button.js.map +0 -1
- package/button/lib/elevated-link-button.d.ts +0 -13
- package/button/lib/elevated-link-button.js +0 -21
- package/button/lib/elevated-link-button.js.map +0 -1
- package/button/lib/filled-link-button.d.ts +0 -14
- package/button/lib/filled-link-button.js +0 -22
- package/button/lib/filled-link-button.js.map +0 -1
- package/button/lib/link-button.d.ts +0 -24
- package/button/lib/link-button.js +0 -59
- package/button/lib/link-button.js.map +0 -1
- package/button/lib/outlined-link-button.d.ts +0 -12
- package/button/lib/outlined-link-button.js +0 -20
- package/button/lib/outlined-link-button.js.map +0 -1
- package/button/lib/state.d.ts +0 -10
- package/button/lib/state.js +0 -7
- package/button/lib/state.js.map +0 -1
- package/button/lib/text-link-button.d.ts +0 -10
- package/button/lib/text-link-button.js +0 -16
- package/button/lib/text-link-button.js.map +0 -1
- package/button/lib/tonal-link-button.d.ts +0 -14
- package/button/lib/tonal-link-button.js +0 -22
- package/button/lib/tonal-link-button.js.map +0 -1
- package/button/outlined-link-button.d.ts +0 -36
- package/button/outlined-link-button.js +0 -40
- package/button/outlined-link-button.js.map +0 -1
- package/button/text-link-button.d.ts +0 -34
- package/button/text-link-button.js +0 -38
- package/button/text-link-button.js.map +0 -1
- package/button/tonal-link-button.d.ts +0 -35
- package/button/tonal-link-button.js +0 -40
- package/button/tonal-link-button.js.map +0 -1
- package/controller/action-controller.d.ts +0 -147
- package/controller/action-controller.js +0 -286
- package/controller/action-controller.js.map +0 -1
- package/decorators/aria-property.d.ts +0 -32
- package/decorators/aria-property.js +0 -99
- package/decorators/aria-property.js.map +0 -1
- package/elevation/lib/_md-comp-elevation.scss +0 -27
- package/fab/_fab-extended.scss +0 -6
- package/fab/fab-extended.d.ts +0 -23
- package/fab/fab-extended.js +0 -29
- package/fab/fab-extended.js.map +0 -1
- package/fab/lib/_fab-extended.scss +0 -73
- package/fab/lib/fab-extended-styles.css.js +0 -9
- package/fab/lib/fab-extended-styles.css.js.map +0 -1
- package/fab/lib/fab-extended.d.ts +0 -19
- package/fab/lib/fab-extended.js +0 -28
- package/fab/lib/fab-extended.js.map +0 -1
- package/fab/lib/fab-shared-styles.css.js +0 -9
- package/fab/lib/fab-shared-styles.css.js.map +0 -1
- package/fab/lib/fab-shared.js +0 -121
- package/fab/lib/fab-shared.js.map +0 -1
- package/focus/lib/_md-comp-focus-ring.scss +0 -30
- package/iconbutton/filled-icon-button-toggle.d.ts +0 -31
- package/iconbutton/filled-icon-button-toggle.js +0 -40
- package/iconbutton/filled-icon-button-toggle.js.map +0 -1
- package/iconbutton/filled-link-icon-button.d.ts +0 -31
- package/iconbutton/filled-link-icon-button.js +0 -39
- package/iconbutton/filled-link-icon-button.js.map +0 -1
- package/iconbutton/filled-tonal-icon-button-toggle.d.ts +0 -31
- package/iconbutton/filled-tonal-icon-button-toggle.js +0 -40
- package/iconbutton/filled-tonal-icon-button-toggle.js.map +0 -1
- package/iconbutton/filled-tonal-link-icon-button.d.ts +0 -31
- package/iconbutton/filled-tonal-link-icon-button.js +0 -39
- package/iconbutton/filled-tonal-link-icon-button.js.map +0 -1
- package/iconbutton/lib/icon-button-toggle.d.ts +0 -34
- package/iconbutton/lib/icon-button-toggle.js +0 -87
- package/iconbutton/lib/icon-button-toggle.js.map +0 -1
- package/iconbutton/lib/link-icon-button.d.ts +0 -23
- package/iconbutton/lib/link-icon-button.js +0 -58
- package/iconbutton/lib/link-icon-button.js.map +0 -1
- package/iconbutton/outlined-icon-button-toggle.d.ts +0 -31
- package/iconbutton/outlined-icon-button-toggle.js +0 -39
- package/iconbutton/outlined-icon-button-toggle.js.map +0 -1
- package/iconbutton/outlined-link-icon-button.d.ts +0 -31
- package/iconbutton/outlined-link-icon-button.js +0 -39
- package/iconbutton/outlined-link-icon-button.js.map +0 -1
- package/iconbutton/standard-icon-button-toggle.d.ts +0 -31
- package/iconbutton/standard-icon-button-toggle.js +0 -39
- package/iconbutton/standard-icon-button-toggle.js.map +0 -1
- package/iconbutton/standard-link-icon-button.d.ts +0 -31
- package/iconbutton/standard-link-icon-button.js +0 -39
- package/iconbutton/standard-link-icon-button.js.map +0 -1
- package/slider/lib/_tokens.scss +0 -60
- /package/{fab/lib/fab-extended-styles.css.d.ts → chips/lib/filter-styles.css.d.ts} +0 -0
- /package/{fab/lib/fab-shared-styles.css.d.ts → circularprogress/lib/circular-progress-styles.css.d.ts} +0 -0
- /package/{tokens/v0_161/index.test.css.d.ts → fab/lib/fab-branded-styles.css.d.ts} +0 -0
- /package/{tokens/v0_161/lib.test.css.d.ts → fab/lib/forced-colors-styles.css.d.ts} +0 -0
- /package/tokens/{v0_161 → v0_172}/_index.scss +0 -0
- /package/tokens/{v0_161 → v0_172}/index.test.css.js +0 -0
- /package/tokens/{v0_161 → v0_172}/index.test.css.js.map +0 -0
- /package/tokens/{v0_161 → v0_172}/index.test.scss +0 -0
- /package/tokens/{v0_161 → v0_172}/lib.test.css.js +0 -0
- /package/tokens/{v0_161 → v0_172}/lib.test.css.js.map +0 -0
- /package/tokens/{v0_161 → v0_172}/lib.test.scss +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Harness } from '../testing/harness.js';
|
|
7
|
+
import { LinearProgress } from './lib/linear-progress.js';
|
|
8
|
+
/**
|
|
9
|
+
* Test harness for linear-progress.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LinearProgressHarness extends Harness<LinearProgress> {
|
|
12
|
+
getInteractiveElement(): Promise<HTMLElement>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Harness } from '../testing/harness.js';
|
|
7
|
+
/**
|
|
8
|
+
* Test harness for linear-progress.
|
|
9
|
+
*/
|
|
10
|
+
export class LinearProgressHarness extends Harness {
|
|
11
|
+
async getInteractiveElement() {
|
|
12
|
+
await this.element.updateComplete;
|
|
13
|
+
// Test access to protected property
|
|
14
|
+
// tslint:disable-next-line:no-dict-access-on-struct-type
|
|
15
|
+
return this.element['rootEl'];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["harness.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,OAAuB;IACvD,KAAK,CAAC,qBAAqB;QAClC,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;QAClC,oCAAoC;QACpC,yDAAyD;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Harness} from '../testing/harness.js';\n\nimport {LinearProgress} from './lib/linear-progress.js';\n\n/**\n * Test harness for linear-progress.\n */\nexport class LinearProgressHarness extends Harness<LinearProgress> {\n override async getInteractiveElement() {\n await this.element.updateComplete;\n // Test access to protected property\n // tslint:disable-next-line:no-dict-access-on-struct-type\n return this.element['rootEl'];\n }\n}\n"]}
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// go/keep-sorted start
|
|
7
|
+
@use '../../sass/theme';
|
|
8
|
+
@use '../../tokens';
|
|
9
|
+
// go/keep-sorted end
|
|
10
|
+
|
|
11
|
+
@mixin theme($tokens) {
|
|
12
|
+
$reference: tokens.md-comp-linear-progress-indicator-values();
|
|
13
|
+
$tokens: theme.validate-theme($reference, $tokens);
|
|
14
|
+
$tokens: theme.create-theme-vars($tokens, 'linear-progress');
|
|
15
|
+
|
|
16
|
+
@include theme.emit-theme-vars($tokens);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// note, transition settings match MDC
|
|
20
|
+
// see https://github.com/material-components/material-components-web/blob/main/packages/mdc-linear-progress/_linear-progress.scss#L79
|
|
21
|
+
$_determinate-duration: 250ms;
|
|
22
|
+
$_determinate-easing: cubic-bezier(0.4, 0, 0.6, 1);
|
|
23
|
+
// see https://github.com/material-components/material-components-web/blob/main/packages/mdc-linear-progress/_linear-progress.scss#L218
|
|
24
|
+
$_indeterminate-duration: 2s;
|
|
25
|
+
|
|
26
|
+
// Note, track background is a series of animating dots sized to fit
|
|
27
|
+
// the track height. Since the dots are circular, width scales with height.
|
|
28
|
+
// Background width is separated because it's also used to help animate the
|
|
29
|
+
// /dots.
|
|
30
|
+
$_track-dot-size: calc(var(--_track-height) / 2);
|
|
31
|
+
$_track-background-width: calc($_track-dot-size * 5);
|
|
32
|
+
// this is a series of sized/colored dots.
|
|
33
|
+
$_track-background: 0 / $_track-background-width 100%
|
|
34
|
+
radial-gradient(
|
|
35
|
+
circle at calc($_track-dot-size * 2),
|
|
36
|
+
var(--_track-color) 0,
|
|
37
|
+
var(--_track-color) $_track-dot-size,
|
|
38
|
+
transparent $_track-dot-size
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// Generates a list of rtl selectors. This is done so rules can be generated
|
|
42
|
+
// separately so they don't get dropped where unsupported.
|
|
43
|
+
$rtl-selectors: (
|
|
44
|
+
':host-context([dir="rtl"]) .linear-progress',
|
|
45
|
+
':host([dir="rtl"]) .linear-progress',
|
|
46
|
+
'.linear-progress:dir(rtl)'
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
// Generates keyframes for ltr and rtl.
|
|
50
|
+
@mixin directional-keyframes($dir) {
|
|
51
|
+
$is-rtl: $dir == 'rtl';
|
|
52
|
+
$sign: if($is-rtl, -1, 1);
|
|
53
|
+
$suffix: if($is-rtl, '-rtl', '');
|
|
54
|
+
|
|
55
|
+
@keyframes buffering#{$suffix} {
|
|
56
|
+
0% {
|
|
57
|
+
// the amount to animate is aligned with the default track background
|
|
58
|
+
transform: translateX(calc(#{$sign} * #{$_track-background-width}));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// note, the numbers here come directly from the mdc implementation.
|
|
63
|
+
// see https://github.com/material-components/material-components-web/blob/main/packages/mdc-linear-progress/_linear-progress.scss#L208.
|
|
64
|
+
// keyframes
|
|
65
|
+
@keyframes primary-indeterminate-translate#{$suffix} {
|
|
66
|
+
0% {
|
|
67
|
+
transform: translateX(0px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
20% {
|
|
71
|
+
animation-timing-function: cubic-bezier(0.5, 0, 0.701732, 0.495819);
|
|
72
|
+
transform: translateX(0px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
59.15% {
|
|
76
|
+
animation-timing-function: cubic-bezier(
|
|
77
|
+
0.302435,
|
|
78
|
+
0.381352,
|
|
79
|
+
0.55,
|
|
80
|
+
0.956352
|
|
81
|
+
);
|
|
82
|
+
transform: translateX(calc(#{$sign} * 83.6714%));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
100% {
|
|
86
|
+
transform: translateX(calc(#{$sign} * 200.611%));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes secondary-indeterminate-translate#{$suffix} {
|
|
91
|
+
0% {
|
|
92
|
+
animation-timing-function: cubic-bezier(0.15, 0, 0.515058, 0.409685);
|
|
93
|
+
transform: translateX(0px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
25% {
|
|
97
|
+
animation-timing-function: cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);
|
|
98
|
+
transform: translateX(calc(#{$sign} * 37.6519%));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
48.35% {
|
|
102
|
+
animation-timing-function: cubic-bezier(0.4, 0.627035, 0.6, 0.902026);
|
|
103
|
+
transform: translateX(calc(#{$sign} * 84.3862%));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
100% {
|
|
107
|
+
transform: translateX(calc(#{$sign} * 160.278%));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@mixin styles() {
|
|
113
|
+
$tokens: tokens.md-comp-linear-progress-indicator-values();
|
|
114
|
+
$tokens: theme.create-theme-vars($tokens, 'linear-progress');
|
|
115
|
+
|
|
116
|
+
:host {
|
|
117
|
+
@each $token, $value in $tokens {
|
|
118
|
+
--_#{$token}: #{$value};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
display: block;
|
|
122
|
+
position: relative;
|
|
123
|
+
// note, this matches the `meter` element and is just done so
|
|
124
|
+
// there's a minimum width when in a container with a display like
|
|
125
|
+
// inline-flex.
|
|
126
|
+
min-inline-size: 80px;
|
|
127
|
+
block-size: var(--_track-height);
|
|
128
|
+
content-visibility: auto;
|
|
129
|
+
contain: strict;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.linear-progress,
|
|
133
|
+
.track,
|
|
134
|
+
.buffer-bar,
|
|
135
|
+
.bar,
|
|
136
|
+
.bar-inner {
|
|
137
|
+
position: absolute;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.linear-progress {
|
|
141
|
+
inset: 0;
|
|
142
|
+
outline: transparent solid 1px;
|
|
143
|
+
border-radius: var(--_track-shape);
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.bar {
|
|
150
|
+
animation: none;
|
|
151
|
+
// position is offset for indeterminate animation, so we lock the inline size here.
|
|
152
|
+
inline-size: 100%;
|
|
153
|
+
block-size: var(--_active-indicator-height);
|
|
154
|
+
transform-origin: left center;
|
|
155
|
+
will-change: transform;
|
|
156
|
+
transition: transform $_determinate-duration $_determinate-easing;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.secondary-bar {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.bar-inner {
|
|
164
|
+
inset: 0;
|
|
165
|
+
animation: none;
|
|
166
|
+
background: var(--_active-indicator-color);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.buffer-bar {
|
|
170
|
+
background: var(--_track-color);
|
|
171
|
+
inset: 0;
|
|
172
|
+
will-change: transform;
|
|
173
|
+
transition: transform $_determinate-duration $_determinate-easing;
|
|
174
|
+
transform-origin: left center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.track {
|
|
178
|
+
inset: 0;
|
|
179
|
+
will-change: transform;
|
|
180
|
+
animation: linear infinite $_determinate-duration;
|
|
181
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
182
|
+
// animation generated via mixin
|
|
183
|
+
animation-name: buffering;
|
|
184
|
+
background: $_track-background;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// indeterminate
|
|
188
|
+
.indeterminate .bar {
|
|
189
|
+
transition: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// note, the numbers here come directly from the mdc implementation.
|
|
193
|
+
// see https://github.com/material-components/material-components-web/blob/main/packages/mdc-linear-progress/_linear-progress.scss#L208.
|
|
194
|
+
.indeterminate .primary-bar {
|
|
195
|
+
inset-inline-start: -145.167%;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.indeterminate .secondary-bar {
|
|
199
|
+
inset-inline-start: -54.8889%;
|
|
200
|
+
// this is display none by default.
|
|
201
|
+
display: block;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.indeterminate .track {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.indeterminate.animation-ready .primary-bar {
|
|
209
|
+
will-change: transform;
|
|
210
|
+
animation: linear infinite $_indeterminate-duration;
|
|
211
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
212
|
+
// animation generated via mixin
|
|
213
|
+
animation-name: primary-indeterminate-translate;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.indeterminate.animation-ready .primary-bar > .bar-inner {
|
|
217
|
+
will-change: transform;
|
|
218
|
+
animation: linear infinite $_indeterminate-duration
|
|
219
|
+
primary-indeterminate-scale;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.indeterminate.animation-ready.four-colors .primary-bar > .bar-inner {
|
|
223
|
+
animation-name: primary-indeterminate-scale, four-colors;
|
|
224
|
+
animation-duration: $_indeterminate-duration,
|
|
225
|
+
calc($_indeterminate-duration * 2);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.indeterminate.animation-ready .secondary-bar {
|
|
229
|
+
will-change: transform;
|
|
230
|
+
animation: linear infinite $_indeterminate-duration;
|
|
231
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
232
|
+
// animation generated via mixin
|
|
233
|
+
animation-name: secondary-indeterminate-translate;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.indeterminate.animation-ready .secondary-bar > .bar-inner {
|
|
237
|
+
will-change: transform;
|
|
238
|
+
animation: linear infinite $_indeterminate-duration
|
|
239
|
+
secondary-indeterminate-scale;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.indeterminate.animation-ready.four-colors .secondary-bar > .bar-inner {
|
|
243
|
+
animation-name: secondary-indeterminate-scale, four-colors;
|
|
244
|
+
animation-duration: $_indeterminate-duration,
|
|
245
|
+
calc($_indeterminate-duration * 2);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@each $selector in $rtl-selectors {
|
|
249
|
+
#{$selector} {
|
|
250
|
+
.bar {
|
|
251
|
+
transform-origin: right center;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.buffer-bar {
|
|
255
|
+
transform-origin: right center;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.track {
|
|
259
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
260
|
+
// animation generated via mixin
|
|
261
|
+
animation-name: buffering-rtl;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&.indeterminate.animation-ready .primary-bar {
|
|
265
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
266
|
+
// animation generated via mixin
|
|
267
|
+
animation-name: primary-indeterminate-translate-rtl;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&.indeterminate.animation-ready .secondary-bar {
|
|
271
|
+
// stylelint-disable-next-line no-unknown-animations --
|
|
272
|
+
// animation generated via mixin
|
|
273
|
+
animation-name: secondary-indeterminate-translate-rtl;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@keyframes primary-indeterminate-scale {
|
|
279
|
+
0% {
|
|
280
|
+
transform: scaleX(0.08);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
36.65% {
|
|
284
|
+
animation-timing-function: cubic-bezier(0.334731, 0.12482, 0.785844, 1);
|
|
285
|
+
transform: scaleX(0.08);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
69.15% {
|
|
289
|
+
animation-timing-function: cubic-bezier(0.06, 0.11, 0.6, 1);
|
|
290
|
+
transform: scaleX(0.661479);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
100% {
|
|
294
|
+
transform: scaleX(0.08);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@keyframes secondary-indeterminate-scale {
|
|
299
|
+
0% {
|
|
300
|
+
animation-timing-function: cubic-bezier(
|
|
301
|
+
0.205028,
|
|
302
|
+
0.057051,
|
|
303
|
+
0.57661,
|
|
304
|
+
0.453971
|
|
305
|
+
);
|
|
306
|
+
transform: scaleX(0.08);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
19.15% {
|
|
310
|
+
animation-timing-function: cubic-bezier(
|
|
311
|
+
0.152313,
|
|
312
|
+
0.196432,
|
|
313
|
+
0.648374,
|
|
314
|
+
1.00432
|
|
315
|
+
);
|
|
316
|
+
transform: scaleX(0.457104);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
44.15% {
|
|
320
|
+
animation-timing-function: cubic-bezier(
|
|
321
|
+
0.257759,
|
|
322
|
+
-0.003163,
|
|
323
|
+
0.211762,
|
|
324
|
+
1.38179
|
|
325
|
+
);
|
|
326
|
+
transform: scaleX(0.72796);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
100% {
|
|
330
|
+
transform: scaleX(0.08);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@include directional-keyframes('ltr');
|
|
335
|
+
@include directional-keyframes('rtl');
|
|
336
|
+
|
|
337
|
+
@keyframes four-colors {
|
|
338
|
+
0% {
|
|
339
|
+
background: var(--_four-color-active-indicator-one-color);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
15% {
|
|
343
|
+
background: var(--_four-color-active-indicator-one-color);
|
|
344
|
+
}
|
|
345
|
+
25% {
|
|
346
|
+
background: var(--_four-color-active-indicator-two-color);
|
|
347
|
+
}
|
|
348
|
+
40% {
|
|
349
|
+
background: var(--_four-color-active-indicator-two-color);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
50% {
|
|
353
|
+
background: var(--_four-color-active-indicator-three-color);
|
|
354
|
+
}
|
|
355
|
+
65% {
|
|
356
|
+
background: var(--_four-color-active-indicator-three-color);
|
|
357
|
+
}
|
|
358
|
+
75% {
|
|
359
|
+
background: var(--_four-color-active-indicator-four-color);
|
|
360
|
+
}
|
|
361
|
+
90% {
|
|
362
|
+
background: var(--_four-color-active-indicator-four-color);
|
|
363
|
+
}
|
|
364
|
+
100% {
|
|
365
|
+
background: var(--_four-color-active-indicator-one-color);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@media screen and (forced-colors: active) {
|
|
370
|
+
.linear-progress {
|
|
371
|
+
--_active-indicator-color: canvastext;
|
|
372
|
+
--_track-color: graytext;
|
|
373
|
+
border: 1px solid canvastext;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.indeterminate.linear-progress {
|
|
377
|
+
--_track-color: canvas;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { css } from 'lit';
|
|
7
|
+
export const styles = css `:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);display:block;position:relative;min-inline-size:80px;block-size:var(--_track-height);content-visibility:auto;contain:strict}.linear-progress,.track,.buffer-bar,.bar,.bar-inner{position:absolute}.linear-progress{inset:0;outline:rgba(0,0,0,0) solid 1px;border-radius:var(--_track-shape);overflow:hidden;display:flex;align-items:center}.bar{animation:none;inline-size:100%;block-size:var(--_active-indicator-height);transform-origin:left center;will-change:transform;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.buffer-bar{background:var(--_track-color);inset:0;will-change:transform;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.track{inset:0;will-change:transform;animation:linear infinite 250ms;animation-name:buffering;background:0/calc(var(--_track-height) / 2 * 5) 100% radial-gradient(circle at calc(var(--_track-height) / 2 * 2), var(--_track-color) 0, var(--_track-color) calc(var(--_track-height) / 2), transparent calc(var(--_track-height) / 2))}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .track{display:none}.indeterminate.animation-ready .primary-bar{will-change:transform;animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate.animation-ready .primary-bar>.bar-inner{will-change:transform;animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.animation-ready.four-colors .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-colors;animation-duration:2s,4s}.indeterminate.animation-ready .secondary-bar{will-change:transform;animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate.animation-ready .secondary-bar>.bar-inner{will-change:transform;animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.animation-ready.four-colors .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-colors;animation-duration:2s,4s}:host-context([dir=rtl]) .linear-progress .bar{transform-origin:right center}:host-context([dir=rtl]) .linear-progress .buffer-bar{transform-origin:right center}:host-context([dir=rtl]) .linear-progress .track{animation-name:buffering-rtl}:host-context([dir=rtl]) .linear-progress.indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}:host-context([dir=rtl]) .linear-progress.indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}:host([dir=rtl]) .linear-progress .bar{transform-origin:right center}:host([dir=rtl]) .linear-progress .buffer-bar{transform-origin:right center}:host([dir=rtl]) .linear-progress .track{animation-name:buffering-rtl}:host([dir=rtl]) .linear-progress.indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}:host([dir=rtl]) .linear-progress.indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}.linear-progress:dir(rtl) .bar{transform-origin:right center}.linear-progress:dir(rtl) .buffer-bar{transform-origin:right center}.linear-progress:dir(rtl) .track{animation-name:buffering-rtl}.linear-progress:dir(rtl).indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}.linear-progress:dir(rtl).indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(1 * calc(var(--_track-height) / 2 * 5)))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(1 * 83.6714%))}100%{transform:translateX(calc(1 * 200.611%))}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(calc(1 * 37.6519%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(calc(1 * 84.3862%))}100%{transform:translateX(calc(1 * 160.278%))}}@keyframes buffering-rtl{0%{transform:translateX(calc(-1 * calc(var(--_track-height) / 2 * 5)))}}@keyframes primary-indeterminate-translate-rtl{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-1 * 83.6714%))}100%{transform:translateX(calc(-1 * 200.611%))}}@keyframes secondary-indeterminate-translate-rtl{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(calc(-1 * 37.6519%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(calc(-1 * 84.3862%))}100%{transform:translateX(calc(-1 * 160.278%))}}@keyframes four-colors{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media screen and (forced-colors: active){.linear-progress{--_active-indicator-color: canvastext;--_track-color: graytext;border:1px solid canvastext}.indeterminate.linear-progress{--_track-color: canvas}}/*# sourceMappingURL=linear-progress-styles.css.map */
|
|
8
|
+
`;
|
|
9
|
+
//# sourceMappingURL=linear-progress-styles.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-progress-styles.css.js","sourceRoot":"","sources":["linear-progress-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, 0px);display:block;position:relative;min-inline-size:80px;block-size:var(--_track-height);content-visibility:auto;contain:strict}.linear-progress,.track,.buffer-bar,.bar,.bar-inner{position:absolute}.linear-progress{inset:0;outline:rgba(0,0,0,0) solid 1px;border-radius:var(--_track-shape);overflow:hidden;display:flex;align-items:center}.bar{animation:none;inline-size:100%;block-size:var(--_active-indicator-height);transform-origin:left center;will-change:transform;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.buffer-bar{background:var(--_track-color);inset:0;will-change:transform;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.track{inset:0;will-change:transform;animation:linear infinite 250ms;animation-name:buffering;background:0/calc(var(--_track-height) / 2 * 5) 100% radial-gradient(circle at calc(var(--_track-height) / 2 * 2), var(--_track-color) 0, var(--_track-color) calc(var(--_track-height) / 2), transparent calc(var(--_track-height) / 2))}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .track{display:none}.indeterminate.animation-ready .primary-bar{will-change:transform;animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate.animation-ready .primary-bar>.bar-inner{will-change:transform;animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.animation-ready.four-colors .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-colors;animation-duration:2s,4s}.indeterminate.animation-ready .secondary-bar{will-change:transform;animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate.animation-ready .secondary-bar>.bar-inner{will-change:transform;animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.animation-ready.four-colors .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-colors;animation-duration:2s,4s}:host-context([dir=rtl]) .linear-progress .bar{transform-origin:right center}:host-context([dir=rtl]) .linear-progress .buffer-bar{transform-origin:right center}:host-context([dir=rtl]) .linear-progress .track{animation-name:buffering-rtl}:host-context([dir=rtl]) .linear-progress.indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}:host-context([dir=rtl]) .linear-progress.indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}:host([dir=rtl]) .linear-progress .bar{transform-origin:right center}:host([dir=rtl]) .linear-progress .buffer-bar{transform-origin:right center}:host([dir=rtl]) .linear-progress .track{animation-name:buffering-rtl}:host([dir=rtl]) .linear-progress.indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}:host([dir=rtl]) .linear-progress.indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}.linear-progress:dir(rtl) .bar{transform-origin:right center}.linear-progress:dir(rtl) .buffer-bar{transform-origin:right center}.linear-progress:dir(rtl) .track{animation-name:buffering-rtl}.linear-progress:dir(rtl).indeterminate.animation-ready .primary-bar{animation-name:primary-indeterminate-translate-rtl}.linear-progress:dir(rtl).indeterminate.animation-ready .secondary-bar{animation-name:secondary-indeterminate-translate-rtl}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(1 * calc(var(--_track-height) / 2 * 5)))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(1 * 83.6714%))}100%{transform:translateX(calc(1 * 200.611%))}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(calc(1 * 37.6519%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(calc(1 * 84.3862%))}100%{transform:translateX(calc(1 * 160.278%))}}@keyframes buffering-rtl{0%{transform:translateX(calc(-1 * calc(var(--_track-height) / 2 * 5)))}}@keyframes primary-indeterminate-translate-rtl{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-1 * 83.6714%))}100%{transform:translateX(calc(-1 * 200.611%))}}@keyframes secondary-indeterminate-translate-rtl{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(calc(-1 * 37.6519%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(calc(-1 * 84.3862%))}100%{transform:translateX(calc(-1 * 160.278%))}}@keyframes four-colors{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media screen and (forced-colors: active){.linear-progress{--_active-indicator-color: canvastext;--_track-color: graytext;border:1px solid canvastext}.indeterminate.linear-progress{--_track-color: canvas}}/*# sourceMappingURL=linear-progress-styles.css.map */\n`;\n "]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
/**
|
|
8
|
+
* LinearProgress component.
|
|
9
|
+
*/
|
|
10
|
+
export declare class LinearProgress extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not to render indeterminate progress in an animated state.
|
|
13
|
+
*/
|
|
14
|
+
indeterminate: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Progress to display, a fraction between 0 and 1.
|
|
17
|
+
*/
|
|
18
|
+
progress: number;
|
|
19
|
+
/**
|
|
20
|
+
* Buffer amount to display, a fraction between 0 and 1.
|
|
21
|
+
*/
|
|
22
|
+
buffer: number;
|
|
23
|
+
/**
|
|
24
|
+
* Whether or not to render indeterminate mode using 4 colors instead of one.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
fourColors: boolean;
|
|
28
|
+
protected rootEl: HTMLElement;
|
|
29
|
+
protected animationReady: boolean;
|
|
30
|
+
protected resizeObserver: ResizeObserver | null;
|
|
31
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
32
|
+
connectedCallback(): Promise<void>;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
protected restartAnimation(): Promise<void>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
var _a;
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html, LitElement, nothing } from 'lit';
|
|
9
|
+
import { property, query, state } from 'lit/decorators.js';
|
|
10
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
12
|
+
import { requestUpdateOnAriaChange } from '../../aria/delegate.js';
|
|
13
|
+
/**
|
|
14
|
+
* LinearProgress component.
|
|
15
|
+
*/
|
|
16
|
+
export class LinearProgress extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
/**
|
|
20
|
+
* Whether or not to render indeterminate progress in an animated state.
|
|
21
|
+
*/
|
|
22
|
+
this.indeterminate = false;
|
|
23
|
+
/**
|
|
24
|
+
* Progress to display, a fraction between 0 and 1.
|
|
25
|
+
*/
|
|
26
|
+
this.progress = 0;
|
|
27
|
+
/**
|
|
28
|
+
* Buffer amount to display, a fraction between 0 and 1.
|
|
29
|
+
*/
|
|
30
|
+
this.buffer = 1;
|
|
31
|
+
/**
|
|
32
|
+
* Whether or not to render indeterminate mode using 4 colors instead of one.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
this.fourColors = false;
|
|
36
|
+
this.animationReady = true;
|
|
37
|
+
this.resizeObserver = null;
|
|
38
|
+
}
|
|
39
|
+
// Note, the indeterminate animation is rendered with transform %'s
|
|
40
|
+
// Previously, this was optimized to use px calculated with the resizeObserver
|
|
41
|
+
// due to a now fixed Chrome bug: crbug.com/389359.
|
|
42
|
+
render() {
|
|
43
|
+
const rootClasses = {
|
|
44
|
+
'indeterminate': this.indeterminate,
|
|
45
|
+
'animation-ready': this.animationReady,
|
|
46
|
+
'four-colors': this.fourColors
|
|
47
|
+
};
|
|
48
|
+
const progressStyles = {
|
|
49
|
+
transform: `scaleX(${(this.indeterminate ? 1 : this.progress) * 100}%)`
|
|
50
|
+
};
|
|
51
|
+
const bufferStyles = {
|
|
52
|
+
transform: `scaleX(${(this.indeterminate ? 1 : this.buffer) * 100}%)`
|
|
53
|
+
};
|
|
54
|
+
// Needed for closure conformance
|
|
55
|
+
const { ariaLabel } = this;
|
|
56
|
+
return html `
|
|
57
|
+
<div
|
|
58
|
+
role="progressbar"
|
|
59
|
+
class="linear-progress ${classMap(rootClasses)}"
|
|
60
|
+
aria-label="${ariaLabel || nothing}"
|
|
61
|
+
aria-valuemin="0"
|
|
62
|
+
aria-valuemax="1"
|
|
63
|
+
aria-valuenow="${this.indeterminate ? nothing : this.progress}">
|
|
64
|
+
<div class="track"></div>
|
|
65
|
+
<div class="buffer-bar" style=${styleMap(bufferStyles)}></div>
|
|
66
|
+
<div class="bar primary-bar" style=${styleMap(progressStyles)}>
|
|
67
|
+
<div class="bar-inner"></div>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="bar secondary-bar">
|
|
70
|
+
<div class="bar-inner"></div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>`;
|
|
73
|
+
}
|
|
74
|
+
async connectedCallback() {
|
|
75
|
+
super.connectedCallback();
|
|
76
|
+
// wait for rendering.
|
|
77
|
+
await this.updateComplete;
|
|
78
|
+
if (this.resizeObserver) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
82
|
+
if (this.indeterminate) {
|
|
83
|
+
this.restartAnimation();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
this.resizeObserver.observe(this.rootEl);
|
|
87
|
+
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
if (this.resizeObserver) {
|
|
90
|
+
this.resizeObserver.disconnect();
|
|
91
|
+
this.resizeObserver = null;
|
|
92
|
+
}
|
|
93
|
+
super.disconnectedCallback();
|
|
94
|
+
}
|
|
95
|
+
// When size changes, restart the animation
|
|
96
|
+
// to avoid jank.
|
|
97
|
+
async restartAnimation() {
|
|
98
|
+
await this.updateComplete;
|
|
99
|
+
this.animationReady = false;
|
|
100
|
+
await new Promise(requestAnimationFrame);
|
|
101
|
+
this.animationReady = true;
|
|
102
|
+
await this.updateComplete;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
_a = LinearProgress;
|
|
106
|
+
(() => {
|
|
107
|
+
requestUpdateOnAriaChange(_a);
|
|
108
|
+
})();
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Boolean })
|
|
111
|
+
], LinearProgress.prototype, "indeterminate", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: Number })
|
|
114
|
+
], LinearProgress.prototype, "progress", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: Number })
|
|
117
|
+
], LinearProgress.prototype, "buffer", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: Boolean, attribute: 'four-colors' })
|
|
120
|
+
], LinearProgress.prototype, "fourColors", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
query('.linear-progress')
|
|
123
|
+
], LinearProgress.prototype, "rootEl", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
state()
|
|
126
|
+
], LinearProgress.prototype, "animationReady", void 0);
|
|
127
|
+
//# sourceMappingURL=linear-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-progress.js","sourceRoot":"","sources":["linear-progress.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,yBAAyB,EAAC,MAAM,wBAAwB,CAAC;AAGjE;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAA9C;;QAKE;;WAEG;QACwB,kBAAa,GAAG,KAAK,CAAC;QAEjD;;WAEG;QACuB,aAAQ,GAAG,CAAC,CAAC;QAEvC;;WAEG;QACuB,WAAM,GAAG,CAAC,CAAC;QAErC;;;WAGG;QACkD,eAAU,GAAG,KAAK,CAAC;QAIrD,mBAAc,GAAG,IAAI,CAAC;QAC/B,mBAAc,GAAwB,IAAI,CAAC;IAwEvD,CAAC;IAtEC,mEAAmE;IACnE,8EAA8E;IAC9E,mDAAmD;IAChC,MAAM;QACvB,MAAM,WAAW,GAAG;YAClB,eAAe,EAAE,IAAI,CAAC,aAAa;YACnC,iBAAiB,EAAE,IAAI,CAAC,cAAc;YACtC,aAAa,EAAE,IAAI,CAAC,UAAU;SAC/B,CAAC;QAEF,MAAM,cAAc,GAAG;YACrB,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,GAAG,IAAI;SACxE,CAAC;QACF,MAAM,YAAY,GAAG;YACnB,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI;SACtE,CAAC;QAEF,iCAAiC;QACjC,MAAM,EAAC,SAAS,EAAC,GAAG,IAAuB,CAAC;QAC5C,OAAO,IAAI,CAAA;;;mCAGoB,QAAQ,CAAC,WAAW,CAAC;wBAChC,SAAS,IAAI,OAAO;;;2BAGjB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;;wCAE/B,QAAQ,CAAC,YAAY,CAAC;6CACjB,QAAQ,CAAC,cAAc,CAAC;;;;;;aAMxD,CAAC;IACZ,CAAC;IAEQ,KAAK,CAAC,iBAAiB;QAC9B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,sBAAsB;QACtB,MAAM,IAAI,CAAC,cAAc,CAAC;QAC1B,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO;SACR;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,GAAG,EAAE;YAC5C,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEQ,oBAAoB;QAC3B,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;YACjC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;SAC5B;QACD,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC/B,CAAC;IAED,2CAA2C;IAC3C,iBAAiB;IACP,KAAK,CAAC,gBAAgB;QAC9B,MAAM,IAAI,CAAC,cAAc,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,MAAM,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,MAAM,IAAI,CAAC,cAAc,CAAC;IAC5B,CAAC;CACF;;AApGC;IACE,yBAAyB,CAAC,EAAI,CAAC,CAAC;AAClC,CAAC,GAAA,CAAA;AAK0B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;qDAAuB;AAKvB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDAAc;AAKb;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;8CAAY;AAMgB;IAApD,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAC,CAAC;kDAAoB;AAE7C;IAA1B,KAAK,CAAC,kBAAkB,CAAC;8CAAgC;AAEjD;IAAR,KAAK,EAAE;sDAAiC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, nothing} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {requestUpdateOnAriaChange} from '../../aria/delegate.js';\nimport {ARIAMixinStrict} from '../../types/aria.js';\n\n/**\n * LinearProgress component.\n */\nexport class LinearProgress extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n /**\n * Whether or not to render indeterminate progress in an animated state.\n */\n @property({type: Boolean}) indeterminate = false;\n\n /**\n * Progress to display, a fraction between 0 and 1.\n */\n @property({type: Number}) progress = 0;\n\n /**\n * Buffer amount to display, a fraction between 0 and 1.\n */\n @property({type: Number}) buffer = 1;\n\n /**\n * Whether or not to render indeterminate mode using 4 colors instead of one.\n *\n */\n @property({type: Boolean, attribute: 'four-colors'}) fourColors = false;\n\n @query('.linear-progress') protected rootEl!: HTMLElement;\n\n @state() protected animationReady = true;\n protected resizeObserver: ResizeObserver|null = null;\n\n // Note, the indeterminate animation is rendered with transform %'s\n // Previously, this was optimized to use px calculated with the resizeObserver\n // due to a now fixed Chrome bug: crbug.com/389359.\n protected override render() {\n const rootClasses = {\n 'indeterminate': this.indeterminate,\n 'animation-ready': this.animationReady,\n 'four-colors': this.fourColors\n };\n\n const progressStyles = {\n transform: `scaleX(${(this.indeterminate ? 1 : this.progress) * 100}%)`\n };\n const bufferStyles = {\n transform: `scaleX(${(this.indeterminate ? 1 : this.buffer) * 100}%)`\n };\n\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`\n <div\n role=\"progressbar\"\n class=\"linear-progress ${classMap(rootClasses)}\"\n aria-label=\"${ariaLabel || nothing}\"\n aria-valuemin=\"0\"\n aria-valuemax=\"1\"\n aria-valuenow=\"${this.indeterminate ? nothing : this.progress}\">\n <div class=\"track\"></div>\n <div class=\"buffer-bar\" style=${styleMap(bufferStyles)}></div>\n <div class=\"bar primary-bar\" style=${styleMap(progressStyles)}>\n <div class=\"bar-inner\"></div>\n </div>\n <div class=\"bar secondary-bar\">\n <div class=\"bar-inner\"></div>\n </div>\n </div>`;\n }\n\n override async connectedCallback() {\n super.connectedCallback();\n // wait for rendering.\n await this.updateComplete;\n if (this.resizeObserver) {\n return;\n }\n this.resizeObserver = new ResizeObserver(() => {\n if (this.indeterminate) {\n this.restartAnimation();\n }\n });\n this.resizeObserver.observe(this.rootEl);\n }\n\n override disconnectedCallback() {\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n this.resizeObserver = null;\n }\n super.disconnectedCallback();\n }\n\n // When size changes, restart the animation\n // to avoid jank.\n protected async restartAnimation() {\n await this.updateComplete;\n this.animationReady = false;\n await new Promise(requestAnimationFrame);\n this.animationReady = true;\n await this.updateComplete;\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LinearProgress } from './lib/linear-progress.js';
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElementTagNameMap {
|
|
9
|
+
'md-linear-progress': MdLinearProgress;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @summary Linear progress indicators display progress by animating along the
|
|
14
|
+
* length of a fixed, visible track.
|
|
15
|
+
*
|
|
16
|
+
* @description
|
|
17
|
+
* Progress indicators inform users about the status of ongoing processes.
|
|
18
|
+
* - Determinate indicators display how long a process will take.
|
|
19
|
+
* - Indeterminate indicators express an unspecified amount of wait time.
|
|
20
|
+
*/
|
|
21
|
+
export declare class MdLinearProgress extends LinearProgress {
|
|
22
|
+
static styles: import("lit").CSSResult[];
|
|
23
|
+
}
|