material 3.2.6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/config.js +3 -2
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +1 -35
- package/dist/components/extended-fab/types.d.ts +2 -654
- package/dist/components/fab/config.js +3 -2
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +1 -34
- package/dist/components/fab/types.d.ts +2 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -23
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +24 -18
- package/dist/elements/button.js +12 -0
- package/dist/elements/card.d.ts +12 -24
- package/dist/elements/card.js +3 -2
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/extended-fab.css +1 -1
- package/dist/elements/css/extended-fab.js +1 -1
- package/dist/elements/css/fab-menu.css +1 -1
- package/dist/elements/css/fab-menu.js +1 -1
- package/dist/elements/css/fab.css +1 -1
- package/dist/elements/css/fab.js +1 -1
- package/dist/elements/css/hosts/extended-fab.css +1 -1
- package/dist/elements/css/hosts/fab.css +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +10 -18
- package/dist/elements/extended-fab.js +3 -1
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +8 -17
- package/dist/elements/fab.js +3 -1
- package/dist/elements/floating-placement.js +1 -0
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +2 -2
- package/dist/elements/preupgrade/card.css +2 -2
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +2 -2
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +2 -2
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +1 -10
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +2 -2
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +2 -2
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/Button.svelte +5 -4
- package/dist/svelte/runtime.d.ts +8 -62
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/abstract/_floating-placement.scss +12 -0
- package/src/styles/components/_extended-fab.scss +34 -8
- package/src/styles/components/_fab-menu.scss +58 -8
- package/src/styles/components/_fab.scss +34 -8
- package/src/styles/elements/_button.scss +27 -5
- package/src/styles/elements/_card.scss +14 -0
- package/src/styles/elements/_extended-fab.scss +2 -0
- package/src/styles/elements/_fab.scss +2 -0
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,130 +1,38 @@
|
|
|
1
1
|
import type { ButtonConfig, ButtonComponent } from "../button/types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Button group orientation
|
|
4
|
-
* @category Components
|
|
5
|
-
*/
|
|
6
2
|
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
7
|
-
/**
|
|
8
|
-
* Button group variant - applies to all buttons in the group
|
|
9
|
-
* @category Components
|
|
10
|
-
*/
|
|
11
3
|
export type ButtonGroupVariant = "filled" | "tonal" | "outlined" | "elevated" | "text";
|
|
12
|
-
/**
|
|
13
|
-
* Button group density options
|
|
14
|
-
* Controls the overall sizing and spacing of buttons in the group
|
|
15
|
-
* @category Components
|
|
16
|
-
*/
|
|
17
4
|
export type ButtonGroupDensity = "default" | "comfortable" | "compact";
|
|
18
|
-
/**
|
|
19
|
-
* Event types for button group
|
|
20
|
-
*/
|
|
21
5
|
export type ButtonGroupEventType = "click" | "focus" | "blur" | "change";
|
|
22
|
-
/**
|
|
23
|
-
* Material 3 button group kinds.
|
|
24
|
-
* - "standard": padding between buttons; a selected button morphs from round
|
|
25
|
-
* to square and its neighbours adjust.
|
|
26
|
-
* - "connected": 2dp between buttons, round outer corners, square inner
|
|
27
|
-
* corners; selection changes only the selected button. Replaces the
|
|
28
|
-
* segmented button for single- and multi-select.
|
|
29
|
-
*/
|
|
30
6
|
export type ButtonGroupKind = "standard" | "connected";
|
|
31
7
|
export type ButtonGroupSelection = "none" | "single" | "multi";
|
|
32
8
|
export type ButtonGroupShape = "round" | "square";
|
|
33
9
|
export type ButtonGroupSize = "xs" | "s" | "m" | "l" | "xl";
|
|
34
|
-
/** Label display: always, or only on the selected button (icon-only otherwise) */
|
|
35
10
|
export type ButtonGroupLabels = "always" | "selected";
|
|
36
|
-
/** Payload of the "change" event: the selection after the change. */
|
|
37
11
|
export interface ButtonGroupChangeEvent {
|
|
38
12
|
buttonGroup: ButtonGroupComponent;
|
|
39
|
-
/** Values of the selected buttons, in button order */
|
|
40
13
|
values: string[];
|
|
41
|
-
/**
|
|
42
|
-
* The selection in the `value` shape of the `<m-button-group>` element's
|
|
43
|
-
* `change`: an array for a multi-select group, a string or null otherwise.
|
|
44
|
-
*/
|
|
45
14
|
value: string | string[] | null;
|
|
46
15
|
selected: ButtonComponent[];
|
|
47
|
-
/** The button whose click caused the change, if any */
|
|
48
16
|
button?: ButtonComponent;
|
|
49
17
|
originalEvent?: Event;
|
|
50
18
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Event data for button group events
|
|
53
|
-
*/
|
|
54
19
|
export interface ButtonGroupEvent {
|
|
55
|
-
/** The button group component that contains the clicked button */
|
|
56
20
|
buttonGroup: ButtonGroupComponent;
|
|
57
|
-
/** The button component that was clicked */
|
|
58
21
|
button: ButtonComponent;
|
|
59
|
-
/** Index of the button in the group */
|
|
60
22
|
index: number;
|
|
61
|
-
/** Original DOM event */
|
|
62
23
|
originalEvent: Event;
|
|
63
24
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Configuration for a single button within a button group
|
|
66
|
-
* Extends ButtonConfig but omits properties controlled by the group
|
|
67
|
-
* @category Components
|
|
68
|
-
*/
|
|
69
25
|
interface ButtonGroupItemBase extends Omit<ButtonConfig, "variant"> {
|
|
70
|
-
/**
|
|
71
|
-
* Unique identifier for the button
|
|
72
|
-
* If not provided, index will be used
|
|
73
|
-
*/
|
|
74
26
|
id?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Button text content
|
|
77
|
-
* @example 'Bold'
|
|
78
|
-
*/
|
|
79
27
|
text?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Button icon HTML content.
|
|
82
|
-
* Markup (HTML). Not sanitized by default: see Markup and sanitizing.
|
|
83
|
-
* @example '<svg>...</svg>'
|
|
84
|
-
*/
|
|
85
28
|
icon?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Accessible label. See {@link ButtonGroupItemConfig}: optional on an item
|
|
88
|
-
* that has text, required on an icon-only one.
|
|
89
|
-
*
|
|
90
|
-
* @example 'Toggle bold'
|
|
91
|
-
*/
|
|
92
29
|
ariaLabel?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Whether this button is disabled
|
|
95
|
-
* @default false
|
|
96
|
-
*/
|
|
97
30
|
disabled?: boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Value associated with this button
|
|
100
|
-
*/
|
|
101
31
|
value?: string;
|
|
102
|
-
/** Icon shown while selected (toggle buttons). Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
103
32
|
selectedIcon?: string;
|
|
104
|
-
/** Initially selected (selection groups only) */
|
|
105
33
|
selected?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Additional CSS class for this button
|
|
108
|
-
*/
|
|
109
34
|
class?: string;
|
|
110
35
|
}
|
|
111
|
-
/**
|
|
112
|
-
* Configuration interface for the Button Group component
|
|
113
|
-
* @category Components
|
|
114
|
-
*/
|
|
115
|
-
/**
|
|
116
|
-
* A button in a group.
|
|
117
|
-
*
|
|
118
|
-
* Whether an item renders as an icon button is decided at render time from
|
|
119
|
-
* this config -- an item with an icon and no text becomes one -- so whether
|
|
120
|
-
* its accessible label is optional depends on the same config. A text item
|
|
121
|
-
* takes its name from the text; an icon-only item has nothing else to take it
|
|
122
|
-
* from, and without a label announces as "button" (WCAG 4.1.2).
|
|
123
|
-
*
|
|
124
|
-
* Expressed as a union rather than a flat required field, because requiring
|
|
125
|
-
* it on text items too is over-broad -- it would make 67 call sites in this
|
|
126
|
-
* component's own tests pass a label that duplicates the text.
|
|
127
|
-
*/
|
|
128
36
|
export type ButtonGroupItemConfig = (ButtonGroupItemBase & {
|
|
129
37
|
text: string;
|
|
130
38
|
}) | (ButtonGroupItemBase & {
|
|
@@ -132,90 +40,27 @@ export type ButtonGroupItemConfig = (ButtonGroupItemBase & {
|
|
|
132
40
|
ariaLabel: string;
|
|
133
41
|
});
|
|
134
42
|
export interface ButtonGroupConfig {
|
|
135
|
-
/**
|
|
136
|
-
* Array of button configurations
|
|
137
|
-
*/
|
|
138
43
|
buttons?: ButtonGroupItemConfig[];
|
|
139
|
-
/** "standard" (default) or "connected" */
|
|
140
44
|
kind?: ButtonGroupKind;
|
|
141
|
-
/** "none" (default): plain actions. "single" or "multi": toggle buttons. */
|
|
142
45
|
selection?: ButtonGroupSelection;
|
|
143
|
-
/** With single or multi selection: the last selected button cannot be deselected */
|
|
144
46
|
required?: boolean;
|
|
145
|
-
/** Corner style: round (default) or square */
|
|
146
47
|
shape?: ButtonGroupShape;
|
|
147
|
-
/**
|
|
148
|
-
* Standard groups: share of its width a pressed button gains while its
|
|
149
|
-
* neighbours give up the difference (M3: 0.15). 0 disables the motion.
|
|
150
|
-
* @default 0.15
|
|
151
|
-
*/
|
|
152
48
|
expandedRatio?: number;
|
|
153
|
-
/** Material size token: xs, s (default), m, l, xl */
|
|
154
49
|
size?: ButtonGroupSize;
|
|
155
|
-
/**
|
|
156
|
-
* "always" (default): buttons show icon and text. "selected": buttons with
|
|
157
|
-
* an icon and a text show the text only while selected; the selected button
|
|
158
|
-
* widens to reveal it (M3 Expressive connected groups).
|
|
159
|
-
*/
|
|
160
50
|
labels?: ButtonGroupLabels;
|
|
161
|
-
/**
|
|
162
|
-
* Visual variant applied to all buttons in the group
|
|
163
|
-
* @default 'outlined'
|
|
164
|
-
*/
|
|
165
51
|
variant?: ButtonGroupVariant;
|
|
166
|
-
/**
|
|
167
|
-
* Orientation of the button group
|
|
168
|
-
* @default 'horizontal'
|
|
169
|
-
*/
|
|
170
52
|
orientation?: ButtonGroupOrientation;
|
|
171
|
-
/**
|
|
172
|
-
* Density setting that controls button sizing
|
|
173
|
-
* @default 'default'
|
|
174
|
-
*/
|
|
175
53
|
density?: ButtonGroupDensity;
|
|
176
|
-
/**
|
|
177
|
-
* Whether the entire button group is disabled
|
|
178
|
-
* @default false
|
|
179
|
-
*/
|
|
180
54
|
disabled?: boolean;
|
|
181
|
-
/**
|
|
182
|
-
* Whether buttons should have equal width
|
|
183
|
-
* @default false
|
|
184
|
-
*/
|
|
185
55
|
equalWidth?: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Component prefix for class names
|
|
188
|
-
* @default 'mtrl'
|
|
189
|
-
*/
|
|
190
56
|
prefix?: string;
|
|
191
|
-
/**
|
|
192
|
-
* Component name used in class generation
|
|
193
|
-
*/
|
|
194
57
|
componentName?: string;
|
|
195
|
-
/**
|
|
196
|
-
* Additional CSS class for the button group container
|
|
197
|
-
*/
|
|
198
58
|
class?: string;
|
|
199
|
-
/**
|
|
200
|
-
* Whether to enable ripple effect on buttons
|
|
201
|
-
* @default true
|
|
202
|
-
*/
|
|
203
59
|
ripple?: boolean;
|
|
204
|
-
/**
|
|
205
|
-
* Ripple effect configuration
|
|
206
|
-
*/
|
|
207
60
|
rippleConfig?: {
|
|
208
|
-
/** How long, in milliseconds, a released wave lingers before it is removed */
|
|
209
61
|
duration?: number;
|
|
210
62
|
};
|
|
211
|
-
/**
|
|
212
|
-
* Accessible label for the button group
|
|
213
|
-
* @example 'Text formatting options'
|
|
214
|
-
*/
|
|
215
63
|
ariaLabel?: string;
|
|
216
|
-
/**
|
|
217
|
-
* Listeners registered at creation, ahead of any listener added afterwards.
|
|
218
|
-
*/
|
|
219
64
|
on?: {
|
|
220
65
|
click?: (event: ButtonGroupEvent) => void;
|
|
221
66
|
focus?: (event: ButtonGroupEvent) => void;
|
|
@@ -223,87 +68,23 @@ export interface ButtonGroupConfig {
|
|
|
223
68
|
change?: (event: ButtonGroupChangeEvent) => void;
|
|
224
69
|
};
|
|
225
70
|
}
|
|
226
|
-
/**
|
|
227
|
-
* Button Group component interface
|
|
228
|
-
* @category Components
|
|
229
|
-
*/
|
|
230
71
|
export interface ButtonGroupComponent {
|
|
231
|
-
/** The component's container DOM element */
|
|
232
72
|
element: HTMLElement;
|
|
233
|
-
/** Array of button component instances */
|
|
234
73
|
buttons: ButtonComponent[];
|
|
235
|
-
/**
|
|
236
|
-
* Gets a button by its index
|
|
237
|
-
* @param index - Button index
|
|
238
|
-
* @returns The button component or undefined
|
|
239
|
-
*/
|
|
240
74
|
getButton: (index: number) => ButtonComponent | undefined;
|
|
241
|
-
/**
|
|
242
|
-
* Gets a button by its id or value
|
|
243
|
-
* @param id - Button id or value
|
|
244
|
-
* @returns The button component or undefined
|
|
245
|
-
*/
|
|
246
75
|
getButtonById: (id: string) => ButtonComponent | undefined;
|
|
247
|
-
/**
|
|
248
|
-
* Gets the current variant
|
|
249
|
-
* @returns Current variant name
|
|
250
|
-
*/
|
|
251
76
|
getVariant: () => ButtonGroupVariant;
|
|
252
|
-
/**
|
|
253
|
-
* Sets the variant for all buttons in the group
|
|
254
|
-
* @param variant - New variant to apply
|
|
255
|
-
* @returns The ButtonGroupComponent for chaining
|
|
256
|
-
*/
|
|
257
77
|
setVariant: (variant: ButtonGroupVariant) => ButtonGroupComponent;
|
|
258
|
-
/**
|
|
259
|
-
* Gets the current orientation
|
|
260
|
-
* @returns Current orientation
|
|
261
|
-
*/
|
|
262
78
|
getOrientation: () => ButtonGroupOrientation;
|
|
263
|
-
/**
|
|
264
|
-
* Sets the orientation of the button group
|
|
265
|
-
* @param orientation - New orientation
|
|
266
|
-
* @returns The ButtonGroupComponent for chaining
|
|
267
|
-
*/
|
|
268
79
|
setOrientation: (orientation: ButtonGroupOrientation) => ButtonGroupComponent;
|
|
269
|
-
/**
|
|
270
|
-
* Gets the current density
|
|
271
|
-
* @returns Current density
|
|
272
|
-
*/
|
|
273
80
|
getDensity: () => ButtonGroupDensity;
|
|
274
|
-
/**
|
|
275
|
-
* Sets the density of the button group
|
|
276
|
-
* @param density - New density level
|
|
277
|
-
* @returns The ButtonGroupComponent for chaining
|
|
278
|
-
*/
|
|
279
81
|
setDensity: (density: ButtonGroupDensity) => ButtonGroupComponent;
|
|
280
|
-
/**
|
|
281
|
-
* Enables the entire button group
|
|
282
|
-
* @returns The ButtonGroupComponent for chaining
|
|
283
|
-
*/
|
|
284
82
|
enable: () => ButtonGroupComponent;
|
|
285
|
-
/**
|
|
286
|
-
* Disables the entire button group
|
|
287
|
-
* @returns The ButtonGroupComponent for chaining
|
|
288
|
-
*/
|
|
289
83
|
disable: () => ButtonGroupComponent;
|
|
290
|
-
/** Whether the whole group is disabled */
|
|
291
84
|
isDisabled: () => boolean;
|
|
292
|
-
/**
|
|
293
|
-
* Enables a specific button by index
|
|
294
|
-
* @param index - Button index
|
|
295
|
-
* @returns The ButtonGroupComponent for chaining
|
|
296
|
-
*/
|
|
297
85
|
enableButton: (index: number) => ButtonGroupComponent;
|
|
298
|
-
/**
|
|
299
|
-
* Disables a specific button by index
|
|
300
|
-
* @param index - Button index
|
|
301
|
-
* @returns The ButtonGroupComponent for chaining
|
|
302
|
-
*/
|
|
303
86
|
disableButton: (index: number) => ButtonGroupComponent;
|
|
304
|
-
/** Selection (groups with selection "single" or "multi") */
|
|
305
87
|
getSelected: () => string[];
|
|
306
|
-
/** Reads the current model value without changing selection. */
|
|
307
88
|
getValue: () => string | string[] | null;
|
|
308
89
|
isSelected: (value: string) => boolean;
|
|
309
90
|
select: (value: string) => ButtonGroupComponent;
|
|
@@ -311,26 +92,11 @@ export interface ButtonGroupComponent {
|
|
|
311
92
|
toggle: (value: string) => ButtonGroupComponent;
|
|
312
93
|
getKind: () => ButtonGroupKind;
|
|
313
94
|
getSelection: () => ButtonGroupSelection;
|
|
314
|
-
/**
|
|
315
|
-
* Adds an event listener to the button group
|
|
316
|
-
* @param event - Event name
|
|
317
|
-
* @param handler - Event handler function
|
|
318
|
-
* @returns The ButtonGroupComponent for chaining
|
|
319
|
-
*/
|
|
320
95
|
on: {
|
|
321
96
|
(event: "change", handler: (event: ButtonGroupChangeEvent) => void): ButtonGroupComponent;
|
|
322
97
|
(event: "click" | "focus" | "blur", handler: (event: ButtonGroupEvent) => void): ButtonGroupComponent;
|
|
323
98
|
};
|
|
324
|
-
/**
|
|
325
|
-
* Removes an event listener from the button group
|
|
326
|
-
* @param event - Event name
|
|
327
|
-
* @param handler - Event handler function
|
|
328
|
-
* @returns The ButtonGroupComponent for chaining
|
|
329
|
-
*/
|
|
330
99
|
off: (event: ButtonGroupEventType, handler: (event: ButtonGroupEvent | ButtonGroupChangeEvent) => void) => ButtonGroupComponent;
|
|
331
|
-
/**
|
|
332
|
-
* Destroys the component and cleans up resources
|
|
333
|
-
*/
|
|
334
100
|
destroy: () => void;
|
|
335
101
|
}
|
|
336
102
|
export {};
|
|
@@ -1,67 +1,3 @@
|
|
|
1
1
|
import { CardComponent, CardConfig } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new Card component following Material Design 3 principles.
|
|
4
|
-
*
|
|
5
|
-
* Material Design 3 Cards are surfaces that display content and actions about a single topic.
|
|
6
|
-
* Cards can contain text, media, and UI controls. They provide entry points to more
|
|
7
|
-
* detailed information and can include interactive elements.
|
|
8
|
-
*
|
|
9
|
-
* @param {CardConfig} config - Card configuration object
|
|
10
|
-
* @returns {CardComponent} Card component instance with the following API methods:
|
|
11
|
-
* - `addContent(contentElement)`: Adds content to the card
|
|
12
|
-
* - `setHeader(headerElement)`: Sets the card header
|
|
13
|
-
* - `addMedia(mediaElement, position)`: Adds media to the card
|
|
14
|
-
* - `setActions(actionsElement)`: Sets the card actions section
|
|
15
|
-
* - `makeDraggable(dragStartCallback)`: Makes the card draggable
|
|
16
|
-
* - `focus()`: Sets focus to the card
|
|
17
|
-
* - `destroy()`: Destroys the card component and removes event listeners
|
|
18
|
-
*
|
|
19
|
-
* @throws {Error} Throws an error if card creation fails
|
|
20
|
-
* @category Components
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* // Create a basic card
|
|
24
|
-
* const card = createCard({
|
|
25
|
-
* variant: 'elevated',
|
|
26
|
-
* header: {
|
|
27
|
-
* title: 'Card Title',
|
|
28
|
-
* subtitle: 'Secondary text'
|
|
29
|
-
* },
|
|
30
|
-
* content: {
|
|
31
|
-
* text: 'Card content goes here.'
|
|
32
|
-
* }
|
|
33
|
-
* });
|
|
34
|
-
*
|
|
35
|
-
* // Create an interactive card with actions
|
|
36
|
-
* const cardWithActions = createCard({
|
|
37
|
-
* variant: 'filled',
|
|
38
|
-
* interactive: true,
|
|
39
|
-
* header: { title: 'Interactive Card' },
|
|
40
|
-
* content: { text: 'Click the buttons below.' },
|
|
41
|
-
* buttons: [
|
|
42
|
-
* { text: 'Action 1', variant: 'text' },
|
|
43
|
-
* { text: 'Action 2', variant: 'filled' }
|
|
44
|
-
* ]
|
|
45
|
-
* });
|
|
46
|
-
*
|
|
47
|
-
* // Card with media
|
|
48
|
-
* const mediaCard = createCard({
|
|
49
|
-
* media: {
|
|
50
|
-
* src: '/path/to/image.jpg',
|
|
51
|
-
* alt: 'Descriptive alt text',
|
|
52
|
-
* aspectRatio: '16:9'
|
|
53
|
-
* },
|
|
54
|
-
* header: { title: 'Media Card' }
|
|
55
|
-
* });
|
|
56
|
-
*
|
|
57
|
-
* // Using API methods
|
|
58
|
-
* const card = createCard();
|
|
59
|
-
* const content = document.createElement('div');
|
|
60
|
-
* content.className = 'mtrl-card__content';
|
|
61
|
-
* content.textContent = 'Added programmatically';
|
|
62
|
-
* card.addContent(content);
|
|
63
|
-
* card.makeDraggable();
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
2
|
declare const createCard: (config?: CardConfig) => CardComponent;
|
|
67
3
|
export default createCard;
|
|
@@ -1,70 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Card variants following Material Design 3 guidelines
|
|
3
|
-
* - ELEVATED: Card with shadow elevation (default)
|
|
4
|
-
* - FILLED: Card with filled background color and no elevation
|
|
5
|
-
* - OUTLINED: Card with outline border and no elevation
|
|
6
|
-
*/
|
|
7
1
|
export declare const CARD_VARIANTS: {
|
|
8
2
|
readonly ELEVATED: "elevated";
|
|
9
3
|
readonly FILLED: "filled";
|
|
10
4
|
readonly OUTLINED: "outlined";
|
|
11
5
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Card elevation levels in Material Design 3
|
|
14
|
-
* Specifies the shadow height in density-independent pixels (dp)
|
|
15
|
-
*/
|
|
16
6
|
export declare const CARD_ELEVATIONS: {
|
|
17
7
|
readonly LEVEL0: 0;
|
|
18
8
|
readonly LEVEL1: 1;
|
|
19
9
|
readonly LEVEL2: 2;
|
|
20
10
|
readonly LEVEL4: 4;
|
|
21
11
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Card width constants
|
|
24
|
-
* Provides standardized card widths based on Material Design
|
|
25
|
-
*/
|
|
26
12
|
export declare const CARD_WIDTHS: {
|
|
27
13
|
readonly SMALL: "344px";
|
|
28
14
|
readonly MEDIUM: "480px";
|
|
29
15
|
readonly LARGE: "624px";
|
|
30
16
|
readonly FULL: "100%";
|
|
31
17
|
};
|
|
32
|
-
/**
|
|
33
|
-
* Card corner radius options
|
|
34
|
-
* Provides standardized corner radius values
|
|
35
|
-
*/
|
|
36
18
|
export declare const CARD_CORNER_RADIUS: {
|
|
37
19
|
readonly SMALL: "8px";
|
|
38
20
|
readonly MEDIUM: "12px";
|
|
39
21
|
readonly LARGE: "16px";
|
|
40
22
|
};
|
|
41
|
-
/**
|
|
42
|
-
* Card media aspect ratio options
|
|
43
|
-
*/
|
|
44
23
|
export declare const CARD_ASPECT_RATIOS: {
|
|
45
24
|
readonly SQUARE: "1:1";
|
|
46
25
|
readonly STANDARD: "4:3";
|
|
47
26
|
readonly WIDESCREEN: "16:9";
|
|
48
27
|
};
|
|
49
|
-
/**
|
|
50
|
-
* Card action alignment options
|
|
51
|
-
*/
|
|
52
28
|
export declare const CARD_ACTION_ALIGNMENT: {
|
|
53
29
|
readonly START: "start";
|
|
54
30
|
readonly CENTER: "center";
|
|
55
31
|
readonly END: "end";
|
|
56
32
|
readonly SPACE_BETWEEN: "space-between";
|
|
57
33
|
};
|
|
58
|
-
/**
|
|
59
|
-
* Card media position options
|
|
60
|
-
*/
|
|
61
34
|
export declare const CARD_MEDIA_POSITION: {
|
|
62
35
|
readonly TOP: "top";
|
|
63
36
|
readonly BOTTOM: "bottom";
|
|
64
37
|
};
|
|
65
|
-
/**
|
|
66
|
-
* CSS class names used in the card component
|
|
67
|
-
*/
|
|
68
38
|
export declare const CARD_CLASSES: {
|
|
69
39
|
readonly ROOT: "card";
|
|
70
40
|
readonly HEADER: "card__header";
|
|
@@ -75,14 +45,11 @@ export declare const CARD_CLASSES: {
|
|
|
75
45
|
readonly CONTENT: "card__content";
|
|
76
46
|
readonly MEDIA: "card__media";
|
|
77
47
|
readonly ACTIONS: "card__actions";
|
|
78
|
-
/** Reserved modifier; draggable currently uses the native attribute. */
|
|
79
48
|
readonly DRAGGABLE: "card--draggable";
|
|
80
49
|
readonly INTERACTIVE: "card--interactive";
|
|
81
50
|
readonly FULL_WIDTH: "card--full-width";
|
|
82
|
-
/** Reserved modifier; clickable currently uses INTERACTIVE. */
|
|
83
51
|
readonly CLICKABLE: "card--clickable";
|
|
84
52
|
readonly LOADING: "card--state-loading";
|
|
85
53
|
readonly EXPANDED: "card--expanded";
|
|
86
|
-
/** Reserved modifier prefix; elevation currently uses styles. */
|
|
87
54
|
readonly ELEVATION_PREFIX: "card--elevation-";
|
|
88
55
|
};
|
|
@@ -1,92 +1,6 @@
|
|
|
1
1
|
import { CardContentConfig, CardHeaderConfig, CardMediaConfig, CardActionsConfig } from "./types.js";
|
|
2
2
|
export declare const CARD_CONTENT_PADDING = true;
|
|
3
|
-
/**
|
|
4
|
-
* Creates a card content component
|
|
5
|
-
*
|
|
6
|
-
* @param {CardContentConfig} config - Content configuration
|
|
7
|
-
* @returns {HTMLElement} Card content element
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* // Create text content
|
|
12
|
-
* const textContent = createCardContent({ text: 'Simple text content' });
|
|
13
|
-
*
|
|
14
|
-
* // Create HTML content with no padding
|
|
15
|
-
* const htmlContent = createCardContent({
|
|
16
|
-
* html: '<p>Formatted <strong>HTML</strong> content</p>',
|
|
17
|
-
* padding: false
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
3
|
export declare const createCardContent: (config?: CardContentConfig) => HTMLElement;
|
|
22
|
-
/**
|
|
23
|
-
* Creates a card header component
|
|
24
|
-
*
|
|
25
|
-
* @param {CardHeaderConfig} config - Header configuration
|
|
26
|
-
* @returns {HTMLElement} Card header element
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* // Create a header with title and subtitle
|
|
31
|
-
* const header = createCardHeader({
|
|
32
|
-
* title: 'Card Title',
|
|
33
|
-
* subtitle: 'Supporting text'
|
|
34
|
-
* });
|
|
35
|
-
*
|
|
36
|
-
* // Create a header with an avatar and action
|
|
37
|
-
* const avatarHeader = createCardHeader({
|
|
38
|
-
* title: 'User Profile',
|
|
39
|
-
* avatar: '<img src="user.jpg" alt="User avatar">',
|
|
40
|
-
* action: createIconButton({ icon: 'more_vert' })
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
4
|
export declare const createCardHeader: (config?: CardHeaderConfig) => HTMLElement;
|
|
45
|
-
/**
|
|
46
|
-
* Creates a card actions component
|
|
47
|
-
*
|
|
48
|
-
* @param {CardActionsConfig} config - Actions configuration
|
|
49
|
-
* @returns {HTMLElement} Card actions element
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* // Create simple actions container with buttons
|
|
54
|
-
* const actions = createCardActions({
|
|
55
|
-
* actions: [
|
|
56
|
-
* createButton({ text: 'Cancel' }),
|
|
57
|
-
* createButton({ text: 'OK', variant: 'filled' })
|
|
58
|
-
* ],
|
|
59
|
-
* align: 'end'
|
|
60
|
-
* });
|
|
61
|
-
*
|
|
62
|
-
* // Create full-bleed actions
|
|
63
|
-
* const fullBleedActions = createCardActions({
|
|
64
|
-
* actions: [createButton({ text: 'View Details', fullWidth: true })],
|
|
65
|
-
* fullBleed: true
|
|
66
|
-
* });
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
5
|
export declare const createCardActions: (config?: CardActionsConfig) => HTMLElement;
|
|
70
|
-
/**
|
|
71
|
-
* Creates a card media component
|
|
72
|
-
*
|
|
73
|
-
* @param {CardMediaConfig} config - Media configuration
|
|
74
|
-
* @returns {HTMLElement} Card media element
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```typescript
|
|
78
|
-
* // Create a media component with an image
|
|
79
|
-
* const media = createCardMedia({
|
|
80
|
-
* src: 'image.jpg',
|
|
81
|
-
* alt: 'Descriptive alt text',
|
|
82
|
-
* aspectRatio: '16:9'
|
|
83
|
-
* });
|
|
84
|
-
*
|
|
85
|
-
* // Create a media component with a custom element
|
|
86
|
-
* const customMedia = createCardMedia({
|
|
87
|
-
* element: videoElement,
|
|
88
|
-
* aspectRatio: '4:3'
|
|
89
|
-
* });
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
6
|
export declare const createCardMedia: (config?: CardMediaConfig) => HTMLElement;
|
|
@@ -1,69 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Card
|
|
3
|
-
*
|
|
4
|
-
* Card component following Material Design 3 guidelines.
|
|
5
|
-
* Cards are surfaces that display content and actions about a single topic.
|
|
6
|
-
* They should be easy to scan for relevant and actionable information.
|
|
7
|
-
*
|
|
8
|
-
* The main export is the {@link default | createCard} factory function that creates
|
|
9
|
-
* a {@link CardComponent} instance with the provided configuration.
|
|
10
|
-
*
|
|
11
|
-
* Features:
|
|
12
|
-
* - Multiple variants: elevated, filled, and outlined
|
|
13
|
-
* - Support for header, content, media, and actions sections
|
|
14
|
-
* - Interactive behavior with elevation changes on hover
|
|
15
|
-
* - Draggable capability
|
|
16
|
-
* - Expandable content support
|
|
17
|
-
* - Loading state indication
|
|
18
|
-
* - Swipe gestures with custom actions
|
|
19
|
-
*
|
|
20
|
-
* The API includes methods for:
|
|
21
|
-
* - {@link CardComponent.addContent | Adding content}
|
|
22
|
-
* - {@link CardComponent.setHeader | Setting header}
|
|
23
|
-
* - {@link CardComponent.addMedia | Adding media}
|
|
24
|
-
* - {@link CardComponent.setActions | Setting actions}
|
|
25
|
-
* - {@link CardComponent.makeDraggable | Making cards draggable}
|
|
26
|
-
* - {@link CardComponent.focus | Managing focus}
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* // Create a basic card
|
|
31
|
-
* const card = createCard({
|
|
32
|
-
* variant: 'elevated',
|
|
33
|
-
* header: {
|
|
34
|
-
* title: 'Card Title',
|
|
35
|
-
* subtitle: 'Secondary text'
|
|
36
|
-
* },
|
|
37
|
-
* content: {
|
|
38
|
-
* text: 'Card content goes here.'
|
|
39
|
-
* },
|
|
40
|
-
* buttons: [
|
|
41
|
-
* { text: 'Action', variant: 'text' }
|
|
42
|
-
* ]
|
|
43
|
-
* });
|
|
44
|
-
*
|
|
45
|
-
* // Modify card programmatically using API methods
|
|
46
|
-
* const image = document.createElement('div');
|
|
47
|
-
* image.className = 'mtrl-card__media';
|
|
48
|
-
* image.style.backgroundImage = 'url(path/to/image.jpg)';
|
|
49
|
-
*
|
|
50
|
-
* card.addMedia(image, 'top')
|
|
51
|
-
* .makeDraggable((event) => {
|
|
52
|
-
* console.log('Card drag started');
|
|
53
|
-
* });
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* @category Components
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* Factory function to create a new Card component.
|
|
60
|
-
* @see CardComponent for the full API reference
|
|
61
|
-
*/
|
|
62
1
|
export { default, default as createCard } from "./card.js";
|
|
63
|
-
/**
|
|
64
|
-
* Card component types and interfaces
|
|
65
|
-
*
|
|
66
|
-
* These types define the structure and behavior of the Card component.
|
|
67
|
-
*/
|
|
68
2
|
export type { CardVariant, CardElevationLevel, CardConfig, CardHeaderConfig, CardContentConfig, CardActionsConfig, CardMediaConfig, CardAriaAttributes, CardComponent, CardEvents, } from "./types.js";
|
|
69
3
|
export { createCardContent, createCardHeader, createCardActions, createCardMedia, } from "./content.js";
|