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,300 +0,0 @@
|
|
|
1
|
-
import type { ForwardedEventPayload } from "../../core/dom/index.js";
|
|
2
|
-
import type { NormalizedEvent } from "../../core/utils/mobile.js";
|
|
3
|
-
/** Value returned by the API, including complete ranges and empty selections. */
|
|
4
|
-
export type DatePickerValue = Date | [
|
|
5
|
-
Date,
|
|
6
|
-
Date
|
|
7
|
-
] | null;
|
|
8
|
-
/** The value as the selection mode shapes it: a range is a pair, a single date a date; an unknown mode, either. */
|
|
9
|
-
export type DatePickerValueOf<M> = M extends "range" ? [
|
|
10
|
-
Date,
|
|
11
|
-
Date
|
|
12
|
-
] | null : M extends "single" ? Date | null : DatePickerValue;
|
|
13
|
-
/** What setValue and `value` take: a date, a range as a pair, or as { start, end }. */
|
|
14
|
-
export type DatePickerInput = Date | string | [
|
|
15
|
-
Date | string,
|
|
16
|
-
Date | string
|
|
17
|
-
] | {
|
|
18
|
-
start: Date | string;
|
|
19
|
-
end: Date | string;
|
|
20
|
-
};
|
|
21
|
-
/** One shape whatever committed the value: a range's `value` is the pair, and `rangeEndDate` its end, kept for compatibility (null otherwise). */
|
|
22
|
-
export interface DatePickerChangePayload<V = DatePickerValue> {
|
|
23
|
-
value: V;
|
|
24
|
-
rangeEndDate: Date | null;
|
|
25
|
-
formattedValue: string;
|
|
26
|
-
/** The value as ISO 8601 text, the `value` of the `<m-datepicker>` element's */
|
|
27
|
-
iso: string;
|
|
28
|
-
}
|
|
29
|
-
/** Visibility events carry the committed value, including complete ranges. */
|
|
30
|
-
export interface DatePickerVisibilityPayload<V = DatePickerValue> {
|
|
31
|
-
value: V;
|
|
32
|
-
}
|
|
33
|
-
/** Normalized touch-end event emitted by the interactive root. */
|
|
34
|
-
export type DatePickerTapPayload = NormalizedEvent;
|
|
35
|
-
/** Horizontal swipe emitted by the interactive root. */
|
|
36
|
-
export interface DatePickerSwipePayload {
|
|
37
|
-
direction: "left" | "right";
|
|
38
|
-
deltaX: number;
|
|
39
|
-
deltaY: number;
|
|
40
|
-
}
|
|
41
|
-
/** Events emitted by the picker API, calendar selections and interactive root. */
|
|
42
|
-
export interface DatePickerEvents<V = DatePickerValue> {
|
|
43
|
-
change: (payload: DatePickerChangePayload<V>) => void;
|
|
44
|
-
open: (payload: DatePickerVisibilityPayload<V>) => void;
|
|
45
|
-
close: (payload: DatePickerVisibilityPayload<V>) => void;
|
|
46
|
-
click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
47
|
-
keydown: (payload: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
|
|
48
|
-
tap: (payload: DatePickerTapPayload) => void;
|
|
49
|
-
swipe: (payload: DatePickerSwipePayload) => void;
|
|
50
|
-
}
|
|
51
|
-
/** DatePicker variant types */
|
|
52
|
-
export type DatePickerVariant = 'docked' | 'modal' | 'modal-input' | 'fullscreen';
|
|
53
|
-
/** DatePicker view types */
|
|
54
|
-
export type DatePickerView = 'day' | 'month' | 'year';
|
|
55
|
-
/** DatePicker selection mode types */
|
|
56
|
-
export type DatePickerSelectionMode = 'single' | 'range';
|
|
57
|
-
/** Day names for the calendar */
|
|
58
|
-
export declare const DAY_NAMES: string[];
|
|
59
|
-
/** Month names for the calendar */
|
|
60
|
-
export declare const MONTH_NAMES: string[];
|
|
61
|
-
/** Month names abbreviated */
|
|
62
|
-
export declare const MONTH_NAMES_SHORT: string[];
|
|
63
|
-
/** CSS class name for today's date */
|
|
64
|
-
export declare const TODAY_CLASS = "datepicker__day--today";
|
|
65
|
-
/** CSS class name for selected date */
|
|
66
|
-
export declare const SELECTED_CLASS = "datepicker__day--selected";
|
|
67
|
-
/** CSS class name for dates outside the current month */
|
|
68
|
-
export declare const OUTSIDE_MONTH_CLASS = "datepicker__day--outside";
|
|
69
|
-
/** CSS class for the first date in a range */
|
|
70
|
-
export declare const RANGE_START_CLASS = "datepicker__cell--range-start";
|
|
71
|
-
/** CSS class for the last date in a range */
|
|
72
|
-
export declare const RANGE_END_CLASS = "datepicker__cell--range-end";
|
|
73
|
-
/** CSS class for dates between start and end in a range */
|
|
74
|
-
export declare const RANGE_MIDDLE_CLASS = "datepicker__cell--range";
|
|
75
|
-
/** Configuration interface for the DatePicker component */
|
|
76
|
-
export interface DatePickerConfig {
|
|
77
|
-
/** Name of the committed form input. */
|
|
78
|
-
name?: string;
|
|
79
|
-
/**
|
|
80
|
-
* DatePicker variant that determines display style
|
|
81
|
-
* @default 'docked'
|
|
82
|
-
*/
|
|
83
|
-
variant?: DatePickerVariant | string;
|
|
84
|
-
/**
|
|
85
|
-
* Whether the datepicker is initially disabled
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
disabled?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Initial view to display (day, month, year)
|
|
91
|
-
* @default 'day'
|
|
92
|
-
*/
|
|
93
|
-
initialView?: DatePickerView | string;
|
|
94
|
-
/**
|
|
95
|
-
* Selection mode for the datepicker (single or range)
|
|
96
|
-
* @default 'single'
|
|
97
|
-
*/
|
|
98
|
-
selectionMode?: DatePickerSelectionMode | string;
|
|
99
|
-
/** Initial selected date(s) */
|
|
100
|
-
value?: DatePickerInput;
|
|
101
|
-
/** The value shows and cannot change: no typing, no calendar. */
|
|
102
|
-
readOnly?: boolean;
|
|
103
|
-
/** A date is required: on the input for forms, and checkValidity(). */
|
|
104
|
-
required?: boolean;
|
|
105
|
-
/** The supporting text under the field. */
|
|
106
|
-
supportingText?: string;
|
|
107
|
-
/** Minimum selectable date */
|
|
108
|
-
minDate?: Date | string;
|
|
109
|
-
/** Maximum selectable date */
|
|
110
|
-
maxDate?: Date | string;
|
|
111
|
-
/**
|
|
112
|
-
* Format for displaying dates
|
|
113
|
-
* @default 'MM/DD/YYYY'
|
|
114
|
-
*/
|
|
115
|
-
dateFormat?: string;
|
|
116
|
-
/** Label text for the datepicker */
|
|
117
|
-
label?: string;
|
|
118
|
-
/** Accessible name of the calendar dialog; defaults to the visible label. */
|
|
119
|
-
ariaLabel?: string;
|
|
120
|
-
/** Placeholder text for the input field */
|
|
121
|
-
placeholder?: string;
|
|
122
|
-
/** Additional CSS classes to add to the datepicker */
|
|
123
|
-
class?: string;
|
|
124
|
-
/**
|
|
125
|
-
* Component prefix for class names
|
|
126
|
-
* @default 'mtrl'
|
|
127
|
-
*/
|
|
128
|
-
prefix?: string;
|
|
129
|
-
/** Component name used in class generation */
|
|
130
|
-
componentName?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Whether to enable animation effects
|
|
133
|
-
* @default true
|
|
134
|
-
*/
|
|
135
|
-
animate?: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* Whether pointer or Space selection also closes the picker.
|
|
138
|
-
* @default false
|
|
139
|
-
*/
|
|
140
|
-
closeOnSelect?: boolean;
|
|
141
|
-
/** Array of dates to highlight or disable */
|
|
142
|
-
specialDates?: Array<{
|
|
143
|
-
date: Date | string;
|
|
144
|
-
highlight?: boolean;
|
|
145
|
-
disabled?: boolean;
|
|
146
|
-
tooltip?: string;
|
|
147
|
-
}>;
|
|
148
|
-
}
|
|
149
|
-
/** Date object with additional properties for rendering */
|
|
150
|
-
export interface CalendarDate {
|
|
151
|
-
/** JavaScript Date object */
|
|
152
|
-
date: Date;
|
|
153
|
-
/** Day of the month (1-31) */
|
|
154
|
-
day: number;
|
|
155
|
-
/** Whether the date is in the current month being displayed */
|
|
156
|
-
isCurrentMonth: boolean;
|
|
157
|
-
/** Whether the date is today */
|
|
158
|
-
isToday: boolean;
|
|
159
|
-
/** Whether the date is selected */
|
|
160
|
-
isSelected: boolean;
|
|
161
|
-
/** Whether the date is disabled */
|
|
162
|
-
isDisabled: boolean;
|
|
163
|
-
/** Whether the date is the first date in a range */
|
|
164
|
-
isRangeStart?: boolean;
|
|
165
|
-
/** Whether the date is the last date in a range */
|
|
166
|
-
isRangeEnd?: boolean;
|
|
167
|
-
/** Whether the date is between start and end in a range */
|
|
168
|
-
isRangeMiddle?: boolean;
|
|
169
|
-
}
|
|
170
|
-
/** Calendar API interface for managing calendar navigation */
|
|
171
|
-
export interface CalendarAPI {
|
|
172
|
-
/** Updates the calendar view to display a specific month/year */
|
|
173
|
-
goToDate: (date: Date) => void;
|
|
174
|
-
/** Moves to the next month */
|
|
175
|
-
nextMonth: () => void;
|
|
176
|
-
/** Moves to the previous month */
|
|
177
|
-
prevMonth: () => void;
|
|
178
|
-
/** Moves to the next year */
|
|
179
|
-
nextYear: () => void;
|
|
180
|
-
/** Moves to the previous year */
|
|
181
|
-
prevYear: () => void;
|
|
182
|
-
/** Switches to day selection view */
|
|
183
|
-
showDayView: () => void;
|
|
184
|
-
/** Switches to month selection view */
|
|
185
|
-
showMonthView: () => void;
|
|
186
|
-
/** Switches to year selection view */
|
|
187
|
-
showYearView: () => void;
|
|
188
|
-
/** Gets the current calendar view */
|
|
189
|
-
getCurrentView: () => string;
|
|
190
|
-
}
|
|
191
|
-
/** DatePicker component interface */
|
|
192
|
-
export interface DatePickerComponent<V = DatePickerValue> {
|
|
193
|
-
/** The datepicker's main DOM element */
|
|
194
|
-
element: HTMLElement;
|
|
195
|
-
/** The input field DOM element */
|
|
196
|
-
input: HTMLInputElement;
|
|
197
|
-
/** API for managing calendar and selected dates */
|
|
198
|
-
calendar: CalendarAPI;
|
|
199
|
-
/** API for managing disabled state */
|
|
200
|
-
disabled: {
|
|
201
|
-
/** Enables the datepicker */
|
|
202
|
-
enable: () => void;
|
|
203
|
-
/** Disables the datepicker */
|
|
204
|
-
disable: () => void;
|
|
205
|
-
/** Checks if the datepicker is disabled */
|
|
206
|
-
isDisabled: () => boolean;
|
|
207
|
-
};
|
|
208
|
-
/** API for managing component lifecycle */
|
|
209
|
-
lifecycle: {
|
|
210
|
-
/** Destroys the component and cleans up resources */
|
|
211
|
-
destroy: () => void;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Gets a class name with the component's prefix
|
|
215
|
-
* @param name
|
|
216
|
-
*/
|
|
217
|
-
getClass: (name: string) => string;
|
|
218
|
-
/** Opens the datepicker dropdown/modal. */
|
|
219
|
-
open: () => DatePickerComponent<V>;
|
|
220
|
-
/** Closes the datepicker dropdown/modal. */
|
|
221
|
-
close: () => DatePickerComponent<V>;
|
|
222
|
-
/** Whether the dropdown or modal is open */
|
|
223
|
-
isOpen: () => boolean;
|
|
224
|
-
/** Gets the selected date(s) */
|
|
225
|
-
getValue: () => V;
|
|
226
|
-
/**
|
|
227
|
-
* Sets the selected date(s).
|
|
228
|
-
* @param value
|
|
229
|
-
*/
|
|
230
|
-
setValue: (value: DatePickerInput) => DatePickerComponent<V>;
|
|
231
|
-
/** Read-only: the value shows and cannot change */
|
|
232
|
-
setReadOnly: (readOnly: boolean) => DatePickerComponent<V>;
|
|
233
|
-
/** Whether the picker is read-only */
|
|
234
|
-
isReadOnly: () => boolean;
|
|
235
|
-
/** Whether a date is required */
|
|
236
|
-
setRequired: (required: boolean) => DatePickerComponent<V>;
|
|
237
|
-
/** False when a date is required and missing. */
|
|
238
|
-
checkValidity: () => boolean;
|
|
239
|
-
/** As checkValidity(), and shows the error on the field when false */
|
|
240
|
-
reportValidity: () => boolean;
|
|
241
|
-
/** The supporting text; empty or null shows the date format */
|
|
242
|
-
setSupportingText: (text: string | null) => DatePickerComponent<V>;
|
|
243
|
-
/** Names the calendar dialog; empty restores its visible label. */
|
|
244
|
-
setAriaLabel: (label: string) => DatePickerComponent<V>;
|
|
245
|
-
/** Gets the formatted date string based on the selected date(s) */
|
|
246
|
-
getFormattedValue: () => string;
|
|
247
|
-
/** Clears the selected date(s). */
|
|
248
|
-
clear: () => DatePickerComponent<V>;
|
|
249
|
-
/** Enables the datepicker */
|
|
250
|
-
enable: () => DatePickerComponent<V>;
|
|
251
|
-
/** Disables the datepicker */
|
|
252
|
-
disable: () => DatePickerComponent<V>;
|
|
253
|
-
/**
|
|
254
|
-
* Sets the minimum selectable date
|
|
255
|
-
* @param date
|
|
256
|
-
*/
|
|
257
|
-
setMinDate: (date: Date | string) => DatePickerComponent<V>;
|
|
258
|
-
/**
|
|
259
|
-
* Sets the maximum selectable date
|
|
260
|
-
* @param date
|
|
261
|
-
*/
|
|
262
|
-
setMaxDate: (date: Date | string) => DatePickerComponent<V>;
|
|
263
|
-
/** Destroys the datepicker component and cleans up resources */
|
|
264
|
-
destroy: () => void;
|
|
265
|
-
/**
|
|
266
|
-
* Adds an event listener to the datepicker
|
|
267
|
-
* @param event
|
|
268
|
-
* @param handler
|
|
269
|
-
*/
|
|
270
|
-
on: <K extends keyof DatePickerEvents<V>>(event: K, handler: DatePickerEvents<V>[K]) => DatePickerComponent<V>;
|
|
271
|
-
/**
|
|
272
|
-
* Removes an event listener from the datepicker
|
|
273
|
-
* @param event
|
|
274
|
-
* @param handler
|
|
275
|
-
*/
|
|
276
|
-
off: <K extends keyof DatePickerEvents<V>>(event: K, handler: DatePickerEvents<V>[K]) => DatePickerComponent<V>;
|
|
277
|
-
}
|
|
278
|
-
/** Internal calendar view model. */
|
|
279
|
-
export interface DatePickerState {
|
|
280
|
-
selectedDate: Date | null;
|
|
281
|
-
rangeEndDate: Date | null;
|
|
282
|
-
currentView: DatePickerView;
|
|
283
|
-
currentMonth: number;
|
|
284
|
-
currentYear: number;
|
|
285
|
-
focusedDate: Date;
|
|
286
|
-
minDate: Date | null;
|
|
287
|
-
maxDate: Date | null;
|
|
288
|
-
dateFormat: string;
|
|
289
|
-
variant: DatePickerVariant;
|
|
290
|
-
selectionMode: DatePickerSelectionMode;
|
|
291
|
-
inputMode: boolean;
|
|
292
|
-
prefix: string;
|
|
293
|
-
id: string;
|
|
294
|
-
label: string;
|
|
295
|
-
specialDates: NonNullable<DatePickerConfig["specialDates"]>;
|
|
296
|
-
isAllowed(date: Date): boolean;
|
|
297
|
-
/** Full screen: the first month of the rendered list, and how many follow. */
|
|
298
|
-
listStart?: Date;
|
|
299
|
-
listLength?: number;
|
|
300
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const DAY_NAMES = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
|
|
2
|
-
export const MONTH_NAMES = [
|
|
3
|
-
'January', 'February', 'March', 'April',
|
|
4
|
-
'May', 'June', 'July', 'August',
|
|
5
|
-
'September', 'October', 'November', 'December'
|
|
6
|
-
];
|
|
7
|
-
export const MONTH_NAMES_SHORT = [
|
|
8
|
-
'Jan', 'Feb', 'Mar', 'Apr',
|
|
9
|
-
'May', 'Jun', 'Jul', 'Aug',
|
|
10
|
-
'Sep', 'Oct', 'Nov', 'Dec'
|
|
11
|
-
];
|
|
12
|
-
export const TODAY_CLASS = 'datepicker__day--today';
|
|
13
|
-
export const SELECTED_CLASS = 'datepicker__day--selected';
|
|
14
|
-
export const OUTSIDE_MONTH_CLASS = 'datepicker__day--outside';
|
|
15
|
-
export const RANGE_START_CLASS = 'datepicker__cell--range-start';
|
|
16
|
-
export const RANGE_END_CLASS = 'datepicker__cell--range-end';
|
|
17
|
-
export const RANGE_MIDDLE_CLASS = 'datepicker__cell--range';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Dialog Component Implementation This module implements a Material Design 3 dialog component that can be used for alerts, confirmations, form submissions, and complex interactions. */
|
|
2
|
-
import { DialogConfig, DialogComponent } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new Dialog component with the specified configuration.
|
|
5
|
-
* @param config
|
|
6
|
-
*/
|
|
7
|
-
declare const createDialog: (config?: DialogConfig) => DialogComponent;
|
|
8
|
-
export default createDialog;
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import type { ButtonComponent } from "../button/types.js";
|
|
2
|
-
import type { EventCallback } from "../../core/state/emitter.js";
|
|
3
|
-
/** Dialog size types - determines the width and height of the dialog */
|
|
4
|
-
export type DialogSize = 'small' | 'medium' | 'large' | 'fullwidth' | 'fullscreen';
|
|
5
|
-
/** Dialog animation types - controls how the dialog appears and disappears */
|
|
6
|
-
export type DialogAnimation = 'scale' | 'slide-up' | 'slide-down' | 'fade';
|
|
7
|
-
/** Dialog footer alignment types - controls how buttons in the footer are aligned */
|
|
8
|
-
export type DialogFooterAlignment = 'right' | 'left' | 'center' | 'space-between';
|
|
9
|
-
/** Dialog event types - events that can be listened to with the on() method */
|
|
10
|
-
export type DialogEventType = 'open' | 'close' | 'beforeopen' | 'beforeclose' | 'afteropen' | 'afterclose';
|
|
11
|
-
/** Configuration interface for the Dialog component */
|
|
12
|
-
export interface DialogConfig {
|
|
13
|
-
/** Dialog title text - appears in the header */
|
|
14
|
-
title?: string;
|
|
15
|
-
/** Dialog subtitle text - appears below title in smaller text */
|
|
16
|
-
subtitle?: string;
|
|
17
|
-
/** Dialog content (text or HTML) Can include rich content like forms, images, etc. */
|
|
18
|
-
content?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to show a close affordance in the header.
|
|
21
|
-
* @default false (true for the fullscreen size)
|
|
22
|
-
*/
|
|
23
|
-
closeButton?: boolean;
|
|
24
|
-
/** Accessible name for a dialog without a headline */
|
|
25
|
-
ariaLabel?: string;
|
|
26
|
-
/** ARIA role for the dialog. */
|
|
27
|
-
role?: 'alertdialog' | 'dialog';
|
|
28
|
-
/** Additional CSS classes to apply to the dialog */
|
|
29
|
-
class?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Dialog size variant
|
|
32
|
-
* @default "medium"
|
|
33
|
-
*/
|
|
34
|
-
size?: DialogSize | string;
|
|
35
|
-
/**
|
|
36
|
-
* Dialog animation variant
|
|
37
|
-
* @default "scale"
|
|
38
|
-
*/
|
|
39
|
-
animation?: DialogAnimation | string;
|
|
40
|
-
/**
|
|
41
|
-
* Footer buttons alignment
|
|
42
|
-
* @default "right"
|
|
43
|
-
*/
|
|
44
|
-
footerAlignment?: DialogFooterAlignment | string;
|
|
45
|
-
/**
|
|
46
|
-
* Whether dialog is initially open
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
|
-
open?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether to close when clicking overlay background
|
|
52
|
-
* @default true
|
|
53
|
-
*/
|
|
54
|
-
closeOnOverlayClick?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Whether to close when Escape key is pressed Escape is handled as a key press, in both layers, by the topmost open dialog only, and after whatever is open inside it (a menu, a select) has had the key.
|
|
57
|
-
* @default true
|
|
58
|
-
*/
|
|
59
|
-
closeOnEscape?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Whether dialog should be modal
|
|
62
|
-
* @default true
|
|
63
|
-
*/
|
|
64
|
-
modal?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Whether to focus the first focusable element when opened
|
|
67
|
-
* @default true
|
|
68
|
-
*/
|
|
69
|
-
autofocus?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Whether to trap focus within dialog when opened
|
|
72
|
-
* @default true
|
|
73
|
-
*/
|
|
74
|
-
trapFocus?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Parent element to append dialog to.
|
|
77
|
-
* @default document.body
|
|
78
|
-
*/
|
|
79
|
-
container?: HTMLElement;
|
|
80
|
-
/** `"top"` makes the dialog itself a `<dialog>` element, rendered in place in `container` (or `document.body`) and kept there when it closes, and opens it with `showModal()`: in the browser's top layer, above every z-index and outside any clipping ancestor, with the rest of the page inert. */
|
|
81
|
-
layer?: "top";
|
|
82
|
-
/** Footer buttons configuration */
|
|
83
|
-
buttons?: DialogButton[];
|
|
84
|
-
/**
|
|
85
|
-
* Whether to show a divider between header and content
|
|
86
|
-
* @default false
|
|
87
|
-
*/
|
|
88
|
-
divider?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Dialog z-index - controls stacking order
|
|
91
|
-
* @default 1000
|
|
92
|
-
*/
|
|
93
|
-
zIndex?: number;
|
|
94
|
-
/** How long `afteropen` and `afterclose` wait after opening and closing, in milliseconds, and when a closed dialog leaves the DOM. */
|
|
95
|
-
animationDuration?: number;
|
|
96
|
-
/** Event handlers for dialog events */
|
|
97
|
-
on?: {
|
|
98
|
-
[key in DialogEventType]?: (event: DialogEvent) => void;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/** Dialog button configuration Defines the appearance and behavior of buttons in the dialog footer. */
|
|
102
|
-
export interface DialogButton {
|
|
103
|
-
/** Button text label */
|
|
104
|
-
text: string;
|
|
105
|
-
/**
|
|
106
|
-
* Button variant (uses button component variants)
|
|
107
|
-
* @default "text"
|
|
108
|
-
*/
|
|
109
|
-
variant?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Button size
|
|
112
|
-
* @default "medium"
|
|
113
|
-
*/
|
|
114
|
-
size?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Button click handler
|
|
117
|
-
* @param event
|
|
118
|
-
* @param dialog
|
|
119
|
-
*/
|
|
120
|
-
onClick?: (event: MouseEvent, dialog: DialogComponent) => void | boolean;
|
|
121
|
-
/**
|
|
122
|
-
* Whether to close the dialog when this button is clicked
|
|
123
|
-
* @default true
|
|
124
|
-
*/
|
|
125
|
-
closeDialog?: boolean;
|
|
126
|
-
/**
|
|
127
|
-
* Whether to autofocus this button when the dialog opens
|
|
128
|
-
* @default false
|
|
129
|
-
*/
|
|
130
|
-
autofocus?: boolean;
|
|
131
|
-
/** Additional button attributes to pass to the button element */
|
|
132
|
-
attributes?: Record<string, unknown>;
|
|
133
|
-
}
|
|
134
|
-
/** Dialog event object Passed to event handlers registered with the on() method. */
|
|
135
|
-
export interface DialogEvent {
|
|
136
|
-
/** Dialog component instance that triggered the event */
|
|
137
|
-
dialog: DialogComponent;
|
|
138
|
-
/** Original browser event if applicable */
|
|
139
|
-
originalEvent?: Event;
|
|
140
|
-
/** Call this method to prevent the default action */
|
|
141
|
-
preventDefault: () => void;
|
|
142
|
-
/** Whether the default action was prevented */
|
|
143
|
-
defaultPrevented: boolean;
|
|
144
|
-
}
|
|
145
|
-
/** Dialog component interface */
|
|
146
|
-
/** The elements withStructure builds and hangs off the component. */
|
|
147
|
-
export interface DialogStructure {
|
|
148
|
-
/** Always built by withStructure, whatever the config */
|
|
149
|
-
header: HTMLElement;
|
|
150
|
-
/** Always built by withStructure, whatever the config */
|
|
151
|
-
content: HTMLElement;
|
|
152
|
-
/** Only when the dialog has buttons, and set back to null when the last goes */
|
|
153
|
-
footer: HTMLElement | null;
|
|
154
|
-
/** The <hr> elements between the sections, only while shown */
|
|
155
|
-
headerDivider: HTMLElement | null;
|
|
156
|
-
footerDivider: HTMLElement | null;
|
|
157
|
-
container: HTMLElement;
|
|
158
|
-
}
|
|
159
|
-
/** A footer button as the dialog keeps it: the live button component and the config it was built from. */
|
|
160
|
-
export interface DialogButtonRecord {
|
|
161
|
-
instance: ButtonComponent;
|
|
162
|
-
config: DialogButton;
|
|
163
|
-
}
|
|
164
|
-
/** What a dialog feature needs from the component it is handed. */
|
|
165
|
-
export interface DialogFeatureComponent {
|
|
166
|
-
element: HTMLElement;
|
|
167
|
-
config: DialogConfig & Record<string, unknown>;
|
|
168
|
-
getClass: (name: string) => string;
|
|
169
|
-
on: (event: string, handler: EventCallback) => unknown;
|
|
170
|
-
off: (event: string, handler: EventCallback) => unknown;
|
|
171
|
-
emit: (event: string, data?: unknown) => unknown;
|
|
172
|
-
_buttons?: DialogButtonRecord[];
|
|
173
|
-
}
|
|
174
|
-
/** A dialog that has been through withStructure. */
|
|
175
|
-
export interface DialogStructured extends DialogFeatureComponent {
|
|
176
|
-
overlay: HTMLElement;
|
|
177
|
-
structure: DialogStructure;
|
|
178
|
-
}
|
|
179
|
-
export interface DialogComponent {
|
|
180
|
-
/** The dialog's root DOM element */
|
|
181
|
-
element: HTMLElement;
|
|
182
|
-
/** The dialog's overlay/backdrop element */
|
|
183
|
-
overlay: HTMLElement;
|
|
184
|
-
/** Opens the dialog. */
|
|
185
|
-
open: () => DialogComponent;
|
|
186
|
-
/** Closes the dialog. */
|
|
187
|
-
close: () => DialogComponent;
|
|
188
|
-
/**
|
|
189
|
-
* Toggles dialog open/closed state
|
|
190
|
-
* @param open
|
|
191
|
-
*/
|
|
192
|
-
toggle: (open?: boolean) => DialogComponent;
|
|
193
|
-
/** Checks if dialog is currently open. */
|
|
194
|
-
isOpen: () => boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Sets dialog title text
|
|
197
|
-
* @param title
|
|
198
|
-
*/
|
|
199
|
-
setTitle: (title: string) => DialogComponent;
|
|
200
|
-
/** Gets dialog current title text */
|
|
201
|
-
getTitle: () => string;
|
|
202
|
-
/**
|
|
203
|
-
* Sets dialog subtitle text
|
|
204
|
-
* @param subtitle
|
|
205
|
-
*/
|
|
206
|
-
setSubtitle: (subtitle: string) => DialogComponent;
|
|
207
|
-
/** Gets dialog current subtitle text */
|
|
208
|
-
getSubtitle: () => string;
|
|
209
|
-
/**
|
|
210
|
-
* Sets dialog content
|
|
211
|
-
* @param content
|
|
212
|
-
*/
|
|
213
|
-
setContent: (content: string) => DialogComponent;
|
|
214
|
-
/** Gets dialog content */
|
|
215
|
-
getContent: () => string;
|
|
216
|
-
/**
|
|
217
|
-
* Adds a button to the dialog footer
|
|
218
|
-
* @param button
|
|
219
|
-
*/
|
|
220
|
-
addButton: (button: DialogButton) => DialogComponent;
|
|
221
|
-
/**
|
|
222
|
-
* Removes a button by index or text
|
|
223
|
-
* @param indexOrText
|
|
224
|
-
*/
|
|
225
|
-
removeButton: (indexOrText: number | string) => DialogComponent;
|
|
226
|
-
/** Gets all footer buttons */
|
|
227
|
-
getButtons: () => DialogButton[];
|
|
228
|
-
/**
|
|
229
|
-
* Sets footer button alignment
|
|
230
|
-
* @param alignment
|
|
231
|
-
*/
|
|
232
|
-
setFooterAlignment: (alignment: DialogFooterAlignment | string) => DialogComponent;
|
|
233
|
-
/**
|
|
234
|
-
* Sets dialog size
|
|
235
|
-
* @param size
|
|
236
|
-
*/
|
|
237
|
-
setSize: (size: DialogSize | string) => DialogComponent;
|
|
238
|
-
/**
|
|
239
|
-
* Adds an event listener to the dialog
|
|
240
|
-
* @param event
|
|
241
|
-
* @param handler
|
|
242
|
-
*/
|
|
243
|
-
on: (event: DialogEventType | string, handler: (event: DialogEvent) => void) => DialogComponent;
|
|
244
|
-
/**
|
|
245
|
-
* Removes an event listener from the dialog
|
|
246
|
-
* @param event
|
|
247
|
-
* @param handler
|
|
248
|
-
*/
|
|
249
|
-
off: (event: DialogEventType | string, handler: (event: DialogEvent) => void) => DialogComponent;
|
|
250
|
-
/** Gets dialog header element */
|
|
251
|
-
getHeaderElement: () => HTMLElement | null;
|
|
252
|
-
/** Gets dialog content element */
|
|
253
|
-
getContentElement: () => HTMLElement | null;
|
|
254
|
-
/** Gets dialog footer element */
|
|
255
|
-
getFooterElement: () => HTMLElement | null;
|
|
256
|
-
/**
|
|
257
|
-
* Shows or hides the divider between header and content
|
|
258
|
-
* @param show
|
|
259
|
-
*/
|
|
260
|
-
toggleDivider: (show: boolean) => DialogComponent;
|
|
261
|
-
/** Checks if the dialog has a divider visible */
|
|
262
|
-
hasDivider: () => boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Creates a confirmation dialog with Yes/No buttons
|
|
265
|
-
* @param options
|
|
266
|
-
*/
|
|
267
|
-
confirm: (options?: DialogConfirmOptions) => Promise<boolean>;
|
|
268
|
-
/** Destroys the dialog and removes it from DOM */
|
|
269
|
-
destroy: () => void;
|
|
270
|
-
}
|
|
271
|
-
/** Options for confirmation dialog Used with the dialog.confirm() method to create a simple confirmation dialog with customizable options. */
|
|
272
|
-
export interface DialogConfirmOptions {
|
|
273
|
-
/**
|
|
274
|
-
* Confirmation dialog title
|
|
275
|
-
* @default "Confirm"
|
|
276
|
-
*/
|
|
277
|
-
title?: string;
|
|
278
|
-
/** Confirmation message/question to display */
|
|
279
|
-
message: string;
|
|
280
|
-
/**
|
|
281
|
-
* Confirm button text
|
|
282
|
-
* @default "Yes"
|
|
283
|
-
*/
|
|
284
|
-
confirmText?: string;
|
|
285
|
-
/**
|
|
286
|
-
* Cancel button text
|
|
287
|
-
* @default "No"
|
|
288
|
-
*/
|
|
289
|
-
cancelText?: string;
|
|
290
|
-
/**
|
|
291
|
-
* Confirm button variant
|
|
292
|
-
* @default "filled"
|
|
293
|
-
*/
|
|
294
|
-
confirmVariant?: string;
|
|
295
|
-
/**
|
|
296
|
-
* Cancel button variant
|
|
297
|
-
* @default "text"
|
|
298
|
-
*/
|
|
299
|
-
cancelVariant?: string;
|
|
300
|
-
/**
|
|
301
|
-
* Dialog size for the confirmation dialog
|
|
302
|
-
* @default "small"
|
|
303
|
-
*/
|
|
304
|
-
size?: DialogSize | string;
|
|
305
|
-
}
|
|
306
|
-
/** Registers DialogConfig with the global defaults map, so `setComponentDefaults("dialog", ...)` is typed without core importing anything from this component. */
|
|
307
|
-
declare module "../../core/config/global" {
|
|
308
|
-
interface ComponentConfigMap {
|
|
309
|
-
dialog?: Partial<DialogConfig>;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** Configuration options for divider components Controls the appearance, orientation, and behavior of Material Design 3 dividers. */
|
|
2
|
-
export interface DividerConfig {
|
|
3
|
-
/** CSS class prefix (defaults to 'mtrl') */
|
|
4
|
-
prefix?: string;
|
|
5
|
-
/** CSS class to add to the divider Additional classes for custom styling needs. */
|
|
6
|
-
class?: string | string[];
|
|
7
|
-
/**
|
|
8
|
-
* Orientation of the divider
|
|
9
|
-
* @default 'horizontal'
|
|
10
|
-
*/
|
|
11
|
-
orientation?: 'horizontal' | 'vertical';
|
|
12
|
-
/**
|
|
13
|
-
* Variant of the divider Controls how the divider is inset within its container: - 'full-width': Spans the entire width/height (default) - 'inset': Adds space at the start (left for horizontal, top for vertical) - 'middle-inset': Adds space at both start and end Most commonly used in lists to align dividers with text content.
|
|
14
|
-
* @default 'full-width'
|
|
15
|
-
*/
|
|
16
|
-
variant?: 'full-width' | 'inset' | 'middle-inset';
|
|
17
|
-
/**
|
|
18
|
-
* Custom inset value (left margin for horizontal, top margin for vertical) Overrides the default inset spacing at the start of the divider.
|
|
19
|
-
* @default 16 for 'inset' and 'middle-inset' variants
|
|
20
|
-
*/
|
|
21
|
-
insetStart?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Custom inset end value (right margin for horizontal, bottom margin for vertical) Overrides the default inset spacing at the end of the divider.
|
|
24
|
-
* @default 0 for 'inset', 16 for 'middle-inset'
|
|
25
|
-
*/
|
|
26
|
-
insetEnd?: number;
|
|
27
|
-
/** Color of the divider Sets a custom color for the divider. */
|
|
28
|
-
color?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Thickness of the divider in pixels Controls the thickness (height for horizontal, width for vertical) of the divider.
|
|
31
|
-
* @default 1
|
|
32
|
-
*/
|
|
33
|
-
thickness?: number;
|
|
34
|
-
/** Used internally for component composition */
|
|
35
|
-
componentName?: string;
|
|
36
|
-
}
|
|
37
|
-
/** Default configuration for dividers */
|
|
38
|
-
export declare const defaultConfig: Partial<DividerConfig>;
|
|
39
|
-
/**
|
|
40
|
-
* Creates a base configuration object for divider Merges user-provided configuration with default values and ensures all required properties have values.
|
|
41
|
-
* @param config
|
|
42
|
-
*/
|
|
43
|
-
export declare const createBaseConfig: (config?: DividerConfig) => DividerConfig;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DividerConfig } from "./config.js";
|
|
2
|
-
import { DividerComponent } from "./types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a new Divider component with the specified configuration.
|
|
5
|
-
* @param config
|
|
6
|
-
*/
|
|
7
|
-
export declare const createDivider: (config?: DividerConfig) => DividerComponent;
|