material 3.2.6 → 3.3.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 +1 -1
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/config.js +3 -2
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +1 -35
- package/dist/components/extended-fab/types.d.ts +2 -654
- package/dist/components/fab/config.js +3 -2
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +1 -34
- package/dist/components/fab/types.d.ts +2 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -23
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +24 -18
- package/dist/elements/button.js +12 -0
- package/dist/elements/card.d.ts +12 -24
- package/dist/elements/card.js +3 -2
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/extended-fab.css +1 -1
- package/dist/elements/css/extended-fab.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/fab.css +1 -1
- package/dist/elements/css/fab.js +1 -1
- package/dist/elements/css/hosts/extended-fab.css +1 -1
- package/dist/elements/css/hosts/fab.css +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +10 -18
- package/dist/elements/extended-fab.js +3 -1
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +8 -17
- package/dist/elements/fab.js +3 -1
- package/dist/elements/floating-placement.js +1 -0
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- 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 +2 -2
- package/dist/elements/preupgrade/card.css +2 -2
- 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 +2 -2
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +2 -2
- 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 +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +1 -10
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +2 -2
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +2 -2
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- 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 +1 -1
- package/dist/styles/slider.css +1 -1
- 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 +1 -1
- package/dist/styles/timepicker.css +1 -1
- 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/Button.svelte +5 -4
- package/dist/svelte/runtime.d.ts +8 -62
- 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 +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/abstract/_floating-placement.scss +12 -0
- package/src/styles/components/_extended-fab.scss +34 -8
- package/src/styles/components/_fab-menu.scss +58 -8
- package/src/styles/components/_fab.scss +34 -8
- package/src/styles/elements/_button.scss +27 -5
- package/src/styles/elements/_card.scss +14 -0
- package/src/styles/elements/_extended-fab.scss +2 -0
- package/src/styles/elements/_fab.scss +2 -0
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common canvas context interface used by components
|
|
3
|
-
*/
|
|
4
1
|
export interface CanvasContext {
|
|
5
2
|
canvas: HTMLCanvasElement;
|
|
6
3
|
ctx: CanvasRenderingContext2D;
|
|
@@ -8,78 +5,19 @@ export interface CanvasContext {
|
|
|
8
5
|
height: number;
|
|
9
6
|
pixelRatio: number;
|
|
10
7
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Creates and initializes a canvas context with proper pixel ratio handling
|
|
13
|
-
*
|
|
14
|
-
* @param canvas - The canvas element
|
|
15
|
-
* @param width - Canvas width
|
|
16
|
-
* @param height - Canvas height
|
|
17
|
-
* @returns Initialized canvas context
|
|
18
|
-
*/
|
|
19
8
|
export declare const createCanvasContext: (canvas: HTMLCanvasElement, width: number, height: number) => CanvasContext;
|
|
20
|
-
/**
|
|
21
|
-
* Updates canvas dimensions while preserving pixel ratio
|
|
22
|
-
*
|
|
23
|
-
* @param context - The canvas context to update
|
|
24
|
-
* @param width - New width
|
|
25
|
-
* @param height - New height
|
|
26
|
-
*/
|
|
27
9
|
export declare const updateCanvasDimensions: (context: CanvasContext, width: number, height: number) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Tries to initialize a canvas with retry mechanism
|
|
30
|
-
*
|
|
31
|
-
* @param initFn - Function that performs initialization
|
|
32
|
-
* @param onSuccess - Optional callback on successful initialization
|
|
33
|
-
* @param signal - Optional signal to cancel pending initialization attempts
|
|
34
|
-
* @returns Whether initialization was immediately successful
|
|
35
|
-
*/
|
|
36
10
|
export declare const initializeCanvasWithRetry: (initFn: () => boolean, onSuccess?: () => void, signal?: AbortSignal) => boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Creates a theme observer that triggers a callback on theme changes
|
|
39
|
-
*
|
|
40
|
-
* @param _color - Colour name retained for compatibility; notifications cover all colours
|
|
41
|
-
* @param callback - Function to call when theme changes
|
|
42
|
-
* @returns Function that unsubscribes from theme changes
|
|
43
|
-
*/
|
|
44
11
|
export declare const createCanvasThemeObserver: (_color: string, callback: () => void) => (() => void);
|
|
45
|
-
/**
|
|
46
|
-
* Standard animation frame manager for components
|
|
47
|
-
*/
|
|
48
12
|
export declare class AnimationFrameManager {
|
|
49
13
|
private animationId;
|
|
50
|
-
/**
|
|
51
|
-
* Starts an animation loop
|
|
52
|
-
* @param callback - Animation callback receiving timestamp
|
|
53
|
-
*/
|
|
54
14
|
start(callback: (timestamp: number) => void): void;
|
|
55
|
-
/**
|
|
56
|
-
* Stops the animation loop
|
|
57
|
-
*/
|
|
58
15
|
stop(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Whether animation is currently running
|
|
61
|
-
*/
|
|
62
16
|
get isRunning(): boolean;
|
|
63
17
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Manages multiple cleanup functions for components
|
|
66
|
-
*/
|
|
67
18
|
export declare class CleanupManager {
|
|
68
19
|
private cleanupFunctions;
|
|
69
|
-
/**
|
|
70
|
-
* Adds a cleanup function
|
|
71
|
-
*/
|
|
72
20
|
add(cleanup: (() => void) | null | undefined): void;
|
|
73
|
-
/**
|
|
74
|
-
* Runs all cleanup functions and clears the list
|
|
75
|
-
*/
|
|
76
21
|
cleanup(): void;
|
|
77
22
|
}
|
|
78
|
-
/**
|
|
79
|
-
* Creates a standard canvas element with common styles
|
|
80
|
-
*
|
|
81
|
-
* @param className - CSS class name for the canvas
|
|
82
|
-
* @param additionalStyles - Additional styles to apply
|
|
83
|
-
* @returns Canvas element
|
|
84
|
-
*/
|
|
85
23
|
export declare const createStyledCanvas: (className: string, additionalStyles?: Partial<CSSStyleDeclaration>) => HTMLCanvasElement;
|
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for component creation
|
|
3
|
-
*/
|
|
4
1
|
export interface ComponentConfig {
|
|
5
2
|
[key: string]: unknown;
|
|
6
3
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Basic component interface
|
|
9
|
-
*/
|
|
10
4
|
export interface Component {
|
|
11
|
-
/**
|
|
12
|
-
* Component element
|
|
13
|
-
*/
|
|
14
5
|
element: HTMLElement | null;
|
|
15
|
-
/**
|
|
16
|
-
* Component configuration
|
|
17
|
-
*/
|
|
18
6
|
config: ComponentConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Setup method
|
|
21
|
-
* @returns Component for chaining
|
|
22
|
-
*/
|
|
23
7
|
setup: () => Component;
|
|
24
8
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Creates a basic component with minimal structure
|
|
27
|
-
*
|
|
28
|
-
* @param config - Component configuration
|
|
29
|
-
* @returns Basic component structure
|
|
30
|
-
*/
|
|
31
9
|
export declare const createComponent: (config?: object) => Component;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/** A resource scope shared by every stage of a component's composition. */
|
|
2
1
|
export interface CleanupScope {
|
|
3
2
|
readonly destroyed: boolean;
|
|
4
3
|
add(cleanup: () => void): void;
|
|
5
4
|
destroy(): void;
|
|
6
5
|
}
|
|
7
6
|
export declare const createCleanup: () => CleanupScope;
|
|
8
|
-
/** Also support custom component bases that already provide a lifecycle. */
|
|
9
7
|
export declare const getCleanup: (component: {
|
|
10
8
|
resources?: CleanupScope;
|
|
11
9
|
lifecycle?: {
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/compose/component
|
|
3
|
-
* @description Core utilities for component composition and creation with built-in mobile support
|
|
4
|
-
*/
|
|
5
1
|
import { type CleanupScope } from "./cleanup.js";
|
|
6
2
|
import { EventCondition } from "../dom/create.js";
|
|
7
|
-
/**
|
|
8
|
-
* Touch state interface to track touch interactions
|
|
9
|
-
*/
|
|
10
3
|
export interface TouchState {
|
|
11
4
|
startTime: number;
|
|
12
5
|
startPosition: {
|
|
@@ -16,17 +9,11 @@ export interface TouchState {
|
|
|
16
9
|
isTouching: boolean;
|
|
17
10
|
activeTarget: EventTarget | null;
|
|
18
11
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Config keys the base component and withElement read
|
|
21
|
-
*/
|
|
22
12
|
export interface BaseConfig {
|
|
23
13
|
componentName?: string;
|
|
24
14
|
prefix?: string;
|
|
25
15
|
parent?: HTMLElement | string | null;
|
|
26
16
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Base component interface with prefix utilities
|
|
29
|
-
*/
|
|
30
17
|
export interface BaseComponent {
|
|
31
18
|
resources?: CleanupScope;
|
|
32
19
|
config: BaseConfig & Record<string, unknown>;
|
|
@@ -37,17 +24,11 @@ export interface BaseComponent {
|
|
|
37
24
|
touchState: TouchState;
|
|
38
25
|
updateTouchState: (event: Event, status: "start" | "end") => void;
|
|
39
26
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Element component extends base with element
|
|
42
|
-
*/
|
|
43
27
|
export interface ElementComponent extends BaseComponent {
|
|
44
28
|
element: HTMLElement;
|
|
45
29
|
addClass(...classes: string[]): this;
|
|
46
30
|
destroy: () => void;
|
|
47
31
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Options for withElement enhancer
|
|
50
|
-
*/
|
|
51
32
|
export interface WithElementOptions {
|
|
52
33
|
tag?: string;
|
|
53
34
|
componentName?: string;
|
|
@@ -68,19 +49,7 @@ export interface WithElementOptions {
|
|
|
68
49
|
interactive?: boolean;
|
|
69
50
|
parent?: HTMLElement | string;
|
|
70
51
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Creates a base component with configuration and prefix utilities.
|
|
73
|
-
* This forms the foundation for all components in the system.
|
|
74
|
-
*
|
|
75
|
-
* @param {Object} config - Component configuration
|
|
76
|
-
* @returns {BaseComponent} Base component with prefix utilities
|
|
77
|
-
*/
|
|
78
52
|
export declare const createBase: <T extends BaseConfig & object = BaseConfig & object>(config?: T) => BaseComponent & {
|
|
79
53
|
config: T;
|
|
80
54
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Higher-order function that adds a DOM element to a component
|
|
83
|
-
* @param {WithElementOptions} options - Element creation options
|
|
84
|
-
* @returns {Function} Component enhancer
|
|
85
|
-
*/
|
|
86
55
|
export declare const withElement: (options?: WithElementOptions) => <T extends BaseComponent>(component: T) => T & ElementComponent;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
2
|
import type { BadgeComponent as Badge } from "../../../components/badge/types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Configuration for badge feature
|
|
5
|
-
*/
|
|
6
3
|
export interface BadgeConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Badge content to display
|
|
9
|
-
*/
|
|
10
4
|
badge?: string | number;
|
|
11
|
-
/**
|
|
12
|
-
* Custom badge configuration
|
|
13
|
-
*/
|
|
14
5
|
badgeConfig?: {
|
|
15
6
|
variant?: string;
|
|
16
7
|
color?: string;
|
|
@@ -18,25 +9,9 @@ export interface BadgeConfig {
|
|
|
18
9
|
position?: string;
|
|
19
10
|
max?: number;
|
|
20
11
|
};
|
|
21
|
-
/**
|
|
22
|
-
* CSS class prefix
|
|
23
|
-
*/
|
|
24
12
|
prefix?: string;
|
|
25
13
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Component with badge capabilities
|
|
28
|
-
*/
|
|
29
14
|
export interface BadgeComponent extends BaseComponent {
|
|
30
|
-
/**
|
|
31
|
-
* Badge component instance
|
|
32
|
-
*/
|
|
33
15
|
badge?: Badge;
|
|
34
16
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Adds badge functionality to a component
|
|
37
|
-
* Creates and configures a badge component attached to the main component
|
|
38
|
-
*
|
|
39
|
-
* @param {BadgeConfig} config - Badge configuration
|
|
40
|
-
* @returns {Function} Component enhancer with badge functionality
|
|
41
|
-
*/
|
|
42
17
|
export declare const withBadge: <T extends BadgeConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & BadgeComponent;
|
|
@@ -1,56 +1,20 @@
|
|
|
1
1
|
import { BaseComponent } from "../component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for checkable feature
|
|
4
|
-
*/
|
|
5
2
|
export interface CheckableConfig {
|
|
6
3
|
checked?: boolean;
|
|
7
4
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Component with input element
|
|
10
|
-
*/
|
|
11
5
|
export interface InputComponent extends BaseComponent {
|
|
12
6
|
element: HTMLElement;
|
|
13
7
|
input: HTMLInputElement;
|
|
14
8
|
emit?: (event: string, data: unknown) => unknown;
|
|
15
|
-
/** This feature only subscribes to change and does not read its payload. */
|
|
16
9
|
on?: (event: "change", handler: () => void) => unknown;
|
|
17
10
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Checkable state manager interface
|
|
20
|
-
*/
|
|
21
11
|
export interface CheckableManager {
|
|
22
|
-
/**
|
|
23
|
-
* Sets the checked state to true. Silent: only the user's change emits `change`.
|
|
24
|
-
* @returns CheckableManager instance for chaining
|
|
25
|
-
*/
|
|
26
12
|
check: () => CheckableManager;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the checked state to false. Silent.
|
|
29
|
-
* @returns CheckableManager instance for chaining
|
|
30
|
-
*/
|
|
31
13
|
uncheck: () => CheckableManager;
|
|
32
|
-
/**
|
|
33
|
-
* Toggles the current checked state. Silent.
|
|
34
|
-
* @returns CheckableManager instance for chaining
|
|
35
|
-
*/
|
|
36
14
|
toggle: () => CheckableManager;
|
|
37
|
-
/**
|
|
38
|
-
* Gets the current checked state
|
|
39
|
-
* @returns Whether component is checked
|
|
40
|
-
*/
|
|
41
15
|
isChecked: () => boolean;
|
|
42
16
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Component with checkable capabilities
|
|
45
|
-
*/
|
|
46
17
|
export interface CheckableComponent extends BaseComponent {
|
|
47
18
|
checkable: CheckableManager;
|
|
48
19
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Adds checked state management to a component with an input
|
|
51
|
-
* Manages visual state and event emission for checked changes
|
|
52
|
-
*
|
|
53
|
-
* @param config - Checkable configuration
|
|
54
|
-
* @returns Function that enhances a component with checkable functionality
|
|
55
|
-
*/
|
|
56
20
|
export declare const withCheckable: <T extends CheckableConfig & object>(config?: T) => <C extends InputComponent>(component: C) => C & CheckableComponent;
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/compose/features
|
|
3
|
-
* @description Adds debounced event handling capabilities to components
|
|
4
|
-
*/
|
|
5
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
6
|
-
/**
|
|
7
|
-
* Interface for components with lifecycle
|
|
8
|
-
*/
|
|
9
2
|
export interface ComponentWithLifecycle extends ElementComponent {
|
|
10
3
|
lifecycle: {
|
|
11
4
|
destroy: () => void;
|
|
12
5
|
[key: string]: unknown;
|
|
13
6
|
};
|
|
14
7
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Configuration for debounced event handlers
|
|
17
|
-
*/
|
|
18
8
|
export interface DebounceConfig {
|
|
19
|
-
/**
|
|
20
|
-
* Event handlers with debounce settings
|
|
21
|
-
*/
|
|
22
9
|
debouncedEvents?: Record<string, {
|
|
23
10
|
handler: (event: Event) => void;
|
|
24
11
|
wait: number;
|
|
@@ -28,56 +15,12 @@ export interface DebounceConfig {
|
|
|
28
15
|
};
|
|
29
16
|
}>;
|
|
30
17
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Component with debounced event capabilities
|
|
33
|
-
*/
|
|
34
18
|
export interface DebounceComponent extends BaseComponent {
|
|
35
|
-
/**
|
|
36
|
-
* Adds a debounced event listener
|
|
37
|
-
* @param event - Event name
|
|
38
|
-
* @param handler - Event handler
|
|
39
|
-
* @param wait - Debounce delay in milliseconds
|
|
40
|
-
* @param options - Debounce options
|
|
41
|
-
* @returns DebounceComponent for chaining
|
|
42
|
-
*/
|
|
43
19
|
addDebouncedEvent: (event: string, handler: (event: Event) => void, wait: number, options?: {
|
|
44
20
|
leading?: boolean;
|
|
45
21
|
maxWait?: number;
|
|
46
22
|
}) => DebounceComponent;
|
|
47
|
-
/**
|
|
48
|
-
* Removes a debounced event listener
|
|
49
|
-
* @param event - Event name
|
|
50
|
-
* @returns DebounceComponent for chaining
|
|
51
|
-
*/
|
|
52
23
|
removeDebouncedEvent: (event: string) => DebounceComponent;
|
|
53
24
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Adds debounced event handling capabilities to a component
|
|
56
|
-
*
|
|
57
|
-
* @param config - Configuration object containing debounced event settings
|
|
58
|
-
* @returns Function that enhances a component with debounced event handling
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* // Add debounced events to a component
|
|
63
|
-
* const component = pipe(
|
|
64
|
-
* createBase,
|
|
65
|
-
* withElement(...),
|
|
66
|
-
* withDebounce({
|
|
67
|
-
* debouncedEvents: {
|
|
68
|
-
* 'input': {
|
|
69
|
-
* handler: handleInput,
|
|
70
|
-
* wait: 300
|
|
71
|
-
* },
|
|
72
|
-
* 'resize': {
|
|
73
|
-
* handler: handleResize,
|
|
74
|
-
* wait: 200,
|
|
75
|
-
* options: { maxWait: 1000 }
|
|
76
|
-
* }
|
|
77
|
-
* }
|
|
78
|
-
* })
|
|
79
|
-
* )(config);
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
25
|
export declare const withDebounce: <T extends DebounceConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & DebounceComponent;
|
|
83
26
|
export default withDebounce;
|
|
@@ -1,46 +1,15 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for disabled feature
|
|
4
|
-
*/
|
|
5
2
|
export interface DisabledConfig {
|
|
6
3
|
disabled?: boolean;
|
|
7
4
|
componentName?: string;
|
|
8
5
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Disabled state manager interface
|
|
11
|
-
*/
|
|
12
6
|
export interface DisabledManager {
|
|
13
|
-
/**
|
|
14
|
-
* Enables the component
|
|
15
|
-
* @returns DisabledManager instance for chaining
|
|
16
|
-
*/
|
|
17
7
|
enable(): DisabledManager;
|
|
18
|
-
/**
|
|
19
|
-
* Disables the component
|
|
20
|
-
* @returns DisabledManager instance for chaining
|
|
21
|
-
*/
|
|
22
8
|
disable(): DisabledManager;
|
|
23
|
-
/**
|
|
24
|
-
* Toggles the disabled state
|
|
25
|
-
* @returns DisabledManager instance for chaining
|
|
26
|
-
*/
|
|
27
9
|
toggle(): DisabledManager;
|
|
28
|
-
/**
|
|
29
|
-
* Checks if the component is disabled
|
|
30
|
-
* @returns true if disabled
|
|
31
|
-
*/
|
|
32
10
|
isDisabled(): boolean;
|
|
33
11
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Component with disabled state capabilities
|
|
36
|
-
*/
|
|
37
12
|
export interface DisabledComponent extends BaseComponent {
|
|
38
13
|
disabled: DisabledManager;
|
|
39
14
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Adds disabled state management to a component
|
|
42
|
-
*
|
|
43
|
-
* @param config - Configuration object
|
|
44
|
-
* @returns Function that enhances a component with disabled state management
|
|
45
|
-
*/
|
|
46
15
|
export declare const withDisabled: <T extends DisabledConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & DisabledComponent;
|
|
@@ -1,50 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/compose/features
|
|
3
|
-
*/
|
|
4
1
|
import { EventCallback } from "../../state/emitter.js";
|
|
5
2
|
import { BaseComponent } from "../component.js";
|
|
6
|
-
/**
|
|
7
|
-
* A component's events, by name: each one's handler. Without a map a
|
|
8
|
-
* component takes any event name, and its handlers get `unknown` payloads.
|
|
9
|
-
*/
|
|
10
3
|
export type EventMap<E> = {
|
|
11
4
|
[K in keyof E]: EventCallback;
|
|
12
5
|
};
|
|
13
|
-
/** The map of a component that does not name its events. */
|
|
14
6
|
export type AnyEvents = Record<string, EventCallback>;
|
|
15
|
-
/**
|
|
16
|
-
* Component with event capabilities
|
|
17
|
-
*/
|
|
18
7
|
export interface EventComponent<E extends EventMap<E> = AnyEvents> extends BaseComponent {
|
|
19
|
-
/**
|
|
20
|
-
* Subscribe to an event
|
|
21
|
-
* @param event - Event name
|
|
22
|
-
* @param handler - Event handler
|
|
23
|
-
* @returns Component instance for chaining
|
|
24
|
-
*/
|
|
25
8
|
on<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
26
|
-
/**
|
|
27
|
-
* Unsubscribe from an event
|
|
28
|
-
* @param event - Event name
|
|
29
|
-
* @param handler - Event handler
|
|
30
|
-
* @returns Component instance for chaining
|
|
31
|
-
*/
|
|
32
9
|
off<K extends keyof E & string>(event: K, handler: E[K]): this;
|
|
33
|
-
/**
|
|
34
|
-
* Emit an event
|
|
35
|
-
* @param event - Event name
|
|
36
|
-
* @param data - Event data
|
|
37
|
-
* @returns Component instance for chaining
|
|
38
|
-
*/
|
|
39
10
|
emit(event: string, data?: unknown): this;
|
|
40
11
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Adds event handling capabilities to a component
|
|
43
|
-
* Returns event system ready to use immediately
|
|
44
|
-
*
|
|
45
|
-
* `withEvents<Events>()` names the component's events: `on` and
|
|
46
|
-
* `off` then check each name and its handler's payload.
|
|
47
|
-
*
|
|
48
|
-
* @returns Function that enhances a component with event capabilities
|
|
49
|
-
*/
|
|
50
12
|
export declare const withEvents: <E extends EventMap<E> = AnyEvents>() => <T extends BaseComponent>(component: T) => T & EventComponent<E>;
|
|
@@ -1,67 +1,18 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Icon manager interface
|
|
4
|
-
*/
|
|
5
2
|
export interface IconManager {
|
|
6
|
-
/**
|
|
7
|
-
* Sets icon HTML content
|
|
8
|
-
* @param html - Icon HTML content
|
|
9
|
-
* @returns IconManager instance for chaining
|
|
10
|
-
*/
|
|
11
3
|
setIcon: (html: string) => IconManager;
|
|
12
|
-
/**
|
|
13
|
-
* Gets current icon HTML content
|
|
14
|
-
* @returns Current icon HTML
|
|
15
|
-
*/
|
|
16
4
|
getIcon: () => string;
|
|
17
|
-
/**
|
|
18
|
-
* Gets icon element
|
|
19
|
-
* @returns Icon element or null if not created
|
|
20
|
-
*/
|
|
21
5
|
getElement: () => HTMLElement | null;
|
|
22
6
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Configuration for icon feature
|
|
25
|
-
*/
|
|
26
7
|
export interface IconConfig {
|
|
27
|
-
/**
|
|
28
|
-
* Initial icon HTML content
|
|
29
|
-
*/
|
|
30
8
|
icon?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Icon position ('start' or 'end')
|
|
33
|
-
*/
|
|
34
9
|
iconPosition?: "start" | "end";
|
|
35
|
-
/**
|
|
36
|
-
* Icon size variant
|
|
37
|
-
*/
|
|
38
10
|
iconSize?: string;
|
|
39
|
-
/**
|
|
40
|
-
* CSS class prefix
|
|
41
|
-
*/
|
|
42
11
|
prefix?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Component name for class generation
|
|
45
|
-
*/
|
|
46
12
|
componentName?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Text content (for determining button styling)
|
|
49
|
-
*/
|
|
50
13
|
text?: string | Node;
|
|
51
14
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Component with icon capabilities
|
|
54
|
-
*/
|
|
55
15
|
export interface IconComponent extends BaseComponent {
|
|
56
|
-
/**
|
|
57
|
-
* Icon manager
|
|
58
|
-
*/
|
|
59
16
|
icon: IconManager;
|
|
60
17
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Adds icon management to a component
|
|
63
|
-
*
|
|
64
|
-
* @param config - Configuration object containing icon information
|
|
65
|
-
* @returns Function that enhances a component with icon capabilities
|
|
66
|
-
*/
|
|
67
18
|
export declare const withIcon: <T extends IconConfig & object>(config: T) => <C extends ElementComponent>(component: C) => C & IconComponent;
|
|
@@ -1,105 +1,23 @@
|
|
|
1
1
|
import { ElementComponent } from "../component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Input configuration options
|
|
4
|
-
*/
|
|
5
2
|
export interface InputConfig {
|
|
6
|
-
/**
|
|
7
|
-
* Input name attribute
|
|
8
|
-
*/
|
|
9
3
|
name?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Initial checked state
|
|
12
|
-
*/
|
|
13
4
|
checked?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Whether input is required
|
|
16
|
-
*/
|
|
17
5
|
required?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Whether input is disabled
|
|
20
|
-
*/
|
|
21
6
|
disabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Input value attribute
|
|
24
|
-
*/
|
|
25
7
|
value?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Accessibility label text
|
|
28
|
-
*/
|
|
29
8
|
label?: string | Node;
|
|
30
|
-
/**
|
|
31
|
-
* Alternative accessibility label
|
|
32
|
-
*/
|
|
33
9
|
ariaLabel?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Component name for classes
|
|
36
|
-
*/
|
|
37
10
|
componentName?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Whether Enter toggles the input as Space does
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
11
|
enterToggles?: boolean;
|
|
43
12
|
}
|
|
44
|
-
/**
|
|
45
|
-
* What withInput adds to a component.
|
|
46
|
-
*
|
|
47
|
-
* Declared apart from InputComponent because the enhancer returns
|
|
48
|
-
* `C & InputFeature`, and C -- the component being enhanced -- already carries
|
|
49
|
-
* the element half. Naming the whole of InputComponent on the way out is what
|
|
50
|
-
* narrowed `addClass` back to a bare ElementComponent. It has to be its own
|
|
51
|
-
* interface rather than a Pick of InputComponent: an indexed access binds
|
|
52
|
-
* `this` to the type being indexed, so the methods below would report
|
|
53
|
-
* InputComponent and the polymorphism would be lost at the step that needs it.
|
|
54
|
-
*/
|
|
55
13
|
export interface InputFeature {
|
|
56
|
-
/**
|
|
57
|
-
* Input element
|
|
58
|
-
*/
|
|
59
14
|
input: HTMLInputElement;
|
|
60
|
-
/**
|
|
61
|
-
* Gets the checked state: the `value` a `change` carries
|
|
62
|
-
* @returns Whether the input is checked
|
|
63
|
-
*/
|
|
64
15
|
getValue: () => boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Checks or unchecks the input. Silent: only the user's change emits `change`
|
|
67
|
-
* @param value - Whether the input is checked
|
|
68
|
-
* @returns Component instance for chaining
|
|
69
|
-
*/
|
|
70
16
|
setValue(value: boolean): this;
|
|
71
|
-
/**
|
|
72
|
-
* Gets the input's `value` attribute: the string a form submits while checked
|
|
73
|
-
* @returns The input's string value
|
|
74
|
-
*/
|
|
75
17
|
getValueAttribute: () => string;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the input's `value` attribute. Silent
|
|
78
|
-
* @param value - The string a form submits while checked
|
|
79
|
-
* @returns Component instance for chaining
|
|
80
|
-
*/
|
|
81
18
|
setValueAttribute(value: string): this;
|
|
82
|
-
/**
|
|
83
|
-
* Event emission method if available
|
|
84
|
-
*/
|
|
85
19
|
emit?(event: string, data: unknown): this;
|
|
86
20
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Component with input element and related methods
|
|
89
|
-
*/
|
|
90
21
|
export interface InputComponent extends ElementComponent, InputFeature {
|
|
91
22
|
}
|
|
92
|
-
/**
|
|
93
|
-
* Creates an input element and adds it to a component
|
|
94
|
-
* Handles both input creation and event emission for state changes
|
|
95
|
-
*
|
|
96
|
-
* `change` carries `{ checked, value, valueAttribute, nativeEvent }`: `value` is
|
|
97
|
-
* the checked boolean, as the checkbox and the switch report it, and
|
|
98
|
-
* `valueAttribute` the input's string value. The methods match: `getValue()`
|
|
99
|
-
* and `setValue()` work on the checked boolean, `getValueAttribute()` and
|
|
100
|
-
* `setValueAttribute()` on the string. Both setters are silent.
|
|
101
|
-
*
|
|
102
|
-
* @param config - Input configuration
|
|
103
|
-
* @returns Function that enhances a component with input functionality
|
|
104
|
-
*/
|
|
105
23
|
export declare const withInput: <T extends InputConfig & object>(config?: T) => <C extends ElementComponent>(component: C) => C & InputFeature;
|