@material/web 1.0.0-pre.1 → 1.0.0-pre.11
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/LICENSE +1 -1
- package/README.md +65 -23
- package/button/elevated-button.js.map +1 -1
- package/button/filled-button.js.map +1 -1
- package/button/lib/_elevated-button.scss +41 -42
- package/button/lib/_elevation.scss +16 -24
- package/button/lib/_filled-button.scss +42 -39
- package/button/lib/_icon.scss +16 -24
- package/button/lib/_outlined-button.scss +42 -35
- package/button/lib/_shared.scss +43 -71
- package/button/lib/_text-button.scss +45 -44
- package/button/lib/_tonal-button.scss +40 -41
- package/button/lib/button.d.ts +44 -38
- package/button/lib/button.js +103 -109
- package/button/lib/button.js.map +1 -1
- package/button/lib/elevated-button.d.ts +9 -4
- 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/elevated-styles.scss +2 -0
- package/button/lib/filled-button.d.ts +9 -5
- 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/filled-styles.scss +2 -0
- package/button/lib/outlined-button.d.ts +9 -4
- 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/outlined-styles.scss +2 -0
- 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-elevation-styles.scss +2 -0
- package/button/lib/shared-styles.css.js +1 -1
- package/button/lib/shared-styles.css.js.map +1 -1
- package/button/lib/shared-styles.scss +2 -0
- package/button/lib/text-button.d.ts +8 -2
- 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/text-styles.scss +2 -0
- package/button/lib/tonal-button.d.ts +9 -5
- 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/button/lib/tonal-styles.scss +2 -0
- package/button/outlined-button.js.map +1 -1
- package/button/text-button.js.map +1 -1
- package/button/tonal-button.js.map +1 -1
- package/checkbox/checkbox.d.ts +11 -2
- package/checkbox/checkbox.js +11 -2
- package/checkbox/checkbox.js.map +1 -1
- package/checkbox/lib/_checkbox.scss +68 -79
- package/checkbox/lib/checkbox-styles.css.js +1 -1
- package/checkbox/lib/checkbox-styles.css.js.map +1 -1
- package/checkbox/lib/checkbox-styles.scss +2 -0
- package/checkbox/lib/checkbox.d.ts +39 -14
- package/checkbox/lib/checkbox.js +88 -89
- package/checkbox/lib/checkbox.js.map +1 -1
- package/checkbox/lib/forced-colors-styles.css.js +1 -1
- package/checkbox/lib/forced-colors-styles.css.js.map +1 -1
- package/checkbox/lib/forced-colors-styles.scss +2 -0
- package/chips/_assist-chip.scss +6 -0
- package/chips/_filter-chip.scss +6 -0
- package/chips/_input-chip.scss +6 -0
- package/chips/_suggestion-chip.scss +6 -0
- package/chips/assist-chip.d.ts +20 -0
- package/chips/assist-chip.js +25 -0
- package/chips/assist-chip.js.map +1 -0
- package/chips/chip-set.d.ts +20 -0
- package/chips/chip-set.js +23 -0
- package/chips/chip-set.js.map +1 -0
- package/chips/filter-chip.d.ts +20 -0
- package/chips/filter-chip.js +29 -0
- package/chips/filter-chip.js.map +1 -0
- package/chips/harness.d.ts +17 -0
- package/chips/harness.js +34 -0
- package/chips/harness.js.map +1 -0
- package/chips/input-chip.d.ts +20 -0
- package/chips/input-chip.js +26 -0
- package/chips/input-chip.js.map +1 -0
- package/chips/lib/_assist-chip.scss +61 -0
- package/chips/lib/_chip-set.scss +18 -0
- package/chips/lib/_elevated.scss +60 -0
- package/chips/lib/_filter-chip.scss +74 -0
- package/chips/lib/_input-chip.scss +75 -0
- package/chips/lib/_selectable.scss +66 -0
- package/chips/lib/_shared.scss +189 -0
- package/chips/lib/_suggestion-chip.scss +61 -0
- package/chips/lib/_trailing-icon.scss +78 -0
- package/chips/lib/assist-chip.d.ts +23 -0
- package/chips/lib/assist-chip.js +73 -0
- package/chips/lib/assist-chip.js.map +1 -0
- package/chips/lib/assist-styles.css.js +9 -0
- package/chips/lib/assist-styles.css.js.map +1 -0
- package/chips/lib/assist-styles.scss +10 -0
- package/chips/lib/chip-set-styles.css.js +9 -0
- package/chips/lib/chip-set-styles.css.js.map +1 -0
- package/chips/lib/chip-set-styles.scss +10 -0
- package/chips/lib/chip-set.d.ts +26 -0
- package/chips/lib/chip-set.js +165 -0
- package/chips/lib/chip-set.js.map +1 -0
- package/chips/lib/chip.d.ts +45 -0
- package/chips/lib/chip.js +95 -0
- package/chips/lib/chip.js.map +1 -0
- package/chips/lib/elevated-styles.css.js +9 -0
- package/chips/lib/elevated-styles.css.js.map +1 -0
- package/chips/lib/elevated-styles.scss +10 -0
- package/chips/lib/filter-chip.d.ts +31 -0
- package/chips/lib/filter-chip.js +102 -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/chips/lib/filter-styles.scss +10 -0
- package/chips/lib/input-chip.d.ts +27 -0
- package/chips/lib/input-chip.js +107 -0
- package/chips/lib/input-chip.js.map +1 -0
- package/chips/lib/input-styles.css.js +9 -0
- package/chips/lib/input-styles.css.js.map +1 -0
- package/chips/lib/input-styles.scss +10 -0
- package/chips/lib/multi-action-chip.d.ts +23 -0
- package/chips/lib/multi-action-chip.js +80 -0
- package/chips/lib/multi-action-chip.js.map +1 -0
- package/chips/lib/selectable-styles.css.js +9 -0
- package/chips/lib/selectable-styles.css.js.map +1 -0
- package/chips/lib/selectable-styles.scss +10 -0
- package/chips/lib/shared-styles.css.js +9 -0
- package/chips/lib/shared-styles.css.js.map +1 -0
- package/chips/lib/shared-styles.scss +10 -0
- package/chips/lib/suggestion-chip.d.ts +11 -0
- package/chips/lib/suggestion-chip.js +14 -0
- package/chips/lib/suggestion-chip.js.map +1 -0
- package/chips/lib/suggestion-styles.css.js +9 -0
- package/chips/lib/suggestion-styles.css.js.map +1 -0
- package/chips/lib/suggestion-styles.scss +10 -0
- package/chips/lib/trailing-icon-styles.css.js +9 -0
- package/chips/lib/trailing-icon-styles.css.js.map +1 -0
- package/chips/lib/trailing-icon-styles.scss +10 -0
- package/chips/lib/trailing-icons.d.ts +15 -0
- package/chips/lib/trailing-icons.js +38 -0
- package/chips/lib/trailing-icons.js.map +1 -0
- package/chips/suggestion-chip.d.ts +20 -0
- package/chips/suggestion-chip.js +25 -0
- package/chips/suggestion-chip.js.map +1 -0
- 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 +288 -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 +27 -0
- package/circularprogress/lib/circular-progress.js +94 -0
- package/circularprogress/lib/circular-progress.js.map +1 -0
- package/dialog/_dialog.scss +6 -0
- package/dialog/dialog.d.ts +38 -0
- package/dialog/dialog.js +41 -0
- package/dialog/dialog.js.map +1 -0
- package/dialog/harness.d.ts +18 -0
- package/dialog/harness.js +58 -0
- package/dialog/harness.js.map +1 -0
- package/dialog/lib/_dialog.scss +376 -0
- package/dialog/lib/_tokens.scss +85 -0
- package/dialog/lib/dialog-styles.css.js +9 -0
- package/dialog/lib/dialog-styles.css.js.map +1 -0
- package/dialog/lib/dialog-styles.scss +10 -0
- package/dialog/lib/dialog.d.ts +190 -0
- package/dialog/lib/dialog.js +553 -0
- package/dialog/lib/dialog.js.map +1 -0
- package/divider/_divider.scss +6 -0
- package/divider/divider.d.ts +24 -0
- package/divider/divider.js +27 -0
- package/divider/divider.js.map +1 -0
- package/divider/lib/_divider.scss +64 -0
- package/divider/lib/divider-styles.css.js +9 -0
- package/divider/lib/divider-styles.css.js.map +1 -0
- package/divider/lib/divider-styles.scss +10 -0
- package/divider/lib/divider.d.ts +23 -0
- package/divider/lib/divider.js +38 -0
- package/divider/lib/divider.js.map +1 -0
- package/elevation/elevation.js.map +1 -1
- package/elevation/lib/_elevation.scss +21 -74
- package/elevation/lib/elevation-styles.css.js +1 -1
- package/elevation/lib/elevation-styles.css.js.map +1 -1
- package/elevation/lib/elevation-styles.scss +2 -0
- package/elevation/lib/elevation.d.ts +1 -9
- 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 +56 -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 +81 -0
- package/fab/lib/_fab.scss +219 -19
- package/fab/lib/_shared.scss +163 -152
- 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-styles.scss +2 -0
- package/fab/lib/fab.d.ts +18 -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.js +9 -0
- package/fab/lib/shared-styles.css.js.map +1 -0
- package/fab/lib/shared-styles.scss +10 -0
- package/fab/lib/shared.d.ts +46 -0
- package/fab/lib/shared.js +99 -0
- package/fab/lib/shared.js.map +1 -0
- package/field/filled-field.d.ts +1 -1
- package/field/filled-field.js +1 -1
- package/field/filled-field.js.map +1 -1
- package/field/harness.js +1 -1
- package/field/harness.js.map +1 -1
- package/field/lib/_content.scss +120 -57
- package/field/lib/_filled-field.scss +117 -136
- package/field/lib/_label.scss +27 -65
- package/field/lib/_outlined-field.scss +143 -128
- package/field/lib/_shared.scss +29 -45
- package/field/lib/_supporting-text.scss +25 -52
- package/field/lib/field.d.ts +19 -34
- package/field/lib/field.js +143 -160
- package/field/lib/field.js.map +1 -1
- package/field/lib/filled-field.d.ts +5 -16
- package/field/lib/filled-field.js +8 -70
- package/field/lib/filled-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-field.d.ts +4 -10
- package/field/lib/outlined-field.js +13 -33
- package/field/lib/outlined-field.js.map +1 -1
- package/field/lib/outlined-styles.css.js +1 -1
- package/field/lib/outlined-styles.css.js.map +1 -1
- package/field/lib/shared-styles.css.js +1 -1
- package/field/lib/shared-styles.css.js.map +1 -1
- package/field/outlined-field.d.ts +1 -1
- package/field/outlined-field.js +1 -1
- package/field/outlined-field.js.map +1 -1
- package/focus/focus-ring.d.ts +2 -1
- package/focus/focus-ring.js +2 -1
- package/focus/focus-ring.js.map +1 -1
- package/focus/lib/_focus-ring.scss +103 -42
- 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-styles.scss +2 -0
- package/focus/lib/focus-ring.d.ts +22 -16
- package/focus/lib/focus-ring.js +57 -22
- package/focus/lib/focus-ring.js.map +1 -1
- package/icon/icon.d.ts +1 -1
- package/icon/icon.js +1 -1
- package/icon/icon.js.map +1 -1
- package/icon/lib/_icon.scss +6 -2
- package/icon/lib/_md-comp-icon.scss +1 -2
- package/icon/lib/icon-styles.css.js +1 -1
- package/icon/lib/icon-styles.css.js.map +1 -1
- package/icon/lib/icon-styles.scss +2 -0
- 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.d.ts +6 -2
- package/iconbutton/filled-icon-button.js +2 -1
- package/iconbutton/filled-icon-button.js.map +1 -1
- package/iconbutton/filled-tonal-icon-button.d.ts +6 -2
- package/iconbutton/filled-tonal-icon-button.js +2 -1
- package/iconbutton/filled-tonal-icon-button.js.map +1 -1
- package/iconbutton/harness.d.ts +2 -3
- package/iconbutton/harness.js +4 -1
- package/iconbutton/harness.js.map +1 -1
- package/iconbutton/lib/_filled-icon-button.scss +77 -51
- package/iconbutton/lib/_filled-tonal-icon-button.scss +77 -49
- package/iconbutton/lib/_outlined-icon-button.scss +70 -53
- package/iconbutton/lib/_shared.scss +35 -112
- package/iconbutton/lib/_standard-icon-button.scss +39 -48
- package/iconbutton/lib/filled-styles.css.js +1 -1
- package/iconbutton/lib/filled-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-styles.scss +2 -0
- package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
- package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
- package/iconbutton/lib/filled-tonal-styles.scss +2 -0
- package/iconbutton/lib/icon-button.d.ts +43 -26
- package/iconbutton/lib/icon-button.js +115 -84
- 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/outlined-styles.scss +2 -0
- package/iconbutton/lib/shared-styles.css.js +1 -1
- package/iconbutton/lib/shared-styles.css.js.map +1 -1
- package/iconbutton/lib/shared-styles.scss +2 -0
- package/iconbutton/lib/standard-styles.css.js +1 -1
- package/iconbutton/lib/standard-styles.css.js.map +1 -1
- package/iconbutton/lib/standard-styles.scss +2 -0
- package/iconbutton/outlined-icon-button.d.ts +5 -2
- package/iconbutton/outlined-icon-button.js +1 -1
- package/iconbutton/outlined-icon-button.js.map +1 -1
- package/iconbutton/standard-icon-button.d.ts +5 -2
- package/iconbutton/standard-icon-button.js +1 -1
- package/iconbutton/standard-icon-button.js.map +1 -1
- package/internal/README.md +6 -0
- package/internal/aria/aria.d.ts +103 -0
- package/internal/aria/aria.js +80 -0
- package/internal/aria/aria.js.map +1 -0
- package/internal/aria/delegate.d.ts +37 -0
- package/internal/aria/delegate.js +53 -0
- package/internal/aria/delegate.js.map +1 -0
- package/internal/controller/attachable-controller.d.ts +113 -0
- package/internal/controller/attachable-controller.js +115 -0
- package/internal/controller/attachable-controller.js.map +1 -0
- package/internal/controller/events.js +130 -0
- package/internal/controller/events.js.map +1 -0
- package/internal/motion/animation.d.ts +80 -0
- package/internal/motion/animation.js +101 -0
- package/internal/motion/animation.js.map +1 -0
- package/internal/sass/_string-ext.scss +195 -0
- package/internal/sass/_theme.scss +249 -0
- package/internal/sass/_var.scss +237 -0
- package/labs/README.md +6 -0
- package/labs/badge/badge.d.ts +18 -0
- package/labs/badge/badge.js +21 -0
- package/labs/badge/badge.js.map +1 -0
- package/labs/badge/lib/_badge.scss +69 -0
- package/labs/badge/lib/badge-styles.css.js +9 -0
- package/labs/badge/lib/badge-styles.css.js.map +1 -0
- package/labs/badge/lib/badge-styles.scss +10 -0
- package/labs/badge/lib/badge.d.ts +13 -0
- package/labs/badge/lib/badge.js +28 -0
- package/labs/badge/lib/badge.js.map +1 -0
- package/labs/navigationbar/harness.d.ts +19 -0
- package/labs/navigationbar/harness.js +29 -0
- package/labs/navigationbar/harness.js.map +1 -0
- package/labs/navigationbar/lib/_navigation-bar.scss +68 -0
- package/labs/navigationbar/lib/constants.d.ts +17 -0
- package/labs/navigationbar/lib/navigation-bar-styles.css.js +9 -0
- package/labs/navigationbar/lib/navigation-bar-styles.css.js.map +1 -0
- package/labs/navigationbar/lib/navigation-bar-styles.scss +10 -0
- package/labs/navigationbar/lib/navigation-bar.d.ts +27 -0
- package/labs/navigationbar/lib/navigation-bar.js +140 -0
- package/labs/navigationbar/lib/navigation-bar.js.map +1 -0
- package/labs/navigationbar/navigation-bar.d.ts +18 -0
- package/labs/navigationbar/navigation-bar.js +21 -0
- package/labs/navigationbar/navigation-bar.js.map +1 -0
- package/labs/navigationdrawer/lib/_navigation-drawer-modal.scss +107 -0
- package/labs/navigationdrawer/lib/_navigation-drawer.scss +94 -0
- package/labs/navigationdrawer/lib/_shared.scss +28 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +9 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +1 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal-styles.scss +10 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal.d.ts +19 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal.js +83 -0
- package/labs/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -0
- package/labs/navigationdrawer/lib/navigation-drawer-styles.css.js +9 -0
- package/labs/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -0
- package/labs/navigationdrawer/lib/navigation-drawer-styles.scss +10 -0
- package/labs/navigationdrawer/lib/navigation-drawer.d.ts +17 -0
- package/labs/navigationdrawer/lib/navigation-drawer.js +66 -0
- package/labs/navigationdrawer/lib/navigation-drawer.js.map +1 -0
- package/labs/navigationdrawer/lib/shared-styles.css.js +9 -0
- package/labs/navigationdrawer/lib/shared-styles.css.js.map +1 -0
- package/labs/navigationdrawer/lib/shared-styles.scss +10 -0
- package/labs/navigationdrawer/navigation-drawer-modal.d.ts +18 -0
- package/labs/navigationdrawer/navigation-drawer-modal.js +22 -0
- package/labs/navigationdrawer/navigation-drawer-modal.js.map +1 -0
- package/labs/navigationdrawer/navigation-drawer.d.ts +18 -0
- package/labs/navigationdrawer/navigation-drawer.js +22 -0
- package/labs/navigationdrawer/navigation-drawer.js.map +1 -0
- package/labs/navigationtab/harness.d.ts +13 -0
- package/labs/navigationtab/harness.js +16 -0
- package/labs/navigationtab/harness.js.map +1 -0
- package/labs/navigationtab/lib/_navigation-tab.scss +257 -0
- package/labs/navigationtab/lib/navigation-tab-styles.css.js +9 -0
- package/labs/navigationtab/lib/navigation-tab-styles.css.js.map +1 -0
- package/labs/navigationtab/lib/navigation-tab-styles.scss +10 -0
- package/labs/navigationtab/lib/navigation-tab.d.ts +30 -0
- package/labs/navigationtab/lib/navigation-tab.js +119 -0
- package/labs/navigationtab/lib/navigation-tab.js.map +1 -0
- package/labs/navigationtab/lib/state.d.ts +24 -0
- package/labs/navigationtab/lib/state.js.map +1 -0
- package/labs/navigationtab/navigation-tab.d.ts +18 -0
- package/labs/navigationtab/navigation-tab.js +21 -0
- package/labs/navigationtab/navigation-tab.js.map +1 -0
- package/labs/segmentedbutton/lib/_outlined-segmented-button.scss +44 -0
- package/labs/segmentedbutton/lib/_shared.scss +355 -0
- package/labs/segmentedbutton/lib/outlined-segmented-button.d.ts +24 -0
- package/labs/segmentedbutton/lib/outlined-segmented-button.js +22 -0
- package/labs/segmentedbutton/lib/outlined-segmented-button.js.map +1 -0
- package/labs/segmentedbutton/lib/outlined-styles.css.js +9 -0
- package/labs/segmentedbutton/lib/outlined-styles.css.js.map +1 -0
- package/labs/segmentedbutton/lib/outlined-styles.scss +10 -0
- package/labs/segmentedbutton/lib/segmented-button.d.ts +44 -0
- package/labs/segmentedbutton/lib/segmented-button.js +159 -0
- package/labs/segmentedbutton/lib/segmented-button.js.map +1 -0
- package/labs/segmentedbutton/lib/shared-styles.css.js +9 -0
- package/labs/segmentedbutton/lib/shared-styles.css.js.map +1 -0
- package/labs/segmentedbutton/lib/shared-styles.scss +10 -0
- package/labs/segmentedbutton/outlined-segmented-button.d.ts +20 -0
- package/labs/segmentedbutton/outlined-segmented-button.js +24 -0
- package/labs/segmentedbutton/outlined-segmented-button.js.map +1 -0
- package/labs/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +53 -0
- package/labs/segmentedbuttonset/lib/_shared.scss +33 -0
- package/labs/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +14 -0
- package/labs/segmentedbuttonset/lib/outlined-segmented-button-set.js +18 -0
- package/labs/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +1 -0
- package/labs/segmentedbuttonset/lib/outlined-styles.css.js +9 -0
- package/labs/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -0
- package/labs/segmentedbuttonset/lib/outlined-styles.scss +10 -0
- package/labs/segmentedbuttonset/lib/segmented-button-set.d.ts +26 -0
- package/labs/segmentedbuttonset/lib/segmented-button-set.js +110 -0
- package/labs/segmentedbuttonset/lib/segmented-button-set.js.map +1 -0
- package/labs/segmentedbuttonset/lib/shared-styles.scss +10 -0
- package/labs/segmentedbuttonset/outlined-segmented-button-set.d.ts +20 -0
- package/labs/segmentedbuttonset/outlined-segmented-button-set.js +24 -0
- package/labs/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -0
- 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 +386 -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 +19 -49
- package/list/lib/list-styles.css.js +1 -1
- package/list/lib/list-styles.css.js.map +1 -1
- package/list/lib/list-styles.scss +2 -0
- package/list/lib/list.d.ts +105 -34
- package/list/lib/list.js +222 -137
- package/list/lib/list.js.map +1 -1
- package/list/lib/listitem/_list-item.scss +320 -126
- 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/harness.js +2 -1
- package/list/lib/listitem/harness.js.map +1 -1
- package/list/lib/listitem/list-item-only.d.ts +22 -0
- package/list/lib/listitem/list-item-only.js +35 -0
- package/list/lib/listitem/list-item-only.js.map +1 -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-styles.scss +2 -0
- package/list/lib/listitem/list-item.d.ts +121 -61
- package/list/lib/listitem/list-item.js +174 -204
- package/list/lib/listitem/list-item.js.map +1 -1
- package/list/lib/listitemlink/list-item-link-only.d.ts +22 -0
- package/list/lib/listitemlink/list-item-link-only.js +33 -0
- package/list/lib/listitemlink/list-item-link-only.js.map +1 -0
- package/list/lib/listitemlink/list-item-link.d.ts +18 -0
- package/list/lib/listitemlink/list-item-link.js +42 -0
- package/list/lib/listitemlink/list-item-link.js.map +1 -0
- package/list/list-item-link.d.ts +53 -0
- package/list/list-item-link.js +57 -0
- package/list/list-item-link.js.map +1 -0
- package/list/list-item.d.ts +38 -2
- package/list/list-item.js +39 -3
- package/list/list-item.js.map +1 -1
- package/list/list.d.ts +15 -1
- package/list/list.js +15 -1
- package/list/list.js.map +1 -1
- package/menu/_menu-item.scss +6 -0
- package/menu/_menu.scss +6 -0
- package/menu/harness.d.ts +6 -0
- package/menu/harness.js +23 -0
- package/menu/harness.js.map +1 -1
- package/menu/lib/_menu.scss +71 -76
- 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-styles.scss +2 -0
- package/menu/lib/menu.d.ts +195 -46
- package/menu/lib/menu.js +580 -264
- package/menu/lib/menu.js.map +1 -1
- package/menu/lib/menuitem/_menu-item.scss +60 -0
- 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.d.ts +1 -0
- package/menu/lib/menuitem/menu-item-styles.css.js +9 -0
- package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -0
- package/menu/lib/menuitem/menu-item-styles.scss +10 -0
- package/menu/lib/menuitem/menu-item.d.ts +22 -5
- package/menu/lib/menuitem/menu-item.js +41 -4
- package/menu/lib/menuitem/menu-item.js.map +1 -1
- package/menu/lib/menuitemlink/menu-item-link.d.ts +23 -0
- package/menu/lib/menuitemlink/menu-item-link.js +49 -0
- package/menu/lib/menuitemlink/menu-item-link.js.map +1 -0
- package/menu/lib/shared.d.ts +178 -0
- package/menu/lib/shared.js +142 -0
- package/menu/lib/shared.js.map +1 -0
- package/menu/lib/submenuitem/harness.d.ts +11 -0
- package/menu/lib/submenuitem/harness.js +12 -0
- package/menu/lib/submenuitem/harness.js.map +1 -0
- package/menu/lib/submenuitem/sub-menu-item.d.ts +99 -0
- package/menu/lib/submenuitem/sub-menu-item.js +293 -0
- package/menu/lib/submenuitem/sub-menu-item.js.map +1 -0
- package/menu/lib/surfacePositionController.d.ts +125 -0
- package/menu/lib/surfacePositionController.js +200 -0
- package/menu/lib/surfacePositionController.js.map +1 -0
- package/menu/lib/typeaheadController.d.ts +157 -0
- package/menu/lib/typeaheadController.js +252 -0
- package/menu/lib/typeaheadController.js.map +1 -0
- package/menu/menu-item-link.d.ts +33 -0
- package/menu/menu-item-link.js +38 -0
- package/menu/menu-item-link.js.map +1 -0
- package/menu/menu-item.d.ts +19 -2
- package/menu/menu-item.js +23 -4
- package/menu/menu-item.js.map +1 -1
- package/menu/menu.d.ts +45 -0
- package/menu/menu.js +45 -1
- package/menu/menu.js.map +1 -1
- package/menu/sub-menu-item.d.ts +60 -0
- package/menu/sub-menu-item.js +65 -0
- package/menu/sub-menu-item.js.map +1 -0
- package/package.json +27 -18
- package/radio/lib/_radio.scss +34 -32
- package/radio/lib/forced-colors-styles.css.js +1 -1
- package/radio/lib/forced-colors-styles.css.js.map +1 -1
- package/radio/lib/forced-colors-styles.scss +2 -0
- package/radio/lib/radio-styles.css.js +1 -1
- package/radio/lib/radio-styles.css.js.map +1 -1
- package/radio/lib/radio-styles.scss +2 -0
- package/radio/lib/radio.d.ts +22 -16
- package/radio/lib/radio.js +95 -111
- package/radio/lib/radio.js.map +1 -1
- package/radio/radio.d.ts +16 -1
- package/radio/radio.js +16 -1
- package/radio/radio.js.map +1 -1
- package/ripple/lib/_ripple.scss +39 -73
- package/ripple/lib/ripple-styles.css.js +1 -1
- package/ripple/lib/ripple-styles.css.js.map +1 -1
- package/ripple/lib/ripple-styles.scss +2 -0
- package/ripple/lib/ripple.d.ts +60 -48
- package/ripple/lib/ripple.js +277 -106
- package/ripple/lib/ripple.js.map +1 -1
- package/ripple/ripple.d.ts +9 -1
- package/ripple/ripple.js +9 -1
- package/ripple/ripple.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 +222 -0
- package/select/lib/_outlined-select.scss +180 -0
- package/select/lib/_shared.scss +55 -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 +216 -0
- package/select/lib/select.js +589 -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 +29 -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/_slider.scss +6 -0
- package/slider/harness.d.ts +21 -0
- package/slider/harness.js +70 -0
- package/slider/harness.js.map +1 -0
- package/slider/lib/_slider.scss +476 -0
- package/slider/lib/forced-colors-styles.css.d.ts +1 -0
- package/slider/lib/forced-colors-styles.css.js +9 -0
- package/slider/lib/forced-colors-styles.css.js.map +1 -0
- package/slider/lib/forced-colors-styles.scss +53 -0
- package/slider/lib/slider-styles.css.d.ts +1 -0
- package/slider/lib/slider-styles.css.js +9 -0
- package/slider/lib/slider-styles.css.js.map +1 -0
- package/slider/lib/slider-styles.scss +8 -0
- package/slider/lib/slider.d.ts +173 -0
- package/slider/lib/slider.js +623 -0
- package/slider/lib/slider.js.map +1 -0
- package/slider/slider.d.ts +28 -0
- package/slider/slider.js +32 -0
- package/slider/slider.js.map +1 -0
- package/switch/harness.js +1 -1
- package/switch/harness.js.map +1 -1
- package/switch/lib/README.md +55 -0
- package/switch/lib/_handle.scss +134 -97
- package/switch/lib/_icon.scss +82 -23
- package/switch/lib/_switch.scss +83 -233
- package/switch/lib/_track.scss +79 -45
- package/switch/lib/forced-colors-styles.css.d.ts +1 -0
- package/switch/lib/forced-colors-styles.css.js +9 -0
- package/switch/lib/forced-colors-styles.css.js.map +1 -0
- package/switch/lib/forced-colors-styles.scss +41 -0
- package/switch/lib/switch-styles.css.js +1 -1
- package/switch/lib/switch-styles.css.js.map +1 -1
- package/switch/lib/switch-styles.scss +2 -0
- package/switch/lib/switch.d.ts +20 -20
- package/switch/lib/switch.js +79 -128
- package/switch/lib/switch.js.map +1 -1
- package/switch/switch.js +2 -1
- package/switch/switch.js.map +1 -1
- package/tabs/_tab.scss +6 -0
- package/tabs/harness.d.ts +23 -0
- package/tabs/harness.js +50 -0
- package/tabs/harness.js.map +1 -0
- package/tabs/lib/_tab.scss +293 -0
- package/tabs/lib/_tabs.scss +44 -0
- package/tabs/lib/tab-styles.css.d.ts +1 -0
- package/tabs/lib/tab-styles.css.js +9 -0
- package/tabs/lib/tab-styles.css.js.map +1 -0
- package/tabs/lib/tab-styles.scss +10 -0
- package/tabs/lib/tab.d.ts +68 -0
- package/tabs/lib/tab.js +162 -0
- package/tabs/lib/tab.js.map +1 -0
- package/tabs/lib/tabs-styles.css.d.ts +1 -0
- package/tabs/lib/tabs-styles.css.js +9 -0
- package/tabs/lib/tabs-styles.css.js.map +1 -0
- package/tabs/lib/tabs-styles.scss +10 -0
- package/tabs/lib/tabs.d.ts +91 -0
- package/tabs/lib/tabs.js +310 -0
- package/tabs/lib/tabs.js.map +1 -0
- package/tabs/tab.d.ts +19 -0
- package/tabs/tab.js +22 -0
- package/tabs/tab.js.map +1 -0
- package/tabs/tabs.d.ts +20 -0
- package/tabs/tabs.js +24 -0
- package/tabs/tabs.js.map +1 -0
- package/textfield/filled-text-field.d.ts +1 -1
- package/textfield/filled-text-field.js +1 -2
- package/textfield/filled-text-field.js.map +1 -1
- package/textfield/harness.d.ts +1 -1
- package/textfield/harness.js +1 -1
- package/textfield/harness.js.map +1 -1
- package/textfield/lib/_filled-text-field.scss +161 -103
- package/textfield/lib/_icon.scss +14 -73
- package/textfield/lib/_input.scss +15 -36
- package/textfield/lib/_outlined-text-field.scss +121 -97
- package/textfield/lib/_shared.scss +10 -29
- package/textfield/lib/filled-forced-colors-styles.css.js +1 -1
- package/textfield/lib/filled-forced-colors-styles.css.js.map +1 -1
- package/textfield/lib/filled-forced-colors-styles.scss +2 -0
- package/textfield/lib/filled-styles.css.js +1 -1
- package/textfield/lib/filled-styles.css.js.map +1 -1
- package/textfield/lib/filled-styles.scss +2 -0
- package/textfield/lib/filled-text-field.d.ts +6 -5
- package/textfield/lib/filled-text-field.js +8 -7
- package/textfield/lib/filled-text-field.js.map +1 -1
- package/textfield/lib/outlined-forced-colors-styles.css.js +1 -1
- package/textfield/lib/outlined-forced-colors-styles.css.js.map +1 -1
- package/textfield/lib/outlined-forced-colors-styles.scss +2 -0
- package/textfield/lib/outlined-styles.css.js +1 -1
- package/textfield/lib/outlined-styles.css.js.map +1 -1
- package/textfield/lib/outlined-styles.scss +2 -0
- package/textfield/lib/outlined-text-field.d.ts +6 -5
- package/textfield/lib/outlined-text-field.js +8 -7
- package/textfield/lib/outlined-text-field.js.map +1 -1
- package/textfield/lib/shared-styles.css.js +1 -1
- package/textfield/lib/shared-styles.css.js.map +1 -1
- package/textfield/lib/shared-styles.scss +2 -0
- package/textfield/lib/text-field.d.ts +54 -121
- package/textfield/lib/text-field.js +250 -423
- package/textfield/lib/text-field.js.map +1 -1
- package/textfield/outlined-text-field.d.ts +1 -1
- package/textfield/outlined-text-field.js +1 -2
- package/textfield/outlined-text-field.js.map +1 -1
- package/tokens/_index.scss +58 -2
- package/tokens/_md-comp-assist-chip.scss +119 -0
- package/tokens/_md-comp-badge.scss +41 -0
- package/tokens/_md-comp-checkbox.scss +100 -0
- package/tokens/_md-comp-circular-progress-indicator.scss +63 -0
- package/tokens/_md-comp-dialog.scss +52 -0
- package/tokens/_md-comp-divider.scss +28 -0
- package/tokens/_md-comp-elevated-button.scss +108 -0
- package/tokens/_md-comp-elevation.scss +24 -0
- package/tokens/_md-comp-fab-branded.scss +112 -0
- package/tokens/_md-comp-fab.scss +246 -0
- package/tokens/_md-comp-filled-button.scss +108 -0
- package/tokens/_md-comp-filled-field.scss +227 -0
- package/tokens/_md-comp-filled-icon-button.scss +72 -0
- package/tokens/_md-comp-filled-select.scss +148 -0
- package/tokens/_md-comp-filled-text-field.scss +139 -0
- package/tokens/_md-comp-filled-tonal-button.scss +108 -0
- package/tokens/_md-comp-filled-tonal-icon-button.scss +72 -0
- package/tokens/_md-comp-filter-chip.scss +228 -0
- package/tokens/_md-comp-focus-ring.scss +47 -0
- package/tokens/_md-comp-full-screen-dialog.scss +25 -0
- package/tokens/_md-comp-icon-button.scss +63 -0
- package/tokens/_md-comp-input-chip.scss +203 -0
- package/tokens/_md-comp-linear-progress-indicator.scss +50 -0
- package/tokens/_md-comp-list-item.scss +174 -0
- package/tokens/_md-comp-list.scss +134 -0
- package/tokens/_md-comp-menu-item.scss +50 -0
- package/tokens/_md-comp-menu.scss +48 -0
- package/tokens/_md-comp-navigation-bar.scss +25 -0
- package/tokens/_md-comp-navigation-drawer.scss +25 -0
- package/tokens/_md-comp-outlined-button.scss +104 -0
- package/tokens/_md-comp-outlined-field.scss +202 -0
- package/tokens/_md-comp-outlined-icon-button.scss +67 -0
- package/tokens/_md-comp-outlined-segmented-button.scss +93 -0
- package/tokens/_md-comp-outlined-select.scss +147 -0
- package/tokens/_md-comp-outlined-text-field.scss +130 -0
- package/tokens/_md-comp-radio-button.scss +62 -0
- package/tokens/_md-comp-ripple.scss +40 -0
- package/tokens/_md-comp-slider.scss +59 -0
- package/tokens/_md-comp-suggestion-chip.scss +122 -0
- package/tokens/_md-comp-switch.scss +107 -0
- package/tokens/_md-comp-tab.scss +285 -0
- package/tokens/_md-comp-test-table.scss +31 -0
- package/tokens/_md-comp-text-button.scss +97 -0
- package/tokens/_md-ref-palette.scss +12 -0
- package/tokens/_md-ref-typeface.scss +34 -0
- package/tokens/_md-sys-color.scss +54 -0
- package/tokens/_md-sys-elevation.scss +30 -0
- package/tokens/_md-sys-motion.scss +12 -0
- package/tokens/_md-sys-shape.scss +12 -0
- package/tokens/_md-sys-state.scss +12 -0
- package/tokens/_md-sys-typescale.scss +51 -0
- package/tokens/_values.scss +109 -0
- package/tokens/v0_172/_index.scss +107 -0
- package/tokens/v0_172/_md-comp-assist-chip.scss +108 -0
- package/tokens/v0_172/_md-comp-badge.scss +58 -0
- package/tokens/v0_172/_md-comp-banner.scss +73 -0
- package/tokens/v0_172/_md-comp-bottom-app-bar.scss +33 -0
- package/tokens/v0_172/_md-comp-carousel-item.scss +63 -0
- package/tokens/v0_172/_md-comp-checkbox.scss +126 -0
- package/tokens/v0_172/_md-comp-circular-progress-indicator.scss +39 -0
- package/tokens/v0_172/_md-comp-data-table.scss +96 -0
- package/tokens/v0_172/_md-comp-date-input-modal.scss +87 -0
- package/tokens/v0_172/_md-comp-date-picker-docked.scss +244 -0
- package/tokens/v0_172/_md-comp-date-picker-modal.scss +303 -0
- package/tokens/v0_172/_md-comp-dialog.scss +121 -0
- package/tokens/v0_172/_md-comp-divider.scss +25 -0
- package/tokens/v0_172/_md-comp-elevated-button.scss +89 -0
- package/tokens/v0_172/_md-comp-elevated-card.scss +57 -0
- package/tokens/v0_172/_md-comp-extended-fab-branded.scss +86 -0
- package/tokens/v0_172/_md-comp-extended-fab-primary.scss +94 -0
- package/tokens/v0_172/_md-comp-extended-fab-secondary.scss +95 -0
- package/tokens/v0_172/_md-comp-extended-fab-surface.scss +90 -0
- package/tokens/v0_172/_md-comp-extended-fab-tertiary.scss +95 -0
- package/tokens/v0_172/_md-comp-fab-branded-large.scss +60 -0
- package/tokens/v0_172/_md-comp-fab-branded.scss +60 -0
- package/tokens/v0_172/_md-comp-fab-primary-large.scss +65 -0
- package/tokens/v0_172/_md-comp-fab-primary-small.scss +65 -0
- package/tokens/v0_172/_md-comp-fab-primary.scss +65 -0
- package/tokens/v0_172/_md-comp-fab-secondary-large.scss +66 -0
- package/tokens/v0_172/_md-comp-fab-secondary-small.scss +66 -0
- package/tokens/v0_172/_md-comp-fab-secondary.scss +66 -0
- package/tokens/v0_172/_md-comp-fab-surface-large.scss +64 -0
- package/tokens/v0_172/_md-comp-fab-surface-small.scss +64 -0
- package/tokens/v0_172/_md-comp-fab-surface.scss +64 -0
- package/tokens/v0_172/_md-comp-fab-tertiary-large.scss +66 -0
- package/tokens/v0_172/_md-comp-fab-tertiary-small.scss +66 -0
- package/tokens/v0_172/_md-comp-fab-tertiary.scss +66 -0
- package/tokens/v0_172/_md-comp-filled-autocomplete.scss +265 -0
- package/tokens/v0_172/_md-comp-filled-button.scss +89 -0
- package/tokens/v0_172/_md-comp-filled-card.scss +59 -0
- package/tokens/v0_172/_md-comp-filled-icon-button.scss +79 -0
- package/tokens/v0_172/_md-comp-filled-menu-button.scss +98 -0
- package/tokens/v0_172/_md-comp-filled-select.scss +270 -0
- package/tokens/v0_172/_md-comp-filled-text-field.scss +190 -0
- package/tokens/v0_172/_md-comp-filled-tonal-button.scss +99 -0
- package/tokens/v0_172/_md-comp-filled-tonal-icon-button.scss +86 -0
- package/tokens/v0_172/_md-comp-filter-chip.scss +207 -0
- package/tokens/v0_172/_md-comp-full-screen-dialog.scss +111 -0
- package/tokens/v0_172/_md-comp-icon-button.scss +70 -0
- package/tokens/v0_172/_md-comp-input-chip.scss +184 -0
- package/tokens/v0_172/_md-comp-linear-progress-indicator.scss +41 -0
- package/tokens/v0_172/_md-comp-list.scss +248 -0
- package/tokens/v0_172/_md-comp-menu.scss +35 -0
- package/tokens/v0_172/_md-comp-navigation-bar.scss +112 -0
- package/tokens/v0_172/_md-comp-navigation-drawer.scss +162 -0
- package/tokens/v0_172/_md-comp-navigation-rail.scss +116 -0
- package/tokens/v0_172/_md-comp-outlined-autocomplete.scss +255 -0
- package/tokens/v0_172/_md-comp-outlined-button.scss +84 -0
- package/tokens/v0_172/_md-comp-outlined-card.scss +63 -0
- package/tokens/v0_172/_md-comp-outlined-icon-button.scss +79 -0
- package/tokens/v0_172/_md-comp-outlined-menu-button.scss +94 -0
- package/tokens/v0_172/_md-comp-outlined-segmented-button.scss +112 -0
- package/tokens/v0_172/_md-comp-outlined-select.scss +260 -0
- package/tokens/v0_172/_md-comp-outlined-text-field.scss +171 -0
- package/tokens/v0_172/_md-comp-plain-tooltip.scss +55 -0
- package/tokens/v0_172/_md-comp-primary-navigation-tab.scss +121 -0
- package/tokens/v0_172/_md-comp-radio-button.scss +68 -0
- package/tokens/v0_172/_md-comp-rich-tooltip.scss +119 -0
- package/tokens/v0_172/_md-comp-scrim.scss +25 -0
- package/tokens/v0_172/_md-comp-search-bar.scss +97 -0
- package/tokens/v0_172/_md-comp-search-view.scss +91 -0
- package/tokens/v0_172/_md-comp-secondary-navigation-tab.scss +84 -0
- package/tokens/v0_172/_md-comp-sheet-bottom.scss +44 -0
- package/tokens/v0_172/_md-comp-sheet-floating.scss +32 -0
- package/tokens/v0_172/_md-comp-sheet-side.scss +91 -0
- package/tokens/v0_172/_md-comp-slider.scss +115 -0
- package/tokens/v0_172/_md-comp-snackbar.scss +127 -0
- package/tokens/v0_172/_md-comp-standard-menu-button.scss +98 -0
- package/tokens/v0_172/_md-comp-suggestion-chip.scss +124 -0
- package/tokens/v0_172/_md-comp-switch.scss +138 -0
- package/tokens/v0_172/_md-comp-text-button.scss +77 -0
- package/tokens/v0_172/_md-comp-time-input.scss +217 -0
- package/tokens/v0_172/_md-comp-time-picker.scss +264 -0
- package/tokens/v0_172/_md-comp-top-app-bar-large.scss +61 -0
- package/tokens/v0_172/_md-comp-top-app-bar-medium.scss +61 -0
- package/tokens/v0_172/_md-comp-top-app-bar-small-centered.scss +68 -0
- package/tokens/v0_172/_md-comp-top-app-bar-small.scss +64 -0
- package/tokens/v0_172/_md-ref-palette.scss +107 -0
- package/tokens/v0_172/_md-ref-typeface.scss +21 -0
- package/tokens/v0_172/_md-sys-color.scss +134 -0
- package/tokens/v0_172/_md-sys-elevation.scss +21 -0
- package/tokens/v0_172/_md-sys-motion.scss +53 -0
- package/tokens/v0_172/_md-sys-shape.scss +30 -0
- package/tokens/v0_172/_md-sys-state.scss +19 -0
- package/tokens/v0_172/_md-sys-typescale.scss +284 -0
- package/tokens/v0_172/index.test.css.d.ts +1 -0
- package/tokens/v0_172/index.test.scss +584 -0
- package/tokens/v0_172/lib.test.css.d.ts +1 -0
- package/tokens/v0_172/lib.test.scss +663 -0
- package/actionelement/action-element.d.ts +0 -79
- package/actionelement/action-element.js +0 -97
- package/actionelement/action-element.js.map +0 -1
- package/autocomplete/_filled-autocomplete.scss +0 -6
- package/autocomplete/_outlined-autocomplete.scss +0 -6
- package/autocomplete/autocomplete-item.d.ts +0 -19
- package/autocomplete/autocomplete-item.js +0 -22
- package/autocomplete/autocomplete-item.js.map +0 -1
- package/autocomplete/autocomplete-list.d.ts +0 -19
- package/autocomplete/autocomplete-list.js +0 -23
- package/autocomplete/autocomplete-list.js.map +0 -1
- package/autocomplete/autocomplete-surface.d.ts +0 -19
- package/autocomplete/autocomplete-surface.js +0 -23
- package/autocomplete/autocomplete-surface.js.map +0 -1
- package/autocomplete/filled-autocomplete.d.ts +0 -30
- package/autocomplete/filled-autocomplete.js +0 -53
- package/autocomplete/filled-autocomplete.js.map +0 -1
- package/autocomplete/lib/_filled-autocomplete.scss +0 -228
- package/autocomplete/lib/_outlined-autocomplete.scss +0 -217
- package/autocomplete/lib/_shared.scss +0 -29
- package/autocomplete/lib/autocomplete.d.ts +0 -58
- package/autocomplete/lib/autocomplete.js +0 -273
- package/autocomplete/lib/autocomplete.js.map +0 -1
- package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +0 -11
- package/autocomplete/lib/autocompleteitem/autocomplete-item.js +0 -14
- package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +0 -1
- package/autocomplete/lib/autocompleteitem/harness.d.ts +0 -11
- package/autocomplete/lib/autocompleteitem/harness.js +0 -12
- package/autocomplete/lib/autocompleteitem/harness.js.map +0 -1
- package/autocomplete/lib/autocompletelist/_autocomplete-list.scss +0 -13
- package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js +0 -9
- package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js.map +0 -1
- package/autocomplete/lib/autocompletelist/autocomplete-list-styles.scss +0 -8
- package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +0 -14
- package/autocomplete/lib/autocompletelist/autocomplete-list.js +0 -21
- package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +0 -1
- package/autocomplete/lib/autocompletelist/harness.d.ts +0 -11
- package/autocomplete/lib/autocompletelist/harness.js +0 -12
- package/autocomplete/lib/autocompletelist/harness.js.map +0 -1
- package/autocomplete/lib/autocompletesurface/_autocomplete-surface.scss +0 -13
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js +0 -9
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js.map +0 -1
- package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +0 -8
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.d.ts +0 -13
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.js +0 -21
- package/autocomplete/lib/autocompletesurface/autocomplete-surface.js.map +0 -1
- package/autocomplete/lib/filled-styles.css.js +0 -9
- package/autocomplete/lib/filled-styles.css.js.map +0 -1
- package/autocomplete/lib/filled-styles.scss +0 -8
- package/autocomplete/lib/outlined-styles.css.js +0 -9
- package/autocomplete/lib/outlined-styles.css.js.map +0 -1
- package/autocomplete/lib/outlined-styles.scss +0 -8
- package/autocomplete/lib/shared-styles.css.js +0 -9
- package/autocomplete/lib/shared-styles.css.js.map +0 -1
- package/autocomplete/lib/shared-styles.scss +0 -8
- package/autocomplete/outlined-autocomplete.d.ts +0 -30
- package/autocomplete/outlined-autocomplete.js +0 -53
- package/autocomplete/outlined-autocomplete.js.map +0 -1
- package/badge/badge.d.ts +0 -19
- package/badge/badge.js +0 -22
- package/badge/badge.js.map +0 -1
- package/badge/lib/_badge.scss +0 -80
- package/badge/lib/badge-styles.css.js +0 -9
- package/badge/lib/badge-styles.css.js.map +0 -1
- package/badge/lib/badge-styles.scss +0 -8
- package/badge/lib/badge.d.ts +0 -15
- package/badge/lib/badge.js +0 -31
- package/badge/lib/badge.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 -25
- package/button/lib/link-button.js +0 -64
- 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/chips/action/delete-action.d.ts +0 -18
- package/chips/action/delete-action.js +0 -20
- package/chips/action/delete-action.js.map +0 -1
- package/chips/action/lib/action.d.ts +0 -47
- package/chips/action/lib/action.js +0 -162
- package/chips/action/lib/action.js.map +0 -1
- package/chips/action/lib/constants.d.ts +0 -62
- package/chips/action/lib/constants.js +0 -69
- package/chips/action/lib/constants.js.map +0 -1
- package/chips/action/lib/delete-action.d.ts +0 -20
- package/chips/action/lib/delete-action.js +0 -65
- package/chips/action/lib/delete-action.js.map +0 -1
- package/chips/action/lib/events.d.ts +0 -14
- package/chips/action/lib/events.js +0 -16
- package/chips/action/lib/events.js.map +0 -1
- package/chips/action/lib/link-action.d.ts +0 -19
- package/chips/action/lib/link-action.js +0 -55
- package/chips/action/lib/link-action.js.map +0 -1
- package/chips/action/lib/presentational-action.d.ts +0 -15
- package/chips/action/lib/presentational-action.js +0 -30
- package/chips/action/lib/presentational-action.js.map +0 -1
- package/chips/action/lib/primary-action.d.ts +0 -28
- package/chips/action/lib/primary-action.js +0 -88
- package/chips/action/lib/primary-action.js.map +0 -1
- package/chips/action/lib/selectable-action.d.ts +0 -17
- package/chips/action/lib/selectable-action.js +0 -67
- package/chips/action/lib/selectable-action.js.map +0 -1
- package/chips/action/lib/types.d.ts +0 -23
- package/chips/action/lib/types.js +0 -7
- package/chips/action/lib/types.js.map +0 -1
- package/chips/action/link-action.d.ts +0 -18
- package/chips/action/link-action.js +0 -20
- package/chips/action/link-action.js.map +0 -1
- package/chips/action/presentational-action.d.ts +0 -18
- package/chips/action/presentational-action.js +0 -20
- package/chips/action/presentational-action.js.map +0 -1
- package/chips/action/primary-action.d.ts +0 -18
- package/chips/action/primary-action.js +0 -20
- package/chips/action/primary-action.js.map +0 -1
- package/chips/action/selectable-action.d.ts +0 -18
- package/chips/action/selectable-action.js +0 -20
- package/chips/action/selectable-action.js.map +0 -1
- package/chips/chip/lib/_assist-chip-theme.scss +0 -95
- package/chips/chip/lib/_chip-theme.scss +0 -1296
- package/chips/chip/lib/_chip.scss +0 -442
- package/chips/chip/lib/_filter-chip-theme.scss +0 -126
- package/chips/chip/lib/_input-chip-theme.scss +0 -87
- package/chips/chip/lib/_suggestion-chip-theme.scss +0 -88
- package/chips/chip/lib/action-chip.d.ts +0 -18
- package/chips/chip/lib/action-chip.js +0 -39
- package/chips/chip/lib/action-chip.js.map +0 -1
- package/chips/chip/lib/adapter.d.ts +0 -50
- package/chips/chip/lib/adapter.js +0 -7
- package/chips/chip/lib/adapter.js.map +0 -1
- package/chips/chip/lib/animationframe.d.ts +0 -31
- package/chips/chip/lib/animationframe.js +0 -66
- package/chips/chip/lib/animationframe.js.map +0 -1
- package/chips/chip/lib/chip.d.ts +0 -43
- package/chips/chip/lib/chip.js +0 -134
- package/chips/chip/lib/chip.js.map +0 -1
- package/chips/chip/lib/constants.d.ts +0 -43
- package/chips/chip/lib/constants.js +0 -48
- package/chips/chip/lib/constants.js.map +0 -1
- package/chips/chip/lib/foundation.d.ts +0 -41
- package/chips/chip/lib/foundation.js +0 -255
- package/chips/chip/lib/foundation.js.map +0 -1
- package/chips/chip/lib/link-chip.d.ts +0 -21
- package/chips/chip/lib/link-chip.js +0 -53
- package/chips/chip/lib/link-chip.js.map +0 -1
- package/chips/chip/lib/presentational-chip.d.ts +0 -18
- package/chips/chip/lib/presentational-chip.js +0 -39
- package/chips/chip/lib/presentational-chip.js.map +0 -1
- package/chips/chip/lib/selectable-chip.d.ts +0 -22
- package/chips/chip/lib/selectable-chip.js +0 -57
- package/chips/chip/lib/selectable-chip.js.map +0 -1
- package/chips/chip/lib/types.d.ts +0 -42
- package/chips/chip/lib/types.js +0 -7
- package/chips/chip/lib/types.js.map +0 -1
- package/chips/chipset/lib/_chip-set-theme.scss +0 -48
- package/chips/chipset/lib/_chip-set.scss +0 -46
- package/chips/chipset/lib/adapter.d.ts +0 -45
- package/chips/chipset/lib/adapter.js +0 -7
- package/chips/chipset/lib/adapter.js.map +0 -1
- package/chips/chipset/lib/constants.d.ts +0 -26
- package/chips/chipset/lib/constants.js +0 -30
- package/chips/chipset/lib/constants.js.map +0 -1
- package/chips/chipset/lib/foundation.d.ts +0 -68
- package/chips/chipset/lib/foundation.js +0 -314
- package/chips/chipset/lib/foundation.js.map +0 -1
- package/chips/chipset/lib/types.d.ts +0 -41
- package/chips/chipset/lib/types.js +0 -7
- package/chips/chipset/lib/types.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/controller/events.js +0 -126
- package/controller/events.js.map +0 -1
- package/controller/form-associated.d.ts +0 -14
- package/controller/form-associated.js +0 -12
- package/controller/form-associated.js.map +0 -1
- package/controller/form-controller.d.ts +0 -66
- package/controller/form-controller.js +0 -82
- package/controller/form-controller.js.map +0 -1
- package/controller/foundation.d.ts +0 -24
- package/controller/foundation.js +0 -18
- package/controller/foundation.js.map +0 -1
- package/controller/observer-foundation.d.ts +0 -25
- package/controller/observer-foundation.js +0 -37
- package/controller/observer-foundation.js.map +0 -1
- package/controller/observer.d.ts +0 -52
- package/controller/observer.js +0 -149
- package/controller/observer.js.map +0 -1
- package/controller/shim-label-activation.d.ts +0 -18
- package/controller/shim-label-activation.js +0 -72
- package/controller/shim-label-activation.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/decorators/bound.d.ts +0 -40
- package/decorators/bound.js +0 -49
- package/decorators/bound.js.map +0 -1
- package/elevation/lib/_md-comp-elevation.scss +0 -23
- 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-styles.scss +0 -8
- 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-styles.scss +0 -8
- package/fab/lib/fab-shared.d.ts +0 -51
- package/fab/lib/fab-shared.js +0 -139
- package/fab/lib/fab-shared.js.map +0 -1
- package/field/lib/_md-comp-filled-field.scss +0 -72
- package/field/lib/_md-comp-outlined-field.scss +0 -74
- package/focus/lib/_md-comp-focus-ring.scss +0 -27
- package/focus/strong-focus.d.ts +0 -45
- package/focus/strong-focus.js +0 -86
- package/focus/strong-focus.js.map +0 -1
- 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 -63
- package/iconbutton/lib/icon-button-toggle.js +0 -157
- 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/list/lib/_tokens.scss +0 -80
- package/list/lib/avatar/_list-item-avatar.scss +0 -38
- package/list/lib/avatar/list-item-avatar-styles.css.js +0 -9
- package/list/lib/avatar/list-item-avatar-styles.css.js.map +0 -1
- package/list/lib/avatar/list-item-avatar-styles.scss +0 -8
- package/list/lib/avatar/list-item-avatar.d.ts +0 -16
- package/list/lib/avatar/list-item-avatar.js +0 -35
- package/list/lib/avatar/list-item-avatar.js.map +0 -1
- package/list/lib/divider/_list-divider.scss +0 -46
- package/list/lib/divider/list-divider-styles.css.js +0 -9
- package/list/lib/divider/list-divider-styles.css.js.map +0 -1
- package/list/lib/divider/list-divider-styles.scss +0 -8
- package/list/lib/divider/list-divider.d.ts +0 -13
- package/list/lib/divider/list-divider.js +0 -32
- package/list/lib/divider/list-divider.js.map +0 -1
- package/list/lib/icon/_list-item-icon.scss +0 -65
- package/list/lib/icon/list-item-icon-styles.css.js +0 -9
- package/list/lib/icon/list-item-icon-styles.css.js.map +0 -1
- package/list/lib/icon/list-item-icon-styles.scss +0 -8
- package/list/lib/icon/list-item-icon.d.ts +0 -12
- package/list/lib/icon/list-item-icon.js +0 -26
- package/list/lib/icon/list-item-icon.js.map +0 -1
- package/list/lib/image/_list-item-image.scss +0 -59
- package/list/lib/image/list-item-image-styles.css.js +0 -9
- package/list/lib/image/list-item-image-styles.css.js.map +0 -1
- package/list/lib/image/list-item-image-styles.scss +0 -8
- package/list/lib/image/list-item-image.d.ts +0 -14
- package/list/lib/image/list-item-image.js +0 -37
- package/list/lib/image/list-item-image.js.map +0 -1
- package/list/lib/video/_list-item-video.scss +0 -61
- package/list/lib/video/list-item-video-styles.css.js +0 -9
- package/list/lib/video/list-item-video-styles.css.js.map +0 -1
- package/list/lib/video/list-item-video-styles.scss +0 -8
- package/list/lib/video/list-item-video.d.ts +0 -14
- package/list/lib/video/list-item-video.js +0 -37
- package/list/lib/video/list-item-video.js.map +0 -1
- package/list/list-divider.d.ts +0 -19
- package/list/list-divider.js +0 -22
- package/list/list-divider.js.map +0 -1
- package/list/list-item-avatar.d.ts +0 -19
- package/list/list-item-avatar.js +0 -22
- package/list/list-item-avatar.js.map +0 -1
- package/list/list-item-icon.d.ts +0 -19
- package/list/list-item-icon.js +0 -22
- package/list/list-item-icon.js.map +0 -1
- package/list/list-item-image.d.ts +0 -19
- package/list/list-item-image.js +0 -22
- package/list/list-item-image.js.map +0 -1
- package/list/list-item-video.d.ts +0 -19
- package/list/list-item-video.js +0 -22
- package/list/list-item-video.js.map +0 -1
- package/localization/localize.d.ts +0 -15
- package/localization/localize.js +0 -18
- package/localization/localize.js.map +0 -1
- package/menu/lib/_menu-button.scss +0 -14
- package/menu/lib/adapter.d.ts +0 -66
- package/menu/lib/adapter.js +0 -7
- package/menu/lib/adapter.js.map +0 -1
- package/menu/lib/constants.d.ts +0 -22
- package/menu/lib/constants.js +0 -23
- package/menu/lib/constants.js.map +0 -1
- package/menu/lib/foundation.d.ts +0 -49
- package/menu/lib/foundation.js +0 -123
- package/menu/lib/foundation.js.map +0 -1
- package/menu/lib/menu-button-styles.css.js +0 -9
- package/menu/lib/menu-button-styles.css.js.map +0 -1
- package/menu/lib/menu-button-styles.scss +0 -8
- package/menu/lib/menu-button.d.ts +0 -27
- package/menu/lib/menu-button.js +0 -93
- package/menu/lib/menu-button.js.map +0 -1
- package/menu/menu-button.d.ts +0 -14
- package/menu/menu-button.js +0 -17
- package/menu/menu-button.js.map +0 -1
- package/menusurface/_menu-surface.scss +0 -6
- package/menusurface/lib/_md-comp-menu-surface.scss +0 -27
- package/menusurface/lib/_menu-surface.scss +0 -118
- package/menusurface/lib/adapter.d.ts +0 -46
- package/menusurface/lib/adapter.js +0 -7
- package/menusurface/lib/adapter.js.map +0 -1
- package/menusurface/lib/constants.d.ts +0 -71
- package/menusurface/lib/constants.js +0 -83
- package/menusurface/lib/constants.js.map +0 -1
- package/menusurface/lib/foundation.d.ts +0 -176
- package/menusurface/lib/foundation.js +0 -544
- package/menusurface/lib/foundation.js.map +0 -1
- package/menusurface/lib/menu-surface-styles.css.js +0 -9
- package/menusurface/lib/menu-surface-styles.css.js.map +0 -1
- package/menusurface/lib/menu-surface-styles.scss +0 -8
- package/menusurface/lib/menu-surface.d.ts +0 -62
- package/menusurface/lib/menu-surface.js +0 -347
- package/menusurface/lib/menu-surface.js.map +0 -1
- package/menusurface/lib/types.d.ts +0 -19
- package/menusurface/lib/types.js +0 -7
- package/menusurface/lib/types.js.map +0 -1
- package/menusurface/menu-surface.d.ts +0 -14
- package/menusurface/menu-surface.js +0 -17
- package/menusurface/menu-surface.js.map +0 -1
- package/motion/animation.d.ts +0 -63
- package/motion/animation.js +0 -66
- package/motion/animation.js.map +0 -1
- package/navigationbar/harness.d.ts +0 -19
- package/navigationbar/harness.js +0 -29
- package/navigationbar/harness.js.map +0 -1
- package/navigationbar/lib/_navigation-bar.scss +0 -66
- package/navigationbar/lib/constants.d.ts +0 -17
- package/navigationbar/lib/navigation-bar-styles.css.js +0 -9
- package/navigationbar/lib/navigation-bar-styles.css.js.map +0 -1
- package/navigationbar/lib/navigation-bar-styles.scss +0 -8
- package/navigationbar/lib/navigation-bar.d.ts +0 -27
- package/navigationbar/lib/navigation-bar.js +0 -141
- package/navigationbar/lib/navigation-bar.js.map +0 -1
- package/navigationbar/navigation-bar.d.ts +0 -19
- package/navigationbar/navigation-bar.js +0 -22
- package/navigationbar/navigation-bar.js.map +0 -1
- package/navigationdrawer/lib/_navigation-drawer-modal.scss +0 -105
- package/navigationdrawer/lib/_navigation-drawer.scss +0 -100
- package/navigationdrawer/lib/_shared.scss +0 -44
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +0 -9
- package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +0 -1
- package/navigationdrawer/lib/navigation-drawer-modal-styles.scss +0 -8
- package/navigationdrawer/lib/navigation-drawer-modal.d.ts +0 -24
- package/navigationdrawer/lib/navigation-drawer-modal.js +0 -105
- package/navigationdrawer/lib/navigation-drawer-modal.js.map +0 -1
- package/navigationdrawer/lib/navigation-drawer-styles.css.js +0 -9
- package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +0 -1
- package/navigationdrawer/lib/navigation-drawer-styles.scss +0 -8
- package/navigationdrawer/lib/navigation-drawer.d.ts +0 -21
- package/navigationdrawer/lib/navigation-drawer.js +0 -87
- package/navigationdrawer/lib/navigation-drawer.js.map +0 -1
- package/navigationdrawer/lib/shared-styles.css.js +0 -9
- package/navigationdrawer/lib/shared-styles.css.js.map +0 -1
- package/navigationdrawer/lib/shared-styles.scss +0 -8
- package/navigationdrawer/navigation-drawer-modal.d.ts +0 -19
- package/navigationdrawer/navigation-drawer-modal.js +0 -23
- package/navigationdrawer/navigation-drawer-modal.js.map +0 -1
- package/navigationdrawer/navigation-drawer.d.ts +0 -19
- package/navigationdrawer/navigation-drawer.js +0 -23
- package/navigationdrawer/navigation-drawer.js.map +0 -1
- package/navigationtab/harness.d.ts +0 -13
- package/navigationtab/harness.js +0 -16
- package/navigationtab/harness.js.map +0 -1
- package/navigationtab/lib/_navigation-tab.scss +0 -274
- package/navigationtab/lib/navigation-tab-styles.css.js +0 -9
- package/navigationtab/lib/navigation-tab-styles.css.js.map +0 -1
- package/navigationtab/lib/navigation-tab-styles.scss +0 -8
- package/navigationtab/lib/navigation-tab.d.ts +0 -48
- package/navigationtab/lib/navigation-tab.js +0 -174
- package/navigationtab/lib/navigation-tab.js.map +0 -1
- package/navigationtab/lib/state.d.ts +0 -24
- package/navigationtab/lib/state.js.map +0 -1
- package/navigationtab/navigation-tab.d.ts +0 -19
- package/navigationtab/navigation-tab.js +0 -22
- package/navigationtab/navigation-tab.js.map +0 -1
- package/ripple/directive.d.ts +0 -63
- package/ripple/directive.js +0 -266
- package/ripple/directive.js.map +0 -1
- package/ripple/lib/_md-comp-ripple.scss +0 -29
- package/sass/_assert.scss +0 -21
- package/sass/_color-scheme.scss +0 -88
- package/sass/_color.scss +0 -166
- package/sass/_dom.scss +0 -52
- package/sass/_elevation.scss +0 -155
- package/sass/_feature-flags.scss +0 -117
- package/sass/_map-ext.scss +0 -25
- package/sass/_resolvers.scss +0 -16
- package/sass/_shape.scss +0 -106
- package/sass/_string-ext.scss +0 -128
- package/sass/_theme.scss +0 -245
- package/sass/_touch-target.scss +0 -22
- package/sass/_typography.scss +0 -114
- package/sass/_var.scss +0 -241
- package/segmentedbutton/lib/_outlined-segmented-button.scss +0 -42
- package/segmentedbutton/lib/_shared.scss +0 -388
- package/segmentedbutton/lib/outlined-segmented-button.d.ts +0 -15
- package/segmentedbutton/lib/outlined-segmented-button.js +0 -22
- package/segmentedbutton/lib/outlined-segmented-button.js.map +0 -1
- package/segmentedbutton/lib/outlined-styles.css.js +0 -9
- package/segmentedbutton/lib/outlined-styles.css.js.map +0 -1
- package/segmentedbutton/lib/outlined-styles.scss +0 -8
- package/segmentedbutton/lib/segmented-button.d.ts +0 -60
- package/segmentedbutton/lib/segmented-button.js +0 -229
- package/segmentedbutton/lib/segmented-button.js.map +0 -1
- package/segmentedbutton/lib/shared-styles.css.js +0 -9
- package/segmentedbutton/lib/shared-styles.css.js.map +0 -1
- package/segmentedbutton/lib/shared-styles.scss +0 -8
- package/segmentedbutton/outlined-segmented-button.d.ts +0 -21
- package/segmentedbutton/outlined-segmented-button.js +0 -25
- package/segmentedbutton/outlined-segmented-button.js.map +0 -1
- package/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +0 -30
- package/segmentedbuttonset/lib/_shared.scss +0 -46
- package/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +0 -12
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js +0 -17
- package/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +0 -1
- package/segmentedbuttonset/lib/outlined-styles.css.js +0 -9
- package/segmentedbuttonset/lib/outlined-styles.css.js.map +0 -1
- package/segmentedbuttonset/lib/outlined-styles.scss +0 -8
- package/segmentedbuttonset/lib/segmented-button-set.d.ts +0 -34
- package/segmentedbuttonset/lib/segmented-button-set.js +0 -118
- package/segmentedbuttonset/lib/segmented-button-set.js.map +0 -1
- package/segmentedbuttonset/lib/shared-styles.scss +0 -8
- package/segmentedbuttonset/outlined-segmented-button-set.d.ts +0 -21
- package/segmentedbuttonset/outlined-segmented-button-set.js +0 -25
- package/segmentedbuttonset/outlined-segmented-button-set.js.map +0 -1
- package/tokens/v0_150/_index.scss +0 -107
- package/tokens/v0_150/_md-comp-assist-chip.scss +0 -109
- package/tokens/v0_150/_md-comp-badge.scss +0 -58
- package/tokens/v0_150/_md-comp-banner.scss +0 -116
- package/tokens/v0_150/_md-comp-bottom-app-bar.scss +0 -36
- package/tokens/v0_150/_md-comp-carousel-item.scss +0 -65
- package/tokens/v0_150/_md-comp-checkbox.scss +0 -147
- package/tokens/v0_150/_md-comp-circular-progress-indicator.scss +0 -39
- package/tokens/v0_150/_md-comp-data-table.scss +0 -100
- package/tokens/v0_150/_md-comp-date-input-modal.scss +0 -89
- package/tokens/v0_150/_md-comp-date-picker-docked.scss +0 -246
- package/tokens/v0_150/_md-comp-date-picker-modal.scss +0 -305
- package/tokens/v0_150/_md-comp-dialog.scss +0 -146
- package/tokens/v0_150/_md-comp-divider.scss +0 -25
- package/tokens/v0_150/_md-comp-elevated-button.scss +0 -91
- package/tokens/v0_150/_md-comp-elevated-card.scss +0 -59
- package/tokens/v0_150/_md-comp-extended-fab-branded.scss +0 -86
- package/tokens/v0_150/_md-comp-extended-fab-primary.scss +0 -94
- package/tokens/v0_150/_md-comp-extended-fab-secondary.scss +0 -95
- package/tokens/v0_150/_md-comp-extended-fab-surface.scss +0 -90
- package/tokens/v0_150/_md-comp-extended-fab-tertiary.scss +0 -97
- package/tokens/v0_150/_md-comp-fab-branded-large.scss +0 -61
- package/tokens/v0_150/_md-comp-fab-branded.scss +0 -60
- package/tokens/v0_150/_md-comp-fab-primary-large.scss +0 -65
- package/tokens/v0_150/_md-comp-fab-primary-small.scss +0 -65
- package/tokens/v0_150/_md-comp-fab-primary.scss +0 -65
- package/tokens/v0_150/_md-comp-fab-secondary-large.scss +0 -66
- package/tokens/v0_150/_md-comp-fab-secondary-small.scss +0 -66
- package/tokens/v0_150/_md-comp-fab-secondary.scss +0 -66
- package/tokens/v0_150/_md-comp-fab-surface-large.scss +0 -64
- package/tokens/v0_150/_md-comp-fab-surface-small.scss +0 -64
- package/tokens/v0_150/_md-comp-fab-surface.scss +0 -64
- package/tokens/v0_150/_md-comp-fab-tertiary-large.scss +0 -66
- package/tokens/v0_150/_md-comp-fab-tertiary-small.scss +0 -66
- package/tokens/v0_150/_md-comp-fab-tertiary.scss +0 -66
- package/tokens/v0_150/_md-comp-filled-autocomplete.scss +0 -268
- package/tokens/v0_150/_md-comp-filled-button.scss +0 -95
- package/tokens/v0_150/_md-comp-filled-card.scss +0 -60
- package/tokens/v0_150/_md-comp-filled-icon-button.scss +0 -79
- package/tokens/v0_150/_md-comp-filled-menu-button.scss +0 -98
- package/tokens/v0_150/_md-comp-filled-select.scss +0 -276
- package/tokens/v0_150/_md-comp-filled-text-field.scss +0 -190
- package/tokens/v0_150/_md-comp-filled-tonal-button.scss +0 -99
- package/tokens/v0_150/_md-comp-filled-tonal-icon-button.scss +0 -86
- package/tokens/v0_150/_md-comp-filter-chip.scss +0 -237
- package/tokens/v0_150/_md-comp-full-screen-dialog.scss +0 -161
- package/tokens/v0_150/_md-comp-icon-button.scss +0 -70
- package/tokens/v0_150/_md-comp-input-chip.scss +0 -234
- package/tokens/v0_150/_md-comp-linear-progress-indicator.scss +0 -41
- package/tokens/v0_150/_md-comp-list.scss +0 -257
- package/tokens/v0_150/_md-comp-menu.scss +0 -123
- package/tokens/v0_150/_md-comp-navigation-bar.scss +0 -121
- package/tokens/v0_150/_md-comp-navigation-drawer.scss +0 -168
- package/tokens/v0_150/_md-comp-navigation-rail.scss +0 -168
- package/tokens/v0_150/_md-comp-outlined-autocomplete.scss +0 -258
- package/tokens/v0_150/_md-comp-outlined-button.scss +0 -88
- package/tokens/v0_150/_md-comp-outlined-card.scss +0 -65
- package/tokens/v0_150/_md-comp-outlined-icon-button.scss +0 -81
- package/tokens/v0_150/_md-comp-outlined-menu-button.scss +0 -94
- package/tokens/v0_150/_md-comp-outlined-segmented-button.scss +0 -112
- package/tokens/v0_150/_md-comp-outlined-select.scss +0 -266
- package/tokens/v0_150/_md-comp-outlined-text-field.scss +0 -172
- package/tokens/v0_150/_md-comp-plain-tooltip.scss +0 -55
- package/tokens/v0_150/_md-comp-primary-navigation-tab.scss +0 -123
- package/tokens/v0_150/_md-comp-radio-button.scss +0 -68
- package/tokens/v0_150/_md-comp-rich-tooltip.scss +0 -121
- package/tokens/v0_150/_md-comp-scrim.scss +0 -25
- package/tokens/v0_150/_md-comp-search-bar.scss +0 -99
- package/tokens/v0_150/_md-comp-search-view.scss +0 -93
- package/tokens/v0_150/_md-comp-secondary-navigation-tab.scss +0 -86
- package/tokens/v0_150/_md-comp-sheet-bottom.scss +0 -45
- package/tokens/v0_150/_md-comp-sheet-floating.scss +0 -34
- package/tokens/v0_150/_md-comp-sheet-side.scss +0 -89
- package/tokens/v0_150/_md-comp-slider.scss +0 -116
- package/tokens/v0_150/_md-comp-snackbar.scss +0 -127
- package/tokens/v0_150/_md-comp-standard-menu-button.scss +0 -98
- package/tokens/v0_150/_md-comp-suggestion-chip.scss +0 -125
- package/tokens/v0_150/_md-comp-switch.scss +0 -145
- package/tokens/v0_150/_md-comp-text-button.scss +0 -81
- package/tokens/v0_150/_md-comp-time-input.scss +0 -218
- package/tokens/v0_150/_md-comp-time-picker.scss +0 -267
- package/tokens/v0_150/_md-comp-top-app-bar-large.scss +0 -63
- package/tokens/v0_150/_md-comp-top-app-bar-medium.scss +0 -63
- package/tokens/v0_150/_md-comp-top-app-bar-small-centered.scss +0 -67
- package/tokens/v0_150/_md-comp-top-app-bar-small.scss +0 -65
- package/tokens/v0_150/_md-ref-palette.scss +0 -107
- package/tokens/v0_150/_md-ref-typeface.scss +0 -21
- package/tokens/v0_150/_md-sys-color.scss +0 -706
- package/tokens/v0_150/_md-sys-elevation.scss +0 -30
- package/tokens/v0_150/_md-sys-motion.scss +0 -53
- package/tokens/v0_150/_md-sys-shape.scss +0 -30
- package/tokens/v0_150/_md-sys-state.scss +0 -19
- package/tokens/v0_150/_md-sys-typescale.scss +0 -285
- package/tokens/v0_150/index.test.scss +0 -584
- package/tokens/v0_150/lib.test.scss +0 -663
- package/types/aria.d.ts +0 -48
- package/types/keys.d.ts +0 -57
- /package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.css.d.ts → chips/lib/assist-styles.css.d.ts} +0 -0
- /package/{autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.d.ts → chips/lib/chip-set-styles.css.d.ts} +0 -0
- /package/{autocomplete/lib/filled-styles.css.d.ts → chips/lib/elevated-styles.css.d.ts} +0 -0
- /package/{autocomplete/lib/outlined-styles.css.d.ts → chips/lib/filter-styles.css.d.ts} +0 -0
- /package/{autocomplete/lib/shared-styles.css.d.ts → chips/lib/input-styles.css.d.ts} +0 -0
- /package/{badge/lib/badge-styles.css.d.ts → chips/lib/selectable-styles.css.d.ts} +0 -0
- /package/{navigationdrawer → chips}/lib/shared-styles.css.d.ts +0 -0
- /package/{fab/lib/fab-extended-styles.css.d.ts → chips/lib/suggestion-styles.css.d.ts} +0 -0
- /package/{fab/lib/fab-shared-styles.css.d.ts → chips/lib/trailing-icon-styles.css.d.ts} +0 -0
- /package/{list/lib/avatar/list-item-avatar-styles.css.d.ts → circularprogress/lib/circular-progress-styles.css.d.ts} +0 -0
- /package/{list/lib/divider/list-divider-styles.css.d.ts → dialog/lib/dialog-styles.css.d.ts} +0 -0
- /package/{list/lib/icon/list-item-icon-styles.css.d.ts → divider/lib/divider-styles.css.d.ts} +0 -0
- /package/{list/lib/image/list-item-image-styles.css.d.ts → fab/lib/fab-branded-styles.css.d.ts} +0 -0
- /package/{list/lib/video/list-item-video-styles.css.d.ts → fab/lib/forced-colors-styles.css.d.ts} +0 -0
- /package/{segmentedbutton → fab}/lib/shared-styles.css.d.ts +0 -0
- /package/{controller → internal/controller}/events.d.ts +0 -0
- /package/{controller → internal/controller}/is-rtl.d.ts +0 -0
- /package/{controller → internal/controller}/is-rtl.js +0 -0
- /package/{controller → internal/controller}/is-rtl.js.map +0 -0
- /package/{controller → internal/controller}/string-converter.d.ts +0 -0
- /package/{controller → internal/controller}/string-converter.js +0 -0
- /package/{controller → internal/controller}/string-converter.js.map +0 -0
- /package/{motion → internal/motion}/_animation.scss +0 -0
- /package/{badge → labs/badge}/_badge.scss +0 -0
- /package/{menu/lib/menu-button-styles.css.d.ts → labs/badge/lib/badge-styles.css.d.ts} +0 -0
- /package/{navigationbar → labs/navigationbar}/_navigation-bar.scss +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/constants.js +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/constants.js.map +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/navigation-bar-styles.css.d.ts +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/state.d.ts +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/state.js +0 -0
- /package/{navigationbar → labs/navigationbar}/lib/state.js.map +0 -0
- /package/{navigationdrawer → labs/navigationdrawer}/_navigation-drawer-modal.scss +0 -0
- /package/{navigationdrawer → labs/navigationdrawer}/_navigation-drawer.scss +0 -0
- /package/{navigationdrawer → labs/navigationdrawer}/lib/navigation-drawer-modal-styles.css.d.ts +0 -0
- /package/{navigationdrawer → labs/navigationdrawer}/lib/navigation-drawer-styles.css.d.ts +0 -0
- /package/{segmentedbuttonset → labs/navigationdrawer}/lib/shared-styles.css.d.ts +0 -0
- /package/{navigationtab → labs/navigationtab}/_navigation-tab.scss +0 -0
- /package/{navigationtab → labs/navigationtab}/lib/navigation-tab-styles.css.d.ts +0 -0
- /package/{navigationtab → labs/navigationtab}/lib/state.js +0 -0
- /package/{segmentedbutton → labs/segmentedbutton}/lib/outlined-styles.css.d.ts +0 -0
- /package/{menusurface/lib/menu-surface-styles.css.d.ts → labs/segmentedbutton/lib/shared-styles.css.d.ts} +0 -0
- /package/{segmentedbuttonset → labs/segmentedbuttonset}/lib/outlined-styles.css.d.ts +0 -0
- /package/{tokens/v0_150/index.test.css.d.ts → labs/segmentedbuttonset/lib/shared-styles.css.d.ts} +0 -0
- /package/{segmentedbuttonset → labs/segmentedbuttonset}/lib/shared-styles.css.js +0 -0
- /package/{segmentedbuttonset → labs/segmentedbuttonset}/lib/shared-styles.css.js.map +0 -0
- /package/{tokens/v0_150/lib.test.css.d.ts → linearprogress/lib/linear-progress-styles.css.d.ts} +0 -0
- /package/tokens/{v0_150 → v0_172}/index.test.css.js +0 -0
- /package/tokens/{v0_150 → v0_172}/index.test.css.js.map +0 -0
- /package/tokens/{v0_150 → v0_172}/lib.test.css.js +0 -0
- /package/tokens/{v0_150 → v0_172}/lib.test.css.js.map +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
7
|
+
import { StyleInfo } from 'lit/directives/style-map.js';
|
|
8
|
+
/**
|
|
9
|
+
* A corner of a box in the standard logical property style of <block>_<inline>
|
|
10
|
+
*/
|
|
11
|
+
export type Corner = 'END_START' | 'END_END' | 'START_START' | 'START_END';
|
|
12
|
+
/**
|
|
13
|
+
* An interface that provides a method to customize the rect from which to
|
|
14
|
+
* calculate the anchor positioning. Useful for when you want a surface to
|
|
15
|
+
* anchor to an element in your shadow DOM rather than the host element.
|
|
16
|
+
*/
|
|
17
|
+
export interface SurfacePositionTarget extends HTMLElement {
|
|
18
|
+
getSurfacePositionClientRect?: () => DOMRect;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The configurable options for the surface position controller.
|
|
22
|
+
*/
|
|
23
|
+
export interface SurfacePositionControllerProperties {
|
|
24
|
+
/**
|
|
25
|
+
* The corner of the anchor to align the surface's position.
|
|
26
|
+
*/
|
|
27
|
+
anchorCorner: Corner;
|
|
28
|
+
/**
|
|
29
|
+
* The corner of the surface to align to the given anchor corner.
|
|
30
|
+
*/
|
|
31
|
+
surfaceCorner: Corner;
|
|
32
|
+
/**
|
|
33
|
+
* The HTMLElement reference of the surface to be positioned.
|
|
34
|
+
*/
|
|
35
|
+
surfaceEl: SurfacePositionTarget | null;
|
|
36
|
+
/**
|
|
37
|
+
* The HTMLElement reference of the anchor to align to.
|
|
38
|
+
*/
|
|
39
|
+
anchorEl: SurfacePositionTarget | null;
|
|
40
|
+
/**
|
|
41
|
+
* Whether or not the calculation should be relative to the top layer rather
|
|
42
|
+
* than relative to the parent of the anchor.
|
|
43
|
+
*
|
|
44
|
+
* Examples for `isTopLayer:true`:
|
|
45
|
+
*
|
|
46
|
+
* - If there is no `position:relative` in the given parent tree and the
|
|
47
|
+
* surface is `position:absolute`
|
|
48
|
+
* - If the surface is `position:fixed`
|
|
49
|
+
* - If the surface is in the "top layer"
|
|
50
|
+
* - The anchor and the surface do not share a common `position:relative`
|
|
51
|
+
* ancestor
|
|
52
|
+
*/
|
|
53
|
+
isTopLayer: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether or not the surface should be "open" and visible
|
|
56
|
+
*/
|
|
57
|
+
isOpen: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* The number of pixels in which to offset from the inline axis relative to
|
|
60
|
+
* logical property.
|
|
61
|
+
*
|
|
62
|
+
* Positive is right in LTR and left in RTL.
|
|
63
|
+
*/
|
|
64
|
+
xOffset: number;
|
|
65
|
+
/**
|
|
66
|
+
* The number of pixes in which to offset the block axis.
|
|
67
|
+
*
|
|
68
|
+
* Positive is down and negative is up.
|
|
69
|
+
*/
|
|
70
|
+
yOffset: number;
|
|
71
|
+
/**
|
|
72
|
+
* A function to call after the surface has been positioned.
|
|
73
|
+
*/
|
|
74
|
+
onOpen: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* A function to call before the surface should be closed. (A good time to
|
|
77
|
+
* perform animations while the surface is still visible)
|
|
78
|
+
*/
|
|
79
|
+
beforeClose: () => Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* A function to call after the surface has been closed.
|
|
82
|
+
*/
|
|
83
|
+
onClose: () => void;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Given a surface, an anchor, corners, and some options, this surface will
|
|
87
|
+
* calculate the position of a surface to align the two given corners and keep
|
|
88
|
+
* the surface inside the window viewport. It also provides a StyleInfo map that
|
|
89
|
+
* can be applied to the surface to handle visiblility and position.
|
|
90
|
+
*/
|
|
91
|
+
export declare class SurfacePositionController implements ReactiveController {
|
|
92
|
+
private readonly host;
|
|
93
|
+
private readonly getProperties;
|
|
94
|
+
private surfaceStylesInternal;
|
|
95
|
+
private lastValues;
|
|
96
|
+
/**
|
|
97
|
+
* @param host The host to connect the controller to.
|
|
98
|
+
* @param getProperties A function that returns the properties for the
|
|
99
|
+
* controller.
|
|
100
|
+
*/
|
|
101
|
+
constructor(host: ReactiveControllerHost, getProperties: () => SurfacePositionControllerProperties);
|
|
102
|
+
/**
|
|
103
|
+
* The StyleInfo map to apply to the surface via Lit's stylemap
|
|
104
|
+
*/
|
|
105
|
+
get surfaceStyles(): StyleInfo;
|
|
106
|
+
/**
|
|
107
|
+
* Calculates the surface's new position required so that the surface's
|
|
108
|
+
* `surfaceCorner` aligns to the anchor's `anchorCorner` while keeping the
|
|
109
|
+
* surface inside the window viewport. This positioning also respects RTL by
|
|
110
|
+
* checking `getComputedStyle()` on the surface element.
|
|
111
|
+
*/
|
|
112
|
+
position(): Promise<void>;
|
|
113
|
+
hostUpdate(): void;
|
|
114
|
+
hostUpdated(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Checks whether the properties passed into the controller have changed since
|
|
117
|
+
* the last positioning. If so, it will reposition if the surface is open or
|
|
118
|
+
* close it if the surface should close.
|
|
119
|
+
*/
|
|
120
|
+
private onUpdate;
|
|
121
|
+
/**
|
|
122
|
+
* Hides the surface.
|
|
123
|
+
*/
|
|
124
|
+
private close;
|
|
125
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Given a surface, an anchor, corners, and some options, this surface will
|
|
8
|
+
* calculate the position of a surface to align the two given corners and keep
|
|
9
|
+
* the surface inside the window viewport. It also provides a StyleInfo map that
|
|
10
|
+
* can be applied to the surface to handle visiblility and position.
|
|
11
|
+
*/
|
|
12
|
+
export class SurfacePositionController {
|
|
13
|
+
/**
|
|
14
|
+
* @param host The host to connect the controller to.
|
|
15
|
+
* @param getProperties A function that returns the properties for the
|
|
16
|
+
* controller.
|
|
17
|
+
*/
|
|
18
|
+
constructor(host, getProperties) {
|
|
19
|
+
this.host = host;
|
|
20
|
+
this.getProperties = getProperties;
|
|
21
|
+
// The current styles to apply to the surface.
|
|
22
|
+
this.surfaceStylesInternal = {
|
|
23
|
+
'display': 'none',
|
|
24
|
+
};
|
|
25
|
+
// Previous values stored for change detection. Open change detection is
|
|
26
|
+
// calculated separately so initialize it here.
|
|
27
|
+
this.lastValues = { isOpen: false };
|
|
28
|
+
this.host.addController(this);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The StyleInfo map to apply to the surface via Lit's stylemap
|
|
32
|
+
*/
|
|
33
|
+
get surfaceStyles() {
|
|
34
|
+
return this.surfaceStylesInternal;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Calculates the surface's new position required so that the surface's
|
|
38
|
+
* `surfaceCorner` aligns to the anchor's `anchorCorner` while keeping the
|
|
39
|
+
* surface inside the window viewport. This positioning also respects RTL by
|
|
40
|
+
* checking `getComputedStyle()` on the surface element.
|
|
41
|
+
*/
|
|
42
|
+
async position() {
|
|
43
|
+
const { surfaceEl, anchorEl, anchorCorner: anchorCornerRaw, surfaceCorner: surfaceCornerRaw, isTopLayer: topLayerRaw, xOffset, yOffset, } = this.getProperties();
|
|
44
|
+
const anchorCorner = anchorCornerRaw.toUpperCase().trim();
|
|
45
|
+
const surfaceCorner = surfaceCornerRaw.toUpperCase().trim();
|
|
46
|
+
if (!surfaceEl || !anchorEl) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// Paint the surface transparently so that we can get the position and the
|
|
50
|
+
// rect info of the surface.
|
|
51
|
+
this.surfaceStylesInternal = {
|
|
52
|
+
'display': 'block',
|
|
53
|
+
'opacity': '0',
|
|
54
|
+
};
|
|
55
|
+
// Wait for it to be visible.
|
|
56
|
+
this.host.requestUpdate();
|
|
57
|
+
await this.host.updateComplete;
|
|
58
|
+
const surfaceRect = surfaceEl.getSurfacePositionClientRect ?
|
|
59
|
+
surfaceEl.getSurfacePositionClientRect() :
|
|
60
|
+
surfaceEl.getBoundingClientRect();
|
|
61
|
+
const anchorRect = anchorEl.getSurfacePositionClientRect ?
|
|
62
|
+
anchorEl.getSurfacePositionClientRect() :
|
|
63
|
+
anchorEl.getBoundingClientRect();
|
|
64
|
+
const [surfaceBlock, surfaceInline] = surfaceCorner.split('_');
|
|
65
|
+
const [anchorBlock, anchorInline] = anchorCorner.split('_');
|
|
66
|
+
// We use number booleans to multiply values rather than `if` / ternary
|
|
67
|
+
// statements because it _heavily_ cuts down on nesting and readability
|
|
68
|
+
const isTopLayer = topLayerRaw ? 1 : 0;
|
|
69
|
+
// LTR depends on the direction of the SURFACE not the anchor.
|
|
70
|
+
const isLTR = getComputedStyle(surfaceEl).direction === 'ltr' ? 1 : 0;
|
|
71
|
+
const isRTL = isLTR ? 0 : 1;
|
|
72
|
+
const isSurfaceInlineStart = surfaceInline === 'START' ? 1 : 0;
|
|
73
|
+
const isSurfaceInlineEnd = surfaceInline === 'END' ? 1 : 0;
|
|
74
|
+
const isSurfaceBlockStart = surfaceBlock === 'START' ? 1 : 0;
|
|
75
|
+
const isSurfaceBlockEnd = surfaceBlock === 'END' ? 1 : 0;
|
|
76
|
+
const isOneInlineEnd = anchorInline !== surfaceInline ? 1 : 0;
|
|
77
|
+
const isOneBlockEnd = anchorBlock !== surfaceBlock ? 1 : 0;
|
|
78
|
+
/*
|
|
79
|
+
* A diagram that helps describe some of the variables used in the following
|
|
80
|
+
* calculations.
|
|
81
|
+
*
|
|
82
|
+
* ┌───── inline/blockTopLayerOffset
|
|
83
|
+
* │ │
|
|
84
|
+
* │ ┌─▼───┐ Window
|
|
85
|
+
* │ ┌┼─────┴────────────────────────┐
|
|
86
|
+
* │ ││ │
|
|
87
|
+
* └──► ││ ┌──inline/blockAnchorOffset │
|
|
88
|
+
* ││ │ │ │
|
|
89
|
+
* └┤ │ ┌──▼───┐ │
|
|
90
|
+
* │ │ ┌┼──────┤ │
|
|
91
|
+
* │ └─►│Anchor│ │
|
|
92
|
+
* │ └┴──────┘ │
|
|
93
|
+
* │ │
|
|
94
|
+
* │ ┌────────────────────────┼────┐
|
|
95
|
+
* │ │ Surface │ │
|
|
96
|
+
* │ │ │ │
|
|
97
|
+
* │ │ │ │
|
|
98
|
+
* │ │ │ │
|
|
99
|
+
* │ │ │ │
|
|
100
|
+
* │ │ │ │
|
|
101
|
+
* └─────┼────────────────────────┘ ├┐
|
|
102
|
+
* │ inline/blockOOBCorrection ││
|
|
103
|
+
* │ │ ││
|
|
104
|
+
* │ ├──►││
|
|
105
|
+
* │ │ ││
|
|
106
|
+
* └────────────────────────┐▼───┼┘
|
|
107
|
+
* └────┘
|
|
108
|
+
*/
|
|
109
|
+
// Whether or not to apply the width of the anchor
|
|
110
|
+
const inlineAnchorOffset = isOneInlineEnd * anchorRect.width + xOffset;
|
|
111
|
+
// The inline position of the anchor relative to window in LTR
|
|
112
|
+
const inlineTopLayerOffsetLTR = isSurfaceInlineStart * anchorRect.left +
|
|
113
|
+
isSurfaceInlineEnd * (window.innerWidth - anchorRect.right);
|
|
114
|
+
// The inline position of the anchor relative to window in RTL
|
|
115
|
+
const inlineTopLayerOffsetRTL = isSurfaceInlineStart * (window.innerWidth - anchorRect.right) +
|
|
116
|
+
isSurfaceInlineEnd * anchorRect.left;
|
|
117
|
+
// The inline position of the anchor relative to window
|
|
118
|
+
const inlineTopLayerOffset = isLTR * inlineTopLayerOffsetLTR + isRTL * inlineTopLayerOffsetRTL;
|
|
119
|
+
// If the surface's inline would be out of bounds of the window, move it
|
|
120
|
+
// back in
|
|
121
|
+
const inlineOutOfBoundsCorrection = Math.min(0, window.innerWidth - inlineTopLayerOffset - inlineAnchorOffset -
|
|
122
|
+
surfaceRect.width);
|
|
123
|
+
// The inline logical value of the surface
|
|
124
|
+
const inline = isTopLayer * inlineTopLayerOffset + inlineAnchorOffset +
|
|
125
|
+
inlineOutOfBoundsCorrection;
|
|
126
|
+
// Whether or not to apply the height of the anchor
|
|
127
|
+
const blockAnchorOffset = isOneBlockEnd * anchorRect.height + yOffset;
|
|
128
|
+
// The absolute block position of the anchor relative to window
|
|
129
|
+
const blockTopLayerOffset = isSurfaceBlockStart * anchorRect.top +
|
|
130
|
+
isSurfaceBlockEnd * (window.innerHeight - anchorRect.bottom);
|
|
131
|
+
// If the surface's block would be out of bounds of the window, move it back
|
|
132
|
+
// in
|
|
133
|
+
const blockOutOfBoundsCorrection = Math.min(0, window.innerHeight - blockTopLayerOffset - blockAnchorOffset -
|
|
134
|
+
surfaceRect.height);
|
|
135
|
+
// The block logical value of the surface
|
|
136
|
+
const block = isTopLayer * blockTopLayerOffset + blockAnchorOffset +
|
|
137
|
+
blockOutOfBoundsCorrection;
|
|
138
|
+
const surfaceBlockProperty = surfaceBlock === 'START' ? 'inset-block-start' : 'inset-block-end';
|
|
139
|
+
const surfaceInlineProperty = surfaceInline === 'START' ? 'inset-inline-start' : 'inset-inline-end';
|
|
140
|
+
this.surfaceStylesInternal = {
|
|
141
|
+
'display': 'block',
|
|
142
|
+
'opacity': '1',
|
|
143
|
+
[surfaceBlockProperty]: `${block}px`,
|
|
144
|
+
[surfaceInlineProperty]: `${inline}px`,
|
|
145
|
+
};
|
|
146
|
+
this.host.requestUpdate();
|
|
147
|
+
}
|
|
148
|
+
hostUpdate() {
|
|
149
|
+
this.onUpdate();
|
|
150
|
+
}
|
|
151
|
+
hostUpdated() {
|
|
152
|
+
this.onUpdate();
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Checks whether the properties passed into the controller have changed since
|
|
156
|
+
* the last positioning. If so, it will reposition if the surface is open or
|
|
157
|
+
* close it if the surface should close.
|
|
158
|
+
*/
|
|
159
|
+
async onUpdate() {
|
|
160
|
+
const props = this.getProperties();
|
|
161
|
+
let hasChanged = false;
|
|
162
|
+
for (const [key, value] of Object.entries(props)) {
|
|
163
|
+
// tslint:disable-next-line
|
|
164
|
+
hasChanged = hasChanged || (value !== this.lastValues[key]);
|
|
165
|
+
if (hasChanged)
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
const openChanged = this.lastValues.isOpen !== props.isOpen;
|
|
169
|
+
const hasAnchor = !!props.anchorEl;
|
|
170
|
+
const hasSurface = !!props.surfaceEl;
|
|
171
|
+
if (hasChanged && hasAnchor && hasSurface) {
|
|
172
|
+
// Only update isOpen, because if it's closed, we do not want to waste
|
|
173
|
+
// time on a useless reposition calculation. So save the other "dirty"
|
|
174
|
+
// values until next time it opens.
|
|
175
|
+
this.lastValues.isOpen = props.isOpen;
|
|
176
|
+
if (props.isOpen) {
|
|
177
|
+
// We are going to do a reposition, so save the prop values for future
|
|
178
|
+
// dirty checking.
|
|
179
|
+
this.lastValues = props;
|
|
180
|
+
await this.position();
|
|
181
|
+
props.onOpen();
|
|
182
|
+
}
|
|
183
|
+
else if (openChanged) {
|
|
184
|
+
await props.beforeClose();
|
|
185
|
+
this.close();
|
|
186
|
+
props.onClose();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Hides the surface.
|
|
192
|
+
*/
|
|
193
|
+
close() {
|
|
194
|
+
this.surfaceStylesInternal = {
|
|
195
|
+
'display': 'none',
|
|
196
|
+
};
|
|
197
|
+
this.host.requestUpdate();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=surfacePositionController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfacePositionController.js","sourceRoot":"","sources":["surfacePositionController.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ReactiveController, ReactiveControllerHost} from 'lit';\nimport {StyleInfo} from 'lit/directives/style-map.js';\n\n/**\n * A corner of a box in the standard logical property style of <block>_<inline>\n */\nexport type Corner = 'END_START'|'END_END'|'START_START'|'START_END';\n\n/**\n * An interface that provides a method to customize the rect from which to\n * calculate the anchor positioning. Useful for when you want a surface to\n * anchor to an element in your shadow DOM rather than the host element.\n */\nexport interface SurfacePositionTarget extends HTMLElement {\n getSurfacePositionClientRect?: () => DOMRect;\n}\n\n/**\n * The configurable options for the surface position controller.\n */\nexport interface SurfacePositionControllerProperties {\n /**\n * The corner of the anchor to align the surface's position.\n */\n anchorCorner: Corner;\n /**\n * The corner of the surface to align to the given anchor corner.\n */\n surfaceCorner: Corner;\n /**\n * The HTMLElement reference of the surface to be positioned.\n */\n surfaceEl: SurfacePositionTarget|null;\n /**\n * The HTMLElement reference of the anchor to align to.\n */\n anchorEl: SurfacePositionTarget|null;\n /**\n * Whether or not the calculation should be relative to the top layer rather\n * than relative to the parent of the anchor.\n *\n * Examples for `isTopLayer:true`:\n *\n * - If there is no `position:relative` in the given parent tree and the\n * surface is `position:absolute`\n * - If the surface is `position:fixed`\n * - If the surface is in the \"top layer\"\n * - The anchor and the surface do not share a common `position:relative`\n * ancestor\n */\n isTopLayer: boolean;\n /**\n * Whether or not the surface should be \"open\" and visible\n */\n isOpen: boolean;\n /**\n * The number of pixels in which to offset from the inline axis relative to\n * logical property.\n *\n * Positive is right in LTR and left in RTL.\n */\n xOffset: number;\n /**\n * The number of pixes in which to offset the block axis.\n *\n * Positive is down and negative is up.\n */\n yOffset: number;\n /**\n * A function to call after the surface has been positioned.\n */\n onOpen: () => void;\n /**\n * A function to call before the surface should be closed. (A good time to\n * perform animations while the surface is still visible)\n */\n beforeClose: () => Promise<void>;\n /**\n * A function to call after the surface has been closed.\n */\n onClose: () => void;\n}\n\n/**\n * Given a surface, an anchor, corners, and some options, this surface will\n * calculate the position of a surface to align the two given corners and keep\n * the surface inside the window viewport. It also provides a StyleInfo map that\n * can be applied to the surface to handle visiblility and position.\n */\nexport class SurfacePositionController implements ReactiveController {\n // The current styles to apply to the surface.\n private surfaceStylesInternal: StyleInfo = {\n 'display': 'none',\n };\n // Previous values stored for change detection. Open change detection is\n // calculated separately so initialize it here.\n private lastValues: SurfacePositionControllerProperties = {isOpen: false} as\n SurfacePositionControllerProperties;\n\n /**\n * @param host The host to connect the controller to.\n * @param getProperties A function that returns the properties for the\n * controller.\n */\n constructor(\n private readonly host: ReactiveControllerHost,\n private readonly getProperties: () => SurfacePositionControllerProperties,\n ) {\n this.host.addController(this);\n }\n\n /**\n * The StyleInfo map to apply to the surface via Lit's stylemap\n */\n get surfaceStyles() {\n return this.surfaceStylesInternal;\n }\n\n /**\n * Calculates the surface's new position required so that the surface's\n * `surfaceCorner` aligns to the anchor's `anchorCorner` while keeping the\n * surface inside the window viewport. This positioning also respects RTL by\n * checking `getComputedStyle()` on the surface element.\n */\n async position() {\n const {\n surfaceEl,\n anchorEl,\n anchorCorner: anchorCornerRaw,\n surfaceCorner: surfaceCornerRaw,\n isTopLayer: topLayerRaw,\n xOffset,\n yOffset,\n } = this.getProperties();\n const anchorCorner = anchorCornerRaw.toUpperCase().trim();\n const surfaceCorner = surfaceCornerRaw.toUpperCase().trim();\n\n if (!surfaceEl || !anchorEl) {\n return;\n }\n\n // Paint the surface transparently so that we can get the position and the\n // rect info of the surface.\n this.surfaceStylesInternal = {\n 'display': 'block',\n 'opacity': '0',\n };\n\n // Wait for it to be visible.\n this.host.requestUpdate();\n await this.host.updateComplete;\n\n const surfaceRect = surfaceEl.getSurfacePositionClientRect ?\n surfaceEl.getSurfacePositionClientRect() :\n surfaceEl.getBoundingClientRect();\n const anchorRect = anchorEl.getSurfacePositionClientRect ?\n anchorEl.getSurfacePositionClientRect() :\n anchorEl.getBoundingClientRect();\n const [surfaceBlock, surfaceInline] =\n surfaceCorner.split('_') as Array<'START'|'END'>;\n const [anchorBlock, anchorInline] =\n anchorCorner.split('_') as Array<'START'|'END'>;\n\n\n // We use number booleans to multiply values rather than `if` / ternary\n // statements because it _heavily_ cuts down on nesting and readability\n const isTopLayer = topLayerRaw ? 1 : 0;\n // LTR depends on the direction of the SURFACE not the anchor.\n const isLTR =\n getComputedStyle(surfaceEl as HTMLElement).direction === 'ltr' ? 1 : 0;\n const isRTL = isLTR ? 0 : 1;\n const isSurfaceInlineStart = surfaceInline === 'START' ? 1 : 0;\n const isSurfaceInlineEnd = surfaceInline === 'END' ? 1 : 0;\n const isSurfaceBlockStart = surfaceBlock === 'START' ? 1 : 0;\n const isSurfaceBlockEnd = surfaceBlock === 'END' ? 1 : 0;\n const isOneInlineEnd = anchorInline !== surfaceInline ? 1 : 0;\n const isOneBlockEnd = anchorBlock !== surfaceBlock ? 1 : 0;\n\n /*\n * A diagram that helps describe some of the variables used in the following\n * calculations.\n *\n * ┌───── inline/blockTopLayerOffset\n * │ │\n * │ ┌─▼───┐ Window\n * │ ┌┼─────┴────────────────────────┐\n * │ ││ │\n * └──► ││ ┌──inline/blockAnchorOffset │\n * ││ │ │ │\n * └┤ │ ┌──▼───┐ │\n * │ │ ┌┼──────┤ │\n * │ └─►│Anchor│ │\n * │ └┴──────┘ │\n * │ │\n * │ ┌────────────────────────┼────┐\n * │ │ Surface │ │\n * │ │ │ │\n * │ │ │ │\n * │ │ │ │\n * │ │ │ │\n * │ │ │ │\n * └─────┼────────────────────────┘ ├┐\n * │ inline/blockOOBCorrection ││\n * │ │ ││\n * │ ├──►││\n * │ │ ││\n * └────────────────────────┐▼───┼┘\n * └────┘\n */\n\n // Whether or not to apply the width of the anchor\n const inlineAnchorOffset = isOneInlineEnd * anchorRect.width + xOffset;\n // The inline position of the anchor relative to window in LTR\n const inlineTopLayerOffsetLTR = isSurfaceInlineStart * anchorRect.left +\n isSurfaceInlineEnd * (window.innerWidth - anchorRect.right);\n // The inline position of the anchor relative to window in RTL\n const inlineTopLayerOffsetRTL =\n isSurfaceInlineStart * (window.innerWidth - anchorRect.right) +\n isSurfaceInlineEnd * anchorRect.left;\n // The inline position of the anchor relative to window\n const inlineTopLayerOffset =\n isLTR * inlineTopLayerOffsetLTR + isRTL * inlineTopLayerOffsetRTL;\n // If the surface's inline would be out of bounds of the window, move it\n // back in\n const inlineOutOfBoundsCorrection = Math.min(\n 0,\n window.innerWidth - inlineTopLayerOffset - inlineAnchorOffset -\n surfaceRect.width);\n\n // The inline logical value of the surface\n const inline = isTopLayer * inlineTopLayerOffset + inlineAnchorOffset +\n inlineOutOfBoundsCorrection;\n\n // Whether or not to apply the height of the anchor\n const blockAnchorOffset = isOneBlockEnd * anchorRect.height + yOffset;\n // The absolute block position of the anchor relative to window\n const blockTopLayerOffset = isSurfaceBlockStart * anchorRect.top +\n isSurfaceBlockEnd * (window.innerHeight - anchorRect.bottom);\n // If the surface's block would be out of bounds of the window, move it back\n // in\n const blockOutOfBoundsCorrection = Math.min(\n 0,\n window.innerHeight - blockTopLayerOffset - blockAnchorOffset -\n surfaceRect.height);\n\n // The block logical value of the surface\n const block = isTopLayer * blockTopLayerOffset + blockAnchorOffset +\n blockOutOfBoundsCorrection;\n\n const surfaceBlockProperty =\n surfaceBlock === 'START' ? 'inset-block-start' : 'inset-block-end';\n const surfaceInlineProperty =\n surfaceInline === 'START' ? 'inset-inline-start' : 'inset-inline-end';\n\n this.surfaceStylesInternal = {\n 'display': 'block',\n 'opacity': '1',\n [surfaceBlockProperty]: `${block}px`,\n [surfaceInlineProperty]: `${inline}px`,\n };\n\n this.host.requestUpdate();\n }\n\n hostUpdate() {\n this.onUpdate();\n }\n\n hostUpdated() {\n this.onUpdate();\n }\n\n /**\n * Checks whether the properties passed into the controller have changed since\n * the last positioning. If so, it will reposition if the surface is open or\n * close it if the surface should close.\n */\n private async onUpdate() {\n const props = this.getProperties();\n let hasChanged = false;\n for (const [key, value] of Object.entries(props)) {\n // tslint:disable-next-line\n hasChanged = hasChanged || (value !== (this.lastValues as any)[key]);\n if (hasChanged) break;\n }\n\n const openChanged = this.lastValues.isOpen !== props.isOpen;\n const hasAnchor = !!props.anchorEl;\n const hasSurface = !!props.surfaceEl;\n\n if (hasChanged && hasAnchor && hasSurface) {\n // Only update isOpen, because if it's closed, we do not want to waste\n // time on a useless reposition calculation. So save the other \"dirty\"\n // values until next time it opens.\n this.lastValues.isOpen = props.isOpen;\n\n if (props.isOpen) {\n // We are going to do a reposition, so save the prop values for future\n // dirty checking.\n this.lastValues = props;\n\n await this.position();\n props.onOpen();\n } else if (openChanged) {\n await props.beforeClose();\n this.close();\n props.onClose();\n }\n }\n }\n\n /**\n * Hides the surface.\n */\n private close() {\n this.surfaceStylesInternal = {\n 'display': 'none',\n };\n this.host.requestUpdate();\n }\n}\n"]}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { MenuItem } from './shared.js';
|
|
7
|
+
/**
|
|
8
|
+
* The options that are passed to the typeahead controller.
|
|
9
|
+
*/
|
|
10
|
+
export interface TypeaheadControllerProperties {
|
|
11
|
+
/**
|
|
12
|
+
* A function that returns an array of menu items to be searched.
|
|
13
|
+
* @return An array of menu items to be searched by typing.
|
|
14
|
+
*/
|
|
15
|
+
getItems: () => MenuItem[];
|
|
16
|
+
/**
|
|
17
|
+
* The maximum time between each keystroke to keep the current type buffer
|
|
18
|
+
* alive.
|
|
19
|
+
*/
|
|
20
|
+
typeaheadBufferTime: number;
|
|
21
|
+
/**
|
|
22
|
+
* Whether or not the typeahead should listen for keystrokes or not.
|
|
23
|
+
*/
|
|
24
|
+
active: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Data structure tuple that helps with indexing.
|
|
28
|
+
*
|
|
29
|
+
* [index, item, normalized header text]
|
|
30
|
+
*/
|
|
31
|
+
type TypeaheadRecord = [number, MenuItem, string];
|
|
32
|
+
/**
|
|
33
|
+
* Indicies to access the TypeaheadRecord tuple type.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TYPEAHEAD_RECORD: {
|
|
36
|
+
readonly INDEX: 0;
|
|
37
|
+
readonly ITEM: 1;
|
|
38
|
+
readonly TEXT: 2;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* This controller listens to `keydown` events and searches the header text of
|
|
42
|
+
* an array of `MenuItem`s with the corresponding entered keys within the buffer
|
|
43
|
+
* time and activates the item.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const typeaheadController = new TypeaheadController(() => ({
|
|
48
|
+
* typeaheadBufferTime: 50,
|
|
49
|
+
* getItems: () => Array.from(document.querySelectorAll('md-menu-item'))
|
|
50
|
+
* }));
|
|
51
|
+
* html`
|
|
52
|
+
* <div
|
|
53
|
+
* @keydown=${typeaheadController.onKeydown}
|
|
54
|
+
* tabindex="0"
|
|
55
|
+
* class="activeItemText">
|
|
56
|
+
* <!-- focusable element that will receive keydown events -->
|
|
57
|
+
* Apple
|
|
58
|
+
* </div>
|
|
59
|
+
* <div>
|
|
60
|
+
* <md-menu-item active header="Apple"></md-menu-item>
|
|
61
|
+
* <md-menu-item header="Apricot"></md-menu-item>
|
|
62
|
+
* <md-menu-item header="Banana"></md-menu-item>
|
|
63
|
+
* <md-menu-item header="Olive"></md-menu-item>
|
|
64
|
+
* <md-menu-item header="Orange"></md-menu-item>
|
|
65
|
+
* </div>
|
|
66
|
+
* `;
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare class TypeaheadController {
|
|
70
|
+
private readonly getProperties;
|
|
71
|
+
/**
|
|
72
|
+
* Array of tuples that helps with indexing.
|
|
73
|
+
*/
|
|
74
|
+
private typeaheadRecords;
|
|
75
|
+
/**
|
|
76
|
+
* Currently-typed text since last buffer timeout
|
|
77
|
+
*/
|
|
78
|
+
private typaheadBuffer;
|
|
79
|
+
/**
|
|
80
|
+
* The timeout id from the current buffer's setTimeout
|
|
81
|
+
*/
|
|
82
|
+
private cancelTypeaheadTimeout;
|
|
83
|
+
/**
|
|
84
|
+
* If we are currently "typing"
|
|
85
|
+
*/
|
|
86
|
+
isTypingAhead: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The record of the last active item.
|
|
89
|
+
*/
|
|
90
|
+
lastActiveRecord: TypeaheadRecord | null;
|
|
91
|
+
/**
|
|
92
|
+
* @param getProperties A function that returns the options of the typeahead
|
|
93
|
+
* controller:
|
|
94
|
+
*
|
|
95
|
+
* {
|
|
96
|
+
* getItems: A function that returns an array of menu items to be searched.
|
|
97
|
+
* typeaheadBufferTime: The maximum time between each keystroke to keep the
|
|
98
|
+
* current type buffer alive.
|
|
99
|
+
* }
|
|
100
|
+
*/
|
|
101
|
+
constructor(getProperties: () => TypeaheadControllerProperties);
|
|
102
|
+
private get items();
|
|
103
|
+
private get active();
|
|
104
|
+
/**
|
|
105
|
+
* Apply this listener to the element that will receive `keydown` events that
|
|
106
|
+
* should trigger this controller.
|
|
107
|
+
*
|
|
108
|
+
* @param e The native browser `KeyboardEvent` from the `keydown` event.
|
|
109
|
+
*/
|
|
110
|
+
readonly onKeydown: (e: KeyboardEvent) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Sets up typingahead
|
|
113
|
+
*/
|
|
114
|
+
private beginTypeahead;
|
|
115
|
+
/**
|
|
116
|
+
* Performs the typeahead. Based on the normalized items and the current text
|
|
117
|
+
* buffer, finds the _next_ item with matching text and activates it.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
*
|
|
121
|
+
* items: Apple, Banana, Olive, Orange, Cucumber
|
|
122
|
+
* buffer: ''
|
|
123
|
+
* user types: o
|
|
124
|
+
*
|
|
125
|
+
* activates Olive
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
*
|
|
129
|
+
* items: Apple, Banana, Olive (active), Orange, Cucumber
|
|
130
|
+
* buffer: 'o'
|
|
131
|
+
* user types: l
|
|
132
|
+
*
|
|
133
|
+
* activates Olive
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
*
|
|
137
|
+
* items: Apple, Banana, Olive (active), Orange, Cucumber
|
|
138
|
+
* buffer: ''
|
|
139
|
+
* user types: o
|
|
140
|
+
*
|
|
141
|
+
* activates Orange
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
*
|
|
145
|
+
* items: Apple, Banana, Olive, Orange (active), Cucumber
|
|
146
|
+
* buffer: ''
|
|
147
|
+
* user types: o
|
|
148
|
+
*
|
|
149
|
+
* activates Olive
|
|
150
|
+
*/
|
|
151
|
+
private typeahead;
|
|
152
|
+
/**
|
|
153
|
+
* Ends the current typeahead and clears the buffer.
|
|
154
|
+
*/
|
|
155
|
+
private readonly endTypeahead;
|
|
156
|
+
}
|
|
157
|
+
export {};
|