material 3.9.0 → 3.10.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 +5 -5
- package/dist/components/badge/index.d.ts +167 -3
- package/dist/components/bottom-app-bar/index.d.ts +141 -4
- package/dist/components/bottom-sheet/index.d.ts +114 -2
- package/dist/components/button/index.d.ts +10 -5
- package/dist/components/button-group/button-group.js +1 -0
- package/dist/components/button-group/config.js +9 -6
- package/dist/components/button-group/index.d.ts +250 -6
- package/dist/components/card/api.js +19 -0
- package/dist/components/card/index.d.ts +326 -5
- package/dist/components/carousel/features/slides.js +17 -7
- package/dist/components/carousel/index.d.ts +102 -3
- package/dist/components/checkbox/index.d.ts +217 -5
- package/dist/components/chips/chip/chip.js +4 -3
- package/dist/components/chips/index.d.ts +343 -3
- package/dist/components/datepicker/datepicker.js +62 -84
- package/dist/components/datepicker/index.d.ts +313 -2
- package/dist/components/datepicker/render.js +22 -18
- package/dist/components/datepicker/utils.js +66 -111
- package/dist/components/dialog/features.js +1 -1
- package/dist/components/dialog/index.d.ts +333 -3
- package/dist/components/divider/index.d.ts +99 -3
- package/dist/components/drawer/features/items.js +10 -2
- package/dist/components/drawer/index.d.ts +196 -3
- package/dist/components/extended-fab/index.d.ts +224 -2
- package/dist/components/fab/index.d.ts +183 -2
- package/dist/components/fab-menu/index.d.ts +106 -6
- package/dist/components/icon-button/index.d.ts +11 -4
- package/dist/components/list/features/anatomy.js +25 -6
- package/dist/components/list/features/selection.js +30 -2
- package/dist/components/list/index.d.ts +299 -6
- package/dist/components/loading-indicator/index.d.ts +94 -3
- package/dist/components/menu/features/controller.js +2 -0
- package/dist/components/menu/index.d.ts +10 -6
- package/dist/components/menu/types.d.ts +5 -0
- package/dist/components/navigation-bar/index.d.ts +70 -2
- package/dist/components/navigation-rail/index.d.ts +98 -2
- package/dist/components/progress/index.d.ts +9 -2
- package/dist/components/radios/index.d.ts +158 -3
- package/dist/components/search/features/states.js +3 -3
- package/dist/components/search/features/structure.js +24 -4
- package/dist/components/search/features/suggestions.js +4 -0
- package/dist/components/search/index.d.ts +255 -2
- package/dist/components/select/index.d.ts +252 -6
- package/dist/components/side-sheet/index.d.ts +104 -2
- package/dist/components/slider/index.d.ts +236 -2
- package/dist/components/snackbar/api.js +26 -0
- package/dist/components/snackbar/constants.d.ts +4 -0
- package/dist/components/snackbar/constants.js +3 -1
- package/dist/components/snackbar/index.d.ts +215 -4
- package/dist/components/split-button/index.d.ts +10 -3
- package/dist/components/switch/index.d.ts +190 -3
- package/dist/components/tabs/index.d.ts +476 -12
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/responsive-legacy.js +65 -0
- package/dist/components/tabs/responsive.d.ts +7 -32
- package/dist/components/tabs/responsive.js +4 -63
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/text-field/config.js +3 -4
- package/dist/components/text-field/features/field.js +61 -0
- package/dist/components/text-field/features/leading-icon.js +12 -45
- package/dist/components/text-field/features/prefix-text.js +6 -40
- package/dist/components/text-field/features/suffix-text.js +6 -40
- package/dist/components/text-field/index.d.ts +345 -3
- package/dist/components/timepicker/constants.d.ts +4 -4
- package/dist/components/timepicker/constants.js +2 -2
- package/dist/components/timepicker/index.d.ts +279 -5
- package/dist/components/timepicker/render.js +4 -1
- package/dist/components/toolbar/index.d.ts +145 -6
- package/dist/components/tooltip/index.d.ts +155 -3
- package/dist/components/top-app-bar/index.d.ts +92 -5
- package/dist/core/canvas/index.d.ts +172 -5
- package/dist/core/compose/features/icon-opt-in.js +5 -0
- package/dist/core/compose/features/icon-slot.js +100 -0
- package/dist/core/compose/features/textinput.js +2 -0
- package/dist/core/compose/features/track.js +4 -0
- package/dist/core/compose/index.d.ts +744 -8
- package/dist/core/dom/index.d.ts +245 -12
- package/dist/core/index.d.ts +93 -14
- package/dist/core/shapes/index.d.ts +286 -6
- package/dist/core/state/index.d.ts +98 -5
- package/dist/core/theme/index.d.ts +80 -4
- package/dist/core/utils/index.d.ts +98 -9
- package/dist/elements/css/bottom-sheet.css +1 -1
- package/dist/elements/css/button-group.css +1 -1
- package/dist/elements/css/button.css +1 -1
- package/dist/elements/css/datepicker.css +1 -1
- package/dist/elements/css/dialog.css +1 -1
- package/dist/elements/css/drawer.css +1 -1
- package/dist/elements/css/icon-button.css +1 -1
- package/dist/elements/css/list.css +1 -1
- package/dist/elements/css/menu.css +1 -1
- package/dist/elements/css/side-sheet.css +1 -1
- package/dist/elements/css/snackbar.css +1 -1
- package/dist/elements/css/text-field.css +1 -1
- package/dist/elements/css/timepicker.css +1 -1
- package/dist/elements/css/toolbar.css +1 -1
- package/dist/elements/datepicker.js +1 -0
- package/dist/elements/define.js +12 -1
- package/dist/elements/drawer.js +2 -0
- package/dist/elements/index.d.ts +3974 -107
- 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 +2 -2
- package/dist/elements/preupgrade/button.css +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/elements/preupgrade/list.css +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/snackbar.js +2 -0
- package/dist/elements/styles.js +15 -15
- package/dist/elements/text-field.js +2 -0
- package/dist/index.d.ts +78 -4
- package/dist/react/index.d.ts +106 -52
- package/dist/react/jsx.d.ts +49 -49
- package/dist/solid/index.d.ts +106 -52
- package/dist/solid/jsx.d.ts +51 -50
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +2 -2
- package/dist/styles/base.css +2 -2
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +2 -2
- package/dist/styles/button-group.css +2 -2
- package/dist/styles/button.css +2 -2
- 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 +2 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +2 -2
- 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 +2 -2
- package/dist/styles/list.css +2 -2
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +2 -2
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +2 -2
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +2 -2
- 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 +2 -2
- package/dist/styles/timepicker.css +2 -2
- package/dist/styles/toolbar.css +2 -2
- 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/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/index.d.ts +192 -53
- package/package.json +5 -1
- package/src/styles/abstract/_functions.scss +22 -1
- package/src/styles/abstract/_variables.scss +0 -2
- package/src/styles/base/_tokens.scss +12 -0
- package/src/styles/components/_bottom-sheet.scss +1 -0
- package/src/styles/components/_button-group.scss +9 -5
- package/src/styles/components/_button.scss +9 -12
- package/src/styles/components/_datepicker.scss +1 -0
- package/src/styles/components/_dialog.scss +1 -0
- package/src/styles/components/_drawer.scss +33 -65
- package/src/styles/components/_icon-button.scss +32 -33
- package/src/styles/components/_list.scss +19 -5
- package/src/styles/components/_menu.scss +1 -0
- package/src/styles/components/_side-sheet.scss +1 -0
- package/src/styles/components/_snackbar.scss +1 -0
- package/src/styles/components/_text-field.scss +17 -109
- package/src/styles/components/_timepicker.scss +2 -1
- package/src/styles/components/_toolbar.scss +4 -4
- package/src/styles/elements/_button-group.scss +17 -4
- package/src/styles/elements/_button.scss +3 -2
- package/src/styles/elements/_drawer.scss +2 -1
- package/src/styles/elements/_field.scss +25 -14
- package/src/styles/elements/_icon-button.scss +8 -3
- package/src/styles/elements/_list.scss +3 -2
- package/src/styles/elements/_text-field.scss +71 -47
- package/dist/components/badge/badge.d.ts +0 -7
- package/dist/components/badge/types.d.ts +0 -152
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -12
- package/dist/components/bottom-app-bar/types.d.ts +0 -124
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -7
- package/dist/components/bottom-sheet/types.d.ts +0 -100
- package/dist/components/button/button.d.ts +0 -7
- package/dist/components/button-group/button-group.d.ts +0 -7
- package/dist/components/button-group/types.d.ts +0 -227
- package/dist/components/card/card.d.ts +0 -7
- package/dist/components/card/content.d.ts +0 -22
- package/dist/components/card/types.d.ts +0 -272
- package/dist/components/carousel/carousel.d.ts +0 -4
- package/dist/components/carousel/types.d.ts +0 -81
- package/dist/components/checkbox/checkbox.d.ts +0 -8
- package/dist/components/checkbox/types.d.ts +0 -199
- package/dist/components/chips/chips.d.ts +0 -7
- package/dist/components/chips/factories.d.ts +0 -9
- package/dist/components/chips/types.d.ts +0 -304
- package/dist/components/datepicker/datepicker.d.ts +0 -7
- package/dist/components/datepicker/types.d.ts +0 -300
- package/dist/components/datepicker/types.js +0 -17
- package/dist/components/dialog/dialog.d.ts +0 -8
- package/dist/components/dialog/types.d.ts +0 -311
- package/dist/components/divider/config.d.ts +0 -43
- package/dist/components/divider/divider.d.ts +0 -7
- package/dist/components/divider/types.d.ts +0 -43
- package/dist/components/drawer/drawer.d.ts +0 -7
- package/dist/components/drawer/types.d.ts +0 -179
- package/dist/components/extended-fab/extended-fab.d.ts +0 -7
- package/dist/components/extended-fab/types.d.ts +0 -208
- package/dist/components/fab/fab.d.ts +0 -7
- package/dist/components/fab/types.d.ts +0 -168
- package/dist/components/fab-menu/fab-menu.d.ts +0 -8
- package/dist/components/fab-menu/types.d.ts +0 -91
- package/dist/components/icon-button/icon-button.d.ts +0 -7
- package/dist/components/index.d.ts +0 -82
- package/dist/components/list/features/listbox.d.ts +0 -16
- package/dist/components/list/list.d.ts +0 -7
- package/dist/components/list/types.d.ts +0 -257
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -28
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -7
- package/dist/components/loading-indicator/types.d.ts +0 -53
- package/dist/components/menu/menu.d.ts +0 -7
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -3
- package/dist/components/navigation-bar/types.d.ts +0 -59
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -3
- package/dist/components/navigation-rail/types.d.ts +0 -87
- package/dist/components/progress/progress.d.ts +0 -7
- package/dist/components/radios/radios.d.ts +0 -7
- package/dist/components/radios/types.d.ts +0 -144
- package/dist/components/search/search.d.ts +0 -7
- package/dist/components/search/types.d.ts +0 -235
- package/dist/components/select/select.d.ts +0 -7
- package/dist/components/select/types.d.ts +0 -232
- package/dist/components/side-sheet/side-sheet.d.ts +0 -7
- package/dist/components/side-sheet/types.d.ts +0 -91
- package/dist/components/slider/slider.d.ts +0 -7
- package/dist/components/slider/types.d.ts +0 -218
- package/dist/components/snackbar/snackbar.d.ts +0 -9
- package/dist/components/snackbar/types.d.ts +0 -180
- package/dist/components/split-button/split-button.d.ts +0 -7
- package/dist/components/switch/switch.d.ts +0 -7
- package/dist/components/switch/types.d.ts +0 -171
- package/dist/components/tabs/indicator.d.ts +0 -44
- package/dist/components/tabs/tab.d.ts +0 -7
- package/dist/components/tabs/tabs.d.ts +0 -7
- package/dist/components/tabs/types.d.ts +0 -304
- package/dist/components/tabs/utils.d.ts +0 -46
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -54
- package/dist/components/text-field/text-field.d.ts +0 -7
- package/dist/components/text-field/types.d.ts +0 -261
- package/dist/components/timepicker/timepicker.d.ts +0 -3
- package/dist/components/timepicker/types.d.ts +0 -258
- package/dist/components/toolbar/toolbar.d.ts +0 -8
- package/dist/components/toolbar/types.d.ts +0 -129
- package/dist/components/tooltip/tooltip.d.ts +0 -7
- package/dist/components/tooltip/types.d.ts +0 -137
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -7
- package/dist/components/top-app-bar/types.d.ts +0 -80
- package/dist/core/canvas/animation.d.ts +0 -20
- package/dist/core/canvas/drawing.d.ts +0 -67
- package/dist/core/canvas/resize.d.ts +0 -8
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -18
- package/dist/core/compose/features/badge.d.ts +0 -27
- package/dist/core/compose/features/checkable.d.ts +0 -33
- package/dist/core/compose/features/debounce.d.ts +0 -45
- package/dist/core/compose/features/disabled.d.ts +0 -26
- package/dist/core/compose/features/events.d.ts +0 -31
- package/dist/core/compose/features/index.d.ts +0 -34
- package/dist/core/compose/features/input.d.ts +0 -54
- package/dist/core/compose/features/lifecycle.d.ts +0 -41
- package/dist/core/compose/features/position.d.ts +0 -36
- package/dist/core/compose/features/ripple.d.ts +0 -35
- package/dist/core/compose/features/size.d.ts +0 -12
- package/dist/core/compose/features/style.d.ts +0 -11
- package/dist/core/compose/features/textinput.d.ts +0 -66
- package/dist/core/compose/features/textlabel.d.ts +0 -34
- package/dist/core/compose/features/throttle.d.ts +0 -38
- package/dist/core/compose/features/track.d.ts +0 -24
- package/dist/core/compose/features/variant.d.ts +0 -12
- package/dist/core/compose/features/withEvents.d.ts +0 -27
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -17
- package/dist/core/config.d.ts +0 -72
- package/dist/core/dom/attributes.d.ts +0 -34
- package/dist/core/dom/classes.d.ts +0 -29
- package/dist/core/dom/events.d.ts +0 -43
- package/dist/core/dom/focus.d.ts +0 -15
- package/dist/core/dom/html.d.ts +0 -16
- package/dist/core/dom/layer.d.ts +0 -57
- package/dist/core/dom/roving.d.ts +0 -18
- package/dist/core/shapes/cubic.d.ts +0 -45
- package/dist/core/shapes/material.d.ts +0 -131
- package/dist/core/shapes/polygon.d.ts +0 -38
- package/dist/core/state/events.d.ts +0 -25
- package/dist/core/state/store.d.ts +0 -60
- package/dist/core/theme/shape.d.ts +0 -5
- package/dist/core/theme/tokens.d.ts +0 -67
- package/dist/core/utils/background.d.ts +0 -13
- package/dist/core/utils/color.d.ts +0 -6
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -32
- package/dist/core/utils/theme.d.ts +0 -17
- package/dist/core/utils/url.d.ts +0 -6
- package/dist/elements/badge.d.ts +0 -57
- package/dist/elements/bottom-app-bar.d.ts +0 -66
- package/dist/elements/bottom-sheet.d.ts +0 -107
- package/dist/elements/button-group.d.ts +0 -142
- package/dist/elements/button.d.ts +0 -101
- package/dist/elements/card.d.ts +0 -69
- package/dist/elements/carousel.d.ts +0 -119
- package/dist/elements/checkbox.d.ts +0 -97
- package/dist/elements/chips.d.ts +0 -126
- package/dist/elements/datepicker.d.ts +0 -131
- package/dist/elements/dialog.d.ts +0 -101
- package/dist/elements/divider.d.ts +0 -52
- package/dist/elements/drawer.d.ts +0 -119
- package/dist/elements/extended-fab.d.ts +0 -97
- package/dist/elements/fab-menu.d.ts +0 -102
- package/dist/elements/fab.d.ts +0 -71
- package/dist/elements/list.d.ts +0 -127
- package/dist/elements/loading-indicator.d.ts +0 -47
- package/dist/elements/menu.d.ts +0 -144
- package/dist/elements/navigation-bar.d.ts +0 -104
- package/dist/elements/navigation-rail.d.ts +0 -145
- package/dist/elements/progress.d.ts +0 -87
- package/dist/elements/radios.d.ts +0 -92
- package/dist/elements/search.d.ts +0 -202
- package/dist/elements/select.d.ts +0 -119
- package/dist/elements/side-sheet.d.ts +0 -86
- package/dist/elements/slider.d.ts +0 -160
- package/dist/elements/snackbar.d.ts +0 -87
- package/dist/elements/split-button.d.ts +0 -87
- package/dist/elements/switch.d.ts +0 -98
- package/dist/elements/tabs.d.ts +0 -76
- package/dist/elements/text-field.d.ts +0 -170
- package/dist/elements/timepicker.d.ts +0 -148
- package/dist/elements/toolbar.d.ts +0 -98
- package/dist/elements/tooltip.d.ts +0 -75
- package/dist/elements/top-app-bar.d.ts +0 -60
- package/dist/react/badge.d.ts +0 -4
- package/dist/react/bottom-app-bar.d.ts +0 -5
- package/dist/react/bottom-sheet.d.ts +0 -4
- package/dist/react/button-group-item.d.ts +0 -3
- package/dist/react/button-group.d.ts +0 -7
- package/dist/react/button.d.ts +0 -5
- package/dist/react/card.d.ts +0 -4
- package/dist/react/carousel-item.d.ts +0 -3
- package/dist/react/carousel.d.ts +0 -4
- package/dist/react/checkbox.d.ts +0 -4
- package/dist/react/chip.d.ts +0 -3
- package/dist/react/chips.d.ts +0 -4
- package/dist/react/datepicker.d.ts +0 -4
- package/dist/react/dialog.d.ts +0 -7
- package/dist/react/divider.d.ts +0 -4
- package/dist/react/drawer-item.d.ts +0 -3
- package/dist/react/drawer.d.ts +0 -4
- package/dist/react/extended-fab.d.ts +0 -4
- package/dist/react/fab-menu-item.d.ts +0 -3
- package/dist/react/fab-menu.d.ts +0 -6
- package/dist/react/fab.d.ts +0 -4
- package/dist/react/icon-button.d.ts +0 -4
- package/dist/react/list-item.d.ts +0 -3
- package/dist/react/list.d.ts +0 -4
- package/dist/react/loading-indicator.d.ts +0 -4
- package/dist/react/menu-item.d.ts +0 -3
- package/dist/react/menu.d.ts +0 -4
- package/dist/react/navigation-bar-item.d.ts +0 -3
- package/dist/react/navigation-bar.d.ts +0 -4
- package/dist/react/navigation-rail-item.d.ts +0 -3
- package/dist/react/navigation-rail.d.ts +0 -4
- package/dist/react/progress.d.ts +0 -4
- package/dist/react/radio.d.ts +0 -3
- package/dist/react/radios.d.ts +0 -4
- package/dist/react/search-suggestion.d.ts +0 -3
- package/dist/react/search.d.ts +0 -4
- package/dist/react/select-option.d.ts +0 -3
- package/dist/react/select.d.ts +0 -6
- package/dist/react/side-sheet.d.ts +0 -4
- package/dist/react/slider.d.ts +0 -4
- package/dist/react/snackbar.d.ts +0 -7
- package/dist/react/split-button.d.ts +0 -7
- package/dist/react/switch.d.ts +0 -4
- package/dist/react/tab.d.ts +0 -3
- package/dist/react/tabs.d.ts +0 -7
- package/dist/react/text-field.d.ts +0 -4
- package/dist/react/timepicker.d.ts +0 -4
- package/dist/react/toolbar.d.ts +0 -5
- package/dist/react/tooltip.d.ts +0 -4
- package/dist/react/top-app-bar.d.ts +0 -4
- package/dist/solid/badge.d.ts +0 -4
- package/dist/solid/bottom-app-bar.d.ts +0 -5
- package/dist/solid/bottom-sheet.d.ts +0 -4
- package/dist/solid/button-group-item.d.ts +0 -3
- package/dist/solid/button-group.d.ts +0 -7
- package/dist/solid/button.d.ts +0 -5
- package/dist/solid/card.d.ts +0 -4
- package/dist/solid/carousel-item.d.ts +0 -3
- package/dist/solid/carousel.d.ts +0 -4
- package/dist/solid/checkbox.d.ts +0 -4
- package/dist/solid/chip.d.ts +0 -3
- package/dist/solid/chips.d.ts +0 -4
- package/dist/solid/datepicker.d.ts +0 -4
- package/dist/solid/dialog.d.ts +0 -7
- package/dist/solid/divider.d.ts +0 -4
- package/dist/solid/drawer-item.d.ts +0 -3
- package/dist/solid/drawer.d.ts +0 -4
- package/dist/solid/extended-fab.d.ts +0 -4
- package/dist/solid/fab-menu-item.d.ts +0 -3
- package/dist/solid/fab-menu.d.ts +0 -6
- package/dist/solid/fab.d.ts +0 -4
- package/dist/solid/icon-button.d.ts +0 -4
- package/dist/solid/list-item.d.ts +0 -3
- package/dist/solid/list.d.ts +0 -4
- package/dist/solid/loading-indicator.d.ts +0 -4
- package/dist/solid/menu-item.d.ts +0 -3
- package/dist/solid/menu.d.ts +0 -4
- package/dist/solid/navigation-bar-item.d.ts +0 -3
- package/dist/solid/navigation-bar.d.ts +0 -4
- package/dist/solid/navigation-rail-item.d.ts +0 -3
- package/dist/solid/navigation-rail.d.ts +0 -4
- package/dist/solid/progress.d.ts +0 -4
- package/dist/solid/radio.d.ts +0 -3
- package/dist/solid/radios.d.ts +0 -4
- package/dist/solid/search-suggestion.d.ts +0 -3
- package/dist/solid/search.d.ts +0 -4
- package/dist/solid/select-option.d.ts +0 -3
- package/dist/solid/select.d.ts +0 -6
- package/dist/solid/side-sheet.d.ts +0 -4
- package/dist/solid/slider.d.ts +0 -4
- package/dist/solid/snackbar.d.ts +0 -7
- package/dist/solid/split-button.d.ts +0 -7
- package/dist/solid/switch.d.ts +0 -4
- package/dist/solid/tab.d.ts +0 -3
- package/dist/solid/tabs.d.ts +0 -7
- package/dist/solid/text-field.d.ts +0 -4
- package/dist/solid/timepicker.d.ts +0 -4
- package/dist/solid/toolbar.d.ts +0 -5
- package/dist/solid/tooltip.d.ts +0 -4
- package/dist/solid/top-app-bar.d.ts +0 -4
- package/dist/vue/badge.d.ts +0 -4
- package/dist/vue/bottom-app-bar.d.ts +0 -5
- package/dist/vue/bottom-sheet.d.ts +0 -4
- package/dist/vue/button-group-item.d.ts +0 -3
- package/dist/vue/button-group.d.ts +0 -7
- package/dist/vue/button.d.ts +0 -5
- package/dist/vue/card.d.ts +0 -4
- package/dist/vue/carousel-item.d.ts +0 -3
- package/dist/vue/carousel.d.ts +0 -4
- package/dist/vue/checkbox.d.ts +0 -4
- package/dist/vue/chip.d.ts +0 -3
- package/dist/vue/chips.d.ts +0 -4
- package/dist/vue/create.d.ts +0 -73
- package/dist/vue/datepicker.d.ts +0 -4
- package/dist/vue/dialog.d.ts +0 -7
- package/dist/vue/divider.d.ts +0 -4
- package/dist/vue/drawer-item.d.ts +0 -3
- package/dist/vue/drawer.d.ts +0 -4
- package/dist/vue/extended-fab.d.ts +0 -4
- package/dist/vue/fab-menu-item.d.ts +0 -3
- package/dist/vue/fab-menu.d.ts +0 -6
- package/dist/vue/fab.d.ts +0 -4
- package/dist/vue/icon-button.d.ts +0 -4
- package/dist/vue/list-item.d.ts +0 -3
- package/dist/vue/list.d.ts +0 -4
- package/dist/vue/loading-indicator.d.ts +0 -4
- package/dist/vue/menu-item.d.ts +0 -3
- package/dist/vue/menu.d.ts +0 -4
- package/dist/vue/navigation-bar-item.d.ts +0 -3
- package/dist/vue/navigation-bar.d.ts +0 -4
- package/dist/vue/navigation-rail-item.d.ts +0 -3
- package/dist/vue/navigation-rail.d.ts +0 -4
- package/dist/vue/progress.d.ts +0 -4
- package/dist/vue/radio.d.ts +0 -3
- package/dist/vue/radios.d.ts +0 -4
- package/dist/vue/search-suggestion.d.ts +0 -3
- package/dist/vue/search.d.ts +0 -4
- package/dist/vue/select-option.d.ts +0 -3
- package/dist/vue/select.d.ts +0 -6
- package/dist/vue/side-sheet.d.ts +0 -4
- package/dist/vue/slider.d.ts +0 -4
- package/dist/vue/snackbar.d.ts +0 -7
- package/dist/vue/split-button.d.ts +0 -7
- package/dist/vue/switch.d.ts +0 -4
- package/dist/vue/tab.d.ts +0 -3
- package/dist/vue/tabs.d.ts +0 -7
- package/dist/vue/text-field.d.ts +0 -4
- package/dist/vue/timepicker.d.ts +0 -4
- package/dist/vue/toolbar.d.ts +0 -5
- package/dist/vue/tooltip.d.ts +0 -4
- package/dist/vue/top-app-bar.d.ts +0 -4
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import type { ButtonConfig, ButtonComponent } from "../button/types.js";
|
|
2
|
-
/** Button group orientation */
|
|
3
|
-
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
4
|
-
/** Button group variant - applies to all buttons in the group */
|
|
5
|
-
export type ButtonGroupVariant = "filled" | "tonal" | "outlined" | "elevated" | "text";
|
|
6
|
-
/** Button group density options */
|
|
7
|
-
export type ButtonGroupDensity = "default" | "comfortable" | "compact";
|
|
8
|
-
/** Event types for button group */
|
|
9
|
-
export type ButtonGroupEventType = "click" | "focus" | "blur" | "change";
|
|
10
|
-
/** Material 3 button group kinds. */
|
|
11
|
-
export type ButtonGroupKind = "standard" | "connected";
|
|
12
|
-
export type ButtonGroupSelection = "none" | "single" | "multi";
|
|
13
|
-
export type ButtonGroupShape = "round" | "square";
|
|
14
|
-
export type ButtonGroupSize = "xs" | "s" | "m" | "l" | "xl";
|
|
15
|
-
/** Label display: always, or only on the selected button (icon-only otherwise) */
|
|
16
|
-
export type ButtonGroupLabels = "always" | "selected";
|
|
17
|
-
/** Payload of the "change" event: the selection after the change. */
|
|
18
|
-
export interface ButtonGroupChangeEvent {
|
|
19
|
-
buttonGroup: ButtonGroupComponent;
|
|
20
|
-
/** Values of the selected buttons, in button order */
|
|
21
|
-
values: string[];
|
|
22
|
-
/** The selection in the `value` shape of the `<m-button-group>` element's `change`: an array for a multi-select group, a string or null otherwise. */
|
|
23
|
-
value: string | string[] | null;
|
|
24
|
-
selected: ButtonComponent[];
|
|
25
|
-
/** The button whose click caused the change, if any */
|
|
26
|
-
button?: ButtonComponent;
|
|
27
|
-
originalEvent?: Event;
|
|
28
|
-
}
|
|
29
|
-
/** Event data for button group events */
|
|
30
|
-
export interface ButtonGroupEvent {
|
|
31
|
-
/** The button group component that contains the clicked button */
|
|
32
|
-
buttonGroup: ButtonGroupComponent;
|
|
33
|
-
/** The button component that was clicked */
|
|
34
|
-
button: ButtonComponent;
|
|
35
|
-
/** Index of the button in the group */
|
|
36
|
-
index: number;
|
|
37
|
-
/** Original DOM event */
|
|
38
|
-
originalEvent: Event;
|
|
39
|
-
}
|
|
40
|
-
/** Configuration for a single button within a button group */
|
|
41
|
-
interface ButtonGroupItemBase extends Omit<ButtonConfig, "variant"> {
|
|
42
|
-
/** Unique identifier for the button */
|
|
43
|
-
id?: string;
|
|
44
|
-
/** Button text content */
|
|
45
|
-
text?: string;
|
|
46
|
-
/** Button icon HTML content. */
|
|
47
|
-
icon?: string;
|
|
48
|
-
/** Accessible label. */
|
|
49
|
-
ariaLabel?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Whether this button is disabled
|
|
52
|
-
* @default false
|
|
53
|
-
*/
|
|
54
|
-
disabled?: boolean;
|
|
55
|
-
/** Value associated with this button */
|
|
56
|
-
value?: string;
|
|
57
|
-
/** Icon shown while selected (toggle buttons). */
|
|
58
|
-
selectedIcon?: string;
|
|
59
|
-
/** Initially selected (selection groups only) */
|
|
60
|
-
selected?: boolean;
|
|
61
|
-
/** Additional CSS class for this button */
|
|
62
|
-
class?: string;
|
|
63
|
-
}
|
|
64
|
-
/** Configuration interface for the Button Group component */
|
|
65
|
-
/** A button in a group. */
|
|
66
|
-
export type ButtonGroupItemConfig = (ButtonGroupItemBase & {
|
|
67
|
-
text: string;
|
|
68
|
-
}) | (ButtonGroupItemBase & {
|
|
69
|
-
text?: undefined;
|
|
70
|
-
ariaLabel: string;
|
|
71
|
-
});
|
|
72
|
-
export interface ButtonGroupConfig {
|
|
73
|
-
/** Array of button configurations */
|
|
74
|
-
buttons?: ButtonGroupItemConfig[];
|
|
75
|
-
/** "standard" (default) or "connected" */
|
|
76
|
-
kind?: ButtonGroupKind;
|
|
77
|
-
/** "none" (default): plain actions. */
|
|
78
|
-
selection?: ButtonGroupSelection;
|
|
79
|
-
/** With single or multi selection: the last selected button cannot be deselected */
|
|
80
|
-
required?: boolean;
|
|
81
|
-
/** Corner style: round (default) or square */
|
|
82
|
-
shape?: ButtonGroupShape;
|
|
83
|
-
/**
|
|
84
|
-
* Standard groups: share of its width a pressed button gains while its neighbours give up the difference (M3: 0.15).
|
|
85
|
-
* @default 0.15
|
|
86
|
-
*/
|
|
87
|
-
expandedRatio?: number;
|
|
88
|
-
/** Material size token: xs, s (default), m, l, xl */
|
|
89
|
-
size?: ButtonGroupSize;
|
|
90
|
-
/** "always" (default): buttons show icon and text. */
|
|
91
|
-
labels?: ButtonGroupLabels;
|
|
92
|
-
/**
|
|
93
|
-
* Visual variant applied to all buttons in the group
|
|
94
|
-
* @default 'outlined'
|
|
95
|
-
*/
|
|
96
|
-
variant?: ButtonGroupVariant;
|
|
97
|
-
/**
|
|
98
|
-
* Orientation of the button group
|
|
99
|
-
* @default 'horizontal'
|
|
100
|
-
*/
|
|
101
|
-
orientation?: ButtonGroupOrientation;
|
|
102
|
-
/**
|
|
103
|
-
* Density setting that controls button sizing
|
|
104
|
-
* @default 'default'
|
|
105
|
-
*/
|
|
106
|
-
density?: ButtonGroupDensity;
|
|
107
|
-
/**
|
|
108
|
-
* Whether the entire button group is disabled
|
|
109
|
-
* @default false
|
|
110
|
-
*/
|
|
111
|
-
disabled?: boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Whether buttons should have equal width
|
|
114
|
-
* @default false
|
|
115
|
-
*/
|
|
116
|
-
equalWidth?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* Component prefix for class names
|
|
119
|
-
* @default 'mtrl'
|
|
120
|
-
*/
|
|
121
|
-
prefix?: string;
|
|
122
|
-
/** Component name used in class generation */
|
|
123
|
-
componentName?: string;
|
|
124
|
-
/** Additional CSS class for the button group container */
|
|
125
|
-
class?: string;
|
|
126
|
-
/**
|
|
127
|
-
* Whether to enable ripple effect on buttons
|
|
128
|
-
* @default true
|
|
129
|
-
*/
|
|
130
|
-
ripple?: boolean;
|
|
131
|
-
/** Ripple effect configuration */
|
|
132
|
-
rippleConfig?: {
|
|
133
|
-
/** How long, in milliseconds, a released wave lingers before it is removed */
|
|
134
|
-
duration?: number;
|
|
135
|
-
};
|
|
136
|
-
/** Accessible label for the button group */
|
|
137
|
-
ariaLabel?: string;
|
|
138
|
-
/** Listeners registered at creation, ahead of any listener added afterwards. */
|
|
139
|
-
on?: {
|
|
140
|
-
click?: (event: ButtonGroupEvent) => void;
|
|
141
|
-
focus?: (event: ButtonGroupEvent) => void;
|
|
142
|
-
blur?: (event: ButtonGroupEvent) => void;
|
|
143
|
-
change?: (event: ButtonGroupChangeEvent) => void;
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
/** Button Group component interface */
|
|
147
|
-
export interface ButtonGroupComponent {
|
|
148
|
-
/** The component's container DOM element */
|
|
149
|
-
element: HTMLElement;
|
|
150
|
-
/** Array of button component instances */
|
|
151
|
-
buttons: ButtonComponent[];
|
|
152
|
-
/**
|
|
153
|
-
* Gets a button by its index
|
|
154
|
-
* @param index
|
|
155
|
-
*/
|
|
156
|
-
getButton: (index: number) => ButtonComponent | undefined;
|
|
157
|
-
/**
|
|
158
|
-
* Gets a button by its id or value
|
|
159
|
-
* @param id
|
|
160
|
-
*/
|
|
161
|
-
getButtonById: (id: string) => ButtonComponent | undefined;
|
|
162
|
-
/** Gets the current variant */
|
|
163
|
-
getVariant: () => ButtonGroupVariant;
|
|
164
|
-
/**
|
|
165
|
-
* Sets the variant for all buttons in the group
|
|
166
|
-
* @param variant
|
|
167
|
-
*/
|
|
168
|
-
setVariant: (variant: ButtonGroupVariant) => ButtonGroupComponent;
|
|
169
|
-
/** Gets the current orientation */
|
|
170
|
-
getOrientation: () => ButtonGroupOrientation;
|
|
171
|
-
/**
|
|
172
|
-
* Sets the orientation of the button group
|
|
173
|
-
* @param orientation
|
|
174
|
-
*/
|
|
175
|
-
setOrientation: (orientation: ButtonGroupOrientation) => ButtonGroupComponent;
|
|
176
|
-
/** Gets the current density */
|
|
177
|
-
getDensity: () => ButtonGroupDensity;
|
|
178
|
-
/**
|
|
179
|
-
* Sets the density of the button group
|
|
180
|
-
* @param density
|
|
181
|
-
*/
|
|
182
|
-
setDensity: (density: ButtonGroupDensity) => ButtonGroupComponent;
|
|
183
|
-
/** Enables the entire button group */
|
|
184
|
-
enable: () => ButtonGroupComponent;
|
|
185
|
-
/** Disables the entire button group */
|
|
186
|
-
disable: () => ButtonGroupComponent;
|
|
187
|
-
/** Whether the whole group is disabled */
|
|
188
|
-
isDisabled: () => boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Enables a specific button by index
|
|
191
|
-
* @param index
|
|
192
|
-
*/
|
|
193
|
-
enableButton: (index: number) => ButtonGroupComponent;
|
|
194
|
-
/**
|
|
195
|
-
* Disables a specific button by index
|
|
196
|
-
* @param index
|
|
197
|
-
*/
|
|
198
|
-
disableButton: (index: number) => ButtonGroupComponent;
|
|
199
|
-
/** Selection (groups with selection "single" or "multi") */
|
|
200
|
-
getSelected: () => string[];
|
|
201
|
-
/** Reads the current model value without changing selection. */
|
|
202
|
-
getValue: () => string | string[] | null;
|
|
203
|
-
isSelected: (value: string) => boolean;
|
|
204
|
-
select: (value: string) => ButtonGroupComponent;
|
|
205
|
-
deselect: (value: string) => ButtonGroupComponent;
|
|
206
|
-
toggle: (value: string) => ButtonGroupComponent;
|
|
207
|
-
getKind: () => ButtonGroupKind;
|
|
208
|
-
getSelection: () => ButtonGroupSelection;
|
|
209
|
-
/**
|
|
210
|
-
* Adds an event listener to the button group
|
|
211
|
-
* @param event
|
|
212
|
-
* @param handler
|
|
213
|
-
*/
|
|
214
|
-
on: {
|
|
215
|
-
(event: "change", handler: (event: ButtonGroupChangeEvent) => void): ButtonGroupComponent;
|
|
216
|
-
(event: "click" | "focus" | "blur", handler: (event: ButtonGroupEvent) => void): ButtonGroupComponent;
|
|
217
|
-
};
|
|
218
|
-
/**
|
|
219
|
-
* Removes an event listener from the button group
|
|
220
|
-
* @param event
|
|
221
|
-
* @param handler
|
|
222
|
-
*/
|
|
223
|
-
off: (event: ButtonGroupEventType, handler: (event: ButtonGroupEvent | ButtonGroupChangeEvent) => void) => ButtonGroupComponent;
|
|
224
|
-
/** Destroys the component and cleans up resources */
|
|
225
|
-
destroy: () => void;
|
|
226
|
-
}
|
|
227
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CardContentConfig, CardHeaderConfig, CardMediaConfig, CardActionsConfig } from "./types.js";
|
|
2
|
-
export declare const CARD_CONTENT_PADDING = true;
|
|
3
|
-
/**
|
|
4
|
-
* Creates a card content component
|
|
5
|
-
* @param config
|
|
6
|
-
*/
|
|
7
|
-
export declare const createCardContent: (config?: CardContentConfig) => HTMLElement;
|
|
8
|
-
/**
|
|
9
|
-
* Creates a card header component
|
|
10
|
-
* @param config
|
|
11
|
-
*/
|
|
12
|
-
export declare const createCardHeader: (config?: CardHeaderConfig) => HTMLElement;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a card actions component
|
|
15
|
-
* @param config
|
|
16
|
-
*/
|
|
17
|
-
export declare const createCardActions: (config?: CardActionsConfig) => HTMLElement;
|
|
18
|
-
/**
|
|
19
|
-
* Creates a card media component
|
|
20
|
-
* @param config
|
|
21
|
-
*/
|
|
22
|
-
export declare const createCardMedia: (config?: CardMediaConfig) => HTMLElement;
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import type { TouchEvents } from "../../core/utils/mobile.js";
|
|
2
|
-
import type { ButtonConfig as BaseButtonConfig } from "../button/types.js";
|
|
3
|
-
import type { ForwardedEventPayload } from "../../core/dom/index.js";
|
|
4
|
-
/** Card variant types following Material Design 3 guidelines. */
|
|
5
|
-
export type CardVariant = 'elevated' | 'filled' | 'outlined';
|
|
6
|
-
/** Card elevation levels in Material Design 3. */
|
|
7
|
-
export type CardElevationLevel = 0 | 1 | 2 | 4;
|
|
8
|
-
/** Button configuration interface for buttons shorthand. */
|
|
9
|
-
export interface ButtonConfig extends Omit<BaseButtonConfig, "variant"> {
|
|
10
|
-
/** Button text content */
|
|
11
|
-
text?: string;
|
|
12
|
-
/** Button variant (text, outlined, filled, etc.) */
|
|
13
|
-
variant?: string;
|
|
14
|
-
/** Button icon HTML content */
|
|
15
|
-
icon?: string;
|
|
16
|
-
}
|
|
17
|
-
/** Card configuration interface defining all possible card options. */
|
|
18
|
-
export interface CardConfig {
|
|
19
|
-
/** Card variant type (elevated, filled, outlined) */
|
|
20
|
-
variant?: CardVariant | string;
|
|
21
|
-
/** The hover and press states and their elevation, for a card the app makes interactive itself. */
|
|
22
|
-
interactive?: boolean;
|
|
23
|
-
/** Whether the card should take full width */
|
|
24
|
-
fullWidth?: boolean;
|
|
25
|
-
/** A card that acts on activation: a button (role, tab stop, Enter and */
|
|
26
|
-
clickable?: boolean;
|
|
27
|
-
/** Whether the card is draggable */
|
|
28
|
-
draggable?: boolean;
|
|
29
|
-
/** Additional CSS class(es) */
|
|
30
|
-
class?: string;
|
|
31
|
-
/** Header configuration */
|
|
32
|
-
headerConfig?: CardHeaderConfig;
|
|
33
|
-
/** Content configuration */
|
|
34
|
-
contentConfig?: CardContentConfig;
|
|
35
|
-
/** Actions configuration */
|
|
36
|
-
actionsConfig?: CardActionsConfig;
|
|
37
|
-
/** Media configuration */
|
|
38
|
-
mediaConfig?: CardMediaConfig;
|
|
39
|
-
/** ARIA attributes for accessibility */
|
|
40
|
-
aria?: CardAriaAttributes;
|
|
41
|
-
/** Inline header configuration (alternative to headerConfig) */
|
|
42
|
-
header?: CardHeaderConfig;
|
|
43
|
-
/** Inline content configuration (alternative to contentConfig) */
|
|
44
|
-
content?: CardContentConfig;
|
|
45
|
-
/** Inline media configuration (alternative to mediaConfig) */
|
|
46
|
-
media?: CardMediaConfig;
|
|
47
|
-
/** Inline actions configuration (alternative to actionsConfig) */
|
|
48
|
-
actions?: CardActionsConfig;
|
|
49
|
-
/** Simple buttons array for actions (will be converted to actionsConfig) */
|
|
50
|
-
buttons?: ButtonConfig[];
|
|
51
|
-
/** Internal component name */
|
|
52
|
-
componentName?: string;
|
|
53
|
-
/** CSS class prefix */
|
|
54
|
-
prefix?: string;
|
|
55
|
-
/** Callback executed after component creation */
|
|
56
|
-
afterCreation?: (component: BaseComponent) => void;
|
|
57
|
-
}
|
|
58
|
-
/** ARIA attributes for card accessibility. */
|
|
59
|
-
export interface CardAriaAttributes {
|
|
60
|
-
/** ARIA label */
|
|
61
|
-
label?: string;
|
|
62
|
-
/** ARIA labelledby */
|
|
63
|
-
labelledby?: string;
|
|
64
|
-
/** ARIA describedby */
|
|
65
|
-
describedby?: string;
|
|
66
|
-
/** ARIA role (default: 'button' for a clickable card, 'article' for any other) */
|
|
67
|
-
role?: string;
|
|
68
|
-
/** Additional ARIA attributes as key-value pairs */
|
|
69
|
-
[key: string]: string | undefined;
|
|
70
|
-
}
|
|
71
|
-
/** Card header configuration. */
|
|
72
|
-
export interface CardHeaderConfig {
|
|
73
|
-
/** Header title text */
|
|
74
|
-
title?: string;
|
|
75
|
-
/** Header subtitle text */
|
|
76
|
-
subtitle?: string;
|
|
77
|
-
/** Avatar element or HTML string */
|
|
78
|
-
avatar?: HTMLElement | string;
|
|
79
|
-
/** Action element or HTML string */
|
|
80
|
-
action?: HTMLElement | string;
|
|
81
|
-
/** Additional CSS class(es) */
|
|
82
|
-
class?: string;
|
|
83
|
-
}
|
|
84
|
-
/** Card content configuration. */
|
|
85
|
-
export interface CardContentConfig {
|
|
86
|
-
/** Text content */
|
|
87
|
-
text?: string;
|
|
88
|
-
/** HTML content */
|
|
89
|
-
html?: string;
|
|
90
|
-
/** Child elements */
|
|
91
|
-
children?: HTMLElement[];
|
|
92
|
-
/** Whether to add padding (true by default) */
|
|
93
|
-
padding?: boolean;
|
|
94
|
-
/** Additional CSS class(es) */
|
|
95
|
-
class?: string;
|
|
96
|
-
}
|
|
97
|
-
/** Card actions configuration. */
|
|
98
|
-
export interface CardActionsConfig {
|
|
99
|
-
/** Action elements */
|
|
100
|
-
actions?: HTMLElement[];
|
|
101
|
-
/** Whether actions should be full-bleed */
|
|
102
|
-
fullBleed?: boolean;
|
|
103
|
-
/** Whether actions should be stacked vertically */
|
|
104
|
-
vertical?: boolean;
|
|
105
|
-
/** Horizontal alignment */
|
|
106
|
-
align?: 'start' | 'center' | 'end' | 'space-between';
|
|
107
|
-
/** Additional CSS class(es) */
|
|
108
|
-
class?: string;
|
|
109
|
-
}
|
|
110
|
-
/** Card media configuration. */
|
|
111
|
-
export interface CardMediaConfig {
|
|
112
|
-
/** Image source URL */
|
|
113
|
-
src?: string;
|
|
114
|
-
/** Image alt text (required for accessibility) */
|
|
115
|
-
alt?: string;
|
|
116
|
-
/** Custom element instead of image */
|
|
117
|
-
element?: HTMLElement;
|
|
118
|
-
/** Aspect ratio */
|
|
119
|
-
aspectRatio?: '16:9' | '4:3' | '1:1' | string;
|
|
120
|
-
/** Whether media should use object-fit: contain */
|
|
121
|
-
contain?: boolean;
|
|
122
|
-
/** Additional CSS class(es) */
|
|
123
|
-
class?: string;
|
|
124
|
-
/** Position of the media in the card */
|
|
125
|
-
position?: 'top' | 'bottom';
|
|
126
|
-
}
|
|
127
|
-
/** Base component interface. */
|
|
128
|
-
export interface BaseComponent {
|
|
129
|
-
/** The DOM element */
|
|
130
|
-
element: HTMLElement;
|
|
131
|
-
/** Get class name with prefix */
|
|
132
|
-
getClass: (name: string) => string;
|
|
133
|
-
/** Get modifier class */
|
|
134
|
-
getModifierClass: (base: string, modifier: string) => string;
|
|
135
|
-
/** Get element class */
|
|
136
|
-
getElementClass: (base: string, element: string) => string;
|
|
137
|
-
/** Add CSS class(es) */
|
|
138
|
-
addClass: (...classes: string[]) => BaseComponent;
|
|
139
|
-
/** Emit one of the card's own events ({@link CardEvents}), with its payload: the names and payloads `on` and `off` accept. */
|
|
140
|
-
emit?: <K extends keyof CardEvents>(event: K, payload: Parameters<CardEvents[K]>[0]) => void;
|
|
141
|
-
/** Component configuration */
|
|
142
|
-
config: CardComponentConfig;
|
|
143
|
-
/** Touch state for touch interactions */
|
|
144
|
-
touchState?: TouchState;
|
|
145
|
-
/** Update touch state */
|
|
146
|
-
updateTouchState?: (event: TouchEvent | MouseEvent, status: 'start' | 'end') => void;
|
|
147
|
-
/** Component lifecycle methods */
|
|
148
|
-
lifecycle?: ComponentLifecycle;
|
|
149
|
-
}
|
|
150
|
-
/** Touch state interface for touch interactions. */
|
|
151
|
-
export interface TouchState {
|
|
152
|
-
/** Timestamp when touch started */
|
|
153
|
-
startTime: number;
|
|
154
|
-
/** Starting position */
|
|
155
|
-
startPosition: {
|
|
156
|
-
x: number;
|
|
157
|
-
y: number;
|
|
158
|
-
};
|
|
159
|
-
/** Whether touch is active */
|
|
160
|
-
isTouching: boolean;
|
|
161
|
-
/** Current touch target */
|
|
162
|
-
activeTarget: EventTarget | null;
|
|
163
|
-
}
|
|
164
|
-
/** Component lifecycle interface. */
|
|
165
|
-
export interface ComponentLifecycle {
|
|
166
|
-
/** Called when component is mounted to DOM */
|
|
167
|
-
mount?: () => void;
|
|
168
|
-
/** Called when component is updated */
|
|
169
|
-
update?: () => void;
|
|
170
|
-
/** Called when component is destroyed */
|
|
171
|
-
destroy: () => void;
|
|
172
|
-
}
|
|
173
|
-
/** Card component configuration. */
|
|
174
|
-
export interface CardComponentConfig extends CardConfig {
|
|
175
|
-
/** Component name */
|
|
176
|
-
componentName: string;
|
|
177
|
-
/** CSS class prefix */
|
|
178
|
-
prefix: string;
|
|
179
|
-
}
|
|
180
|
-
/** The card's events. */
|
|
181
|
-
export interface CardEvents extends TouchEvents {
|
|
182
|
-
/** Presentation state after expanding or collapsing. */
|
|
183
|
-
expandedChanged: (payload: {
|
|
184
|
-
expanded: boolean;
|
|
185
|
-
}) => void;
|
|
186
|
-
click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
187
|
-
mouseenter: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
188
|
-
mouseleave: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
189
|
-
keydown: (payload: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
|
|
190
|
-
focus: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
|
|
191
|
-
blur: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
|
|
192
|
-
dragstart: (payload: {
|
|
193
|
-
event: DragEvent;
|
|
194
|
-
}) => void;
|
|
195
|
-
dragend: (payload: {
|
|
196
|
-
event: DragEvent;
|
|
197
|
-
}) => void;
|
|
198
|
-
}
|
|
199
|
-
/** Card component interface with methods. */
|
|
200
|
-
export interface CardComponent extends BaseComponent {
|
|
201
|
-
/** Subscribes to one of the card's events */
|
|
202
|
-
on: <K extends keyof CardEvents>(event: K, handler: CardEvents[K]) => CardComponent;
|
|
203
|
-
/** Removes a handler added with `on` */
|
|
204
|
-
off: <K extends keyof CardEvents>(event: K, handler: CardEvents[K]) => CardComponent;
|
|
205
|
-
/**
|
|
206
|
-
* Adds content to the card.
|
|
207
|
-
* @param contentElement
|
|
208
|
-
*/
|
|
209
|
-
addContent: (contentElement: HTMLElement) => CardComponent;
|
|
210
|
-
/**
|
|
211
|
-
* Sets the card header.
|
|
212
|
-
* @param headerElement
|
|
213
|
-
*/
|
|
214
|
-
setHeader: (headerElement: HTMLElement) => CardComponent;
|
|
215
|
-
/**
|
|
216
|
-
* Adds media to the card.
|
|
217
|
-
* @param mediaElement
|
|
218
|
-
* @param position
|
|
219
|
-
*/
|
|
220
|
-
addMedia: (mediaElement: HTMLElement, position?: 'top' | 'bottom') => CardComponent;
|
|
221
|
-
/**
|
|
222
|
-
* Sets the card actions section.
|
|
223
|
-
* @param actionsElement
|
|
224
|
-
*/
|
|
225
|
-
setActions: (actionsElement: HTMLElement) => CardComponent;
|
|
226
|
-
/**
|
|
227
|
-
* Makes the card draggable.
|
|
228
|
-
* @param dragStartCallback
|
|
229
|
-
*/
|
|
230
|
-
makeDraggable: (dragStartCallback?: (event: DragEvent) => void) => CardComponent;
|
|
231
|
-
/** Sets focus to the card. */
|
|
232
|
-
focus: () => CardComponent;
|
|
233
|
-
/** Destroys the card component and removes event listeners. */
|
|
234
|
-
destroy: () => void;
|
|
235
|
-
}
|
|
236
|
-
/** Loading feature interface. */
|
|
237
|
-
export interface LoadingFeature {
|
|
238
|
-
/** Check if loading state is active */
|
|
239
|
-
isLoading: () => boolean;
|
|
240
|
-
/** Set loading state */
|
|
241
|
-
setLoading: (loading: boolean) => void;
|
|
242
|
-
}
|
|
243
|
-
/** Expandable feature interface. */
|
|
244
|
-
export interface ExpandableFeature {
|
|
245
|
-
/** Check if expanded state is active */
|
|
246
|
-
isExpanded: () => boolean;
|
|
247
|
-
/** Set expanded state */
|
|
248
|
-
setExpanded: (expanded: boolean) => void;
|
|
249
|
-
/** Toggle expanded state */
|
|
250
|
-
toggleExpanded: () => void;
|
|
251
|
-
}
|
|
252
|
-
/** Swipeable feature interface. */
|
|
253
|
-
export interface SwipeableFeature {
|
|
254
|
-
/** Reset swipe position */
|
|
255
|
-
reset: () => void;
|
|
256
|
-
}
|
|
257
|
-
/** API options interface. */
|
|
258
|
-
export interface ApiOptions {
|
|
259
|
-
/** Lifecycle methods */
|
|
260
|
-
lifecycle: {
|
|
261
|
-
/** Destroy callback */
|
|
262
|
-
destroy: () => void;
|
|
263
|
-
};
|
|
264
|
-
/** The resolved configuration the card was created from */
|
|
265
|
-
config: CardComponentConfig;
|
|
266
|
-
}
|
|
267
|
-
/** Registers CardConfig with the global defaults map, so `setComponentDefaults("card", ...)` is typed without core importing anything from this component. */
|
|
268
|
-
declare module "../../core/config/global" {
|
|
269
|
-
interface ComponentConfigMap {
|
|
270
|
-
card?: Partial<CardConfig>;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { ForwardedEventPayload } from "../../core/dom/index.js";
|
|
2
|
-
/** Current item reported by programmatic navigation or native scrolling. */
|
|
3
|
-
export interface CarouselChangePayload {
|
|
4
|
-
/** The current item's index, as `getValue()` returns it; every model event carries it */
|
|
5
|
-
value: number;
|
|
6
|
-
}
|
|
7
|
-
/** Events emitted by the scroll feature and forwarded from the root. */
|
|
8
|
-
export interface CarouselEvents {
|
|
9
|
-
change: (payload: CarouselChangePayload) => void;
|
|
10
|
-
focus: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
|
|
11
|
-
blur: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
|
|
12
|
-
}
|
|
13
|
-
export type CarouselVariant = "multi-browse" | "uncontained" | "hero" | "hero-center" | "full-screen";
|
|
14
|
-
/** Content of one carousel item. */
|
|
15
|
-
export interface CarouselSlide {
|
|
16
|
-
image?: string;
|
|
17
|
-
/** Alternative text for the image; empty when the image is decorative */
|
|
18
|
-
alt?: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
buttonText?: string;
|
|
22
|
-
buttonUrl?: string;
|
|
23
|
-
/** Custom content, replaces the image and text */
|
|
24
|
-
content?: HTMLElement | string;
|
|
25
|
-
}
|
|
26
|
-
export interface CarouselConfig {
|
|
27
|
-
/** Layout, "multi-browse" by default */
|
|
28
|
-
variant?: CarouselVariant;
|
|
29
|
-
slides?: CarouselSlide[];
|
|
30
|
-
/** Width of a large item in px. */
|
|
31
|
-
itemWidth?: number;
|
|
32
|
-
/** Space between items, 8 by default (16 for full-screen) */
|
|
33
|
-
gap?: number;
|
|
34
|
-
/** Space between the container edges and the items, 16 by default (0 for full-screen) */
|
|
35
|
-
padding?: number;
|
|
36
|
-
/** Corner radius of the items, 28 by default */
|
|
37
|
-
cornerRadius?: number;
|
|
38
|
-
/** Snap to items after scrolling; on by default except for uncontained layouts */
|
|
39
|
-
snap?: boolean;
|
|
40
|
-
/** Scroll horizontal carousels with a vertical mouse wheel; false by default. */
|
|
41
|
-
wheel?: boolean;
|
|
42
|
-
initialSlide?: number;
|
|
43
|
-
minSmallItemWidth?: number;
|
|
44
|
-
maxSmallItemWidth?: number;
|
|
45
|
-
/** Accessible name of the carousel */
|
|
46
|
-
ariaLabel?: string;
|
|
47
|
-
prefix?: string;
|
|
48
|
-
componentName?: string;
|
|
49
|
-
class?: string;
|
|
50
|
-
}
|
|
51
|
-
export interface CarouselComponent {
|
|
52
|
-
element: HTMLElement;
|
|
53
|
-
slides: SlidesAPI;
|
|
54
|
-
lifecycle: {
|
|
55
|
-
destroy: () => void;
|
|
56
|
-
};
|
|
57
|
-
getClass: (name: string) => string;
|
|
58
|
-
next: () => CarouselComponent;
|
|
59
|
-
prev: () => CarouselComponent;
|
|
60
|
-
goTo: (index: number) => CarouselComponent;
|
|
61
|
-
getCurrentSlide: () => number;
|
|
62
|
-
/** Reads the current model value without changing selection. */
|
|
63
|
-
getValue: () => number;
|
|
64
|
-
getVariant: () => CarouselVariant;
|
|
65
|
-
/** Enable or disable vertical mouse wheel scrolling in place. */
|
|
66
|
-
setWheel: (on: boolean) => CarouselComponent;
|
|
67
|
-
addSlide: (slide: CarouselSlide, index?: number) => CarouselComponent;
|
|
68
|
-
removeSlide: (index: number) => CarouselComponent;
|
|
69
|
-
destroy: () => void;
|
|
70
|
-
on: <K extends keyof CarouselEvents>(event: K, handler: CarouselEvents[K]) => CarouselComponent;
|
|
71
|
-
off: <K extends keyof CarouselEvents>(event: K, handler: CarouselEvents[K]) => CarouselComponent;
|
|
72
|
-
addClass: (...classes: string[]) => CarouselComponent;
|
|
73
|
-
}
|
|
74
|
-
export interface SlidesAPI {
|
|
75
|
-
addSlide: (slide: CarouselSlide, index?: number) => SlidesAPI;
|
|
76
|
-
removeSlide: (index: number) => SlidesAPI;
|
|
77
|
-
updateSlide: (index: number, slide: CarouselSlide) => SlidesAPI;
|
|
78
|
-
getSlide: (index: number) => CarouselSlide | null;
|
|
79
|
-
getCount: () => number;
|
|
80
|
-
getElements: () => HTMLElement[];
|
|
81
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Checkbox Component Implementation This module implements a Material Design 3 checkbox component with support for different visual variants, indeterminate state, and configurable label positioning. */
|
|
2
|
-
import { CheckboxConfig, CheckboxComponent } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new Checkbox component with the specified configuration.
|
|
5
|
-
* @param config
|
|
6
|
-
*/
|
|
7
|
-
declare const createCheckbox: (config?: CheckboxConfig) => CheckboxComponent;
|
|
8
|
-
export default createCheckbox;
|