material 3.2.5 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/badge/badge.d.ts +0 -59
- package/dist/components/badge/constants.d.ts +0 -15
- package/dist/components/badge/index.d.ts +0 -6
- package/dist/components/badge/types.d.ts +0 -244
- package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
- package/dist/components/bottom-app-bar/constants.d.ts +0 -9
- package/dist/components/bottom-app-bar/index.d.ts +0 -4
- package/dist/components/bottom-app-bar/types.d.ts +0 -76
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
- package/dist/components/bottom-sheet/constants.d.ts +0 -29
- package/dist/components/bottom-sheet/types.d.ts +0 -89
- package/dist/components/button/button.d.ts +0 -62
- package/dist/components/button/constants.d.ts +0 -41
- package/dist/components/button/index.d.ts +0 -4
- package/dist/components/button/types.d.ts +0 -347
- package/dist/components/button-group/button-group.d.ts +0 -51
- package/dist/components/button-group/constants.d.ts +0 -83
- package/dist/components/button-group/index.d.ts +0 -10
- package/dist/components/button-group/types.d.ts +0 -234
- package/dist/components/card/card.d.ts +0 -64
- package/dist/components/card/constants.d.ts +0 -33
- package/dist/components/card/content.d.ts +0 -86
- package/dist/components/card/index.d.ts +0 -66
- package/dist/components/card/types.d.ts +0 -366
- package/dist/components/carousel/carousel.d.ts +0 -22
- package/dist/components/carousel/constants.d.ts +0 -16
- package/dist/components/carousel/types.d.ts +0 -29
- package/dist/components/checkbox/checkbox.d.ts +0 -61
- package/dist/components/checkbox/constants.d.ts +0 -33
- package/dist/components/checkbox/index.d.ts +0 -25
- package/dist/components/checkbox/types.d.ts +0 -206
- package/dist/components/chips/chips.d.ts +0 -14
- package/dist/components/chips/constants.d.ts +0 -1
- package/dist/components/chips/factories.d.ts +0 -4
- package/dist/components/chips/types.d.ts +0 -278
- package/dist/components/datepicker/constants.d.ts +0 -56
- package/dist/components/datepicker/datepicker.d.ts +0 -5
- package/dist/components/datepicker/types.d.ts +12 -257
- package/dist/components/dialog/constants.d.ts +0 -65
- package/dist/components/dialog/dialog.d.ts +0 -86
- package/dist/components/dialog/index.d.ts +0 -12
- package/dist/components/dialog/types.d.ts +0 -511
- package/dist/components/divider/config.d.ts +0 -130
- package/dist/components/divider/constants.d.ts +0 -27
- package/dist/components/divider/divider.d.ts +0 -36
- package/dist/components/divider/index.d.ts +0 -29
- package/dist/components/divider/types.d.ts +0 -126
- package/dist/components/drawer/constants.d.ts +0 -53
- package/dist/components/drawer/drawer.d.ts +0 -56
- package/dist/components/drawer/features/items.js +3 -2
- package/dist/components/drawer/index.d.ts +0 -4
- package/dist/components/drawer/types.d.ts +0 -200
- package/dist/components/extended-fab/constants.d.ts +0 -46
- package/dist/components/extended-fab/extended-fab.d.ts +0 -58
- package/dist/components/extended-fab/index.d.ts +0 -34
- package/dist/components/extended-fab/types.d.ts +0 -654
- package/dist/components/fab/constants.d.ts +0 -40
- package/dist/components/fab/fab.d.ts +0 -42
- package/dist/components/fab/index.d.ts +0 -33
- package/dist/components/fab/types.d.ts +0 -543
- package/dist/components/fab-menu/constants.d.ts +0 -22
- package/dist/components/fab-menu/fab-menu.d.ts +0 -36
- package/dist/components/fab-menu/types.d.ts +0 -80
- package/dist/components/icon-button/constants.d.ts +0 -90
- package/dist/components/icon-button/icon-button.d.ts +0 -83
- package/dist/components/icon-button/index.d.ts +0 -44
- package/dist/components/icon-button/types.d.ts +0 -314
- package/dist/components/index.d.ts +0 -9
- package/dist/components/list/constants.d.ts +0 -47
- package/dist/components/list/index.d.ts +0 -1
- package/dist/components/list/list.d.ts +0 -26
- package/dist/components/list/types.d.ts +0 -263
- package/dist/components/loading-indicator/constants.d.ts +0 -35
- package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
- package/dist/components/loading-indicator/types.d.ts +0 -35
- package/dist/components/menu/constants.d.ts +0 -79
- package/dist/components/menu/index.d.ts +0 -25
- package/dist/components/menu/inner.d.ts +0 -3
- package/dist/components/menu/menu.d.ts +0 -26
- package/dist/components/menu/types.d.ts +0 -423
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
- package/dist/components/navigation-bar/types.d.ts +0 -25
- package/dist/components/navigation-rail/constants.d.ts +0 -2
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
- package/dist/components/navigation-rail/types.d.ts +0 -22
- package/dist/components/progress/constants.d.ts +24 -56
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/types.d.ts +0 -251
- package/dist/components/radios/constants.d.ts +0 -22
- package/dist/components/radios/radios.d.ts +0 -5
- package/dist/components/radios/types.d.ts +0 -142
- package/dist/components/search/constants.d.ts +0 -59
- package/dist/components/search/search.d.ts +0 -32
- package/dist/components/search/types.d.ts +0 -159
- package/dist/components/select/constants.d.ts +0 -60
- package/dist/components/select/index.d.ts +0 -22
- package/dist/components/select/select.d.ts +0 -33
- package/dist/components/select/types.d.ts +0 -241
- package/dist/components/side-sheet/constants.d.ts +0 -28
- package/dist/components/side-sheet/side-sheet.d.ts +0 -21
- package/dist/components/side-sheet/types.d.ts +0 -82
- package/dist/components/slider/constants.d.ts +0 -86
- package/dist/components/slider/slider.d.ts +0 -16
- package/dist/components/slider/types.d.ts +0 -184
- package/dist/components/snackbar/constants.d.ts +0 -73
- package/dist/components/snackbar/snackbar.d.ts +0 -13
- package/dist/components/snackbar/types.d.ts +0 -147
- package/dist/components/split-button/constants.d.ts +0 -33
- package/dist/components/split-button/split-button.d.ts +0 -21
- package/dist/components/split-button/types.d.ts +0 -81
- package/dist/components/switch/constants.d.ts +0 -49
- package/dist/components/switch/switch.d.ts +0 -5
- package/dist/components/switch/types.d.ts +0 -80
- package/dist/components/tabs/constants.d.ts +0 -76
- package/dist/components/tabs/indicator.d.ts +0 -27
- package/dist/components/tabs/responsive.d.ts +0 -30
- package/dist/components/tabs/tab.d.ts +0 -13
- package/dist/components/tabs/tab.js +26 -3
- package/dist/components/tabs/tabs.d.ts +0 -24
- package/dist/components/tabs/types.d.ts +0 -335
- package/dist/components/tabs/utils.d.ts +0 -66
- package/dist/components/text-field/constants.d.ts +0 -82
- package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
- package/dist/components/text-field/text-field.d.ts +0 -33
- package/dist/components/text-field/types.d.ts +0 -123
- package/dist/components/timepicker/constants.d.ts +0 -88
- package/dist/components/timepicker/types.d.ts +0 -268
- package/dist/components/toolbar/constants.d.ts +0 -27
- package/dist/components/toolbar/toolbar.d.ts +0 -25
- package/dist/components/toolbar/types.d.ts +0 -102
- package/dist/components/tooltip/constants.d.ts +0 -58
- package/dist/components/tooltip/tooltip.d.ts +0 -5
- package/dist/components/tooltip/types.d.ts +0 -140
- package/dist/components/top-app-bar/constants.d.ts +0 -41
- package/dist/components/top-app-bar/index.d.ts +0 -4
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
- package/dist/components/top-app-bar/types.d.ts +0 -94
- package/dist/core/canvas/animation.d.ts +0 -13
- package/dist/core/canvas/drawing.d.ts +18 -55
- package/dist/core/canvas/index.d.ts +0 -4
- package/dist/core/canvas/resize.d.ts +0 -13
- package/dist/core/canvas/utils.d.ts +0 -62
- package/dist/core/compose/base.d.ts +0 -22
- package/dist/core/compose/cleanup.d.ts +0 -2
- package/dist/core/compose/component.d.ts +0 -31
- package/dist/core/compose/features/badge.d.ts +0 -25
- package/dist/core/compose/features/badge.js +45 -0
- package/dist/core/compose/features/checkable.d.ts +0 -36
- package/dist/core/compose/features/debounce.d.ts +0 -57
- package/dist/core/compose/features/disabled.d.ts +0 -31
- package/dist/core/compose/features/events.d.ts +0 -38
- package/dist/core/compose/features/icon.d.ts +0 -49
- package/dist/core/compose/features/input.d.ts +0 -82
- package/dist/core/compose/features/lifecycle.d.ts +0 -36
- package/dist/core/compose/features/position.d.ts +0 -27
- package/dist/core/compose/features/ripple.d.ts +0 -29
- package/dist/core/compose/features/size.d.ts +0 -9
- package/dist/core/compose/features/style.d.ts +0 -9
- package/dist/core/compose/features/text.d.ts +0 -45
- package/dist/core/compose/features/textinput.d.ts +0 -88
- package/dist/core/compose/features/textlabel.d.ts +0 -44
- package/dist/core/compose/features/throttle.d.ts +0 -54
- package/dist/core/compose/features/track.d.ts +0 -34
- package/dist/core/compose/features/variant.d.ts +0 -9
- package/dist/core/compose/features/withEvents.d.ts +0 -30
- package/dist/core/compose/index.d.ts +0 -4
- package/dist/core/compose/pipe.d.ts +0 -55
- package/dist/core/compose/utils/type-guards.d.ts +0 -15
- package/dist/core/config/component.d.ts +0 -45
- package/dist/core/config/global.d.ts +0 -43
- package/dist/core/config.d.ts +0 -59
- package/dist/core/dom/attributes.d.ts +0 -41
- package/dist/core/dom/classes.d.ts +0 -49
- package/dist/core/dom/create.d.ts +0 -98
- package/dist/core/dom/events.d.ts +0 -52
- package/dist/core/dom/focus.d.ts +0 -32
- package/dist/core/dom/html.d.ts +0 -24
- package/dist/core/dom/layer.d.ts +0 -98
- package/dist/core/dom/roving.d.ts +0 -19
- package/dist/core/index.d.ts +0 -9
- package/dist/core/navigation/destinations.d.ts +0 -14
- package/dist/core/navigation/destinations.js +18 -5
- package/dist/core/shapes/cubic.d.ts +24 -19
- package/dist/core/shapes/material.d.ts +0 -64
- package/dist/core/shapes/polygon.d.ts +6 -16
- package/dist/core/state/emitter.d.ts +0 -36
- package/dist/core/state/events.d.ts +0 -29
- package/dist/core/state/store.d.ts +0 -70
- package/dist/core/theme/index.d.ts +0 -3
- package/dist/core/theme/shape.d.ts +0 -7
- package/dist/core/theme/tokens.d.ts +48 -32
- package/dist/core/utils/background.d.ts +0 -29
- package/dist/core/utils/color.d.ts +0 -13
- package/dist/core/utils/index.d.ts +0 -11
- package/dist/core/utils/mobile.d.ts +0 -31
- package/dist/core/utils/object.d.ts +0 -11
- package/dist/core/utils/performance.d.ts +0 -70
- package/dist/core/utils/theme.d.ts +0 -36
- package/dist/core/utils/url.d.ts +0 -17
- package/dist/elements/adapter.d.ts +13 -62
- package/dist/elements/badge.d.ts +0 -17
- package/dist/elements/bottom-app-bar.d.ts +7 -17
- package/dist/elements/bottom-sheet.d.ts +9 -38
- package/dist/elements/button-group.d.ts +0 -31
- package/dist/elements/button.d.ts +0 -18
- package/dist/elements/card.d.ts +8 -24
- package/dist/elements/carousel.d.ts +5 -29
- package/dist/elements/checkbox.d.ts +5 -15
- package/dist/elements/chips.d.ts +0 -33
- package/dist/elements/css/badge.css +1 -1
- package/dist/elements/css/badge.js +1 -1
- package/dist/elements/css/navigation-rail.css +1 -1
- package/dist/elements/css/navigation-rail.js +1 -1
- package/dist/elements/datepicker.d.ts +4 -48
- package/dist/elements/define.d.ts +3 -161
- package/dist/elements/dialog.d.ts +8 -39
- package/dist/elements/divider.d.ts +0 -14
- package/dist/elements/drawer.d.ts +0 -35
- package/dist/elements/extended-fab.d.ts +6 -18
- package/dist/elements/fab-menu.d.ts +5 -30
- package/dist/elements/fab.d.ts +4 -17
- package/dist/elements/icon-button.d.ts +5 -26
- package/dist/elements/index.d.ts +0 -16
- package/dist/elements/list.d.ts +0 -34
- package/dist/elements/loading-indicator.d.ts +4 -13
- package/dist/elements/menu.d.ts +5 -51
- package/dist/elements/navigation-bar.d.ts +4 -29
- package/dist/elements/navigation-rail.d.ts +8 -49
- package/dist/elements/preupgrade/badge.css +2 -2
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +2 -2
- package/dist/elements/preupgrade.d.ts +0 -1
- package/dist/elements/preupgrade.js +1 -1
- package/dist/elements/progress.d.ts +0 -15
- package/dist/elements/radios.d.ts +0 -22
- package/dist/elements/search.d.ts +5 -53
- package/dist/elements/select.d.ts +0 -31
- package/dist/elements/side-sheet.d.ts +7 -29
- package/dist/elements/slider.d.ts +3 -22
- package/dist/elements/snackbar.d.ts +4 -28
- package/dist/elements/split-button.d.ts +0 -30
- package/dist/elements/styles.d.ts +0 -63
- package/dist/elements/switch.d.ts +5 -17
- package/dist/elements/tabs.d.ts +0 -22
- package/dist/elements/text-field.d.ts +4 -38
- package/dist/elements/timepicker.d.ts +4 -44
- package/dist/elements/toolbar.d.ts +8 -25
- package/dist/elements/tooltip.d.ts +4 -30
- package/dist/elements/top-app-bar.d.ts +7 -23
- package/dist/index.d.ts +0 -11
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +0 -42
- package/dist/react/index.d.ts +0 -6
- package/dist/react/jsx.d.ts +0 -13
- package/dist/solid/create.d.ts +0 -48
- package/dist/solid/index.d.ts +0 -6
- package/dist/solid/jsx.d.ts +0 -9
- package/dist/ssr/index.d.ts +0 -49
- package/dist/ssr/solid.d.ts +0 -4
- package/dist/ssr/svelte.d.ts +0 -4
- package/dist/ssr/vue.d.ts +0 -4
- package/dist/styles/badge.css +2 -2
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +2 -2
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/runtime.d.ts +8 -62
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.d.ts +15 -58
- package/dist/vue/index.d.ts +0 -6
- package/package.json +1 -1
- package/src/styles/components/_badge.scss +75 -38
- package/src/styles/components/_navigation-rail.scss +9 -6
- package/src/styles/elements/_badge.scss +65 -4
- package/dist/components/badge/api.d.ts +0 -41
- package/dist/components/badge/config.d.ts +0 -631
- package/dist/components/badge/features.d.ts +0 -38
- package/dist/components/bottom-app-bar/config.d.ts +0 -16
- package/dist/components/bottom-sheet/api.d.ts +0 -44
- package/dist/components/bottom-sheet/config.d.ts +0 -547
- package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
- package/dist/components/bottom-sheet/features/index.d.ts +0 -3
- package/dist/components/bottom-sheet/features/state.d.ts +0 -31
- package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
- package/dist/components/button/api.d.ts +0 -68
- package/dist/components/button/config.d.ts +0 -594
- package/dist/components/button/features/progress.d.ts +0 -43
- package/dist/components/button/features/toggle.d.ts +0 -43
- package/dist/components/button-group/config.d.ts +0 -147
- package/dist/components/card/api.d.ts +0 -24
- package/dist/components/card/config.d.ts +0 -635
- package/dist/components/card/features.d.ts +0 -124
- package/dist/components/carousel/api.d.ts +0 -20
- package/dist/components/carousel/arrangement.d.ts +0 -23
- package/dist/components/carousel/config.d.ts +0 -540
- package/dist/components/carousel/features/index.d.ts +0 -2
- package/dist/components/carousel/features/scroll.d.ts +0 -20
- package/dist/components/carousel/features/slides.d.ts +0 -18
- package/dist/components/carousel/keylines.d.ts +0 -68
- package/dist/components/carousel/strategy.d.ts +0 -36
- package/dist/components/checkbox/api.d.ts +0 -7
- package/dist/components/checkbox/config.d.ts +0 -568
- package/dist/components/chips/api.d.ts +0 -62
- package/dist/components/chips/chip/chip.d.ts +0 -4
- package/dist/components/chips/chip/constants.d.ts +0 -38
- package/dist/components/chips/chip/index.d.ts +0 -1
- package/dist/components/chips/config.d.ts +0 -583
- package/dist/components/chips/features/chip-items.d.ts +0 -39
- package/dist/components/chips/features/container.d.ts +0 -75
- package/dist/components/chips/features/controller.d.ts +0 -61
- package/dist/components/chips/features/dom.d.ts +0 -24
- package/dist/components/chips/features/index.d.ts +0 -4
- package/dist/components/chips/schema.d.ts +0 -35
- package/dist/components/datepicker/api.d.ts +0 -7
- package/dist/components/datepicker/config.d.ts +0 -542
- package/dist/components/datepicker/render.d.ts +0 -3
- package/dist/components/datepicker/utils.d.ts +0 -84
- package/dist/components/dialog/api.d.ts +0 -66
- package/dist/components/dialog/config.d.ts +0 -583
- package/dist/components/dialog/features.d.ts +0 -42
- package/dist/components/divider/features.d.ts +0 -6
- package/dist/components/drawer/api.d.ts +0 -55
- package/dist/components/drawer/config.d.ts +0 -620
- package/dist/components/drawer/features/headline.d.ts +0 -27
- package/dist/components/drawer/features/index.d.ts +0 -3
- package/dist/components/drawer/features/items.d.ts +0 -32
- package/dist/components/drawer/features/state.d.ts +0 -22
- package/dist/components/extended-fab/api.d.ts +0 -96
- package/dist/components/extended-fab/config.d.ts +0 -600
- package/dist/components/fab/api.d.ts +0 -74
- package/dist/components/fab/config.d.ts +0 -596
- package/dist/components/fab-menu/config.d.ts +0 -11
- package/dist/components/fab-menu/stagger.d.ts +0 -10
- package/dist/components/icon-button/api.d.ts +0 -84
- package/dist/components/icon-button/config.d.ts +0 -624
- package/dist/components/icon-button/features/toggle.d.ts +0 -133
- package/dist/components/list/api.d.ts +0 -156
- package/dist/components/list/config.d.ts +0 -625
- package/dist/components/list/features/anatomy.d.ts +0 -6
- package/dist/components/list/features/index.d.ts +0 -2
- package/dist/components/list/features/renderer.d.ts +0 -8
- package/dist/components/list/features/selection.d.ts +0 -3
- package/dist/components/loading-indicator/api.d.ts +0 -14
- package/dist/components/loading-indicator/config.d.ts +0 -557
- package/dist/components/loading-indicator/features/motion.d.ts +0 -22
- package/dist/components/menu/api.d.ts +0 -63
- package/dist/components/menu/config.d.ts +0 -576
- package/dist/components/menu/features/controller.d.ts +0 -15
- package/dist/components/menu/features/index.d.ts +0 -5
- package/dist/components/menu/features/keyboard.d.ts +0 -23
- package/dist/components/menu/features/layer.d.ts +0 -15
- package/dist/components/menu/features/loader.d.ts +0 -35
- package/dist/components/menu/features/opener.d.ts +0 -16
- package/dist/components/menu/features/position.d.ts +0 -18
- package/dist/components/menu/features/registry.d.ts +0 -37
- package/dist/components/menu/features/submenu.d.ts +0 -28
- package/dist/components/menu/features/tasks.d.ts +0 -9
- package/dist/components/navigation-bar/config.d.ts +0 -2
- package/dist/components/navigation-rail/config.d.ts +0 -2
- package/dist/components/progress/api.d.ts +0 -81
- package/dist/components/progress/config.d.ts +0 -620
- package/dist/components/progress/features/canvas.d.ts +0 -60
- package/dist/components/progress/features/circular.d.ts +0 -19
- package/dist/components/progress/features/colors.d.ts +0 -17
- package/dist/components/progress/features/index.d.ts +0 -8
- package/dist/components/progress/features/linear.d.ts +0 -25
- package/dist/components/progress/features/motion.d.ts +0 -43
- package/dist/components/progress/features/resize-observer.d.ts +0 -5
- package/dist/components/progress/features/state.d.ts +0 -44
- package/dist/components/radios/api.d.ts +0 -37
- package/dist/components/radios/config.d.ts +0 -568
- package/dist/components/radios/radio.d.ts +0 -26
- package/dist/components/search/api.d.ts +0 -63
- package/dist/components/search/config.d.ts +0 -657
- package/dist/components/search/features/index.d.ts +0 -4
- package/dist/components/search/features/input.d.ts +0 -93
- package/dist/components/search/features/states.d.ts +0 -111
- package/dist/components/search/features/structure.d.ts +0 -16
- package/dist/components/search/features/suggestions.d.ts +0 -60
- package/dist/components/select/api.d.ts +0 -8
- package/dist/components/select/config.d.ts +0 -18
- package/dist/components/select/features.d.ts +0 -14
- package/dist/components/side-sheet/api.d.ts +0 -34
- package/dist/components/side-sheet/config.d.ts +0 -547
- package/dist/components/side-sheet/features/index.d.ts +0 -2
- package/dist/components/side-sheet/features/state.d.ts +0 -28
- package/dist/components/side-sheet/features/structure.d.ts +0 -21
- package/dist/components/slider/api.d.ts +0 -65
- package/dist/components/slider/config.d.ts +0 -605
- package/dist/components/slider/features/axis.d.ts +0 -42
- package/dist/components/slider/features/controller.d.ts +0 -528
- package/dist/components/slider/features/dom.d.ts +0 -22
- package/dist/components/slider/features/handlers.d.ts +0 -16
- package/dist/components/slider/features/index.d.ts +0 -5
- package/dist/components/slider/features/range.d.ts +0 -14
- package/dist/components/slider/features/states.d.ts +0 -76
- package/dist/components/slider/features/tracks.d.ts +0 -50
- package/dist/components/snackbar/api.d.ts +0 -7
- package/dist/components/snackbar/config.d.ts +0 -596
- package/dist/components/snackbar/features.d.ts +0 -26
- package/dist/components/snackbar/layer.d.ts +0 -23
- package/dist/components/snackbar/position.d.ts +0 -16
- package/dist/components/snackbar/queue.d.ts +0 -15
- package/dist/components/split-button/api.d.ts +0 -14
- package/dist/components/split-button/config.d.ts +0 -553
- package/dist/components/split-button/features/buttons.d.ts +0 -8
- package/dist/components/split-button/features/menu.d.ts +0 -10
- package/dist/components/switch/api.d.ts +0 -7
- package/dist/components/switch/config.d.ts +0 -558
- package/dist/components/switch/features.d.ts +0 -63
- package/dist/components/tabs/api.d.ts +0 -54
- package/dist/components/tabs/config.d.ts +0 -31
- package/dist/components/tabs/features.d.ts +0 -131
- package/dist/components/tabs/scroll-indicators.d.ts +0 -18
- package/dist/components/tabs/state.d.ts +0 -48
- package/dist/components/text-field/api.d.ts +0 -29
- package/dist/components/text-field/config.d.ts +0 -560
- package/dist/components/text-field/features/counter.d.ts +0 -29
- package/dist/components/text-field/features/density.d.ts +0 -28
- package/dist/components/text-field/features/error.d.ts +0 -55
- package/dist/components/text-field/features/field.d.ts +0 -37
- package/dist/components/text-field/features/index.d.ts +0 -20
- package/dist/components/text-field/features/leading-icon.d.ts +0 -68
- package/dist/components/text-field/features/placement.d.ts +0 -30
- package/dist/components/text-field/features/prefix-text.d.ts +0 -67
- package/dist/components/text-field/features/required.d.ts +0 -33
- package/dist/components/text-field/features/suffix-text.d.ts +0 -67
- package/dist/components/text-field/features/supporting-text.d.ts +0 -59
- package/dist/components/timepicker/api.d.ts +0 -26
- package/dist/components/timepicker/config.d.ts +0 -570
- package/dist/components/timepicker/dial.d.ts +0 -35
- package/dist/components/timepicker/render.d.ts +0 -9
- package/dist/components/timepicker/utils.d.ts +0 -55
- package/dist/components/toolbar/config.d.ts +0 -19
- package/dist/components/tooltip/api.d.ts +0 -18
- package/dist/components/tooltip/config.d.ts +0 -563
- package/dist/components/top-app-bar/config.d.ts +0 -16
- package/dist/core/compose/features/constants.d.ts +0 -8
- package/dist/core/dom/direction.d.ts +0 -16
- package/dist/core/dom/form-value.d.ts +0 -24
- package/dist/core/dom/utils.d.ts +0 -33
- package/dist/core/navigation/ripple.d.ts +0 -2
- package/dist/core/utils/attributes.d.ts +0 -29
- package/dist/core/utils/validate.d.ts +0 -73
- package/dist/core/utils/warn.d.ts +0 -16
- package/dist/elements/form-button.d.ts +0 -29
- package/dist/elements/lifecycle.d.ts +0 -4
- package/dist/elements/sheet.d.ts +0 -44
- package/dist/react/shadow.d.ts +0 -2
- package/dist/solid/shadow.d.ts +0 -3
- package/dist/vue/shadow.d.ts +0 -7
|
@@ -1,138 +1,38 @@
|
|
|
1
1
|
import type { ForwardedEventPayload } from "../../core/dom/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* List variant types following Material Design 3 guidelines.
|
|
4
|
-
* - standard: the baseline list: no container, square rows (default)
|
|
5
|
-
* - segmented: the expressive list: each row paints its own container and
|
|
6
|
-
* shape, 2px apart
|
|
7
|
-
*
|
|
8
|
-
* @category Components
|
|
9
|
-
*/
|
|
10
2
|
export type ListVariant = 'standard' | 'segmented';
|
|
11
|
-
/**
|
|
12
|
-
* Configuration for the List component
|
|
13
|
-
* @interface ListConfig
|
|
14
|
-
*/
|
|
15
3
|
export interface ListConfig<T = unknown> {
|
|
16
|
-
/**
|
|
17
|
-
* The list's visual style. It does not change the list's behavior.
|
|
18
|
-
* An unknown value is the default.
|
|
19
|
-
* @default 'standard'
|
|
20
|
-
*/
|
|
21
4
|
variant?: ListVariant;
|
|
22
|
-
/**
|
|
23
|
-
* Static array of items to display
|
|
24
|
-
* @required
|
|
25
|
-
*/
|
|
26
5
|
items: T[];
|
|
27
|
-
/**
|
|
28
|
-
* Function to render an item
|
|
29
|
-
* @param {T} item - Item to render
|
|
30
|
-
* @param {number} index - Item index in the list
|
|
31
|
-
* @returns {HTMLElement} Rendered DOM element
|
|
32
|
-
*/
|
|
33
6
|
renderItem?: (item: T, index: number) => HTMLElement;
|
|
34
|
-
/**
|
|
35
|
-
* Whether to track item selection
|
|
36
|
-
* When true, clicked items will receive a selected class.
|
|
37
|
-
*
|
|
38
|
-
* With `trackSelection`, each row's action is a button with `aria-pressed`,
|
|
39
|
-
* inside its `listitem`. That is this option's contract and it stays: a row
|
|
40
|
-
* can also hold a control of the app's, and pressing the selected row again
|
|
41
|
-
* deselects it. A listbox of options (`role="listbox"`, `aria-selected`,
|
|
42
|
-
* one tab stop), which allows neither, would be a separate opt-in mode, not
|
|
43
|
-
* a change to this one.
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
7
|
trackSelection?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to allow multiple item selection
|
|
49
|
-
* @default false
|
|
50
|
-
*/
|
|
51
8
|
multiSelect?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Initial selection state (array of item IDs)
|
|
54
|
-
*/
|
|
55
9
|
initialSelection?: (string | number)[];
|
|
56
|
-
/**
|
|
57
|
-
* ARIA label for accessibility
|
|
58
|
-
*/
|
|
59
10
|
ariaLabel?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Additional CSS classes
|
|
62
|
-
*/
|
|
63
11
|
class?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Default animation behavior for scroll operations
|
|
66
|
-
* When true, scroll operations will be animated by default
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
12
|
animate?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Component name used in CSS class generation
|
|
72
|
-
* @default 'list'
|
|
73
|
-
*/
|
|
74
13
|
componentName?: string;
|
|
75
14
|
}
|
|
76
|
-
/**
|
|
77
|
-
* What the list reads off an item.
|
|
78
|
-
*
|
|
79
|
-
* `ListConfig` is generic in its item type and consumers keep that, but the
|
|
80
|
-
* renderer and the selection feature both reach into an item for the same few
|
|
81
|
-
* optional fields -- an id to target it by, and one of four names for its
|
|
82
|
-
* label. This is that shape, written down once so the two features agree.
|
|
83
|
-
*
|
|
84
|
-
* @category Components
|
|
85
|
-
*/
|
|
86
|
-
/** Slot HTML uses the shared safe HTML sink; HTMLElement content is moved, not cloned.
|
|
87
|
-
* Use text for metadata and control/custom for independently interactive content.
|
|
88
|
-
*/
|
|
89
15
|
export interface ListSlot {
|
|
90
16
|
type: "icon" | "avatar" | "image" | "video" | "text" | "control" | "custom";
|
|
91
|
-
/**
|
|
92
|
-
* For `icon` and `avatar`, a string is markup.
|
|
93
|
-
* Markup (HTML). Not sanitized by default: see Markup and sanitizing.
|
|
94
|
-
* An avatar string is not a person's name or an image URL. An `image` is a URL.
|
|
95
|
-
*/
|
|
96
17
|
content: string | HTMLElement;
|
|
97
18
|
}
|
|
98
19
|
export interface ListItem {
|
|
99
|
-
/** Structural entries are rendered but never selectable. */
|
|
100
20
|
kind?: "item" | "divider" | "subheader";
|
|
101
|
-
/** Insets a divider to the text column (72px from the leading edge). */
|
|
102
21
|
inset?: boolean;
|
|
103
|
-
/** One headline line plus optional overline/supporting lines. Inferred when omitted. */
|
|
104
22
|
lines?: 1 | 2 | 3;
|
|
105
23
|
overline?: string;
|
|
106
24
|
supportingText?: string;
|
|
107
25
|
leading?: ListSlot;
|
|
108
|
-
/**
|
|
109
|
-
* The slot at the row's end: text, an icon, or a control of the app's
|
|
110
|
-
* (a checkbox, a radio, a switch). It is sized by its content: a control
|
|
111
|
-
* that fills its container, such as a slider, is not a list-row control
|
|
112
|
-
* and goes outside the row.
|
|
113
|
-
*/
|
|
114
26
|
trailing?: ListSlot;
|
|
115
|
-
/** Blocks user activation; programmatic selection is still allowed. */
|
|
116
27
|
disabled?: boolean;
|
|
117
28
|
id?: string | number;
|
|
118
29
|
text?: string;
|
|
119
30
|
title?: string;
|
|
120
31
|
headline?: string;
|
|
121
32
|
name?: string;
|
|
122
|
-
/** Selected at creation, which withSelection seeds its set from */
|
|
123
33
|
selected?: boolean;
|
|
124
34
|
}
|
|
125
|
-
/**
|
|
126
|
-
* What withRenderer installs at `component.list`.
|
|
127
|
-
*
|
|
128
|
-
* This static list renders all entries. Legacy paging methods remain no-ops
|
|
129
|
-
* for compatibility; there is no virtual-list dependency.
|
|
130
|
-
*
|
|
131
|
-
* @category Components
|
|
132
|
-
* @internal
|
|
133
|
-
*/
|
|
134
35
|
export interface ListRenderer<T = ListItem> {
|
|
135
|
-
/** @internal Owned row references avoid selector interpolation and nested-list matches. */
|
|
136
36
|
getRows: () => ListRow<T>[];
|
|
137
37
|
onRender: (handler: () => void) => () => void;
|
|
138
38
|
getItems: () => T[];
|
|
@@ -171,7 +71,6 @@ export interface ListRenderer<T = ListItem> {
|
|
|
171
71
|
isLoading: () => boolean;
|
|
172
72
|
hasNextPage: () => boolean;
|
|
173
73
|
}
|
|
174
|
-
/** @internal A rendered data row and its independent native primary action. */
|
|
175
74
|
export interface ListRow<T = ListItem> {
|
|
176
75
|
item: T;
|
|
177
76
|
id: string;
|
|
@@ -179,16 +78,7 @@ export interface ListRow<T = ListItem> {
|
|
|
179
78
|
element: HTMLElement;
|
|
180
79
|
action?: HTMLButtonElement;
|
|
181
80
|
}
|
|
182
|
-
/** Where a scrolled-to item lands in the viewport */
|
|
183
81
|
export type ScrollPosition = "start" | "center" | "end";
|
|
184
|
-
/**
|
|
185
|
-
* What withSelection installs. Present whether or not selection is tracked --
|
|
186
|
-
* with `trackSelection` off the feature returns no-op versions rather than
|
|
187
|
-
* nothing, so a caller never has to check before calling.
|
|
188
|
-
*
|
|
189
|
-
* @category Components
|
|
190
|
-
* @internal
|
|
191
|
-
*/
|
|
192
82
|
export interface ListSelection<T = ListItem> {
|
|
193
83
|
getSelectedItems: () => T[];
|
|
194
84
|
getSelectedItemIds: () => string[];
|
|
@@ -198,16 +88,6 @@ export interface ListSelection<T = ListItem> {
|
|
|
198
88
|
clearSelection(): this;
|
|
199
89
|
setSelection(itemIds: (string | number)[]): this;
|
|
200
90
|
}
|
|
201
|
-
/**
|
|
202
|
-
* What a list feature needs from the component it is handed.
|
|
203
|
-
*
|
|
204
|
-
* The list pipe is createBase, withEvents, withElement, then these -- so the
|
|
205
|
-
* element is there before any feature runs. `list` is optional because
|
|
206
|
-
* withSelection reads it and withRenderer is what puts it there.
|
|
207
|
-
*
|
|
208
|
-
* @category Components
|
|
209
|
-
* @internal
|
|
210
|
-
*/
|
|
211
91
|
export interface ListFeatureHost {
|
|
212
92
|
element: HTMLElement;
|
|
213
93
|
getClass: (name: string) => string;
|
|
@@ -221,187 +101,44 @@ export interface ListFeatureHost {
|
|
|
221
101
|
};
|
|
222
102
|
list?: ListRenderer;
|
|
223
103
|
}
|
|
224
|
-
/**
|
|
225
|
-
* Selection event data
|
|
226
|
-
* @interface SelectEvent
|
|
227
|
-
*/
|
|
228
104
|
export interface SelectEvent<T = unknown> {
|
|
229
|
-
/**
|
|
230
|
-
* Selected item data
|
|
231
|
-
*/
|
|
232
105
|
item: T;
|
|
233
|
-
/**
|
|
234
|
-
* The item's id as a string, the `value` of the `<m-list>` element's
|
|
235
|
-
* `activate`
|
|
236
|
-
*/
|
|
237
106
|
value: string;
|
|
238
|
-
/**
|
|
239
|
-
* DOM element for the selected item
|
|
240
|
-
*/
|
|
241
107
|
element: HTMLElement;
|
|
242
|
-
/**
|
|
243
|
-
* Original DOM event
|
|
244
|
-
*/
|
|
245
108
|
originalEvent: Event;
|
|
246
|
-
/**
|
|
247
|
-
* Component instance
|
|
248
|
-
*/
|
|
249
109
|
component: ListComponent<T>;
|
|
250
|
-
/**
|
|
251
|
-
* Prevent default behavior
|
|
252
|
-
*/
|
|
253
110
|
preventDefault: () => void;
|
|
254
|
-
/**
|
|
255
|
-
* Whether default was prevented
|
|
256
|
-
*/
|
|
257
111
|
defaultPrevented: boolean;
|
|
258
112
|
}
|
|
259
|
-
/**
|
|
260
|
-
* Load event data
|
|
261
|
-
* @interface LoadEvent
|
|
262
|
-
*/
|
|
263
113
|
export interface LoadEvent<T = unknown> {
|
|
264
|
-
/**
|
|
265
|
-
* Loaded items
|
|
266
|
-
*/
|
|
267
114
|
items: T[];
|
|
268
|
-
/**
|
|
269
|
-
* Whether the list is currently loading
|
|
270
|
-
*/
|
|
271
115
|
loading: boolean;
|
|
272
|
-
/**
|
|
273
|
-
* Whether there are more items to load
|
|
274
|
-
*/
|
|
275
116
|
hasNext: boolean;
|
|
276
|
-
/**
|
|
277
|
-
* Whether there are previous items
|
|
278
|
-
*/
|
|
279
117
|
hasPrev: boolean;
|
|
280
|
-
/**
|
|
281
|
-
* Component instance
|
|
282
|
-
*/
|
|
283
118
|
component: ListComponent<T>;
|
|
284
|
-
/**
|
|
285
|
-
* Prevent default behavior
|
|
286
|
-
*/
|
|
287
119
|
preventDefault?: () => void;
|
|
288
|
-
/**
|
|
289
|
-
* Whether default was prevented
|
|
290
|
-
*/
|
|
291
120
|
defaultPrevented?: boolean;
|
|
292
121
|
}
|
|
293
|
-
/**
|
|
294
|
-
* List component interface
|
|
295
|
-
* @interface ListComponent
|
|
296
|
-
*/
|
|
297
122
|
export interface ListComponent<T = unknown> {
|
|
298
|
-
/**
|
|
299
|
-
* Component's root DOM element
|
|
300
|
-
*/
|
|
301
123
|
element: HTMLElement;
|
|
302
|
-
/**
|
|
303
|
-
* Refreshes the list display
|
|
304
|
-
* @returns {Promise<ListComponent<T>>} Promise that resolves with component
|
|
305
|
-
*/
|
|
306
124
|
refresh: () => Promise<ListComponent<T>>;
|
|
307
|
-
/**
|
|
308
|
-
* Gets all items in the list
|
|
309
|
-
* @returns {T[]} All items
|
|
310
|
-
*/
|
|
311
125
|
getAllItems: () => T[];
|
|
312
|
-
/**
|
|
313
|
-
* Gets all visible items (same as getAllItems for rendered lists)
|
|
314
|
-
* @returns {T[]} Visible items
|
|
315
|
-
*/
|
|
316
126
|
getVisibleItems: () => T[];
|
|
317
|
-
/**
|
|
318
|
-
* Scrolls to a specific item by ID
|
|
319
|
-
* @param {string | number} itemId - Item ID to scroll to
|
|
320
|
-
* @param {string} position - Position ('start', 'center', 'end')
|
|
321
|
-
* @param {boolean} animate - Whether to animate the scroll
|
|
322
|
-
* @returns {ListComponent} Component instance for chaining
|
|
323
|
-
*/
|
|
324
127
|
scrollToItem: (itemId: string | number, position?: "start" | "center" | "end", animate?: boolean) => ListComponent<T>;
|
|
325
|
-
/**
|
|
326
|
-
* Scroll to a specific index in the list
|
|
327
|
-
* @param {number} index - Index to scroll to (0-based)
|
|
328
|
-
* @param {string} position - Position ('start', 'center', 'end')
|
|
329
|
-
* @param {boolean} animate - Whether to animate the scroll
|
|
330
|
-
* @returns {Promise<ListComponent<T>>} Promise that resolves when scroll is complete
|
|
331
|
-
*/
|
|
332
128
|
scrollToIndex: (index: number, position?: "start" | "center" | "end", animate?: boolean) => Promise<ListComponent<T>>;
|
|
333
|
-
/**
|
|
334
|
-
* Checks if the list is currently loading (always false for rendered lists)
|
|
335
|
-
* @returns {boolean} Always false
|
|
336
|
-
*/
|
|
337
129
|
isLoading: () => boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Checks if the list has more items to load (always false for rendered lists)
|
|
340
|
-
* @returns {boolean} Always false
|
|
341
|
-
*/
|
|
342
130
|
hasNextPage: () => boolean;
|
|
343
|
-
/**
|
|
344
|
-
* Gets the currently selected items
|
|
345
|
-
* @returns {T[]} Selected items
|
|
346
|
-
*/
|
|
347
131
|
getSelectedItems: () => T[];
|
|
348
|
-
/**
|
|
349
|
-
* Gets the IDs of currently selected items
|
|
350
|
-
* @returns {string[]} Selected item IDs
|
|
351
|
-
*/
|
|
352
132
|
getSelectedItemIds: () => string[];
|
|
353
|
-
/**
|
|
354
|
-
* Checks if an item is selected
|
|
355
|
-
* @param {string | number} itemId - Item ID to check
|
|
356
|
-
* @returns {boolean} True if item is selected
|
|
357
|
-
*/
|
|
358
133
|
isItemSelected: (itemId: string | number) => boolean;
|
|
359
|
-
/**
|
|
360
|
-
* Selects an item
|
|
361
|
-
* @param {string | number} itemId - Item ID to select
|
|
362
|
-
* @returns {ListComponent} Component instance for chaining
|
|
363
|
-
*/
|
|
364
134
|
selectItem: (itemId: string | number) => ListComponent<T>;
|
|
365
|
-
/**
|
|
366
|
-
* Deselects an item
|
|
367
|
-
* @param {string | number} itemId - Item ID to deselect
|
|
368
|
-
* @returns {ListComponent} Component instance for chaining
|
|
369
|
-
*/
|
|
370
135
|
deselectItem: (itemId: string | number) => ListComponent<T>;
|
|
371
|
-
/**
|
|
372
|
-
* Clears all selections
|
|
373
|
-
* @returns {ListComponent} Component instance for chaining
|
|
374
|
-
*/
|
|
375
136
|
clearSelection: () => ListComponent<T>;
|
|
376
|
-
/**
|
|
377
|
-
* Sets the selection to the specified item IDs
|
|
378
|
-
* @param {(string | number)[]} itemIds - Item IDs to select
|
|
379
|
-
* @returns {ListComponent} Component instance for chaining
|
|
380
|
-
*/
|
|
381
137
|
setSelection: (itemIds: (string | number)[]) => ListComponent<T>;
|
|
382
|
-
/**
|
|
383
|
-
* Adds an event listener to the list
|
|
384
|
-
* @param {string} event - Event name
|
|
385
|
-
* @param {Function} handler - Event handler
|
|
386
|
-
* @returns {ListComponent} Component instance for chaining
|
|
387
|
-
*/
|
|
388
138
|
on: <K extends keyof ListEvents<T>>(event: K, handler: ListEvents<T>[K]) => ListComponent<T>;
|
|
389
|
-
/**
|
|
390
|
-
* Removes an event listener from the list
|
|
391
|
-
* @param {string} event - Event name
|
|
392
|
-
* @param {Function} handler - Event handler
|
|
393
|
-
* @returns {ListComponent} Component instance for chaining
|
|
394
|
-
*/
|
|
395
139
|
off: <K extends keyof ListEvents<T>>(event: K, handler: ListEvents<T>[K]) => ListComponent<T>;
|
|
396
|
-
/**
|
|
397
|
-
* Destroys the component and cleans up resources
|
|
398
|
-
*/
|
|
399
140
|
destroy: () => void;
|
|
400
141
|
}
|
|
401
|
-
/**
|
|
402
|
-
* Event handlers for List
|
|
403
|
-
* @interface ListEvents
|
|
404
|
-
*/
|
|
405
142
|
export interface ListEvents<T = unknown> {
|
|
406
143
|
select: (event: SelectEvent<T>) => void;
|
|
407
144
|
load: (event: LoadEvent<T>) => void;
|
|
@@ -1,60 +1,25 @@
|
|
|
1
1
|
import type { MaterialShapeName } from "../../core/shapes/index.js";
|
|
2
|
-
/**
|
|
3
|
-
* Loading indicator measurements and timing (Compose Material 3
|
|
4
|
-
* LoadingIndicatorTokens.kt and LoadingIndicator.kt)
|
|
5
|
-
* @category Components
|
|
6
|
-
*/
|
|
7
2
|
export declare const LOADING_INDICATOR_DEFAULTS: {
|
|
8
|
-
/** Container width and height */
|
|
9
3
|
readonly SIZE: 48;
|
|
10
|
-
/** The active indicator's diameter within a 48dp container */
|
|
11
4
|
readonly INDICATOR_SIZE: 38;
|
|
12
|
-
/** Smallest size the guidelines allow */
|
|
13
5
|
readonly MIN_SIZE: 24;
|
|
14
|
-
/** Largest size the guidelines allow */
|
|
15
6
|
readonly MAX_SIZE: 240;
|
|
16
|
-
/** Milliseconds between two shape morphs */
|
|
17
7
|
readonly MORPH_INTERVAL: 650;
|
|
18
|
-
/** Milliseconds for one full turn of the slow global rotation */
|
|
19
8
|
readonly ROTATION_DURATION: 4666;
|
|
20
|
-
/** Degrees each morph turns the shape */
|
|
21
9
|
readonly MORPH_ROTATION: 90;
|
|
22
|
-
/** Accessible name when none is given */
|
|
23
10
|
readonly LABEL: "Loading";
|
|
24
|
-
/** Outline samples per shape */
|
|
25
11
|
readonly SAMPLES: 360;
|
|
26
12
|
};
|
|
27
|
-
/**
|
|
28
|
-
* The morph spring (Compose: `spring(dampingRatio = 0.6f, stiffness = 200f,
|
|
29
|
-
* visibilityThreshold = 0.1f)`)
|
|
30
|
-
* @category Components
|
|
31
|
-
*/
|
|
32
13
|
export declare const LOADING_INDICATOR_SPRING: {
|
|
33
14
|
readonly DAMPING: 0.6;
|
|
34
15
|
readonly STIFFNESS: 200;
|
|
35
16
|
readonly THRESHOLD: 0.1;
|
|
36
17
|
};
|
|
37
|
-
/**
|
|
38
|
-
* The shapes the indeterminate indicator morphs through, in order
|
|
39
|
-
* (LoadingIndicatorDefaults.IndeterminateIndicatorPolygons)
|
|
40
|
-
* @category Components
|
|
41
|
-
*/
|
|
42
18
|
export declare const LOADING_INDICATOR_SHAPES: readonly MaterialShapeName[];
|
|
43
|
-
/**
|
|
44
|
-
* The shapes the determinate indicator morphs between as the value grows
|
|
45
|
-
* (LoadingIndicatorDefaults.DeterminateIndicatorPolygons)
|
|
46
|
-
* @category Components
|
|
47
|
-
*/
|
|
48
19
|
export declare const LOADING_INDICATOR_DETERMINATE_SHAPES: readonly MaterialShapeName[];
|
|
49
|
-
/**
|
|
50
|
-
* CSS class names used by the loading indicator, without the prefix
|
|
51
|
-
* @category Components
|
|
52
|
-
*/
|
|
53
20
|
export declare const LOADING_INDICATOR_CLASSES: {
|
|
54
21
|
readonly ROOT: "loading-indicator";
|
|
55
|
-
/** Drawn on a primary-container circle */
|
|
56
22
|
readonly CONTAINED: "loading-indicator--contained";
|
|
57
|
-
/** Shows a value rather than looping */
|
|
58
23
|
readonly DETERMINATE: "loading-indicator--determinate";
|
|
59
24
|
readonly CANVAS: "loading-indicator__canvas";
|
|
60
25
|
};
|
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import { RadialProfile, MaterialShapeName } from "../../../core/shapes/index.js";
|
|
2
2
|
import { BaseComponent, LoadingIndicatorConfig } from "../types.js";
|
|
3
|
-
/** A frame: which morph, how far along it, and the rotation in degrees */
|
|
4
3
|
export interface Frame {
|
|
5
|
-
/** Index of the shape the morph starts from */
|
|
6
4
|
index: number;
|
|
7
|
-
/** 0 at the shape, 1 at the next; may overshoot */
|
|
8
5
|
progress: number;
|
|
9
|
-
/** Clockwise rotation in degrees */
|
|
10
6
|
rotation: number;
|
|
11
7
|
}
|
|
12
8
|
export interface Renderer {
|
|
13
|
-
/** Draws one frame with the given shape sequence */
|
|
14
9
|
draw: (shapes: readonly RadialProfile[], frame: Frame) => void;
|
|
15
|
-
/** Resizes the canvas to the element's size */
|
|
16
10
|
resize: (size: number) => void;
|
|
17
|
-
/** Re-reads the indicator colour from the element's computed style */
|
|
18
11
|
refreshColor: () => void;
|
|
19
|
-
/** The last frame drawn, redrawn on resize and theme change */
|
|
20
12
|
redraw: () => void;
|
|
21
|
-
/** Profiles for a shape sequence, cached per name */
|
|
22
13
|
profiles: (names: readonly MaterialShapeName[]) => RadialProfile[];
|
|
23
14
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Adds the canvas and the drawing routine
|
|
26
|
-
* @param {LoadingIndicatorConfig} config - Component configuration
|
|
27
|
-
* @returns {Function} Higher-order function that adds the renderer
|
|
28
|
-
*/
|
|
29
15
|
export declare const withRenderer: (config: LoadingIndicatorConfig) => (component: BaseComponent) => BaseComponent;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { LoadingIndicatorConfig, LoadingIndicatorComponent } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a loading indicator: the Material 3 expressive shape morph for
|
|
4
|
-
* waits under about five seconds. It animates from creation.
|
|
5
|
-
* @param {LoadingIndicatorConfig} config - Loading indicator configuration
|
|
6
|
-
* @returns {LoadingIndicatorComponent} Loading indicator component instance
|
|
7
|
-
*/
|
|
8
2
|
declare const createLoadingIndicator: (config?: LoadingIndicatorConfig) => LoadingIndicatorComponent;
|
|
9
3
|
export default createLoadingIndicator;
|
|
@@ -1,61 +1,26 @@
|
|
|
1
1
|
import type { Renderer } from "./features/renderer.js";
|
|
2
|
-
/**
|
|
3
|
-
* Configuration options for the loading indicator
|
|
4
|
-
* @interface LoadingIndicatorConfig
|
|
5
|
-
*/
|
|
6
2
|
export interface LoadingIndicatorConfig {
|
|
7
|
-
/** Width and height in pixels, 24 to 240 (default 48) */
|
|
8
3
|
size?: number;
|
|
9
|
-
/**
|
|
10
|
-
* Draws the indicator on a primary-container circle, for use over other
|
|
11
|
-
* content; the indicator then takes on-primary-container
|
|
12
|
-
*/
|
|
13
4
|
contained?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* A value from 0 to 1 makes the indicator determinate: the shape morphs
|
|
16
|
-
* with the value instead of looping. Leave unset for indeterminate.
|
|
17
|
-
*/
|
|
18
5
|
value?: number | null;
|
|
19
|
-
/** Accessible name: what is loading (default "Loading") */
|
|
20
6
|
ariaLabel?: string;
|
|
21
|
-
/** Additional CSS classes */
|
|
22
7
|
class?: string;
|
|
23
|
-
/** Component prefix for CSS classes */
|
|
24
8
|
prefix?: string;
|
|
25
|
-
/** Component name for CSS classes */
|
|
26
9
|
componentName?: string;
|
|
27
10
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Loading indicator public API
|
|
30
|
-
* @interface LoadingIndicatorComponent
|
|
31
|
-
*/
|
|
32
11
|
export interface LoadingIndicatorComponent {
|
|
33
|
-
/** The root element */
|
|
34
12
|
element: HTMLElement;
|
|
35
|
-
/** The canvas the shapes are drawn on */
|
|
36
13
|
canvas: HTMLCanvasElement;
|
|
37
|
-
/** Sets a value from 0 to 1 (determinate) or null (indeterminate) */
|
|
38
14
|
setValue: (value: number | null) => LoadingIndicatorComponent;
|
|
39
|
-
/** The current value, or null when indeterminate */
|
|
40
15
|
getValue: () => number | null;
|
|
41
|
-
/** Sets the size in pixels, clamped to 24–240 */
|
|
42
16
|
setSize: (size: number) => LoadingIndicatorComponent;
|
|
43
|
-
/** The size in pixels */
|
|
44
17
|
getSize: () => number;
|
|
45
|
-
/** Sets the accessible name */
|
|
46
18
|
setLabel: (label: string) => LoadingIndicatorComponent;
|
|
47
|
-
/** Runs the indeterminate animation (it runs from creation) */
|
|
48
19
|
start: () => LoadingIndicatorComponent;
|
|
49
|
-
/** Freezes the indicator on its current frame */
|
|
50
20
|
stop: () => LoadingIndicatorComponent;
|
|
51
|
-
/** Whether the animation is running */
|
|
52
21
|
isRunning: () => boolean;
|
|
53
|
-
/** Stops the animation and removes the element */
|
|
54
22
|
destroy: () => void;
|
|
55
23
|
}
|
|
56
|
-
/**
|
|
57
|
-
* The component as it passes through the enhancers
|
|
58
|
-
*/
|
|
59
24
|
export interface BaseComponent {
|
|
60
25
|
element: HTMLElement;
|
|
61
26
|
getClass?: (name: string) => string;
|
|
@@ -1,140 +1,61 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Menu position options for alignment relative to opener element
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Menu variants
|
|
6
|
-
*
|
|
7
|
-
* The baseline menu is the original M3 design: square-ish corners, a
|
|
8
|
-
* surface-container container, and items that fill the width. The vertical
|
|
9
|
-
* menu is the M3 expressive one: a 16dp container holding 44dp items that
|
|
10
|
-
* sit 2dp apart and change shape as they are hovered, focused, pressed or
|
|
11
|
-
* selected. New designs should take the vertical variant.
|
|
12
|
-
* @category Components
|
|
13
|
-
*/
|
|
14
1
|
export declare const MENU_VARIANTS: {
|
|
15
|
-
/** The original M3 menu (default, for compatibility) */
|
|
16
2
|
readonly BASELINE: "baseline";
|
|
17
|
-
/** The M3 expressive vertical menu */
|
|
18
3
|
readonly VERTICAL: "vertical";
|
|
19
4
|
};
|
|
20
|
-
/**
|
|
21
|
-
* Colour mappings for the vertical menu
|
|
22
|
-
*
|
|
23
|
-
* Standard is surface-based and carries lower emphasis; vibrant is
|
|
24
|
-
* tertiary-based, is more prominent, and should be used sparingly
|
|
25
|
-
* (m3.material.io menu guidelines, "Color options").
|
|
26
|
-
* @category Components
|
|
27
|
-
*/
|
|
28
5
|
export declare const MENU_COLORS: {
|
|
29
6
|
readonly STANDARD: "standard";
|
|
30
7
|
readonly VIBRANT: "vibrant";
|
|
31
8
|
};
|
|
32
9
|
export declare const MENU_POSITION: {
|
|
33
|
-
/** Places menu below the opener, aligned to left edge */
|
|
34
10
|
readonly BOTTOM_START: "bottom-start";
|
|
35
|
-
/** Places menu below the opener, centered */
|
|
36
11
|
readonly BOTTOM: "bottom";
|
|
37
|
-
/** Places menu below the opener, aligned to right edge */
|
|
38
12
|
readonly BOTTOM_END: "bottom-end";
|
|
39
|
-
/** Places menu above the opener, aligned to left edge */
|
|
40
13
|
readonly TOP_START: "top-start";
|
|
41
|
-
/** Places menu above the opener, centered */
|
|
42
14
|
readonly TOP: "top";
|
|
43
|
-
/** Places menu above the opener, aligned to right edge */
|
|
44
15
|
readonly TOP_END: "top-end";
|
|
45
|
-
/** Places menu to the right of the opener, aligned to top edge */
|
|
46
16
|
readonly RIGHT_START: "right-start";
|
|
47
|
-
/** Places menu to the right of the opener, centered */
|
|
48
17
|
readonly RIGHT: "right";
|
|
49
|
-
/** Places menu to the right of the opener, aligned to bottom edge */
|
|
50
18
|
readonly RIGHT_END: "right-end";
|
|
51
|
-
/** Places menu to the left of the opener, aligned to top edge */
|
|
52
19
|
readonly LEFT_START: "left-start";
|
|
53
|
-
/** Places menu to the left of the opener, centered */
|
|
54
20
|
readonly LEFT: "left";
|
|
55
|
-
/** Places menu to the left of the opener, aligned to bottom edge */
|
|
56
21
|
readonly LEFT_END: "left-end";
|
|
57
22
|
};
|
|
58
|
-
/**
|
|
59
|
-
* Default configuration values for menus
|
|
60
|
-
*/
|
|
61
23
|
export declare const MENU_DEFAULTS: {
|
|
62
|
-
/** Default variant; the baseline menu, so existing menus are untouched */
|
|
63
24
|
readonly VARIANT: "baseline";
|
|
64
|
-
/** Default colour mapping for the vertical variant */
|
|
65
25
|
readonly COLOR: "standard";
|
|
66
|
-
/** Default menu position */
|
|
67
26
|
readonly POSITION: "bottom-start";
|
|
68
|
-
/** Default offset from the opener (in pixels) */
|
|
69
27
|
readonly OFFSET: 0;
|
|
70
|
-
/** Close menu when an item is selected */
|
|
71
28
|
readonly CLOSE_ON_SELECT: true;
|
|
72
|
-
/** Close menu when clicking outside */
|
|
73
29
|
readonly CLOSE_ON_CLICK_OUTSIDE: true;
|
|
74
|
-
/** Close menu when escape key is pressed */
|
|
75
30
|
readonly CLOSE_ON_ESCAPE: true;
|
|
76
|
-
/** Open submenus on hover */
|
|
77
31
|
readonly OPEN_SUBMENU_ON_HOVER: true;
|
|
78
|
-
/** Automatically flip menu position to stay in viewport */
|
|
79
32
|
readonly AUTO_FLIP: true;
|
|
80
33
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Interaction types for menu opening/closing
|
|
83
|
-
*/
|
|
84
34
|
export declare const MENU_INTERACTION_TYPES: {
|
|
85
|
-
/** Interaction via mouse or touch */
|
|
86
35
|
readonly MOUSE: "mouse";
|
|
87
|
-
/** Interaction via keyboard */
|
|
88
36
|
readonly KEYBOARD: "keyboard";
|
|
89
37
|
};
|
|
90
|
-
/**
|
|
91
|
-
* Menu item types
|
|
92
|
-
*/
|
|
93
38
|
export declare const MENU_ITEM_TYPES: {
|
|
94
|
-
/** Standard interactive menu item */
|
|
95
39
|
readonly ITEM: "item";
|
|
96
|
-
/** Non-interactive dividing line */
|
|
97
40
|
readonly DIVIDER: "divider";
|
|
98
41
|
};
|
|
99
|
-
/**
|
|
100
|
-
* Menu event names
|
|
101
|
-
*/
|
|
102
42
|
export declare const MENU_EVENTS: {
|
|
103
|
-
/** Fired when the menu is opened */
|
|
104
43
|
readonly OPEN: "open";
|
|
105
|
-
/** Fired when the menu is closed */
|
|
106
44
|
readonly CLOSE: "close";
|
|
107
|
-
/** Fired when a menu item is selected */
|
|
108
45
|
readonly SELECT: "select";
|
|
109
46
|
};
|
|
110
|
-
/**
|
|
111
|
-
* CSS classes for menu elements
|
|
112
|
-
*/
|
|
113
47
|
export declare const MENU_CLASSES: {
|
|
114
|
-
/** Menu container */
|
|
115
48
|
readonly CONTAINER: "menu";
|
|
116
|
-
/** Visible menu */
|
|
117
49
|
readonly VISIBLE: "menu--visible";
|
|
118
|
-
/** Menu inner container */
|
|
119
50
|
readonly INNER: "menu__inner";
|
|
120
|
-
/** Individual menu item */
|
|
121
51
|
readonly ITEM: "menu__item";
|
|
122
|
-
/** Disabled menu item */
|
|
123
52
|
readonly ITEM_DISABLED: "menu__item--disabled";
|
|
124
|
-
/** Selected menu item */
|
|
125
53
|
readonly ITEM_SELECTED: "menu__item--selected";
|
|
126
|
-
/** Menu item with submenu */
|
|
127
54
|
readonly ITEM_HAS_SUBMENU: "menu__item--has-submenu";
|
|
128
|
-
/** Divider */
|
|
129
55
|
readonly DIVIDER: "menu__divider";
|
|
130
|
-
/** Item icon */
|
|
131
56
|
readonly ITEM_ICON: "menu__item-icon";
|
|
132
|
-
/** Item text */
|
|
133
57
|
readonly ITEM_TEXT: "menu__item-text";
|
|
134
|
-
/** Item keyboard shortcut */
|
|
135
58
|
readonly ITEM_SHORTCUT: "menu__item-shortcut";
|
|
136
|
-
/** Submenu indicator */
|
|
137
59
|
readonly SUBMENU_INDICATOR: "menu__submenu-indicator";
|
|
138
|
-
/** Dense/compact variant */
|
|
139
60
|
readonly DENSE: "menu--dense";
|
|
140
61
|
};
|