material 3.8.0 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/badge/badge.d.ts +4 -0
- package/dist/components/badge/constants.d.ts +4 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/types.d.ts +102 -0
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +4 -0
- package/dist/components/bottom-app-bar/constants.d.ts +3 -0
- package/dist/components/bottom-app-bar/types.d.ts +42 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
- package/dist/components/bottom-sheet/constants.d.ts +9 -0
- package/dist/components/bottom-sheet/types.d.ts +52 -0
- package/dist/components/button/button.d.ts +4 -0
- package/dist/components/button/constants.d.ts +20 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/types.d.ts +190 -0
- package/dist/components/button-group/button-group.d.ts +4 -0
- package/dist/components/button-group/constants.d.ts +54 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/button-group/types.d.ts +125 -0
- package/dist/components/card/card.d.ts +4 -0
- package/dist/components/card/constants.d.ts +11 -0
- package/dist/components/card/content.d.ts +16 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/types.d.ts +123 -0
- package/dist/components/carousel/carousel.d.ts +1 -0
- package/dist/components/carousel/constants.d.ts +10 -0
- package/dist/components/carousel/features/scroll.js +1 -0
- package/dist/components/carousel/types.d.ts +16 -0
- package/dist/components/checkbox/checkbox.d.ts +5 -0
- package/dist/components/checkbox/constants.d.ts +13 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/types.d.ts +94 -0
- package/dist/components/chips/chips.d.ts +4 -0
- package/dist/components/chips/constants.d.ts +1 -0
- package/dist/components/chips/factories.d.ts +4 -0
- package/dist/components/chips/features/controller.js +4 -6
- package/dist/components/chips/types.d.ts +140 -0
- package/dist/components/datepicker/constants.d.ts +38 -0
- package/dist/components/datepicker/datepicker.d.ts +2 -0
- package/dist/components/datepicker/types.d.ts +139 -0
- package/dist/components/dialog/constants.d.ts +45 -0
- package/dist/components/dialog/dialog.d.ts +5 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/types.d.ts +196 -0
- package/dist/components/divider/config.d.ts +30 -0
- package/dist/components/divider/constants.d.ts +15 -0
- package/dist/components/divider/divider.d.ts +4 -0
- package/dist/components/divider/types.d.ts +27 -0
- package/dist/components/drawer/constants.d.ts +39 -0
- package/dist/components/drawer/drawer.d.ts +4 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/types.d.ts +109 -0
- package/dist/components/extended-fab/constants.d.ts +32 -0
- package/dist/components/extended-fab/extended-fab.d.ts +4 -0
- package/dist/components/extended-fab/types.d.ts +123 -0
- package/dist/components/fab/constants.d.ts +26 -0
- package/dist/components/fab/fab.d.ts +4 -0
- package/dist/components/fab/types.d.ts +100 -0
- package/dist/components/fab-menu/constants.d.ts +9 -0
- package/dist/components/fab-menu/fab-menu.d.ts +4 -0
- package/dist/components/fab-menu/types.d.ts +41 -0
- package/dist/components/icon-button/constants.d.ts +34 -0
- package/dist/components/icon-button/icon-button.d.ts +4 -0
- package/dist/components/icon-button/types.d.ts +157 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list/constants.d.ts +30 -0
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/list.d.ts +4 -0
- package/dist/components/list/types.d.ts +110 -0
- package/dist/components/loading-indicator/constants.d.ts +16 -0
- package/dist/components/loading-indicator/features/renderer.d.ts +13 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +4 -0
- package/dist/components/loading-indicator/types.d.ts +21 -0
- package/dist/components/menu/constants.d.ts +51 -0
- package/dist/components/menu/features/controller.js +1 -1
- package/dist/components/menu/features/keyboard.js +8 -3
- package/dist/components/menu/features/opener.js +2 -16
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/inner.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +4 -0
- package/dist/components/menu/on-demand.d.ts +9 -0
- package/dist/components/menu/types.d.ts +185 -1
- package/dist/components/navigation-bar/navigation-bar.d.ts +1 -0
- package/dist/components/navigation-bar/types.d.ts +12 -0
- package/dist/components/navigation-rail/constants.d.ts +2 -0
- package/dist/components/navigation-rail/navigation-rail.d.ts +1 -0
- package/dist/components/navigation-rail/types.d.ts +18 -0
- package/dist/components/progress/constants.d.ts +37 -0
- package/dist/components/progress/progress.d.ts +4 -0
- package/dist/components/progress/types.d.ts +136 -0
- package/dist/components/radios/constants.d.ts +14 -0
- package/dist/components/radios/radios.d.ts +4 -0
- package/dist/components/radios/types.d.ts +89 -0
- package/dist/components/search/constants.d.ts +34 -0
- package/dist/components/search/search.d.ts +4 -0
- package/dist/components/search/types.d.ts +109 -0
- package/dist/components/select/constants.d.ts +46 -0
- package/dist/components/select/features.js +9 -1
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.d.ts +4 -0
- package/dist/components/select/types.d.ts +95 -0
- package/dist/components/side-sheet/constants.d.ts +9 -0
- package/dist/components/side-sheet/side-sheet.d.ts +4 -0
- package/dist/components/side-sheet/types.d.ts +51 -0
- package/dist/components/slider/constants.d.ts +62 -0
- package/dist/components/slider/slider.d.ts +4 -0
- package/dist/components/slider/types.d.ts +78 -0
- package/dist/components/snackbar/constants.d.ts +37 -0
- package/dist/components/snackbar/snackbar.d.ts +5 -0
- package/dist/components/snackbar/types.d.ts +67 -0
- package/dist/components/split-button/api.js +13 -3
- package/dist/components/split-button/constants.d.ts +13 -0
- package/dist/components/split-button/split-button.d.ts +4 -0
- package/dist/components/split-button/types.d.ts +50 -0
- package/dist/components/switch/constants.d.ts +34 -0
- package/dist/components/switch/switch.d.ts +4 -0
- package/dist/components/switch/types.d.ts +55 -0
- package/dist/components/tabs/constants.d.ts +49 -0
- package/dist/components/tabs/indicator.d.ts +22 -0
- package/dist/components/tabs/responsive.d.ts +17 -0
- package/dist/components/tabs/tab.d.ts +5 -0
- package/dist/components/tabs/tabs.d.ts +4 -0
- package/dist/components/tabs/types.d.ts +170 -0
- package/dist/components/tabs/utils.d.ts +24 -0
- package/dist/components/text-field/constants.d.ts +61 -0
- package/dist/components/text-field/features/trailing-icon.d.ts +25 -0
- package/dist/components/text-field/text-field.d.ts +4 -0
- package/dist/components/text-field/types.d.ts +84 -0
- package/dist/components/timepicker/constants.d.ts +61 -0
- package/dist/components/timepicker/types.d.ts +145 -0
- package/dist/components/toolbar/constants.d.ts +8 -0
- package/dist/components/toolbar/toolbar.d.ts +4 -0
- package/dist/components/toolbar/types.d.ts +75 -0
- package/dist/components/tooltip/constants.d.ts +43 -0
- package/dist/components/tooltip/tooltip.d.ts +4 -0
- package/dist/components/tooltip/types.d.ts +78 -0
- package/dist/components/top-app-bar/constants.d.ts +29 -0
- package/dist/components/top-app-bar/top-app-bar.d.ts +4 -0
- package/dist/components/top-app-bar/types.d.ts +55 -0
- package/dist/core/canvas/animation.d.ts +6 -0
- package/dist/core/canvas/drawing.d.ts +47 -0
- package/dist/core/canvas/index.d.ts +1 -0
- package/dist/core/canvas/resize.d.ts +7 -0
- package/dist/core/canvas/utils.d.ts +39 -0
- package/dist/core/compose/base.d.ts +9 -0
- package/dist/core/compose/cleanup.d.ts +2 -0
- package/dist/core/compose/component.d.ts +13 -0
- package/dist/core/compose/features/badge.d.ts +10 -0
- package/dist/core/compose/features/checkable.d.ts +13 -0
- package/dist/core/compose/features/debounce.d.ts +19 -0
- package/dist/core/compose/features/disabled.d.ts +11 -0
- package/dist/core/compose/features/events.d.ts +19 -0
- package/dist/core/compose/features/icon.d.ts +20 -0
- package/dist/core/compose/features/input.d.ts +31 -0
- package/dist/core/compose/features/lifecycle.d.ts +16 -0
- package/dist/core/compose/features/position.d.ts +13 -0
- package/dist/core/compose/features/ripple.d.ts +17 -0
- package/dist/core/compose/features/size.d.ts +5 -0
- package/dist/core/compose/features/style.d.ts +5 -0
- package/dist/core/compose/features/text.d.ts +20 -0
- package/dist/core/compose/features/textinput.d.ts +39 -0
- package/dist/core/compose/features/textlabel.d.ts +18 -0
- package/dist/core/compose/features/throttle.d.ts +18 -0
- package/dist/core/compose/features/track.d.ts +12 -0
- package/dist/core/compose/features/variant.d.ts +5 -0
- package/dist/core/compose/features/withEvents.d.ts +12 -0
- package/dist/core/compose/pipe.d.ts +12 -0
- package/dist/core/compose/utils/type-guards.d.ts +5 -0
- package/dist/core/config/component.d.ts +17 -0
- package/dist/core/config/global.d.ts +15 -0
- package/dist/core/config.d.ts +34 -0
- package/dist/core/dom/attributes.d.ts +25 -0
- package/dist/core/dom/classes.d.ts +24 -0
- package/dist/core/dom/create.d.ts +47 -0
- package/dist/core/dom/events.d.ts +26 -0
- package/dist/core/dom/focus.d.ts +11 -0
- package/dist/core/dom/html.d.ts +6 -0
- package/dist/core/dom/layer.d.ts +36 -0
- package/dist/core/dom/roving.d.ts +7 -0
- package/dist/core/navigation/destinations.d.ts +10 -0
- package/dist/core/shapes/cubic.d.ts +8 -0
- package/dist/core/shapes/material.d.ts +45 -0
- package/dist/core/shapes/polygon.d.ts +11 -0
- package/dist/core/state/emitter.d.ts +19 -0
- package/dist/core/state/events.d.ts +17 -0
- package/dist/core/state/store.d.ts +40 -0
- package/dist/core/theme/shape.d.ts +3 -0
- package/dist/core/theme/tokens.d.ts +6 -0
- package/dist/core/utils/background.d.ts +7 -0
- package/dist/core/utils/color.d.ts +5 -0
- package/dist/core/utils/index.d.ts +9 -0
- package/dist/core/utils/mobile.d.ts +10 -0
- package/dist/core/utils/object.d.ts +9 -0
- package/dist/core/utils/performance.d.ts +20 -0
- package/dist/core/utils/theme.d.ts +8 -0
- package/dist/core/utils/url.d.ts +3 -0
- package/dist/elements/adapter.d.ts +24 -0
- package/dist/elements/badge.d.ts +4 -0
- package/dist/elements/bottom-app-bar.d.ts +4 -0
- package/dist/elements/bottom-sheet.d.ts +6 -0
- package/dist/elements/button-group.d.ts +8 -0
- package/dist/elements/button.d.ts +5 -0
- package/dist/elements/card.d.ts +4 -0
- package/dist/elements/carousel.d.ts +5 -0
- package/dist/elements/checkbox.d.ts +4 -0
- package/dist/elements/chips.d.ts +9 -0
- package/dist/elements/css/button.css +1 -1
- package/dist/elements/css/button.js +1 -1
- package/dist/elements/css/carousel.css +1 -1
- package/dist/elements/css/carousel.js +1 -1
- package/dist/elements/css/chips.css +1 -1
- package/dist/elements/css/chips.js +1 -1
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/dialog.js +1 -1
- package/dist/elements/css/drawer.css +1 -1
- package/dist/elements/css/drawer.js +1 -1
- package/dist/elements/css/fab-menu.css +1 -1
- package/dist/elements/css/fab-menu.js +1 -1
- package/dist/elements/css/hosts/badge.css +1 -1
- package/dist/elements/css/hosts/bottom-app-bar.css +1 -1
- package/dist/elements/css/hosts/bottom-sheet.css +1 -1
- package/dist/elements/css/hosts/button-group.css +1 -1
- package/dist/elements/css/hosts/button.css +1 -1
- package/dist/elements/css/hosts/card.css +1 -1
- package/dist/elements/css/hosts/carousel.css +1 -1
- package/dist/elements/css/hosts/checkbox.css +1 -1
- package/dist/elements/css/hosts/chips.css +1 -1
- package/dist/elements/css/hosts/datepicker.css +1 -1
- package/dist/elements/css/hosts/dialog.css +1 -1
- package/dist/elements/css/hosts/divider.css +1 -1
- package/dist/elements/css/hosts/drawer.css +1 -1
- package/dist/elements/css/hosts/extended-fab.css +1 -1
- package/dist/elements/css/hosts/fab-menu.css +1 -1
- package/dist/elements/css/hosts/fab.css +1 -1
- package/dist/elements/css/hosts/icon-button.css +1 -1
- package/dist/elements/css/hosts/list.css +1 -1
- package/dist/elements/css/hosts/loading-indicator.css +1 -1
- package/dist/elements/css/hosts/menu.css +1 -1
- package/dist/elements/css/hosts/navigation-bar.css +1 -1
- package/dist/elements/css/hosts/navigation-rail.css +1 -1
- package/dist/elements/css/hosts/progress.css +1 -1
- package/dist/elements/css/hosts/radios.css +1 -1
- package/dist/elements/css/hosts/search.css +1 -1
- package/dist/elements/css/hosts/select.css +1 -1
- package/dist/elements/css/hosts/side-sheet.css +1 -1
- package/dist/elements/css/hosts/slider.css +1 -1
- package/dist/elements/css/hosts/snackbar.css +1 -1
- package/dist/elements/css/hosts/split-button.css +1 -1
- package/dist/elements/css/hosts/switch.css +1 -1
- package/dist/elements/css/hosts/tabs.css +1 -1
- package/dist/elements/css/hosts/text-field.css +1 -1
- package/dist/elements/css/hosts/timepicker.css +1 -1
- package/dist/elements/css/hosts/toolbar.css +1 -1
- package/dist/elements/css/hosts/tooltip.css +1 -1
- package/dist/elements/css/hosts/top-app-bar.css +1 -1
- package/dist/elements/css/icon-button.css +1 -1
- package/dist/elements/css/icon-button.js +1 -1
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +1 -1
- package/dist/elements/css/navigation-bar.css +1 -1
- package/dist/elements/css/navigation-bar.js +1 -1
- package/dist/elements/css/navigation-rail.css +1 -1
- package/dist/elements/css/navigation-rail.js +1 -1
- package/dist/elements/css/search.css +1 -1
- package/dist/elements/css/search.js +1 -1
- package/dist/elements/css/slider.css +1 -1
- package/dist/elements/css/slider.js +1 -1
- package/dist/elements/css/text-field.css +1 -1
- package/dist/elements/css/text-field.js +1 -1
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/timepicker.js +1 -1
- package/dist/elements/datepicker.d.ts +6 -0
- package/dist/elements/define.d.ts +48 -0
- package/dist/elements/define.js +1 -1
- package/dist/elements/dialog.d.ts +5 -0
- package/dist/elements/divider.d.ts +4 -0
- package/dist/elements/drawer.d.ts +6 -0
- package/dist/elements/extended-fab.d.ts +5 -0
- package/dist/elements/fab-menu.d.ts +10 -0
- package/dist/elements/fab.d.ts +5 -0
- package/dist/elements/icon-button.d.ts +6 -0
- package/dist/elements/index.d.ts +4 -0
- package/dist/elements/list.d.ts +8 -0
- package/dist/elements/loading-indicator.d.ts +4 -0
- package/dist/elements/menu.d.ts +12 -0
- package/dist/elements/navigation-bar.d.ts +6 -0
- package/dist/elements/navigation-rail.d.ts +10 -0
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/progress.d.ts +4 -0
- package/dist/elements/radios.d.ts +5 -0
- package/dist/elements/search.d.ts +15 -0
- package/dist/elements/select.d.ts +6 -0
- package/dist/elements/side-sheet.d.ts +5 -0
- package/dist/elements/slider.d.ts +7 -0
- package/dist/elements/snackbar.d.ts +4 -0
- package/dist/elements/split-button.d.ts +8 -0
- package/dist/elements/styles.d.ts +11 -0
- package/dist/elements/switch.d.ts +5 -0
- package/dist/elements/tabs.d.ts +6 -0
- package/dist/elements/text-field.d.ts +9 -0
- package/dist/elements/timepicker.d.ts +9 -0
- package/dist/elements/toolbar.d.ts +4 -0
- package/dist/elements/tooltip.d.ts +4 -0
- package/dist/elements/top-app-bar.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/react/create.d.ts +15 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/jsx.d.ts +3 -0
- package/dist/solid/create.d.ts +16 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/jsx.d.ts +4 -0
- package/dist/ssr/index.d.ts +3 -0
- package/dist/ssr/solid.d.ts +1 -0
- package/dist/ssr/svelte.d.ts +1 -0
- package/dist/ssr/vue.d.ts +1 -0
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +2 -2
- package/dist/styles/base.css +2 -2
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +2 -2
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +2 -2
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +2 -2
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +2 -2
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +2 -2
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +2 -2
- package/dist/styles/navigation-rail.css +2 -2
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +2 -2
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +2 -2
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +2 -2
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/runtime.d.ts +21 -0
- package/dist/theme/image.d.ts +2 -0
- package/dist/theme/index.d.ts +20 -0
- package/dist/theme/variants.d.ts +6 -0
- package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +1 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +39 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +13 -0
- package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +1 -0
- package/dist/theme/vendor/hct/hct.d.ts +9 -0
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +18 -0
- package/dist/vue/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/styles/abstract/_mixins.scss +1 -1
- package/src/styles/components/_button.scss +1 -0
- package/src/styles/components/_carousel.scss +18 -4
- package/src/styles/components/_chips.scss +3 -2
- package/src/styles/components/_dialog.scss +1 -1
- package/src/styles/components/_drawer.scss +6 -3
- package/src/styles/components/_fab-menu.scss +1 -1
- package/src/styles/components/_icon-button.scss +2 -1
- package/src/styles/components/_menu.scss +14 -1
- package/src/styles/components/_navigation-bar.scss +6 -1
- package/src/styles/components/_navigation-rail.scss +5 -0
- package/src/styles/components/_search.scss +13 -0
- package/src/styles/components/_slider.scss +16 -39
- package/src/styles/components/_text-field.scss +9 -0
- package/src/styles/components/_timepicker.scss +1 -1
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
/** Toolbar variants (m3.material.io toolbars) */
|
|
1
2
|
export declare const TOOLBAR_VARIANTS: {
|
|
2
3
|
readonly DOCKED: "docked";
|
|
3
4
|
readonly FLOATING: "floating";
|
|
4
5
|
};
|
|
5
6
|
export type ToolbarVariant = (typeof TOOLBAR_VARIANTS)[keyof typeof TOOLBAR_VARIANTS];
|
|
7
|
+
/** Toolbar colours - standard: surface container, low emphasis - vibrant: primary container, high emphasis (e.g. */
|
|
6
8
|
export declare const TOOLBAR_COLORS: {
|
|
7
9
|
readonly STANDARD: "standard";
|
|
8
10
|
readonly VIBRANT: "vibrant";
|
|
9
11
|
};
|
|
10
12
|
export type ToolbarColor = (typeof TOOLBAR_COLORS)[keyof typeof TOOLBAR_COLORS];
|
|
13
|
+
/** Floating toolbar layouts. */
|
|
11
14
|
export declare const TOOLBAR_ORIENTATIONS: {
|
|
12
15
|
readonly HORIZONTAL: "horizontal";
|
|
13
16
|
readonly VERTICAL: "vertical";
|
|
14
17
|
};
|
|
15
18
|
export type ToolbarOrientation = (typeof TOOLBAR_ORIENTATIONS)[keyof typeof TOOLBAR_ORIENTATIONS];
|
|
19
|
+
/** Where the toolbar sits in its positioned container. */
|
|
16
20
|
export declare const TOOLBAR_PLACEMENTS: {
|
|
17
21
|
readonly NONE: "none";
|
|
18
22
|
readonly BOTTOM: "bottom";
|
|
@@ -21,17 +25,21 @@ export declare const TOOLBAR_PLACEMENTS: {
|
|
|
21
25
|
readonly END: "end";
|
|
22
26
|
};
|
|
23
27
|
export type ToolbarPlacement = (typeof TOOLBAR_PLACEMENTS)[keyof typeof TOOLBAR_PLACEMENTS];
|
|
28
|
+
/** How a docked toolbar lays out its items: spread evenly across the width (compact windows), or centred 32dp apart (medium windows and up). */
|
|
24
29
|
export declare const TOOLBAR_ARRANGEMENTS: {
|
|
25
30
|
readonly SPREAD: "spread";
|
|
26
31
|
readonly CENTER: "center";
|
|
27
32
|
};
|
|
28
33
|
export type ToolbarArrangement = (typeof TOOLBAR_ARRANGEMENTS)[keyof typeof TOOLBAR_ARRANGEMENTS];
|
|
34
|
+
/** Scroll behaviours: stay on screen, or leave it while scrolling forward. */
|
|
29
35
|
export declare const TOOLBAR_SCROLL_BEHAVIORS: {
|
|
30
36
|
readonly NONE: "none";
|
|
31
37
|
readonly EXIT: "exit";
|
|
32
38
|
};
|
|
33
39
|
export type ToolbarScrollBehavior = (typeof TOOLBAR_SCROLL_BEHAVIORS)[keyof typeof TOOLBAR_SCROLL_BEHAVIORS];
|
|
40
|
+
/** Which side of a floating toolbar its FAB sits on, along the toolbar. */
|
|
34
41
|
export type ToolbarFabPosition = "start" | "end";
|
|
42
|
+
/** The scroll distance, in px, that hides or shows the toolbar (Compose FloatingToolbarDefaults.ScrollDistanceThreshold, 40dp). */
|
|
35
43
|
export declare const TOOLBAR_SCROLL_THRESHOLD = 40;
|
|
36
44
|
export declare const TOOLBAR_EVENTS: {
|
|
37
45
|
readonly SHOW: "show";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { ToolbarConfig, ToolbarComponent } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a toolbar: M3 Expressive's docked and floating toolbars.
|
|
4
|
+
* @param config
|
|
5
|
+
*/
|
|
2
6
|
declare const createToolbar: (config?: ToolbarConfig) => ToolbarComponent;
|
|
3
7
|
export default createToolbar;
|
|
4
8
|
export { createToolbar };
|
|
@@ -3,48 +3,123 @@ import type { BaseComponentConfig } from "../../core/config/component.js";
|
|
|
3
3
|
import type { ButtonConfig } from "../button/types.js";
|
|
4
4
|
import type { IconButtonConfig } from "../icon-button/types.js";
|
|
5
5
|
import type { ToolbarVariant, ToolbarColor, ToolbarOrientation, ToolbarPlacement, ToolbarArrangement, ToolbarScrollBehavior, ToolbarFabPosition } from "./constants.js";
|
|
6
|
+
/** Anything the toolbar can hold that already exists: an element, or a component carrying one. */
|
|
6
7
|
export type ToolbarElementItem = HTMLElement | {
|
|
7
8
|
element: HTMLElement;
|
|
8
9
|
};
|
|
10
|
+
/** A button the toolbar creates from its config: a label is what makes it a button. */
|
|
9
11
|
export type ToolbarButtonItem = ButtonConfig & {
|
|
10
12
|
text: string;
|
|
11
13
|
};
|
|
14
|
+
/** An item of the toolbar: - an icon button config (`icon`, `ariaLabel`, and `toggle`, `selected`, `variant`, `width` as on createIconButton), created by the toolbar; - a button config with `text`, created by the toolbar; - an element or a component, such as a text field or a divider, added as it is. */
|
|
12
15
|
export type ToolbarItem = ToolbarElementItem | ToolbarButtonItem | IconButtonConfig;
|
|
16
|
+
/** Configuration of a toolbar */
|
|
13
17
|
export interface ToolbarConfig extends BaseComponentConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Docked (full width, global actions) or floating (a pill, contextual actions)
|
|
20
|
+
* @default 'docked'
|
|
21
|
+
*/
|
|
14
22
|
variant?: ToolbarVariant | string;
|
|
23
|
+
/**
|
|
24
|
+
* Standard (surface container) or vibrant (primary container)
|
|
25
|
+
* @default 'standard'
|
|
26
|
+
*/
|
|
15
27
|
color?: ToolbarColor | string;
|
|
28
|
+
/**
|
|
29
|
+
* Layout of a floating toolbar.
|
|
30
|
+
* @default 'horizontal'
|
|
31
|
+
*/
|
|
16
32
|
orientation?: ToolbarOrientation | string;
|
|
33
|
+
/**
|
|
34
|
+
* Where the toolbar sits in its positioned container: `'none'` leaves it in the flow.
|
|
35
|
+
* @default 'none'
|
|
36
|
+
*/
|
|
17
37
|
placement?: ToolbarPlacement | string;
|
|
38
|
+
/**
|
|
39
|
+
* How a docked toolbar lays out its items: spread across the width, or centred 32dp apart
|
|
40
|
+
* @default 'spread'
|
|
41
|
+
*/
|
|
18
42
|
arrangement?: ToolbarArrangement | string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether a floating toolbar casts a shadow (elevation level 1).
|
|
45
|
+
* @default true for floating
|
|
46
|
+
*/
|
|
19
47
|
elevated?: boolean;
|
|
48
|
+
/** The items, in order */
|
|
20
49
|
items?: ToolbarItem[];
|
|
50
|
+
/** A FAB paired with a floating toolbar, outside its tab stop. */
|
|
21
51
|
fab?: ToolbarElementItem;
|
|
52
|
+
/**
|
|
53
|
+
* Which end of the toolbar the FAB sits at, along its layout
|
|
54
|
+
* @default 'end'
|
|
55
|
+
*/
|
|
22
56
|
fabPosition?: ToolbarFabPosition | string;
|
|
57
|
+
/** Adds a trailing "more" icon button and calls this with it, to build the overflow menu the button opens: `(opener) => createMenu({ opener, items })`. */
|
|
23
58
|
overflow?: (opener: HTMLElement) => unknown;
|
|
59
|
+
/**
|
|
60
|
+
* Icon of the overflow button
|
|
61
|
+
* @default a "more vertical" icon
|
|
62
|
+
*/
|
|
24
63
|
overflowIcon?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Accessible name of the overflow button
|
|
66
|
+
* @default 'More options'
|
|
67
|
+
*/
|
|
25
68
|
overflowLabel?: string;
|
|
69
|
+
/**
|
|
70
|
+
* `'exit'` hides the toolbar while the content scrolls forward and shows it
|
|
71
|
+
* @default 'none'
|
|
72
|
+
*/
|
|
26
73
|
scrollBehavior?: ToolbarScrollBehavior | string;
|
|
74
|
+
/**
|
|
75
|
+
* What scrolls, for `scrollBehavior: 'exit'`
|
|
76
|
+
* @default window
|
|
77
|
+
*/
|
|
27
78
|
scrollTarget?: HTMLElement | Window;
|
|
79
|
+
/**
|
|
80
|
+
* The scroll distance, in px, that hides or shows the toolbar
|
|
81
|
+
* @default 40
|
|
82
|
+
*/
|
|
28
83
|
scrollThreshold?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Accessible name of the toolbar
|
|
86
|
+
* @default 'Toolbar'
|
|
87
|
+
*/
|
|
29
88
|
ariaLabel?: string;
|
|
89
|
+
/** Additional CSS classes */
|
|
30
90
|
class?: string;
|
|
31
91
|
}
|
|
92
|
+
/** Events of a toolbar */
|
|
32
93
|
export interface ToolbarEvents {
|
|
94
|
+
/** The toolbar came back on screen */
|
|
33
95
|
show: () => void;
|
|
96
|
+
/** The toolbar left the screen */
|
|
34
97
|
hide: () => void;
|
|
35
98
|
}
|
|
99
|
+
/** A toolbar */
|
|
36
100
|
export interface ToolbarComponent extends ElementComponent {
|
|
101
|
+
/** The element with the `toolbar` role, which holds the items */
|
|
37
102
|
bar: HTMLElement;
|
|
103
|
+
/** The overflow button, when `overflow` is set */
|
|
38
104
|
overflowButton: HTMLElement | null;
|
|
105
|
+
/** Adds an item at the end, before the overflow button */
|
|
39
106
|
add(item: ToolbarItem): HTMLElement;
|
|
107
|
+
/** Removes an item; one the toolbar created is destroyed */
|
|
40
108
|
remove(item: ToolbarElementItem): this;
|
|
109
|
+
/** The item elements, in order, without the overflow button */
|
|
41
110
|
getItems(): HTMLElement[];
|
|
111
|
+
/** Brings the toolbar back on screen */
|
|
42
112
|
show(): this;
|
|
113
|
+
/** Moves the toolbar off screen and out of the focus order */
|
|
43
114
|
hide(): this;
|
|
115
|
+
/** Whether the toolbar is on screen */
|
|
44
116
|
isVisible(): boolean;
|
|
117
|
+
/** Changes the colour */
|
|
45
118
|
setColor(color: ToolbarColor | string): this;
|
|
119
|
+
/** The current colour */
|
|
46
120
|
getColor(): ToolbarColor;
|
|
47
121
|
on<K extends keyof ToolbarEvents>(event: K, handler: ToolbarEvents[K]): this;
|
|
48
122
|
off<K extends keyof ToolbarEvents>(event: K, handler: ToolbarEvents[K]): this;
|
|
123
|
+
/** Removes the toolbar, its listeners and the items it created */
|
|
49
124
|
destroy(): void;
|
|
50
125
|
}
|
|
@@ -1,48 +1,91 @@
|
|
|
1
|
+
/** Tooltip positions */
|
|
1
2
|
export declare const TOOLTIP_POSITIONS: {
|
|
3
|
+
/** Position above the target element */
|
|
2
4
|
readonly TOP: "top";
|
|
5
|
+
/** Position to the right of the target element */
|
|
3
6
|
readonly RIGHT: "right";
|
|
7
|
+
/** Position below the target element */
|
|
4
8
|
readonly BOTTOM: "bottom";
|
|
9
|
+
/** Position to the left of the target element */
|
|
5
10
|
readonly LEFT: "left";
|
|
11
|
+
/** Position above and aligned to the start of the target */
|
|
6
12
|
readonly TOP_START: "top-start";
|
|
13
|
+
/** Position above and aligned to the end of the target */
|
|
7
14
|
readonly TOP_END: "top-end";
|
|
15
|
+
/** Position to the right and aligned to the start of the target */
|
|
8
16
|
readonly RIGHT_START: "right-start";
|
|
17
|
+
/** Position to the right and aligned to the end of the target */
|
|
9
18
|
readonly RIGHT_END: "right-end";
|
|
19
|
+
/** Position below and aligned to the start of the target */
|
|
10
20
|
readonly BOTTOM_START: "bottom-start";
|
|
21
|
+
/** Position below and aligned to the end of the target */
|
|
11
22
|
readonly BOTTOM_END: "bottom-end";
|
|
23
|
+
/** Position to the left and aligned to the start of the target */
|
|
12
24
|
readonly LEFT_START: "left-start";
|
|
25
|
+
/** Position to the left and aligned to the end of the target */
|
|
13
26
|
readonly LEFT_END: "left-end";
|
|
14
27
|
};
|
|
28
|
+
/** Tooltip visual variants */
|
|
15
29
|
export declare const TOOLTIP_VARIANTS: {
|
|
30
|
+
/** Standard tooltip with background and arrow */
|
|
16
31
|
readonly DEFAULT: "default";
|
|
32
|
+
/** Rich tooltip with support for HTML content */
|
|
17
33
|
readonly RICH: "rich";
|
|
34
|
+
/** Plain text tooltip with minimal styling */
|
|
18
35
|
readonly PLAIN: "plain";
|
|
19
36
|
};
|
|
37
|
+
/** Tooltip events */
|
|
20
38
|
export declare const TOOLTIP_EVENTS: {
|
|
39
|
+
/** Fired when tooltip becomes visible */
|
|
21
40
|
readonly SHOW: "show";
|
|
41
|
+
/** Fired when tooltip becomes hidden */
|
|
22
42
|
readonly HIDE: "hide";
|
|
43
|
+
/** Fired when mouse enters target element */
|
|
23
44
|
readonly ENTER: "enter";
|
|
45
|
+
/** Fired when mouse leaves target element */
|
|
24
46
|
readonly LEAVE: "leave";
|
|
25
47
|
};
|
|
48
|
+
/** Default configuration values for tooltip */
|
|
26
49
|
export declare const TOOLTIP_DEFAULTS: {
|
|
50
|
+
/** Default tooltip position */
|
|
27
51
|
readonly POSITION: "bottom";
|
|
52
|
+
/** Default visual variant */
|
|
28
53
|
readonly VARIANT: "default";
|
|
54
|
+
/** Default visibility state */
|
|
29
55
|
readonly VISIBLE: false;
|
|
56
|
+
/** Default show delay in milliseconds */
|
|
30
57
|
readonly SHOW_DELAY: 300;
|
|
58
|
+
/** Default hide delay in milliseconds */
|
|
31
59
|
readonly HIDE_DELAY: 100;
|
|
60
|
+
/** Default offset from target in pixels */
|
|
32
61
|
readonly OFFSET: 8;
|
|
62
|
+
/** Default arrow size in pixels */
|
|
33
63
|
readonly ARROW_SIZE: 8;
|
|
64
|
+
/** Whether to show tooltip on focus by default */
|
|
34
65
|
readonly SHOW_ON_FOCUS: true;
|
|
66
|
+
/** Whether to show tooltip on hover by default */
|
|
35
67
|
readonly SHOW_ON_HOVER: true;
|
|
36
68
|
};
|
|
69
|
+
/** CSS class names used by the tooltip component */
|
|
37
70
|
export declare const TOOLTIP_CLASSES: {
|
|
71
|
+
/** Root element class */
|
|
38
72
|
readonly ROOT: "tooltip";
|
|
73
|
+
/** Reserved slot; the current tooltip renders content directly in its root. */
|
|
39
74
|
readonly CONTAINER: "tooltip__container";
|
|
75
|
+
/** Arrow element class */
|
|
40
76
|
readonly ARROW: "tooltip__arrow";
|
|
77
|
+
/** Reserved slot; the current tooltip renders content directly in its root. */
|
|
41
78
|
readonly CONTENT: "tooltip__content";
|
|
79
|
+
/** Visible state class */
|
|
42
80
|
readonly VISIBLE: "tooltip--visible";
|
|
81
|
+
/** Hidden state class */
|
|
43
82
|
readonly HIDDEN: "tooltip--hidden";
|
|
83
|
+
/** Default variant class */
|
|
44
84
|
readonly DEFAULT: "tooltip--default";
|
|
85
|
+
/** Rich variant class */
|
|
45
86
|
readonly RICH: "tooltip--rich";
|
|
87
|
+
/** Plain variant class */
|
|
46
88
|
readonly PLAIN: "tooltip--plain";
|
|
89
|
+
/** Position prefix - append position name (e.g. */
|
|
47
90
|
readonly POSITION_PREFIX: "tooltip--";
|
|
48
91
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Tooltip positions */
|
|
1
2
|
export declare const TOOLTIP_POSITIONS: {
|
|
2
3
|
readonly TOP: "top";
|
|
3
4
|
readonly RIGHT: "right";
|
|
@@ -12,48 +13,125 @@ export declare const TOOLTIP_POSITIONS: {
|
|
|
12
13
|
readonly LEFT_START: "left-start";
|
|
13
14
|
readonly LEFT_END: "left-end";
|
|
14
15
|
};
|
|
16
|
+
/** Tooltip variants */
|
|
15
17
|
export declare const TOOLTIP_VARIANTS: {
|
|
16
18
|
readonly DEFAULT: "default";
|
|
17
19
|
readonly RICH: "rich";
|
|
18
20
|
readonly PLAIN: "plain";
|
|
19
21
|
};
|
|
22
|
+
/** Default values */
|
|
20
23
|
export declare const DEFAULT_SHOW_DELAY = 300;
|
|
21
24
|
export declare const DEFAULT_HIDE_DELAY = 100;
|
|
22
25
|
export declare const DEFAULT_OFFSET = 8;
|
|
23
26
|
export declare const DEFAULT_ARROW_SIZE = 8;
|
|
27
|
+
/** Available Tooltip variants */
|
|
24
28
|
export type TooltipVariant = 'default' | 'rich' | 'plain';
|
|
29
|
+
/** Available Tooltip positions */
|
|
25
30
|
export type TooltipPosition = typeof TOOLTIP_POSITIONS[keyof typeof TOOLTIP_POSITIONS];
|
|
31
|
+
/** Configuration interface for the Tooltip component */
|
|
26
32
|
export interface TooltipConfig {
|
|
33
|
+
/** Tooltip content text */
|
|
27
34
|
text?: string;
|
|
35
|
+
/** HTML element that triggers the tooltip */
|
|
28
36
|
target?: HTMLElement;
|
|
37
|
+
/**
|
|
38
|
+
* Tooltip position relative to the target
|
|
39
|
+
* @default 'bottom'
|
|
40
|
+
*/
|
|
29
41
|
position?: TooltipPosition | string;
|
|
42
|
+
/**
|
|
43
|
+
* Tooltip variant that determines visual styling
|
|
44
|
+
* @default 'default'
|
|
45
|
+
*/
|
|
30
46
|
variant?: TooltipVariant | string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the tooltip is initially visible
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
31
51
|
visible?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Show delay in milliseconds
|
|
54
|
+
* @default 300
|
|
55
|
+
*/
|
|
32
56
|
showDelay?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Hide delay in milliseconds
|
|
59
|
+
* @default 100
|
|
60
|
+
*/
|
|
33
61
|
hideDelay?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to show the tooltip on focus
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
34
66
|
showOnFocus?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to show the tooltip on hover
|
|
69
|
+
* @default true
|
|
70
|
+
*/
|
|
35
71
|
showOnHover?: boolean;
|
|
72
|
+
/** Additional CSS classes to add to the tooltip */
|
|
36
73
|
class?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Component prefix for class names
|
|
76
|
+
* @default 'mtrl'
|
|
77
|
+
*/
|
|
37
78
|
prefix?: string;
|
|
79
|
+
/** Component name used in class generation */
|
|
38
80
|
componentName?: string;
|
|
81
|
+
/** Optional z-index for the tooltip */
|
|
39
82
|
zIndex?: number;
|
|
83
|
+
/** `"top"` renders the tooltip in place, after its target, and shows it in the browser's top layer as a `popover="manual"` element: above every z-index, outside any clipping ancestor, and in the target's tree (a shadow root's included), so it takes that tree's styles. */
|
|
40
84
|
layer?: "top";
|
|
41
85
|
}
|
|
86
|
+
/** Tooltip component interface */
|
|
42
87
|
export interface TooltipComponent {
|
|
88
|
+
/** The tooltip's DOM element */
|
|
43
89
|
element: HTMLElement;
|
|
90
|
+
/** The tooltip's target element */
|
|
44
91
|
target: HTMLElement | null;
|
|
92
|
+
/** API for managing component lifecycle */
|
|
45
93
|
lifecycle: {
|
|
94
|
+
/** Destroys the component and cleans up resources */
|
|
46
95
|
destroy: () => void;
|
|
47
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Gets a class name with the component's prefix
|
|
99
|
+
* @param name
|
|
100
|
+
*/
|
|
48
101
|
getClass: (name: string) => string;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the tooltip text content
|
|
104
|
+
* @param text
|
|
105
|
+
*/
|
|
49
106
|
setText: (text: string) => TooltipComponent;
|
|
107
|
+
/** Gets the tooltip text content */
|
|
50
108
|
getText: () => string;
|
|
109
|
+
/**
|
|
110
|
+
* Sets the tooltip position
|
|
111
|
+
* @param position
|
|
112
|
+
*/
|
|
51
113
|
setPosition: (position: TooltipPosition) => TooltipComponent;
|
|
114
|
+
/** Gets the current tooltip position */
|
|
52
115
|
getPosition: () => TooltipPosition;
|
|
116
|
+
/**
|
|
117
|
+
* Sets the tooltip target element
|
|
118
|
+
* @param target
|
|
119
|
+
*/
|
|
53
120
|
setTarget: (target: HTMLElement) => TooltipComponent;
|
|
121
|
+
/**
|
|
122
|
+
* Shows the tooltip.
|
|
123
|
+
* @param immediate
|
|
124
|
+
*/
|
|
54
125
|
show: (immediate?: boolean) => TooltipComponent;
|
|
126
|
+
/**
|
|
127
|
+
* Hides the tooltip, after the hide delay and without an event; `hide(true)` hides it at once.
|
|
128
|
+
* @param immediate
|
|
129
|
+
*/
|
|
55
130
|
hide: (immediate?: boolean) => TooltipComponent;
|
|
131
|
+
/** Checks if the tooltip is currently visible */
|
|
56
132
|
isVisible: () => boolean;
|
|
133
|
+
/** Updates the tooltip's position relative to its target */
|
|
57
134
|
updatePosition: () => TooltipComponent;
|
|
135
|
+
/** Destroys the tooltip component and cleans up resources */
|
|
58
136
|
destroy: () => void;
|
|
59
137
|
}
|
|
@@ -1,33 +1,62 @@
|
|
|
1
|
+
/** Top App Bar types */
|
|
1
2
|
export declare const TOP_APP_BAR_TYPES: {
|
|
3
|
+
/** Small height app bar */
|
|
2
4
|
readonly SMALL: "small";
|
|
5
|
+
/** Medium height app bar */
|
|
3
6
|
readonly MEDIUM: "medium";
|
|
7
|
+
/** Large height app bar */
|
|
4
8
|
readonly LARGE: "large";
|
|
9
|
+
/** Center-aligned app bar */
|
|
5
10
|
readonly CENTER: "center";
|
|
6
11
|
};
|
|
12
|
+
/** Top App Bar states */
|
|
7
13
|
export declare const TOP_APP_BAR_STATES: {
|
|
14
|
+
/** Default state */
|
|
8
15
|
readonly DEFAULT: "default";
|
|
16
|
+
/** Scrolled state */
|
|
9
17
|
readonly SCROLLED: "scrolled";
|
|
18
|
+
/** Fixed state */
|
|
10
19
|
readonly FIXED: "fixed";
|
|
11
20
|
};
|
|
21
|
+
/** Default configuration values for top app bar */
|
|
12
22
|
export declare const TOP_APP_BAR_DEFAULTS: {
|
|
23
|
+
/** Default HTML tag */
|
|
13
24
|
readonly TAG: "header";
|
|
25
|
+
/** Default bar type */
|
|
14
26
|
readonly TYPE: "small";
|
|
27
|
+
/** Whether to enable scrolling behavior */
|
|
15
28
|
readonly SCROLLABLE: true;
|
|
29
|
+
/** Whether to compress medium/large variants on scroll */
|
|
16
30
|
readonly COMPRESSIBLE: true;
|
|
31
|
+
/** Scroll threshold in pixels to trigger scrolled state */
|
|
17
32
|
readonly SCROLL_THRESHOLD: 4;
|
|
18
33
|
};
|
|
34
|
+
/** CSS class names used by the top app bar component */
|
|
19
35
|
export declare const TOP_APP_BAR_CLASSES: {
|
|
36
|
+
/** Root element class */
|
|
20
37
|
readonly ROOT: "top-app-bar";
|
|
38
|
+
/** Small variant class */
|
|
21
39
|
readonly SMALL: "top-app-bar--small";
|
|
40
|
+
/** Medium variant class */
|
|
22
41
|
readonly MEDIUM: "top-app-bar--medium";
|
|
42
|
+
/** Large variant class */
|
|
23
43
|
readonly LARGE: "top-app-bar--large";
|
|
44
|
+
/** Center-aligned variant class */
|
|
24
45
|
readonly CENTER: "top-app-bar--center";
|
|
46
|
+
/** Scrolled state class */
|
|
25
47
|
readonly SCROLLED: "top-app-bar--scrolled";
|
|
48
|
+
/** Fixed state class */
|
|
26
49
|
readonly FIXED: "top-app-bar--fixed";
|
|
50
|
+
/** Row container class */
|
|
27
51
|
readonly ROW: "top-app-bar__row";
|
|
52
|
+
/** Section container class */
|
|
28
53
|
readonly SECTION: "top-app-bar__section";
|
|
54
|
+
/** Leading section class */
|
|
29
55
|
readonly SECTION_LEADING: "top-app-bar__section--leading";
|
|
56
|
+
/** Headline section class */
|
|
30
57
|
readonly SECTION_HEADLINE: "top-app-bar__section--headline";
|
|
58
|
+
/** Trailing section class */
|
|
31
59
|
readonly SECTION_TRAILING: "top-app-bar__section--trailing";
|
|
60
|
+
/** Title element class */
|
|
32
61
|
readonly TITLE: "top-app-bar__title";
|
|
33
62
|
};
|
|
@@ -1,25 +1,80 @@
|
|
|
1
1
|
import { ElementComponent } from "../../core/compose/index.js";
|
|
2
|
+
/** Top App Bar types */
|
|
2
3
|
export type TopAppBarType = 'small' | 'medium' | 'large' | 'center';
|
|
4
|
+
/** Configuration options for Top App Bar component */
|
|
3
5
|
export interface TopAppBarConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Element to use for the container
|
|
8
|
+
* @default 'header'
|
|
9
|
+
*/
|
|
4
10
|
tag?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Type of top app bar to display
|
|
13
|
+
* @default 'small'
|
|
14
|
+
*/
|
|
5
15
|
type?: TopAppBarType;
|
|
16
|
+
/** Title text to display in the app bar */
|
|
6
17
|
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to enable scrolling behavior
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
7
22
|
scrollable?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to compress medium/large variants to small on scroll
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
8
27
|
compressible?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Scroll threshold in pixels to trigger the scrolled state
|
|
30
|
+
* @default 4
|
|
31
|
+
*/
|
|
9
32
|
scrollThreshold?: number;
|
|
33
|
+
/** Additional CSS classes to apply */
|
|
10
34
|
class?: string;
|
|
35
|
+
/** Called with the new scrolled state when scrolling changes the bar. */
|
|
11
36
|
onScroll?: (scrolled: boolean) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Component prefix for class names
|
|
39
|
+
* @default 'mtrl'
|
|
40
|
+
*/
|
|
12
41
|
prefix?: string;
|
|
42
|
+
/** Component name for class generation */
|
|
13
43
|
componentName?: string;
|
|
14
44
|
}
|
|
45
|
+
/** Top App Bar component interface */
|
|
15
46
|
export interface TopAppBarComponent extends ElementComponent {
|
|
47
|
+
/**
|
|
48
|
+
* Sets the title of the top app bar
|
|
49
|
+
* @param title
|
|
50
|
+
*/
|
|
16
51
|
setTitle(title: string): this;
|
|
52
|
+
/** Gets the current title */
|
|
17
53
|
getTitle: () => string;
|
|
54
|
+
/**
|
|
55
|
+
* Adds a leading navigation icon or element
|
|
56
|
+
* @param element
|
|
57
|
+
*/
|
|
18
58
|
addLeadingElement(element: HTMLElement): this;
|
|
59
|
+
/**
|
|
60
|
+
* Adds a trailing action icon or element
|
|
61
|
+
* @param element
|
|
62
|
+
*/
|
|
19
63
|
addTrailingElement(element: HTMLElement): this;
|
|
64
|
+
/**
|
|
65
|
+
* Changes the top app bar type
|
|
66
|
+
* @param type
|
|
67
|
+
*/
|
|
20
68
|
setType(type: TopAppBarType): this;
|
|
69
|
+
/**
|
|
70
|
+
* Manually sets the scrolled state
|
|
71
|
+
* @param scrolled
|
|
72
|
+
*/
|
|
21
73
|
setScrollState(scrolled: boolean): this;
|
|
74
|
+
/** Gets the headline element */
|
|
22
75
|
getHeadlineElement: () => HTMLElement;
|
|
76
|
+
/** Gets the leading container element */
|
|
23
77
|
getLeadingContainer: () => HTMLElement;
|
|
78
|
+
/** Gets the trailing container element */
|
|
24
79
|
getTrailingContainer: () => HTMLElement;
|
|
25
80
|
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Easing function for smooth animations (Material Design standard)
|
|
3
|
+
* @param t
|
|
4
|
+
*/
|
|
1
5
|
export declare const easeOutCubic: (t: number) => number;
|
|
6
|
+
/** Standard Material Design animation durations */
|
|
2
7
|
export declare const ANIMATION_DURATIONS: {
|
|
3
8
|
SHORT: number;
|
|
4
9
|
MEDIUM: number;
|
|
5
10
|
LONG: number;
|
|
6
11
|
EXTRA_LONG: number;
|
|
7
12
|
};
|
|
13
|
+
/** Common easing functions */
|
|
8
14
|
export declare const EASING_FUNCTIONS: {
|
|
9
15
|
linear: (t: number) => number;
|
|
10
16
|
easeIn: (t: number) => number;
|
|
@@ -1,20 +1,67 @@
|
|
|
1
|
+
/** Canvas drawing utilities */
|
|
2
|
+
/**
|
|
3
|
+
* Creates a rounded rectangle path
|
|
4
|
+
* @param ctx
|
|
5
|
+
* @param x
|
|
6
|
+
* @param y
|
|
7
|
+
* @param width
|
|
8
|
+
* @param height
|
|
9
|
+
* @param radius
|
|
10
|
+
*/
|
|
1
11
|
export declare const createRoundedRectPath: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
|
|
2
12
|
number,
|
|
3
13
|
number,
|
|
4
14
|
number,
|
|
5
15
|
number
|
|
6
16
|
]) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Draws a filled rounded rectangle
|
|
19
|
+
* @param ctx
|
|
20
|
+
* @param x
|
|
21
|
+
* @param y
|
|
22
|
+
* @param width
|
|
23
|
+
* @param height
|
|
24
|
+
* @param radius
|
|
25
|
+
* @param fillStyle
|
|
26
|
+
*/
|
|
7
27
|
export declare const fillRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
|
|
8
28
|
number,
|
|
9
29
|
number,
|
|
10
30
|
number,
|
|
11
31
|
number
|
|
12
32
|
], fillStyle?: string | CanvasGradient | CanvasPattern) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a clipping region with rounded corners
|
|
35
|
+
* @param ctx
|
|
36
|
+
* @param x
|
|
37
|
+
* @param y
|
|
38
|
+
* @param width
|
|
39
|
+
* @param height
|
|
40
|
+
* @param radius
|
|
41
|
+
*/
|
|
13
42
|
export declare const clipRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
|
|
14
43
|
number,
|
|
15
44
|
number,
|
|
16
45
|
number,
|
|
17
46
|
number
|
|
18
47
|
]) => (() => void);
|
|
48
|
+
/**
|
|
49
|
+
* Draws a rounded rectangle with different left and right radii
|
|
50
|
+
* @param ctx
|
|
51
|
+
* @param x
|
|
52
|
+
* @param y
|
|
53
|
+
* @param width
|
|
54
|
+
* @param height
|
|
55
|
+
* @param leftRadius
|
|
56
|
+
* @param rightRadius
|
|
57
|
+
* @param fillStyle
|
|
58
|
+
*/
|
|
19
59
|
export declare const fillRoundedRectLR: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, leftRadius: number, rightRadius: number, fillStyle?: string | CanvasGradient | CanvasPattern) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Clears a canvas with optional background color
|
|
62
|
+
* @param ctx
|
|
63
|
+
* @param width
|
|
64
|
+
* @param height
|
|
65
|
+
* @param backgroundColor
|
|
66
|
+
*/
|
|
20
67
|
export declare const clearCanvas: (ctx: CanvasRenderingContext2D, width: number, height: number, backgroundColor?: string) => void;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/** Canvas resize utilities */
|
|
2
|
+
/**
|
|
3
|
+
* Observes an element for the two things that change a canvas backing store: its width, and the devicePixelRatio.
|
|
4
|
+
* @param element
|
|
5
|
+
* @param canvas
|
|
6
|
+
* @param onResize
|
|
7
|
+
*/
|
|
1
8
|
export declare const observeCanvasResize: (element: HTMLElement, canvas: HTMLCanvasElement | null | undefined, onResize: () => void) => (() => void);
|