material 3.0.2 → 3.0.3
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/config.d.ts +2 -2
- package/dist/components/button/features/toggle.d.ts +1 -1
- package/dist/components/button/types.d.ts +5 -5
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/constants.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +1 -1
- package/dist/components/button-group/types.d.ts +2 -2
- package/dist/components/card/types.d.ts +5 -5
- package/dist/components/carousel/types.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +4 -4
- package/dist/components/chips/types.d.ts +12 -12
- package/dist/components/datepicker/datepicker.d.ts +1 -1
- package/dist/components/datepicker/types.d.ts +11 -11
- package/dist/components/datepicker/utils.d.ts +1 -1
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/drawer/types.d.ts +1 -1
- package/dist/components/extended-fab/types.d.ts +3 -3
- package/dist/components/fab/types.d.ts +2 -3
- package/dist/components/fab-menu/types.d.ts +1 -1
- package/dist/components/icon-button/types.d.ts +4 -5
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/menu/features/loader.d.ts +1 -1
- package/dist/components/menu/types.d.ts +3 -3
- package/dist/components/navigation-bar/types.d.ts +1 -1
- package/dist/components/navigation-rail/types.d.ts +2 -2
- package/dist/components/progress/types.d.ts +1 -1
- package/dist/components/radios/types.d.ts +1 -1
- package/dist/components/search/types.d.ts +5 -5
- package/dist/components/select/constants.d.ts +1 -1
- package/dist/components/select/types.d.ts +1 -1
- package/dist/components/slider/config.d.ts +1 -1
- package/dist/components/slider/features/axis.d.ts +1 -1
- package/dist/components/slider/features/controller.d.ts +14 -14
- package/dist/components/slider/types.d.ts +1 -1
- package/dist/components/snackbar/types.d.ts +1 -1
- package/dist/components/switch/features.d.ts +1 -1
- package/dist/components/switch/types.d.ts +5 -5
- package/dist/components/tabs/features.d.ts +1 -1
- package/dist/components/tabs/responsive.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +7 -8
- package/dist/components/tabs/utils.d.ts +5 -5
- package/dist/components/text-field/constants.d.ts +1 -1
- package/dist/components/text-field/features/counter.d.ts +1 -1
- package/dist/components/text-field/features/field.d.ts +1 -1
- package/dist/components/text-field/features/required.d.ts +1 -1
- package/dist/components/text-field/features/trailing-icon.d.ts +2 -2
- package/dist/components/text-field/types.d.ts +8 -8
- package/dist/components/timepicker/dial.d.ts +2 -2
- package/dist/components/timepicker/types.d.ts +9 -9
- package/dist/components/timepicker/utils.d.ts +2 -2
- package/dist/core/compose/features/constants.d.ts +1 -1
- package/dist/core/compose/features/events.d.ts +1 -1
- package/dist/core/config/component.d.ts +1 -1
- package/dist/core/dom/create.d.ts +2 -2
- package/dist/core/dom/layer.d.ts +1 -1
- package/dist/core/state/emitter.d.ts +1 -1
- package/dist/core/theme/shape.d.ts +1 -1
- package/dist/core/theme/tokens.d.ts +1 -1
- package/dist/core/utils/attributes.d.ts +2 -2
- package/dist/core/utils/theme.d.ts +1 -1
- package/dist/elements/adapter.d.ts +12 -1
- package/dist/elements/button.d.ts +1 -1
- package/dist/elements/css/icon-button.css +1 -1
- package/dist/elements/css/icon-button.js +1 -1
- package/dist/elements/css/toolbar.css +1 -1
- package/dist/elements/css/toolbar.js +1 -1
- package/dist/elements/define.d.ts +20 -4
- package/dist/elements/define.js +2 -0
- package/dist/elements/icon-button.d.ts +6 -1
- package/dist/elements/icon-button.js +1 -0
- package/dist/elements/navigation-bar.d.ts +1 -1
- package/dist/elements/navigation-rail.d.ts +1 -1
- 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/styles.d.ts +5 -4
- package/dist/elements/timepicker.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/package.json +1 -1
- package/dist/react/create.d.ts +1 -1
- package/dist/react/create.js +4 -1
- package/dist/solid/create.d.ts +2 -2
- package/dist/solid/create.js +6 -4
- package/dist/ssr/index.js +13 -13
- package/dist/ssr/react.js +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/Badge.svelte +1 -1
- package/dist/svelte/BottomAppBar.svelte +1 -1
- package/dist/svelte/BottomSheet.svelte +1 -1
- package/dist/svelte/Button.svelte +1 -1
- package/dist/svelte/ButtonGroup.svelte +1 -1
- package/dist/svelte/Card.svelte +1 -1
- package/dist/svelte/Carousel.svelte +1 -1
- package/dist/svelte/Checkbox.svelte +1 -1
- package/dist/svelte/Chips.svelte +1 -1
- package/dist/svelte/Datepicker.svelte +1 -1
- package/dist/svelte/Dialog.svelte +1 -1
- package/dist/svelte/Divider.svelte +1 -1
- package/dist/svelte/Drawer.svelte +1 -1
- package/dist/svelte/ExtendedFab.svelte +1 -1
- package/dist/svelte/Fab.svelte +1 -1
- package/dist/svelte/FabMenu.svelte +1 -1
- package/dist/svelte/IconButton.svelte +1 -1
- package/dist/svelte/List.svelte +1 -1
- package/dist/svelte/LoadingIndicator.svelte +1 -1
- package/dist/svelte/Menu.svelte +1 -1
- package/dist/svelte/NavigationBar.svelte +1 -1
- package/dist/svelte/NavigationRail.svelte +1 -1
- package/dist/svelte/Progress.svelte +1 -1
- package/dist/svelte/Radios.svelte +1 -1
- package/dist/svelte/Search.svelte +1 -1
- package/dist/svelte/Select.svelte +1 -1
- package/dist/svelte/SideSheet.svelte +1 -1
- package/dist/svelte/Slider.svelte +1 -1
- package/dist/svelte/Snackbar.svelte +1 -1
- package/dist/svelte/SplitButton.svelte +1 -1
- package/dist/svelte/Switch.svelte +1 -1
- package/dist/svelte/Tabs.svelte +1 -1
- package/dist/svelte/TextField.svelte +1 -1
- package/dist/svelte/Timepicker.svelte +1 -1
- package/dist/svelte/Toolbar.svelte +1 -1
- package/dist/svelte/Tooltip.svelte +1 -1
- package/dist/svelte/TopAppBar.svelte +1 -1
- package/dist/svelte/runtime.d.ts +2 -2
- package/dist/svelte/runtime.js +4 -1
- 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 +2 -2
- package/dist/vue/create.js +4 -1
- package/package.json +1 -1
- package/src/styles/abstract/_mixins.scss +4 -4
- package/src/styles/abstract/_theme.scss +1 -1
- package/src/styles/abstract/_variables.scss +7 -7
- package/src/styles/base/_foundation.scss +1 -1
- package/src/styles/base/_typescale-tokens.scss +1 -1
- package/src/styles/base/_typography.scss +1 -1
- package/src/styles/components/_bottom-sheet.scss +1 -1
- package/src/styles/components/_button.scss +1 -1
- package/src/styles/components/_checkbox.scss +5 -5
- package/src/styles/components/_chips.scss +9 -9
- package/src/styles/components/_datepicker.scss +8 -9
- package/src/styles/components/_dialog.scss +1 -1
- package/src/styles/components/_drawer.scss +1 -1
- package/src/styles/components/_fab-menu.scss +1 -1
- package/src/styles/components/_icon-button.scss +50 -13
- package/src/styles/components/_menu.scss +0 -1
- package/src/styles/components/_navigation-bar.scss +1 -1
- package/src/styles/components/_radios.scss +3 -3
- package/src/styles/components/_search.scss +7 -7
- package/src/styles/components/_select.scss +2 -2
- package/src/styles/components/_side-sheet.scss +2 -2
- package/src/styles/components/_slider.scss +6 -6
- package/src/styles/components/_switch.scss +5 -5
- package/src/styles/components/_tabs.scss +15 -15
- package/src/styles/components/_text-field.scss +20 -21
- package/src/styles/components/_timepicker.scss +6 -6
- package/src/styles/components/_toolbar.scss +48 -0
- package/src/styles/components/_tooltip.scss +2 -2
- package/src/styles/elements/_field.scss +2 -2
- package/src/styles/themes/_autumn.scss +3 -3
- package/src/styles/themes/_base-theme.scss +2 -2
- package/src/styles/themes/_baseline.scss +5 -5
- package/src/styles/themes/_forest.scss +3 -3
- package/src/styles/themes/_ocean.scss +3 -3
- package/src/styles/themes/_spring.scss +3 -3
- package/src/styles/themes/_sunset.scss +3 -3
- package/src/styles/utilities/_ripple.scss +1 -1
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ What a bundler keeps, minified and gzipped (kB is 1,000 bytes), measured from th
|
|
|
97
97
|
| Everything the root exports (`export * from 'material'`), without code splitting | 127.0 kB |
|
|
98
98
|
| `material/styles/base` | 2.9 kB |
|
|
99
99
|
| `material/styles/base` and `material/styles/button` | 5.2 kB |
|
|
100
|
-
| `material/styles`, the full stylesheet | 62.
|
|
100
|
+
| `material/styles`, the full stylesheet | 62.8 kB |
|
|
101
101
|
<!-- /sizes -->
|
|
102
102
|
|
|
103
103
|
`material` publishes ESM only, so bundlers drop what you do not import. Each component's page on [md3.io/components](https://md3.io/components/) gives its size.
|
|
@@ -615,7 +615,7 @@ export declare const getApiConfig: (comp: {
|
|
|
615
615
|
* A badge is a count, and a count of nothing is not news -- so an empty label
|
|
616
616
|
* and a zero are both hidden. The setter has always done this; creation did
|
|
617
617
|
* not, so `createBadge({ label: 0 })` was visible while `setLabel(0)` on the
|
|
618
|
-
* same badge hid it. One rule now, used by both.
|
|
618
|
+
* same badge hid it. One rule now, used by both.
|
|
619
619
|
*/
|
|
620
620
|
export declare const isEmptyBadgeLabel: (formattedLabel: string) => boolean;
|
|
621
621
|
/**
|
|
@@ -624,7 +624,7 @@ export declare const isEmptyBadgeLabel: (formattedLabel: string) => boolean;
|
|
|
624
624
|
* Asked of the same value the formatter reads, rather than of its type. Both
|
|
625
625
|
* callers used to require `typeof label === "number"`, so `"1250"` with a max
|
|
626
626
|
* of 999 rendered "999+" without the overflow class that 1250 received --
|
|
627
|
-
* the formatter has always used `Number(label)`.
|
|
627
|
+
* the formatter has always used `Number(label)`.
|
|
628
628
|
*/
|
|
629
629
|
export declare const isBadgeOverflow: (label: string | number, max?: number) => boolean;
|
|
630
630
|
export declare const formatBadgeLabel: (label: string | number, max?: number) => string;
|
|
@@ -31,7 +31,7 @@ export interface ToggleComponent {
|
|
|
31
31
|
* `--selected` classes drive the selected colours and the shape swap.
|
|
32
32
|
*
|
|
33
33
|
* Emits a `change` event with `{ selected, value }` when the user toggles it;
|
|
34
|
-
* `value` is the button's value, as `getValue()` returns it
|
|
34
|
+
* `value` is the button's value, as `getValue()` returns it.
|
|
35
35
|
* With `toggleOnClick: false` the click does nothing and a container
|
|
36
36
|
* (button group) drives the state through `setSelected`.
|
|
37
37
|
*
|
|
@@ -187,7 +187,7 @@ export interface ButtonEventPayload<E extends Event = Event> {
|
|
|
187
187
|
/** The same DOM event as `event`; both names have always been provided. */
|
|
188
188
|
originalEvent: E;
|
|
189
189
|
}
|
|
190
|
-
/** A toggle button's `change
|
|
190
|
+
/** A toggle button's `change`. */
|
|
191
191
|
export interface ButtonChangePayload {
|
|
192
192
|
/** Whether the button is now selected */
|
|
193
193
|
selected: boolean;
|
|
@@ -199,7 +199,7 @@ export interface ButtonChangePayload {
|
|
|
199
199
|
*
|
|
200
200
|
* `on` and `off` are generic over these keys, so a misspelled event name is a
|
|
201
201
|
* compile error rather than a listener that never fires, and a handler's
|
|
202
|
-
* payload is typed rather than `any`.
|
|
202
|
+
* payload is typed rather than `any`.
|
|
203
203
|
*
|
|
204
204
|
* Native forwarding and toggle selection are reported here. `mount` and `unmount` are *not* here: the lifecycle
|
|
205
205
|
* feature keeps its own emitter and exposes them as `lifecycle.onMount` and
|
|
@@ -208,7 +208,7 @@ export interface ButtonChangePayload {
|
|
|
208
208
|
export interface ButtonEvents {
|
|
209
209
|
/**
|
|
210
210
|
* A toggle button's selected state changed on a click. `value` is the
|
|
211
|
-
* button's value (`getValue()`), as every model event carries
|
|
211
|
+
* button's value (`getValue()`), as every model event carries;
|
|
212
212
|
* `selected` is the toggled state.
|
|
213
213
|
*/
|
|
214
214
|
change: (payload: ButtonChangePayload) => void;
|
|
@@ -300,7 +300,7 @@ export interface ButtonComponent {
|
|
|
300
300
|
* @returns The button component for chaining
|
|
301
301
|
*/
|
|
302
302
|
disable: () => ButtonComponent;
|
|
303
|
-
/** Whether the button is disabled
|
|
303
|
+
/** Whether the button is disabled */
|
|
304
304
|
isDisabled: () => boolean;
|
|
305
305
|
/**
|
|
306
306
|
* Sets the button's text content
|
|
@@ -445,7 +445,7 @@ export interface ButtonComponent {
|
|
|
445
445
|
/**
|
|
446
446
|
* Registers ButtonConfig with the global defaults map, so
|
|
447
447
|
* `setComponentDefaults("button", ...)` is typed without core
|
|
448
|
-
* importing anything from this component.
|
|
448
|
+
* importing anything from this component.
|
|
449
449
|
*/
|
|
450
450
|
declare module "../../core/config/global" {
|
|
451
451
|
interface ComponentConfigMap {
|
|
@@ -5,7 +5,7 @@ import { ButtonGroupConfig, ButtonGroupComponent } from "./types.js";
|
|
|
5
5
|
* The Button Group component provides a container for grouping related action buttons.
|
|
6
6
|
* A standard group holds related actions, each button acting on its own; a
|
|
7
7
|
* connected group (`kind: "connected"`, with `selection`) is M3's replacement for
|
|
8
|
-
* the segmented button, which material 3.0.0 removed
|
|
8
|
+
* the segmented button, which material 3.0.0 removed.
|
|
9
9
|
*
|
|
10
10
|
* Per Material Design 3 specifications:
|
|
11
11
|
* - Standard groups space their buttons (18/12/8/8/8dp by size) and a
|
|
@@ -73,7 +73,7 @@ export declare const BUTTON_GROUP_SIZES: {
|
|
|
73
73
|
/**
|
|
74
74
|
* Material 3 button group tokens per size (dp): container height, button
|
|
75
75
|
* icon size, standard between-space, connected inner corner and its shape
|
|
76
|
-
* scale step (
|
|
76
|
+
* scale step (m3.material.io button group specs; ButtonGroupSmallTokens.kt and
|
|
77
77
|
* ConnectedButtonGroupSmallTokens.kt for the s size)
|
|
78
78
|
*/
|
|
79
79
|
export declare const BUTTON_GROUP_SIZE_TOKENS: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The Button Group component provides a container for grouping related action buttons.
|
|
5
5
|
* A standard group holds related actions, each button acting on its own; a
|
|
6
6
|
* connected group (`kind: "connected"`, with `selection`) is M3's replacement for
|
|
7
|
-
* the segmented button, which material 3.0.0 removed
|
|
7
|
+
* the segmented button, which material 3.0.0 removed.
|
|
8
8
|
*
|
|
9
9
|
* @packageDocumentation
|
|
10
10
|
*/
|
|
@@ -123,7 +123,7 @@ interface ButtonGroupItemBase extends Omit<ButtonConfig, "variant"> {
|
|
|
123
123
|
*
|
|
124
124
|
* Expressed as a union rather than a flat required field, because requiring
|
|
125
125
|
* it on text items too is over-broad -- it would make 67 call sites in this
|
|
126
|
-
* component's own tests pass a label that duplicates the text.
|
|
126
|
+
* component's own tests pass a label that duplicates the text.
|
|
127
127
|
*/
|
|
128
128
|
export type ButtonGroupItemConfig = (ButtonGroupItemBase & {
|
|
129
129
|
text: string;
|
|
@@ -287,7 +287,7 @@ export interface ButtonGroupComponent {
|
|
|
287
287
|
* @returns The ButtonGroupComponent for chaining
|
|
288
288
|
*/
|
|
289
289
|
disable: () => ButtonGroupComponent;
|
|
290
|
-
/** Whether the whole group is disabled
|
|
290
|
+
/** Whether the whole group is disabled */
|
|
291
291
|
isDisabled: () => boolean;
|
|
292
292
|
/**
|
|
293
293
|
* Enables a specific button by index
|
|
@@ -63,14 +63,14 @@ export interface CardConfig {
|
|
|
63
63
|
/**
|
|
64
64
|
* The hover and press states and their elevation, for a card the app
|
|
65
65
|
* makes interactive itself. Not a control: no role of button and no tab
|
|
66
|
-
* stop; `clickable` is
|
|
66
|
+
* stop; `clickable` is.
|
|
67
67
|
*/
|
|
68
68
|
interactive?: boolean;
|
|
69
69
|
/** Whether the card should take full width */
|
|
70
70
|
fullWidth?: boolean;
|
|
71
71
|
/**
|
|
72
72
|
* A card that acts on activation: a button (role, tab stop, Enter and
|
|
73
|
-
* Space click it) with the ripple
|
|
73
|
+
* Space click it) with the ripple
|
|
74
74
|
*/
|
|
75
75
|
clickable?: boolean;
|
|
76
76
|
/** Whether the card is draggable */
|
|
@@ -290,7 +290,7 @@ export interface CardComponentConfig extends CardConfig {
|
|
|
290
290
|
prefix: string;
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
|
-
* The card's events
|
|
293
|
+
* The card's events. A clickable card forwards `click`; an
|
|
294
294
|
* interactive one `mouseenter`, `mouseleave`, `keydown`, `focus` and `blur`;
|
|
295
295
|
* a draggable one emits `dragstart` and `dragend`.
|
|
296
296
|
*/
|
|
@@ -321,7 +321,7 @@ export interface CardEvents extends TouchEvents {
|
|
|
321
321
|
* @category Components
|
|
322
322
|
*/
|
|
323
323
|
export interface CardComponent extends BaseComponent {
|
|
324
|
-
/** Subscribes to one of the card's events
|
|
324
|
+
/** Subscribes to one of the card's events */
|
|
325
325
|
on: <K extends keyof CardEvents>(event: K, handler: CardEvents[K]) => CardComponent;
|
|
326
326
|
/** Removes a handler added with `on` */
|
|
327
327
|
off: <K extends keyof CardEvents>(event: K, handler: CardEvents[K]) => CardComponent;
|
|
@@ -506,7 +506,7 @@ export interface ApiOptions {
|
|
|
506
506
|
/**
|
|
507
507
|
* Registers CardConfig with the global defaults map, so
|
|
508
508
|
* `setComponentDefaults("card", ...)` is typed without core
|
|
509
|
-
* importing anything from this component.
|
|
509
|
+
* importing anything from this component.
|
|
510
510
|
*/
|
|
511
511
|
declare module "../../core/config/global" {
|
|
512
512
|
interface ComponentConfigMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ForwardedEventPayload } from "../../core/dom/index.js";
|
|
2
2
|
/** Current item reported by programmatic navigation or native scrolling. */
|
|
3
3
|
export interface CarouselChangePayload {
|
|
4
|
-
/** The current item's index, as `getValue()` returns it; every model event carries it
|
|
4
|
+
/** The current item's index, as `getValue()` returns it; every model event carries it */
|
|
5
5
|
value: number;
|
|
6
6
|
}
|
|
7
7
|
/** Events emitted by the scroll feature and forwarded from the root. */
|
|
@@ -62,7 +62,7 @@ export interface CheckboxConfig {
|
|
|
62
62
|
labelPosition?: CheckboxLabelPosition | string;
|
|
63
63
|
/**
|
|
64
64
|
* Error state: the outline, the selected container and the state layers
|
|
65
|
-
* take the error role, and the input is marked `aria-invalid`.
|
|
65
|
+
* take the error role, and the input is marked `aria-invalid`.
|
|
66
66
|
* @default false
|
|
67
67
|
*/
|
|
68
68
|
error?: boolean;
|
|
@@ -71,7 +71,7 @@ export interface CheckboxConfig {
|
|
|
71
71
|
*/
|
|
72
72
|
ariaLabel?: string;
|
|
73
73
|
/**
|
|
74
|
-
* Whether Enter toggles as Space does. Off for a checkbox
|
|
74
|
+
* Whether Enter toggles as Space does. Off for a checkbox.
|
|
75
75
|
* @internal
|
|
76
76
|
*/
|
|
77
77
|
enterToggles?: boolean;
|
|
@@ -221,7 +221,7 @@ export interface CheckboxComponent {
|
|
|
221
221
|
* @returns Checkbox component for method chaining
|
|
222
222
|
*/
|
|
223
223
|
disable: () => CheckboxComponent;
|
|
224
|
-
/** Whether the checkbox is disabled
|
|
224
|
+
/** Whether the checkbox is disabled */
|
|
225
225
|
isDisabled: () => boolean;
|
|
226
226
|
/**
|
|
227
227
|
* Destroys the checkbox component and cleans up resources
|
|
@@ -297,7 +297,7 @@ export type ApiComponent = BaseComponent & Required<Pick<BaseComponent, "checkab
|
|
|
297
297
|
/**
|
|
298
298
|
* Registers CheckboxConfig with the global defaults map, so
|
|
299
299
|
* `setComponentDefaults("checkbox", ...)` is typed without core
|
|
300
|
-
* importing anything from this component.
|
|
300
|
+
* importing anything from this component.
|
|
301
301
|
*/
|
|
302
302
|
declare module "../../core/config/global" {
|
|
303
303
|
interface ComponentConfigMap {
|
|
@@ -24,7 +24,7 @@ export interface ChipConfig {
|
|
|
24
24
|
* Delete. Input chips are always removable (m3.material.io chips): on its own the
|
|
25
25
|
* chip then leaves the page; in a set, the set removes it and emits `remove`. It
|
|
26
26
|
* used to be a request the owner had to act on, and without it there was no
|
|
27
|
-
* remove button.
|
|
27
|
+
* remove button. It and every `remove` listener run first, with the chip
|
|
28
28
|
* still in the set and on the page; the removal follows.
|
|
29
29
|
*/
|
|
30
30
|
onRemove?: ChipEvents["remove"];
|
|
@@ -32,7 +32,7 @@ export interface ChipConfig {
|
|
|
32
32
|
/**
|
|
33
33
|
* Filter chips: gives the trailing icon its own button, which calls this (the
|
|
34
34
|
* m3.material.io chips' trailing icon that "can be used to open a menu or remove
|
|
35
|
-
* the chip"). The chip's own action is unaffected.
|
|
35
|
+
* the chip"). The chip's own action is unaffected.
|
|
36
36
|
*/
|
|
37
37
|
onTrailingClick?: ChipEvents["trailing"];
|
|
38
38
|
/** The trailing button's accessible name; "{label} options" for a menu, "Remove {label}" otherwise. */
|
|
@@ -70,7 +70,7 @@ export interface ChipConfig {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* @internal What the chip set passes a chip on top of its config; not part of
|
|
73
|
-
* ChipConfig, so apps cannot set it
|
|
73
|
+
* ChipConfig, so apps cannot set it.
|
|
74
74
|
*/
|
|
75
75
|
export interface ChipOptions extends ChipConfig {
|
|
76
76
|
/** Selection belongs to the chips container. */
|
|
@@ -80,7 +80,7 @@ export interface ChipOptions extends ChipConfig {
|
|
|
80
80
|
/** The owning set removes the chip, once its `remove` listeners have run. */
|
|
81
81
|
onRemoved?: (chip: ChipComponent) => void;
|
|
82
82
|
/**
|
|
83
|
-
* The chip is a cell of a chip set's grid
|
|
83
|
+
* The chip is a cell of a chip set's grid: the root is a
|
|
84
84
|
* `gridcell`, and a one-action chip's cell is its focus target.
|
|
85
85
|
*/
|
|
86
86
|
cell?: boolean;
|
|
@@ -95,7 +95,7 @@ export type InputChipConfig = Omit<FilterChipConfig, "elevated" | "onTrailingCli
|
|
|
95
95
|
export interface ChipChangePayload {
|
|
96
96
|
selected: boolean;
|
|
97
97
|
chip: ChipComponent;
|
|
98
|
-
/** The chip's value, as `getValue()` returns it; every model event carries it
|
|
98
|
+
/** The chip's value, as `getValue()` returns it; every model event carries it */
|
|
99
99
|
value: string | null;
|
|
100
100
|
}
|
|
101
101
|
export interface ChipEvents {
|
|
@@ -105,7 +105,7 @@ export interface ChipEvents {
|
|
|
105
105
|
blur: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
|
|
106
106
|
change: (payload: ChipChangePayload) => void;
|
|
107
107
|
remove: (chip: ChipComponent) => void;
|
|
108
|
-
/** A filter chip's trailing button was activated
|
|
108
|
+
/** A filter chip's trailing button was activated. */
|
|
109
109
|
trailing: (chip: ChipComponent) => void;
|
|
110
110
|
}
|
|
111
111
|
/** Shared API. Selection setters are inert on assist and suggestion chips. */
|
|
@@ -115,7 +115,7 @@ export interface ChipComponent {
|
|
|
115
115
|
action: HTMLButtonElement;
|
|
116
116
|
/**
|
|
117
117
|
* A filter chip's trailing button, when it has one (`onTrailingClick`): anchor a
|
|
118
|
-
* menu to it and keep its aria-expanded in step.
|
|
118
|
+
* menu to it and keep its aria-expanded in step.
|
|
119
119
|
*/
|
|
120
120
|
trailingAction?: HTMLButtonElement;
|
|
121
121
|
getType: () => ChipType;
|
|
@@ -173,7 +173,7 @@ export interface ChipsConfig {
|
|
|
173
173
|
selector?: string | null;
|
|
174
174
|
/**
|
|
175
175
|
* Whether several chips can be selected at once. Multi-select is the default, as
|
|
176
|
-
* Material's chip groups are (single-select is opt-in).
|
|
176
|
+
* Material's chip groups are (single-select is opt-in).
|
|
177
177
|
* @default true
|
|
178
178
|
*/
|
|
179
179
|
multiSelect?: boolean;
|
|
@@ -181,7 +181,7 @@ export interface ChipsConfig {
|
|
|
181
181
|
* Whether the set keeps at least one chip selected: deselecting the last selected
|
|
182
182
|
* chip is refused, and a refused click emits no `change`, on the chip or on the set.
|
|
183
183
|
* Off by default, as in Material; single-select sets used to
|
|
184
|
-
* enforce it without a way to opt out.
|
|
184
|
+
* enforce it without a way to opt out.
|
|
185
185
|
* @default false
|
|
186
186
|
*/
|
|
187
187
|
selectionRequired?: boolean;
|
|
@@ -344,7 +344,7 @@ export interface ChipsComponent {
|
|
|
344
344
|
/**
|
|
345
345
|
* Selects chips by their values
|
|
346
346
|
* @param values - Value or array of values to select
|
|
347
|
-
* @param triggerEvent - Emits `change` when true; silent by default
|
|
347
|
+
* @param triggerEvent - Emits `change` when true; silent by default
|
|
348
348
|
* @returns The chips instance for chaining
|
|
349
349
|
*/
|
|
350
350
|
selectByValue: (values: string | string[], triggerEvent?: boolean) => ChipsComponent;
|
|
@@ -401,7 +401,7 @@ export interface ChipsComponent {
|
|
|
401
401
|
enableKeyboardNavigation: () => ChipsComponent;
|
|
402
402
|
/**
|
|
403
403
|
* Turns keyboard navigation between the chips on and off: while disabled,
|
|
404
|
-
* the arrows, Home and End no longer move focus in the set
|
|
404
|
+
* the arrows, Home and End no longer move focus in the set
|
|
405
405
|
*/
|
|
406
406
|
keyboard: {
|
|
407
407
|
/** Moves focus with the arrows, Home and End again */
|
|
@@ -431,7 +431,7 @@ export interface ChipsComponent {
|
|
|
431
431
|
/**
|
|
432
432
|
* Registers ChipConfig with the global defaults map, so
|
|
433
433
|
* `setComponentDefaults("chip", ...)` is typed without core
|
|
434
|
-
* importing anything from this component.
|
|
434
|
+
* importing anything from this component.
|
|
435
435
|
*/
|
|
436
436
|
declare module "../../core/config/global" {
|
|
437
437
|
interface ComponentConfigMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DatePickerComponent, DatePickerConfig, DatePickerValueOf } from "./types.js";
|
|
2
2
|
/** M3 calendar/input modes share a draft; modal acceptance is the commit boundary. */
|
|
3
3
|
/**
|
|
4
|
-
* The value's type follows a literal selectionMode
|
|
4
|
+
* The value's type follows a literal selectionMode: `'range'` makes
|
|
5
5
|
* it a pair, the default a date.
|
|
6
6
|
*/
|
|
7
7
|
declare const createDatePicker: <M extends string = "single">(config?: DatePickerConfig & {
|
|
@@ -3,17 +3,17 @@ import type { NormalizedEvent } from "../../core/utils/mobile.js";
|
|
|
3
3
|
/** Value returned by the API, including complete ranges and empty selections. */
|
|
4
4
|
export type DatePickerValue = Date | [Date, Date] | null;
|
|
5
5
|
/**
|
|
6
|
-
* The value as the selection mode shapes it
|
|
6
|
+
* The value as the selection mode shapes it: a range is a pair, a
|
|
7
7
|
* single date a date; an unknown mode, either.
|
|
8
8
|
*/
|
|
9
9
|
export type DatePickerValueOf<M> = M extends "range" ? [Date, Date] | null : M extends "single" ? Date | null : DatePickerValue;
|
|
10
|
-
/** What setValue and `value` take: a date, a range as a pair, or as { start, end }
|
|
10
|
+
/** What setValue and `value` take: a date, a range as a pair, or as { start, end }. */
|
|
11
11
|
export type DatePickerInput = Date | string | [Date | string, Date | string] | {
|
|
12
12
|
start: Date | string;
|
|
13
13
|
end: Date | string;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* One shape whatever committed the value
|
|
16
|
+
* One shape whatever committed the value: a range's `value` is the
|
|
17
17
|
* pair, and `rangeEndDate` its end, kept for compatibility (null otherwise).
|
|
18
18
|
* The docked calendar sent the start as the value and the end apart.
|
|
19
19
|
*/
|
|
@@ -23,7 +23,7 @@ export interface DatePickerChangePayload<V = DatePickerValue> {
|
|
|
23
23
|
formattedValue: string;
|
|
24
24
|
/**
|
|
25
25
|
* The value as ISO 8601 text, the `value` of the `<m-datepicker>` element's
|
|
26
|
-
* `change`: a date (`2026-09-10`), a `start/end` interval, or ""
|
|
26
|
+
* `change`: a date (`2026-09-10`), a `start/end` interval, or ""
|
|
27
27
|
*/
|
|
28
28
|
iso: string;
|
|
29
29
|
}
|
|
@@ -141,11 +141,11 @@ export interface DatePickerConfig {
|
|
|
141
141
|
* Accepts a Date object, Date string, or two dates for range selection
|
|
142
142
|
*/
|
|
143
143
|
value?: DatePickerInput;
|
|
144
|
-
/** The value shows and cannot change: no typing, no calendar
|
|
144
|
+
/** The value shows and cannot change: no typing, no calendar. */
|
|
145
145
|
readOnly?: boolean;
|
|
146
|
-
/** A date is required: on the input for forms, and checkValidity()
|
|
146
|
+
/** A date is required: on the input for forms, and checkValidity(). */
|
|
147
147
|
required?: boolean;
|
|
148
|
-
/** The supporting text under the field. Default: the date format
|
|
148
|
+
/** The supporting text under the field. Default: the date format. */
|
|
149
149
|
supportingText?: string;
|
|
150
150
|
/**
|
|
151
151
|
* Minimum selectable date
|
|
@@ -310,11 +310,11 @@ export interface DatePickerComponent<V = DatePickerValue> {
|
|
|
310
310
|
* @returns The datepicker component for chaining
|
|
311
311
|
*/
|
|
312
312
|
setValue: (value: DatePickerInput) => DatePickerComponent<V>;
|
|
313
|
-
/** Read-only: the value shows and cannot change
|
|
313
|
+
/** Read-only: the value shows and cannot change */
|
|
314
314
|
setReadOnly: (readOnly: boolean) => DatePickerComponent<V>;
|
|
315
315
|
/** Whether the picker is read-only */
|
|
316
316
|
isReadOnly: () => boolean;
|
|
317
|
-
/** Whether a date is required
|
|
317
|
+
/** Whether a date is required */
|
|
318
318
|
setRequired: (required: boolean) => DatePickerComponent<V>;
|
|
319
319
|
/**
|
|
320
320
|
* False when a date is required and missing. A dialog variant's input is
|
|
@@ -323,7 +323,7 @@ export interface DatePickerComponent<V = DatePickerValue> {
|
|
|
323
323
|
checkValidity: () => boolean;
|
|
324
324
|
/** As checkValidity(), and shows the error on the field when false */
|
|
325
325
|
reportValidity: () => boolean;
|
|
326
|
-
/** The supporting text; empty or null shows the date format
|
|
326
|
+
/** The supporting text; empty or null shows the date format */
|
|
327
327
|
setSupportingText: (text: string | null) => DatePickerComponent<V>;
|
|
328
328
|
/**
|
|
329
329
|
* Gets the formatted date string based on the selected date(s)
|
|
@@ -395,7 +395,7 @@ export interface DatePickerState {
|
|
|
395
395
|
label: string;
|
|
396
396
|
specialDates: NonNullable<DatePickerConfig["specialDates"]>;
|
|
397
397
|
isAllowed(date: Date): boolean;
|
|
398
|
-
/** Full screen: the first month of the rendered list, and how many follow.
|
|
398
|
+
/** Full screen: the first month of the rendered list, and how many follow. */
|
|
399
399
|
listStart?: Date;
|
|
400
400
|
listLength?: number;
|
|
401
401
|
}
|
|
@@ -79,6 +79,6 @@ export declare const addMonths: (date: Date, months: number) => Date;
|
|
|
79
79
|
export declare const addYears: (date: Date, years: number) => Date;
|
|
80
80
|
/**
|
|
81
81
|
* A value as ISO 8601 text, the `<m-datepicker>` element's value: a date
|
|
82
|
-
* (`2026-09-10`), a `start/end` interval, or ""
|
|
82
|
+
* (`2026-09-10`), a `start/end` interval, or "".
|
|
83
83
|
*/
|
|
84
84
|
export declare const toIsoValue: (value: Date | [Date, Date] | null, end?: Date | null) => string;
|
|
@@ -618,7 +618,7 @@ export interface DialogConfirmOptions {
|
|
|
618
618
|
/**
|
|
619
619
|
* Registers DialogConfig with the global defaults map, so
|
|
620
620
|
* `setComponentDefaults("dialog", ...)` is typed without core
|
|
621
|
-
* importing anything from this component.
|
|
621
|
+
* importing anything from this component.
|
|
622
622
|
*/
|
|
623
623
|
declare module "../../core/config/global" {
|
|
624
624
|
interface ComponentConfigMap {
|
|
@@ -42,7 +42,7 @@ export interface DrawerItemConfig {
|
|
|
42
42
|
export interface DrawerSelectEvent {
|
|
43
43
|
/** The selected item's id */
|
|
44
44
|
id: string;
|
|
45
|
-
/** The id again, as the `value` of the `<m-drawer>` element's `change`
|
|
45
|
+
/** The id again, as the `value` of the `<m-drawer>` element's `change` */
|
|
46
46
|
value: string;
|
|
47
47
|
/** The selected item's label */
|
|
48
48
|
label: string;
|
|
@@ -389,9 +389,9 @@ export interface ExtendedFabEvents extends TouchEvents {
|
|
|
389
389
|
focus: (payload: ForwardedEventPayload<FocusEvent, HTMLButtonElement>) => void;
|
|
390
390
|
/** The button lost focus. */
|
|
391
391
|
blur: (payload: ForwardedEventPayload<FocusEvent, HTMLButtonElement>) => void;
|
|
392
|
-
/** `collapse()` ran, by call or on scroll
|
|
392
|
+
/** `collapse()` ran, by call or on scroll */
|
|
393
393
|
collapse: () => void;
|
|
394
|
-
/** `expand()` ran, by call or on scroll
|
|
394
|
+
/** `expand()` ran, by call or on scroll */
|
|
395
395
|
expand: () => void;
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
@@ -524,7 +524,7 @@ export interface ExtendedFabComponent {
|
|
|
524
524
|
* ```
|
|
525
525
|
*/
|
|
526
526
|
disable: () => ExtendedFabComponent;
|
|
527
|
-
/** Whether the extended FAB is disabled
|
|
527
|
+
/** Whether the extended FAB is disabled */
|
|
528
528
|
isDisabled: () => boolean;
|
|
529
529
|
/**
|
|
530
530
|
* Sets the Extended FAB's icon
|
|
@@ -231,7 +231,6 @@ export interface FabConfig {
|
|
|
231
231
|
/**
|
|
232
232
|
* Accessible name. Required: an icon-only control has no text for a screen
|
|
233
233
|
* reader to announce, so without this it is just "button" (WCAG 4.1.2).
|
|
234
|
-
* FLO-110.
|
|
235
234
|
*/
|
|
236
235
|
ariaLabel: string;
|
|
237
236
|
/**
|
|
@@ -336,7 +335,7 @@ export interface FabConfig {
|
|
|
336
335
|
*
|
|
337
336
|
* `on` and `off` are generic over these keys, so a misspelled event name is a
|
|
338
337
|
* compile error rather than a listener that never fires, and the handler's
|
|
339
|
-
* payload is typed rather than `Function`'s implicit `any`.
|
|
338
|
+
* payload is typed rather than `Function`'s implicit `any`.
|
|
340
339
|
*/
|
|
341
340
|
export interface FabEvents extends TouchEvents {
|
|
342
341
|
/** The FAB was clicked. Not forwarded while the FAB is disabled. */
|
|
@@ -459,7 +458,7 @@ export interface FabComponent {
|
|
|
459
458
|
* ```
|
|
460
459
|
*/
|
|
461
460
|
disable: () => FabComponent;
|
|
462
|
-
/** Whether the FAB is disabled
|
|
461
|
+
/** Whether the FAB is disabled */
|
|
463
462
|
isDisabled: () => boolean;
|
|
464
463
|
/**
|
|
465
464
|
* Sets the FAB's icon
|
|
@@ -81,7 +81,7 @@ export interface FabMenuEvents {
|
|
|
81
81
|
close: () => void;
|
|
82
82
|
/**
|
|
83
83
|
* An item was chosen; the menu closes. `value` is the item's id again, as
|
|
84
|
-
* the `value` of `<m-fab-menu>`'s `select` (the
|
|
84
|
+
* the `value` of `<m-fab-menu>`'s `select` (the payload rule)
|
|
85
85
|
*/
|
|
86
86
|
select: (event: {
|
|
87
87
|
id: string;
|
|
@@ -137,7 +137,6 @@ export interface IconButtonConfig extends BaseComponentConfig {
|
|
|
137
137
|
/**
|
|
138
138
|
* Accessible name. Required: an icon-only control has no text for a screen
|
|
139
139
|
* reader to announce, so without this it is just "button" (WCAG 4.1.2).
|
|
140
|
-
* FLO-110.
|
|
141
140
|
*/
|
|
142
141
|
ariaLabel: string;
|
|
143
142
|
/**
|
|
@@ -196,7 +195,7 @@ export interface ToggleManager {
|
|
|
196
195
|
*/
|
|
197
196
|
isSelected: () => boolean;
|
|
198
197
|
}
|
|
199
|
-
/** A toggle icon button's `change
|
|
198
|
+
/** A toggle icon button's `change`. */
|
|
200
199
|
export interface IconButtonChangePayload {
|
|
201
200
|
/** Whether the button is now selected */
|
|
202
201
|
selected: boolean;
|
|
@@ -209,10 +208,10 @@ export interface IconButtonChangePayload {
|
|
|
209
208
|
*/
|
|
210
209
|
export interface IconButtonEvents extends TouchEvents {
|
|
211
210
|
/**
|
|
212
|
-
* A toggle button's selected state changed on a click
|
|
211
|
+
* A toggle button's selected state changed on a click. The DOM
|
|
213
212
|
* `toggle` event on `element` is deprecated and goes in the next release.
|
|
214
213
|
* `value` is the button's value (`getValue()`), as every model event
|
|
215
|
-
* carries
|
|
214
|
+
* carries; `selected` is the toggled state.
|
|
216
215
|
*/
|
|
217
216
|
change: (payload: IconButtonChangePayload) => void;
|
|
218
217
|
/** Clicks are not forwarded while the button is disabled. */
|
|
@@ -316,7 +315,7 @@ export interface IconButtonComponent {
|
|
|
316
315
|
* @returns The IconButton component for chaining
|
|
317
316
|
*/
|
|
318
317
|
disable: () => IconButtonComponent;
|
|
319
|
-
/** Whether the icon button is disabled
|
|
318
|
+
/** Whether the icon button is disabled */
|
|
320
319
|
isDisabled: () => boolean;
|
|
321
320
|
/**
|
|
322
321
|
* Sets the IconButton's icon
|
|
@@ -13,7 +13,7 @@ export interface SubmenuLoader {
|
|
|
13
13
|
/** True when an item opens a submenu: the only case that needs the feature. */
|
|
14
14
|
export declare const hasNestedItems: (items: MenuContent[] | undefined) => boolean;
|
|
15
15
|
/**
|
|
16
|
-
* Loads the submenu feature on demand
|
|
16
|
+
* Loads the submenu feature on demand.
|
|
17
17
|
*
|
|
18
18
|
* The feature is most of what a menu with nested items adds, and a menu
|
|
19
19
|
* without them never uses it, so it is a chunk of its own rather than part of
|
|
@@ -152,7 +152,7 @@ export interface MenuConfig {
|
|
|
152
152
|
/**
|
|
153
153
|
* The element the menu is placed against, when it is not the opener's: a
|
|
154
154
|
* select's field, so its supporting text row never pushes the menu down
|
|
155
|
-
*
|
|
155
|
+
* The opener still opens, closes and gets focus back.
|
|
156
156
|
*/
|
|
157
157
|
positionTarget?: HTMLElement;
|
|
158
158
|
/**
|
|
@@ -321,7 +321,7 @@ export interface MenuSelectEvent<TData = unknown> extends MenuEvent {
|
|
|
321
321
|
item: MenuItem<TData>;
|
|
322
322
|
/** ID of the selected menu item */
|
|
323
323
|
itemId: string;
|
|
324
|
-
/** The item's id again, as the `value` of the `<m-menu>` element's `select`
|
|
324
|
+
/** The item's id again, as the `value` of the `<m-menu>` element's `select` */
|
|
325
325
|
value: string;
|
|
326
326
|
/** Data associated with the menu item (if any) */
|
|
327
327
|
itemData?: TData;
|
|
@@ -500,7 +500,7 @@ export interface MenuEvents {
|
|
|
500
500
|
*
|
|
501
501
|
* Declared here rather than in features/keyboard.ts so the host below can
|
|
502
502
|
* name it: a host that types its manager methods needs their parameter types
|
|
503
|
-
* in scope.
|
|
503
|
+
* in scope.
|
|
504
504
|
*/
|
|
505
505
|
export interface KeyboardMenuState {
|
|
506
506
|
items: MenuContent[];
|
|
@@ -55,7 +55,7 @@ export interface NavigationBarComponent {
|
|
|
55
55
|
destroy: () => void;
|
|
56
56
|
};
|
|
57
57
|
getActive: () => string | null;
|
|
58
|
-
/** The active destination's id, as getActive(): the value getter every component has
|
|
58
|
+
/** The active destination's id, as getActive(): the value getter every component has */
|
|
59
59
|
getValue: () => string | null;
|
|
60
60
|
/** Marks a destination active, silently (no `select`); `null` clears it */
|
|
61
61
|
setActive: (id: string | null) => NavigationBarComponent;
|
|
@@ -16,7 +16,7 @@ export interface NavigationRailItemConfig {
|
|
|
16
16
|
}
|
|
17
17
|
export interface NavigationRailSelectEvent {
|
|
18
18
|
id: string;
|
|
19
|
-
/** The id again, as the `value` of the `<m-navigation-rail>` element's `change`
|
|
19
|
+
/** The id again, as the `value` of the `<m-navigation-rail>` element's `change` */
|
|
20
20
|
value: string;
|
|
21
21
|
index: number;
|
|
22
22
|
originalEvent: MouseEvent;
|
|
@@ -82,7 +82,7 @@ export interface NavigationRailComponent {
|
|
|
82
82
|
/**
|
|
83
83
|
* Registers NavigationRailConfig with the global defaults map, so
|
|
84
84
|
* `setComponentDefaults("navigation-rail", ...)` is typed without core
|
|
85
|
-
* importing anything from this component.
|
|
85
|
+
* importing anything from this component.
|
|
86
86
|
*/
|
|
87
87
|
declare module "../../core/config/global" {
|
|
88
88
|
interface ComponentConfigMap {
|
|
@@ -291,7 +291,7 @@ export interface ProgressComponent {
|
|
|
291
291
|
painted: () => Promise<void>;
|
|
292
292
|
/**
|
|
293
293
|
* Adds an event listener: `change` when the value is set, `complete` when it
|
|
294
|
-
* reaches the maximum. Handlers get `{ value, max }` (
|
|
294
|
+
* reaches the maximum. Handlers get `{ value, max }` (they got a DOM
|
|
295
295
|
* CustomEvent, the payload in `event.detail`).
|
|
296
296
|
*/
|
|
297
297
|
on: <K extends keyof ProgressEvents>(event: K, handler: ProgressEvents[K]) => ProgressComponent;
|
|
@@ -160,7 +160,7 @@ export interface RadiosComponent {
|
|
|
160
160
|
* @returns The radios component for chaining
|
|
161
161
|
*/
|
|
162
162
|
disable: () => RadiosComponent;
|
|
163
|
-
/** Whether the whole group is disabled
|
|
163
|
+
/** Whether the whole group is disabled */
|
|
164
164
|
isDisabled: () => boolean;
|
|
165
165
|
/**
|
|
166
166
|
* Enables a specific radio option
|