material 3.2.6 → 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/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/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/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 +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/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 +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/preupgrade.d.ts +0 -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 +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 +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 +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 +1 -1
- 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/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,44 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
export declare const THEME_ROLES: readonly [
|
|
2
|
+
"error",
|
|
3
|
+
"on-error",
|
|
4
|
+
"error-container",
|
|
5
|
+
"on-error-container",
|
|
6
|
+
"primary",
|
|
7
|
+
"on-primary",
|
|
8
|
+
"primary-container",
|
|
9
|
+
"on-primary-container",
|
|
10
|
+
"secondary",
|
|
11
|
+
"on-secondary",
|
|
12
|
+
"secondary-container",
|
|
13
|
+
"on-secondary-container",
|
|
14
|
+
"tertiary",
|
|
15
|
+
"on-tertiary",
|
|
16
|
+
"tertiary-container",
|
|
17
|
+
"on-tertiary-container",
|
|
18
|
+
"primary-fixed",
|
|
19
|
+
"primary-fixed-dim",
|
|
20
|
+
"on-primary-fixed",
|
|
21
|
+
"on-primary-fixed-variant",
|
|
22
|
+
"secondary-fixed",
|
|
23
|
+
"secondary-fixed-dim",
|
|
24
|
+
"on-secondary-fixed",
|
|
25
|
+
"on-secondary-fixed-variant",
|
|
26
|
+
"tertiary-fixed",
|
|
27
|
+
"tertiary-fixed-dim",
|
|
28
|
+
"on-tertiary-fixed",
|
|
29
|
+
"on-tertiary-fixed-variant",
|
|
30
|
+
"surface",
|
|
31
|
+
"surface-dim",
|
|
32
|
+
"surface-bright",
|
|
33
|
+
"surface-variant",
|
|
34
|
+
"surface-container-lowest",
|
|
35
|
+
"surface-container-low",
|
|
36
|
+
"surface-container",
|
|
37
|
+
"surface-container-high",
|
|
38
|
+
"surface-container-highest",
|
|
39
|
+
"on-surface",
|
|
40
|
+
"on-surface-variant",
|
|
41
|
+
"outline",
|
|
42
|
+
"outline-variant",
|
|
43
|
+
"shadow",
|
|
44
|
+
"scrim",
|
|
45
|
+
"inverse-surface",
|
|
46
|
+
"inverse-on-surface",
|
|
47
|
+
"inverse-primary"
|
|
48
|
+
];
|
|
18
49
|
export type ThemeRole = (typeof THEME_ROLES)[number];
|
|
19
|
-
/**
|
|
20
|
-
* A scheme's colours by role. Keys are the M3 role names, kebab-case
|
|
21
|
-
* (`primary-container`) or camelCase as material-color-utilities spells them
|
|
22
|
-
* (`primaryContainer`); values are `#rrggbb` hex strings.
|
|
23
|
-
*/
|
|
24
50
|
export type SchemeRoles = Record<string, string>;
|
|
25
51
|
export interface SchemeToTokensOptions {
|
|
26
|
-
/** The token prefix, as `--{prefix}-sys-color-*`. Default `mtrl`. */
|
|
27
52
|
prefix?: string;
|
|
28
53
|
}
|
|
29
|
-
/** A theme's declarations: custom property to value, light and dark. */
|
|
30
54
|
export interface ThemeTokens {
|
|
31
55
|
light: Record<string, string>;
|
|
32
56
|
dark: Record<string, string>;
|
|
33
57
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Turns a light and a dark scheme's role colours into a theme's colour
|
|
36
|
-
* tokens. Every role in {@link THEME_ROLES} must be present in both.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* const tokens = schemeToTokens({ light, dark });
|
|
40
|
-
* tokens.light["--mtrl-sys-color-primary"]; // "#6750a4"
|
|
41
|
-
*/
|
|
42
58
|
export declare const schemeToTokens: (schemes: {
|
|
43
59
|
light: SchemeRoles;
|
|
44
60
|
dark: SchemeRoles;
|
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Result interface for background color lookup
|
|
3
|
-
*/
|
|
4
1
|
export interface BackgroundResult {
|
|
5
|
-
/** The computed background color value */
|
|
6
2
|
color: string;
|
|
7
|
-
/** The element from which the color was obtained */
|
|
8
3
|
element: HTMLElement | null;
|
|
9
4
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Gets the computed background color of an element or its ancestors.
|
|
12
|
-
* Recursively traverses the DOM tree upward until it finds a non-transparent background.
|
|
13
|
-
* Resolves CSS variables if used in background color.
|
|
14
|
-
*
|
|
15
|
-
* @param {HTMLElement} element - The starting element to check
|
|
16
|
-
* @param {number} [maxDepth=20] - Maximum number of parent levels to check
|
|
17
|
-
* @returns {BackgroundResult} Object containing the color and source element
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* // Get the inherited background color and its source element
|
|
21
|
-
* const { color, element: sourceElement } = getInheritedBackground(myElement);
|
|
22
|
-
* console.log(color); // 'rgb(255, 255, 255)' or '#1c2526' for dark mode
|
|
23
|
-
*
|
|
24
|
-
* // Observe the source element for changes
|
|
25
|
-
* if (sourceElement) {
|
|
26
|
-
* const observer = new MutationObserver(() => {
|
|
27
|
-
* const { color } = getInheritedBackground(myElement);
|
|
28
|
-
* myElement.style.backgroundColor = color;
|
|
29
|
-
* });
|
|
30
|
-
*
|
|
31
|
-
* observer.observe(sourceElement, { attributes: true, attributeFilter: ['style', 'class'] });
|
|
32
|
-
* }
|
|
33
|
-
*/
|
|
34
5
|
export declare const getInheritedBackground: (element: HTMLElement, maxDepth?: number) => BackgroundResult;
|
|
35
6
|
export default getInheritedBackground;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a color to RGBA format with specified opacity
|
|
3
|
-
* Handles hex, rgb, rgba, and named colors
|
|
4
|
-
*
|
|
5
|
-
* @param color - The color string to convert (hex, rgb, rgba, or named color)
|
|
6
|
-
* @param opacity - The opacity value (0-1)
|
|
7
|
-
* @returns RGBA color string
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* colorToRGBA('#ff0000', 0.5) // 'rgba(255, 0, 0, 0.5)'
|
|
11
|
-
* colorToRGBA('rgb(255, 0, 0)', 0.5) // 'rgba(255, 0, 0, 0.5)'
|
|
12
|
-
* colorToRGBA('red', 0.5) // 'rgba(255, 0, 0, 0.5)'
|
|
13
|
-
*/
|
|
14
1
|
export declare const colorToRGBA: (color: string, opacity: number) => string;
|
|
@@ -5,16 +5,5 @@ export { throttle, debounce, once } from "./performance.js";
|
|
|
5
5
|
export { getThemeColor } from "./theme.js";
|
|
6
6
|
export { colorToRGBA } from "./color.js";
|
|
7
7
|
export { isSafeUrl, safeUrl, URL_ATTRIBUTES } from "./url.js";
|
|
8
|
-
/**
|
|
9
|
-
* Creates a transformer that only runs if a condition is met
|
|
10
|
-
* @param {Function} predicate - Condition to check
|
|
11
|
-
* @param {Function} transformer - Transformer to run if condition is true
|
|
12
|
-
* @returns {Function} Conditional transformer
|
|
13
|
-
*/
|
|
14
8
|
export declare const when: <T, C>(predicate: (obj: T, context: C) => boolean, transformer: (obj: T, context: C) => T) => (obj: T, context: C) => T;
|
|
15
|
-
/**
|
|
16
|
-
* Joins class names, filtering out falsy values
|
|
17
|
-
* @param {...(string | undefined | null | false)} classes - Class names to join
|
|
18
|
-
* @returns {string} Joined class names
|
|
19
|
-
*/
|
|
20
9
|
export declare const classNames: (...classes: (string | undefined | null | false)[]) => string;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mobile device detection and capability checks
|
|
3
|
-
* This provides a centralized way to handle mobile-specific features and behaviors
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Interface for normalized event properties
|
|
7
|
-
*/
|
|
8
1
|
export interface NormalizedEvent {
|
|
9
2
|
clientX: number;
|
|
10
3
|
clientY: number;
|
|
@@ -15,51 +8,27 @@ export interface NormalizedEvent {
|
|
|
15
8
|
stopPropagation: () => void;
|
|
16
9
|
type: string;
|
|
17
10
|
}
|
|
18
|
-
/** Horizontal gesture emitted by an interactive root. */
|
|
19
11
|
export interface SwipePayload {
|
|
20
12
|
direction: "left" | "right";
|
|
21
13
|
deltaX: number;
|
|
22
14
|
deltaY: number;
|
|
23
15
|
}
|
|
24
|
-
/** Touch gestures emitted by touch-enabled interactive roots. */
|
|
25
16
|
export interface TouchEvents {
|
|
26
17
|
tap: (payload: NormalizedEvent) => void;
|
|
27
18
|
swipe: (payload: SwipePayload) => void;
|
|
28
19
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Detects if the current device is likely a mobile device
|
|
31
|
-
* Uses a combination of user agent and screen size checks for reliability
|
|
32
|
-
*/
|
|
33
20
|
export declare const isMobileDevice: () => boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Options for passive event listeners
|
|
36
|
-
*/
|
|
37
21
|
export declare const PASSIVE_EVENTS: AddEventListenerOptions;
|
|
38
|
-
/**
|
|
39
|
-
* Configuration constants for mobile interactions
|
|
40
|
-
* Following WCAG guidelines and touch interaction best practices
|
|
41
|
-
*/
|
|
42
22
|
export declare const TOUCH_CONFIG: {
|
|
43
23
|
TARGET_SIZE: number;
|
|
44
24
|
FEEDBACK_DURATION: number;
|
|
45
25
|
TAP_THRESHOLD: number;
|
|
46
26
|
SWIPE_THRESHOLD: number;
|
|
47
27
|
};
|
|
48
|
-
/**
|
|
49
|
-
* Accessibility-minded touch target sizes
|
|
50
|
-
* Based on WCAG guidelines for touch targets
|
|
51
|
-
*/
|
|
52
28
|
export declare const TOUCH_TARGETS: {
|
|
53
29
|
MINIMUM: number;
|
|
54
30
|
COMFORTABLE: number;
|
|
55
31
|
LARGE: number;
|
|
56
32
|
};
|
|
57
|
-
/**
|
|
58
|
-
* Detects if the current device supports touch events
|
|
59
|
-
*/
|
|
60
33
|
export declare const hasTouchSupport: () => boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Normalizes both mouse and touch events into a consistent format
|
|
63
|
-
* This allows components to handle interactions uniformly
|
|
64
|
-
*/
|
|
65
34
|
export declare const normalizeEvent: (event: Event) => NormalizedEvent;
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if a value is a plain object
|
|
3
|
-
* @param value - The value to check
|
|
4
|
-
* @returns true if the value is a plain object
|
|
5
|
-
*/
|
|
6
1
|
export declare const isObject: (value: unknown) => value is Record<string, unknown>;
|
|
7
|
-
/**
|
|
8
|
-
* Accesses a nested property of an object using a string path
|
|
9
|
-
* @param obj - The object to traverse
|
|
10
|
-
* @param path - The property path (e.g. 'user.address.street')
|
|
11
|
-
* @returns The value at the specified path or undefined if not found
|
|
12
|
-
*/
|
|
13
2
|
export declare const byString: <T extends object, R = unknown>(obj: T, path: string) => R | undefined;
|
|
@@ -1,82 +1,12 @@
|
|
|
1
1
|
export type Cancellable<F> = F & {
|
|
2
2
|
cancel(): void;
|
|
3
3
|
};
|
|
4
|
-
/**
|
|
5
|
-
* @module core/utils/performance
|
|
6
|
-
* @description Performance utilities for optimizing high-frequency event handlers
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Creates a throttled function that only invokes the provided function
|
|
10
|
-
* at most once per every specified wait milliseconds.
|
|
11
|
-
*
|
|
12
|
-
* Throttling ensures that the function executes at a regular interval,
|
|
13
|
-
* which is useful for limiting the rate of execution for expensive operations.
|
|
14
|
-
*
|
|
15
|
-
* @param {Function} fn - The function to throttle
|
|
16
|
-
* @param {number} wait - The number of milliseconds to throttle invocations to
|
|
17
|
-
* @param {Object} options - Configuration options
|
|
18
|
-
* @param {boolean} options.leading - Specify invoking on the leading edge of the timeout (default: true)
|
|
19
|
-
* @param {boolean} options.trailing - Specify invoking on the trailing edge of the timeout (default: true)
|
|
20
|
-
* @returns {Function} The throttled function
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* // Throttle scroll handler to execute at most once every 100ms
|
|
24
|
-
* const throttledScroll = throttle((e) => {
|
|
25
|
-
* updateScrollPosition(window.scrollY);
|
|
26
|
-
* }, 100);
|
|
27
|
-
*
|
|
28
|
-
* window.addEventListener('scroll', throttledScroll);
|
|
29
|
-
*/
|
|
30
4
|
export declare const throttle: <T extends (...args: never[]) => unknown>(fn: T, wait: number, options?: {
|
|
31
5
|
leading?: boolean;
|
|
32
6
|
trailing?: boolean;
|
|
33
7
|
}) => Cancellable<(...args: Parameters<T>) => void>;
|
|
34
|
-
/**
|
|
35
|
-
* Creates a debounced function that delays invoking the provided function
|
|
36
|
-
* until after the specified wait milliseconds have elapsed since the last time
|
|
37
|
-
* it was invoked.
|
|
38
|
-
*
|
|
39
|
-
* Debouncing groups multiple sequential calls into a single execution at the end,
|
|
40
|
-
* which is useful for handling rapid-fire events like resize or input.
|
|
41
|
-
*
|
|
42
|
-
* @param {Function} fn - The function to debounce
|
|
43
|
-
* @param {number} wait - The number of milliseconds to delay
|
|
44
|
-
* @param {Object} options - Configuration options
|
|
45
|
-
* @param {boolean} options.leading - Specify invoking on the leading edge of the timeout (default: false)
|
|
46
|
-
* @param {boolean} options.maxWait - Maximum time function can be delayed before execution in milliseconds
|
|
47
|
-
* @returns {Function} The debounced function
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* // Debounced search that executes 300ms after the user stops typing
|
|
51
|
-
* const debouncedSearch = debounce((query) => {
|
|
52
|
-
* performSearch(query);
|
|
53
|
-
* }, 300);
|
|
54
|
-
*
|
|
55
|
-
* searchInput.addEventListener('input', (e) => {
|
|
56
|
-
* debouncedSearch(e.target.value);
|
|
57
|
-
* });
|
|
58
|
-
*/
|
|
59
8
|
export declare const debounce: <T extends (...args: never[]) => unknown>(fn: T, wait: number, options?: {
|
|
60
9
|
leading?: boolean;
|
|
61
10
|
maxWait?: number;
|
|
62
11
|
}) => Cancellable<(...args: Parameters<T>) => void>;
|
|
63
|
-
/**
|
|
64
|
-
* Creates a function that is restricted to invoking the provided function once.
|
|
65
|
-
* Repeat calls to the function return the value of the first invocation.
|
|
66
|
-
*
|
|
67
|
-
* @param {Function} fn - The function to restrict
|
|
68
|
-
* @returns {Function} The restricted function
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* // Initialize app only once
|
|
72
|
-
* const initApp = once(() => {
|
|
73
|
-
* console.log('App initialized');
|
|
74
|
-
* setupEventListeners();
|
|
75
|
-
* loadInitialData();
|
|
76
|
-
* });
|
|
77
|
-
*
|
|
78
|
-
* // Can be called multiple times, but executes only once
|
|
79
|
-
* button1.addEventListener('click', initApp);
|
|
80
|
-
* button2.addEventListener('click', initApp);
|
|
81
|
-
*/
|
|
82
12
|
export declare const once: <T extends (...args: never[]) => unknown>(fn: T) => ((...args: Parameters<T>) => ReturnType<T>);
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
type ThemeChangeCallback = () => void;
|
|
2
|
-
/**
|
|
3
|
-
* Register a callback to be notified of theme changes
|
|
4
|
-
* @param callback Function to call when theme changes
|
|
5
|
-
* @returns Function to unregister the callback
|
|
6
|
-
*/
|
|
7
2
|
export declare const onThemeChange: (callback: ThemeChangeCallback) => (() => void);
|
|
8
|
-
/**
|
|
9
|
-
* Gets a theme color from CSS variables, with optional alpha/opacity support.
|
|
10
|
-
* The prefix is automatically added to the variable name.
|
|
11
|
-
* With `element`, colors are read where that element sits, so a theme set on
|
|
12
|
-
* any ancestor (or a shadow host) applies. Otherwise they are retrieved from
|
|
13
|
-
* the active theme (defined on body element) if available, falling back to
|
|
14
|
-
* the default theme (defined on :root) if not found.
|
|
15
|
-
*
|
|
16
|
-
* @param {string} varName - The CSS variable name without prefix (e.g. 'sys-color-primary')
|
|
17
|
-
* @param {object} [options] - Options for color retrieval
|
|
18
|
-
* @param {number} [options.alpha] - Alpha value (0-1): a hex colour is returned as rgba()
|
|
19
|
-
* @param {string} [options.fallback] - Fallback color if variable is not found
|
|
20
|
-
* @param {Element} [options.element] - Element whose theme to read; used when it is in a document
|
|
21
|
-
* @param {ThemeChangeCallback} [options.onThemeChange] - Optional callback for theme changes
|
|
22
|
-
* @returns {string} The color value (hex, rgb, or rgba)
|
|
23
|
-
*
|
|
24
|
-
* The themes declare no `--<prefix>-sys-color-*-rgb` twins, and material 3.0.0
|
|
25
|
-
* no longer derives them: read `sys-color-X`, with `alpha` for rgba().
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* // Basic usage
|
|
29
|
-
* getThemeColor('sys-color-primary') // '#006493' (from active theme)
|
|
30
|
-
*
|
|
31
|
-
* // With theme change notification
|
|
32
|
-
* getThemeColor('sys-color-primary', {
|
|
33
|
-
* onThemeChange: () => {
|
|
34
|
-
* // Re-render or update component
|
|
35
|
-
* component.update();
|
|
36
|
-
* }
|
|
37
|
-
* });
|
|
38
|
-
*/
|
|
39
3
|
export declare function getThemeColor(varName: string, options?: {
|
|
40
4
|
alpha?: number;
|
|
41
5
|
fallback?: string;
|
package/dist/core/utils/url.d.ts
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Attributes whose value is a URL, and so must be checked before assignment.
|
|
3
|
-
*/
|
|
4
1
|
export declare const URL_ATTRIBUTES: Set<string>;
|
|
5
|
-
/**
|
|
6
|
-
* Whether a URL is safe to assign to a navigable attribute.
|
|
7
|
-
*
|
|
8
|
-
* Relative URLs, fragments and query-only URLs have no scheme and are safe:
|
|
9
|
-
* they cannot execute. A value with a scheme is safe only if the scheme is
|
|
10
|
-
* in the allowlist. Leading whitespace and control characters are stripped
|
|
11
|
-
* first, because browsers ignore them when resolving `java\nscript:alert(1)`.
|
|
12
|
-
*/
|
|
13
2
|
export declare const isSafeUrl: (url: string) => boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the URL if its scheme is allowed, otherwise an empty string.
|
|
16
|
-
*
|
|
17
|
-
* Empty rather than throwing: a refused URL should leave an inert control, not
|
|
18
|
-
* break the page that rendered it.
|
|
19
|
-
*/
|
|
20
3
|
export declare const safeUrl: (url: string) => string;
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What every framework adapter shares: how a spec's attributes, live
|
|
3
|
-
* properties and events become a framework's props, how values are written as
|
|
4
|
-
* attributes, and the tag prefix. Framework-free; each adapter
|
|
5
|
-
* (`src/react`, `src/vue`, …) builds on it.
|
|
6
|
-
*
|
|
7
|
-
* @module elements
|
|
8
|
-
*/
|
|
9
1
|
import { type AttributeType, type DefineOptions, type ElementAttributes, type ElementProperties } from "./define.js";
|
|
10
|
-
/** The runtime parts of an element spec an adapter reads. */
|
|
11
2
|
export interface ComponentSpec {
|
|
12
3
|
name: string;
|
|
13
|
-
/** `false`: the server never marks the host. A function still can. Absent means it does. */
|
|
14
4
|
ssr?: boolean | ((host: HTMLElement) => boolean);
|
|
15
|
-
/**
|
|
16
|
-
* The prefix-independent attribute the element's host carries once connected
|
|
17
|
-
* (`data-mtrl-icon-button`). The renderer, the element class and every
|
|
18
|
-
* adapter read it from this spec, so a future element with a marker needs no
|
|
19
|
-
* adapter change. The server writes it beside `data-mtrl-ssr`; styles match
|
|
20
|
-
* slotted hosts with it where the sheet cannot spell their tag.
|
|
21
|
-
*
|
|
22
|
-
* @internal A host attribute an element carries so another element's sheet
|
|
23
|
-
* can match it; not part of the public API and may change without notice.
|
|
24
|
-
*/
|
|
25
5
|
marker?: string;
|
|
26
6
|
attributes?: Record<string, {
|
|
27
7
|
type: AttributeType;
|
|
@@ -35,7 +15,6 @@ export interface ComponentSpec {
|
|
|
35
15
|
form?: unknown;
|
|
36
16
|
model?: string;
|
|
37
17
|
}
|
|
38
|
-
/** A declaration child (`<m-tab>`): attributes and children only, no behaviour. */
|
|
39
18
|
export interface DeclarationSpec {
|
|
40
19
|
name: string;
|
|
41
20
|
attributes: Record<string, {
|
|
@@ -43,79 +22,51 @@ export interface DeclarationSpec {
|
|
|
43
22
|
}>;
|
|
44
23
|
}
|
|
45
24
|
export type Pascal<S extends string> = S extends `${infer H}-${infer T}` ? `${Capitalize<H>}${Pascal<T>}` : Capitalize<S>;
|
|
46
|
-
/** An attribute a live property shadows is set through `default<Name>`. */
|
|
47
25
|
export type DefaultProps<S> = {
|
|
48
26
|
[K in keyof ElementProperties<S> & keyof ElementAttributes<S> & string as `default${Capitalize<K>}`]?: ElementAttributes<S>[K];
|
|
49
27
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/** A form-associated element takes `name`. */
|
|
28
|
+
export type RetiredEvents<S> = [
|
|
29
|
+
S
|
|
30
|
+
] extends [
|
|
31
|
+
import("./icon-button.js").IconButtonSpec
|
|
32
|
+
] ? [
|
|
33
|
+
import("./icon-button.js").IconButtonSpec
|
|
34
|
+
] extends [
|
|
35
|
+
S
|
|
36
|
+
] ? "toggle" : never : never;
|
|
60
37
|
export type FormProps<S> = S extends {
|
|
61
38
|
form: unknown;
|
|
62
39
|
} ? {
|
|
63
40
|
name?: string;
|
|
64
41
|
} : Record<never, never>;
|
|
65
|
-
/** The live property a framework's two-way binding (`v-model`, `bind:`) drives. */
|
|
66
42
|
export type ModelOf<S> = S extends {
|
|
67
43
|
model: infer M extends keyof ElementProperties<S> & string;
|
|
68
44
|
} ? M : never;
|
|
69
45
|
export declare const camel: (name: string) => string;
|
|
70
46
|
export declare const pascal: (name: string) => string;
|
|
71
|
-
/**
|
|
72
|
-
* An attribute value as a framework should render it. A present boolean is
|
|
73
|
-
* `""`, which the element reads as true whether it arrives as an attribute or
|
|
74
|
-
* as a property.
|
|
75
|
-
*/
|
|
76
47
|
export declare const toAttribute: (type: AttributeType, value: unknown) => string | undefined;
|
|
77
48
|
export interface AttributeProp {
|
|
78
|
-
/** The attribute's name on the element. */
|
|
79
49
|
name: string;
|
|
80
50
|
type: AttributeType;
|
|
81
|
-
/** A live property of the same name exists; this prop is its `default*`. */
|
|
82
51
|
shadowed: boolean;
|
|
83
52
|
}
|
|
84
|
-
/** A spec, read once into the maps an adapter needs. */
|
|
85
53
|
export interface Described {
|
|
86
|
-
/** Prop name (camelCase, or `default<Name>` when shadowed) to attribute. */
|
|
87
54
|
attributes: Map<string, AttributeProp>;
|
|
88
|
-
/** Live-state property names. */
|
|
89
55
|
properties: string[];
|
|
90
|
-
/** Event names, as the element dispatches them. */
|
|
91
56
|
events: string[];
|
|
92
|
-
/** The property two-way binding drives, if any. */
|
|
93
57
|
model: string | undefined;
|
|
94
58
|
form: boolean;
|
|
95
|
-
/** Live property name to the attribute it shadows (`checked` → the `checked` attribute). */
|
|
96
59
|
shadowedBy: Map<string, AttributeProp>;
|
|
97
|
-
/** The named slots, as `slot="…"` names them. */
|
|
98
60
|
slots: readonly string[];
|
|
99
61
|
}
|
|
100
62
|
export declare const describe: (spec: ComponentSpec) => Described;
|
|
101
|
-
/**
|
|
102
|
-
* Writes the attributes live properties shadow (`defaultChecked` → the
|
|
103
|
-
* `checked` attribute) on the element. Frameworks would assign a same-named
|
|
104
|
-
* prop to the live property, so every adapter writes these itself in the
|
|
105
|
-
* browser. A prop that is not given leaves the attribute alone.
|
|
106
|
-
*/
|
|
107
63
|
export declare const writeDefaults: (element: HTMLElement, described: Described, read: (prop: string) => unknown) => void;
|
|
108
|
-
/** Writes live-state props to the element. A prop that is not given leaves the element's own state. */
|
|
109
64
|
export declare const writeLive: (element: HTMLElement, described: Described, read: (property: string) => unknown) => void;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
*/
|
|
115
|
-
export declare const serverDefaults: (described: Described, read: (property: string) => unknown) => Array<[string, string]>;
|
|
65
|
+
export declare const serverDefaults: (described: Described, read: (property: string) => unknown) => Array<[
|
|
66
|
+
string,
|
|
67
|
+
string
|
|
68
|
+
]>;
|
|
116
69
|
export declare const describeDeclaration: (spec: DeclarationSpec) => Map<string, AttributeProp>;
|
|
117
|
-
/** The tag prefix adapters render. */
|
|
118
70
|
export declare const getPrefix: () => string;
|
|
119
|
-
/** Sets the tag prefix every adapter renders. Call before the first render. */
|
|
120
71
|
export declare const configure: (options: DefineOptions) => void;
|
|
121
72
|
export declare const isBrowser: boolean;
|
package/dist/elements/badge.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-badge>`: a standalone badge. The factory attaches a badge to a target
|
|
3
|
-
* it wraps; the element is the badge alone, placed by the page like any
|
|
4
|
-
* inline element.
|
|
5
|
-
*
|
|
6
|
-
* The label is the `label` attribute, or the element's text when there is
|
|
7
|
-
* none. The factory writes a formatted string (`999+`), not a node, so the
|
|
8
|
-
* text is read rather than slotted. The `visible` property is the live
|
|
9
|
-
* visibility; an empty or zero label hides the badge, as in the factory.
|
|
10
|
-
*
|
|
11
|
-
* Parts: `badge`.
|
|
12
|
-
*
|
|
13
|
-
* @module elements
|
|
14
|
-
*/
|
|
15
1
|
import type { BadgeComponent } from "../components/badge/types.js";
|
|
16
2
|
import { type DefineOptions, type ElementInstance } from "./define.js";
|
|
17
3
|
declare const badgeSpec: {
|
|
@@ -57,12 +43,9 @@ declare const badgeSpec: {
|
|
|
57
43
|
};
|
|
58
44
|
export declare const badgeElement: import("./define.js").ElementDefinition<BadgeComponent>;
|
|
59
45
|
export type BadgeSpec = typeof badgeSpec;
|
|
60
|
-
/** `<m-badge>` as a ref or a query returns it. */
|
|
61
46
|
export type BadgeElement = ElementInstance<BadgeSpec, BadgeComponent>;
|
|
62
|
-
/** Registers `<m-badge>` (or `<prefix-badge>`). */
|
|
63
47
|
export declare const defineBadge: (options?: DefineOptions) => string;
|
|
64
48
|
declare global {
|
|
65
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
66
49
|
interface HTMLElementTagNameMap {
|
|
67
50
|
"m-badge": BadgeElement;
|
|
68
51
|
}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-bottom-app-bar>`: the bottom app bar as a container with slots.
|
|
3
|
-
*
|
|
4
|
-
* Children are the actions (icon buttons); `slot="fab"` takes the FAB, placed
|
|
5
|
-
* at the end or, with `fab-position="center"`, in the middle. `auto-hide`
|
|
6
|
-
* hides the bar while the window scrolls down and shows it again on the way
|
|
7
|
-
* up; `show()` and `hide()` do the same from script.
|
|
8
|
-
*
|
|
9
|
-
* Parts: `bottom-app-bar`, `actions`, `fab-container`.
|
|
10
|
-
*
|
|
11
|
-
* @module elements
|
|
12
|
-
*/
|
|
13
1
|
import type { BottomAppBarComponent } from "../components/bottom-app-bar/types.js";
|
|
14
2
|
import { type Config, type DefineOptions, type ElementInstance } from "./define.js";
|
|
15
3
|
declare const bottomAppBarSpec: {
|
|
16
4
|
name: string;
|
|
17
|
-
slots: readonly [
|
|
5
|
+
slots: readonly [
|
|
6
|
+
"fab"
|
|
7
|
+
];
|
|
18
8
|
create: (config: Config) => BottomAppBarComponent;
|
|
19
9
|
styles: string[];
|
|
20
10
|
hostStyles: string;
|
|
@@ -36,18 +26,18 @@ declare const bottomAppBarSpec: {
|
|
|
36
26
|
update: (c: BottomAppBarComponent, v: import("./define.js").AttributeValue) => void;
|
|
37
27
|
};
|
|
38
28
|
};
|
|
39
|
-
methods: readonly [
|
|
29
|
+
methods: readonly [
|
|
30
|
+
"show",
|
|
31
|
+
"hide"
|
|
32
|
+
];
|
|
40
33
|
config: (host: HTMLElement) => Config;
|
|
41
34
|
setup: (host: import("./define.js").ElementHost<BottomAppBarComponent>, component: BottomAppBarComponent) => () => void | undefined;
|
|
42
35
|
};
|
|
43
36
|
export declare const bottomAppBarElement: import("./define.js").ElementDefinition<BottomAppBarComponent>;
|
|
44
37
|
export type BottomAppBarSpec = typeof bottomAppBarSpec;
|
|
45
|
-
/** `<m-bottom-app-bar>` as a ref or a query returns it. */
|
|
46
38
|
export type BottomAppBarElement = ElementInstance<BottomAppBarSpec, BottomAppBarComponent>;
|
|
47
|
-
/** Registers `<m-bottom-app-bar>` (or `<prefix-bottom-app-bar>`). */
|
|
48
39
|
export declare const defineBottomAppBar: (options?: DefineOptions) => string;
|
|
49
40
|
declare global {
|
|
50
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
51
41
|
interface HTMLElementTagNameMap {
|
|
52
42
|
"m-bottom-app-bar": BottomAppBarElement;
|
|
53
43
|
}
|