material 3.8.2 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/components/badge/index.d.ts +167 -3
- package/dist/components/bottom-app-bar/constants.d.ts +16 -3
- package/dist/components/bottom-app-bar/index.d.ts +141 -4
- package/dist/components/bottom-sheet/config.js +1 -1
- package/dist/components/bottom-sheet/features/structure.js +10 -2
- package/dist/components/bottom-sheet/index.d.ts +114 -2
- package/dist/components/button/index.d.ts +10 -5
- package/dist/components/button-group/button-group.js +2 -1
- package/dist/components/button-group/config.js +9 -6
- package/dist/components/button-group/index.d.ts +250 -6
- package/dist/components/card/api.js +19 -0
- package/dist/components/card/index.d.ts +326 -5
- package/dist/components/carousel/features/slides.js +17 -7
- package/dist/components/carousel/index.d.ts +102 -3
- package/dist/components/checkbox/config.js +3 -2
- package/dist/components/checkbox/index.d.ts +217 -5
- package/dist/components/chips/chip/chip.js +4 -3
- package/dist/components/chips/index.d.ts +343 -3
- package/dist/components/datepicker/config.js +1 -1
- package/dist/components/datepicker/datepicker.js +74 -87
- package/dist/components/datepicker/index.d.ts +313 -2
- package/dist/components/datepicker/render.js +24 -20
- package/dist/components/datepicker/utils.js +66 -111
- package/dist/components/dialog/features.js +1 -1
- package/dist/components/dialog/index.d.ts +333 -3
- package/dist/components/divider/index.d.ts +99 -3
- package/dist/components/drawer/features/items.js +10 -2
- package/dist/components/drawer/index.d.ts +196 -3
- package/dist/components/extended-fab/index.d.ts +224 -2
- package/dist/components/fab/index.d.ts +183 -2
- package/dist/components/fab-menu/index.d.ts +106 -6
- package/dist/components/icon-button/index.d.ts +11 -4
- package/dist/components/index.js +1 -1
- package/dist/components/list/features/anatomy.js +25 -6
- package/dist/components/list/features/listbox.js +230 -0
- package/dist/components/list/features/selection.js +30 -2
- package/dist/components/list/index.d.ts +299 -4
- package/dist/components/list/index.js +1 -0
- package/dist/components/loading-indicator/index.d.ts +94 -3
- package/dist/components/menu/config.js +2 -2
- package/dist/components/menu/constants.d.ts +4 -4
- package/dist/components/menu/constants.js +1 -1
- package/dist/components/menu/features/controller.js +14 -1
- package/dist/components/menu/features/position.js +15 -8
- package/dist/components/menu/features/submenu.js +3 -0
- package/dist/components/menu/index.d.ts +10 -6
- package/dist/components/menu/types.d.ts +13 -1
- package/dist/components/navigation-bar/index.d.ts +70 -2
- package/dist/components/navigation-rail/index.d.ts +98 -2
- package/dist/components/progress/index.d.ts +9 -2
- package/dist/components/radios/config.js +1 -0
- package/dist/components/radios/index.d.ts +158 -3
- package/dist/components/radios/radio.js +2 -0
- package/dist/components/search/features/input.js +6 -1
- package/dist/components/search/features/states.js +3 -3
- package/dist/components/search/features/structure.js +27 -5
- package/dist/components/search/features/suggestions.js +4 -0
- package/dist/components/search/index.d.ts +255 -2
- package/dist/components/select/index.d.ts +252 -6
- package/dist/components/side-sheet/config.js +1 -1
- package/dist/components/side-sheet/features/structure.js +10 -2
- package/dist/components/side-sheet/index.d.ts +104 -2
- package/dist/components/slider/config.js +3 -2
- package/dist/components/slider/index.d.ts +236 -2
- package/dist/components/snackbar/api.js +26 -0
- package/dist/components/snackbar/constants.d.ts +4 -0
- package/dist/components/snackbar/constants.js +3 -1
- package/dist/components/snackbar/index.d.ts +215 -4
- package/dist/components/split-button/config.js +1 -1
- package/dist/components/split-button/index.d.ts +10 -3
- package/dist/components/switch/config.js +3 -2
- package/dist/components/switch/index.d.ts +190 -3
- package/dist/components/tabs/config.js +1 -0
- package/dist/components/tabs/index.d.ts +476 -12
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/responsive-legacy.js +65 -0
- package/dist/components/tabs/responsive.d.ts +7 -32
- package/dist/components/tabs/responsive.js +4 -63
- package/dist/components/tabs/tab.js +11 -5
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/text-field/config.js +9 -5
- package/dist/components/text-field/features/field.js +61 -0
- package/dist/components/text-field/features/leading-icon.js +12 -45
- package/dist/components/text-field/features/prefix-text.js +6 -40
- package/dist/components/text-field/features/suffix-text.js +6 -40
- package/dist/components/text-field/index.d.ts +345 -3
- package/dist/components/timepicker/api.js +7 -8
- package/dist/components/timepicker/config.js +1 -1
- package/dist/components/timepicker/constants.d.ts +4 -4
- package/dist/components/timepicker/constants.js +2 -2
- package/dist/components/timepicker/index.d.ts +279 -5
- package/dist/components/timepicker/render.js +26 -6
- package/dist/components/timepicker/timepicker.js +0 -1
- package/dist/components/toolbar/config.js +1 -0
- package/dist/components/toolbar/constants.d.ts +4 -1
- package/dist/components/toolbar/constants.js +3 -0
- package/dist/components/toolbar/index.d.ts +145 -6
- package/dist/components/toolbar/toolbar.js +18 -3
- package/dist/components/tooltip/index.d.ts +155 -3
- package/dist/components/top-app-bar/index.d.ts +92 -5
- package/dist/core/canvas/index.d.ts +172 -5
- package/dist/core/compose/features/icon-opt-in.js +5 -0
- package/dist/core/compose/features/icon-slot.js +100 -0
- package/dist/core/compose/features/textinput.js +2 -0
- package/dist/core/compose/features/track.js +4 -0
- package/dist/core/compose/index.d.ts +744 -8
- package/dist/core/config/component.d.ts +5 -515
- package/dist/core/config/control-label.js +5 -0
- package/dist/core/dom/index.d.ts +245 -12
- package/dist/core/index.d.ts +93 -14
- package/dist/core/shapes/index.d.ts +286 -6
- package/dist/core/state/index.d.ts +98 -5
- package/dist/core/theme/index.d.ts +80 -4
- package/dist/core/utils/index.d.ts +98 -9
- package/dist/elements/bottom-sheet.js +3 -2
- package/dist/elements/css/badge.js +2 -2
- package/dist/elements/css/bottom-app-bar.js +2 -2
- package/dist/elements/css/bottom-sheet.css +1 -1
- package/dist/elements/css/bottom-sheet.js +2 -2
- package/dist/elements/css/button-group.css +1 -1
- package/dist/elements/css/button-group.js +2 -2
- package/dist/elements/css/button.css +1 -1
- package/dist/elements/css/button.js +2 -2
- package/dist/elements/css/card.js +2 -2
- package/dist/elements/css/carousel.js +2 -2
- package/dist/elements/css/checkbox.js +2 -2
- package/dist/elements/css/chips.js +2 -2
- package/dist/elements/css/datepicker.css +1 -1
- package/dist/elements/css/datepicker.js +2 -2
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/dialog.js +2 -2
- package/dist/elements/css/divider.js +2 -2
- package/dist/elements/css/drawer.css +1 -1
- package/dist/elements/css/drawer.js +2 -2
- package/dist/elements/css/extended-fab.js +2 -2
- package/dist/elements/css/fab-menu.js +2 -2
- package/dist/elements/css/fab.js +2 -2
- package/dist/elements/css/icon-button.css +1 -1
- package/dist/elements/css/icon-button.js +2 -2
- package/dist/elements/css/list.css +1 -1
- package/dist/elements/css/list.js +2 -2
- package/dist/elements/css/loading-indicator.js +2 -2
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +2 -2
- package/dist/elements/css/navigation-bar.js +2 -2
- package/dist/elements/css/navigation-rail.js +2 -2
- package/dist/elements/css/progress.js +2 -2
- package/dist/elements/css/radios.js +2 -2
- package/dist/elements/css/ripple.js +2 -2
- package/dist/elements/css/search.js +2 -2
- package/dist/elements/css/select.js +2 -2
- package/dist/elements/css/side-sheet.css +1 -1
- package/dist/elements/css/side-sheet.js +2 -2
- package/dist/elements/css/slider.js +2 -2
- package/dist/elements/css/snackbar.css +1 -1
- package/dist/elements/css/snackbar.js +2 -2
- package/dist/elements/css/split-button.js +2 -2
- package/dist/elements/css/switch.js +2 -2
- package/dist/elements/css/tabs.js +2 -2
- package/dist/elements/css/text-field.css +1 -1
- package/dist/elements/css/text-field.js +2 -2
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/timepicker.js +2 -2
- package/dist/elements/css/toolbar.css +1 -1
- package/dist/elements/css/toolbar.js +2 -2
- package/dist/elements/css/tooltip.js +2 -2
- package/dist/elements/css/top-app-bar.js +2 -2
- package/dist/elements/datepicker.js +2 -0
- package/dist/elements/define.js +12 -1
- package/dist/elements/drawer.js +2 -0
- package/dist/elements/index.d.ts +3946 -376
- package/dist/elements/menu.js +17 -3
- 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 +2 -2
- package/dist/elements/preupgrade/button.css +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/elements/preupgrade/list.css +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/elements/preupgrade.js +2 -3
- package/dist/elements/radios.js +5 -1
- package/dist/elements/search.js +19 -3
- package/dist/elements/sheet.js +16 -6
- package/dist/elements/side-sheet.js +5 -3
- package/dist/elements/snackbar.js +2 -0
- package/dist/elements/styles.js +39 -0
- package/dist/elements/switch.js +1 -0
- package/dist/elements/tabs.js +6 -0
- package/dist/elements/text-field.js +2 -0
- package/dist/elements/timepicker.js +1 -0
- package/dist/elements/toolbar.js +13 -1
- package/dist/index.d.ts +78 -4
- package/dist/react/index.d.ts +106 -52
- package/dist/react/jsx.d.ts +50 -49
- package/dist/solid/index.d.ts +106 -52
- package/dist/solid/jsx.d.ts +81 -76
- 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 +2 -2
- package/dist/styles/button-group.css +2 -2
- package/dist/styles/button.css +2 -2
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +2 -2
- 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 +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +2 -2
- package/dist/styles/list.css +2 -2
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +2 -2
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +2 -2
- 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 +2 -2
- 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/BottomAppBar.svelte.d.ts +1 -0
- package/dist/theme/2025.d.ts +3 -0
- package/dist/theme/2025.js +2 -0
- package/dist/theme/index.js +65 -17
- package/dist/theme/spec2025.d.ts +56 -0
- package/dist/theme/spec2025.js +37 -0
- package/dist/theme/vendor/dynamiccolor/color_spec_2025.js +846 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +7 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_color.js +9 -5
- package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +12 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +13 -9
- package/dist/theme/vendor/dynamiccolor/spec_2025.js +263 -0
- package/dist/theme/vendor/dynamiccolor/spec_extensions.js +70 -0
- package/dist/theme/vendor/palettes/tonal_palette.d.ts +23 -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/index.d.ts +192 -53
- package/package.json +12 -3
- package/src/styles/abstract/_functions.scss +22 -1
- package/src/styles/abstract/_variables.scss +0 -2
- package/src/styles/base/_tokens.scss +12 -0
- package/src/styles/components/_bottom-sheet.scss +1 -0
- package/src/styles/components/_button-group.scss +9 -5
- package/src/styles/components/_button.scss +28 -12
- package/src/styles/components/_datepicker.scss +1 -0
- package/src/styles/components/_dialog.scss +1 -0
- package/src/styles/components/_drawer.scss +33 -65
- package/src/styles/components/_icon-button.scss +32 -33
- package/src/styles/components/_list.scss +54 -6
- package/src/styles/components/_menu.scss +65 -46
- package/src/styles/components/_side-sheet.scss +1 -0
- package/src/styles/components/_snackbar.scss +1 -0
- package/src/styles/components/_text-field.scss +17 -109
- package/src/styles/components/_timepicker.scss +2 -1
- package/src/styles/components/_toolbar.scss +23 -6
- package/src/styles/elements/_button-group.scss +17 -4
- package/src/styles/elements/_button.scss +3 -2
- package/src/styles/elements/_drawer.scss +2 -1
- package/src/styles/elements/_field.scss +25 -14
- package/src/styles/elements/_icon-button.scss +8 -3
- package/src/styles/elements/_list.scss +3 -2
- package/src/styles/elements/_text-field.scss +71 -47
- package/dist/components/badge/badge.d.ts +0 -7
- package/dist/components/badge/types.d.ts +0 -152
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -6
- package/dist/components/bottom-app-bar/types.d.ts +0 -63
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -7
- package/dist/components/bottom-sheet/types.d.ts +0 -98
- package/dist/components/button/button.d.ts +0 -7
- package/dist/components/button-group/button-group.d.ts +0 -7
- package/dist/components/button-group/types.d.ts +0 -227
- package/dist/components/card/card.d.ts +0 -7
- package/dist/components/card/content.d.ts +0 -22
- package/dist/components/card/types.d.ts +0 -272
- package/dist/components/carousel/carousel.d.ts +0 -4
- package/dist/components/carousel/types.d.ts +0 -81
- package/dist/components/checkbox/checkbox.d.ts +0 -8
- package/dist/components/checkbox/types.d.ts +0 -194
- package/dist/components/chips/chips.d.ts +0 -7
- package/dist/components/chips/factories.d.ts +0 -9
- package/dist/components/chips/types.d.ts +0 -304
- package/dist/components/datepicker/datepicker.d.ts +0 -7
- package/dist/components/datepicker/types.d.ts +0 -296
- package/dist/components/datepicker/types.js +0 -17
- package/dist/components/dialog/dialog.d.ts +0 -8
- package/dist/components/dialog/types.d.ts +0 -311
- package/dist/components/divider/config.d.ts +0 -43
- package/dist/components/divider/divider.d.ts +0 -7
- package/dist/components/divider/types.d.ts +0 -43
- package/dist/components/drawer/drawer.d.ts +0 -7
- package/dist/components/drawer/types.d.ts +0 -179
- package/dist/components/extended-fab/extended-fab.d.ts +0 -7
- package/dist/components/extended-fab/types.d.ts +0 -208
- package/dist/components/fab/fab.d.ts +0 -7
- package/dist/components/fab/types.d.ts +0 -168
- package/dist/components/fab-menu/fab-menu.d.ts +0 -8
- package/dist/components/fab-menu/types.d.ts +0 -91
- package/dist/components/icon-button/icon-button.d.ts +0 -7
- package/dist/components/index.d.ts +0 -81
- package/dist/components/list/list.d.ts +0 -7
- package/dist/components/list/types.d.ts +0 -257
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -28
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -7
- package/dist/components/loading-indicator/types.d.ts +0 -53
- package/dist/components/menu/menu.d.ts +0 -7
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -3
- package/dist/components/navigation-bar/types.d.ts +0 -59
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -3
- package/dist/components/navigation-rail/types.d.ts +0 -87
- package/dist/components/progress/progress.d.ts +0 -7
- package/dist/components/radios/radios.d.ts +0 -7
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/search.d.ts +0 -7
- package/dist/components/search/types.d.ts +0 -235
- package/dist/components/select/select.d.ts +0 -7
- package/dist/components/select/types.d.ts +0 -232
- package/dist/components/side-sheet/side-sheet.d.ts +0 -7
- package/dist/components/side-sheet/types.d.ts +0 -89
- package/dist/components/slider/slider.d.ts +0 -7
- package/dist/components/slider/types.d.ts +0 -213
- package/dist/components/snackbar/snackbar.d.ts +0 -9
- package/dist/components/snackbar/types.d.ts +0 -180
- package/dist/components/split-button/split-button.d.ts +0 -7
- package/dist/components/switch/switch.d.ts +0 -7
- package/dist/components/switch/types.d.ts +0 -166
- package/dist/components/tabs/indicator.d.ts +0 -44
- package/dist/components/tabs/tab.d.ts +0 -7
- package/dist/components/tabs/tabs.d.ts +0 -7
- package/dist/components/tabs/types.d.ts +0 -300
- package/dist/components/tabs/utils.d.ts +0 -46
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -54
- package/dist/components/text-field/text-field.d.ts +0 -7
- package/dist/components/text-field/types.d.ts +0 -256
- package/dist/components/timepicker/timepicker.d.ts +0 -3
- package/dist/components/timepicker/types.d.ts +0 -254
- package/dist/components/toolbar/toolbar.d.ts +0 -8
- package/dist/components/toolbar/types.d.ts +0 -125
- package/dist/components/tooltip/tooltip.d.ts +0 -7
- package/dist/components/tooltip/types.d.ts +0 -137
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -7
- package/dist/components/top-app-bar/types.d.ts +0 -80
- package/dist/core/canvas/animation.d.ts +0 -20
- package/dist/core/canvas/drawing.d.ts +0 -67
- package/dist/core/canvas/resize.d.ts +0 -8
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -18
- package/dist/core/compose/features/badge.d.ts +0 -27
- package/dist/core/compose/features/checkable.d.ts +0 -33
- package/dist/core/compose/features/debounce.d.ts +0 -45
- package/dist/core/compose/features/disabled.d.ts +0 -26
- package/dist/core/compose/features/events.d.ts +0 -31
- package/dist/core/compose/features/index.d.ts +0 -34
- package/dist/core/compose/features/input.d.ts +0 -54
- package/dist/core/compose/features/lifecycle.d.ts +0 -41
- package/dist/core/compose/features/position.d.ts +0 -36
- package/dist/core/compose/features/ripple.d.ts +0 -35
- package/dist/core/compose/features/size.d.ts +0 -12
- package/dist/core/compose/features/style.d.ts +0 -11
- package/dist/core/compose/features/textinput.d.ts +0 -66
- package/dist/core/compose/features/textlabel.d.ts +0 -34
- package/dist/core/compose/features/throttle.d.ts +0 -38
- package/dist/core/compose/features/track.d.ts +0 -24
- package/dist/core/compose/features/variant.d.ts +0 -12
- package/dist/core/compose/features/withEvents.d.ts +0 -27
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -17
- package/dist/core/config.d.ts +0 -72
- package/dist/core/dom/attributes.d.ts +0 -34
- package/dist/core/dom/classes.d.ts +0 -29
- package/dist/core/dom/events.d.ts +0 -43
- package/dist/core/dom/focus.d.ts +0 -15
- package/dist/core/dom/html.d.ts +0 -16
- package/dist/core/dom/layer.d.ts +0 -57
- package/dist/core/dom/roving.d.ts +0 -18
- package/dist/core/shapes/cubic.d.ts +0 -45
- package/dist/core/shapes/material.d.ts +0 -131
- package/dist/core/shapes/polygon.d.ts +0 -38
- package/dist/core/state/events.d.ts +0 -25
- package/dist/core/state/store.d.ts +0 -60
- package/dist/core/theme/shape.d.ts +0 -5
- package/dist/core/theme/tokens.d.ts +0 -67
- package/dist/core/utils/background.d.ts +0 -13
- package/dist/core/utils/color.d.ts +0 -6
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -32
- package/dist/core/utils/theme.d.ts +0 -17
- package/dist/core/utils/url.d.ts +0 -6
- package/dist/elements/badge.d.ts +0 -57
- package/dist/elements/bottom-app-bar.d.ts +0 -49
- package/dist/elements/bottom-sheet.d.ts +0 -107
- package/dist/elements/button-group.d.ts +0 -142
- package/dist/elements/button.d.ts +0 -101
- package/dist/elements/card.d.ts +0 -69
- package/dist/elements/carousel.d.ts +0 -119
- package/dist/elements/checkbox.d.ts +0 -97
- package/dist/elements/chips.d.ts +0 -126
- package/dist/elements/css/badge.d.ts +0 -1
- package/dist/elements/css/bottom-app-bar.d.ts +0 -1
- package/dist/elements/css/bottom-sheet.d.ts +0 -1
- package/dist/elements/css/button-group.d.ts +0 -1
- package/dist/elements/css/button.d.ts +0 -1
- package/dist/elements/css/card.d.ts +0 -1
- package/dist/elements/css/carousel.d.ts +0 -1
- package/dist/elements/css/checkbox.d.ts +0 -1
- package/dist/elements/css/chips.d.ts +0 -1
- package/dist/elements/css/datepicker.d.ts +0 -1
- package/dist/elements/css/dialog.d.ts +0 -1
- package/dist/elements/css/divider.d.ts +0 -1
- package/dist/elements/css/drawer.d.ts +0 -1
- package/dist/elements/css/extended-fab.d.ts +0 -1
- package/dist/elements/css/fab-menu.d.ts +0 -1
- package/dist/elements/css/fab.d.ts +0 -1
- package/dist/elements/css/icon-button.d.ts +0 -1
- package/dist/elements/css/list.d.ts +0 -1
- package/dist/elements/css/loading-indicator.d.ts +0 -1
- package/dist/elements/css/menu.d.ts +0 -1
- package/dist/elements/css/navigation-bar.d.ts +0 -1
- package/dist/elements/css/navigation-rail.d.ts +0 -1
- package/dist/elements/css/progress.d.ts +0 -1
- package/dist/elements/css/radios.d.ts +0 -1
- package/dist/elements/css/ripple.d.ts +0 -1
- package/dist/elements/css/search.d.ts +0 -1
- package/dist/elements/css/select.d.ts +0 -1
- package/dist/elements/css/side-sheet.d.ts +0 -1
- package/dist/elements/css/slider.d.ts +0 -1
- package/dist/elements/css/snackbar.d.ts +0 -1
- package/dist/elements/css/split-button.d.ts +0 -1
- package/dist/elements/css/switch.d.ts +0 -1
- package/dist/elements/css/tabs.d.ts +0 -1
- package/dist/elements/css/text-field.d.ts +0 -1
- package/dist/elements/css/timepicker.d.ts +0 -1
- package/dist/elements/css/toolbar.d.ts +0 -1
- package/dist/elements/css/tooltip.d.ts +0 -1
- package/dist/elements/css/top-app-bar.d.ts +0 -1
- package/dist/elements/datepicker.d.ts +0 -126
- package/dist/elements/dialog.d.ts +0 -101
- package/dist/elements/divider.d.ts +0 -52
- package/dist/elements/drawer.d.ts +0 -119
- package/dist/elements/extended-fab.d.ts +0 -97
- package/dist/elements/fab-menu.d.ts +0 -102
- package/dist/elements/fab.d.ts +0 -71
- package/dist/elements/list.d.ts +0 -127
- package/dist/elements/loading-indicator.d.ts +0 -47
- package/dist/elements/menu.d.ts +0 -144
- package/dist/elements/navigation-bar.d.ts +0 -104
- package/dist/elements/navigation-rail.d.ts +0 -145
- package/dist/elements/progress.d.ts +0 -87
- package/dist/elements/radios.d.ts +0 -91
- package/dist/elements/search.d.ts +0 -202
- package/dist/elements/select.d.ts +0 -119
- package/dist/elements/side-sheet.d.ts +0 -83
- package/dist/elements/slider.d.ts +0 -160
- package/dist/elements/snackbar.d.ts +0 -87
- package/dist/elements/split-button.d.ts +0 -87
- package/dist/elements/switch.d.ts +0 -94
- package/dist/elements/tabs.d.ts +0 -71
- package/dist/elements/text-field.d.ts +0 -170
- package/dist/elements/timepicker.d.ts +0 -143
- package/dist/elements/toolbar.d.ts +0 -90
- package/dist/elements/tooltip.d.ts +0 -75
- package/dist/elements/top-app-bar.d.ts +0 -60
- package/dist/react/badge.d.ts +0 -4
- package/dist/react/bottom-app-bar.d.ts +0 -4
- package/dist/react/bottom-sheet.d.ts +0 -4
- package/dist/react/button-group-item.d.ts +0 -3
- package/dist/react/button-group.d.ts +0 -7
- package/dist/react/button.d.ts +0 -5
- package/dist/react/card.d.ts +0 -4
- package/dist/react/carousel-item.d.ts +0 -3
- package/dist/react/carousel.d.ts +0 -4
- package/dist/react/checkbox.d.ts +0 -4
- package/dist/react/chip.d.ts +0 -3
- package/dist/react/chips.d.ts +0 -4
- package/dist/react/datepicker.d.ts +0 -4
- package/dist/react/dialog.d.ts +0 -7
- package/dist/react/divider.d.ts +0 -4
- package/dist/react/drawer-item.d.ts +0 -3
- package/dist/react/drawer.d.ts +0 -4
- package/dist/react/extended-fab.d.ts +0 -4
- package/dist/react/fab-menu-item.d.ts +0 -3
- package/dist/react/fab-menu.d.ts +0 -6
- package/dist/react/fab.d.ts +0 -4
- package/dist/react/icon-button.d.ts +0 -4
- package/dist/react/list-item.d.ts +0 -3
- package/dist/react/list.d.ts +0 -4
- package/dist/react/loading-indicator.d.ts +0 -4
- package/dist/react/menu-item.d.ts +0 -3
- package/dist/react/menu.d.ts +0 -4
- package/dist/react/navigation-bar-item.d.ts +0 -3
- package/dist/react/navigation-bar.d.ts +0 -4
- package/dist/react/navigation-rail-item.d.ts +0 -3
- package/dist/react/navigation-rail.d.ts +0 -4
- package/dist/react/progress.d.ts +0 -4
- package/dist/react/radio.d.ts +0 -3
- package/dist/react/radios.d.ts +0 -4
- package/dist/react/search-suggestion.d.ts +0 -3
- package/dist/react/search.d.ts +0 -4
- package/dist/react/select-option.d.ts +0 -3
- package/dist/react/select.d.ts +0 -6
- package/dist/react/side-sheet.d.ts +0 -4
- package/dist/react/slider.d.ts +0 -4
- package/dist/react/snackbar.d.ts +0 -7
- package/dist/react/split-button.d.ts +0 -7
- package/dist/react/switch.d.ts +0 -4
- package/dist/react/tab.d.ts +0 -3
- package/dist/react/tabs.d.ts +0 -7
- package/dist/react/text-field.d.ts +0 -4
- package/dist/react/timepicker.d.ts +0 -4
- package/dist/react/toolbar.d.ts +0 -5
- package/dist/react/tooltip.d.ts +0 -4
- package/dist/react/top-app-bar.d.ts +0 -4
- package/dist/solid/badge.d.ts +0 -4
- package/dist/solid/bottom-app-bar.d.ts +0 -4
- package/dist/solid/bottom-sheet.d.ts +0 -4
- package/dist/solid/button-group-item.d.ts +0 -3
- package/dist/solid/button-group.d.ts +0 -7
- package/dist/solid/button.d.ts +0 -5
- package/dist/solid/card.d.ts +0 -4
- package/dist/solid/carousel-item.d.ts +0 -3
- package/dist/solid/carousel.d.ts +0 -4
- package/dist/solid/checkbox.d.ts +0 -4
- package/dist/solid/chip.d.ts +0 -3
- package/dist/solid/chips.d.ts +0 -4
- package/dist/solid/datepicker.d.ts +0 -4
- package/dist/solid/dialog.d.ts +0 -7
- package/dist/solid/divider.d.ts +0 -4
- package/dist/solid/drawer-item.d.ts +0 -3
- package/dist/solid/drawer.d.ts +0 -4
- package/dist/solid/extended-fab.d.ts +0 -4
- package/dist/solid/fab-menu-item.d.ts +0 -3
- package/dist/solid/fab-menu.d.ts +0 -6
- package/dist/solid/fab.d.ts +0 -4
- package/dist/solid/icon-button.d.ts +0 -4
- package/dist/solid/list-item.d.ts +0 -3
- package/dist/solid/list.d.ts +0 -4
- package/dist/solid/loading-indicator.d.ts +0 -4
- package/dist/solid/menu-item.d.ts +0 -3
- package/dist/solid/menu.d.ts +0 -4
- package/dist/solid/navigation-bar-item.d.ts +0 -3
- package/dist/solid/navigation-bar.d.ts +0 -4
- package/dist/solid/navigation-rail-item.d.ts +0 -3
- package/dist/solid/navigation-rail.d.ts +0 -4
- package/dist/solid/progress.d.ts +0 -4
- package/dist/solid/radio.d.ts +0 -3
- package/dist/solid/radios.d.ts +0 -4
- package/dist/solid/search-suggestion.d.ts +0 -3
- package/dist/solid/search.d.ts +0 -4
- package/dist/solid/select-option.d.ts +0 -3
- package/dist/solid/select.d.ts +0 -6
- package/dist/solid/side-sheet.d.ts +0 -4
- package/dist/solid/slider.d.ts +0 -4
- package/dist/solid/snackbar.d.ts +0 -7
- package/dist/solid/split-button.d.ts +0 -7
- package/dist/solid/switch.d.ts +0 -4
- package/dist/solid/tab.d.ts +0 -3
- package/dist/solid/tabs.d.ts +0 -7
- package/dist/solid/text-field.d.ts +0 -4
- package/dist/solid/timepicker.d.ts +0 -4
- package/dist/solid/toolbar.d.ts +0 -5
- package/dist/solid/tooltip.d.ts +0 -4
- package/dist/solid/top-app-bar.d.ts +0 -4
- package/dist/styles/badge.d.ts +0 -1
- package/dist/styles/base-lite.d.ts +0 -1
- package/dist/styles/base.d.ts +0 -1
- package/dist/styles/bottom-app-bar.d.ts +0 -1
- package/dist/styles/bottom-sheet.d.ts +0 -1
- package/dist/styles/button-group.d.ts +0 -1
- package/dist/styles/button.d.ts +0 -1
- package/dist/styles/card.d.ts +0 -1
- package/dist/styles/carousel.d.ts +0 -1
- package/dist/styles/checkbox.d.ts +0 -1
- package/dist/styles/chips.d.ts +0 -1
- package/dist/styles/contrast.d.ts +0 -1
- package/dist/styles/datepicker.d.ts +0 -1
- package/dist/styles/dialog.d.ts +0 -1
- package/dist/styles/divider.d.ts +0 -1
- package/dist/styles/drawer.d.ts +0 -1
- package/dist/styles/extended-fab.d.ts +0 -1
- package/dist/styles/fab-menu.d.ts +0 -1
- package/dist/styles/fab.d.ts +0 -1
- package/dist/styles/icon-button.d.ts +0 -1
- package/dist/styles/list.d.ts +0 -1
- package/dist/styles/loading-indicator.d.ts +0 -1
- package/dist/styles/menu.d.ts +0 -1
- package/dist/styles/navigation-bar.d.ts +0 -1
- package/dist/styles/navigation-rail.d.ts +0 -1
- package/dist/styles/progress.d.ts +0 -1
- package/dist/styles/radios.d.ts +0 -1
- package/dist/styles/search.d.ts +0 -1
- package/dist/styles/select.d.ts +0 -1
- package/dist/styles/side-sheet.d.ts +0 -1
- package/dist/styles/slider.d.ts +0 -1
- package/dist/styles/snackbar.d.ts +0 -1
- package/dist/styles/split-button.d.ts +0 -1
- package/dist/styles/switch.d.ts +0 -1
- package/dist/styles/tabs.d.ts +0 -1
- package/dist/styles/text-field.d.ts +0 -1
- package/dist/styles/timepicker.d.ts +0 -1
- package/dist/styles/toolbar.d.ts +0 -1
- package/dist/styles/tooltip.d.ts +0 -1
- package/dist/styles/top-app-bar.d.ts +0 -1
- package/dist/styles/typography.d.ts +0 -1
- package/dist/styles/utilities.d.ts +0 -1
- package/dist/theme/roles.js +0 -68
- package/dist/theme/vendor/scheme/scheme_content.js +0 -30
- package/dist/theme/vendor/scheme/scheme_expressive.js +0 -30
- package/dist/theme/vendor/scheme/scheme_fidelity.js +0 -30
- package/dist/theme/vendor/scheme/scheme_monochrome.js +0 -30
- package/dist/theme/vendor/scheme/scheme_neutral.js +0 -30
- package/dist/theme/vendor/scheme/scheme_tonal_spot.js +0 -30
- package/dist/theme/vendor/scheme/scheme_vibrant.js +0 -30
- package/dist/vue/badge.d.ts +0 -4
- package/dist/vue/bottom-app-bar.d.ts +0 -4
- package/dist/vue/bottom-sheet.d.ts +0 -4
- package/dist/vue/button-group-item.d.ts +0 -3
- package/dist/vue/button-group.d.ts +0 -7
- package/dist/vue/button.d.ts +0 -5
- package/dist/vue/card.d.ts +0 -4
- package/dist/vue/carousel-item.d.ts +0 -3
- package/dist/vue/carousel.d.ts +0 -4
- package/dist/vue/checkbox.d.ts +0 -4
- package/dist/vue/chip.d.ts +0 -3
- package/dist/vue/chips.d.ts +0 -4
- package/dist/vue/create.d.ts +0 -73
- package/dist/vue/datepicker.d.ts +0 -4
- package/dist/vue/dialog.d.ts +0 -7
- package/dist/vue/divider.d.ts +0 -4
- package/dist/vue/drawer-item.d.ts +0 -3
- package/dist/vue/drawer.d.ts +0 -4
- package/dist/vue/extended-fab.d.ts +0 -4
- package/dist/vue/fab-menu-item.d.ts +0 -3
- package/dist/vue/fab-menu.d.ts +0 -6
- package/dist/vue/fab.d.ts +0 -4
- package/dist/vue/icon-button.d.ts +0 -4
- package/dist/vue/list-item.d.ts +0 -3
- package/dist/vue/list.d.ts +0 -4
- package/dist/vue/loading-indicator.d.ts +0 -4
- package/dist/vue/menu-item.d.ts +0 -3
- package/dist/vue/menu.d.ts +0 -4
- package/dist/vue/navigation-bar-item.d.ts +0 -3
- package/dist/vue/navigation-bar.d.ts +0 -4
- package/dist/vue/navigation-rail-item.d.ts +0 -3
- package/dist/vue/navigation-rail.d.ts +0 -4
- package/dist/vue/progress.d.ts +0 -4
- package/dist/vue/radio.d.ts +0 -3
- package/dist/vue/radios.d.ts +0 -4
- package/dist/vue/search-suggestion.d.ts +0 -3
- package/dist/vue/search.d.ts +0 -4
- package/dist/vue/select-option.d.ts +0 -3
- package/dist/vue/select.d.ts +0 -6
- package/dist/vue/side-sheet.d.ts +0 -4
- package/dist/vue/slider.d.ts +0 -4
- package/dist/vue/snackbar.d.ts +0 -7
- package/dist/vue/split-button.d.ts +0 -7
- package/dist/vue/switch.d.ts +0 -4
- package/dist/vue/tab.d.ts +0 -3
- package/dist/vue/tabs.d.ts +0 -7
- package/dist/vue/text-field.d.ts +0 -4
- package/dist/vue/timepicker.d.ts +0 -4
- package/dist/vue/toolbar.d.ts +0 -5
- package/dist/vue/tooltip.d.ts +0 -4
- package/dist/vue/top-app-bar.d.ts +0 -4
|
@@ -1,9 +1,745 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { BadgeComponent as Badge } from "../../components/badge/index.js";
|
|
2
|
+
import { EventCallback } from "../state/emitter.js";
|
|
3
|
+
import { BaseComponent, ElementComponent } from "./component.js";
|
|
4
|
+
|
|
5
|
+
/** Interface for components with lifecycle */
|
|
6
|
+
interface ComponentWithLifecycle extends ElementComponent {
|
|
7
|
+
lifecycle: {
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Interface for components with emit method */
|
|
14
|
+
interface ComponentWithEmit extends ElementComponent {
|
|
15
|
+
emit: (event: string, data: unknown) => unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Type guard to check if component has lifecycle */
|
|
19
|
+
declare function hasLifecycle(component: object): component is ComponentWithLifecycle;
|
|
20
|
+
|
|
21
|
+
/** Type guard to check if component has emit method */
|
|
22
|
+
declare function hasEmit(component: object): component is ComponentWithEmit;
|
|
23
|
+
/**
|
|
24
|
+
* Performs left-to-right function composition.
|
|
25
|
+
* @param fns
|
|
26
|
+
*/
|
|
27
|
+
declare function pipe<A, B>(f1: (arg: A) => B): (x: A) => B;
|
|
28
|
+
|
|
29
|
+
declare function pipe<A, B, C>(f1: (arg: A) => B, f2: (arg: B) => C): (x: A) => C;
|
|
30
|
+
|
|
31
|
+
declare function pipe<A, B, C, D>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D): (x: A) => D;
|
|
32
|
+
|
|
33
|
+
declare function pipe<A, B, C, D, E>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E): (x: A) => E;
|
|
34
|
+
|
|
35
|
+
declare function pipe<A, B, C, D, E, F>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F): (x: A) => F;
|
|
36
|
+
|
|
37
|
+
declare function pipe<A, B, C, D, E, F, G>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G): (x: A) => G;
|
|
38
|
+
|
|
39
|
+
declare function pipe<A, B, C, D, E, F, G, H>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H): (x: A) => H;
|
|
40
|
+
|
|
41
|
+
declare function pipe<A, B, C, D, E, F, G, H, I>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I): (x: A) => I;
|
|
42
|
+
|
|
43
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J): (x: A) => J;
|
|
44
|
+
|
|
45
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K): (x: A) => K;
|
|
46
|
+
|
|
47
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L): (x: A) => L;
|
|
48
|
+
|
|
49
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M): (x: A) => M;
|
|
50
|
+
|
|
51
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N): (x: A) => N;
|
|
52
|
+
|
|
53
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O): (x: A) => O;
|
|
54
|
+
|
|
55
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P): (x: A) => P;
|
|
56
|
+
|
|
57
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P, f16: (arg: P) => Q): (x: A) => Q;
|
|
58
|
+
|
|
59
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P, f16: (arg: P) => Q, f17: (arg: Q) => R): (x: A) => R;
|
|
60
|
+
|
|
61
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P, f16: (arg: P) => Q, f17: (arg: Q) => R, f18: (arg: R) => S): (x: A) => S;
|
|
62
|
+
|
|
63
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P, f16: (arg: P) => Q, f17: (arg: Q) => R, f18: (arg: R) => S, f19: (arg: S) => T): (x: A) => T;
|
|
64
|
+
|
|
65
|
+
declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D, f4: (arg: D) => E, f5: (arg: E) => F, f6: (arg: F) => G, f7: (arg: G) => H, f8: (arg: H) => I, f9: (arg: I) => J, f10: (arg: J) => K, f11: (arg: K) => L, f12: (arg: L) => M, f13: (arg: M) => N, f14: (arg: N) => O, f15: (arg: O) => P, f16: (arg: P) => Q, f17: (arg: Q) => R, f18: (arg: R) => S, f19: (arg: S) => T, f20: (arg: T) => U): (x: A) => U;
|
|
66
|
+
|
|
67
|
+
declare function pipe<T>(...fns: Array<(arg: T) => T>): (x: T) => T;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Performs right-to-left function composition.
|
|
71
|
+
* @param fns
|
|
72
|
+
*/
|
|
73
|
+
declare function compose<A, B>(f1: (arg: A) => B): (x: A) => B;
|
|
74
|
+
|
|
75
|
+
declare function compose<A, B, C>(f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => C;
|
|
76
|
+
|
|
77
|
+
declare function compose<A, B, C, D>(f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => D;
|
|
78
|
+
|
|
79
|
+
declare function compose<A, B, C, D, E>(f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => E;
|
|
80
|
+
|
|
81
|
+
declare function compose<A, B, C, D, E, F>(f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => F;
|
|
82
|
+
|
|
83
|
+
declare function compose<A, B, C, D, E, F, G>(f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => G;
|
|
84
|
+
|
|
85
|
+
declare function compose<A, B, C, D, E, F, G, H>(f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => H;
|
|
86
|
+
|
|
87
|
+
declare function compose<A, B, C, D, E, F, G, H, I>(f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => I;
|
|
88
|
+
|
|
89
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J>(f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => J;
|
|
90
|
+
|
|
91
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K>(f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => K;
|
|
92
|
+
|
|
93
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L>(f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => L;
|
|
94
|
+
|
|
95
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M>(f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => M;
|
|
96
|
+
|
|
97
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => N;
|
|
98
|
+
|
|
99
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => O;
|
|
100
|
+
|
|
101
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => P;
|
|
102
|
+
|
|
103
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(f16: (arg: P) => Q, f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => Q;
|
|
104
|
+
|
|
105
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(f17: (arg: Q) => R, f16: (arg: P) => Q, f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => R;
|
|
106
|
+
|
|
107
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(f18: (arg: R) => S, f17: (arg: Q) => R, f16: (arg: P) => Q, f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => S;
|
|
108
|
+
|
|
109
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(f19: (arg: S) => T, f18: (arg: R) => S, f17: (arg: Q) => R, f16: (arg: P) => Q, f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => T;
|
|
110
|
+
|
|
111
|
+
declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(f20: (arg: T) => U, f19: (arg: S) => T, f18: (arg: R) => S, f17: (arg: Q) => R, f16: (arg: P) => Q, f15: (arg: O) => P, f14: (arg: N) => O, f13: (arg: M) => N, f12: (arg: L) => M, f11: (arg: K) => L, f10: (arg: J) => K, f9: (arg: I) => J, f8: (arg: H) => I, f7: (arg: G) => H, f6: (arg: F) => G, f5: (arg: E) => F, f4: (arg: D) => E, f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => U;
|
|
112
|
+
|
|
113
|
+
declare function compose<T>(...fns: Array<(arg: T) => T>): (x: T) => T;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Creates a function that applies transformations to an object with shared context.
|
|
117
|
+
* @param transformers
|
|
118
|
+
*/
|
|
119
|
+
declare const transform: <T, C = Record<string, unknown>>(...transformers: Array<(obj: T, context: C) => Partial<T>>) => (obj: T, context?: C) => T;
|
|
120
|
+
/** Configuration for component creation */
|
|
121
|
+
interface ComponentConfig {
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** Basic component interface */
|
|
126
|
+
interface Component {
|
|
127
|
+
/** Component element */
|
|
128
|
+
element: HTMLElement | null;
|
|
129
|
+
/** Component configuration */
|
|
130
|
+
config: ComponentConfig;
|
|
131
|
+
/** Setup method */
|
|
132
|
+
setup: () => Component;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Creates a basic component with minimal structure
|
|
137
|
+
* @param config
|
|
138
|
+
*/
|
|
139
|
+
declare const createComponent: (config?: object) => Component;
|
|
140
|
+
|
|
141
|
+
/** Component managers that can be passed to lifecycle */
|
|
142
|
+
interface ComponentManagers {
|
|
143
|
+
events?: {
|
|
144
|
+
destroy: () => void;
|
|
145
|
+
};
|
|
146
|
+
text?: {
|
|
147
|
+
getElement: () => HTMLElement | null;
|
|
148
|
+
};
|
|
149
|
+
icon?: {
|
|
150
|
+
getElement: () => HTMLElement | null;
|
|
151
|
+
};
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Lifecycle methods interface */
|
|
156
|
+
interface Lifecycle {
|
|
157
|
+
/**
|
|
158
|
+
* Registers a handler for mount event
|
|
159
|
+
* @param handler
|
|
160
|
+
*/
|
|
161
|
+
onMount: (handler: () => void) => () => void;
|
|
162
|
+
/**
|
|
163
|
+
* Registers a handler for unmount event
|
|
164
|
+
* @param handler
|
|
165
|
+
*/
|
|
166
|
+
onUnmount: (handler: () => void) => () => void;
|
|
167
|
+
/** Mounts the component */
|
|
168
|
+
mount: () => void;
|
|
169
|
+
/** Unmounts the component */
|
|
170
|
+
unmount: () => void;
|
|
171
|
+
/** Checks if component is mounted */
|
|
172
|
+
isMounted: () => boolean;
|
|
173
|
+
/** Destroys the component */
|
|
174
|
+
destroy: () => void;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** Component with lifecycle capabilities */
|
|
178
|
+
interface LifecycleComponent extends BaseComponent {
|
|
179
|
+
lifecycle: Lifecycle;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Adds lifecycle management to a component */
|
|
183
|
+
declare const withLifecycle: () => <T extends BaseComponent & Partial<Pick<ElementComponent, "element" | "destroy">>>(component: T) => T & LifecycleComponent;
|
|
184
|
+
|
|
185
|
+
/** Configuration for style feature */
|
|
186
|
+
interface StyleConfig {
|
|
187
|
+
variant?: string;
|
|
188
|
+
size?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Adds style classes to a component based on configuration
|
|
193
|
+
* @param config
|
|
194
|
+
*/
|
|
195
|
+
declare const withStyle: <T extends StyleConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C;
|
|
196
|
+
|
|
197
|
+
/** Configuration for track feature */
|
|
198
|
+
interface TrackConfig {
|
|
199
|
+
/** CSS class prefix */
|
|
200
|
+
prefix: string;
|
|
201
|
+
/** Component name for class generation */
|
|
202
|
+
componentName: string;
|
|
203
|
+
/** Custom icon HTML or 'none' */
|
|
204
|
+
icon?: string;
|
|
205
|
+
/** Icon HTML shown in the unselected handle, which then grows to 24dp: M3's "icon on selected and unselected switch" configuration. */
|
|
206
|
+
unselectedIcon?: string;
|
|
207
|
+
/** When true, the thumb graphic is `aria-hidden`. */
|
|
208
|
+
controlLabelOnly?: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Component with track and thumb elements */
|
|
212
|
+
interface TrackComponent extends BaseComponent {
|
|
213
|
+
/** Track element */
|
|
214
|
+
track: HTMLElement;
|
|
215
|
+
/** Thumb element */
|
|
216
|
+
thumb: HTMLElement;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Adds track and thumb elements to a component
|
|
221
|
+
* @param config
|
|
222
|
+
*/
|
|
223
|
+
declare const withTrack: <T extends TrackConfig>(config: T) => <C extends ElementComponent>(component: C) => C & TrackComponent;
|
|
224
|
+
|
|
225
|
+
/** Event manager interface */
|
|
226
|
+
interface EnhancedEventManager {
|
|
227
|
+
/** Add an event listener */
|
|
228
|
+
on: (event: string, handler: Function) => EnhancedEventManager;
|
|
229
|
+
/** Remove an event listener */
|
|
230
|
+
off: (event: string, handler: Function) => EnhancedEventManager;
|
|
231
|
+
/** Add multiple event listeners at once */
|
|
232
|
+
addListeners: (listeners: Record<string, Function>) => EnhancedEventManager;
|
|
233
|
+
/** Remove multiple event listeners at once */
|
|
234
|
+
removeListeners: (listeners: Record<string, Function>) => EnhancedEventManager;
|
|
235
|
+
/** One-time event handler */
|
|
236
|
+
once: (event: string, handler: Function) => EnhancedEventManager;
|
|
237
|
+
/** Clean up all event listeners */
|
|
238
|
+
destroy: () => void;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** Component with enhanced event capabilities */
|
|
242
|
+
interface EnhancedEventComponent extends BaseComponent {
|
|
243
|
+
events: EnhancedEventManager;
|
|
244
|
+
on(event: string, handler: Function): this;
|
|
245
|
+
off(event: string, handler: Function): this;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Adds enhanced event handling capabilities to a component
|
|
250
|
+
* @param target
|
|
251
|
+
*/
|
|
252
|
+
declare const withEnhancedEvents: (target?: HTMLElement) => <C extends ElementComponent>(component: C) => C & EnhancedEventComponent;
|
|
253
|
+
|
|
254
|
+
/** Configuration for text input feature */
|
|
255
|
+
interface TextInputConfig {
|
|
256
|
+
/** Input type (text, password, etc.) */
|
|
257
|
+
type?: string;
|
|
258
|
+
/** Whether to use textarea instead of input */
|
|
259
|
+
multiline?: boolean;
|
|
260
|
+
/** Input name attribute */
|
|
261
|
+
name?: string;
|
|
262
|
+
/** Whether input is required */
|
|
263
|
+
required?: boolean;
|
|
264
|
+
/** Whether input is disabled */
|
|
265
|
+
disabled?: boolean;
|
|
266
|
+
/** Maximum allowed length */
|
|
267
|
+
maxLength?: number;
|
|
268
|
+
/** Input validation pattern */
|
|
269
|
+
pattern?: string;
|
|
270
|
+
/** Autocomplete setting */
|
|
271
|
+
autocomplete?: string;
|
|
272
|
+
/** Virtual keyboard to show for the input (`inputmode`) */
|
|
273
|
+
inputMode?: string;
|
|
274
|
+
/** The virtual keyboard's Enter key label (`enterkeyhint`) */
|
|
275
|
+
enterKeyHint?: string;
|
|
276
|
+
/** Initial input value */
|
|
277
|
+
value?: string;
|
|
278
|
+
/** Placeholder attribute */
|
|
279
|
+
placeholder?: string;
|
|
280
|
+
/** Accessible name for the native input or textarea. */
|
|
281
|
+
ariaLabel?: string;
|
|
282
|
+
/** Whether input is readonly */
|
|
283
|
+
readonly?: boolean;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** What withTextInput adds to a component. */
|
|
287
|
+
interface TextInputFeature {
|
|
288
|
+
/** Input element */
|
|
289
|
+
input: HTMLInputElement | HTMLTextAreaElement;
|
|
290
|
+
/**
|
|
291
|
+
* Sets the input value
|
|
292
|
+
* @param value
|
|
293
|
+
*/
|
|
294
|
+
setValue(value: string): this;
|
|
295
|
+
/** Gets the current input value */
|
|
296
|
+
getValue: () => string;
|
|
297
|
+
/**
|
|
298
|
+
* Sets an attribute on the input
|
|
299
|
+
* @param name
|
|
300
|
+
* @param value
|
|
301
|
+
*/
|
|
302
|
+
setAttribute(name: string, value: string): this;
|
|
303
|
+
/**
|
|
304
|
+
* Gets an attribute from the input
|
|
305
|
+
* @param name
|
|
306
|
+
*/
|
|
307
|
+
getAttribute(name: string): string | null;
|
|
308
|
+
/**
|
|
309
|
+
* Removes an attribute from the input
|
|
310
|
+
* @param name
|
|
311
|
+
*/
|
|
312
|
+
removeAttribute(name: string): this;
|
|
313
|
+
/** Event emission method if available */
|
|
314
|
+
emit?(event: string, data: unknown): this;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** Component with text input element and related methods */
|
|
318
|
+
interface TextInputComponent extends ElementComponent, TextInputFeature {
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Enhances a component with text input functionality
|
|
323
|
+
* @param config
|
|
324
|
+
*/
|
|
325
|
+
declare const withTextInput: <T extends TextInputConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & TextInputFeature;
|
|
326
|
+
|
|
327
|
+
/** Configuration for throttled event handlers */
|
|
328
|
+
interface ThrottleConfig {
|
|
329
|
+
/** Event handlers with throttle settings */
|
|
330
|
+
throttledEvents?: Record<string, {
|
|
331
|
+
handler: (event: Event) => void;
|
|
332
|
+
wait: number;
|
|
333
|
+
options?: {
|
|
334
|
+
leading?: boolean;
|
|
335
|
+
trailing?: boolean;
|
|
336
|
+
};
|
|
337
|
+
}>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/** Component with throttled event capabilities */
|
|
341
|
+
interface ThrottleComponent extends BaseComponent {
|
|
342
|
+
/**
|
|
343
|
+
* Adds a throttled event listener
|
|
344
|
+
* @param event
|
|
345
|
+
* @param handler
|
|
346
|
+
* @param wait
|
|
347
|
+
* @param options
|
|
348
|
+
*/
|
|
349
|
+
addThrottledEvent: (event: string, handler: (event: Event) => void, wait: number, options?: {
|
|
350
|
+
leading?: boolean;
|
|
351
|
+
trailing?: boolean;
|
|
352
|
+
}) => ThrottleComponent;
|
|
353
|
+
/**
|
|
354
|
+
* Removes a throttled event listener
|
|
355
|
+
* @param event
|
|
356
|
+
*/
|
|
357
|
+
removeThrottledEvent: (event: string) => ThrottleComponent;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Adds throttled event handling capabilities to a component
|
|
362
|
+
* @param config
|
|
363
|
+
*/
|
|
364
|
+
declare const withThrottle: <T extends ThrottleConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & ThrottleComponent;
|
|
365
|
+
|
|
366
|
+
/** Interface for components with lifecycle */
|
|
367
|
+
interface ComponentWithLifecycle_1 extends ElementComponent {
|
|
368
|
+
lifecycle: {
|
|
369
|
+
destroy: () => void;
|
|
370
|
+
[key: string]: unknown;
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/** Configuration for debounced event handlers */
|
|
375
|
+
interface DebounceConfig {
|
|
376
|
+
/** Event handlers with debounce settings */
|
|
377
|
+
debouncedEvents?: Record<string, {
|
|
378
|
+
handler: (event: Event) => void;
|
|
379
|
+
wait: number;
|
|
380
|
+
options?: {
|
|
381
|
+
leading?: boolean;
|
|
382
|
+
maxWait?: number;
|
|
383
|
+
};
|
|
384
|
+
}>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** Component with debounced event capabilities */
|
|
388
|
+
interface DebounceComponent extends BaseComponent {
|
|
389
|
+
/**
|
|
390
|
+
* Adds a debounced event listener
|
|
391
|
+
* @param event
|
|
392
|
+
* @param handler
|
|
393
|
+
* @param wait
|
|
394
|
+
* @param options
|
|
395
|
+
*/
|
|
396
|
+
addDebouncedEvent: (event: string, handler: (event: Event) => void, wait: number, options?: {
|
|
397
|
+
leading?: boolean;
|
|
398
|
+
maxWait?: number;
|
|
399
|
+
}) => DebounceComponent;
|
|
400
|
+
/**
|
|
401
|
+
* Removes a debounced event listener
|
|
402
|
+
* @param event
|
|
403
|
+
*/
|
|
404
|
+
removeDebouncedEvent: (event: string) => DebounceComponent;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Adds debounced event handling capabilities to a component
|
|
409
|
+
* @param config
|
|
410
|
+
*/
|
|
411
|
+
declare const withDebounce: <T extends DebounceConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & DebounceComponent;
|
|
412
|
+
|
|
413
|
+
/** Configuration for text label feature */
|
|
414
|
+
interface TextLabelConfig {
|
|
415
|
+
/** Label text */
|
|
416
|
+
/** The label: text, or a node placed inside the label element (the web components pass a `<slot>` so the page's content is the label). */
|
|
417
|
+
label?: string | Node;
|
|
418
|
+
/** Label position ('start' or 'end') */
|
|
419
|
+
labelPosition?: "start" | "end";
|
|
420
|
+
/** CSS class prefix */
|
|
421
|
+
prefix?: string;
|
|
422
|
+
/** Component name for class generation */
|
|
423
|
+
componentName?: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/** Label manager interface */
|
|
427
|
+
interface LabelManager {
|
|
428
|
+
/**
|
|
429
|
+
* Sets the label text
|
|
430
|
+
* @param text
|
|
431
|
+
*/
|
|
432
|
+
setText: (text: string) => LabelManager;
|
|
433
|
+
/** Gets the current label text */
|
|
434
|
+
getText: () => string;
|
|
435
|
+
/** Gets the label element */
|
|
436
|
+
getElement: () => HTMLElement;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/** Component with label capabilities */
|
|
440
|
+
interface LabelComponent extends BaseComponent {
|
|
441
|
+
label: LabelManager;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* Adds a text label to a component
|
|
446
|
+
* @param config
|
|
447
|
+
*/
|
|
448
|
+
declare const withTextLabel: <T extends TextLabelConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & LabelComponent;
|
|
449
|
+
|
|
450
|
+
/** Configuration for size feature */
|
|
451
|
+
interface SizeConfig {
|
|
452
|
+
size?: string;
|
|
453
|
+
prefix?: string;
|
|
454
|
+
componentName?: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Adds a size class to a component
|
|
459
|
+
* @param config
|
|
460
|
+
*/
|
|
461
|
+
declare const withSize: <T extends SizeConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C;
|
|
462
|
+
|
|
463
|
+
/** Ripple configuration interface */
|
|
464
|
+
interface RippleConfig {
|
|
465
|
+
/** How long, in milliseconds, a released wave lingers before it is removed */
|
|
466
|
+
duration?: number;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/** Ripple controller interface */
|
|
470
|
+
interface RippleController {
|
|
471
|
+
/**
|
|
472
|
+
* Mounts ripple effect to an element
|
|
473
|
+
* @param element
|
|
474
|
+
*/
|
|
475
|
+
mount: (element: HTMLElement) => void;
|
|
476
|
+
/**
|
|
477
|
+
* Unmounts ripple effect from an element
|
|
478
|
+
* @param element
|
|
479
|
+
*/
|
|
480
|
+
unmount: (element: HTMLElement) => void;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** Configuration for ripple feature */
|
|
484
|
+
interface RippleFeatureConfig {
|
|
485
|
+
ripple?: boolean;
|
|
486
|
+
rippleConfig?: RippleConfig;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/** Component with ripple capabilities */
|
|
490
|
+
interface RippleComponent extends BaseComponent {
|
|
491
|
+
ripple: RippleController;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
declare const createRipple: (config?: RippleConfig) => RippleController;
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Adds ripple effect functionality to a component
|
|
498
|
+
* @param config
|
|
499
|
+
*/
|
|
500
|
+
declare const withRipple: <T extends RippleFeatureConfig & object>(config: T) => <C extends ElementComponent & Partial<LifecycleComponent>>(component: C) => C & RippleComponent;
|
|
501
|
+
|
|
502
|
+
/** Configuration for badge feature */
|
|
503
|
+
interface BadgeConfig {
|
|
504
|
+
/** Badge content to display */
|
|
505
|
+
badge?: string | number;
|
|
506
|
+
/** Custom badge configuration */
|
|
507
|
+
badgeConfig?: {
|
|
508
|
+
variant?: string;
|
|
509
|
+
color?: string;
|
|
510
|
+
size?: string;
|
|
511
|
+
position?: string;
|
|
512
|
+
max?: number;
|
|
513
|
+
};
|
|
514
|
+
/** CSS class prefix */
|
|
515
|
+
prefix?: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** Component with badge capabilities */
|
|
519
|
+
interface BadgeComponent extends BaseComponent {
|
|
520
|
+
/** Badge component instance */
|
|
521
|
+
badge?: Badge;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Adds badge functionality to a component
|
|
526
|
+
* @param config
|
|
527
|
+
*/
|
|
528
|
+
declare const withBadge: <T extends BadgeConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & BadgeComponent;
|
|
529
|
+
|
|
530
|
+
/** A component's events, by name: each one's handler. */
|
|
531
|
+
type EventMap<E> = {
|
|
532
|
+
[K in keyof E]: EventCallback;
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
/** The map of a component that does not name its events. */
|
|
536
|
+
type AnyEvents = Record<string, EventCallback>;
|
|
537
|
+
|
|
538
|
+
/** Component with event capabilities */
|
|
539
|
+
interface EventComponent<E extends EventMap<E> = AnyEvents> extends BaseComponent {
|
|
540
|
+
/**
|
|
541
|
+
* Subscribe to an event
|
|
542
|
+
* @param event
|
|
543
|
+
* @param handler
|
|
544
|
+
*/
|
|
545
|
+
on<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
546
|
+
/**
|
|
547
|
+
* Unsubscribe from an event
|
|
548
|
+
* @param event
|
|
549
|
+
* @param handler
|
|
550
|
+
*/
|
|
551
|
+
off<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
552
|
+
/**
|
|
553
|
+
* Emit an event
|
|
554
|
+
* @param event
|
|
555
|
+
* @param data
|
|
556
|
+
*/
|
|
557
|
+
emit(event: string, data?: unknown): this;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/** 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. */
|
|
561
|
+
declare const withEvents: <E extends EventMap<E> = AnyEvents>() => <T extends BaseComponent>(component: T) => T & EventComponent<E>;
|
|
562
|
+
|
|
563
|
+
/** Input configuration options */
|
|
564
|
+
interface InputConfig {
|
|
565
|
+
/** Input name attribute */
|
|
566
|
+
name?: string;
|
|
567
|
+
/** Initial checked state */
|
|
568
|
+
checked?: boolean;
|
|
569
|
+
/** Whether input is required */
|
|
570
|
+
required?: boolean;
|
|
571
|
+
/** Whether input is disabled */
|
|
572
|
+
disabled?: boolean;
|
|
573
|
+
/** Input value attribute */
|
|
574
|
+
value?: string;
|
|
575
|
+
/** Accessibility label text */
|
|
576
|
+
label?: string | Node;
|
|
577
|
+
/** Alternative accessibility label */
|
|
578
|
+
ariaLabel?: string;
|
|
579
|
+
/** Component name for classes */
|
|
580
|
+
componentName?: string;
|
|
581
|
+
/**
|
|
582
|
+
* Whether Enter toggles the input as Space does
|
|
583
|
+
* @default true
|
|
584
|
+
*/
|
|
585
|
+
enterToggles?: boolean;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/** What withInput adds to a component. */
|
|
589
|
+
interface InputFeature {
|
|
590
|
+
/** Input element */
|
|
591
|
+
input: HTMLInputElement;
|
|
592
|
+
/** Gets the checked state: the `value` a `change` carries */
|
|
593
|
+
getValue: () => boolean;
|
|
594
|
+
/**
|
|
595
|
+
* Checks or unchecks the input.
|
|
596
|
+
* @param value
|
|
597
|
+
*/
|
|
598
|
+
setValue(value: boolean): this;
|
|
599
|
+
/** Gets the input's `value` attribute: the string a form submits while checked */
|
|
600
|
+
getValueAttribute: () => string;
|
|
601
|
+
/**
|
|
602
|
+
* Sets the input's `value` attribute.
|
|
603
|
+
* @param value
|
|
604
|
+
*/
|
|
605
|
+
setValueAttribute(value: string): this;
|
|
606
|
+
/** Event emission method if available */
|
|
607
|
+
emit?(event: string, data: unknown): this;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/** Component with input element and related methods */
|
|
611
|
+
interface InputComponent extends ElementComponent, InputFeature {
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* 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.
|
|
616
|
+
* @param config
|
|
617
|
+
*/
|
|
618
|
+
declare const withInput: <T extends InputConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & InputFeature;
|
|
619
|
+
|
|
620
|
+
/** Available position values */
|
|
621
|
+
declare enum POSITIONS {
|
|
622
|
+
LEFT = "left",
|
|
623
|
+
RIGHT = "right",
|
|
624
|
+
TOP = "top",
|
|
625
|
+
BOTTOM = "bottom",
|
|
626
|
+
START = "start",
|
|
627
|
+
END = "end",
|
|
628
|
+
CENTER = "center"
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/** Configuration for position feature */
|
|
632
|
+
interface PositionConfig {
|
|
633
|
+
position?: string;
|
|
634
|
+
prefix?: string;
|
|
635
|
+
componentName?: string;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/** Position manager interface */
|
|
639
|
+
interface PositionManager {
|
|
640
|
+
/**
|
|
641
|
+
* Sets the component's position
|
|
642
|
+
* @param newPosition
|
|
643
|
+
*/
|
|
644
|
+
setPosition: (newPosition: string) => PositionManager;
|
|
645
|
+
/** Gets the current position */
|
|
646
|
+
getPosition: () => string;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** Component with position capabilities */
|
|
650
|
+
interface PositionComponent extends BaseComponent {
|
|
651
|
+
position: PositionManager;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Adds positioning functionality to a component
|
|
656
|
+
* @param config
|
|
657
|
+
*/
|
|
658
|
+
declare const withPosition: <T extends PositionConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & PositionComponent;
|
|
659
|
+
|
|
660
|
+
/** Configuration for variant feature */
|
|
661
|
+
interface VariantConfig {
|
|
662
|
+
variant?: string;
|
|
663
|
+
prefix?: string;
|
|
664
|
+
componentName?: string;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Adds a variant class to a component
|
|
669
|
+
* @param config
|
|
670
|
+
*/
|
|
671
|
+
declare const withVariant: <T extends VariantConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C;
|
|
672
|
+
|
|
673
|
+
/** Configuration for disabled feature */
|
|
674
|
+
interface DisabledConfig {
|
|
675
|
+
disabled?: boolean;
|
|
676
|
+
componentName?: string;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/** Disabled state manager interface */
|
|
680
|
+
interface DisabledManager {
|
|
681
|
+
/** Enables the component */
|
|
682
|
+
enable(): DisabledManager;
|
|
683
|
+
/** Disables the component */
|
|
684
|
+
disable(): DisabledManager;
|
|
685
|
+
/** Toggles the disabled state */
|
|
686
|
+
toggle(): DisabledManager;
|
|
687
|
+
/** Checks if the component is disabled */
|
|
688
|
+
isDisabled(): boolean;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
/** Component with disabled state capabilities */
|
|
692
|
+
interface DisabledComponent extends BaseComponent {
|
|
693
|
+
disabled: DisabledManager;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Adds disabled state management to a component
|
|
698
|
+
* @param config
|
|
699
|
+
*/
|
|
700
|
+
declare const withDisabled: <T extends DisabledConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & DisabledComponent;
|
|
701
|
+
|
|
702
|
+
/** Configuration for checkable feature */
|
|
703
|
+
interface CheckableConfig {
|
|
704
|
+
checked?: boolean;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/** Component with input element */
|
|
708
|
+
interface InputComponent_1 extends BaseComponent {
|
|
709
|
+
element: HTMLElement;
|
|
710
|
+
input: HTMLInputElement;
|
|
711
|
+
emit?: (event: string, data: unknown) => unknown;
|
|
712
|
+
/** This feature only subscribes to change and does not read its payload. */
|
|
713
|
+
on?: (event: "change", handler: () => void) => unknown;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/** Checkable state manager interface */
|
|
717
|
+
interface CheckableManager {
|
|
718
|
+
/** Sets the checked state to true. */
|
|
719
|
+
check: () => CheckableManager;
|
|
720
|
+
/** Sets the checked state to false. */
|
|
721
|
+
uncheck: () => CheckableManager;
|
|
722
|
+
/** Toggles the current checked state. */
|
|
723
|
+
toggle: () => CheckableManager;
|
|
724
|
+
/** Gets the current checked state */
|
|
725
|
+
isChecked: () => boolean;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/** Component with checkable capabilities */
|
|
729
|
+
interface CheckableComponent extends BaseComponent {
|
|
730
|
+
checkable: CheckableManager;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Adds checked state management to a component with an input
|
|
735
|
+
* @param config
|
|
736
|
+
*/
|
|
737
|
+
declare const withCheckable: <T extends CheckableConfig & object>(config?: T) => <C extends InputComponent_1>(component: C) => C & CheckableComponent;
|
|
738
|
+
export type { CheckableComponent, CheckableManager, Component, ComponentWithEmit, ComponentWithLifecycle, DebounceComponent, DebounceConfig, DisabledComponent, DisabledManager, EnhancedEventComponent, EventComponent, InputComponent, LabelComponent, LabelManager, Lifecycle, LifecycleComponent, RippleComponent, TextInputComponent, ThrottleComponent, ThrottleConfig, TrackComponent };
|
|
739
|
+
export { compose, createComponent, hasEmit, hasLifecycle, pipe, transform, withCheckable, withDebounce, withDisabled, withEnhancedEvents, withEvents, withInput, withLifecycle, withPosition, withRipple, withSize, withStyle, withTextInput, withTextLabel, withThrottle, withTrack, withVariant };
|
|
740
|
+
export type { BaseComponent, BaseConfig, ElementComponent, TouchState, WithElementOptions } from "./component.js";
|
|
741
|
+
export type { IconComponent } from "./features/icon.js";
|
|
742
|
+
export type { TextComponent } from "./features/text.js";
|
|
3
743
|
export { createBase, withElement } from "./component.js";
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
6
|
-
export type { BaseComponent, BaseConfig, ElementComponent, TouchState, WithElementOptions, } from "./component.js";
|
|
7
|
-
export type { EventComponent, TextComponent, IconComponent, LifecycleComponent, Lifecycle, DisabledComponent, DisabledManager, RippleComponent, InputComponent, CheckableComponent, CheckableManager, TextInputComponent, LabelComponent, LabelManager, TrackComponent, EnhancedEventComponent, ThrottleComponent, ThrottleConfig, DebounceComponent, DebounceConfig, } from "./features/index.js";
|
|
8
|
-
export { hasLifecycle, hasEmit } from "./utils/type-guards.js";
|
|
9
|
-
export type { ComponentWithLifecycle, ComponentWithEmit, } from "./utils/type-guards.js";
|
|
744
|
+
export { withIcon } from "./features/icon.js";
|
|
745
|
+
export { withText } from "./features/text.js";
|