mtrl 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/README.md +7 -3
- package/dist/components/bottom-app-bar/index.d.ts +1 -1
- package/dist/components/bottom-sheet/types.d.ts +2 -0
- package/dist/components/button/constants.d.ts +2 -2
- package/dist/components/button-group/constants.d.ts +2 -2
- package/dist/components/button-group/types.d.ts +1 -1
- package/dist/components/card/features.d.ts +1 -1
- package/dist/components/card/index.d.ts +9 -9
- package/dist/components/card/types.d.ts +4 -4
- package/dist/components/carousel/types.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +1 -1
- package/dist/components/chips/features/controller.js +0 -2
- package/dist/components/chips/types.d.ts +14 -6
- package/dist/components/datepicker/index.d.ts +1 -1
- package/dist/components/datepicker/types.d.ts +3 -0
- package/dist/components/dialog/types.d.ts +14 -1
- package/dist/components/drawer/types.d.ts +2 -0
- package/dist/components/fab/constants.d.ts +2 -2
- package/dist/components/fab-menu/types.d.ts +12 -2
- package/dist/components/icon-button/constants.d.ts +2 -2
- package/dist/components/icon-button/types.d.ts +1 -1
- package/dist/components/index.d.ts +6 -6
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/menu/types.d.ts +11 -2
- package/dist/components/navigation-rail/types.d.ts +2 -2
- package/dist/components/progress/types.d.ts +27 -5
- package/dist/components/radios/constants.d.ts +3 -3
- package/dist/components/radios/types.d.ts +3 -3
- package/dist/components/search/features/suggestions.js +1 -4
- package/dist/components/search/types.d.ts +13 -7
- package/dist/components/select/constants.d.ts +1 -1
- package/dist/components/select/types.d.ts +4 -2
- package/dist/components/side-sheet/types.d.ts +2 -0
- package/dist/components/slider/types.d.ts +7 -0
- package/dist/components/snackbar/types.d.ts +18 -3
- package/dist/components/split-button/types.d.ts +3 -2
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/tabs/index.d.ts +16 -16
- package/dist/components/tabs/scroll-indicators.js +2 -8
- package/dist/components/tabs/types.d.ts +6 -2
- package/dist/components/textfield/constants.d.ts +10 -7
- package/dist/components/textfield/index.d.ts +7 -7
- package/dist/components/textfield/types.d.ts +1 -0
- package/dist/components/timepicker/constants.d.ts +1 -1
- package/dist/components/timepicker/types.d.ts +4 -2
- package/dist/components/tooltip/constants.d.ts +1 -1
- package/dist/components/tooltip/types.d.ts +1 -1
- package/dist/components/top-app-bar/index.d.ts +1 -1
- package/dist/core/compose/features/index.d.ts +11 -0
- package/dist/core/compose/features/input.d.ts +3 -3
- package/dist/core/config/component.d.ts +1 -1
- package/dist/core/dom/create.d.ts +1 -1
- package/dist/core/utils/theme.d.ts +1 -1
- package/dist/elements/css/search.js +1 -1
- package/dist/elements/css/tabs.js +1 -1
- package/dist/elements/icon-button.d.ts +2 -2
- package/dist/elements/index.d.ts +6 -5
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/search.d.ts +4 -1
- package/dist/elements/textfield.d.ts +5 -1
- package/dist/elements/timepicker.d.ts +1 -0
- package/dist/index.cjs +0 -0
- package/dist/index.d.ts +139 -139
- package/dist/package.json +17 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/solid/index.d.ts +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/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +2 -2
- package/dist/styles/segmented-button.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 +2 -2
- package/dist/styles/textfield.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/browngreen.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/legacy.css +1 -1
- package/dist/themes/material.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/themes/winter.css +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/package.json +17 -1
- package/src/styles/abstract/_theme.scss +1 -1
- package/src/styles/abstract/_variables.scss +4 -4
- package/src/styles/components/_search.scss +2 -0
- package/src/styles/components/_tabs.scss +2 -0
- package/src/styles/components/_text-field.scss +6 -0
- package/src/styles/themes/_browngreen.scss +1 -1
- package/src/styles/themes/_legacy.scss +1 -1
- package/src/styles/themes/_material.scss +1 -1
- package/src/styles/themes/_winter.scss +1 -1
|
@@ -103,7 +103,7 @@ export interface RadioItem {
|
|
|
103
103
|
export interface RadiosChangePayload {
|
|
104
104
|
/**
|
|
105
105
|
* Selected value, or an empty string when an unknown value clears selection.
|
|
106
|
-
* In
|
|
106
|
+
* In `material` 3.0.0 that is `null`, as the select and `<m-radios>` report it.
|
|
107
107
|
*/
|
|
108
108
|
value: string;
|
|
109
109
|
/** Native input change event; undefined for programmatic clearing. */
|
|
@@ -137,13 +137,13 @@ export interface RadiosComponent {
|
|
|
137
137
|
getClass: (name: string) => string;
|
|
138
138
|
/**
|
|
139
139
|
* Gets the radios component name.
|
|
140
|
-
* In
|
|
140
|
+
* In `material` 3.0.0 it returns `null`, not an empty string, when nothing is selected.
|
|
141
141
|
* @returns Selected radio value or empty string if none selected
|
|
142
142
|
*/
|
|
143
143
|
getValue: () => string;
|
|
144
144
|
/**
|
|
145
145
|
* Sets the radios component value (selects a radio).
|
|
146
|
-
* In
|
|
146
|
+
* In `material` 3.0.0 it also accepts `null`, which clears the selection.
|
|
147
147
|
* @param value - Value to select
|
|
148
148
|
* @returns The radios component for chaining
|
|
149
149
|
*/
|
|
@@ -154,10 +154,7 @@ export const withSuggestions = () => (component) => {
|
|
|
154
154
|
if (newItem) {
|
|
155
155
|
newItem.classList.add(getClass(SEARCH_CLASSES.SUGGESTION_ITEM_SELECTED));
|
|
156
156
|
newItem.setAttribute("aria-selected", "true");
|
|
157
|
-
newItem.scrollIntoView({
|
|
158
|
-
block: "nearest",
|
|
159
|
-
behavior: "smooth",
|
|
160
|
-
});
|
|
157
|
+
newItem.scrollIntoView({ block: "nearest" });
|
|
161
158
|
}
|
|
162
159
|
}
|
|
163
160
|
};
|
|
@@ -116,17 +116,17 @@ export interface SearchConfig {
|
|
|
116
116
|
class?: string;
|
|
117
117
|
/** Component prefix for class names */
|
|
118
118
|
prefix?: string;
|
|
119
|
-
/** Called when search is submitted. In
|
|
119
|
+
/** Called when search is submitted. In `material` 3.0.0 it receives the `SearchEvent` a `submit` listener receives: read `event.value`. */
|
|
120
120
|
onSubmit?: (value: string) => void;
|
|
121
|
-
/** Called when input value changes. In
|
|
121
|
+
/** Called when input value changes. In `material` 3.0.0 it receives the `SearchEvent` an `input` listener receives: read `event.value`. */
|
|
122
122
|
onInput?: (value: string) => void;
|
|
123
|
-
/** Called when search is cleared. In
|
|
123
|
+
/** Called when search is cleared. In `material` 3.0.0 it receives the `SearchEvent` a `clear` listener receives. */
|
|
124
124
|
onClear?: () => void;
|
|
125
|
-
/** Called when view expands. In
|
|
125
|
+
/** Called when view expands. In `material` 3.0.0 it receives the object an `expand` listener receives. */
|
|
126
126
|
onExpand?: () => void;
|
|
127
|
-
/** Called when view collapses. In
|
|
127
|
+
/** Called when view collapses. In `material` 3.0.0 it receives the object a `collapse` listener receives. */
|
|
128
128
|
onCollapse?: () => void;
|
|
129
|
-
/** Called when a suggestion is selected. In
|
|
129
|
+
/** Called when a suggestion is selected. In `material` 3.0.0 it receives the `SearchEvent`: the suggestion is `event.suggestion`. */
|
|
130
130
|
onSuggestionSelect?: (suggestion: SearchSuggestion) => void;
|
|
131
131
|
/** Event handlers map */
|
|
132
132
|
on?: Partial<Record<SearchEventType, (event: SearchEvent) => void>>;
|
|
@@ -190,7 +190,13 @@ export interface SearchComponent {
|
|
|
190
190
|
disable: () => SearchComponent;
|
|
191
191
|
/** Checks if the component is disabled */
|
|
192
192
|
isDisabled: () => boolean;
|
|
193
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* Adds an event listener
|
|
195
|
+
* In `material` 3.0.0 an `expand` or `collapse` listener is typed with what those events
|
|
196
|
+
* carry, `{ component, state, viewMode }` (`SearchStateEvent`): `event.value`
|
|
197
|
+
* and `event.preventDefault()` there become type errors (they are
|
|
198
|
+
* `undefined` and not a function at run time today).
|
|
199
|
+
*/
|
|
194
200
|
on: (event: SearchEventType, handler: (event: SearchEvent) => void) => SearchComponent;
|
|
195
201
|
/** Removes an event listener */
|
|
196
202
|
off: (event: SearchEventType, handler: (event: SearchEvent) => void) => SearchComponent;
|
|
@@ -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
|
-
/** @deprecated Renamed `TEXT_FIELD` in
|
|
83
|
+
/** @deprecated Renamed `TEXT_FIELD` in `material` 3.0.0 (FLO-383), and its class becomes `select__text-field`. */
|
|
84
84
|
readonly TEXTFIELD: "select__textfield";
|
|
85
85
|
/** Dropdown icon */
|
|
86
86
|
readonly DROPDOWN_ICON: "select__dropdown-icon";
|
|
@@ -160,13 +160,13 @@ export interface SelectComponent {
|
|
|
160
160
|
element: HTMLElement;
|
|
161
161
|
/**
|
|
162
162
|
* The textfield component
|
|
163
|
-
* @deprecated Renamed `textField` in
|
|
163
|
+
* @deprecated Renamed `textField` in `material` 3.0.0 (FLO-383), where `select.textfield` is `undefined`.
|
|
164
164
|
* 0.10.x has no `textField`, so rename it when you upgrade.
|
|
165
165
|
*/
|
|
166
166
|
textfield: TextfieldComponent;
|
|
167
167
|
/**
|
|
168
168
|
* The menu component
|
|
169
|
-
* @deprecated Removed in
|
|
169
|
+
* @deprecated Removed in `material` 3.0.0. Use the select's own methods and events: `open()`,
|
|
170
170
|
* `close()`, `isOpen()`, `getOptions()`, `setOptions()`, and `open`, `close` and `change`.
|
|
171
171
|
*/
|
|
172
172
|
menu: MenuComponent;
|
|
@@ -286,6 +286,8 @@ export interface SelectEvent {
|
|
|
286
286
|
originalEvent?: Event;
|
|
287
287
|
/**
|
|
288
288
|
* Function to prevent default behavior
|
|
289
|
+
* In `material` 3.0.0 the select's `open`, `close` and `change` payloads have no
|
|
290
|
+
* `preventDefault` and no `defaultPrevented`: these events cannot be cancelled.
|
|
289
291
|
*/
|
|
290
292
|
preventDefault: () => void;
|
|
291
293
|
/**
|
|
@@ -55,6 +55,8 @@ export interface SideSheetConfig {
|
|
|
55
55
|
closeOnScrimClick?: boolean;
|
|
56
56
|
/**
|
|
57
57
|
* Whether Escape closes it.
|
|
58
|
+
* A limit on 0.10.x, fixed in `material` 3.0.0: with `layer: "top"` and this option
|
|
59
|
+
* `false`, the third Escape still closes a modal sheet.
|
|
58
60
|
* @default true
|
|
59
61
|
*/
|
|
60
62
|
closeOnEscape?: boolean;
|
|
@@ -167,6 +167,13 @@ export interface SliderStateComponent {
|
|
|
167
167
|
valueBubble?: HTMLElement | null;
|
|
168
168
|
secondHandle?: HTMLElement | null;
|
|
169
169
|
secondValueBubble?: HTMLElement | null;
|
|
170
|
+
/**
|
|
171
|
+
* The older bag the same elements were kept in
|
|
172
|
+
* @deprecated Internal in `material` 3.0.0 and outside the public contract: nothing in
|
|
173
|
+
* the library fills it, it may go in any release, and `SliderComponent` has no
|
|
174
|
+
* `components`. Use the slider's own API (`setValue()`, `getValue()` and the rest of
|
|
175
|
+
* `SliderComponent`) and `slider.element`.
|
|
176
|
+
*/
|
|
170
177
|
components?: Record<string, HTMLElement | null | undefined>;
|
|
171
178
|
getClass: (name: string) => string;
|
|
172
179
|
emit: (event: string, data: unknown) => unknown;
|
|
@@ -129,7 +129,12 @@ export interface SnackbarConfig {
|
|
|
129
129
|
export interface SnackbarComponent {
|
|
130
130
|
/** The root element of the snackbar */
|
|
131
131
|
element: HTMLElement;
|
|
132
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Current state of the snackbar
|
|
134
|
+
* In `material` 3.0.0 a snackbar shown behind another is `"queued"` until its turn, then
|
|
135
|
+
* `"visible"` with `open` (today it says `"visible"` while it waits). `material` 3.0.0
|
|
136
|
+
* adds `isOpen()`, true only while it is on screen.
|
|
137
|
+
*/
|
|
133
138
|
state: SnackbarState;
|
|
134
139
|
/** The action button element (if present) */
|
|
135
140
|
actionButton?: HTMLElement;
|
|
@@ -137,9 +142,19 @@ export interface SnackbarComponent {
|
|
|
137
142
|
closeButton?: HTMLElement;
|
|
138
143
|
/** Timer for auto-dismissal */
|
|
139
144
|
timer?: SnackbarTimer;
|
|
140
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Displays the snackbar
|
|
147
|
+
* A limit on 0.10.x, fixed in `material` 3.0.0: a snackbar still waiting behind another
|
|
148
|
+
* when a `queueBehavior: 'replace'` snackbar or `clearSnackbars()` drops it
|
|
149
|
+
* keeps `state` `"visible"`, and `show()` on it does nothing from then on.
|
|
150
|
+
* Create a new snackbar instead of showing that one again.
|
|
151
|
+
*/
|
|
141
152
|
show: () => SnackbarComponent;
|
|
142
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Hides the snackbar
|
|
155
|
+
* In `material` 3.0.0 `hide()` on a snackbar still waiting behind another takes it out of
|
|
156
|
+
* the queue and emits nothing (today it emits `close` and `dismiss`).
|
|
157
|
+
*/
|
|
143
158
|
hide: () => SnackbarComponent;
|
|
144
159
|
/** Sets the message text */
|
|
145
160
|
setMessage: (message: string) => SnackbarComponent;
|
|
@@ -86,8 +86,9 @@ export interface SplitButtonComponent {
|
|
|
86
86
|
trailingElement: HTMLButtonElement;
|
|
87
87
|
/**
|
|
88
88
|
* The menu, when the component was given items
|
|
89
|
-
* @deprecated Removed in
|
|
90
|
-
* `collapse()`, `isExpanded()`, and `expand`, `collapse` and `select`.
|
|
89
|
+
* @deprecated Removed in `material` 3.0.0. Use the split button's own methods and events: `expand()`,
|
|
90
|
+
* `collapse()`, `isExpanded()`, and `expand`, `collapse` and `select`. `material` 3.0.0 adds
|
|
91
|
+
* `setItems()` and `getItems()` for what `menu.setItems()` does today.
|
|
91
92
|
*/
|
|
92
93
|
menu?: MenuComponent;
|
|
93
94
|
/** Sets the leading button's label */
|
|
@@ -2,8 +2,8 @@ export { default } from "./switch.js";
|
|
|
2
2
|
export { SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES } from "./constants.js";
|
|
3
3
|
export type { SwitchConfig, SwitchComponent, SwitchEvents, SwitchChangePayload } from "./types.js";
|
|
4
4
|
export {
|
|
5
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in
|
|
5
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in `material` 3.0.0 (FLO-381). */
|
|
6
6
|
withSupportingText, } from "./features.js";
|
|
7
7
|
export type {
|
|
8
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in
|
|
8
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in `material` 3.0.0 (FLO-381). */
|
|
9
9
|
SupportingTextComponent, } from "./features.js";
|
|
@@ -7,39 +7,39 @@ import { updateTabPanels, setupKeyboardNavigation } from "./utils.js";
|
|
|
7
7
|
export { TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES, } from "./constants.js";
|
|
8
8
|
export type { TabsConfig, TabsComponent, TabComponent, TabConfig, TabChangeEventData, IndicatorConfig, } from "./types.js";
|
|
9
9
|
export {
|
|
10
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
10
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
11
11
|
addScrollIndicators, setupResponsiveBehavior,
|
|
12
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
12
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
13
13
|
createTabsState,
|
|
14
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
14
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
15
15
|
createTabIndicator,
|
|
16
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
16
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
17
17
|
updateTabPanels,
|
|
18
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
18
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
19
19
|
setupKeyboardNavigation, };
|
|
20
20
|
export {
|
|
21
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
21
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
22
22
|
withTabsManagement,
|
|
23
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
23
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
24
24
|
withScrollable,
|
|
25
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
25
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
26
26
|
withDivider,
|
|
27
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
27
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
28
28
|
withIndicator, } from "./features.js";
|
|
29
29
|
export type {
|
|
30
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
30
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
31
31
|
TabsManagementConfig,
|
|
32
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
32
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
33
33
|
TabsManagementComponent,
|
|
34
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
34
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
35
35
|
ScrollableConfig,
|
|
36
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
36
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
37
37
|
ScrollableComponent,
|
|
38
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
38
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
39
39
|
DividerConfig,
|
|
40
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
40
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
41
41
|
IndicatorFeatureConfig,
|
|
42
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
42
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
43
43
|
IndicatorComponent, } from "./features.js";
|
|
44
44
|
export default createTabs;
|
|
45
45
|
export { createTab } from "./tab.js";
|
|
@@ -26,16 +26,10 @@ export const addScrollIndicators = (tabs, config = {}) => {
|
|
|
26
26
|
tabs.element.appendChild(leftButton);
|
|
27
27
|
tabs.element.appendChild(rightButton);
|
|
28
28
|
leftButton.addEventListener('click', () => {
|
|
29
|
-
scrollContainer.scrollBy({
|
|
30
|
-
left: -100,
|
|
31
|
-
behavior: 'smooth'
|
|
32
|
-
});
|
|
29
|
+
scrollContainer.scrollBy({ left: -100 });
|
|
33
30
|
});
|
|
34
31
|
rightButton.addEventListener('click', () => {
|
|
35
|
-
scrollContainer.scrollBy({
|
|
36
|
-
left: 100,
|
|
37
|
-
behavior: 'smooth'
|
|
38
|
-
});
|
|
32
|
+
scrollContainer.scrollBy({ left: 100 });
|
|
39
33
|
});
|
|
40
34
|
}
|
|
41
35
|
const updateIndicators = () => {
|
|
@@ -281,7 +281,11 @@ export interface TabComponent {
|
|
|
281
281
|
element: HTMLElement;
|
|
282
282
|
/** The button the tab is built on */
|
|
283
283
|
button?: TabButton;
|
|
284
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The tab's badge component (if any). In `material` 3.0.0 it may be `undefined` until
|
|
286
|
+
* the badge is shown: read it with a guard, or use `setBadge()`, `getBadge()`,
|
|
287
|
+
* `showBadge()` and `hideBadge()`, which work whether it exists yet or not.
|
|
288
|
+
*/
|
|
285
289
|
badge?: BadgeComponent;
|
|
286
290
|
/** Gets a class name with the component's prefix */
|
|
287
291
|
getClass: (name: string) => string;
|
|
@@ -407,7 +411,7 @@ export interface TabsComponent {
|
|
|
407
411
|
*/
|
|
408
412
|
off(event: string, handler: Function): this;
|
|
409
413
|
/**
|
|
410
|
-
* Emit an event. In
|
|
414
|
+
* Emit an event. In `material` 3.0.0, `emit` accepts only the tabs' own events.
|
|
411
415
|
* @param event - Event name
|
|
412
416
|
* @param data - Event data
|
|
413
417
|
* @returns Tabs component for chaining
|
|
@@ -98,6 +98,9 @@ declare const TEXTFIELD_DEFAULTS: {
|
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* CSS class names used by the textfield component
|
|
101
|
+
* In `material` 3.0.0 the classes are written `text-field` (`mtrl-text-field`,
|
|
102
|
+
* `mtrl-text-field__input`, …): page CSS and `classList` calls that keep
|
|
103
|
+
* `mtrl-textfield` then match nothing, and nothing warns.
|
|
101
104
|
* @category Components
|
|
102
105
|
*/
|
|
103
106
|
declare const TEXTFIELD_CLASSES: {
|
|
@@ -155,17 +158,17 @@ declare const TEXTFIELD_CLASSES: {
|
|
|
155
158
|
readonly MULTILINE: "textfield--multiline";
|
|
156
159
|
};
|
|
157
160
|
export { TEXTFIELD_VARIANTS as TEXT_FIELD_VARIANTS, TEXTFIELD_STATES as TEXT_FIELD_STATES, TEXTFIELD_TYPES as TEXT_FIELD_TYPES, TEXTFIELD_EVENTS as TEXT_FIELD_EVENTS, TEXTFIELD_DENSITY as TEXT_FIELD_DENSITY, TEXTFIELD_DEFAULTS as TEXT_FIELD_DEFAULTS, TEXTFIELD_CLASSES as TEXT_FIELD_CLASSES,
|
|
158
|
-
/** @deprecated Use TEXT_FIELD_VARIANTS: M3 writes "text field" as two words. Removed in
|
|
161
|
+
/** @deprecated Use TEXT_FIELD_VARIANTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
159
162
|
TEXTFIELD_VARIANTS,
|
|
160
|
-
/** @deprecated Use TEXT_FIELD_STATES: M3 writes "text field" as two words. Removed in
|
|
163
|
+
/** @deprecated Use TEXT_FIELD_STATES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
161
164
|
TEXTFIELD_STATES,
|
|
162
|
-
/** @deprecated Use TEXT_FIELD_TYPES: M3 writes "text field" as two words. Removed in
|
|
165
|
+
/** @deprecated Use TEXT_FIELD_TYPES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
163
166
|
TEXTFIELD_TYPES,
|
|
164
|
-
/** @deprecated Use TEXT_FIELD_EVENTS: M3 writes "text field" as two words. Removed in
|
|
167
|
+
/** @deprecated Use TEXT_FIELD_EVENTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
165
168
|
TEXTFIELD_EVENTS,
|
|
166
|
-
/** @deprecated Use TEXT_FIELD_DENSITY: M3 writes "text field" as two words. Removed in
|
|
169
|
+
/** @deprecated Use TEXT_FIELD_DENSITY: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
167
170
|
TEXTFIELD_DENSITY,
|
|
168
|
-
/** @deprecated Use TEXT_FIELD_DEFAULTS: M3 writes "text field" as two words. Removed in
|
|
171
|
+
/** @deprecated Use TEXT_FIELD_DEFAULTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
169
172
|
TEXTFIELD_DEFAULTS,
|
|
170
|
-
/** @deprecated Use TEXT_FIELD_CLASSES: M3 writes "text field" as two words. Removed in
|
|
173
|
+
/** @deprecated Use TEXT_FIELD_CLASSES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
171
174
|
TEXTFIELD_CLASSES, };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { default } from "./textfield.js";
|
|
2
2
|
export { default as createTextField } from "./textfield.js";
|
|
3
3
|
export type { TextfieldConfig as TextFieldConfig, TextfieldComponent as TextFieldComponent,
|
|
4
|
-
/** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in
|
|
4
|
+
/** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
5
5
|
TextfieldConfig,
|
|
6
|
-
/** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in
|
|
6
|
+
/** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
7
7
|
TextfieldComponent, TextfieldDensity as TextFieldDensity, TextfieldEvents as TextFieldEvents, TextfieldValuePayload as TextFieldValuePayload, TextfieldFocusPayload as TextFieldFocusPayload, TextfieldTrailingPayload as TextFieldTrailingPayload,
|
|
8
|
-
/** @deprecated Use TextFieldDensity: M3 writes "text field" as two words. Removed in
|
|
8
|
+
/** @deprecated Use TextFieldDensity: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
9
9
|
TextfieldDensity,
|
|
10
|
-
/** @deprecated Use TextFieldEvents: M3 writes "text field" as two words. Removed in
|
|
10
|
+
/** @deprecated Use TextFieldEvents: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
11
11
|
TextfieldEvents,
|
|
12
|
-
/** @deprecated Use TextFieldValuePayload: M3 writes "text field" as two words. Removed in
|
|
12
|
+
/** @deprecated Use TextFieldValuePayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
13
13
|
TextfieldValuePayload,
|
|
14
|
-
/** @deprecated Use TextFieldFocusPayload: M3 writes "text field" as two words. Removed in
|
|
14
|
+
/** @deprecated Use TextFieldFocusPayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
15
15
|
TextfieldFocusPayload,
|
|
16
|
-
/** @deprecated Use TextFieldTrailingPayload: M3 writes "text field" as two words. Removed in
|
|
16
|
+
/** @deprecated Use TextFieldTrailingPayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
17
17
|
TextfieldTrailingPayload, } from "./types.js";
|
|
@@ -289,6 +289,7 @@ export interface BaseComponent {
|
|
|
289
289
|
*/
|
|
290
290
|
declare module "../../core/config/global" {
|
|
291
291
|
interface ComponentConfigMap {
|
|
292
|
+
/** In `material` 3.0.0 this defaults key is `'text-field'`: `setComponentDefaults('text-field', …)`. */
|
|
292
293
|
textfield?: Partial<TextfieldConfig>;
|
|
293
294
|
}
|
|
294
295
|
}
|
|
@@ -192,7 +192,7 @@ export declare const TIMEPICKER_DEFAULTS: {
|
|
|
192
192
|
readonly CANCEL_TEXT: "Cancel";
|
|
193
193
|
/** Default confirm button text */
|
|
194
194
|
readonly CONFIRM_TEXT: "OK";
|
|
195
|
-
/** Whether picker is initially open */
|
|
195
|
+
/** Whether picker is initially open. In `material` 3.0.0 this key is `OPEN`, with the option renamed `open`. */
|
|
196
196
|
readonly IS_OPEN: false;
|
|
197
197
|
/** Default clock icon */
|
|
198
198
|
readonly CLOCK_ICON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <polyline points=\"12 6 12 12 16 14\"></polyline>\n </svg>";
|
|
@@ -182,6 +182,8 @@ export interface TimePickerConfig {
|
|
|
182
182
|
confirmText?: string;
|
|
183
183
|
/**
|
|
184
184
|
* Whether the time picker is initially visible (for inline mode)
|
|
185
|
+
* In `material` 3.0.0 this option is named `open`, and the picker is open when its
|
|
186
|
+
* factory returns (today it opens on a 0 ms timer).
|
|
185
187
|
* @default false
|
|
186
188
|
*/
|
|
187
189
|
isOpen?: boolean;
|
|
@@ -223,7 +225,7 @@ export interface TimePickerConfig {
|
|
|
223
225
|
onClose?: () => void;
|
|
224
226
|
/**
|
|
225
227
|
* Callback when time is confirmed; receives the same 24-hour value as getValue().
|
|
226
|
-
* In
|
|
228
|
+
* In `material` 3.0.0 it receives `{ value }`, the object a `confirm` listener receives.
|
|
227
229
|
*/
|
|
228
230
|
onConfirm?: (time: string) => void;
|
|
229
231
|
/**
|
|
@@ -270,7 +272,7 @@ export interface TimePickerComponent {
|
|
|
270
272
|
modalElement: HTMLElement;
|
|
271
273
|
/** Dialog container element */
|
|
272
274
|
dialogElement: HTMLElement;
|
|
273
|
-
/** Whether the time picker is currently open */
|
|
275
|
+
/** Whether the time picker is currently open. In `material` 3.0.0 it is a method: `isOpen()`. */
|
|
274
276
|
isOpen: boolean;
|
|
275
277
|
/**
|
|
276
278
|
* Opens the time picker
|
|
@@ -79,7 +79,7 @@ export declare const TOOLTIP_DEFAULTS: {
|
|
|
79
79
|
readonly SHOW_ON_HOVER: true;
|
|
80
80
|
/**
|
|
81
81
|
* Whether to allow rich HTML content by default
|
|
82
|
-
* @deprecated The `rich` option has no effect and is removed in
|
|
82
|
+
* @deprecated The `rich` option has no effect and is removed in `material` 3.0.0, and this default with it.
|
|
83
83
|
*/
|
|
84
84
|
readonly RICH: false;
|
|
85
85
|
};
|
|
@@ -120,7 +120,7 @@ export interface TooltipConfig {
|
|
|
120
120
|
/**
|
|
121
121
|
* Never read, so it has no effect: a rich tooltip is `variant: 'rich'`, and
|
|
122
122
|
* the content is always text.
|
|
123
|
-
* @deprecated Since 0.10 (FLO-324); removed in
|
|
123
|
+
* @deprecated Since 0.10 (FLO-324); removed in `material` 3.0.0.
|
|
124
124
|
*/
|
|
125
125
|
rich?: boolean;
|
|
126
126
|
}
|
|
@@ -7,5 +7,5 @@ export { TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BA
|
|
|
7
7
|
export default createTopAppBar;
|
|
8
8
|
export { createTopAppBar };
|
|
9
9
|
export type { TopAppBarConfig, TopAppBar as TopAppBarComponent,
|
|
10
|
-
/** @deprecated Use TopAppBarComponent, the name every component type has. Removed in
|
|
10
|
+
/** @deprecated Use TopAppBarComponent, the name every component type has. Removed in `material` 3.0.0 (FLO-383). */
|
|
11
11
|
TopAppBar, } from "./types.js";
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The composition features, at the import path `mtrl/core/compose/features`.
|
|
3
|
+
*
|
|
4
|
+
* @deprecated `material` 3.0.0, where this library continues, does not resolve this
|
|
5
|
+
* path (FLO-414): import these names from `material/core/compose`, which exports them,
|
|
6
|
+
* the README's `withLifecycle` among them. `mtrl/core/compose` exports them too, except
|
|
7
|
+
* `withBadge`, `LabelManager` and the badge feature's `BadgeComponent` and
|
|
8
|
+
* `BadgeConfig`; of those four, `material` 3.0.0 keeps `withBadge` and the two badge
|
|
9
|
+
* types internal (for a badge, use `createBadge`) and exports `LabelManager`.
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
1
12
|
export { withEvents } from "./events.js";
|
|
2
13
|
export { withText } from "./text.js";
|
|
3
14
|
export { withIcon } from "./icon.js";
|
|
@@ -59,14 +59,14 @@ export interface InputFeature {
|
|
|
59
59
|
input: HTMLInputElement;
|
|
60
60
|
/**
|
|
61
61
|
* Gets the current input value.
|
|
62
|
-
* In
|
|
62
|
+
* In `material` 3.0.0 `getValue()` returns the checked boolean, and the input's string
|
|
63
63
|
* value is `getValueAttribute()`.
|
|
64
64
|
* @returns Current value
|
|
65
65
|
*/
|
|
66
66
|
getValue: () => string;
|
|
67
67
|
/**
|
|
68
68
|
* Sets the input value and emits a value event.
|
|
69
|
-
* In
|
|
69
|
+
* In `material` 3.0.0 `setValue()` takes the checked boolean and is silent (no `value`
|
|
70
70
|
* event); the input's string value is set with `setValueAttribute()`.
|
|
71
71
|
* @param value - New value to set
|
|
72
72
|
* @returns Component instance for chaining
|
|
@@ -86,7 +86,7 @@ export interface InputComponent extends ElementComponent, InputFeature {
|
|
|
86
86
|
* Creates an input element and adds it to a component
|
|
87
87
|
* Handles both input creation and event emission for state changes
|
|
88
88
|
*
|
|
89
|
-
* In
|
|
89
|
+
* In `material` 3.0.0 the `change` payload's `value` is the checked boolean, as the checkbox
|
|
90
90
|
* and the switch report it, and the input's string value is `valueAttribute`.
|
|
91
91
|
*
|
|
92
92
|
* @param config - Input configuration
|
|
@@ -10,7 +10,7 @@ export interface BaseComponentConfig {
|
|
|
10
10
|
/**
|
|
11
11
|
* @deprecated Since FLO-117 `class` and `className` are not prefixed either,
|
|
12
12
|
* so this option does the same thing as those. It is kept for the release
|
|
13
|
-
* that changes the behaviour and will be removed in
|
|
13
|
+
* that changes the behaviour and will be removed in `material` 3.0.0.
|
|
14
14
|
*/
|
|
15
15
|
rawClass?: string | string[];
|
|
16
16
|
parent?: HTMLElement | string | null;
|
|
@@ -76,7 +76,7 @@ export interface CreateElementOptions {
|
|
|
76
76
|
/**
|
|
77
77
|
* @deprecated Since FLO-117 `class` and `className` are not prefixed either,
|
|
78
78
|
* so this option does the same thing as those. It is kept for the release
|
|
79
|
-
* that changes the behaviour and will be removed in
|
|
79
|
+
* that changes the behaviour and will be removed in `material` 3.0.0.
|
|
80
80
|
*/
|
|
81
81
|
rawClass?: string | string[];
|
|
82
82
|
/** HTML attributes */
|
|
@@ -24,7 +24,7 @@ export declare const onThemeChange: (callback: ThemeChangeCallback) => (() => vo
|
|
|
24
24
|
* @deprecated for `-rgb` names only: the themes no longer declare the
|
|
25
25
|
* `--<prefix>-sys-color-*-rgb` twins (FLO-311). `getThemeColor('sys-color-X-rgb')`
|
|
26
26
|
* still returns the `'r, g, b'` triplet, derived from `sys-color-X`, and will be
|
|
27
|
-
* removed in
|
|
27
|
+
* removed in `material` 3.0.0. Read `sys-color-X` (with `alpha` for rgba) instead.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
30
|
* // Basic usage
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./ripple.js";
|
|
2
2
|
import { registerStyles, registerPreupgrade } from "../styles.js";
|
|
3
|
-
registerStyles({ "search": ".mtrl-search .mtrl-search__surface{position:static;display:flex;flex-direction:column;box-sizing:border-box;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;color:inherit;background:rgba(0,0,0,0);overflow:visible}.mtrl-search{position:relative;display:flex;flex-direction:column;width:100%;min-width:var(--mtrl-search-min-width, 360px);max-width:var(--mtrl-search-max-width, 720px);background-color:rgba(0,0,0,0)}.mtrl-search--bar .mtrl-search__container{border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2);height:56px}.mtrl-search--bar .mtrl-search__divider,.mtrl-search--bar .mtrl-search__content{display:none}.mtrl-search--view{height:56px}.mtrl-search--view .mtrl-search__container{border-radius:var(--mtrl-sys-shape-corner-extra-large, 28px) var(--mtrl-sys-shape-corner-extra-large, 28px) 0 0}.mtrl-search--view .mtrl-search__divider,.mtrl-search--view .mtrl-search__content{display:block}.mtrl-search--view .mtrl-search__surface{position:fixed;z-index:1000}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{inset:var(--mtrl-search-top) auto auto var(--mtrl-search-left);width:var(--mtrl-search-width);height:auto}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface::backdrop{background:color-mix(in srgb, var(--mtrl-sys-color-scrim) 32%, transparent)}.mtrl-search--docked.mtrl-search--view .mtrl-search__container{height:56px}.mtrl-search--docked.mtrl-search--view .mtrl-search__content{min-height:240px;max-height:calc(66.67vh - 56px);border-radius:0 0 var(--mtrl-sys-shape-corner-extra-large, 28px) var(--mtrl-sys-shape-corner-extra-large, 28px)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface{inset:0;width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;background-color:var(--mtrl-sys-color-surface-container-high)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface::backdrop{background:rgba(0,0,0,0)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__container{height:72px;border-radius:0}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__content{flex:1;max-height:none;border-radius:0}.mtrl-search--disabled{pointer-events:none}.mtrl-search--disabled .mtrl-search__container{opacity:.38}.mtrl-search--full-width{min-width:0;max-width:none}.mtrl-search--contained.mtrl-search--view .mtrl-search__container{border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--view .mtrl-search__divider{display:none}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__content{margin-top:2px;border-radius:var(--mtrl-sys-shape-corner-medium, 12px)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface{box-sizing:border-box;padding:12px;background-color:var(--mtrl-sys-color-surface-container-low)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__container{height:56px;border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__content{margin-top:8px;background-color:rgba(0,0,0,0);border-radius:0}.mtrl-search--view .mtrl-search__content{animation:mtrl-search-reveal 300ms cubic-bezier(0.05, 0.7, 0.1, 1)}@keyframes mtrl-search-reveal{from{opacity:0;transform:translateY(-8px)}}@media(prefers-reduced-motion: reduce){.mtrl-search--view .mtrl-search__content{animation:none}}.mtrl-search__container{position:relative;display:flex;align-items:center;height:56px;padding:0 4px;background-color:var(--mtrl-sys-color-surface-container-high);transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1),border-radius 200ms cubic-bezier(0.2, 0, 0, 1),height 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search--bar:not(.mtrl-search--disabled) .mtrl-search__container:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 8%, var(--mtrl-sys-color-surface-container-high))}.mtrl-search__leading-icon,.mtrl-search__clear-button,.mtrl-search__trailing-icon{--mtrl-search-layer: 0%;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px;margin:0;padding:0;border:none;border-radius:50%;font:inherit;background-color:color-mix(in srgb, currentColor var(--mtrl-search-layer), transparent);cursor:pointer;transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search__leading-icon svg,.mtrl-search__clear-button svg,.mtrl-search__trailing-icon svg{width:24px;height:24px;fill:currentColor}.mtrl-search__leading-icon:hover,.mtrl-search__clear-button:hover,.mtrl-search__trailing-icon:hover{--mtrl-search-layer: 8%}.mtrl-search__leading-icon:focus-visible,.mtrl-search__leading-icon:active,.mtrl-search__clear-button:focus-visible,.mtrl-search__clear-button:active,.mtrl-search__trailing-icon:focus-visible,.mtrl-search__trailing-icon:active{--mtrl-search-layer: 10%}.mtrl-search__leading-icon:focus,.mtrl-search__clear-button:focus,.mtrl-search__trailing-icon:focus{outline:none}.mtrl-search__leading-icon:focus-visible,.mtrl-search__clear-button:focus-visible,.mtrl-search__trailing-icon:focus-visible{outline:3px solid var(--mtrl-sys-color-secondary);outline-offset:2px}.mtrl-search__leading-icon[aria-disabled=true],.mtrl-search__clear-button[aria-disabled=true],.mtrl-search__trailing-icon[aria-disabled=true]{cursor:not-allowed;opacity:.38;--mtrl-search-layer: 0%}.mtrl-search__leading-icon{color:var(--mtrl-sys-color-on-surface)}.mtrl-search__clear-button,.mtrl-search__trailing-icon{color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__clear-button{opacity:1;visibility:visible;transition:opacity 200ms cubic-bezier(0.2, 0, 0, 1),visibility 0s,background-color 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search__clear-button--hidden{opacity:0;visibility:hidden;pointer-events:none;transition:opacity 200ms cubic-bezier(0.2, 0, 0, 1),visibility 0s 200ms}.mtrl-search__avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px}.mtrl-search__avatar>*{width:30px;height:30px;border-radius:50%;object-fit:cover}.mtrl-search__trailing{display:flex;align-items:center}.mtrl-search__input-wrapper{flex:1;min-width:0;height:100%;margin:0 4px;display:flex;align-items:center}.mtrl-search__input{width:100%;height:100%;min-height:36px;padding:8px 0;border:none;background:rgba(0,0,0,0);font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400;color:var(--mtrl-sys-color-on-surface);caret-color:var(--mtrl-sys-color-primary);outline:none;box-sizing:border-box}.mtrl-search__input::placeholder{color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__input:disabled{cursor:not-allowed;color:var(--mtrl-sys-color-on-surface)}.mtrl-search__divider{width:100%;height:1px;background-color:var(--mtrl-sys-color-outline);flex-shrink:0}.mtrl-search__content{display:flex;flex-direction:column;background-color:var(--mtrl-sys-color-surface-container-high);overflow:hidden}.mtrl-search__suggestions{flex:1;overflow-y:auto;overflow-x:hidden}.mtrl-search__suggestion-list{list-style:none;padding:8px 0;margin:0}.mtrl-search__suggestion-item{display:flex;align-items:center;gap:16px;padding:8px 16px;min-height:56px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400;color:var(--mtrl-sys-color-on-surface);cursor:pointer;transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box}.mtrl-search__suggestion-item:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 8%, transparent)}.mtrl-search__suggestion-item--selected,.mtrl-search__suggestion-item--selected:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 10%, transparent);outline:3px solid var(--mtrl-sys-color-secondary);outline-offset:-3px}.mtrl-search__suggestion-item strong{font-weight:600;color:var(--mtrl-sys-color-on-surface)}.mtrl-search__suggestion-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__suggestion-icon svg{width:24px;height:24px;fill:currentColor}.mtrl-search__suggestion-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mtrl-search__suggestion-item--two-line{min-height:72px}.mtrl-search__suggestion-item--two-line .mtrl-search__suggestion-text{display:flex;flex-direction:column}.mtrl-search__suggestion-supporting{overflow:hidden;text-overflow:ellipsis;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.25px;font-weight:400;color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__suggestion-divider{height:1px;margin:8px 0;background-color:var(--mtrl-sys-color-outline-variant)}.mtrl-search__status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(max-width: 599px){.mtrl-search{min-width:0;max-width:100%}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{inset:0;width:100%;height:100%;background-color:var(--mtrl-sys-color-surface-container-high)}.mtrl-search--docked.mtrl-search--view .mtrl-search__container{border-radius:0}.mtrl-search--docked.mtrl-search--view .mtrl-search__content{flex:1;max-height:none;border-radius:0}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{box-sizing:border-box;padding:12px;background-color:var(--mtrl-sys-color-surface-container-low)}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__container{height:56px;border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__content{margin-top:8px;background-color:rgba(0,0,0,0);border-radius:0}}" });
|
|
3
|
+
registerStyles({ "search": ".mtrl-search .mtrl-search__surface{position:static;display:flex;flex-direction:column;box-sizing:border-box;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;color:inherit;background:rgba(0,0,0,0);overflow:visible}.mtrl-search{position:relative;display:flex;flex-direction:column;width:100%;min-width:var(--mtrl-search-min-width, 360px);max-width:var(--mtrl-search-max-width, 720px);background-color:rgba(0,0,0,0)}.mtrl-search--bar .mtrl-search__container{border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2);height:56px}.mtrl-search--bar .mtrl-search__divider,.mtrl-search--bar .mtrl-search__content{display:none}.mtrl-search--view{height:56px}.mtrl-search--view .mtrl-search__container{border-radius:var(--mtrl-sys-shape-corner-extra-large, 28px) var(--mtrl-sys-shape-corner-extra-large, 28px) 0 0}.mtrl-search--view .mtrl-search__divider,.mtrl-search--view .mtrl-search__content{display:block}.mtrl-search--view .mtrl-search__surface{position:fixed;z-index:1000}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{inset:var(--mtrl-search-top) auto auto var(--mtrl-search-left);width:var(--mtrl-search-width);height:auto}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface::backdrop{background:color-mix(in srgb, var(--mtrl-sys-color-scrim) 32%, transparent)}.mtrl-search--docked.mtrl-search--view .mtrl-search__container{height:56px}.mtrl-search--docked.mtrl-search--view .mtrl-search__content{min-height:240px;max-height:calc(66.67vh - 56px);border-radius:0 0 var(--mtrl-sys-shape-corner-extra-large, 28px) var(--mtrl-sys-shape-corner-extra-large, 28px)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface{inset:0;width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;background-color:var(--mtrl-sys-color-surface-container-high)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface::backdrop{background:rgba(0,0,0,0)}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__container{height:72px;border-radius:0}.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__content{flex:1;max-height:none;border-radius:0}.mtrl-search--disabled{pointer-events:none}.mtrl-search--disabled .mtrl-search__container{opacity:.38}.mtrl-search--full-width{min-width:0;max-width:none}.mtrl-search--contained.mtrl-search--view .mtrl-search__container{border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--view .mtrl-search__divider{display:none}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__content{margin-top:2px;border-radius:var(--mtrl-sys-shape-corner-medium, 12px)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__surface{box-sizing:border-box;padding:12px;background-color:var(--mtrl-sys-color-surface-container-low)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__container{height:56px;border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--fullscreen.mtrl-search--view .mtrl-search__content{margin-top:8px;background-color:rgba(0,0,0,0);border-radius:0}.mtrl-search--view .mtrl-search__content{animation:mtrl-search-reveal 300ms cubic-bezier(0.05, 0.7, 0.1, 1)}@keyframes mtrl-search-reveal{from{opacity:0;transform:translateY(-8px)}}@media(prefers-reduced-motion: reduce){.mtrl-search--view .mtrl-search__content{animation:none}}.mtrl-search__container{position:relative;display:flex;align-items:center;height:56px;padding:0 4px;background-color:var(--mtrl-sys-color-surface-container-high);transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1),border-radius 200ms cubic-bezier(0.2, 0, 0, 1),height 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search--bar:not(.mtrl-search--disabled) .mtrl-search__container:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 8%, var(--mtrl-sys-color-surface-container-high))}.mtrl-search__leading-icon,.mtrl-search__clear-button,.mtrl-search__trailing-icon{--mtrl-search-layer: 0%;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px;margin:0;padding:0;border:none;border-radius:50%;font:inherit;background-color:color-mix(in srgb, currentColor var(--mtrl-search-layer), transparent);cursor:pointer;transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search__leading-icon svg,.mtrl-search__clear-button svg,.mtrl-search__trailing-icon svg{width:24px;height:24px;fill:currentColor}.mtrl-search__leading-icon:hover,.mtrl-search__clear-button:hover,.mtrl-search__trailing-icon:hover{--mtrl-search-layer: 8%}.mtrl-search__leading-icon:focus-visible,.mtrl-search__leading-icon:active,.mtrl-search__clear-button:focus-visible,.mtrl-search__clear-button:active,.mtrl-search__trailing-icon:focus-visible,.mtrl-search__trailing-icon:active{--mtrl-search-layer: 10%}.mtrl-search__leading-icon:focus,.mtrl-search__clear-button:focus,.mtrl-search__trailing-icon:focus{outline:none}.mtrl-search__leading-icon:focus-visible,.mtrl-search__clear-button:focus-visible,.mtrl-search__trailing-icon:focus-visible{outline:3px solid var(--mtrl-sys-color-secondary);outline-offset:2px}.mtrl-search__leading-icon[aria-disabled=true],.mtrl-search__clear-button[aria-disabled=true],.mtrl-search__trailing-icon[aria-disabled=true]{cursor:not-allowed;opacity:.38;--mtrl-search-layer: 0%}.mtrl-search__leading-icon{color:var(--mtrl-sys-color-on-surface)}.mtrl-search__clear-button,.mtrl-search__trailing-icon{color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__clear-button{opacity:1;visibility:visible;transition:opacity 200ms cubic-bezier(0.2, 0, 0, 1),visibility 0s,background-color 200ms cubic-bezier(0.2, 0, 0, 1)}.mtrl-search__clear-button--hidden{opacity:0;visibility:hidden;pointer-events:none;transition:opacity 200ms cubic-bezier(0.2, 0, 0, 1),visibility 0s 200ms}.mtrl-search__avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:48px;height:48px}.mtrl-search__avatar>*{width:30px;height:30px;border-radius:50%;object-fit:cover}.mtrl-search__trailing{display:flex;align-items:center}.mtrl-search__input-wrapper{flex:1;min-width:0;height:100%;margin:0 4px;display:flex;align-items:center}.mtrl-search__input{width:100%;height:100%;min-height:36px;padding:8px 0;border:none;background:rgba(0,0,0,0);font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400;color:var(--mtrl-sys-color-on-surface);caret-color:var(--mtrl-sys-color-primary);outline:none;box-sizing:border-box}.mtrl-search__input::placeholder{color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__input:disabled{cursor:not-allowed;color:var(--mtrl-sys-color-on-surface)}.mtrl-search__divider{width:100%;height:1px;background-color:var(--mtrl-sys-color-outline);flex-shrink:0}.mtrl-search__content{display:flex;flex-direction:column;background-color:var(--mtrl-sys-color-surface-container-high);overflow:hidden}.mtrl-search__suggestions{flex:1;overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.mtrl-search__suggestion-list{list-style:none;padding:8px 0;margin:0}.mtrl-search__suggestion-item{display:flex;align-items:center;gap:16px;padding:8px 16px;min-height:56px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400;color:var(--mtrl-sys-color-on-surface);cursor:pointer;transition:background-color 200ms cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box}.mtrl-search__suggestion-item:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 8%, transparent)}.mtrl-search__suggestion-item--selected,.mtrl-search__suggestion-item--selected:hover{background-color:color-mix(in srgb, var(--mtrl-sys-color-on-surface) 10%, transparent);outline:3px solid var(--mtrl-sys-color-secondary);outline-offset:-3px}.mtrl-search__suggestion-item strong{font-weight:600;color:var(--mtrl-sys-color-on-surface)}.mtrl-search__suggestion-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__suggestion-icon svg{width:24px;height:24px;fill:currentColor}.mtrl-search__suggestion-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mtrl-search__suggestion-item--two-line{min-height:72px}.mtrl-search__suggestion-item--two-line .mtrl-search__suggestion-text{display:flex;flex-direction:column}.mtrl-search__suggestion-supporting{overflow:hidden;text-overflow:ellipsis;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.25px;font-weight:400;color:var(--mtrl-sys-color-on-surface-variant)}.mtrl-search__suggestion-divider{height:1px;margin:8px 0;background-color:var(--mtrl-sys-color-outline-variant)}.mtrl-search__status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(max-width: 599px){.mtrl-search{min-width:0;max-width:100%}.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{inset:0;width:100%;height:100%;background-color:var(--mtrl-sys-color-surface-container-high)}.mtrl-search--docked.mtrl-search--view .mtrl-search__container{border-radius:0}.mtrl-search--docked.mtrl-search--view .mtrl-search__content{flex:1;max-height:none;border-radius:0}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__surface{box-sizing:border-box;padding:12px;background-color:var(--mtrl-sys-color-surface-container-low)}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__container{height:56px;border-radius:min(var(--mtrl-sys-shape-corner-full, 9999px),56px/2)}.mtrl-search--contained.mtrl-search--docked.mtrl-search--view .mtrl-search__content{margin-top:8px;background-color:rgba(0,0,0,0);border-radius:0}}" });
|
|
4
4
|
registerPreupgrade({ "search": "m-search:not(:defined){display:flex;align-items:center;box-sizing:border-box;height:56px;padding:0 56px 0 60px;border-radius:var(--mtrl-sys-shape-corner-full, 9999px);background-color:var(--mtrl-sys-color-surface-container-high);color:var(--mtrl-sys-color-on-surface-variant);white-space:nowrap;overflow:hidden;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400}m-search:not(:defined)::before{content:attr(placeholder)}m-search:not(:defined)[value]:not([value=\"\"])::before{content:attr(value);color:var(--mtrl-sys-color-on-surface)}m-search:not(:defined)>*{visibility:hidden;display:none}" });
|