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
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ What a bundler keeps, minified and gzipped (kB is 1,000 bytes), measured from th
|
|
|
97
97
|
| Everything the root exports (`export * from 'material'`), without code splitting | 127.8 kB |
|
|
98
98
|
| `material/styles/base` | 2.9 kB |
|
|
99
99
|
| `material/styles/base` and `material/styles/button` | 5.2 kB |
|
|
100
|
-
| `material/styles`, the full stylesheet | 63.
|
|
100
|
+
| `material/styles`, the full stylesheet | 63.6 kB |
|
|
101
101
|
<!-- /sizes -->
|
|
102
102
|
|
|
103
103
|
`material` publishes ESM only, so bundlers drop what you do not import. Each component's page on [md3.io/components](https://md3.io/components/) gives its size.
|
|
@@ -1,62 +1,3 @@
|
|
|
1
1
|
import { BadgeConfig, BadgeComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new Badge component following Material Design 3 guidelines.
|
|
4
|
-
*
|
|
5
|
-
* The Badge component displays a small circle or numerical indicator to
|
|
6
|
-
* draw attention to items requiring user attention, like notifications
|
|
7
|
-
* or counts. Badges can be attached to any element.
|
|
8
|
-
*
|
|
9
|
-
* @param {BadgeConfig} config - Badge configuration object
|
|
10
|
-
* @returns {BadgeComponent} Badge component instance with methods for
|
|
11
|
-
* managing the badge appearance, content, and visibility
|
|
12
|
-
*
|
|
13
|
-
* @throws {Error} Throws an error if badge creation fails
|
|
14
|
-
*
|
|
15
|
-
* @category Components
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* // Create a small dot badge (notification indicator)
|
|
19
|
-
* const notificationBadge = createBadge({
|
|
20
|
-
* variant: 'small',
|
|
21
|
-
* color: 'error',
|
|
22
|
-
* target: document.querySelector('.icon-button')
|
|
23
|
-
* });
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* // Create a large badge with a count (numbered indicator)
|
|
27
|
-
* const countBadge = createBadge({
|
|
28
|
-
* variant: 'large',
|
|
29
|
-
* label: 5,
|
|
30
|
-
* color: 'primary',
|
|
31
|
-
* target: document.querySelector('.notification-icon')
|
|
32
|
-
* });
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* // Create a badge with a maximum value
|
|
36
|
-
* const messagesBadge = createBadge({
|
|
37
|
-
* variant: 'large',
|
|
38
|
-
* label: 1250,
|
|
39
|
-
* max: 999, // Will display "999+"
|
|
40
|
-
* color: 'info',
|
|
41
|
-
* position: 'bottom-right'
|
|
42
|
-
* });
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* // Control badge visibility programmatically
|
|
46
|
-
* const toggleBadge = createBadge({
|
|
47
|
-
* variant: 'small',
|
|
48
|
-
* color: 'success',
|
|
49
|
-
* target: document.querySelector('.toggle-button')
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* // Toggle badge visibility
|
|
53
|
-
* function toggleNotification() {
|
|
54
|
-
* if (toggleBadge.isVisible()) {
|
|
55
|
-
* toggleBadge.hide();
|
|
56
|
-
* } else {
|
|
57
|
-
* toggleBadge.show();
|
|
58
|
-
* }
|
|
59
|
-
* }
|
|
60
|
-
*/
|
|
61
2
|
declare const createBadge: (config?: BadgeConfig) => BadgeComponent;
|
|
62
3
|
export default createBadge;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Badge variants
|
|
3
|
-
* - SMALL: Simple dot badge (6dp diameter)
|
|
4
|
-
* - LARGE: Numbered badge (16dp height)
|
|
5
|
-
*/
|
|
6
1
|
export declare const BADGE_VARIANTS: {
|
|
7
2
|
readonly SMALL: "small";
|
|
8
3
|
readonly LARGE: "large";
|
|
9
4
|
};
|
|
10
|
-
/**
|
|
11
|
-
* Badge colors
|
|
12
|
-
* ERROR is the default
|
|
13
|
-
*/
|
|
14
5
|
export declare const BADGE_COLORS: {
|
|
15
6
|
readonly ERROR: "error";
|
|
16
7
|
readonly PRIMARY: "primary";
|
|
@@ -20,16 +11,10 @@ export declare const BADGE_COLORS: {
|
|
|
20
11
|
readonly WARNING: "warning";
|
|
21
12
|
readonly INFO: "info";
|
|
22
13
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Badge positions relative to its container
|
|
25
|
-
*/
|
|
26
14
|
export declare const BADGE_POSITIONS: {
|
|
27
15
|
readonly TOP_RIGHT: "top-right";
|
|
28
16
|
readonly TOP_LEFT: "top-left";
|
|
29
17
|
readonly BOTTOM_RIGHT: "bottom-right";
|
|
30
18
|
readonly BOTTOM_LEFT: "bottom-left";
|
|
31
19
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Maximum character count for badge labels
|
|
34
|
-
*/
|
|
35
20
|
export declare const BADGE_MAX_CHARACTERS = 4;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Badge component module
|
|
3
|
-
* @module components/badge
|
|
4
|
-
* @description A small element that communicates status, shows a count,
|
|
5
|
-
* or highlights an element requiring attention.
|
|
6
|
-
*/
|
|
7
1
|
export { default, default as createBadge } from "./badge.js";
|
|
8
2
|
export type { BadgeConfig, BadgeComponent, BadgeVariant, BadgeColor, BadgePosition, } from "./types.js";
|
|
@@ -1,294 +1,50 @@
|
|
|
1
1
|
import { ElementComponent } from "../../core/compose/component.js";
|
|
2
|
-
/**
|
|
3
|
-
* Badge variant types - determines the badge size and appearance
|
|
4
|
-
* @category Components
|
|
5
|
-
* @remarks
|
|
6
|
-
* - small: A 6dp circular dot badge without text (for notification indicators)
|
|
7
|
-
* - large: A 16dp height badge that can contain text (for counts or short labels)
|
|
8
|
-
*/
|
|
9
2
|
export type BadgeVariant = 'small' | 'large';
|
|
10
|
-
/**
|
|
11
|
-
* Badge color types - determines the badge's background color
|
|
12
|
-
* @category Components
|
|
13
|
-
* @remarks
|
|
14
|
-
* Based on Material Design 3 color system:
|
|
15
|
-
* - error: Red color for error states (default)
|
|
16
|
-
* - primary: Primary theme color
|
|
17
|
-
* - secondary: Secondary theme color
|
|
18
|
-
* - tertiary: Tertiary theme color
|
|
19
|
-
* - success: Green color for success states
|
|
20
|
-
* - warning: Orange/yellow color for warning states
|
|
21
|
-
* - info: Blue color for information states
|
|
22
|
-
*/
|
|
23
3
|
export type BadgeColor = 'error' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'info';
|
|
24
|
-
/**
|
|
25
|
-
* Badge position types - determines where the badge appears relative to its target
|
|
26
|
-
* @category Components
|
|
27
|
-
* @remarks
|
|
28
|
-
* - top-right: Position in the top-right corner (default)
|
|
29
|
-
* - top-left: Position in the top-left corner
|
|
30
|
-
* - bottom-right: Position in the bottom-right corner
|
|
31
|
-
* - bottom-left: Position in the bottom-left corner
|
|
32
|
-
*/
|
|
33
4
|
export type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
34
|
-
/**
|
|
35
|
-
* Configuration interface for the Badge component
|
|
36
|
-
* @category Components
|
|
37
|
-
* @description
|
|
38
|
-
* Defines the appearance and behavior of a badge component.
|
|
39
|
-
* All properties are optional with sensible defaults.
|
|
40
|
-
*/
|
|
41
5
|
export interface BadgeConfig {
|
|
42
|
-
/**
|
|
43
|
-
* Badge variant (small dot or large numbered)
|
|
44
|
-
* Small badge (6dp) or Large badge (16dp height)
|
|
45
|
-
* @default 'large'
|
|
46
|
-
* @example 'small' | 'large'
|
|
47
|
-
*/
|
|
48
6
|
variant?: BadgeVariant | string;
|
|
49
|
-
/**
|
|
50
|
-
* Badge color (follows Material Design 3 color system)
|
|
51
|
-
* @default 'error'
|
|
52
|
-
* @example 'error' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'info'
|
|
53
|
-
*/
|
|
54
7
|
color?: BadgeColor | string;
|
|
55
|
-
/**
|
|
56
|
-
* Badge position relative to its container element
|
|
57
|
-
* @default 'top-right'
|
|
58
|
-
* @example 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'
|
|
59
|
-
*/
|
|
60
8
|
position?: BadgePosition | string;
|
|
61
|
-
/**
|
|
62
|
-
* Text label inside the badge (for large badges)
|
|
63
|
-
* Up to 4 characters, numbers exceeding max will show "{max}+"
|
|
64
|
-
* @example "3" | "99+" | "New"
|
|
65
|
-
*/
|
|
66
9
|
label?: string | number;
|
|
67
|
-
/**
|
|
68
|
-
* Maximum value to display (shows "{max}+" if label exceeds max)
|
|
69
|
-
* Usually 999+ for large numbers
|
|
70
|
-
* @example 99 | 999
|
|
71
|
-
*/
|
|
72
10
|
max?: number;
|
|
73
|
-
/**
|
|
74
|
-
* Whether the badge should be initially visible
|
|
75
|
-
* @default true
|
|
76
|
-
*/
|
|
77
11
|
visible?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Target element to which badge will be attached
|
|
80
|
-
* When provided, the badge will be positioned relative to this element
|
|
81
|
-
*/
|
|
82
12
|
target?: HTMLElement;
|
|
83
|
-
/**
|
|
84
|
-
* Additional CSS classes to apply to the badge element
|
|
85
|
-
* @example "custom-badge highlighted-badge"
|
|
86
|
-
*/
|
|
87
13
|
class?: string;
|
|
88
|
-
/**
|
|
89
|
-
* CSS class prefix for all badge classes
|
|
90
|
-
* @default "mtrl"
|
|
91
|
-
*/
|
|
92
14
|
prefix?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Component name used in CSS class generation
|
|
95
|
-
* @default "badge"
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
15
|
componentName?: string;
|
|
99
16
|
}
|
|
100
|
-
/**
|
|
101
|
-
* The visibility control withVisibility installs on a badge.
|
|
102
|
-
*
|
|
103
|
-
* Named because three places need the same shape: the feature that builds it,
|
|
104
|
-
* getApiConfig that forwards it, and withAPI that wraps it.
|
|
105
|
-
*
|
|
106
|
-
* @category Components
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
17
|
export interface BadgeVisibility {
|
|
110
|
-
/** Shows the badge */
|
|
111
18
|
show: () => void;
|
|
112
|
-
/** Hides the badge */
|
|
113
19
|
hide: () => void;
|
|
114
|
-
/** Toggles badge visibility, or forces it when given a flag */
|
|
115
20
|
toggle: (visible?: boolean) => void;
|
|
116
|
-
/** Whether the badge is currently visible */
|
|
117
21
|
isVisible: () => boolean;
|
|
118
22
|
}
|
|
119
|
-
/**
|
|
120
|
-
* What a badge feature enhancer needs from the component it is handed.
|
|
121
|
-
*
|
|
122
|
-
* The badge pipe is createBase, withEvents, withElement, then these features --
|
|
123
|
-
* so the element half is installed before any of them runs, which is why
|
|
124
|
-
* `element` and `getClass` are required rather than optional.
|
|
125
|
-
*
|
|
126
|
-
* `config` is the badge's own config: createBase keeps the type it was created
|
|
127
|
-
* with, so a feature reading `config.variant` gets BadgeVariant and not
|
|
128
|
-
* `unknown`. `wrapper` is written by withAttachment, not read by it.
|
|
129
|
-
*
|
|
130
|
-
* @category Components
|
|
131
|
-
* @internal
|
|
132
|
-
*/
|
|
133
23
|
export interface BadgeFeatureHost extends ElementComponent {
|
|
134
24
|
config: BadgeConfig & Record<string, unknown>;
|
|
135
25
|
wrapper?: HTMLElement;
|
|
136
26
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Badge component interface
|
|
139
|
-
* Provides methods for controlling a Material Design 3 badge
|
|
140
|
-
*
|
|
141
|
-
* @category Components
|
|
142
|
-
*/
|
|
143
27
|
export interface BadgeComponent {
|
|
144
|
-
/**
|
|
145
|
-
* The badge's root DOM element
|
|
146
|
-
*/
|
|
147
28
|
element: HTMLElement;
|
|
148
|
-
/**
|
|
149
|
-
* Badge wrapper element (if badge is attached to target)
|
|
150
|
-
* This is the parent element that contains both the target and the badge
|
|
151
|
-
*/
|
|
152
29
|
wrapper?: HTMLElement;
|
|
153
|
-
/**
|
|
154
|
-
* Sets the badge's text label
|
|
155
|
-
* @param label - Text or number to display in the badge
|
|
156
|
-
* @returns Badge component for method chaining
|
|
157
|
-
* @example
|
|
158
|
-
* badge.setLabel(5); // Shows "5"
|
|
159
|
-
* badge.setLabel("New"); // Shows "New"
|
|
160
|
-
* badge.setLabel(1250); // With max=999, shows "999+"
|
|
161
|
-
*/
|
|
162
30
|
setLabel: (label: string | number) => BadgeComponent;
|
|
163
|
-
/**
|
|
164
|
-
* Gets the badge's current text label
|
|
165
|
-
* @returns Current text content of the badge
|
|
166
|
-
*/
|
|
167
31
|
getLabel: () => string;
|
|
168
|
-
/**
|
|
169
|
-
* Sets the badge's content (alias for setLabel)
|
|
170
|
-
* @param content - Text or number to display in the badge
|
|
171
|
-
* @returns Badge component for method chaining
|
|
172
|
-
*/
|
|
173
32
|
setContent: (content: string | number) => BadgeComponent;
|
|
174
|
-
/**
|
|
175
|
-
* Gets the badge's current content (alias for getLabel)
|
|
176
|
-
* @returns Current text content of the badge
|
|
177
|
-
*/
|
|
178
33
|
getContent: () => string;
|
|
179
|
-
/**
|
|
180
|
-
* Shows the badge (makes it visible)
|
|
181
|
-
* @returns Badge component for method chaining
|
|
182
|
-
*/
|
|
183
34
|
show: () => BadgeComponent;
|
|
184
|
-
/**
|
|
185
|
-
* Hides the badge (makes it invisible)
|
|
186
|
-
* @returns Badge component for method chaining
|
|
187
|
-
*/
|
|
188
35
|
hide: () => BadgeComponent;
|
|
189
|
-
/**
|
|
190
|
-
* Toggles badge visibility
|
|
191
|
-
* @param visible - Optional explicit visibility state
|
|
192
|
-
* @returns Badge component for method chaining
|
|
193
|
-
* @example
|
|
194
|
-
* badge.toggle(); // Toggles current state
|
|
195
|
-
* badge.toggle(true); // Forces visible
|
|
196
|
-
*/
|
|
197
36
|
toggle: (visible?: boolean) => BadgeComponent;
|
|
198
|
-
/**
|
|
199
|
-
* Checks if the badge is currently visible
|
|
200
|
-
* @returns True if badge is visible, false otherwise
|
|
201
|
-
*/
|
|
202
37
|
isVisible: () => boolean;
|
|
203
|
-
/**
|
|
204
|
-
* Sets maximum value (after which badge shows max+)
|
|
205
|
-
* @param max - Maximum number to display before showing "+"
|
|
206
|
-
* @returns Badge component for method chaining
|
|
207
|
-
* @example
|
|
208
|
-
* badge.setMax(99); // Shows "99+" for values > 99
|
|
209
|
-
*/
|
|
210
38
|
setMax: (max: number) => BadgeComponent;
|
|
211
|
-
/**
|
|
212
|
-
* Sets badge color
|
|
213
|
-
* @param color - Badge color from Material Design 3 palette
|
|
214
|
-
* @returns Badge component for method chaining
|
|
215
|
-
* @example
|
|
216
|
-
* badge.setColor('primary');
|
|
217
|
-
* badge.setColor(BADGE_COLORS.SUCCESS);
|
|
218
|
-
*/
|
|
219
39
|
setColor: (color: BadgeColor | string) => BadgeComponent;
|
|
220
|
-
/**
|
|
221
|
-
* Sets badge variant (size style)
|
|
222
|
-
* @param variant - Badge variant ('small' or 'large')
|
|
223
|
-
* @returns Badge component for method chaining
|
|
224
|
-
* @example
|
|
225
|
-
* badge.setVariant('small'); // Dot indicator
|
|
226
|
-
* badge.setVariant(BADGE_VARIANTS.LARGE); // Numbered indicator
|
|
227
|
-
*/
|
|
228
40
|
setVariant: (variant: BadgeVariant | string) => BadgeComponent;
|
|
229
|
-
/**
|
|
230
|
-
* Sets badge position relative to target
|
|
231
|
-
* @param position - Badge position
|
|
232
|
-
* @returns Badge component for method chaining
|
|
233
|
-
* @example
|
|
234
|
-
* badge.setPosition('bottom-left');
|
|
235
|
-
*/
|
|
236
41
|
setPosition: (position: BadgePosition | string) => BadgeComponent;
|
|
237
|
-
/**
|
|
238
|
-
* Attaches badge to a target element
|
|
239
|
-
* @param target - Element to attach badge to
|
|
240
|
-
* @returns Badge component for method chaining
|
|
241
|
-
* @example
|
|
242
|
-
* badge.attachTo(document.querySelector('#notification-bell'));
|
|
243
|
-
*/
|
|
244
42
|
attachTo: (target: HTMLElement) => BadgeComponent;
|
|
245
|
-
/**
|
|
246
|
-
* Makes badge standalone (removes from wrapper)
|
|
247
|
-
* @returns Badge component for method chaining
|
|
248
|
-
*/
|
|
249
43
|
detach: () => BadgeComponent;
|
|
250
|
-
/**
|
|
251
|
-
* Destroys the badge component and cleans up resources
|
|
252
|
-
* Removes the badge from the DOM and clears event listeners
|
|
253
|
-
*/
|
|
254
44
|
destroy: () => void;
|
|
255
|
-
/**
|
|
256
|
-
* Gets a class name with the component's prefix
|
|
257
|
-
* @param name - Base class name
|
|
258
|
-
* @returns Prefixed class name
|
|
259
|
-
* @internal
|
|
260
|
-
*/
|
|
261
45
|
getClass: (name: string) => string;
|
|
262
|
-
/**
|
|
263
|
-
* Adds CSS classes to the badge element
|
|
264
|
-
* @param classes - One or more class names to add
|
|
265
|
-
* @returns Badge component for method chaining
|
|
266
|
-
* @example
|
|
267
|
-
* badge.addClass('highlighted', 'animated');
|
|
268
|
-
*/
|
|
269
46
|
addClass: (...classes: string[]) => BadgeComponent;
|
|
270
|
-
/**
|
|
271
|
-
* Removes CSS classes from the badge element
|
|
272
|
-
* @param classes - One or more class names to remove
|
|
273
|
-
* @returns Badge component for method chaining
|
|
274
|
-
* @example
|
|
275
|
-
* badge.removeClass('highlighted', 'animated');
|
|
276
|
-
*/
|
|
277
47
|
removeClass: (...classes: string[]) => BadgeComponent;
|
|
278
|
-
/**
|
|
279
|
-
* Adds an event listener to the badge
|
|
280
|
-
* @param event - Event name ('click', 'mouseover', etc.)
|
|
281
|
-
* @param handler - Event handler function
|
|
282
|
-
* @returns Badge component for method chaining
|
|
283
|
-
* @example
|
|
284
|
-
* badge.on('click', () => console.log('Badge clicked'));
|
|
285
|
-
*/
|
|
286
48
|
on: (event: string, handler: Function) => BadgeComponent;
|
|
287
|
-
/**
|
|
288
|
-
* Removes an event listener from the badge
|
|
289
|
-
* @param event - Event name
|
|
290
|
-
* @param handler - Event handler function
|
|
291
|
-
* @returns Badge component for method chaining
|
|
292
|
-
*/
|
|
293
49
|
off: (event: string, handler: Function) => BadgeComponent;
|
|
294
50
|
}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module components/bottom-app-bar
|
|
3
|
-
* @description Bottom app bar implementation
|
|
4
|
-
*/
|
|
5
1
|
import { BottomAppBarComponent, BottomAppBarConfig } from "./types.js";
|
|
6
|
-
/**
|
|
7
|
-
* Creates a bottom app bar component
|
|
8
|
-
*
|
|
9
|
-
* @param {BottomAppBarConfig} config - Configuration options
|
|
10
|
-
* @returns {BottomAppBarComponent} Bottom app bar component instance
|
|
11
|
-
*/
|
|
12
2
|
export declare const createBottomAppBar: (config?: BottomAppBarConfig) => BottomAppBarComponent;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FAB position constants for Bottom App Bar
|
|
3
|
-
*/
|
|
4
1
|
export declare const FAB_POSITIONS: {
|
|
5
2
|
readonly CENTER: "center";
|
|
6
3
|
readonly END: "end";
|
|
7
4
|
};
|
|
8
|
-
/**
|
|
9
|
-
* Default transition duration for show/hide animations
|
|
10
|
-
*/
|
|
11
5
|
export declare const DEFAULT_TRANSITION_DURATION = 300;
|
|
12
|
-
/**
|
|
13
|
-
* CSS class names used in the bottom app bar component
|
|
14
|
-
*/
|
|
15
6
|
export declare const BOTTOM_APP_BAR_CLASSES: {
|
|
16
7
|
readonly ROOT: "bottom-app-bar";
|
|
17
8
|
readonly ACTIONS: "bottom-app-bar__actions";
|
|
@@ -1,97 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module components/bottom-app-bar
|
|
3
|
-
* @description Type definitions for Bottom App Bar component
|
|
4
|
-
*/
|
|
5
1
|
import { ElementComponent } from "../../core/compose/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* FAB position type for Bottom App Bar
|
|
8
|
-
* @category Components
|
|
9
|
-
*/
|
|
10
2
|
export type FabPosition = 'center' | 'end';
|
|
11
|
-
/**
|
|
12
|
-
* Configuration options for Bottom App Bar component
|
|
13
|
-
* @category Components
|
|
14
|
-
*/
|
|
15
3
|
export interface BottomAppBarConfig {
|
|
16
|
-
/**
|
|
17
|
-
* Element to use for the container
|
|
18
|
-
* @default 'div'
|
|
19
|
-
*/
|
|
20
4
|
tag?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Whether to show FAB in the bottom bar
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
5
|
hasFab?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* FAB position in bottom bar
|
|
28
|
-
* @default 'end'
|
|
29
|
-
*/
|
|
30
6
|
fabPosition?: FabPosition;
|
|
31
|
-
/**
|
|
32
|
-
* Additional CSS classes to apply
|
|
33
|
-
*/
|
|
34
7
|
class?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Whether to enable auto-hide on scroll
|
|
37
|
-
* @default false
|
|
38
|
-
*/
|
|
39
8
|
autoHide?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Transition duration for show/hide in ms
|
|
42
|
-
* @default 300
|
|
43
|
-
*/
|
|
44
9
|
transitionDuration?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Called with the new visibility when it changes. There is no matching
|
|
47
|
-
* event, so this stays a callback rather than a listener.
|
|
48
|
-
*/
|
|
49
10
|
onVisibilityChange?: (visible: boolean) => void;
|
|
50
|
-
/**
|
|
51
|
-
* Component prefix for class names
|
|
52
|
-
* @default 'mtrl'
|
|
53
|
-
*/
|
|
54
11
|
prefix?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Component name for class generation
|
|
57
|
-
*/
|
|
58
12
|
componentName?: string;
|
|
59
13
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Bottom App Bar component interface
|
|
62
|
-
* @category Components
|
|
63
|
-
*/
|
|
64
14
|
export interface BottomAppBarComponent extends ElementComponent {
|
|
65
|
-
/**
|
|
66
|
-
* Adds an action button to the bottom bar
|
|
67
|
-
* @param {HTMLElement} button - Button element to add
|
|
68
|
-
* @returns {BottomAppBarComponent} BottomAppBarComponent instance for chaining
|
|
69
|
-
*/
|
|
70
15
|
addAction(button: HTMLElement): this;
|
|
71
|
-
/**
|
|
72
|
-
* Adds a floating action button to the bottom bar
|
|
73
|
-
* @param {HTMLElement} fab - FAB element to add
|
|
74
|
-
* @returns {BottomAppBarComponent} BottomAppBarComponent instance for chaining
|
|
75
|
-
*/
|
|
76
16
|
addFab(fab: HTMLElement): this;
|
|
77
|
-
/**
|
|
78
|
-
* Shows the bottom bar
|
|
79
|
-
* @returns {BottomAppBarComponent} BottomAppBarComponent instance for chaining
|
|
80
|
-
*/
|
|
81
17
|
show(): this;
|
|
82
|
-
/**
|
|
83
|
-
* Hides the bottom bar
|
|
84
|
-
* @returns {BottomAppBarComponent} BottomAppBarComponent instance for chaining
|
|
85
|
-
*/
|
|
86
18
|
hide(): this;
|
|
87
|
-
/**
|
|
88
|
-
* Checks if the bottom bar is visible
|
|
89
|
-
* @returns {boolean} Whether the bottom bar is visible
|
|
90
|
-
*/
|
|
91
19
|
isVisible: () => boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Get the actions container element
|
|
94
|
-
* @returns {HTMLElement} Actions container element
|
|
95
|
-
*/
|
|
96
20
|
getActionsContainer: () => HTMLElement;
|
|
97
21
|
}
|
|
@@ -1,24 +1,3 @@
|
|
|
1
1
|
import { BottomSheetConfig, BottomSheetComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a bottom sheet: a surface anchored to the bottom edge holding
|
|
4
|
-
* content secondary to the page.
|
|
5
|
-
*
|
|
6
|
-
* A modal sheet covers the page with a scrim and takes focus, for a task that
|
|
7
|
-
* must finish first. A standard sheet leaves the page usable alongside it.
|
|
8
|
-
*
|
|
9
|
-
* @param {BottomSheetConfig} config - Bottom sheet configuration
|
|
10
|
-
* @returns {BottomSheetComponent} Bottom sheet instance
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const sheet = createBottomSheet({
|
|
15
|
-
* title: 'Share',
|
|
16
|
-
* content: '<p>Choose where to send it.</p>',
|
|
17
|
-
* on: { close: () => console.info('closed') }
|
|
18
|
-
* });
|
|
19
|
-
*
|
|
20
|
-
* sheet.open();
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
2
|
declare const createBottomSheet: (config?: BottomSheetConfig) => BottomSheetComponent;
|
|
24
3
|
export default createBottomSheet;
|
|
@@ -1,47 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bottom sheet variants.
|
|
3
|
-
*
|
|
4
|
-
* A standard sheet sits alongside the page and leaves it usable. A modal sheet
|
|
5
|
-
* puts a scrim over the page and takes focus, so it is the one to reach for
|
|
6
|
-
* when the sheet's task must finish before anything else continues.
|
|
7
|
-
*/
|
|
8
1
|
export declare const BOTTOM_SHEET_VARIANTS: {
|
|
9
2
|
readonly STANDARD: "standard";
|
|
10
3
|
readonly MODAL: "modal";
|
|
11
4
|
};
|
|
12
|
-
/**
|
|
13
|
-
* How far the sheet is open.
|
|
14
|
-
*
|
|
15
|
-
* `partial` shows the peek height, enough to say what the sheet holds without
|
|
16
|
-
* covering the page. `expanded` shows as much as the content needs.
|
|
17
|
-
*/
|
|
18
5
|
export declare const BOTTOM_SHEET_STATES: {
|
|
19
6
|
readonly HIDDEN: "hidden";
|
|
20
7
|
readonly PARTIAL: "partial";
|
|
21
8
|
readonly EXPANDED: "expanded";
|
|
22
9
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Defaults, from Compose BottomSheetDefaults and SheetBottomTokens.
|
|
25
|
-
*/
|
|
26
10
|
export declare const BOTTOM_SHEET_DEFAULTS: {
|
|
27
11
|
readonly VARIANT: "modal";
|
|
28
|
-
/** BottomSheetDefaults.SheetMaxWidth; wider viewports centre the sheet */
|
|
29
12
|
readonly MAX_WIDTH: 640;
|
|
30
|
-
/** A drag handle is part of the anatomy, so it is on unless asked otherwise */
|
|
31
13
|
readonly DRAG_HANDLE: true;
|
|
32
14
|
readonly CLOSE_ON_SCRIM_CLICK: true;
|
|
33
15
|
readonly CLOSE_ON_ESCAPE: true;
|
|
34
|
-
/**
|
|
35
|
-
* BottomSheetDefaults.PositionalThreshold: how far the sheet must be dragged
|
|
36
|
-
* before it settles at the next anchor rather than springing back.
|
|
37
|
-
*/
|
|
38
16
|
readonly POSITIONAL_THRESHOLD: 56;
|
|
39
|
-
/** BottomSheetDefaults.VelocityThreshold, in dp per second */
|
|
40
17
|
readonly VELOCITY_THRESHOLD: 125;
|
|
41
18
|
};
|
|
42
|
-
/**
|
|
43
|
-
* Class names, without the prefix. `getClass` adds it.
|
|
44
|
-
*/
|
|
45
19
|
export declare const BOTTOM_SHEET_CLASSES: {
|
|
46
20
|
readonly ROOT: "bottom-sheet";
|
|
47
21
|
readonly SCRIM: "bottom-sheet__scrim";
|
|
@@ -51,9 +25,6 @@ export declare const BOTTOM_SHEET_CLASSES: {
|
|
|
51
25
|
readonly TITLE: "bottom-sheet__title";
|
|
52
26
|
readonly CONTENT: "bottom-sheet__content";
|
|
53
27
|
};
|
|
54
|
-
/**
|
|
55
|
-
* Events the sheet emits.
|
|
56
|
-
*/
|
|
57
28
|
export declare const BOTTOM_SHEET_EVENTS: {
|
|
58
29
|
readonly OPEN: "open";
|
|
59
30
|
readonly CLOSE: "close";
|