@nonoun/native-ui 0.2.8 → 0.2.10
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/dist/components-lean.css +119 -6
- package/dist/components.css +119 -6
- package/dist/{ui-icon-element.js → components.js} +1387 -465
- package/dist/containers/ui-layout-sidebar/ui-layout-sidebar-element.d.ts.map +1 -1
- package/dist/core/trait-runtime.d.ts.map +1 -1
- package/dist/{register-all2.js → core.js} +79 -35
- package/dist/custom-elements.json +2747 -2747
- package/dist/foundation.css +1 -15
- package/dist/inspector/build-inspector.d.ts +8 -0
- package/dist/inspector/build-inspector.d.ts.map +1 -0
- package/dist/inspector/index.d.ts +10 -0
- package/dist/inspector/index.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-color-swatch-element.d.ts → inspector/native-tokens-color-swatch-element.d.ts} +3 -3
- package/dist/inspector/native-tokens-color-swatch-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-color-swatch.d.ts +3 -0
- package/dist/inspector/native-tokens-color-swatch.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-colors-element.d.ts → inspector/native-tokens-colors-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-colors-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-colors.d.ts +4 -0
- package/dist/inspector/native-tokens-colors.d.ts.map +1 -0
- package/dist/inspector/native-tokens-inspector-element.d.ts +15 -0
- package/dist/inspector/native-tokens-inspector-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-inspector.d.ts +3 -0
- package/dist/inspector/native-tokens-inspector.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-themes-element.d.ts → inspector/native-tokens-themes-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-themes-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-themes.d.ts +4 -0
- package/dist/inspector/native-tokens-themes.d.ts.map +1 -0
- package/dist/{nav/inspector/ds-variable-element.d.ts → inspector/native-tokens-variable-element.d.ts} +4 -4
- package/dist/inspector/native-tokens-variable-element.d.ts.map +1 -0
- package/dist/inspector/native-tokens-variable.d.ts +4 -0
- package/dist/inspector/native-tokens-variable.d.ts.map +1 -0
- package/dist/inspector.css +31 -31
- package/dist/inspector.d.ts +11 -6
- package/dist/inspector.d.ts.map +1 -1
- package/dist/inspector.js +123 -105
- package/dist/kernel.js +77 -77
- package/dist/native-ui-lean.css +120 -21
- package/dist/native-ui.css +120 -21
- package/dist/native-ui.js +4 -49
- package/dist/register-all.js +4 -3
- package/dist/traits/adapters/draggable-adapter.d.ts.map +1 -1
- package/dist/traits/drag-controller.d.ts +3 -0
- package/dist/traits/drag-controller.d.ts.map +1 -1
- package/dist/traits.js +3 -6
- package/dist/ui-icon.js +56 -0
- package/package.json +1 -1
- package/dist/define.js +0 -62
- package/dist/dialog-controller.js +0 -703
- package/dist/nav/inspector/build-inspector.d.ts +0 -8
- package/dist/nav/inspector/build-inspector.d.ts.map +0 -1
- package/dist/nav/inspector/ds-color-swatch-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-color-swatch.d.ts +0 -3
- package/dist/nav/inspector/ds-color-swatch.d.ts.map +0 -1
- package/dist/nav/inspector/ds-colors-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-colors.d.ts +0 -4
- package/dist/nav/inspector/ds-colors.d.ts.map +0 -1
- package/dist/nav/inspector/ds-themes-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-themes.d.ts +0 -4
- package/dist/nav/inspector/ds-themes.d.ts.map +0 -1
- package/dist/nav/inspector/ds-variable-element.d.ts.map +0 -1
- package/dist/nav/inspector/ds-variable.d.ts +0 -4
- package/dist/nav/inspector/ds-variable.d.ts.map +0 -1
- package/dist/nav/inspector/index.d.ts +0 -9
- package/dist/nav/inspector/index.d.ts.map +0 -1
- package/dist/ui-element.js +0 -133
- package/dist/uid.js +0 -87
|
@@ -1,8 +1,287 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var e = null, t = 0, n = /* @__PURE__ */ new Set();
|
|
2
|
+
const r = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new Set();
|
|
3
|
+
function a() {
|
|
4
|
+
return e;
|
|
5
|
+
}
|
|
6
|
+
function o(t) {
|
|
7
|
+
e = t;
|
|
8
|
+
}
|
|
9
|
+
function s() {
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
function c() {
|
|
13
|
+
t++;
|
|
14
|
+
}
|
|
15
|
+
function l() {
|
|
16
|
+
t--;
|
|
17
|
+
}
|
|
18
|
+
var u = class {
|
|
19
|
+
_value;
|
|
20
|
+
_subs = /* @__PURE__ */ new Set();
|
|
21
|
+
constructor(e) {
|
|
22
|
+
this._value = e;
|
|
23
|
+
}
|
|
24
|
+
}, d = class e {
|
|
25
|
+
_subs = /* @__PURE__ */ new Set();
|
|
26
|
+
_deps = /* @__PURE__ */ new Set();
|
|
27
|
+
_fn;
|
|
28
|
+
_value = void 0;
|
|
29
|
+
_dirty = !0;
|
|
30
|
+
constructor(e) {
|
|
31
|
+
this._fn = e;
|
|
32
|
+
}
|
|
33
|
+
_notify() {
|
|
34
|
+
if (!this._dirty) {
|
|
35
|
+
this._dirty = !0;
|
|
36
|
+
for (let r of [...this._subs]) r instanceof e ? r._notify() : t > 0 ? n.add(r) : g(r);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, f = class {
|
|
40
|
+
_deps = /* @__PURE__ */ new Set();
|
|
41
|
+
_fn;
|
|
42
|
+
_disposed = !1;
|
|
43
|
+
_running = !1;
|
|
44
|
+
constructor(e) {
|
|
45
|
+
this._fn = e;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function p(t) {
|
|
49
|
+
e !== null && (t._subs.add(e), e._deps.add(t));
|
|
50
|
+
}
|
|
51
|
+
function m(e) {
|
|
52
|
+
for (let t of e._deps) t._subs.delete(e);
|
|
53
|
+
e._deps.clear();
|
|
54
|
+
}
|
|
55
|
+
function h(e) {
|
|
56
|
+
for (let r of [...e._subs]) r instanceof d ? r._notify() : t > 0 ? n.add(r) : g(r);
|
|
57
|
+
}
|
|
58
|
+
function g(t) {
|
|
59
|
+
if (t._disposed || t._running) return;
|
|
60
|
+
m(t);
|
|
61
|
+
let n = e;
|
|
62
|
+
e = t, t._running = !0;
|
|
63
|
+
try {
|
|
64
|
+
t._fn();
|
|
65
|
+
} finally {
|
|
66
|
+
e = n, t._running = !1;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function ee() {
|
|
70
|
+
let e = 0;
|
|
71
|
+
for (; n.size > 0;) {
|
|
72
|
+
if (++e > 100) throw Error("Reactive flush limit exceeded (100 iterations). Possible infinite loop.");
|
|
73
|
+
let t = [...n];
|
|
74
|
+
n.clear();
|
|
75
|
+
for (let e of t) g(e);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var te = class {
|
|
79
|
+
[Symbol.toStringTag] = "Signal";
|
|
80
|
+
#e;
|
|
81
|
+
constructor(e) {
|
|
82
|
+
this.#e = e;
|
|
83
|
+
}
|
|
84
|
+
get value() {
|
|
85
|
+
return p(this.#e), this.#e._value;
|
|
86
|
+
}
|
|
87
|
+
set value(e) {
|
|
88
|
+
Object.is(this.#e._value, e) || (this.#e._value = e, h(this.#e));
|
|
89
|
+
}
|
|
90
|
+
peek() {
|
|
91
|
+
return this.#e._value;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
function _(e) {
|
|
95
|
+
let t = new u(e), n = new te(t);
|
|
96
|
+
return r.set(n, t), n;
|
|
97
|
+
}
|
|
98
|
+
var ne = class {
|
|
99
|
+
[Symbol.toStringTag] = "Computed";
|
|
100
|
+
#e;
|
|
101
|
+
constructor(e) {
|
|
102
|
+
this.#e = e;
|
|
103
|
+
}
|
|
104
|
+
get value() {
|
|
105
|
+
return p(this.#e), this.#e._dirty && this.#t(), this.#e._value;
|
|
106
|
+
}
|
|
107
|
+
peek() {
|
|
108
|
+
return this.#e._dirty && this.#t(), this.#e._value;
|
|
109
|
+
}
|
|
110
|
+
#t() {
|
|
111
|
+
let e = this.#e;
|
|
112
|
+
if (i.has(e)) throw Error("Circular computed dependency detected.");
|
|
113
|
+
m(e), i.add(e);
|
|
114
|
+
let t = a();
|
|
115
|
+
o(e);
|
|
116
|
+
try {
|
|
117
|
+
e._value = e._fn();
|
|
118
|
+
} finally {
|
|
119
|
+
o(t), i.delete(e), e._dirty = !1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
function v(e) {
|
|
124
|
+
let t = new d(e), n = new ne(t);
|
|
125
|
+
return r.set(n, t), n;
|
|
126
|
+
}
|
|
127
|
+
function y(e) {
|
|
128
|
+
let t = new f(e);
|
|
129
|
+
return g(t), () => {
|
|
130
|
+
t._disposed || (t._disposed = !0, m(t));
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function b(e) {
|
|
134
|
+
c();
|
|
135
|
+
try {
|
|
136
|
+
e();
|
|
137
|
+
} finally {
|
|
138
|
+
l(), s() === 0 && ee();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function x(e) {
|
|
142
|
+
let t = a();
|
|
143
|
+
o(null);
|
|
144
|
+
try {
|
|
145
|
+
return e();
|
|
146
|
+
} finally {
|
|
147
|
+
o(t);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
var S = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Set();
|
|
151
|
+
function re(e) {
|
|
152
|
+
if (S.has(e.name)) {
|
|
153
|
+
console.warn(`[native-ui] Trait "${e.name}" is already registered.`);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
S.set(e.name, e);
|
|
157
|
+
for (let t of C) t(e.name);
|
|
158
|
+
}
|
|
159
|
+
/** Subscribe to trait registration events. Returns unsubscribe function. */
|
|
160
|
+
function w(e) {
|
|
161
|
+
return C.add(e), () => C.delete(e);
|
|
162
|
+
}
|
|
163
|
+
function T(e) {
|
|
164
|
+
return S.get(e);
|
|
165
|
+
}
|
|
166
|
+
function E() {
|
|
167
|
+
return new Set(S.keys());
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Parse a namespaced trait attribute like "draggable-axis" into
|
|
171
|
+
* { trait: "draggable", key: "axis" }. Returns null if the attribute
|
|
172
|
+
* doesn't match any registered trait name prefix.
|
|
173
|
+
*/
|
|
174
|
+
function D(e) {
|
|
175
|
+
let t = E();
|
|
176
|
+
for (let n of t) if (e.startsWith(n + "-")) return {
|
|
177
|
+
trait: n,
|
|
178
|
+
key: e.slice(n.length + 1)
|
|
179
|
+
};
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Collect all `{traitName}-*` attributes from an element for a given trait.
|
|
184
|
+
* Returns a plain object mapping option keys to string values.
|
|
185
|
+
*
|
|
186
|
+
* Example: element has `draggable-axis="x"` and `draggable-mode="slot"`
|
|
187
|
+
* → collectTraitOptions(el, 'draggable') returns { axis: 'x', mode: 'slot' }
|
|
188
|
+
*/
|
|
189
|
+
function O(e, t) {
|
|
190
|
+
let n = t + "-", r = {};
|
|
191
|
+
for (let t of e.attributes) t.name.startsWith(n) && (r[t.name.slice(n.length)] = t.value);
|
|
192
|
+
return r;
|
|
193
|
+
}
|
|
194
|
+
/** Base custom element class with reactive effect lifecycle, child deferral, and trait protocol. */
|
|
195
|
+
var k = class extends HTMLElement {
|
|
196
|
+
#e = [];
|
|
197
|
+
#t = /* @__PURE__ */ new Map();
|
|
198
|
+
#n = null;
|
|
199
|
+
#r = /* @__PURE__ */ new Set();
|
|
200
|
+
#i = null;
|
|
201
|
+
#a = !1;
|
|
202
|
+
#o = null;
|
|
203
|
+
/** Resolves after setup() and any deferChildren microtask have completed. */
|
|
204
|
+
ready = new Promise((e) => {
|
|
205
|
+
this.#o = e;
|
|
206
|
+
});
|
|
207
|
+
addEffect(e) {
|
|
208
|
+
this.#e.push(y(e));
|
|
209
|
+
}
|
|
210
|
+
connectedCallback() {
|
|
211
|
+
if (this.#a) return;
|
|
212
|
+
this.#a = !0, this.setup();
|
|
213
|
+
let e = this.getAttribute("traits");
|
|
214
|
+
e !== null && this.#s(e), queueMicrotask(() => this.#o?.());
|
|
215
|
+
}
|
|
216
|
+
disconnectedCallback() {
|
|
217
|
+
this.#a = !1, this.#l(), this.#n?.disconnect(), this.#n = null, this.#i?.(), this.#i = null, this.#r.clear(), this.teardown();
|
|
218
|
+
for (let e of this.#e) e();
|
|
219
|
+
this.#e = [];
|
|
220
|
+
}
|
|
221
|
+
setup() {}
|
|
222
|
+
teardown() {}
|
|
223
|
+
deferChildren(e) {
|
|
224
|
+
this.firstChild ? e() : queueMicrotask(() => {
|
|
225
|
+
this.isConnected && e();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
attributeChangedCallback(e, t, n) {}
|
|
229
|
+
/**
|
|
230
|
+
* Get a trait controller instance by name.
|
|
231
|
+
* Returns null if no controller with that name is active.
|
|
232
|
+
*/
|
|
233
|
+
getTraitController(e) {
|
|
234
|
+
return this.#t.get(e) ?? null;
|
|
235
|
+
}
|
|
236
|
+
#s(e) {
|
|
237
|
+
this.#c(e), this.#n = new MutationObserver((e) => {
|
|
238
|
+
for (let t of e) if (t.attributeName === "traits") this.#c(this.getAttribute("traits") ?? "");
|
|
239
|
+
else if (t.attributeName) {
|
|
240
|
+
let e = D(t.attributeName);
|
|
241
|
+
if (e) {
|
|
242
|
+
let t = T(e.trait), n = this.#t.get(e.trait);
|
|
243
|
+
t && n && t.update && t.update(n, O(this, e.trait));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}), this.#n.observe(this, { attributes: !0 });
|
|
247
|
+
}
|
|
248
|
+
#c(e) {
|
|
249
|
+
let t = new Set(e.split(/\s+/).filter(Boolean));
|
|
250
|
+
for (let [e, n] of this.#t) if (!t.has(e)) {
|
|
251
|
+
let t = T(e);
|
|
252
|
+
t && t.destroy(n), this.#t.delete(e);
|
|
253
|
+
}
|
|
254
|
+
this.#r.clear();
|
|
255
|
+
for (let e of t) {
|
|
256
|
+
if (this.#t.has(e)) continue;
|
|
257
|
+
let t = T(e);
|
|
258
|
+
if (!t) {
|
|
259
|
+
this.#r.add(e);
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
for (let [n] of this.#t) if (T(n)?.conflicts?.includes(e) || t.conflicts?.includes(n)) {
|
|
263
|
+
let t = `[native-ui] Trait conflict: "${e}" and "${n}" are incompatible.`;
|
|
264
|
+
console.warn(t);
|
|
265
|
+
}
|
|
266
|
+
let n = O(this, e), r = t.create(this, n);
|
|
267
|
+
this.#t.set(e, r);
|
|
268
|
+
}
|
|
269
|
+
this.#r.size > 0 && !this.#i ? this.#i = w((e) => {
|
|
270
|
+
this.#r.has(e) && (this.#r.delete(e), this.#c(this.getAttribute("traits") ?? ""), this.#r.size === 0 && (this.#i?.(), this.#i = null));
|
|
271
|
+
}) : this.#r.size === 0 && this.#i && (this.#i(), this.#i = null);
|
|
272
|
+
}
|
|
273
|
+
#l() {
|
|
274
|
+
for (let [e, t] of this.#t) {
|
|
275
|
+
let n = T(e);
|
|
276
|
+
n && n.destroy(t);
|
|
277
|
+
}
|
|
278
|
+
this.#t.clear();
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
function A(e = "ui") {
|
|
282
|
+
return `${e}-${crypto.randomUUID().slice(0, 8)}`;
|
|
283
|
+
}
|
|
284
|
+
function j(e, t, n, r) {
|
|
6
285
|
let i;
|
|
7
286
|
return () => {
|
|
8
287
|
let n = t.value;
|
|
@@ -13,55 +292,55 @@ function v(e, t, n, r) {
|
|
|
13
292
|
})), i = n;
|
|
14
293
|
};
|
|
15
294
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
19
|
-
let
|
|
295
|
+
function M(e, t, n) {
|
|
296
|
+
let r = n.attribute ?? t;
|
|
297
|
+
if (n.type === "boolean") {
|
|
298
|
+
let t = _(!1);
|
|
20
299
|
return {
|
|
21
300
|
get signal() {
|
|
22
|
-
return
|
|
301
|
+
return t;
|
|
23
302
|
},
|
|
24
303
|
get value() {
|
|
25
|
-
return
|
|
304
|
+
return t.value;
|
|
26
305
|
},
|
|
27
|
-
set(
|
|
28
|
-
|
|
306
|
+
set(n) {
|
|
307
|
+
t.value = n, e.toggleAttribute(r, n);
|
|
29
308
|
},
|
|
30
309
|
fromAttribute(e) {
|
|
31
|
-
|
|
310
|
+
t.value = e !== null;
|
|
32
311
|
}
|
|
33
312
|
};
|
|
34
313
|
}
|
|
35
|
-
if (
|
|
36
|
-
let
|
|
314
|
+
if (n.type === "number") {
|
|
315
|
+
let t = n.initial ?? 0, i = _(t);
|
|
37
316
|
return {
|
|
38
317
|
get signal() {
|
|
39
|
-
return
|
|
318
|
+
return i;
|
|
40
319
|
},
|
|
41
320
|
get value() {
|
|
42
|
-
return
|
|
321
|
+
return i.value;
|
|
43
322
|
},
|
|
44
323
|
set(t) {
|
|
45
|
-
|
|
324
|
+
i.value = t, e.setAttribute(r, String(t));
|
|
46
325
|
},
|
|
47
326
|
fromAttribute(e) {
|
|
48
|
-
|
|
327
|
+
i.value = parseFloat(e ?? String(t)) || t;
|
|
49
328
|
}
|
|
50
329
|
};
|
|
51
330
|
}
|
|
52
|
-
let
|
|
331
|
+
let i = n.initial ?? "", a = _(i);
|
|
53
332
|
return {
|
|
54
333
|
get signal() {
|
|
55
|
-
return
|
|
334
|
+
return a;
|
|
56
335
|
},
|
|
57
336
|
get value() {
|
|
58
|
-
return
|
|
337
|
+
return a.value;
|
|
59
338
|
},
|
|
60
339
|
set(t) {
|
|
61
|
-
|
|
340
|
+
a.value = t, t ? e.getAttribute(r) !== t && e.setAttribute(r, t) : e.removeAttribute(r);
|
|
62
341
|
},
|
|
63
342
|
fromAttribute(e) {
|
|
64
|
-
|
|
343
|
+
a.value = e ?? i;
|
|
65
344
|
}
|
|
66
345
|
};
|
|
67
346
|
}
|
|
@@ -78,7 +357,7 @@ function y(e, n, r) {
|
|
|
78
357
|
* }
|
|
79
358
|
* ```
|
|
80
359
|
*/
|
|
81
|
-
function
|
|
360
|
+
function N(e, t, n) {
|
|
82
361
|
let r = e[t];
|
|
83
362
|
return r ? (r.fromAttribute(n), !0) : !1;
|
|
84
363
|
}
|
|
@@ -101,7 +380,7 @@ function b(e, t, n) {
|
|
|
101
380
|
* }
|
|
102
381
|
* ```
|
|
103
382
|
*/
|
|
104
|
-
function
|
|
383
|
+
function P(e) {
|
|
105
384
|
return class extends e {
|
|
106
385
|
static formAssociated = !0;
|
|
107
386
|
/** Override to handle form-initiated disabled state changes. */
|
|
@@ -122,10 +401,130 @@ function x(e) {
|
|
|
122
401
|
formAssociatedCallback(e) {}
|
|
123
402
|
};
|
|
124
403
|
}
|
|
125
|
-
|
|
404
|
+
var F = class {
|
|
405
|
+
#e = /* @__PURE__ */ new Set();
|
|
406
|
+
#t = null;
|
|
407
|
+
#n = !1;
|
|
408
|
+
register(e) {
|
|
409
|
+
this.#e.add(e), this.#a();
|
|
410
|
+
}
|
|
411
|
+
unregister(e) {
|
|
412
|
+
this.#e.delete(e), this.#t === e && (this.#t = null), this.#e.size === 0 && this.#o();
|
|
413
|
+
}
|
|
414
|
+
/** Release the current claim (e.g. on pointerup). */
|
|
415
|
+
release() {
|
|
416
|
+
this.#t = null;
|
|
417
|
+
}
|
|
418
|
+
/** Get the currently active (claiming) participant, if any. */
|
|
419
|
+
get activeParticipant() {
|
|
420
|
+
return this.#t;
|
|
421
|
+
}
|
|
422
|
+
#r = (e) => {
|
|
423
|
+
if (this.#t) return;
|
|
424
|
+
let t = e.target, n = [];
|
|
425
|
+
for (let e of this.#e) e.host.contains(t) && n.push(e);
|
|
426
|
+
if (n.length !== 0) {
|
|
427
|
+
n.sort((e, t) => e.priority - t.priority);
|
|
428
|
+
for (let t of n) if (t.onGestureStart(e) === "claim") {
|
|
429
|
+
this.#t = t;
|
|
430
|
+
for (let e of n) e !== t && e.onGestureCancel?.();
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
#i = () => {
|
|
436
|
+
this.release();
|
|
437
|
+
};
|
|
438
|
+
#a() {
|
|
439
|
+
this.#n ||= (document.addEventListener("pointerdown", this.#r, !0), document.addEventListener("pointerup", this.#i, !0), document.addEventListener("pointercancel", this.#i, !0), !0);
|
|
440
|
+
}
|
|
441
|
+
#o() {
|
|
442
|
+
this.#n &&= (document.removeEventListener("pointerdown", this.#r, !0), document.removeEventListener("pointerup", this.#i, !0), document.removeEventListener("pointercancel", this.#i, !0), !1);
|
|
443
|
+
}
|
|
444
|
+
}, I = class {
|
|
445
|
+
#e = [];
|
|
446
|
+
#t = !1;
|
|
447
|
+
#n = (e) => {
|
|
448
|
+
let t = this.#e[this.#e.length - 1];
|
|
449
|
+
t && (e.composedPath().includes(t) || t.dispatchEvent(new CustomEvent("ui-dismiss", {
|
|
450
|
+
bubbles: !0,
|
|
451
|
+
composed: !0
|
|
452
|
+
})));
|
|
453
|
+
};
|
|
454
|
+
#r = (e) => {
|
|
455
|
+
if (e.key !== "Escape") return;
|
|
456
|
+
let t = this.#e[this.#e.length - 1];
|
|
457
|
+
t && (e.preventDefault(), t.dispatchEvent(new CustomEvent("ui-dismiss", {
|
|
458
|
+
bubbles: !0,
|
|
459
|
+
composed: !0
|
|
460
|
+
})));
|
|
461
|
+
};
|
|
462
|
+
push(e) {
|
|
463
|
+
let t = this.#e.indexOf(e);
|
|
464
|
+
t !== -1 && this.#e.splice(t, 1), this.#e.push(e), this.#i();
|
|
465
|
+
}
|
|
466
|
+
remove(e) {
|
|
467
|
+
let t = this.#e.indexOf(e);
|
|
468
|
+
t !== -1 && this.#e.splice(t, 1), this.#a();
|
|
469
|
+
}
|
|
470
|
+
#i() {
|
|
471
|
+
this.#t ||= (document.addEventListener("pointerdown", this.#n, !0), document.addEventListener("keydown", this.#r), !0);
|
|
472
|
+
}
|
|
473
|
+
#a() {
|
|
474
|
+
this.#e.length > 0 || (document.removeEventListener("pointerdown", this.#n, !0), document.removeEventListener("keydown", this.#r), this.#t = !1);
|
|
475
|
+
}
|
|
476
|
+
}, L = class {
|
|
477
|
+
#e = null;
|
|
478
|
+
#t = 0;
|
|
479
|
+
#n = [];
|
|
480
|
+
#r() {
|
|
481
|
+
return this.#e && this.#e.isConnected ? this.#e : (this.#e = document.createElement("div"), this.#e.className = "ui-toast-container", this.#e.setAttribute("role", "status"), this.#e.setAttribute("aria-live", "polite"), this.#e.setAttribute("aria-atomic", "false"), this.#e.style.cssText = "\n position: fixed;\n top: 1rem;\n right: 1rem;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n z-index: 10000;\n pointer-events: none;\n ", document.body.appendChild(this.#e), this.#e);
|
|
482
|
+
}
|
|
483
|
+
toast(e, t) {
|
|
484
|
+
let { message: n, intent: r = "info", duration: i = 4e3, dismissible: a = !0 } = t, o = this.#t++, s = this.#r(), c = document.createElement("div");
|
|
485
|
+
c.className = "ui-toast", c.setAttribute("intent", r), c.setAttribute("role", "alert"), c.style.cssText = "pointer-events: auto;";
|
|
486
|
+
let l = document.createElement("span");
|
|
487
|
+
if (l.className = "ui-toast-message", l.textContent = n, c.appendChild(l), a) {
|
|
488
|
+
let e = document.createElement("button");
|
|
489
|
+
e.className = "ui-toast-close", e.setAttribute("aria-label", "Dismiss"), e.textContent = "×", e.addEventListener("click", () => this.dismiss(o)), c.appendChild(e);
|
|
490
|
+
}
|
|
491
|
+
s.appendChild(c);
|
|
492
|
+
let u = i > 0 ? setTimeout(() => this.dismiss(o), i) : null;
|
|
493
|
+
return this.#n.push({
|
|
494
|
+
id: o,
|
|
495
|
+
el: c,
|
|
496
|
+
timer: u
|
|
497
|
+
}), e.dispatchEvent(new CustomEvent("ui-toast", {
|
|
498
|
+
bubbles: !0,
|
|
499
|
+
composed: !0,
|
|
500
|
+
detail: {
|
|
501
|
+
id: o,
|
|
502
|
+
message: n,
|
|
503
|
+
intent: r
|
|
504
|
+
}
|
|
505
|
+
})), o;
|
|
506
|
+
}
|
|
507
|
+
dismiss(e) {
|
|
508
|
+
let t = this.#n.findIndex((t) => t.id === e);
|
|
509
|
+
if (t === -1) return;
|
|
510
|
+
let n = this.#n[t];
|
|
511
|
+
n.timer && clearTimeout(n.timer), n.el.remove(), this.#n.splice(t, 1), this.#n.length === 0 && this.#e && (this.#e.remove(), this.#e = null);
|
|
512
|
+
}
|
|
513
|
+
dismissAll() {
|
|
514
|
+
for (let e of [...this.#n]) this.dismiss(e.id);
|
|
515
|
+
}
|
|
516
|
+
}, ie = null;
|
|
517
|
+
function R() {
|
|
518
|
+
return ie ||= {
|
|
519
|
+
dismissStack: new I(),
|
|
520
|
+
toastManager: new L(),
|
|
521
|
+
gestureRouter: new F()
|
|
522
|
+
}, ie;
|
|
523
|
+
}
|
|
524
|
+
function ae(e, t) {
|
|
126
525
|
return e.label.toLowerCase().includes(t.toLowerCase());
|
|
127
526
|
}
|
|
128
|
-
var
|
|
527
|
+
var z = class {
|
|
129
528
|
data;
|
|
130
529
|
query;
|
|
131
530
|
#e;
|
|
@@ -140,19 +539,19 @@ var C = class {
|
|
|
140
539
|
selectedItem;
|
|
141
540
|
empty;
|
|
142
541
|
constructor(e = {}) {
|
|
143
|
-
this.data =
|
|
542
|
+
this.data = _([]), this.query = _(""), this.#e = _(e.filterFn ?? ae), this.#t = _(e.sortFn ?? null), this.#n = _(e.multiple ?? !1), this.activeIndex = _(e.initialActiveIndex ?? -1), this.value = _(null), this.selected = _(/* @__PURE__ */ new Set()), this.filtered = v(() => {
|
|
144
543
|
let e = this.data.value, t = this.query.value, n = this.#e.value;
|
|
145
544
|
return t ? e.filter((e) => n(e, t)) : e;
|
|
146
|
-
}), this.sorted =
|
|
545
|
+
}), this.sorted = v(() => {
|
|
147
546
|
let e = this.filtered.value, t = this.#t.value;
|
|
148
547
|
return t ? [...e].sort(t) : e;
|
|
149
|
-
}), this.activeItem =
|
|
548
|
+
}), this.activeItem = v(() => {
|
|
150
549
|
let e = this.view.value, t = this.activeIndex.value;
|
|
151
550
|
return t >= 0 && t < e.length ? e[t] : null;
|
|
152
|
-
}), this.selectedItem =
|
|
551
|
+
}), this.selectedItem = v(() => {
|
|
153
552
|
let e = this.value.value;
|
|
154
553
|
return e === null ? null : this.data.value.find((t) => t.value === e) ?? null;
|
|
155
|
-
}), this.empty =
|
|
554
|
+
}), this.empty = v(() => this.view.value.length === 0);
|
|
156
555
|
}
|
|
157
556
|
get view() {
|
|
158
557
|
return this.sorted;
|
|
@@ -164,7 +563,7 @@ var C = class {
|
|
|
164
563
|
this.#n.value = e;
|
|
165
564
|
}
|
|
166
565
|
setQuery(e, t) {
|
|
167
|
-
|
|
566
|
+
b(() => {
|
|
168
567
|
this.query.value = e, this.activeIndex.value = t ?? -1;
|
|
169
568
|
});
|
|
170
569
|
}
|
|
@@ -187,7 +586,7 @@ var C = class {
|
|
|
187
586
|
select(e) {
|
|
188
587
|
if (this.#n.value) {
|
|
189
588
|
let t = new Set(this.selected.value);
|
|
190
|
-
t.add(e),
|
|
589
|
+
t.add(e), b(() => {
|
|
191
590
|
this.selected.value = t, this.value.value = e;
|
|
192
591
|
});
|
|
193
592
|
} else this.value.value = e;
|
|
@@ -195,7 +594,7 @@ var C = class {
|
|
|
195
594
|
deselect(e) {
|
|
196
595
|
if (!this.#n.value) return;
|
|
197
596
|
let t = new Set(this.selected.value);
|
|
198
|
-
t.delete(e),
|
|
597
|
+
t.delete(e), b(() => {
|
|
199
598
|
this.selected.value = t, this.value.value === e && (this.value.value = null);
|
|
200
599
|
});
|
|
201
600
|
}
|
|
@@ -208,12 +607,12 @@ var C = class {
|
|
|
208
607
|
this.selected.value = new Set(e.map((e) => e.value));
|
|
209
608
|
}
|
|
210
609
|
clearSelection() {
|
|
211
|
-
|
|
610
|
+
b(() => {
|
|
212
611
|
this.value.value = null, this.selected.value = /* @__PURE__ */ new Set();
|
|
213
612
|
});
|
|
214
613
|
}
|
|
215
614
|
reset() {
|
|
216
|
-
|
|
615
|
+
b(() => {
|
|
217
616
|
this.data.value = [], this.query.value = "", this.activeIndex.value = -1, this.value.value = null, this.selected.value = /* @__PURE__ */ new Set();
|
|
218
617
|
});
|
|
219
618
|
}
|
|
@@ -224,14 +623,14 @@ var C = class {
|
|
|
224
623
|
this.#t.value = e;
|
|
225
624
|
}
|
|
226
625
|
};
|
|
227
|
-
function
|
|
228
|
-
return new
|
|
626
|
+
function oe(e) {
|
|
627
|
+
return new z(e);
|
|
229
628
|
}
|
|
230
629
|
/**
|
|
231
630
|
* Validates a JSON string → typed option array.
|
|
232
631
|
* Filters out entries missing `value` or `label` strings.
|
|
233
632
|
*/
|
|
234
|
-
function
|
|
633
|
+
function B(e, t) {
|
|
235
634
|
try {
|
|
236
635
|
let t = JSON.parse(e);
|
|
237
636
|
return Array.isArray(t) ? t.filter((e) => typeof e == "object" && !!e && typeof e.value == "string" && typeof e.label == "string") : [];
|
|
@@ -244,7 +643,7 @@ function w(e, t) {
|
|
|
244
643
|
* Aborts any in-flight request before starting a new one.
|
|
245
644
|
* Returns the new AbortController for the caller to store.
|
|
246
645
|
*/
|
|
247
|
-
async function
|
|
646
|
+
async function V(e, t, n, r) {
|
|
248
647
|
t?.abort();
|
|
249
648
|
let i = new AbortController();
|
|
250
649
|
try {
|
|
@@ -259,20 +658,596 @@ async function T(e, t, n, r) {
|
|
|
259
658
|
}
|
|
260
659
|
return i;
|
|
261
660
|
}
|
|
262
|
-
/**
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
661
|
+
/** Enables pointer-driven drag-and-drop with drop, slot, or preview reordering. */
|
|
662
|
+
var H = class {
|
|
663
|
+
host;
|
|
664
|
+
selector;
|
|
665
|
+
dropZoneSelector;
|
|
666
|
+
axis;
|
|
667
|
+
mode;
|
|
668
|
+
disabled;
|
|
669
|
+
animate;
|
|
670
|
+
#e = null;
|
|
671
|
+
#t = null;
|
|
672
|
+
#n = null;
|
|
673
|
+
#r = 0;
|
|
674
|
+
#i = 0;
|
|
675
|
+
#a = 0;
|
|
676
|
+
#o = 0;
|
|
677
|
+
#s = -1;
|
|
678
|
+
#c = -1;
|
|
679
|
+
#l = !1;
|
|
680
|
+
#u = null;
|
|
681
|
+
#d = null;
|
|
682
|
+
#f = -1;
|
|
683
|
+
constructor(e, t) {
|
|
684
|
+
this.host = e, this.selector = t.selector, this.dropZoneSelector = t.dropZoneSelector ?? "", this.axis = t.axis ?? "both", this.mode = t.mode ?? "drop", this.disabled = t.disabled ?? !1, this.animate = t.animate ?? !0, this.attach();
|
|
685
|
+
}
|
|
686
|
+
attach() {
|
|
687
|
+
this.#l || (this.#l = !0, this.host.addEventListener("pointerdown", this.#_), this.host.addEventListener("pointerenter", this.#h, !0), this.host.addEventListener("pointerleave", this.#g, !0));
|
|
688
|
+
}
|
|
689
|
+
detach() {
|
|
690
|
+
this.#l && (this.#l = !1, this.host.removeEventListener("pointerdown", this.#_), this.host.removeEventListener("pointerenter", this.#h, !0), this.host.removeEventListener("pointerleave", this.#g, !0), this.#A());
|
|
691
|
+
}
|
|
692
|
+
destroy() {
|
|
693
|
+
this.detach();
|
|
694
|
+
}
|
|
695
|
+
#p() {
|
|
696
|
+
return this.selector ? [...this.host.querySelectorAll(this.selector)] : [];
|
|
697
|
+
}
|
|
698
|
+
#m() {
|
|
699
|
+
return this.dropZoneSelector ? [...this.host.querySelectorAll(this.dropZoneSelector)] : this.#p();
|
|
700
|
+
}
|
|
701
|
+
#h = (e) => {
|
|
702
|
+
if (this.disabled || !this.selector || this.#t) return;
|
|
703
|
+
let t = e.target.closest?.(this.selector);
|
|
704
|
+
!t || !this.host.contains(t) || (t.style.outline = "2px solid var(--ui-focus-ring, highlight)", t.style.outlineOffset = "2px");
|
|
705
|
+
};
|
|
706
|
+
#g = (e) => {
|
|
707
|
+
if (!this.selector) return;
|
|
708
|
+
let t = e.target.closest?.(this.selector);
|
|
709
|
+
!t || !this.host.contains(t) || (t.style.removeProperty("outline"), t.style.removeProperty("outline-offset"));
|
|
710
|
+
};
|
|
711
|
+
#_ = (e) => {
|
|
712
|
+
if (e.button !== 0 || this.disabled || !this.selector) return;
|
|
713
|
+
let t = e.target.closest?.(this.selector);
|
|
714
|
+
if (!t || !this.host.contains(t)) return;
|
|
715
|
+
let n = this.#p().indexOf(t);
|
|
716
|
+
if (n === -1) return;
|
|
717
|
+
e.preventDefault(), this.#e = t, this.#s = n, this.#r = e.clientX, this.#i = e.clientY;
|
|
718
|
+
let r = t.getBoundingClientRect();
|
|
719
|
+
this.#a = r.left + r.width / 2 - e.clientX, this.#o = r.top + r.height / 2 - e.clientY, document.addEventListener("pointermove", this.#v), document.addEventListener("pointerup", this.#E), document.addEventListener("pointercancel", this.#D), document.addEventListener("keydown", this.#O);
|
|
720
|
+
};
|
|
721
|
+
#v = (e) => {
|
|
722
|
+
if (!this.#e) return;
|
|
723
|
+
if (!this.#t) {
|
|
724
|
+
this.#e.style.removeProperty("outline"), this.#e.style.removeProperty("outline-offset");
|
|
725
|
+
try {
|
|
726
|
+
this.#k(e);
|
|
727
|
+
} catch {
|
|
728
|
+
this.#A();
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
this.#e.setAttribute("dragging", ""), this.mode === "preview" && (this.#u = this.#e.parentElement, this.#d = this.#e.nextElementSibling, this.#f = -1, this.animate && this.#C()), this.host.dispatchEvent(new CustomEvent("ui-drag-start", {
|
|
732
|
+
bubbles: !0,
|
|
733
|
+
composed: !0,
|
|
734
|
+
detail: {
|
|
735
|
+
item: this.#e,
|
|
736
|
+
index: this.#s
|
|
737
|
+
}
|
|
738
|
+
}));
|
|
739
|
+
}
|
|
740
|
+
let t = e.clientX - this.#r, n = e.clientY - this.#i;
|
|
741
|
+
this.#t.style.transform = `translate(${t}px, ${n}px) scale(0.9)`, this.host.dispatchEvent(new CustomEvent("ui-drag-move", {
|
|
742
|
+
bubbles: !0,
|
|
743
|
+
composed: !0,
|
|
744
|
+
detail: {
|
|
745
|
+
item: this.#e,
|
|
746
|
+
x: e.clientX,
|
|
747
|
+
y: e.clientY
|
|
748
|
+
}
|
|
749
|
+
}));
|
|
750
|
+
let r = this.#m().filter((e) => e !== this.#t);
|
|
751
|
+
if (this.mode === "slot") {
|
|
752
|
+
let t = e.clientX + this.#a, n = e.clientY + this.#o, i = r.filter((e) => e !== this.#e), a = 0;
|
|
753
|
+
for (let e = 0; e < i.length; e++) {
|
|
754
|
+
let r = i[e].getBoundingClientRect(), o = r.left + r.width / 2, s = r.top + r.height / 2;
|
|
755
|
+
if (this.axis === "horizontal" ? t > o : (this.axis === "vertical" || t > o) && n > s) a = e + 1;
|
|
756
|
+
else break;
|
|
757
|
+
}
|
|
758
|
+
this.#b(r, a);
|
|
759
|
+
} else if (this.mode === "preview") {
|
|
760
|
+
let t = e.clientX + this.#a, n = e.clientY + this.#o;
|
|
761
|
+
this.#S(r, t, n);
|
|
762
|
+
} else {
|
|
763
|
+
let t = null, n = -1;
|
|
764
|
+
for (let i = 0; i < r.length; i++) {
|
|
765
|
+
let a = r[i].getBoundingClientRect(), o = a.left + a.width / 2, s = a.top + a.height / 2;
|
|
766
|
+
if (this.axis === "vertical" ? e.clientY >= a.top && e.clientY <= a.bottom : this.axis === "horizontal" ? e.clientX >= a.left && e.clientX <= a.right : e.clientX >= a.left && e.clientX <= a.right && e.clientY >= a.top && e.clientY <= a.bottom) {
|
|
767
|
+
n = (this.axis === "horizontal" ? e.clientX < o : e.clientY < s) ? i : i + 1, t = r[i];
|
|
768
|
+
break;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
this.#y(r, t, n);
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
#y(e, t, n) {
|
|
775
|
+
for (let n of e) n !== t && (n.removeAttribute("drag-over"), n.style.removeProperty("outline"), n.style.removeProperty("outline-offset"));
|
|
776
|
+
t && (t.setAttribute("drag-over", ""), t.style.outline = "2px solid var(--ui-focus-ring, highlight)", t.style.outlineOffset = "2px", this.host.dispatchEvent(new CustomEvent("ui-drag-over", {
|
|
777
|
+
bubbles: !0,
|
|
778
|
+
composed: !0,
|
|
779
|
+
detail: {
|
|
780
|
+
item: this.#e,
|
|
781
|
+
target: t,
|
|
782
|
+
index: n
|
|
783
|
+
}
|
|
784
|
+
})));
|
|
785
|
+
}
|
|
786
|
+
#b(e, t) {
|
|
787
|
+
if (t === -1 || t === this.#c) return;
|
|
788
|
+
this.#c = t, this.#x(e), this.#n || (this.#n = document.createElement("div"), this.#n.className = "drag-placeholder", this.#n.setAttribute("aria-hidden", "true"));
|
|
789
|
+
let n = e.filter((e) => e !== this.#e), r = Math.min(t, n.length);
|
|
790
|
+
r < n.length ? n[r].before(this.#n) : n.length > 0 ? n[n.length - 1].after(this.#n) : this.host.appendChild(this.#n), r < n.length && n[r].setAttribute("drag-slot-before", ""), r > 0 && r - 1 < n.length && n[r - 1].setAttribute("drag-slot-after", "");
|
|
791
|
+
let i = r < n.length ? n[r] : null;
|
|
792
|
+
this.host.dispatchEvent(new CustomEvent("ui-drag-over", {
|
|
793
|
+
bubbles: !0,
|
|
794
|
+
composed: !0,
|
|
795
|
+
detail: {
|
|
796
|
+
item: this.#e,
|
|
797
|
+
index: t,
|
|
798
|
+
insertBefore: i
|
|
799
|
+
}
|
|
800
|
+
}));
|
|
801
|
+
}
|
|
802
|
+
#x(e) {
|
|
803
|
+
for (let t of e) t.removeAttribute("drag-slot-before"), t.removeAttribute("drag-slot-after");
|
|
804
|
+
}
|
|
805
|
+
#S(e, t, n) {
|
|
806
|
+
let r = e.filter((e) => e !== this.#e);
|
|
807
|
+
if (r.length === 0) return;
|
|
808
|
+
let i = e[0].getBoundingClientRect(), a = 1;
|
|
809
|
+
for (let t = 1; t < e.length && Math.abs(e[t].getBoundingClientRect().top - i.top) < i.height * .5; t++) a = t + 1;
|
|
810
|
+
let o = a > 1 ? e[1].getBoundingClientRect().left - i.left : i.width, s = a < e.length ? e[a].getBoundingClientRect().top - i.top : i.height, c = Math.round((t - (i.left + i.width / 2)) / o), l = Math.round((n - (i.top + i.height / 2)) / s), u = Math.ceil(r.length / a) - 1, d = Math.max(0, Math.min(c, a - 1)), f = Math.max(0, Math.min(l, u)) * a + d;
|
|
811
|
+
if (f = Math.max(0, Math.min(f, r.length)), f === this.#f) return;
|
|
812
|
+
this.#f = f;
|
|
813
|
+
let p = f < r.length ? r[f] : null, m = () => {
|
|
814
|
+
p ? p.before(this.#e) : r[r.length - 1].after(this.#e);
|
|
815
|
+
};
|
|
816
|
+
this.animate && typeof document.startViewTransition == "function" ? document.startViewTransition(() => {
|
|
817
|
+
m(), this.#C();
|
|
818
|
+
}) : m(), this.host.dispatchEvent(new CustomEvent("ui-drag-over", {
|
|
819
|
+
bubbles: !0,
|
|
820
|
+
composed: !0,
|
|
821
|
+
detail: {
|
|
822
|
+
item: this.#e,
|
|
823
|
+
index: f,
|
|
824
|
+
insertBefore: p
|
|
825
|
+
}
|
|
826
|
+
}));
|
|
827
|
+
}
|
|
828
|
+
#C() {
|
|
829
|
+
let e = this.#p();
|
|
830
|
+
for (let t = 0; t < e.length; t++) e[t].style.viewTransitionName = e[t] === this.#e ? "none" : `drag-item-${t}`;
|
|
831
|
+
}
|
|
832
|
+
#w() {
|
|
833
|
+
for (let e of this.#p()) e.style.removeProperty("view-transition-name");
|
|
834
|
+
}
|
|
835
|
+
#T() {
|
|
836
|
+
if (this.mode !== "preview" || !this.#e || !this.#u) return;
|
|
837
|
+
let e = this.#e, t = this.#d, n = this.#u, r = () => {
|
|
838
|
+
t && t.isConnected ? t.before(e) : n.appendChild(e);
|
|
839
|
+
};
|
|
840
|
+
this.animate && typeof document.startViewTransition == "function" ? document.startViewTransition(() => {
|
|
841
|
+
r(), this.#C();
|
|
842
|
+
}) : r();
|
|
843
|
+
}
|
|
844
|
+
#E = (e) => {
|
|
845
|
+
if (this.#e) {
|
|
846
|
+
if (this.#t) if (this.mode === "slot") {
|
|
847
|
+
let e = this.#p().filter((e) => e !== this.#e), t = this.#c >= 0 && this.#c < e.length ? e[this.#c] : null;
|
|
848
|
+
this.host.dispatchEvent(new CustomEvent("ui-drop", {
|
|
849
|
+
bubbles: !0,
|
|
850
|
+
composed: !0,
|
|
851
|
+
detail: {
|
|
852
|
+
item: this.#e,
|
|
853
|
+
fromIndex: this.#s,
|
|
854
|
+
toIndex: this.#c,
|
|
855
|
+
insertBefore: t
|
|
856
|
+
}
|
|
857
|
+
}));
|
|
858
|
+
} else if (this.mode === "preview") {
|
|
859
|
+
let e = this.#p(), t = this.#e ? e.indexOf(this.#e) : -1;
|
|
860
|
+
this.#u = null, this.#d = null, this.host.dispatchEvent(new CustomEvent("ui-drop", {
|
|
861
|
+
bubbles: !0,
|
|
862
|
+
composed: !0,
|
|
863
|
+
detail: {
|
|
864
|
+
item: this.#e,
|
|
865
|
+
fromIndex: this.#s,
|
|
866
|
+
toIndex: t
|
|
867
|
+
}
|
|
868
|
+
}));
|
|
869
|
+
} else {
|
|
870
|
+
let e = this.#m(), t = e.find((e) => e.hasAttribute("drag-over")) ?? null, n = t ? e.indexOf(t) : -1;
|
|
871
|
+
this.host.dispatchEvent(new CustomEvent("ui-drop", {
|
|
872
|
+
bubbles: !0,
|
|
873
|
+
composed: !0,
|
|
874
|
+
detail: {
|
|
875
|
+
item: this.#e,
|
|
876
|
+
target: t,
|
|
877
|
+
fromIndex: this.#s,
|
|
878
|
+
toIndex: n
|
|
879
|
+
}
|
|
880
|
+
}));
|
|
881
|
+
}
|
|
882
|
+
this.#A();
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
#D = () => {
|
|
886
|
+
this.#e && (this.#T(), this.#t && this.host.dispatchEvent(new CustomEvent("ui-drag-cancel", {
|
|
887
|
+
bubbles: !0,
|
|
888
|
+
composed: !0,
|
|
889
|
+
detail: { item: this.#e }
|
|
890
|
+
})), this.#A());
|
|
891
|
+
};
|
|
892
|
+
#O = (e) => {
|
|
893
|
+
e.key === "Escape" && this.#e && (e.preventDefault(), this.#T(), this.#t && this.host.dispatchEvent(new CustomEvent("ui-drag-cancel", {
|
|
894
|
+
bubbles: !0,
|
|
895
|
+
composed: !0,
|
|
896
|
+
detail: { item: this.#e }
|
|
897
|
+
})), this.#A());
|
|
898
|
+
};
|
|
899
|
+
#k(e) {
|
|
900
|
+
if (!this.#e) return;
|
|
901
|
+
let t = this.#e.getBoundingClientRect(), n = this.#e.cloneNode(!0);
|
|
902
|
+
n.setAttribute("popover", "manual"), n.setAttribute("aria-hidden", "true"), document.body.appendChild(n), n.showPopover(), n.style.position = "fixed", n.style.inset = "unset", n.style.left = `${t.left}px`, n.style.top = `${t.top}px`, n.style.width = `${t.width}px`, n.style.height = `${t.height}px`, n.style.margin = "0", n.style.pointerEvents = "none", n.style.opacity = "0.8", n.style.transformOrigin = "center center", n.style.border = "none", n.style.outline = "none", this.#t = n, this.#r = e.clientX, this.#i = e.clientY;
|
|
903
|
+
}
|
|
904
|
+
#A() {
|
|
905
|
+
if (this.#t) {
|
|
906
|
+
if (this.#t.isConnected) try {
|
|
907
|
+
this.#t.hidePopover();
|
|
908
|
+
} catch {}
|
|
909
|
+
this.#t.remove(), this.#t = null;
|
|
910
|
+
}
|
|
911
|
+
this.#e && this.#e.removeAttribute("dragging"), this.mode === "preview" && this.animate && this.#w();
|
|
912
|
+
let e = this.#m();
|
|
913
|
+
if (this.mode === "slot") this.#x(e);
|
|
914
|
+
else for (let t of e) t.removeAttribute("drag-over"), t.style.removeProperty("outline"), t.style.removeProperty("outline-offset");
|
|
915
|
+
this.#n &&= (this.#n.remove(), null), this.#e = null, this.#s = -1, this.#c = -1, this.#u = null, this.#d = null, this.#f = -1, document.removeEventListener("pointermove", this.#v), document.removeEventListener("pointerup", this.#E), document.removeEventListener("pointercancel", this.#D), document.removeEventListener("keydown", this.#O);
|
|
916
|
+
}
|
|
917
|
+
}, U = class {
|
|
918
|
+
host;
|
|
919
|
+
handleSelector;
|
|
920
|
+
axis;
|
|
921
|
+
min;
|
|
922
|
+
max;
|
|
923
|
+
disabled;
|
|
924
|
+
reverse;
|
|
925
|
+
#e = 0;
|
|
926
|
+
#t = 0;
|
|
927
|
+
#n = 0;
|
|
928
|
+
#r = 0;
|
|
929
|
+
#i = !1;
|
|
930
|
+
#a = !1;
|
|
931
|
+
constructor(e, t) {
|
|
932
|
+
this.host = e, this.handleSelector = t.handleSelector, this.axis = t.axis ?? "horizontal", this.min = t.min ?? 0, this.max = t.max ?? Infinity, this.disabled = t.disabled ?? !1, this.reverse = t.reverse ?? !1, this.attach();
|
|
933
|
+
}
|
|
934
|
+
attach() {
|
|
935
|
+
this.#a || (this.#a = !0, this.host.addEventListener("pointerdown", this.#o));
|
|
936
|
+
}
|
|
937
|
+
detach() {
|
|
938
|
+
this.#a && (this.#a = !1, this.host.removeEventListener("pointerdown", this.#o), this.#d());
|
|
939
|
+
}
|
|
940
|
+
destroy() {
|
|
941
|
+
this.detach();
|
|
942
|
+
}
|
|
943
|
+
#o = (e) => {
|
|
944
|
+
if (e.button !== 0 || this.disabled || !this.handleSelector) return;
|
|
945
|
+
let t = e.target.closest?.(this.handleSelector);
|
|
946
|
+
if (!t || !this.host.contains(t)) return;
|
|
947
|
+
e.preventDefault(), this.#i = !0, this.#e = e.clientX, this.#t = e.clientY;
|
|
948
|
+
let n = this.host.getBoundingClientRect();
|
|
949
|
+
this.#n = n.width, this.#r = n.height, this.host.setAttribute("resizing", ""), this.host.setPointerCapture(e.pointerId), document.addEventListener("pointermove", this.#s), document.addEventListener("pointerup", this.#c), document.addEventListener("pointercancel", this.#l), document.addEventListener("keydown", this.#u), this.host.dispatchEvent(new CustomEvent("ui-resize-start", {
|
|
950
|
+
bubbles: !0,
|
|
951
|
+
composed: !0,
|
|
952
|
+
detail: {
|
|
953
|
+
width: this.#n,
|
|
954
|
+
height: this.#r
|
|
955
|
+
}
|
|
956
|
+
}));
|
|
957
|
+
};
|
|
958
|
+
#s = (e) => {
|
|
959
|
+
if (!this.#i) return;
|
|
960
|
+
let t = this.reverse ? -1 : 1, n = (e.clientX - this.#e) * t, r = (e.clientY - this.#t) * t;
|
|
961
|
+
if (this.axis === "horizontal" || this.axis === "both") {
|
|
962
|
+
let e = Math.min(this.max, Math.max(this.min, this.#n + n));
|
|
963
|
+
this.host.style.width = `${e}px`;
|
|
964
|
+
}
|
|
965
|
+
if (this.axis === "vertical" || this.axis === "both") {
|
|
966
|
+
let e = Math.min(this.max, Math.max(this.min, this.#r + r));
|
|
967
|
+
this.host.style.height = `${e}px`;
|
|
968
|
+
}
|
|
969
|
+
let i = this.host.getBoundingClientRect();
|
|
970
|
+
this.host.dispatchEvent(new CustomEvent("ui-resize-move", {
|
|
971
|
+
bubbles: !0,
|
|
972
|
+
composed: !0,
|
|
973
|
+
detail: {
|
|
974
|
+
width: i.width,
|
|
975
|
+
height: i.height
|
|
976
|
+
}
|
|
977
|
+
}));
|
|
978
|
+
};
|
|
979
|
+
#c = (e) => {
|
|
980
|
+
if (!this.#i) return;
|
|
981
|
+
let t = this.host.getBoundingClientRect();
|
|
982
|
+
this.host.dispatchEvent(new CustomEvent("ui-resize-end", {
|
|
983
|
+
bubbles: !0,
|
|
984
|
+
composed: !0,
|
|
985
|
+
detail: {
|
|
986
|
+
width: t.width,
|
|
987
|
+
height: t.height
|
|
988
|
+
}
|
|
989
|
+
})), this.#d();
|
|
990
|
+
};
|
|
991
|
+
#l = () => {
|
|
992
|
+
this.#i && ((this.axis === "horizontal" || this.axis === "both") && (this.host.style.width = `${this.#n}px`), (this.axis === "vertical" || this.axis === "both") && (this.host.style.height = `${this.#r}px`), this.#d());
|
|
993
|
+
};
|
|
994
|
+
#u = (e) => {
|
|
995
|
+
e.key === "Escape" && this.#i && (e.preventDefault(), (this.axis === "horizontal" || this.axis === "both") && (this.host.style.width = `${this.#n}px`), (this.axis === "vertical" || this.axis === "both") && (this.host.style.height = `${this.#r}px`), this.#d());
|
|
996
|
+
};
|
|
997
|
+
#d() {
|
|
998
|
+
this.#i = !1, this.host.removeAttribute("resizing"), document.removeEventListener("pointermove", this.#s), document.removeEventListener("pointerup", this.#c), document.removeEventListener("pointercancel", this.#l), document.removeEventListener("keydown", this.#u);
|
|
999
|
+
}
|
|
1000
|
+
}, W = class {
|
|
1001
|
+
host;
|
|
1002
|
+
disabled;
|
|
1003
|
+
#e = !1;
|
|
1004
|
+
#t = "mouse";
|
|
1005
|
+
#n = !1;
|
|
1006
|
+
constructor(e, t = {}) {
|
|
1007
|
+
this.host = e, this.disabled = t.disabled ?? !1, this.attach();
|
|
1008
|
+
}
|
|
1009
|
+
#r() {
|
|
1010
|
+
return typeof this.disabled == "function" ? this.disabled() : this.disabled ? !0 : this.host.disabled === !0;
|
|
1011
|
+
}
|
|
1012
|
+
attach() {
|
|
1013
|
+
this.#n || (this.#n = !0, this.host.addEventListener("pointerdown", this.#i), this.host.addEventListener("pointerup", this.#a), this.host.addEventListener("pointercancel", this.#o), this.host.addEventListener("lostpointercapture", this.#s), this.host.addEventListener("keydown", this.#c), this.host.addEventListener("keyup", this.#l));
|
|
1014
|
+
}
|
|
1015
|
+
detach() {
|
|
1016
|
+
this.#n && (this.#n = !1, this.host.removeEventListener("pointerdown", this.#i), this.host.removeEventListener("pointerup", this.#a), this.host.removeEventListener("pointercancel", this.#o), this.host.removeEventListener("lostpointercapture", this.#s), this.host.removeEventListener("keydown", this.#c), this.host.removeEventListener("keyup", this.#l), this.host.removeAttribute("pressed"));
|
|
1017
|
+
}
|
|
1018
|
+
destroy() {
|
|
1019
|
+
this.detach();
|
|
1020
|
+
}
|
|
1021
|
+
#i = (e) => {
|
|
1022
|
+
e.button === 0 && (this.#r() || (this.#t = e.pointerType, this.host.setPointerCapture(e.pointerId), this.#e = !0, this.host.toggleAttribute("pressed", !0)));
|
|
1023
|
+
};
|
|
1024
|
+
#a = (e) => {
|
|
1025
|
+
this.#e && (this.#e = !1, this.host.removeAttribute("pressed"), this.host.dispatchEvent(new CustomEvent("ui-press", {
|
|
1026
|
+
bubbles: !0,
|
|
1027
|
+
composed: !0,
|
|
1028
|
+
detail: { pointerType: this.#t }
|
|
1029
|
+
})));
|
|
1030
|
+
};
|
|
1031
|
+
#o = () => {
|
|
1032
|
+
this.#e = !1, this.host.removeAttribute("pressed");
|
|
1033
|
+
};
|
|
1034
|
+
#s = () => {
|
|
1035
|
+
this.#e = !1, this.host.removeAttribute("pressed");
|
|
1036
|
+
};
|
|
1037
|
+
#c = (e) => {
|
|
1038
|
+
e.repeat || this.#r() || e.key !== "Enter" && e.key !== " " || (e.key === " " && e.preventDefault(), this.host.toggleAttribute("pressed", !0));
|
|
1039
|
+
};
|
|
1040
|
+
#l = (e) => {
|
|
1041
|
+
e.key !== "Enter" && e.key !== " " || (this.host.removeAttribute("pressed"), !this.#r() && this.host.dispatchEvent(new CustomEvent("ui-press", {
|
|
1042
|
+
bubbles: !0,
|
|
1043
|
+
composed: !0,
|
|
1044
|
+
detail: { pointerType: "keyboard" }
|
|
1045
|
+
})));
|
|
1046
|
+
};
|
|
1047
|
+
}, G = class {
|
|
1048
|
+
host;
|
|
1049
|
+
selector;
|
|
1050
|
+
orientation;
|
|
1051
|
+
wrap;
|
|
1052
|
+
disabled;
|
|
1053
|
+
#e = 0;
|
|
1054
|
+
#t = !1;
|
|
1055
|
+
constructor(e, t = {}) {
|
|
1056
|
+
this.host = e, this.selector = t.selector ?? ":scope > [role]", this.orientation = t.orientation ?? "vertical", this.wrap = t.wrap ?? !0, this.disabled = t.disabled ?? !1, this.attach();
|
|
1057
|
+
}
|
|
1058
|
+
attach() {
|
|
1059
|
+
if (this.#t || this.disabled) return;
|
|
1060
|
+
this.#t = !0, this.host.addEventListener("keydown", this.#r), this.host.addEventListener("focusin", this.#i);
|
|
1061
|
+
let e = this.#n();
|
|
1062
|
+
for (let t = 0; t < e.length; t++) e[t].setAttribute("tabindex", t === 0 ? "0" : "-1");
|
|
1063
|
+
}
|
|
1064
|
+
detach() {
|
|
1065
|
+
this.#t && (this.#t = !1, this.host.removeEventListener("keydown", this.#r), this.host.removeEventListener("focusin", this.#i));
|
|
1066
|
+
}
|
|
1067
|
+
destroy() {
|
|
1068
|
+
this.detach();
|
|
1069
|
+
}
|
|
1070
|
+
#n() {
|
|
1071
|
+
return [...this.host.querySelectorAll(this.selector)].filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true");
|
|
1072
|
+
}
|
|
1073
|
+
#r = (e) => {
|
|
1074
|
+
let t = this.#n();
|
|
1075
|
+
if (t.length === 0) return;
|
|
1076
|
+
let n = 0, r = this.orientation === "vertical" || this.orientation === "both", i = this.orientation === "horizontal" || this.orientation === "both";
|
|
1077
|
+
if (e.key === "ArrowDown" && r) n = 1;
|
|
1078
|
+
else if (e.key === "ArrowUp" && r) n = -1;
|
|
1079
|
+
else if (e.key === "ArrowRight" && i) n = 1;
|
|
1080
|
+
else if (e.key === "ArrowLeft" && i) n = -1;
|
|
1081
|
+
else if (e.key === "Home") {
|
|
1082
|
+
this.#a(t, 0), e.preventDefault();
|
|
1083
|
+
return;
|
|
1084
|
+
} else if (e.key === "End") {
|
|
1085
|
+
this.#a(t, t.length - 1), e.preventDefault();
|
|
1086
|
+
return;
|
|
1087
|
+
} else return;
|
|
1088
|
+
e.preventDefault();
|
|
1089
|
+
let a = this.#e + n;
|
|
1090
|
+
a = this.wrap ? (a + t.length) % t.length : Math.max(0, Math.min(t.length - 1, a)), this.#a(t, a);
|
|
1091
|
+
};
|
|
1092
|
+
#i = (e) => {
|
|
1093
|
+
e.target === this.host && this.#n()[this.#e]?.focus();
|
|
1094
|
+
};
|
|
1095
|
+
#a(e, t) {
|
|
1096
|
+
let n = e[this.#e];
|
|
1097
|
+
n && n.setAttribute("tabindex", "-1"), this.#e = t;
|
|
1098
|
+
let r = e[t];
|
|
1099
|
+
r && (r.setAttribute("tabindex", "0"), r.focus());
|
|
1100
|
+
}
|
|
1101
|
+
}, K = class {
|
|
1102
|
+
host;
|
|
1103
|
+
#e = 0;
|
|
1104
|
+
constructor(e) {
|
|
1105
|
+
this.host = e;
|
|
1106
|
+
}
|
|
1107
|
+
enable() {
|
|
1108
|
+
this.#e = requestAnimationFrame(() => {
|
|
1109
|
+
this.#e = 0, R().dismissStack.push(this.host);
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
disable() {
|
|
1113
|
+
this.#e &&= (cancelAnimationFrame(this.#e), 0), R().dismissStack.remove(this.host);
|
|
1114
|
+
}
|
|
1115
|
+
destroy() {
|
|
1116
|
+
this.#e &&= (cancelAnimationFrame(this.#e), 0), R().dismissStack.remove(this.host);
|
|
1117
|
+
}
|
|
1118
|
+
}, q = class {
|
|
1119
|
+
host;
|
|
1120
|
+
#e;
|
|
1121
|
+
#t = null;
|
|
1122
|
+
#n = null;
|
|
1123
|
+
constructor(e) {
|
|
1124
|
+
this.host = e, this.#e = new K(e);
|
|
1125
|
+
}
|
|
1126
|
+
wirePopover(e, t) {
|
|
1127
|
+
this.#t = e, this.#n = t;
|
|
1128
|
+
let n = A("anchor");
|
|
1129
|
+
e.style.setProperty("anchor-name", `--${n}`), t.style.setProperty("position-anchor", `--${n}`);
|
|
1130
|
+
}
|
|
1131
|
+
syncPopover(e) {
|
|
1132
|
+
if (e) {
|
|
1133
|
+
try {
|
|
1134
|
+
this.#n?.showPopover();
|
|
1135
|
+
} catch {}
|
|
1136
|
+
this.#e.enable();
|
|
1137
|
+
} else {
|
|
1138
|
+
try {
|
|
1139
|
+
this.#n?.hidePopover();
|
|
1140
|
+
} catch {}
|
|
1141
|
+
this.#e.disable();
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
destroy() {
|
|
1145
|
+
this.#e.destroy(), this.#t?.style.removeProperty("anchor-name"), this.#t = null, this.#n?.style.removeProperty("position-anchor"), this.#n = null;
|
|
1146
|
+
}
|
|
1147
|
+
}, J = class {
|
|
1148
|
+
host;
|
|
1149
|
+
listValue = _(null);
|
|
1150
|
+
itemSelector;
|
|
1151
|
+
ariaAttr;
|
|
1152
|
+
autoSync;
|
|
1153
|
+
onChildSelect;
|
|
1154
|
+
#e;
|
|
1155
|
+
#t = !1;
|
|
1156
|
+
constructor(e, t = {}) {
|
|
1157
|
+
if (this.host = e, this.itemSelector = t.itemSelector ?? ":scope > [role]", this.ariaAttr = t.ariaAttr ?? "aria-selected", this.autoSync = t.autoSync ?? !0, this.onChildSelect = t.onChildSelect ?? ((t) => {
|
|
1158
|
+
this.listValue.value = t.value, e.dispatchEvent(new CustomEvent("ui-change", {
|
|
1159
|
+
bubbles: !0,
|
|
1160
|
+
composed: !0,
|
|
1161
|
+
cancelable: !0,
|
|
1162
|
+
detail: t
|
|
1163
|
+
}));
|
|
1164
|
+
}), this.#e = new G(e, {
|
|
1165
|
+
selector: this.itemSelector,
|
|
1166
|
+
orientation: t.orientation ?? "vertical",
|
|
1167
|
+
wrap: t.wrap ?? !0,
|
|
1168
|
+
disabled: t.disabled ?? !1
|
|
1169
|
+
}), this.attach(), this.autoSync && t.addEffect && t.deferChildren) {
|
|
1170
|
+
let n = t.addEffect;
|
|
1171
|
+
t.deferChildren(() => {
|
|
1172
|
+
n(() => {
|
|
1173
|
+
let t = this.listValue.value, n = e.querySelectorAll(this.itemSelector), r = this.ariaAttr === "aria-current";
|
|
1174
|
+
for (let e of n) {
|
|
1175
|
+
let n = e.getAttribute("value") ?? e.value;
|
|
1176
|
+
if (n !== void 0) {
|
|
1177
|
+
let i = n === t;
|
|
1178
|
+
r ? i ? e.setAttribute("aria-current", "page") : e.removeAttribute("aria-current") : e.setAttribute(this.ariaAttr, i ? "true" : "false");
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
attach() {
|
|
1186
|
+
this.#t || (this.#t = !0, this.host.addEventListener("ui-select", this.#n));
|
|
1187
|
+
}
|
|
1188
|
+
detach() {
|
|
1189
|
+
this.#t && (this.#t = !1, this.host.removeEventListener("ui-select", this.#n));
|
|
1190
|
+
}
|
|
1191
|
+
destroy() {
|
|
1192
|
+
this.detach(), this.#e.destroy();
|
|
1193
|
+
}
|
|
1194
|
+
/** Access the underlying roving focus controller for direct configuration. */
|
|
1195
|
+
get rovingFocus() {
|
|
1196
|
+
return this.#e;
|
|
1197
|
+
}
|
|
1198
|
+
#n = (e) => {
|
|
1199
|
+
if (this.host.disabled === !0) return;
|
|
1200
|
+
let t = e.detail;
|
|
1201
|
+
this.onChildSelect(t);
|
|
1202
|
+
};
|
|
1203
|
+
}, Y = class {
|
|
1204
|
+
host;
|
|
1205
|
+
#e = null;
|
|
1206
|
+
#t;
|
|
1207
|
+
constructor(e, t = {}) {
|
|
1208
|
+
this.host = e, this.#t = t.contentTarget, this.#a();
|
|
1209
|
+
}
|
|
1210
|
+
get open() {
|
|
1211
|
+
return this.#e?.open ?? !1;
|
|
1212
|
+
}
|
|
1213
|
+
showModal() {
|
|
1214
|
+
!this.#e || this.open || (this.#e.showModal(), this.host.toggleAttribute("open", !0), queueMicrotask(() => {
|
|
1215
|
+
let e = this.#e?.querySelector("[autofocus]");
|
|
1216
|
+
if (e) {
|
|
1217
|
+
e.focus();
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
(this.#e?.querySelector("ui-input, ui-textarea, ui-button, ui-select, ui-listbox, input, textarea, select, button, [tabindex]:not([tabindex=\"-1\"])"))?.focus();
|
|
1221
|
+
}));
|
|
1222
|
+
}
|
|
1223
|
+
close() {
|
|
1224
|
+
!this.#e || !this.open || (this.#e.close(), this.host.toggleAttribute("open", !1), this.host.dispatchEvent(new Event("close")));
|
|
1225
|
+
}
|
|
1226
|
+
destroy() {
|
|
1227
|
+
this.#e && (this.#e.removeEventListener("cancel", this.#n), this.#e.removeEventListener("click", this.#r)), this.host.removeEventListener("ui-dismiss", this.#i), this.#e = null;
|
|
1228
|
+
}
|
|
1229
|
+
#n = (e) => {
|
|
1230
|
+
e.preventDefault(), this.host.hasAttribute("no-close-on-escape") || this.close();
|
|
1231
|
+
};
|
|
1232
|
+
#r = (e) => {
|
|
1233
|
+
e.target === this.#e && !this.host.hasAttribute("no-close-on-backdrop") && this.close();
|
|
1234
|
+
};
|
|
1235
|
+
#i = () => {
|
|
1236
|
+
this.host.hasAttribute("no-close-on-escape") || this.close();
|
|
1237
|
+
};
|
|
1238
|
+
#a() {
|
|
1239
|
+
let e = document.createElement("dialog"), t = this.#t ? this.#t(e) : e;
|
|
1240
|
+
for (; this.host.firstChild;) t.appendChild(this.host.firstChild);
|
|
1241
|
+
t !== e && e.appendChild(t), this.host.appendChild(e), this.#e = e, e.addEventListener("cancel", this.#n), e.addEventListener("click", this.#r), this.host.addEventListener("ui-dismiss", this.#i);
|
|
1242
|
+
}
|
|
1243
|
+
}, se = class extends P(k) {
|
|
269
1244
|
static observedAttributes = ["disabled", "type"];
|
|
270
1245
|
#e;
|
|
271
1246
|
#t;
|
|
272
1247
|
#n;
|
|
273
1248
|
#r;
|
|
274
1249
|
constructor() {
|
|
275
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "button", this.#t =
|
|
1250
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "button", this.#t = M(this, "disabled", { type: "boolean" }), this.#n = M(this, "type", {
|
|
276
1251
|
type: "string",
|
|
277
1252
|
initial: "button"
|
|
278
1253
|
});
|
|
@@ -290,13 +1265,13 @@ var te = class extends x(_) {
|
|
|
290
1265
|
this.#n.set(e);
|
|
291
1266
|
}
|
|
292
1267
|
attributeChangedCallback(e, t, n) {
|
|
293
|
-
t !== n && (
|
|
1268
|
+
t !== n && (N({
|
|
294
1269
|
disabled: this.#t,
|
|
295
1270
|
type: this.#n
|
|
296
1271
|
}, e, n), super.attributeChangedCallback?.(e, t, n));
|
|
297
1272
|
}
|
|
298
1273
|
setup() {
|
|
299
|
-
super.setup(), this.#r = new
|
|
1274
|
+
super.setup(), this.#r = new W(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(j(this, this.#t.signal, this.#e, { manageTabindex: !0 })), this.addEventListener("ui-press", this.#i);
|
|
300
1275
|
}
|
|
301
1276
|
teardown() {
|
|
302
1277
|
this.removeEventListener("ui-press", this.#i), this.#r.destroy(), super.teardown();
|
|
@@ -314,7 +1289,7 @@ var te = class extends x(_) {
|
|
|
314
1289
|
onFormReset() {
|
|
315
1290
|
this.#t.signal.value = this.hasAttribute("disabled");
|
|
316
1291
|
}
|
|
317
|
-
},
|
|
1292
|
+
}, ce = class extends P(k) {
|
|
318
1293
|
static observedAttributes = [
|
|
319
1294
|
"value",
|
|
320
1295
|
"placeholder",
|
|
@@ -324,9 +1299,9 @@ var te = class extends x(_) {
|
|
|
324
1299
|
"pattern"
|
|
325
1300
|
];
|
|
326
1301
|
#e;
|
|
327
|
-
#t =
|
|
328
|
-
#n =
|
|
329
|
-
#r =
|
|
1302
|
+
#t = _(!1);
|
|
1303
|
+
#n = _(!1);
|
|
1304
|
+
#r = _("");
|
|
330
1305
|
#i = "";
|
|
331
1306
|
#a = null;
|
|
332
1307
|
#o = [];
|
|
@@ -403,7 +1378,7 @@ var te = class extends x(_) {
|
|
|
403
1378
|
setup() {
|
|
404
1379
|
super.setup(), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#o = [...this.querySelectorAll(":scope > [slot]")];
|
|
405
1380
|
for (let e of this.#o) e.setAttribute("contenteditable", "false");
|
|
406
|
-
this.#n.value = this.hasAttribute("required"), this.#a = this.getAttribute("pattern"), this.#i = this.getAttribute("value") ?? this.#s(), this.#r.value = this.#s(), this.#l(), this.addEffect(
|
|
1381
|
+
this.#n.value = this.hasAttribute("required"), this.#a = this.getAttribute("pattern"), this.#i = this.getAttribute("value") ?? this.#s(), this.#r.value = this.#s(), this.#l(), this.addEffect(j(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
|
|
407
1382
|
let e = this.#r.value;
|
|
408
1383
|
this.#n.value && e === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : this.#a !== null && e !== "" && !RegExp(`^(?:${this.#a})$`).test(e) ? this.#e.setValidity({ patternMismatch: !0 }, "Please match the requested format.", this) : this.#e.setValidity({});
|
|
409
1384
|
}), this.addEventListener("input", this.#u), this.addEventListener("blur", this.#d);
|
|
@@ -445,7 +1420,7 @@ var te = class extends x(_) {
|
|
|
445
1420
|
detail: { value: this.#s() }
|
|
446
1421
|
}));
|
|
447
1422
|
};
|
|
448
|
-
},
|
|
1423
|
+
}, le = class extends k {
|
|
449
1424
|
static observedAttributes = [
|
|
450
1425
|
"disabled",
|
|
451
1426
|
"multiple",
|
|
@@ -453,11 +1428,11 @@ var te = class extends x(_) {
|
|
|
453
1428
|
];
|
|
454
1429
|
#e;
|
|
455
1430
|
#t;
|
|
456
|
-
#n =
|
|
457
|
-
#r = new
|
|
1431
|
+
#n = _(!1);
|
|
1432
|
+
#r = new z();
|
|
458
1433
|
#i;
|
|
459
1434
|
constructor() {
|
|
460
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "listbox", this.#t =
|
|
1435
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "listbox", this.#t = M(this, "disabled", { type: "boolean" });
|
|
461
1436
|
}
|
|
462
1437
|
get virtualFocus() {
|
|
463
1438
|
return this.hasAttribute("virtual-focus");
|
|
@@ -488,7 +1463,7 @@ var te = class extends x(_) {
|
|
|
488
1463
|
}
|
|
489
1464
|
attributeChangedCallback(e, t, n) {
|
|
490
1465
|
if (t !== n) {
|
|
491
|
-
if (
|
|
1466
|
+
if (N({ disabled: this.#t }, e, n)) {
|
|
492
1467
|
super.attributeChangedCallback?.(e, t, n);
|
|
493
1468
|
return;
|
|
494
1469
|
}
|
|
@@ -504,7 +1479,7 @@ var te = class extends x(_) {
|
|
|
504
1479
|
}
|
|
505
1480
|
}
|
|
506
1481
|
setup() {
|
|
507
|
-
super.setup(), this.#i = new
|
|
1482
|
+
super.setup(), this.#i = new J(this, {
|
|
508
1483
|
itemSelector: ":scope ui-option:not([disabled])",
|
|
509
1484
|
autoSync: !1,
|
|
510
1485
|
orientation: "vertical",
|
|
@@ -519,7 +1494,7 @@ var te = class extends x(_) {
|
|
|
519
1494
|
},
|
|
520
1495
|
addEffect: (e) => this.addEffect(e),
|
|
521
1496
|
deferChildren: (e) => this.deferChildren(e)
|
|
522
|
-
}), this.addEffect(
|
|
1497
|
+
}), this.addEffect(j(this, this.#t.signal, this.#e)), this.deferChildren(() => {
|
|
523
1498
|
this.addEffect(() => {
|
|
524
1499
|
let e = this.#r.value.value, t = this.#r.selected.value, n = this.#n.value, r = this.querySelectorAll(":scope ui-option");
|
|
525
1500
|
for (let i of r) {
|
|
@@ -527,12 +1502,12 @@ var te = class extends x(_) {
|
|
|
527
1502
|
i.setAttribute("aria-selected", a ? "true" : "false");
|
|
528
1503
|
}
|
|
529
1504
|
}), this.addEffect(() => {
|
|
530
|
-
let
|
|
531
|
-
for (let
|
|
532
|
-
let
|
|
533
|
-
|
|
1505
|
+
let e = this.#r.activeIndex.value, t = this.querySelectorAll(":scope ui-option:not([disabled])");
|
|
1506
|
+
for (let n = 0; n < t.length; n++) {
|
|
1507
|
+
let r = t[n], i = n === e;
|
|
1508
|
+
r.toggleAttribute("active", i), i && (r.id ||= A("opt"), this.setAttribute("aria-activedescendant", r.id));
|
|
534
1509
|
}
|
|
535
|
-
(
|
|
1510
|
+
(e < 0 || e >= t.length) && this.removeAttribute("aria-activedescendant");
|
|
536
1511
|
});
|
|
537
1512
|
});
|
|
538
1513
|
}
|
|
@@ -543,18 +1518,18 @@ var te = class extends x(_) {
|
|
|
543
1518
|
let e = this.#r.activeIndex.value;
|
|
544
1519
|
return this.querySelectorAll(":scope ui-option:not([disabled])")[e] ?? null;
|
|
545
1520
|
}
|
|
546
|
-
},
|
|
1521
|
+
}, ue = class extends k {
|
|
547
1522
|
static observedAttributes = [
|
|
548
1523
|
"value",
|
|
549
1524
|
"disabled",
|
|
550
1525
|
"label"
|
|
551
1526
|
];
|
|
552
1527
|
#e;
|
|
553
|
-
#t =
|
|
1528
|
+
#t = _("");
|
|
554
1529
|
#n;
|
|
555
|
-
#r =
|
|
1530
|
+
#r = _("");
|
|
556
1531
|
constructor() {
|
|
557
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "option", this.#n =
|
|
1532
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "option", this.#n = M(this, "disabled", { type: "boolean" });
|
|
558
1533
|
}
|
|
559
1534
|
get value() {
|
|
560
1535
|
return this.#t.value;
|
|
@@ -576,7 +1551,7 @@ var te = class extends x(_) {
|
|
|
576
1551
|
}
|
|
577
1552
|
attributeChangedCallback(e, t, n) {
|
|
578
1553
|
if (t !== n) {
|
|
579
|
-
if (
|
|
1554
|
+
if (N({ disabled: this.#n }, e, n)) {
|
|
580
1555
|
super.attributeChangedCallback?.(e, t, n);
|
|
581
1556
|
return;
|
|
582
1557
|
}
|
|
@@ -592,7 +1567,7 @@ var te = class extends x(_) {
|
|
|
592
1567
|
}
|
|
593
1568
|
}
|
|
594
1569
|
setup() {
|
|
595
|
-
super.setup(), this.addEffect(
|
|
1570
|
+
super.setup(), this.addEffect(j(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
|
|
596
1571
|
}
|
|
597
1572
|
teardown() {
|
|
598
1573
|
this.removeEventListener("click", this.#i), super.teardown();
|
|
@@ -607,28 +1582,28 @@ var te = class extends x(_) {
|
|
|
607
1582
|
}
|
|
608
1583
|
}));
|
|
609
1584
|
};
|
|
610
|
-
},
|
|
1585
|
+
}, de = class extends k {
|
|
611
1586
|
constructor() {
|
|
612
1587
|
super();
|
|
613
1588
|
let e = this.attachInternals();
|
|
614
1589
|
e.role = "presentation";
|
|
615
1590
|
}
|
|
616
1591
|
setup() {
|
|
617
|
-
super.setup(), this.id ||=
|
|
618
|
-
let
|
|
619
|
-
|
|
1592
|
+
super.setup(), this.id ||= A("ogh");
|
|
1593
|
+
let e = this.closest("ui-option-group");
|
|
1594
|
+
e && e.setAttribute("aria-labelledby", this.id);
|
|
620
1595
|
}
|
|
621
|
-
},
|
|
1596
|
+
}, fe = class extends k {
|
|
622
1597
|
constructor() {
|
|
623
1598
|
super();
|
|
624
1599
|
let e = this.attachInternals();
|
|
625
1600
|
e.role = "group";
|
|
626
1601
|
}
|
|
627
|
-
},
|
|
1602
|
+
}, pe = class extends k {
|
|
628
1603
|
static observedAttributes = ["disabled"];
|
|
629
1604
|
#e;
|
|
630
|
-
#t = new
|
|
631
|
-
#n =
|
|
1605
|
+
#t = new z({ initialActiveIndex: 0 });
|
|
1606
|
+
#n = _(!1);
|
|
632
1607
|
constructor() {
|
|
633
1608
|
super(), this.#e = this.attachInternals(), this.#e.role = "search";
|
|
634
1609
|
}
|
|
@@ -645,7 +1620,7 @@ var te = class extends x(_) {
|
|
|
645
1620
|
t !== n && (e === "disabled" && (this.#n.value = n !== null), super.attributeChangedCallback?.(e, t, n));
|
|
646
1621
|
}
|
|
647
1622
|
setup() {
|
|
648
|
-
super.setup(), this.addEffect(
|
|
1623
|
+
super.setup(), this.addEffect(j(this, this.#n, this.#e)), this.addEventListener("ui-input", this.#i), this.addEventListener("ui-select", this.#a), this.addEventListener("keydown", this.#o), this.deferChildren(() => {
|
|
649
1624
|
this.addEffect(() => {
|
|
650
1625
|
let e = this.#t.query.value.toLowerCase().trim(), t = this.querySelectorAll("ui-command-item");
|
|
651
1626
|
for (let n of t) {
|
|
@@ -654,10 +1629,10 @@ var te = class extends x(_) {
|
|
|
654
1629
|
}
|
|
655
1630
|
}), this.addEffect(() => {
|
|
656
1631
|
this.#t.query.value;
|
|
657
|
-
let
|
|
658
|
-
for (let
|
|
659
|
-
let
|
|
660
|
-
|
|
1632
|
+
let e = this.#t.activeIndex.value, t = this.#r(), n = this.querySelector("ui-command-list");
|
|
1633
|
+
for (let n = 0; n < t.length; n++) t[n].toggleAttribute("active", n === e);
|
|
1634
|
+
let r = t[e];
|
|
1635
|
+
r && n ? (r.id ||= A("cmd"), n.setAttribute("aria-activedescendant", r.id), r.scrollIntoView({ block: "nearest" })) : n?.removeAttribute("aria-activedescendant");
|
|
661
1636
|
}), this.addEffect(() => {
|
|
662
1637
|
this.#t.query.value;
|
|
663
1638
|
let e = this.#r(), t = this.querySelector("ui-command-empty");
|
|
@@ -715,7 +1690,7 @@ var te = class extends x(_) {
|
|
|
715
1690
|
break;
|
|
716
1691
|
}
|
|
717
1692
|
};
|
|
718
|
-
},
|
|
1693
|
+
}, me = class extends k {
|
|
719
1694
|
#e = null;
|
|
720
1695
|
setup() {
|
|
721
1696
|
super.setup(), this.deferChildren(() => {
|
|
@@ -742,22 +1717,22 @@ var te = class extends x(_) {
|
|
|
742
1717
|
detail: { value: e }
|
|
743
1718
|
}));
|
|
744
1719
|
};
|
|
745
|
-
},
|
|
1720
|
+
}, he = class extends k {
|
|
746
1721
|
constructor() {
|
|
747
1722
|
super();
|
|
748
1723
|
let e = this.attachInternals();
|
|
749
1724
|
e.role = "listbox";
|
|
750
1725
|
}
|
|
751
|
-
},
|
|
1726
|
+
}, ge = class extends k {
|
|
752
1727
|
static observedAttributes = [
|
|
753
1728
|
"value",
|
|
754
1729
|
"disabled",
|
|
755
1730
|
"keywords"
|
|
756
1731
|
];
|
|
757
1732
|
#e;
|
|
758
|
-
#t =
|
|
759
|
-
#n =
|
|
760
|
-
#r =
|
|
1733
|
+
#t = _("");
|
|
1734
|
+
#n = _(!1);
|
|
1735
|
+
#r = _("");
|
|
761
1736
|
constructor() {
|
|
762
1737
|
super(), this.#e = this.attachInternals(), this.#e.role = "option";
|
|
763
1738
|
}
|
|
@@ -802,7 +1777,7 @@ var te = class extends x(_) {
|
|
|
802
1777
|
}
|
|
803
1778
|
}
|
|
804
1779
|
setup() {
|
|
805
|
-
super.setup(), this.addEffect(
|
|
1780
|
+
super.setup(), this.addEffect(j(this, this.#n, this.#e)), this.addEventListener("click", this.#i);
|
|
806
1781
|
}
|
|
807
1782
|
teardown() {
|
|
808
1783
|
this.removeEventListener("click", this.#i), super.teardown();
|
|
@@ -817,7 +1792,7 @@ var te = class extends x(_) {
|
|
|
817
1792
|
}
|
|
818
1793
|
}));
|
|
819
1794
|
};
|
|
820
|
-
},
|
|
1795
|
+
}, _e = class extends k {
|
|
821
1796
|
constructor() {
|
|
822
1797
|
super();
|
|
823
1798
|
let e = this.attachInternals();
|
|
@@ -825,10 +1800,10 @@ var te = class extends x(_) {
|
|
|
825
1800
|
}
|
|
826
1801
|
setup() {
|
|
827
1802
|
super.setup();
|
|
828
|
-
let
|
|
829
|
-
|
|
1803
|
+
let e = this.querySelector("[slot=\"heading\"]");
|
|
1804
|
+
e && (e.id ||= A("cg"), this.setAttribute("aria-labelledby", e.id));
|
|
830
1805
|
}
|
|
831
|
-
},
|
|
1806
|
+
}, ve = class extends k {}, ye = class extends P(k) {
|
|
832
1807
|
static observedAttributes = [
|
|
833
1808
|
"checked",
|
|
834
1809
|
"indeterminate",
|
|
@@ -841,11 +1816,11 @@ var te = class extends x(_) {
|
|
|
841
1816
|
#t;
|
|
842
1817
|
#n;
|
|
843
1818
|
#r;
|
|
844
|
-
#i =
|
|
1819
|
+
#i = _(!1);
|
|
845
1820
|
#a = !1;
|
|
846
1821
|
#o;
|
|
847
1822
|
constructor() {
|
|
848
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "checkbox", this.#t =
|
|
1823
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "checkbox", this.#t = M(this, "checked", { type: "boolean" }), this.#n = M(this, "indeterminate", { type: "boolean" }), this.#r = M(this, "disabled", { type: "boolean" });
|
|
849
1824
|
}
|
|
850
1825
|
get checked() {
|
|
851
1826
|
return this.#t.value;
|
|
@@ -885,7 +1860,7 @@ var te = class extends x(_) {
|
|
|
885
1860
|
}
|
|
886
1861
|
attributeChangedCallback(e, t, n) {
|
|
887
1862
|
if (t !== n) {
|
|
888
|
-
if (
|
|
1863
|
+
if (N({
|
|
889
1864
|
checked: this.#t,
|
|
890
1865
|
indeterminate: this.#n,
|
|
891
1866
|
disabled: this.#r
|
|
@@ -897,7 +1872,7 @@ var te = class extends x(_) {
|
|
|
897
1872
|
}
|
|
898
1873
|
}
|
|
899
1874
|
setup() {
|
|
900
|
-
super.setup(), this.#o = new
|
|
1875
|
+
super.setup(), this.#o = new W(this, { disabled: () => this.disabled }), this.#a = this.hasAttribute("checked"), this.#i.value = this.hasAttribute("required"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(j(this, this.#r.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
|
|
901
1876
|
let e = this.#t.value, t = this.#n.value ? "mixed" : e ? "true" : "false";
|
|
902
1877
|
this.setAttribute("aria-checked", t), this.#e.setFormValue(e ? this.value : null);
|
|
903
1878
|
}), this.addEffect(() => {
|
|
@@ -928,7 +1903,7 @@ var te = class extends x(_) {
|
|
|
928
1903
|
}
|
|
929
1904
|
})));
|
|
930
1905
|
};
|
|
931
|
-
},
|
|
1906
|
+
}, be = class extends P(k) {
|
|
932
1907
|
static observedAttributes = [
|
|
933
1908
|
"checked",
|
|
934
1909
|
"disabled",
|
|
@@ -943,7 +1918,7 @@ var te = class extends x(_) {
|
|
|
943
1918
|
#i = !1;
|
|
944
1919
|
#a;
|
|
945
1920
|
constructor() {
|
|
946
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "switch", this.#t =
|
|
1921
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "switch", this.#t = M(this, "checked", { type: "boolean" }), this.#n = M(this, "disabled", { type: "boolean" }), this.#r = M(this, "required", { type: "boolean" });
|
|
947
1922
|
}
|
|
948
1923
|
get checked() {
|
|
949
1924
|
return this.#t.value;
|
|
@@ -976,14 +1951,14 @@ var te = class extends x(_) {
|
|
|
976
1951
|
this.#r.set(e);
|
|
977
1952
|
}
|
|
978
1953
|
attributeChangedCallback(e, t, n) {
|
|
979
|
-
t !== n && (
|
|
1954
|
+
t !== n && (N({
|
|
980
1955
|
checked: this.#t,
|
|
981
1956
|
disabled: this.#n,
|
|
982
1957
|
required: this.#r
|
|
983
1958
|
}, e, n), super.attributeChangedCallback?.(e, t, n));
|
|
984
1959
|
}
|
|
985
1960
|
setup() {
|
|
986
|
-
super.setup(), this.#a = new
|
|
1961
|
+
super.setup(), this.#a = new W(this, { disabled: () => this.disabled }), this.#i = this.hasAttribute("checked"), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(j(this, this.#n.signal, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
|
|
987
1962
|
let e = this.#t.value;
|
|
988
1963
|
this.setAttribute("aria-checked", e ? "true" : "false"), this.#e.setFormValue(e ? this.value : null);
|
|
989
1964
|
}), this.addEffect(() => {
|
|
@@ -1012,13 +1987,13 @@ var te = class extends x(_) {
|
|
|
1012
1987
|
}
|
|
1013
1988
|
})));
|
|
1014
1989
|
};
|
|
1015
|
-
},
|
|
1990
|
+
}, xe = class extends k {
|
|
1016
1991
|
static observedAttributes = ["disabled"];
|
|
1017
1992
|
#e;
|
|
1018
1993
|
#t;
|
|
1019
1994
|
#n;
|
|
1020
1995
|
constructor() {
|
|
1021
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t =
|
|
1996
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = M(this, "disabled", { type: "boolean" });
|
|
1022
1997
|
}
|
|
1023
1998
|
get value() {
|
|
1024
1999
|
return this.getAttribute("value") ?? "";
|
|
@@ -1036,10 +2011,10 @@ var te = class extends x(_) {
|
|
|
1036
2011
|
return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
|
|
1037
2012
|
}
|
|
1038
2013
|
attributeChangedCallback(e, t, n) {
|
|
1039
|
-
t !== n && (
|
|
2014
|
+
t !== n && (N({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
|
|
1040
2015
|
}
|
|
1041
2016
|
setup() {
|
|
1042
|
-
super.setup(), this.setAttribute("aria-checked", "false"), this.#n = new
|
|
2017
|
+
super.setup(), this.setAttribute("aria-checked", "false"), this.#n = new W(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(j(this, this.#t.signal, this.#e)), this.addEventListener("click", this.#r), this.addEventListener("keydown", this.#i);
|
|
1043
2018
|
}
|
|
1044
2019
|
teardown() {
|
|
1045
2020
|
this.removeEventListener("click", this.#r), this.removeEventListener("keydown", this.#i), this.#n.destroy(), super.teardown();
|
|
@@ -1064,7 +2039,7 @@ var te = class extends x(_) {
|
|
|
1064
2039
|
}
|
|
1065
2040
|
})));
|
|
1066
2041
|
};
|
|
1067
|
-
},
|
|
2042
|
+
}, Se = class extends P(k) {
|
|
1068
2043
|
static observedAttributes = [
|
|
1069
2044
|
"value",
|
|
1070
2045
|
"disabled",
|
|
@@ -1073,8 +2048,8 @@ var te = class extends x(_) {
|
|
|
1073
2048
|
"orientation"
|
|
1074
2049
|
];
|
|
1075
2050
|
#e;
|
|
1076
|
-
#t =
|
|
1077
|
-
#n =
|
|
2051
|
+
#t = _(!1);
|
|
2052
|
+
#n = _(!1);
|
|
1078
2053
|
#r = null;
|
|
1079
2054
|
#i;
|
|
1080
2055
|
constructor() {
|
|
@@ -1124,7 +2099,7 @@ var te = class extends x(_) {
|
|
|
1124
2099
|
}
|
|
1125
2100
|
}
|
|
1126
2101
|
setup() {
|
|
1127
|
-
super.setup(), this.#r = this.getAttribute("value"), this.#n.value = this.hasAttribute("required"), this.#i = new
|
|
2102
|
+
super.setup(), this.#r = this.getAttribute("value"), this.#n.value = this.hasAttribute("required"), this.#i = new J(this, {
|
|
1128
2103
|
itemSelector: ":scope ui-radio:not([disabled])",
|
|
1129
2104
|
ariaAttr: "aria-checked",
|
|
1130
2105
|
orientation: "vertical",
|
|
@@ -1139,7 +2114,7 @@ var te = class extends x(_) {
|
|
|
1139
2114
|
deferChildren: (e) => this.deferChildren(e)
|
|
1140
2115
|
});
|
|
1141
2116
|
let e = this.getAttribute("value");
|
|
1142
|
-
e !== null && (this.#i.listValue.value = e), this.addEffect(
|
|
2117
|
+
e !== null && (this.#i.listValue.value = e), this.addEffect(j(this, this.#t, this.#e)), this.addEffect(() => {
|
|
1143
2118
|
let e = this.#t.value, t = this.querySelectorAll("ui-radio");
|
|
1144
2119
|
for (let n of t) n.toggleAttribute("disabled", e);
|
|
1145
2120
|
}), this.addEffect(() => {
|
|
@@ -1164,7 +2139,7 @@ var te = class extends x(_) {
|
|
|
1164
2139
|
onFormStateRestore(e) {
|
|
1165
2140
|
typeof e == "string" && e && (this.value = e);
|
|
1166
2141
|
}
|
|
1167
|
-
},
|
|
2142
|
+
}, Ce = class extends P(k) {
|
|
1168
2143
|
static observedAttributes = [
|
|
1169
2144
|
"value",
|
|
1170
2145
|
"disabled",
|
|
@@ -1172,8 +2147,8 @@ var te = class extends x(_) {
|
|
|
1172
2147
|
"required"
|
|
1173
2148
|
];
|
|
1174
2149
|
#e;
|
|
1175
|
-
#t =
|
|
1176
|
-
#n =
|
|
2150
|
+
#t = _(!1);
|
|
2151
|
+
#n = _(!1);
|
|
1177
2152
|
#r = null;
|
|
1178
2153
|
#i;
|
|
1179
2154
|
constructor() {
|
|
@@ -1220,7 +2195,7 @@ var te = class extends x(_) {
|
|
|
1220
2195
|
}
|
|
1221
2196
|
}
|
|
1222
2197
|
setup() {
|
|
1223
|
-
super.setup(), this.#r = this.getAttribute("value"), this.#i = new
|
|
2198
|
+
super.setup(), this.#r = this.getAttribute("value"), this.#i = new J(this, {
|
|
1224
2199
|
itemSelector: ":scope > ui-segment:not([disabled])",
|
|
1225
2200
|
ariaAttr: "aria-checked",
|
|
1226
2201
|
orientation: "horizontal",
|
|
@@ -1235,7 +2210,7 @@ var te = class extends x(_) {
|
|
|
1235
2210
|
deferChildren: (e) => this.deferChildren(e)
|
|
1236
2211
|
});
|
|
1237
2212
|
let e = this.getAttribute("value");
|
|
1238
|
-
e !== null && (this.#i.listValue.value = e), this.addEffect(
|
|
2213
|
+
e !== null && (this.#i.listValue.value = e), this.addEffect(j(this, this.#t, this.#e)), this.#n.value = this.hasAttribute("required"), this.addEffect(() => {
|
|
1239
2214
|
let e = this.#i.listValue.value;
|
|
1240
2215
|
this.#n.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select one of these options.", this) : this.#e.setValidity({});
|
|
1241
2216
|
}), this.addEffect(() => {
|
|
@@ -1268,13 +2243,13 @@ var te = class extends x(_) {
|
|
|
1268
2243
|
}
|
|
1269
2244
|
this.style.setProperty("--_indicator-index", `${e}`), this.style.setProperty("--_segment-count", `${t}`), this.#e.states.add("ready");
|
|
1270
2245
|
}
|
|
1271
|
-
},
|
|
2246
|
+
}, we = class extends k {
|
|
1272
2247
|
static observedAttributes = ["disabled"];
|
|
1273
2248
|
#e;
|
|
1274
2249
|
#t;
|
|
1275
2250
|
#n;
|
|
1276
2251
|
constructor() {
|
|
1277
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t =
|
|
2252
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "radio", this.#t = M(this, "disabled", { type: "boolean" }), this.setAttribute("aria-checked", "false");
|
|
1278
2253
|
}
|
|
1279
2254
|
get value() {
|
|
1280
2255
|
return this.getAttribute("value") ?? "";
|
|
@@ -1292,10 +2267,10 @@ var te = class extends x(_) {
|
|
|
1292
2267
|
return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
|
|
1293
2268
|
}
|
|
1294
2269
|
attributeChangedCallback(e, t, n) {
|
|
1295
|
-
t !== n && (
|
|
2270
|
+
t !== n && (N({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
|
|
1296
2271
|
}
|
|
1297
2272
|
setup() {
|
|
1298
|
-
super.setup(), this.#n = new
|
|
2273
|
+
super.setup(), this.#n = new W(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(j(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
|
|
1299
2274
|
}
|
|
1300
2275
|
teardown() {
|
|
1301
2276
|
this.removeEventListener("ui-press", this.#r), this.#n.destroy(), super.teardown();
|
|
@@ -1310,15 +2285,15 @@ var te = class extends x(_) {
|
|
|
1310
2285
|
}
|
|
1311
2286
|
}));
|
|
1312
2287
|
};
|
|
1313
|
-
},
|
|
2288
|
+
}, Te = class extends k {
|
|
1314
2289
|
static observedAttributes = [
|
|
1315
2290
|
"placement",
|
|
1316
2291
|
"delay",
|
|
1317
2292
|
"disabled"
|
|
1318
2293
|
];
|
|
1319
2294
|
#e;
|
|
1320
|
-
#t =
|
|
1321
|
-
#n =
|
|
2295
|
+
#t = _(!1);
|
|
2296
|
+
#n = _(!1);
|
|
1322
2297
|
#r = null;
|
|
1323
2298
|
#i = null;
|
|
1324
2299
|
#a = "";
|
|
@@ -1347,7 +2322,7 @@ var te = class extends x(_) {
|
|
|
1347
2322
|
t !== n && (e === "disabled" && (this.#n.value = n !== null), super.attributeChangedCallback?.(e, t, n));
|
|
1348
2323
|
}
|
|
1349
2324
|
setup() {
|
|
1350
|
-
super.setup(), this.addEffect(
|
|
2325
|
+
super.setup(), this.addEffect(j(this, this.#n, this.#e)), this.#i = this.parentElement, this.#i && (this.#a = A("tip"), this.#i.style.setProperty("anchor-name", `--${this.#a}`), this.style.setProperty("position-anchor", `--${this.#a}`), this.hasAttribute("popover") || this.setAttribute("popover", "manual"), this.id ||= A("tooltip"), this.#i.setAttribute("aria-describedby", this.id), this.#i.addEventListener("mouseenter", this.#o), this.#i.addEventListener("mouseleave", this.#s), this.#i.addEventListener("focusin", this.#o), this.#i.addEventListener("focusout", this.#s), this.#i.addEventListener("keydown", this.#c), this.addEffect(() => {
|
|
1351
2326
|
this.#n.value && this.#t.value && (this.#l(), this.#t.value = !1);
|
|
1352
2327
|
}), this.addEffect(() => {
|
|
1353
2328
|
if (this.#t.value) try {
|
|
@@ -1375,9 +2350,9 @@ var te = class extends x(_) {
|
|
|
1375
2350
|
#l() {
|
|
1376
2351
|
this.#r !== null && (clearTimeout(this.#r), this.#r = null);
|
|
1377
2352
|
}
|
|
1378
|
-
},
|
|
2353
|
+
}, Ee = class extends k {
|
|
1379
2354
|
static observedAttributes = ["multiple", "disabled"];
|
|
1380
|
-
#e =
|
|
2355
|
+
#e = _(!1);
|
|
1381
2356
|
get multiple() {
|
|
1382
2357
|
return this.hasAttribute("multiple");
|
|
1383
2358
|
}
|
|
@@ -1407,7 +2382,7 @@ var te = class extends x(_) {
|
|
|
1407
2382
|
}
|
|
1408
2383
|
}
|
|
1409
2384
|
setup() {
|
|
1410
|
-
super.setup(), this.addEffect(
|
|
2385
|
+
super.setup(), this.addEffect(j(this, this.#e)), this.addEventListener("toggle", this.#t, !0);
|
|
1411
2386
|
}
|
|
1412
2387
|
teardown() {
|
|
1413
2388
|
this.removeEventListener("toggle", this.#t, !0), super.teardown();
|
|
@@ -1421,10 +2396,10 @@ var te = class extends x(_) {
|
|
|
1421
2396
|
let r = this.querySelectorAll(":scope > ui-accordion-item[open]");
|
|
1422
2397
|
for (let e of r) e !== n && (e.open = !1);
|
|
1423
2398
|
};
|
|
1424
|
-
},
|
|
2399
|
+
}, De = class extends k {
|
|
1425
2400
|
static observedAttributes = ["open", "disabled"];
|
|
1426
|
-
#e =
|
|
1427
|
-
#t =
|
|
2401
|
+
#e = _(!1);
|
|
2402
|
+
#t = _(!1);
|
|
1428
2403
|
#n = null;
|
|
1429
2404
|
get open() {
|
|
1430
2405
|
return this.#e.value;
|
|
@@ -1460,7 +2435,7 @@ var te = class extends x(_) {
|
|
|
1460
2435
|
e.appendChild(t), e.appendChild(r), this.appendChild(e), this.#n = e, this.addEffect(() => {
|
|
1461
2436
|
let e = this.#e.value;
|
|
1462
2437
|
this.#n && (this.#n.open = e);
|
|
1463
|
-
}), this.addEffect(
|
|
2438
|
+
}), this.addEffect(j(this, this.#t)), e.addEventListener("toggle", this.#r);
|
|
1464
2439
|
}
|
|
1465
2440
|
teardown() {
|
|
1466
2441
|
this.#n?.removeEventListener("toggle", this.#r), this.#n = null, super.teardown();
|
|
@@ -1470,7 +2445,7 @@ var te = class extends x(_) {
|
|
|
1470
2445
|
let e = this.#n.open;
|
|
1471
2446
|
this.#e.value = e, this.toggleAttribute("open", e);
|
|
1472
2447
|
};
|
|
1473
|
-
},
|
|
2448
|
+
}, Oe = class extends k {
|
|
1474
2449
|
#e;
|
|
1475
2450
|
get open() {
|
|
1476
2451
|
return this.#e.open;
|
|
@@ -1482,19 +2457,19 @@ var te = class extends x(_) {
|
|
|
1482
2457
|
this.#e.close();
|
|
1483
2458
|
}
|
|
1484
2459
|
setup() {
|
|
1485
|
-
super.setup(), this.#e = new
|
|
2460
|
+
super.setup(), this.#e = new Y(this);
|
|
1486
2461
|
}
|
|
1487
2462
|
teardown() {
|
|
1488
2463
|
this.#e.destroy(), super.teardown();
|
|
1489
2464
|
}
|
|
1490
|
-
},
|
|
2465
|
+
}, ke = class extends k {
|
|
1491
2466
|
static observedAttributes = [
|
|
1492
2467
|
"value",
|
|
1493
2468
|
"disabled",
|
|
1494
2469
|
"orientation"
|
|
1495
2470
|
];
|
|
1496
2471
|
#e;
|
|
1497
|
-
#t =
|
|
2472
|
+
#t = _(!1);
|
|
1498
2473
|
#n;
|
|
1499
2474
|
constructor() {
|
|
1500
2475
|
super(), this.#e = this.attachInternals(), this.#e.role = "tablist";
|
|
@@ -1528,7 +2503,7 @@ var te = class extends x(_) {
|
|
|
1528
2503
|
}
|
|
1529
2504
|
}
|
|
1530
2505
|
setup() {
|
|
1531
|
-
super.setup(), this.#n = new
|
|
2506
|
+
super.setup(), this.#n = new J(this, {
|
|
1532
2507
|
itemSelector: ":scope > ui-tab:not([disabled])",
|
|
1533
2508
|
orientation: "horizontal",
|
|
1534
2509
|
autoSync: !0,
|
|
@@ -1543,7 +2518,7 @@ var te = class extends x(_) {
|
|
|
1543
2518
|
deferChildren: (e) => this.deferChildren(e)
|
|
1544
2519
|
});
|
|
1545
2520
|
let e = this.getAttribute("value");
|
|
1546
|
-
e !== null && (this.#n.listValue.value = e), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Tabs"), this.addEffect(
|
|
2521
|
+
e !== null && (this.#n.listValue.value = e), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Tabs"), this.addEffect(j(this, this.#t, this.#e)), this.addEffect(() => {
|
|
1547
2522
|
let e = this.#t.value, t = this.querySelectorAll(":scope > ui-tab");
|
|
1548
2523
|
for (let n of t) n.toggleAttribute("disabled", e);
|
|
1549
2524
|
}), this.deferChildren(() => {
|
|
@@ -1562,12 +2537,12 @@ var te = class extends x(_) {
|
|
|
1562
2537
|
this.#n.destroy(), super.teardown();
|
|
1563
2538
|
}
|
|
1564
2539
|
#r() {
|
|
1565
|
-
let
|
|
1566
|
-
for (let
|
|
1567
|
-
for (let
|
|
1568
|
-
|
|
1569
|
-
let
|
|
1570
|
-
|
|
2540
|
+
let e = this.querySelectorAll(":scope > ui-tab"), t = this.querySelectorAll(":scope > ui-tab-panels > ui-tab-panel"), n = /* @__PURE__ */ new Map();
|
|
2541
|
+
for (let e of t) e.id ||= A("tp"), n.set(e.getAttribute("value") ?? "", e);
|
|
2542
|
+
for (let t of e) {
|
|
2543
|
+
t.id ||= A("tab");
|
|
2544
|
+
let e = n.get(t.getAttribute("value") ?? "");
|
|
2545
|
+
e && (t.setAttribute("aria-controls", e.id), e.setAttribute("aria-labelledby", t.id));
|
|
1571
2546
|
}
|
|
1572
2547
|
}
|
|
1573
2548
|
#i(e, t) {
|
|
@@ -1577,13 +2552,13 @@ var te = class extends x(_) {
|
|
|
1577
2552
|
}
|
|
1578
2553
|
this.style.setProperty("--_indicator-index", `${e}`), this.style.setProperty("--_tab-count", `${t}`), this.#e.states.add("ready");
|
|
1579
2554
|
}
|
|
1580
|
-
},
|
|
2555
|
+
}, Ae = class extends k {
|
|
1581
2556
|
static observedAttributes = ["disabled"];
|
|
1582
2557
|
#e;
|
|
1583
2558
|
#t;
|
|
1584
2559
|
#n;
|
|
1585
2560
|
constructor() {
|
|
1586
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "tab", this.#t =
|
|
2561
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "tab", this.#t = M(this, "disabled", { type: "boolean" });
|
|
1587
2562
|
}
|
|
1588
2563
|
get value() {
|
|
1589
2564
|
return this.getAttribute("value") ?? "";
|
|
@@ -1601,10 +2576,10 @@ var te = class extends x(_) {
|
|
|
1601
2576
|
return this.getAttribute("label") ?? this.textContent?.trim() ?? "";
|
|
1602
2577
|
}
|
|
1603
2578
|
attributeChangedCallback(e, t, n) {
|
|
1604
|
-
t !== n && (
|
|
2579
|
+
t !== n && (N({ disabled: this.#t }, e, n), super.attributeChangedCallback?.(e, t, n));
|
|
1605
2580
|
}
|
|
1606
2581
|
setup() {
|
|
1607
|
-
super.setup(), this.#n = new
|
|
2582
|
+
super.setup(), this.#n = new W(this, { disabled: () => this.disabled }), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1"), this.addEffect(j(this, this.#t.signal, this.#e)), this.addEventListener("ui-press", this.#r);
|
|
1608
2583
|
}
|
|
1609
2584
|
teardown() {
|
|
1610
2585
|
this.removeEventListener("ui-press", this.#r), this.#n.destroy(), super.teardown();
|
|
@@ -1619,7 +2594,7 @@ var te = class extends x(_) {
|
|
|
1619
2594
|
}
|
|
1620
2595
|
}));
|
|
1621
2596
|
};
|
|
1622
|
-
},
|
|
2597
|
+
}, je = class extends k {
|
|
1623
2598
|
static observedAttributes = ["value"];
|
|
1624
2599
|
#e;
|
|
1625
2600
|
constructor() {
|
|
@@ -1634,21 +2609,21 @@ var te = class extends x(_) {
|
|
|
1634
2609
|
attributeChangedCallback(e, t, n) {
|
|
1635
2610
|
t !== n && super.attributeChangedCallback?.(e, t, n);
|
|
1636
2611
|
}
|
|
1637
|
-
},
|
|
2612
|
+
}, Me = class extends k {
|
|
1638
2613
|
#e;
|
|
1639
2614
|
constructor() {
|
|
1640
2615
|
super(), this.#e = this.attachInternals(), this.#e.role = "presentation";
|
|
1641
2616
|
}
|
|
1642
|
-
},
|
|
2617
|
+
}, X = class {
|
|
1643
2618
|
sortColumn;
|
|
1644
2619
|
sortDirection;
|
|
1645
2620
|
selected;
|
|
1646
2621
|
columnWidths;
|
|
1647
2622
|
constructor(e = {}) {
|
|
1648
|
-
this.sortColumn =
|
|
2623
|
+
this.sortColumn = _(e.sortColumn ?? null), this.sortDirection = _(e.sortDirection ?? "none"), this.selected = _(/* @__PURE__ */ new Set()), this.columnWidths = _([]);
|
|
1649
2624
|
}
|
|
1650
2625
|
toggleSort(e) {
|
|
1651
|
-
|
|
2626
|
+
b(() => {
|
|
1652
2627
|
if (this.sortColumn.value === e) {
|
|
1653
2628
|
let e = this.sortDirection.value;
|
|
1654
2629
|
this.sortDirection.value = e === "asc" ? "desc" : e === "desc" ? "none" : "asc", this.sortDirection.value === "none" && (this.sortColumn.value = null);
|
|
@@ -1676,10 +2651,10 @@ var te = class extends x(_) {
|
|
|
1676
2651
|
return this.selected.value.has(e);
|
|
1677
2652
|
}
|
|
1678
2653
|
};
|
|
1679
|
-
function
|
|
1680
|
-
return new
|
|
2654
|
+
function Ne(e = {}) {
|
|
2655
|
+
return new X(e);
|
|
1681
2656
|
}
|
|
1682
|
-
var
|
|
2657
|
+
var Pe = class {
|
|
1683
2658
|
table;
|
|
1684
2659
|
#e = [];
|
|
1685
2660
|
#t = -1;
|
|
@@ -1756,13 +2731,13 @@ var W = class {
|
|
|
1756
2731
|
#m() {
|
|
1757
2732
|
this.#i = !1, this.#t = -1, this.table.removeAttribute("resizing"), document.removeEventListener("pointermove", this.#u), document.removeEventListener("pointerup", this.#d), document.removeEventListener("pointercancel", this.#f), document.removeEventListener("keydown", this.#p);
|
|
1758
2733
|
}
|
|
1759
|
-
},
|
|
2734
|
+
}, Fe = class {
|
|
1760
2735
|
#e;
|
|
1761
2736
|
#t;
|
|
1762
2737
|
#n;
|
|
1763
2738
|
#r = !1;
|
|
1764
2739
|
constructor(e, t) {
|
|
1765
|
-
this.#t = t, this.#n = e, this.#e = new
|
|
2740
|
+
this.#t = t, this.#n = e, this.#e = new H(e, {
|
|
1766
2741
|
selector: "ui-table-row:not([colspan])",
|
|
1767
2742
|
axis: "vertical",
|
|
1768
2743
|
mode: "slot"
|
|
@@ -1792,14 +2767,14 @@ var W = class {
|
|
|
1792
2767
|
destroy() {
|
|
1793
2768
|
this.#n.removeEventListener("ui-drag-start", this.#i), this.#n.removeEventListener("ui-drop", this.#a), this.#n.removeEventListener("click", this.#o, { capture: !0 }), this.#e.destroy();
|
|
1794
2769
|
}
|
|
1795
|
-
},
|
|
2770
|
+
}, Ie = class extends k {
|
|
1796
2771
|
static observedAttributes = [
|
|
1797
2772
|
"selectable",
|
|
1798
2773
|
"resizable",
|
|
1799
2774
|
"reorderable"
|
|
1800
2775
|
];
|
|
1801
2776
|
#e;
|
|
1802
|
-
#t = new
|
|
2777
|
+
#t = new X();
|
|
1803
2778
|
#n = null;
|
|
1804
2779
|
#r = null;
|
|
1805
2780
|
#i = null;
|
|
@@ -1857,7 +2832,7 @@ var W = class {
|
|
|
1857
2832
|
let e = document.createElement("div");
|
|
1858
2833
|
e.className = "table-resize-handle", e.setAttribute("aria-hidden", "true"), e.addEventListener("click", (e) => e.stopPropagation()), t.appendChild(e);
|
|
1859
2834
|
}
|
|
1860
|
-
this.#n = new
|
|
2835
|
+
this.#n = new Pe(this), this.#n.init();
|
|
1861
2836
|
}
|
|
1862
2837
|
#o() {
|
|
1863
2838
|
let e = this.querySelector(":scope > ui-table-head > ui-table-row");
|
|
@@ -1870,7 +2845,7 @@ var W = class {
|
|
|
1870
2845
|
}
|
|
1871
2846
|
#s() {
|
|
1872
2847
|
let e = this.querySelector(":scope > ui-table-body");
|
|
1873
|
-
e && (this.#i = new
|
|
2848
|
+
e && (this.#i = new Fe(e, this));
|
|
1874
2849
|
}
|
|
1875
2850
|
#c = (e) => {
|
|
1876
2851
|
let t = e.detail;
|
|
@@ -1896,17 +2871,17 @@ var W = class {
|
|
|
1896
2871
|
}
|
|
1897
2872
|
}));
|
|
1898
2873
|
};
|
|
1899
|
-
},
|
|
2874
|
+
}, Le = class extends k {
|
|
1900
2875
|
#e;
|
|
1901
2876
|
constructor() {
|
|
1902
2877
|
super(), this.#e = this.attachInternals(), this.#e.role = "rowgroup";
|
|
1903
2878
|
}
|
|
1904
|
-
},
|
|
2879
|
+
}, Re = class extends k {
|
|
1905
2880
|
#e;
|
|
1906
2881
|
constructor() {
|
|
1907
2882
|
super(), this.#e = this.attachInternals(), this.#e.role = "rowgroup";
|
|
1908
2883
|
}
|
|
1909
|
-
},
|
|
2884
|
+
}, ze = class extends k {
|
|
1910
2885
|
static observedAttributes = ["value", "selected"];
|
|
1911
2886
|
#e;
|
|
1912
2887
|
constructor() {
|
|
@@ -1937,12 +2912,12 @@ var W = class {
|
|
|
1937
2912
|
detail: { value: this.value }
|
|
1938
2913
|
}));
|
|
1939
2914
|
};
|
|
1940
|
-
},
|
|
2915
|
+
}, Be = class extends k {
|
|
1941
2916
|
#e;
|
|
1942
2917
|
constructor() {
|
|
1943
2918
|
super(), this.#e = this.attachInternals(), this.#e.role = "cell";
|
|
1944
2919
|
}
|
|
1945
|
-
},
|
|
2920
|
+
}, Ve = class extends k {
|
|
1946
2921
|
static observedAttributes = ["sort", "sortable"];
|
|
1947
2922
|
#e;
|
|
1948
2923
|
constructor() {
|
|
@@ -1987,18 +2962,18 @@ var W = class {
|
|
|
1987
2962
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#t());
|
|
1988
2963
|
};
|
|
1989
2964
|
};
|
|
1990
|
-
function
|
|
2965
|
+
function Z(e) {
|
|
1991
2966
|
if (!e) return null;
|
|
1992
2967
|
let t = /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
1993
2968
|
return isNaN(t.getTime()) ? null : t;
|
|
1994
2969
|
}
|
|
1995
|
-
function
|
|
2970
|
+
function He(e) {
|
|
1996
2971
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
1997
2972
|
}
|
|
1998
|
-
function
|
|
2973
|
+
function Q(e, t) {
|
|
1999
2974
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
2000
2975
|
}
|
|
2001
|
-
var
|
|
2976
|
+
var $ = class {
|
|
2002
2977
|
view;
|
|
2003
2978
|
focusedYear;
|
|
2004
2979
|
focusedMonth;
|
|
@@ -2012,16 +2987,16 @@ var q = class {
|
|
|
2012
2987
|
years;
|
|
2013
2988
|
title;
|
|
2014
2989
|
constructor(e = {}) {
|
|
2015
|
-
let
|
|
2016
|
-
this.view =
|
|
2990
|
+
let t = /* @__PURE__ */ new Date(), n = Z(e.value ?? null) ?? t;
|
|
2991
|
+
this.view = _("day"), this.focusedYear = _(n.getFullYear()), this.focusedMonth = _(n.getMonth()), this.value = _(e.value ?? null), this.rangeStart = _(e.rangeStart ?? null), this.rangeEnd = _(e.rangeEnd ?? null), this.min = _(e.min ?? null), this.max = _(e.max ?? null), this.days = v(() => this.#e()), this.months = v(() => this.#t()), this.years = v(() => this.#n()), this.title = v(() => this.#r());
|
|
2017
2992
|
}
|
|
2018
2993
|
prevMonth() {
|
|
2019
|
-
|
|
2994
|
+
b(() => {
|
|
2020
2995
|
this.focusedMonth.value === 0 ? (this.focusedMonth.value = 11, this.focusedYear.value--) : this.focusedMonth.value--;
|
|
2021
2996
|
});
|
|
2022
2997
|
}
|
|
2023
2998
|
nextMonth() {
|
|
2024
|
-
|
|
2999
|
+
b(() => {
|
|
2025
3000
|
this.focusedMonth.value === 11 ? (this.focusedMonth.value = 0, this.focusedYear.value++) : this.focusedMonth.value++;
|
|
2026
3001
|
});
|
|
2027
3002
|
}
|
|
@@ -2041,31 +3016,31 @@ var q = class {
|
|
|
2041
3016
|
this.value.value = e;
|
|
2042
3017
|
}
|
|
2043
3018
|
selectMonth(e) {
|
|
2044
|
-
|
|
3019
|
+
b(() => {
|
|
2045
3020
|
this.focusedMonth.value = e, this.view.value = "day";
|
|
2046
3021
|
});
|
|
2047
3022
|
}
|
|
2048
3023
|
selectYear(e) {
|
|
2049
|
-
|
|
3024
|
+
b(() => {
|
|
2050
3025
|
this.focusedYear.value = e, this.view.value = "month";
|
|
2051
3026
|
});
|
|
2052
3027
|
}
|
|
2053
3028
|
setRange(e, t) {
|
|
2054
|
-
|
|
3029
|
+
b(() => {
|
|
2055
3030
|
this.rangeStart.value = e, this.rangeEnd.value = t;
|
|
2056
3031
|
});
|
|
2057
3032
|
}
|
|
2058
3033
|
isDateDisabled(e) {
|
|
2059
|
-
let t =
|
|
3034
|
+
let t = Z(this.min.value), n = Z(this.max.value), r = Z(e);
|
|
2060
3035
|
return !!(!r || t && r < t || n && r > n);
|
|
2061
3036
|
}
|
|
2062
3037
|
#e() {
|
|
2063
|
-
let e = this.focusedYear.value, t = this.focusedMonth.value, n =
|
|
3038
|
+
let e = this.focusedYear.value, t = this.focusedMonth.value, n = Z(this.value.value), r = /* @__PURE__ */ new Date(), i = Z(this.rangeStart.value), a = Z(this.rangeEnd.value), o = new Date(e, t, 1).getDay(), s = new Date(e, t, 1 - o), c = [];
|
|
2064
3039
|
for (let e = 0; e < 42; e++) {
|
|
2065
|
-
let o = new Date(s.getFullYear(), s.getMonth(), s.getDate() + e), l =
|
|
3040
|
+
let o = new Date(s.getFullYear(), s.getMonth(), s.getDate() + e), l = He(o), u = o.getMonth() === t, d = Q(o, r), f = n ? Q(o, n) : !1, p = this.isDateDisabled(l), m = !1, h = !1, g = !1;
|
|
2066
3041
|
if (i && a) {
|
|
2067
3042
|
let e = i <= a ? i : a, t = i <= a ? a : i;
|
|
2068
|
-
m = o >= e && o <= t, h =
|
|
3043
|
+
m = o >= e && o <= t, h = Q(o, e), g = Q(o, t);
|
|
2069
3044
|
}
|
|
2070
3045
|
c.push({
|
|
2071
3046
|
date: l,
|
|
@@ -2138,8 +3113,8 @@ var q = class {
|
|
|
2138
3113
|
}
|
|
2139
3114
|
}
|
|
2140
3115
|
};
|
|
2141
|
-
function
|
|
2142
|
-
return new
|
|
3116
|
+
function Ue(e = {}) {
|
|
3117
|
+
return new $(e);
|
|
2143
3118
|
}
|
|
2144
3119
|
/**
|
|
2145
3120
|
* Calendar date picker with day/month/year views and optional range selection.
|
|
@@ -2152,7 +3127,7 @@ function ye(e = {}) {
|
|
|
2152
3127
|
* @fires ui-change - Fired on single date selection with `{ value }` detail
|
|
2153
3128
|
* @fires ui-range-select - Fired on range commit with `{ start, end }` detail
|
|
2154
3129
|
*/
|
|
2155
|
-
var
|
|
3130
|
+
var We = class extends P(k) {
|
|
2156
3131
|
static observedAttributes = [
|
|
2157
3132
|
"value",
|
|
2158
3133
|
"min",
|
|
@@ -2163,11 +3138,11 @@ var be = class extends x(_) {
|
|
|
2163
3138
|
"required"
|
|
2164
3139
|
];
|
|
2165
3140
|
#e;
|
|
2166
|
-
#t = new
|
|
2167
|
-
#n =
|
|
2168
|
-
#r =
|
|
3141
|
+
#t = new $();
|
|
3142
|
+
#n = _(!1);
|
|
3143
|
+
#r = _(!1);
|
|
2169
3144
|
#i = null;
|
|
2170
|
-
#a =
|
|
3145
|
+
#a = _(0);
|
|
2171
3146
|
#o = "idle";
|
|
2172
3147
|
constructor() {
|
|
2173
3148
|
super(), this.#e = this.attachInternals(), this.#e.role = "group";
|
|
@@ -2224,14 +3199,14 @@ var be = class extends x(_) {
|
|
|
2224
3199
|
}
|
|
2225
3200
|
setup() {
|
|
2226
3201
|
super.setup(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.#i = this.getAttribute("value");
|
|
2227
|
-
let e = this.getAttribute("value"), t = this.getAttribute("min"),
|
|
2228
|
-
|
|
2229
|
-
e && (this.#t.value.value = e), t && (this.#t.min.value = t),
|
|
3202
|
+
let e = this.getAttribute("value"), t = this.getAttribute("min"), n = this.getAttribute("max");
|
|
3203
|
+
b(() => {
|
|
3204
|
+
e && (this.#t.value.value = e), t && (this.#t.min.value = t), n && (this.#t.max.value = n);
|
|
2230
3205
|
}), this.#s(), this.addEventListener("keydown", this.#b), this.addEffect(() => this.#c()), this.addEffect(() => {
|
|
2231
3206
|
this.#e.setFormValue(this.#t.value.value);
|
|
2232
3207
|
}), this.addEffect(() => {
|
|
2233
3208
|
this.setAttribute("aria-label", this.#t.title.value);
|
|
2234
|
-
}), this.addEffect(
|
|
3209
|
+
}), this.addEffect(j(this, this.#n, this.#e, { manageTabindex: !0 })), this.#r.value = this.hasAttribute("required"), this.addEffect(() => {
|
|
2235
3210
|
let e = this.#t.value.value;
|
|
2236
3211
|
this.#r.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select a date.", this) : this.#e.setValidity({});
|
|
2237
3212
|
});
|
|
@@ -2313,7 +3288,7 @@ var be = class extends x(_) {
|
|
|
2313
3288
|
n ? this.#v(n) : r === void 0 ? i !== void 0 && this.#t.selectYear(Number(i)) : this.#t.selectMonth(Number(r));
|
|
2314
3289
|
}
|
|
2315
3290
|
#v(e) {
|
|
2316
|
-
if (this.range) if (this.#o === "idle")
|
|
3291
|
+
if (this.range) if (this.#o === "idle") b(() => {
|
|
2317
3292
|
this.#t.selectDate(e), this.#t.setRange(e, null);
|
|
2318
3293
|
}), this.setAttribute("value", e), this.#o = "selecting";
|
|
2319
3294
|
else if (this.#o === "selecting") {
|
|
@@ -2327,7 +3302,7 @@ var be = class extends x(_) {
|
|
|
2327
3302
|
end: this.#t.rangeEnd.value
|
|
2328
3303
|
}
|
|
2329
3304
|
}));
|
|
2330
|
-
} else
|
|
3305
|
+
} else b(() => {
|
|
2331
3306
|
this.#t.value.value = null, this.#t.setRange(null, null);
|
|
2332
3307
|
}), this.removeAttribute("value"), this.#o = "idle";
|
|
2333
3308
|
else this.#t.selectDate(e), this.setAttribute("value", e), this.dispatchEvent(new CustomEvent("ui-change", {
|
|
@@ -2383,10 +3358,10 @@ var be = class extends x(_) {
|
|
|
2383
3358
|
}
|
|
2384
3359
|
r && (e.preventDefault(), n = Math.max(0, Math.min(41, n)), this.#a.value = n, n < 0 && this.#t.prevMonth(), n > 41 && this.#t.nextMonth());
|
|
2385
3360
|
};
|
|
2386
|
-
},
|
|
2387
|
-
open =
|
|
2388
|
-
value =
|
|
2389
|
-
label =
|
|
3361
|
+
}, Ge = class {
|
|
3362
|
+
open = _(!1);
|
|
3363
|
+
value = _(null);
|
|
3364
|
+
label = _("");
|
|
2390
3365
|
toggle() {
|
|
2391
3366
|
this.open.value = !this.open.value;
|
|
2392
3367
|
}
|
|
@@ -2397,16 +3372,16 @@ var be = class extends x(_) {
|
|
|
2397
3372
|
this.open.value = !1;
|
|
2398
3373
|
}
|
|
2399
3374
|
select(e, t) {
|
|
2400
|
-
|
|
3375
|
+
b(() => {
|
|
2401
3376
|
this.value.value = e, this.label.value = t, this.open.value = !1;
|
|
2402
3377
|
});
|
|
2403
3378
|
}
|
|
2404
3379
|
reset() {
|
|
2405
|
-
|
|
3380
|
+
b(() => {
|
|
2406
3381
|
this.open.value = !1, this.value.value = null, this.label.value = "";
|
|
2407
3382
|
});
|
|
2408
3383
|
}
|
|
2409
|
-
},
|
|
3384
|
+
}, Ke = class extends P(k) {
|
|
2410
3385
|
static observedAttributes = [
|
|
2411
3386
|
"value",
|
|
2412
3387
|
"disabled",
|
|
@@ -2417,13 +3392,13 @@ var be = class extends x(_) {
|
|
|
2417
3392
|
"required"
|
|
2418
3393
|
];
|
|
2419
3394
|
#e;
|
|
2420
|
-
#t = new
|
|
2421
|
-
#n =
|
|
2422
|
-
#r =
|
|
3395
|
+
#t = new Ge();
|
|
3396
|
+
#n = _(!1);
|
|
3397
|
+
#r = _(!1);
|
|
2423
3398
|
#i;
|
|
2424
|
-
#a =
|
|
2425
|
-
#o =
|
|
2426
|
-
#s =
|
|
3399
|
+
#a = _([]);
|
|
3400
|
+
#o = _(null);
|
|
3401
|
+
#s = _("");
|
|
2427
3402
|
#c = !1;
|
|
2428
3403
|
#l = null;
|
|
2429
3404
|
#u = null;
|
|
@@ -2484,10 +3459,10 @@ var be = class extends x(_) {
|
|
|
2484
3459
|
this.#s.value = e, e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder");
|
|
2485
3460
|
}
|
|
2486
3461
|
#m(e) {
|
|
2487
|
-
return
|
|
3462
|
+
return B(e, "ui-select");
|
|
2488
3463
|
}
|
|
2489
3464
|
async #h(e) {
|
|
2490
|
-
this.#l = await
|
|
3465
|
+
this.#l = await V(e, this.#l, this.#a, "ui-select");
|
|
2491
3466
|
}
|
|
2492
3467
|
#g() {
|
|
2493
3468
|
let e = document.createElement("ui-button");
|
|
@@ -2538,51 +3513,51 @@ var be = class extends x(_) {
|
|
|
2538
3513
|
}
|
|
2539
3514
|
}
|
|
2540
3515
|
setup() {
|
|
2541
|
-
if (super.setup(), this.#i = new
|
|
3516
|
+
if (super.setup(), this.#i = new q(this), this.#c = this.hasAttribute("options") || this.hasAttribute("src"), this.#c) {
|
|
2542
3517
|
let e = this.getAttribute("options");
|
|
2543
3518
|
e && (this.#a.value = this.#m(e)), this.#o.value = this.getAttribute("src"), this.#s.value = this.getAttribute("placeholder") ?? "", this.#g();
|
|
2544
3519
|
}
|
|
2545
|
-
let
|
|
2546
|
-
this.#d =
|
|
2547
|
-
let
|
|
2548
|
-
this.#u =
|
|
3520
|
+
let e = this.querySelector(":scope > ui-button");
|
|
3521
|
+
this.#d = e;
|
|
3522
|
+
let t = this.querySelector(":scope > ui-listbox[popover]");
|
|
3523
|
+
this.#u = t, t?.setAttribute("popover", "manual"), e && t && this.#i.wirePopover(e, t), e?.setAttribute("aria-haspopup", "listbox"), e && t && (t.id ||= A("lb"), e.setAttribute("aria-controls", t.id)), this.#c && (this.addEffect(() => {
|
|
2549
3524
|
let e = this.#a.value;
|
|
2550
3525
|
this.#_(e);
|
|
2551
3526
|
}), this.addEffect(() => {
|
|
2552
3527
|
let e = this.#o.value;
|
|
2553
3528
|
e && this.#h(e);
|
|
2554
3529
|
}), this.addEffect(() => {
|
|
2555
|
-
let
|
|
2556
|
-
r && !n && (r.textContent =
|
|
3530
|
+
let t = this.#s.value, n = this.#t.label.value, r = e?.querySelector("[slot=\"label\"]");
|
|
3531
|
+
r && !n && (r.textContent = t || "\xA0");
|
|
2557
3532
|
})), this.deferChildren(() => {
|
|
2558
|
-
let
|
|
2559
|
-
if (
|
|
2560
|
-
let
|
|
2561
|
-
this.#t.value.value =
|
|
3533
|
+
let n = this.getAttribute("value");
|
|
3534
|
+
if (n) {
|
|
3535
|
+
let e = this.querySelector(`ui-option[value="${CSS.escape(n)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? n;
|
|
3536
|
+
this.#t.value.value = n, this.#t.label.value = t, this.#f = n, this.#p = t;
|
|
2562
3537
|
}
|
|
2563
3538
|
this.addEffect(() => {
|
|
2564
|
-
let
|
|
2565
|
-
n && (n.textContent =
|
|
3539
|
+
let t = this.#t.label.value, n = e?.querySelector("[slot=\"label\"]");
|
|
3540
|
+
n && (n.textContent = t || (this.#c ? this.#s.value || "\xA0" : n.textContent ?? ""));
|
|
2566
3541
|
}), this.addEffect(() => {
|
|
2567
|
-
let e = this.#t.value.value,
|
|
2568
|
-
for (let
|
|
2569
|
-
let
|
|
2570
|
-
|
|
3542
|
+
let e = this.#t.value.value, n = t?.querySelectorAll("ui-option") ?? [];
|
|
3543
|
+
for (let t of n) {
|
|
3544
|
+
let n = t.getAttribute("value") === e;
|
|
3545
|
+
t.setAttribute("aria-selected", String(n));
|
|
2571
3546
|
}
|
|
2572
3547
|
});
|
|
2573
|
-
}), this.addEffect(
|
|
2574
|
-
let
|
|
2575
|
-
|
|
3548
|
+
}), this.addEffect(j(this, this.#n, this.#e)), this.addEffect(() => {
|
|
3549
|
+
let t = this.#n.value;
|
|
3550
|
+
e && e.toggleAttribute("disabled", t), t && this.#t.open.peek() && this.#t.hide();
|
|
2576
3551
|
}), this.#r.value = this.hasAttribute("required"), this.addEffect(() => {
|
|
2577
3552
|
let e = this.#t.value.value;
|
|
2578
3553
|
this.#r.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select an option.", this) : this.#e.setValidity({});
|
|
2579
3554
|
}), this.addEffect(() => {
|
|
2580
|
-
let
|
|
2581
|
-
this.#i.syncPopover(
|
|
3555
|
+
let t = this.#t.open.value;
|
|
3556
|
+
this.#i.syncPopover(t), e?.setAttribute("aria-expanded", String(t));
|
|
2582
3557
|
}), this.addEffect(() => {
|
|
2583
3558
|
let e = this.#t.value.value;
|
|
2584
3559
|
this.#e.setFormValue(e ?? ""), e == null ? this.removeAttribute("value") : this.setAttribute("value", e);
|
|
2585
|
-
}),
|
|
3560
|
+
}), e?.addEventListener("ui-press", this.#v), this.addEventListener("ui-change", this.#y), this.addEventListener("ui-select", this.#b), this.addEventListener("ui-dismiss", this.#x), e?.addEventListener("keydown", this.#S);
|
|
2586
3561
|
}
|
|
2587
3562
|
#v = () => {
|
|
2588
3563
|
this.#n.value || this.#t.toggle();
|
|
@@ -2654,7 +3629,7 @@ var be = class extends x(_) {
|
|
|
2654
3629
|
onFormDisabled(e) {
|
|
2655
3630
|
this.#n.value = e;
|
|
2656
3631
|
}
|
|
2657
|
-
},
|
|
3632
|
+
}, qe = class extends P(k) {
|
|
2658
3633
|
static observedAttributes = [
|
|
2659
3634
|
"value",
|
|
2660
3635
|
"disabled",
|
|
@@ -2665,16 +3640,16 @@ var be = class extends x(_) {
|
|
|
2665
3640
|
"required"
|
|
2666
3641
|
];
|
|
2667
3642
|
#e;
|
|
2668
|
-
#t = new
|
|
2669
|
-
#n =
|
|
2670
|
-
#r =
|
|
2671
|
-
#i =
|
|
3643
|
+
#t = new z();
|
|
3644
|
+
#n = _(!1);
|
|
3645
|
+
#r = _(!1);
|
|
3646
|
+
#i = _(!1);
|
|
2672
3647
|
#a;
|
|
2673
|
-
#o =
|
|
3648
|
+
#o = A("listbox");
|
|
2674
3649
|
#s = null;
|
|
2675
|
-
#c =
|
|
2676
|
-
#l =
|
|
2677
|
-
#u =
|
|
3650
|
+
#c = _([]);
|
|
3651
|
+
#l = _(null);
|
|
3652
|
+
#u = _("");
|
|
2678
3653
|
#d = !1;
|
|
2679
3654
|
#f = null;
|
|
2680
3655
|
#p = null;
|
|
@@ -2691,7 +3666,7 @@ var be = class extends x(_) {
|
|
|
2691
3666
|
}
|
|
2692
3667
|
set value(e) {
|
|
2693
3668
|
if (e === null) {
|
|
2694
|
-
|
|
3669
|
+
b(() => {
|
|
2695
3670
|
this.#t.clearSelection(), this.#t.query.value = "", this.#t.activeIndex.value = -1, this.#n.value = !1;
|
|
2696
3671
|
});
|
|
2697
3672
|
return;
|
|
@@ -2735,10 +3710,10 @@ var be = class extends x(_) {
|
|
|
2735
3710
|
this.#u.value = e, e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder");
|
|
2736
3711
|
}
|
|
2737
3712
|
#g(e) {
|
|
2738
|
-
return
|
|
3713
|
+
return B(e, "ui-combobox");
|
|
2739
3714
|
}
|
|
2740
3715
|
async #_(e) {
|
|
2741
|
-
this.#f = await
|
|
3716
|
+
this.#f = await V(e, this.#f, this.#c, "ui-combobox");
|
|
2742
3717
|
}
|
|
2743
3718
|
#v() {
|
|
2744
3719
|
let e = document.createElement("ui-input"), t = this.#u.value;
|
|
@@ -2759,95 +3734,95 @@ var be = class extends x(_) {
|
|
|
2759
3734
|
this.#t.data.value = e;
|
|
2760
3735
|
}
|
|
2761
3736
|
}
|
|
2762
|
-
attributeChangedCallback(e, t,
|
|
2763
|
-
if (t !==
|
|
3737
|
+
attributeChangedCallback(e, t, n) {
|
|
3738
|
+
if (t !== n) {
|
|
2764
3739
|
switch (e) {
|
|
2765
3740
|
case "value":
|
|
2766
|
-
if (
|
|
2767
|
-
let e = this.querySelector(`ui-option[value="${CSS.escape(
|
|
2768
|
-
this.#t.select(
|
|
2769
|
-
} else
|
|
3741
|
+
if (n !== null) {
|
|
3742
|
+
let e = this.querySelector(`ui-option[value="${CSS.escape(n)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? n;
|
|
3743
|
+
this.#t.select(n), this.#t.query.value = t, this.#s && "value" in this.#s && (this.#s.value = t);
|
|
3744
|
+
} else b(() => {
|
|
2770
3745
|
this.#t.clearSelection(), this.#t.query.value = "";
|
|
2771
3746
|
}), this.#s && "value" in this.#s && (this.#s.value = "");
|
|
2772
3747
|
break;
|
|
2773
3748
|
case "disabled":
|
|
2774
|
-
this.#r.value =
|
|
3749
|
+
this.#r.value = n !== null;
|
|
2775
3750
|
break;
|
|
2776
3751
|
case "required":
|
|
2777
|
-
this.#i.value =
|
|
3752
|
+
this.#i.value = n !== null;
|
|
2778
3753
|
break;
|
|
2779
3754
|
case "options":
|
|
2780
|
-
|
|
3755
|
+
n ? this.#c.value = this.#g(n) : this.#c.value = [];
|
|
2781
3756
|
break;
|
|
2782
3757
|
case "src":
|
|
2783
|
-
this.#l.value =
|
|
3758
|
+
this.#l.value = n;
|
|
2784
3759
|
break;
|
|
2785
3760
|
case "placeholder":
|
|
2786
|
-
this.#u.value =
|
|
3761
|
+
this.#u.value = n ?? "";
|
|
2787
3762
|
break;
|
|
2788
3763
|
}
|
|
2789
|
-
super.attributeChangedCallback?.(e, t,
|
|
3764
|
+
super.attributeChangedCallback?.(e, t, n);
|
|
2790
3765
|
}
|
|
2791
3766
|
}
|
|
2792
3767
|
setup() {
|
|
2793
|
-
if (super.setup(), this.#a = new
|
|
3768
|
+
if (super.setup(), this.#a = new q(this), this.#d = this.hasAttribute("options") || this.hasAttribute("src"), this.#d) {
|
|
2794
3769
|
let e = this.getAttribute("options");
|
|
2795
3770
|
e && (this.#c.value = this.#g(e)), this.#l.value = this.getAttribute("src"), this.#u.value = this.getAttribute("placeholder") ?? "", this.#v();
|
|
2796
3771
|
}
|
|
2797
|
-
let
|
|
2798
|
-
this.#s =
|
|
2799
|
-
let
|
|
2800
|
-
this.#p =
|
|
3772
|
+
let e = this.querySelector(":scope > ui-input");
|
|
3773
|
+
this.#s = e;
|
|
3774
|
+
let t = this.querySelector(":scope > ui-listbox[popover]");
|
|
3775
|
+
this.#p = t, t?.setAttribute("popover", "manual"), t?.setAttribute("virtual-focus", ""), e && t && (this.#a.wirePopover(e, t), t.id ||= this.#o), e?.setAttribute("role", "combobox"), e?.setAttribute("aria-autocomplete", "list"), e?.setAttribute("aria-controls", t?.id ?? ""), e?.setAttribute("aria-expanded", "false"), this.#d && (this.addEffect(() => {
|
|
2801
3776
|
let e = this.#c.value;
|
|
2802
3777
|
this.#y(e);
|
|
2803
3778
|
}), this.addEffect(() => {
|
|
2804
3779
|
let e = this.#l.value;
|
|
2805
3780
|
e && this.#_(e);
|
|
2806
3781
|
}), this.addEffect(() => {
|
|
2807
|
-
let
|
|
2808
|
-
|
|
3782
|
+
let t = this.#u.value;
|
|
3783
|
+
e && (t ? e.setAttribute("placeholder", t) : e.removeAttribute("placeholder"));
|
|
2809
3784
|
})), this.deferChildren(() => {
|
|
2810
3785
|
if (!this.#d) {
|
|
2811
|
-
let e =
|
|
3786
|
+
let e = t?.querySelectorAll("ui-option") ?? [];
|
|
2812
3787
|
this.#t.data.value = [...e].map((e) => ({
|
|
2813
3788
|
value: e.getAttribute("value") ?? "",
|
|
2814
3789
|
label: e.getAttribute("label") ?? e.textContent?.trim() ?? ""
|
|
2815
3790
|
}));
|
|
2816
3791
|
}
|
|
2817
|
-
let
|
|
2818
|
-
if (
|
|
2819
|
-
let e = this.querySelector(`ui-option[value="${CSS.escape(
|
|
2820
|
-
this.#t.value.value =
|
|
3792
|
+
let n = this.getAttribute("value");
|
|
3793
|
+
if (n) {
|
|
3794
|
+
let e = this.querySelector(`ui-option[value="${CSS.escape(n)}"]`), t = e?.getAttribute("label") ?? e?.textContent?.trim() ?? n;
|
|
3795
|
+
this.#t.value.value = n, this.#t.query.value = t, this.#m = n, this.#h = t;
|
|
2821
3796
|
}
|
|
2822
3797
|
this.addEffect(() => {
|
|
2823
|
-
let e = this.#t.view.value,
|
|
2824
|
-
for (let e of r) e.toggleAttribute("hidden", !
|
|
3798
|
+
let e = this.#t.view.value, n = new Set(e.map((e) => e.value)), r = t?.querySelectorAll("ui-option") ?? [];
|
|
3799
|
+
for (let e of r) e.toggleAttribute("hidden", !n.has(e.getAttribute("value") ?? ""));
|
|
2825
3800
|
}), this.addEffect(() => {
|
|
2826
3801
|
this.#t.view.value;
|
|
2827
|
-
let
|
|
2828
|
-
for (let e = 0; e <
|
|
2829
|
-
let
|
|
2830
|
-
|
|
3802
|
+
let n = this.#t.activeIndex.value, r = [...t?.querySelectorAll("ui-option:not([hidden]):not([disabled])") ?? []];
|
|
3803
|
+
for (let e = 0; e < r.length; e++) r[e].toggleAttribute("active", e === n);
|
|
3804
|
+
let i = r[n];
|
|
3805
|
+
i ? (i.scrollIntoView({ block: "nearest" }), i.id ||= A("opt"), e?.setAttribute("aria-activedescendant", i.id)) : e?.removeAttribute("aria-activedescendant");
|
|
2831
3806
|
}), this.addEffect(() => {
|
|
2832
|
-
let e = this.#t.value.value,
|
|
2833
|
-
for (let
|
|
2834
|
-
let
|
|
2835
|
-
|
|
3807
|
+
let e = this.#t.value.value, n = t?.querySelectorAll("ui-option") ?? [];
|
|
3808
|
+
for (let t of n) {
|
|
3809
|
+
let n = t.getAttribute("value") === e;
|
|
3810
|
+
t.setAttribute("aria-selected", String(n));
|
|
2836
3811
|
}
|
|
2837
3812
|
});
|
|
2838
|
-
}), this.addEffect(
|
|
2839
|
-
let
|
|
2840
|
-
|
|
3813
|
+
}), this.addEffect(j(this, this.#r, this.#e)), this.addEffect(() => {
|
|
3814
|
+
let t = this.#r.value;
|
|
3815
|
+
e && e.toggleAttribute("disabled", t), t && this.#n.peek() && (this.#n.value = !1);
|
|
2841
3816
|
}), this.#i.value = this.hasAttribute("required"), this.addEffect(() => {
|
|
2842
3817
|
let e = this.#t.value.value;
|
|
2843
3818
|
this.#i.value && (e === null || e === "") ? this.#e.setValidity({ valueMissing: !0 }, "Please select an option.", this) : this.#e.setValidity({});
|
|
2844
3819
|
}), this.addEffect(() => {
|
|
2845
|
-
let
|
|
2846
|
-
this.#a.syncPopover(
|
|
3820
|
+
let t = this.#n.value;
|
|
3821
|
+
this.#a.syncPopover(t), e?.setAttribute("aria-expanded", String(t));
|
|
2847
3822
|
}), this.addEffect(() => {
|
|
2848
3823
|
let e = this.#t.value.value;
|
|
2849
3824
|
this.#e.setFormValue(e ?? ""), e == null ? this.removeAttribute("value") : this.setAttribute("value", e);
|
|
2850
|
-
}),
|
|
3825
|
+
}), e?.addEventListener("focus", this.#b), this.addEventListener("ui-input", this.#x), this.addEventListener("ui-change", this.#S), this.addEventListener("ui-select", this.#C), this.addEventListener("ui-dismiss", this.#w), e?.addEventListener("keydown", this.#T);
|
|
2851
3826
|
}
|
|
2852
3827
|
#b = () => {
|
|
2853
3828
|
!this.#r.value && !this.#n.value && (this.#n.value = !0);
|
|
@@ -2860,11 +3835,11 @@ var be = class extends x(_) {
|
|
|
2860
3835
|
};
|
|
2861
3836
|
#C = (e) => {
|
|
2862
3837
|
let t = e.detail;
|
|
2863
|
-
|
|
3838
|
+
b(() => {
|
|
2864
3839
|
this.#t.select(t.value), this.#t.query.value = t.label, this.#t.activeIndex.value = -1, this.#n.value = !1;
|
|
2865
3840
|
});
|
|
2866
|
-
let
|
|
2867
|
-
|
|
3841
|
+
let n = this.#s;
|
|
3842
|
+
n && "value" in n && (n.value = t.label), this.dispatchEvent(new CustomEvent("ui-change", {
|
|
2868
3843
|
bubbles: !0,
|
|
2869
3844
|
composed: !0,
|
|
2870
3845
|
detail: t
|
|
@@ -2909,7 +3884,7 @@ var be = class extends x(_) {
|
|
|
2909
3884
|
this.#s?.removeEventListener("focus", this.#b), this.#s?.removeEventListener("keydown", this.#T), this.removeEventListener("ui-input", this.#x), this.removeEventListener("ui-change", this.#S), this.removeEventListener("ui-select", this.#C), this.removeEventListener("ui-dismiss", this.#w), this.#s = null, this.#p = null, this.#f?.abort(), this.#f = null, this.#a.destroy(), super.teardown();
|
|
2910
3885
|
}
|
|
2911
3886
|
onFormReset() {
|
|
2912
|
-
|
|
3887
|
+
b(() => {
|
|
2913
3888
|
this.#m === null ? (this.#t.clearSelection(), this.#t.query.value = "") : (this.#t.select(this.#m), this.#t.query.value = this.#h), this.#t.activeIndex.value = -1, this.#n.value = !1;
|
|
2914
3889
|
});
|
|
2915
3890
|
let e = this.querySelector(":scope > ui-input");
|
|
@@ -2921,11 +3896,11 @@ var be = class extends x(_) {
|
|
|
2921
3896
|
onFormDisabled(e) {
|
|
2922
3897
|
this.#r.value = e;
|
|
2923
3898
|
}
|
|
2924
|
-
},
|
|
3899
|
+
}, Je = class extends k {
|
|
2925
3900
|
static observedAttributes = ["disabled", "required"];
|
|
2926
|
-
#e =
|
|
2927
|
-
#t =
|
|
2928
|
-
#n =
|
|
3901
|
+
#e = A("field-label");
|
|
3902
|
+
#t = A("field-desc");
|
|
3903
|
+
#n = A("field-err");
|
|
2929
3904
|
#r = null;
|
|
2930
3905
|
setup() {
|
|
2931
3906
|
super.setup(), this.deferChildren(() => {
|
|
@@ -2985,7 +3960,7 @@ var be = class extends x(_) {
|
|
|
2985
3960
|
let t = this.querySelector("[slot=\"description\"]"), n = this.querySelector("[slot=\"error\"]"), r = [];
|
|
2986
3961
|
t && r.push(t.id), e && n && r.push(n.id), r.length ? this.#r.setAttribute("aria-describedby", r.join(" ")) : this.#r.removeAttribute("aria-describedby");
|
|
2987
3962
|
}
|
|
2988
|
-
},
|
|
3963
|
+
}, Ye = class extends P(k) {
|
|
2989
3964
|
static observedAttributes = [
|
|
2990
3965
|
"value",
|
|
2991
3966
|
"placeholder",
|
|
@@ -2998,10 +3973,10 @@ var be = class extends x(_) {
|
|
|
2998
3973
|
"pattern"
|
|
2999
3974
|
];
|
|
3000
3975
|
#e;
|
|
3001
|
-
#t =
|
|
3002
|
-
#n =
|
|
3003
|
-
#r =
|
|
3004
|
-
#i =
|
|
3976
|
+
#t = _(!1);
|
|
3977
|
+
#n = _(!1);
|
|
3978
|
+
#r = _(NaN);
|
|
3979
|
+
#i = _("");
|
|
3005
3980
|
#a = "";
|
|
3006
3981
|
#o = 0;
|
|
3007
3982
|
#s = null;
|
|
@@ -3075,7 +4050,7 @@ var be = class extends x(_) {
|
|
|
3075
4050
|
setup() {
|
|
3076
4051
|
super.setup(), this.setAttribute("aria-multiline", "true"), this.hasAttribute("contenteditable") || this.setAttribute("contenteditable", "plaintext-only"), this.#n.value = this.hasAttribute("required");
|
|
3077
4052
|
let e = this.getAttribute("maxlength");
|
|
3078
|
-
this.#r.value = e === null ? NaN : parseInt(e, 10), this.#s = this.getAttribute("pattern"), this.#a = this.getAttribute("value") ?? this.textContent ?? "", this.#i.value = this.textContent ?? "", this.#c(), this.#l(), this.addEffect(
|
|
4053
|
+
this.#r.value = e === null ? NaN : parseInt(e, 10), this.#s = this.getAttribute("pattern"), this.#a = this.getAttribute("value") ?? this.textContent ?? "", this.#i.value = this.textContent ?? "", this.#c(), this.#l(), this.addEffect(j(this, this.#t, this.#e, { manageTabindex: !0 })), this.addEffect(() => {
|
|
3079
4054
|
let e = this.#i.value, t = this.#r.value;
|
|
3080
4055
|
this.#n.value && e === "" ? this.#e.setValidity({ valueMissing: !0 }, "Please fill out this field.", this) : !isNaN(t) && e.length > t ? this.#e.setValidity({ tooLong: !0 }, `Please shorten this text to ${t} characters or less.`, this) : this.#s !== null && e !== "" && !RegExp(`^(?:${this.#s})$`).test(e) ? this.#e.setValidity({ patternMismatch: !0 }, "Please match the requested format.", this) : this.#e.setValidity({});
|
|
3081
4056
|
}), this.addEventListener("input", this.#u), this.addEventListener("blur", this.#d);
|
|
@@ -3115,7 +4090,7 @@ var be = class extends x(_) {
|
|
|
3115
4090
|
detail: { value: this.textContent ?? "" }
|
|
3116
4091
|
}));
|
|
3117
4092
|
};
|
|
3118
|
-
},
|
|
4093
|
+
}, Xe = class extends P(k) {
|
|
3119
4094
|
static observedAttributes = [
|
|
3120
4095
|
"value",
|
|
3121
4096
|
"min",
|
|
@@ -3126,13 +4101,13 @@ var be = class extends x(_) {
|
|
|
3126
4101
|
"required"
|
|
3127
4102
|
];
|
|
3128
4103
|
#e;
|
|
3129
|
-
#t =
|
|
3130
|
-
#n =
|
|
3131
|
-
#r =
|
|
4104
|
+
#t = _(!1);
|
|
4105
|
+
#n = _(!1);
|
|
4106
|
+
#r = _(50);
|
|
3132
4107
|
#i = 50;
|
|
3133
|
-
#a =
|
|
3134
|
-
#o =
|
|
3135
|
-
#s =
|
|
4108
|
+
#a = _(0);
|
|
4109
|
+
#o = _(100);
|
|
4110
|
+
#s = _(1);
|
|
3136
4111
|
#c = null;
|
|
3137
4112
|
#l = !1;
|
|
3138
4113
|
constructor() {
|
|
@@ -3206,7 +4181,7 @@ var be = class extends x(_) {
|
|
|
3206
4181
|
}
|
|
3207
4182
|
}
|
|
3208
4183
|
setup() {
|
|
3209
|
-
super.setup(), this.#i = this.#r.value, this.#c = document.createElement("div"), this.#c.classList.add("ui-range-thumb"), this.appendChild(this.#c), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(
|
|
4184
|
+
super.setup(), this.#i = this.#r.value, this.#c = document.createElement("div"), this.#c.classList.add("ui-range-thumb"), this.appendChild(this.#c), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEffect(j(this, this.#t, this.#e, { manageTabindex: !0 })), this.#n.value = this.hasAttribute("required"), this.addEffect(() => {
|
|
3210
4185
|
let e = this.#r.value, t = this.#d();
|
|
3211
4186
|
this.style.setProperty("--_progress", String(t)), this.setAttribute("aria-valuenow", String(e)), this.setAttribute("aria-valuemin", String(this.#a.value)), this.setAttribute("aria-valuemax", String(this.#o.value)), this.#e.setFormValue(String(e));
|
|
3212
4187
|
}), this.addEventListener("pointerdown", this.#p), this.addEventListener("keydown", this.#_);
|
|
@@ -3299,7 +4274,7 @@ var be = class extends x(_) {
|
|
|
3299
4274
|
detail: { value: this.#r.value }
|
|
3300
4275
|
}));
|
|
3301
4276
|
}
|
|
3302
|
-
},
|
|
4277
|
+
}, Ze = class extends P(k) {
|
|
3303
4278
|
static observedAttributes = [
|
|
3304
4279
|
"value",
|
|
3305
4280
|
"length",
|
|
@@ -3310,7 +4285,7 @@ var be = class extends x(_) {
|
|
|
3310
4285
|
"required"
|
|
3311
4286
|
];
|
|
3312
4287
|
#e;
|
|
3313
|
-
#t =
|
|
4288
|
+
#t = _(!1);
|
|
3314
4289
|
#n;
|
|
3315
4290
|
#r = [];
|
|
3316
4291
|
#i = [];
|
|
@@ -3319,7 +4294,7 @@ var be = class extends x(_) {
|
|
|
3319
4294
|
#s = null;
|
|
3320
4295
|
#c = "";
|
|
3321
4296
|
constructor() {
|
|
3322
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "group", this.#n =
|
|
4297
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "group", this.#n = M(this, "disabled", { type: "boolean" });
|
|
3323
4298
|
}
|
|
3324
4299
|
get value() {
|
|
3325
4300
|
return this.#i.join("");
|
|
@@ -3347,7 +4322,7 @@ var be = class extends x(_) {
|
|
|
3347
4322
|
}
|
|
3348
4323
|
attributeChangedCallback(e, t, n) {
|
|
3349
4324
|
if (t !== n) {
|
|
3350
|
-
if (
|
|
4325
|
+
if (N({ disabled: this.#n }, e, n)) {
|
|
3351
4326
|
super.attributeChangedCallback(e, t, n);
|
|
3352
4327
|
return;
|
|
3353
4328
|
}
|
|
@@ -3386,7 +4361,7 @@ var be = class extends x(_) {
|
|
|
3386
4361
|
if (t) try {
|
|
3387
4362
|
this.#o = new RegExp(t);
|
|
3388
4363
|
} catch {}
|
|
3389
|
-
this.#s = this.getAttribute("mask"), this.#l(), this.addEffect(
|
|
4364
|
+
this.#s = this.getAttribute("mask"), this.#l(), this.addEffect(j(this, this.#n.signal, this.#e, { manageTabindex: !1 })), this.addEffect(() => {
|
|
3390
4365
|
let e = this.#n.value;
|
|
3391
4366
|
for (let t of this.#r) t.setAttribute("contenteditable", e ? "false" : "plaintext-only");
|
|
3392
4367
|
}), this.#t.value = this.hasAttribute("required");
|
|
@@ -3484,7 +4459,7 @@ var be = class extends x(_) {
|
|
|
3484
4459
|
detail: { value: this.value }
|
|
3485
4460
|
}));
|
|
3486
4461
|
}
|
|
3487
|
-
},
|
|
4462
|
+
}, Qe = class extends k {
|
|
3488
4463
|
static observedAttributes = [
|
|
3489
4464
|
"src",
|
|
3490
4465
|
"name",
|
|
@@ -3536,7 +4511,7 @@ var be = class extends x(_) {
|
|
|
3536
4511
|
let e = this.getAttribute("name");
|
|
3537
4512
|
e ? this.textContent = this.#r(e) : this.textContent = "?";
|
|
3538
4513
|
};
|
|
3539
|
-
},
|
|
4514
|
+
}, $e = class extends k {
|
|
3540
4515
|
static observedAttributes = ["max"];
|
|
3541
4516
|
#e;
|
|
3542
4517
|
#t = "";
|
|
@@ -3557,7 +4532,7 @@ var be = class extends x(_) {
|
|
|
3557
4532
|
let n = parseInt(this.#t, 10);
|
|
3558
4533
|
isNaN(n) || (n > t ? this.textContent = `${t}+` : this.textContent = this.#t);
|
|
3559
4534
|
}
|
|
3560
|
-
},
|
|
4535
|
+
}, et = class extends k {}, tt = class extends k {
|
|
3561
4536
|
#e;
|
|
3562
4537
|
constructor() {
|
|
3563
4538
|
super(), this.#e = this.attachInternals(), this.#e.role = "navigation";
|
|
@@ -3567,7 +4542,7 @@ var be = class extends x(_) {
|
|
|
3567
4542
|
let e = this.getAttribute("aria-label") ?? "Breadcrumb";
|
|
3568
4543
|
this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e);
|
|
3569
4544
|
}
|
|
3570
|
-
},
|
|
4545
|
+
}, nt = class extends k {
|
|
3571
4546
|
static observedAttributes = ["href", "current"];
|
|
3572
4547
|
#e;
|
|
3573
4548
|
constructor() {
|
|
@@ -3593,7 +4568,7 @@ var be = class extends x(_) {
|
|
|
3593
4568
|
#r = (e) => {
|
|
3594
4569
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#n());
|
|
3595
4570
|
};
|
|
3596
|
-
},
|
|
4571
|
+
}, rt = class extends k {
|
|
3597
4572
|
static observedAttributes = [
|
|
3598
4573
|
"total",
|
|
3599
4574
|
"value",
|
|
@@ -3602,11 +4577,11 @@ var be = class extends x(_) {
|
|
|
3602
4577
|
"disabled"
|
|
3603
4578
|
];
|
|
3604
4579
|
#e;
|
|
3605
|
-
#t =
|
|
3606
|
-
#n =
|
|
3607
|
-
#r =
|
|
3608
|
-
#i =
|
|
3609
|
-
#a =
|
|
4580
|
+
#t = _(1);
|
|
4581
|
+
#n = _(1);
|
|
4582
|
+
#r = _(1);
|
|
4583
|
+
#i = _(1);
|
|
4584
|
+
#a = _(!1);
|
|
3610
4585
|
constructor() {
|
|
3611
4586
|
super(), this.#e = this.attachInternals(), this.#e.role = "navigation";
|
|
3612
4587
|
}
|
|
@@ -3665,10 +4640,10 @@ var be = class extends x(_) {
|
|
|
3665
4640
|
setup() {
|
|
3666
4641
|
super.setup();
|
|
3667
4642
|
let e = this.getAttribute("aria-label") ?? "Pagination";
|
|
3668
|
-
this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(
|
|
4643
|
+
this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(j(this, this.#a, this.#e)), this.addEffect(() => {
|
|
3669
4644
|
this.#l();
|
|
3670
4645
|
}), this.addEffect(() => {
|
|
3671
|
-
let e = this.#a.value, t =
|
|
4646
|
+
let e = this.#a.value, t = x(() => this.#n.value), n = x(() => this.#t.value);
|
|
3672
4647
|
for (let r of this.querySelectorAll("ui-button")) {
|
|
3673
4648
|
let i = r.getAttribute("aria-label") ?? "";
|
|
3674
4649
|
i === "Previous page" ? r.toggleAttribute("disabled", e || t <= 1) : i === "Next page" ? r.toggleAttribute("disabled", e || t >= n) : r.toggleAttribute("disabled", e);
|
|
@@ -3702,7 +4677,7 @@ var be = class extends x(_) {
|
|
|
3702
4677
|
return a.setAttribute("name", e), i.appendChild(a), i.addEventListener("ui-press", r), i;
|
|
3703
4678
|
}
|
|
3704
4679
|
#l() {
|
|
3705
|
-
let e = this.#t.value, t = this.#n.value, n =
|
|
4680
|
+
let e = this.#t.value, t = this.#n.value, n = x(() => this.#a.value), r = this.#o();
|
|
3706
4681
|
this.textContent = "", this.appendChild(this.#c("caret-left", "Previous page", n || t <= 1, () => this.#u(t - 1)));
|
|
3707
4682
|
for (let e of r) if (e === "ellipsis") {
|
|
3708
4683
|
let e = document.createElement("span");
|
|
@@ -3722,7 +4697,7 @@ var be = class extends x(_) {
|
|
|
3722
4697
|
detail: { value: t }
|
|
3723
4698
|
})));
|
|
3724
4699
|
}
|
|
3725
|
-
},
|
|
4700
|
+
}, it = class extends k {
|
|
3726
4701
|
#e;
|
|
3727
4702
|
get open() {
|
|
3728
4703
|
return this.#e.open;
|
|
@@ -3734,15 +4709,15 @@ var be = class extends x(_) {
|
|
|
3734
4709
|
this.#e.close();
|
|
3735
4710
|
}
|
|
3736
4711
|
setup() {
|
|
3737
|
-
super.setup(), this.#e = new
|
|
4712
|
+
super.setup(), this.#e = new Y(this, { contentTarget: () => document.createElement("ui-drawer-panel") });
|
|
3738
4713
|
}
|
|
3739
4714
|
teardown() {
|
|
3740
4715
|
this.#e.destroy(), super.teardown();
|
|
3741
4716
|
}
|
|
3742
|
-
},
|
|
4717
|
+
}, at = class extends k {
|
|
3743
4718
|
static observedAttributes = ["disabled"];
|
|
3744
4719
|
#e;
|
|
3745
|
-
#t =
|
|
4720
|
+
#t = _(!1);
|
|
3746
4721
|
#n;
|
|
3747
4722
|
constructor() {
|
|
3748
4723
|
super(), this.#e = this.attachInternals(), this.#e.role = "tree";
|
|
@@ -3757,17 +4732,17 @@ var be = class extends x(_) {
|
|
|
3757
4732
|
t !== n && (e === "disabled" && (this.#t.value = n !== null), super.attributeChangedCallback?.(e, t, n));
|
|
3758
4733
|
}
|
|
3759
4734
|
setup() {
|
|
3760
|
-
super.setup(), this.#n = new
|
|
4735
|
+
super.setup(), this.#n = new G(this, {
|
|
3761
4736
|
selector: ":scope ui-tree-item > [slot=\"label\"]",
|
|
3762
4737
|
orientation: "vertical"
|
|
3763
4738
|
});
|
|
3764
4739
|
let e = this.getAttribute("aria-label") ?? "Tree";
|
|
3765
|
-
this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(
|
|
4740
|
+
this.#e.ariaLabel = e, this.hasAttribute("aria-label") || this.setAttribute("aria-label", e), this.addEffect(j(this, this.#t, this.#e));
|
|
3766
4741
|
}
|
|
3767
4742
|
teardown() {
|
|
3768
4743
|
this.#n.destroy(), super.teardown();
|
|
3769
4744
|
}
|
|
3770
|
-
},
|
|
4745
|
+
}, ot = class extends k {
|
|
3771
4746
|
static observedAttributes = [
|
|
3772
4747
|
"expanded",
|
|
3773
4748
|
"selected",
|
|
@@ -3776,7 +4751,7 @@ var be = class extends x(_) {
|
|
|
3776
4751
|
#e;
|
|
3777
4752
|
#t = null;
|
|
3778
4753
|
#n = null;
|
|
3779
|
-
#r =
|
|
4754
|
+
#r = _(!1);
|
|
3780
4755
|
constructor() {
|
|
3781
4756
|
super(), this.#e = this.attachInternals(), this.#e.role = "treeitem";
|
|
3782
4757
|
}
|
|
@@ -3799,7 +4774,7 @@ var be = class extends x(_) {
|
|
|
3799
4774
|
this.#r.value = e, this.toggleAttribute("disabled", e);
|
|
3800
4775
|
}
|
|
3801
4776
|
setup() {
|
|
3802
|
-
super.setup(), this.addEffect(
|
|
4777
|
+
super.setup(), this.addEffect(j(this, this.#r, this.#e)), this.deferChildren(() => {
|
|
3803
4778
|
this.#i(), this.#a();
|
|
3804
4779
|
}), this.addEventListener("click", this.#o), this.addEventListener("keydown", this.#s);
|
|
3805
4780
|
}
|
|
@@ -3861,7 +4836,7 @@ var be = class extends x(_) {
|
|
|
3861
4836
|
break;
|
|
3862
4837
|
}
|
|
3863
4838
|
};
|
|
3864
|
-
},
|
|
4839
|
+
}, st = class extends k {
|
|
3865
4840
|
static observedAttributes = [
|
|
3866
4841
|
"direction",
|
|
3867
4842
|
"controls",
|
|
@@ -3879,9 +4854,9 @@ var be = class extends x(_) {
|
|
|
3879
4854
|
#n = null;
|
|
3880
4855
|
#r = null;
|
|
3881
4856
|
#i = null;
|
|
3882
|
-
#a =
|
|
3883
|
-
#o =
|
|
3884
|
-
#s =
|
|
4857
|
+
#a = _(0);
|
|
4858
|
+
#o = _(0);
|
|
4859
|
+
#s = _(!1);
|
|
3885
4860
|
#c = null;
|
|
3886
4861
|
#l = null;
|
|
3887
4862
|
#u = null;
|
|
@@ -3941,27 +4916,27 @@ var be = class extends x(_) {
|
|
|
3941
4916
|
}
|
|
3942
4917
|
setup() {
|
|
3943
4918
|
super.setup(), this.#l = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
3944
|
-
let
|
|
3945
|
-
|
|
3946
|
-
let
|
|
4919
|
+
let e = document.createElement("div");
|
|
4920
|
+
e.setAttribute("part", "track"), e.id = A("ss-track"), e.setAttribute("tabindex", "0");
|
|
4921
|
+
let t = [];
|
|
3947
4922
|
for (; this.firstChild;) {
|
|
3948
|
-
let
|
|
3949
|
-
|
|
4923
|
+
let n = this.firstChild;
|
|
4924
|
+
e.appendChild(n), n instanceof HTMLElement && n.tagName.toLowerCase() === "ui-slide" && t.push(n);
|
|
3950
4925
|
}
|
|
3951
|
-
this.appendChild(
|
|
3952
|
-
let
|
|
3953
|
-
|
|
4926
|
+
this.appendChild(e), this.#e = e, this.#d = t;
|
|
4927
|
+
let n = document.createElement("div");
|
|
4928
|
+
n.setAttribute("part", "controls");
|
|
4929
|
+
let r = document.createElement("button");
|
|
4930
|
+
r.setAttribute("part", "prev"), r.setAttribute("aria-label", "Previous slide"), r.setAttribute("type", "button"), r.innerHTML = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 256 256\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z\" fill=\"currentColor\"/></svg>";
|
|
3954
4931
|
let i = document.createElement("button");
|
|
3955
|
-
i.setAttribute("part", "
|
|
3956
|
-
let a = document.createElement("
|
|
3957
|
-
a.setAttribute("part", "
|
|
4932
|
+
i.setAttribute("part", "next"), i.setAttribute("aria-label", "Next slide"), i.setAttribute("type", "button"), i.innerHTML = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 256 256\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z\" fill=\"currentColor\"/></svg>", n.appendChild(r), n.appendChild(i), this.appendChild(n), this.#n = r, this.#r = i;
|
|
4933
|
+
let a = document.createElement("div");
|
|
4934
|
+
a.setAttribute("part", "indicators"), a.setAttribute("aria-hidden", "true"), this.appendChild(a), this.#t = a;
|
|
3958
4935
|
let o = document.createElement("div");
|
|
3959
|
-
o.setAttribute("
|
|
3960
|
-
let s = document.createElement("div");
|
|
3961
|
-
s.id = e("ss-live"), s.setAttribute("aria-live", "polite"), s.setAttribute("aria-atomic", "true"), s.setAttribute("data-visually-hidden", ""), this.appendChild(s), this.#i = s, this.setAttribute("aria-roledescription", "carousel"), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Slideshow"), this.#v(this.getAttribute("per-view")), this.#o.value = n.length, this.#y(n), this.#b(n.length), this.#S(n), n.length > 0 && n[0].toggleAttribute("active", !0), this.addEffect(() => {
|
|
4936
|
+
o.id = A("ss-live"), o.setAttribute("aria-live", "polite"), o.setAttribute("aria-atomic", "true"), o.setAttribute("data-visually-hidden", ""), this.appendChild(o), this.#i = o, this.setAttribute("aria-roledescription", "carousel"), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Slideshow"), this.#v(this.getAttribute("per-view")), this.#o.value = t.length, this.#y(t), this.#b(t.length), this.#S(t), t.length > 0 && t[0].toggleAttribute("active", !0), this.addEffect(() => {
|
|
3962
4937
|
let e = this.#a.value, t = this.#o.value;
|
|
3963
4938
|
this.#C(e), this.#w(e, t), this.#i && (this.#i.textContent = `Slide ${e + 1} of ${t}`);
|
|
3964
|
-
}), this.addEffect(
|
|
4939
|
+
}), this.addEffect(j(this, this.#s, this.#_)), r.addEventListener("click", this.#D), i.addEventListener("click", this.#O), e.addEventListener("keydown", this.#P), e.addEventListener("pointerdown", this.#j), this.addEventListener("mouseenter", this.#k), this.addEventListener("mouseleave", this.#A), this.addEventListener("focusin", this.#k), this.addEventListener("focusout", this.#A), this.hasAttribute("autoplay") && this.#T();
|
|
3965
4940
|
}
|
|
3966
4941
|
teardown() {
|
|
3967
4942
|
this.#E(), this.#u?.disconnect(), this.#u = null, this.#n?.removeEventListener("click", this.#D), this.#r?.removeEventListener("click", this.#O), this.#e?.removeEventListener("keydown", this.#P), this.#e?.removeEventListener("pointerdown", this.#j), this.removeEventListener("mouseenter", this.#k), this.removeEventListener("mouseleave", this.#A), this.removeEventListener("focusin", this.#k), this.removeEventListener("focusout", this.#A), this.#e = null, this.#t?.removeEventListener("click", this.#x), this.#t && (this.#t.innerHTML = ""), this.#t = null, this.#n = null, this.#r = null, this.#i = null, this.#d = [], super.teardown();
|
|
@@ -3970,11 +4945,11 @@ var be = class extends x(_) {
|
|
|
3970
4945
|
let t = Math.max(1, parseInt(e ?? "1", 10) || 1);
|
|
3971
4946
|
this.style.setProperty("--_per-view", String(t));
|
|
3972
4947
|
}
|
|
3973
|
-
#y(
|
|
3974
|
-
let
|
|
3975
|
-
for (let
|
|
3976
|
-
let
|
|
3977
|
-
|
|
4948
|
+
#y(e) {
|
|
4949
|
+
let t = e.length;
|
|
4950
|
+
for (let n = 0; n < t; n++) {
|
|
4951
|
+
let r = e[n];
|
|
4952
|
+
r.setAttribute("role", "group"), r.setAttribute("aria-roledescription", "slide"), r.setAttribute("aria-label", `${n + 1} of ${t}`), r.id ||= A("slide");
|
|
3978
4953
|
}
|
|
3979
4954
|
}
|
|
3980
4955
|
#b(e) {
|
|
@@ -4080,17 +5055,17 @@ var be = class extends x(_) {
|
|
|
4080
5055
|
break;
|
|
4081
5056
|
}
|
|
4082
5057
|
};
|
|
4083
|
-
},
|
|
5058
|
+
}, ct = class extends k {
|
|
4084
5059
|
setup() {
|
|
4085
5060
|
super.setup(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "-1");
|
|
4086
5061
|
}
|
|
4087
|
-
},
|
|
5062
|
+
}, lt = class extends k {
|
|
4088
5063
|
static observedAttributes = ["value", "disabled"];
|
|
4089
5064
|
#e;
|
|
4090
5065
|
#t;
|
|
4091
5066
|
#n;
|
|
4092
5067
|
constructor() {
|
|
4093
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "navigation", this.#t =
|
|
5068
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "navigation", this.#t = M(this, "disabled", { type: "boolean" });
|
|
4094
5069
|
}
|
|
4095
5070
|
get value() {
|
|
4096
5071
|
return this.#n?.listValue.value ?? null;
|
|
@@ -4106,7 +5081,7 @@ var be = class extends x(_) {
|
|
|
4106
5081
|
}
|
|
4107
5082
|
attributeChangedCallback(e, t, n) {
|
|
4108
5083
|
if (t !== n) {
|
|
4109
|
-
if (
|
|
5084
|
+
if (N({ disabled: this.#t }, e, n)) {
|
|
4110
5085
|
super.attributeChangedCallback?.(e, t, n);
|
|
4111
5086
|
return;
|
|
4112
5087
|
}
|
|
@@ -4114,7 +5089,7 @@ var be = class extends x(_) {
|
|
|
4114
5089
|
}
|
|
4115
5090
|
}
|
|
4116
5091
|
setup() {
|
|
4117
|
-
super.setup(), this.#n = new
|
|
5092
|
+
super.setup(), this.#n = new J(this, {
|
|
4118
5093
|
itemSelector: ":scope ui-nav-item:not([disabled])",
|
|
4119
5094
|
orientation: "vertical",
|
|
4120
5095
|
ariaAttr: "aria-current",
|
|
@@ -4130,23 +5105,23 @@ var be = class extends x(_) {
|
|
|
4130
5105
|
deferChildren: (e) => this.deferChildren(e)
|
|
4131
5106
|
});
|
|
4132
5107
|
let e = this.getAttribute("value");
|
|
4133
|
-
e !== null && (this.#n.listValue.value = e), this.addEffect(
|
|
5108
|
+
e !== null && (this.#n.listValue.value = e), this.addEffect(j(this, this.#t.signal, this.#e));
|
|
4134
5109
|
}
|
|
4135
5110
|
teardown() {
|
|
4136
5111
|
this.#n.destroy(), super.teardown();
|
|
4137
5112
|
}
|
|
4138
|
-
},
|
|
5113
|
+
}, ut = class extends k {
|
|
4139
5114
|
static observedAttributes = [
|
|
4140
5115
|
"value",
|
|
4141
5116
|
"disabled",
|
|
4142
5117
|
"label"
|
|
4143
5118
|
];
|
|
4144
5119
|
#e;
|
|
4145
|
-
#t =
|
|
5120
|
+
#t = _("");
|
|
4146
5121
|
#n;
|
|
4147
|
-
#r =
|
|
5122
|
+
#r = _("");
|
|
4148
5123
|
constructor() {
|
|
4149
|
-
super(), this.#e = this.attachInternals(), this.#e.role = "link", this.#n =
|
|
5124
|
+
super(), this.#e = this.attachInternals(), this.#e.role = "link", this.#n = M(this, "disabled", { type: "boolean" });
|
|
4150
5125
|
}
|
|
4151
5126
|
get value() {
|
|
4152
5127
|
return this.#t.value;
|
|
@@ -4168,7 +5143,7 @@ var be = class extends x(_) {
|
|
|
4168
5143
|
}
|
|
4169
5144
|
attributeChangedCallback(e, t, n) {
|
|
4170
5145
|
if (t !== n) {
|
|
4171
|
-
if (
|
|
5146
|
+
if (N({ disabled: this.#n }, e, n)) {
|
|
4172
5147
|
super.attributeChangedCallback?.(e, t, n);
|
|
4173
5148
|
return;
|
|
4174
5149
|
}
|
|
@@ -4184,7 +5159,7 @@ var be = class extends x(_) {
|
|
|
4184
5159
|
}
|
|
4185
5160
|
}
|
|
4186
5161
|
setup() {
|
|
4187
|
-
super.setup(), this.addEffect(
|
|
5162
|
+
super.setup(), this.addEffect(j(this, this.#n.signal, this.#e)), this.addEventListener("click", this.#i);
|
|
4188
5163
|
}
|
|
4189
5164
|
teardown() {
|
|
4190
5165
|
this.removeEventListener("click", this.#i), super.teardown();
|
|
@@ -4199,9 +5174,9 @@ var be = class extends x(_) {
|
|
|
4199
5174
|
}
|
|
4200
5175
|
}));
|
|
4201
5176
|
};
|
|
4202
|
-
},
|
|
5177
|
+
}, dt = class extends k {
|
|
4203
5178
|
static observedAttributes = ["open"];
|
|
4204
|
-
#e =
|
|
5179
|
+
#e = _(!1);
|
|
4205
5180
|
#t = null;
|
|
4206
5181
|
#n;
|
|
4207
5182
|
#r = null;
|
|
@@ -4237,7 +5212,7 @@ var be = class extends x(_) {
|
|
|
4237
5212
|
attributeFilter: ["aria-current"]
|
|
4238
5213
|
}), this.#s();
|
|
4239
5214
|
let r = document.createElement("ui-listbox");
|
|
4240
|
-
r.setAttribute("popover", "manual"), r.className = "nav-group-flyout", this.appendChild(r), this.#i = r, this.#a = new
|
|
5215
|
+
r.setAttribute("popover", "manual"), r.className = "nav-group-flyout", this.appendChild(r), this.#i = r, this.#a = new q(this), this.#a.wirePopover(this, r), r.addEventListener("ui-select", this.#u), r.addEventListener("ui-change", this.#d), this.addEventListener("ui-dismiss", this.#l);
|
|
4241
5216
|
}
|
|
4242
5217
|
teardown() {
|
|
4243
5218
|
this.closeFlyout(), this.#a?.destroy(), this.#a = null, this.#i?.remove(), this.#i = null, this.#r?.disconnect(), this.#r = null, this.#t?.removeEventListener("toggle", this.#c), this.#t = null, super.teardown();
|
|
@@ -4286,23 +5261,23 @@ var be = class extends x(_) {
|
|
|
4286
5261
|
#d = (e) => {
|
|
4287
5262
|
e.stopPropagation();
|
|
4288
5263
|
};
|
|
4289
|
-
},
|
|
5264
|
+
}, ft = class extends k {
|
|
4290
5265
|
constructor() {
|
|
4291
5266
|
super();
|
|
4292
5267
|
let e = this.attachInternals();
|
|
4293
5268
|
e.role = "presentation";
|
|
4294
5269
|
}
|
|
4295
5270
|
setup() {
|
|
4296
|
-
super.setup(), this.id ||=
|
|
4297
|
-
let
|
|
4298
|
-
|
|
4299
|
-
let
|
|
4300
|
-
if (
|
|
5271
|
+
super.setup(), this.id ||= A("ngh");
|
|
5272
|
+
let e = this.closest("ui-nav-group");
|
|
5273
|
+
e && e.setAttribute("aria-labelledby", this.id);
|
|
5274
|
+
let t = this.querySelector(":scope > ui-icon");
|
|
5275
|
+
if (t) {
|
|
4301
5276
|
let e = document.createElement("span");
|
|
4302
|
-
e.className = "icon-well", this.insertBefore(e,
|
|
5277
|
+
e.className = "icon-well", this.insertBefore(e, t), e.appendChild(t);
|
|
4303
5278
|
}
|
|
4304
5279
|
}
|
|
4305
|
-
},
|
|
5280
|
+
}, pt = class extends k {
|
|
4306
5281
|
static observedAttributes = [
|
|
4307
5282
|
"traits",
|
|
4308
5283
|
"for",
|
|
@@ -4338,7 +5313,7 @@ var be = class extends x(_) {
|
|
|
4338
5313
|
let e = this.getAttribute("traits");
|
|
4339
5314
|
if (!e) return;
|
|
4340
5315
|
let t = this.getAttribute("for");
|
|
4341
|
-
t === null ? this.#s(e) : this.#c(e, t), this.#r.size > 0 && !this.#i && (this.#i =
|
|
5316
|
+
t === null ? this.#s(e) : this.#c(e, t), this.#r.size > 0 && !this.#i && (this.#i = w((e) => {
|
|
4342
5317
|
this.#r.has(e) && (this.#r.delete(e), this.#o(), this.#r.size === 0 && (this.#i?.(), this.#i = null));
|
|
4343
5318
|
}));
|
|
4344
5319
|
}
|
|
@@ -4375,16 +5350,16 @@ var be = class extends x(_) {
|
|
|
4375
5350
|
let n = t.split(/\s+/).filter(Boolean), r = this.#e.get(e) ?? /* @__PURE__ */ new Map();
|
|
4376
5351
|
for (let t of n) {
|
|
4377
5352
|
if (r.has(t)) continue;
|
|
4378
|
-
let n =
|
|
5353
|
+
let n = T(t);
|
|
4379
5354
|
if (!n) {
|
|
4380
5355
|
this.#r.add(t);
|
|
4381
5356
|
continue;
|
|
4382
5357
|
}
|
|
4383
|
-
for (let [e] of r) if (
|
|
5358
|
+
for (let [e] of r) if (T(e)?.conflicts?.includes(t) || n.conflicts?.includes(e)) {
|
|
4384
5359
|
let n = `[native-ui] Trait conflict: "${t}" and "${e}" are incompatible.`;
|
|
4385
5360
|
console.warn(n);
|
|
4386
5361
|
}
|
|
4387
|
-
let i =
|
|
5362
|
+
let i = O(this, t), a = n.create(e, i);
|
|
4388
5363
|
r.set(t, a);
|
|
4389
5364
|
}
|
|
4390
5365
|
this.#e.set(e, r);
|
|
@@ -4395,7 +5370,7 @@ var be = class extends x(_) {
|
|
|
4395
5370
|
}
|
|
4396
5371
|
#f(e, t) {
|
|
4397
5372
|
for (let [e, n] of t) {
|
|
4398
|
-
let t =
|
|
5373
|
+
let t = T(e);
|
|
4399
5374
|
t && t.destroy(n);
|
|
4400
5375
|
}
|
|
4401
5376
|
t.clear();
|
|
@@ -4409,11 +5384,11 @@ var be = class extends x(_) {
|
|
|
4409
5384
|
this.#n = new MutationObserver((e) => {
|
|
4410
5385
|
for (let t of e) {
|
|
4411
5386
|
if (!t.attributeName) continue;
|
|
4412
|
-
let e =
|
|
5387
|
+
let e = D(t.attributeName);
|
|
4413
5388
|
if (!e) continue;
|
|
4414
|
-
let n =
|
|
5389
|
+
let n = T(e.trait);
|
|
4415
5390
|
if (!n?.update) continue;
|
|
4416
|
-
let r =
|
|
5391
|
+
let r = O(this, e.trait);
|
|
4417
5392
|
for (let [, t] of this.#e) {
|
|
4418
5393
|
let i = t.get(e.trait);
|
|
4419
5394
|
i && n.update(i, r);
|
|
@@ -4428,17 +5403,17 @@ var be = class extends x(_) {
|
|
|
4428
5403
|
}
|
|
4429
5404
|
/** Collect all attributes on this element that match any registered trait prefix. */
|
|
4430
5405
|
#h() {
|
|
4431
|
-
let e =
|
|
5406
|
+
let e = E(), t = [];
|
|
4432
5407
|
for (let n of this.attributes) for (let r of e) if (n.name.startsWith(r + "-")) {
|
|
4433
5408
|
t.push(n.name);
|
|
4434
5409
|
break;
|
|
4435
5410
|
}
|
|
4436
5411
|
return t;
|
|
4437
5412
|
}
|
|
4438
|
-
},
|
|
5413
|
+
}, mt = class extends k {
|
|
4439
5414
|
static observedAttributes = ["disabled"];
|
|
4440
5415
|
#e;
|
|
4441
|
-
#t =
|
|
5416
|
+
#t = _(!1);
|
|
4442
5417
|
#n = null;
|
|
4443
5418
|
#r = null;
|
|
4444
5419
|
constructor() {
|
|
@@ -4467,7 +5442,7 @@ var be = class extends x(_) {
|
|
|
4467
5442
|
}
|
|
4468
5443
|
}
|
|
4469
5444
|
setup() {
|
|
4470
|
-
super.setup(), this.addEffect(
|
|
5445
|
+
super.setup(), this.addEffect(j(this, this.#t, this.#e)), this.deferChildren(() => {
|
|
4471
5446
|
this.#i(), this.addEffect(() => {
|
|
4472
5447
|
let e = this.#t.value;
|
|
4473
5448
|
this.#n && this.#n.toggleAttribute("disabled", e), this.#r && (e ? this.#r.setAttribute("disabled", "") : this.#o());
|
|
@@ -4511,7 +5486,7 @@ var be = class extends x(_) {
|
|
|
4511
5486
|
detail: { value: e }
|
|
4512
5487
|
})) && !this.hasAttribute("no-auto-clear") && (this.value = "", this.#r?.setAttribute("disabled", ""));
|
|
4513
5488
|
}
|
|
4514
|
-
},
|
|
5489
|
+
}, ht = class extends k {
|
|
4515
5490
|
static observedAttributes = ["interactive", "href"];
|
|
4516
5491
|
setup() {
|
|
4517
5492
|
super.setup(), this.hasAttribute("interactive") && (this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("click", this.#e), this.addEventListener("keydown", this.#t));
|
|
@@ -4526,7 +5501,7 @@ var be = class extends x(_) {
|
|
|
4526
5501
|
#t = (e) => {
|
|
4527
5502
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.#e());
|
|
4528
5503
|
};
|
|
4529
|
-
},
|
|
5504
|
+
}, gt = class extends k {
|
|
4530
5505
|
static observedAttributes = [
|
|
4531
5506
|
"collapsible",
|
|
4532
5507
|
"collapsed",
|
|
@@ -4545,14 +5520,14 @@ var be = class extends x(_) {
|
|
|
4545
5520
|
#e = () => {
|
|
4546
5521
|
this.hasAttribute("collapsible") && this.toggleAttribute("collapsed");
|
|
4547
5522
|
};
|
|
4548
|
-
},
|
|
5523
|
+
}, _t = class extends k {
|
|
4549
5524
|
#e;
|
|
4550
5525
|
#t;
|
|
4551
5526
|
constructor() {
|
|
4552
5527
|
super(), this.#e = this.attachInternals(), this.#e.role = "toolbar";
|
|
4553
5528
|
}
|
|
4554
5529
|
setup() {
|
|
4555
|
-
super.setup(), this.#t = new
|
|
5530
|
+
super.setup(), this.#t = new G(this, {
|
|
4556
5531
|
selector: ":scope > ui-button:not([disabled]), :scope > button:not([disabled])",
|
|
4557
5532
|
orientation: "horizontal"
|
|
4558
5533
|
}), this.hasAttribute("aria-label") || this.setAttribute("aria-label", "Toolbar");
|
|
@@ -4560,7 +5535,7 @@ var be = class extends x(_) {
|
|
|
4560
5535
|
teardown() {
|
|
4561
5536
|
this.#t.destroy(), super.teardown();
|
|
4562
5537
|
}
|
|
4563
|
-
},
|
|
5538
|
+
}, vt = class extends k {
|
|
4564
5539
|
static observedAttributes = ["collapsed"];
|
|
4565
5540
|
#e = null;
|
|
4566
5541
|
#t = null;
|
|
@@ -4572,12 +5547,12 @@ var be = class extends x(_) {
|
|
|
4572
5547
|
setup() {
|
|
4573
5548
|
super.setup();
|
|
4574
5549
|
let e = this.querySelector(":scope > [slot=\"sidebar\"]");
|
|
4575
|
-
e?.querySelector(".layout-resize-handle") && (this.#e = new
|
|
5550
|
+
e?.querySelector(".layout-resize-handle") && (this.#e = new U(e, {
|
|
4576
5551
|
handleSelector: ".layout-resize-handle",
|
|
4577
5552
|
axis: "horizontal",
|
|
4578
5553
|
min: 160,
|
|
4579
5554
|
max: 400
|
|
4580
|
-
})), e && this.#s(e), this.#i(), this.addEventListener("ui-dismiss", this.#o), this.dataset.ready = "";
|
|
5555
|
+
})), e && this.#s(e), queueMicrotask(() => this.#i()), this.addEventListener("ui-dismiss", this.#o), this.dataset.ready = "";
|
|
4581
5556
|
}
|
|
4582
5557
|
teardown() {
|
|
4583
5558
|
this.removeEventListener("ui-dismiss", this.#o), this.#a(), this.#n = null, this.#t?.disconnect(), this.#t = null, this.#e?.destroy(), this.#e = null, super.teardown();
|
|
@@ -4628,13 +5603,13 @@ var be = class extends x(_) {
|
|
|
4628
5603
|
for (let e of a) this.#t.observe(e);
|
|
4629
5604
|
}
|
|
4630
5605
|
}
|
|
4631
|
-
},
|
|
5606
|
+
}, yt = class extends k {
|
|
4632
5607
|
#e = null;
|
|
4633
5608
|
#t = !1;
|
|
4634
5609
|
setup() {
|
|
4635
5610
|
super.setup();
|
|
4636
5611
|
let e = this.querySelector(":scope > ui-listbox[popover]");
|
|
4637
|
-
e && (this.#e = new
|
|
5612
|
+
e && (this.#e = new q(this), this.#e.wirePopover(this, e), this.addEventListener("click", this.#n), this.addEventListener("ui-dismiss", this.#r));
|
|
4638
5613
|
}
|
|
4639
5614
|
teardown() {
|
|
4640
5615
|
this.removeEventListener("click", this.#n), this.removeEventListener("ui-dismiss", this.#r), this.#e?.destroy(), this.#e = null, this.#t = !1, super.teardown();
|
|
@@ -4645,7 +5620,7 @@ var be = class extends x(_) {
|
|
|
4645
5620
|
#r = () => {
|
|
4646
5621
|
this.#t = !1, this.#e?.syncPopover(!1);
|
|
4647
5622
|
};
|
|
4648
|
-
},
|
|
5623
|
+
}, bt = class extends k {
|
|
4649
5624
|
#e = null;
|
|
4650
5625
|
get open() {
|
|
4651
5626
|
return this.hasAttribute("open");
|
|
@@ -4657,7 +5632,7 @@ var be = class extends x(_) {
|
|
|
4657
5632
|
this.open = !this.open;
|
|
4658
5633
|
}
|
|
4659
5634
|
setup() {
|
|
4660
|
-
super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new
|
|
5635
|
+
super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new U(this, {
|
|
4661
5636
|
handleSelector: ".layout-resize-handle",
|
|
4662
5637
|
axis: "horizontal",
|
|
4663
5638
|
min: 280,
|
|
@@ -4668,7 +5643,7 @@ var be = class extends x(_) {
|
|
|
4668
5643
|
teardown() {
|
|
4669
5644
|
this.#e?.destroy(), this.#e = null, super.teardown();
|
|
4670
5645
|
}
|
|
4671
|
-
},
|
|
5646
|
+
}, xt = class extends k {
|
|
4672
5647
|
#e = null;
|
|
4673
5648
|
get open() {
|
|
4674
5649
|
return this.hasAttribute("open");
|
|
@@ -4680,7 +5655,7 @@ var be = class extends x(_) {
|
|
|
4680
5655
|
this.open = !this.open;
|
|
4681
5656
|
}
|
|
4682
5657
|
setup() {
|
|
4683
|
-
super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new
|
|
5658
|
+
super.setup(), this.querySelector(".layout-resize-handle") && (this.#e = new U(this, {
|
|
4684
5659
|
handleSelector: ".layout-resize-handle",
|
|
4685
5660
|
axis: "horizontal",
|
|
4686
5661
|
min: 280,
|
|
@@ -4691,58 +5666,5 @@ var be = class extends x(_) {
|
|
|
4691
5666
|
teardown() {
|
|
4692
5667
|
this.#e?.destroy(), this.#e = null, super.teardown();
|
|
4693
5668
|
}
|
|
4694
|
-
}, X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Set();
|
|
4695
|
-
function Xe(e, t) {
|
|
4696
|
-
X.set(e, t), Z.forEach((t) => t(e));
|
|
4697
|
-
}
|
|
4698
|
-
function Q(e) {
|
|
4699
|
-
return X.get(e);
|
|
4700
|
-
}
|
|
4701
|
-
function $(e) {
|
|
4702
|
-
return Z.add(e), () => Z.delete(e);
|
|
4703
|
-
}
|
|
4704
|
-
/**
|
|
4705
|
-
* Icon component rendering SVG from the global icon registry.
|
|
4706
|
-
* @attr {string} name - Icon name from the Phosphor icon set
|
|
4707
|
-
* @attr {string} weight - Icon weight: "regular" (default) or "fill"
|
|
4708
|
-
* @attr {string} size - Icon size override
|
|
4709
|
-
* @attr {string} aria-label - Accessible label (sets role="img" when present)
|
|
4710
|
-
*/
|
|
4711
|
-
var Ze = class extends _ {
|
|
4712
|
-
static observedAttributes = [
|
|
4713
|
-
"name",
|
|
4714
|
-
"weight",
|
|
4715
|
-
"size",
|
|
4716
|
-
"aria-label"
|
|
4717
|
-
];
|
|
4718
|
-
#e = null;
|
|
4719
|
-
setup() {
|
|
4720
|
-
super.setup(), this.#t(), this.#r();
|
|
4721
|
-
}
|
|
4722
|
-
attributeChangedCallback(e, t, n) {
|
|
4723
|
-
super.attributeChangedCallback(e, t, n), (e === "name" || e === "weight") && this.#r(), e === "aria-label" && this.#t();
|
|
4724
|
-
}
|
|
4725
|
-
disconnectedCallback() {
|
|
4726
|
-
super.disconnectedCallback(), this.#e?.(), this.#e = null;
|
|
4727
|
-
}
|
|
4728
|
-
#t() {
|
|
4729
|
-
this.hasAttribute("aria-label") ? (this.setAttribute("role", "img"), this.removeAttribute("aria-hidden")) : (this.setAttribute("aria-hidden", "true"), this.removeAttribute("role"));
|
|
4730
|
-
}
|
|
4731
|
-
/** Compute the effective registry key from name + weight attributes. */
|
|
4732
|
-
#n() {
|
|
4733
|
-
let e = this.getAttribute("name");
|
|
4734
|
-
return e ? this.getAttribute("weight") === "fill" && !e.endsWith("-fill") ? `${e}-fill` : e : null;
|
|
4735
|
-
}
|
|
4736
|
-
#r() {
|
|
4737
|
-
let e = this.#n();
|
|
4738
|
-
if (!e) {
|
|
4739
|
-
this.innerHTML = "", this.#e?.(), this.#e = null;
|
|
4740
|
-
return;
|
|
4741
|
-
}
|
|
4742
|
-
let t = Q(e);
|
|
4743
|
-
t ? (this.innerHTML = t, this.#e?.(), this.#e = null) : (this.innerHTML = "", this.#e ||= $((e) => {
|
|
4744
|
-
e === this.#n() && this.#r();
|
|
4745
|
-
}));
|
|
4746
|
-
}
|
|
4747
5669
|
};
|
|
4748
|
-
export {
|
|
5670
|
+
export { Ce as $, Ke as A, R as At, Ie as B, E as Bt, $e as C, H as Ct, Ye as D, oe as Dt, Xe as E, z as Et, Ve as F, j as Ft, je as G, y as Gt, X as H, re as Ht, Be as I, A as It, Oe as J, u as Jt, Ae as K, v as Kt, ze as L, k as Lt, We as M, P as Mt, $ as N, M as Nt, Je as O, I as Ot, Ue as P, N as Pt, we as Q, Re as R, O as Rt, et as S, U as St, Ze as T, B as Tt, Ne as U, x as Ut, Pe as V, T as Vt, Me as W, b as Wt, Ee as X, De as Y, r as Yt, Te as Z, at as _, J as _t, _t as a, _e as at, nt as b, G as bt, mt as c, me as ct, dt as d, de as dt, Se as et, ut as f, ue as ft, ot as g, Y as gt, st as h, se as ht, vt as i, ve as it, Ge as j, F as jt, qe as k, L as kt, pt as l, pe as lt, ct as m, ce as mt, bt as n, be as nt, gt as o, ge as ot, lt as p, le as pt, ke as q, _ as qt, yt as r, ye as rt, ht as s, he as st, xt as t, xe as tt, ft as u, fe as ut, it as v, q as vt, Qe as w, V as wt, tt as x, W as xt, rt as y, K as yt, Le as z, D as zt };
|