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,606 +1,63 @@
|
|
|
1
1
|
import type { TouchEvents } from "../../core/utils/mobile.js";
|
|
2
2
|
import type { IconManager } from "../../core/compose/features/icon.js";
|
|
3
3
|
import type { ForwardedEventPayload } from "../../core/dom/create.js";
|
|
4
|
-
/**
|
|
5
|
-
* FAB variants following Material Design 3 guidelines
|
|
6
|
-
*
|
|
7
|
-
* Material Design 3 offers different color variants for the FAB
|
|
8
|
-
* to match visual hierarchy and application color schemes.
|
|
9
|
-
*
|
|
10
|
-
* @category Components
|
|
11
|
-
* @remarks
|
|
12
|
-
* - primary-container, secondary-container, tertiary-container: container styles
|
|
13
|
-
* - primary, secondary, tertiary: tone styles
|
|
14
|
-
* - surface: deprecated; use a container or tone style instead
|
|
15
|
-
* Default: primary-container.
|
|
16
|
-
*/
|
|
17
4
|
export type FabVariant = "primary-container" | "secondary-container" | "tertiary-container" | "primary" | "secondary" | "tertiary";
|
|
18
|
-
/**
|
|
19
|
-
* FAB size variants
|
|
20
|
-
*
|
|
21
|
-
* Material Design 3 defines multiple size options for FABs to accommodate
|
|
22
|
-
* different use cases and screen sizes.
|
|
23
|
-
*
|
|
24
|
-
* @category Components
|
|
25
|
-
* @remarks
|
|
26
|
-
* - default: 56px diameter, for standard primary actions (default)
|
|
27
|
-
* - medium: 80px container, 28px icon
|
|
28
|
-
* - large: 96px container, 32px icon
|
|
29
|
-
*/
|
|
30
5
|
export type FabSize = "default" | "medium" | "large";
|
|
31
|
-
/**
|
|
32
|
-
* FAB position options
|
|
33
|
-
*
|
|
34
|
-
* Predefined positions for the FAB when used as a floating element.
|
|
35
|
-
* These positions automatically apply appropriate margins and positioning.
|
|
36
|
-
*
|
|
37
|
-
* @category Components
|
|
38
|
-
* @remarks
|
|
39
|
-
* Common patterns:
|
|
40
|
-
* - bottom-right: Most common position for primary actions
|
|
41
|
-
* - bottom-left: Alternative position on left-to-right interfaces
|
|
42
|
-
* - top-right: Used for actions related to top content
|
|
43
|
-
* - top-left: Less common but available for special layouts
|
|
44
|
-
*/
|
|
45
6
|
export type FabPosition = "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
46
|
-
/**
|
|
47
|
-
* Configuration interface for the FAB component
|
|
48
|
-
*
|
|
49
|
-
* Comprehensive options for creating and customizing a Floating Action Button
|
|
50
|
-
* according to Material Design 3 guidelines.
|
|
51
|
-
*
|
|
52
|
-
* @category Components
|
|
53
|
-
* @see https://m3.material.io/components/floating-action-button/overview
|
|
54
|
-
*/
|
|
55
7
|
export interface FabConfig {
|
|
56
|
-
/**
|
|
57
|
-
* FAB variant that determines visual styling
|
|
58
|
-
*
|
|
59
|
-
* The color variant affects the FAB's background color, icon color, and elevation.
|
|
60
|
-
*
|
|
61
|
-
* @default 'primary-container'
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* // Create a tertiary FAB
|
|
66
|
-
* createFab({ variant: 'tertiary', icon: '<svg>...</svg>' })
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
8
|
variant?: FabVariant | string;
|
|
70
|
-
/**
|
|
71
|
-
* FAB size variant
|
|
72
|
-
*
|
|
73
|
-
* Controls the diameter of the FAB and the appropriate icon size.
|
|
74
|
-
*
|
|
75
|
-
* @default 'default'
|
|
76
|
-
*
|
|
77
|
-
* @example
|
|
78
|
-
* ```typescript
|
|
79
|
-
* // Create a medium FAB
|
|
80
|
-
* createFab({ size: 'medium', icon: '<svg>...</svg>' })
|
|
81
|
-
*
|
|
82
|
-
* // Create a large FAB for emphasis
|
|
83
|
-
* createFab({ size: 'large', icon: '<svg>...</svg>' })
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
9
|
size?: FabSize | string;
|
|
87
|
-
/**
|
|
88
|
-
* Whether the FAB is initially disabled
|
|
89
|
-
*
|
|
90
|
-
* When disabled, the FAB will have a visually muted appearance
|
|
91
|
-
* and won't respond to user interactions.
|
|
92
|
-
*
|
|
93
|
-
* @default false
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* // Create a disabled FAB
|
|
98
|
-
* const fab = createFab({
|
|
99
|
-
* icon: '<svg>...</svg>',
|
|
100
|
-
* disabled: true
|
|
101
|
-
* });
|
|
102
|
-
*
|
|
103
|
-
* // Later enable it when content is ready
|
|
104
|
-
* loadContent().then(() => {
|
|
105
|
-
* fab.enable();
|
|
106
|
-
* });
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
10
|
disabled?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* FAB icon HTML content.
|
|
112
|
-
* Markup (HTML). Not sanitized by default: see Markup and sanitizing.
|
|
113
|
-
*
|
|
114
|
-
* The icon content can be any valid HTML, but typically contains an SVG icon
|
|
115
|
-
* or a Material Icons ligature. Icons should follow Material Design sizing guidelines
|
|
116
|
-
* (24x24dp for most sizes, scaled appropriately for small or large variants).
|
|
117
|
-
*
|
|
118
|
-
* @example
|
|
119
|
-
* ```typescript
|
|
120
|
-
* // Using an SVG icon
|
|
121
|
-
* createFab({
|
|
122
|
-
* icon: '<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>'
|
|
123
|
-
* });
|
|
124
|
-
*
|
|
125
|
-
* // Using a Material Icons ligature
|
|
126
|
-
* createFab({
|
|
127
|
-
* icon: '<span class="material-icons">add</span>'
|
|
128
|
-
* });
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
11
|
icon?: string;
|
|
132
|
-
/**
|
|
133
|
-
* Icon size in pixels or other CSS units
|
|
134
|
-
*
|
|
135
|
-
* Allows customizing the icon size beyond the default size for the selected FAB size.
|
|
136
|
-
*
|
|
137
|
-
* @example
|
|
138
|
-
* ```typescript
|
|
139
|
-
* // Create a FAB with a larger icon
|
|
140
|
-
* createFab({
|
|
141
|
-
* icon: '<svg>...</svg>',
|
|
142
|
-
* iconSize: '32px'
|
|
143
|
-
* });
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
12
|
iconSize?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Additional CSS classes to add to the FAB
|
|
149
|
-
*
|
|
150
|
-
* Custom classes for styling or identifying the FAB.
|
|
151
|
-
* These classes will be applied in addition to the component's built-in classes.
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```typescript
|
|
155
|
-
* createFab({
|
|
156
|
-
* icon: '<svg>...</svg>',
|
|
157
|
-
* class: 'home-fab pulse-animation'
|
|
158
|
-
* });
|
|
159
|
-
* ```
|
|
160
|
-
*/
|
|
161
13
|
class?: string;
|
|
162
|
-
/**
|
|
163
|
-
* Button value attribute
|
|
164
|
-
*
|
|
165
|
-
* Sets the HTML value attribute of the button element, useful when using
|
|
166
|
-
* the FAB in a form context.
|
|
167
|
-
*
|
|
168
|
-
* @example
|
|
169
|
-
* ```typescript
|
|
170
|
-
* createFab({
|
|
171
|
-
* icon: '<svg>...</svg>',
|
|
172
|
-
* type: 'submit',
|
|
173
|
-
* value: 'form-submitted'
|
|
174
|
-
* });
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
14
|
value?: string;
|
|
178
|
-
/**
|
|
179
|
-
* Position of the FAB on the screen
|
|
180
|
-
*
|
|
181
|
-
* Configures the FAB for floating positioning on the screen.
|
|
182
|
-
* Applies appropriate CSS classes to position the FAB in one of the corners.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* ```typescript
|
|
186
|
-
* // Position in the bottom-right corner (common for primary actions)
|
|
187
|
-
* createFab({
|
|
188
|
-
* icon: '<svg>...</svg>',
|
|
189
|
-
* position: 'bottom-right'
|
|
190
|
-
* });
|
|
191
|
-
*
|
|
192
|
-
* // Position in the top-left corner
|
|
193
|
-
* createFab({
|
|
194
|
-
* icon: '<svg>...</svg>',
|
|
195
|
-
* position: 'top-left'
|
|
196
|
-
* });
|
|
197
|
-
* ```
|
|
198
|
-
*/
|
|
199
15
|
position?: FabPosition | string;
|
|
200
|
-
/**
|
|
201
|
-
* Button type attribute
|
|
202
|
-
*
|
|
203
|
-
* Sets the HTML type attribute of the button element.
|
|
204
|
-
*
|
|
205
|
-
* @default 'button'
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```typescript
|
|
209
|
-
* // Use as a form submit button
|
|
210
|
-
* createFab({
|
|
211
|
-
* icon: '<svg>...</svg>',
|
|
212
|
-
* type: 'submit'
|
|
213
|
-
* });
|
|
214
|
-
* ```
|
|
215
|
-
*/
|
|
216
16
|
type?: "button" | "submit" | "reset";
|
|
217
|
-
/**
|
|
218
|
-
* Accessible label for screen readers
|
|
219
|
-
*
|
|
220
|
-
* Sets the aria-label attribute for accessibility. Required for FABs since
|
|
221
|
-
* they typically contain only an icon without visible text.
|
|
222
|
-
*
|
|
223
|
-
* @example
|
|
224
|
-
* ```typescript
|
|
225
|
-
* createFab({
|
|
226
|
-
* icon: '<svg>...</svg>',
|
|
227
|
-
* ariaLabel: 'Add new item'
|
|
228
|
-
* });
|
|
229
|
-
* ```
|
|
230
|
-
*/
|
|
231
|
-
/**
|
|
232
|
-
* Accessible name. Required: an icon-only control has no text for a screen
|
|
233
|
-
* reader to announce, so without this it is just "button" (WCAG 4.1.2).
|
|
234
|
-
*/
|
|
235
17
|
ariaLabel: string;
|
|
236
|
-
/**
|
|
237
|
-
* Whether to enable ripple effect
|
|
238
|
-
*
|
|
239
|
-
* The ripple effect provides visual feedback when the user interacts
|
|
240
|
-
* with the FAB. Follows Material Design interaction patterns.
|
|
241
|
-
*
|
|
242
|
-
* @default true
|
|
243
|
-
*
|
|
244
|
-
* @example
|
|
245
|
-
* ```typescript
|
|
246
|
-
* // Disable the ripple effect
|
|
247
|
-
* createFab({
|
|
248
|
-
* icon: '<svg>...</svg>',
|
|
249
|
-
* ripple: false
|
|
250
|
-
* });
|
|
251
|
-
* ```
|
|
252
|
-
*/
|
|
253
18
|
ripple?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* Component prefix for class names
|
|
256
|
-
*
|
|
257
|
-
* The prefix used for BEM-style class names.
|
|
258
|
-
*
|
|
259
|
-
* @default 'mtrl'
|
|
260
|
-
*
|
|
261
|
-
* @example
|
|
262
|
-
* ```typescript
|
|
263
|
-
* // Use a custom prefix for class names
|
|
264
|
-
* createFab({
|
|
265
|
-
* icon: '<svg>...</svg>',
|
|
266
|
-
* prefix: 'app'
|
|
267
|
-
* });
|
|
268
|
-
* // Results in classes like: 'app-fab app-fab--primary'
|
|
269
|
-
* ```
|
|
270
|
-
*/
|
|
271
19
|
prefix?: string;
|
|
272
|
-
/**
|
|
273
|
-
* Component name used in class generation
|
|
274
|
-
*
|
|
275
|
-
* @internal
|
|
276
|
-
*/
|
|
277
20
|
componentName?: string;
|
|
278
|
-
/**
|
|
279
|
-
* Ripple effect configuration
|
|
280
|
-
*
|
|
281
|
-
* Fine-grained control over the ripple effect appearance and behavior.
|
|
282
|
-
*
|
|
283
|
-
* @example
|
|
284
|
-
* ```typescript
|
|
285
|
-
* // Customize ripple effect
|
|
286
|
-
* createFab({
|
|
287
|
-
* icon: '<svg>...</svg>',
|
|
288
|
-
* rippleConfig: {
|
|
289
|
-
* duration: 400
|
|
290
|
-
* }
|
|
291
|
-
* });
|
|
292
|
-
* ```
|
|
293
|
-
*/
|
|
294
21
|
rippleConfig?: {
|
|
295
|
-
/** How long, in milliseconds, a released wave lingers before it is removed */
|
|
296
22
|
duration?: number;
|
|
297
23
|
};
|
|
298
|
-
/**
|
|
299
|
-
* Whether to show the FAB with an entrance animation
|
|
300
|
-
*
|
|
301
|
-
* When true, the FAB will animate into view when added to the DOM.
|
|
302
|
-
*
|
|
303
|
-
* @default false
|
|
304
|
-
*
|
|
305
|
-
* @example
|
|
306
|
-
* ```typescript
|
|
307
|
-
* // Create an animated entrance FAB
|
|
308
|
-
* createFab({
|
|
309
|
-
* icon: '<svg>...</svg>',
|
|
310
|
-
* animate: true
|
|
311
|
-
* });
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
24
|
animate?: boolean;
|
|
315
|
-
/**
|
|
316
|
-
* Index signature for additional configuration options
|
|
317
|
-
* Required for compatibility with core feature interfaces
|
|
318
|
-
*/
|
|
319
25
|
[key: string]: unknown;
|
|
320
26
|
}
|
|
321
|
-
/**
|
|
322
|
-
* FAB component interface
|
|
323
|
-
*
|
|
324
|
-
* Provides methods for interacting with and manipulating a Floating Action Button.
|
|
325
|
-
*
|
|
326
|
-
* @category Components
|
|
327
|
-
*/
|
|
328
|
-
/**
|
|
329
|
-
* The events a FAB reports, and what each hands its handler.
|
|
330
|
-
*
|
|
331
|
-
* Exactly the three its `forwardEvents` config forwards -- `click`, `focus`
|
|
332
|
-
* and `blur`, see config.ts. `mount` and `unmount` are deliberately absent:
|
|
333
|
-
* the lifecycle feature keeps its own emitter and exposes them as
|
|
334
|
-
* `lifecycle.onMount` / `onUnmount`, so they never arrive through `on`.
|
|
335
|
-
*
|
|
336
|
-
* `on` and `off` are generic over these keys, so a misspelled event name is a
|
|
337
|
-
* compile error rather than a listener that never fires, and the handler's
|
|
338
|
-
* payload is typed rather than `Function`'s implicit `any`.
|
|
339
|
-
*/
|
|
340
27
|
export interface FabEvents extends TouchEvents {
|
|
341
|
-
/** The FAB was clicked. Not forwarded while the FAB is disabled. */
|
|
342
28
|
click: (payload: ForwardedEventPayload<MouseEvent, HTMLButtonElement>) => void;
|
|
343
|
-
/** The FAB took focus. */
|
|
344
29
|
focus: (payload: ForwardedEventPayload<FocusEvent, HTMLButtonElement>) => void;
|
|
345
|
-
/** The FAB lost focus. */
|
|
346
30
|
blur: (payload: ForwardedEventPayload<FocusEvent, HTMLButtonElement>) => void;
|
|
347
31
|
}
|
|
348
32
|
export interface FabComponent {
|
|
349
|
-
/**
|
|
350
|
-
* The FAB's DOM element
|
|
351
|
-
*
|
|
352
|
-
* Direct access to the underlying button element for DOM manipulation.
|
|
353
|
-
*/
|
|
354
33
|
element: HTMLButtonElement;
|
|
355
|
-
/**
|
|
356
|
-
* API for managing FAB icons
|
|
357
|
-
*
|
|
358
|
-
* Access to low-level icon methods and elements.
|
|
359
|
-
*/
|
|
360
34
|
icon: {
|
|
361
|
-
/** Sets the icon HTML content */
|
|
362
35
|
setIcon: (html: string) => IconManager;
|
|
363
|
-
/** Gets the current icon HTML content */
|
|
364
36
|
getIcon: () => string;
|
|
365
|
-
/** Gets the icon DOM element */
|
|
366
37
|
getElement: () => HTMLElement | null;
|
|
367
38
|
};
|
|
368
|
-
/**
|
|
369
|
-
* API for managing disabled state
|
|
370
|
-
*
|
|
371
|
-
* Access to low-level disabled state methods.
|
|
372
|
-
*/
|
|
373
39
|
disabled: {
|
|
374
|
-
/** Enables the FAB */
|
|
375
40
|
enable: () => void;
|
|
376
|
-
/** Disables the FAB */
|
|
377
41
|
disable: () => void;
|
|
378
|
-
/** Checks if the FAB is disabled */
|
|
379
42
|
isDisabled: () => boolean;
|
|
380
43
|
};
|
|
381
|
-
/**
|
|
382
|
-
* API for managing component lifecycle
|
|
383
|
-
*
|
|
384
|
-
* Access to low-level lifecycle methods.
|
|
385
|
-
*/
|
|
386
44
|
lifecycle: {
|
|
387
|
-
/** Destroys the component and cleans up resources */
|
|
388
45
|
destroy: () => void;
|
|
389
46
|
};
|
|
390
|
-
/**
|
|
391
|
-
* Gets a class name with the component's prefix
|
|
392
|
-
*
|
|
393
|
-
* @param name - Base class name
|
|
394
|
-
* @returns Prefixed class name
|
|
395
|
-
*
|
|
396
|
-
* @example
|
|
397
|
-
* ```typescript
|
|
398
|
-
* const fab = createFab({ icon: '<svg>...</svg>' });
|
|
399
|
-
* const className = fab.getClass('icon'); // Returns 'mtrl-fab__icon'
|
|
400
|
-
* ```
|
|
401
|
-
*/
|
|
402
47
|
getClass: (name: string) => string;
|
|
403
|
-
/**
|
|
404
|
-
* Gets the FAB's value attribute
|
|
405
|
-
*
|
|
406
|
-
* @returns FAB value
|
|
407
|
-
*
|
|
408
|
-
* @example
|
|
409
|
-
* ```typescript
|
|
410
|
-
* const fab = createFab({
|
|
411
|
-
* icon: '<svg>...</svg>',
|
|
412
|
-
* value: 'action-button'
|
|
413
|
-
* });
|
|
414
|
-
* const value = fab.getValue(); // Returns 'action-button'
|
|
415
|
-
* ```
|
|
416
|
-
*/
|
|
417
48
|
getValue: () => string;
|
|
418
|
-
/**
|
|
419
|
-
* Sets the FAB's value attribute
|
|
420
|
-
*
|
|
421
|
-
* @param value - New value
|
|
422
|
-
* @returns The FAB component for chaining
|
|
423
|
-
*
|
|
424
|
-
* @example
|
|
425
|
-
* ```typescript
|
|
426
|
-
* const fab = createFab({ icon: '<svg>...</svg>' });
|
|
427
|
-
* fab.setValue('complete');
|
|
428
|
-
* ```
|
|
429
|
-
*/
|
|
430
49
|
setValue: (value: string) => FabComponent;
|
|
431
|
-
/**
|
|
432
|
-
* Enables the FAB (removes disabled attribute)
|
|
433
|
-
*
|
|
434
|
-
* Makes the FAB interactive and visually enabled.
|
|
435
|
-
*
|
|
436
|
-
* @returns The FAB component for chaining
|
|
437
|
-
*
|
|
438
|
-
* @example
|
|
439
|
-
* ```typescript
|
|
440
|
-
* // Enable a previously disabled FAB
|
|
441
|
-
* fab.enable();
|
|
442
|
-
* ```
|
|
443
|
-
*/
|
|
444
50
|
enable: () => FabComponent;
|
|
445
|
-
/**
|
|
446
|
-
* Disables the FAB (adds disabled attribute)
|
|
447
|
-
*
|
|
448
|
-
* Makes the FAB non-interactive and visually disabled.
|
|
449
|
-
*
|
|
450
|
-
* @returns The FAB component for chaining
|
|
451
|
-
*
|
|
452
|
-
* @example
|
|
453
|
-
* ```typescript
|
|
454
|
-
* // Disable the FAB during an async operation
|
|
455
|
-
* fab.disable();
|
|
456
|
-
* await saveData();
|
|
457
|
-
* fab.enable();
|
|
458
|
-
* ```
|
|
459
|
-
*/
|
|
460
51
|
disable: () => FabComponent;
|
|
461
|
-
/** Whether the FAB is disabled */
|
|
462
52
|
isDisabled: () => boolean;
|
|
463
|
-
/**
|
|
464
|
-
* Sets the FAB's icon
|
|
465
|
-
*
|
|
466
|
-
* @param icon - Icon HTML content
|
|
467
|
-
* @returns The FAB component for chaining
|
|
468
|
-
*
|
|
469
|
-
* @example
|
|
470
|
-
* ```typescript
|
|
471
|
-
* // Change the icon dynamically
|
|
472
|
-
* fab.setIcon('<svg>...</svg>');
|
|
473
|
-
*
|
|
474
|
-
* // Change to a Material Icons ligature
|
|
475
|
-
* fab.setIcon('<span class="material-icons">edit</span>');
|
|
476
|
-
* ```
|
|
477
|
-
*/
|
|
478
53
|
setIcon: (icon: string) => FabComponent;
|
|
479
|
-
/**
|
|
480
|
-
* Gets the FAB's icon HTML content
|
|
481
|
-
*
|
|
482
|
-
* @returns Icon HTML
|
|
483
|
-
*
|
|
484
|
-
* @example
|
|
485
|
-
* ```typescript
|
|
486
|
-
* const iconHtml = fab.getIcon();
|
|
487
|
-
* ```
|
|
488
|
-
*/
|
|
489
54
|
getIcon: () => string;
|
|
490
|
-
/**
|
|
491
|
-
* Sets the FAB's position
|
|
492
|
-
*
|
|
493
|
-
* Positions the FAB in one of the four corners of the viewport.
|
|
494
|
-
*
|
|
495
|
-
* @param position - Position value ('top-right', 'bottom-left', etc.)
|
|
496
|
-
* @returns The FAB component for chaining
|
|
497
|
-
*
|
|
498
|
-
* @example
|
|
499
|
-
* ```typescript
|
|
500
|
-
* // Move the FAB to the bottom-left corner
|
|
501
|
-
* fab.setPosition('bottom-left');
|
|
502
|
-
* ```
|
|
503
|
-
*/
|
|
504
55
|
setPosition: (position: string) => FabComponent;
|
|
505
|
-
/**
|
|
506
|
-
* Gets the current position of the FAB
|
|
507
|
-
*
|
|
508
|
-
* @returns Current position or null if not positioned
|
|
509
|
-
*
|
|
510
|
-
* @example
|
|
511
|
-
* ```typescript
|
|
512
|
-
* const position = fab.getPosition(); // Returns 'bottom-right', 'top-left', etc.
|
|
513
|
-
* ```
|
|
514
|
-
*/
|
|
515
56
|
getPosition: () => string | null;
|
|
516
|
-
/**
|
|
517
|
-
* Lowers the FAB (useful for pressed state)
|
|
518
|
-
*
|
|
519
|
-
* Visually lowers the FAB by reducing its elevation,
|
|
520
|
-
* typically used to indicate a pressed or active state.
|
|
521
|
-
*
|
|
522
|
-
* @returns The FAB component for chaining
|
|
523
|
-
*
|
|
524
|
-
* @example
|
|
525
|
-
* ```typescript
|
|
526
|
-
* // Visually lower the FAB when a long operation starts
|
|
527
|
-
* fab.lower();
|
|
528
|
-
* await longOperation();
|
|
529
|
-
* fab.raise();
|
|
530
|
-
* ```
|
|
531
|
-
*/
|
|
532
57
|
lower: () => FabComponent;
|
|
533
|
-
/**
|
|
534
|
-
* Raises the FAB back to its default elevation
|
|
535
|
-
*
|
|
536
|
-
* Restores the default elevation after it has been lowered.
|
|
537
|
-
*
|
|
538
|
-
* @returns The FAB component for chaining
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* ```typescript
|
|
542
|
-
* // Restore normal elevation
|
|
543
|
-
* fab.raise();
|
|
544
|
-
* ```
|
|
545
|
-
*/
|
|
546
58
|
raise: () => FabComponent;
|
|
547
|
-
/**
|
|
548
|
-
* Destroys the FAB component and cleans up resources
|
|
549
|
-
*
|
|
550
|
-
* Removes event listeners and prepares the component for garbage collection.
|
|
551
|
-
* Call this method when the FAB is no longer needed.
|
|
552
|
-
*
|
|
553
|
-
* @example
|
|
554
|
-
* ```typescript
|
|
555
|
-
* // Clean up when the component is no longer needed
|
|
556
|
-
* fab.destroy();
|
|
557
|
-
* ```
|
|
558
|
-
*/
|
|
559
59
|
destroy: () => void;
|
|
560
|
-
/**
|
|
561
|
-
* Adds an event listener to the FAB
|
|
562
|
-
*
|
|
563
|
-
* @param event - Event name ('click', 'focus', etc.)
|
|
564
|
-
* @param handler - Event handler function
|
|
565
|
-
* @returns The FAB component for chaining
|
|
566
|
-
*
|
|
567
|
-
* @example
|
|
568
|
-
* ```typescript
|
|
569
|
-
* // Add click handler
|
|
570
|
-
* fab.on('click', () => {
|
|
571
|
-
* console.log('FAB clicked');
|
|
572
|
-
* });
|
|
573
|
-
* ```
|
|
574
|
-
*/
|
|
575
60
|
on: <K extends keyof FabEvents>(event: K, handler: FabEvents[K]) => FabComponent;
|
|
576
|
-
/**
|
|
577
|
-
* Removes an event listener from the FAB
|
|
578
|
-
*
|
|
579
|
-
* @param event - Event name
|
|
580
|
-
* @param handler - Event handler function
|
|
581
|
-
* @returns The FAB component for chaining
|
|
582
|
-
*
|
|
583
|
-
* @example
|
|
584
|
-
* ```typescript
|
|
585
|
-
* // Remove a previously added event handler
|
|
586
|
-
* const handler = () => console.log('Clicked');
|
|
587
|
-
* fab.on('click', handler);
|
|
588
|
-
* // Later...
|
|
589
|
-
* fab.off('click', handler);
|
|
590
|
-
* ```
|
|
591
|
-
*/
|
|
592
61
|
off: <K extends keyof FabEvents>(event: K, handler: FabEvents[K]) => FabComponent;
|
|
593
|
-
/**
|
|
594
|
-
* Adds CSS classes to the FAB element
|
|
595
|
-
*
|
|
596
|
-
* @param classes - One or more class names to add
|
|
597
|
-
* @returns The FAB component for chaining
|
|
598
|
-
*
|
|
599
|
-
* @example
|
|
600
|
-
* ```typescript
|
|
601
|
-
* // Add multiple classes
|
|
602
|
-
* fab.addClass('highlight', 'pulse-animation');
|
|
603
|
-
* ```
|
|
604
|
-
*/
|
|
605
62
|
addClass: (...classes: string[]) => FabComponent;
|
|
606
63
|
}
|
|
@@ -1,56 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Colour sets (m3.material.io FAB menu specs): the close button takes the
|
|
3
|
-
* role, the items its container role. Match the FAB's colour style.
|
|
4
|
-
*/
|
|
5
1
|
export declare const FAB_MENU_COLORS: {
|
|
6
2
|
readonly PRIMARY: "primary";
|
|
7
3
|
readonly SECONDARY: "secondary";
|
|
8
4
|
readonly TERTIARY: "tertiary";
|
|
9
5
|
};
|
|
10
6
|
export type FabMenuColor = (typeof FAB_MENU_COLORS)[keyof typeof FAB_MENU_COLORS];
|
|
11
|
-
/** The FAB sizes a menu opens from: not small, not extended. */
|
|
12
7
|
export declare const FAB_MENU_SIZES: {
|
|
13
8
|
readonly DEFAULT: "default";
|
|
14
9
|
readonly MEDIUM: "medium";
|
|
15
10
|
readonly LARGE: "large";
|
|
16
11
|
};
|
|
17
12
|
export type FabMenuSize = (typeof FAB_MENU_SIZES)[keyof typeof FAB_MENU_SIZES];
|
|
18
|
-
/**
|
|
19
|
-
* How the menu presents its items:
|
|
20
|
-
* - list: M3 Expressive's list of pill items above the FAB, which turns into
|
|
21
|
-
* a close button (compact windows)
|
|
22
|
-
* - menu: the baseline menu, opened from the FAB (the site's rule on the web,
|
|
23
|
-
* larger windows)
|
|
24
|
-
* - auto: list below 600px, menu from 600px
|
|
25
|
-
*/
|
|
26
13
|
export declare const FAB_MENU_PRESENTATIONS: {
|
|
27
14
|
readonly AUTO: "auto";
|
|
28
15
|
readonly LIST: "list";
|
|
29
16
|
readonly MENU: "menu";
|
|
30
17
|
};
|
|
31
18
|
export type FabMenuPresentation = (typeof FAB_MENU_PRESENTATIONS)[keyof typeof FAB_MENU_PRESENTATIONS];
|
|
32
|
-
/** Where the menu sits in its positioned container, or in the flow. */
|
|
33
19
|
export declare const FAB_MENU_PLACEMENTS: {
|
|
34
20
|
readonly NONE: "none";
|
|
35
21
|
readonly BOTTOM_END: "bottom-end";
|
|
36
22
|
readonly BOTTOM_START: "bottom-start";
|
|
37
23
|
};
|
|
38
24
|
export type FabMenuPlacement = (typeof FAB_MENU_PLACEMENTS)[keyof typeof FAB_MENU_PLACEMENTS];
|
|
39
|
-
/** The window width, in px, from which `auto` presents the baseline menu (medium windows). */
|
|
40
25
|
export declare const FAB_MENU_MENU_FROM = 600;
|
|
41
|
-
/** The spec's item count: a menu of 2 to 6 related actions. */
|
|
42
26
|
export declare const FAB_MENU_ITEMS: {
|
|
43
27
|
readonly MIN: 2;
|
|
44
28
|
readonly MAX: 6;
|
|
45
29
|
};
|
|
46
|
-
/** The space between the list and the close button (FabMenuBaselineTokens.CloseButtonBetweenSpace). */
|
|
47
30
|
export declare const FAB_MENU_LIST_GAP = 8;
|
|
48
|
-
/** The gap between the FAB and a baseline menu (m3.material.io FAB menu specs, web). */
|
|
49
31
|
export declare const FAB_MENU_MENU_GAP = 4;
|
|
50
|
-
/**
|
|
51
|
-
* How long the items take to leave after the last one starts: FastSpatial,
|
|
52
|
-
* the longest of an item's transitions.
|
|
53
|
-
*/
|
|
54
32
|
export declare const FAB_MENU_ITEM_EXIT = 425;
|
|
55
33
|
export declare const FAB_MENU_EVENTS: {
|
|
56
34
|
readonly OPEN: "open";
|
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
import type { FabMenuConfig, FabMenuComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a FAB menu: M3 Expressive's FAB that opens a list of related
|
|
4
|
-
* actions.
|
|
5
|
-
*
|
|
6
|
-
* Two presentations, as m3.material.io lays them out:
|
|
7
|
-
* - the list (compact windows): the FAB turns into a 56dp close button and
|
|
8
|
-
* 2 to 6 pill items rise above it, nearest first;
|
|
9
|
-
* - the menu (the site's rule on the web, larger windows): the FAB opens the
|
|
10
|
-
* baseline menu, 4dp away. It is loaded on demand, in a chunk of its own.
|
|
11
|
-
* `presentation: 'auto'` (the default) takes the list below 600px and the
|
|
12
|
-
* menu from 600px.
|
|
13
|
-
*
|
|
14
|
-
* The FAB is a menu button (`aria-haspopup`, `aria-expanded`,
|
|
15
|
-
* `aria-controls`) named after the menu; the items are `menuitem`s of a
|
|
16
|
-
* `menu`. Opening the list keeps focus on the FAB, now the close button; the
|
|
17
|
-
* arrow keys or Tab go into the list, Escape and Tab out come back to the FAB
|
|
18
|
-
* and close it.
|
|
19
|
-
*
|
|
20
|
-
* @param config - FAB menu configuration
|
|
21
|
-
* @returns A FAB menu component
|
|
22
|
-
* @category Components
|
|
23
|
-
* @see https://m3.material.io/components/fab-menu/overview
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const menu = createFabMenu({
|
|
28
|
-
* icon: editIcon,
|
|
29
|
-
* ariaLabel: 'Compose',
|
|
30
|
-
* items: [
|
|
31
|
-
* { id: 'reply', text: 'Reply', icon: replyIcon },
|
|
32
|
-
* { id: 'forward', text: 'Forward', icon: forwardIcon },
|
|
33
|
-
* ],
|
|
34
|
-
* });
|
|
35
|
-
* menu.on('select', ({ id }) => run(id));
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
2
|
declare const createFabMenu: (config: FabMenuConfig) => FabMenuComponent;
|
|
39
3
|
export default createFabMenu;
|
|
40
4
|
export { createFabMenu };
|