material 3.2.6 → 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/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/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/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 +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/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 +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 +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 +1 -1
- package/dist/elements/preupgrade.d.ts +0 -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 +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 +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 +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 +1 -1
- 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/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,33 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-split-button>` with `<m-menu-item>` children.
|
|
3
|
-
*
|
|
4
|
-
* The element's text (or `label`) is the leading button's label, and each
|
|
5
|
-
* `<m-menu-item>` child declares one item of the menu the trailing button
|
|
6
|
-
* opens, as in `<m-menu>`. The items are the factory's own menu items, so the
|
|
7
|
-
* menu item declaration is shared rather than a split-button one. The menu
|
|
8
|
-
* opens in the top layer (the factory's `layer: "top"`), inside the element's
|
|
9
|
-
* shadow root.
|
|
10
|
-
*
|
|
11
|
-
* `click` is the native one, for the leading action only: a click on the
|
|
12
|
-
* trailing button or in the menu stops at the shadow root. `open` and `close`
|
|
13
|
-
* are dispatched as the menu opens and closes, and `select` with the item's
|
|
14
|
-
* value when one is chosen.
|
|
15
|
-
*
|
|
16
|
-
* The factory creates its menu only when it has items: going from no items
|
|
17
|
-
* to some, or back, recreates it. `variant`, `size`, `trailing-label` and
|
|
18
|
-
* `group-label` have no setter and recreate it too.
|
|
19
|
-
*
|
|
20
|
-
* Parts: `split-button`, `button`, `leading`, `trailing`, `text`, `icon`, `chevron`, `ripple`.
|
|
21
|
-
*
|
|
22
|
-
* @module elements
|
|
23
|
-
*/
|
|
24
1
|
import type { SplitButtonComponent, SplitButtonEvent, SplitButtonEventType } from "../components/split-button/types.js";
|
|
25
2
|
import { type Config, type DefineOptions, type ElementInstance } from "./define.js";
|
|
26
|
-
/** The factory's events, and the element's own names for two of them. */
|
|
27
3
|
export type SplitButtonElementEventType = SplitButtonEventType | "open" | "close";
|
|
28
|
-
/** The split button, with the element's events. */
|
|
29
4
|
export interface SplitButtonElementComponent extends Omit<SplitButtonComponent, "on" | "off"> {
|
|
30
|
-
/** Subscribes by the element's event names (`open`, `close`) as well as the factory's. */
|
|
31
5
|
on: (event: SplitButtonElementEventType, handler: (event: SplitButtonEvent) => void) => SplitButtonElementComponent;
|
|
32
6
|
off: (event: SplitButtonElementEventType, handler: (event: SplitButtonEvent) => void) => SplitButtonElementComponent;
|
|
33
7
|
}
|
|
@@ -42,7 +16,6 @@ declare const splitButtonSpec: {
|
|
|
42
16
|
type: "string";
|
|
43
17
|
update: (c: SplitButtonElementComponent, _v: import("./define.js").AttributeValue, host: HTMLElement) => undefined;
|
|
44
18
|
};
|
|
45
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
46
19
|
icon: {
|
|
47
20
|
type: "string";
|
|
48
21
|
config: string;
|
|
@@ -96,12 +69,9 @@ declare const splitButtonSpec: {
|
|
|
96
69
|
};
|
|
97
70
|
export declare const splitButtonElement: import("./define.js").ElementDefinition<SplitButtonElementComponent>;
|
|
98
71
|
export type SplitButtonSpec = typeof splitButtonSpec;
|
|
99
|
-
/** `<m-split-button>` as a ref or a query returns it. */
|
|
100
72
|
export type SplitButtonElement = ElementInstance<SplitButtonSpec, SplitButtonElementComponent>;
|
|
101
|
-
/** Registers `<m-split-button>` and `<m-menu-item>` (or with another prefix). */
|
|
102
73
|
export declare const defineSplitButton: (options?: DefineOptions) => string;
|
|
103
74
|
declare global {
|
|
104
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
105
75
|
interface HTMLElementTagNameMap {
|
|
106
76
|
"m-split-button": SplitButtonElement;
|
|
107
77
|
}
|
|
@@ -1,73 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stylesheets for the shadow roots of the elements.
|
|
3
|
-
*
|
|
4
|
-
* Each element adopts the CSS of its component and the component's style
|
|
5
|
-
* dependencies, the same entries the selective stylesheets are built from
|
|
6
|
-
* (`scripts/style-manifest.ts`). One sheet per entry per page, shared by every
|
|
7
|
-
* instance.
|
|
8
|
-
*
|
|
9
|
-
* @module elements
|
|
10
|
-
*/
|
|
11
|
-
/** The tag prefix: `<m-switch>`. The pre-upgrade CSS is built for it. */
|
|
12
1
|
export declare const DEFAULT_PREFIX = "m";
|
|
13
|
-
/** Internal registry access; preserves application registrations and overrides. */
|
|
14
2
|
export declare const styleText: (name: string) => string | undefined;
|
|
15
|
-
/** Identifies only fallback nodes inserted by applyStyles, never authored styles. */
|
|
16
3
|
export declare const isFallbackStyle: (node: Node) => boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Registers the CSS text of style entries, keyed as in `componentStyles`.
|
|
19
|
-
* Must run before the elements that use them are created.
|
|
20
|
-
*
|
|
21
|
-
* @experimental The element authoring API (`defineElement`, `ElementSpec`,
|
|
22
|
-
* `registerStyles`, `hasStyles`, `SHADOW_BASE_STYLES`) is outside semantic
|
|
23
|
-
* versioning in 3.x: it may change in a minor release. The elements the
|
|
24
|
-
* library defines, and their attributes, properties and events, are not.
|
|
25
|
-
*/
|
|
26
4
|
export declare const registerStyles: (css: Record<string, string>) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Whether CSS is registered under a name.
|
|
29
|
-
*
|
|
30
|
-
* @experimental The element authoring API (`defineElement`, `ElementSpec`,
|
|
31
|
-
* `registerStyles`, `hasStyles`, `SHADOW_BASE_STYLES`) is outside semantic
|
|
32
|
-
* versioning in 3.x: it may change in a minor release. The elements the
|
|
33
|
-
* library defines, and their attributes, properties and events, are not.
|
|
34
|
-
*/
|
|
35
5
|
export declare const hasStyles: (name: string) => boolean;
|
|
36
|
-
/**
|
|
37
|
-
* On a host the server rendered with a declarative shadow root.
|
|
38
|
-
* The `data-mtrl-*` namespace is the library's own: this attribute, and the
|
|
39
|
-
* elements' `marker` reflections (define.ts), which no component or page
|
|
40
|
-
* writes. Component `data-*` names (`data-id`, `data-density`, `data-theme`)
|
|
41
|
-
* are that component's own state, and a page's `data-ssr` must not be this
|
|
42
|
-
* contract. Inert after upgrade, because the rollback rule is `:not(:defined)`.
|
|
43
|
-
*/
|
|
44
6
|
export declare const RENDERED_HOST_ATTRIBUTE = "data-mtrl-ssr";
|
|
45
|
-
/**
|
|
46
|
-
* Last rule of every pre-upgrade sheet, inside `mtrl.preupgrade`.
|
|
47
|
-
* `:not(#\0)` is an id selector (specificity 1,0,0) that matches every element,
|
|
48
|
-
* so each selector outranks every pre-upgrade selector of the same subject
|
|
49
|
-
* (the host, its `::before` and `::after`, and a direct child), none of which
|
|
50
|
-
* has an id. The child subject is `:defined` (specificity 1,3,0). Every
|
|
51
|
-
* built-in element is defined, so a slotted `div` or `span` is rolled back.
|
|
52
|
-
* An undefined custom element is not: a carousel, a FAB menu, or a menu that
|
|
53
|
-
* opted out keeps its own pre-upgrade rule. A rendered mtrl child carries
|
|
54
|
-
* this attribute and is covered by the host selector. The deepest pre-upgrade
|
|
55
|
-
* subject is a direct child, including a following sibling of one (`> * + *`);
|
|
56
|
-
* none styles a grandchild or a child's pseudo-element. `all` does not reset
|
|
57
|
-
* custom properties; the element rules set none. Not tag-specific, so
|
|
58
|
-
* retagging for another prefix leaves it as it is.
|
|
59
|
-
*/
|
|
60
7
|
export declare const preupgradeRollback: () => string;
|
|
61
|
-
/**
|
|
62
|
-
* Pre-upgrade CSS, built for the default prefix, for another one: every tag
|
|
63
|
-
* selector `m-*` becomes `<prefix>-*`. The rules name tags only in selectors
|
|
64
|
-
* (`m-tabs:not(:defined)>*`), and no value starts a word with `m-`.
|
|
65
|
-
*/
|
|
66
8
|
export declare const retagPreupgrade: (css: string, prefix: string) => string;
|
|
67
|
-
/** The rules as one layered stylesheet, for each prefix. The rollback is once, after them. */
|
|
68
9
|
export declare const preupgradeSheet: (css: string, prefixes?: Iterable<string>) => string;
|
|
69
|
-
/**
|
|
70
|
-
* Applies the registered entries to a shadow root, in the given order.
|
|
71
|
-
* Falls back to `<style>` elements where constructable stylesheets are missing.
|
|
72
|
-
*/
|
|
73
10
|
export declare const applyStyles: (root: ShadowRoot, names: readonly string[]) => void;
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-switch>`: the switch as a form-associated custom element.
|
|
3
|
-
*
|
|
4
|
-
* The `checked` attribute is the default state and the `checked` property the
|
|
5
|
-
* live one, as on a native checkbox: the attribute moves the state until the
|
|
6
|
-
* user or script changes it. Children are the label.
|
|
7
|
-
*
|
|
8
|
-
* Parts: `switch`, `container`, `content`, `label`, `helper`, `input`, `track`, `thumb`,
|
|
9
|
-
* `thumb-icon`.
|
|
10
|
-
*
|
|
11
|
-
* @module elements
|
|
12
|
-
*/
|
|
13
1
|
import type { SwitchComponent } from "../components/switch/types.js";
|
|
14
2
|
import { type DefineOptions, type ElementInstance } from "./define.js";
|
|
15
3
|
declare const switchSpec: {
|
|
@@ -37,7 +25,6 @@ declare const switchSpec: {
|
|
|
37
25
|
config: string;
|
|
38
26
|
update: (c: SwitchComponent, v: import("./define.js").AttributeValue) => undefined;
|
|
39
27
|
};
|
|
40
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
41
28
|
icon: {
|
|
42
29
|
type: "string";
|
|
43
30
|
config: string;
|
|
@@ -60,7 +47,11 @@ declare const switchSpec: {
|
|
|
60
47
|
config: string;
|
|
61
48
|
};
|
|
62
49
|
};
|
|
63
|
-
methods: readonly [
|
|
50
|
+
methods: readonly [
|
|
51
|
+
"toggle",
|
|
52
|
+
"check",
|
|
53
|
+
"uncheck"
|
|
54
|
+
];
|
|
64
55
|
model: "checked";
|
|
65
56
|
events: {
|
|
66
57
|
change: {
|
|
@@ -88,12 +79,9 @@ declare const switchSpec: {
|
|
|
88
79
|
};
|
|
89
80
|
export declare const switchElement: import("./define.js").ElementDefinition<SwitchComponent>;
|
|
90
81
|
export type SwitchSpec = typeof switchSpec;
|
|
91
|
-
/** `<m-switch>` as a ref or a query returns it. */
|
|
92
82
|
export type SwitchElement = ElementInstance<SwitchSpec, SwitchComponent>;
|
|
93
|
-
/** Registers `<m-switch>` (or `<prefix-switch>`). */
|
|
94
83
|
export declare const defineSwitch: (options?: DefineOptions) => string;
|
|
95
84
|
declare global {
|
|
96
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
97
85
|
interface HTMLElementTagNameMap {
|
|
98
86
|
"m-switch": SwitchElement;
|
|
99
87
|
}
|
package/dist/elements/tabs.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-tabs>` with `<m-tab>` children.
|
|
3
|
-
*
|
|
4
|
-
* Each `<m-tab>` declares one tab (`value`, `icon`, `badge`, `disabled`, and its
|
|
5
|
-
* text as content). The tabs element reads them into the factory's config and
|
|
6
|
-
* rebuilds when they change; the children stay where the framework put them.
|
|
7
|
-
* `value` on `<m-tabs>` is the default selection, which moves the live one
|
|
8
|
-
* until the user or script changes it; the `value` property is the live
|
|
9
|
-
* selection.
|
|
10
|
-
*
|
|
11
|
-
* Parts: `tabs`, `scroll`, `tab`, `button`, `icon`, `text`, `ripple`, `indicator`, `divider`.
|
|
12
|
-
*
|
|
13
|
-
* @module elements
|
|
14
|
-
*/
|
|
15
1
|
import type { TabsComponent } from "../components/tabs/types.js";
|
|
16
2
|
import { type Config, type DefineOptions, type ElementAttributes, type ElementInstance } from "./define.js";
|
|
17
3
|
declare const tabsSpec: {
|
|
@@ -47,12 +33,7 @@ declare const tabsSpec: {
|
|
|
47
33
|
};
|
|
48
34
|
export declare const tabsElement: import("./define.js").ElementDefinition<TabsComponent>;
|
|
49
35
|
export type TabsSpec = typeof tabsSpec;
|
|
50
|
-
/** `<m-tabs>` as a ref or a query returns it. */
|
|
51
36
|
export type TabsElement = ElementInstance<TabsSpec, TabsComponent>;
|
|
52
|
-
/**
|
|
53
|
-
* `<m-tab>` declares one tab and renders nothing. Its text content is the
|
|
54
|
-
* label unless `label` is set.
|
|
55
|
-
*/
|
|
56
37
|
export declare const tabDeclaration: {
|
|
57
38
|
readonly name: "tab";
|
|
58
39
|
readonly attributes: {
|
|
@@ -62,7 +43,6 @@ export declare const tabDeclaration: {
|
|
|
62
43
|
readonly label: {
|
|
63
44
|
readonly type: "string";
|
|
64
45
|
};
|
|
65
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
66
46
|
readonly icon: {
|
|
67
47
|
readonly type: "string";
|
|
68
48
|
};
|
|
@@ -75,10 +55,8 @@ export declare const tabDeclaration: {
|
|
|
75
55
|
};
|
|
76
56
|
};
|
|
77
57
|
export type TabAttributes = ElementAttributes<typeof tabDeclaration>;
|
|
78
|
-
/** Registers `<m-tabs>` and `<m-tab>` (or with another prefix). */
|
|
79
58
|
export declare const defineTabs: (options?: DefineOptions) => string;
|
|
80
59
|
declare global {
|
|
81
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
82
60
|
interface HTMLElementTagNameMap {
|
|
83
61
|
"m-tabs": TabsElement;
|
|
84
62
|
"m-tab": HTMLElement & TabAttributes;
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-text-field>`: the text field as a form-associated custom element.
|
|
3
|
-
*
|
|
4
|
-
* The `value` attribute is the default value and the `value` property the
|
|
5
|
-
* live one, as on a native input: the attribute moves the value until the
|
|
6
|
-
* user or script changes it. The `label` attribute is the floating
|
|
7
|
-
* label, which the factory renders; there is no slot. The `trailing-icon`
|
|
8
|
-
* attribute is the trailing icon's markup and `trailing-icon-label` its
|
|
9
|
-
* button's accessible name: without the label the icon is decorative.
|
|
10
|
-
*
|
|
11
|
-
* Changing `label` or `type` recreates the field and keeps the value.
|
|
12
|
-
* Changing `trailing-icon-label` updates the existing icon in place, so the
|
|
13
|
-
* button, the input and focus stay. A field created without a label has no
|
|
14
|
-
* label element to update, and `type="multiline"` swaps the input for a
|
|
15
|
-
* textarea.
|
|
16
|
-
*
|
|
17
|
-
* A click, Enter or Space on the trailing icon button dispatches `trailing`
|
|
18
|
-
* from the host, with the factory's `{ value, event }`, bubbling and composed.
|
|
19
|
-
*
|
|
20
|
-
* Parts: `text-field`, `field`, `label`, `input`, `leading-icon`, `trailing-icon`, `prefix`,
|
|
21
|
-
* `suffix`, `supporting`, `helper`, `counter`, `outline`, `outline-leading`, `outline-notch`,
|
|
22
|
-
* `outline-trailing`.
|
|
23
|
-
*
|
|
24
|
-
* @module elements
|
|
25
|
-
*/
|
|
26
1
|
import type { TextFieldComponent } from "../components/text-field/types.js";
|
|
27
2
|
import { type AttributeValue, type DefineOptions, type ElementInstance } from "./define.js";
|
|
28
|
-
/** The text field, with the methods the element adds to it. */
|
|
29
3
|
export type TextFieldElementComponent = TextFieldComponent & {
|
|
30
|
-
/** Selects the field's text. */
|
|
31
4
|
select: () => void;
|
|
32
5
|
};
|
|
33
6
|
declare const textFieldSpec: {
|
|
@@ -79,23 +52,16 @@ declare const textFieldSpec: {
|
|
|
79
52
|
config: string;
|
|
80
53
|
update: (c: TextFieldElementComponent, v: AttributeValue) => undefined;
|
|
81
54
|
};
|
|
82
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
83
55
|
"leading-icon": {
|
|
84
56
|
type: "string";
|
|
85
57
|
config: string;
|
|
86
58
|
update: (c: TextFieldElementComponent, v: AttributeValue) => undefined;
|
|
87
59
|
};
|
|
88
|
-
/** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
89
60
|
"trailing-icon": {
|
|
90
61
|
type: "string";
|
|
91
62
|
config: string;
|
|
92
63
|
update: (c: TextFieldElementComponent, v: AttributeValue, host: HTMLElement) => undefined;
|
|
93
64
|
};
|
|
94
|
-
/**
|
|
95
|
-
* The trailing icon button's accessible name. With it the icon is a button
|
|
96
|
-
* that emits `trailing`; without it, or with an empty value, the icon is
|
|
97
|
-
* decorative. A change updates the existing icon through the factory setter.
|
|
98
|
-
*/
|
|
99
65
|
"trailing-icon-label": {
|
|
100
66
|
type: "string";
|
|
101
67
|
config: string;
|
|
@@ -148,7 +114,10 @@ declare const textFieldSpec: {
|
|
|
148
114
|
set: (c: TextFieldElementComponent, v: unknown) => undefined;
|
|
149
115
|
};
|
|
150
116
|
};
|
|
151
|
-
methods: readonly [
|
|
117
|
+
methods: readonly [
|
|
118
|
+
"select",
|
|
119
|
+
"setError"
|
|
120
|
+
];
|
|
152
121
|
model: "value";
|
|
153
122
|
events: {
|
|
154
123
|
input: {
|
|
@@ -182,12 +151,9 @@ declare const textFieldSpec: {
|
|
|
182
151
|
};
|
|
183
152
|
export declare const textFieldElement: import("./define.js").ElementDefinition<TextFieldElementComponent>;
|
|
184
153
|
export type TextFieldSpec = typeof textFieldSpec;
|
|
185
|
-
/** `<m-text-field>` as a ref or a query returns it. */
|
|
186
154
|
export type TextFieldElement = ElementInstance<TextFieldSpec, TextFieldElementComponent>;
|
|
187
|
-
/** Registers `<m-text-field>` (or `<prefix-text-field>`). */
|
|
188
155
|
export declare const defineTextField: (options?: DefineOptions) => string;
|
|
189
156
|
declare global {
|
|
190
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
191
157
|
interface HTMLElementTagNameMap {
|
|
192
158
|
"m-text-field": TextFieldElement;
|
|
193
159
|
}
|
|
@@ -1,54 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-timepicker>`: the time picker as a form-associated custom element.
|
|
3
|
-
*
|
|
4
|
-
* The factory renders no field of its own, only its modal dialog, so the
|
|
5
|
-
* element shows nothing until it opens: an app opens it from its own control
|
|
6
|
-
* with `show()` or the `open` attribute (a `<label for>` pointing at it opens
|
|
7
|
-
* it too), and shows the value where it likes. The dialog is a native
|
|
8
|
-
* `<dialog>` in the element's shadow root shown with `showModal()`: the page
|
|
9
|
-
* outside is inert, and focus goes back to whatever opened it.
|
|
10
|
-
*
|
|
11
|
-
* The value is a 24-hour time, `HH:MM`, or `HH:MM:SS` when `step` is under a
|
|
12
|
-
* minute, as on `<input type=time>`; empty is `""`. The dial starts on the
|
|
13
|
-
* value, or on the current time when there is none.
|
|
14
|
-
*
|
|
15
|
-
* The dial edits a draft: `input` is dispatched with `{ value, draftValue }`
|
|
16
|
-
* as it moves, and OK commits it, dispatching `change` with `{ value }` when
|
|
17
|
-
* the time differs and `confirm` with `{ value }` on every OK. Cancel, Escape
|
|
18
|
-
* and the backdrop discard the draft. `open`
|
|
19
|
-
* reflects the dialog's state, as on `<dialog open>`; `open` and `close` are
|
|
20
|
-
* dispatched as it opens and closes (not when the attribute is what changed).
|
|
21
|
-
*
|
|
22
|
-
* `step` is in seconds, as on `<input type=time>`: under a minute it shows
|
|
23
|
-
* seconds and is their step (`secondStep`); from a minute up it is the
|
|
24
|
-
* minute step (`minuteStep`), rounded to whole minutes, which is the finest
|
|
25
|
-
* the dial has. `show-seconds` shows seconds whatever the step, so a 5- or
|
|
26
|
-
* 15-minute step can go with them; the value is then `HH:MM:SS`. `min` and
|
|
27
|
-
* `max` are the factory's `minTime` and `maxTime`. Those four and `name` have
|
|
28
|
-
* no setter: changing one recreates the picker, keeping the value. `disabled` is the factory's: it does not open. The
|
|
29
|
-
* element reports `required` itself, as `valueMissing`.
|
|
30
|
-
*
|
|
31
|
-
* Parts: `time-picker`, `dialog`, `title`, `selectors`, `hours`, `minutes`, `period`, `dial`,
|
|
32
|
-
* `dial-handle`, `actions`, `cancel`, `confirm`, among others.
|
|
33
|
-
*
|
|
34
|
-
* @module elements
|
|
35
|
-
*/
|
|
36
1
|
import { type TimePickerComponent, type TimePickerEvents } from "../components/timepicker/types.js";
|
|
37
2
|
import { type DefineOptions, type ElementHost, type ElementInstance } from "./define.js";
|
|
38
|
-
/** The time picker as the element sees it: its value can be empty. */
|
|
39
3
|
export interface TimepickerElementComponent {
|
|
40
4
|
element: HTMLElement;
|
|
41
5
|
picker: TimePickerComponent;
|
|
42
|
-
/** The committed time, or "" before one is set or confirmed. */
|
|
43
6
|
getValue: () => string;
|
|
44
7
|
setValue: (value: string) => void;
|
|
45
|
-
/** Opens the dialog, unless the picker is disabled. */
|
|
46
8
|
show: () => void;
|
|
47
|
-
/** Closes the dialog without committing. */
|
|
48
9
|
close: () => void;
|
|
49
10
|
isOpen: () => boolean;
|
|
50
11
|
required: boolean;
|
|
51
|
-
/** Subscribes to the time picker's events; `change` and `input` carry the element's possibly empty value. */
|
|
52
12
|
on: <K extends keyof TimePickerEvents>(event: K, handler: TimePickerEvents[K]) => void;
|
|
53
13
|
off: <K extends keyof TimePickerEvents>(event: K, handler: TimePickerEvents[K]) => void;
|
|
54
14
|
destroy: () => void;
|
|
@@ -122,7 +82,10 @@ declare const timepickerSpec: {
|
|
|
122
82
|
};
|
|
123
83
|
};
|
|
124
84
|
model: "value";
|
|
125
|
-
methods: readonly [
|
|
85
|
+
methods: readonly [
|
|
86
|
+
"show",
|
|
87
|
+
"close"
|
|
88
|
+
];
|
|
126
89
|
events: {
|
|
127
90
|
change: {
|
|
128
91
|
detail: (payload: unknown) => {
|
|
@@ -161,12 +124,9 @@ declare const timepickerSpec: {
|
|
|
161
124
|
};
|
|
162
125
|
export declare const timepickerElement: import("./define.js").ElementDefinition<TimepickerElementComponent>;
|
|
163
126
|
export type TimepickerSpec = typeof timepickerSpec;
|
|
164
|
-
/** `<m-timepicker>` as a ref or a query returns it. */
|
|
165
127
|
export type TimepickerElement = ElementInstance<TimepickerSpec, TimepickerElementComponent>;
|
|
166
|
-
/** Registers `<m-timepicker>` (or `<prefix-timepicker>`). */
|
|
167
128
|
export declare const defineTimepicker: (options?: DefineOptions) => string;
|
|
168
129
|
declare global {
|
|
169
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
170
130
|
interface HTMLElementTagNameMap {
|
|
171
131
|
"m-timepicker": TimepickerElement;
|
|
172
132
|
}
|
|
@@ -1,28 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-toolbar>`: M3 Expressive's docked and floating toolbars as a container
|
|
3
|
-
* with slots.
|
|
4
|
-
*
|
|
5
|
-
* Children are the items (`<m-icon-button>`, `<m-button>`, a text field),
|
|
6
|
-
* inside the element with the `toolbar` role: one tab stop, walked with the
|
|
7
|
-
* arrow keys, Home and End. Each item's host takes the tab stop and delegates
|
|
8
|
-
* focus to its control. `slot="fab"` takes a FAB, beside the toolbar and
|
|
9
|
-
* outside its tab stop. `slot="overflow"` takes an `<m-menu>`: the toolbar
|
|
10
|
-
* adds a "more" button and makes it the menu's anchor.
|
|
11
|
-
*
|
|
12
|
-
* `variant`, `orientation`, `placement`, `arrangement`, `fab-position` and
|
|
13
|
-
* `scroll-behavior` are the factory's options; `color` and `flat` (no
|
|
14
|
-
* elevation) change in place. `show()` and `hide()` move the toolbar on and
|
|
15
|
-
* off screen, and `show` and `hide` are dispatched when it does.
|
|
16
|
-
*
|
|
17
|
-
* Parts: `toolbar`, `bar`, `fab`, `overflow`.
|
|
18
|
-
*
|
|
19
|
-
* @module elements
|
|
20
|
-
*/
|
|
21
1
|
import type { ToolbarComponent } from "../components/toolbar/types.js";
|
|
22
2
|
import { type Config, type DefineOptions, type ElementInstance } from "./define.js";
|
|
23
3
|
declare const toolbarSpec: {
|
|
24
4
|
name: string;
|
|
25
|
-
slots: readonly [
|
|
5
|
+
slots: readonly [
|
|
6
|
+
"fab",
|
|
7
|
+
"overflow"
|
|
8
|
+
];
|
|
26
9
|
create: (config: Config) => ToolbarComponent;
|
|
27
10
|
styles: string[];
|
|
28
11
|
hostStyles: string;
|
|
@@ -73,7 +56,10 @@ declare const toolbarSpec: {
|
|
|
73
56
|
update: (c: ToolbarComponent, v: import("./define.js").AttributeValue) => void;
|
|
74
57
|
};
|
|
75
58
|
};
|
|
76
|
-
methods: readonly [
|
|
59
|
+
methods: readonly [
|
|
60
|
+
"show",
|
|
61
|
+
"hide"
|
|
62
|
+
];
|
|
77
63
|
events: {
|
|
78
64
|
show: {
|
|
79
65
|
detail: () => null;
|
|
@@ -90,12 +76,9 @@ declare const toolbarSpec: {
|
|
|
90
76
|
};
|
|
91
77
|
export declare const toolbarElement: import("./define.js").ElementDefinition<ToolbarComponent>;
|
|
92
78
|
export type ToolbarSpec = typeof toolbarSpec;
|
|
93
|
-
/** `<m-toolbar>` as a ref or a query returns it. */
|
|
94
79
|
export type ToolbarElement = ElementInstance<ToolbarSpec, ToolbarComponent>;
|
|
95
|
-
/** Registers `<m-toolbar>` (or `<prefix-toolbar>`). */
|
|
96
80
|
export declare const defineToolbar: (options?: DefineOptions) => string;
|
|
97
81
|
declare global {
|
|
98
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
99
82
|
interface HTMLElementTagNameMap {
|
|
100
83
|
"m-toolbar": ToolbarElement;
|
|
101
84
|
}
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-tooltip>`: a tooltip for another element, in the top layer.
|
|
3
|
-
*
|
|
4
|
-
* The target is the element whose id is the `for` attribute, looked up in
|
|
5
|
-
* the tooltip's own root and then the document, or the element given to the
|
|
6
|
-
* `target` property, which wins over `for`. The text is the `text` attribute,
|
|
7
|
-
* or the element's text when there is none; the factory writes a string, so
|
|
8
|
-
* the text is read rather than slotted. The tooltip shows on hover and focus
|
|
9
|
-
* as the factory does, and `show()`/`hide()` drive it from script;
|
|
10
|
-
* `no-show-on-hover` and `no-show-on-focus` turn either trigger off.
|
|
11
|
-
*
|
|
12
|
-
* The surface stays in the element's shadow root, with its styles, and opens
|
|
13
|
-
* in the top layer (`layer: "top"`). An id reference cannot cross into that
|
|
14
|
-
* root, so the target is described by the host: the target's
|
|
15
|
-
* `aria-describedby` names the host's id (one is given when it has none), and
|
|
16
|
-
* the host carries the text as its `aria-label`, which a description reads
|
|
17
|
-
* whether the tooltip shows or not. The host is `aria-hidden`, so the text is
|
|
18
|
-
* not read a second time as page content. A target in a
|
|
19
|
-
* shadow root below the host's tree is described through
|
|
20
|
-
* `ariaDescribedByElements`; one in a tree above it, which can reference
|
|
21
|
-
* neither, gets the text as its `aria-description`.
|
|
22
|
-
*
|
|
23
|
-
* Parts: `tooltip`, `arrow`.
|
|
24
|
-
*
|
|
25
|
-
* @module elements
|
|
26
|
-
*/
|
|
27
1
|
import type { TooltipComponent } from "../components/tooltip/types.js";
|
|
28
2
|
import { type DefineOptions, type ElementInstance } from "./define.js";
|
|
29
3
|
declare const tooltipSpec: {
|
|
@@ -73,7 +47,10 @@ declare const tooltipSpec: {
|
|
|
73
47
|
set: (c: TooltipComponent, v: unknown) => void;
|
|
74
48
|
};
|
|
75
49
|
};
|
|
76
|
-
methods: readonly [
|
|
50
|
+
methods: readonly [
|
|
51
|
+
"show",
|
|
52
|
+
"hide"
|
|
53
|
+
];
|
|
77
54
|
config: (host: HTMLElement) => {
|
|
78
55
|
text?: undefined;
|
|
79
56
|
} | {
|
|
@@ -84,12 +61,9 @@ declare const tooltipSpec: {
|
|
|
84
61
|
};
|
|
85
62
|
export declare const tooltipElement: import("./define.js").ElementDefinition<TooltipComponent>;
|
|
86
63
|
export type TooltipSpec = typeof tooltipSpec;
|
|
87
|
-
/** `<m-tooltip>` as a ref or a query returns it. */
|
|
88
64
|
export type TooltipElement = ElementInstance<TooltipSpec, TooltipComponent>;
|
|
89
|
-
/** Registers `<m-tooltip>` (or `<prefix-tooltip>`). */
|
|
90
65
|
export declare const defineTooltip: (options?: DefineOptions) => string;
|
|
91
66
|
declare global {
|
|
92
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
93
67
|
interface HTMLElementTagNameMap {
|
|
94
68
|
"m-tooltip": TooltipElement;
|
|
95
69
|
}
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<m-top-app-bar>`: the top app bar as a container with slots.
|
|
3
|
-
*
|
|
4
|
-
* Children are the headline, and `headline` its text when there are none;
|
|
5
|
-
* `slot="leading"` takes the navigation icon button and `slot="trailing"` the
|
|
6
|
-
* action icon buttons. `type` is `small`, `center`, `medium` or `large`, as
|
|
7
|
-
* the factory names them.
|
|
8
|
-
*
|
|
9
|
-
* The bar shows its scrolled state once the window scrolls past
|
|
10
|
-
* `scroll-threshold`; `no-scroll` turns that off and `no-compress` keeps a
|
|
11
|
-
* medium or large bar from compressing. `scroll-target` names the id of a
|
|
12
|
-
* scrolling element to follow instead of the window; any other scroller can
|
|
13
|
-
* drive the bar through `setScrollState(scrolled)`.
|
|
14
|
-
*
|
|
15
|
-
* Parts: `top-app-bar`, `leading`, `headline`, `trailing`.
|
|
16
|
-
*
|
|
17
|
-
* @module elements
|
|
18
|
-
*/
|
|
19
1
|
import type { TopAppBarComponent } from "../components/top-app-bar/top-app-bar.js";
|
|
20
2
|
import { type Config, type DefineOptions, type ElementInstance } from "./define.js";
|
|
21
3
|
declare const topAppBarSpec: {
|
|
22
4
|
name: string;
|
|
23
|
-
slots: readonly [
|
|
5
|
+
slots: readonly [
|
|
6
|
+
"leading",
|
|
7
|
+
"trailing"
|
|
8
|
+
];
|
|
24
9
|
create: (config: Config) => TopAppBarComponent;
|
|
25
10
|
styles: string[];
|
|
26
11
|
hostStyles: string;
|
|
@@ -53,18 +38,17 @@ declare const topAppBarSpec: {
|
|
|
53
38
|
update: (c: TopAppBarComponent, v: import("./define.js").AttributeValue) => void;
|
|
54
39
|
};
|
|
55
40
|
};
|
|
56
|
-
methods: readonly [
|
|
41
|
+
methods: readonly [
|
|
42
|
+
"setScrollState"
|
|
43
|
+
];
|
|
57
44
|
config: (host: HTMLElement) => Config;
|
|
58
45
|
setup: (host: import("./define.js").ElementHost<TopAppBarComponent>, component: TopAppBarComponent) => () => void;
|
|
59
46
|
};
|
|
60
47
|
export declare const topAppBarElement: import("./define.js").ElementDefinition<TopAppBarComponent>;
|
|
61
48
|
export type TopAppBarSpec = typeof topAppBarSpec;
|
|
62
|
-
/** `<m-top-app-bar>` as a ref or a query returns it. */
|
|
63
49
|
export type TopAppBarElement = ElementInstance<TopAppBarSpec, TopAppBarComponent>;
|
|
64
|
-
/** Registers `<m-top-app-bar>` (or `<prefix-top-app-bar>`). */
|
|
65
50
|
export declare const defineTopAppBar: (options?: DefineOptions) => string;
|
|
66
51
|
declare global {
|
|
67
|
-
/** `document.querySelector("m-…")` and `createElement` return the element's type (the default prefix). */
|
|
68
52
|
interface HTMLElementTagNameMap {
|
|
69
53
|
"m-top-app-bar": TopAppBarElement;
|
|
70
54
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Main mtrl library exports
|
|
3
|
-
*
|
|
4
|
-
* The root is the components and the few helpers an app configures them with.
|
|
5
|
-
* The rest of core is at its subpath (`material/core/compose`, `material/core/dom`, ...):
|
|
6
|
-
* material 3.0.0 removed it from the root, and scripts/fixtures/root-exports.md
|
|
7
|
-
* says where each name went. The list is pinned by scripts/fixtures/root-exports.json:
|
|
8
|
-
* `bun run root-exports:update`.
|
|
9
|
-
*
|
|
10
|
-
* @packageDocumentation
|
|
11
|
-
*/
|
|
12
1
|
export * from "./components/index.js";
|
|
13
2
|
export { setComponentDefaults, getComponentDefaults, setGlobalDefaults, clearGlobalDefaults, schemeToTokens, THEME_ROLES, configureHTML } from "./core/index.js";
|
|
14
3
|
export type { ThemeRole, SchemeRoles, SchemeToTokensOptions, ThemeTokens, ComponentConfigMap, HTMLPolicy, HTMLInput, TrustedHTMLLike } from "./core/index.js";
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "Material Design 3 components for the web: plain JavaScript, web components, and React, Vue, Svelte and Solid components. TypeScript, zero dependencies.",
|
|
5
5
|
"author": "floor",
|
|
6
6
|
"license": "MIT",
|
package/dist/react/create.d.ts
CHANGED
|
@@ -1,44 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React components over the elements.
|
|
3
|
-
*
|
|
4
|
-
* `createComponent` renders the element's tag and keeps React's model:
|
|
5
|
-
* attributes are passed as attributes, so server-rendered markup carries them;
|
|
6
|
-
* live-state properties (`checked`, `value`) are set on the element after each
|
|
7
|
-
* render, and are controlled when given, like React's own inputs; the
|
|
8
|
-
* attribute they shadow is the `default*` prop. Events are typed `on*`
|
|
9
|
-
* callbacks. The element is registered on first mount, never at import.
|
|
10
|
-
*
|
|
11
|
-
* Works the same on React 18 and 19: the component sets properties and
|
|
12
|
-
* attaches listeners itself rather than relying on React 19's custom element
|
|
13
|
-
* support.
|
|
14
|
-
*
|
|
15
|
-
* @module react
|
|
16
|
-
*/
|
|
17
1
|
import * as React from "react";
|
|
18
2
|
import type { DefineOptions, ElementEvents, ElementProps, ElementSlotProp } from "../elements/index.js";
|
|
19
3
|
import { type ComponentSpec, type DeclarationSpec, type DefaultProps, type FormProps, type Pascal, type RetiredEvents } from "../elements/adapter.js";
|
|
20
4
|
export { configure } from "../elements/adapter.js";
|
|
21
5
|
export type { DefaultProps, FormProps } from "../elements/adapter.js";
|
|
22
|
-
/** `change` → `onChange`, typed with the element's event. */
|
|
23
6
|
export type EventProps<S> = {
|
|
24
7
|
[K in keyof ElementEvents<S> & string as `on${Pascal<K>}`]?: (event: ElementEvents<S>[K]) => void;
|
|
25
8
|
};
|
|
26
9
|
type BaseProps<S> = ElementProps<S> & DefaultProps<S> & EventProps<S>;
|
|
27
|
-
/**
|
|
28
|
-
* Each named slot as a prop taking nodes (`actions={<Button />}`), rendered
|
|
29
|
-
* into a `<span slot="…">` the adapter owns; a text prop of the same name
|
|
30
|
-
* (`headline`) takes its text or nodes.
|
|
31
|
-
*/
|
|
32
10
|
type SlotProps<S> = {
|
|
33
11
|
[K in ElementSlotProp<S>]?: React.ReactNode;
|
|
34
12
|
};
|
|
35
13
|
type OwnProps<S> = Omit<BaseProps<S>, ElementSlotProp<S>> & SlotProps<S>;
|
|
36
|
-
/**
|
|
37
|
-
* `@types/react` 18's `HTMLAttributes` has no `popover` through 18.3.31.
|
|
38
|
-
* `enterKeyHint` joins that interface in 18.3.31; earlier 18 types it on inputs.
|
|
39
|
-
* `nonce` is absent on 18.0.0 and present by 18.0.28.
|
|
40
|
-
* A release that already declares a key keeps its own type.
|
|
41
|
-
*/
|
|
42
14
|
type ReactHostGaps = {
|
|
43
15
|
popover?: "" | "auto" | "manual" | "hint";
|
|
44
16
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
@@ -47,31 +19,17 @@ type ReactHostGaps = {
|
|
|
47
19
|
type Missing<Base, Extra> = {
|
|
48
20
|
[K in Exclude<keyof Extra, keyof Base>]?: K extends keyof Extra ? Extra[K] : never;
|
|
49
21
|
};
|
|
50
|
-
/** `HTMLAttributes` for the host, plus globals a supported React 18 type omits. */
|
|
51
22
|
export type ReactHostAttributes<E extends HTMLElement = HTMLElement> = React.HTMLAttributes<E> & Missing<React.HTMLAttributes<E>, ReactHostGaps>;
|
|
52
|
-
/**
|
|
53
|
-
* Props of a generated component: the element's own, plus any HTML attribute for the host.
|
|
54
|
-
* `OwnProps` includes the element's `on*` handlers, so those names keep the component's event.
|
|
55
|
-
*/
|
|
56
23
|
export type ComponentProps<S> = OwnProps<S> & FormProps<S> & Omit<ReactHostAttributes, keyof OwnProps<S> | RetiredProps<S>> & {
|
|
57
24
|
[K in RetiredProps<S>]?: `${K} was removed in material 3.0.0: use onChange`;
|
|
58
25
|
} & {
|
|
59
26
|
children?: React.ReactNode;
|
|
60
27
|
};
|
|
61
|
-
/** The handler props of events material 3.0.0 removed (`onToggle` on the icon button): refused, see `RetiredEvents`. */
|
|
62
28
|
type RetiredProps<S> = `on${Pascal<RetiredEvents<S>>}`;
|
|
63
|
-
/** A generated component; named so declarations stay short. */
|
|
64
29
|
export type MComponent<S, E extends HTMLElement> = React.ForwardRefExoticComponent<React.PropsWithoutRef<ComponentProps<S>> & React.RefAttributes<E>>;
|
|
65
|
-
/**
|
|
66
|
-
* The React component for an element.
|
|
67
|
-
* @param spec - The element's spec (`switchElement.spec`)
|
|
68
|
-
* @param define - Registers the element and anything it needs (`defineSwitch`)
|
|
69
|
-
*/
|
|
70
30
|
export declare const createComponent: <S, E extends HTMLElement>(spec: ComponentSpec, define: (options?: DefineOptions) => string, displayName: string) => MComponent<S, E>;
|
|
71
31
|
export type DeclarationProps<A> = A & Omit<ReactHostAttributes, keyof A> & {
|
|
72
32
|
children?: React.ReactNode;
|
|
73
33
|
};
|
|
74
|
-
/** A generated declaration component. */
|
|
75
34
|
export type MDeclaration<A> = React.ForwardRefExoticComponent<React.PropsWithoutRef<DeclarationProps<A>> & React.RefAttributes<HTMLElement>>;
|
|
76
|
-
/** The React component for a declaration child; its parent registers the tag. */
|
|
77
35
|
export declare const createDeclaration: <A>(spec: DeclarationSpec, displayName: string) => MDeclaration<A>;
|