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
package/dist/core/dom/layer.d.ts
CHANGED
|
@@ -1,117 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How an element is promoted to the browser's top layer:
|
|
3
|
-
* - `popover-auto`: `popover="auto"`, which the browser light-dismisses (a
|
|
4
|
-
* click outside, Escape, another auto popover opening)
|
|
5
|
-
* - `popover-manual`: `popover="manual"`, closed only by its owner
|
|
6
|
-
* - `modal`: a `<dialog>` shown with `showModal()`, which makes the rest of
|
|
7
|
-
* the page inert and closes on Escape
|
|
8
|
-
*/
|
|
9
1
|
export type TopLayerKind = "popover-auto" | "popover-manual" | "modal";
|
|
10
2
|
export interface TopLayerOptions {
|
|
11
3
|
kind: TopLayerKind;
|
|
12
4
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Whether the browser can show an element of this kind in the top layer:
|
|
15
|
-
* `showPopover` for the popovers, `HTMLDialogElement.prototype.showModal` for
|
|
16
|
-
* a modal.
|
|
17
|
-
*
|
|
18
|
-
* @param kind - The kind of top-layer element
|
|
19
|
-
* @returns True where the browser supports it
|
|
20
|
-
*/
|
|
21
5
|
export declare const supportsTopLayer: (kind: TopLayerKind) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Shows an element in the top layer, above everything else on the page
|
|
24
|
-
* whatever its z-index and whatever clips or transforms its ancestors. The
|
|
25
|
-
* element stays where it is in the DOM, so it keeps the styles of its tree,
|
|
26
|
-
* a shadow root's included.
|
|
27
|
-
*
|
|
28
|
-
* The element must be connected, and for `modal` be a `<dialog>`. Showing an
|
|
29
|
-
* element already shown does nothing.
|
|
30
|
-
*
|
|
31
|
-
* Where the browser has no support for the kind, nothing changes and false is
|
|
32
|
-
* returned: the caller keeps its own positioning and stacking, which is what
|
|
33
|
-
* it did before the top layer.
|
|
34
|
-
*
|
|
35
|
-
* @param element - The element to show
|
|
36
|
-
* @param options - The kind of top-layer element
|
|
37
|
-
* @returns True when the element is in the top layer
|
|
38
|
-
*/
|
|
39
6
|
export declare const showInTopLayer: (element: HTMLElement, { kind }: TopLayerOptions) => boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Takes an element out of the top layer. Does nothing when it is not shown.
|
|
42
|
-
* This close is not reported to onTopLayerClose.
|
|
43
|
-
*
|
|
44
|
-
* @param element - The element shown with showInTopLayer
|
|
45
|
-
*/
|
|
46
7
|
export declare const hideFromTopLayer: (element: HTMLElement) => void;
|
|
47
|
-
/**
|
|
48
|
-
* Reports the closes the browser makes on its own: a light dismiss or Escape
|
|
49
|
-
* for `popover="auto"` (a `toggle` event to `closed`), Escape or a form for a
|
|
50
|
-
* modal dialog (its `close` event, which follows an uncanceled `cancel`).
|
|
51
|
-
* Closes made with hideFromTopLayer are not reported, nor is a close the
|
|
52
|
-
* element was shown again after.
|
|
53
|
-
*
|
|
54
|
-
* @param element - The element shown with showInTopLayer
|
|
55
|
-
* @param callback - Called once for each close
|
|
56
|
-
* @returns A function that stops the reports
|
|
57
|
-
*/
|
|
58
8
|
export declare const onTopLayerClose: (element: HTMLElement, callback: () => void) => (() => void);
|
|
59
|
-
/**
|
|
60
|
-
* A modal outside the top layer: makes everything but `keep` inert,
|
|
61
|
-
* as showModal() does for a top-layer dialog. The siblings of `keep` and of
|
|
62
|
-
* each of its ancestors, up to the body, crossing shadow roots, get `inert`;
|
|
63
|
-
* elements already inert are left alone. Returns the undo, which removes
|
|
64
|
-
* `inert` from exactly the elements it set it on.
|
|
65
|
-
*/
|
|
66
9
|
export declare const inertOutside: (keep: Element) => (() => void);
|
|
67
|
-
/** What eventsFrom returns: see there. */
|
|
68
10
|
export interface EventsFrom {
|
|
69
|
-
/** Whether the event's dispatch began after the call */
|
|
70
11
|
after: (event: Event) => boolean;
|
|
71
|
-
/** Releases the marker. Harmless when called again. */
|
|
72
12
|
stop: () => void;
|
|
73
13
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Tells the events that came after this call from the one that was already
|
|
76
|
-
* on its way: "the event that opened an overlay never dismisses it".
|
|
77
|
-
*
|
|
78
|
-
* An overlay adds its dismiss listeners in `open()`, and the click or the key
|
|
79
|
-
* press that called `open()` then reaches them, on its way up. It is not
|
|
80
|
-
* told apart by time (event times are whole milliseconds in some browsers,
|
|
81
|
-
* and equal times cannot be ordered) nor by the task (a real key press can
|
|
82
|
-
* be delivered before any timer has run), but by the dispatch itself: every
|
|
83
|
-
* event passes the window's capture phase first, where one listener numbers
|
|
84
|
-
* it. An event numbered after the call came after it; the one in flight has
|
|
85
|
-
* an earlier number, or none.
|
|
86
|
-
*
|
|
87
|
-
* The browser's own `cancel` for a modal `<dialog>` is not covered: it is a
|
|
88
|
-
* new event, created after `open()` (see `ModalEscape.opening`).
|
|
89
|
-
*
|
|
90
|
-
* @param element - An element of the overlay, which says which window it is in
|
|
91
|
-
* @returns `after(event)`, and `stop()` for when the overlay closes
|
|
92
|
-
*/
|
|
93
14
|
export declare const eventsFrom: (element: HTMLElement) => EventsFrom;
|
|
94
|
-
/** A modal's place in the Escape stack: see onModalEscape. */
|
|
95
15
|
export interface ModalEscape {
|
|
96
|
-
/**
|
|
97
|
-
* True for the rest of the task the modal opened in, for the one event the
|
|
98
|
-
* marker cannot number: the `cancel` the browser sends the topmost modal
|
|
99
|
-
* `<dialog>` for the key press that opened it, when the page stopped that
|
|
100
|
-
* key press before it reached the window.
|
|
101
|
-
*/
|
|
102
16
|
opening: boolean;
|
|
103
|
-
/** Takes the modal off the stack. Harmless when called again. */
|
|
104
17
|
stop: () => void;
|
|
105
18
|
}
|
|
106
|
-
/**
|
|
107
|
-
* Escape for a modal, handled as a key press. One bubble listener on the
|
|
108
|
-
* window serves every open modal: after the listeners on the document, so
|
|
109
|
-
* whatever is open inside the modal keeps a key it has used, and wherever
|
|
110
|
-
* focus is, the body included. Only the topmost modal is told, and never for
|
|
111
|
-
* the key press that opened it (see eventsFrom).
|
|
112
|
-
*
|
|
113
|
-
* @param element - The modal's element, which says which window it is in
|
|
114
|
-
* @param escape - Called for an Escape that is the modal's: it closes, or refuses
|
|
115
|
-
* @returns The modal's entry: `opening`, and `stop()` for when it closes
|
|
116
|
-
*/
|
|
117
19
|
export declare const onModalEscape: (element: HTMLElement, escape: () => void) => ModalEscape;
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether the arrow keys, Home and End belong to an element: a text input, a
|
|
3
|
-
* textarea or editable content, where they move the caret.
|
|
4
|
-
*/
|
|
5
1
|
export declare const isTextEditable: (element: EventTarget | null | undefined) => boolean;
|
|
6
2
|
export interface RovingOptions {
|
|
7
|
-
/** The composite: it receives the key and focus listeners. */
|
|
8
3
|
container: HTMLElement;
|
|
9
|
-
/**
|
|
10
|
-
* The focus targets in order. A target is an element that takes focus itself:
|
|
11
|
-
* a control, or the host of a web component that delegates focus to one.
|
|
12
|
-
*/
|
|
13
4
|
targets: () => HTMLElement[];
|
|
14
|
-
/** Whether Up and Down move focus instead of Left and Right. */
|
|
15
5
|
vertical?: () => boolean;
|
|
16
6
|
}
|
|
17
7
|
export interface Roving {
|
|
18
|
-
/** Puts the one tab stop back on the current target, or the first enabled one. */
|
|
19
8
|
sync(): void;
|
|
20
|
-
/** Removes the listeners. */
|
|
21
9
|
destroy(): void;
|
|
22
10
|
}
|
|
23
|
-
/**
|
|
24
|
-
* A roving tab index over a composite's focus targets (the WAI-ARIA toolbar
|
|
25
|
-
* pattern): one tab stop, kept on the target focused last; the arrow keys along
|
|
26
|
-
* the layout, Left and Right following the reading direction; Home and End to
|
|
27
|
-
* the ends. Disabled targets are skipped and the ends do not wrap. Inside a
|
|
28
|
-
* text input the keys stay with the caret.
|
|
29
|
-
*/
|
|
30
11
|
export declare const createRoving: ({ container, targets, vertical }: RovingOptions) => Roving;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core
|
|
3
|
-
* @description Core utilities and building blocks for the component system
|
|
4
|
-
*
|
|
5
|
-
* This module provides the foundational elements used to build components
|
|
6
|
-
* in a functional, composable way.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
1
|
export * from "./compose/index.js";
|
|
11
2
|
export * from "./dom/index.js";
|
|
12
3
|
export { schemeToTokens, THEME_ROLES } from "./theme/index.js";
|
|
@@ -1,42 +1,19 @@
|
|
|
1
|
-
/** One destination, as both components take it. */
|
|
2
1
|
export interface DestinationConfig {
|
|
3
2
|
id: string;
|
|
4
3
|
label: string;
|
|
5
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
6
4
|
icon: string;
|
|
7
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. Shown while this destination is active. */
|
|
8
5
|
activeIcon?: string;
|
|
9
6
|
href?: string;
|
|
10
|
-
/** A count, a short text, or `true` for the dot */
|
|
11
7
|
badge?: string | number | boolean;
|
|
12
8
|
badgeLabel?: string;
|
|
13
9
|
active?: boolean;
|
|
14
10
|
disabled?: boolean;
|
|
15
11
|
}
|
|
16
|
-
/** The component's class for a part: `__item`, `__badge`, … */
|
|
17
12
|
export type PartClass = (part: string) => string;
|
|
18
|
-
/** A copy of the items with unique ids, labels and icons, and one active at most. */
|
|
19
13
|
export declare const copyDestinations: <T extends DestinationConfig>(items: T[], component: string) => T[];
|
|
20
|
-
/**
|
|
21
|
-
* Shows, updates or removes the item's badge, and names the destination with
|
|
22
|
-
* it. The name carries what the badge shows: a count past the badge's maximum
|
|
23
|
-
* reads "999+" in both, an empty or zero count clears the badge, and a dot
|
|
24
|
-
* with no label of its own announces "New notification" — "The accessibility
|
|
25
|
-
* label for a badge item will be read after its navigation destination. Any
|
|
26
|
-
* numerical badges will have their number read, while non-counting badges will
|
|
27
|
-
* simply announce New notification" (m3.material.io/components/badges/
|
|
28
|
-
* accessibility, Labeling elements).
|
|
29
|
-
*/
|
|
30
14
|
export declare const updateBadge: (item: DestinationConfig, element: HTMLElement, cls: PartClass) => void;
|
|
31
|
-
/** The destination's element: a link or a button, its indicator, icon, label and badge. */
|
|
32
15
|
export declare const createDestination: (item: DestinationConfig, cls: PartClass) => HTMLElement;
|
|
33
|
-
/** Marks the active destination, and shows its active icon. */
|
|
34
16
|
export declare const updateSelection: (items: DestinationConfig[], nodes: Map<string, HTMLElement>, cls: PartClass) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Moves focus between the enabled destinations: `next` and `previous` are the
|
|
37
|
-
* arrow keys of the component's axis, Home and End go to the ends. Returns
|
|
38
|
-
* whether it moved.
|
|
39
|
-
*/
|
|
40
17
|
export declare const moveDestinationFocus: (event: KeyboardEvent, nodes: Map<string, HTMLElement>, container: HTMLElement, keys: {
|
|
41
18
|
next: string;
|
|
42
19
|
previous: string;
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export type Cubic = readonly [
|
|
2
|
+
number,
|
|
3
|
+
number,
|
|
4
|
+
number,
|
|
5
|
+
number,
|
|
6
|
+
number,
|
|
7
|
+
number,
|
|
8
|
+
number,
|
|
9
|
+
number
|
|
10
|
+
];
|
|
11
|
+
export type Point = readonly [
|
|
12
|
+
number,
|
|
13
|
+
number
|
|
14
|
+
];
|
|
6
15
|
export declare const DISTANCE_EPSILON = 0.0001;
|
|
7
16
|
export declare const lerp: (start: number, stop: number, fraction: number) => number;
|
|
8
17
|
export declare const distance: (x: number, y: number) => number;
|
|
9
|
-
/** Unit vector in the direction of (x, y) */
|
|
10
18
|
export declare const direction: (x: number, y: number) => Point;
|
|
11
19
|
export declare const rotate90: ([x, y]: Point) => Point;
|
|
12
20
|
export declare const dot: (a: Point, b: Point) => number;
|
|
13
|
-
/** A straight segment expressed as a cubic */
|
|
14
21
|
export declare const straightLine: (x0: number, y0: number, x1: number, y1: number) => Cubic;
|
|
15
|
-
/**
|
|
16
|
-
* A circular arc from (x0, y0) to (x1, y1) around (centerX, centerY),
|
|
17
|
-
* approximated by one cubic; the arc must be under 180 degrees.
|
|
18
|
-
*/
|
|
19
22
|
export declare const circularArc: (centerX: number, centerY: number, x0: number, y0: number, x1: number, y1: number) => Cubic;
|
|
20
23
|
export declare const pointOnCurve: (c: Cubic, t: number) => Point;
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
export declare const splitCubic: (c: Cubic, t: number) => [
|
|
25
|
+
Cubic,
|
|
26
|
+
Cubic
|
|
27
|
+
];
|
|
23
28
|
export declare const reverseCubic: (c: Cubic) => Cubic;
|
|
24
29
|
export declare const zeroLength: (c: Cubic) => boolean;
|
|
25
30
|
export type PointTransformer = (x: number, y: number) => Point;
|
|
26
31
|
export declare const transformCubic: (c: Cubic, f: PointTransformer) => Cubic;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
export declare const cubicBounds: (c: Cubic) => [
|
|
33
|
+
number,
|
|
34
|
+
number,
|
|
35
|
+
number,
|
|
36
|
+
number
|
|
37
|
+
];
|
|
@@ -1,73 +1,38 @@
|
|
|
1
1
|
import { RoundedPolygon, polygonMaxRadius } from "./polygon.js";
|
|
2
|
-
/** Circle */
|
|
3
2
|
export declare const shapeCircle: () => RoundedPolygon;
|
|
4
|
-
/** A rounded square */
|
|
5
3
|
export declare const shapeSquare: () => RoundedPolygon;
|
|
6
|
-
/** A slanted square */
|
|
7
4
|
export declare const shapeSlanted: () => RoundedPolygon;
|
|
8
|
-
/** An arch */
|
|
9
5
|
export declare const shapeArch: () => RoundedPolygon;
|
|
10
|
-
/** A fan */
|
|
11
6
|
export declare const shapeFan: () => RoundedPolygon;
|
|
12
|
-
/** An arrow */
|
|
13
7
|
export declare const shapeArrow: () => RoundedPolygon;
|
|
14
|
-
/** A semicircle */
|
|
15
8
|
export declare const shapeSemiCircle: () => RoundedPolygon;
|
|
16
|
-
/** An oval */
|
|
17
9
|
export declare const shapeOval: () => RoundedPolygon;
|
|
18
|
-
/** A pill */
|
|
19
10
|
export declare const shapePill: () => RoundedPolygon;
|
|
20
|
-
/** A triangle */
|
|
21
11
|
export declare const shapeTriangle: () => RoundedPolygon;
|
|
22
|
-
/** A diamond */
|
|
23
12
|
export declare const shapeDiamond: () => RoundedPolygon;
|
|
24
|
-
/** A clam shell */
|
|
25
13
|
export declare const shapeClamShell: () => RoundedPolygon;
|
|
26
|
-
/** A pentagon */
|
|
27
14
|
export declare const shapePentagon: () => RoundedPolygon;
|
|
28
|
-
/** A gem */
|
|
29
15
|
export declare const shapeGem: () => RoundedPolygon;
|
|
30
|
-
/** A sunny shape: an 8-point star */
|
|
31
16
|
export declare const shapeSunny: () => RoundedPolygon;
|
|
32
|
-
/** A very sunny shape */
|
|
33
17
|
export declare const shapeVerySunny: () => RoundedPolygon;
|
|
34
|
-
/** A 4-sided cookie */
|
|
35
18
|
export declare const shapeCookie4Sided: () => RoundedPolygon;
|
|
36
|
-
/** A 6-sided cookie */
|
|
37
19
|
export declare const shapeCookie6Sided: () => RoundedPolygon;
|
|
38
|
-
/** A 7-sided cookie */
|
|
39
20
|
export declare const shapeCookie7Sided: () => RoundedPolygon;
|
|
40
|
-
/** A 9-sided cookie */
|
|
41
21
|
export declare const shapeCookie9Sided: () => RoundedPolygon;
|
|
42
|
-
/** A 12-sided cookie */
|
|
43
22
|
export declare const shapeCookie12Sided: () => RoundedPolygon;
|
|
44
|
-
/** A ghost-ish shape */
|
|
45
23
|
export declare const shapeGhostish: () => RoundedPolygon;
|
|
46
|
-
/** A 4-leaf clover */
|
|
47
24
|
export declare const shapeClover4Leaf: () => RoundedPolygon;
|
|
48
|
-
/** An 8-leaf clover */
|
|
49
25
|
export declare const shapeClover8Leaf: () => RoundedPolygon;
|
|
50
|
-
/** A burst */
|
|
51
26
|
export declare const shapeBurst: () => RoundedPolygon;
|
|
52
|
-
/** A soft burst */
|
|
53
27
|
export declare const shapeSoftBurst: () => RoundedPolygon;
|
|
54
|
-
/** A boom */
|
|
55
28
|
export declare const shapeBoom: () => RoundedPolygon;
|
|
56
|
-
/** A soft boom */
|
|
57
29
|
export declare const shapeSoftBoom: () => RoundedPolygon;
|
|
58
|
-
/** A flower */
|
|
59
30
|
export declare const shapeFlower: () => RoundedPolygon;
|
|
60
|
-
/** A puffy shape */
|
|
61
31
|
export declare const shapePuffy: () => RoundedPolygon;
|
|
62
|
-
/** A puffy diamond */
|
|
63
32
|
export declare const shapePuffyDiamond: () => RoundedPolygon;
|
|
64
|
-
/** A pixelated circle */
|
|
65
33
|
export declare const shapePixelCircle: () => RoundedPolygon;
|
|
66
|
-
/** A pixelated triangle */
|
|
67
34
|
export declare const shapePixelTriangle: () => RoundedPolygon;
|
|
68
|
-
/** A bun */
|
|
69
35
|
export declare const shapeBun: () => RoundedPolygon;
|
|
70
|
-
/** A heart */
|
|
71
36
|
export declare const shapeHeart: () => RoundedPolygon;
|
|
72
37
|
declare const byName: {
|
|
73
38
|
circle: () => RoundedPolygon;
|
|
@@ -106,45 +71,16 @@ declare const byName: {
|
|
|
106
71
|
bun: () => RoundedPolygon;
|
|
107
72
|
heart: () => RoundedPolygon;
|
|
108
73
|
};
|
|
109
|
-
/**
|
|
110
|
-
* Names of the Material shapes: Compose's, camelCased. material 3.0.0 removed 0.10's
|
|
111
|
-
* 'cookie4' and 'cookie9' aliases: use 'cookie4Sided' and 'cookie9Sided'.
|
|
112
|
-
*/
|
|
113
74
|
export type MaterialShapeName = keyof typeof byName;
|
|
114
|
-
/** A Material shape by name, normalised into the unit square. Carries every shape; import `shapeX` to carry one. */
|
|
115
75
|
export declare const materialShape: (name: MaterialShapeName) => RoundedPolygon;
|
|
116
|
-
/**
|
|
117
|
-
* A polygon's outline as an SVG path ("M … C … Z"), scaled by `size`: a
|
|
118
|
-
* normalised shape fills a `size` × `size` box. Coordinates keep three decimals.
|
|
119
|
-
*/
|
|
120
76
|
export declare const polygonPath: (polygon: RoundedPolygon, size?: number) => string;
|
|
121
|
-
/** A Material shape as an SVG path in a `size` × `size` box. Carries every shape, as materialShape does. */
|
|
122
77
|
export declare const materialShapePath: (name: MaterialShapeName, size?: number) => string;
|
|
123
|
-
/** A shape's outline as radii at evenly spaced angles around its centre */
|
|
124
78
|
export interface RadialProfile {
|
|
125
|
-
/** Radius at angle i * 2π / radii.length, clockwise from the positive x axis on a y-down canvas */
|
|
126
79
|
radii: Float32Array;
|
|
127
|
-
/** The area centroid the radii are measured from */
|
|
128
80
|
centerX: number;
|
|
129
81
|
centerY: number;
|
|
130
|
-
/** The largest radius, for fitting the shape into a circle */
|
|
131
82
|
maxRadius: number;
|
|
132
83
|
}
|
|
133
|
-
/**
|
|
134
|
-
* radialProfile without its star-shape check, for callers whose shapes are
|
|
135
|
-
* known to be star-shaped: the loading indicator's, which the tests check.
|
|
136
|
-
* The centroid, not the bounds centre, is the pivot: a pentagon's mass sits
|
|
137
|
-
* below the middle of its box, and turning it about the box would make it
|
|
138
|
-
* orbit.
|
|
139
|
-
* @internal
|
|
140
|
-
*/
|
|
141
84
|
export declare const sampleProfile: (polygon: RoundedPolygon, samples?: number, stepsPerCubic?: number) => RadialProfile;
|
|
142
|
-
/**
|
|
143
|
-
* Samples the outline at `samples` angles around the shape's area centroid.
|
|
144
|
-
* Throws for a shape that is not star-shaped around it. Of the Material
|
|
145
|
-
* shapes, 33 are; Puffy and PixelTriangle are not (their outlines double back
|
|
146
|
-
* as seen from the centroid, Puffy by about 0.1°): a ray from the centroid
|
|
147
|
-
* would cross the outline more than once, and the profile would be wrong.
|
|
148
|
-
*/
|
|
149
85
|
export declare const radialProfile: (polygon: RoundedPolygon, samples?: number, stepsPerCubic?: number) => RadialProfile;
|
|
150
86
|
export { polygonMaxRadius };
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
import { Cubic, PointTransformer } from "./cubic.js";
|
|
2
|
-
/** How a vertex is rounded: the radius, and how much the curve is smoothed into the sides (0–1) */
|
|
3
2
|
export interface CornerRounding {
|
|
4
3
|
radius: number;
|
|
5
4
|
smoothing?: number;
|
|
6
5
|
}
|
|
7
6
|
export declare const UNROUNDED: CornerRounding;
|
|
8
|
-
/** A closed shape made of contiguous cubics */
|
|
9
7
|
export interface RoundedPolygon {
|
|
10
8
|
cubics: Cubic[];
|
|
11
9
|
centerX: number;
|
|
12
10
|
centerY: number;
|
|
13
11
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Builds a rounded polygon from a flat list of vertex coordinates
|
|
16
|
-
* [x0, y0, x1, y1, ...], a rounding for every vertex or one per vertex, and
|
|
17
|
-
* an optional centre (the vertices' centroid by default).
|
|
18
|
-
*/
|
|
19
12
|
export declare const roundedPolygon: (vertices: number[], rounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
|
|
20
|
-
/** A regular polygon, first vertex at angle 0 */
|
|
21
13
|
export declare const regularPolygon: (numVertices: number, radius?: number, centerX?: number, centerY?: number, rounding?: CornerRounding, perVertexRounding?: CornerRounding[]) => RoundedPolygon;
|
|
22
|
-
/** A circle approximated by a fully rounded polygon */
|
|
23
14
|
export declare const circle: (numVertices?: number, radius?: number, centerX?: number, centerY?: number) => RoundedPolygon;
|
|
24
|
-
/** A star with `numVerticesPerRadius` outer and inner vertices, outer first at angle 0 */
|
|
25
15
|
export declare const star: (numVerticesPerRadius: number, radius?: number, innerRadius?: number, rounding?: CornerRounding, innerRounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
|
|
26
|
-
/** A rectangle centred on (centerX, centerY), its first vertex at the bottom right (graphics-shapes rectangle) */
|
|
27
16
|
export declare const rectangle: (width?: number, height?: number, rounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
|
|
28
17
|
export declare const transformPolygon: (polygon: RoundedPolygon, f: PointTransformer) => RoundedPolygon;
|
|
29
|
-
/** Rotation about the origin, in degrees, positive clockwise on a y-down canvas */
|
|
30
18
|
export declare const rotatePolygon: (polygon: RoundedPolygon, degrees: number) => RoundedPolygon;
|
|
31
19
|
export declare const scalePolygon: (polygon: RoundedPolygon, sx: number, sy?: number) => RoundedPolygon;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
export declare const polygonBounds: (polygon: RoundedPolygon) => [
|
|
21
|
+
number,
|
|
22
|
+
number,
|
|
23
|
+
number,
|
|
24
|
+
number
|
|
25
|
+
];
|
|
35
26
|
export declare const polygonMaxRadius: (polygon: RoundedPolygon) => number;
|
|
36
|
-
/** Fits the shape into the unit square, centred, keeping its aspect ratio */
|
|
37
27
|
export declare const normalizePolygon: (polygon: RoundedPolygon) => RoundedPolygon;
|
|
@@ -1,46 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/state
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* An event handler. A handler that declares its payload type is accepted as
|
|
6
|
-
* one, and a handler that doesn't gets `unknown` to narrow. It was
|
|
7
|
-
* `(...args: never[]) => void`, which inferred every such payload as `never`
|
|
8
|
-
* The method-signature form keeps parameter bivariance, which is
|
|
9
|
-
* what lets a typed handler through.
|
|
10
|
-
*/
|
|
11
1
|
export type EventCallback = {
|
|
12
2
|
handler(...args: unknown[]): void;
|
|
13
3
|
}["handler"];
|
|
14
|
-
/**
|
|
15
|
-
* Interface for the event emitter
|
|
16
|
-
*/
|
|
17
4
|
export interface Emitter {
|
|
18
|
-
/**
|
|
19
|
-
* Subscribe to an event
|
|
20
|
-
* @param event - Event name
|
|
21
|
-
* @param callback - Event handler
|
|
22
|
-
* @returns Unsubscribe function
|
|
23
|
-
*/
|
|
24
5
|
on(event: string, callback: EventCallback): () => void;
|
|
25
|
-
/**
|
|
26
|
-
* Unsubscribe from an event
|
|
27
|
-
* @param event - Event name
|
|
28
|
-
* @param callback - Event handler to remove
|
|
29
|
-
*/
|
|
30
6
|
off(event: string, callback: EventCallback): void;
|
|
31
|
-
/**
|
|
32
|
-
* Emit an event
|
|
33
|
-
* @param event - Event name
|
|
34
|
-
* @param args - Event arguments
|
|
35
|
-
*/
|
|
36
7
|
emit(event: string, ...args: unknown[]): void;
|
|
37
|
-
/**
|
|
38
|
-
* Clear all event listeners
|
|
39
|
-
*/
|
|
40
8
|
clear(): void;
|
|
41
9
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Creates an event emitter with subscription management
|
|
44
|
-
* @returns Event emitter interface
|
|
45
|
-
*/
|
|
46
10
|
export declare const createEmitter: () => Emitter;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
import type { EventCallback } from "./emitter.js";
|
|
2
|
-
/**
|
|
3
|
-
* Event manager interface for handling component events
|
|
4
|
-
*/
|
|
5
2
|
export interface EventManagerState {
|
|
6
|
-
/**
|
|
7
|
-
* Adds an event listener
|
|
8
|
-
* @param event - Event name
|
|
9
|
-
* @param handler - Event handler
|
|
10
|
-
* @returns EventManagerState instance for chaining
|
|
11
|
-
*/
|
|
12
3
|
on: (event: string, handler: EventCallback) => EventManagerState;
|
|
13
|
-
/**
|
|
14
|
-
* Removes an event listener
|
|
15
|
-
* @param event - Event name
|
|
16
|
-
* @param handler - Event handler
|
|
17
|
-
* @returns EventManagerState instance for chaining
|
|
18
|
-
*/
|
|
19
4
|
off: (event: string, handler: EventCallback) => EventManagerState;
|
|
20
|
-
/**
|
|
21
|
-
* Removes all event listeners and cleans up
|
|
22
|
-
*/
|
|
23
5
|
destroy: () => void;
|
|
24
|
-
/**
|
|
25
|
-
* Gets all active handlers
|
|
26
|
-
* @returns Map of event names to handlers
|
|
27
|
-
*/
|
|
28
6
|
getHandlers: () => Map<EventCallback, string>;
|
|
29
7
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Creates an event manager for a component
|
|
32
|
-
* Simple event handling mechanism for components
|
|
33
|
-
*
|
|
34
|
-
* @param element - Component's DOM element
|
|
35
|
-
* @returns Event manager interface
|
|
36
|
-
*/
|
|
37
8
|
export declare const createEventManager: (element: HTMLElement) => EventManagerState;
|
|
@@ -1,90 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* State store options
|
|
3
|
-
*/
|
|
4
1
|
export interface StoreOptions<T> {
|
|
5
|
-
/**
|
|
6
|
-
* Middleware functions that process state changes
|
|
7
|
-
*/
|
|
8
2
|
middleware?: Array<(newState: T, oldState: T) => T>;
|
|
9
3
|
}
|
|
10
|
-
/**
|
|
11
|
-
* State selector function type
|
|
12
|
-
*/
|
|
13
4
|
export type Selector<T, R> = (state: T) => R;
|
|
14
|
-
/**
|
|
15
|
-
* State computation function type for derived state
|
|
16
|
-
*/
|
|
17
5
|
export type Computation<T, R> = (state: T) => R;
|
|
18
|
-
/**
|
|
19
|
-
* State updater function type
|
|
20
|
-
*/
|
|
21
6
|
export type Updater<T> = (state: T) => T;
|
|
22
|
-
/**
|
|
23
|
-
* What derive() returns: call it to remove the derived value, or read the
|
|
24
|
-
* value, typed, through get(). getState() carries derived values at runtime
|
|
25
|
-
* but its type is the base state, so this is the typed way to read one.
|
|
26
|
-
*/
|
|
27
7
|
export type DerivedState<R> = (() => void) & {
|
|
28
8
|
get: () => R;
|
|
29
9
|
};
|
|
30
|
-
/**
|
|
31
|
-
* State store interface
|
|
32
|
-
*/
|
|
33
10
|
export interface Store<T> {
|
|
34
|
-
/**
|
|
35
|
-
* Gets current state including derived values
|
|
36
|
-
* @returns Current state
|
|
37
|
-
*/
|
|
38
11
|
getState: <D extends object = Record<never, never>>() => T & D;
|
|
39
|
-
/**
|
|
40
|
-
* Updates state
|
|
41
|
-
* @param update - State update object or updater function
|
|
42
|
-
*/
|
|
43
12
|
setState: (update: Partial<T> | Updater<T>) => void;
|
|
44
|
-
/**
|
|
45
|
-
* Subscribes to state changes
|
|
46
|
-
* @param listener - Change listener
|
|
47
|
-
* @returns Unsubscribe function
|
|
48
|
-
*/
|
|
49
13
|
subscribe: (listener: (state: T, oldState: T) => void) => () => void;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a derived state value
|
|
52
|
-
* @param key - Derived state key
|
|
53
|
-
* @param computation - Function to compute derived value
|
|
54
|
-
* @returns Function to remove derived state
|
|
55
|
-
*/
|
|
56
14
|
derive: <K extends string, R>(key: K, computation: Computation<T, R>) => DerivedState<R>;
|
|
57
|
-
/**
|
|
58
|
-
* Selects a specific slice of state
|
|
59
|
-
* @param selector - State selector function
|
|
60
|
-
* @returns Selected state
|
|
61
|
-
*/
|
|
62
15
|
select: <R>(selector: Selector<T, R>) => R;
|
|
63
|
-
/**
|
|
64
|
-
* Resets state to initial values
|
|
65
|
-
*/
|
|
66
16
|
reset: () => void;
|
|
67
17
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Creates a state store with support for derived state and middleware
|
|
70
|
-
*
|
|
71
|
-
* @param initialState - Initial state object
|
|
72
|
-
* @param options - Store options
|
|
73
|
-
* @returns State store interface
|
|
74
|
-
*/
|
|
75
18
|
export declare const createStore: <T extends object>(initialState?: T, options?: StoreOptions<T>) => Store<T>;
|
|
76
|
-
/**
|
|
77
|
-
* Example middleware that logs state changes
|
|
78
|
-
*
|
|
79
|
-
* @param newState - New state after change
|
|
80
|
-
* @param oldState - Previous state before change
|
|
81
|
-
* @returns Processed state (unchanged in this middleware)
|
|
82
|
-
*/
|
|
83
19
|
export declare const loggingMiddleware: <T extends object>(newState: T, oldState: T) => T;
|
|
84
|
-
/**
|
|
85
|
-
* Creates a derived state selector for filtering objects
|
|
86
|
-
*
|
|
87
|
-
* @param predicate - Filter predicate function
|
|
88
|
-
* @returns Computation function for derived state
|
|
89
|
-
*/
|
|
90
20
|
export declare const deriveFiltered: <T>(predicate: (value: T, key: string) => boolean) => (state: Record<string, T>) => Record<string, T>;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shape scale's corner tokens, for a radius a component writes from
|
|
3
|
-
* script: as the stylesheets read it, the token with the compiled
|
|
4
|
-
* value as its fallback, so a theme's corners reach inline styles too.
|
|
5
|
-
*/
|
|
6
|
-
/** A step of M3's shape scale, as `$shape` in src/styles/abstract/_variables.scss names it. */
|
|
7
1
|
export type ShapeStep = "none" | "extra-small" | "small" | "medium" | "large" | "large-increased" | "extra-large" | "extra-large-increased" | "extra-extra-large";
|
|
8
|
-
/** `var(--mtrl-sys-shape-corner-small, 8px)`: a step's token, its px the fallback. */
|
|
9
2
|
export declare const cornerToken: (step: ShapeStep, px: number, prefix?: string) => string;
|