material 3.6.0 → 3.7.0
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/dialog/features.js +1 -1
- package/dist/components/fab-menu/fab-menu.js +4 -4
- package/dist/components/snackbar/api.js +1 -1
- package/dist/components/text-field/features/placement.js +1 -1
- package/dist/core/compose/cleanup.js +1 -1
- package/dist/core/navigation/destinations.js +1 -1
- package/dist/core/shapes/material.js +1 -1
- package/dist/elements/datepicker.js +2 -2
- package/dist/elements/define.js +117 -119
- 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/select.js +2 -2
- package/dist/elements/timepicker.js +2 -2
- package/dist/package.json +1 -1
- package/dist/react/create.js +1 -1
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/react.js +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base-lite.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/svelte/runtime.js +1 -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.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ What a bundler keeps, minified and gzipped (kB is 1,000 bytes), measured from th
|
|
|
105
105
|
|
|
106
106
|
## Browser support
|
|
107
107
|
|
|
108
|
-
Current Chrome, Edge, Firefox and Safari. The spring motion uses CSS `linear()` easing (Safari 17.2 or later); older browsers render every component but skip those transitions.
|
|
108
|
+
Current Chrome, Edge, Firefox and Safari. The JavaScript targets ES2022, parsed in CI with acorn 8: a parser that stops before ES2022 cannot load the package. The spring motion uses CSS `linear()` easing (Safari 17.2 or later); older browsers render every component but skip those transitions.
|
|
109
109
|
|
|
110
110
|
## Upgrading
|
|
111
111
|
|
|
@@ -312,7 +312,7 @@ const container = component.structure.container;
|
|
|
312
312
|
if (top || container === document.body)
|
|
313
313
|
return;
|
|
314
314
|
if (getComputedStyle(container).position === "static") {
|
|
315
|
-
containerPosition
|
|
315
|
+
containerPosition ??= container.style.position;
|
|
316
316
|
container.style.position = "relative";
|
|
317
317
|
}
|
|
318
318
|
addClass(component.overlay, `${component.getClass("dialog__overlay")}--contained`);
|
|
@@ -128,23 +128,23 @@ if (settings.menu) {
|
|
|
128
128
|
menu = wire(settings.menu(button, items));
|
|
129
129
|
return Promise.resolve(menu);
|
|
130
130
|
}
|
|
131
|
-
loading
|
|
131
|
+
loading ??= import("../menu/index.js").then(({ default: createMenu }) => {
|
|
132
132
|
if (destroyed)
|
|
133
133
|
return null;
|
|
134
|
-
menu
|
|
134
|
+
menu ??= wire(createMenu({
|
|
135
135
|
opener: button,
|
|
136
136
|
items: items.map(({ id, text, icon }) => ({ id, text, icon })),
|
|
137
137
|
position: "top-end",
|
|
138
138
|
offset: FAB_MENU_MENU_GAP,
|
|
139
139
|
manualOpen: true,
|
|
140
140
|
layer: "top",
|
|
141
|
-
}))
|
|
141
|
+
}));
|
|
142
142
|
return menu;
|
|
143
143
|
}, (error) => {
|
|
144
144
|
loading = null;
|
|
145
145
|
console.error("FAB menu: the menu failed to load:", error);
|
|
146
146
|
return null;
|
|
147
|
-
})
|
|
147
|
+
});
|
|
148
148
|
return loading;
|
|
149
149
|
};
|
|
150
150
|
const preload = () => {
|
|
@@ -12,7 +12,7 @@ write();
|
|
|
12
12
|
};
|
|
13
13
|
const schedule = (read) => {
|
|
14
14
|
pending.add(read);
|
|
15
|
-
flushing
|
|
15
|
+
flushing ??= setTimeout(flush, 0);
|
|
16
16
|
};
|
|
17
17
|
export const withPlacement = () => (component) => {
|
|
18
18
|
const PREFIX = component.config.prefix || "mtrl";
|
|
@@ -20,7 +20,7 @@ if (!item.id || !item.label || !item.icon || ids.has(item.id))
|
|
|
20
20
|
throw new Error(`${component} destinations require unique IDs, labels, and icons`);
|
|
21
21
|
ids.add(item.id);
|
|
22
22
|
const active = !!item.active && !item.disabled && !selected;
|
|
23
|
-
selected
|
|
23
|
+
selected ||= active;
|
|
24
24
|
return { ...item, active };
|
|
25
25
|
});
|
|
26
26
|
};
|
|
@@ -44,7 +44,7 @@ return roundedPolygon(vertices, undefined, points.map((p) => p.r), 0.5, 0.5);
|
|
|
44
44
|
};
|
|
45
45
|
const shape = (build) => {
|
|
46
46
|
let built;
|
|
47
|
-
return () => (built
|
|
47
|
+
return () => (built ??= normalizePolygon(build()));
|
|
48
48
|
};
|
|
49
49
|
export const shapeCircle = /*#__PURE__*/ shape(() => circle(10));
|
|
50
50
|
export const shapeSquare = /*#__PURE__*/ shape(() => rectangle(1, 1, cornerRound30));
|
|
@@ -4,8 +4,8 @@ import { defineElement } from "./define.js";
|
|
|
4
4
|
const toValue = toIsoValue;
|
|
5
5
|
const hosts = new WeakMap();
|
|
6
6
|
let missing = null;
|
|
7
|
-
const valueMissingMessage = () => (missing
|
|
8
|
-
"Please fill out this field.")
|
|
7
|
+
const valueMissingMessage = () => (missing ??= Object.assign(document.createElement("input"), { type: "date", required: true }).validationMessage ||
|
|
8
|
+
"Please fill out this field.");
|
|
9
9
|
const validate = (c) => {
|
|
10
10
|
const internals = hosts.get(c)?.internals;
|
|
11
11
|
if (!internals)
|
package/dist/elements/define.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f)
|
|
3
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
-
};
|
|
8
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
-
if (kind === "m")
|
|
10
|
-
throw new TypeError("Private method is not writable");
|
|
11
|
-
if (kind === "a" && !f)
|
|
12
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
-
};
|
|
17
1
|
import { MOUNT, DISPOSE } from "./lifecycle.js";
|
|
18
2
|
import { PREFIX } from "../core/config.js";
|
|
19
3
|
import { trackDirection } from "../core/dom/direction.js";
|
|
@@ -118,25 +102,38 @@ child.remove();
|
|
|
118
102
|
};
|
|
119
103
|
const hasContent = (host) => Array.from(host.childNodes).some((node) => (node.nodeType === 1 && !isDeclarativeTemplate(node)) || (node.nodeType === 3 && (node.textContent ?? "").trim() !== ""));
|
|
120
104
|
export const createElementClass = (spec) => {
|
|
121
|
-
var _MElement_instances, _MElement_pending, _MElement_restoreState, _MElement_silent, _MElement_dirty, _MElement_cleanup, _MElement_observer, _MElement_parts, _MElement_slot, _MElement_quietly, _MElement_upgradeProperties, _MElement_config, _MElement_build, _MElement_exposeParts, _MElement_teardown, _MElement_rebuild, _MElement_syncForm;
|
|
122
105
|
const backed = [...(spec.model ? [spec.model] : []), ...(spec.defaults ?? [])];
|
|
123
106
|
const backing = new Set(backed.map(kebab));
|
|
124
107
|
class MElement extends HTMLElement {
|
|
108
|
+
static { this.formAssociated = !!spec.form; }
|
|
109
|
+
static {
|
|
110
|
+
this.observedAttributes = [
|
|
111
|
+
...Object.keys(spec.attributes ?? {}),
|
|
112
|
+
...(spec.slot ? [spec.slot.attribute] : []),
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
#pending;
|
|
116
|
+
#restoreState;
|
|
117
|
+
#silent;
|
|
118
|
+
#dirty;
|
|
119
|
+
#cleanup;
|
|
120
|
+
#observer;
|
|
121
|
+
#parts;
|
|
122
|
+
#slot;
|
|
125
123
|
get dirty() {
|
|
126
|
-
return
|
|
124
|
+
return this.#dirty;
|
|
127
125
|
}
|
|
128
126
|
constructor() {
|
|
129
127
|
super();
|
|
130
|
-
_MElement_instances.add(this);
|
|
131
128
|
this.component = null;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
this.#pending = new Map();
|
|
130
|
+
this.#restoreState = null;
|
|
131
|
+
this.#silent = 0;
|
|
132
|
+
this.#dirty = false;
|
|
133
|
+
this.#cleanup = [];
|
|
134
|
+
this.#observer = null;
|
|
135
|
+
this.#parts = null;
|
|
136
|
+
this.#slot = null;
|
|
140
137
|
this.attachShadow({ mode: "open", delegatesFocus: true });
|
|
141
138
|
this.internals = spec.form && typeof this.attachInternals === "function" ? this.attachInternals() : null;
|
|
142
139
|
if (backed.length) {
|
|
@@ -145,94 +142,94 @@ if (eventSpec.state)
|
|
|
145
142
|
continue;
|
|
146
143
|
this.addEventListener(event, (e) => {
|
|
147
144
|
if (e.target === this)
|
|
148
|
-
|
|
145
|
+
this.#dirty = true;
|
|
149
146
|
});
|
|
150
147
|
}
|
|
151
148
|
}
|
|
152
149
|
}
|
|
153
|
-
[
|
|
150
|
+
[MOUNT]() {
|
|
154
151
|
this.connectedCallback();
|
|
155
|
-
|
|
152
|
+
this.#exposeParts(this.shadowRoot);
|
|
156
153
|
}
|
|
157
154
|
[DISPOSE]() {
|
|
158
|
-
|
|
155
|
+
this.#teardown();
|
|
159
156
|
}
|
|
160
157
|
connectedCallback() {
|
|
161
158
|
if (spec.marker)
|
|
162
159
|
this.toggleAttribute(spec.marker, true);
|
|
163
160
|
removeDeclarativeTemplates(this);
|
|
164
|
-
|
|
161
|
+
this.#upgradeProperties();
|
|
165
162
|
if (!this.component)
|
|
166
|
-
|
|
163
|
+
this.#build();
|
|
167
164
|
}
|
|
168
165
|
disconnectedCallback() {
|
|
169
166
|
queueMicrotask(() => {
|
|
170
167
|
if (!this.isConnected)
|
|
171
|
-
|
|
168
|
+
this.#teardown();
|
|
172
169
|
});
|
|
173
170
|
}
|
|
174
171
|
attributeChangedCallback(name, previous, next) {
|
|
175
172
|
if (!this.component || previous === next)
|
|
176
173
|
return;
|
|
177
174
|
if (spec.slot && name === spec.slot.attribute) {
|
|
178
|
-
if (
|
|
179
|
-
|
|
175
|
+
if (this.#slot)
|
|
176
|
+
this.#slot.textContent = next ?? "";
|
|
180
177
|
else if (next)
|
|
181
|
-
|
|
178
|
+
this.#rebuild(true);
|
|
182
179
|
return;
|
|
183
180
|
}
|
|
184
181
|
const attribute = spec.attributes?.[name];
|
|
185
182
|
if (!attribute)
|
|
186
183
|
return;
|
|
187
|
-
if (
|
|
184
|
+
if (this.#dirty && backing.has(name))
|
|
188
185
|
return;
|
|
189
186
|
if (attribute.update) {
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
this.#quietly(() => attribute.update?.(this.component, read(this, name, attribute.type), this));
|
|
188
|
+
this.#syncForm();
|
|
192
189
|
}
|
|
193
190
|
else {
|
|
194
|
-
|
|
191
|
+
this.#rebuild(true);
|
|
195
192
|
}
|
|
196
193
|
}
|
|
197
194
|
formResetCallback() {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
this.#dirty = false;
|
|
196
|
+
this.#pending.clear();
|
|
197
|
+
this.#rebuild(false);
|
|
201
198
|
}
|
|
202
199
|
formStateRestoreCallback(state) {
|
|
203
200
|
if (typeof state !== "string" || !spec.form?.restore)
|
|
204
201
|
return;
|
|
205
|
-
|
|
202
|
+
this.#dirty = true;
|
|
206
203
|
if (!this.component) {
|
|
207
|
-
|
|
204
|
+
this.#restoreState = state;
|
|
208
205
|
return;
|
|
209
206
|
}
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
this.#quietly(() => spec.form?.restore?.(this.component, state));
|
|
208
|
+
this.#syncForm();
|
|
212
209
|
}
|
|
213
210
|
formDisabledCallback(disabled) {
|
|
214
211
|
const form = spec.form;
|
|
215
212
|
if (this.component && form?.disable)
|
|
216
|
-
|
|
213
|
+
this.#quietly(() => form.disable?.(this.component, disabled));
|
|
217
214
|
}
|
|
218
215
|
getProperty(name) {
|
|
219
216
|
const property = spec.properties?.[name];
|
|
220
217
|
if (!property)
|
|
221
218
|
return undefined;
|
|
222
|
-
return this.component ? property.get(this.component) :
|
|
219
|
+
return this.component ? property.get(this.component) : this.#pending.get(name);
|
|
223
220
|
}
|
|
224
221
|
setProperty(name, value) {
|
|
225
222
|
const property = spec.properties?.[name];
|
|
226
223
|
if (!property)
|
|
227
224
|
return;
|
|
228
225
|
if (backed.includes(name))
|
|
229
|
-
|
|
226
|
+
this.#dirty = true;
|
|
230
227
|
if (!this.component) {
|
|
231
|
-
|
|
228
|
+
this.#pending.set(name, value);
|
|
232
229
|
return;
|
|
233
230
|
}
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
this.#quietly(() => property.set(this.component, value));
|
|
232
|
+
this.#syncForm();
|
|
236
233
|
}
|
|
237
234
|
callMethod(name, args) {
|
|
238
235
|
const component = this.component;
|
|
@@ -242,21 +239,20 @@ return undefined;
|
|
|
242
239
|
const before = backed.map((property) => this.getProperty(property));
|
|
243
240
|
const result = method.apply(component, args);
|
|
244
241
|
if (backed.some((property, i) => this.getProperty(property) !== before[i]))
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
this.#dirty = true;
|
|
243
|
+
this.#syncForm();
|
|
247
244
|
return result === component ? this : result;
|
|
248
245
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
var _a, _b;
|
|
252
|
-
__classPrivateFieldSet(this, _MElement_silent, (_a = __classPrivateFieldGet(this, _MElement_silent, "f"), _a++, _a), "f");
|
|
246
|
+
#quietly(fn) {
|
|
247
|
+
this.#silent++;
|
|
253
248
|
try {
|
|
254
249
|
fn();
|
|
255
250
|
}
|
|
256
251
|
finally {
|
|
257
|
-
|
|
252
|
+
this.#silent--;
|
|
253
|
+
}
|
|
258
254
|
}
|
|
259
|
-
|
|
255
|
+
#upgradeProperties() {
|
|
260
256
|
const names = [
|
|
261
257
|
...Object.keys(spec.attributes ?? {}).map(camel),
|
|
262
258
|
...Object.keys(spec.properties ?? {}),
|
|
@@ -270,7 +266,8 @@ delete self[name];
|
|
|
270
266
|
self[name] = value;
|
|
271
267
|
}
|
|
272
268
|
}
|
|
273
|
-
}
|
|
269
|
+
}
|
|
270
|
+
#config() {
|
|
274
271
|
const config = {};
|
|
275
272
|
for (const [name, attribute] of Object.entries(spec.attributes ?? {})) {
|
|
276
273
|
if (!attribute.config)
|
|
@@ -285,32 +282,33 @@ if (text || hasContent(this)) {
|
|
|
285
282
|
const slot = document.createElement("slot");
|
|
286
283
|
slot.textContent = text ?? "";
|
|
287
284
|
config[spec.slot.config] = slot;
|
|
288
|
-
|
|
285
|
+
this.#slot = slot;
|
|
289
286
|
}
|
|
290
287
|
}
|
|
291
288
|
Object.assign(config, spec.config?.(this));
|
|
292
289
|
for (const [name, property] of Object.entries(spec.properties ?? {})) {
|
|
293
|
-
if (property.config &&
|
|
294
|
-
config[property.config] =
|
|
295
|
-
|
|
290
|
+
if (property.config && this.#pending.has(name)) {
|
|
291
|
+
config[property.config] = this.#pending.get(name);
|
|
292
|
+
this.#pending.delete(name);
|
|
296
293
|
}
|
|
297
294
|
}
|
|
298
295
|
return config;
|
|
299
|
-
}
|
|
296
|
+
}
|
|
297
|
+
#build() {
|
|
300
298
|
trackDirection(this);
|
|
301
299
|
const root = this.shadowRoot;
|
|
302
300
|
applyStyles(root, [`host:${spec.name}`, ...SHADOW_BASE_STYLES, ...spec.styles]);
|
|
303
|
-
const component = spec.create(
|
|
301
|
+
const component = spec.create(this.#config());
|
|
304
302
|
this.component = component;
|
|
305
|
-
if (
|
|
306
|
-
|
|
303
|
+
if (this.#slot && !component.element.contains(this.#slot))
|
|
304
|
+
this.#slot = null;
|
|
307
305
|
root.append(component.element);
|
|
308
|
-
|
|
306
|
+
this.#exposeParts(root);
|
|
309
307
|
const events = component;
|
|
310
308
|
for (const [event, eventSpec] of Object.entries(spec.events ?? {})) {
|
|
311
309
|
const handler = (payload) => {
|
|
312
|
-
|
|
313
|
-
if (
|
|
310
|
+
this.#syncForm();
|
|
311
|
+
if (this.#silent)
|
|
314
312
|
return;
|
|
315
313
|
const detail = eventSpec.detail ? eventSpec.detail(payload) : payload;
|
|
316
314
|
this.dispatchEvent(new CustomEvent(event, { detail, bubbles: true, composed: true }));
|
|
@@ -325,25 +323,25 @@ return false;
|
|
|
325
323
|
})() && process.env.NODE_ENV !== "production")
|
|
326
324
|
Object.assign(handler, { __h: this });
|
|
327
325
|
events.on?.(event, handler);
|
|
328
|
-
|
|
326
|
+
this.#cleanup.push(() => events.off?.(event, handler));
|
|
329
327
|
}
|
|
330
328
|
for (const event of spec.form?.events ?? []) {
|
|
331
329
|
if (spec.events?.[event])
|
|
332
330
|
continue;
|
|
333
|
-
const handler = () =>
|
|
331
|
+
const handler = () => this.#syncForm();
|
|
334
332
|
events.on?.(event, handler);
|
|
335
|
-
|
|
333
|
+
this.#cleanup.push(() => events.off?.(event, handler));
|
|
336
334
|
}
|
|
337
|
-
for (const [name, value] of
|
|
335
|
+
for (const [name, value] of this.#pending) {
|
|
338
336
|
const property = spec.properties?.[name];
|
|
339
337
|
if (property)
|
|
340
|
-
|
|
338
|
+
this.#quietly(() => property.set(component, value));
|
|
341
339
|
}
|
|
342
|
-
|
|
343
|
-
if (
|
|
344
|
-
const state =
|
|
345
|
-
|
|
346
|
-
|
|
340
|
+
this.#pending.clear();
|
|
341
|
+
if (this.#restoreState !== null) {
|
|
342
|
+
const state = this.#restoreState;
|
|
343
|
+
this.#restoreState = null;
|
|
344
|
+
this.#quietly(() => spec.form?.restore?.(component, state));
|
|
347
345
|
}
|
|
348
346
|
if (spec.form?.activate) {
|
|
349
347
|
const onClick = (event) => {
|
|
@@ -351,41 +349,42 @@ if (event.composedPath()[0] === this)
|
|
|
351
349
|
spec.form?.activate?.(component);
|
|
352
350
|
};
|
|
353
351
|
this.addEventListener("click", onClick);
|
|
354
|
-
|
|
352
|
+
this.#cleanup.push(() => this.removeEventListener("click", onClick));
|
|
355
353
|
}
|
|
356
354
|
const cleanup = spec.setup?.(this, component);
|
|
357
355
|
if (cleanup)
|
|
358
|
-
|
|
356
|
+
this.#cleanup.push(cleanup);
|
|
359
357
|
{
|
|
360
|
-
|
|
358
|
+
this.#observer = new MutationObserver(() => {
|
|
361
359
|
removeDeclarativeTemplates(this);
|
|
362
360
|
const observe = spec.observeChildren;
|
|
363
361
|
let updated = false;
|
|
364
362
|
const component = this.component;
|
|
365
363
|
if (typeof observe === "function" && component) {
|
|
366
|
-
|
|
364
|
+
this.#quietly(() => {
|
|
367
365
|
updated = observe(this, component);
|
|
368
366
|
});
|
|
369
367
|
}
|
|
370
368
|
if (updated) {
|
|
371
|
-
|
|
369
|
+
this.#syncForm();
|
|
372
370
|
return;
|
|
373
371
|
}
|
|
374
|
-
if (observe || (spec.slot && !
|
|
375
|
-
|
|
376
|
-
})
|
|
377
|
-
|
|
372
|
+
if (observe || (spec.slot && !this.#slot && hasContent(this)))
|
|
373
|
+
this.#rebuild(true);
|
|
374
|
+
});
|
|
375
|
+
this.#observer.observe(this, {
|
|
378
376
|
childList: true,
|
|
379
377
|
subtree: !!spec.observeChildren,
|
|
380
378
|
attributes: !!spec.observeChildren,
|
|
381
379
|
characterData: !!spec.observeChildren,
|
|
382
380
|
});
|
|
383
381
|
}
|
|
384
|
-
|
|
385
|
-
}
|
|
382
|
+
this.#syncForm();
|
|
383
|
+
}
|
|
384
|
+
#exposeParts(root) {
|
|
386
385
|
const name = (node) => {
|
|
387
386
|
const names = partNames(node);
|
|
388
|
-
if (spec.slot &&
|
|
387
|
+
if (spec.slot && this.#slot?.parentElement === node && !names.includes(spec.slot.attribute)) {
|
|
389
388
|
names.push(spec.slot.attribute);
|
|
390
389
|
}
|
|
391
390
|
const value = names.join(" ");
|
|
@@ -403,20 +402,21 @@ name(child);
|
|
|
403
402
|
};
|
|
404
403
|
for (const child of Array.from(root.children))
|
|
405
404
|
nameAll(child);
|
|
406
|
-
|
|
405
|
+
this.#parts ??= new MutationObserver((records) => {
|
|
407
406
|
for (const record of records) {
|
|
408
407
|
for (const node of Array.from(record.addedNodes))
|
|
409
408
|
if (node.nodeType === 1)
|
|
410
409
|
nameAll(node);
|
|
411
410
|
}
|
|
412
|
-
})
|
|
413
|
-
|
|
414
|
-
}
|
|
411
|
+
});
|
|
412
|
+
this.#parts.observe(root, { childList: true, subtree: true });
|
|
413
|
+
}
|
|
414
|
+
#teardown() {
|
|
415
415
|
const component = this.component;
|
|
416
|
-
const observer =
|
|
417
|
-
const parts =
|
|
418
|
-
|
|
419
|
-
|
|
416
|
+
const observer = this.#observer;
|
|
417
|
+
const parts = this.#parts;
|
|
418
|
+
this.#observer = null;
|
|
419
|
+
this.#parts = null;
|
|
420
420
|
let failure;
|
|
421
421
|
let failed = false;
|
|
422
422
|
const attempt = (cleanup) => {
|
|
@@ -431,28 +431,30 @@ failed = true;
|
|
|
431
431
|
};
|
|
432
432
|
attempt(() => observer?.disconnect());
|
|
433
433
|
attempt(() => parts?.disconnect());
|
|
434
|
-
for (const cleanup of
|
|
434
|
+
for (const cleanup of this.#cleanup.splice(0))
|
|
435
435
|
attempt(cleanup);
|
|
436
436
|
if (component) {
|
|
437
437
|
attempt(() => component.destroy());
|
|
438
438
|
attempt(() => component.element.remove());
|
|
439
439
|
}
|
|
440
440
|
this.component = null;
|
|
441
|
-
|
|
441
|
+
this.#slot = null;
|
|
442
442
|
if (failed)
|
|
443
443
|
throw failure;
|
|
444
|
-
}
|
|
444
|
+
}
|
|
445
|
+
#rebuild(keepState) {
|
|
445
446
|
if (this.component && keepState) {
|
|
446
447
|
for (const [name, property] of Object.entries(spec.properties ?? {})) {
|
|
447
|
-
if (!
|
|
448
|
+
if (!this.#dirty && backed.includes(name))
|
|
448
449
|
continue;
|
|
449
|
-
|
|
450
|
+
this.#pending.set(name, property.get(this.component));
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
|
-
|
|
453
|
+
this.#teardown();
|
|
453
454
|
if (this.isConnected)
|
|
454
|
-
|
|
455
|
-
}
|
|
455
|
+
this.#build();
|
|
456
|
+
}
|
|
457
|
+
#syncForm() {
|
|
456
458
|
const form = spec.form;
|
|
457
459
|
const internals = this.internals;
|
|
458
460
|
if (!form || !internals || !this.component)
|
|
@@ -469,12 +471,8 @@ if (!(validity.valid && internals.validity.valid)) {
|
|
|
469
471
|
internals.setValidity(validity, control.validationMessage, control);
|
|
470
472
|
}
|
|
471
473
|
}
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
MElement.observedAttributes = [
|
|
475
|
-
...Object.keys(spec.attributes ?? {}),
|
|
476
|
-
...(spec.slot ? [spec.slot.attribute] : []),
|
|
477
|
-
];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
478
476
|
if ( /*#__PURE__*/(() => {
|
|
479
477
|
try {
|
|
480
478
|
return process.env.NODE_ENV !== "production";
|
|
@@ -571,7 +569,7 @@ return Declaration;
|
|
|
571
569
|
};
|
|
572
570
|
export const defineElement = (spec) => {
|
|
573
571
|
let element = null;
|
|
574
|
-
const getElement = () => (element
|
|
572
|
+
const getElement = () => (element ??= createElementClass(spec));
|
|
575
573
|
const registered = new Set();
|
|
576
574
|
let prepared = false;
|
|
577
575
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-badge:not(:defined){display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;vertical-align:middle;overflow:hidden;height:16px;min-width:16px;max-width:34px;padding:0 4px;border-radius:var(--mtrl-sys-shape-corner-full, 9999px);font-weight:500;font-size:11px;line-height:16px;background-color:var(--mtrl-sys-color-error);color:var(--mtrl-sys-color-on-error)}m-badge:not(:defined)[color=primary]{background-color:var(--mtrl-sys-color-primary);color:var(--mtrl-sys-color-on-primary)}m-badge:not(:defined)[color=secondary]{background-color:var(--mtrl-sys-color-secondary);color:var(--mtrl-sys-color-on-secondary)}m-badge:not(:defined)[color=tertiary]{background-color:var(--mtrl-sys-color-tertiary);color:var(--mtrl-sys-color-on-tertiary)}m-badge:not(:defined)[color=success]{background-color:var(--mtrl-sys-color-success);color:var(--mtrl-sys-color-on-success)}m-badge:not(:defined)[color=warning]{background-color:var(--mtrl-sys-color-warning);color:var(--mtrl-sys-color-on-warning)}m-badge:not(:defined)[color=info]{background-color:var(--mtrl-sys-color-info);color:var(--mtrl-sys-color-on-info)}m-badge:not(:defined):empty[label]:not([label=""])::before{content:attr(label)}m-badge:not(:defined):not([variant=small]):is(:empty:not([label]),[label=""],[label="0"]){width:0;height:0;min-width:0;max-width:none;padding:0;font-size:0;background-color:rgba(0,0,0,0)}m-badge:not(:defined)[variant=small]{width:6px;height:6px;min-width:6px;max-width:none;padding:0;font-size:0}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-bottom-app-bar:not(:defined){position:absolute;bottom:0;left:0;right:0;display:flex;align-items:center;gap:4px;box-sizing:border-box;height:80px;padding:12px 16px 12px 4px;background-color:var(--mtrl-sys-color-surface-container)}m-bottom-app-bar:not(:defined)>[slot=fab]{margin-left:auto}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-bottom-sheet:not(:defined){display:none}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-button-group:not(:defined){display:inline-flex;vertical-align:baseline;gap:12px;white-space:nowrap}m-button-group:not(:defined)::before{width:0;height:32px;margin-inline-end:-12px;align-self:flex-start}m-button-group:not(:defined):has(>[icon]:empty:first-child){align-items:center}m-button-group:not(:defined):has(>[icon]:empty:first-child)::before{content:""}m-button-group:not(:defined)[size=xs]{gap:18px}m-button-group:not(:defined):is([size=m],[size=l],[size=xl]){gap:8px}m-button-group:not(:defined)[density=comfortable]>*{height:36px}m-button-group:not(:defined)[density=compact]>*{height:32px}m-button-group:not(:defined)[size=xs]>*{height:32px;padding:0 13px}m-button-group:not(:defined)[size=xs][density=comfortable]>*{height:28px}m-button-group:not(:defined)[size=xs][density=compact]>*{height:24px}m-button-group:not(:defined)[size=xs]::before{height:26px;margin-inline-end:-18px}m-button-group:not(:defined)[size=m]>*{height:56px;padding:0 25px;font-size:16px;line-height:24px;letter-spacing:.15px}m-button-group:not(:defined)[size=m][density=comfortable]>*{height:52px}m-button-group:not(:defined)[size=m][density=compact]>*{height:48px}m-button-group:not(:defined)[size=m]::before{height:40px}m-button-group:not(:defined)[size=l]>*{height:96px;padding:0 50px;font-size:24px;line-height:32px}m-button-group:not(:defined)[size=l][density=comfortable]>*{height:92px}m-button-group:not(:defined)[size=l][density=compact]>*{height:88px}m-button-group:not(:defined)[size=l]::before{height:64px}m-button-group:not(:defined)[size=xl]>*{height:136px;padding:0 67px;font-size:32px;line-height:40px}m-button-group:not(:defined)[size=xl][density=comfortable]>*{height:132px}m-button-group:not(:defined)[size=xl][density=compact]>*{height:128px}m-button-group:not(:defined)[size=xl]::before{height:88px}m-button-group:not(:defined):is([size=m],[size=l],[size=xl])::before{margin-inline-end:-8px}m-button-group:not(:defined):is([size=l],[size=xl])>*{letter-spacing:0;font-weight:400}m-button-group:not(:defined)[density=comfortable]::before{margin-block-start:-2px}m-button-group:not(:defined)[density=compact]::before{margin-block-start:-4px}m-button-group:not(:defined)>*{visibility:hidden;display:inline-flex;align-items:center;flex:none;min-width:58px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);height:40px;padding:0 17px;font-size:14px;line-height:20px;letter-spacing:.1px;font-weight:500}m-button-group:not(:defined)>*[icon]:empty{min-width:0;padding:0;aspect-ratio:1}m-button-group:not(:defined)[kind=connected]{gap:2px}m-button-group:not(:defined)[kind=connected]::before{margin-inline-end:-2px}m-button-group:not(:defined):is(:not([size]),[size=xs],[size=s])[kind=connected]>*{min-width:48px}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-button:not(:defined){display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;box-sizing:border-box;min-width:58px;white-space:nowrap;background-color:var(--mtrl-sys-color-primary);color:var(--mtrl-sys-color-on-primary);height:40px;padding:0 16px;gap:8px;border-radius:20px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.1px;font-weight:500}m-button:not(:defined)[icon]::before,m-button:not(:defined)[icon][icon-position=end]::after{width:20px;height:20px}m-button:not(:defined)[size=xs]{height:32px;padding:0 12px;gap:4px;border-radius:16px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.1px;font-weight:500}m-button:not(:defined)[size=xs][icon]::before,m-button:not(:defined)[size=xs][icon][icon-position=end]::after{width:20px;height:20px}m-button:not(:defined)[size=s]{height:40px;padding:0 16px;gap:8px;border-radius:20px;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.1px;font-weight:500}m-button:not(:defined)[size=s][icon]::before,m-button:not(:defined)[size=s][icon][icon-position=end]::after{width:20px;height:20px}m-button:not(:defined)[size=m]{height:56px;padding:0 24px;gap:8px;border-radius:28px;font-family:var(--mtrl-ref-typeface-brand, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.15px;font-weight:500}m-button:not(:defined)[size=m][icon]::before,m-button:not(:defined)[size=m][icon][icon-position=end]::after{width:24px;height:24px}m-button:not(:defined)[size=l]{height:96px;padding:0 48px;gap:12px;border-radius:48px;font-family:var(--mtrl-ref-typeface-brand, Roboto, sans-serif);font-size:24px;line-height:32px;letter-spacing:0;font-weight:400}m-button:not(:defined)[size=l][icon]::before,m-button:not(:defined)[size=l][icon][icon-position=end]::after{width:32px;height:32px}m-button:not(:defined)[size=xl]{height:136px;padding:0 64px;gap:16px;border-radius:68px;font-family:var(--mtrl-ref-typeface-brand, Roboto, sans-serif);font-size:32px;line-height:40px;letter-spacing:0;font-weight:400}m-button:not(:defined)[size=xl][icon]::before,m-button:not(:defined)[size=xl][icon][icon-position=end]::after{width:40px;height:40px}m-button:not(:defined)[variant=filled]{background-color:var(--mtrl-sys-color-primary);color:var(--mtrl-sys-color-on-primary)}m-button:not(:defined)[variant=elevated]{background-color:var(--mtrl-sys-color-surface-container-low);color:var(--mtrl-sys-color-primary)}m-button:not(:defined)[variant=tonal]{background-color:var(--mtrl-sys-color-secondary-container);color:var(--mtrl-sys-color-on-secondary-container)}m-button:not(:defined)[variant=outlined]{background-color:rgba(0,0,0,0);color:var(--mtrl-sys-color-on-surface-variant)}m-button:not(:defined)[variant=text]{background-color:rgba(0,0,0,0);color:var(--mtrl-sys-color-primary)}m-button:not(:defined)[variant=outlined]{border:1px solid var(--mtrl-sys-color-outline-variant)}m-button:not(:defined)[variant=text]{padding:0 12px}m-button:not(:defined)[icon]::before,m-button:not(:defined)[icon][icon-position=end]::after{content:"";flex:none}m-button:not(:defined)[icon][icon-position=end]::before{content:none}m-button:not(:defined)[icon]:not([size]),m-button:not(:defined)[icon][size=s]{padding-inline-start:12px}m-button:not(:defined)[icon]:not([size])[icon-position=end],m-button:not(:defined)[icon][size=s][icon-position=end]{padding-inline-start:16px;padding-inline-end:12px}m-button:not(:defined)[variant=text][icon]:not([size]),m-button:not(:defined)[variant=text][icon][size=xs],m-button:not(:defined)[variant=text][icon][size=s]{padding-inline:12px 16px}m-button:not(:defined)[variant=text][icon]:not([size])[icon-position=end],m-button:not(:defined)[variant=text][icon][size=xs][icon-position=end],m-button:not(:defined)[variant=text][icon][size=s][icon-position=end]{padding-inline:16px 12px}m-button:not(:defined)[variant=text][icon][size=m]{padding:0 24px}m-button:not(:defined)[variant=text][icon][size=l]{padding:0 48px}m-button:not(:defined)[variant=text][icon][size=xl]{padding:0 64px}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-card:not(:defined){display:flex;flex-direction:column;box-sizing:border-box;padding:16px;border-radius:var(--mtrl-sys-shape-corner-medium, 12px);background-color:var(--mtrl-sys-color-surface-container-low);color:var(--mtrl-sys-color-on-surface);font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.25px;font-weight:400}m-card:not(:defined)[variant=filled]{background-color:var(--mtrl-sys-color-surface-container-highest)}m-card:not(:defined)[variant=outlined]{border:1px solid var(--mtrl-sys-color-outline-variant);background-color:var(--mtrl-sys-color-surface)}m-card:not(:defined)[headline]::before{content:attr(headline);order:-2;font-family:var(--mtrl-ref-typeface-brand, Roboto, sans-serif);font-size:22px;line-height:28px;letter-spacing:0;font-weight:400}m-card:not(:defined)[subhead]::after{content:attr(subhead);order:-1;color:var(--mtrl-sys-color-on-surface-variant)}m-card:not(:defined)[headline]:not([subhead])::before,m-card:not(:defined)[subhead]::after{margin-bottom:16px}m-card:not(:defined)>[slot=headline]{order:-2;font-family:var(--mtrl-ref-typeface-brand, Roboto, sans-serif);font-size:22px;line-height:28px;letter-spacing:0;font-weight:400}m-card:not(:defined)>[slot=subhead]{order:-1;color:var(--mtrl-sys-color-on-surface-variant)}m-card:not(:defined):not(:has(>[slot=actions]~[slot=actions]))>[slot=actions]{align-self:flex-end;margin-block:24px -8px;margin-inline:-8px}m-card:not(:defined):not(:has(>[slot=actions]~[slot=actions]))[actions-align=start]>[slot=actions],m-card:not(:defined):not(:has(>[slot=actions]~[slot=actions]))[actions-align=space-between]>[slot=actions]{align-self:flex-start}m-card:not(:defined):not(:has(>[slot=actions]~[slot=actions]))[actions-align=center]>[slot=actions]{align-self:center}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-carousel:not(:defined){display:block}m-carousel:not(:defined)>*{visibility:hidden;display:none}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-checkbox:not(:defined){display:inline-flex;align-items:center;box-sizing:border-box;min-height:48px;padding:4px 0;color:var(--mtrl-sys-color-on-surface);font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:16px;line-height:24px;letter-spacing:.5px;font-weight:400}m-checkbox:not(:defined)::before{content:"";flex:none;box-sizing:border-box;width:18px;height:18px;margin-inline-end:12px;border:2px solid var(--mtrl-sys-color-on-surface-variant);border-radius:2px}m-checkbox:not(:defined)[checked]::before{border-color:var(--mtrl-sys-color-primary);background-color:var(--mtrl-sys-color-primary)}m-checkbox:not(:defined)[label-position=start]::before{order:1;margin-inline:12px 0}m-checkbox:not(:defined):empty:is(:not([label]),[label=""]){min-width:48px;justify-content:center}m-checkbox:not(:defined):empty:is(:not([label]),[label=""])::before{margin-inline:0}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! material v3.
|
|
1
|
+
/*! material v3.7.0 | MIT */
|
|
2
2
|
@layer mtrl.preupgrade{m-chips:not(:defined){display:flex;flex-wrap:wrap;gap:8px}m-chips:not(:defined)[vertical]{flex-direction:column;align-items:flex-start}m-chips:not(:defined)[scrollable]{flex-wrap:nowrap;overflow:hidden}m-chips:not(:defined)>*{visibility:hidden;display:inline-flex;align-items:center;box-sizing:border-box;height:32px;padding:0 16px;white-space:nowrap;font-family:var(--mtrl-ref-typeface-plain, Roboto, sans-serif);font-size:14px;line-height:20px;letter-spacing:.1px;font-weight:500}[data-mtrl-ssr]:not(:defined):not(#\0),[data-mtrl-ssr]:not(:defined):not(#\0)::before,[data-mtrl-ssr]:not(:defined):not(#\0)::after,[data-mtrl-ssr]:not(:defined):not(#\0) > :defined{all:revert-layer}}
|