material 3.2.6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/config.js +3 -2
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +1 -35
- package/dist/components/extended-fab/types.d.ts +2 -654
- package/dist/components/fab/config.js +3 -2
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +1 -34
- package/dist/components/fab/types.d.ts +2 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -23
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +24 -18
- package/dist/elements/button.js +12 -0
- package/dist/elements/card.d.ts +12 -24
- package/dist/elements/card.js +3 -2
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/extended-fab.css +1 -1
- package/dist/elements/css/extended-fab.js +1 -1
- package/dist/elements/css/fab-menu.css +1 -1
- package/dist/elements/css/fab-menu.js +1 -1
- package/dist/elements/css/fab.css +1 -1
- package/dist/elements/css/fab.js +1 -1
- package/dist/elements/css/hosts/extended-fab.css +1 -1
- package/dist/elements/css/hosts/fab.css +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +10 -18
- package/dist/elements/extended-fab.js +3 -1
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +8 -17
- package/dist/elements/fab.js +3 -1
- package/dist/elements/floating-placement.js +1 -0
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +2 -2
- package/dist/elements/preupgrade/card.css +2 -2
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +2 -2
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +2 -2
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +1 -10
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +2 -2
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +2 -2
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/Button.svelte +5 -4
- package/dist/svelte/runtime.d.ts +8 -62
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/abstract/_floating-placement.scss +12 -0
- package/src/styles/components/_extended-fab.scss +34 -8
- package/src/styles/components/_fab-menu.scss +58 -8
- package/src/styles/components/_fab.scss +34 -8
- package/src/styles/elements/_button.scss +27 -5
- package/src/styles/elements/_card.scss +14 -0
- package/src/styles/elements/_extended-fab.scss +2 -0
- package/src/styles/elements/_fab.scss +2 -0
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,132 +1,59 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where the snackbar sits along the bottom edge
|
|
3
|
-
* @category Components
|
|
4
|
-
*/
|
|
5
1
|
export declare const SNACKBAR_POSITIONS: {
|
|
6
|
-
/** Centred (default) */
|
|
7
2
|
readonly CENTER: "center";
|
|
8
|
-
/** Against the leading edge */
|
|
9
3
|
readonly START: "start";
|
|
10
|
-
/** Against the trailing edge */
|
|
11
4
|
readonly END: "end";
|
|
12
5
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Duration presets (Compose Material 3 `SnackbarDuration`)
|
|
15
|
-
* @category Components
|
|
16
|
-
*/
|
|
17
6
|
export declare const SNACKBAR_DURATIONS: {
|
|
18
|
-
/** 4 seconds, the default without an action */
|
|
19
7
|
readonly SHORT: "short";
|
|
20
|
-
/** 10 seconds */
|
|
21
8
|
readonly LONG: "long";
|
|
22
|
-
/** Stays until acted on or dismissed, the default with an action */
|
|
23
9
|
readonly INDEFINITE: "indefinite";
|
|
24
10
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Milliseconds behind the presets; 0 means no auto-dismiss
|
|
27
|
-
* @category Components
|
|
28
|
-
*/
|
|
29
11
|
export declare const SNACKBAR_DURATION_MS: {
|
|
30
12
|
readonly short: 4000;
|
|
31
13
|
readonly long: 10000;
|
|
32
14
|
readonly indefinite: 0;
|
|
33
15
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Snackbar visibility states
|
|
36
|
-
* @category Components
|
|
37
|
-
*/
|
|
38
16
|
export declare const SNACKBAR_STATES: {
|
|
39
17
|
readonly VISIBLE: "visible";
|
|
40
18
|
readonly HIDDEN: "hidden";
|
|
41
19
|
};
|
|
42
|
-
/**
|
|
43
|
-
* Snackbar queue behaviors
|
|
44
|
-
*
|
|
45
|
-
* Controls how a newly shown snackbar interacts with the one currently on
|
|
46
|
-
* screen and any still waiting in the queue.
|
|
47
|
-
* @category Components
|
|
48
|
-
*/
|
|
49
20
|
export declare const SNACKBAR_QUEUE_BEHAVIORS: {
|
|
50
|
-
/** Wait in line: shown one at a time, in order (default) */
|
|
51
21
|
readonly QUEUE: "queue";
|
|
52
|
-
/** Replace: dismiss the current snackbar, drop any pending ones, and show
|
|
53
|
-
* this snackbar right away (last wins) */
|
|
54
22
|
readonly REPLACE: "replace";
|
|
55
23
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Snackbar event types
|
|
58
|
-
* @category Components
|
|
59
|
-
*/
|
|
60
24
|
export declare const SNACKBAR_EVENTS: {
|
|
61
|
-
/** The snackbar is on screen */
|
|
62
25
|
readonly OPEN: "open";
|
|
63
|
-
/** The snackbar is leaving; the event carries the reason */
|
|
64
26
|
readonly CLOSE: "close";
|
|
65
|
-
/** The action button was clicked */
|
|
66
27
|
readonly ACTION: "action";
|
|
67
|
-
/** Fired with `close`; the queue listens to it */
|
|
68
28
|
readonly DISMISS: "dismiss";
|
|
69
29
|
};
|
|
70
|
-
/**
|
|
71
|
-
* Why a snackbar closed
|
|
72
|
-
* @category Components
|
|
73
|
-
*/
|
|
74
30
|
export declare const SNACKBAR_CLOSE_REASONS: {
|
|
75
|
-
/** The duration ran out */
|
|
76
31
|
readonly TIMEOUT: "timeout";
|
|
77
|
-
/** The action was clicked */
|
|
78
32
|
readonly ACTION: "action";
|
|
79
|
-
/** The close icon was clicked */
|
|
80
33
|
readonly CLOSE_BUTTON: "close-button";
|
|
81
|
-
/** Escape was pressed while focus was inside */
|
|
82
34
|
readonly ESCAPE: "escape";
|
|
83
|
-
/** `hide()` was called */
|
|
84
35
|
readonly API: "api";
|
|
85
|
-
/** The queue replaced or cleared it */
|
|
86
36
|
readonly QUEUE: "queue";
|
|
87
37
|
};
|
|
88
|
-
/**
|
|
89
|
-
* Default configuration values for snackbar
|
|
90
|
-
* @category Components
|
|
91
|
-
*/
|
|
92
38
|
export declare const SNACKBAR_DEFAULTS: {
|
|
93
|
-
/** Default display position */
|
|
94
39
|
readonly POSITION: "center";
|
|
95
|
-
/** Default queue behavior */
|
|
96
40
|
readonly QUEUE_BEHAVIOR: "queue";
|
|
97
|
-
/** Delay in milliseconds between a dismissed snackbar and the next one */
|
|
98
41
|
readonly QUEUE_GAP: 200;
|
|
99
|
-
/** Accessible name of the close icon */
|
|
100
42
|
readonly CLOSE_LABEL: "Dismiss";
|
|
101
|
-
/** The longest of the exit transitions, after which the element is
|
|
102
|
-
* removed whether or not `transitionend` came */
|
|
103
43
|
readonly ANIMATION_DURATION: 425;
|
|
104
|
-
/** An action wider than this moves below the text
|
|
105
|
-
* (`design_snackbar_action_inline_max_width`) */
|
|
106
44
|
readonly ACTION_INLINE_MAX_WIDTH: 128;
|
|
107
45
|
};
|
|
108
|
-
/**
|
|
109
|
-
* CSS class names used by the snackbar component, without the prefix
|
|
110
|
-
* @category Components
|
|
111
|
-
*/
|
|
112
46
|
export declare const SNACKBAR_CLASSES: {
|
|
113
47
|
readonly ROOT: "snackbar";
|
|
114
48
|
readonly CENTER: "snackbar--center";
|
|
115
49
|
readonly START: "snackbar--start";
|
|
116
50
|
readonly END: "snackbar--end";
|
|
117
51
|
readonly VISIBLE: "snackbar--visible";
|
|
118
|
-
/** An action is present */
|
|
119
52
|
readonly WITH_ACTION: "snackbar--with-action";
|
|
120
|
-
/** A close icon is present */
|
|
121
53
|
readonly DISMISSIBLE: "snackbar--dismissible";
|
|
122
|
-
/** The action is too wide to sit beside the text */
|
|
123
54
|
readonly ACTION_BELOW: "snackbar--action-below";
|
|
124
55
|
readonly TEXT: "snackbar__text";
|
|
125
56
|
readonly ACTION: "snackbar__action";
|
|
126
57
|
readonly CLOSE: "snackbar__close";
|
|
127
58
|
};
|
|
128
|
-
/**
|
|
129
|
-
* The close icon (Material Symbols "close")
|
|
130
|
-
* @category Components
|
|
131
|
-
*/
|
|
132
59
|
export declare const SNACKBAR_CLOSE_ICON: string;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { SnackbarConfig, SnackbarComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new Snackbar component
|
|
4
|
-
* @param {SnackbarConfig} config - Snackbar configuration
|
|
5
|
-
* @returns {SnackbarComponent} Snackbar component instance
|
|
6
|
-
*/
|
|
7
2
|
declare const createSnackbar: (config: SnackbarConfig) => SnackbarComponent;
|
|
8
|
-
/**
|
|
9
|
-
* Dismisses the snackbar on screen and drops the ones still waiting.
|
|
10
|
-
*
|
|
11
|
-
* Messages belong to the thing that raised them: a drawer that closes, an
|
|
12
|
-
* account that signs out. Without this the queue outlives them, so a message
|
|
13
|
-
* about a list nobody is looking at any more stays on screen, and, because the
|
|
14
|
-
* queue shows one at a time, the next message waits behind it.
|
|
15
|
-
*/
|
|
16
3
|
export declare const clearSnackbars: () => void;
|
|
17
4
|
export default createSnackbar;
|
|
@@ -1,187 +1,64 @@
|
|
|
1
1
|
import type { EventCallback } from "../../core/state/emitter.js";
|
|
2
2
|
import type { ButtonComponent } from "../button/types.js";
|
|
3
3
|
import type { IconButtonComponent } from "../icon-button/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Where the snackbar sits along the bottom edge
|
|
6
|
-
*/
|
|
7
4
|
export type SnackbarPosition = 'center' | 'start' | 'end';
|
|
8
|
-
/**
|
|
9
|
-
* Duration presets: 4 s, 10 s, or until dismissed
|
|
10
|
-
*/
|
|
11
5
|
export type SnackbarDurationPreset = 'short' | 'long' | 'indefinite';
|
|
12
|
-
/**
|
|
13
|
-
* A preset or a number of milliseconds (0 for indefinite)
|
|
14
|
-
*/
|
|
15
6
|
export type SnackbarDuration = SnackbarDurationPreset | number;
|
|
16
|
-
/**
|
|
17
|
-
* Available snackbar queue behaviors
|
|
18
|
-
*/
|
|
19
7
|
export type SnackbarQueueBehavior = 'queue' | 'replace';
|
|
20
|
-
/**
|
|
21
|
-
* Snackbar visibility states
|
|
22
|
-
*/
|
|
23
8
|
export type SnackbarState = 'visible' | 'queued' | 'hidden';
|
|
24
|
-
/**
|
|
25
|
-
* Why a snackbar closed
|
|
26
|
-
*/
|
|
27
9
|
export type SnackbarCloseReason = 'timeout' | 'action' | 'close-button' | 'escape' | 'api' | 'queue';
|
|
28
|
-
/**
|
|
29
|
-
* Available snackbar event types
|
|
30
|
-
*/
|
|
31
10
|
export type SnackbarEventType = 'open' | 'close' | 'action' | 'dismiss';
|
|
32
|
-
/**
|
|
33
|
-
* Snackbar event data
|
|
34
|
-
* @interface SnackbarEvent
|
|
35
|
-
*/
|
|
36
11
|
export interface SnackbarEvent {
|
|
37
|
-
/** The snackbar component that triggered the event */
|
|
38
12
|
snackbar: SnackbarComponent;
|
|
39
|
-
/** Why the snackbar closed (`close` and `dismiss` events) */
|
|
40
13
|
reason?: SnackbarCloseReason;
|
|
41
|
-
/** Original DOM event if there was one */
|
|
42
14
|
originalEvent: Event | null;
|
|
43
15
|
}
|
|
44
|
-
/**
|
|
45
|
-
* What each snackbar event hands its handler.
|
|
46
|
-
*
|
|
47
|
-
* `on`/`off` are generic over these keys rather than taking a
|
|
48
|
-
* `SnackbarEventType` and one payload type for all four, so a handler is
|
|
49
|
-
* checked against the event it is registered for. The four payloads are the
|
|
50
|
-
* same shape today; the map is what makes them able to differ -- `reason` is
|
|
51
|
-
* only ever set on `close` and `dismiss`, and narrowing those two is now a
|
|
52
|
-
* local change rather than a new signature.
|
|
53
|
-
*
|
|
54
|
-
* @interface SnackbarEvents
|
|
55
|
-
*/
|
|
56
16
|
export interface SnackbarEvents {
|
|
57
|
-
/** The snackbar is on screen */
|
|
58
17
|
open: (event: SnackbarEvent) => void;
|
|
59
|
-
/** The snackbar is leaving; the event carries the reason */
|
|
60
18
|
close: (event: SnackbarEvent) => void;
|
|
61
|
-
/** The action button was clicked */
|
|
62
19
|
action: (event: SnackbarEvent) => void;
|
|
63
|
-
/** Fired with `close`; the queue listens to it */
|
|
64
20
|
dismiss: (event: SnackbarEvent) => void;
|
|
65
21
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Configuration options for the snackbar component
|
|
68
|
-
* @interface SnackbarConfig
|
|
69
|
-
*/
|
|
70
22
|
export interface SnackbarConfig {
|
|
71
|
-
/** Text message to display; up to two lines */
|
|
72
23
|
message: string;
|
|
73
|
-
/** Label of the single text-button action, if any */
|
|
74
24
|
action?: string;
|
|
75
|
-
/** Adds a close icon button */
|
|
76
25
|
dismissible?: boolean;
|
|
77
|
-
/** Accessible name of the close icon (default "Dismiss") */
|
|
78
26
|
closeLabel?: string;
|
|
79
|
-
/**
|
|
80
|
-
* How long the snackbar stays: `'short'` (4 s), `'long'` (10 s),
|
|
81
|
-
* `'indefinite'`, or milliseconds (0 for indefinite). Defaults to
|
|
82
|
-
* `'short'` without an action and `'indefinite'` with one: an actionable
|
|
83
|
-
* snackbar should not go away on its own.
|
|
84
|
-
*/
|
|
85
27
|
duration?: SnackbarDuration;
|
|
86
|
-
/** Position of the snackbar along the bottom edge */
|
|
87
28
|
position?: SnackbarPosition;
|
|
88
|
-
/**
|
|
89
|
-
* How this snackbar interacts with the queue when shown.
|
|
90
|
-
* - `'queue'` (default): wait in line and show one at a time, in order.
|
|
91
|
-
* - `'replace'`: immediately dismiss the current snackbar, drop any pending
|
|
92
|
-
* ones, and show this snackbar right away. Useful for rapid, repeated
|
|
93
|
-
* actions where only the latest message matters.
|
|
94
|
-
*/
|
|
95
29
|
queueBehavior?: SnackbarQueueBehavior;
|
|
96
|
-
/**
|
|
97
|
-
* `"top"` shows the snackbar in the browser's top layer as a
|
|
98
|
-
* `popover="manual"` element: above every z-index, modal dialogs included,
|
|
99
|
-
* at its usual place in viewport coordinates. It opens where its owner put
|
|
100
|
-
* it (an element's shadow root, with that root's styles), or on the body.
|
|
101
|
-
* While a modal `<dialog>` is open, the rest of the page is inert, so the
|
|
102
|
-
* snackbar opens inside that dialog and goes back when it closes.
|
|
103
|
-
*
|
|
104
|
-
* Where the browser has no popover support, the snackbar behaves as
|
|
105
|
-
* without it. Unset, the snackbar is appended to `document.body`.
|
|
106
|
-
*/
|
|
107
30
|
layer?: 'top';
|
|
108
|
-
/** Action button callback function */
|
|
109
31
|
onAction?: (event: SnackbarEvent) => void;
|
|
110
|
-
/** Callback function when the snackbar opens */
|
|
111
32
|
onOpen?: (event: SnackbarEvent) => void;
|
|
112
|
-
/** Callback function when the snackbar closes */
|
|
113
33
|
onClose?: (event: SnackbarEvent) => void;
|
|
114
|
-
/** Additional CSS classes */
|
|
115
34
|
class?: string;
|
|
116
|
-
/** Component prefix for CSS classes */
|
|
117
35
|
prefix?: string;
|
|
118
|
-
/** Component name for CSS classes */
|
|
119
36
|
componentName?: string;
|
|
120
|
-
/** Event handlers for snackbar events */
|
|
121
37
|
on?: {
|
|
122
38
|
[key in SnackbarEventType]?: (event: SnackbarEvent) => void;
|
|
123
39
|
};
|
|
124
40
|
}
|
|
125
|
-
/**
|
|
126
|
-
* Snackbar component public API interface
|
|
127
|
-
* @interface SnackbarComponent
|
|
128
|
-
*/
|
|
129
41
|
export interface SnackbarComponent {
|
|
130
|
-
/** The root element of the snackbar */
|
|
131
42
|
element: HTMLElement;
|
|
132
|
-
/**
|
|
133
|
-
* Current state of the snackbar: `queued` between `show()` and its turn on
|
|
134
|
-
* screen, behind another snackbar; `visible` while it is shown.
|
|
135
|
-
*/
|
|
136
43
|
state: SnackbarState;
|
|
137
|
-
/** The action button element (if present) */
|
|
138
44
|
actionButton?: HTMLElement;
|
|
139
|
-
/** The close icon button element (if present) */
|
|
140
45
|
closeButton?: HTMLElement;
|
|
141
|
-
/** Timer for auto-dismissal */
|
|
142
46
|
timer?: SnackbarTimer;
|
|
143
|
-
/**
|
|
144
|
-
* Displays the snackbar, through the queue. With nothing on screen, when it
|
|
145
|
-
* returns the state is `visible` and `open` has been emitted; behind another
|
|
146
|
-
* snackbar the state is `queued`, and `visible` and `open` come together at
|
|
147
|
-
* its turn. On a visible or queued snackbar it does nothing.
|
|
148
|
-
*/
|
|
149
47
|
show: () => SnackbarComponent;
|
|
150
|
-
/**
|
|
151
|
-
* Hides the snackbar. When it returns the state is `hidden` and `close` has
|
|
152
|
-
* been emitted; the element leaves the page after its transition. A queued
|
|
153
|
-
* snackbar gives up its turn and emits nothing, as it was never open. On a
|
|
154
|
-
* hidden snackbar it does nothing.
|
|
155
|
-
*/
|
|
156
48
|
hide: () => SnackbarComponent;
|
|
157
|
-
/** Whether the snackbar is on screen: true only while `state` is `visible` */
|
|
158
49
|
isOpen: () => boolean;
|
|
159
|
-
/** Sets the message text */
|
|
160
50
|
setMessage: (message: string) => SnackbarComponent;
|
|
161
|
-
/** Gets the message text */
|
|
162
51
|
getMessage: () => string;
|
|
163
|
-
/** Sets the action button text */
|
|
164
52
|
setAction: (text: string) => SnackbarComponent;
|
|
165
|
-
/** Gets the action button text */
|
|
166
53
|
getAction: () => string;
|
|
167
|
-
/** Sets the display duration: a preset or milliseconds (0 for indefinite) */
|
|
168
54
|
setDuration: (duration: SnackbarDuration) => SnackbarComponent;
|
|
169
|
-
/** Gets the display duration in milliseconds (0 for indefinite) */
|
|
170
55
|
getDuration: () => number;
|
|
171
|
-
/** Sets the snackbar position */
|
|
172
56
|
setPosition: (position: SnackbarPosition) => SnackbarComponent;
|
|
173
|
-
/** Gets the snackbar position */
|
|
174
57
|
getPosition: () => SnackbarPosition;
|
|
175
|
-
/** Adds event listener */
|
|
176
58
|
on: <K extends keyof SnackbarEvents>(event: K, handler: SnackbarEvents[K]) => SnackbarComponent;
|
|
177
|
-
/** Removes event listener */
|
|
178
59
|
off: <K extends keyof SnackbarEvents>(event: K, handler: SnackbarEvents[K]) => SnackbarComponent;
|
|
179
|
-
/** Destroys the snackbar component and cleans up resources */
|
|
180
60
|
destroy: () => void;
|
|
181
61
|
}
|
|
182
|
-
/**
|
|
183
|
-
* The component as it passes through the enhancers
|
|
184
|
-
*/
|
|
185
62
|
export interface BaseComponent {
|
|
186
63
|
element: HTMLElement;
|
|
187
64
|
emit?: (event: string, data?: unknown) => void;
|
|
@@ -205,56 +82,32 @@ export interface BaseComponent {
|
|
|
205
82
|
closeButton?: HTMLElement;
|
|
206
83
|
timer?: SnackbarTimer;
|
|
207
84
|
}
|
|
208
|
-
/**
|
|
209
|
-
* Timer interface for snackbar auto-dismissal
|
|
210
|
-
*/
|
|
211
85
|
export interface SnackbarTimer {
|
|
212
|
-
/** Starts the countdown from the full duration */
|
|
213
86
|
start: () => void;
|
|
214
|
-
/** Cancels the countdown */
|
|
215
87
|
stop: () => void;
|
|
216
|
-
/** Sets the auto-dismiss duration in milliseconds (0 for none) */
|
|
217
88
|
setDuration: (duration: number) => void;
|
|
218
|
-
/** Gets the current auto-dismiss duration in milliseconds */
|
|
219
89
|
getDuration: () => number;
|
|
220
90
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Interface for snackbars managed by the queue
|
|
223
|
-
*/
|
|
224
91
|
export interface QueuedSnackbar {
|
|
225
92
|
_show: () => void;
|
|
226
|
-
/** Visually dismisses the snackbar without advancing the queue */
|
|
227
93
|
_hide?: () => void;
|
|
228
|
-
/** The snackbar's own element, so the queue can tell whether it is still on screen */
|
|
229
94
|
element?: HTMLElement;
|
|
230
95
|
on: (event: string, handler: () => void) => void;
|
|
231
96
|
off: (event: string, handler: () => void) => void;
|
|
232
97
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Options controlling how a snackbar is added to the queue
|
|
235
|
-
*/
|
|
236
98
|
export interface SnackbarQueueAddOptions {
|
|
237
|
-
/** Behavior to apply when adding this snackbar (defaults to `'queue'`) */
|
|
238
99
|
behavior?: SnackbarQueueBehavior;
|
|
239
100
|
}
|
|
240
|
-
/**
|
|
241
|
-
* Interface for the snackbar queue manager
|
|
242
|
-
*/
|
|
243
101
|
export interface SnackbarQueue {
|
|
244
102
|
add: (snackbar: QueuedSnackbar, options?: SnackbarQueueAddOptions) => void;
|
|
245
103
|
clear: () => void;
|
|
246
|
-
/** Takes a snackbar out of the queue: a waiting one, or the one on screen when it is destroyed */
|
|
247
104
|
remove: (snackbar: QueuedSnackbar) => void;
|
|
248
105
|
getLength: () => number;
|
|
249
106
|
}
|
|
250
|
-
/**
|
|
251
|
-
* API options for enhancing a snackbar with API methods
|
|
252
|
-
*/
|
|
253
107
|
export interface ApiOptions {
|
|
254
108
|
lifecycle: {
|
|
255
109
|
destroy: () => void;
|
|
256
110
|
};
|
|
257
111
|
queue: SnackbarQueue;
|
|
258
|
-
/** The resolved configuration */
|
|
259
112
|
config: SnackbarConfig;
|
|
260
113
|
}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Visual styles, the same set the button offers
|
|
3
|
-
* @category Components
|
|
4
|
-
*/
|
|
5
1
|
export declare const SPLIT_BUTTON_VARIANTS: {
|
|
6
2
|
readonly FILLED: "filled";
|
|
7
3
|
readonly TONAL: "tonal";
|
|
8
4
|
readonly OUTLINED: "outlined";
|
|
9
5
|
readonly ELEVATED: "elevated";
|
|
10
6
|
};
|
|
11
|
-
/**
|
|
12
|
-
* Sizes, matching the button and icon button scale
|
|
13
|
-
* @category Components
|
|
14
|
-
*/
|
|
15
7
|
export declare const SPLIT_BUTTON_SIZES: {
|
|
16
8
|
readonly XS: "xs";
|
|
17
9
|
readonly S: "s";
|
|
@@ -19,38 +11,19 @@ export declare const SPLIT_BUTTON_SIZES: {
|
|
|
19
11
|
readonly L: "l";
|
|
20
12
|
readonly XL: "xl";
|
|
21
13
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Events the component emits
|
|
24
|
-
* @category Components
|
|
25
|
-
*/
|
|
26
14
|
export declare const SPLIT_BUTTON_EVENTS: {
|
|
27
|
-
/** The leading button was activated */
|
|
28
15
|
readonly CLICK: "click";
|
|
29
|
-
/** The trailing button opened whatever it opens */
|
|
30
16
|
readonly EXPAND: "expand";
|
|
31
|
-
/** The trailing button closed it */
|
|
32
17
|
readonly COLLAPSE: "collapse";
|
|
33
|
-
/** Either of the two, carrying the new state */
|
|
34
18
|
readonly CHANGE: "change";
|
|
35
|
-
/** A menu item was chosen, when the component owns a menu */
|
|
36
19
|
readonly SELECT: "select";
|
|
37
20
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Defaults
|
|
40
|
-
* @category Components
|
|
41
|
-
*/
|
|
42
21
|
export declare const SPLIT_BUTTON_DEFAULTS: {
|
|
43
22
|
readonly VARIANT: "filled";
|
|
44
23
|
readonly SIZE: "s";
|
|
45
|
-
/** Accessible name of the trailing button when none is given */
|
|
46
24
|
readonly TRAILING_LABEL: "More options";
|
|
47
|
-
/** How far the menu sits from the button (M3 split button guidelines) */
|
|
48
25
|
readonly MENU_OFFSET: 4;
|
|
49
26
|
};
|
|
50
|
-
/**
|
|
51
|
-
* CSS class names, without the prefix
|
|
52
|
-
* @category Components
|
|
53
|
-
*/
|
|
54
27
|
export declare const SPLIT_BUTTON_CLASSES: {
|
|
55
28
|
readonly ROOT: "split-button";
|
|
56
29
|
readonly LEADING: "split-button__leading";
|
|
@@ -58,10 +31,4 @@ export declare const SPLIT_BUTTON_CLASSES: {
|
|
|
58
31
|
readonly CHEVRON: "split-button__chevron";
|
|
59
32
|
readonly EXPANDED: "split-button--expanded";
|
|
60
33
|
};
|
|
61
|
-
/**
|
|
62
|
-
* The trailing button's icon. It always points down and turns 180 degrees
|
|
63
|
-
* when the button is activated, so it should not be swapped out
|
|
64
|
-
* (M3 split button guidelines, "Anatomy").
|
|
65
|
-
* @category Components
|
|
66
|
-
*/
|
|
67
34
|
export declare const SPLIT_BUTTON_CHEVRON: string;
|
|
@@ -1,24 +1,3 @@
|
|
|
1
1
|
import { SplitButtonConfig, SplitButtonComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a split button: one action beside a button that opens more choices.
|
|
4
|
-
*
|
|
5
|
-
* @param {SplitButtonConfig} config - Split button configuration
|
|
6
|
-
* @returns {SplitButtonComponent} Split button component instance
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const button = createSplitButton({
|
|
11
|
-
* text: 'Watch later',
|
|
12
|
-
* icon: watchIcon,
|
|
13
|
-
* trailingLabel: 'More watch options',
|
|
14
|
-
* items: [
|
|
15
|
-
* { id: 'queue', text: 'Add to queue' },
|
|
16
|
-
* { id: 'playlist', text: 'Save to playlist' }
|
|
17
|
-
* ],
|
|
18
|
-
* onClick: () => watchLater(),
|
|
19
|
-
* onSelect: ({ item }) => choose(item.id)
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
2
|
declare const createSplitButton: (config?: SplitButtonConfig) => SplitButtonComponent;
|
|
24
3
|
export default createSplitButton;
|
|
@@ -1,143 +1,62 @@
|
|
|
1
1
|
import type { MenuContent } from "../menu/types.js";
|
|
2
2
|
import type { MenuOwner } from "../menu/inner.js";
|
|
3
3
|
import type { ButtonComponent } from "../button/types.js";
|
|
4
|
-
/** Visual style, the same set the button offers */
|
|
5
4
|
export type SplitButtonVariant = "filled" | "tonal" | "outlined" | "elevated";
|
|
6
|
-
/** Size, matching the button and icon button scale */
|
|
7
5
|
export type SplitButtonSize = "xs" | "s" | "m" | "l" | "xl";
|
|
8
|
-
/** Events the component emits */
|
|
9
6
|
export type SplitButtonEventType = "click" | "expand" | "collapse" | "change" | "select";
|
|
10
|
-
/** What an event handler receives */
|
|
11
7
|
export interface SplitButtonEvent {
|
|
12
|
-
/** The component that emitted it */
|
|
13
8
|
splitButton: SplitButtonComponent;
|
|
14
|
-
/** Whether the trailing button is showing its menu */
|
|
15
9
|
expanded: boolean;
|
|
16
|
-
/** The DOM event behind it, when there was one */
|
|
17
10
|
originalEvent: Event | null;
|
|
18
|
-
/** The chosen item, on a `select` event */
|
|
19
11
|
item?: MenuContent;
|
|
20
|
-
/** The chosen item's `id`, on a `select` event: the `value` of the `<m-split-button>` element's `select` */
|
|
21
12
|
value?: string | null;
|
|
22
13
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Configuration for the split button
|
|
25
|
-
* @interface SplitButtonConfig
|
|
26
|
-
*/
|
|
27
14
|
export interface SplitButtonConfig {
|
|
28
|
-
/** Label of the leading button */
|
|
29
15
|
text?: string;
|
|
30
|
-
/**
|
|
31
|
-
* `"top"` renders the menu next to the trailing button, in its tree (a
|
|
32
|
-
* shadow root included), and shows it in the browser's top layer. See the
|
|
33
|
-
* menu's `layer`.
|
|
34
|
-
*/
|
|
35
16
|
layer?: "top";
|
|
36
|
-
/** Icon of the leading button. Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
37
17
|
icon?: string;
|
|
38
|
-
/** Visual style, shared by both buttons */
|
|
39
18
|
variant?: SplitButtonVariant;
|
|
40
|
-
/** Size of both buttons */
|
|
41
19
|
size?: SplitButtonSize;
|
|
42
|
-
/** Whether both buttons are disabled */
|
|
43
20
|
disabled?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Accessible name of the trailing button. It should say that more choices
|
|
46
|
-
* are available and how they relate to the leading action, such as
|
|
47
|
-
* "More watch options" beside a "Watch later" button (M3 split button
|
|
48
|
-
* accessibility).
|
|
49
|
-
* @default 'More options'
|
|
50
|
-
*/
|
|
51
21
|
trailingLabel?: string;
|
|
52
|
-
/** Accessible name of the leading button, when its label is not enough */
|
|
53
22
|
ariaLabel?: string;
|
|
54
|
-
/** Accessible name of the whole group */
|
|
55
23
|
groupLabel?: string;
|
|
56
|
-
/** What the leading button does */
|
|
57
24
|
onClick?: (event: SplitButtonEvent) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Menu items for the trailing button to open. Without them the component
|
|
60
|
-
* only reports that the trailing button was activated, and the caller
|
|
61
|
-
* shows whatever it likes.
|
|
62
|
-
*/
|
|
63
25
|
items?: MenuContent[];
|
|
64
|
-
/** Called with the chosen item when the component owns the menu */
|
|
65
26
|
onSelect?: (event: SplitButtonEvent) => void;
|
|
66
|
-
/** Additional CSS classes */
|
|
67
27
|
class?: string;
|
|
68
|
-
/** Component prefix for CSS class names */
|
|
69
28
|
prefix?: string;
|
|
70
|
-
/** Component name for CSS class names */
|
|
71
29
|
componentName?: string;
|
|
72
|
-
/** Event handlers */
|
|
73
30
|
on?: {
|
|
74
31
|
[key in SplitButtonEventType]?: (event: SplitButtonEvent) => void;
|
|
75
32
|
};
|
|
76
33
|
}
|
|
77
|
-
/**
|
|
78
|
-
* The split button's public API
|
|
79
|
-
* @interface SplitButtonComponent
|
|
80
|
-
*/
|
|
81
34
|
export interface SplitButtonComponent {
|
|
82
|
-
/** The element holding both buttons */
|
|
83
35
|
element: HTMLElement;
|
|
84
|
-
/** The leading button's element */
|
|
85
36
|
leadingElement: HTMLButtonElement;
|
|
86
|
-
/** The trailing button's element */
|
|
87
37
|
trailingElement: HTMLButtonElement;
|
|
88
|
-
/** Sets the leading button's label */
|
|
89
38
|
setText: (text: string) => SplitButtonComponent;
|
|
90
|
-
/** The leading button's label */
|
|
91
39
|
getText: () => string;
|
|
92
|
-
/** Sets the leading button's icon */
|
|
93
40
|
setIcon: (icon: string) => SplitButtonComponent;
|
|
94
|
-
/**
|
|
95
|
-
* Replaces the menu's items. A split button created without `items` has no
|
|
96
|
-
* menu: the first non-empty list creates it, and opens it if the split
|
|
97
|
-
* button is expanded. An empty list empties the menu and keeps it.
|
|
98
|
-
*/
|
|
99
41
|
setItems: (items: MenuContent[]) => SplitButtonComponent;
|
|
100
|
-
/** The menu's items; empty while the split button has no menu */
|
|
101
42
|
getItems: () => MenuContent[];
|
|
102
|
-
/**
|
|
103
|
-
* Opens whatever the trailing button opens. When it returns, `isExpanded()`
|
|
104
|
-
* is true and `expand` and `change` have been emitted; the surface may be
|
|
105
|
-
* painted after `expand()` returns.
|
|
106
|
-
*/
|
|
107
43
|
expand: () => SplitButtonComponent;
|
|
108
|
-
/**
|
|
109
|
-
* Closes it. When it returns, `isExpanded()` is false and `collapse` and
|
|
110
|
-
* `change` have been emitted. The same holds when the user dismisses the
|
|
111
|
-
* menu (Escape, a click outside, an item chosen): both are emitted in that
|
|
112
|
-
* event, with the menu's `close`. `collapse()` then `expand()` at once
|
|
113
|
-
* ends expanded.
|
|
114
|
-
*/
|
|
115
44
|
collapse: () => SplitButtonComponent;
|
|
116
|
-
/** Whether it is open */
|
|
117
45
|
isExpanded: () => boolean;
|
|
118
|
-
/** Disables both buttons */
|
|
119
46
|
disable: () => SplitButtonComponent;
|
|
120
|
-
/** Enables both buttons */
|
|
121
47
|
enable: () => SplitButtonComponent;
|
|
122
|
-
/** Whether both buttons are disabled */
|
|
123
48
|
isDisabled: () => boolean;
|
|
124
|
-
/** Adds an event listener */
|
|
125
49
|
on: (event: SplitButtonEventType, handler: (event: SplitButtonEvent) => void) => SplitButtonComponent;
|
|
126
|
-
/** Removes an event listener */
|
|
127
50
|
off: (event: SplitButtonEventType, handler: (event: SplitButtonEvent) => void) => SplitButtonComponent;
|
|
128
|
-
/** Takes the component off the page and releases what it holds */
|
|
129
51
|
destroy: () => void;
|
|
130
52
|
}
|
|
131
|
-
/** What withButtons adds */
|
|
132
53
|
export interface ButtonsFeature {
|
|
133
54
|
leading: ButtonComponent;
|
|
134
55
|
trailing: ButtonComponent;
|
|
135
56
|
leadingElement: HTMLElement;
|
|
136
57
|
trailingElement: HTMLElement;
|
|
137
58
|
}
|
|
138
|
-
/** What withMenu adds: the menu, when the component was given items */
|
|
139
59
|
export type MenuFeature = MenuOwner;
|
|
140
|
-
/** The component as it passes through the enhancers */
|
|
141
60
|
export interface BaseComponent extends ButtonsFeature, MenuFeature {
|
|
142
61
|
element: HTMLElement;
|
|
143
62
|
emit?: (event: string, data?: unknown) => void;
|