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,3 +1,4 @@
|
|
|
1
|
+
/** Common canvas context interface used by components */
|
|
1
2
|
export interface CanvasContext {
|
|
2
3
|
canvas: HTMLCanvasElement;
|
|
3
4
|
ctx: CanvasRenderingContext2D;
|
|
@@ -5,19 +6,57 @@ export interface CanvasContext {
|
|
|
5
6
|
height: number;
|
|
6
7
|
pixelRatio: number;
|
|
7
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates and initializes a canvas context with proper pixel ratio handling
|
|
11
|
+
* @param canvas
|
|
12
|
+
* @param width
|
|
13
|
+
* @param height
|
|
14
|
+
*/
|
|
8
15
|
export declare const createCanvasContext: (canvas: HTMLCanvasElement, width: number, height: number) => CanvasContext;
|
|
16
|
+
/**
|
|
17
|
+
* Updates canvas dimensions while preserving pixel ratio
|
|
18
|
+
* @param context
|
|
19
|
+
* @param width
|
|
20
|
+
* @param height
|
|
21
|
+
*/
|
|
9
22
|
export declare const updateCanvasDimensions: (context: CanvasContext, width: number, height: number) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Tries to initialize a canvas with retry mechanism
|
|
25
|
+
* @param initFn
|
|
26
|
+
* @param onSuccess
|
|
27
|
+
* @param signal
|
|
28
|
+
*/
|
|
10
29
|
export declare const initializeCanvasWithRetry: (initFn: () => boolean, onSuccess?: () => void, signal?: AbortSignal) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a theme observer that triggers a callback on theme changes
|
|
32
|
+
* @param _color
|
|
33
|
+
* @param callback
|
|
34
|
+
*/
|
|
11
35
|
export declare const createCanvasThemeObserver: (_color: string, callback: () => void) => (() => void);
|
|
36
|
+
/** Standard animation frame manager for components */
|
|
12
37
|
export declare class AnimationFrameManager {
|
|
13
38
|
private animationId;
|
|
39
|
+
/**
|
|
40
|
+
* Starts an animation loop
|
|
41
|
+
* @param callback
|
|
42
|
+
*/
|
|
14
43
|
start(callback: (timestamp: number) => void): void;
|
|
44
|
+
/** Stops the animation loop */
|
|
15
45
|
stop(): void;
|
|
46
|
+
/** Whether animation is currently running */
|
|
16
47
|
get isRunning(): boolean;
|
|
17
48
|
}
|
|
49
|
+
/** Manages multiple cleanup functions for components */
|
|
18
50
|
export declare class CleanupManager {
|
|
19
51
|
private cleanupFunctions;
|
|
52
|
+
/** Adds a cleanup function */
|
|
20
53
|
add(cleanup: (() => void) | null | undefined): void;
|
|
54
|
+
/** Runs all cleanup functions and clears the list */
|
|
21
55
|
cleanup(): void;
|
|
22
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a standard canvas element with common styles
|
|
59
|
+
* @param className
|
|
60
|
+
* @param additionalStyles
|
|
61
|
+
*/
|
|
23
62
|
export declare const createStyledCanvas: (className: string, additionalStyles?: Partial<CSSStyleDeclaration>) => HTMLCanvasElement;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
/** Configuration for component creation */
|
|
1
2
|
export interface ComponentConfig {
|
|
2
3
|
[key: string]: unknown;
|
|
3
4
|
}
|
|
5
|
+
/** Basic component interface */
|
|
4
6
|
export interface Component {
|
|
7
|
+
/** Component element */
|
|
5
8
|
element: HTMLElement | null;
|
|
9
|
+
/** Component configuration */
|
|
6
10
|
config: ComponentConfig;
|
|
11
|
+
/** Setup method */
|
|
7
12
|
setup: () => Component;
|
|
8
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates a basic component with minimal structure
|
|
16
|
+
* @param config
|
|
17
|
+
*/
|
|
9
18
|
export declare const createComponent: (config?: object) => Component;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
/** A resource scope shared by every stage of a component's composition. */
|
|
1
2
|
export interface CleanupScope {
|
|
2
3
|
readonly destroyed: boolean;
|
|
3
4
|
add(cleanup: () => void): void;
|
|
4
5
|
destroy(): void;
|
|
5
6
|
}
|
|
6
7
|
export declare const createCleanup: () => CleanupScope;
|
|
8
|
+
/** Also support custom component bases that already provide a lifecycle. */
|
|
7
9
|
export declare const getCleanup: (component: {
|
|
8
10
|
resources?: CleanupScope;
|
|
9
11
|
lifecycle?: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CleanupScope } from "./cleanup.js";
|
|
2
2
|
import { EventCondition } from "../dom/create.js";
|
|
3
|
+
/** Touch state interface to track touch interactions */
|
|
3
4
|
export interface TouchState {
|
|
4
5
|
startTime: number;
|
|
5
6
|
startPosition: {
|
|
@@ -9,11 +10,13 @@ export interface TouchState {
|
|
|
9
10
|
isTouching: boolean;
|
|
10
11
|
activeTarget: EventTarget | null;
|
|
11
12
|
}
|
|
13
|
+
/** Config keys the base component and withElement read */
|
|
12
14
|
export interface BaseConfig {
|
|
13
15
|
componentName?: string;
|
|
14
16
|
prefix?: string;
|
|
15
17
|
parent?: HTMLElement | string | null;
|
|
16
18
|
}
|
|
19
|
+
/** Base component interface with prefix utilities */
|
|
17
20
|
export interface BaseComponent {
|
|
18
21
|
resources?: CleanupScope;
|
|
19
22
|
config: BaseConfig & Record<string, unknown>;
|
|
@@ -24,11 +27,13 @@ export interface BaseComponent {
|
|
|
24
27
|
touchState: TouchState;
|
|
25
28
|
updateTouchState: (event: Event, status: "start" | "end") => void;
|
|
26
29
|
}
|
|
30
|
+
/** Element component extends base with element */
|
|
27
31
|
export interface ElementComponent extends BaseComponent {
|
|
28
32
|
element: HTMLElement;
|
|
29
33
|
addClass(...classes: string[]): this;
|
|
30
34
|
destroy: () => void;
|
|
31
35
|
}
|
|
36
|
+
/** Options for withElement enhancer */
|
|
32
37
|
export interface WithElementOptions {
|
|
33
38
|
tag?: string;
|
|
34
39
|
componentName?: string;
|
|
@@ -49,7 +54,15 @@ export interface WithElementOptions {
|
|
|
49
54
|
interactive?: boolean;
|
|
50
55
|
parent?: HTMLElement | string;
|
|
51
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates a base component with configuration and prefix utilities.
|
|
59
|
+
* @param config
|
|
60
|
+
*/
|
|
52
61
|
export declare const createBase: <T extends BaseConfig & object = BaseConfig & object>(config?: T) => BaseComponent & {
|
|
53
62
|
config: T;
|
|
54
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Higher-order function that adds a DOM element to a component
|
|
66
|
+
* @param options
|
|
67
|
+
*/
|
|
55
68
|
export declare const withElement: (options?: WithElementOptions) => <T extends BaseComponent>(component: T) => T & ElementComponent;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
2
|
import type { BadgeComponent as Badge } from "../../../components/badge/types.js";
|
|
3
|
+
/** Configuration for badge feature */
|
|
3
4
|
export interface BadgeConfig {
|
|
5
|
+
/** Badge content to display */
|
|
4
6
|
badge?: string | number;
|
|
7
|
+
/** Custom badge configuration */
|
|
5
8
|
badgeConfig?: {
|
|
6
9
|
variant?: string;
|
|
7
10
|
color?: string;
|
|
@@ -9,9 +12,16 @@ export interface BadgeConfig {
|
|
|
9
12
|
position?: string;
|
|
10
13
|
max?: number;
|
|
11
14
|
};
|
|
15
|
+
/** CSS class prefix */
|
|
12
16
|
prefix?: string;
|
|
13
17
|
}
|
|
18
|
+
/** Component with badge capabilities */
|
|
14
19
|
export interface BadgeComponent extends BaseComponent {
|
|
20
|
+
/** Badge component instance */
|
|
15
21
|
badge?: Badge;
|
|
16
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Adds badge functionality to a component
|
|
25
|
+
* @param config
|
|
26
|
+
*/
|
|
17
27
|
export declare const withBadge: <T extends BadgeConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & BadgeComponent;
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import { BaseComponent } from "../component.js";
|
|
2
|
+
/** Configuration for checkable feature */
|
|
2
3
|
export interface CheckableConfig {
|
|
3
4
|
checked?: boolean;
|
|
4
5
|
}
|
|
6
|
+
/** Component with input element */
|
|
5
7
|
export interface InputComponent extends BaseComponent {
|
|
6
8
|
element: HTMLElement;
|
|
7
9
|
input: HTMLInputElement;
|
|
8
10
|
emit?: (event: string, data: unknown) => unknown;
|
|
11
|
+
/** This feature only subscribes to change and does not read its payload. */
|
|
9
12
|
on?: (event: "change", handler: () => void) => unknown;
|
|
10
13
|
}
|
|
14
|
+
/** Checkable state manager interface */
|
|
11
15
|
export interface CheckableManager {
|
|
16
|
+
/** Sets the checked state to true. */
|
|
12
17
|
check: () => CheckableManager;
|
|
18
|
+
/** Sets the checked state to false. */
|
|
13
19
|
uncheck: () => CheckableManager;
|
|
20
|
+
/** Toggles the current checked state. */
|
|
14
21
|
toggle: () => CheckableManager;
|
|
22
|
+
/** Gets the current checked state */
|
|
15
23
|
isChecked: () => boolean;
|
|
16
24
|
}
|
|
25
|
+
/** Component with checkable capabilities */
|
|
17
26
|
export interface CheckableComponent extends BaseComponent {
|
|
18
27
|
checkable: CheckableManager;
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Adds checked state management to a component with an input
|
|
31
|
+
* @param config
|
|
32
|
+
*/
|
|
20
33
|
export declare const withCheckable: <T extends CheckableConfig & object>(config?: T) => <C extends InputComponent>(component: C) => C & CheckableComponent;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Interface for components with lifecycle */
|
|
2
3
|
export interface ComponentWithLifecycle extends ElementComponent {
|
|
3
4
|
lifecycle: {
|
|
4
5
|
destroy: () => void;
|
|
5
6
|
[key: string]: unknown;
|
|
6
7
|
};
|
|
7
8
|
}
|
|
9
|
+
/** Configuration for debounced event handlers */
|
|
8
10
|
export interface DebounceConfig {
|
|
11
|
+
/** Event handlers with debounce settings */
|
|
9
12
|
debouncedEvents?: Record<string, {
|
|
10
13
|
handler: (event: Event) => void;
|
|
11
14
|
wait: number;
|
|
@@ -15,12 +18,28 @@ export interface DebounceConfig {
|
|
|
15
18
|
};
|
|
16
19
|
}>;
|
|
17
20
|
}
|
|
21
|
+
/** Component with debounced event capabilities */
|
|
18
22
|
export interface DebounceComponent extends BaseComponent {
|
|
23
|
+
/**
|
|
24
|
+
* Adds a debounced event listener
|
|
25
|
+
* @param event
|
|
26
|
+
* @param handler
|
|
27
|
+
* @param wait
|
|
28
|
+
* @param options
|
|
29
|
+
*/
|
|
19
30
|
addDebouncedEvent: (event: string, handler: (event: Event) => void, wait: number, options?: {
|
|
20
31
|
leading?: boolean;
|
|
21
32
|
maxWait?: number;
|
|
22
33
|
}) => DebounceComponent;
|
|
34
|
+
/**
|
|
35
|
+
* Removes a debounced event listener
|
|
36
|
+
* @param event
|
|
37
|
+
*/
|
|
23
38
|
removeDebouncedEvent: (event: string) => DebounceComponent;
|
|
24
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Adds debounced event handling capabilities to a component
|
|
42
|
+
* @param config
|
|
43
|
+
*/
|
|
25
44
|
export declare const withDebounce: <T extends DebounceConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & DebounceComponent;
|
|
26
45
|
export default withDebounce;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Configuration for disabled feature */
|
|
2
3
|
export interface DisabledConfig {
|
|
3
4
|
disabled?: boolean;
|
|
4
5
|
componentName?: string;
|
|
5
6
|
}
|
|
7
|
+
/** Disabled state manager interface */
|
|
6
8
|
export interface DisabledManager {
|
|
9
|
+
/** Enables the component */
|
|
7
10
|
enable(): DisabledManager;
|
|
11
|
+
/** Disables the component */
|
|
8
12
|
disable(): DisabledManager;
|
|
13
|
+
/** Toggles the disabled state */
|
|
9
14
|
toggle(): DisabledManager;
|
|
15
|
+
/** Checks if the component is disabled */
|
|
10
16
|
isDisabled(): boolean;
|
|
11
17
|
}
|
|
18
|
+
/** Component with disabled state capabilities */
|
|
12
19
|
export interface DisabledComponent extends BaseComponent {
|
|
13
20
|
disabled: DisabledManager;
|
|
14
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Adds disabled state management to a component
|
|
24
|
+
* @param config
|
|
25
|
+
*/
|
|
15
26
|
export declare const withDisabled: <T extends DisabledConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & DisabledComponent;
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { EventCallback } from "../../state/emitter.js";
|
|
2
2
|
import { BaseComponent } from "../component.js";
|
|
3
|
+
/** A component's events, by name: each one's handler. */
|
|
3
4
|
export type EventMap<E> = {
|
|
4
5
|
[K in keyof E]: EventCallback;
|
|
5
6
|
};
|
|
7
|
+
/** The map of a component that does not name its events. */
|
|
6
8
|
export type AnyEvents = Record<string, EventCallback>;
|
|
9
|
+
/** Component with event capabilities */
|
|
7
10
|
export interface EventComponent<E extends EventMap<E> = AnyEvents> extends BaseComponent {
|
|
11
|
+
/**
|
|
12
|
+
* Subscribe to an event
|
|
13
|
+
* @param event
|
|
14
|
+
* @param handler
|
|
15
|
+
*/
|
|
8
16
|
on<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
17
|
+
/**
|
|
18
|
+
* Unsubscribe from an event
|
|
19
|
+
* @param event
|
|
20
|
+
* @param handler
|
|
21
|
+
*/
|
|
9
22
|
off<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
23
|
+
/**
|
|
24
|
+
* Emit an event
|
|
25
|
+
* @param event
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
10
28
|
emit(event: string, data?: unknown): this;
|
|
11
29
|
}
|
|
30
|
+
/** Adds event handling capabilities to a component Returns event system ready to use immediately `withEvents<Events>()` names the component's events: `on` and `off` then check each name and its handler's payload. */
|
|
12
31
|
export declare const withEvents: <E extends EventMap<E> = AnyEvents>() => <T extends BaseComponent>(component: T) => T & EventComponent<E>;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Icon manager interface */
|
|
2
3
|
export interface IconManager {
|
|
4
|
+
/**
|
|
5
|
+
* Sets icon HTML content
|
|
6
|
+
* @param html
|
|
7
|
+
*/
|
|
3
8
|
setIcon: (html: string) => IconManager;
|
|
9
|
+
/** Gets current icon HTML content */
|
|
4
10
|
getIcon: () => string;
|
|
11
|
+
/** Gets icon element */
|
|
5
12
|
getElement: () => HTMLElement | null;
|
|
6
13
|
}
|
|
14
|
+
/** Configuration for icon feature */
|
|
7
15
|
export interface IconConfig {
|
|
16
|
+
/** Initial icon HTML content */
|
|
8
17
|
icon?: string;
|
|
18
|
+
/** Icon position ('start' or 'end') */
|
|
9
19
|
iconPosition?: "start" | "end";
|
|
20
|
+
/** Icon size variant */
|
|
10
21
|
iconSize?: string;
|
|
22
|
+
/** CSS class prefix */
|
|
11
23
|
prefix?: string;
|
|
24
|
+
/** Component name for class generation */
|
|
12
25
|
componentName?: string;
|
|
26
|
+
/** Text content (for determining button styling) */
|
|
13
27
|
text?: string | Node;
|
|
14
28
|
}
|
|
29
|
+
/** Component with icon capabilities */
|
|
15
30
|
export interface IconComponent extends BaseComponent {
|
|
31
|
+
/** Icon manager */
|
|
16
32
|
icon: IconManager;
|
|
17
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Adds icon management to a component
|
|
36
|
+
* @param config
|
|
37
|
+
*/
|
|
18
38
|
export declare const withIcon: <T extends IconConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & IconComponent;
|
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import { ElementComponent } from "../component.js";
|
|
2
|
+
/** Input configuration options */
|
|
2
3
|
export interface InputConfig {
|
|
4
|
+
/** Input name attribute */
|
|
3
5
|
name?: string;
|
|
6
|
+
/** Initial checked state */
|
|
4
7
|
checked?: boolean;
|
|
8
|
+
/** Whether input is required */
|
|
5
9
|
required?: boolean;
|
|
10
|
+
/** Whether input is disabled */
|
|
6
11
|
disabled?: boolean;
|
|
12
|
+
/** Input value attribute */
|
|
7
13
|
value?: string;
|
|
14
|
+
/** Accessibility label text */
|
|
8
15
|
label?: string | Node;
|
|
16
|
+
/** Alternative accessibility label */
|
|
9
17
|
ariaLabel?: string;
|
|
18
|
+
/** Component name for classes */
|
|
10
19
|
componentName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether Enter toggles the input as Space does
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
11
24
|
enterToggles?: boolean;
|
|
12
25
|
}
|
|
26
|
+
/** What withInput adds to a component. */
|
|
13
27
|
export interface InputFeature {
|
|
28
|
+
/** Input element */
|
|
14
29
|
input: HTMLInputElement;
|
|
30
|
+
/** Gets the checked state: the `value` a `change` carries */
|
|
15
31
|
getValue: () => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Checks or unchecks the input.
|
|
34
|
+
* @param value
|
|
35
|
+
*/
|
|
16
36
|
setValue(value: boolean): this;
|
|
37
|
+
/** Gets the input's `value` attribute: the string a form submits while checked */
|
|
17
38
|
getValueAttribute: () => string;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the input's `value` attribute.
|
|
41
|
+
* @param value
|
|
42
|
+
*/
|
|
18
43
|
setValueAttribute(value: string): this;
|
|
44
|
+
/** Event emission method if available */
|
|
19
45
|
emit?(event: string, data: unknown): this;
|
|
20
46
|
}
|
|
47
|
+
/** Component with input element and related methods */
|
|
21
48
|
export interface InputComponent extends ElementComponent, InputFeature {
|
|
22
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Creates an input element and adds it to a component Handles both input creation and event emission for state changes `change` carries `{ checked, value, valueAttribute, nativeEvent }`: `value` is the checked boolean, as the checkbox and the switch report it, and `valueAttribute` the input's string value.
|
|
52
|
+
* @param config
|
|
53
|
+
*/
|
|
23
54
|
export declare const withInput: <T extends InputConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & InputFeature;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Component managers that can be passed to lifecycle */
|
|
2
3
|
export interface ComponentManagers {
|
|
3
4
|
events?: {
|
|
4
5
|
destroy: () => void;
|
|
@@ -11,15 +12,30 @@ export interface ComponentManagers {
|
|
|
11
12
|
};
|
|
12
13
|
[key: string]: unknown;
|
|
13
14
|
}
|
|
15
|
+
/** Lifecycle methods interface */
|
|
14
16
|
export interface Lifecycle {
|
|
17
|
+
/**
|
|
18
|
+
* Registers a handler for mount event
|
|
19
|
+
* @param handler
|
|
20
|
+
*/
|
|
15
21
|
onMount: (handler: () => void) => () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Registers a handler for unmount event
|
|
24
|
+
* @param handler
|
|
25
|
+
*/
|
|
16
26
|
onUnmount: (handler: () => void) => () => void;
|
|
27
|
+
/** Mounts the component */
|
|
17
28
|
mount: () => void;
|
|
29
|
+
/** Unmounts the component */
|
|
18
30
|
unmount: () => void;
|
|
31
|
+
/** Checks if component is mounted */
|
|
19
32
|
isMounted: () => boolean;
|
|
33
|
+
/** Destroys the component */
|
|
20
34
|
destroy: () => void;
|
|
21
35
|
}
|
|
36
|
+
/** Component with lifecycle capabilities */
|
|
22
37
|
export interface LifecycleComponent extends BaseComponent {
|
|
23
38
|
lifecycle: Lifecycle;
|
|
24
39
|
}
|
|
40
|
+
/** Adds lifecycle management to a component */
|
|
25
41
|
export declare const withLifecycle: () => <T extends BaseComponent & Partial<Pick<ElementComponent, "element" | "destroy">>>(component: T) => T & LifecycleComponent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Available position values */
|
|
2
3
|
export declare enum POSITIONS {
|
|
3
4
|
LEFT = "left",
|
|
4
5
|
RIGHT = "right",
|
|
@@ -8,16 +9,28 @@ export declare enum POSITIONS {
|
|
|
8
9
|
END = "end",
|
|
9
10
|
CENTER = "center"
|
|
10
11
|
}
|
|
12
|
+
/** Configuration for position feature */
|
|
11
13
|
export interface PositionConfig {
|
|
12
14
|
position?: string;
|
|
13
15
|
prefix?: string;
|
|
14
16
|
componentName?: string;
|
|
15
17
|
}
|
|
18
|
+
/** Position manager interface */
|
|
16
19
|
export interface PositionManager {
|
|
20
|
+
/**
|
|
21
|
+
* Sets the component's position
|
|
22
|
+
* @param newPosition
|
|
23
|
+
*/
|
|
17
24
|
setPosition: (newPosition: string) => PositionManager;
|
|
25
|
+
/** Gets the current position */
|
|
18
26
|
getPosition: () => string;
|
|
19
27
|
}
|
|
28
|
+
/** Component with position capabilities */
|
|
20
29
|
export interface PositionComponent extends BaseComponent {
|
|
21
30
|
position: PositionManager;
|
|
22
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Adds positioning functionality to a component
|
|
34
|
+
* @param config
|
|
35
|
+
*/
|
|
23
36
|
export declare const withPosition: <T extends PositionConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & PositionComponent;
|
|
@@ -1,18 +1,35 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
2
|
import { LifecycleComponent } from "./lifecycle.js";
|
|
3
|
+
/** Ripple configuration interface */
|
|
3
4
|
export interface RippleConfig {
|
|
5
|
+
/** How long, in milliseconds, a released wave lingers before it is removed */
|
|
4
6
|
duration?: number;
|
|
5
7
|
}
|
|
8
|
+
/** Ripple controller interface */
|
|
6
9
|
export interface RippleController {
|
|
10
|
+
/**
|
|
11
|
+
* Mounts ripple effect to an element
|
|
12
|
+
* @param element
|
|
13
|
+
*/
|
|
7
14
|
mount: (element: HTMLElement) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Unmounts ripple effect from an element
|
|
17
|
+
* @param element
|
|
18
|
+
*/
|
|
8
19
|
unmount: (element: HTMLElement) => void;
|
|
9
20
|
}
|
|
21
|
+
/** Configuration for ripple feature */
|
|
10
22
|
export interface RippleFeatureConfig {
|
|
11
23
|
ripple?: boolean;
|
|
12
24
|
rippleConfig?: RippleConfig;
|
|
13
25
|
}
|
|
26
|
+
/** Component with ripple capabilities */
|
|
14
27
|
export interface RippleComponent extends BaseComponent {
|
|
15
28
|
ripple: RippleController;
|
|
16
29
|
}
|
|
17
30
|
export declare const createRipple: (config?: RippleConfig) => RippleController;
|
|
31
|
+
/**
|
|
32
|
+
* Adds ripple effect functionality to a component
|
|
33
|
+
* @param config
|
|
34
|
+
*/
|
|
18
35
|
export declare const withRipple: <T extends RippleFeatureConfig & object>(config: T) => <C extends ElementComponent & Partial<LifecycleComponent>>(component: C) => C & RippleComponent;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { ElementComponent } from "../component.js";
|
|
2
|
+
/** Configuration for size feature */
|
|
2
3
|
export interface SizeConfig {
|
|
3
4
|
size?: string;
|
|
4
5
|
prefix?: string;
|
|
5
6
|
componentName?: string;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Adds a size class to a component
|
|
10
|
+
* @param config
|
|
11
|
+
*/
|
|
7
12
|
export declare const withSize: <T extends SizeConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ElementComponent } from "../component.js";
|
|
2
|
+
/** Configuration for style feature */
|
|
2
3
|
export interface StyleConfig {
|
|
3
4
|
variant?: string;
|
|
4
5
|
size?: string;
|
|
5
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Adds style classes to a component based on configuration
|
|
9
|
+
* @param config
|
|
10
|
+
*/
|
|
6
11
|
export declare const withStyle: <T extends StyleConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C;
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
+
/** Text manager interface */
|
|
2
3
|
export interface TextManager {
|
|
4
|
+
/**
|
|
5
|
+
* Sets text content
|
|
6
|
+
* @param text
|
|
7
|
+
*/
|
|
8
|
+
/** Text, or a node placed inside the text element (the web components pass a `<slot>`). */
|
|
3
9
|
setText: (text: string | Node) => TextManager;
|
|
10
|
+
/** Gets current text content */
|
|
4
11
|
getText: () => string;
|
|
12
|
+
/** Gets text element */
|
|
5
13
|
getElement: () => HTMLElement | null;
|
|
6
14
|
}
|
|
15
|
+
/** Configuration for text feature */
|
|
7
16
|
export interface TextConfig {
|
|
17
|
+
/** Initial text content */
|
|
18
|
+
/** Text, or a node placed inside the text element. */
|
|
8
19
|
text?: string | Node;
|
|
20
|
+
/** CSS class prefix */
|
|
9
21
|
prefix?: string;
|
|
22
|
+
/** Component name for class generation */
|
|
10
23
|
componentName?: string;
|
|
24
|
+
/** Element to insert text before (optional) */
|
|
11
25
|
beforeElement?: HTMLElement;
|
|
12
26
|
}
|
|
27
|
+
/** Component with text capabilities */
|
|
13
28
|
export interface TextComponent extends BaseComponent {
|
|
29
|
+
/** Text manager */
|
|
14
30
|
text: TextManager;
|
|
15
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Adds text management to a component
|
|
34
|
+
* @param config
|
|
35
|
+
*/
|
|
16
36
|
export declare const withText: <T extends TextConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & TextComponent;
|
|
@@ -1,27 +1,66 @@
|
|
|
1
1
|
import { ElementComponent } from "../component.js";
|
|
2
|
+
/** Configuration for text input feature */
|
|
2
3
|
export interface TextInputConfig {
|
|
4
|
+
/** Input type (text, password, etc.) */
|
|
3
5
|
type?: string;
|
|
6
|
+
/** Whether to use textarea instead of input */
|
|
4
7
|
multiline?: boolean;
|
|
8
|
+
/** Input name attribute */
|
|
5
9
|
name?: string;
|
|
10
|
+
/** Whether input is required */
|
|
6
11
|
required?: boolean;
|
|
12
|
+
/** Whether input is disabled */
|
|
7
13
|
disabled?: boolean;
|
|
14
|
+
/** Maximum allowed length */
|
|
8
15
|
maxLength?: number;
|
|
16
|
+
/** Input validation pattern */
|
|
9
17
|
pattern?: string;
|
|
18
|
+
/** Autocomplete setting */
|
|
10
19
|
autocomplete?: string;
|
|
20
|
+
/** Initial input value */
|
|
11
21
|
value?: string;
|
|
22
|
+
/** Placeholder attribute */
|
|
12
23
|
placeholder?: string;
|
|
24
|
+
/** Accessible name for the native input or textarea. */
|
|
13
25
|
ariaLabel?: string;
|
|
26
|
+
/** Whether input is readonly */
|
|
14
27
|
readonly?: boolean;
|
|
15
28
|
}
|
|
29
|
+
/** What withTextInput adds to a component. */
|
|
16
30
|
export interface TextInputFeature {
|
|
31
|
+
/** Input element */
|
|
17
32
|
input: HTMLInputElement | HTMLTextAreaElement;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the input value
|
|
35
|
+
* @param value
|
|
36
|
+
*/
|
|
18
37
|
setValue(value: string): this;
|
|
38
|
+
/** Gets the current input value */
|
|
19
39
|
getValue: () => string;
|
|
40
|
+
/**
|
|
41
|
+
* Sets an attribute on the input
|
|
42
|
+
* @param name
|
|
43
|
+
* @param value
|
|
44
|
+
*/
|
|
20
45
|
setAttribute(name: string, value: string): this;
|
|
46
|
+
/**
|
|
47
|
+
* Gets an attribute from the input
|
|
48
|
+
* @param name
|
|
49
|
+
*/
|
|
21
50
|
getAttribute(name: string): string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Removes an attribute from the input
|
|
53
|
+
* @param name
|
|
54
|
+
*/
|
|
22
55
|
removeAttribute(name: string): this;
|
|
56
|
+
/** Event emission method if available */
|
|
23
57
|
emit?(event: string, data: unknown): this;
|
|
24
58
|
}
|
|
59
|
+
/** Component with text input element and related methods */
|
|
25
60
|
export interface TextInputComponent extends ElementComponent, TextInputFeature {
|
|
26
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Enhances a component with text input functionality
|
|
64
|
+
* @param config
|
|
65
|
+
*/
|
|
27
66
|
export declare const withTextInput: <T extends TextInputConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & TextInputFeature;
|