material 3.2.5 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/features/items.js +3 -2
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +0 -34
- package/dist/components/extended-fab/types.d.ts +0 -654
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +0 -33
- package/dist/components/fab/types.d.ts +0 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tab.js +26 -3
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/badge.js +45 -0
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -14
- package/dist/core/navigation/destinations.js +18 -5
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +0 -18
- package/dist/elements/card.d.ts +8 -24
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/badge.css +1 -1
- package/dist/elements/css/badge.js +1 -1
- package/dist/elements/css/navigation-rail.css +1 -1
- package/dist/elements/css/navigation-rail.js +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +6 -18
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +4 -17
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- package/dist/elements/preupgrade/badge.css +2 -2
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +0 -9
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +2 -2
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +2 -2
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/runtime.d.ts +8 -62
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/components/_badge.scss +75 -38
- package/src/styles/components/_navigation-rail.scss +9 -6
- package/src/styles/elements/_badge.scss +65 -4
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,143 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration options for divider components
|
|
3
|
-
*
|
|
4
|
-
* Controls the appearance, orientation, and behavior of Material Design 3 dividers.
|
|
5
|
-
*
|
|
6
|
-
* @category Components
|
|
7
|
-
*/
|
|
8
1
|
export interface DividerConfig {
|
|
9
|
-
/**
|
|
10
|
-
* CSS class prefix (defaults to 'mtrl')
|
|
11
|
-
*
|
|
12
|
-
* Used for generating BEM-style class names for the component
|
|
13
|
-
*/
|
|
14
2
|
prefix?: string;
|
|
15
|
-
/**
|
|
16
|
-
* CSS class to add to the divider
|
|
17
|
-
*
|
|
18
|
-
* Additional classes for custom styling needs.
|
|
19
|
-
* Can be a single class string or an array of class strings.
|
|
20
|
-
*
|
|
21
|
-
* @example 'my-custom-divider' or ['my-custom-divider', 'special-spacing']
|
|
22
|
-
*/
|
|
23
3
|
class?: string | string[];
|
|
24
|
-
/**
|
|
25
|
-
* Orientation of the divider
|
|
26
|
-
*
|
|
27
|
-
* - 'horizontal': Creates a horizontal line (default)
|
|
28
|
-
* - 'vertical': Creates a vertical line
|
|
29
|
-
*
|
|
30
|
-
* @default 'horizontal'
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* // Create a vertical divider
|
|
35
|
-
* createDivider({ orientation: 'vertical' })
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
4
|
orientation?: 'horizontal' | 'vertical';
|
|
39
|
-
/**
|
|
40
|
-
* Variant of the divider
|
|
41
|
-
*
|
|
42
|
-
* Controls how the divider is inset within its container:
|
|
43
|
-
* - 'full-width': Spans the entire width/height (default)
|
|
44
|
-
* - 'inset': Adds space at the start (left for horizontal, top for vertical)
|
|
45
|
-
* - 'middle-inset': Adds space at both start and end
|
|
46
|
-
*
|
|
47
|
-
* Most commonly used in lists to align dividers with text content.
|
|
48
|
-
*
|
|
49
|
-
* @default 'full-width'
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* // Create a list divider with left inset
|
|
54
|
-
* createDivider({ variant: 'inset' })
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
5
|
variant?: 'full-width' | 'inset' | 'middle-inset';
|
|
58
|
-
/**
|
|
59
|
-
* Custom inset value (left margin for horizontal, top margin for vertical)
|
|
60
|
-
*
|
|
61
|
-
* Overrides the default inset spacing at the start of the divider.
|
|
62
|
-
* Only applies when variant is 'inset' or 'middle-inset'.
|
|
63
|
-
*
|
|
64
|
-
* @default 16 for 'inset' and 'middle-inset' variants
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* // Create a divider with 24px left inset
|
|
69
|
-
* createDivider({ variant: 'inset', insetStart: 24 })
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
6
|
insetStart?: number;
|
|
73
|
-
/**
|
|
74
|
-
* Custom inset end value (right margin for horizontal, bottom margin for vertical)
|
|
75
|
-
*
|
|
76
|
-
* Overrides the default inset spacing at the end of the divider.
|
|
77
|
-
* Only applies when variant is 'middle-inset'.
|
|
78
|
-
*
|
|
79
|
-
* @default 0 for 'inset', 16 for 'middle-inset'
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* ```typescript
|
|
83
|
-
* // Create a divider with custom insets on both sides
|
|
84
|
-
* createDivider({ variant: 'middle-inset', insetStart: 16, insetEnd: 24 })
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
7
|
insetEnd?: number;
|
|
88
|
-
/**
|
|
89
|
-
* Color of the divider
|
|
90
|
-
*
|
|
91
|
-
* Sets a custom color for the divider. Accepts any valid CSS color value.
|
|
92
|
-
* By default, dividers use the 'outline-variant' color from the Material theme.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* ```typescript
|
|
96
|
-
* // Create a blue divider
|
|
97
|
-
* createDivider({ color: '#2196F3' })
|
|
98
|
-
*
|
|
99
|
-
* // Create a divider with a semi-transparent color
|
|
100
|
-
* createDivider({ color: 'rgba(0, 0, 0, 0.12)' })
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
8
|
color?: string;
|
|
104
|
-
/**
|
|
105
|
-
* Thickness of the divider in pixels
|
|
106
|
-
*
|
|
107
|
-
* Controls the thickness (height for horizontal, width for vertical) of the divider.
|
|
108
|
-
* Material Design 3 typically uses 1px thickness for dividers.
|
|
109
|
-
*
|
|
110
|
-
* @default 1
|
|
111
|
-
*
|
|
112
|
-
* @example
|
|
113
|
-
* ```typescript
|
|
114
|
-
* // Create a bold divider
|
|
115
|
-
* createDivider({ thickness: 2 })
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
9
|
thickness?: number;
|
|
119
|
-
/**
|
|
120
|
-
* Used internally for component composition
|
|
121
|
-
*
|
|
122
|
-
* @internal
|
|
123
|
-
*/
|
|
124
10
|
componentName?: string;
|
|
125
11
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Default configuration for dividers
|
|
128
|
-
*
|
|
129
|
-
* @internal
|
|
130
|
-
*/
|
|
131
12
|
export declare const defaultConfig: Partial<DividerConfig>;
|
|
132
|
-
/**
|
|
133
|
-
* Creates a base configuration object for divider
|
|
134
|
-
*
|
|
135
|
-
* Merges user-provided configuration with default values and ensures
|
|
136
|
-
* all required properties have values.
|
|
137
|
-
*
|
|
138
|
-
* @param config - User provided configuration
|
|
139
|
-
* @returns Complete configuration with defaults applied
|
|
140
|
-
*
|
|
141
|
-
* @internal
|
|
142
|
-
*/
|
|
143
13
|
export declare const createBaseConfig: (config?: DividerConfig) => DividerConfig;
|
|
@@ -1,45 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Divider orientation options
|
|
3
|
-
*/
|
|
4
1
|
export declare const DIVIDER_ORIENTATIONS: {
|
|
5
|
-
/** Horizontal divider (default) */
|
|
6
2
|
readonly HORIZONTAL: "horizontal";
|
|
7
|
-
/** Vertical divider */
|
|
8
3
|
readonly VERTICAL: "vertical";
|
|
9
4
|
};
|
|
10
|
-
/**
|
|
11
|
-
* Divider variant options
|
|
12
|
-
*/
|
|
13
5
|
export declare const DIVIDER_VARIANTS: {
|
|
14
|
-
/** Spans the entire width/height of the container (default) */
|
|
15
6
|
readonly FULL_WIDTH: "full-width";
|
|
16
|
-
/** Adds space at the start (left for horizontal, top for vertical) */
|
|
17
7
|
readonly INSET: "inset";
|
|
18
|
-
/** Adds space at both start and end */
|
|
19
8
|
readonly MIDDLE_INSET: "middle-inset";
|
|
20
9
|
};
|
|
21
|
-
/**
|
|
22
|
-
* Default divider thickness in pixels
|
|
23
|
-
* Following Material Design 3 guidelines
|
|
24
|
-
*/
|
|
25
10
|
export declare const DEFAULT_DIVIDER_THICKNESS = 1;
|
|
26
|
-
/**
|
|
27
|
-
* Default inset value in pixels
|
|
28
|
-
* Applied when variant is 'inset' or 'middle-inset'
|
|
29
|
-
*/
|
|
30
11
|
export declare const DEFAULT_INSET_VALUE = 16;
|
|
31
|
-
/**
|
|
32
|
-
* CSS classes used by the divider component
|
|
33
|
-
*/
|
|
34
12
|
export declare const DIVIDER_CLASSES: {
|
|
35
|
-
/** Root divider element */
|
|
36
13
|
readonly ROOT: "divider";
|
|
37
|
-
/** Applied to horizontal dividers */
|
|
38
14
|
readonly HORIZONTAL: "divider--horizontal";
|
|
39
|
-
/** Applied to vertical dividers */
|
|
40
15
|
readonly VERTICAL: "divider--vertical";
|
|
41
|
-
/** Applied to inset dividers */
|
|
42
16
|
readonly INSET: "divider--inset";
|
|
43
|
-
/** Applied to middle-inset dividers */
|
|
44
17
|
readonly MIDDLE_INSET: "divider--middle-inset";
|
|
45
18
|
};
|
|
@@ -1,39 +1,3 @@
|
|
|
1
1
|
import { DividerConfig } from "./config.js";
|
|
2
2
|
import { DividerComponent } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new Divider component with the specified configuration.
|
|
5
|
-
*
|
|
6
|
-
* Dividers are thin lines that separate content into distinct sections following
|
|
7
|
-
* Material Design 3 guidelines. They can be horizontal or vertical, and offer
|
|
8
|
-
* various customization options for inset, thickness, and color.
|
|
9
|
-
*
|
|
10
|
-
* @param config - Divider configuration options
|
|
11
|
-
* @returns Divider component instance with methods for managing appearance and behavior
|
|
12
|
-
*
|
|
13
|
-
* @throws {Error} If divider creation fails due to invalid configuration
|
|
14
|
-
*
|
|
15
|
-
* @category Components
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* // Create a basic horizontal divider
|
|
20
|
-
* const divider = createDivider();
|
|
21
|
-
* container.appendChild(divider.element);
|
|
22
|
-
*
|
|
23
|
-
* // Create a vertical divider with custom styling
|
|
24
|
-
* const separator = createDivider({
|
|
25
|
-
* orientation: 'vertical',
|
|
26
|
-
* thickness: 2,
|
|
27
|
-
* color: '#2196F3',
|
|
28
|
-
* variant: 'middle-inset',
|
|
29
|
-
* insetStart: 8,
|
|
30
|
-
* insetEnd: 8
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // Later, change the divider's appearance
|
|
34
|
-
* divider.setColor('var(--mtrl-sys-color-outline)');
|
|
35
|
-
* divider.setThickness(1);
|
|
36
|
-
* divider.setVariant('inset');
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
3
|
export declare const createDivider: (config?: DividerConfig) => DividerComponent;
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Divider
|
|
3
|
-
*
|
|
4
|
-
* The Divider component provides horizontal or vertical lines that separate content into distinct sections.
|
|
5
|
-
* Dividers follow Material Design 3 guidelines for separating content in lists, layouts, and other UI containers.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Horizontal and vertical orientations
|
|
9
|
-
* - Multiple inset variants (full-width, inset, middle-inset)
|
|
10
|
-
* - Customizable thickness and color
|
|
11
|
-
* - Responsive to parent container
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```typescript
|
|
15
|
-
* // Create a standard horizontal divider
|
|
16
|
-
* const divider = createDivider();
|
|
17
|
-
* document.body.appendChild(divider.element);
|
|
18
|
-
*
|
|
19
|
-
* // Create a vertical divider with custom styles
|
|
20
|
-
* const verticalDivider = createDivider({
|
|
21
|
-
* orientation: 'vertical',
|
|
22
|
-
* thickness: 2,
|
|
23
|
-
* color: '#2196F3',
|
|
24
|
-
* variant: 'middle-inset'
|
|
25
|
-
* });
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @category Components
|
|
29
|
-
*/
|
|
30
1
|
import { createDivider } from "./divider.js";
|
|
31
2
|
export { createDivider, createDivider as default };
|
|
32
3
|
export type { DividerConfig } from "./config.js";
|
|
@@ -1,142 +1,16 @@
|
|
|
1
1
|
import { BaseComponent, ElementComponent } from "../../core/compose/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* The three slices of a divider, one per enhancer in features.ts.
|
|
4
|
-
*
|
|
5
|
-
* Each is its own interface rather than a Pick of DividerComponent: an indexed
|
|
6
|
-
* access binds `this` to the type being indexed, so a setter reached through a
|
|
7
|
-
* Pick reports the whole DividerComponent instead of the component it was
|
|
8
|
-
* called on -- which is the defect these setters used to paper over with
|
|
9
|
-
* `return this as unknown as DividerComponent`.
|
|
10
|
-
*/
|
|
11
2
|
export interface DividerOrientation {
|
|
12
|
-
/**
|
|
13
|
-
* Gets current orientation of the divider
|
|
14
|
-
*
|
|
15
|
-
* @returns Current orientation ('horizontal' or 'vertical')
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const divider = createDivider();
|
|
20
|
-
* const orientation = divider.getOrientation(); // Returns 'horizontal' by default
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
3
|
getOrientation(): 'horizontal' | 'vertical';
|
|
24
|
-
/**
|
|
25
|
-
* Sets orientation of the divider
|
|
26
|
-
*
|
|
27
|
-
* Changes the divider's orientation between horizontal (default) and vertical.
|
|
28
|
-
* This affects the divider's positioning, dimension constraints, and how insets are applied.
|
|
29
|
-
*
|
|
30
|
-
* @param orientation - New orientation ('horizontal' or 'vertical')
|
|
31
|
-
* @returns DividerComponent instance for chaining
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* // Change a divider from horizontal to vertical
|
|
36
|
-
* divider.setOrientation('vertical');
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
4
|
setOrientation(orientation: 'horizontal' | 'vertical'): this;
|
|
40
5
|
}
|
|
41
|
-
/** The inset slice. See DividerOrientation for why these are split. */
|
|
42
6
|
export interface DividerInset {
|
|
43
|
-
/**
|
|
44
|
-
* Gets current variant of the divider
|
|
45
|
-
*
|
|
46
|
-
* @returns Current variant ('full-width', 'inset', or 'middle-inset')
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const variant = divider.getVariant(); // Returns 'full-width' by default
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
7
|
getVariant(): 'full-width' | 'inset' | 'middle-inset';
|
|
54
|
-
/**
|
|
55
|
-
* Sets variant of the divider
|
|
56
|
-
*
|
|
57
|
-
* Changes how the divider is inset within its container:
|
|
58
|
-
* - 'full-width': Spans the entire width/height of the container (default)
|
|
59
|
-
* - 'inset': Adds space at the start (left for horizontal, top for vertical)
|
|
60
|
-
* - 'middle-inset': Adds space at both start and end
|
|
61
|
-
*
|
|
62
|
-
* @param variant - New variant
|
|
63
|
-
* @returns DividerComponent instance for chaining
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```typescript
|
|
67
|
-
* // Create a list divider with left inset
|
|
68
|
-
* divider.setVariant('inset');
|
|
69
|
-
*
|
|
70
|
-
* // Create a divider with space on both sides
|
|
71
|
-
* divider.setVariant('middle-inset');
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
8
|
setVariant(variant: 'full-width' | 'inset' | 'middle-inset'): this;
|
|
75
|
-
/**
|
|
76
|
-
* Sets custom inset values for the divider
|
|
77
|
-
*
|
|
78
|
-
* Allows fine-grained control over inset spacing, overriding the default values
|
|
79
|
-
* applied by the variant. Only applies if variant is 'inset' or 'middle-inset'.
|
|
80
|
-
*
|
|
81
|
-
* @param insetStart - Start inset value in pixels (left for horizontal, top for vertical)
|
|
82
|
-
* @param insetEnd - End inset value in pixels (right for horizontal, bottom for vertical)
|
|
83
|
-
* @returns DividerComponent instance for chaining
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```typescript
|
|
87
|
-
* // Create a divider with custom insets
|
|
88
|
-
* const divider = createDivider({ variant: 'inset' });
|
|
89
|
-
* divider.setInset(24, 8); // 24px from start, 8px from end
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
9
|
setInset(insetStart?: number, insetEnd?: number): this;
|
|
93
10
|
}
|
|
94
|
-
/** The style slice. See DividerOrientation for why these are split. */
|
|
95
11
|
export interface DividerStyle {
|
|
96
|
-
/**
|
|
97
|
-
* Sets thickness of the divider
|
|
98
|
-
*
|
|
99
|
-
* Changes the divider's thickness (height for horizontal, width for vertical).
|
|
100
|
-
* The default thickness is 1px, following Material Design 3 guidelines.
|
|
101
|
-
*
|
|
102
|
-
* @param thickness - Thickness in pixels
|
|
103
|
-
* @returns DividerComponent instance for chaining
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```typescript
|
|
107
|
-
* // Create a bold divider
|
|
108
|
-
* divider.setThickness(2);
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
12
|
setThickness(thickness: number): this;
|
|
112
|
-
/**
|
|
113
|
-
* Sets custom color for the divider
|
|
114
|
-
*
|
|
115
|
-
* By default, dividers use the 'outline-variant' color from the theme.
|
|
116
|
-
* This method allows setting a custom color via any valid CSS color value.
|
|
117
|
-
*
|
|
118
|
-
* @param color - CSS color value (hex, rgb, rgba, hsl, etc.)
|
|
119
|
-
* @returns DividerComponent instance for chaining
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* ```typescript
|
|
123
|
-
* // Create a blue divider
|
|
124
|
-
* divider.setColor('#2196F3');
|
|
125
|
-
*
|
|
126
|
-
* // Create a semi-transparent divider
|
|
127
|
-
* divider.setColor('rgba(0, 0, 0, 0.12)');
|
|
128
|
-
* ```
|
|
129
|
-
*/
|
|
130
13
|
setColor(color: string): this;
|
|
131
14
|
}
|
|
132
|
-
/**
|
|
133
|
-
* Divider component interface
|
|
134
|
-
*
|
|
135
|
-
* Represents a Material Design 3 divider that separates content into distinct
|
|
136
|
-
* sections. Provides methods for configuring the appearance, orientation, and
|
|
137
|
-
* inset behavior.
|
|
138
|
-
*
|
|
139
|
-
* @category Components
|
|
140
|
-
*/
|
|
141
15
|
export interface DividerComponent extends BaseComponent, ElementComponent, DividerOrientation, DividerInset, DividerStyle {
|
|
142
16
|
}
|
|
@@ -1,99 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Drawer variants matching MD3 navigation drawer specification
|
|
3
|
-
*/
|
|
4
1
|
export declare const DRAWER_VARIANTS: {
|
|
5
|
-
/** Standard drawer — inline, can be permanently visible or toggled */
|
|
6
2
|
readonly STANDARD: "standard";
|
|
7
|
-
/** Modal drawer — overlays content with scrim, for compact/medium screens */
|
|
8
3
|
readonly MODAL: "modal";
|
|
9
4
|
};
|
|
10
|
-
/**
|
|
11
|
-
* Drawer positions (anchor edge)
|
|
12
|
-
*/
|
|
13
5
|
export declare const DRAWER_POSITIONS: {
|
|
14
|
-
/** Start edge (left in LTR, right in RTL) — default per MD3 */
|
|
15
6
|
readonly START: "start";
|
|
16
|
-
/** End edge (right in LTR, left in RTL) */
|
|
17
7
|
readonly END: "end";
|
|
18
8
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Drawer item types for the items configuration array
|
|
21
|
-
*/
|
|
22
9
|
export declare const DRAWER_ITEM_TYPES: {
|
|
23
|
-
/** Navigation destination item */
|
|
24
10
|
readonly ITEM: "item";
|
|
25
|
-
/** Visual separator between groups */
|
|
26
11
|
readonly DIVIDER: "divider";
|
|
27
|
-
/** Section label / subhead for grouping */
|
|
28
12
|
readonly SECTION: "section";
|
|
29
13
|
};
|
|
30
|
-
/**
|
|
31
|
-
* Drawer events
|
|
32
|
-
*/
|
|
33
14
|
export declare const DRAWER_EVENTS: {
|
|
34
|
-
/** Fired when the drawer opens */
|
|
35
15
|
readonly OPEN: "open";
|
|
36
|
-
/** Fired when the drawer closes */
|
|
37
16
|
readonly CLOSE: "close";
|
|
38
|
-
/** Fired when a navigation item is selected */
|
|
39
17
|
readonly SELECT: "select";
|
|
40
18
|
};
|
|
41
|
-
/**
|
|
42
|
-
* CSS classes used by the drawer component
|
|
43
|
-
*/
|
|
44
19
|
export declare const DRAWER_CLASSES: {
|
|
45
|
-
/** Root container */
|
|
46
20
|
readonly ROOT: "drawer";
|
|
47
|
-
/** Scrim overlay (modal variant only) */
|
|
48
21
|
readonly SCRIM: "drawer__scrim";
|
|
49
|
-
/** Inner sheet / panel */
|
|
50
22
|
readonly SHEET: "drawer__sheet";
|
|
51
|
-
/** Headline text */
|
|
52
23
|
readonly HEADLINE: "drawer__headline";
|
|
53
|
-
/** Scrollable items container */
|
|
54
24
|
readonly ITEMS: "drawer__items";
|
|
55
|
-
/** Single navigation item */
|
|
56
25
|
readonly ITEM: "drawer__item";
|
|
57
|
-
/** Item icon */
|
|
58
26
|
readonly ITEM_ICON: "drawer__item-icon";
|
|
59
|
-
/** Item label text */
|
|
60
27
|
readonly ITEM_LABEL: "drawer__item-label";
|
|
61
|
-
/** Item badge */
|
|
62
28
|
readonly ITEM_BADGE: "drawer__item-badge";
|
|
63
|
-
/** Active indicator shape */
|
|
64
29
|
readonly ACTIVE_INDICATOR: "drawer__active-indicator";
|
|
65
|
-
/** Dense/compact variant */
|
|
66
30
|
readonly DENSE: "drawer--dense";
|
|
67
|
-
/** Divider separator */
|
|
68
31
|
readonly DIVIDER: "drawer__divider";
|
|
69
|
-
/** Section label */
|
|
70
32
|
readonly SECTION_LABEL: "drawer__section-label";
|
|
71
33
|
};
|
|
72
|
-
/**
|
|
73
|
-
* Default animation configuration
|
|
74
|
-
*/
|
|
75
34
|
export declare const DRAWER_ANIMATION: {
|
|
76
|
-
/** Animation duration in milliseconds */
|
|
77
35
|
readonly DURATION: 300;
|
|
78
|
-
/** Easing for opening */
|
|
79
36
|
readonly EASING_OPEN: "cubic-bezier(0.0, 0.0, 0.2, 1.0)";
|
|
80
|
-
/** Easing for closing */
|
|
81
37
|
readonly EASING_CLOSE: "cubic-bezier(0.3, 0.0, 1.0, 1.0)";
|
|
82
38
|
};
|
|
83
|
-
/**
|
|
84
|
-
* Drawer default values
|
|
85
|
-
*/
|
|
86
39
|
export declare const DRAWER_DEFAULTS: {
|
|
87
|
-
/** Default variant */
|
|
88
40
|
readonly VARIANT: "standard";
|
|
89
|
-
/** Default position */
|
|
90
41
|
readonly POSITION: "start";
|
|
91
|
-
/** Whether drawer is open by default */
|
|
92
42
|
readonly OPEN: false;
|
|
93
|
-
/** Whether modal can be dismissed via scrim */
|
|
94
43
|
readonly DISMISSIBLE: true;
|
|
95
|
-
/** Default drawer width in pixels */
|
|
96
44
|
readonly WIDTH: 360;
|
|
97
|
-
/** Whether items ripple on press */
|
|
98
45
|
readonly RIPPLE: true;
|
|
99
46
|
};
|
|
@@ -1,59 +1,3 @@
|
|
|
1
1
|
import { DrawerConfig, DrawerComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new Drawer component with the specified configuration.
|
|
4
|
-
*
|
|
5
|
-
* The Drawer component implements Material Design 3 navigation drawer with
|
|
6
|
-
* support for standard (inline) and modal (overlay) variants. It provides
|
|
7
|
-
* navigation destinations with icons, labels, badges, dividers, and section
|
|
8
|
-
* labels following the MD3 specification.
|
|
9
|
-
*
|
|
10
|
-
* The Drawer component is created using a functional composition pattern,
|
|
11
|
-
* applying various features through the pipe function.
|
|
12
|
-
*
|
|
13
|
-
* @param {DrawerConfig} config - Configuration options for the drawer
|
|
14
|
-
* This can include variant, items, headline, position, open state,
|
|
15
|
-
* and other drawer properties. See {@link DrawerConfig} for available options.
|
|
16
|
-
*
|
|
17
|
-
* @returns {DrawerComponent} A fully configured drawer component instance with
|
|
18
|
-
* all requested features applied. The returned component has methods for
|
|
19
|
-
* state management, item selection, and lifecycle management.
|
|
20
|
-
*
|
|
21
|
-
* @throws {Error} Throws an error if drawer creation fails for any reason
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* // Create a standard navigation drawer
|
|
26
|
-
* const drawer = createDrawer({
|
|
27
|
-
* variant: 'standard',
|
|
28
|
-
* headline: 'Mail',
|
|
29
|
-
* open: true,
|
|
30
|
-
* items: [
|
|
31
|
-
* { id: 'inbox', label: 'Inbox', icon: '<svg>...</svg>', badge: '24', active: true },
|
|
32
|
-
* { id: 'outbox', label: 'Outbox', icon: '<svg>...</svg>' },
|
|
33
|
-
* { type: 'divider' },
|
|
34
|
-
* { type: 'section', label: 'Labels' },
|
|
35
|
-
* { id: 'family', label: 'Family', icon: '<svg>...</svg>' },
|
|
36
|
-
* ],
|
|
37
|
-
* onSelect: (event) => console.log('Selected:', event.id),
|
|
38
|
-
* });
|
|
39
|
-
*
|
|
40
|
-
* document.body.appendChild(drawer.element);
|
|
41
|
-
*
|
|
42
|
-
* // Create a modal drawer
|
|
43
|
-
* const modalDrawer = createDrawer({
|
|
44
|
-
* variant: 'modal',
|
|
45
|
-
* headline: 'Navigation',
|
|
46
|
-
* items: [
|
|
47
|
-
* { id: 'home', label: 'Home', icon: '<svg>...</svg>', active: true },
|
|
48
|
-
* { id: 'settings', label: 'Settings', icon: '<svg>...</svg>' },
|
|
49
|
-
* ],
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* document.body.appendChild(modalDrawer.element);
|
|
53
|
-
* modalDrawer.open();
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @category Components
|
|
57
|
-
*/
|
|
58
2
|
declare const createDrawer: (config?: DrawerConfig) => DrawerComponent;
|
|
59
3
|
export default createDrawer;
|
|
@@ -2,6 +2,7 @@ import { DRAWER_EVENTS } from "../constants.js";
|
|
|
2
2
|
import { createRipple, } from "../../../core/compose/features/ripple.js";
|
|
3
3
|
import { setHTML } from "../../../core/dom/html.js";
|
|
4
4
|
import { activeElementOf } from "../../../core/dom/focus.js";
|
|
5
|
+
const hasBadge = (badge) => !!badge && badge !== "0";
|
|
5
6
|
const createItemElement = (item, getClass) => {
|
|
6
7
|
const el = document.createElement("button");
|
|
7
8
|
el.className = getClass("drawer__item");
|
|
@@ -30,7 +31,7 @@ const createItemElement = (item, getClass) => {
|
|
|
30
31
|
labelEl.textContent = item.label;
|
|
31
32
|
el.appendChild(labelEl);
|
|
32
33
|
}
|
|
33
|
-
if (item.badge) {
|
|
34
|
+
if (hasBadge(item.badge)) {
|
|
34
35
|
const badgeEl = document.createElement("span");
|
|
35
36
|
badgeEl.className = getClass("drawer__item-badge");
|
|
36
37
|
badgeEl.textContent = item.badge;
|
|
@@ -143,7 +144,7 @@ export const withItems = (config) => (component) => {
|
|
|
143
144
|
if (!itemEl)
|
|
144
145
|
return;
|
|
145
146
|
let badgeEl = itemEl.querySelector(`.${component.getClass("drawer__item-badge")}`);
|
|
146
|
-
if (badge) {
|
|
147
|
+
if (hasBadge(badge)) {
|
|
147
148
|
if (!badgeEl) {
|
|
148
149
|
badgeEl = document.createElement("span");
|
|
149
150
|
badgeEl.className = component.getClass("drawer__item-badge");
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Drawer component module
|
|
3
|
-
* @module components/drawer
|
|
4
|
-
*/
|
|
5
1
|
export { default, default as createDrawer } from "./drawer.js";
|
|
6
2
|
export type { DrawerConfig, DrawerComponent, DrawerVariant, DrawerPosition, DrawerItemConfig, DrawerSelectEvent, DrawerEvents, } from "./types.js";
|