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
|
@@ -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
|
|
@@ -9,7 +9,7 @@ interface InputElementComponent extends ElementComponent {
|
|
|
9
9
|
destroy: () => void;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
/** What an interactive trailing icon's `trailing` event carries
|
|
12
|
+
/** What an interactive trailing icon's `trailing` event carries */
|
|
13
13
|
export interface TextFieldTrailingPayload {
|
|
14
14
|
/** The field's value when the icon was activated */
|
|
15
15
|
value: string;
|
|
@@ -26,7 +26,7 @@ export interface TrailingIconConfig {
|
|
|
26
26
|
trailingIcon?: string;
|
|
27
27
|
/**
|
|
28
28
|
* Makes the trailing icon a button with this accessible name: clear, show
|
|
29
|
-
* password, open a menu
|
|
29
|
+
* password, open a menu. M3 draws an interactive trailing icon as an
|
|
30
30
|
* icon button, as Compose's trailing slot holds an `IconButton`: a 40dp state
|
|
31
31
|
* layer and a 48dp target. Activating it emits `trailing`. Without a label the
|
|
32
32
|
* icon is decorative.
|
|
@@ -62,11 +62,11 @@ export interface TextFieldConfig {
|
|
|
62
62
|
value?: string;
|
|
63
63
|
/** Placeholder text */
|
|
64
64
|
placeholder?: string;
|
|
65
|
-
/** Whether input is required; the label gets an asterisk
|
|
65
|
+
/** Whether input is required; the label gets an asterisk */
|
|
66
66
|
required?: boolean;
|
|
67
67
|
/**
|
|
68
68
|
* No asterisk on a required field: M3 lets a form whose fields are mostly
|
|
69
|
-
* required mark its optional ones instead
|
|
69
|
+
* required mark its optional ones instead
|
|
70
70
|
*/
|
|
71
71
|
noAsterisk?: boolean;
|
|
72
72
|
/** Whether text field is disabled */
|
|
@@ -87,7 +87,7 @@ export interface TextFieldConfig {
|
|
|
87
87
|
* Makes the trailing icon a button with this accessible name (clear, show
|
|
88
88
|
* password, …), emitting `trailing` when activated. Without it the icon is
|
|
89
89
|
* decorative. M3 draws an interactive trailing icon as an icon button, as
|
|
90
|
-
* Compose's trailing slot holds an `IconButton
|
|
90
|
+
* Compose's trailing slot holds an `IconButton`.
|
|
91
91
|
*/
|
|
92
92
|
trailingIconLabel?: string;
|
|
93
93
|
/** `trailing` listener registered at creation. */
|
|
@@ -119,7 +119,7 @@ export interface TextFieldFocusPayload {
|
|
|
119
119
|
}
|
|
120
120
|
/** Events emitted by the text input feature. setValue() is silent. */
|
|
121
121
|
export interface TextFieldEvents {
|
|
122
|
-
/** The trailing icon button was activated (`trailingIconLabel
|
|
122
|
+
/** The trailing icon button was activated (`trailingIconLabel`) */
|
|
123
123
|
trailing: (payload: TextFieldTrailingPayload) => void;
|
|
124
124
|
input: (payload: TextFieldValuePayload) => void;
|
|
125
125
|
change: (payload: TextFieldValuePayload) => void;
|
|
@@ -134,7 +134,7 @@ export interface TextFieldComponent {
|
|
|
134
134
|
element: HTMLElement;
|
|
135
135
|
/**
|
|
136
136
|
* The container: label, input, outline, icons and affixes, above the
|
|
137
|
-
* supporting text row. Anchor popovers to it
|
|
137
|
+
* supporting text row. Anchor popovers to it.
|
|
138
138
|
*/
|
|
139
139
|
field: HTMLElement;
|
|
140
140
|
/** The input element */
|
|
@@ -173,7 +173,7 @@ export interface TextFieldComponent {
|
|
|
173
173
|
setTrailingIcon: (html: string, label?: string) => TextFieldComponent;
|
|
174
174
|
/** Removes the trailing icon */
|
|
175
175
|
removeTrailingIcon: () => TextFieldComponent;
|
|
176
|
-
/** Makes the field required or optional, the label's asterisk with it
|
|
176
|
+
/** Makes the field required or optional, the label's asterisk with it */
|
|
177
177
|
setRequired: (required: boolean) => TextFieldComponent;
|
|
178
178
|
/** Whether the field is required */
|
|
179
179
|
isRequired: () => boolean;
|
|
@@ -213,7 +213,7 @@ export interface TextFieldComponent {
|
|
|
213
213
|
enable: () => TextFieldComponent;
|
|
214
214
|
/** Disables the text field */
|
|
215
215
|
disable: () => TextFieldComponent;
|
|
216
|
-
/** Whether the text field is disabled
|
|
216
|
+
/** Whether the text field is disabled */
|
|
217
217
|
isDisabled: () => boolean;
|
|
218
218
|
/** Destroys the text field component and cleans up resources */
|
|
219
219
|
destroy: () => void;
|
|
@@ -285,7 +285,7 @@ export interface BaseComponent {
|
|
|
285
285
|
/**
|
|
286
286
|
* Registers TextFieldConfig with the global defaults map, so
|
|
287
287
|
* `setComponentDefaults("text-field", ...)` is typed without core
|
|
288
|
-
* importing anything from this component.
|
|
288
|
+
* importing anything from this component.
|
|
289
289
|
*/
|
|
290
290
|
declare module "../../core/config/global" {
|
|
291
291
|
interface ComponentConfigMap {
|
|
@@ -10,7 +10,7 @@ export interface DialOptions {
|
|
|
10
10
|
*/
|
|
11
11
|
onSelect: (value: number, final: boolean, pointer: boolean) => void;
|
|
12
12
|
/**
|
|
13
|
-
* Whether a value can be picked (minTime, maxTime and the steps
|
|
13
|
+
* Whether a value can be picked (minTime, maxTime and the steps).
|
|
14
14
|
* Numbers it rejects are disabled; all can be picked without it.
|
|
15
15
|
*/
|
|
16
16
|
allowed?: (selector: DialSelector, value: number) => boolean;
|
|
@@ -23,7 +23,7 @@ export interface Dial {
|
|
|
23
23
|
/** How a value on the dial is named: "9 o'clock", "20 hours", "15 minutes". */
|
|
24
24
|
export declare const nameFor: (selector: DialSelector, format: TimeFormat, value: number) => string;
|
|
25
25
|
/**
|
|
26
|
-
* The clock dial, in the DOM
|
|
26
|
+
* The clock dial, in the DOM. It was a canvas: hidden from assistive
|
|
27
27
|
* tech, unreachable by keyboard, click-only, and coloured from the document root.
|
|
28
28
|
*
|
|
29
29
|
* The face is a listbox of its labelled numbers. The arrows move between them and
|
|
@@ -25,7 +25,7 @@ export interface TimePickerEvents {
|
|
|
25
25
|
/**
|
|
26
26
|
* The committed 24-hour value (HH:MM, or HH:MM:SS with showSeconds), also
|
|
27
27
|
* submitted by the form: once when OK commits a different time. setValue is
|
|
28
|
-
* silent
|
|
28
|
+
* silent. Moves on the dial or in the fields are `input`.
|
|
29
29
|
*/
|
|
30
30
|
change: (event: TimePickerValueEvent) => void;
|
|
31
31
|
/** The committed value and draft as the dial, fields or AM/PM change. */
|
|
@@ -35,7 +35,7 @@ export interface TimePickerEvents {
|
|
|
35
35
|
open: () => void;
|
|
36
36
|
close: () => void;
|
|
37
37
|
cancel: () => void;
|
|
38
|
-
/** Root events; the dialog is inside the root
|
|
38
|
+
/** Root events; the dialog is inside the root, so its clicks and keys reach these too. */
|
|
39
39
|
click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
|
|
40
40
|
keydown: (payload: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
|
|
41
41
|
tap: (payload: TimePickerTapPayload) => void;
|
|
@@ -71,7 +71,7 @@ export declare enum TIME_FORMAT {
|
|
|
71
71
|
/** 24-hour format */
|
|
72
72
|
MILITARY = "24h"
|
|
73
73
|
}
|
|
74
|
-
/** A time format as the enum or its string value, `'12h'` or `'24h'`
|
|
74
|
+
/** A time format as the enum or its string value, `'12h'` or `'24h'` */
|
|
75
75
|
export type TimeFormat = TIME_FORMAT | `${TIME_FORMAT}`;
|
|
76
76
|
/** A time picker type as the enum or its string value, `'dial'` or `'input'` */
|
|
77
77
|
export type TimePickerType = TIME_PICKER_TYPE | `${TIME_PICKER_TYPE}`;
|
|
@@ -181,18 +181,18 @@ export interface TimePickerConfig {
|
|
|
181
181
|
* Whether the time picker is open when the factory returns: `isOpen()` is
|
|
182
182
|
* true and `open` has been emitted (to `onOpen`). Its surface is shown a
|
|
183
183
|
* task later, in the place the picker has been put by then, or in the body.
|
|
184
|
-
* It was `isOpen`, the name of the method that reads the state
|
|
184
|
+
* It was `isOpen`, the name of the method that reads the state.
|
|
185
185
|
* @default false
|
|
186
186
|
*/
|
|
187
187
|
open?: boolean;
|
|
188
188
|
/**
|
|
189
|
-
* Whether the picker is disabled: it does not open
|
|
189
|
+
* Whether the picker is disabled: it does not open
|
|
190
190
|
* @default false
|
|
191
191
|
*/
|
|
192
192
|
disabled?: boolean;
|
|
193
193
|
/**
|
|
194
194
|
* Where the dialog is appended. By default it stays in the component's own
|
|
195
|
-
* element, as the other modals' do
|
|
195
|
+
* element, as the other modals' do; it was document.body.
|
|
196
196
|
* @default the component's element
|
|
197
197
|
*/
|
|
198
198
|
container?: string | HTMLElement;
|
|
@@ -211,7 +211,7 @@ export interface TimePickerConfig {
|
|
|
211
211
|
onChange?: TimePickerEvents["change"];
|
|
212
212
|
/**
|
|
213
213
|
* `input` listener registered at creation, as the draft changes while the
|
|
214
|
-
* picker is open
|
|
214
|
+
* picker is open.
|
|
215
215
|
*/
|
|
216
216
|
onInput?: TimePickerEvents["input"];
|
|
217
217
|
/**
|
|
@@ -243,7 +243,7 @@ export interface TimePickerConfig {
|
|
|
243
243
|
* @internal
|
|
244
244
|
*/
|
|
245
245
|
export type ResolvedTimePickerConfig = TimePickerConfig & Required<Pick<TimePickerConfig, "type" | "format" | "orientation" | "showSeconds" | "minuteStep" | "secondStep" | "cancelText" | "confirmText" | "open" | "clockIcon" | "keyboardIcon" | "prefix">> & {
|
|
246
|
-
/** The dialog title's id, unique per picker
|
|
246
|
+
/** The dialog title's id, unique per picker. */
|
|
247
247
|
titleId?: string;
|
|
248
248
|
};
|
|
249
249
|
/**
|
|
@@ -350,7 +350,7 @@ export interface TimePickerComponent {
|
|
|
350
350
|
* @returns Current title text
|
|
351
351
|
*/
|
|
352
352
|
getTitle: () => string;
|
|
353
|
-
/** Enables the picker
|
|
353
|
+
/** Enables the picker */
|
|
354
354
|
enable: () => TimePickerComponent;
|
|
355
355
|
/** Disables the picker: it does not open, and an open one is cancelled */
|
|
356
356
|
disable: () => TimePickerComponent;
|
|
@@ -27,7 +27,7 @@ export interface TimeLimits {
|
|
|
27
27
|
max: number;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* The limits `minTime` and `maxTime` set
|
|
30
|
+
* The limits `minTime` and `maxTime` set. Missing or invalid bounds
|
|
31
31
|
* leave the day open at that end.
|
|
32
32
|
*/
|
|
33
33
|
export declare const limitsOf: (minTime?: string, maxTime?: string) => TimeLimits;
|
|
@@ -38,7 +38,7 @@ export declare const secondsOfTime: (time: TimeValue) => number;
|
|
|
38
38
|
/**
|
|
39
39
|
* The nearest selectable time: inside the limits and on the minute and second
|
|
40
40
|
* steps. A time before the earliest moves up to the first step at or after it,
|
|
41
|
-
* one after the latest down to the last step at or before it
|
|
41
|
+
* one after the latest down to the last step at or before it.
|
|
42
42
|
*/
|
|
43
43
|
export declare const constrainTime: (time: TimeValue, limits: TimeLimits, minuteStep?: number, secondStep?: number) => TimeValue;
|
|
44
44
|
/**
|