material 3.2.5 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/badge/badge.d.ts +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/features/items.js +3 -2
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- 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 +0 -34
- package/dist/components/extended-fab/types.d.ts +0 -654
- 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 +0 -33
- package/dist/components/fab/types.d.ts +0 -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/tab.js +26 -3
- 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/badge.js +45 -0
- 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 -14
- package/dist/core/navigation/destinations.js +18 -5
- 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 +0 -18
- package/dist/elements/card.d.ts +8 -24
- 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/badge.css +1 -1
- package/dist/elements/css/badge.js +1 -1
- package/dist/elements/css/navigation-rail.css +1 -1
- package/dist/elements/css/navigation-rail.js +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 +6 -18
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +4 -17
- 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 +2 -2
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +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 +0 -9
- 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 +2 -2
- 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 +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- 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 +2 -2
- 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/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/components/_badge.scss +75 -38
- package/src/styles/components/_navigation-rail.scss +9 -6
- package/src/styles/elements/_badge.scss +65 -4
- 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,45 +1,15 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Event manager interface
|
|
4
|
-
*/
|
|
5
2
|
export interface EnhancedEventManager {
|
|
6
|
-
/**
|
|
7
|
-
* Add an event listener
|
|
8
|
-
*/
|
|
9
3
|
on: (event: string, handler: Function) => EnhancedEventManager;
|
|
10
|
-
/**
|
|
11
|
-
* Remove an event listener
|
|
12
|
-
*/
|
|
13
4
|
off: (event: string, handler: Function) => EnhancedEventManager;
|
|
14
|
-
/**
|
|
15
|
-
* Add multiple event listeners at once
|
|
16
|
-
*/
|
|
17
5
|
addListeners: (listeners: Record<string, Function>) => EnhancedEventManager;
|
|
18
|
-
/**
|
|
19
|
-
* Remove multiple event listeners at once
|
|
20
|
-
*/
|
|
21
6
|
removeListeners: (listeners: Record<string, Function>) => EnhancedEventManager;
|
|
22
|
-
/**
|
|
23
|
-
* One-time event handler
|
|
24
|
-
*/
|
|
25
7
|
once: (event: string, handler: Function) => EnhancedEventManager;
|
|
26
|
-
/**
|
|
27
|
-
* Clean up all event listeners
|
|
28
|
-
*/
|
|
29
8
|
destroy: () => void;
|
|
30
9
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Component with enhanced event capabilities
|
|
33
|
-
*/
|
|
34
10
|
export interface EnhancedEventComponent extends BaseComponent {
|
|
35
11
|
events: EnhancedEventManager;
|
|
36
12
|
on(event: string, handler: Function): this;
|
|
37
13
|
off(event: string, handler: Function): this;
|
|
38
14
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Adds enhanced event handling capabilities to a component
|
|
41
|
-
*
|
|
42
|
-
* @param target - Optional custom event target
|
|
43
|
-
* @returns Function that enhances a component with event capabilities
|
|
44
|
-
*/
|
|
45
15
|
export declare const withEvents: (target?: HTMLElement) => <C extends ElementComponent>(component: C) => C & EnhancedEventComponent;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/compose
|
|
3
|
-
* @description Core composition utilities for creating and combining components
|
|
4
|
-
*/
|
|
5
1
|
export { pipe, compose, transform } from "./pipe.js";
|
|
6
2
|
export { createComponent } from "./base.js";
|
|
7
3
|
export { createBase, withElement } from "./component.js";
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @namespace compose
|
|
3
|
-
* @description Core composition utilities for creating and combining components
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Performs left-to-right function composition.
|
|
7
|
-
* Each function takes the return value of the previous function as its input.
|
|
8
|
-
*
|
|
9
|
-
* @memberof compose
|
|
10
|
-
* @function pipe
|
|
11
|
-
* @param {...Function} fns - Functions to compose
|
|
12
|
-
* @returns {Function} Composed function that passes its argument through the pipeline
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* const addOne = x => x + 1;
|
|
16
|
-
* const double = x => x * 2;
|
|
17
|
-
* const addOneThenDouble = pipe(addOne, double);
|
|
18
|
-
* console.log(addOneThenDouble(3)); // Output: 8
|
|
19
|
-
*/
|
|
20
1
|
export declare function pipe<A, B>(f1: (arg: A) => B): (x: A) => B;
|
|
21
2
|
export declare function pipe<A, B, C>(f1: (arg: A) => B, f2: (arg: B) => C): (x: A) => C;
|
|
22
3
|
export declare function pipe<A, B, C, D>(f1: (arg: A) => B, f2: (arg: B) => C, f3: (arg: C) => D): (x: A) => D;
|
|
@@ -38,21 +19,6 @@ export declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q,
|
|
|
38
19
|
export 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;
|
|
39
20
|
export 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;
|
|
40
21
|
export declare function pipe<T>(...fns: Array<(arg: T) => T>): (x: T) => T;
|
|
41
|
-
/**
|
|
42
|
-
* Performs right-to-left function composition.
|
|
43
|
-
* This is the mathematical composition order: (f ∘ g)(x) = f(g(x))
|
|
44
|
-
*
|
|
45
|
-
* @memberof compose
|
|
46
|
-
* @function compose
|
|
47
|
-
* @param {...Function} fns - Functions to compose
|
|
48
|
-
* @returns {Function} Composed function following mathematical composition order
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* const addOne = x => x + 1;
|
|
52
|
-
* const double = x => x * 2;
|
|
53
|
-
* const doubleTheAddOne = compose(addOne, double);
|
|
54
|
-
* console.log(doubleTheAddOne(3)); // Output: 7
|
|
55
|
-
*/
|
|
56
22
|
export declare function compose<A, B>(f1: (arg: A) => B): (x: A) => B;
|
|
57
23
|
export declare function compose<A, B, C>(f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => C;
|
|
58
24
|
export declare function compose<A, B, C, D>(f3: (arg: C) => D, f2: (arg: B) => C, f1: (arg: A) => B): (x: A) => D;
|
|
@@ -74,25 +40,4 @@ export declare function compose<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P,
|
|
|
74
40
|
export 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;
|
|
75
41
|
export 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;
|
|
76
42
|
export declare function compose<T>(...fns: Array<(arg: T) => T>): (x: T) => T;
|
|
77
|
-
/**
|
|
78
|
-
* Creates a function that applies transformations to an object with shared context.
|
|
79
|
-
* Useful for applying multiple transformations while maintaining a shared state.
|
|
80
|
-
*
|
|
81
|
-
* @memberof compose
|
|
82
|
-
* @function transform
|
|
83
|
-
* @param {...Function} transformers - Functions that transform the object
|
|
84
|
-
* @returns {Function} Function that applies all transformations with shared context
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* const withName = (obj, context) => ({ ...obj, name: context.name });
|
|
88
|
-
* const withAge = (obj, context) => ({ ...obj, age: context.age });
|
|
89
|
-
* const createPerson = transform(withName, withAge);
|
|
90
|
-
*
|
|
91
|
-
* const person = createPerson({}, { name: 'John', age: 30 });
|
|
92
|
-
* // Result: { name: 'John', age: 30 }
|
|
93
|
-
*/
|
|
94
43
|
export declare const transform: <T, C = Record<string, unknown>>(...transformers: Array<(obj: T, context: C) => Partial<T>>) => (obj: T, context?: C) => T;
|
|
95
|
-
/**
|
|
96
|
-
* @typedef {Object} TransformContext
|
|
97
|
-
* @property {any} [key] - Any contextual data needed by transformers
|
|
98
|
-
*/
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility functions for type checking component capabilities
|
|
3
|
-
*/
|
|
4
1
|
import { ElementComponent } from "../component.js";
|
|
5
|
-
/**
|
|
6
|
-
* Interface for components with lifecycle
|
|
7
|
-
*/
|
|
8
2
|
export interface ComponentWithLifecycle extends ElementComponent {
|
|
9
3
|
lifecycle: {
|
|
10
4
|
destroy: () => void;
|
|
11
5
|
[key: string]: unknown;
|
|
12
6
|
};
|
|
13
7
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Interface for components with emit method
|
|
16
|
-
*/
|
|
17
8
|
export interface ComponentWithEmit extends ElementComponent {
|
|
18
9
|
emit: (event: string, data: unknown) => unknown;
|
|
19
10
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Type guard to check if component has lifecycle
|
|
22
|
-
*/
|
|
23
11
|
export declare function hasLifecycle(component: object): component is ComponentWithLifecycle;
|
|
24
|
-
/**
|
|
25
|
-
* Type guard to check if component has emit method
|
|
26
|
-
*/
|
|
27
12
|
export declare function hasEmit(component: object): component is ComponentWithEmit;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { EventCondition } from "../dom/create.js";
|
|
2
|
-
/**
|
|
3
|
-
* Base component configuration interface
|
|
4
|
-
* Common configuration properties shared by all components
|
|
5
|
-
*/
|
|
6
2
|
export interface BaseComponentConfig {
|
|
7
3
|
componentName?: string;
|
|
8
4
|
class?: string | string[];
|
|
@@ -20,56 +16,15 @@ export interface BaseComponentConfig {
|
|
|
20
16
|
ariaLabelledBy?: string;
|
|
21
17
|
ariaHidden?: boolean;
|
|
22
18
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a base configuration for any component
|
|
25
|
-
* Automatically merges global defaults if available
|
|
26
|
-
*
|
|
27
|
-
* @param {T} defaults - Default configuration for the component
|
|
28
|
-
* @param {Partial<T>} userConfig - User provided configuration
|
|
29
|
-
* @param {string} componentName - The name of the component
|
|
30
|
-
* @returns {T} Complete configuration with defaults applied
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* // In button/config.ts
|
|
34
|
-
* export const createBaseConfig = (config: ButtonConfig = {}) =>
|
|
35
|
-
* createComponentConfig(defaultConfig, config, 'button');
|
|
36
|
-
*/
|
|
37
19
|
export declare const createComponentConfig: <T extends BaseComponentConfig & object>(defaults: T, userConfig: Partial<T> | undefined, componentName: string) => T & {
|
|
38
20
|
componentName: string;
|
|
39
21
|
prefix: string;
|
|
40
22
|
};
|
|
41
|
-
/**
|
|
42
|
-
* Processes class names for an element, handling arrays, nulls and conditional classes
|
|
43
|
-
*
|
|
44
|
-
* @param {string | string[] | null} classNames - Class names to process
|
|
45
|
-
* @returns {string} Space-separated class names as a string
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* // Returns 'mtrl-card mtrl-card--elevated custom-class'
|
|
49
|
-
* processClassNames(['mtrl-card', 'mtrl-card--elevated', 'custom-class']);
|
|
50
|
-
*
|
|
51
|
-
* // Returns 'mtrl-card'
|
|
52
|
-
* processClassNames(['mtrl-card', null, undefined]);
|
|
53
|
-
*/
|
|
54
23
|
export declare const processClassNames: (classNames: string | string[] | null) => string;
|
|
55
|
-
/**
|
|
56
|
-
* Creates a configuration object for withElement HOC
|
|
57
|
-
*
|
|
58
|
-
* @param {BaseComponentConfig} config - Component configuration
|
|
59
|
-
* @param {Object} options - Element options
|
|
60
|
-
* @returns {Object} Configuration object for withElement
|
|
61
|
-
*/
|
|
62
24
|
export declare const createElementConfig: (config: BaseComponentConfig, options: {
|
|
63
25
|
tag: string;
|
|
64
26
|
attributes?: Record<string, unknown>;
|
|
65
27
|
className?: string | (string | null | undefined)[] | null;
|
|
66
|
-
/**
|
|
67
|
-
* Styles the component computes for itself, as properties. Merged under
|
|
68
|
-
* `config.style`, so a consumer's own style still wins. Added with
|
|
69
|
-
* Menu built these into the style *attribute* as a joined
|
|
70
|
-
* string, where CSS text has no camelCase and `maxHeight` was silently
|
|
71
|
-
* dropped by the parser.
|
|
72
|
-
*/
|
|
73
28
|
style?: Partial<CSSStyleDeclaration>;
|
|
74
29
|
html?: string;
|
|
75
30
|
text?: string;
|
|
@@ -1,49 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lightweight Global Configuration System for mtrl
|
|
3
|
-
*
|
|
4
|
-
* This system allows setting default configurations for all components
|
|
5
|
-
* without adding complexity or performance overhead.
|
|
6
|
-
*/
|
|
7
1
|
export interface ComponentConfigMap {
|
|
8
2
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Sets global defaults for a specific component
|
|
11
|
-
*
|
|
12
|
-
* @param component - Component name
|
|
13
|
-
* @param config - Default configuration to apply
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* // Set all buttons to be square by default
|
|
18
|
-
* setComponentDefaults('button', {
|
|
19
|
-
* shape: 'square',
|
|
20
|
-
* size: 'm'
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
3
|
export declare function setComponentDefaults<K extends keyof ComponentConfigMap>(component: K, config: ComponentConfigMap[K]): void;
|
|
25
|
-
/**
|
|
26
|
-
* Gets global defaults for a component
|
|
27
|
-
*
|
|
28
|
-
* @param component - Component name
|
|
29
|
-
* @returns Component defaults or empty object
|
|
30
|
-
*/
|
|
31
4
|
export declare function getComponentDefaults<K extends keyof ComponentConfigMap>(component: K): ComponentConfigMap[K];
|
|
32
|
-
/**
|
|
33
|
-
* Sets global defaults for multiple components at once
|
|
34
|
-
*
|
|
35
|
-
* @param configs - Map of component names to their default configs
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* setGlobalDefaults({
|
|
40
|
-
* button: { shape: 'square', size: 'm' },
|
|
41
|
-
* "text-field": { variant: 'outlined' }
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
5
|
export declare function setGlobalDefaults(configs: Partial<ComponentConfigMap>): void;
|
|
46
|
-
/**
|
|
47
|
-
* Clears all global defaults
|
|
48
|
-
*/
|
|
49
6
|
export declare function clearGlobalDefaults(): void;
|
package/dist/core/config.d.ts
CHANGED
|
@@ -1,47 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library prefix used for all components
|
|
3
|
-
*/
|
|
4
1
|
export declare const PREFIX = "mtrl";
|
|
5
|
-
/**
|
|
6
|
-
* Gets a prefixed component class name
|
|
7
|
-
* @param type - Component type
|
|
8
|
-
* @returns Prefixed class name
|
|
9
|
-
*/
|
|
10
2
|
export declare const getComponentClass: (type: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Gets a BEM modifier class name
|
|
13
|
-
* @param baseClass - Base class name
|
|
14
|
-
* @param modifier - Modifier name
|
|
15
|
-
* @returns Modifier class name
|
|
16
|
-
*/
|
|
17
3
|
export declare const getModifierClass: (baseClass: string, modifier: string) => string;
|
|
18
|
-
/**
|
|
19
|
-
* Gets a BEM element class name
|
|
20
|
-
* @param baseClass - Base class name
|
|
21
|
-
* @param element - Element name
|
|
22
|
-
* @returns Element class name
|
|
23
|
-
*/
|
|
24
4
|
export declare const getElementClass: (baseClass: string, element: string) => string;
|
|
25
|
-
/**
|
|
26
|
-
* Theme configuration interface
|
|
27
|
-
*/
|
|
28
5
|
export interface ThemeConfig {
|
|
29
|
-
/**
|
|
30
|
-
* Theme name
|
|
31
|
-
*/
|
|
32
6
|
name: string;
|
|
33
|
-
/**
|
|
34
|
-
* Theme CSS variables
|
|
35
|
-
*/
|
|
36
7
|
variables: Record<string, string>;
|
|
37
|
-
/**
|
|
38
|
-
* Theme variants
|
|
39
|
-
*/
|
|
40
8
|
variants: Record<string, unknown>;
|
|
41
9
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Component configuration interface
|
|
44
|
-
*/
|
|
45
10
|
export interface ComponentConfig {
|
|
46
11
|
prefix: string;
|
|
47
12
|
type: string;
|
|
@@ -53,45 +18,21 @@ export interface ComponentConfig {
|
|
|
53
18
|
withVariants: (...variants: string[]) => VariantComponentConfig;
|
|
54
19
|
withStates: (...states: string[]) => StateComponentConfig;
|
|
55
20
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Themed component configuration interface
|
|
58
|
-
*/
|
|
59
21
|
export interface ThemedComponentConfig extends ComponentConfig {
|
|
60
22
|
theme: string;
|
|
61
23
|
getThemeClass: (variant: string) => string;
|
|
62
24
|
getCssVariables: () => Record<string, string>;
|
|
63
25
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Variant component configuration interface
|
|
66
|
-
*/
|
|
67
26
|
export interface VariantComponentConfig extends ComponentConfig {
|
|
68
27
|
variants: string[];
|
|
69
28
|
hasVariant: (variant: string) => boolean;
|
|
70
29
|
getVariantClass: (variant: string) => string | null;
|
|
71
30
|
}
|
|
72
|
-
/**
|
|
73
|
-
* State component configuration interface
|
|
74
|
-
*/
|
|
75
31
|
export interface StateComponentConfig extends ComponentConfig {
|
|
76
32
|
states: string[];
|
|
77
33
|
getStateClass: (state: string) => string | null;
|
|
78
34
|
}
|
|
79
|
-
/**
|
|
80
|
-
* CSS class generation utilities
|
|
81
|
-
*/
|
|
82
35
|
export declare const classNames: {
|
|
83
|
-
/**
|
|
84
|
-
* Creates a BEM-style class name
|
|
85
|
-
* @param block - Block name
|
|
86
|
-
* @param element - Element name
|
|
87
|
-
* @param modifier - Modifier name
|
|
88
|
-
* @returns BEM class name
|
|
89
|
-
*/
|
|
90
36
|
bem: (block: string, element?: string, modifier?: string) => string;
|
|
91
|
-
/**
|
|
92
|
-
* Joins class names, filtering out falsy values
|
|
93
|
-
* @param classes - Class names to join
|
|
94
|
-
* @returns Joined class names
|
|
95
|
-
*/
|
|
96
37
|
join: (...classes: (string | undefined | null | false)[]) => string;
|
|
97
38
|
};
|
|
@@ -1,50 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/dom
|
|
3
|
-
* @description DOM attribute helpers
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Set attributes on an element with performance optimizations
|
|
7
|
-
* Fast path for single attribute, efficient iteration for multiple
|
|
8
|
-
*
|
|
9
|
-
* @param {HTMLElement | SVGElement} element - Element to set attributes on
|
|
10
|
-
* @param {object} attributes - Attributes to set
|
|
11
|
-
* @returns {HTMLElement | SVGElement} The element for chaining
|
|
12
|
-
*/
|
|
13
1
|
export declare const setAttributes: <E extends HTMLElement | SVGElement>(element: E, attributes?: object) => E;
|
|
14
|
-
/**
|
|
15
|
-
* Remove attributes from an element
|
|
16
|
-
* Standard for loop is fastest for array iteration
|
|
17
|
-
*
|
|
18
|
-
* @param {HTMLElement} element - Element to remove attributes from
|
|
19
|
-
* @param {string[]} attributes - Attributes to remove
|
|
20
|
-
* @returns {HTMLElement} The element for chaining
|
|
21
|
-
*/
|
|
22
2
|
export declare const removeAttributes: (element: HTMLElement, attributes?: string[]) => HTMLElement;
|
|
23
|
-
/**
|
|
24
|
-
* Batch attribute operations for better performance when setting many attributes
|
|
25
|
-
* Single pass through operations array for optimal performance
|
|
26
|
-
*
|
|
27
|
-
* @param {HTMLElement} element - Element to modify
|
|
28
|
-
* @param {Array<{action: "set" | "remove", key: string, value?: unknown}>} operations - Array of attribute operations
|
|
29
|
-
* @returns {HTMLElement} The element for chaining
|
|
30
|
-
*/
|
|
31
3
|
export declare const batchAttributes: (element: HTMLElement, operations: Array<{
|
|
32
4
|
action: "set" | "remove";
|
|
33
5
|
key: string;
|
|
34
6
|
value?: unknown;
|
|
35
7
|
}>) => HTMLElement;
|
|
36
|
-
/**
|
|
37
|
-
* Check if element has attribute
|
|
38
|
-
* @param element - Element to check
|
|
39
|
-
* @param attribute - Attribute name to check
|
|
40
|
-
* @returns True if element has the attribute
|
|
41
|
-
*/
|
|
42
8
|
export declare const hasAttribute: (element: HTMLElement, attribute: string) => boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Get attribute value with default
|
|
45
|
-
* @param element - Element to get attribute from
|
|
46
|
-
* @param attribute - Attribute name
|
|
47
|
-
* @param defaultValue - Default value if attribute doesn't exist
|
|
48
|
-
* @returns Attribute value or default
|
|
49
|
-
*/
|
|
50
9
|
export declare const getAttribute: (element: HTMLElement, attribute: string, defaultValue?: string) => string;
|
|
@@ -1,54 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/dom
|
|
3
|
-
* @description DOM manipulation utilities optimized for performance
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Normalize classes to array of unique strings with optimization and caching
|
|
7
|
-
* - String with space-separated classes
|
|
8
|
-
* - Array of strings
|
|
9
|
-
* - Mixed array of strings and space-separated classes
|
|
10
|
-
*
|
|
11
|
-
* @param {...(string | string[])} classes - Classes to normalize
|
|
12
|
-
* @returns {string[]} Array of unique, non-empty class names
|
|
13
|
-
*/
|
|
14
1
|
export declare const normalizeClasses: (...classes: (string | string[])[]) => string[];
|
|
15
|
-
/**
|
|
16
|
-
* Add prefixed classes to element with optimizations
|
|
17
|
-
* Automatically adds prefix to classes that don't already have it
|
|
18
|
-
* Optimized for minimal DOM interactions and single-class scenarios
|
|
19
|
-
*
|
|
20
|
-
* @param {HTMLElement} element - Target element
|
|
21
|
-
* @param {...(string | string[])} classes - Classes to add
|
|
22
|
-
* @returns {HTMLElement} Modified element for chaining
|
|
23
|
-
*/
|
|
24
2
|
export declare const addClass: (element: HTMLElement, ...classes: (string | string[])[]) => HTMLElement;
|
|
25
|
-
/**
|
|
26
|
-
* Remove prefixed classes from element with optimizations
|
|
27
|
-
* Handles exact class names as specified with automatic prefixing
|
|
28
|
-
* Optimized for single-class scenarios and batch operations
|
|
29
|
-
*
|
|
30
|
-
* @param {HTMLElement} element - Target element
|
|
31
|
-
* @param {...(string | string[])} classes - Classes to remove
|
|
32
|
-
* @returns {HTMLElement} Modified element for chaining
|
|
33
|
-
*/
|
|
34
3
|
export declare const removeClass: (element: HTMLElement, ...classes: (string | string[])[]) => HTMLElement;
|
|
35
|
-
/**
|
|
36
|
-
* Toggle prefixed classes on element with optimizations
|
|
37
|
-
* Automatically adds prefix to classes that don't already have it
|
|
38
|
-
* Optimized for single-class scenarios
|
|
39
|
-
*
|
|
40
|
-
* @param {HTMLElement} element - Target element
|
|
41
|
-
* @param {...(string | string[])} classes - Classes to toggle
|
|
42
|
-
* @returns {HTMLElement} Modified element for chaining
|
|
43
|
-
*/
|
|
44
4
|
export declare const toggleClass: (element: HTMLElement, ...classes: (string | string[])[]) => HTMLElement;
|
|
45
|
-
/**
|
|
46
|
-
* Check if element has all specified prefixed classes with optimizations
|
|
47
|
-
* Automatically adds prefix to classes that don't already have it
|
|
48
|
-
* Returns true only if ALL specified classes are present
|
|
49
|
-
*
|
|
50
|
-
* @param {HTMLElement} element - Target element
|
|
51
|
-
* @param {...(string | string[])} classes - Classes to check
|
|
52
|
-
* @returns {boolean} True if element has all specified classes
|
|
53
|
-
*/
|
|
54
5
|
export declare const hasClass: (element: HTMLElement, ...classes: (string | string[])[]) => boolean;
|
|
@@ -1,151 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/dom
|
|
3
|
-
* @description DOM manipulation utilities
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Event handler function type
|
|
7
|
-
*/
|
|
8
1
|
export type EventHandler = (event: Event) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Element type that can be either HTMLElement or SVGElement
|
|
11
|
-
*/
|
|
12
2
|
export type DOMElement = HTMLElement | SVGElement;
|
|
13
|
-
/**
|
|
14
|
-
* Component context passed to created elements for event forwarding
|
|
15
|
-
*/
|
|
16
3
|
export interface ElementContext {
|
|
17
|
-
/** Emits forwarded events */
|
|
18
4
|
emit?(event: string, data: ForwardedEventPayload): void;
|
|
19
|
-
/** Subscribes to events */
|
|
20
5
|
on?(event: string, handler: (...args: unknown[]) => void): unknown;
|
|
21
6
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Event condition type
|
|
24
|
-
* Declared through a method signature so conditions typed for a specific
|
|
25
|
-
* component or event subtype stay assignable under strictFunctionTypes
|
|
26
|
-
*/
|
|
27
7
|
export type EventCondition = boolean | {
|
|
28
8
|
condition(context: ElementContext & {
|
|
29
9
|
element: DOMElement;
|
|
30
10
|
}, event: Event): boolean;
|
|
31
11
|
}["condition"];
|
|
32
|
-
/**
|
|
33
|
-
* Options for element creation with comprehensive configuration
|
|
34
|
-
*/
|
|
35
12
|
export interface CreateElementOptions {
|
|
36
|
-
/** HTML tag name */
|
|
37
13
|
tag?: string;
|
|
38
|
-
/** Container to append element to */
|
|
39
14
|
container?: HTMLElement | null;
|
|
40
|
-
/** Inner HTML content */
|
|
41
15
|
html?: string;
|
|
42
|
-
/** Text content */
|
|
43
16
|
text?: string;
|
|
44
|
-
/** Element ID */
|
|
45
17
|
id?: string;
|
|
46
|
-
/** Form element name */
|
|
47
18
|
name?: string;
|
|
48
|
-
/** Element title (native browser tooltip on hover) */
|
|
49
19
|
title?: string;
|
|
50
|
-
/** Keyboard navigation order (-1 to remove from tab order, 0+ for custom order) */
|
|
51
20
|
tabIndex?: number;
|
|
52
|
-
/** Inline styles (string or object) */
|
|
53
|
-
/**
|
|
54
|
-
* Inline styles. Object only: a style string is written verbatim to the
|
|
55
|
-
* style attribute, so one interpolated value can carry extra declarations
|
|
56
|
-
* Assigning per property confines a value to that property.
|
|
57
|
-
*/
|
|
58
21
|
style?: Partial<CSSStyleDeclaration>;
|
|
59
|
-
/** Dataset attributes (e.g., { name: 'value' } → data-name="value") */
|
|
60
22
|
data?: Record<string, string>;
|
|
61
|
-
/** ARIA role (e.g., 'button', 'menuitem', 'dialog') */
|
|
62
23
|
role?: string;
|
|
63
|
-
/** Accessible label for screen readers */
|
|
64
24
|
ariaLabel?: string;
|
|
65
|
-
/** ID of element that describes this element */
|
|
66
25
|
ariaDescribedBy?: string;
|
|
67
|
-
/** ID of element that labels this element */
|
|
68
26
|
ariaLabelledBy?: string;
|
|
69
|
-
/** Hide from screen readers */
|
|
70
27
|
ariaHidden?: boolean;
|
|
71
|
-
/** CSS classes (will be automatically prefixed with 'mtrl-') - alias for className */
|
|
72
28
|
class?: string | string[];
|
|
73
|
-
/** CSS classes (will be automatically prefixed with 'mtrl-') - alias for class */
|
|
74
29
|
className?: string | string[];
|
|
75
|
-
/** HTML attributes */
|
|
76
30
|
attributes?: object;
|
|
77
|
-
/** Events to forward when component has emit method */
|
|
78
31
|
forwardEvents?: Record<string, EventCondition>;
|
|
79
|
-
/** Callback after element creation */
|
|
80
32
|
onCreate?(element: HTMLElement, context?: ElementContext): void;
|
|
81
|
-
/** Component context */
|
|
82
33
|
context?: ElementContext & object;
|
|
83
34
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Options for SVG element creation
|
|
86
|
-
*/
|
|
87
35
|
export interface CreateSVGElementOptions extends Omit<CreateElementOptions, "container" | "onCreate"> {
|
|
88
36
|
container?: DOMElement | null;
|
|
89
37
|
onCreate?(element: SVGElement, context?: ElementContext): void;
|
|
90
38
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Event handler storage
|
|
93
|
-
*/
|
|
94
39
|
export interface EventHandlerStorage {
|
|
95
40
|
[eventName: string]: EventHandler;
|
|
96
41
|
}
|
|
97
|
-
/**
|
|
98
|
-
* What `forwardEvents` hands the component's emitter.
|
|
99
|
-
*
|
|
100
|
-
* One shape for every forwarded native event, emitted by `setupEventForwarding`
|
|
101
|
-
* below as `{ event, element, originalEvent: event }`. Eleven components
|
|
102
|
-
* configure `forwardEvents`, so this lives here rather than being redeclared
|
|
103
|
-
* per component: each component has a typed event map, and without
|
|
104
|
-
* a shared payload that would mean the same three fields written out again in
|
|
105
|
-
* every one of them.
|
|
106
|
-
*
|
|
107
|
-
* `event` and `originalEvent` are the same object. Both names have always
|
|
108
|
-
* been provided and consumers use both, so neither is removed here.
|
|
109
|
-
* The default root covers HTML and SVG; component event maps can specialize
|
|
110
|
-
* it to their actual element type.
|
|
111
|
-
*/
|
|
112
42
|
export interface ForwardedEventPayload<E extends Event = Event, TElement extends DOMElement = DOMElement> {
|
|
113
|
-
/** The DOM event that triggered the forward. */
|
|
114
43
|
event: E;
|
|
115
|
-
/** The element the listener is attached to, which is the component root. */
|
|
116
44
|
element: TElement;
|
|
117
|
-
/** The same DOM event as `event`. */
|
|
118
45
|
originalEvent: E;
|
|
119
46
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Create an HTML element with comprehensive options and optimizations
|
|
122
|
-
* Fast paths for common scenarios, full feature support for complex cases
|
|
123
|
-
*
|
|
124
|
-
* @param {CreateElementOptions} options - Element creation options
|
|
125
|
-
* @returns {HTMLElement} Created HTML element
|
|
126
|
-
*/
|
|
127
47
|
export declare const createElement: (options?: CreateElementOptions) => HTMLElement;
|
|
128
|
-
/**
|
|
129
|
-
* Create a pooled HTML element
|
|
130
|
-
* @param options - Element creation options
|
|
131
|
-
* @returns Created HTML element from pool
|
|
132
|
-
*/
|
|
133
48
|
export declare const createElementPooled: (options?: CreateElementOptions) => HTMLElement;
|
|
134
|
-
/**
|
|
135
|
-
* Release an element back to the pool
|
|
136
|
-
* @param element - Element to release
|
|
137
|
-
*/
|
|
138
49
|
export declare const releaseElement: (element: HTMLElement) => void;
|
|
139
|
-
/**
|
|
140
|
-
* Create an SVG element
|
|
141
|
-
* @param options - SVG element creation options
|
|
142
|
-
* @returns Created SVG element
|
|
143
|
-
*/
|
|
144
50
|
export declare const createSVGElement: (options?: CreateSVGElementOptions) => SVGElement;
|
|
145
|
-
/**
|
|
146
|
-
* Remove event handlers from an element
|
|
147
|
-
* @param element - Element to clean up
|
|
148
|
-
*/
|
|
149
51
|
export declare const removeEventHandlers: (element: HTMLElement | SVGElement) => void;
|
|
150
52
|
declare global {
|
|
151
53
|
interface HTMLElement {
|