@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,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use u-datepicker and u-range-datepicker — calendar popover for single or range date selection, with editable input mode, locales, and display formats.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Date picker
|
|
6
|
+
|
|
7
|
+
`<u-datepicker>` (single date) and `<u-range-datepicker>` (date range) are form-associated text fields with a calendar popover. For inline-only usage, the library also exposes `<u-calendar>` and `<u-range-calendar>`.
|
|
8
|
+
|
|
9
|
+
## Single date
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-datepicker
|
|
13
|
+
label="Date"
|
|
14
|
+
placeholder="YYYY-MM-DD"
|
|
15
|
+
></u-datepicker>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The value is always ISO `YYYY-MM-DD` (suitable for form submission). The displayed value is formatted per the `format` prop.
|
|
19
|
+
|
|
20
|
+
## Display formats
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<u-datepicker label="Short" format="short"></u-datepicker> <!-- 12/31/2025 -->
|
|
24
|
+
<u-datepicker label="Medium" format="medium"></u-datepicker> <!-- Dec 31, 2025 -->
|
|
25
|
+
<u-datepicker label="Long" format="long"></u-datepicker> <!-- December 31, 2025 -->
|
|
26
|
+
<u-datepicker label="Full" format="full"></u-datepicker> <!-- Wednesday, December 31, 2025 -->
|
|
27
|
+
<u-datepicker label="ISO" format="iso"></u-datepicker> <!-- 2025-12-31 -->
|
|
28
|
+
|
|
29
|
+
<u-datepicker
|
|
30
|
+
label="Custom"
|
|
31
|
+
[format]="{ year: 'numeric', month: '2-digit', day: '2-digit' }">
|
|
32
|
+
</u-datepicker>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`format` accepts named presets, `'iso'`, or any `Intl.DateTimeFormatOptions` object.
|
|
36
|
+
|
|
37
|
+
## Locale
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<u-datepicker label="Data" locale="pt-BR" format="long"></u-datepicker>
|
|
41
|
+
<u-datepicker label="日付" locale="ja-JP" format="full"></u-datepicker>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
When omitted, falls back to `navigator.language`. Also drives the calendar's month/weekday labels.
|
|
45
|
+
|
|
46
|
+
## Editable input mode
|
|
47
|
+
|
|
48
|
+
Default — clicking the field opens the calendar; typing is blocked.
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<u-datepicker label="Date"></u-datepicker>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Editable — the input becomes a native `<input type="date">`; the trailing calendar icon opens the popover:
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<u-datepicker label="Date" editable></u-datepicker>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
In editable mode the browser's native date-format mask is hidden until the user focuses the field (so it doesn't visually collide with the floating label).
|
|
61
|
+
|
|
62
|
+
## Read-only
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<u-datepicker label="Date" value="2025-12-31" readOnly></u-datepicker>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Range
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<u-range-datepicker
|
|
72
|
+
label="Stay"
|
|
73
|
+
placeholder="YYYY-MM-DD - YYYY-MM-DD"
|
|
74
|
+
format="medium"
|
|
75
|
+
></u-range-datepicker>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Value format is `YYYY-MM-DD - YYYY-MM-DD`. Same `format`/`locale`/`editable`/`readOnly` props.
|
|
79
|
+
|
|
80
|
+
## Inline calendar (no field)
|
|
81
|
+
|
|
82
|
+
`<u-calendar>` (single) and `<u-range-calendar>` (range) embed the calendar in your own layout (sidebars, custom popovers).
|
|
83
|
+
|
|
84
|
+
```html
|
|
85
|
+
<u-calendar id="cal" locale="pt-BR"></u-calendar>
|
|
86
|
+
<script>
|
|
87
|
+
const cal = document.getElementById('cal');
|
|
88
|
+
cal.value = '2026-06-02'; // ISO get/set (range: 'YYYY-MM-DD - YYYY-MM-DD')
|
|
89
|
+
cal.addEventListener('change', () => console.log(cal.value)); // a pick also fires `input`
|
|
90
|
+
</script>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Inline-calendar gotchas (not obvious):
|
|
94
|
+
- `value` is an ISO string (get/set). A day click fires **both** `input` and `change`, with `e.target.value` = the ISO date.
|
|
95
|
+
- Setting `.value` does **not** move the displayed month — set `.month` / `.year` separately to open on a specific month.
|
|
96
|
+
- `locale` drives the month/weekday labels (defaults to `navigator.language`; use `locale="pt-BR"` for Portuguese).
|
|
97
|
+
|
|
98
|
+
## Positioning inside clipped containers
|
|
99
|
+
|
|
100
|
+
`menu-positioning="fixed"` lets the popover escape any scrollable wrapper:
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<u-datepicker label="Date" menu-positioning="fixed"></u-datepicker>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Caveats
|
|
107
|
+
|
|
108
|
+
- `value` is always ISO. Format strings only affect display.
|
|
109
|
+
- In editable mode the field uses the browser's native `<input type="date">`, which means OS-level keyboard handling and locale conventions for the typing UX.
|
|
110
|
+
- The popover opens below the field with `direction="down-end"`. Use `menu-positioning="fixed"` if the field is in a scaffold scroll area to avoid being clipped.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show modal dialogs — declarative u-dialog with slots, or imperative Dialog.message() / Dialog.confirm() builders.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Dialog
|
|
6
|
+
|
|
7
|
+
Two patterns: a declarative `<u-dialog>` you keep in markup and `show()`/`close()` programmatically, or one-shot imperative builders for the common alert/confirm flows.
|
|
8
|
+
|
|
9
|
+
## Declarative
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-button (click)="dialog.show()">Open dialog</u-button>
|
|
13
|
+
|
|
14
|
+
<u-dialog #dialog>
|
|
15
|
+
<span class="material-symbols-outlined" slot="icon">mobile_friendly</span>
|
|
16
|
+
<span slot="headline">Update available</span>
|
|
17
|
+
<span>A new version of the app is ready. Restart now to apply the update.</span>
|
|
18
|
+
<u-button slot="actions" variant="text" (click)="dialog.close('ok')">Restart</u-button>
|
|
19
|
+
<u-button slot="actions" variant="text" (click)="dialog.close('cancel')">Later</u-button>
|
|
20
|
+
</u-dialog>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Slots: `icon`, `headline`, default (body), `actions`. Each is optional.
|
|
24
|
+
|
|
25
|
+
API:
|
|
26
|
+
- `show()` / `close(returnValue?)` — open / close. Closing with a value sets `dialog.returnValue`.
|
|
27
|
+
- `open` property mirrors `show()`/`close()`.
|
|
28
|
+
- `closed` and `cancel` events. Calling `event.preventDefault()` on `cancel` blocks dismissal.
|
|
29
|
+
|
|
30
|
+
### `<form method="dialog">`
|
|
31
|
+
|
|
32
|
+
Buttons with `form="form-id" value="…"` inside a `method="dialog"` form close the dialog with the submitter's value:
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<u-dialog #d>
|
|
36
|
+
<span slot="headline">Rename file</span>
|
|
37
|
+
<form id="rename" method="dialog">
|
|
38
|
+
<u-text-field label="File name" autofocus name="filename"></u-text-field>
|
|
39
|
+
</form>
|
|
40
|
+
<u-button slot="actions" variant="text" form="rename" value="save">Save</u-button>
|
|
41
|
+
<u-button slot="actions" variant="text" form="rename" value="cancel">Cancel</u-button>
|
|
42
|
+
</u-dialog>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Long content
|
|
46
|
+
|
|
47
|
+
The dialog draws subtle dividers above the headline and below the actions when the body overflows. No extra setup needed — just put your content in the default slot.
|
|
48
|
+
|
|
49
|
+
### Action button order
|
|
50
|
+
|
|
51
|
+
`.actions` uses `flex-direction: row-reverse`, so the **first child in DOM order renders on the right** (the confirming action, per M3). Always put the affirmative button first in markup.
|
|
52
|
+
|
|
53
|
+
## Imperative — message
|
|
54
|
+
|
|
55
|
+
One-shot alert dialog with a single acknowledge button. Removes itself from the DOM on close.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { Dialog } from '@universal-material/web';
|
|
59
|
+
|
|
60
|
+
Dialog
|
|
61
|
+
.message('Your changes have been saved.')
|
|
62
|
+
.headline('Saved')
|
|
63
|
+
.acknowledgeButton({ label: 'Got it', variant: 'filled' })
|
|
64
|
+
.show();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Imperative — confirm
|
|
68
|
+
|
|
69
|
+
One-shot confirm dialog. `show()` returns a `Promise<boolean>` that resolves `true` on confirm, `false` on cancel/dismiss.
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import { Dialog } from '@universal-material/web';
|
|
73
|
+
|
|
74
|
+
const ok = await Dialog
|
|
75
|
+
.confirm('This action cannot be undone. Continue?')
|
|
76
|
+
.headline('Delete item')
|
|
77
|
+
.confirmButton({ label: 'Delete', variant: 'filled', color: 'error' })
|
|
78
|
+
.cancelButton({ label: 'Keep it' })
|
|
79
|
+
.show();
|
|
80
|
+
|
|
81
|
+
if (ok) {
|
|
82
|
+
// …perform deletion
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`confirmButton` / `cancelButton` accept any `{ variant, color, label }` — omitted fields fall back to defaults from `config.dialog.confirmDefaults`.
|
|
87
|
+
|
|
88
|
+
## Caveats
|
|
89
|
+
|
|
90
|
+
- The dialog opens via `<dialog>.showModal()` so it stacks above everything (no z-index gymnastics) and traps focus.
|
|
91
|
+
- The imperative builders run their lifecycle outside any framework's change-detection zone (the closed event fires from a transition listener). In Angular, call `ChangeDetectorRef.detectChanges()` after `await …show()` if the resolved value drives template bindings.
|
|
92
|
+
- Don't import `'@universal-material/web/dialog/dialog-builder.js'` directly — it doesn't register `u-button`; use the package root or the dialog entry which already pulls it in.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Add a side navigation drawer to an app — sections with headlines, drawer items with icons and badges, toggleable on mobile.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Side navigation drawer
|
|
6
|
+
|
|
7
|
+
`<u-side-navigation>` wraps a page with a left-side drawer (`<u-drawer>`) that toggles open/closed. Inside the drawer, group items with `<u-drawer-headline>` and use `<u-drawer-item>` for each link.
|
|
8
|
+
|
|
9
|
+
## Basic usage
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-side-navigation #nav>
|
|
13
|
+
<u-top-app-bar headline="My app">
|
|
14
|
+
<u-icon-button slot="leading-icon" type="button"
|
|
15
|
+
(click)="nav.toggleDrawer = !nav.toggleDrawer">
|
|
16
|
+
<span class="material-symbols-outlined">menu</span>
|
|
17
|
+
</u-icon-button>
|
|
18
|
+
</u-top-app-bar>
|
|
19
|
+
|
|
20
|
+
<u-drawer slot="drawer">
|
|
21
|
+
<u-drawer-headline>Library</u-drawer-headline>
|
|
22
|
+
<u-drawer-item active>
|
|
23
|
+
<span class="material-symbols-outlined" slot="icon">home</span>
|
|
24
|
+
Home
|
|
25
|
+
</u-drawer-item>
|
|
26
|
+
<u-drawer-item>
|
|
27
|
+
<span class="material-symbols-outlined" slot="icon">favorite</span>
|
|
28
|
+
Favorites
|
|
29
|
+
<span slot="badge">12</span>
|
|
30
|
+
</u-drawer-item>
|
|
31
|
+
|
|
32
|
+
<u-drawer-headline>Account</u-drawer-headline>
|
|
33
|
+
<u-drawer-item>
|
|
34
|
+
<span class="material-symbols-outlined" slot="icon">settings</span>
|
|
35
|
+
Settings
|
|
36
|
+
</u-drawer-item>
|
|
37
|
+
</u-drawer>
|
|
38
|
+
|
|
39
|
+
<!-- the main page content goes here as light DOM -->
|
|
40
|
+
<div class="u-container">
|
|
41
|
+
Page body
|
|
42
|
+
</div>
|
|
43
|
+
</u-side-navigation>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The side-navigation:
|
|
47
|
+
- responsively shows the drawer permanently on wide viewports and toggles it as an overlay on narrow ones,
|
|
48
|
+
- sets `--u-app-bar-offset` so the slotted top app bar slides with the drawer,
|
|
49
|
+
- exposes `.toggleDrawer` (boolean) for programmatic control.
|
|
50
|
+
|
|
51
|
+
## Drawer items
|
|
52
|
+
|
|
53
|
+
`<u-drawer-item>` slots:
|
|
54
|
+
- default — the label,
|
|
55
|
+
- `icon` — leading icon (24dp),
|
|
56
|
+
- `badge` — trailing badge **content** (plain text in a `<span slot="badge">`, e.g. a count). The drawer item styles this itself — it pins the content to the trailing edge inline with the row.
|
|
57
|
+
|
|
58
|
+
**Don't put a `<u-badge>` in the `badge` slot.** `<u-badge>` is the *floating* badge used to dot the corner of an icon (notification bell, rail item); it's `position: absolute`. Dropped into a drawer item's inline `badge` slot it floats out of place instead of sitting at the row's trailing edge. Pass the value as a `<span slot="badge">12</span>` — the drawer item provides the badge treatment. (Note this differs from `<u-navigation-rail-item>`, whose collapsed state *does* take a `<u-badge>` because the badge floats over the icon there.)
|
|
59
|
+
|
|
60
|
+
Attributes:
|
|
61
|
+
- `active` — highlights the item with the secondary-container pill (M3 active state).
|
|
62
|
+
- `href` / `target` — renders as a link instead of a button.
|
|
63
|
+
- `keep-drawer-open` — by default, clicking an item auto-closes the drawer on mobile; set this to disable.
|
|
64
|
+
|
|
65
|
+
## Routing
|
|
66
|
+
|
|
67
|
+
For framework routing, set `routerLink` (Angular) / `to` (Vue Router) / `href` on the item and let the framework's link directive handle navigation; the drawer item still emits a click and auto-closes the drawer.
|
|
68
|
+
|
|
69
|
+
## Sections
|
|
70
|
+
|
|
71
|
+
Group items with `<u-drawer-headline>` between them. The headline renders a small label-style title above its section.
|
|
72
|
+
|
|
73
|
+
## Background — and the trap when slotting a drawer into a pane
|
|
74
|
+
|
|
75
|
+
`<u-drawer>` paints its own background, and that color is **breakpoint-dependent**:
|
|
76
|
+
- below `lg`: `--u-modal-drawer-bg-color` (default `surface-container-low`) — the modal drawer surface;
|
|
77
|
+
- at `lg`+: `--u-standard-drawer-bg-color` (default `surface` / body) — a *standard* permanent drawer is meant to read as part of the page background, so it deliberately matches `surface`.
|
|
78
|
+
|
|
79
|
+
That default is correct for a drawer used directly inside `<u-side-navigation>`. **But if you slot a `<u-drawer>` into a `<u-pane variant="filled">` (e.g. a settings section-nav in a list-detail), the drawer's surface paints over the pane's filled background.** The visible bug: the nav column shows a background at small/medium widths, then goes flat/background-less on desktop — because at `lg`+ the drawer flips to `surface` (= the scaffold body) and erases the pane's fill. It looks like the pane "lost its background"; really the drawer is painting on top with body color.
|
|
80
|
+
|
|
81
|
+
Fix it at the drawer: when the pane is the surface, make the drawer transparent so the pane shows through at every breakpoint.
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<u-pane variant="filled" style="--u-modal-drawer-bg-color: transparent; --u-standard-drawer-bg-color: transparent;">
|
|
85
|
+
<u-drawer>…</u-drawer>
|
|
86
|
+
</u-pane>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
(The two custom properties are inherited, so setting them on the pane reaches the drawer.) Don't try to fix it by raising the *pane's* `--u-pane-filled-bg-color` — the drawer still paints over it on desktop, so the column stays flat.
|
|
90
|
+
|
|
91
|
+
## Caveats
|
|
92
|
+
|
|
93
|
+
- The drawer is a sibling of the page content inside `<u-side-navigation>`, not a child of the top bar. Don't nest it under the bar.
|
|
94
|
+
- On wide viewports the drawer is permanent; the toggle button still works but the drawer never closes. Use `keep-drawer-open` on items you'd otherwise want auto-closing only on mobile — it's safe either way.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use u-expansion-panel for collapsible sections; wrap in u-expansion-panel-container for accordion behavior.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Expansion panel
|
|
6
|
+
|
|
7
|
+
Collapsible surface with a clickable header (with ripple + chevron). Animates via the internal [[collapse]] component.
|
|
8
|
+
|
|
9
|
+
## Single panel
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-expansion-panel>
|
|
13
|
+
<span slot="header">What is Material 3 Expressive?</span>
|
|
14
|
+
<div style="padding: 0 1rem 1rem;">
|
|
15
|
+
Material 3 Expressive is the latest iteration of Material Design.
|
|
16
|
+
</div>
|
|
17
|
+
</u-expansion-panel>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Accordion (exclusive)
|
|
21
|
+
|
|
22
|
+
Wrap multiple panels in `u-expansion-panel-container` — opening one closes the others.
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<u-expansion-panel-container>
|
|
26
|
+
<u-expansion-panel>
|
|
27
|
+
<span slot="header">Account</span>
|
|
28
|
+
<div style="padding: 0 1rem 1rem;">Manage email, password, and connected services.</div>
|
|
29
|
+
</u-expansion-panel>
|
|
30
|
+
<u-expansion-panel>
|
|
31
|
+
<span slot="header">Notifications</span>
|
|
32
|
+
<div style="padding: 0 1rem 1rem;">Choose how and when you want to be notified.</div>
|
|
33
|
+
</u-expansion-panel>
|
|
34
|
+
</u-expansion-panel-container>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Multi (independent panels)
|
|
38
|
+
|
|
39
|
+
Add `multi` to keep multiple panels open simultaneously.
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<u-expansion-panel-container multi>
|
|
43
|
+
<u-expansion-panel expanded>
|
|
44
|
+
<span slot="header">Always-open</span>
|
|
45
|
+
<div style="padding: 0 1rem 1rem;">Set <code>expanded</code> for the initial state.</div>
|
|
46
|
+
</u-expansion-panel>
|
|
47
|
+
<u-expansion-panel>
|
|
48
|
+
<span slot="header">Independent</span>
|
|
49
|
+
<div style="padding: 0 1rem 1rem;">Stays open when others open.</div>
|
|
50
|
+
</u-expansion-panel>
|
|
51
|
+
</u-expansion-panel-container>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Attributes
|
|
55
|
+
|
|
56
|
+
- `expanded` — current open state. Reflects to the attribute; dispatches `change` (bubbles, composed) when toggled.
|
|
57
|
+
- `disabled` — prevents toggling and silences the ripple.
|
|
58
|
+
- `hide-toggle` — hides the default chevron icon.
|
|
59
|
+
- `multi` (container) — allow multiple panels open at once.
|
|
60
|
+
|
|
61
|
+
## Caveats
|
|
62
|
+
|
|
63
|
+
- Put the header content in `slot="header"`. The default slot is the panel body (wrapped internally in `u-collapse`).
|
|
64
|
+
- The container coordinates panels via the `change` event bubbling out of each panel — works with panels added/removed dynamically.
|
|
65
|
+
- Sibling-close logic uses `querySelectorAll('u-expansion-panel')` against direct descendants of the container only — nested containers operate independently.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Add a floating action button — u-fab (single primary action), u-fab-menu (expandable speed-dial with multiple items).
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# FAB and FAB menu
|
|
6
|
+
|
|
7
|
+
## `<u-fab>` — single primary action
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<u-fab>
|
|
11
|
+
<span class="material-symbols-outlined">edit</span>
|
|
12
|
+
</u-fab>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Colors: `primary` (default), `secondary`, `tertiary`, `surface`, `branded`.
|
|
16
|
+
Sizes: `small`, `medium` (default), `large`.
|
|
17
|
+
|
|
18
|
+
Extended FAB (with label):
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<u-fab label="Compose">
|
|
22
|
+
<span class="material-symbols-outlined">edit</span>
|
|
23
|
+
</u-fab>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Lowered elevation:
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<u-fab lowered>
|
|
30
|
+
<span class="material-symbols-outlined">add</span>
|
|
31
|
+
</u-fab>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Positioning
|
|
35
|
+
|
|
36
|
+
Inside a `<u-scaffold>`, drop the FAB in the `fab` slot — it's anchored to the scaffold's bottom-right with the correct M3 16dp gap, and offsets above the navigation bar automatically:
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<u-scaffold>
|
|
40
|
+
<!-- … top-bar, content, bottom-bar … -->
|
|
41
|
+
<u-fab slot="fab" color="primary">
|
|
42
|
+
<span class="material-symbols-outlined">edit</span>
|
|
43
|
+
</u-fab>
|
|
44
|
+
</u-scaffold>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For ad-hoc placement, wrap the FAB in a positioned container.
|
|
48
|
+
|
|
49
|
+
## `<u-fab-menu>` — speed-dial
|
|
50
|
+
|
|
51
|
+
A FAB that toggles into multiple `<u-fab-menu-item>`s when clicked:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<u-fab-menu color="primary">
|
|
55
|
+
<span class="material-symbols-outlined" slot="icon">add</span>
|
|
56
|
+
|
|
57
|
+
<u-fab-menu-item label="New doc">
|
|
58
|
+
<span class="material-symbols-outlined">description</span>
|
|
59
|
+
</u-fab-menu-item>
|
|
60
|
+
<u-fab-menu-item label="New folder">
|
|
61
|
+
<span class="material-symbols-outlined">folder</span>
|
|
62
|
+
</u-fab-menu-item>
|
|
63
|
+
<u-fab-menu-item label="Upload">
|
|
64
|
+
<span class="material-symbols-outlined">upload</span>
|
|
65
|
+
</u-fab-menu-item>
|
|
66
|
+
</u-fab-menu>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Slots on `<u-fab-menu>`:
|
|
70
|
+
- `icon` — the closed-state icon (e.g. `add`),
|
|
71
|
+
- `close-icon` — the open-state icon (defaults to an "×").
|
|
72
|
+
|
|
73
|
+
The toggle FAB animates between the two icons; menu items animate in/out around it.
|
|
74
|
+
|
|
75
|
+
## Caveats
|
|
76
|
+
|
|
77
|
+
- `<u-fab-menu>` keeps `pointer-events: none` on its host so the invisible menu-items area (when closed) passes clicks through to whatever is behind it. Don't blanket-override slotted children with `pointer-events: auto`.
|
|
78
|
+
- When slotted into `<u-scaffold>` the scaffold neutralizes the FAB menu's internal `--u-fab-menu-toggle-margin` so the visible toggle aligns with the wrapper box (otherwise it would sit too close to the bottom bar).
|
|
79
|
+
- A FAB does not auto-react to scroll yet — the `scrollContainer` attribute is reserved for future hide-on-scroll behavior.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Render Material 3 lists — u-list + u-list-item, with leading icons, supporting text, badges and trailing actions.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# List
|
|
6
|
+
|
|
7
|
+
`<u-list>` is a vertical stack of `<u-list-item>`s. Each item supports leading and trailing slots, supporting text and selection states.
|
|
8
|
+
|
|
9
|
+
## Basic
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-list>
|
|
13
|
+
<u-list-item>Inbox</u-list-item>
|
|
14
|
+
<u-list-item>Drafts</u-list-item>
|
|
15
|
+
<u-list-item>Sent</u-list-item>
|
|
16
|
+
</u-list>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Two-line items with icons
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<u-list>
|
|
23
|
+
<u-list-item>
|
|
24
|
+
<span class="material-symbols-outlined" slot="leading-icon">person</span>
|
|
25
|
+
Maria Andrade
|
|
26
|
+
<span slot="supporting-text">maria@example.com</span>
|
|
27
|
+
</u-list-item>
|
|
28
|
+
|
|
29
|
+
<u-list-item>
|
|
30
|
+
<span class="material-symbols-outlined" slot="leading-icon">person</span>
|
|
31
|
+
Carlos Pereira
|
|
32
|
+
<span slot="supporting-text">carlos@example.com</span>
|
|
33
|
+
</u-list-item>
|
|
34
|
+
</u-list>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Trailing content
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<u-list-item>
|
|
41
|
+
<span class="material-symbols-outlined" slot="leading-icon">archive</span>
|
|
42
|
+
Archive
|
|
43
|
+
<u-icon-button slot="trailing-icon">
|
|
44
|
+
<span class="material-symbols-outlined">chevron_right</span>
|
|
45
|
+
</u-icon-button>
|
|
46
|
+
</u-list-item>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Selectable rows
|
|
50
|
+
|
|
51
|
+
`selectable` adds the ripple + hover **state layer** so the row reads as interactive:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<u-list>
|
|
55
|
+
<u-list-item selectable onclick="…">One</u-list-item>
|
|
56
|
+
<u-list-item selectable onclick="…">Two</u-list-item>
|
|
57
|
+
</u-list>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For a persistent **active / selected** highlight (e.g. the open row in a list-detail or mail list), use the **`selected`** attribute/property — it paints the M3 selected container (`secondary-container` / `on-secondary-container`):
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<u-list>
|
|
64
|
+
<u-list-item selectable selected>One</u-list-item>
|
|
65
|
+
<u-list-item selectable>Two</u-list-item>
|
|
66
|
+
</u-list>
|
|
67
|
+
<script>
|
|
68
|
+
list.addEventListener('click', (e) => {
|
|
69
|
+
const item = e.target.closest('u-list-item');
|
|
70
|
+
if (!item) return;
|
|
71
|
+
list.querySelectorAll('u-list-item[selected]').forEach((i) => (i.selected = false));
|
|
72
|
+
item.selected = true;
|
|
73
|
+
});
|
|
74
|
+
</script>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Override the selected colors per call site with `--u-list-item-selected-container-color` / `--u-list-item-selected-label-color`. For selection lists tied to a form value, use the dedicated `<u-checkbox-list-item>`, `<u-radio-list-item>`, or `<u-switch-list-item>` (see the **selection-controls** skill).
|
|
78
|
+
|
|
79
|
+
## Aligning a row flush (`no-inset`)
|
|
80
|
+
|
|
81
|
+
List items carry a 16dp inline inset, so their content sits indented from adjacent non-list content (section headings, paragraph labels). Add **`no-inset`** to pull the row flush — it cancels the inline padding with an equal negative inline margin, so the content lines up with the surrounding labels (the state layer bleeds to the container edges):
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<div class="u-title-s">Channels</div>
|
|
85
|
+
<u-list>
|
|
86
|
+
<u-list-item no-inset>Email</u-list-item>
|
|
87
|
+
<u-list-item no-inset>Push</u-list-item>
|
|
88
|
+
</u-list>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The `*-list-item` selection variants accept `no-inset` too (it's forwarded to their inner list item) — handy in settings sections where the row should line up with the heading.
|
|
92
|
+
|
|
93
|
+
## Three-line items
|
|
94
|
+
|
|
95
|
+
A second line of supporting text wraps automatically when content exceeds one line; for an explicitly tall three-line variant, use multiple `<span slot="supporting-text">` lines.
|
|
96
|
+
|
|
97
|
+
## Dividers and sections
|
|
98
|
+
|
|
99
|
+
For grouped lists with headlines, mix `<u-drawer-headline>`-style elements between groups, or use the `card`/`outlined-card` containers around each section.
|
|
100
|
+
|
|
101
|
+
## Caveats
|
|
102
|
+
|
|
103
|
+
- `<u-list-item>` slots accept any node — keep leading/trailing icons inside `<span class="material-symbols-outlined">` or `<u-icon-button>` for consistent sizing.
|
|
104
|
+
- `<u-list>` is unopinionated about scrolling. For long lists inside a constrained container, wrap the list in a `<div style="overflow:auto; max-height: …">`.
|
|
105
|
+
- For very long lists (1000+ items), the M3 list is fine but consider virtualization (`@lit-labs/virtualizer`).
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open contextual menus — u-menu and u-menu-item for popovers anchored to a trigger, plus u-overflow-menu for action bars that auto-collapse on narrow widths.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Menus
|
|
6
|
+
|
|
7
|
+
## `<u-menu>` + `<u-menu-item>` — popover
|
|
8
|
+
|
|
9
|
+
A floating surface anchored to a trigger. Open with `.show()`/`.toggle()`/`.close()` (or by setting `open`):
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-icon-button (click)="menu.toggle()">
|
|
13
|
+
<span class="material-symbols-outlined">more_vert</span>
|
|
14
|
+
</u-icon-button>
|
|
15
|
+
|
|
16
|
+
<u-menu #menu>
|
|
17
|
+
<u-menu-item>
|
|
18
|
+
<span class="material-symbols-outlined" slot="leading-icon">edit</span>
|
|
19
|
+
Edit
|
|
20
|
+
</u-menu-item>
|
|
21
|
+
<u-menu-item>
|
|
22
|
+
<span class="material-symbols-outlined" slot="leading-icon">content_copy</span>
|
|
23
|
+
Duplicate
|
|
24
|
+
</u-menu-item>
|
|
25
|
+
<u-menu-item>
|
|
26
|
+
<span class="material-symbols-outlined" slot="leading-icon">delete</span>
|
|
27
|
+
Delete
|
|
28
|
+
</u-menu-item>
|
|
29
|
+
</u-menu>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
By default the menu anchors to its parent element. Set `anchorElement` explicitly when needed:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
menu.anchorElement = triggerButton;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Positioning
|
|
39
|
+
|
|
40
|
+
- **`anchor-corner`** — which corner of the anchor the menu attaches to. Supports `start-start`, `start-end`, `end-start`, `end-end`, plus `auto-start` / `auto-end` (auto picks top vs bottom based on space).
|
|
41
|
+
- **`direction`** — which way the menu grows: `up-start`, `up-end`, `down-start`, `down-end` (default).
|
|
42
|
+
|
|
43
|
+
For a dropdown right under the trigger, the defaults work. For a "more" menu in a top app bar, use `anchor-corner="end-end"`:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<u-menu anchor-corner="end-end" direction="down-start">…</u-menu>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Clipped containers
|
|
50
|
+
|
|
51
|
+
If the menu lives inside a `overflow: hidden` or scrollable wrapper, set `positioning="fixed"` so it escapes:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<u-menu positioning="fixed">…</u-menu>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Auto-close
|
|
58
|
+
|
|
59
|
+
- `autoclose="outside"` (default-ish) — closes on outside clicks but not on clicks inside the menu.
|
|
60
|
+
- `autoclose="true"` — closes on any click anywhere.
|
|
61
|
+
- `autoclose="false"` — never auto-closes; you manage it.
|
|
62
|
+
|
|
63
|
+
## `<u-overflow-menu>` — responsive action bar
|
|
64
|
+
|
|
65
|
+
A horizontal row of `<u-overflow-menu-item>`s that automatically collapses items into a "more" menu when there isn't enough horizontal space:
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<u-overflow-menu>
|
|
69
|
+
<u-overflow-menu-item label="Bold">
|
|
70
|
+
<span class="material-symbols-outlined">format_bold</span>
|
|
71
|
+
</u-overflow-menu-item>
|
|
72
|
+
<u-overflow-menu-item label="Italic">
|
|
73
|
+
<span class="material-symbols-outlined">format_italic</span>
|
|
74
|
+
</u-overflow-menu-item>
|
|
75
|
+
<u-overflow-menu-item label="Underline">
|
|
76
|
+
<span class="material-symbols-outlined">format_underlined</span>
|
|
77
|
+
</u-overflow-menu-item>
|
|
78
|
+
<u-overflow-menu-item label="Strikethrough">
|
|
79
|
+
<span class="material-symbols-outlined">format_strikethrough</span>
|
|
80
|
+
</u-overflow-menu-item>
|
|
81
|
+
|
|
82
|
+
<!-- Items marked collapse="always" never render inline -->
|
|
83
|
+
<u-overflow-menu-item label="Delete" collapse="always">
|
|
84
|
+
<span class="material-symbols-outlined">delete</span>
|
|
85
|
+
</u-overflow-menu-item>
|
|
86
|
+
</u-overflow-menu>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Inside a clipped wrapper (e.g. a card with `overflow: hidden`), set `menuPositioning="fixed"` so the popover can escape:
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<u-overflow-menu menuPositioning="fixed">…</u-overflow-menu>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Row "kebab" (all actions behind one trigger)
|
|
96
|
+
|
|
97
|
+
Mark every item `collapse="always"` so nothing renders inline and only the "more" trigger shows. Items render as **icon buttons** — the `label` is the tooltip/aria text, not visible — so give each an icon. Activation bubbles a `click` from the item; delegate and read it:
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
<u-overflow-menu menuPositioning="fixed">
|
|
101
|
+
<u-overflow-menu-item label="Ver" collapse="always"><span class="material-symbols-outlined">visibility</span></u-overflow-menu-item>
|
|
102
|
+
<u-overflow-menu-item label="Editar" collapse="always"><span class="material-symbols-outlined">edit</span></u-overflow-menu-item>
|
|
103
|
+
<u-overflow-menu-item label="Excluir" collapse="always"><span class="material-symbols-outlined">delete</span></u-overflow-menu-item>
|
|
104
|
+
</u-overflow-menu>
|
|
105
|
+
|
|
106
|
+
<script>
|
|
107
|
+
table.addEventListener('click', (e) => {
|
|
108
|
+
const item = e.target.closest('u-overflow-menu-item');
|
|
109
|
+
if (item) doAction(item.getAttribute('label'), e.target.closest('tr'));
|
|
110
|
+
});
|
|
111
|
+
</script>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For a single-trigger row menu, `<u-icon-button>` + `<u-menu>` (with `menu.anchorElement = theButton`) is often simpler than `<u-overflow-menu>`.
|
|
115
|
+
|
|
116
|
+
## Caveats
|
|
117
|
+
|
|
118
|
+
- A `<u-menu>` is not modal — it doesn't trap focus or scrim the background. Use `<u-dialog>` for modal flows.
|
|
119
|
+
- The overflow menu watches its anchor size with a `ResizeObserver`. If you swap the anchor or animate the container, it re-runs the layout pass automatically.
|
|
120
|
+
- `manualFocus` on `<u-menu>` disables the default auto-focus of the first item on open — useful when the menu wraps a calendar or other custom popover content.
|