material 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/badge/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/features/scroll.js +33 -33
- package/dist/components/carousel/keylines.d.ts +8 -5
- package/dist/components/carousel/keylines.js +23 -21
- 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/css/tooltip.css +1 -1
- package/dist/elements/css/tooltip.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 +2 -2
- 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 +35 -74
- 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
|
@@ -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
|
|
@@ -11,7 +11,7 @@ export type SearchState = "bar" | "view";
|
|
|
11
11
|
*/
|
|
12
12
|
export type SearchViewMode = "docked" | "fullscreen";
|
|
13
13
|
/**
|
|
14
|
-
* Search variant, M3's style
|
|
14
|
+
* Search variant, M3's style
|
|
15
15
|
* - 'contained': M3 Expressive. The bar keeps its pill and filled container
|
|
16
16
|
* when focused, and the results sit in their own container
|
|
17
17
|
* - 'divided': the baseline. The bar squares off and a divider separates the
|
|
@@ -51,7 +51,7 @@ export interface SearchSuggestion {
|
|
|
51
51
|
value?: string;
|
|
52
52
|
/** Optional leading icon HTML. Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
|
|
53
53
|
icon?: string;
|
|
54
|
-
/** A second line under the text: a two-line list item
|
|
54
|
+
/** A second line under the text: a two-line list item */
|
|
55
55
|
supportingText?: string;
|
|
56
56
|
/** Optional group identifier for dividers */
|
|
57
57
|
group?: string;
|
|
@@ -168,7 +168,7 @@ export interface SearchConfig {
|
|
|
168
168
|
export interface SearchComponent {
|
|
169
169
|
/** The root element of the search component */
|
|
170
170
|
element: HTMLElement;
|
|
171
|
-
/** Sets the search input value. Silent unless `triggerEvent` is true
|
|
171
|
+
/** Sets the search input value. Silent unless `triggerEvent` is true. */
|
|
172
172
|
setValue: (value: string, triggerEvent?: boolean) => SearchComponent;
|
|
173
173
|
/** Gets the current search input value */
|
|
174
174
|
getValue: () => string;
|
|
@@ -234,7 +234,7 @@ export interface SearchComponent {
|
|
|
234
234
|
export interface SearchStructure {
|
|
235
235
|
/**
|
|
236
236
|
* The bar and, when expanded, its results: what shows in the top layer while
|
|
237
|
-
* the view is open
|
|
237
|
+
* the view is open
|
|
238
238
|
*/
|
|
239
239
|
surface: HTMLElement;
|
|
240
240
|
/** Main container element */
|
|
@@ -255,7 +255,7 @@ export interface SearchStructure {
|
|
|
255
255
|
suggestionsContainer: HTMLElement | null;
|
|
256
256
|
/** Suggestions list element */
|
|
257
257
|
suggestionsList: HTMLElement | null;
|
|
258
|
-
/** The live region that announces the suggestion count
|
|
258
|
+
/** The live region that announces the suggestion count */
|
|
259
259
|
status: HTMLElement;
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
@@ -80,7 +80,7 @@ export declare const SELECT_DEFAULTS: {
|
|
|
80
80
|
export declare const SELECT_CLASSES: {
|
|
81
81
|
/** Container element */
|
|
82
82
|
readonly CONTAINER: "select";
|
|
83
|
-
/** The text field (
|
|
83
|
+
/** The text field (the key is two words; the value is select__text-field) */
|
|
84
84
|
readonly TEXT_FIELD: "select__text-field";
|
|
85
85
|
/** Dropdown icon */
|
|
86
86
|
readonly DROPDOWN_ICON: "select__dropdown-icon";
|
|
@@ -251,7 +251,7 @@ export interface SelectComponent {
|
|
|
251
251
|
* @returns Select component for chaining
|
|
252
252
|
*/
|
|
253
253
|
disable: () => SelectComponent;
|
|
254
|
-
/** Whether the select is disabled
|
|
254
|
+
/** Whether the select is disabled */
|
|
255
255
|
isDisabled: () => boolean;
|
|
256
256
|
/**
|
|
257
257
|
* Sets the error state on the select
|
|
@@ -4,7 +4,7 @@ import type { ApiOptions } from "./api.js";
|
|
|
4
4
|
import { SliderSize } from "./constants.js";
|
|
5
5
|
/**
|
|
6
6
|
* The root's size modifier: none for the default XS, the lowercase name otherwise, or
|
|
7
|
-
* the pixel height for a numeric size. Shared with setSize, which swaps it.
|
|
7
|
+
* the pixel height for a numeric size. Shared with setSize, which swaps it.
|
|
8
8
|
*/
|
|
9
9
|
export declare const sliderSizeClass: (size: SliderSize) => string;
|
|
10
10
|
/**
|
|
@@ -5,7 +5,7 @@ import type { SliderConfig } from "../types.js";
|
|
|
5
5
|
* layout direction is RTL). Vertical runs bottom to top -- "zero is at the bottom"
|
|
6
6
|
* (m3.material.io slider guidelines) -- unless `topToBottom` is set, the flag
|
|
7
7
|
* Compose's VerticalSlider takes; Compose defaults it to true, the site to the
|
|
8
|
-
* opposite, and the site wins.
|
|
8
|
+
* opposite, and the site wins.
|
|
9
9
|
*
|
|
10
10
|
* `start` is the CSS property a position along the track is written to, `size` the
|
|
11
11
|
* one a length along it is, and `cross` the thickness.
|
|
@@ -12,7 +12,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
12
12
|
/**
|
|
13
13
|
* Sets slider value
|
|
14
14
|
* @param value New value
|
|
15
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
15
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
16
16
|
* @returns Slider controller for chaining
|
|
17
17
|
*/
|
|
18
18
|
setValue(value: number, triggerEvent?: boolean): {
|
|
@@ -25,7 +25,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
25
25
|
/**
|
|
26
26
|
* Sets secondary slider value (for range slider)
|
|
27
27
|
* @param value New secondary value
|
|
28
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
28
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
29
29
|
* @returns Slider controller for chaining
|
|
30
30
|
*/
|
|
31
31
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -87,14 +87,14 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
87
87
|
/**
|
|
88
88
|
* Sets secondary slider value (for range slider)
|
|
89
89
|
* @param value New secondary value
|
|
90
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
90
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
91
91
|
* @returns Slider controller for chaining
|
|
92
92
|
*/
|
|
93
93
|
setSecondValue(value: number, triggerEvent?: boolean): {
|
|
94
94
|
/**
|
|
95
95
|
* Sets slider value
|
|
96
96
|
* @param value New value
|
|
97
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
97
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
98
98
|
* @returns Slider controller for chaining
|
|
99
99
|
*/
|
|
100
100
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -168,7 +168,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
168
168
|
/**
|
|
169
169
|
* Sets slider value
|
|
170
170
|
* @param value New value
|
|
171
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
171
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
172
172
|
* @returns Slider controller for chaining
|
|
173
173
|
*/
|
|
174
174
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -180,7 +180,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
180
180
|
/**
|
|
181
181
|
* Sets secondary slider value (for range slider)
|
|
182
182
|
* @param value New secondary value
|
|
183
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
183
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
184
184
|
* @returns Slider controller for chaining
|
|
185
185
|
*/
|
|
186
186
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -243,7 +243,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
243
243
|
/**
|
|
244
244
|
* Sets slider value
|
|
245
245
|
* @param value New value
|
|
246
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
246
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
247
247
|
* @returns Slider controller for chaining
|
|
248
248
|
*/
|
|
249
249
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -255,7 +255,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
255
255
|
/**
|
|
256
256
|
* Sets secondary slider value (for range slider)
|
|
257
257
|
* @param value New secondary value
|
|
258
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
258
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
259
259
|
* @returns Slider controller for chaining
|
|
260
260
|
*/
|
|
261
261
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -318,7 +318,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
318
318
|
/**
|
|
319
319
|
* Sets slider value
|
|
320
320
|
* @param value New value
|
|
321
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
321
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
322
322
|
* @returns Slider controller for chaining
|
|
323
323
|
*/
|
|
324
324
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -330,7 +330,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
330
330
|
/**
|
|
331
331
|
* Sets secondary slider value (for range slider)
|
|
332
332
|
* @param value New secondary value
|
|
333
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
333
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
334
334
|
* @returns Slider controller for chaining
|
|
335
335
|
*/
|
|
336
336
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -393,7 +393,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
393
393
|
/**
|
|
394
394
|
* Sets slider value
|
|
395
395
|
* @param value New value
|
|
396
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
396
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
397
397
|
* @returns Slider controller for chaining
|
|
398
398
|
*/
|
|
399
399
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -405,7 +405,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
405
405
|
/**
|
|
406
406
|
* Sets secondary slider value (for range slider)
|
|
407
407
|
* @param value New secondary value
|
|
408
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
408
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
409
409
|
* @returns Slider controller for chaining
|
|
410
410
|
*/
|
|
411
411
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -462,7 +462,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
462
462
|
/**
|
|
463
463
|
* Sets slider value
|
|
464
464
|
* @param value New value
|
|
465
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
465
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
466
466
|
* @returns Slider controller for chaining
|
|
467
467
|
*/
|
|
468
468
|
setValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -474,7 +474,7 @@ export declare const withController: (config: SliderConfig, getComponent: () =>
|
|
|
474
474
|
/**
|
|
475
475
|
* Sets secondary slider value (for range slider)
|
|
476
476
|
* @param value New secondary value
|
|
477
|
-
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
477
|
+
* @param triggerEvent Emits `change` when true; silent by default, as a native input
|
|
478
478
|
* @returns Slider controller for chaining
|
|
479
479
|
*/
|
|
480
480
|
setSecondValue(value: number, triggerEvent?: boolean): /*elided*/ any;
|
|
@@ -336,7 +336,7 @@ export interface SliderComponent {
|
|
|
336
336
|
/**
|
|
337
337
|
* Registers SliderConfig with the global defaults map, so
|
|
338
338
|
* `setComponentDefaults("slider", ...)` is typed without core
|
|
339
|
-
* importing anything from this component.
|
|
339
|
+
* importing anything from this component.
|
|
340
340
|
*/
|
|
341
341
|
declare module "../../core/config/global" {
|
|
342
342
|
interface ComponentConfigMap {
|
|
@@ -44,7 +44,7 @@ export interface SnackbarEvent {
|
|
|
44
44
|
/**
|
|
45
45
|
* What each snackbar event hands its handler.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* `on`/`off` are generic over these keys rather than taking a
|
|
48
48
|
* `SnackbarEventType` and one payload type for all four, so a handler is
|
|
49
49
|
* checked against the event it is registered for. The four payloads are the
|
|
50
50
|
* same shape today; the map is what makes them able to differ -- `reason` is
|
|
@@ -43,7 +43,7 @@ export interface SupportingTextComponent extends BaseComponent {
|
|
|
43
43
|
* @returns Component instance for chaining
|
|
44
44
|
*/
|
|
45
45
|
removeSupportingText: () => SupportingTextComponent;
|
|
46
|
-
/** Puts the switch in or out of the error state
|
|
46
|
+
/** Puts the switch in or out of the error state */
|
|
47
47
|
setError: (error: boolean) => SupportingTextComponent;
|
|
48
48
|
/** Whether the switch is in the error state */
|
|
49
49
|
isError: () => boolean;
|
|
@@ -37,7 +37,7 @@ export interface SwitchConfig {
|
|
|
37
37
|
icon?: string;
|
|
38
38
|
/**
|
|
39
39
|
* Icon HTML in the unselected handle, which then grows to 24dp (M3's icons on
|
|
40
|
-
* both states).
|
|
40
|
+
* both states).
|
|
41
41
|
*/
|
|
42
42
|
unselectedIcon?: string;
|
|
43
43
|
/**
|
|
@@ -59,7 +59,7 @@ export interface SwitchChangePayload {
|
|
|
59
59
|
/** The original native change event, when supplied by the emitter. */
|
|
60
60
|
nativeEvent?: Event;
|
|
61
61
|
}
|
|
62
|
-
/** Emitter events: change, and the input's focus and blur
|
|
62
|
+
/** Emitter events: change, and the input's focus and blur. */
|
|
63
63
|
export interface SwitchEvents extends TouchEvents {
|
|
64
64
|
change: (payload: SwitchChangePayload) => void;
|
|
65
65
|
focus: (event: FocusEvent) => void;
|
|
@@ -99,7 +99,7 @@ export interface SwitchComponent {
|
|
|
99
99
|
setSupportingText: (text: string, isError?: boolean) => SwitchComponent;
|
|
100
100
|
/** Removes supporting text */
|
|
101
101
|
removeSupportingText: () => SwitchComponent;
|
|
102
|
-
/** Puts the switch in or out of the error state: its class and aria-invalid
|
|
102
|
+
/** Puts the switch in or out of the error state: its class and aria-invalid */
|
|
103
103
|
setError: (error: boolean) => SwitchComponent;
|
|
104
104
|
/** Whether the switch is in the error state */
|
|
105
105
|
isError: () => boolean;
|
|
@@ -111,7 +111,7 @@ export interface SwitchComponent {
|
|
|
111
111
|
enable: () => SwitchComponent;
|
|
112
112
|
/** Disables the switch */
|
|
113
113
|
disable: () => SwitchComponent;
|
|
114
|
-
/** Whether the switch is disabled
|
|
114
|
+
/** Whether the switch is disabled */
|
|
115
115
|
isDisabled: () => boolean;
|
|
116
116
|
/** Destroys the switch component and cleans up resources */
|
|
117
117
|
destroy: () => void;
|
|
@@ -182,7 +182,7 @@ export type ApiComponent = BaseComponent & Required<Pick<BaseComponent, "checkab
|
|
|
182
182
|
/**
|
|
183
183
|
* Registers SwitchConfig with the global defaults map, so
|
|
184
184
|
* `setComponentDefaults("switch", ...)` is typed without core
|
|
185
|
-
* importing anything from this component.
|
|
185
|
+
* importing anything from this component.
|
|
186
186
|
*/
|
|
187
187
|
declare module "../../core/config/global" {
|
|
188
188
|
interface ComponentConfigMap {
|
|
@@ -16,7 +16,7 @@ interface ComponentBase {
|
|
|
16
16
|
export interface TabsManagementConfig {
|
|
17
17
|
/** Initial tabs to create */
|
|
18
18
|
tabs?: TabConfig[];
|
|
19
|
-
/** Id for this tab group; allocated when omitted.
|
|
19
|
+
/** Id for this tab group; allocated when omitted. */
|
|
20
20
|
groupId?: string;
|
|
21
21
|
/** Tab variant */
|
|
22
22
|
variant?: string;
|
|
@@ -41,7 +41,7 @@ export interface ResponsiveConfig {
|
|
|
41
41
|
*
|
|
42
42
|
* Every update reads the group's tabs and each tab's content as they are then,
|
|
43
43
|
* so tabs added later and labels or icons changed later follow the layout; it
|
|
44
|
-
* held a snapshot taken at setup and restored layouts from it.
|
|
44
|
+
* held a snapshot taken at setup and restored layouts from it.
|
|
45
45
|
* @param tabs - The tabs component to enhance
|
|
46
46
|
* @param config - Responsive configuration
|
|
47
47
|
*/
|
|
@@ -63,7 +63,7 @@ export interface TabChangeEventData {
|
|
|
63
63
|
*
|
|
64
64
|
* `click` is not the DOM click. The tab re-emits the payload its button
|
|
65
65
|
* already forwarded (`{ event, element, originalEvent }`). `focus` and `blur`
|
|
66
|
-
* are the native events from the button element.
|
|
66
|
+
* are the native events from the button element.
|
|
67
67
|
*/
|
|
68
68
|
export interface TabEvents {
|
|
69
69
|
click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
@@ -72,7 +72,7 @@ export interface TabEvents {
|
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Events a tabs group emits. A click or a key selects a tab and emits
|
|
75
|
-
* `change`; selecting from code does not.
|
|
75
|
+
* `change`; selecting from code does not.
|
|
76
76
|
*/
|
|
77
77
|
export interface TabsEvents {
|
|
78
78
|
change: (event: TabChangeEventData) => void;
|
|
@@ -85,13 +85,13 @@ export interface TabConfig {
|
|
|
85
85
|
/**
|
|
86
86
|
* Id of the tab group this tab belongs to. Set by the group when it builds
|
|
87
87
|
* its tabs; a tab created on its own gets an empty one, which still yields
|
|
88
|
-
* a stable id. It is what makes tab ids unique across tablists.
|
|
88
|
+
* a stable id. It is what makes tab ids unique across tablists.
|
|
89
89
|
* @internal
|
|
90
90
|
*/
|
|
91
91
|
groupId?: string;
|
|
92
92
|
/**
|
|
93
93
|
* Accessible name for a tab with an icon and no text, which otherwise has
|
|
94
|
-
* none.
|
|
94
|
+
* none.
|
|
95
95
|
*/
|
|
96
96
|
ariaLabel?: string;
|
|
97
97
|
/**
|
|
@@ -181,18 +181,17 @@ export interface TabsConfig {
|
|
|
181
181
|
* `tab-<groupId>-<value>` and to find panels as
|
|
182
182
|
* `tabpanel-<groupId>-<value>`; a value with characters outside
|
|
183
183
|
* `[A-Za-z0-9_-]` gets a derived id instead (`tabIdFor`, `tabPanelIdFor`,
|
|
184
|
-
*
|
|
184
|
+
* The group id itself is not encoded: keep a pinned one to
|
|
185
185
|
* `[A-Za-z0-9_]` (generated ones are), or `tabIdFor("a-b", "c")` and
|
|
186
186
|
* `tabIdFor("a", "b-c")` coincide and a space makes an unsafe id. Allocated
|
|
187
187
|
* automatically when omitted; pin it when a page needs ids that survive a
|
|
188
|
-
* re-render.
|
|
188
|
+
* re-render.
|
|
189
189
|
*/
|
|
190
190
|
groupId?: string;
|
|
191
191
|
/**
|
|
192
192
|
* Whether an arrow key also selects the tab it moves to. By default it only
|
|
193
193
|
* moves focus, and Space or Enter selects, as m3.material.io's tabs
|
|
194
194
|
* accessibility guidance has it: "Don't use Space/Enter for navigating tabs".
|
|
195
|
-
* FLO-263.
|
|
196
195
|
* @default false
|
|
197
196
|
*/
|
|
198
197
|
autoActivate?: boolean;
|
|
@@ -314,7 +313,7 @@ export interface TabComponent {
|
|
|
314
313
|
enable: () => TabComponent;
|
|
315
314
|
/** Disables the tab (adds disabled attribute) */
|
|
316
315
|
disable: () => TabComponent;
|
|
317
|
-
/** Whether the tab is disabled
|
|
316
|
+
/** Whether the tab is disabled */
|
|
318
317
|
isDisabled: () => boolean;
|
|
319
318
|
/** Sets the tab's text content */
|
|
320
319
|
setText: (content: string) => TabComponent;
|
|
@@ -19,7 +19,7 @@ export declare function getActiveTab(component: TabsHost): TabComponent | null;
|
|
|
19
19
|
/**
|
|
20
20
|
* A fresh id for a tab group, so two tablists can share tab values.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* A tab's id was `tab-<value>`, which meant two groups on one page
|
|
23
23
|
* with a value in common produced duplicate ids -- and, because panels were
|
|
24
24
|
* resolved across the whole document, each group showed and hid the other's
|
|
25
25
|
* panels. The group id is what makes both unique.
|
|
@@ -27,18 +27,18 @@ export declare function getActiveTab(component: TabsHost): TabComponent | null;
|
|
|
27
27
|
export declare function allocateTabsGroupId(): string;
|
|
28
28
|
/**
|
|
29
29
|
* A tab's element id within its group: `tab-<groupId>-<value>` for a value of
|
|
30
|
-
* `[A-Za-z0-9_-]`, and `tabx-<groupId>-<encoded value>` otherwise
|
|
30
|
+
* `[A-Za-z0-9_-]`, and `tabx-<groupId>-<encoded value>` otherwise.
|
|
31
31
|
*/
|
|
32
32
|
export declare const tabIdFor: (groupId: string, value: string) => string;
|
|
33
33
|
/**
|
|
34
34
|
* The panel id a group looks for when a page does not label its panels:
|
|
35
35
|
* `tabpanel-<groupId>-<value>`, or `tabpanelx-<groupId>-<encoded value>` for a
|
|
36
|
-
* value with other characters, as {@link tabIdFor} derives the tab's
|
|
36
|
+
* value with other characters, as {@link tabIdFor} derives the tab's.
|
|
37
37
|
*/
|
|
38
38
|
export declare const tabPanelIdFor: (groupId: string, value: string) => string;
|
|
39
39
|
/**
|
|
40
40
|
* Records a tab's value and group on its element: the value as `data-value`,
|
|
41
|
-
* which the panel lookup reads instead of parsing the id
|
|
41
|
+
* which the panel lookup reads instead of parsing the id.
|
|
42
42
|
*/
|
|
43
43
|
export declare function registerTab(element: HTMLElement, groupId: string, value: string): void;
|
|
44
44
|
/**
|
|
@@ -78,7 +78,7 @@ export declare function syncTabStops(component: TabsHost): void;
|
|
|
78
78
|
* with it; Space or Enter, through the native button, selects the focused tab.
|
|
79
79
|
* That is m3.material.io's model ("Don't use Space/Enter for navigating tabs")
|
|
80
80
|
* and material-web's default. `autoActivate` selects on every move instead. When
|
|
81
|
-
* focus leaves the tablist, the tab stop returns to the selected tab.
|
|
81
|
+
* focus leaves the tablist, the tab stop returns to the selected tab.
|
|
82
82
|
* @param component - Tabs component
|
|
83
83
|
* @param options - `autoActivate`: select the tab an arrow key moves to
|
|
84
84
|
*/
|
|
@@ -55,7 +55,7 @@ declare const TEXT_FIELD_EVENTS: {
|
|
|
55
55
|
readonly FOCUS: "focus";
|
|
56
56
|
/** Fired when text field loses focus */
|
|
57
57
|
readonly BLUR: "blur";
|
|
58
|
-
/** Fired when the trailing icon button is activated (`trailingIconLabel
|
|
58
|
+
/** Fired when the trailing icon button is activated (`trailingIconLabel`) */
|
|
59
59
|
readonly TRAILING: "trailing";
|
|
60
60
|
/** Legacy name, not emitted; listen for keydown on the input and check key === "Enter" */
|
|
61
61
|
readonly ENTER: "enter";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementComponent } from "../../../core/compose/component.js";
|
|
2
2
|
/**
|
|
3
|
-
* The character counter
|
|
3
|
+
* The character counter: at the end of the supporting text row
|
|
4
4
|
* whenever the input has a `maxlength`, as Material Web shows it, reading
|
|
5
5
|
* `count/max`. It describes the input, so a screen reader hears it with the
|
|
6
6
|
* field when it is focused rather than on every keystroke. It follows the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ElementComponent } from "../../../core/compose/component.js";
|
|
2
2
|
/**
|
|
3
|
-
* The text field's anatomy, as M3 draws it
|
|
3
|
+
* The text field's anatomy, as M3 draws it: the root holds the
|
|
4
4
|
* field — the 56dp container with its label, input, outline, icons and
|
|
5
5
|
* affixes — and, under it, the supporting text row with the helper at the
|
|
6
6
|
* start and the character counter at the end. The row is in the flow, so a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseComponent, ElementComponent } from "../../../core/compose/component.js";
|
|
2
2
|
import type { LabelManager } from "../../../core/compose/features/textlabel.js";
|
|
3
3
|
/**
|
|
4
|
-
* A required field's asterisk
|
|
4
|
+
* A required field's asterisk. M3's text field guidelines mark a
|
|
5
5
|
* required field with an asterisk after its label, and Material's own web
|
|
6
6
|
* text field appends it to the label text in the label's colour. Here it is a
|
|
7
7
|
* span after the text, hidden from screen readers: the input's native
|