@universal-material/web 3.7.2 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +12 -0
- package/README.md +12 -0
- package/app-bar/top-app-bar.d.ts +20 -4
- package/app-bar/top-app-bar.d.ts.map +1 -1
- package/app-bar/top-app-bar.js +84 -33
- package/app-bar/top-app-bar.js.map +1 -1
- package/app-bar/top-app-bar.styles.d.ts.map +1 -1
- package/app-bar/top-app-bar.styles.js +18 -1
- package/app-bar/top-app-bar.styles.js.map +1 -1
- package/badge/badge.d.ts +5 -2
- package/badge/badge.d.ts.map +1 -1
- package/badge/badge.js +9 -6
- package/badge/badge.js.map +1 -1
- package/badge/badge.styles.d.ts.map +1 -1
- package/badge/badge.styles.js +1 -0
- package/badge/badge.styles.js.map +1 -1
- package/bundle.min.js +5480 -2170
- package/button/button-base.d.ts +9 -2
- package/button/button-base.d.ts.map +1 -1
- package/button/button-base.js +12 -5
- package/button/button-base.js.map +1 -1
- package/button/button-set.d.ts +3 -3
- package/button/button-set.d.ts.map +1 -1
- package/button/button-set.js +7 -7
- package/button/button-set.js.map +1 -1
- package/button/button.d.ts +10 -7
- package/button/button.d.ts.map +1 -1
- package/button/button.js +17 -14
- package/button/button.js.map +1 -1
- package/button/fab-menu-color-context.d.ts +2 -2
- package/button/fab-menu-color-context.d.ts.map +1 -1
- package/button/fab-menu-color-context.js.map +1 -1
- package/button/fab-menu-item.d.ts +3 -3
- package/button/fab-menu-item.d.ts.map +1 -1
- package/button/fab-menu-item.js +11 -11
- package/button/fab-menu-item.js.map +1 -1
- package/button/fab-menu.d.ts +20 -5
- package/button/fab-menu.d.ts.map +1 -1
- package/button/fab-menu.js +48 -11
- package/button/fab-menu.js.map +1 -1
- package/button/fab.d.ts +22 -7
- package/button/fab.d.ts.map +1 -1
- package/button/fab.js +49 -11
- package/button/fab.js.map +1 -1
- package/button/icon-button.d.ts +13 -7
- package/button/icon-button.d.ts.map +1 -1
- package/button/icon-button.js +14 -8
- package/button/icon-button.js.map +1 -1
- package/button/toggle-button.d.ts +6 -6
- package/button/toggle-button.d.ts.map +1 -1
- package/button/toggle-button.js +10 -10
- package/button/toggle-button.js.map +1 -1
- package/button-field/button-field.d.ts +6 -3
- package/button-field/button-field.d.ts.map +1 -1
- package/button-field/button-field.js +12 -9
- package/button-field/button-field.js.map +1 -1
- package/calendar/calendar-adapter.d.ts +3 -0
- package/calendar/calendar-adapter.d.ts.map +1 -1
- package/calendar/calendar-adapter.js.map +1 -1
- package/calendar/calendar-base.d.ts +18 -1
- package/calendar/calendar-base.d.ts.map +1 -1
- package/calendar/calendar-base.js +188 -25
- package/calendar/calendar-base.js.map +1 -1
- package/calendar/calendar.d.ts +6 -2
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar/calendar.js +12 -8
- package/calendar/calendar.js.map +1 -1
- package/calendar/default-calendar-adapter.d.ts +3 -0
- package/calendar/default-calendar-adapter.d.ts.map +1 -1
- package/calendar/default-calendar-adapter.js +17 -5
- package/calendar/default-calendar-adapter.js.map +1 -1
- package/calendar/range-calendar.d.ts +2 -2
- package/calendar/range-calendar.d.ts.map +1 -1
- package/calendar/range-calendar.js +9 -9
- package/calendar/range-calendar.js.map +1 -1
- package/card/card-content.d.ts +7 -2
- package/card/card-content.d.ts.map +1 -1
- package/card/card-content.js +10 -5
- package/card/card-content.js.map +1 -1
- package/card/card-media.d.ts +5 -2
- package/card/card-media.d.ts.map +1 -1
- package/card/card-media.js +8 -5
- package/card/card-media.js.map +1 -1
- package/card/card.d.ts +4 -4
- package/card/card.d.ts.map +1 -1
- package/card/card.js +5 -5
- package/card/card.js.map +1 -1
- package/checkbox/checkbox-list-item.d.ts +4 -4
- package/checkbox/checkbox-list-item.d.ts.map +1 -1
- package/checkbox/checkbox-list-item.js +5 -5
- package/checkbox/checkbox-list-item.js.map +1 -1
- package/checkbox/checkbox.d.ts +10 -3
- package/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox.js +14 -7
- package/checkbox/checkbox.js.map +1 -1
- package/chip/chip-set.d.ts +3 -3
- package/chip/chip-set.d.ts.map +1 -1
- package/chip/chip-set.js +6 -6
- package/chip/chip-set.js.map +1 -1
- package/chip/chip.d.ts +8 -5
- package/chip/chip.d.ts.map +1 -1
- package/chip/chip.js +23 -20
- package/chip/chip.js.map +1 -1
- package/chip-field/chip-field.d.ts +6 -3
- package/chip-field/chip-field.d.ts.map +1 -1
- package/chip-field/chip-field.js +9 -9
- package/chip-field/chip-field.js.map +1 -1
- package/collapse/collapse.d.ts +26 -0
- package/collapse/collapse.d.ts.map +1 -0
- package/collapse/collapse.js +62 -0
- package/collapse/collapse.js.map +1 -0
- package/collapse/collapse.styles.d.ts +2 -0
- package/collapse/collapse.styles.d.ts.map +1 -0
- package/collapse/collapse.styles.js +8 -0
- package/collapse/collapse.styles.js.map +1 -0
- package/config.js.map +1 -1
- package/css/universal-material.css +2 -1
- package/css/universal-material.min.css +2 -1
- package/custom-elements.json +17175 -9684
- package/datepicker/datepicker.d.ts +54 -3
- package/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker.js +202 -6
- package/datepicker/datepicker.js.map +1 -1
- package/datepicker/datepicker.styles.d.ts.map +1 -1
- package/datepicker/datepicker.styles.js +25 -0
- package/datepicker/datepicker.styles.js.map +1 -1
- package/datepicker/format.d.ts +19 -0
- package/datepicker/format.d.ts.map +1 -0
- package/datepicker/format.js +47 -0
- package/datepicker/format.js.map +1 -0
- package/datepicker/range-datepicker.d.ts +58 -0
- package/datepicker/range-datepicker.d.ts.map +1 -0
- package/datepicker/range-datepicker.js +212 -0
- package/datepicker/range-datepicker.js.map +1 -0
- package/dialog/confirm-dialog-builder.d.ts +3 -3
- package/dialog/confirm-dialog-builder.d.ts.map +1 -1
- package/dialog/confirm-dialog-builder.js.map +1 -1
- package/dialog/dialog-builder.d.ts +5 -4
- package/dialog/dialog-builder.d.ts.map +1 -1
- package/dialog/dialog-builder.js +10 -3
- package/dialog/dialog-builder.js.map +1 -1
- package/dialog/dialog-button-def.d.ts +3 -3
- package/dialog/dialog-button-def.d.ts.map +1 -1
- package/dialog/dialog-button-def.js.map +1 -1
- package/dialog/dialog.d.ts +10 -2
- package/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog.js +22 -14
- package/dialog/dialog.js.map +1 -1
- package/dialog/message-dialog-builder.d.ts +2 -2
- package/dialog/message-dialog-builder.d.ts.map +1 -1
- package/dialog/message-dialog-builder.js.map +1 -1
- package/elevation/elevation.d.ts +2 -2
- package/elevation/elevation.d.ts.map +1 -1
- package/elevation/elevation.js +4 -4
- package/elevation/elevation.js.map +1 -1
- package/expansion-panel/expansion-panel-container.d.ts +24 -0
- package/expansion-panel/expansion-panel-container.d.ts.map +1 -0
- package/expansion-panel/expansion-panel-container.js +54 -0
- package/expansion-panel/expansion-panel-container.js.map +1 -0
- package/expansion-panel/expansion-panel-container.styles.d.ts +2 -0
- package/expansion-panel/expansion-panel-container.styles.d.ts.map +1 -0
- package/expansion-panel/expansion-panel-container.styles.js +9 -0
- package/expansion-panel/expansion-panel-container.styles.js.map +1 -0
- package/expansion-panel/expansion-panel.d.ts +37 -0
- package/expansion-panel/expansion-panel.d.ts.map +1 -0
- package/expansion-panel/expansion-panel.js +89 -0
- package/expansion-panel/expansion-panel.js.map +1 -0
- package/expansion-panel/expansion-panel.styles.d.ts +2 -0
- package/expansion-panel/expansion-panel.styles.d.ts.map +1 -0
- package/expansion-panel/expansion-panel.styles.js +66 -0
- package/expansion-panel/expansion-panel.styles.js.map +1 -0
- package/field/field-base.d.ts +17 -3
- package/field/field-base.d.ts.map +1 -1
- package/field/field-base.js +30 -20
- package/field/field-base.js.map +1 -1
- package/field/field-defaults-context.d.ts +2 -2
- package/field/field-defaults-context.d.ts.map +1 -1
- package/field/field-defaults-context.js.map +1 -1
- package/field/field-defaults.d.ts +3 -3
- package/field/field-defaults.d.ts.map +1 -1
- package/field/field-defaults.js.map +1 -1
- package/field/field-variant.d.ts +1 -1
- package/field/field-variant.d.ts.map +1 -1
- package/field/field-variant.js.map +1 -1
- package/field/field.d.ts +7 -3
- package/field/field.d.ts.map +1 -1
- package/field/field.js +10 -6
- package/field/field.js.map +1 -1
- package/icon/icon.d.ts +2 -2
- package/icon/icon.d.ts.map +1 -1
- package/icon/icon.js +4 -4
- package/icon/icon.js.map +1 -1
- package/index.d.ts +29 -1
- package/index.d.ts.map +1 -1
- package/index.js +29 -1
- package/index.js.map +1 -1
- package/list/list-item.d.ts +19 -2
- package/list/list-item.d.ts.map +1 -1
- package/list/list-item.js +29 -6
- package/list/list-item.js.map +1 -1
- package/list/list-item.styles.d.ts.map +1 -1
- package/list/list-item.styles.js +13 -0
- package/list/list-item.styles.js.map +1 -1
- package/list/list.d.ts +2 -2
- package/list/list.d.ts.map +1 -1
- package/list/list.js +4 -4
- package/list/list.js.map +1 -1
- package/menu/menu-item.d.ts +9 -3
- package/menu/menu-item.d.ts.map +1 -1
- package/menu/menu-item.js +16 -10
- package/menu/menu-item.js.map +1 -1
- package/menu/menu.d.ts +18 -2
- package/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +37 -18
- package/menu/menu.js.map +1 -1
- package/menu/menu.styles.d.ts.map +1 -1
- package/menu/menu.styles.js +5 -0
- package/menu/menu.styles.js.map +1 -1
- package/navigation/drawer-headline.d.ts +2 -2
- package/navigation/drawer-headline.d.ts.map +1 -1
- package/navigation/drawer-headline.js +6 -6
- package/navigation/drawer-headline.js.map +1 -1
- package/navigation/drawer-headline.styles.js +1 -1
- package/navigation/drawer-headline.styles.js.map +1 -1
- package/navigation/drawer-item.d.ts +3 -3
- package/navigation/drawer-item.d.ts.map +1 -1
- package/navigation/drawer-item.js +17 -12
- package/navigation/drawer-item.js.map +1 -1
- package/navigation/drawer.d.ts +2 -2
- package/navigation/drawer.d.ts.map +1 -1
- package/navigation/drawer.js +4 -4
- package/navigation/drawer.js.map +1 -1
- package/navigation/side-navigation.d.ts +9 -2
- package/navigation/side-navigation.d.ts.map +1 -1
- package/navigation/side-navigation.js +15 -8
- package/navigation/side-navigation.js.map +1 -1
- package/navigation-bar/navigation-bar-item.d.ts +40 -0
- package/navigation-bar/navigation-bar-item.d.ts.map +1 -0
- package/navigation-bar/navigation-bar-item.js +113 -0
- package/navigation-bar/navigation-bar-item.js.map +1 -0
- package/navigation-bar/navigation-bar-item.styles.d.ts +2 -0
- package/navigation-bar/navigation-bar-item.styles.d.ts.map +1 -0
- package/navigation-bar/navigation-bar-item.styles.js +101 -0
- package/navigation-bar/navigation-bar-item.styles.js.map +1 -0
- package/navigation-bar/navigation-bar.d.ts +40 -0
- package/navigation-bar/navigation-bar.d.ts.map +1 -0
- package/navigation-bar/navigation-bar.js +85 -0
- package/navigation-bar/navigation-bar.js.map +1 -0
- package/navigation-bar/navigation-bar.styles.d.ts +2 -0
- package/navigation-bar/navigation-bar.styles.d.ts.map +1 -0
- package/navigation-bar/navigation-bar.styles.js +44 -0
- package/navigation-bar/navigation-bar.styles.js.map +1 -0
- package/navigation-rail/navigation-rail-headline.d.ts +23 -0
- package/navigation-rail/navigation-rail-headline.d.ts.map +1 -0
- package/navigation-rail/navigation-rail-headline.js +28 -0
- package/navigation-rail/navigation-rail-headline.js.map +1 -0
- package/navigation-rail/navigation-rail-headline.styles.d.ts +2 -0
- package/navigation-rail/navigation-rail-headline.styles.d.ts.map +1 -0
- package/navigation-rail/navigation-rail-headline.styles.js +19 -0
- package/navigation-rail/navigation-rail-headline.styles.js.map +1 -0
- package/navigation-rail/navigation-rail-item.d.ts +58 -0
- package/navigation-rail/navigation-rail-item.d.ts.map +1 -0
- package/navigation-rail/navigation-rail-item.js +160 -0
- package/navigation-rail/navigation-rail-item.js.map +1 -0
- package/navigation-rail/navigation-rail-item.styles.d.ts +2 -0
- package/navigation-rail/navigation-rail-item.styles.d.ts.map +1 -0
- package/navigation-rail/navigation-rail-item.styles.js +182 -0
- package/navigation-rail/navigation-rail-item.styles.js.map +1 -0
- package/navigation-rail/navigation-rail.d.ts +66 -0
- package/navigation-rail/navigation-rail.d.ts.map +1 -0
- package/navigation-rail/navigation-rail.js +223 -0
- package/navigation-rail/navigation-rail.js.map +1 -0
- package/navigation-rail/navigation-rail.styles.d.ts +2 -0
- package/navigation-rail/navigation-rail.styles.d.ts.map +1 -0
- package/navigation-rail/navigation-rail.styles.js +220 -0
- package/navigation-rail/navigation-rail.styles.js.map +1 -0
- package/overflow-menu/overflow-menu-item.d.ts +8 -0
- package/overflow-menu/overflow-menu-item.d.ts.map +1 -1
- package/overflow-menu/overflow-menu-item.js +8 -0
- package/overflow-menu/overflow-menu-item.js.map +1 -1
- package/overflow-menu/overflow-menu.d.ts +8 -2
- package/overflow-menu/overflow-menu.d.ts.map +1 -1
- package/overflow-menu/overflow-menu.js +10 -1
- package/overflow-menu/overflow-menu.js.map +1 -1
- package/package.json +21 -5
- package/progress/circular-progress.d.ts +9 -2
- package/progress/circular-progress.d.ts.map +1 -1
- package/progress/circular-progress.js +9 -6
- package/progress/circular-progress.js.map +1 -1
- package/progress/progress-bar.d.ts +9 -2
- package/progress/progress-bar.d.ts.map +1 -1
- package/progress/progress-bar.js +9 -6
- package/progress/progress-bar.js.map +1 -1
- package/radio/radio-list-item.d.ts +4 -4
- package/radio/radio-list-item.d.ts.map +1 -1
- package/radio/radio-list-item.js +5 -5
- package/radio/radio-list-item.js.map +1 -1
- package/radio/radio.d.ts +6 -3
- package/radio/radio.d.ts.map +1 -1
- package/radio/radio.js +9 -6
- package/radio/radio.js.map +1 -1
- package/ripple/ripple.d.ts +2 -2
- package/ripple/ripple.d.ts.map +1 -1
- package/ripple/ripple.js +9 -9
- package/ripple/ripple.js.map +1 -1
- package/scaffold/pane.d.ts +127 -0
- package/scaffold/pane.d.ts.map +1 -0
- package/scaffold/pane.js +220 -0
- package/scaffold/pane.js.map +1 -0
- package/scaffold/pane.styles.d.ts +2 -0
- package/scaffold/pane.styles.d.ts.map +1 -0
- package/scaffold/pane.styles.js +1909 -0
- package/scaffold/pane.styles.js.map +1 -0
- package/scaffold/scaffold.d.ts +45 -0
- package/scaffold/scaffold.d.ts.map +1 -0
- package/scaffold/scaffold.js +170 -0
- package/scaffold/scaffold.js.map +1 -0
- package/scaffold/scaffold.styles.d.ts +2 -0
- package/scaffold/scaffold.styles.d.ts.map +1 -0
- package/scaffold/scaffold.styles.js +69 -0
- package/scaffold/scaffold.styles.js.map +1 -0
- package/scaffold/scroll-container-context.d.ts +4 -0
- package/scaffold/scroll-container-context.d.ts.map +1 -0
- package/scaffold/scroll-container-context.js +3 -0
- package/scaffold/scroll-container-context.js.map +1 -0
- package/scss/utilities/_divider.scss +4 -0
- package/search/search.d.ts +6 -3
- package/search/search.d.ts.map +1 -1
- package/search/search.js +10 -7
- package/search/search.js.map +1 -1
- package/search/search.styles.d.ts.map +1 -1
- package/search/search.styles.js +7 -2
- package/search/search.styles.js.map +1 -1
- package/select/option.d.ts +9 -3
- package/select/option.d.ts.map +1 -1
- package/select/option.js +14 -8
- package/select/option.js.map +1 -1
- package/select/select-navigation-controller.d.ts +4 -4
- package/select/select-navigation-controller.d.ts.map +1 -1
- package/select/select-navigation-controller.js.map +1 -1
- package/select/select.d.ts +22 -12
- package/select/select.d.ts.map +1 -1
- package/select/select.js +81 -31
- package/select/select.js.map +1 -1
- package/shared/button-wrapper.d.ts +4 -1
- package/shared/button-wrapper.d.ts.map +1 -1
- package/shared/button-wrapper.js +8 -8
- package/shared/button-wrapper.js.map +1 -1
- package/shared/char-count-text-field/native-text-field-wrapper.d.ts +15 -2
- package/shared/char-count-text-field/native-text-field-wrapper.d.ts.map +1 -1
- package/shared/char-count-text-field/native-text-field-wrapper.js +16 -6
- package/shared/char-count-text-field/native-text-field-wrapper.js.map +1 -1
- package/shared/menu-field/menu-field-navigation-controller.d.ts +3 -3
- package/shared/menu-field/menu-field-navigation-controller.d.ts.map +1 -1
- package/shared/menu-field/menu-field-navigation-controller.js.map +1 -1
- package/shared/menu-field/menu-field.d.ts +5 -5
- package/shared/menu-field/menu-field.d.ts.map +1 -1
- package/shared/menu-field/menu-field.js.map +1 -1
- package/shared/selection-control/selection-control-list-item.d.ts +2 -2
- package/shared/selection-control/selection-control-list-item.d.ts.map +1 -1
- package/shared/selection-control/selection-control-list-item.js +14 -1
- package/shared/selection-control/selection-control-list-item.js.map +1 -1
- package/shared/selection-control/selection-control.d.ts +10 -1
- package/shared/selection-control/selection-control.d.ts.map +1 -1
- package/shared/selection-control/selection-control.js +24 -7
- package/shared/selection-control/selection-control.js.map +1 -1
- package/shared/sets/set-base.d.ts +1 -1
- package/shared/sets/set-base.d.ts.map +1 -1
- package/shared/sets/set-base.js +2 -2
- package/shared/sets/set-base.js.map +1 -1
- package/shared/text-field-base/text-field-base.d.ts +37 -2
- package/shared/text-field-base/text-field-base.d.ts.map +1 -1
- package/shared/text-field-base/text-field-base.js +66 -4
- package/shared/text-field-base/text-field-base.js.map +1 -1
- package/skills/badge/SKILL.md +43 -0
- package/skills/buttons/SKILL.md +115 -0
- package/skills/card/SKILL.md +162 -0
- package/skills/chips/SKILL.md +95 -0
- package/skills/collapse/SKILL.md +37 -0
- package/skills/datepicker/SKILL.md +110 -0
- package/skills/dialog/SKILL.md +92 -0
- package/skills/drawer/SKILL.md +94 -0
- package/skills/expansion-panel/SKILL.md +65 -0
- package/skills/fab/SKILL.md +79 -0
- package/skills/list/SKILL.md +105 -0
- package/skills/menu/SKILL.md +120 -0
- package/skills/navigation-bar/SKILL.md +87 -0
- package/skills/navigation-rail/SKILL.md +127 -0
- package/skills/overview/SKILL.md +44 -0
- package/skills/progress/SKILL.md +63 -0
- package/skills/scaffold/SKILL.md +392 -0
- package/skills/search/SKILL.md +65 -0
- package/skills/select/SKILL.md +120 -0
- package/skills/selection-controls/SKILL.md +88 -0
- package/skills/setup/SKILL.md +58 -0
- package/skills/slider/SKILL.md +119 -0
- package/skills/snackbar/SKILL.md +70 -0
- package/skills/tab-bar/SKILL.md +55 -0
- package/skills/text-field/SKILL.md +114 -0
- package/skills/theming/SKILL.md +80 -0
- package/skills/top-app-bar/SKILL.md +64 -0
- package/skills/typeahead/SKILL.md +113 -0
- package/slider/slider.d.ts +73 -0
- package/slider/slider.d.ts.map +1 -0
- package/slider/slider.js +506 -0
- package/slider/slider.js.map +1 -0
- package/slider/slider.styles.d.ts +2 -0
- package/slider/slider.styles.d.ts.map +1 -0
- package/slider/slider.styles.js +292 -0
- package/slider/slider.styles.js.map +1 -0
- package/snackbar/snackbar.d.ts +13 -4
- package/snackbar/snackbar.d.ts.map +1 -1
- package/snackbar/snackbar.js +37 -28
- package/snackbar/snackbar.js.map +1 -1
- package/snackbar/snackbar.styles.js +1 -1
- package/snackbar/snackbar.styles.js.map +1 -1
- package/switch/switch-list-item.d.ts +4 -4
- package/switch/switch-list-item.d.ts.map +1 -1
- package/switch/switch-list-item.js +5 -5
- package/switch/switch-list-item.js.map +1 -1
- package/switch/switch.d.ts +3 -3
- package/switch/switch.d.ts.map +1 -1
- package/switch/switch.js +5 -5
- package/switch/switch.js.map +1 -1
- package/tab-bar/tab-bar.d.ts +9 -6
- package/tab-bar/tab-bar.d.ts.map +1 -1
- package/tab-bar/tab-bar.js +43 -23
- package/tab-bar/tab-bar.js.map +1 -1
- package/tab-bar/tab.d.ts +10 -5
- package/tab-bar/tab.d.ts.map +1 -1
- package/tab-bar/tab.js +14 -9
- package/tab-bar/tab.js.map +1 -1
- package/text-area/text-area.d.ts +6 -3
- package/text-area/text-area.d.ts.map +1 -1
- package/text-area/text-area.js +12 -9
- package/text-area/text-area.js.map +1 -1
- package/text-field/text-field.d.ts +31 -3
- package/text-field/text-field.d.ts.map +1 -1
- package/text-field/text-field.js +53 -13
- package/text-field/text-field.js.map +1 -1
- package/typeahead/highlight.d.ts +2 -2
- package/typeahead/highlight.d.ts.map +1 -1
- package/typeahead/highlight.js +7 -7
- package/typeahead/highlight.js.map +1 -1
- package/typeahead/typeahead-template-render.d.ts +4 -0
- package/typeahead/typeahead-template-render.d.ts.map +1 -1
- package/typeahead/typeahead-template-render.js +4 -0
- package/typeahead/typeahead-template-render.js.map +1 -1
- package/typeahead/typeahead.d.ts +14 -7
- package/typeahead/typeahead.d.ts.map +1 -1
- package/typeahead/typeahead.js +29 -18
- package/typeahead/typeahead.js.map +1 -1
- package/vscode.html-custom-data.json +1146 -326
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { HTMLTemplateResult, LitElement, PropertyValues } from 'lit';
|
|
2
|
+
export type PaneMode = 'fixed' | 'collapsible' | 'sidebar' | 'fullscreen';
|
|
3
|
+
export type PaneVariant = 'transparent' | 'filled';
|
|
4
|
+
export type PaneQueryContext = 'media' | 'container';
|
|
5
|
+
export type PaneAnimation = 'none' | 'exit' | 'exit-start' | 'exit-end' | 'fade';
|
|
6
|
+
/**
|
|
7
|
+
* A region declared as a light-DOM child of `u-scaffold`. The pane is a
|
|
8
|
+
* flex item in the scaffold's body row; its behaviour is driven by `mode`:
|
|
9
|
+
*
|
|
10
|
+
* - `fixed` (default): always visible as a flex item. `open` is ignored.
|
|
11
|
+
* - `collapsible`: a flex item while `open=true`; removed from the flow
|
|
12
|
+
* when `open=false` (animated via `transition-behavior: allow-discrete`).
|
|
13
|
+
* - `sidebar`: a modal drawer overlay anchored to the scaffold. Slides in
|
|
14
|
+
* from the leading or trailing edge (the scaffold tags each pane with
|
|
15
|
+
* `data-align="start|end"` based on its DOM position relative to the
|
|
16
|
+
* body content) and shows a scrim. Closed by default.
|
|
17
|
+
* - `fullscreen`: same overlay semantics as `sidebar` but full-width,
|
|
18
|
+
* sits above the top app bar, no scrim. Closed by default.
|
|
19
|
+
*
|
|
20
|
+
* Modes can vary per Material 3 breakpoint via the `mode-sm`, `mode-md`,
|
|
21
|
+
* `mode-lg` and `mode-xl` attributes — the larger breakpoint wins via
|
|
22
|
+
* source order in the stylesheet. The `query-context` attribute switches
|
|
23
|
+
* the breakpoint source between the viewport (`media`, default) and the
|
|
24
|
+
* scaffold's container (`container`). All breakpoint handling is CSS —
|
|
25
|
+
* the pane does not subscribe to any `matchMedia`/`ResizeObserver`.
|
|
26
|
+
*
|
|
27
|
+
* The `open` property defaults to `true` for `fixed` / `collapsible`
|
|
28
|
+
* panes and `false` for `sidebar` / `fullscreen` panes. The default is
|
|
29
|
+
* recomputed whenever `mode` changes — until the consumer writes to
|
|
30
|
+
* `open` explicitly, the default tracks the active `mode`.
|
|
31
|
+
*
|
|
32
|
+
* @slot header - Title row / actions. Sticks to the top of the pane.
|
|
33
|
+
* @slot - The pane content. Scrolls if it overflows.
|
|
34
|
+
*
|
|
35
|
+
* @csspart container - The visual surface.
|
|
36
|
+
* @csspart header
|
|
37
|
+
* @csspart content
|
|
38
|
+
* @csspart scrim - The modal scrim (sidebar mode only).
|
|
39
|
+
*
|
|
40
|
+
* @fires open - When the pane opens. Bubbles, composed.
|
|
41
|
+
* @fires close - When the pane closes. Bubbles, composed.
|
|
42
|
+
*/
|
|
43
|
+
export declare class Pane extends LitElement {
|
|
44
|
+
#private;
|
|
45
|
+
static styles: import("lit").CSSResult[];
|
|
46
|
+
/**
|
|
47
|
+
* Background treatment. `filled` gives the pane its own card chrome
|
|
48
|
+
* (`surface-container-low` + `--u-pane-filled-shape-corner`, default
|
|
49
|
+
* `medium` / 12dp). `transparent` blends with the scaffold background.
|
|
50
|
+
* Override the surface tone via `--u-pane-filled-bg-color`.
|
|
51
|
+
*/
|
|
52
|
+
variant: PaneVariant;
|
|
53
|
+
/**
|
|
54
|
+
* Behaviour at the base (no-breakpoint-qualifier) level. `fixed` keeps
|
|
55
|
+
* the pane in the scaffold flex row at all times; `collapsible` makes
|
|
56
|
+
* it disappear from the row when `open=false`; `sidebar` and
|
|
57
|
+
* `fullscreen` render the pane as a modal overlay against the
|
|
58
|
+
* scaffold when `open=true`.
|
|
59
|
+
*/
|
|
60
|
+
mode: PaneMode;
|
|
61
|
+
/**
|
|
62
|
+
* Mode override applied from the `sm` breakpoint (≥ 600px) upward.
|
|
63
|
+
* Falls back to `mode` when unset. Resolved purely in CSS.
|
|
64
|
+
*/
|
|
65
|
+
modeSm?: PaneMode;
|
|
66
|
+
/** Mode override applied from `md` (≥ 840px) upward. */
|
|
67
|
+
modeMd?: PaneMode;
|
|
68
|
+
/** Mode override applied from `lg` (≥ 1200px) upward. */
|
|
69
|
+
modeLg?: PaneMode;
|
|
70
|
+
/** Mode override applied from `xl` (≥ 1600px) upward. */
|
|
71
|
+
modeXl?: PaneMode;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the breakpoint overrides query the viewport (`media`,
|
|
74
|
+
* default) or the nearest container with `container-type` set
|
|
75
|
+
* (`container`). Switching to `container` lets the pane react to its
|
|
76
|
+
* scaffold's own size when the scaffold lives in a constrained layout
|
|
77
|
+
* — see `u-scaffold` which sets `container-type: inline-size`.
|
|
78
|
+
*/
|
|
79
|
+
queryContext: PaneQueryContext;
|
|
80
|
+
/**
|
|
81
|
+
* How the pane animates in/out when `open` toggles (modal modes) or
|
|
82
|
+
* when it enters/leaves the flex flow (`collapsible`). `none` disables
|
|
83
|
+
* the transition entirely; `exit` (default) slides the modal off-screen
|
|
84
|
+
* and infers the direction from the scaffold-assigned `data-align`
|
|
85
|
+
* (`start` → leading edge, `end` → trailing edge); `exit-start` and
|
|
86
|
+
* `exit-end` force a side regardless of `data-align`; `fade` swaps
|
|
87
|
+
* the slide for an opacity transition (modal stays in place and fades
|
|
88
|
+
* through).
|
|
89
|
+
*/
|
|
90
|
+
animation: PaneAnimation;
|
|
91
|
+
/**
|
|
92
|
+
* Animation override applied from the `sm` breakpoint (≥ 600px) upward.
|
|
93
|
+
* Falls back to `animation` when unset. Resolved purely in CSS.
|
|
94
|
+
*/
|
|
95
|
+
animationSm?: PaneAnimation;
|
|
96
|
+
/** Animation override applied from `md` (≥ 840px) upward. */
|
|
97
|
+
animationMd?: PaneAnimation;
|
|
98
|
+
/** Animation override applied from `lg` (≥ 1200px) upward. */
|
|
99
|
+
animationLg?: PaneAnimation;
|
|
100
|
+
/** Animation override applied from `xl` (≥ 1600px) upward. */
|
|
101
|
+
animationXl?: PaneAnimation;
|
|
102
|
+
/**
|
|
103
|
+
* Programmatic open state. Default is computed from `mode`:
|
|
104
|
+
* `true` for `fixed` / `collapsible`, `false` for `sidebar` /
|
|
105
|
+
* `fullscreen`. Once the consumer sets this explicitly (attribute,
|
|
106
|
+
* property or `show()` / `close()`), the explicit value sticks.
|
|
107
|
+
*
|
|
108
|
+
* In `fixed` mode the pane is visible regardless of `open`.
|
|
109
|
+
*/
|
|
110
|
+
get open(): boolean;
|
|
111
|
+
set open(value: boolean);
|
|
112
|
+
/** Opens the pane. Equivalent to `open = true`. */
|
|
113
|
+
show(): void;
|
|
114
|
+
/** Closes the pane. Equivalent to `open = false`. */
|
|
115
|
+
close(): void;
|
|
116
|
+
/** Toggles `open`. */
|
|
117
|
+
toggle(): void;
|
|
118
|
+
disconnectedCallback(): void;
|
|
119
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
120
|
+
protected render(): HTMLTemplateResult;
|
|
121
|
+
}
|
|
122
|
+
declare global {
|
|
123
|
+
interface HTMLElementTagNameMap {
|
|
124
|
+
'u-pane': Pane;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../src/scaffold/pane.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM3E,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAAC;AAC1E,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAC;AACnD,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,MAAM,CAAC;AAIjF;;;;;;;;;;;;;;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
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { styles as baseStyles } from '../shared/base.styles.js';
|
|
5
|
+
import { styles } from './pane.styles.js';
|
|
6
|
+
const MODAL_MODES = new Set(['sidebar', 'fullscreen']);
|
|
7
|
+
/**
|
|
8
|
+
* A region declared as a light-DOM child of `u-scaffold`. The pane is a
|
|
9
|
+
* flex item in the scaffold's body row; its behaviour is driven by `mode`:
|
|
10
|
+
*
|
|
11
|
+
* - `fixed` (default): always visible as a flex item. `open` is ignored.
|
|
12
|
+
* - `collapsible`: a flex item while `open=true`; removed from the flow
|
|
13
|
+
* when `open=false` (animated via `transition-behavior: allow-discrete`).
|
|
14
|
+
* - `sidebar`: a modal drawer overlay anchored to the scaffold. Slides in
|
|
15
|
+
* from the leading or trailing edge (the scaffold tags each pane with
|
|
16
|
+
* `data-align="start|end"` based on its DOM position relative to the
|
|
17
|
+
* body content) and shows a scrim. Closed by default.
|
|
18
|
+
* - `fullscreen`: same overlay semantics as `sidebar` but full-width,
|
|
19
|
+
* sits above the top app bar, no scrim. Closed by default.
|
|
20
|
+
*
|
|
21
|
+
* Modes can vary per Material 3 breakpoint via the `mode-sm`, `mode-md`,
|
|
22
|
+
* `mode-lg` and `mode-xl` attributes — the larger breakpoint wins via
|
|
23
|
+
* source order in the stylesheet. The `query-context` attribute switches
|
|
24
|
+
* the breakpoint source between the viewport (`media`, default) and the
|
|
25
|
+
* scaffold's container (`container`). All breakpoint handling is CSS —
|
|
26
|
+
* the pane does not subscribe to any `matchMedia`/`ResizeObserver`.
|
|
27
|
+
*
|
|
28
|
+
* The `open` property defaults to `true` for `fixed` / `collapsible`
|
|
29
|
+
* panes and `false` for `sidebar` / `fullscreen` panes. The default is
|
|
30
|
+
* recomputed whenever `mode` changes — until the consumer writes to
|
|
31
|
+
* `open` explicitly, the default tracks the active `mode`.
|
|
32
|
+
*
|
|
33
|
+
* @slot header - Title row / actions. Sticks to the top of the pane.
|
|
34
|
+
* @slot - The pane content. Scrolls if it overflows.
|
|
35
|
+
*
|
|
36
|
+
* @csspart container - The visual surface.
|
|
37
|
+
* @csspart header
|
|
38
|
+
* @csspart content
|
|
39
|
+
* @csspart scrim - The modal scrim (sidebar mode only).
|
|
40
|
+
*
|
|
41
|
+
* @fires open - When the pane opens. Bubbles, composed.
|
|
42
|
+
* @fires close - When the pane closes. Bubbles, composed.
|
|
43
|
+
*/
|
|
44
|
+
let Pane = class Pane extends LitElement {
|
|
45
|
+
constructor() {
|
|
46
|
+
super(...arguments);
|
|
47
|
+
/**
|
|
48
|
+
* Background treatment. `filled` gives the pane its own card chrome
|
|
49
|
+
* (`surface-container-low` + `--u-pane-filled-shape-corner`, default
|
|
50
|
+
* `medium` / 12dp). `transparent` blends with the scaffold background.
|
|
51
|
+
* Override the surface tone via `--u-pane-filled-bg-color`.
|
|
52
|
+
*/
|
|
53
|
+
this.variant = 'transparent';
|
|
54
|
+
/**
|
|
55
|
+
* Behaviour at the base (no-breakpoint-qualifier) level. `fixed` keeps
|
|
56
|
+
* the pane in the scaffold flex row at all times; `collapsible` makes
|
|
57
|
+
* it disappear from the row when `open=false`; `sidebar` and
|
|
58
|
+
* `fullscreen` render the pane as a modal overlay against the
|
|
59
|
+
* scaffold when `open=true`.
|
|
60
|
+
*/
|
|
61
|
+
this.mode = 'fixed';
|
|
62
|
+
/**
|
|
63
|
+
* Whether the breakpoint overrides query the viewport (`media`,
|
|
64
|
+
* default) or the nearest container with `container-type` set
|
|
65
|
+
* (`container`). Switching to `container` lets the pane react to its
|
|
66
|
+
* scaffold's own size when the scaffold lives in a constrained layout
|
|
67
|
+
* — see `u-scaffold` which sets `container-type: inline-size`.
|
|
68
|
+
*/
|
|
69
|
+
this.queryContext = 'media';
|
|
70
|
+
/**
|
|
71
|
+
* How the pane animates in/out when `open` toggles (modal modes) or
|
|
72
|
+
* when it enters/leaves the flex flow (`collapsible`). `none` disables
|
|
73
|
+
* the transition entirely; `exit` (default) slides the modal off-screen
|
|
74
|
+
* and infers the direction from the scaffold-assigned `data-align`
|
|
75
|
+
* (`start` → leading edge, `end` → trailing edge); `exit-start` and
|
|
76
|
+
* `exit-end` force a side regardless of `data-align`; `fade` swaps
|
|
77
|
+
* the slide for an opacity transition (modal stays in place and fades
|
|
78
|
+
* through).
|
|
79
|
+
*/
|
|
80
|
+
this.animation = 'exit';
|
|
81
|
+
this.#explicitOpen = null;
|
|
82
|
+
this.#lastReflectedOpen = null;
|
|
83
|
+
this.#keydownAttached = false;
|
|
84
|
+
this.#onScrimClick = () => {
|
|
85
|
+
this.close();
|
|
86
|
+
};
|
|
87
|
+
this.#onKeydown = (event) => {
|
|
88
|
+
if (event.key === 'Escape' && this.open && MODAL_MODES.has(this.mode)) {
|
|
89
|
+
this.close();
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static { this.styles = [baseStyles, styles]; }
|
|
94
|
+
/**
|
|
95
|
+
* Programmatic open state. Default is computed from `mode`:
|
|
96
|
+
* `true` for `fixed` / `collapsible`, `false` for `sidebar` /
|
|
97
|
+
* `fullscreen`. Once the consumer sets this explicitly (attribute,
|
|
98
|
+
* property or `show()` / `close()`), the explicit value sticks.
|
|
99
|
+
*
|
|
100
|
+
* In `fixed` mode the pane is visible regardless of `open`.
|
|
101
|
+
*/
|
|
102
|
+
get open() {
|
|
103
|
+
return this.#explicitOpen ?? !MODAL_MODES.has(this.mode);
|
|
104
|
+
}
|
|
105
|
+
set open(value) {
|
|
106
|
+
const wasOpen = this.open;
|
|
107
|
+
this.#explicitOpen = value;
|
|
108
|
+
if (wasOpen !== value) {
|
|
109
|
+
this.requestUpdate('open', wasOpen);
|
|
110
|
+
this.dispatchEvent(new Event(value ? 'open' : 'close', {
|
|
111
|
+
bubbles: true,
|
|
112
|
+
composed: true,
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
#explicitOpen;
|
|
117
|
+
#lastReflectedOpen;
|
|
118
|
+
#keydownAttached;
|
|
119
|
+
/** Opens the pane. Equivalent to `open = true`. */
|
|
120
|
+
show() {
|
|
121
|
+
this.open = true;
|
|
122
|
+
}
|
|
123
|
+
/** Closes the pane. Equivalent to `open = false`. */
|
|
124
|
+
close() {
|
|
125
|
+
this.open = false;
|
|
126
|
+
}
|
|
127
|
+
/** Toggles `open`. */
|
|
128
|
+
toggle() {
|
|
129
|
+
this.open = !this.open;
|
|
130
|
+
}
|
|
131
|
+
disconnectedCallback() {
|
|
132
|
+
super.disconnectedCallback();
|
|
133
|
+
if (this.#keydownAttached) {
|
|
134
|
+
document.removeEventListener('keydown', this.#onKeydown);
|
|
135
|
+
this.#keydownAttached = false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
updated(changed) {
|
|
139
|
+
super.updated(changed);
|
|
140
|
+
// Manual attribute reflection for `open`: since the default is
|
|
141
|
+
// derived from `mode`, we can't use `reflect: true` directly (Lit
|
|
142
|
+
// would never see "open" change on a pure mode flip). Toggle the
|
|
143
|
+
// attribute ourselves whenever the effective value drifts.
|
|
144
|
+
const isOpen = this.open;
|
|
145
|
+
if (this.#lastReflectedOpen !== isOpen) {
|
|
146
|
+
this.toggleAttribute('open', isOpen);
|
|
147
|
+
this.#lastReflectedOpen = isOpen;
|
|
148
|
+
}
|
|
149
|
+
// Escape key closes any modal-mode pane while open. We attach the
|
|
150
|
+
// listener lazily so non-modal panes never touch `document`.
|
|
151
|
+
const wantsKeydown = isOpen && MODAL_MODES.has(this.mode);
|
|
152
|
+
if (wantsKeydown && !this.#keydownAttached) {
|
|
153
|
+
document.addEventListener('keydown', this.#onKeydown);
|
|
154
|
+
this.#keydownAttached = true;
|
|
155
|
+
}
|
|
156
|
+
else if (!wantsKeydown && this.#keydownAttached) {
|
|
157
|
+
document.removeEventListener('keydown', this.#onKeydown);
|
|
158
|
+
this.#keydownAttached = false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
render() {
|
|
162
|
+
return html `
|
|
163
|
+
<div class="scrim" part="scrim" @click=${this.#onScrimClick}></div>
|
|
164
|
+
<aside class="container" part="container">
|
|
165
|
+
<header class="header" part="header">
|
|
166
|
+
<slot name="header"></slot>
|
|
167
|
+
</header>
|
|
168
|
+
<div class="content" part="content">
|
|
169
|
+
<slot></slot>
|
|
170
|
+
</div>
|
|
171
|
+
</aside>
|
|
172
|
+
`;
|
|
173
|
+
}
|
|
174
|
+
#onScrimClick;
|
|
175
|
+
#onKeydown;
|
|
176
|
+
};
|
|
177
|
+
__decorate([
|
|
178
|
+
property({ type: String, reflect: true })
|
|
179
|
+
], Pane.prototype, "variant", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ type: String, reflect: true })
|
|
182
|
+
], Pane.prototype, "mode", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
property({ type: String, reflect: true, attribute: 'mode-sm' })
|
|
185
|
+
], Pane.prototype, "modeSm", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
property({ type: String, reflect: true, attribute: 'mode-md' })
|
|
188
|
+
], Pane.prototype, "modeMd", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
property({ type: String, reflect: true, attribute: 'mode-lg' })
|
|
191
|
+
], Pane.prototype, "modeLg", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
property({ type: String, reflect: true, attribute: 'mode-xl' })
|
|
194
|
+
], Pane.prototype, "modeXl", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
property({ type: String, reflect: true, attribute: 'query-context' })
|
|
197
|
+
], Pane.prototype, "queryContext", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
property({ type: String, reflect: true })
|
|
200
|
+
], Pane.prototype, "animation", void 0);
|
|
201
|
+
__decorate([
|
|
202
|
+
property({ type: String, reflect: true, attribute: 'animation-sm' })
|
|
203
|
+
], Pane.prototype, "animationSm", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
property({ type: String, reflect: true, attribute: 'animation-md' })
|
|
206
|
+
], Pane.prototype, "animationMd", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
property({ type: String, reflect: true, attribute: 'animation-lg' })
|
|
209
|
+
], Pane.prototype, "animationLg", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
property({ type: String, reflect: true, attribute: 'animation-xl' })
|
|
212
|
+
], Pane.prototype, "animationXl", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Boolean })
|
|
215
|
+
], Pane.prototype, "open", null);
|
|
216
|
+
Pane = __decorate([
|
|
217
|
+
customElement('u-pane')
|
|
218
|
+
], Pane);
|
|
219
|
+
export { Pane };
|
|
220
|
+
//# sourceMappingURL=pane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.js","sourceRoot":"","sources":["../../src/scaffold/pane.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAsB,UAAU,EAAkB,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAO1C,MAAM,WAAW,GAA0B,IAAI,GAAG,CAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEI,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,UAAU;IAA7B;;QAGL;;;;;WAKG;QAEH,YAAO,GAAgB,aAAa,CAAC;QAErC;;;;;;WAMG;QAEH,SAAI,GAAa,OAAO,CAAC;QAqBzB;;;;;;WAMG;QAEH,iBAAY,GAAqB,OAAO,CAAC;QAEzC;;;;;;;;;WASG;QAEH,cAAS,GAAkB,MAAM,CAAC;QA+ClC,kBAAa,GAAmB,IAAI,CAAC;QACrC,uBAAkB,GAAmB,IAAI,CA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C;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;yCACzC;AAI5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;yCACzC;AAW5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gCAG3B;AA9FU,IAAI;IADhB,aAAa,CAAC,QAAQ,CAAC;GACX,IAAI,CAwLhB","sourcesContent":["import { html, HTMLTemplateResult, LitElement, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { styles as baseStyles } from '../shared/base.styles.js';\nimport { styles } from './pane.styles.js';\n\nexport type PaneMode = 'fixed' | 'collapsible' | 'sidebar' | 'fullscreen';\nexport type PaneVariant = 'transparent' | 'filled';\nexport type PaneQueryContext = 'media' | 'container';\nexport type PaneAnimation = 'none' | 'exit' | 'exit-start' | 'exit-end' | 'fade';\n\nconst MODAL_MODES: ReadonlySet<PaneMode> = new Set<PaneMode>(['sidebar', 'fullscreen']);\n\n/**\n * A region declared as a light-DOM child of `u-scaffold`. The pane is a\n * flex item in the scaffold's body row; its behaviour is driven by `mode`:\n *\n * - `fixed` (default): always visible as a flex item. `open` is ignored.\n * - `collapsible`: a flex item while `open=true`; removed from the flow\n * when `open=false` (animated via `transition-behavior: allow-discrete`).\n * - `sidebar`: a modal drawer overlay anchored to the scaffold. Slides in\n * from the leading or trailing edge (the scaffold tags each pane with\n * `data-align=\"start|end\"` based on its DOM position relative to the\n * body content) and shows a scrim. Closed by default.\n * - `fullscreen`: same overlay semantics as `sidebar` but full-width,\n * sits above the top app bar, no scrim. Closed by default.\n *\n * Modes can vary per Material 3 breakpoint via the `mode-sm`, `mode-md`,\n * `mode-lg` and `mode-xl` attributes — the larger breakpoint wins via\n * source order in the stylesheet. The `query-context` attribute switches\n * the breakpoint source between the viewport (`media`, default) and the\n * scaffold's container (`container`). All breakpoint handling is CSS —\n * the pane does not subscribe to any `matchMedia`/`ResizeObserver`.\n *\n * The `open` property defaults to `true` for `fixed` / `collapsible`\n * panes and `false` for `sidebar` / `fullscreen` panes. The default is\n * recomputed whenever `mode` changes — until the consumer writes to\n * `open` explicitly, the default tracks the active `mode`.\n *\n * @slot header - Title row / actions. Sticks to the top of the pane.\n * @slot - The pane content. Scrolls if it overflows.\n *\n * @csspart container - The visual surface.\n * @csspart header\n * @csspart content\n * @csspart scrim - The modal scrim (sidebar mode only).\n *\n * @fires open - When the pane opens. Bubbles, composed.\n * @fires close - When the pane closes. Bubbles, composed.\n */\n@customElement('u-pane')\nexport class Pane extends LitElement {\n static override styles = [baseStyles, styles];\n\n /**\n * Background treatment. `filled` gives the pane its own card chrome\n * (`surface-container-low` + `--u-pane-filled-shape-corner`, default\n * `medium` / 12dp). `transparent` blends with the scaffold background.\n * Override the surface tone via `--u-pane-filled-bg-color`.\n */\n @property({ type: String, reflect: true })\n variant: PaneVariant = 'transparent';\n\n /**\n * Behaviour at the base (no-breakpoint-qualifier) level. `fixed` keeps\n * the pane in the scaffold flex row at all times; `collapsible` makes\n * it disappear from the row when `open=false`; `sidebar` and\n * `fullscreen` render the pane as a modal overlay against the\n * scaffold when `open=true`.\n */\n @property({ type: String, reflect: true })\n mode: PaneMode = 'fixed';\n\n /**\n * Mode override applied from the `sm` breakpoint (≥ 600px) upward.\n * Falls back to `mode` when unset. Resolved purely in CSS.\n */\n @property({ type: String, reflect: true, attribute: 'mode-sm' })\n modeSm?: PaneMode;\n\n /** Mode override applied from `md` (≥ 840px) upward. */\n @property({ type: String, reflect: true, attribute: 'mode-md' })\n modeMd?: PaneMode;\n\n /** Mode override applied from `lg` (≥ 1200px) upward. */\n @property({ type: String, reflect: true, attribute: 'mode-lg' })\n modeLg?: PaneMode;\n\n /** Mode override applied from `xl` (≥ 1600px) upward. */\n @property({ type: String, reflect: true, attribute: 'mode-xl' })\n modeXl?: PaneMode;\n\n /**\n * Whether the breakpoint overrides query the viewport (`media`,\n * default) or the nearest container with `container-type` set\n * (`container`). Switching to `container` lets the pane react to its\n * scaffold's own size when the scaffold lives in a constrained layout\n * — see `u-scaffold` which sets `container-type: inline-size`.\n */\n @property({ type: String, reflect: true, attribute: 'query-context' })\n queryContext: PaneQueryContext = 'media';\n\n /**\n * How the pane animates in/out when `open` toggles (modal modes) or\n * when it enters/leaves the flex flow (`collapsible`). `none` disables\n * the transition entirely; `exit` (default) slides the modal off-screen\n * and infers the direction from the scaffold-assigned `data-align`\n * (`start` → leading edge, `end` → trailing edge); `exit-start` and\n * `exit-end` force a side regardless of `data-align`; `fade` swaps\n * the slide for an opacity transition (modal stays in place and fades\n * through).\n */\n @property({ type: String, reflect: true })\n animation: PaneAnimation = 'exit';\n\n /**\n * Animation override applied from the `sm` breakpoint (≥ 600px) upward.\n * Falls back to `animation` when unset. Resolved purely in CSS.\n */\n @property({ type: String, reflect: true, attribute: 'animation-sm' })\n animationSm?: PaneAnimation;\n\n /** Animation override applied from `md` (≥ 840px) upward. */\n @property({ type: String, reflect: true, attribute: 'animation-md' })\n animationMd?: PaneAnimation;\n\n /** Animation override applied from `lg` (≥ 1200px) upward. */\n @property({ type: String, reflect: true, attribute: 'animation-lg' })\n animationLg?: PaneAnimation;\n\n /** Animation override applied from `xl` (≥ 1600px) upward. */\n @property({ type: String, reflect: true, attribute: 'animation-xl' })\n animationXl?: PaneAnimation;\n\n /**\n * Programmatic open state. Default is computed from `mode`:\n * `true` for `fixed` / `collapsible`, `false` for `sidebar` /\n * `fullscreen`. Once the consumer sets this explicitly (attribute,\n * property or `show()` / `close()`), the explicit value sticks.\n *\n * In `fixed` mode the pane is visible regardless of `open`.\n */\n @property({ type: Boolean })\n get open(): boolean {\n return this.#explicitOpen ?? !MODAL_MODES.has(this.mode);\n }\n\n set open(value: boolean) {\n const wasOpen = this.open;\n this.#explicitOpen = value;\n\n if (wasOpen !== value) {\n this.requestUpdate('open', wasOpen);\n this.dispatchEvent(new Event(value ? 'open' : 'close', {\n bubbles: true,\n composed: true,\n }));\n }\n }\n\n #explicitOpen: boolean | null = null;\n #lastReflectedOpen: boolean | null = null;\n #keydownAttached = false;\n\n /** Opens the pane. Equivalent to `open = true`. */\n show(): void {\n this.open = true;\n }\n\n /** Closes the pane. Equivalent to `open = false`. */\n close(): void {\n this.open = false;\n }\n\n /** Toggles `open`. */\n toggle(): void {\n this.open = !this.open;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n if (this.#keydownAttached) {\n document.removeEventListener('keydown', this.#onKeydown);\n this.#keydownAttached = false;\n }\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n\n // Manual attribute reflection for `open`: since the default is\n // derived from `mode`, we can't use `reflect: true` directly (Lit\n // would never see \"open\" change on a pure mode flip). Toggle the\n // attribute ourselves whenever the effective value drifts.\n const isOpen = this.open;\n if (this.#lastReflectedOpen !== isOpen) {\n this.toggleAttribute('open', isOpen);\n this.#lastReflectedOpen = isOpen;\n }\n\n // Escape key closes any modal-mode pane while open. We attach the\n // listener lazily so non-modal panes never touch `document`.\n const wantsKeydown = isOpen && MODAL_MODES.has(this.mode);\n if (wantsKeydown && !this.#keydownAttached) {\n document.addEventListener('keydown', this.#onKeydown);\n this.#keydownAttached = true;\n } else if (!wantsKeydown && this.#keydownAttached) {\n document.removeEventListener('keydown', this.#onKeydown);\n this.#keydownAttached = false;\n }\n }\n\n protected override render(): HTMLTemplateResult {\n return html`\n <div class=\"scrim\" part=\"scrim\" @click=${this.#onScrimClick}></div>\n <aside class=\"container\" part=\"container\">\n <header class=\"header\" part=\"header\">\n <slot name=\"header\"></slot>\n </header>\n <div class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n </aside>\n `;\n }\n\n readonly #onScrimClick = (): void => {\n this.close();\n };\n\n readonly #onKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Escape' && this.open && MODAL_MODES.has(this.mode)) {\n this.close();\n }\n };\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'u-pane': Pane;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.styles.d.ts","sourceRoot":"","sources":["../../src/scaffold/pane.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAk3DlB,CAAC"}
|