material 3.2.6 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/config.js +3 -2
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +1 -35
- package/dist/components/extended-fab/types.d.ts +2 -654
- package/dist/components/fab/config.js +3 -2
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +1 -34
- package/dist/components/fab/types.d.ts +2 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -23
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +24 -18
- package/dist/elements/button.js +12 -0
- package/dist/elements/card.d.ts +12 -24
- package/dist/elements/card.js +3 -2
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/extended-fab.css +1 -1
- package/dist/elements/css/extended-fab.js +1 -1
- package/dist/elements/css/fab-menu.css +1 -1
- package/dist/elements/css/fab-menu.js +1 -1
- package/dist/elements/css/fab.css +1 -1
- package/dist/elements/css/fab.js +1 -1
- package/dist/elements/css/hosts/extended-fab.css +1 -1
- package/dist/elements/css/hosts/fab.css +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +10 -18
- package/dist/elements/extended-fab.js +3 -1
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +8 -17
- package/dist/elements/fab.js +3 -1
- package/dist/elements/floating-placement.js +1 -0
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +2 -2
- package/dist/elements/preupgrade/card.css +2 -2
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +2 -2
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +2 -2
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +1 -10
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +2 -2
- package/dist/styles/fab-menu.css +2 -2
- package/dist/styles/fab.css +2 -2
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/Button.svelte +5 -4
- package/dist/svelte/runtime.d.ts +8 -62
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/abstract/_floating-placement.scss +12 -0
- package/src/styles/components/_extended-fab.scss +34 -8
- package/src/styles/components/_fab-menu.scss +58 -8
- package/src/styles/components/_fab.scss +34 -8
- package/src/styles/elements/_button.scss +27 -5
- package/src/styles/elements/_card.scss +14 -0
- package/src/styles/elements/_extended-fab.scss +2 -0
- package/src/styles/elements/_fab.scss +2 -0
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,113 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Select variants
|
|
3
|
-
*/
|
|
4
1
|
export declare const SELECT_VARIANTS: {
|
|
5
|
-
/** Filled select field with solid background */
|
|
6
2
|
readonly FILLED: "filled";
|
|
7
|
-
/** Outlined select field with border */
|
|
8
3
|
readonly OUTLINED: "outlined";
|
|
9
4
|
};
|
|
10
|
-
/**
|
|
11
|
-
* Select menu placement options
|
|
12
|
-
*/
|
|
13
5
|
export declare const SELECT_PLACEMENT: {
|
|
14
|
-
/** Menu appears below the select field, aligned to the left edge */
|
|
15
6
|
readonly BOTTOM_START: "bottom-start";
|
|
16
|
-
/** Menu appears below the select field, centered */
|
|
17
7
|
readonly BOTTOM: "bottom";
|
|
18
|
-
/** Menu appears below the select field, aligned to the right edge */
|
|
19
8
|
readonly BOTTOM_END: "bottom-end";
|
|
20
|
-
/** Menu appears above the select field, aligned to the left edge */
|
|
21
9
|
readonly TOP_START: "top-start";
|
|
22
|
-
/** Menu appears above the select field, centered */
|
|
23
10
|
readonly TOP: "top";
|
|
24
|
-
/** Menu appears above the select field, aligned to the right edge */
|
|
25
11
|
readonly TOP_END: "top-end";
|
|
26
12
|
};
|
|
27
|
-
/**
|
|
28
|
-
* Select interaction types
|
|
29
|
-
*/
|
|
30
13
|
export declare const SELECT_INTERACTION: {
|
|
31
|
-
/** Interaction via mouse or touch */
|
|
32
14
|
readonly MOUSE: "mouse";
|
|
33
|
-
/** Interaction via keyboard */
|
|
34
15
|
readonly KEYBOARD: "keyboard";
|
|
35
16
|
};
|
|
36
|
-
/**
|
|
37
|
-
* Select event names
|
|
38
|
-
*/
|
|
39
17
|
export declare const SELECT_EVENTS: {
|
|
40
|
-
/** Fired when selected option changes */
|
|
41
18
|
readonly CHANGE: "change";
|
|
42
|
-
/** Fired when options menu opens */
|
|
43
19
|
readonly OPEN: "open";
|
|
44
|
-
/** Fired when options menu closes */
|
|
45
20
|
readonly CLOSE: "close";
|
|
46
21
|
};
|
|
47
|
-
/**
|
|
48
|
-
* Default icons for select
|
|
49
|
-
*/
|
|
50
22
|
export declare const SELECT_ICONS: {
|
|
51
|
-
/** Dropdown arrow icon */
|
|
52
23
|
readonly DROPDOWN: "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M7 10l5 5 5-5z\"/></svg>";
|
|
53
|
-
/** Checkmark icon for selected item */
|
|
54
24
|
readonly CHECKMARK: "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg>";
|
|
55
25
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Default configuration values
|
|
58
|
-
*/
|
|
59
26
|
export declare const SELECT_DEFAULTS: {
|
|
60
|
-
/** Default variant */
|
|
61
27
|
readonly VARIANT: "filled";
|
|
62
|
-
/** Default menu placement */
|
|
63
28
|
readonly PLACEMENT: "bottom-start";
|
|
64
|
-
/** Default label */
|
|
65
29
|
readonly LABEL: "Select";
|
|
66
|
-
/** Default value */
|
|
67
30
|
readonly VALUE: "";
|
|
68
|
-
/** Whether the select is required by default */
|
|
69
31
|
readonly REQUIRED: false;
|
|
70
|
-
/** Whether the select is disabled by default */
|
|
71
32
|
readonly DISABLED: false;
|
|
72
|
-
/** Default supporting text */
|
|
73
33
|
readonly SUPPORTING_TEXT: "";
|
|
74
|
-
/** Whether in error state by default */
|
|
75
34
|
readonly ERROR: false;
|
|
76
35
|
};
|
|
77
|
-
/**
|
|
78
|
-
* CSS classes for select elements
|
|
79
|
-
*/
|
|
80
36
|
export declare const SELECT_CLASSES: {
|
|
81
|
-
/** Container element */
|
|
82
37
|
readonly CONTAINER: "select";
|
|
83
|
-
/** The text field (the key is two words; the value is select__text-field) */
|
|
84
38
|
readonly TEXT_FIELD: "select__text-field";
|
|
85
|
-
/** Dropdown icon */
|
|
86
39
|
readonly DROPDOWN_ICON: "select__dropdown-icon";
|
|
87
|
-
/** Menu container */
|
|
88
40
|
readonly MENU: "select__menu";
|
|
89
|
-
/** Menu item */
|
|
90
41
|
readonly MENU_ITEM: "select__menu-item";
|
|
91
|
-
/** Selected menu item */
|
|
92
42
|
readonly MENU_ITEM_SELECTED: "select__menu-item--selected";
|
|
93
|
-
/** Disabled menu item */
|
|
94
43
|
readonly MENU_ITEM_DISABLED: "select__menu-item--disabled";
|
|
95
|
-
/** Menu item checkmark */
|
|
96
44
|
readonly MENU_ITEM_CHECKMARK: "select__menu-item-checkmark";
|
|
97
|
-
/** Menu item icon */
|
|
98
45
|
readonly MENU_ITEM_ICON: "select__menu-item-icon";
|
|
99
|
-
/** Menu item text */
|
|
100
46
|
readonly MENU_ITEM_TEXT: "select__menu-item-text";
|
|
101
|
-
/** Filled variant */
|
|
102
47
|
readonly FILLED: "select--filled";
|
|
103
|
-
/** Outlined variant */
|
|
104
48
|
readonly OUTLINED: "select--outlined";
|
|
105
|
-
/** Open state */
|
|
106
49
|
readonly OPEN: "select--open";
|
|
107
|
-
/** Disabled state */
|
|
108
50
|
readonly DISABLED: "select--disabled";
|
|
109
|
-
/** Required state */
|
|
110
51
|
readonly REQUIRED: "select--required";
|
|
111
|
-
/** Error state */
|
|
112
52
|
readonly ERROR: "select--error";
|
|
113
53
|
};
|
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Select Component Module
|
|
3
|
-
*
|
|
4
|
-
* The Select component provides a dropdown select control,
|
|
5
|
-
* combining a text field and menu for a complete selection interface.
|
|
6
|
-
*
|
|
7
|
-
* @module components/select
|
|
8
|
-
* @category Components
|
|
9
|
-
*/
|
|
10
1
|
export { default, default as createSelect } from "./select.js";
|
|
11
2
|
export type { SelectEvents } from "./types.js";
|
|
12
3
|
export type { SelectConfig, SelectVariant, SelectComponent, SelectOption, SelectEvent, SelectChangeEvent } from "./types.js";
|
|
13
|
-
/**
|
|
14
|
-
* Constants for select configuration
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* import { createSelect, SELECT_VARIANTS } from 'material';
|
|
18
|
-
*
|
|
19
|
-
* const select = createSelect({
|
|
20
|
-
* variant: SELECT_VARIANTS.OUTLINED,
|
|
21
|
-
* options: [...]
|
|
22
|
-
* });
|
|
23
|
-
*
|
|
24
|
-
* @category Components
|
|
25
|
-
*/
|
|
26
4
|
export { SELECT_VARIANTS, SELECT_PLACEMENT, SELECT_INTERACTION, SELECT_EVENTS, SELECT_ICONS, SELECT_DEFAULTS, SELECT_CLASSES } from "./constants.js";
|
|
@@ -1,36 +1,3 @@
|
|
|
1
1
|
import { SelectConfig, SelectComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a new Select component with the specified configuration.
|
|
4
|
-
*
|
|
5
|
-
* The Select component implements a Material Design dropdown select control,
|
|
6
|
-
* combining a text field and menu to provide a user-friendly selection interface.
|
|
7
|
-
*
|
|
8
|
-
* @param {SelectConfig} config - Configuration options for the select
|
|
9
|
-
* This must include an array of selection options. See {@link SelectConfig} for all available options.
|
|
10
|
-
*
|
|
11
|
-
* @returns {SelectComponent} A fully configured select component
|
|
12
|
-
*
|
|
13
|
-
* @throws {Error} Throws an error if select creation fails
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* // Create a simple country select
|
|
17
|
-
* const countrySelect = createSelect({
|
|
18
|
-
* label: 'Country',
|
|
19
|
-
* options: [
|
|
20
|
-
* { id: 'us', text: 'United States' },
|
|
21
|
-
* { id: 'ca', text: 'Canada' },
|
|
22
|
-
* { id: 'mx', text: 'Mexico' }
|
|
23
|
-
* ],
|
|
24
|
-
* value: 'us' // Pre-select United States
|
|
25
|
-
* });
|
|
26
|
-
*
|
|
27
|
-
* // Add to the DOM
|
|
28
|
-
* document.body.appendChild(countrySelect.element);
|
|
29
|
-
*
|
|
30
|
-
* // Listen for changes
|
|
31
|
-
* countrySelect.on('change', (event) => {
|
|
32
|
-
* console.log(`Selected: ${event.value} (${event.text})`);
|
|
33
|
-
* });
|
|
34
|
-
*/
|
|
35
2
|
declare const createSelect: (config: SelectConfig) => SelectComponent;
|
|
36
3
|
export default createSelect;
|
|
@@ -1,320 +1,87 @@
|
|
|
1
1
|
import type { MenuColor, MenuVariant } from "../menu/types.js";
|
|
2
2
|
import type { MenuOwner } from "../menu/inner.js";
|
|
3
3
|
import type { TextFieldComponent } from "../text-field/types.js";
|
|
4
|
-
/**
|
|
5
|
-
* Available Select variants
|
|
6
|
-
*/
|
|
7
4
|
export type SelectVariant = "filled" | "outlined";
|
|
8
|
-
/**
|
|
9
|
-
* Select variant constants
|
|
10
|
-
*/
|
|
11
5
|
export declare const SELECT_VARIANTS: {
|
|
12
6
|
readonly FILLED: "filled";
|
|
13
7
|
readonly OUTLINED: "outlined";
|
|
14
8
|
};
|
|
15
|
-
/**
|
|
16
|
-
* Select option interface
|
|
17
|
-
*/
|
|
18
9
|
export interface SelectOption {
|
|
19
|
-
/**
|
|
20
|
-
* Unique identifier for the option
|
|
21
|
-
*/
|
|
22
10
|
id: string;
|
|
23
|
-
/**
|
|
24
|
-
* Display text for the option
|
|
25
|
-
*/
|
|
26
11
|
text: string;
|
|
27
|
-
/**
|
|
28
|
-
* Whether the option is disabled
|
|
29
|
-
*/
|
|
30
12
|
disabled?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Optional icon to display with the option.
|
|
33
|
-
* Markup (HTML). Not sanitized by default: see Markup and sanitizing.
|
|
34
|
-
*/
|
|
35
13
|
icon?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Whether this option has a submenu
|
|
38
|
-
*/
|
|
39
14
|
hasSubmenu?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Optional array of submenu options
|
|
42
|
-
* Only used when hasSubmenu is true
|
|
43
|
-
*/
|
|
44
15
|
submenu?: SelectOption[];
|
|
45
|
-
/**
|
|
46
|
-
* Additional data associated with the option
|
|
47
|
-
*/
|
|
48
16
|
data?: unknown;
|
|
49
17
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Configuration interface for the Select component
|
|
52
|
-
*/
|
|
53
18
|
export interface SelectConfig {
|
|
54
|
-
/**
|
|
55
|
-
* Array of options to display in the select menu
|
|
56
|
-
*/
|
|
57
19
|
options?: SelectOption[];
|
|
58
|
-
/**
|
|
59
|
-
* Currently selected value (option id)
|
|
60
|
-
*/
|
|
61
20
|
value?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Visual variant (filled, outlined)
|
|
64
|
-
*/
|
|
65
21
|
variant?: SelectVariant | string;
|
|
66
|
-
/**
|
|
67
|
-
* Density level (default, compact)
|
|
68
|
-
*/
|
|
69
22
|
density?: "default" | "compact" | string;
|
|
70
|
-
/**
|
|
71
|
-
* Label text
|
|
72
|
-
*/
|
|
73
23
|
label?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Input name attribute
|
|
76
|
-
*/
|
|
77
24
|
name?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Whether select is required
|
|
80
|
-
*/
|
|
81
25
|
required?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Options handed to the select's menu. By default the menu lives inside
|
|
84
|
-
* the select's own element with no height of its own, which suits a short
|
|
85
|
-
* list in a still surface; a long list, or a select inside a scrolling or
|
|
86
|
-
* clipping container (a drawer, a sheet), wants the menu in the body with a
|
|
87
|
-
* max height, so it is neither cropped nor taller than the screen.
|
|
88
|
-
* @example { container: document.body, maxHeight: "320px" }
|
|
89
|
-
*/
|
|
90
26
|
menu?: {
|
|
91
|
-
/** Where the menu is mounted and positioned against; document.body for a menu that escapes a clipping container */
|
|
92
27
|
container?: HTMLElement | null;
|
|
93
|
-
/** The menu's max height (a CSS length); the list scrolls inside it */
|
|
94
28
|
maxHeight?: string;
|
|
95
|
-
/** Whether the menu flips above the field when there is no room below */
|
|
96
29
|
autoFlip?: boolean;
|
|
97
|
-
/** The menu's variant: 'vertical' is the M3 expressive menu, items apart in a rounded container */
|
|
98
30
|
variant?: MenuVariant;
|
|
99
|
-
/** The vertical variant's colour mapping */
|
|
100
31
|
color?: MenuColor;
|
|
101
32
|
};
|
|
102
|
-
/**
|
|
103
|
-
* `"top"` renders the menu next to the field, in the field's own tree (a
|
|
104
|
-
* shadow root included), and shows it in the browser's top layer: above
|
|
105
|
-
* every z-index and outside any clipping ancestor. `menu.container` is then
|
|
106
|
-
* not used. See the menu's `layer`.
|
|
107
|
-
*/
|
|
108
33
|
layer?: "top";
|
|
109
|
-
/**
|
|
110
|
-
* Whether select is disabled
|
|
111
|
-
*/
|
|
112
34
|
disabled?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Supporting text content
|
|
115
|
-
*/
|
|
116
35
|
supportingText?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Whether supporting text indicates an error
|
|
119
|
-
*/
|
|
120
36
|
error?: boolean;
|
|
121
|
-
/**
|
|
122
|
-
* Menu placement relative to the text field
|
|
123
|
-
*/
|
|
124
37
|
placement?: string;
|
|
125
|
-
/**
|
|
126
|
-
* Additional CSS classes
|
|
127
|
-
*/
|
|
128
38
|
class?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Prefix for class names
|
|
131
|
-
*/
|
|
132
39
|
prefix?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Component name
|
|
135
|
-
*/
|
|
136
40
|
componentName?: string;
|
|
137
|
-
/**
|
|
138
|
-
* Event callbacks
|
|
139
|
-
*/
|
|
140
41
|
on?: {
|
|
141
|
-
/**
|
|
142
|
-
* Called when the select value changes
|
|
143
|
-
*/
|
|
144
42
|
change?: (event: SelectChangeEvent) => void;
|
|
145
|
-
/**
|
|
146
|
-
* Called when the select menu opens
|
|
147
|
-
*/
|
|
148
43
|
open?: (event: SelectEvent) => void;
|
|
149
|
-
/**
|
|
150
|
-
* Called when the select menu closes
|
|
151
|
-
*/
|
|
152
44
|
close?: (event: SelectEvent) => void;
|
|
153
45
|
};
|
|
154
46
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Select component interface
|
|
157
|
-
*/
|
|
158
47
|
export interface SelectComponent {
|
|
159
|
-
/**
|
|
160
|
-
* The root element of the select
|
|
161
|
-
*/
|
|
162
48
|
element: HTMLElement;
|
|
163
|
-
/**
|
|
164
|
-
* The text field component
|
|
165
|
-
*/
|
|
166
49
|
textField: TextFieldComponent;
|
|
167
|
-
/**
|
|
168
|
-
* Gets the select's current value (selected option id)
|
|
169
|
-
*/
|
|
170
50
|
getValue: () => string | null;
|
|
171
|
-
/**
|
|
172
|
-
* Sets the select's value (by option id)
|
|
173
|
-
* @param value - Option id to select, or null/undefined to clear
|
|
174
|
-
* @returns Select component for chaining
|
|
175
|
-
*/
|
|
176
51
|
setValue: (value: string | null | undefined) => SelectComponent;
|
|
177
|
-
/**
|
|
178
|
-
* Clears the current selection
|
|
179
|
-
* @returns Select component for chaining
|
|
180
|
-
*/
|
|
181
52
|
clear: () => SelectComponent;
|
|
182
|
-
/**
|
|
183
|
-
* Gets the select's current displayed text
|
|
184
|
-
*/
|
|
185
53
|
getText: () => string;
|
|
186
|
-
/**
|
|
187
|
-
* Gets the selected option object
|
|
188
|
-
*/
|
|
189
54
|
getSelectedOption: () => SelectOption | null;
|
|
190
|
-
/**
|
|
191
|
-
* Gets all available options
|
|
192
|
-
*/
|
|
193
55
|
getOptions: () => SelectOption[];
|
|
194
|
-
/**
|
|
195
|
-
* Sets new options
|
|
196
|
-
* @param options - New options array
|
|
197
|
-
* @returns Select component for chaining
|
|
198
|
-
*/
|
|
199
56
|
setOptions: (options: SelectOption[]) => SelectComponent;
|
|
200
|
-
/**
|
|
201
|
-
* Opens the select menu. When it returns, `isOpen()` is true, the input has
|
|
202
|
-
* `aria-expanded="true"` and `open` has been emitted; the surface may be
|
|
203
|
-
* painted after `open()` returns.
|
|
204
|
-
* @param interactionType - The type of interaction ('mouse' or 'keyboard')
|
|
205
|
-
* @returns Select component for chaining
|
|
206
|
-
*/
|
|
207
57
|
open: (interactionType?: "mouse" | "keyboard") => SelectComponent;
|
|
208
|
-
/**
|
|
209
|
-
* Closes the select menu. When it returns, `isOpen()` is false, the input
|
|
210
|
-
* has `aria-expanded="false"` and `close` has been emitted; the surface
|
|
211
|
-
* fades after that. `close()` then `open()` at once reopens it.
|
|
212
|
-
* @returns Select component for chaining
|
|
213
|
-
*/
|
|
214
58
|
close: () => SelectComponent;
|
|
215
|
-
/**
|
|
216
|
-
* Checks if the menu is open
|
|
217
|
-
*/
|
|
218
59
|
isOpen: () => boolean;
|
|
219
|
-
/**
|
|
220
|
-
* Sets the density of the select
|
|
221
|
-
* @param density - The density level to set
|
|
222
|
-
* @returns Select component for chaining
|
|
223
|
-
*/
|
|
224
60
|
setDensity: (density: "default" | "compact" | string) => SelectComponent;
|
|
225
|
-
/**
|
|
226
|
-
* Gets the current density setting
|
|
227
|
-
* @returns The current density
|
|
228
|
-
*/
|
|
229
61
|
getDensity: () => string;
|
|
230
|
-
/**
|
|
231
|
-
* Adds an event listener
|
|
232
|
-
* @param event - Event name
|
|
233
|
-
* @param handler - Event handler
|
|
234
|
-
* @returns Select component for chaining
|
|
235
|
-
*/
|
|
236
62
|
on: <T extends keyof SelectEvents>(event: T, handler: SelectEvents[T]) => SelectComponent;
|
|
237
|
-
/**
|
|
238
|
-
* Removes an event listener
|
|
239
|
-
* @param event - Event name
|
|
240
|
-
* @param handler - Event handler
|
|
241
|
-
* @returns Select component for chaining
|
|
242
|
-
*/
|
|
243
63
|
off: <T extends keyof SelectEvents>(event: T, handler: SelectEvents[T]) => SelectComponent;
|
|
244
|
-
/**
|
|
245
|
-
* Enables the select
|
|
246
|
-
* @returns Select component for chaining
|
|
247
|
-
*/
|
|
248
64
|
enable: () => SelectComponent;
|
|
249
|
-
/**
|
|
250
|
-
* Disables the select
|
|
251
|
-
* @returns Select component for chaining
|
|
252
|
-
*/
|
|
253
65
|
disable: () => SelectComponent;
|
|
254
|
-
/** Whether the select is disabled */
|
|
255
66
|
isDisabled: () => boolean;
|
|
256
|
-
/**
|
|
257
|
-
* Sets the error state on the select
|
|
258
|
-
* @param error - Whether to show error state
|
|
259
|
-
* @param message - Optional error message to display
|
|
260
|
-
* @returns Select component for chaining
|
|
261
|
-
*/
|
|
262
67
|
setError: (error: boolean, message?: string) => SelectComponent;
|
|
263
|
-
/**
|
|
264
|
-
* Clears the error state on the select
|
|
265
|
-
* @returns Select component for chaining
|
|
266
|
-
*/
|
|
267
68
|
clearError: () => SelectComponent;
|
|
268
|
-
/**
|
|
269
|
-
* Destroys the select component
|
|
270
|
-
*/
|
|
271
69
|
destroy: () => void;
|
|
272
70
|
}
|
|
273
|
-
/**
|
|
274
|
-
* What `open` and `close` carry. Neither can be cancelled: the select is
|
|
275
|
-
* already open, or closed, when its listener runs. `change` cannot either:
|
|
276
|
-
* the value has changed. None carries `preventDefault`.
|
|
277
|
-
*/
|
|
278
71
|
export interface SelectEvent {
|
|
279
|
-
/**
|
|
280
|
-
* The select component
|
|
281
|
-
*/
|
|
282
72
|
select: SelectComponent;
|
|
283
|
-
/**
|
|
284
|
-
* Original DOM event if available
|
|
285
|
-
*/
|
|
286
73
|
originalEvent?: Event;
|
|
287
74
|
}
|
|
288
|
-
/**
|
|
289
|
-
* Select change event interface
|
|
290
|
-
*/
|
|
291
75
|
export interface SelectChangeEvent extends SelectEvent {
|
|
292
|
-
/**
|
|
293
|
-
* The selected option id
|
|
294
|
-
*/
|
|
295
76
|
value: string | null;
|
|
296
|
-
/**
|
|
297
|
-
* The selected option text
|
|
298
|
-
*/
|
|
299
77
|
text: string;
|
|
300
|
-
/**
|
|
301
|
-
* The complete selected option object
|
|
302
|
-
*/
|
|
303
78
|
option: SelectOption;
|
|
304
79
|
}
|
|
305
|
-
/**
|
|
306
|
-
* Select events interface for type-checking
|
|
307
|
-
* @internal
|
|
308
|
-
*/
|
|
309
80
|
export interface SelectEvents {
|
|
310
81
|
change: (event: SelectChangeEvent) => void;
|
|
311
82
|
open: (event: SelectEvent) => void;
|
|
312
83
|
close: (event: SelectEvent) => void;
|
|
313
84
|
}
|
|
314
|
-
/**
|
|
315
|
-
* API options interface
|
|
316
|
-
* @internal
|
|
317
|
-
*/
|
|
318
85
|
export interface ApiOptions {
|
|
319
86
|
select: {
|
|
320
87
|
getValue: () => string | null;
|
|
@@ -340,10 +107,6 @@ export interface ApiOptions {
|
|
|
340
107
|
destroy: () => void;
|
|
341
108
|
};
|
|
342
109
|
}
|
|
343
|
-
/**
|
|
344
|
-
* Select controller added by the menu feature
|
|
345
|
-
* @internal
|
|
346
|
-
*/
|
|
347
110
|
export interface SelectController {
|
|
348
111
|
getValue: () => string | null;
|
|
349
112
|
setValue: (value: string | null | undefined) => BaseComponent;
|
|
@@ -356,10 +119,6 @@ export interface SelectController {
|
|
|
356
119
|
close: (event?: Event) => BaseComponent;
|
|
357
120
|
isOpen: () => boolean;
|
|
358
121
|
}
|
|
359
|
-
/**
|
|
360
|
-
* Base component interface
|
|
361
|
-
* @internal
|
|
362
|
-
*/
|
|
363
122
|
export interface BaseComponent extends MenuOwner {
|
|
364
123
|
element: HTMLElement;
|
|
365
124
|
textField?: TextFieldComponent;
|
|
@@ -1,45 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Side sheet variants.
|
|
3
|
-
*
|
|
4
|
-
* A standard sheet is docked: it sits in the layout beside the page and leaves
|
|
5
|
-
* it usable. A modal sheet floats over the page behind a scrim and takes focus.
|
|
6
|
-
* They differ in colour as well as behaviour, which is why the variant is not
|
|
7
|
-
* only a class (m3.material.io/components/side-sheets).
|
|
8
|
-
*/
|
|
9
1
|
export declare const SIDE_SHEET_VARIANTS: {
|
|
10
2
|
readonly STANDARD: "standard";
|
|
11
3
|
readonly MODAL: "modal";
|
|
12
4
|
};
|
|
13
|
-
/**
|
|
14
|
-
* Which edge the sheet is docked to.
|
|
15
|
-
*
|
|
16
|
-
* These are logical, not physical: `end` is the right edge in a left-to-right
|
|
17
|
-
* document and the left edge in a right-to-left one, so a sheet does not need
|
|
18
|
-
* reconfiguring per language.
|
|
19
|
-
*/
|
|
20
5
|
export declare const SIDE_SHEET_POSITIONS: {
|
|
21
6
|
readonly START: "start";
|
|
22
7
|
readonly END: "end";
|
|
23
8
|
};
|
|
24
|
-
/**
|
|
25
|
-
* Defaults, from the M3 side sheet specs and the Android implementation.
|
|
26
|
-
*/
|
|
27
9
|
export declare const SIDE_SHEET_DEFAULTS: {
|
|
28
10
|
readonly VARIANT: "modal";
|
|
29
|
-
/** Side sheets dock to the trailing edge unless told otherwise */
|
|
30
11
|
readonly POSITION: "end";
|
|
31
|
-
/** The width the Android implementation uses for a standard sheet */
|
|
32
12
|
readonly WIDTH: 256;
|
|
33
|
-
/** m3.material.io side sheet specs, container maximum width */
|
|
34
13
|
readonly MAX_WIDTH: 400;
|
|
35
|
-
/** A modal sheet offers a way out of itself */
|
|
36
14
|
readonly CLOSE_BUTTON: true;
|
|
37
15
|
readonly CLOSE_ON_SCRIM_CLICK: true;
|
|
38
16
|
readonly CLOSE_ON_ESCAPE: true;
|
|
39
17
|
};
|
|
40
|
-
/**
|
|
41
|
-
* Class names, without the prefix. `getClass` adds it.
|
|
42
|
-
*/
|
|
43
18
|
export declare const SIDE_SHEET_CLASSES: {
|
|
44
19
|
readonly ROOT: "side-sheet";
|
|
45
20
|
readonly SCRIM: "side-sheet__scrim";
|
|
@@ -51,9 +26,6 @@ export declare const SIDE_SHEET_CLASSES: {
|
|
|
51
26
|
readonly CONTENT: "side-sheet__content";
|
|
52
27
|
readonly ACTIONS: "side-sheet__actions";
|
|
53
28
|
};
|
|
54
|
-
/**
|
|
55
|
-
* Events the sheet emits.
|
|
56
|
-
*/
|
|
57
29
|
export declare const SIDE_SHEET_EVENTS: {
|
|
58
30
|
readonly OPEN: "open";
|
|
59
31
|
readonly CLOSE: "close";
|
|
@@ -1,24 +1,3 @@
|
|
|
1
1
|
import { SideSheetConfig, SideSheetComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a side sheet: a surface docked to a vertical edge, holding content
|
|
4
|
-
* that supports the page rather than replacing it.
|
|
5
|
-
*
|
|
6
|
-
* A standard sheet sits beside the page and leaves it usable. A modal sheet
|
|
7
|
-
* floats over it behind a scrim and takes focus.
|
|
8
|
-
*
|
|
9
|
-
* @param {SideSheetConfig} config - Side sheet configuration
|
|
10
|
-
* @returns {SideSheetComponent} Side sheet instance
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const filters = createSideSheet({
|
|
15
|
-
* title: 'Filters',
|
|
16
|
-
* content: '<p>Narrow the results.</p>',
|
|
17
|
-
* on: { close: () => applyFilters() }
|
|
18
|
-
* });
|
|
19
|
-
*
|
|
20
|
-
* filters.open();
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
2
|
declare const createSideSheet: (config?: SideSheetConfig) => SideSheetComponent;
|
|
24
3
|
export default createSideSheet;
|