material 3.7.3 → 3.8.1
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/NOTICE +223 -0
- package/README.md +6 -4
- package/dist/components/badge/badge.d.ts +4 -0
- package/dist/components/badge/constants.d.ts +4 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/types.d.ts +102 -0
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +4 -0
- package/dist/components/bottom-app-bar/constants.d.ts +3 -0
- package/dist/components/bottom-app-bar/types.d.ts +42 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
- package/dist/components/bottom-sheet/constants.d.ts +9 -0
- package/dist/components/bottom-sheet/types.d.ts +52 -0
- package/dist/components/button/button.d.ts +4 -0
- package/dist/components/button/constants.d.ts +20 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/types.d.ts +190 -0
- package/dist/components/button-group/button-group.d.ts +4 -0
- package/dist/components/button-group/constants.d.ts +54 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/button-group/types.d.ts +125 -0
- package/dist/components/card/card.d.ts +4 -0
- package/dist/components/card/constants.d.ts +11 -0
- package/dist/components/card/content.d.ts +16 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/types.d.ts +123 -0
- package/dist/components/carousel/carousel.d.ts +1 -0
- package/dist/components/carousel/constants.d.ts +10 -0
- package/dist/components/carousel/types.d.ts +16 -0
- package/dist/components/checkbox/checkbox.d.ts +5 -0
- package/dist/components/checkbox/constants.d.ts +13 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/types.d.ts +94 -0
- package/dist/components/chips/chips.d.ts +4 -0
- package/dist/components/chips/constants.d.ts +1 -0
- package/dist/components/chips/factories.d.ts +4 -0
- package/dist/components/chips/types.d.ts +140 -0
- package/dist/components/datepicker/constants.d.ts +38 -0
- package/dist/components/datepicker/datepicker.d.ts +2 -0
- package/dist/components/datepicker/types.d.ts +139 -0
- package/dist/components/dialog/constants.d.ts +45 -0
- package/dist/components/dialog/dialog.d.ts +5 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dialog/types.d.ts +196 -0
- package/dist/components/divider/config.d.ts +30 -0
- package/dist/components/divider/constants.d.ts +15 -0
- package/dist/components/divider/divider.d.ts +4 -0
- package/dist/components/divider/types.d.ts +27 -0
- package/dist/components/drawer/constants.d.ts +39 -0
- package/dist/components/drawer/drawer.d.ts +4 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/types.d.ts +109 -0
- package/dist/components/extended-fab/constants.d.ts +32 -0
- package/dist/components/extended-fab/extended-fab.d.ts +4 -0
- package/dist/components/extended-fab/types.d.ts +126 -0
- package/dist/components/fab/constants.d.ts +26 -0
- package/dist/components/fab/fab.d.ts +4 -0
- package/dist/components/fab/types.d.ts +103 -0
- package/dist/components/fab-menu/constants.d.ts +9 -0
- package/dist/components/fab-menu/fab-menu.d.ts +4 -0
- package/dist/components/fab-menu/types.d.ts +41 -0
- package/dist/components/icon-button/constants.d.ts +34 -0
- package/dist/components/icon-button/icon-button.d.ts +4 -0
- package/dist/components/icon-button/types.d.ts +157 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list/constants.d.ts +30 -0
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/list.d.ts +4 -0
- package/dist/components/list/types.d.ts +110 -0
- package/dist/components/loading-indicator/constants.d.ts +16 -0
- package/dist/components/loading-indicator/features/renderer.d.ts +13 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +4 -0
- package/dist/components/loading-indicator/types.d.ts +21 -0
- package/dist/components/menu/constants.d.ts +51 -0
- package/dist/components/menu/features/controller.js +1 -1
- package/dist/components/menu/features/keyboard.js +8 -3
- package/dist/components/menu/features/opener.js +2 -16
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/inner.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +4 -0
- package/dist/components/menu/on-demand.d.ts +9 -0
- package/dist/components/menu/types.d.ts +185 -1
- package/dist/components/navigation-bar/navigation-bar.d.ts +1 -0
- package/dist/components/navigation-bar/types.d.ts +12 -0
- package/dist/components/navigation-rail/constants.d.ts +2 -0
- package/dist/components/navigation-rail/navigation-rail.d.ts +1 -0
- package/dist/components/navigation-rail/types.d.ts +18 -0
- package/dist/components/progress/constants.d.ts +37 -0
- package/dist/components/progress/progress.d.ts +4 -0
- package/dist/components/progress/types.d.ts +136 -0
- package/dist/components/radios/constants.d.ts +14 -0
- package/dist/components/radios/radios.d.ts +4 -0
- package/dist/components/radios/types.d.ts +89 -0
- package/dist/components/search/constants.d.ts +34 -0
- package/dist/components/search/search.d.ts +4 -0
- package/dist/components/search/types.d.ts +109 -0
- package/dist/components/select/constants.d.ts +46 -0
- package/dist/components/select/features.js +9 -1
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.d.ts +4 -0
- package/dist/components/select/types.d.ts +95 -0
- package/dist/components/side-sheet/constants.d.ts +9 -0
- package/dist/components/side-sheet/side-sheet.d.ts +4 -0
- package/dist/components/side-sheet/types.d.ts +51 -0
- package/dist/components/slider/constants.d.ts +62 -0
- package/dist/components/slider/slider.d.ts +4 -0
- package/dist/components/slider/types.d.ts +78 -0
- package/dist/components/snackbar/constants.d.ts +37 -0
- package/dist/components/snackbar/snackbar.d.ts +5 -0
- package/dist/components/snackbar/types.d.ts +67 -0
- package/dist/components/split-button/api.js +13 -3
- package/dist/components/split-button/constants.d.ts +13 -0
- package/dist/components/split-button/split-button.d.ts +4 -0
- package/dist/components/split-button/types.d.ts +50 -0
- package/dist/components/switch/constants.d.ts +34 -0
- package/dist/components/switch/switch.d.ts +4 -0
- package/dist/components/switch/types.d.ts +55 -0
- package/dist/components/tabs/constants.d.ts +49 -0
- package/dist/components/tabs/indicator.d.ts +22 -0
- package/dist/components/tabs/responsive.d.ts +17 -0
- package/dist/components/tabs/tab.d.ts +5 -0
- package/dist/components/tabs/tabs.d.ts +4 -0
- package/dist/components/tabs/types.d.ts +170 -0
- package/dist/components/tabs/utils.d.ts +24 -0
- package/dist/components/text-field/constants.d.ts +61 -0
- package/dist/components/text-field/features/trailing-icon.d.ts +25 -0
- package/dist/components/text-field/text-field.d.ts +4 -0
- package/dist/components/text-field/types.d.ts +84 -0
- package/dist/components/timepicker/constants.d.ts +61 -0
- package/dist/components/timepicker/types.d.ts +145 -0
- package/dist/components/toolbar/constants.d.ts +8 -0
- package/dist/components/toolbar/toolbar.d.ts +4 -0
- package/dist/components/toolbar/types.d.ts +75 -0
- package/dist/components/tooltip/constants.d.ts +43 -0
- package/dist/components/tooltip/tooltip.d.ts +4 -0
- package/dist/components/tooltip/types.d.ts +78 -0
- package/dist/components/top-app-bar/constants.d.ts +29 -0
- package/dist/components/top-app-bar/top-app-bar.d.ts +4 -0
- package/dist/components/top-app-bar/types.d.ts +55 -0
- package/dist/core/canvas/animation.d.ts +6 -0
- package/dist/core/canvas/drawing.d.ts +47 -0
- package/dist/core/canvas/index.d.ts +1 -0
- package/dist/core/canvas/resize.d.ts +7 -0
- package/dist/core/canvas/utils.d.ts +39 -0
- package/dist/core/compose/base.d.ts +9 -0
- package/dist/core/compose/cleanup.d.ts +2 -0
- package/dist/core/compose/component.d.ts +13 -0
- package/dist/core/compose/features/badge.d.ts +10 -0
- package/dist/core/compose/features/checkable.d.ts +13 -0
- package/dist/core/compose/features/debounce.d.ts +19 -0
- package/dist/core/compose/features/disabled.d.ts +11 -0
- package/dist/core/compose/features/events.d.ts +19 -0
- package/dist/core/compose/features/icon.d.ts +20 -0
- package/dist/core/compose/features/input.d.ts +31 -0
- package/dist/core/compose/features/lifecycle.d.ts +16 -0
- package/dist/core/compose/features/position.d.ts +13 -0
- package/dist/core/compose/features/ripple.d.ts +17 -0
- package/dist/core/compose/features/size.d.ts +5 -0
- package/dist/core/compose/features/style.d.ts +5 -0
- package/dist/core/compose/features/text.d.ts +20 -0
- package/dist/core/compose/features/textinput.d.ts +39 -0
- package/dist/core/compose/features/textlabel.d.ts +18 -0
- package/dist/core/compose/features/throttle.d.ts +18 -0
- package/dist/core/compose/features/track.d.ts +12 -0
- package/dist/core/compose/features/variant.d.ts +5 -0
- package/dist/core/compose/features/withEvents.d.ts +12 -0
- package/dist/core/compose/pipe.d.ts +12 -0
- package/dist/core/compose/utils/type-guards.d.ts +5 -0
- package/dist/core/config/component.d.ts +17 -0
- package/dist/core/config/global.d.ts +15 -0
- package/dist/core/config.d.ts +34 -0
- package/dist/core/dom/attributes.d.ts +25 -0
- package/dist/core/dom/classes.d.ts +24 -0
- package/dist/core/dom/create.d.ts +47 -0
- package/dist/core/dom/events.d.ts +26 -0
- package/dist/core/dom/focus.d.ts +11 -0
- package/dist/core/dom/html.d.ts +6 -0
- package/dist/core/dom/layer.d.ts +36 -0
- package/dist/core/dom/roving.d.ts +7 -0
- package/dist/core/navigation/destinations.d.ts +10 -0
- package/dist/core/shapes/cubic.d.ts +8 -0
- package/dist/core/shapes/material.d.ts +45 -0
- package/dist/core/shapes/polygon.d.ts +11 -0
- package/dist/core/state/emitter.d.ts +19 -0
- package/dist/core/state/events.d.ts +17 -0
- package/dist/core/state/store.d.ts +40 -0
- package/dist/core/theme/shape.d.ts +3 -0
- package/dist/core/theme/tokens.d.ts +6 -0
- package/dist/core/utils/background.d.ts +7 -0
- package/dist/core/utils/color.d.ts +5 -0
- package/dist/core/utils/index.d.ts +9 -0
- package/dist/core/utils/mobile.d.ts +10 -0
- package/dist/core/utils/object.d.ts +9 -0
- package/dist/core/utils/performance.d.ts +20 -0
- package/dist/core/utils/theme.d.ts +8 -0
- package/dist/core/utils/url.d.ts +3 -0
- package/dist/elements/adapter.d.ts +24 -0
- package/dist/elements/badge.d.ts +4 -0
- package/dist/elements/bottom-app-bar.d.ts +4 -0
- package/dist/elements/bottom-sheet.d.ts +6 -0
- package/dist/elements/button-group.d.ts +8 -0
- package/dist/elements/button.d.ts +5 -0
- package/dist/elements/card.d.ts +4 -0
- package/dist/elements/carousel.d.ts +5 -0
- package/dist/elements/checkbox.d.ts +4 -0
- package/dist/elements/chips.d.ts +9 -0
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/menu.js +1 -1
- package/dist/elements/datepicker.d.ts +6 -0
- package/dist/elements/define.d.ts +48 -0
- package/dist/elements/dialog.d.ts +5 -0
- package/dist/elements/divider.d.ts +4 -0
- package/dist/elements/drawer.d.ts +6 -0
- package/dist/elements/extended-fab.d.ts +6 -0
- package/dist/elements/fab-menu.d.ts +10 -0
- package/dist/elements/fab.d.ts +6 -0
- package/dist/elements/icon-button.d.ts +6 -0
- package/dist/elements/index.d.ts +4 -0
- package/dist/elements/list.d.ts +8 -0
- package/dist/elements/loading-indicator.d.ts +4 -0
- package/dist/elements/menu.d.ts +12 -0
- package/dist/elements/navigation-bar.d.ts +6 -0
- package/dist/elements/navigation-rail.d.ts +10 -0
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/progress.d.ts +4 -0
- package/dist/elements/radios.d.ts +5 -0
- package/dist/elements/search.d.ts +15 -0
- package/dist/elements/select.d.ts +6 -0
- package/dist/elements/side-sheet.d.ts +5 -0
- package/dist/elements/slider.d.ts +7 -0
- package/dist/elements/snackbar.d.ts +4 -0
- package/dist/elements/split-button.d.ts +8 -0
- package/dist/elements/styles.d.ts +11 -0
- package/dist/elements/switch.d.ts +5 -0
- package/dist/elements/tabs.d.ts +6 -0
- package/dist/elements/text-field.d.ts +9 -0
- package/dist/elements/timepicker.d.ts +9 -0
- package/dist/elements/toolbar.d.ts +4 -0
- package/dist/elements/tooltip.d.ts +4 -0
- package/dist/elements/top-app-bar.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/react/create.d.ts +15 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/jsx.d.ts +3 -0
- package/dist/solid/create.d.ts +16 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/jsx.d.ts +4 -0
- package/dist/ssr/index.d.ts +3 -0
- package/dist/ssr/solid.d.ts +1 -0
- package/dist/ssr/svelte.d.ts +1 -0
- package/dist/ssr/vue.d.ts +1 -0
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +2 -2
- package/dist/styles/base.css +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/runtime.d.ts +21 -0
- package/dist/theme/image.d.ts +4 -0
- package/dist/theme/image.js +5 -0
- package/dist/theme/index.d.ts +43 -0
- package/dist/theme/index.js +32 -0
- package/dist/theme/roles.js +68 -0
- package/dist/theme/variants.d.ts +15 -0
- package/dist/theme/variants.js +17 -0
- package/dist/theme/vendor/contrast/contrast.js +72 -0
- package/dist/theme/vendor/dislike/dislike_analyzer.js +31 -0
- package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +64 -0
- package/dist/theme/vendor/dynamiccolor/color_spec_2021.js +663 -0
- package/dist/theme/vendor/dynamiccolor/contrast_curve.js +42 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +63 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_color.js +264 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +100 -0
- package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +418 -0
- package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +125 -0
- package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.js +311 -0
- package/dist/theme/vendor/dynamiccolor/tone_delta_pair.js +27 -0
- package/dist/theme/vendor/dynamiccolor/variant.js +28 -0
- package/dist/theme/vendor/hct/cam16.js +249 -0
- package/dist/theme/vendor/hct/hct.d.ts +32 -0
- package/dist/theme/vendor/hct/hct.js +86 -0
- package/dist/theme/vendor/hct/hct_solver.js +390 -0
- package/dist/theme/vendor/hct/viewing_conditions.js +73 -0
- package/dist/theme/vendor/palettes/tonal_palette.js +114 -0
- package/dist/theme/vendor/quantize/lab_point_provider.js +31 -0
- package/dist/theme/vendor/quantize/quantizer_celebi.js +25 -0
- package/dist/theme/vendor/quantize/quantizer_map.js +31 -0
- package/dist/theme/vendor/quantize/quantizer_wsmeans.js +178 -0
- package/dist/theme/vendor/quantize/quantizer_wu.js +342 -0
- package/dist/theme/vendor/scheme/scheme_content.js +30 -0
- package/dist/theme/vendor/scheme/scheme_expressive.js +30 -0
- package/dist/theme/vendor/scheme/scheme_fidelity.js +30 -0
- package/dist/theme/vendor/scheme/scheme_monochrome.js +30 -0
- package/dist/theme/vendor/scheme/scheme_neutral.js +30 -0
- package/dist/theme/vendor/scheme/scheme_tonal_spot.js +30 -0
- package/dist/theme/vendor/scheme/scheme_vibrant.js +30 -0
- package/dist/theme/vendor/score/score.js +100 -0
- package/dist/theme/vendor/temperature/temperature_cache.js +198 -0
- package/dist/theme/vendor/utils/color_utils.js +173 -0
- package/dist/theme/vendor/utils/image_utils.js +72 -0
- package/dist/theme/vendor/utils/math_utils.js +75 -0
- package/dist/theme/vendor/utils/string_utils.js +61 -0
- package/dist/themes/autumn-contrast.css +2 -2
- package/dist/themes/autumn.css +2 -2
- package/dist/themes/baseline-contrast.css +2 -2
- package/dist/themes/baseline.css +2 -2
- package/dist/themes/brownbeige-contrast.css +2 -2
- package/dist/themes/brownbeige.css +2 -2
- package/dist/themes/content-contrast.css +2 -2
- package/dist/themes/content.css +2 -2
- package/dist/themes/desert-contrast.css +2 -2
- package/dist/themes/desert.css +2 -2
- package/dist/themes/expressive-contrast.css +2 -2
- package/dist/themes/expressive.css +2 -2
- package/dist/themes/fidelity-contrast.css +2 -2
- package/dist/themes/fidelity.css +2 -2
- package/dist/themes/forest-contrast.css +2 -2
- package/dist/themes/forest.css +2 -2
- package/dist/themes/fruit-salad-contrast.css +2 -2
- package/dist/themes/fruit-salad.css +2 -2
- package/dist/themes/highcontrast-contrast.css +2 -2
- package/dist/themes/highcontrast.css +2 -2
- package/dist/themes/monochrome-contrast.css +2 -2
- package/dist/themes/monochrome.css +2 -2
- package/dist/themes/neutral-contrast.css +2 -2
- package/dist/themes/neutral.css +2 -2
- package/dist/themes/ocean-contrast.css +2 -2
- package/dist/themes/ocean.css +2 -2
- package/dist/themes/rainbow-contrast.css +2 -2
- package/dist/themes/rainbow.css +2 -2
- package/dist/themes/sageivory-contrast.css +2 -2
- package/dist/themes/sageivory.css +2 -2
- package/dist/themes/spring-contrast.css +2 -2
- package/dist/themes/spring.css +2 -2
- package/dist/themes/summer-contrast.css +2 -2
- package/dist/themes/summer.css +2 -2
- package/dist/themes/sunset-contrast.css +2 -2
- package/dist/themes/sunset.css +2 -2
- package/dist/themes/tealcaramel-contrast.css +2 -2
- package/dist/themes/tealcaramel.css +2 -2
- package/dist/themes/vibrant-contrast.css +2 -2
- package/dist/themes/vibrant.css +2 -2
- package/dist/vue/create.d.ts +18 -0
- package/dist/vue/index.d.ts +1 -0
- package/package.json +14 -1
- package/src/styles/components/_menu.scss +14 -1
- package/src/styles/themes/_autumn.scss +20 -2
- package/src/styles/themes/_base-theme.scss +34 -24
- package/src/styles/themes/_baseline.scss +18 -0
- package/src/styles/themes/_brownbeige.scss +30 -2
- package/src/styles/themes/_content.scss +30 -2
- package/src/styles/themes/_desert.scss +30 -2
- package/src/styles/themes/_expressive.scss +30 -2
- package/src/styles/themes/_fidelity.scss +30 -2
- package/src/styles/themes/_forest.scss +20 -2
- package/src/styles/themes/_fruit-salad.scss +30 -2
- package/src/styles/themes/_highcontrast.scss +21 -2
- package/src/styles/themes/_monochrome.scss +30 -2
- package/src/styles/themes/_neutral.scss +30 -2
- package/src/styles/themes/_ocean.scss +20 -2
- package/src/styles/themes/_rainbow.scss +30 -2
- package/src/styles/themes/_sageivory.scss +30 -2
- package/src/styles/themes/_spring.scss +20 -2
- package/src/styles/themes/_summer.scss +30 -2
- package/src/styles/themes/_sunset.scss +20 -2
- package/src/styles/themes/_tealcaramel.scss +30 -2
- package/src/styles/themes/_vibrant.scss +30 -2
|
@@ -1,38 +1,89 @@
|
|
|
1
1
|
import { SIDE_SHEET_VARIANTS, SIDE_SHEET_POSITIONS } from "./constants.js";
|
|
2
|
+
/** Docked or floating over a scrim */
|
|
2
3
|
export type SideSheetVariant = (typeof SIDE_SHEET_VARIANTS)[keyof typeof SIDE_SHEET_VARIANTS];
|
|
4
|
+
/** Which edge it docks to, in logical terms */
|
|
3
5
|
export type SideSheetPosition = (typeof SIDE_SHEET_POSITIONS)[keyof typeof SIDE_SHEET_POSITIONS];
|
|
6
|
+
/** Handlers accepted at creation, one per event name */
|
|
4
7
|
export interface SideSheetEventHandlers {
|
|
5
8
|
open?: () => void;
|
|
6
9
|
close?: () => void;
|
|
7
10
|
}
|
|
11
|
+
/** Configuration for the side sheet. */
|
|
8
12
|
export interface SideSheetConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Standard sheets dock beside the page and leave it usable; modal sheets float over it behind a scrim and take focus.
|
|
15
|
+
* @default 'modal'
|
|
16
|
+
*/
|
|
9
17
|
variant?: SideSheetVariant;
|
|
18
|
+
/**
|
|
19
|
+
* Which edge to dock to.
|
|
20
|
+
* @default 'end'
|
|
21
|
+
*/
|
|
10
22
|
position?: SideSheetPosition;
|
|
23
|
+
/** Headline in the header. */
|
|
11
24
|
title?: string;
|
|
25
|
+
/** Body of the sheet, as markup or an element */
|
|
12
26
|
content?: string | HTMLElement;
|
|
27
|
+
/**
|
|
28
|
+
* Width in pixels.
|
|
29
|
+
* @default 256
|
|
30
|
+
*/
|
|
13
31
|
width?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The sheet never grows past this, so it does not take over a wide window.
|
|
34
|
+
* @default 400
|
|
35
|
+
*/
|
|
14
36
|
maxWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the header carries a close button.
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
15
41
|
closeButton?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether a click on the scrim closes a modal sheet.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
16
46
|
closeOnScrimClick?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether Escape closes it.
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
17
51
|
closeOnEscape?: boolean;
|
|
52
|
+
/** Whether the sheet starts open */
|
|
18
53
|
open?: boolean;
|
|
54
|
+
/** Where to mount the sheet. */
|
|
19
55
|
container?: HTMLElement;
|
|
56
|
+
/** `"top"` makes a modal sheet's root a `<dialog>` element, rendered in `container` like any sheet, and opens it with `showModal()`: in the browser's top layer, above every z-index and outside any clipping ancestor, with the rest of the page inert. */
|
|
20
57
|
layer?: "top";
|
|
58
|
+
/** Handlers registered at creation, equivalent to calling `on` for each */
|
|
21
59
|
on?: SideSheetEventHandlers;
|
|
60
|
+
/** Extra classes for the root element */
|
|
22
61
|
class?: string;
|
|
23
62
|
prefix?: string;
|
|
24
63
|
componentName?: string;
|
|
25
64
|
}
|
|
65
|
+
/** A side sheet instance. */
|
|
26
66
|
export interface SideSheetComponent {
|
|
67
|
+
/** The root element, which holds the scrim and the container */
|
|
27
68
|
element: HTMLElement;
|
|
69
|
+
/** Opens the sheet */
|
|
28
70
|
open: () => SideSheetComponent;
|
|
71
|
+
/** Closes the sheet */
|
|
29
72
|
close: () => SideSheetComponent;
|
|
73
|
+
/** Opens it if closed, closes it if open */
|
|
30
74
|
toggle: () => SideSheetComponent;
|
|
75
|
+
/** Whether the sheet is showing */
|
|
31
76
|
isOpen: () => boolean;
|
|
77
|
+
/** Replaces the body */
|
|
32
78
|
setContent: (content: string | HTMLElement) => SideSheetComponent;
|
|
79
|
+
/** Replaces the headline */
|
|
33
80
|
setTitle: (title: string) => SideSheetComponent;
|
|
81
|
+
/** Adds an event listener */
|
|
34
82
|
on: <T extends keyof SideSheetEventHandlers>(event: T, handler: NonNullable<SideSheetEventHandlers[T]>) => SideSheetComponent;
|
|
83
|
+
/** Removes an event listener */
|
|
35
84
|
off: <T extends keyof SideSheetEventHandlers>(event: T, handler: NonNullable<SideSheetEventHandlers[T]>) => SideSheetComponent;
|
|
85
|
+
/** Removes the sheet from the page and releases its listeners */
|
|
36
86
|
destroy: () => void;
|
|
87
|
+
/** Prefixes a class name, for styling hooks */
|
|
37
88
|
getClass: (name: string) => string;
|
|
38
89
|
}
|
|
@@ -1,69 +1,131 @@
|
|
|
1
|
+
/** Available slider color variants */
|
|
1
2
|
export declare const SLIDER_COLORS: {
|
|
3
|
+
/** Primary color variant */
|
|
2
4
|
readonly PRIMARY: "primary";
|
|
5
|
+
/** Secondary color variant */
|
|
3
6
|
readonly SECONDARY: "secondary";
|
|
7
|
+
/** Tertiary color variant */
|
|
4
8
|
readonly TERTIARY: "tertiary";
|
|
9
|
+
/** Error color variant */
|
|
5
10
|
readonly ERROR: "error";
|
|
6
11
|
};
|
|
12
|
+
/** Available slider size variants */
|
|
7
13
|
export declare const SLIDER_SIZES: {
|
|
14
|
+
/** Extra small size (default) - 16px track height */
|
|
8
15
|
readonly XS: 16;
|
|
16
|
+
/** Small size - 24px track height */
|
|
9
17
|
readonly S: 24;
|
|
18
|
+
/** Medium size - 40px track height */
|
|
10
19
|
readonly M: 40;
|
|
20
|
+
/** Large size - 56px track height */
|
|
11
21
|
readonly L: 56;
|
|
22
|
+
/** Extra large size - 96px track height */
|
|
12
23
|
readonly XL: 96;
|
|
13
24
|
};
|
|
25
|
+
/** Slider component size type */
|
|
14
26
|
export type SliderSize = keyof typeof SLIDER_SIZES | number;
|
|
27
|
+
/** Slider component measurements */
|
|
15
28
|
export declare const SLIDER_MEASUREMENTS: {
|
|
29
|
+
/** Handle size in pixels */
|
|
16
30
|
readonly HANDLE_SIZE: 16;
|
|
31
|
+
/** Handle height for XS and S sizes in pixels (M3: 44dp) */
|
|
17
32
|
readonly SMALL_HANDLE_HEIGHT: 44;
|
|
33
|
+
/** Handle height offset for M, L, XL sizes (added to track height: 52, 68, 108dp) */
|
|
18
34
|
readonly HANDLE_HEIGHT_OFFSET: 12;
|
|
35
|
+
/** Minimum container height in pixels (M3 minimum touch target) */
|
|
19
36
|
readonly MIN_HEIGHT: 48;
|
|
37
|
+
/** Tick size in pixels */
|
|
20
38
|
readonly TICK_SIZE: 4;
|
|
39
|
+
/** Dot size in pixels */
|
|
21
40
|
readonly DOT_SIZE: 4;
|
|
41
|
+
/** Handle gap pixels */
|
|
22
42
|
readonly HANDLE_GAP: 6;
|
|
23
43
|
};
|
|
44
|
+
/** Available slider events */
|
|
24
45
|
export declare const SLIDER_EVENTS: {
|
|
46
|
+
/** Fired when slider value changes and interaction completes */
|
|
25
47
|
readonly CHANGE: "change";
|
|
48
|
+
/** Fired during dragging as value changes */
|
|
26
49
|
readonly INPUT: "input";
|
|
50
|
+
/** Fired when slider receives focus */
|
|
27
51
|
readonly FOCUS: "focus";
|
|
52
|
+
/** Fired when slider loses focus */
|
|
28
53
|
readonly BLUR: "blur";
|
|
54
|
+
/** Fired when interaction starts */
|
|
29
55
|
readonly START: "start";
|
|
56
|
+
/** Fired when interaction ends */
|
|
30
57
|
readonly END: "end";
|
|
31
58
|
};
|
|
59
|
+
/** Position options for slider label and icon */
|
|
32
60
|
export declare const SLIDER_POSITIONS: {
|
|
61
|
+
/** Position at the start */
|
|
33
62
|
readonly START: "start";
|
|
63
|
+
/** Position at the end */
|
|
34
64
|
readonly END: "end";
|
|
35
65
|
};
|
|
66
|
+
/** Default slider configuration values */
|
|
36
67
|
export declare const SLIDER_DEFAULTS: {
|
|
68
|
+
/** Minimum value */
|
|
37
69
|
readonly MIN: 0;
|
|
70
|
+
/** Maximum value */
|
|
38
71
|
readonly MAX: 100;
|
|
72
|
+
/** Starting value */
|
|
39
73
|
readonly VALUE: 0;
|
|
74
|
+
/** Step increment size */
|
|
40
75
|
readonly STEP: 1;
|
|
76
|
+
/** Whether slider is disabled */
|
|
41
77
|
readonly DISABLED: false;
|
|
78
|
+
/** Default color variant */
|
|
42
79
|
readonly COLOR: "primary";
|
|
80
|
+
/** Default size variant */
|
|
43
81
|
readonly SIZE: "XS";
|
|
82
|
+
/** Whether to show tick marks */
|
|
44
83
|
readonly TICKS: false;
|
|
84
|
+
/** Whether to show value while dragging */
|
|
45
85
|
readonly SHOW_VALUE: true;
|
|
86
|
+
/** Whether to snap to steps during dragging */
|
|
46
87
|
readonly SNAP_TO_STEPS: true;
|
|
88
|
+
/** Whether slider is a range slider (two handles) */
|
|
47
89
|
readonly RANGE: false;
|
|
90
|
+
/** Whether slider is a centered slider (active track from center) */
|
|
48
91
|
readonly CENTERED: false;
|
|
92
|
+
/** Default icon position */
|
|
49
93
|
readonly ICON_POSITION: "start";
|
|
94
|
+
/** Default label position */
|
|
50
95
|
readonly LABEL_POSITION: "start";
|
|
51
96
|
};
|
|
97
|
+
/** CSS class names used by the slider component */
|
|
52
98
|
export declare const SLIDER_CLASSES: {
|
|
99
|
+
/** Root element class */
|
|
53
100
|
readonly ROOT: "slider";
|
|
101
|
+
/** Container for slider track and handles */
|
|
54
102
|
readonly CONTAINER: "slider__container";
|
|
103
|
+
/** Filled track portion class */
|
|
55
104
|
readonly FILL: "slider__fill";
|
|
105
|
+
/** Handle element class */
|
|
56
106
|
readonly HANDLE: "slider__handle";
|
|
107
|
+
/** Second handle element class (for range slider) */
|
|
57
108
|
readonly HANDLE_SECOND: "slider__handle--second";
|
|
109
|
+
/** Tick marks container class */
|
|
58
110
|
readonly LABEL: "slider__label";
|
|
111
|
+
/** Value display class */
|
|
59
112
|
readonly VALUE: "slider__value";
|
|
113
|
+
/** Icon container class */
|
|
60
114
|
readonly ICON: "slider__icon";
|
|
115
|
+
/** Disabled state class */
|
|
61
116
|
readonly DISABLED: "slider--disabled";
|
|
117
|
+
/** Focused state class */
|
|
62
118
|
readonly FOCUSED: "slider--focused";
|
|
119
|
+
/** Dragging state class */
|
|
63
120
|
readonly DRAGGING: "slider--dragging";
|
|
121
|
+
/** Range slider variant class */
|
|
64
122
|
readonly RANGE: "slider--range";
|
|
123
|
+
/** Primary color variant class */
|
|
65
124
|
readonly PRIMARY: "slider--primary";
|
|
125
|
+
/** Secondary color variant class */
|
|
66
126
|
readonly SECONDARY: "slider--secondary";
|
|
127
|
+
/** Tertiary color variant class */
|
|
67
128
|
readonly TERTIARY: "slider--tertiary";
|
|
129
|
+
/** Error color variant class */
|
|
68
130
|
readonly ERROR: "slider--error";
|
|
69
131
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { SliderConfig, SliderComponent } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Slider component Slider follows a clear architectural pattern: 1.
|
|
4
|
+
* @param config
|
|
5
|
+
*/
|
|
2
6
|
declare const createSlider: (config?: SliderConfig) => SliderComponent;
|
|
3
7
|
export default createSlider;
|
|
@@ -3,49 +3,90 @@ import type { NormalizedEvent, TouchEvents } from "../../core/utils/mobile.js";
|
|
|
3
3
|
import { SliderSize, SLIDER_COLORS, SLIDER_EVENTS, SLIDER_SIZES } from "./constants.js";
|
|
4
4
|
import { BaseComponentConfig } from "../../core/config/component.js";
|
|
5
5
|
export { SLIDER_COLORS, SLIDER_EVENTS, SLIDER_SIZES };
|
|
6
|
+
/** Available slider color variants */
|
|
6
7
|
export type SliderColor = "primary" | "secondary" | "tertiary" | "error";
|
|
8
|
+
/** Available slider event types */
|
|
7
9
|
export type SliderEventType = "change" | "input" | "focus" | "blur" | "start" | "end";
|
|
10
|
+
/** Configuration options for the slider component */
|
|
8
11
|
export interface SliderConfig extends BaseComponentConfig {
|
|
12
|
+
/** Minimum value of the slider */
|
|
9
13
|
min?: number;
|
|
14
|
+
/** Maximum value of the slider */
|
|
10
15
|
max?: number;
|
|
16
|
+
/** Current value of the slider */
|
|
11
17
|
value?: number;
|
|
18
|
+
/** Secondary value for range slider (when using two handles) */
|
|
12
19
|
secondValue?: number;
|
|
20
|
+
/** Step size for discrete slider */
|
|
13
21
|
step?: number;
|
|
22
|
+
/** Whether the slider is disabled */
|
|
14
23
|
disabled?: boolean;
|
|
24
|
+
/** Form field name. */
|
|
15
25
|
name?: string;
|
|
26
|
+
/** Color variant of the slider * A stylesheet can override the drawn colours per slider with the custom properties `--<prefix>-slider-color` and `--<prefix>-slider-on-color`, where `<prefix>` is the configured component prefix (mtrl by default). */
|
|
16
27
|
color?: SliderColor;
|
|
28
|
+
/** Size variant of the slider */
|
|
17
29
|
size?: SliderSize;
|
|
30
|
+
/** Whether to show tick marks */
|
|
18
31
|
ticks?: boolean;
|
|
32
|
+
/** Custom labels for ticks, if provided */
|
|
19
33
|
tickLabels?: string[] | Record<number, string>;
|
|
34
|
+
/** Format function for displayed values */
|
|
20
35
|
valueFormatter?: (value: number) => string;
|
|
36
|
+
/** Whether to show the current value while dragging */
|
|
21
37
|
showValue?: boolean;
|
|
38
|
+
/** Whether to snap to steps while dragging (discrete slider) */
|
|
22
39
|
snapToSteps?: boolean;
|
|
40
|
+
/** Whether the slider is a range slider (two handles) */
|
|
23
41
|
range?: boolean;
|
|
42
|
+
/** Whether the slider is a centered slider (with active track from center) */
|
|
24
43
|
centered?: boolean;
|
|
44
|
+
/** Label text for the slider */
|
|
25
45
|
label?: string;
|
|
46
|
+
/** Position of the label (start or end) - defaults to 'start' */
|
|
26
47
|
labelPosition?: "start" | "end";
|
|
48
|
+
/** An icon inside the track, drawn as SVG markup (M3 Expressive "inset icon"). */
|
|
27
49
|
insetIcon?: string;
|
|
50
|
+
/** The inset icon while the value is at the minimum, in place of `insetIcon`. */
|
|
28
51
|
insetIconAtMin?: string;
|
|
52
|
+
/** The slider's orientation. */
|
|
29
53
|
orientation?: "horizontal" | "vertical";
|
|
54
|
+
/** A vertical slider's minimum at the top instead of the bottom (Compose VerticalSlider) */
|
|
30
55
|
topToBottom?: boolean;
|
|
56
|
+
/** Icon to display with the slider. */
|
|
31
57
|
icon?: string;
|
|
58
|
+
/** Position of the icon (start or end) */
|
|
32
59
|
iconPosition?: "start" | "end";
|
|
60
|
+
/** Additional CSS classes */
|
|
33
61
|
class?: string;
|
|
62
|
+
/** Event handlers for slider events */
|
|
34
63
|
on?: {
|
|
35
64
|
[key in SliderEventType]?: (event: SliderEvent) => void;
|
|
36
65
|
};
|
|
66
|
+
/** CSS class prefix */
|
|
37
67
|
prefix?: string;
|
|
68
|
+
/** Component schema */
|
|
38
69
|
schema?: object;
|
|
39
70
|
}
|
|
71
|
+
/** Slider event data */
|
|
40
72
|
export interface SliderEvent {
|
|
73
|
+
/** The slider component that triggered the event */
|
|
41
74
|
slider: SliderComponent;
|
|
75
|
+
/** Current slider value */
|
|
42
76
|
value: number;
|
|
77
|
+
/** Secondary value (for range sliders) */
|
|
43
78
|
secondValue: number | null;
|
|
79
|
+
/** Original DOM event if available */
|
|
44
80
|
originalEvent: Event | null;
|
|
81
|
+
/** Function to prevent default behavior */
|
|
45
82
|
preventDefault: () => void;
|
|
83
|
+
/** Whether default behavior was prevented */
|
|
46
84
|
defaultPrevented: boolean;
|
|
47
85
|
}
|
|
86
|
+
/** Slider component public API interface */
|
|
87
|
+
/** Which handle an interaction is acting on. */
|
|
48
88
|
export type SliderActiveHandle = "first" | "second" | null;
|
|
89
|
+
/** The controller's state, shared with the handlers it builds. */
|
|
49
90
|
export interface SliderState {
|
|
50
91
|
value: number;
|
|
51
92
|
secondValue: number | null;
|
|
@@ -53,11 +94,13 @@ export interface SliderState {
|
|
|
53
94
|
max: number;
|
|
54
95
|
step: number;
|
|
55
96
|
dragging: boolean;
|
|
97
|
+
/** Whether a handle is held down */
|
|
56
98
|
pressed: boolean;
|
|
57
99
|
activeHandle: SliderActiveHandle;
|
|
58
100
|
activeBubble: HTMLElement | null;
|
|
59
101
|
valueHideTimer: ReturnType<typeof setTimeout> | null;
|
|
60
102
|
}
|
|
103
|
+
/** The DOM the controller reaches for on the component it is handed. */
|
|
61
104
|
export interface SliderStateComponent {
|
|
62
105
|
element: HTMLElement;
|
|
63
106
|
container?: HTMLElement | null;
|
|
@@ -67,18 +110,24 @@ export interface SliderStateComponent {
|
|
|
67
110
|
secondValueBubble?: HTMLElement | null;
|
|
68
111
|
getClass: (name: string) => string;
|
|
69
112
|
emit: (event: string, data: unknown) => unknown;
|
|
113
|
+
/** withStates installs this whole, so the member is not optional inside it */
|
|
70
114
|
disabled?: {
|
|
71
115
|
isDisabled: () => boolean;
|
|
72
116
|
};
|
|
117
|
+
/** The hidden inputs withDom builds when the slider has a name. */
|
|
73
118
|
formFields?: (HTMLInputElement | null)[] | null;
|
|
119
|
+
/** withTracks installs this; the controller reads it for the discrete inset */
|
|
74
120
|
getSize?: () => SliderSize;
|
|
121
|
+
/** withTracks installs this; the controller calls it with the state after every change */
|
|
75
122
|
renderTracks?: (state?: unknown) => void;
|
|
76
123
|
lifecycle?: {
|
|
77
124
|
destroy?: () => void;
|
|
78
125
|
mount?: () => void;
|
|
79
126
|
};
|
|
80
127
|
}
|
|
128
|
+
/** What drives a drag: the same handlers are registered for mouse and for touch, so each one takes either. */
|
|
81
129
|
export type SliderPointerEvent = MouseEvent | TouchEvent;
|
|
130
|
+
/** Public model, native forwarding and gesture notifications. */
|
|
82
131
|
export interface SliderEvents extends TouchEvents {
|
|
83
132
|
change: (payload: SliderEvent) => void;
|
|
84
133
|
input: (payload: SliderEvent) => void;
|
|
@@ -99,35 +148,64 @@ export interface SliderEvents extends TouchEvents {
|
|
|
99
148
|
})) => void;
|
|
100
149
|
}
|
|
101
150
|
export interface SliderComponent {
|
|
151
|
+
/** The root element of the slider */
|
|
102
152
|
element: HTMLElement;
|
|
153
|
+
/** Sets slider value. */
|
|
103
154
|
setValue: (value: number, triggerEvent?: boolean) => SliderComponent;
|
|
155
|
+
/** Gets slider value */
|
|
104
156
|
getValue: () => number;
|
|
157
|
+
/** Sets secondary slider value (for range slider). */
|
|
105
158
|
setSecondValue: (value: number, triggerEvent?: boolean) => SliderComponent;
|
|
159
|
+
/** Gets secondary slider value */
|
|
106
160
|
getSecondValue: () => number | null;
|
|
161
|
+
/** Sets slider minimum value */
|
|
107
162
|
setMin: (min: number) => SliderComponent;
|
|
163
|
+
/** Gets slider minimum value */
|
|
108
164
|
getMin: () => number;
|
|
165
|
+
/** Sets slider maximum value */
|
|
109
166
|
setMax: (max: number) => SliderComponent;
|
|
167
|
+
/** Gets slider maximum value */
|
|
110
168
|
getMax: () => number;
|
|
169
|
+
/** Sets slider step size */
|
|
111
170
|
setStep: (step: number) => SliderComponent;
|
|
171
|
+
/** Gets slider step size */
|
|
112
172
|
getStep: () => number;
|
|
173
|
+
/** Enables the slider */
|
|
113
174
|
enable: () => SliderComponent;
|
|
175
|
+
/** Disables the slider */
|
|
114
176
|
disable: () => SliderComponent;
|
|
177
|
+
/** Checks if slider is disabled */
|
|
115
178
|
isDisabled: () => boolean;
|
|
179
|
+
/** Sets slider color */
|
|
116
180
|
setColor: (color: SliderColor) => SliderComponent;
|
|
181
|
+
/** Gets slider color */
|
|
117
182
|
getColor: () => string;
|
|
183
|
+
/** Sets slider size */
|
|
118
184
|
setSize: (size: SliderSize) => SliderComponent;
|
|
185
|
+
/** Gets the size as it was set: a size name, or a track height in pixels */
|
|
119
186
|
getSize: () => SliderSize;
|
|
187
|
+
/** Shows or hides tick marks */
|
|
120
188
|
showTicks: (show: boolean) => SliderComponent;
|
|
189
|
+
/** Shows or hides current value while dragging */
|
|
121
190
|
showCurrentValue: (show: boolean) => SliderComponent;
|
|
191
|
+
/** Sets label text */
|
|
122
192
|
setLabel: (text: string) => SliderComponent;
|
|
193
|
+
/** Gets label text */
|
|
123
194
|
getLabel: () => string;
|
|
195
|
+
/** Sets the inset icon, and optionally the one shown at the minimum; '' removes it */
|
|
124
196
|
setInsetIcon: (icon: string, atMin?: string) => SliderComponent;
|
|
197
|
+
/** Sets icon HTML */
|
|
125
198
|
setIcon: (iconHtml: string) => SliderComponent;
|
|
199
|
+
/** Gets icon HTML */
|
|
126
200
|
getIcon: () => string;
|
|
201
|
+
/** Adds event listener */
|
|
127
202
|
on: <K extends keyof SliderEvents>(event: K, handler: SliderEvents[K]) => SliderComponent;
|
|
203
|
+
/** Removes event listener */
|
|
128
204
|
off: <K extends keyof SliderEvents>(event: K, handler: SliderEvents[K]) => SliderComponent;
|
|
205
|
+
/** Destroys the slider component and cleans up resources */
|
|
129
206
|
destroy: () => void;
|
|
130
207
|
}
|
|
208
|
+
/** Registers SliderConfig with the global defaults map, so `setComponentDefaults("slider", ...)` is typed without core importing anything from this component. */
|
|
131
209
|
declare module "../../core/config/global" {
|
|
132
210
|
interface ComponentConfigMap {
|
|
133
211
|
slider?: Partial<SliderConfig>;
|
|
@@ -1,59 +1,96 @@
|
|
|
1
|
+
/** Where the snackbar sits along the bottom edge */
|
|
1
2
|
export declare const SNACKBAR_POSITIONS: {
|
|
3
|
+
/** Centred (default) */
|
|
2
4
|
readonly CENTER: "center";
|
|
5
|
+
/** Against the leading edge */
|
|
3
6
|
readonly START: "start";
|
|
7
|
+
/** Against the trailing edge */
|
|
4
8
|
readonly END: "end";
|
|
5
9
|
};
|
|
10
|
+
/** Duration presets (Compose Material 3 `SnackbarDuration`) */
|
|
6
11
|
export declare const SNACKBAR_DURATIONS: {
|
|
12
|
+
/** 4 seconds, the default without an action */
|
|
7
13
|
readonly SHORT: "short";
|
|
14
|
+
/** 10 seconds */
|
|
8
15
|
readonly LONG: "long";
|
|
16
|
+
/** Stays until acted on or dismissed, the default with an action */
|
|
9
17
|
readonly INDEFINITE: "indefinite";
|
|
10
18
|
};
|
|
19
|
+
/** Milliseconds behind the presets; 0 means no auto-dismiss */
|
|
11
20
|
export declare const SNACKBAR_DURATION_MS: {
|
|
12
21
|
readonly short: 4000;
|
|
13
22
|
readonly long: 10000;
|
|
14
23
|
readonly indefinite: 0;
|
|
15
24
|
};
|
|
25
|
+
/** Snackbar visibility states */
|
|
16
26
|
export declare const SNACKBAR_STATES: {
|
|
17
27
|
readonly VISIBLE: "visible";
|
|
18
28
|
readonly HIDDEN: "hidden";
|
|
19
29
|
};
|
|
30
|
+
/** Snackbar queue behaviors Controls how a newly shown snackbar interacts with the one currently on screen and any still waiting in the queue. */
|
|
20
31
|
export declare const SNACKBAR_QUEUE_BEHAVIORS: {
|
|
32
|
+
/** Wait in line: shown one at a time, in order (default) */
|
|
21
33
|
readonly QUEUE: "queue";
|
|
34
|
+
/** Replace: dismiss the current snackbar, drop any pending ones, and show */
|
|
22
35
|
readonly REPLACE: "replace";
|
|
23
36
|
};
|
|
37
|
+
/** Snackbar event types */
|
|
24
38
|
export declare const SNACKBAR_EVENTS: {
|
|
39
|
+
/** The snackbar is on screen */
|
|
25
40
|
readonly OPEN: "open";
|
|
41
|
+
/** The snackbar is leaving; the event carries the reason */
|
|
26
42
|
readonly CLOSE: "close";
|
|
43
|
+
/** The action button was clicked */
|
|
27
44
|
readonly ACTION: "action";
|
|
45
|
+
/** Fired with `close`; the queue listens to it */
|
|
28
46
|
readonly DISMISS: "dismiss";
|
|
29
47
|
};
|
|
48
|
+
/** Why a snackbar closed */
|
|
30
49
|
export declare const SNACKBAR_CLOSE_REASONS: {
|
|
50
|
+
/** The duration ran out */
|
|
31
51
|
readonly TIMEOUT: "timeout";
|
|
52
|
+
/** The action was clicked */
|
|
32
53
|
readonly ACTION: "action";
|
|
54
|
+
/** The close icon was clicked */
|
|
33
55
|
readonly CLOSE_BUTTON: "close-button";
|
|
56
|
+
/** Escape was pressed while focus was inside */
|
|
34
57
|
readonly ESCAPE: "escape";
|
|
58
|
+
/** `hide()` was called */
|
|
35
59
|
readonly API: "api";
|
|
60
|
+
/** The queue replaced or cleared it */
|
|
36
61
|
readonly QUEUE: "queue";
|
|
37
62
|
};
|
|
63
|
+
/** Default configuration values for snackbar */
|
|
38
64
|
export declare const SNACKBAR_DEFAULTS: {
|
|
65
|
+
/** Default display position */
|
|
39
66
|
readonly POSITION: "center";
|
|
67
|
+
/** Default queue behavior */
|
|
40
68
|
readonly QUEUE_BEHAVIOR: "queue";
|
|
69
|
+
/** Delay in milliseconds between a dismissed snackbar and the next one */
|
|
41
70
|
readonly QUEUE_GAP: 200;
|
|
71
|
+
/** Accessible name of the close icon */
|
|
42
72
|
readonly CLOSE_LABEL: "Dismiss";
|
|
73
|
+
/** The longest of the exit transitions, after which the element is */
|
|
43
74
|
readonly ANIMATION_DURATION: 425;
|
|
75
|
+
/** An action wider than this moves below the text */
|
|
44
76
|
readonly ACTION_INLINE_MAX_WIDTH: 128;
|
|
45
77
|
};
|
|
78
|
+
/** CSS class names used by the snackbar component, without the prefix */
|
|
46
79
|
export declare const SNACKBAR_CLASSES: {
|
|
47
80
|
readonly ROOT: "snackbar";
|
|
48
81
|
readonly CENTER: "snackbar--center";
|
|
49
82
|
readonly START: "snackbar--start";
|
|
50
83
|
readonly END: "snackbar--end";
|
|
51
84
|
readonly VISIBLE: "snackbar--visible";
|
|
85
|
+
/** An action is present */
|
|
52
86
|
readonly WITH_ACTION: "snackbar--with-action";
|
|
87
|
+
/** A close icon is present */
|
|
53
88
|
readonly DISMISSIBLE: "snackbar--dismissible";
|
|
89
|
+
/** The action is too wide to sit beside the text */
|
|
54
90
|
readonly ACTION_BELOW: "snackbar--action-below";
|
|
55
91
|
readonly TEXT: "snackbar__text";
|
|
56
92
|
readonly ACTION: "snackbar__action";
|
|
57
93
|
readonly CLOSE: "snackbar__close";
|
|
58
94
|
};
|
|
95
|
+
/** The close icon (Material Symbols "close") */
|
|
59
96
|
export declare const SNACKBAR_CLOSE_ICON: string;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { SnackbarConfig, SnackbarComponent } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a new Snackbar component
|
|
4
|
+
* @param config
|
|
5
|
+
*/
|
|
2
6
|
declare const createSnackbar: (config: SnackbarConfig) => SnackbarComponent;
|
|
7
|
+
/** Dismisses the snackbar on screen and drops the ones still waiting. */
|
|
3
8
|
export declare const clearSnackbars: () => void;
|
|
4
9
|
export default createSnackbar;
|