@ufoui/core 0.0.126 → 0.0.136
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/components/base/boxBase.d.ts +10 -6
- package/components/base/textBase.d.ts +4 -4
- package/components/layout/div.d.ts +1 -1
- package/components/layout/flex.d.ts +1 -1
- package/components/layout/index.d.ts +1 -0
- package/components/layout/stack.d.ts +31 -0
- package/index.js +1063 -1056
- package/package.json +7 -4
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as L, Fragment as nt } from "react/jsx-runtime";
|
|
2
|
-
import et, { useState as Z, useRef as U, useCallback as Ue, useEffect as
|
|
2
|
+
import et, { useState as Z, useRef as U, useCallback as Ue, useEffect as pe, createContext as en, useContext as Bt, useSyncExternalStore as Qo, useMemo as ht, forwardRef as B, useId as ei, isValidElement as dt, cloneElement as Wt, useLayoutEffect as Sn, Children as oo, Fragment as ti } from "react";
|
|
3
3
|
import ni, { createPortal as oi } from "react-dom";
|
|
4
|
-
import { argbFromHex as qt, themeFromSourceColor as ii, hexFromArgb as
|
|
4
|
+
import { argbFromHex as qt, themeFromSourceColor as ii, hexFromArgb as Pe, TonalPalette as Zn, Hct as ri } from "@material/material-color-utilities";
|
|
5
5
|
let io = {};
|
|
6
6
|
function si(e) {
|
|
7
7
|
io = e;
|
|
@@ -9,7 +9,7 @@ function si(e) {
|
|
|
9
9
|
function ro() {
|
|
10
10
|
return io;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Cn(e) {
|
|
13
13
|
var t;
|
|
14
14
|
return (t = ro()[e]) == null ? void 0 : t.onColor;
|
|
15
15
|
}
|
|
@@ -43,12 +43,12 @@ const so = (e) => {
|
|
|
43
43
|
color: `var(${n})`,
|
|
44
44
|
onColor: `var(${o})`
|
|
45
45
|
};
|
|
46
|
-
}, li = (e) => [parseInt(e.slice(1, 3), 16), parseInt(e.slice(3, 5), 16), parseInt(e.slice(5, 7), 16)],
|
|
46
|
+
}, li = (e) => [parseInt(e.slice(1, 3), 16), parseInt(e.slice(3, 5), 16), parseInt(e.slice(5, 7), 16)], Ls = (e) => [
|
|
47
47
|
parseInt(e.slice(1, 3), 16),
|
|
48
48
|
parseInt(e.slice(3, 5), 16),
|
|
49
49
|
parseInt(e.slice(5, 7), 16)
|
|
50
50
|
].join(",");
|
|
51
|
-
function
|
|
51
|
+
function Is(e, t) {
|
|
52
52
|
const o = {
|
|
53
53
|
0: "0",
|
|
54
54
|
1: "0.05",
|
|
@@ -68,7 +68,7 @@ function tn(e) {
|
|
|
68
68
|
function Tt(e) {
|
|
69
69
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ln(e, t, n, o) {
|
|
72
72
|
const l = Number(n);
|
|
73
73
|
return Number.isFinite(l) ? Math.min(t, Math.max(e, Math.round(l))) : o;
|
|
74
74
|
}
|
|
@@ -86,10 +86,10 @@ const ci = (e) => ({
|
|
|
86
86
|
bottomRight: "uui-bottom-right",
|
|
87
87
|
auto: "uui-top-right"
|
|
88
88
|
})[e], We = (e) => e ? `uui-${e}` : "", ft = (e) => e ? `uui-${Tt(e)}` : "", rt = (e) => {
|
|
89
|
-
const t =
|
|
89
|
+
const t = Ln(0, 4, e);
|
|
90
90
|
return t === void 0 ? "" : `uui-border-${t}`;
|
|
91
91
|
}, ut = (e) => {
|
|
92
|
-
const t =
|
|
92
|
+
const t = Ln(0, 5, e);
|
|
93
93
|
return t === void 0 ? "" : `uui-elevation-${t}`;
|
|
94
94
|
}, ot = (e) => e ? `uui-${e}` : "";
|
|
95
95
|
function st(...e) {
|
|
@@ -104,7 +104,7 @@ function st(...e) {
|
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function re(...e) {
|
|
108
108
|
return e.flat().filter(Boolean).join(" ");
|
|
109
109
|
}
|
|
110
110
|
function _t(e, t) {
|
|
@@ -132,86 +132,86 @@ const ui = [
|
|
|
132
132
|
"caption",
|
|
133
133
|
"overline"
|
|
134
134
|
], lo = Object.fromEntries(ui.map((e) => [e, `uui-font-${Tt(e)}`]));
|
|
135
|
-
let
|
|
135
|
+
let In = new Map(Object.entries(lo));
|
|
136
136
|
const di = (e) => {
|
|
137
137
|
const { merged: t } = _t(lo, e);
|
|
138
|
-
|
|
139
|
-
},
|
|
140
|
-
function
|
|
138
|
+
In = new Map(Object.entries(t));
|
|
139
|
+
}, Bs = () => Array.from(In.keys()), Ee = (e) => In.get(e) ?? "";
|
|
140
|
+
function Bn(e, t, n = {}) {
|
|
141
141
|
const { placement: o = "topCenter", offset: l = 8, mode: c = "tooltip" } = n, r = 12, d = {
|
|
142
142
|
tooltip: ["topCenter", "bottomCenter", "centerRight", "centerLeft"],
|
|
143
143
|
dropdown: ["bottomCenter", "topCenter", "centerRight", "centerLeft"],
|
|
144
144
|
menu: ["bottomLeft", "bottomRight", "topLeft", "topRight", "centerRight", "centerLeft"],
|
|
145
145
|
submenu: ["topRightOut", "topLeftOut", "centerRight", "centerLeft", "bottomCenter", "topCenter"]
|
|
146
|
-
}, f = o === "auto" ? d[c] : [o, ...d[c]], m = e.current,
|
|
147
|
-
if (!m || !
|
|
146
|
+
}, f = o === "auto" ? d[c] : [o, ...d[c]], m = e.current, g = t.current;
|
|
147
|
+
if (!m || !g)
|
|
148
148
|
return null;
|
|
149
|
-
const u = m.getBoundingClientRect(), s =
|
|
150
|
-
let
|
|
149
|
+
const u = m.getBoundingClientRect(), s = g.getBoundingClientRect(), a = window.innerWidth, p = window.innerHeight, b = (y) => {
|
|
150
|
+
let h = 0, C = 0;
|
|
151
151
|
switch (y) {
|
|
152
152
|
case "topCenter":
|
|
153
|
-
|
|
153
|
+
h = u.left + (u.width - s.width) / 2, C = u.top - s.height - l;
|
|
154
154
|
break;
|
|
155
155
|
case "topLeft":
|
|
156
|
-
|
|
156
|
+
h = u.left, C = u.top - s.height - l;
|
|
157
157
|
break;
|
|
158
158
|
case "topRight":
|
|
159
|
-
|
|
159
|
+
h = u.right - s.width, C = u.top - s.height - l;
|
|
160
160
|
break;
|
|
161
161
|
case "bottomCenter":
|
|
162
|
-
|
|
162
|
+
h = u.left + (u.width - s.width) / 2, C = u.bottom + l;
|
|
163
163
|
break;
|
|
164
164
|
case "bottomLeft":
|
|
165
|
-
|
|
165
|
+
h = u.left, C = u.bottom + l;
|
|
166
166
|
break;
|
|
167
167
|
case "bottomRight":
|
|
168
|
-
|
|
168
|
+
h = u.right - s.width, C = u.bottom + l;
|
|
169
169
|
break;
|
|
170
170
|
case "centerLeft":
|
|
171
|
-
|
|
171
|
+
h = u.left - s.width - l, C = u.top + (u.height - s.height) / 2;
|
|
172
172
|
break;
|
|
173
173
|
case "centerRight":
|
|
174
|
-
|
|
174
|
+
h = u.right + l, C = u.top + (u.height - s.height) / 2;
|
|
175
175
|
break;
|
|
176
176
|
case "center":
|
|
177
|
-
|
|
177
|
+
h = u.left + (u.width - s.width) / 2, C = u.top + (u.height - s.height) / 2;
|
|
178
178
|
break;
|
|
179
179
|
case "topRightOut":
|
|
180
|
-
|
|
180
|
+
h = u.right + l, C = u.top;
|
|
181
181
|
break;
|
|
182
182
|
case "topLeftOut":
|
|
183
|
-
|
|
183
|
+
h = u.left - s.width - l, C = u.top;
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
186
|
-
return { x:
|
|
186
|
+
return { x: h, y: C, placement: y };
|
|
187
187
|
};
|
|
188
188
|
for (const y of f) {
|
|
189
|
-
const
|
|
189
|
+
const h = b(y), C = h.x >= 0 && h.x + s.width <= a, N = h.y >= 0 && h.y + s.height <= p;
|
|
190
190
|
let x = !1;
|
|
191
191
|
if (y === "centerLeft" || y === "centerRight" ? x = C : y === "topCenter" || y === "bottomCenter" || y === "center" ? x = N : x = C && N, x)
|
|
192
|
-
return
|
|
192
|
+
return h.x = Math.max(r, Math.min(h.x, a - s.width - r)), h.y = Math.max(r, Math.min(h.y, p - s.height - r)), h;
|
|
193
193
|
}
|
|
194
194
|
const v = b(o);
|
|
195
195
|
return v.x = Math.max(r, Math.min(v.x, a - s.width - r)), v.y = Math.max(r, Math.min(v.y, p - s.height - r)), v;
|
|
196
196
|
}
|
|
197
|
-
let Gn = !1,
|
|
197
|
+
let Gn = !1, xn = "pointer";
|
|
198
198
|
function fi() {
|
|
199
199
|
Gn || typeof window > "u" || (Gn = !0, window.addEventListener(
|
|
200
200
|
"keydown",
|
|
201
201
|
() => {
|
|
202
|
-
|
|
202
|
+
xn = "keyboard";
|
|
203
203
|
},
|
|
204
204
|
!0
|
|
205
205
|
), window.addEventListener(
|
|
206
206
|
"pointerdown",
|
|
207
207
|
() => {
|
|
208
|
-
|
|
208
|
+
xn = "pointer";
|
|
209
209
|
},
|
|
210
210
|
!0
|
|
211
211
|
));
|
|
212
212
|
}
|
|
213
213
|
function pi() {
|
|
214
|
-
return
|
|
214
|
+
return xn;
|
|
215
215
|
}
|
|
216
216
|
function Yn(e) {
|
|
217
217
|
if (typeof e == "string")
|
|
@@ -231,7 +231,7 @@ function Xn(e = "#6750A4", t = {}) {
|
|
|
231
231
|
}).map(([s, a]) => ({ value: qt(a), name: s, blend: !0 })), r = ii(l, c), d = ["light", "dark"], f = Object.keys(r.schemes.light.toJSON());
|
|
232
232
|
d.forEach((s) => {
|
|
233
233
|
f.forEach((a) => {
|
|
234
|
-
typeof r.schemes[s][a] == "number" && (o[s][a] =
|
|
234
|
+
typeof r.schemes[s][a] == "number" && (o[s][a] = Pe(
|
|
235
235
|
r.schemes[s][a]
|
|
236
236
|
));
|
|
237
237
|
});
|
|
@@ -244,19 +244,19 @@ function Xn(e = "#6750A4", t = {}) {
|
|
|
244
244
|
};
|
|
245
245
|
n[p.color] = { type: "semantic", onColor: p.onColor }, n[p.onColor] = { type: "theme", onColor: p.color }, n[p.colorContainer] = { type: "extended", onColor: p.onColorContainer }, n[p.onColorContainer] = { type: "text", onColor: p.colorContainer }, d.forEach((b) => {
|
|
246
246
|
Object.keys(p).forEach((v) => {
|
|
247
|
-
o[b][p[v]] =
|
|
247
|
+
o[b][p[v]] = Pe(s[b][v]);
|
|
248
248
|
});
|
|
249
249
|
});
|
|
250
250
|
}), ["primary", "secondary", "tertiary", "error"].forEach((s) => {
|
|
251
251
|
const a = s[0].toUpperCase() + s.slice(1);
|
|
252
252
|
n[s] = { type: "semantic", onColor: `on${a}` }, n[`on${a}`] = { type: "theme", onColor: s }, n[`${s}Container`] = { type: "extended", onColor: `on${a}Container` }, n[`on${a}Container`] = { type: "text", onColor: `${s}Container` }, d.forEach((p) => {
|
|
253
|
-
o[p][`${s}Fixed`] =
|
|
253
|
+
o[p][`${s}Fixed`] = Pe(
|
|
254
254
|
r.palettes[s].tone(90)
|
|
255
|
-
), n[`${s}Fixed`] = { type: "extended", onColor: `on${a}Fixed` }, o[p][`${s}FixedDim`] =
|
|
255
|
+
), n[`${s}Fixed`] = { type: "extended", onColor: `on${a}Fixed` }, o[p][`${s}FixedDim`] = Pe(
|
|
256
256
|
r.palettes[s].tone(80)
|
|
257
|
-
), n[`${s}FixedDim`] = { type: "border", onColor: `on${a}FixedVariant` }, o[p][`on${a}Fixed`] =
|
|
257
|
+
), n[`${s}FixedDim`] = { type: "border", onColor: `on${a}FixedVariant` }, o[p][`on${a}Fixed`] = Pe(
|
|
258
258
|
r.palettes[s].tone(10)
|
|
259
|
-
), n[`on${a}Fixed`] = { type: "text", onColor: `${s}Fixed` }, o[p][`on${a}FixedVariant`] =
|
|
259
|
+
), n[`on${a}Fixed`] = { type: "text", onColor: `${s}Fixed` }, o[p][`on${a}FixedVariant`] = Pe(
|
|
260
260
|
r.palettes[s].tone(30)
|
|
261
261
|
), n[`on${a}FixedVariant`] = { type: "text", onColor: `${s}FixedDim` };
|
|
262
262
|
});
|
|
@@ -266,20 +266,20 @@ function Xn(e = "#6750A4", t = {}) {
|
|
|
266
266
|
white: "#ffffff"
|
|
267
267
|
};
|
|
268
268
|
Object.assign(o.light, m), Object.assign(o.dark, m), n.white = { type: "surface", onColor: "black" }, n.black = { type: "surface", onColor: "white" };
|
|
269
|
-
const
|
|
269
|
+
const g = (s, a) => {
|
|
270
270
|
const p = Zn.fromInt(s);
|
|
271
|
-
return
|
|
271
|
+
return Pe(p.tone(a));
|
|
272
272
|
};
|
|
273
273
|
r.customColors.forEach((s) => {
|
|
274
274
|
const a = s.color.name, p = a[0].toUpperCase() + a.slice(1);
|
|
275
275
|
n[`${a}Fixed`] = { type: "extended", onColor: `on${p}Fixed` }, n[`${a}FixedDim`] = { type: "border", onColor: `on${p}FixedVariant` }, n[`on${p}Fixed`] = { type: "text", onColor: `${a}Fixed` }, n[`on${p}FixedVariant`] = { type: "text", onColor: `${a}FixedDim` }, d.forEach((b) => {
|
|
276
276
|
const v = s[b].color;
|
|
277
|
-
o[b][`${a}Fixed`] =
|
|
277
|
+
o[b][`${a}Fixed`] = g(v, 90), o[b][`${a}FixedDim`] = g(v, 80), o[b][`on${p}Fixed`] = g(v, 10), o[b][`on${p}FixedVariant`] = g(v, 30);
|
|
278
278
|
});
|
|
279
279
|
});
|
|
280
280
|
const u = (s) => {
|
|
281
281
|
const a = qt(s);
|
|
282
|
-
return
|
|
282
|
+
return Pe(Zn.fromInt(a).tone(ri.fromInt(a).tone < 50 ? 100 : 10));
|
|
283
283
|
};
|
|
284
284
|
return Object.entries(t).forEach(([s, a]) => {
|
|
285
285
|
if (typeof a == "string")
|
|
@@ -290,12 +290,12 @@ function Xn(e = "#6750A4", t = {}) {
|
|
|
290
290
|
if (o.dark[s] = y.color, o.dark[b] = y.on ?? u(y.color), !a.fixed)
|
|
291
291
|
o.light[`${s}Fixed`] = o.light[s], o.light[`on${p}Fixed`] = o.light[b], o.dark[`${s}Fixed`] = o.dark[s], o.dark[`on${p}Fixed`] = o.dark[b];
|
|
292
292
|
else if (a.fixed !== "preserve") {
|
|
293
|
-
const
|
|
294
|
-
o.light[`${s}Fixed`] =
|
|
293
|
+
const h = Gt(a.fixed.light);
|
|
294
|
+
o.light[`${s}Fixed`] = h.color, o.light[`on${p}Fixed`] = h.on ?? u(h.color);
|
|
295
295
|
const C = Gt(a.fixed.dark ?? a.fixed.light);
|
|
296
296
|
o.dark[`${s}Fixed`] = C.color, o.dark[`on${p}Fixed`] = C.on ?? u(C.color);
|
|
297
297
|
}
|
|
298
|
-
}), o.light.surface =
|
|
298
|
+
}), o.light.surface = Pe(r.palettes.neutral.tone(99)), n.surface = { type: "surface", onColor: "onSurface" }, o.light.surfaceDim = Pe(r.palettes.neutral.tone(87)), n.surfaceDim = { type: "surface", onColor: "onSurface" }, o.light.surfaceBright = Pe(r.palettes.neutral.tone(99)), n.surfaceBright = { type: "surface", onColor: "onSurface" }, o.light.surfaceContainerLowest = Pe(r.palettes.neutral.tone(100)), n.surfaceContainerLowest = { type: "surface", onColor: "onSurface" }, o.light.surfaceContainerLow = Pe(r.palettes.neutral.tone(96)), n.surfaceContainerLow = { type: "surface", onColor: "onSurface" }, o.light.surfaceContainer = Pe(r.palettes.neutral.tone(94)), n.surfaceContainer = { type: "surface", onColor: "onSurface" }, o.light.surfaceContainerHigh = Pe(r.palettes.neutral.tone(92)), n.surfaceContainerHigh = { type: "surface", onColor: "onSurface" }, o.light.surfaceContainerHighest = Pe(r.palettes.neutral.tone(90)), n.surfaceContainerHighest = { type: "surface", onColor: "onSurface" }, o.dark.surface = Pe(r.palettes.neutral.tone(6)), o.dark.surfaceDim = Pe(r.palettes.neutral.tone(6)), o.dark.surfaceBright = Pe(r.palettes.neutral.tone(24)), o.dark.surfaceContainerLowest = Pe(r.palettes.neutral.tone(4)), o.dark.surfaceContainerLow = Pe(r.palettes.neutral.tone(10)), o.dark.surfaceContainer = Pe(r.palettes.neutral.tone(12)), o.dark.surfaceContainerHigh = Pe(r.palettes.neutral.tone(17)), o.dark.surfaceContainerHighest = Pe(r.palettes.neutral.tone(22)), o.light.surfaceTint = Pe(r.palettes.primary.tone(40)), n.surfaceTint = { type: "theme" }, o.dark.surfaceTint = Pe(r.palettes.primary.tone(80)), n.surfaceVariant = { type: "surface", onColor: "onSurfaceVariant" }, n.scrim = { type: "theme" }, n.onSurface = { type: "text", onColor: "surface" }, n.onSurfaceVariant = { type: "text", onColor: "surfaceVariant" }, n.background = { type: "surface", onColor: "onBackground" }, n.onBackground = { type: "text", onColor: "background" }, n.inverseSurface = { type: "surface", onColor: "inverseOnSurface" }, n.inverseOnSurface = { type: "theme", onColor: "inverseSurface" }, n.outline = { type: "border", onColor: "surface" }, n.outlineVariant = { type: "border", onColor: "inverseSurface" }, n.inversePrimary = { type: "theme", onColor: "onPrimaryContainer" }, n.shadow = { type: "theme" }, si(n), o;
|
|
299
299
|
}
|
|
300
300
|
function mi(e) {
|
|
301
301
|
if (typeof document > "u")
|
|
@@ -335,7 +335,7 @@ const hi = (e) => {
|
|
|
335
335
|
const e = Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize);
|
|
336
336
|
return Number.isNaN(e) ? 16 : e;
|
|
337
337
|
}, Jt = /* @__PURE__ */ new Set();
|
|
338
|
-
let
|
|
338
|
+
let wn = !1, It = null, Ft = { width: 0, isPrint: !1 };
|
|
339
339
|
const Ci = () => {
|
|
340
340
|
Jt.forEach((e) => {
|
|
341
341
|
e();
|
|
@@ -344,11 +344,11 @@ const Ci = () => {
|
|
|
344
344
|
const e = ao(), t = xi();
|
|
345
345
|
e === Ft.width && t === Ft.isPrint || (Ft = { width: e, isPrint: t }, Ci());
|
|
346
346
|
}, wi = () => {
|
|
347
|
-
typeof window > "u" ||
|
|
347
|
+
typeof window > "u" || wn || (window.addEventListener("resize", Rt), window.addEventListener("orientationchange", Rt), It = window.matchMedia("print"), It.addEventListener("change", Rt), Ft = {
|
|
348
348
|
width: ao(),
|
|
349
349
|
isPrint: It.matches
|
|
350
|
-
},
|
|
351
|
-
},
|
|
350
|
+
}, wn = !0);
|
|
351
|
+
}, pn = {
|
|
352
352
|
/**
|
|
353
353
|
* Subscribes to viewport state updates.
|
|
354
354
|
*
|
|
@@ -356,7 +356,7 @@ const Ci = () => {
|
|
|
356
356
|
*/
|
|
357
357
|
subscribe(e) {
|
|
358
358
|
return wi(), Jt.add(e), () => {
|
|
359
|
-
Jt.delete(e), Jt.size === 0 && typeof window < "u" && (window.removeEventListener("resize", Rt), window.removeEventListener("orientationchange", Rt), It == null || It.removeEventListener("change", Rt), It = null,
|
|
359
|
+
Jt.delete(e), Jt.size === 0 && typeof window < "u" && (window.removeEventListener("resize", Rt), window.removeEventListener("orientationchange", Rt), It == null || It.removeEventListener("change", Rt), It = null, wn = !1, Ft = { width: 0, isPrint: !1 });
|
|
360
360
|
};
|
|
361
361
|
},
|
|
362
362
|
/**
|
|
@@ -475,10 +475,10 @@ function Ni() {
|
|
|
475
475
|
}
|
|
476
476
|
var ki = Ni();
|
|
477
477
|
function Si(e = {}) {
|
|
478
|
-
const { initial: t = "idle" } = e, [n, o] = Z("idle"), [l, c] = Z(!1), { t1: r = 0, t2: d, oneShot: f = !1 } = e, m = d ?? Math.round(r * 0.67),
|
|
478
|
+
const { initial: t = "idle" } = e, [n, o] = Z("idle"), [l, c] = Z(!1), { t1: r = 0, t2: d, oneShot: f = !1 } = e, m = d ?? Math.round(r * 0.67), g = U(null), u = () => g.current !== null ? (clearTimeout(g.current), g.current = null, !0) : !1, s = Ue(
|
|
479
479
|
(v) => {
|
|
480
480
|
function y(C, N) {
|
|
481
|
-
|
|
481
|
+
g.current = window.setTimeout(() => {
|
|
482
482
|
o(C), u();
|
|
483
483
|
}, N);
|
|
484
484
|
}
|
|
@@ -511,9 +511,9 @@ function Si(e = {}) {
|
|
|
511
511
|
},
|
|
512
512
|
[f, r, m, n]
|
|
513
513
|
);
|
|
514
|
-
|
|
514
|
+
pe(() => {
|
|
515
515
|
l && c(!1);
|
|
516
|
-
}, [l]),
|
|
516
|
+
}, [l]), pe(() => {
|
|
517
517
|
t !== "idle" && s(t === "open" ? "open" : "closed");
|
|
518
518
|
}, []);
|
|
519
519
|
const a = n === "closing", p = n === "opening";
|
|
@@ -540,7 +540,7 @@ function Si(e = {}) {
|
|
|
540
540
|
}
|
|
541
541
|
function Li(e, t, n = !0) {
|
|
542
542
|
const o = U(!1);
|
|
543
|
-
|
|
543
|
+
pe(() => {
|
|
544
544
|
if (!o.current) {
|
|
545
545
|
n && (o.current = !0);
|
|
546
546
|
return;
|
|
@@ -548,7 +548,7 @@ function Li(e, t, n = !0) {
|
|
|
548
548
|
return e();
|
|
549
549
|
}, [...t, n]);
|
|
550
550
|
}
|
|
551
|
-
const
|
|
551
|
+
const Mn = {
|
|
552
552
|
fade: "uui-motion-fade",
|
|
553
553
|
fadeBlur: "uui-motion-fade-blur",
|
|
554
554
|
scale: "uui-motion-scale",
|
|
@@ -577,16 +577,16 @@ const Bn = {
|
|
|
577
577
|
none: ""
|
|
578
578
|
};
|
|
579
579
|
function Ii(e) {
|
|
580
|
-
return e && e !== "none" ?
|
|
580
|
+
return e && e !== "none" ? Mn[e] ?? "" : "";
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
return Object.keys(
|
|
582
|
+
function Ms() {
|
|
583
|
+
return Object.keys(Mn).filter((e) => e !== "none");
|
|
584
584
|
}
|
|
585
585
|
function Bi(e) {
|
|
586
586
|
return e === "expressive" ? "uui-motion-expressive" : "";
|
|
587
587
|
}
|
|
588
588
|
function nn(e, t = {}, n = {}) {
|
|
589
|
-
const o = typeof e == "string" ? { ...t, animation: e } : { ...t, ...e }, l = Si({ t1: o.duration, ...n }), c =
|
|
589
|
+
const o = typeof e == "string" ? { ...t, animation: e } : { ...t, ...e }, l = Si({ t1: o.duration, ...n }), c = re(
|
|
590
590
|
l.animating && Ii(o.animation),
|
|
591
591
|
Bi(o.style)
|
|
592
592
|
);
|
|
@@ -596,11 +596,11 @@ function nn(e, t = {}, n = {}) {
|
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
function co(e, t, n, o) {
|
|
599
|
-
|
|
599
|
+
pe(() => {
|
|
600
600
|
if (!e)
|
|
601
601
|
return;
|
|
602
602
|
const l = (c) => {
|
|
603
|
-
var m,
|
|
603
|
+
var m, g;
|
|
604
604
|
const r = c.target;
|
|
605
605
|
if (Array.isArray(t)) {
|
|
606
606
|
const u = t.some((a) => {
|
|
@@ -610,7 +610,7 @@ function co(e, t, n, o) {
|
|
|
610
610
|
!u && !s && n();
|
|
611
611
|
return;
|
|
612
612
|
}
|
|
613
|
-
const d = !!r.closest(t), f = ((
|
|
613
|
+
const d = !!r.closest(t), f = ((g = o == null ? void 0 : o.current) == null ? void 0 : g.contains(r)) ?? !1;
|
|
614
614
|
!d && !f && n();
|
|
615
615
|
};
|
|
616
616
|
return document.addEventListener("mousedown", l), () => {
|
|
@@ -623,7 +623,7 @@ const xt = [], Qn = (e) => {
|
|
|
623
623
|
};
|
|
624
624
|
function Mi(e, t) {
|
|
625
625
|
const n = U(t);
|
|
626
|
-
n.current = t,
|
|
626
|
+
n.current = t, pe(() => {
|
|
627
627
|
if (!e)
|
|
628
628
|
return;
|
|
629
629
|
const o = () => {
|
|
@@ -651,8 +651,8 @@ function wt(e, t) {
|
|
|
651
651
|
}
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
|
|
654
|
+
function Nn(e, t, n = !0, o = !1) {
|
|
655
|
+
pe(() => {
|
|
656
656
|
if (!n)
|
|
657
657
|
return;
|
|
658
658
|
const l = e.current;
|
|
@@ -695,7 +695,7 @@ function $i() {
|
|
|
695
695
|
throw new Error("useTheme must be used within a <ThemeProvider>");
|
|
696
696
|
return e;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function kn({ value: e, min: t, max: n, step: o, disabled: l, readOnly: c, onChange: r }) {
|
|
699
699
|
return { onKeyDown: Ue(
|
|
700
700
|
(f) => {
|
|
701
701
|
if (l || c)
|
|
@@ -738,8 +738,8 @@ function mo(e = "vertical", t = !0) {
|
|
|
738
738
|
const u = [...n.current].sort((v, y) => {
|
|
739
739
|
if (v === y)
|
|
740
740
|
return 0;
|
|
741
|
-
const
|
|
742
|
-
return
|
|
741
|
+
const h = v.compareDocumentPosition(y);
|
|
742
|
+
return h & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : h & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
743
743
|
}).filter((v) => !("disabled" in v && v.disabled || v.getAttribute("aria-disabled") === "true"));
|
|
744
744
|
if (u.length === 0)
|
|
745
745
|
return;
|
|
@@ -765,8 +765,8 @@ function Ei(e, t = "vertical") {
|
|
|
765
765
|
const [n, o] = Z([]), l = mo(t), c = Ue(
|
|
766
766
|
(f) => {
|
|
767
767
|
o((m) => {
|
|
768
|
-
const
|
|
769
|
-
return e === "single" ?
|
|
768
|
+
const g = m.includes(f);
|
|
769
|
+
return e === "single" ? g ? [] : [f] : g ? m.filter((u) => u !== f) : [...m, f];
|
|
770
770
|
});
|
|
771
771
|
},
|
|
772
772
|
[e]
|
|
@@ -787,7 +787,7 @@ function Ei(e, t = "vertical") {
|
|
|
787
787
|
}
|
|
788
788
|
const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
789
789
|
const o = U(null);
|
|
790
|
-
|
|
790
|
+
pe(() => {
|
|
791
791
|
if (!t || !e.current)
|
|
792
792
|
return;
|
|
793
793
|
const l = e.current;
|
|
@@ -799,7 +799,7 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
799
799
|
).filter((f) => !f.hasAttribute("disabled") && f.getClientRects().length > 0);
|
|
800
800
|
if (n && !l.contains(document.activeElement)) {
|
|
801
801
|
const f = c();
|
|
802
|
-
(f.find((
|
|
802
|
+
(f.find((g) => g.hasAttribute("data-autofocus")) ?? f[0] ?? l).focus();
|
|
803
803
|
}
|
|
804
804
|
const r = (f) => {
|
|
805
805
|
if (f.key !== "Tab" || Lt[Lt.length - 1] !== l)
|
|
@@ -809,8 +809,8 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
809
809
|
f.preventDefault();
|
|
810
810
|
return;
|
|
811
811
|
}
|
|
812
|
-
const
|
|
813
|
-
f.shiftKey && document.activeElement ===
|
|
812
|
+
const g = m[0], u = m[m.length - 1];
|
|
813
|
+
f.shiftKey && document.activeElement === g ? (f.preventDefault(), u.focus()) : !f.shiftKey && document.activeElement === u && (f.preventDefault(), g.focus());
|
|
814
814
|
}, d = (f) => {
|
|
815
815
|
const m = f.target;
|
|
816
816
|
if (!l.contains(m)) {
|
|
@@ -830,11 +830,11 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
830
830
|
}, 0);
|
|
831
831
|
};
|
|
832
832
|
}, [t, e, n]);
|
|
833
|
-
},
|
|
833
|
+
}, $s = () => {
|
|
834
834
|
const { theme: e } = $i(), { width: t, isPrint: n } = Qo(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
835
|
+
pn.subscribe,
|
|
836
|
+
pn.getSnapshot,
|
|
837
|
+
pn.getServerSnapshot
|
|
838
838
|
), o = ht(() => gi(e.breakpoints), [e.breakpoints]), l = ht(
|
|
839
839
|
() => yi(o, t),
|
|
840
840
|
[o, t]
|
|
@@ -849,12 +849,12 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
849
849
|
breakpoints: e.breakpoints,
|
|
850
850
|
br: c
|
|
851
851
|
};
|
|
852
|
-
}, rn =
|
|
853
|
-
const { open: n, animation: o, className: l, children: c, style: r, shape: d, ...f } = e, m = n !== !1,
|
|
852
|
+
}, rn = B((e, t) => {
|
|
853
|
+
const { open: n, animation: o, className: l, children: c, style: r, shape: d, ...f } = e, m = n !== !1, g = U(null), [u, s] = Z(void 0), { openingVars: a, closingVars: p, animate: b, animating: v, animationClasses: y } = nn(o, {
|
|
854
854
|
animation: "fade",
|
|
855
855
|
duration: 220
|
|
856
856
|
});
|
|
857
|
-
|
|
857
|
+
Nn(g, ({ height: $ }) => {
|
|
858
858
|
s($);
|
|
859
859
|
}, !v, !0), Li(
|
|
860
860
|
() => {
|
|
@@ -863,7 +863,7 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
863
863
|
[n],
|
|
864
864
|
u !== void 0
|
|
865
865
|
);
|
|
866
|
-
const C =
|
|
866
|
+
const C = re("uui-collapse", l, We(d)), N = F(), x = F(r);
|
|
867
867
|
let S;
|
|
868
868
|
return m ? (u !== void 0 && N.set("height", `${u}px`), S = a) : (N.set("height", "0px"), S = p), x.merge(S), N.merge(S), /* @__PURE__ */ i(
|
|
869
869
|
"div",
|
|
@@ -872,12 +872,12 @@ const Lt = [], Di = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
|
|
|
872
872
|
className: C,
|
|
873
873
|
...m ? {} : { inert: "" },
|
|
874
874
|
style: N.get(),
|
|
875
|
-
children: /* @__PURE__ */ i("div", { className: "uui-collapse-wrapper", ref:
|
|
875
|
+
children: /* @__PURE__ */ i("div", { className: "uui-collapse-wrapper", ref: g, children: /* @__PURE__ */ i(Fe, { ...f, className: y, ref: t, shape: d, style: x.get(), children: c }) })
|
|
876
876
|
}
|
|
877
877
|
);
|
|
878
878
|
});
|
|
879
879
|
rn.displayName = "Collapse";
|
|
880
|
-
const ho =
|
|
880
|
+
const ho = B(
|
|
881
881
|
({
|
|
882
882
|
id: e,
|
|
883
883
|
title: t,
|
|
@@ -889,39 +889,39 @@ const ho = M(
|
|
|
889
889
|
animation: d,
|
|
890
890
|
timeout: f,
|
|
891
891
|
elevation: m = 3,
|
|
892
|
-
shape:
|
|
892
|
+
shape: g = "smooth",
|
|
893
893
|
status: u,
|
|
894
894
|
leaving: s,
|
|
895
895
|
onExitComplete: a,
|
|
896
896
|
className: p,
|
|
897
897
|
...b
|
|
898
898
|
}, v) => {
|
|
899
|
-
const [y,
|
|
899
|
+
const [y, h] = Z(!1), C = U(null), N = U(!1), x = () => {
|
|
900
900
|
if (N.current)
|
|
901
901
|
return;
|
|
902
902
|
N.current = !0;
|
|
903
|
-
const
|
|
903
|
+
const R = typeof d == "object" ? d.duration ?? 400 : 400;
|
|
904
904
|
setTimeout(() => {
|
|
905
905
|
a == null || a(e);
|
|
906
|
-
},
|
|
906
|
+
}, R);
|
|
907
907
|
};
|
|
908
|
-
|
|
908
|
+
pe(() => {
|
|
909
909
|
if (!(!f || f === 0))
|
|
910
910
|
return C.current = setTimeout(() => {
|
|
911
|
-
Ct.remove(e),
|
|
911
|
+
Ct.remove(e), h(!1), x();
|
|
912
912
|
}, f), () => {
|
|
913
913
|
C.current && clearTimeout(C.current);
|
|
914
914
|
};
|
|
915
915
|
}, [e, x, f]);
|
|
916
|
-
const S =
|
|
916
|
+
const S = F();
|
|
917
917
|
S.bg(o), S.text.on(o);
|
|
918
918
|
const $ = u ? `uui-toast-${u}` : void 0;
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}, []),
|
|
922
|
-
s && (C.current && clearTimeout(C.current),
|
|
919
|
+
pe(() => {
|
|
920
|
+
h(!0);
|
|
921
|
+
}, []), pe(() => {
|
|
922
|
+
s && (C.current && clearTimeout(C.current), h(!1), x());
|
|
923
923
|
}, [s, x]);
|
|
924
|
-
const
|
|
924
|
+
const M = r ?? /* @__PURE__ */ L(nt, { children: [
|
|
925
925
|
/* @__PURE__ */ L("div", { className: "uui-toast-text", children: [
|
|
926
926
|
l && /* @__PURE__ */ i("div", { className: "uui-icon", children: l }),
|
|
927
927
|
/* @__PURE__ */ L("div", { className: "uui-toast-content", children: [
|
|
@@ -937,16 +937,16 @@ const ho = M(
|
|
|
937
937
|
...typeof d == "string" ? { animation: d } : d
|
|
938
938
|
};
|
|
939
939
|
return /* @__PURE__ */ i(
|
|
940
|
-
|
|
940
|
+
Fe,
|
|
941
941
|
{
|
|
942
|
-
className:
|
|
942
|
+
className: re("uui-toast", $, p),
|
|
943
943
|
elevation: m,
|
|
944
944
|
font: "bodyMedium",
|
|
945
945
|
ref: v,
|
|
946
|
-
shape:
|
|
946
|
+
shape: g,
|
|
947
947
|
style: S.get(),
|
|
948
948
|
...b,
|
|
949
|
-
children: /* @__PURE__ */ i(rn, { animation: k, open: y, children: /* @__PURE__ */ i("div", { className: "uui-toast-region", id: `${e}-content`, role: "region", children:
|
|
949
|
+
children: /* @__PURE__ */ i(rn, { animation: k, open: y, children: /* @__PURE__ */ i("div", { className: "uui-toast-region", id: `${e}-content`, role: "region", children: M }) })
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
952
|
}
|
|
@@ -961,12 +961,12 @@ const Fi = {
|
|
|
961
961
|
bottomRight: { bottom: 16, right: 16 }
|
|
962
962
|
}, Ri = ({ position: e = "bottomRight", timeout: t = 4e3, limit: n = 3 }) => {
|
|
963
963
|
const [o, l] = Z([]);
|
|
964
|
-
|
|
964
|
+
pe(() => Ct.subscribe((d) => {
|
|
965
965
|
l((f) => {
|
|
966
|
-
const m = new Map(d.map((a) => [a.id, a])),
|
|
966
|
+
const m = new Map(d.map((a) => [a.id, a])), g = new Set(f.map((a) => a.id)), u = f.map((a) => {
|
|
967
967
|
const p = m.get(a.id);
|
|
968
968
|
return p ? { ...p, leaving: a.leaving } : a.leaving ? a : { ...a, leaving: !0 };
|
|
969
|
-
}), s = d.filter((a) => !
|
|
969
|
+
}), s = d.filter((a) => !g.has(a.id)).map((a) => ({ ...a, leaving: !1 }));
|
|
970
970
|
return [...u, ...s];
|
|
971
971
|
});
|
|
972
972
|
}), [n]);
|
|
@@ -981,34 +981,34 @@ const Fi = {
|
|
|
981
981
|
className: "uui-toast-viewport uui-menu-scroll",
|
|
982
982
|
style: Fi[e],
|
|
983
983
|
children: r.map((d) => {
|
|
984
|
-
const { priority: f, leaving: m, ...
|
|
984
|
+
const { priority: f, leaving: m, ...g } = d, u = typeof g.action == "function" ? g.action(g.id) : g.action;
|
|
985
985
|
return /* @__PURE__ */ i(
|
|
986
986
|
ho,
|
|
987
987
|
{
|
|
988
|
-
...
|
|
988
|
+
...g,
|
|
989
989
|
action: u,
|
|
990
990
|
leaving: m,
|
|
991
991
|
onExitComplete: c,
|
|
992
|
-
timeout:
|
|
992
|
+
timeout: g.timeout ?? t
|
|
993
993
|
},
|
|
994
|
-
|
|
994
|
+
g.id
|
|
995
995
|
);
|
|
996
996
|
})
|
|
997
997
|
}
|
|
998
998
|
);
|
|
999
999
|
};
|
|
1000
|
-
let
|
|
1000
|
+
let mn = !1;
|
|
1001
1001
|
function Ti() {
|
|
1002
|
-
if (
|
|
1002
|
+
if (mn)
|
|
1003
1003
|
return;
|
|
1004
1004
|
if (document.querySelector(".uui-toast-viewport")) {
|
|
1005
|
-
|
|
1005
|
+
mn = !0;
|
|
1006
1006
|
return;
|
|
1007
1007
|
}
|
|
1008
1008
|
const e = document.createElement("div");
|
|
1009
|
-
document.body.appendChild(e), ki.createRoot(e).render(/* @__PURE__ */ i(Ri, {})),
|
|
1009
|
+
document.body.appendChild(e), ki.createRoot(e).render(/* @__PURE__ */ i(Ri, {})), mn = !0;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function hn(e, t) {
|
|
1012
1012
|
const n = typeof e == "function" ? e(t) : e;
|
|
1013
1013
|
return typeof n == "string" ? { description: n } : n;
|
|
1014
1014
|
}
|
|
@@ -1021,7 +1021,7 @@ function Dt(e) {
|
|
|
1021
1021
|
id: n
|
|
1022
1022
|
}), n;
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const Es = Object.assign(Dt, {
|
|
1025
1025
|
/** Updates an existing toast. */
|
|
1026
1026
|
update: Ct.update,
|
|
1027
1027
|
/** Removes a toast by id. */
|
|
@@ -1047,20 +1047,20 @@ const $s = Object.assign(Dt, {
|
|
|
1047
1047
|
*/
|
|
1048
1048
|
async promise(e, t) {
|
|
1049
1049
|
const n = Dt({
|
|
1050
|
-
...
|
|
1050
|
+
...hn(t.loading, void 0),
|
|
1051
1051
|
timeout: 0,
|
|
1052
1052
|
priority: !0
|
|
1053
1053
|
});
|
|
1054
1054
|
return e.then(
|
|
1055
1055
|
(o) => {
|
|
1056
|
-
const l =
|
|
1056
|
+
const l = hn(t.success, o);
|
|
1057
1057
|
return Ct.update(n, {
|
|
1058
1058
|
timeout: void 0,
|
|
1059
1059
|
...l
|
|
1060
1060
|
}), o;
|
|
1061
1061
|
},
|
|
1062
1062
|
(o) => {
|
|
1063
|
-
const l =
|
|
1063
|
+
const l = hn(t.error, o);
|
|
1064
1064
|
throw Ct.update(n, {
|
|
1065
1065
|
timeout: void 0,
|
|
1066
1066
|
...l
|
|
@@ -1072,7 +1072,7 @@ const $s = Object.assign(Dt, {
|
|
|
1072
1072
|
const t = ei();
|
|
1073
1073
|
return `${e}_${t.replace(/:/g, "")}`;
|
|
1074
1074
|
};
|
|
1075
|
-
function
|
|
1075
|
+
function F(e) {
|
|
1076
1076
|
const t = { ...e || {} };
|
|
1077
1077
|
function n(s, a) {
|
|
1078
1078
|
t[s] = a;
|
|
@@ -1084,7 +1084,7 @@ function D(e) {
|
|
|
1084
1084
|
{
|
|
1085
1085
|
on(a) {
|
|
1086
1086
|
if (a) {
|
|
1087
|
-
const p =
|
|
1087
|
+
const p = Cn(a);
|
|
1088
1088
|
p !== void 0 && s(o(p));
|
|
1089
1089
|
}
|
|
1090
1090
|
},
|
|
@@ -1111,7 +1111,7 @@ function D(e) {
|
|
|
1111
1111
|
n("outlineColor", s);
|
|
1112
1112
|
}), m = l((s) => {
|
|
1113
1113
|
n("--uui-current-color", s);
|
|
1114
|
-
}),
|
|
1114
|
+
}), g = l((s) => {
|
|
1115
1115
|
n("stroke", s);
|
|
1116
1116
|
}), u = l((s) => {
|
|
1117
1117
|
n("fill", s);
|
|
@@ -1122,7 +1122,7 @@ function D(e) {
|
|
|
1122
1122
|
border: d,
|
|
1123
1123
|
outline: f,
|
|
1124
1124
|
current: m,
|
|
1125
|
-
stroke:
|
|
1125
|
+
stroke: g,
|
|
1126
1126
|
fill: u,
|
|
1127
1127
|
set: n,
|
|
1128
1128
|
get() {
|
|
@@ -1136,13 +1136,13 @@ function D(e) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1140
|
-
const { m: t, mx: n, my: o, mt: l, mb: c, ml: r, mr: d, top: f, right: m, bottom:
|
|
1139
|
+
function sn(e) {
|
|
1140
|
+
const { m: t, mx: n, my: o, mt: l, mb: c, ml: r, mr: d, top: f, right: m, bottom: g, left: u, zIndex: s, position: a, ...p } = e;
|
|
1141
1141
|
return {
|
|
1142
1142
|
wrapperStyle: Object.fromEntries(Object.entries({
|
|
1143
1143
|
top: f,
|
|
1144
1144
|
right: m,
|
|
1145
|
-
bottom:
|
|
1145
|
+
bottom: g,
|
|
1146
1146
|
left: u,
|
|
1147
1147
|
zIndex: s,
|
|
1148
1148
|
position: a,
|
|
@@ -1151,7 +1151,7 @@ function Mn(e) {
|
|
|
1151
1151
|
marginBottom: c ?? o,
|
|
1152
1152
|
marginLeft: r ?? n,
|
|
1153
1153
|
marginRight: d ?? n
|
|
1154
|
-
}).filter(([y,
|
|
1154
|
+
}).filter(([y, h]) => h != null)),
|
|
1155
1155
|
otherProps: p
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
@@ -1165,22 +1165,22 @@ function Ai(e) {
|
|
|
1165
1165
|
const n = document.createElement("div");
|
|
1166
1166
|
return n.id = e, document.body.appendChild(n), n;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function ln(e, t) {
|
|
1169
1169
|
const n = Ai(e);
|
|
1170
1170
|
return n ? oi(t, n) : null;
|
|
1171
1171
|
}
|
|
1172
1172
|
const Mt = (e, t, n) => {
|
|
1173
1173
|
const o = n ?? e, l = o.querySelector(".ripple-container");
|
|
1174
1174
|
l && l.remove();
|
|
1175
|
-
const c = e.getBoundingClientRect(), r = o.getBoundingClientRect(), d = t.clientX - c.left, f = t.clientY - c.top, m = d >= 0 && d <= c.width && f >= 0 && f <= c.height,
|
|
1175
|
+
const c = e.getBoundingClientRect(), r = o.getBoundingClientRect(), d = t.clientX - c.left, f = t.clientY - c.top, m = d >= 0 && d <= c.width && f >= 0 && f <= c.height, g = m ? d : c.width / 2, u = m ? f : c.height / 2, s = Math.sqrt(c.width * c.width + c.height * c.height), a = s / 2, p = document.createElement("div");
|
|
1176
1176
|
p.className = "ripple-container", p.style.position = "absolute", p.style.pointerEvents = "none", p.style.overflow = "hidden", p.style.width = `${c.width}px`, p.style.height = `${c.height}px`, p.style.left = `${c.left - r.left}px`, p.style.top = `${c.top - r.top}px`, requestAnimationFrame(() => {
|
|
1177
1177
|
p.style.borderRadius = getComputedStyle(e).borderRadius;
|
|
1178
1178
|
});
|
|
1179
1179
|
const b = document.createElement("span");
|
|
1180
|
-
b.className = "ripple", b.style.position = "absolute", b.style.width = `${s}px`, b.style.height = `${s}px`, b.style.left = `${
|
|
1180
|
+
b.className = "ripple", b.style.position = "absolute", b.style.width = `${s}px`, b.style.height = `${s}px`, b.style.left = `${g - a}px`, b.style.top = `${u - a}px`, p.appendChild(b), o.appendChild(p), b.addEventListener("animationend", () => {
|
|
1181
1181
|
p.remove();
|
|
1182
1182
|
});
|
|
1183
|
-
},
|
|
1183
|
+
}, Fe = B((e, t) => {
|
|
1184
1184
|
const {
|
|
1185
1185
|
type: n = "flex",
|
|
1186
1186
|
inline: o = !1,
|
|
@@ -1190,7 +1190,7 @@ const Mt = (e, t, n) => {
|
|
|
1190
1190
|
border: d,
|
|
1191
1191
|
direction: f,
|
|
1192
1192
|
flow: m,
|
|
1193
|
-
borderColor:
|
|
1193
|
+
borderColor: g,
|
|
1194
1194
|
elementClass: u,
|
|
1195
1195
|
children: s,
|
|
1196
1196
|
className: a,
|
|
@@ -1198,53 +1198,59 @@ const Mt = (e, t, n) => {
|
|
|
1198
1198
|
font: b,
|
|
1199
1199
|
fullHeight: v,
|
|
1200
1200
|
fullWidth: y,
|
|
1201
|
-
grow:
|
|
1201
|
+
grow: h,
|
|
1202
1202
|
p: C,
|
|
1203
1203
|
px: N,
|
|
1204
1204
|
py: x,
|
|
1205
1205
|
pt: S,
|
|
1206
1206
|
pb: $,
|
|
1207
|
-
pl:
|
|
1207
|
+
pl: M,
|
|
1208
1208
|
pr: k,
|
|
1209
|
-
gap:
|
|
1209
|
+
gap: R,
|
|
1210
1210
|
gapX: H,
|
|
1211
1211
|
gapY: z,
|
|
1212
1212
|
justifyContent: P,
|
|
1213
1213
|
alignItems: Ce,
|
|
1214
1214
|
placeItems: ge,
|
|
1215
1215
|
alignContent: xe,
|
|
1216
|
-
wrap:
|
|
1217
|
-
cols:
|
|
1216
|
+
wrap: me,
|
|
1217
|
+
cols: se,
|
|
1218
1218
|
rows: j,
|
|
1219
1219
|
as: O,
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1220
|
+
width: ke,
|
|
1221
|
+
height: ue,
|
|
1222
|
+
minWidth: je,
|
|
1223
|
+
maxWidth: J,
|
|
1224
|
+
minHeight: De,
|
|
1225
|
+
maxHeight: le,
|
|
1226
|
+
...ee
|
|
1227
|
+
} = e, ye = O ?? "div", { wrapperStyle: he, otherProps: _ } = sn(ee), D = F(he);
|
|
1228
|
+
D.merge(p);
|
|
1229
|
+
const ae = {
|
|
1230
|
+
width: ke ?? (y ? "100%" : void 0),
|
|
1231
|
+
height: ue ?? (v ? "100%" : void 0),
|
|
1232
|
+
minWidth: je,
|
|
1233
|
+
maxWidth: J,
|
|
1234
|
+
minHeight: De,
|
|
1235
|
+
maxHeight: le,
|
|
1230
1236
|
padding: C,
|
|
1231
1237
|
paddingTop: S ?? x,
|
|
1232
1238
|
paddingBottom: $ ?? x,
|
|
1233
|
-
paddingLeft:
|
|
1239
|
+
paddingLeft: M ?? N,
|
|
1234
1240
|
paddingRight: k ?? N,
|
|
1235
|
-
gap:
|
|
1241
|
+
gap: R,
|
|
1236
1242
|
columnGap: H,
|
|
1237
1243
|
rowGap: z,
|
|
1238
1244
|
justifyContent: P,
|
|
1239
1245
|
alignItems: Ce,
|
|
1240
1246
|
placeItems: ge,
|
|
1241
1247
|
alignContent: xe,
|
|
1242
|
-
flexWrap:
|
|
1243
|
-
gridTemplateColumns: n === "grid" ? typeof
|
|
1248
|
+
flexWrap: me && n === "flex" ? "wrap" : void 0,
|
|
1249
|
+
gridTemplateColumns: n === "grid" ? typeof se == "number" ? `repeat(${se}, 1fr)` : se : void 0,
|
|
1244
1250
|
gridTemplateRows: n === "grid" ? typeof j == "number" ? `repeat(${j}, 1fr)` : j : void 0
|
|
1245
1251
|
};
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1252
|
+
D.merge(ae), D.border(g), D.bg(l), D.text.on(l);
|
|
1253
|
+
const Re = re(
|
|
1248
1254
|
a,
|
|
1249
1255
|
"uui-box",
|
|
1250
1256
|
u,
|
|
@@ -1252,19 +1258,19 @@ const Mt = (e, t, n) => {
|
|
|
1252
1258
|
r && We(r),
|
|
1253
1259
|
c !== void 0 && ut(c),
|
|
1254
1260
|
d !== void 0 && rt(d),
|
|
1255
|
-
|
|
1261
|
+
h && "uui-grow",
|
|
1256
1262
|
n === "flex" ? o ? "uui-flex-inline" : "uui-flex" : n === "grid" ? o ? "uui-grid-inline" : "uui-grid" : o ? "uui-inline-block" : "uui-block",
|
|
1257
|
-
|
|
1263
|
+
f && n === "flex" && `uui-flex-${f}`,
|
|
1258
1264
|
m && n === "grid" && `uui-grid-flow-${m === "col" ? "col" : "row"}`
|
|
1259
1265
|
);
|
|
1260
|
-
return /* @__PURE__ */ i(
|
|
1266
|
+
return /* @__PURE__ */ i(ye, { className: Re, ref: t, ..._, style: D.get(), children: s });
|
|
1261
1267
|
});
|
|
1262
|
-
|
|
1268
|
+
Fe.displayName = "BoxBase";
|
|
1263
1269
|
const Pt = ({ tooltip: e, align: t, triggerRef: n }) => {
|
|
1264
1270
|
const [o, l] = Z(!1), [c, r] = Z(null), d = U(null);
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
if (!
|
|
1271
|
+
pe(() => {
|
|
1272
|
+
const g = n.current;
|
|
1273
|
+
if (!g)
|
|
1268
1274
|
return;
|
|
1269
1275
|
const u = () => {
|
|
1270
1276
|
l(!0);
|
|
@@ -1273,32 +1279,32 @@ const Pt = ({ tooltip: e, align: t, triggerRef: n }) => {
|
|
|
1273
1279
|
}, a = (p) => {
|
|
1274
1280
|
p.target.matches(":focus-visible") && l(!0);
|
|
1275
1281
|
};
|
|
1276
|
-
return
|
|
1277
|
-
|
|
1282
|
+
return g.addEventListener("mouseenter", u), g.addEventListener("mouseleave", s), g.addEventListener("focus", a), g.addEventListener("blur", s), () => {
|
|
1283
|
+
g.removeEventListener("mouseenter", u), g.removeEventListener("mouseleave", s), g.removeEventListener("focus", a), g.removeEventListener("blur", s);
|
|
1278
1284
|
};
|
|
1279
|
-
}, [n]),
|
|
1285
|
+
}, [n]), pe(() => {
|
|
1280
1286
|
if (!o)
|
|
1281
1287
|
return;
|
|
1282
|
-
const
|
|
1288
|
+
const g = requestAnimationFrame(() => {
|
|
1283
1289
|
if (!d.current || !n.current)
|
|
1284
1290
|
return;
|
|
1285
|
-
const u =
|
|
1291
|
+
const u = Bn(n, d, {
|
|
1286
1292
|
placement: t,
|
|
1287
1293
|
offset: 8
|
|
1288
1294
|
});
|
|
1289
1295
|
u && r({ x: u.x, y: u.y });
|
|
1290
1296
|
});
|
|
1291
1297
|
return () => {
|
|
1292
|
-
cancelAnimationFrame(
|
|
1298
|
+
cancelAnimationFrame(g);
|
|
1293
1299
|
};
|
|
1294
1300
|
}, [t, o, n]);
|
|
1295
|
-
const f =
|
|
1301
|
+
const f = F({
|
|
1296
1302
|
top: (c == null ? void 0 : c.y) ?? -9999,
|
|
1297
1303
|
left: (c == null ? void 0 : c.x) ?? -9999,
|
|
1298
1304
|
opacity: c ? 1 : 0,
|
|
1299
1305
|
visibility: c && o ? "visible" : "hidden"
|
|
1300
1306
|
}), m = ["uui-tooltip", "uui-font-body-small", "uui-elevation-2", "uui-corner-small"].join(" ");
|
|
1301
|
-
return
|
|
1307
|
+
return ln(
|
|
1302
1308
|
"uui-tooltip-root",
|
|
1303
1309
|
/* @__PURE__ */ i("div", { className: m, ref: d, role: "tooltip", style: f.get(), children: e })
|
|
1304
1310
|
);
|
|
@@ -1308,11 +1314,11 @@ const go = ({ start: e, end: t, content: n, className: o }) => e ?? t ?? n ? /*
|
|
|
1308
1314
|
e,
|
|
1309
1315
|
n,
|
|
1310
1316
|
t
|
|
1311
|
-
] }) : null, zt = (e) => /* @__PURE__ */ i(go, { ...e, className: "uui-leading" }), Kt = (e) => /* @__PURE__ */ i(go, { ...e, className: "uui-trailing" }),
|
|
1317
|
+
] }) : null, zt = (e) => /* @__PURE__ */ i(go, { ...e, className: "uui-leading" }), Kt = (e) => /* @__PURE__ */ i(go, { ...e, className: "uui-trailing" }), an = B(
|
|
1312
1318
|
({ control: e, label: t, description: n, className: o, textPlacement: l, spanDesc: c }, r) => /* @__PURE__ */ L(
|
|
1313
1319
|
"div",
|
|
1314
1320
|
{
|
|
1315
|
-
className:
|
|
1321
|
+
className: re(o, `uui-control-grid uui-control-grid-${t && (l === "start" || l === "end") ? l : "col"}`, c && "uui-spanned"),
|
|
1316
1322
|
ref: r,
|
|
1317
1323
|
children: [
|
|
1318
1324
|
(l === "start" || l === "top") && t,
|
|
@@ -1323,7 +1329,7 @@ const go = ({ start: e, end: t, content: n, className: o }) => e ?? t ?? n ? /*
|
|
|
1323
1329
|
}
|
|
1324
1330
|
)
|
|
1325
1331
|
);
|
|
1326
|
-
|
|
1332
|
+
an.displayName = "ControlGrid";
|
|
1327
1333
|
const $n = ({
|
|
1328
1334
|
label: e,
|
|
1329
1335
|
htmlFor: t,
|
|
@@ -1335,7 +1341,7 @@ const $n = ({
|
|
|
1335
1341
|
}) => {
|
|
1336
1342
|
if (!e)
|
|
1337
1343
|
return null;
|
|
1338
|
-
const d =
|
|
1344
|
+
const d = re("uui-control-label", Ee(l ?? "bodyMedium"));
|
|
1339
1345
|
return /* @__PURE__ */ L(
|
|
1340
1346
|
r,
|
|
1341
1347
|
{
|
|
@@ -1352,11 +1358,11 @@ const $n = ({
|
|
|
1352
1358
|
]
|
|
1353
1359
|
}
|
|
1354
1360
|
);
|
|
1355
|
-
},
|
|
1361
|
+
}, cn = ({ description: e, error: t, ...n }) => {
|
|
1356
1362
|
const o = t ?? e;
|
|
1357
1363
|
if (!o)
|
|
1358
1364
|
return null;
|
|
1359
|
-
const l =
|
|
1365
|
+
const l = re(
|
|
1360
1366
|
"uui-support-text",
|
|
1361
1367
|
Ee("bodySmall"),
|
|
1362
1368
|
!!t && "uui-error",
|
|
@@ -1364,8 +1370,8 @@ const $n = ({
|
|
|
1364
1370
|
);
|
|
1365
1371
|
return /* @__PURE__ */ i("div", { className: l, ...n, children: o });
|
|
1366
1372
|
}, En = ({ icon: e, className: t, color: n }) => {
|
|
1367
|
-
const o =
|
|
1368
|
-
return o.text(n), e ? /* @__PURE__ */ i("div", { className:
|
|
1373
|
+
const o = F();
|
|
1374
|
+
return o.text(n), e ? /* @__PURE__ */ i("div", { className: re("uui-icon", t), style: o.get(), children: e }) : null;
|
|
1369
1375
|
};
|
|
1370
1376
|
En.displayName = "Icon";
|
|
1371
1377
|
const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M10 17V7L15 12L10 17Z" }) }), bo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z" }) }), Pi = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M7.825 13L13.425 18.6L12 20L4 12L12 4L13.425 5.4L7.825 11H20V13H7.825Z" }) }), ji = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z" }) }), Oi = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "3 3 18 18", children: /* @__PURE__ */ i("path", { d: "M10 16.4L6 12.4L7.4 11L10 13.6L16.6 7L18 8.4L10 16.4Z" }) }), Hi = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "3 3 18 18", children: /* @__PURE__ */ i("path", { d: "M6 13V11H18V13H6Z" }) }), _i = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "2 2 20 20", children: /* @__PURE__ */ i("path", { d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17Z" }) }), Wi = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z" }) }), Ui = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z" }) }), vo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" }) }), Co = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" }) }), xo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M12 15.0833L7 10.0833L8.16667 8.91663L12 12.7499L15.8333 8.91663L17 10.0833L12 15.0833Z" }) }), zi = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M8.85 16.825L12 14.925L15.15 16.85L14.325 13.25L17.1 10.85L13.45 10.525L12 7.125L10.55 10.5L6.9 10.825L9.675 13.25L8.85 16.825ZM5.825 21L7.45 13.975L2 9.25L9.2 8.625L12 2L14.8 8.625L22 9.25L16.55 13.975L18.175 21L12 17.275L5.825 21Z" }) }), Ki = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { d: "M5.825 21L7.45 13.975L2 9.25L9.2 8.625L12 2L14.8 8.625L22 9.25L16.55 13.975L18.175 21L12 17.275L5.825 21Z" }) }), wo = ({ trackProps: e, indicatorProps: t, ...n }) => /* @__PURE__ */ L("svg", { fill: "none", viewBox: "0 0 40 40", ...n, children: [
|
|
@@ -1452,17 +1458,17 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1452
1458
|
style: d,
|
|
1453
1459
|
...f
|
|
1454
1460
|
}) => {
|
|
1455
|
-
const m =
|
|
1461
|
+
const m = re(
|
|
1456
1462
|
c,
|
|
1457
1463
|
"uui-spinner",
|
|
1458
1464
|
`uui-spinner-${Tt(e)}`,
|
|
1459
1465
|
!t && ft(o),
|
|
1460
1466
|
l && "uui-spinner-inline"
|
|
1461
|
-
), { wrapperStyle:
|
|
1467
|
+
), { wrapperStyle: g, otherProps: u } = sn(f), s = F(g);
|
|
1462
1468
|
s.text(n), s.merge(d);
|
|
1463
1469
|
const a = er[e], p = r ? { role: "status", "aria-live": "polite", "aria-label": r } : { "aria-hidden": !0 };
|
|
1464
1470
|
return /* @__PURE__ */ i(a, { className: m, style: s.get(), ...u, ...p });
|
|
1465
|
-
}, jt =
|
|
1471
|
+
}, jt = B((e, t) => {
|
|
1466
1472
|
const {
|
|
1467
1473
|
color: n,
|
|
1468
1474
|
selectedColor: o,
|
|
@@ -1472,7 +1478,7 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1472
1478
|
type: d = "button",
|
|
1473
1479
|
size: f = "small",
|
|
1474
1480
|
border: m,
|
|
1475
|
-
borderColor:
|
|
1481
|
+
borderColor: g,
|
|
1476
1482
|
hoverEffects: u = ["overlay", "elevate"],
|
|
1477
1483
|
pressedEffects: s = ["overlay", "elevate"],
|
|
1478
1484
|
touchEffects: a = ["ripple"],
|
|
@@ -1480,51 +1486,51 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1480
1486
|
focusEffects: b = ["ring", "overlay"],
|
|
1481
1487
|
children: v,
|
|
1482
1488
|
outlined: y = !1,
|
|
1483
|
-
filled:
|
|
1489
|
+
filled: h = !1,
|
|
1484
1490
|
tonal: C = !1,
|
|
1485
1491
|
elevated: N = !1,
|
|
1486
1492
|
flat: x = !1,
|
|
1487
1493
|
elevation: S,
|
|
1488
1494
|
disabled: $,
|
|
1489
|
-
textColor:
|
|
1495
|
+
textColor: M,
|
|
1490
1496
|
selectedTextColor: k,
|
|
1491
|
-
shape:
|
|
1497
|
+
shape: R = "round",
|
|
1492
1498
|
selectedShape: H = "rounded",
|
|
1493
1499
|
icon: z,
|
|
1494
1500
|
selectedIcon: P,
|
|
1495
1501
|
leading: Ce,
|
|
1496
1502
|
endIcon: ge,
|
|
1497
1503
|
trailing: xe,
|
|
1498
|
-
onClick:
|
|
1499
|
-
elementClass:
|
|
1504
|
+
onClick: me,
|
|
1505
|
+
elementClass: se,
|
|
1500
1506
|
font: j = "labelLarge",
|
|
1501
1507
|
upload: O,
|
|
1502
1508
|
uploadAccept: ke,
|
|
1503
|
-
uploadMultiple:
|
|
1504
|
-
onUploadChange:
|
|
1509
|
+
uploadMultiple: ue,
|
|
1510
|
+
onUploadChange: je,
|
|
1505
1511
|
id: J = "",
|
|
1506
1512
|
name: De = "",
|
|
1507
|
-
loading:
|
|
1513
|
+
loading: le,
|
|
1508
1514
|
fullWidth: ee = !1,
|
|
1509
1515
|
link: ye,
|
|
1510
|
-
selected:
|
|
1516
|
+
selected: he,
|
|
1511
1517
|
defaultSelected: _,
|
|
1512
|
-
toggle:
|
|
1513
|
-
tooltipAlign:
|
|
1514
|
-
density:
|
|
1515
|
-
style:
|
|
1518
|
+
toggle: D = !1,
|
|
1519
|
+
tooltipAlign: ae = "auto",
|
|
1520
|
+
density: Re,
|
|
1521
|
+
style: Te,
|
|
1516
1522
|
"aria-label": Se,
|
|
1517
1523
|
...W
|
|
1518
|
-
} = e,
|
|
1519
|
-
|
|
1524
|
+
} = e, te = he !== void 0, [Q, de] = Z(_ ?? !1), Me = te ? he : Q, oe = U(null), Le = U(null), $e = U(null), Ke = Nt("button"), Ie = J || De || Ke, fe = ye ? et.cloneElement(ye, { ref: Le, style: { display: "none" } }) : null, we = [
|
|
1525
|
+
se,
|
|
1520
1526
|
l,
|
|
1521
1527
|
"uui-bb",
|
|
1522
|
-
ot(
|
|
1528
|
+
ot(Re),
|
|
1523
1529
|
...ee ? ["uui-w-full"] : []
|
|
1524
|
-
].filter(Boolean).join(" "),
|
|
1530
|
+
].filter(Boolean).join(" "), ie = [
|
|
1525
1531
|
"uui-btn-control",
|
|
1526
1532
|
Ee(j),
|
|
1527
|
-
...
|
|
1533
|
+
...h ? ["uui-filled"] : [],
|
|
1528
1534
|
...N ? ["uui-elevated"] : [],
|
|
1529
1535
|
...C ? ["uui-tonal"] : [],
|
|
1530
1536
|
...y ? ["uui-outlined"] : [],
|
|
@@ -1533,16 +1539,16 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1533
1539
|
...u.includes("overlay") ? ["uui-hover-overlay"] : [],
|
|
1534
1540
|
...s.includes("overlay") ? ["uui-pressed-overlay"] : [],
|
|
1535
1541
|
...p.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
1536
|
-
...
|
|
1542
|
+
...le ? ["uui-loading"] : [],
|
|
1537
1543
|
...ee ? ["uui-w-full"] : [],
|
|
1538
1544
|
...v ? [] : [ft(f)],
|
|
1539
1545
|
...Me ? ["uui-selected"] : []
|
|
1540
|
-
], Be = ["uui-state"],
|
|
1541
|
-
|
|
1542
|
-
const Ne = "uui-icon", G =
|
|
1546
|
+
], Be = ["uui-state"], ce = D && Me && p.includes("morph") ? We(H) : We(R);
|
|
1547
|
+
ie.push(ce), Be.push(ce);
|
|
1548
|
+
const Ne = "uui-icon", G = D && Me ? P ?? Ce ?? z : Ce ?? z, K = le ? /* @__PURE__ */ i("div", { className: Ne, children: /* @__PURE__ */ i(tr, {}) }) : G && /* @__PURE__ */ i("div", { className: Ne, children: G }), He = (xe ?? ge) && /* @__PURE__ */ i("div", { className: Ne, children: xe ?? ge });
|
|
1543
1549
|
let be;
|
|
1544
1550
|
if (v) {
|
|
1545
|
-
const E = ["uui-btn-content uui-overflow-hidden",
|
|
1551
|
+
const E = ["uui-btn-content uui-overflow-hidden", ce, Ee(j)].filter(Boolean).join(" ");
|
|
1546
1552
|
be = /* @__PURE__ */ i("div", { className: E, children: v });
|
|
1547
1553
|
} else
|
|
1548
1554
|
be = /* @__PURE__ */ L("div", { className: "uui-btn-content", children: [
|
|
@@ -1550,34 +1556,34 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1550
1556
|
c && /* @__PURE__ */ i("span", { className: "uui-label " + Ee(j), children: c }),
|
|
1551
1557
|
He
|
|
1552
1558
|
] });
|
|
1553
|
-
const I =
|
|
1559
|
+
const I = F(Te), Y = F();
|
|
1554
1560
|
if (y || m !== void 0) {
|
|
1555
|
-
I.border(tn(
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1561
|
+
I.border(tn(g));
|
|
1562
|
+
const Ae = rt(m ?? (y ? 1 : 0));
|
|
1563
|
+
ie.push(Ae);
|
|
1558
1564
|
}
|
|
1559
|
-
let
|
|
1560
|
-
S === void 0 && (C ||
|
|
1561
|
-
const
|
|
1565
|
+
let Ve = S;
|
|
1566
|
+
S === void 0 && (C || h ? x || (Ve = N ? 1 : 0) : N && (Ve = 1));
|
|
1567
|
+
const ne = [
|
|
1562
1568
|
...u.includes("elevate") && !x ? ["uui-hover-elevate"] : [],
|
|
1563
1569
|
...s.includes("elevate") && !x ? ["uui-pressed-elevate"] : []
|
|
1564
1570
|
];
|
|
1565
|
-
|
|
1571
|
+
ie.push(...ne, ut(Ve));
|
|
1566
1572
|
const Ge = () => {
|
|
1567
|
-
|
|
1573
|
+
h ? (I.bg(n ?? "primary"), Y.bg.on(n ?? "primary"), M ? I.text(M) : I.text.on(n ?? "primary")) : C ? (I.bg.container("secondary"), Y.bg.onContainer("secondary"), M ? I.text(M) : I.text.onContainer("secondary")) : N ? (I.bg("surfaceContainerLow"), I.text(M ?? n ?? "primary"), Y.bg(n ?? "primary")) : y && !M ? (I.text.on("surfaceVariant"), Y.bg.on("surfaceVariant")) : (I.text(M ?? n), Y.bg(M ?? n));
|
|
1568
1574
|
}, ze = () => {
|
|
1569
|
-
n ? (I.bg(n), Y.bg.on(n), I.text.on(n)) :
|
|
1575
|
+
n ? (I.bg(n), Y.bg.on(n), I.text.on(n)) : h ? (I.bg("surfaceContainer"), Y.bg.on("surfaceContainer"), I.text.on("surfaceVariant")) : N ? (I.bg("surfaceContainerLow"), Y.bg.on("surfaceContainerLow"), I.text("primary")) : C ? (I.bg.container("secondary"), Y.bg("secondary"), I.text.onContainer("secondary")) : y && !M ? (I.text.on("surfaceVariant"), Y.bg.on("surfaceVariant")) : (I.text(M ?? n ?? "primary"), Y.bg(M ?? n ?? "primary")), M && I.text(M);
|
|
1570
1576
|
}, Ze = () => {
|
|
1571
1577
|
const E = o ?? n ?? "primary";
|
|
1572
1578
|
C && !o ? (I.bg("secondary"), Y.bg.on("secondary"), k ? I.text(k) : I.text.on("secondary")) : y && !o ? (I.bg("inverseSurface"), Y.bg.on("inverseSurface"), k ? I.text(k) : I.text.on("inverseSurface")) : (I.bg(E), Y.bg.on(E), k ? I.text(k) : I.text.on(E));
|
|
1573
1579
|
};
|
|
1574
|
-
|
|
1580
|
+
D && p.includes("color") ? Me ? Ze() : ze() : Ge();
|
|
1575
1581
|
const qe = (E) => {
|
|
1576
|
-
var
|
|
1582
|
+
var Ae;
|
|
1577
1583
|
if (!$) {
|
|
1578
|
-
if (
|
|
1584
|
+
if (D) {
|
|
1579
1585
|
const _e = !Me;
|
|
1580
|
-
|
|
1586
|
+
te || de(_e), (Ae = e.onChange) == null || Ae.call(e, {
|
|
1581
1587
|
...E,
|
|
1582
1588
|
target: {
|
|
1583
1589
|
...E.target,
|
|
@@ -1590,13 +1596,13 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1590
1596
|
Le.current.click();
|
|
1591
1597
|
return;
|
|
1592
1598
|
}
|
|
1593
|
-
if (O &&
|
|
1594
|
-
|
|
1599
|
+
if (O && oe.current) {
|
|
1600
|
+
oe.current.click();
|
|
1595
1601
|
return;
|
|
1596
1602
|
}
|
|
1597
|
-
|
|
1603
|
+
me && me(E), a.includes("ripple") && Mt(E.currentTarget, E);
|
|
1598
1604
|
}
|
|
1599
|
-
},
|
|
1605
|
+
}, T = r ? /* @__PURE__ */ i("div", { id: `${Ie}-tip`, children: r }) : null;
|
|
1600
1606
|
let q;
|
|
1601
1607
|
c && v && (q = c), !c && !v && (q = r);
|
|
1602
1608
|
const V = Se ?? q;
|
|
@@ -1606,9 +1612,9 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1606
1612
|
{
|
|
1607
1613
|
accept: ke,
|
|
1608
1614
|
"aria-labelledby": Ie,
|
|
1609
|
-
multiple:
|
|
1610
|
-
onChange:
|
|
1611
|
-
ref:
|
|
1615
|
+
multiple: ue,
|
|
1616
|
+
onChange: je,
|
|
1617
|
+
ref: oe,
|
|
1612
1618
|
style: { display: "none" },
|
|
1613
1619
|
type: "file"
|
|
1614
1620
|
}
|
|
@@ -1616,12 +1622,12 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1616
1622
|
/* @__PURE__ */ L(
|
|
1617
1623
|
"button",
|
|
1618
1624
|
{
|
|
1619
|
-
"aria-busy":
|
|
1625
|
+
"aria-busy": le,
|
|
1620
1626
|
"aria-describedby": r ? `${Ie}-tip` : void 0,
|
|
1621
1627
|
"aria-haspopup": O ? "dialog" : void 0,
|
|
1622
1628
|
"aria-label": V,
|
|
1623
|
-
"aria-pressed":
|
|
1624
|
-
className:
|
|
1629
|
+
"aria-pressed": D ? Me : void 0,
|
|
1630
|
+
className: ie.join(" "),
|
|
1625
1631
|
disabled: $,
|
|
1626
1632
|
id: Ie,
|
|
1627
1633
|
name: De || void 0,
|
|
@@ -1636,12 +1642,12 @@ const yo = /* @__PURE__ */ i("svg", { fill: "currentColor", viewBox: "0 0 24 24"
|
|
|
1636
1642
|
]
|
|
1637
1643
|
}
|
|
1638
1644
|
),
|
|
1639
|
-
|
|
1640
|
-
|
|
1645
|
+
fe,
|
|
1646
|
+
T && /* @__PURE__ */ i(Pt, { align: ae, tooltip: T, triggerRef: $e })
|
|
1641
1647
|
] });
|
|
1642
1648
|
});
|
|
1643
1649
|
jt.displayName = "ButtonBase";
|
|
1644
|
-
const Dn =
|
|
1650
|
+
const Dn = B((e, t) => {
|
|
1645
1651
|
const {
|
|
1646
1652
|
elementClass: n,
|
|
1647
1653
|
density: o,
|
|
@@ -1651,7 +1657,7 @@ const Dn = M((e, t) => {
|
|
|
1651
1657
|
checked: d,
|
|
1652
1658
|
children: f,
|
|
1653
1659
|
color: m,
|
|
1654
|
-
uncheckedColor:
|
|
1660
|
+
uncheckedColor: g,
|
|
1655
1661
|
defaultChecked: u,
|
|
1656
1662
|
indeterminate: s,
|
|
1657
1663
|
hoverEffects: a = ["overlay"],
|
|
@@ -1659,42 +1665,42 @@ const Dn = M((e, t) => {
|
|
|
1659
1665
|
focusEffects: b = ["ring"],
|
|
1660
1666
|
selectedEffects: v = [],
|
|
1661
1667
|
pressedEffects: y = ["overlay"],
|
|
1662
|
-
id:
|
|
1668
|
+
id: h,
|
|
1663
1669
|
name: C,
|
|
1664
1670
|
label: N,
|
|
1665
1671
|
font: x,
|
|
1666
1672
|
border: S,
|
|
1667
1673
|
borderColor: $,
|
|
1668
|
-
uncheckedBorder:
|
|
1674
|
+
uncheckedBorder: M,
|
|
1669
1675
|
uncheckedBorderColor: k,
|
|
1670
|
-
onChange:
|
|
1676
|
+
onChange: R,
|
|
1671
1677
|
onFocus: H,
|
|
1672
1678
|
onBlur: z,
|
|
1673
1679
|
onClick: P,
|
|
1674
1680
|
type: Ce,
|
|
1675
1681
|
required: ge,
|
|
1676
1682
|
shape: xe = "smooth",
|
|
1677
|
-
title:
|
|
1678
|
-
filled:
|
|
1683
|
+
title: me,
|
|
1684
|
+
filled: se,
|
|
1679
1685
|
value: j,
|
|
1680
1686
|
size: O = "small",
|
|
1681
1687
|
uncheckedIcon: ke,
|
|
1682
|
-
indeterminateIcon:
|
|
1683
|
-
description:
|
|
1688
|
+
indeterminateIcon: ue,
|
|
1689
|
+
description: je,
|
|
1684
1690
|
descriptionColor: J,
|
|
1685
1691
|
descriptionFont: De,
|
|
1686
|
-
className:
|
|
1692
|
+
className: le,
|
|
1687
1693
|
error: ee,
|
|
1688
1694
|
animation: ye,
|
|
1689
|
-
focusColor:
|
|
1695
|
+
focusColor: he,
|
|
1690
1696
|
labelColor: _,
|
|
1691
|
-
textColor:
|
|
1692
|
-
readOnly:
|
|
1693
|
-
tooltipAlign:
|
|
1694
|
-
textPlacement:
|
|
1697
|
+
textColor: D,
|
|
1698
|
+
readOnly: ae,
|
|
1699
|
+
tooltipAlign: Re = "auto",
|
|
1700
|
+
textPlacement: Te = "end",
|
|
1695
1701
|
"aria-label": Se,
|
|
1696
1702
|
...W
|
|
1697
|
-
} = e, { animationVars:
|
|
1703
|
+
} = e, { animationVars: te, animate: Q, animating: de, animationClasses: Me } = nn(
|
|
1698
1704
|
ye,
|
|
1699
1705
|
{
|
|
1700
1706
|
animation: "none",
|
|
@@ -1702,111 +1708,111 @@ const Dn = M((e, t) => {
|
|
|
1702
1708
|
style: "regular"
|
|
1703
1709
|
},
|
|
1704
1710
|
{ oneShot: !0 }
|
|
1705
|
-
),
|
|
1711
|
+
), oe = Bt(uo), Le = Ce === "radio" ? C ?? (oe == null ? void 0 : oe.name) : C, $e = Bt(on), Ke = c ?? ($e == null ? void 0 : $e.disabled), { focusVisible: Ie, isFocused: fe, focusHandlers: we } = wt(H, z), ie = U(null), Be = U(null), ce = U(null), Ne = Nt("check"), G = h ?? Ne, K = d !== void 0, [He, be] = Z(u ?? !1);
|
|
1706
1712
|
let I;
|
|
1707
|
-
K ? I = !!d : (
|
|
1708
|
-
const Y = s ? "indeterminate" : I ? "checked" : "unchecked", [
|
|
1709
|
-
if (
|
|
1713
|
+
K ? I = !!d : (oe == null ? void 0 : oe.value) !== void 0 ? I = oe.value === j : I = He;
|
|
1714
|
+
const Y = s ? "indeterminate" : I ? "checked" : "unchecked", [Ve, ne] = Z(Y), Ge = Se ?? (N ? void 0 : me), ze = ee ? "error" : !I && !s && g ? g : m, Ze = me ? /* @__PURE__ */ i("div", { id: `${G}-tip`, children: me }) : null, qe = (Je) => {
|
|
1715
|
+
if (ae) {
|
|
1710
1716
|
Je.preventDefault();
|
|
1711
1717
|
return;
|
|
1712
1718
|
}
|
|
1713
1719
|
const Ht = Je.currentTarget;
|
|
1714
|
-
K || (Ce === "radio" && (
|
|
1715
|
-
},
|
|
1716
|
-
if (
|
|
1720
|
+
K || (Ce === "radio" && (oe != null && oe.setValue) && oe.setValue(Ht.value), be(Ht.checked)), R == null || R(Je);
|
|
1721
|
+
}, T = (Je) => {
|
|
1722
|
+
if (ae) {
|
|
1717
1723
|
Je.preventDefault();
|
|
1718
1724
|
return;
|
|
1719
1725
|
}
|
|
1720
|
-
p.includes("ripple") &&
|
|
1726
|
+
p.includes("ripple") && ce.current && Be.current && Mt(ce.current, Je, Be.current), P == null || P(Je);
|
|
1721
1727
|
};
|
|
1722
|
-
|
|
1723
|
-
Y !==
|
|
1724
|
-
}, [Y,
|
|
1725
|
-
|
|
1726
|
-
}, [
|
|
1727
|
-
const q =
|
|
1728
|
+
pe(() => {
|
|
1729
|
+
Y !== Ve && ye && Q();
|
|
1730
|
+
}, [Y, Ve, ye, Q]), pe(() => {
|
|
1731
|
+
de || ne(Y);
|
|
1732
|
+
}, [de, Y]);
|
|
1733
|
+
const q = F(), V = [
|
|
1728
1734
|
n,
|
|
1729
1735
|
"uui-cb",
|
|
1730
1736
|
ot(o),
|
|
1731
|
-
|
|
1737
|
+
le,
|
|
1732
1738
|
Ke && "uui-disabled",
|
|
1733
1739
|
...f ? [] : [ft(O)]
|
|
1734
1740
|
].filter(Boolean).join(" "), E = [
|
|
1735
1741
|
"uui-cb-control",
|
|
1736
1742
|
I && "uui-checked",
|
|
1737
1743
|
s && "uui-indeterminate",
|
|
1738
|
-
|
|
1739
|
-
...a.includes("overlay") && !
|
|
1740
|
-
...b.includes("overlay") && Ie &&
|
|
1744
|
+
se && "uui-filled",
|
|
1745
|
+
...a.includes("overlay") && !ae ? ["uui-hover-overlay"] : [],
|
|
1746
|
+
...b.includes("overlay") && Ie && fe ? ["uui-focus-overlay"] : [],
|
|
1741
1747
|
...v.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
1742
|
-
...y.includes("overlay") && !
|
|
1748
|
+
...y.includes("overlay") && !ae ? ["uui-pressed-overlay"] : [],
|
|
1743
1749
|
...f ? [We(xe)] : ["uui-round"]
|
|
1744
|
-
].filter(Boolean).join(" "),
|
|
1745
|
-
|
|
1750
|
+
].filter(Boolean).join(" "), Ae = F();
|
|
1751
|
+
he && Ie && fe && Ae.set("--uui-focus-color", so(he).color);
|
|
1746
1752
|
const _e = [
|
|
1747
1753
|
"uui-input",
|
|
1748
|
-
b.includes("ring") && Ie &&
|
|
1749
|
-
].filter(Boolean).join(" "), mt = ["uui-state"].filter(Boolean).join(" "), $t =
|
|
1754
|
+
b.includes("ring") && Ie && fe && "uui-focus-visible uui-focus-ring"
|
|
1755
|
+
].filter(Boolean).join(" "), mt = ["uui-state"].filter(Boolean).join(" "), $t = F();
|
|
1750
1756
|
$t.bg(ze);
|
|
1751
1757
|
const Ye = [
|
|
1752
1758
|
"uui-cb-glyph",
|
|
1753
1759
|
ut(r),
|
|
1754
1760
|
We(xe),
|
|
1755
|
-
rt(I ? S :
|
|
1756
|
-
].filter(Boolean).join(" "), gt =
|
|
1757
|
-
ve.merge(
|
|
1761
|
+
rt(I ? S : M)
|
|
1762
|
+
].filter(Boolean).join(" "), gt = F(), Xe = ["uui-icon", Me].filter(Boolean).join(" "), ve = F();
|
|
1763
|
+
ve.merge(te), I || s || g ? (gt.border(ee ? "error" : $), se ? (!I && !ke && !s || gt.bg(ze), ve.text.on(ze)) : ve.text(ze)) : (se && ke ? (ve.text(ee ? "onError" : "surface"), gt.bg(ee ? "error" : "onSurfaceVariant")) : ke && ve.text(ee ? "error" : "onSurfaceVariant"), gt.border(ee ? "error" : k));
|
|
1758
1764
|
let it;
|
|
1759
1765
|
if (f) {
|
|
1760
1766
|
const Je = ["uui-cb-content uui-overflow-hidden", We(xe), rt(S)].filter(Boolean).join(" ");
|
|
1761
1767
|
it = /* @__PURE__ */ i("div", { className: Je, children: f });
|
|
1762
1768
|
} else {
|
|
1763
|
-
const Je =
|
|
1769
|
+
const Je = Ve === "indeterminate" ? ue : Ve === "checked" ? l : ke;
|
|
1764
1770
|
it = /* @__PURE__ */ i("div", { className: Ye, style: gt.get(), children: /* @__PURE__ */ i("div", { className: Xe, style: ve.get(), children: Je }) });
|
|
1765
1771
|
}
|
|
1766
|
-
const yt =
|
|
1767
|
-
yt.text((ee ? "error" : void 0) ?? _ ??
|
|
1772
|
+
const yt = F();
|
|
1773
|
+
yt.text((ee ? "error" : void 0) ?? _ ?? D ?? "onSurface");
|
|
1768
1774
|
const kt = [Ee(x ?? "bodyMedium"), "uui-cb-label"].join(" "), Ot = N && /* @__PURE__ */ L("label", { className: kt, htmlFor: G, style: yt.get(), children: [
|
|
1769
1775
|
N,
|
|
1770
1776
|
ge && /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
1771
|
-
] }), St =
|
|
1772
|
-
|
|
1773
|
-
const lt = /* @__PURE__ */ i(
|
|
1777
|
+
] }), St = F(), bt = F();
|
|
1778
|
+
Te === "end" ? (yt.set("gridColumn", 2), St.set("gridColumn", 2), bt.set("gridColumn", 1)) : Te === "start" ? (yt.set("gridColumn", 1), St.set("gridColumn", 1), bt.set("gridColumn", 2), bt.set("gridRow", 1)) : (q.set("gridTemplateColumns", "1fr"), q.set("justifyItems", "start")), Te === "top" && (bt.set("order", 1), St.set("order", 2));
|
|
1779
|
+
const lt = /* @__PURE__ */ i(cn, { description: je, error: ee, style: St.get() }), vt = (Ot ?? lt) && /* @__PURE__ */ L(nt, { children: [
|
|
1774
1780
|
Ot,
|
|
1775
1781
|
lt
|
|
1776
1782
|
] });
|
|
1777
1783
|
return /* @__PURE__ */ L("div", { className: V, style: q.get(), children: [
|
|
1778
|
-
/* @__PURE__ */ i("div", { className: "uui-cb-control-wrapper", style: bt.get(), children: /* @__PURE__ */ L("div", { className: E, ref: Be, style:
|
|
1784
|
+
/* @__PURE__ */ i("div", { className: "uui-cb-control-wrapper", style: bt.get(), children: /* @__PURE__ */ L("div", { className: E, ref: Be, style: Ae.get(), children: [
|
|
1779
1785
|
/* @__PURE__ */ i(
|
|
1780
1786
|
"input",
|
|
1781
1787
|
{
|
|
1782
1788
|
...we,
|
|
1783
1789
|
"aria-label": Ge,
|
|
1784
|
-
"aria-readonly":
|
|
1790
|
+
"aria-readonly": ae === !0 ? !0 : void 0,
|
|
1785
1791
|
checked: !!I,
|
|
1786
1792
|
className: _e,
|
|
1787
1793
|
disabled: Ke,
|
|
1788
1794
|
id: G,
|
|
1789
1795
|
name: Le,
|
|
1790
1796
|
onChange: qe,
|
|
1791
|
-
onClick:
|
|
1792
|
-
readOnly:
|
|
1793
|
-
ref: st(
|
|
1797
|
+
onClick: T,
|
|
1798
|
+
readOnly: ae,
|
|
1799
|
+
ref: st(ie, t),
|
|
1794
1800
|
type: Ce,
|
|
1795
1801
|
value: j,
|
|
1796
1802
|
...W
|
|
1797
1803
|
}
|
|
1798
1804
|
),
|
|
1799
|
-
/* @__PURE__ */ i("div", { className: mt, ref:
|
|
1805
|
+
/* @__PURE__ */ i("div", { className: mt, ref: ce, style: $t.get() }),
|
|
1800
1806
|
it
|
|
1801
1807
|
] }) }),
|
|
1802
1808
|
vt,
|
|
1803
|
-
Ze && /* @__PURE__ */ i(Pt, { align:
|
|
1809
|
+
Ze && /* @__PURE__ */ i(Pt, { align: Re, tooltip: Ze, triggerRef: ie })
|
|
1804
1810
|
] });
|
|
1805
1811
|
});
|
|
1806
1812
|
Dn.displayName = "CheckBoxBase";
|
|
1807
|
-
const nr =
|
|
1813
|
+
const nr = B((e, t) => /* @__PURE__ */ i(fn, { ref: t, ...e, elementClass: "uui-dialog" }));
|
|
1808
1814
|
nr.displayName = "Dialog";
|
|
1809
|
-
const Vt =
|
|
1815
|
+
const Vt = B(
|
|
1810
1816
|
({
|
|
1811
1817
|
"aria-label": e,
|
|
1812
1818
|
endIcon: t,
|
|
@@ -1818,10 +1824,10 @@ const Vt = M(
|
|
|
1818
1824
|
title: d,
|
|
1819
1825
|
children: f,
|
|
1820
1826
|
...m
|
|
1821
|
-
},
|
|
1827
|
+
}, g) => /* @__PURE__ */ i(
|
|
1822
1828
|
jt,
|
|
1823
1829
|
{
|
|
1824
|
-
ref:
|
|
1830
|
+
ref: g,
|
|
1825
1831
|
...m,
|
|
1826
1832
|
"aria-label": e ?? r,
|
|
1827
1833
|
elementClass: "uui-icon-button",
|
|
@@ -1839,14 +1845,14 @@ function At(e) {
|
|
|
1839
1845
|
return dt(e) && typeof e.type != "string" && !!e.type[No];
|
|
1840
1846
|
}
|
|
1841
1847
|
const Fn = Symbol.for("uui.menuitem");
|
|
1842
|
-
function
|
|
1848
|
+
function gn(e) {
|
|
1843
1849
|
return dt(e) && typeof e.type != "string" && !!e.type[Fn];
|
|
1844
1850
|
}
|
|
1845
1851
|
const ko = Symbol.for("uui.divider");
|
|
1846
|
-
function
|
|
1852
|
+
function yn(e) {
|
|
1847
1853
|
return dt(e) && typeof e.type != "string" && !!e.type[ko];
|
|
1848
1854
|
}
|
|
1849
|
-
const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e,
|
|
1855
|
+
const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, un = B(
|
|
1850
1856
|
({
|
|
1851
1857
|
anchorRef: e,
|
|
1852
1858
|
open: t = !1,
|
|
@@ -1858,7 +1864,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1858
1864
|
elevation: d,
|
|
1859
1865
|
dockedElevation: f,
|
|
1860
1866
|
shape: m,
|
|
1861
|
-
border:
|
|
1867
|
+
border: g,
|
|
1862
1868
|
borderColor: u,
|
|
1863
1869
|
className: s,
|
|
1864
1870
|
children: a,
|
|
@@ -1866,63 +1872,63 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1866
1872
|
id: b,
|
|
1867
1873
|
onClose: v,
|
|
1868
1874
|
variant: y = "classic",
|
|
1869
|
-
animation:
|
|
1875
|
+
animation: h = "scale",
|
|
1870
1876
|
duration: C,
|
|
1871
1877
|
motionStyle: N = "regular",
|
|
1872
1878
|
fixedLeading: x,
|
|
1873
1879
|
density: S,
|
|
1874
1880
|
__level: $,
|
|
1875
|
-
__groupId:
|
|
1881
|
+
__groupId: M,
|
|
1876
1882
|
__closeRootMenu: k,
|
|
1877
|
-
__navigateHorizontal:
|
|
1883
|
+
__navigateHorizontal: R,
|
|
1878
1884
|
__horizontalDepth: H,
|
|
1879
1885
|
docked: z,
|
|
1880
1886
|
textColor: P,
|
|
1881
1887
|
descriptionColor: Ce,
|
|
1882
1888
|
labelColor: ge,
|
|
1883
1889
|
shortcutColor: xe,
|
|
1884
|
-
uncheckedIcon:
|
|
1885
|
-
checkedIcon:
|
|
1890
|
+
uncheckedIcon: me,
|
|
1891
|
+
checkedIcon: se,
|
|
1886
1892
|
radioUncheckedIcon: j,
|
|
1887
1893
|
radioCheckedIcon: O,
|
|
1888
1894
|
selectedColor: ke,
|
|
1889
|
-
itemTouchEffects:
|
|
1890
|
-
itemSelectedEffects:
|
|
1895
|
+
itemTouchEffects: ue,
|
|
1896
|
+
itemSelectedEffects: je,
|
|
1891
1897
|
itemFocusEffects: J,
|
|
1892
1898
|
closeOnChange: De = !1,
|
|
1893
|
-
openOnHover:
|
|
1899
|
+
openOnHover: le = !0,
|
|
1894
1900
|
labelFont: ee,
|
|
1895
1901
|
font: ye,
|
|
1896
|
-
descriptionFont:
|
|
1902
|
+
descriptionFont: he,
|
|
1897
1903
|
shortcutFont: _,
|
|
1898
|
-
onFocus:
|
|
1899
|
-
onBlur:
|
|
1900
|
-
...
|
|
1901
|
-
},
|
|
1904
|
+
onFocus: D,
|
|
1905
|
+
onBlur: ae,
|
|
1906
|
+
...Re
|
|
1907
|
+
}, Te) => {
|
|
1902
1908
|
var zn;
|
|
1903
|
-
const Se = U("closed"), [W,
|
|
1909
|
+
const Se = U("closed"), [W, te] = Z(-1), [Q, de] = Z(-1), { focusVisible: Me, isFocused: oe, focusHandlers: Le } = wt(D, ae), $e = $ ?? 0, Ke = Nt("menu"), Ie = Nt("uui-menu-surface"), fe = M ?? b ?? Ke, we = Ie, ie = U(null), Be = U(null), [ce, Ne] = Z(null), G = W === -1, [K, He] = Z(!1), [be, I] = Z(!1), [Y, Ve] = Z("normal"), [ne, Ge] = Z(!1), [ze, Ze] = Z(-1), qe = r ?? (y === "modern" ? "surfaceContainerLow" : "surfaceContainer"), T = (z ? f : void 0) ?? d ?? (y === "modern" ? 3 : 2), [q, V] = Z(!1), E = h !== "none" ? C ?? 220 : 0, Ae = z ? 0 : E, _e = U(null), mt = U(null), $t = U(!1), Ye = W !== -1;
|
|
1904
1910
|
function gt(w) {
|
|
1905
|
-
return
|
|
1911
|
+
return gn(w) || yn(w);
|
|
1906
1912
|
}
|
|
1907
|
-
const Xe = et.Children.toArray(a).filter(gt), ve = Xe.reduce((w, A, X) => (
|
|
1913
|
+
const Xe = et.Children.toArray(a).filter(gt), ve = Xe.reduce((w, A, X) => (gn(A) && (A.props.disabled || w.push(X)), w), []);
|
|
1908
1914
|
function it() {
|
|
1909
|
-
Ye && (V(!0),
|
|
1915
|
+
Ye && (V(!0), te(-1));
|
|
1910
1916
|
}
|
|
1911
1917
|
function yt() {
|
|
1912
|
-
v == null || v(), !v && Ye && (it(),
|
|
1918
|
+
v == null || v(), !v && Ye && (it(), de(-1)), $e === 0 && (e != null && e.current) && e.current.focus();
|
|
1913
1919
|
}
|
|
1914
1920
|
function kt() {
|
|
1915
1921
|
k ? k() : yt();
|
|
1916
1922
|
}
|
|
1917
1923
|
function Ot(w) {
|
|
1918
|
-
return !
|
|
1924
|
+
return !ie.current || w === -1 ? null : ie.current.querySelector(`[data-menu-index="${String(w)}"]`);
|
|
1919
1925
|
}
|
|
1920
1926
|
function St(w) {
|
|
1921
1927
|
return `${we}-i${w}`;
|
|
1922
1928
|
}
|
|
1923
1929
|
function bt(w) {
|
|
1924
1930
|
const X = et.Children.toArray(Xe[w].props.children).find((at) => At(at));
|
|
1925
|
-
return dt(X) ? et.Children.toArray(X.props.children).filter((at) =>
|
|
1931
|
+
return dt(X) ? et.Children.toArray(X.props.children).filter((at) => yn(at) || gt(at)) : void 0;
|
|
1926
1932
|
}
|
|
1927
1933
|
function lt(w) {
|
|
1928
1934
|
if (w === -1 || ve.indexOf(w) === -1)
|
|
@@ -1935,7 +1941,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1935
1941
|
if (!X || X.length === 0)
|
|
1936
1942
|
return;
|
|
1937
1943
|
const Oe = Ot(w);
|
|
1938
|
-
Oe && (Be.current = Oe, V(!0),
|
|
1944
|
+
Oe && (Be.current = Oe, V(!0), te(w), setTimeout(() => {
|
|
1939
1945
|
V(!1);
|
|
1940
1946
|
}, E));
|
|
1941
1947
|
}
|
|
@@ -1949,9 +1955,9 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1949
1955
|
if (A === -1)
|
|
1950
1956
|
return;
|
|
1951
1957
|
let X;
|
|
1952
|
-
w ? X = ve[A + 1 < ve.length ? A + 1 : 0] : X = A > 0 ? ve[A - 1] : ve[ve.length - 1], X !== Q && (
|
|
1958
|
+
w ? X = ve[A + 1 < ve.length ? A + 1 : 0] : X = A > 0 ? ve[A - 1] : ve[ve.length - 1], X !== Q && (de(X), vt(X) ? lt(X) : it());
|
|
1953
1959
|
}
|
|
1954
|
-
|
|
1960
|
+
pe(() => {
|
|
1955
1961
|
const w = $t.current, A = Ye;
|
|
1956
1962
|
if (w && !A) {
|
|
1957
1963
|
const X = window.setTimeout(() => {
|
|
@@ -1962,18 +1968,18 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1962
1968
|
};
|
|
1963
1969
|
}
|
|
1964
1970
|
$t.current = A;
|
|
1965
|
-
}, [E, Ye]),
|
|
1971
|
+
}, [E, Ye]), pe(() => {
|
|
1966
1972
|
var w;
|
|
1967
|
-
!Ye &&
|
|
1968
|
-
}, [
|
|
1969
|
-
t ? (Se.current = "opening", V(!0),
|
|
1970
|
-
}, [t]),
|
|
1971
|
-
if (!t || !K || !
|
|
1973
|
+
!Ye && ne && (Ge(!1), te(-1), ze !== -1 ? (Ze(-1), lt(ze)) : (w = ie.current) == null || w.focus(), V(!1));
|
|
1974
|
+
}, [ne, ze, Ye]), pe(() => {
|
|
1975
|
+
t ? (Se.current = "opening", V(!0), Ve("normal"), He(!0), te(-1), I(!1), de(-1)) : (Se.current = "closing", V(!0), I(!1), Ve("reverse"));
|
|
1976
|
+
}, [t]), pe(() => {
|
|
1977
|
+
if (!t || !K || !ie.current)
|
|
1972
1978
|
return;
|
|
1973
1979
|
const w = () => {
|
|
1974
1980
|
const A = l ?? (n ? "dropdown" : "menu");
|
|
1975
1981
|
if (e != null && e.current) {
|
|
1976
|
-
const X =
|
|
1982
|
+
const X = Bn(e, ie, {
|
|
1977
1983
|
placement: o,
|
|
1978
1984
|
mode: A,
|
|
1979
1985
|
offset: c
|
|
@@ -1984,16 +1990,16 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
1984
1990
|
return z ? Ne({ x: 0, y: 0 }) : (window.addEventListener("resize", w), w()), I(!0), () => {
|
|
1985
1991
|
z || window.removeEventListener("resize", w);
|
|
1986
1992
|
};
|
|
1987
|
-
}, [e, z, l, n, c, t, o, K]),
|
|
1988
|
-
t && K &&
|
|
1993
|
+
}, [e, z, l, n, c, t, o, K]), pe(() => {
|
|
1994
|
+
t && K && ce && setTimeout(() => {
|
|
1989
1995
|
var w;
|
|
1990
|
-
Se.current === "opening" && (V(!1), Se.current = "opened", z || (w =
|
|
1991
|
-
},
|
|
1992
|
-
}, [t,
|
|
1993
|
-
Y === "reverse" && Se.current === "closing" && (I(!0),
|
|
1996
|
+
Se.current === "opening" && (V(!1), Se.current = "opened", z || (w = ie.current) == null || w.focus(), de(Me ? ve[0] ?? -1 : -1));
|
|
1997
|
+
}, Ae);
|
|
1998
|
+
}, [t, ce, K]), pe(() => {
|
|
1999
|
+
Y === "reverse" && Se.current === "closing" && (I(!0), de(-1), setTimeout(() => {
|
|
1994
2000
|
Se.current === "closing" && (Se.current = "closed", He(!1), Ne(null), V(!1));
|
|
1995
2001
|
}, E * 0.67));
|
|
1996
|
-
}, [E, Y]),
|
|
2002
|
+
}, [E, Y]), pe(() => {
|
|
1997
2003
|
if (Q < 0 || Se.current !== "opened")
|
|
1998
2004
|
return;
|
|
1999
2005
|
const w = Ot(Q);
|
|
@@ -2001,11 +2007,11 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2001
2007
|
block: "nearest",
|
|
2002
2008
|
inline: "nearest"
|
|
2003
2009
|
});
|
|
2004
|
-
}, [Q]),
|
|
2005
|
-
|
|
2006
|
-
}, [Q, Me,
|
|
2010
|
+
}, [Q]), pe(() => {
|
|
2011
|
+
oe && Me && Q === -1 && Se.current === "opened" && ve.length > 0 && de(ve[0]);
|
|
2012
|
+
}, [Q, Me, oe]), co(
|
|
2007
2013
|
t && $e === 0,
|
|
2008
|
-
`[data-menu-group="${
|
|
2014
|
+
`[data-menu-group="${fe}"]`,
|
|
2009
2015
|
() => {
|
|
2010
2016
|
kt();
|
|
2011
2017
|
},
|
|
@@ -2014,7 +2020,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2014
2020
|
function Ht(w) {
|
|
2015
2021
|
var X, Oe, at, Kn;
|
|
2016
2022
|
const A = w;
|
|
2017
|
-
A !== -1 && (Xe[A].props.disabled || (
|
|
2023
|
+
A !== -1 && (Xe[A].props.disabled || (de(A), vt(A) ? Ye && A === W ? it() : lt(A) : Xe[A].props.type === "radio" || Xe[A].props.type === "checkbox" || Xe[A].props.type === "option" ? ((Oe = (X = Xe[A].props).onChange) == null || Oe.call(X), De && kt()) : ((Kn = (at = Xe[A].props).onClick) == null || Kn.call(at), kt())));
|
|
2018
2024
|
}
|
|
2019
2025
|
function Ho(w, A) {
|
|
2020
2026
|
if (q) {
|
|
@@ -2024,7 +2030,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2024
2030
|
Ht(A);
|
|
2025
2031
|
}
|
|
2026
2032
|
function _o(w, A) {
|
|
2027
|
-
if (!(!
|
|
2033
|
+
if (!(!le || Me && oe)) {
|
|
2028
2034
|
if (mt.current && (clearTimeout(mt.current), mt.current = null), _e.current && (clearTimeout(_e.current), _e.current = null), !vt(A)) {
|
|
2029
2035
|
Ye && (mt.current = window.setTimeout(() => {
|
|
2030
2036
|
it();
|
|
@@ -2032,7 +2038,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2032
2038
|
return;
|
|
2033
2039
|
}
|
|
2034
2040
|
Ye && W === A || (_e.current = window.setTimeout(() => {
|
|
2035
|
-
|
|
2041
|
+
de(A), lt(A);
|
|
2036
2042
|
}, 150));
|
|
2037
2043
|
}
|
|
2038
2044
|
}
|
|
@@ -2042,15 +2048,15 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2042
2048
|
const Uo = Xe.some(
|
|
2043
2049
|
(w) => w.props.icon !== void 0 || w.props.leading !== void 0 || w.props.type === "radio" || w.props.type === "checkbox"
|
|
2044
2050
|
), zo = Xe.map((w, A) => {
|
|
2045
|
-
if (
|
|
2051
|
+
if (gn(w)) {
|
|
2046
2052
|
const X = {
|
|
2047
2053
|
"data-menu-index": A,
|
|
2048
2054
|
__interactionsDisabled: q,
|
|
2049
2055
|
__index: A,
|
|
2050
2056
|
id: w.props.id ?? St(A),
|
|
2051
2057
|
disabled: w.props.disabled,
|
|
2052
|
-
active: A === Q &&
|
|
2053
|
-
focusVisible: Me &&
|
|
2058
|
+
active: A === Q && oe,
|
|
2059
|
+
focusVisible: Me && oe,
|
|
2054
2060
|
horizontal: n,
|
|
2055
2061
|
expanded: Ye && W === A,
|
|
2056
2062
|
fixedLeading: w.props.fixedLeading ?? (x && Uo),
|
|
@@ -2062,15 +2068,15 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2062
2068
|
textColor: w.props.textColor ?? P,
|
|
2063
2069
|
labelColor: w.props.labelColor ?? ge,
|
|
2064
2070
|
descriptionColor: w.props.descriptionColor ?? Ce,
|
|
2065
|
-
checkedIcon: w.props.checkedIcon ?? (w.props.type === "checkbox" ?
|
|
2066
|
-
uncheckedIcon: w.props.uncheckedIcon ?? (w.props.type === "checkbox" ?
|
|
2071
|
+
checkedIcon: w.props.checkedIcon ?? (w.props.type === "checkbox" ? se : O),
|
|
2072
|
+
uncheckedIcon: w.props.uncheckedIcon ?? (w.props.type === "checkbox" ? me : j),
|
|
2067
2073
|
selectedColor: w.props.selectedColor ?? ke,
|
|
2068
|
-
touchEffects: w.props.touchEffects ??
|
|
2069
|
-
selectedEffects: w.props.selectedEffects ??
|
|
2074
|
+
touchEffects: w.props.touchEffects ?? ue,
|
|
2075
|
+
selectedEffects: w.props.selectedEffects ?? je,
|
|
2070
2076
|
focusEffects: w.props.focusEffects ?? J,
|
|
2071
2077
|
labelFont: w.props.labelFont ?? ee,
|
|
2072
2078
|
font: w.props.font ?? ye,
|
|
2073
|
-
descriptionFont: w.props.descriptionFont ??
|
|
2079
|
+
descriptionFont: w.props.descriptionFont ?? he,
|
|
2074
2080
|
shortcutFont: w.props.shortcutFont ?? _,
|
|
2075
2081
|
onClick: (Oe) => {
|
|
2076
2082
|
Ho(Oe, A);
|
|
@@ -2086,8 +2092,8 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2086
2092
|
...w.props,
|
|
2087
2093
|
...X
|
|
2088
2094
|
});
|
|
2089
|
-
} else if (
|
|
2090
|
-
const X =
|
|
2095
|
+
} else if (yn(w)) {
|
|
2096
|
+
const X = Cn(qe) === "onSurface" ? "outlineVariant" : Cn(qe), Oe = {
|
|
2091
2097
|
borderColor: w.props.borderColor ?? w.props.color ?? X ?? "outlineVariant",
|
|
2092
2098
|
vertical: n,
|
|
2093
2099
|
insetSize: w.props.insetSize ?? 8,
|
|
@@ -2122,26 +2128,26 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2122
2128
|
let Oe;
|
|
2123
2129
|
switch (A) {
|
|
2124
2130
|
case "ArrowUp":
|
|
2125
|
-
w.preventDefault(), Q === -1 || X === -1 ? Oe = ve[ve.length - 1] : Oe = X > 0 ? ve[X - 1] : ve[ve.length - 1],
|
|
2131
|
+
w.preventDefault(), Q === -1 || X === -1 ? Oe = ve[ve.length - 1] : Oe = X > 0 ? ve[X - 1] : ve[ve.length - 1], de(Oe), n && vt(Oe) && lt(Oe);
|
|
2126
2132
|
break;
|
|
2127
2133
|
case "ArrowDown":
|
|
2128
|
-
w.preventDefault(), Q === -1 || X === -1 ? Oe = ve[0] : Oe = ve[X + 1 < ve.length ? X + 1 : 0],
|
|
2134
|
+
w.preventDefault(), Q === -1 || X === -1 ? Oe = ve[0] : Oe = ve[X + 1 < ve.length ? X + 1 : 0], de(Oe), n && vt(Oe) && lt(Oe);
|
|
2129
2135
|
break;
|
|
2130
2136
|
case "Home":
|
|
2131
|
-
|
|
2137
|
+
de(ve[0]);
|
|
2132
2138
|
break;
|
|
2133
2139
|
case "End":
|
|
2134
|
-
|
|
2140
|
+
de(ve[ve.length - 1]);
|
|
2135
2141
|
break;
|
|
2136
2142
|
case "Enter":
|
|
2137
2143
|
case " ":
|
|
2138
2144
|
w.stopPropagation(), w.preventDefault(), X >= 0 && Ht(ve[X]);
|
|
2139
2145
|
break;
|
|
2140
2146
|
case "ArrowRight":
|
|
2141
|
-
w.preventDefault(), X >= 0 && vt(ve[X]) ? lt(ve[X]) :
|
|
2147
|
+
w.preventDefault(), X >= 0 && vt(ve[X]) ? lt(ve[X]) : R && R(!0);
|
|
2142
2148
|
break;
|
|
2143
2149
|
case "ArrowLeft":
|
|
2144
|
-
w.preventDefault(),
|
|
2150
|
+
w.preventDefault(), R && H === 1 ? R(!1) : yt();
|
|
2145
2151
|
break;
|
|
2146
2152
|
case "Escape":
|
|
2147
2153
|
w.preventDefault(), yt();
|
|
@@ -2155,9 +2161,9 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2155
2161
|
return null;
|
|
2156
2162
|
const qo = {
|
|
2157
2163
|
"--uui-reverse": Y,
|
|
2158
|
-
"--uui-duration": Y === "reverse" ? String(
|
|
2159
|
-
}, Hn = or(
|
|
2160
|
-
Zt.bg(qe), Zt.text.on(qe),
|
|
2164
|
+
"--uui-duration": Y === "reverse" ? String(Ae * 0.67) + "ms" : String(Ae) + "ms"
|
|
2165
|
+
}, Hn = or(h), Go = Hn === "none" ? "" : Mn[Hn], Yo = N === "expressive" ? "uui-motion-expressive" : "", Zt = F({ ...p, ...qo });
|
|
2166
|
+
Zt.bg(qe), Zt.text.on(qe), g && +g > 0 && Zt.border(tn(u));
|
|
2161
2167
|
const Xo = [
|
|
2162
2168
|
"uui-menu",
|
|
2163
2169
|
`uui-menu-level-${String($e)}`,
|
|
@@ -2168,31 +2174,31 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2168
2174
|
Yo,
|
|
2169
2175
|
ot(S),
|
|
2170
2176
|
We(m ?? (y === "modern" ? "rounded" : "smooth")),
|
|
2171
|
-
ut(
|
|
2172
|
-
|
|
2177
|
+
ut(T),
|
|
2178
|
+
g !== void 0 ? rt(g) : null,
|
|
2173
2179
|
s
|
|
2174
|
-
].filter(Boolean).join(" "), Jo =
|
|
2180
|
+
].filter(Boolean).join(" "), Jo = oe && Q >= 0 && t && K ? ((zn = Xe[Q]) == null ? void 0 : zn.props).id ?? St(Q) : void 0, _n = /* @__PURE__ */ i(
|
|
2175
2181
|
"div",
|
|
2176
2182
|
{
|
|
2177
2183
|
...Le,
|
|
2178
2184
|
"aria-orientation": n ? "horizontal" : "vertical",
|
|
2179
2185
|
className: Xo,
|
|
2180
|
-
"data-menu-group":
|
|
2186
|
+
"data-menu-group": fe,
|
|
2181
2187
|
id: b,
|
|
2182
2188
|
onClick: Ko,
|
|
2183
2189
|
onKeyDown: Zo,
|
|
2184
|
-
ref: st(
|
|
2190
|
+
ref: st(Te, ie),
|
|
2185
2191
|
role: "menu",
|
|
2186
2192
|
style: {
|
|
2187
2193
|
position: z ? "relative" : "fixed",
|
|
2188
|
-
left: (
|
|
2189
|
-
top: (
|
|
2194
|
+
left: (ce == null ? void 0 : ce.x) ?? 0,
|
|
2195
|
+
top: (ce == null ? void 0 : ce.y) ?? 0,
|
|
2190
2196
|
zIndex: 9999,
|
|
2191
|
-
visibility:
|
|
2197
|
+
visibility: ce ? "visible" : "hidden",
|
|
2192
2198
|
...Zt.get()
|
|
2193
2199
|
},
|
|
2194
2200
|
tabIndex: 0,
|
|
2195
|
-
...
|
|
2201
|
+
...Re,
|
|
2196
2202
|
"aria-activedescendant": Jo,
|
|
2197
2203
|
children: /* @__PURE__ */ i("div", { className: "uui-menu-scroll", children: zo })
|
|
2198
2204
|
}
|
|
@@ -2202,44 +2208,44 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2202
2208
|
const w = bt(W);
|
|
2203
2209
|
w && w.length > 0 && (Wn = w);
|
|
2204
2210
|
}
|
|
2205
|
-
const Un =
|
|
2211
|
+
const Un = ln(
|
|
2206
2212
|
"uui-menu-root",
|
|
2207
2213
|
/* @__PURE__ */ L(nt, { children: [
|
|
2208
2214
|
!z && _n,
|
|
2209
2215
|
Be.current && W !== -1 && /* @__PURE__ */ i(
|
|
2210
|
-
|
|
2216
|
+
un,
|
|
2211
2217
|
{
|
|
2212
2218
|
__closeRootMenu: k ?? kt,
|
|
2213
|
-
__groupId:
|
|
2219
|
+
__groupId: fe,
|
|
2214
2220
|
__horizontalDepth: n ? 1 : H && H + 1,
|
|
2215
2221
|
__level: $e + 1,
|
|
2216
|
-
__navigateHorizontal: n ? Je :
|
|
2222
|
+
__navigateHorizontal: n ? Je : R,
|
|
2217
2223
|
anchorRef: Be,
|
|
2218
|
-
animation:
|
|
2224
|
+
animation: h,
|
|
2219
2225
|
"aria-orientation": "vertical",
|
|
2220
|
-
border:
|
|
2226
|
+
border: g,
|
|
2221
2227
|
borderColor: u,
|
|
2222
|
-
checkedIcon:
|
|
2228
|
+
checkedIcon: se,
|
|
2223
2229
|
closeOnChange: De,
|
|
2224
2230
|
color: qe,
|
|
2225
2231
|
density: S,
|
|
2226
2232
|
descriptionColor: Ce,
|
|
2227
|
-
descriptionFont:
|
|
2233
|
+
descriptionFont: he,
|
|
2228
2234
|
duration: C,
|
|
2229
2235
|
elevation: d,
|
|
2230
2236
|
fixedLeading: x,
|
|
2231
2237
|
floatingMode: n ? "menu" : "submenu",
|
|
2232
2238
|
font: ye,
|
|
2233
2239
|
itemFocusEffects: J,
|
|
2234
|
-
itemSelectedEffects:
|
|
2235
|
-
itemTouchEffects:
|
|
2240
|
+
itemSelectedEffects: je,
|
|
2241
|
+
itemTouchEffects: ue,
|
|
2236
2242
|
labelColor: ge,
|
|
2237
2243
|
labelFont: ee,
|
|
2238
2244
|
motionStyle: N,
|
|
2239
2245
|
offset: 0,
|
|
2240
2246
|
onClose: it,
|
|
2241
2247
|
open: t && Ye,
|
|
2242
|
-
openOnHover:
|
|
2248
|
+
openOnHover: le,
|
|
2243
2249
|
placement: "auto",
|
|
2244
2250
|
radioCheckedIcon: O,
|
|
2245
2251
|
radioUncheckedIcon: j,
|
|
@@ -2249,7 +2255,7 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2249
2255
|
shortcutColor: xe,
|
|
2250
2256
|
shortcutFont: _,
|
|
2251
2257
|
textColor: P,
|
|
2252
|
-
uncheckedIcon:
|
|
2258
|
+
uncheckedIcon: me,
|
|
2253
2259
|
variant: y,
|
|
2254
2260
|
children: Wn
|
|
2255
2261
|
}
|
|
@@ -2262,8 +2268,8 @@ const or = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, cn = M(
|
|
|
2262
2268
|
] }) : Un;
|
|
2263
2269
|
}
|
|
2264
2270
|
);
|
|
2265
|
-
|
|
2266
|
-
|
|
2271
|
+
un[No] = !0;
|
|
2272
|
+
un.displayName = "Menu";
|
|
2267
2273
|
const Rn = (e) => {
|
|
2268
2274
|
const {
|
|
2269
2275
|
children: t,
|
|
@@ -2275,7 +2281,7 @@ const Rn = (e) => {
|
|
|
2275
2281
|
shape: d = "round",
|
|
2276
2282
|
size: f = "medium",
|
|
2277
2283
|
elevation: m,
|
|
2278
|
-
ariaLabel:
|
|
2284
|
+
ariaLabel: g,
|
|
2279
2285
|
value: u,
|
|
2280
2286
|
font: s,
|
|
2281
2287
|
offset: a,
|
|
@@ -2286,16 +2292,16 @@ const Rn = (e) => {
|
|
|
2286
2292
|
We(d),
|
|
2287
2293
|
ft(f),
|
|
2288
2294
|
Ee(v)
|
|
2289
|
-
],
|
|
2295
|
+
], h = ["uui-badge-slot", ci(r)].filter(Boolean).join(" "), C = F();
|
|
2290
2296
|
C.bg(c), C.text.on(c), a !== void 0 && C.set("--uui-badge-offset", `${a}px`), m !== void 0 && y.push(ut(m)), o !== void 0 && (y.push(rt(o)), C.border(tn(l)));
|
|
2291
|
-
const N = y.filter(Boolean).join(" "), x = /* @__PURE__ */ i("span", { "aria-label":
|
|
2297
|
+
const N = y.filter(Boolean).join(" "), x = /* @__PURE__ */ i("span", { "aria-label": g, className: N, style: C.get(), children: f !== "small" && f !== "extraSmall" && u });
|
|
2292
2298
|
return t ? /* @__PURE__ */ L("span", { className: b, ...p, children: [
|
|
2293
2299
|
t,
|
|
2294
|
-
/* @__PURE__ */ i("span", { className:
|
|
2300
|
+
/* @__PURE__ */ i("span", { className: h, children: x })
|
|
2295
2301
|
] }) : x;
|
|
2296
2302
|
};
|
|
2297
2303
|
Rn.displayName = "Badge";
|
|
2298
|
-
const Tn =
|
|
2304
|
+
const Tn = B(
|
|
2299
2305
|
({
|
|
2300
2306
|
shape: e,
|
|
2301
2307
|
touchEffects: t = ["ripple"],
|
|
@@ -2307,7 +2313,7 @@ const Tn = M(
|
|
|
2307
2313
|
textColor: d,
|
|
2308
2314
|
labelColor: f,
|
|
2309
2315
|
descriptionColor: m,
|
|
2310
|
-
shortcutColor:
|
|
2316
|
+
shortcutColor: g,
|
|
2311
2317
|
fixedLeading: u,
|
|
2312
2318
|
color: s,
|
|
2313
2319
|
icon: a,
|
|
@@ -2315,75 +2321,75 @@ const Tn = M(
|
|
|
2315
2321
|
leading: b,
|
|
2316
2322
|
trailing: v,
|
|
2317
2323
|
label: y,
|
|
2318
|
-
disabled:
|
|
2324
|
+
disabled: h = !1,
|
|
2319
2325
|
className: C,
|
|
2320
2326
|
onClick: N,
|
|
2321
2327
|
badge: x,
|
|
2322
2328
|
expanded: S,
|
|
2323
2329
|
active: $,
|
|
2324
|
-
children:
|
|
2330
|
+
children: M,
|
|
2325
2331
|
focusVisible: k,
|
|
2326
|
-
type:
|
|
2332
|
+
type: R = "item",
|
|
2327
2333
|
checked: H,
|
|
2328
2334
|
description: z,
|
|
2329
2335
|
shortcut: P,
|
|
2330
2336
|
density: Ce,
|
|
2331
2337
|
horizontal: ge,
|
|
2332
2338
|
labelFont: xe,
|
|
2333
|
-
font:
|
|
2334
|
-
descriptionFont:
|
|
2339
|
+
font: me,
|
|
2340
|
+
descriptionFont: se,
|
|
2335
2341
|
shortcutFont: j,
|
|
2336
2342
|
selected: O,
|
|
2337
2343
|
__index: ke,
|
|
2338
|
-
__interactionsDisabled:
|
|
2339
|
-
onChange:
|
|
2344
|
+
__interactionsDisabled: ue,
|
|
2345
|
+
onChange: je,
|
|
2340
2346
|
variant: J = "classic",
|
|
2341
2347
|
...De
|
|
2342
|
-
},
|
|
2343
|
-
const ee = U(null), ye = et.Children.toArray(
|
|
2344
|
-
let
|
|
2345
|
-
|
|
2346
|
-
const
|
|
2348
|
+
}, le) => {
|
|
2349
|
+
const ee = U(null), ye = et.Children.toArray(M), he = ye.find((ne) => At(ne)), _ = ye.filter((ne) => !At(ne)), D = !!he;
|
|
2350
|
+
let ae;
|
|
2351
|
+
R !== "item" && (R === "radio" ? ae = H ? l ?? vo : c ?? Co : R === "checkbox" && (ae = H ? l ?? Ui : c));
|
|
2352
|
+
const Re = ae ?? b ?? a ?? (u && !ge), Te = Re && /* @__PURE__ */ i("div", { className: "uui-icon uui-leading", children: Re }), Se = v ?? p;
|
|
2347
2353
|
let W;
|
|
2348
2354
|
x && (typeof x == "string" || typeof x == "number" ? W = /* @__PURE__ */ i(Rn, { value: x }) : W = x);
|
|
2349
|
-
const
|
|
2350
|
-
|
|
2351
|
-
const Le =
|
|
2355
|
+
const te = J === "modern" ? "labelLarge" : "bodyLarge", Q = xe ?? me ?? te, de = se ?? (J === "modern" ? "bodySmall" : "bodyMedium"), Me = j ?? te, oe = F();
|
|
2356
|
+
oe.text(g);
|
|
2357
|
+
const Le = D && !ge ? yo : Se, $e = P && /* @__PURE__ */ i("div", { className: `uui-menu-item-shortcut ${Ee(Me)}`, style: oe.get(), children: P }), Ke = (P ?? x ?? Le) && /* @__PURE__ */ L(nt, { children: [
|
|
2352
2358
|
$e,
|
|
2353
2359
|
W,
|
|
2354
2360
|
Le && /* @__PURE__ */ i("div", { className: "uui-icon uui-trailing", children: Le })
|
|
2355
|
-
] }), Ie =
|
|
2361
|
+
] }), Ie = F();
|
|
2356
2362
|
Ie.text(f);
|
|
2357
|
-
const
|
|
2363
|
+
const fe = y && /* @__PURE__ */ i("div", { className: `uui-menu-item-label ${Ee(Q)}`, style: Ie.get(), children: y }), we = F();
|
|
2358
2364
|
(m || !d && J === "classic" && (s != null && s.startsWith("surface"))) && (m ? we.text(m) : we.text.on("surfaceVariant"));
|
|
2359
|
-
const
|
|
2365
|
+
const ie = z && /* @__PURE__ */ i(
|
|
2360
2366
|
"div",
|
|
2361
2367
|
{
|
|
2362
|
-
className: `uui-menu-item-description ${Ee(
|
|
2368
|
+
className: `uui-menu-item-description ${Ee(de)}`,
|
|
2363
2369
|
style: we.get(),
|
|
2364
2370
|
children: z
|
|
2365
2371
|
}
|
|
2366
|
-
), Be = (
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
] }),
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2372
|
+
), Be = (fe ?? ie) && /* @__PURE__ */ L("div", { className: "uui-menu-item-text", children: [
|
|
2373
|
+
fe,
|
|
2374
|
+
ie
|
|
2375
|
+
] }), ce = (ne) => {
|
|
2376
|
+
if (ue || h) {
|
|
2377
|
+
ne == null || ne.preventDefault();
|
|
2372
2378
|
return;
|
|
2373
2379
|
}
|
|
2374
|
-
N == null || N(
|
|
2380
|
+
N == null || N(ne), t.includes("ripple") && ee.current && ne && Mt(ee.current, ne);
|
|
2375
2381
|
};
|
|
2376
2382
|
let Ne = s ?? (J === "modern" ? "surfaceContainerLow" : "surfaceContainer");
|
|
2377
|
-
|
|
2378
|
-
const G =
|
|
2383
|
+
R === "option" && O && o.includes("color") && (Ne = r ?? (J === "modern" ? "tertiaryContainer" : "secondaryContainer"));
|
|
2384
|
+
const G = F();
|
|
2379
2385
|
G.bg.on(Ne);
|
|
2380
|
-
const K =
|
|
2386
|
+
const K = F();
|
|
2381
2387
|
K.bg(Ne), d ? K.text(d) : K.text.on(Ne);
|
|
2382
2388
|
const He = [
|
|
2383
2389
|
"uui-menu-item",
|
|
2384
2390
|
C,
|
|
2385
2391
|
ot(Ce),
|
|
2386
|
-
|
|
2392
|
+
h && "uui-disabled",
|
|
2387
2393
|
J === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
|
|
2388
2394
|
].filter(Boolean).join(" "), be = We(e ?? (J === "modern" ? "rounded" : "smooth")), I = [
|
|
2389
2395
|
"uui-menu-item-content",
|
|
@@ -2394,26 +2400,26 @@ const Tn = M(
|
|
|
2394
2400
|
$ && k && "uui-focus-visible"
|
|
2395
2401
|
].filter(Boolean).join(" "), Y = /* @__PURE__ */ L("div", { className: I, style: K.get(), children: [
|
|
2396
2402
|
_.length > 0 ? /* @__PURE__ */ i("div", { className: "uui-menu-item-children", children: _ }) : /* @__PURE__ */ L(nt, { children: [
|
|
2397
|
-
|
|
2403
|
+
Te,
|
|
2398
2404
|
Be,
|
|
2399
2405
|
Ke
|
|
2400
2406
|
] }),
|
|
2401
2407
|
/* @__PURE__ */ i("div", { className: ["uui-state", be].join(" "), style: G.get() })
|
|
2402
2408
|
] });
|
|
2403
|
-
let
|
|
2404
|
-
return (
|
|
2409
|
+
let Ve = "menuitem";
|
|
2410
|
+
return (R === "radio" || R === "checkbox") && (Ve = R === "radio" ? "menuitemradio" : "menuitemcheckbox"), // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
|
|
2405
2411
|
/* @__PURE__ */ i(
|
|
2406
2412
|
"div",
|
|
2407
2413
|
{
|
|
2408
2414
|
...De,
|
|
2409
|
-
"aria-checked":
|
|
2410
|
-
"aria-disabled":
|
|
2411
|
-
"aria-expanded":
|
|
2412
|
-
"aria-haspopup":
|
|
2415
|
+
"aria-checked": R === "radio" || R === "checkbox" ? H ?? !1 : void 0,
|
|
2416
|
+
"aria-disabled": h ? "true" : void 0,
|
|
2417
|
+
"aria-expanded": D ? S : void 0,
|
|
2418
|
+
"aria-haspopup": D ? "menu" : void 0,
|
|
2413
2419
|
className: He,
|
|
2414
|
-
onClick:
|
|
2415
|
-
ref: st(ee,
|
|
2416
|
-
role:
|
|
2420
|
+
onClick: ce,
|
|
2421
|
+
ref: st(ee, le),
|
|
2422
|
+
role: Ve,
|
|
2417
2423
|
tabIndex: -1,
|
|
2418
2424
|
children: Y
|
|
2419
2425
|
}
|
|
@@ -2426,8 +2432,8 @@ const So = Symbol.for("uui.action");
|
|
|
2426
2432
|
function ir(e) {
|
|
2427
2433
|
return dt(e) && typeof e.type != "string" && !!e.type[So];
|
|
2428
2434
|
}
|
|
2429
|
-
const
|
|
2430
|
-
const d = Vi(e).filter(ir), f = U(null), [m,
|
|
2435
|
+
const dn = ({ actions: e, className: t, align: n, stack: o, maxActions: l, moreLabel: c, moreIcon: r }) => {
|
|
2436
|
+
const d = Vi(e).filter(ir), f = U(null), [m, g] = Z(!1), u = F(), s = re(
|
|
2431
2437
|
"uui-actions",
|
|
2432
2438
|
n && n !== "end" && `uui-actions-${n}`,
|
|
2433
2439
|
o && "uui-actions-stack",
|
|
@@ -2442,40 +2448,40 @@ const un = ({ actions: e, className: t, align: n, stack: o, maxActions: l, moreL
|
|
|
2442
2448
|
"aria-label": c ?? "More actions",
|
|
2443
2449
|
icon: r ?? ji,
|
|
2444
2450
|
onClick: () => {
|
|
2445
|
-
|
|
2451
|
+
g((v) => !v);
|
|
2446
2452
|
},
|
|
2447
2453
|
ref: f
|
|
2448
2454
|
}
|
|
2449
2455
|
),
|
|
2450
2456
|
/* @__PURE__ */ i(
|
|
2451
|
-
|
|
2457
|
+
un,
|
|
2452
2458
|
{
|
|
2453
2459
|
anchorRef: f,
|
|
2454
2460
|
onClose: () => {
|
|
2455
|
-
|
|
2461
|
+
g(!1);
|
|
2456
2462
|
},
|
|
2457
2463
|
open: m,
|
|
2458
2464
|
children: b.map((v, y) => {
|
|
2459
2465
|
const {
|
|
2460
|
-
["aria-label"]:
|
|
2466
|
+
["aria-label"]: h,
|
|
2461
2467
|
disabled: C,
|
|
2462
2468
|
icon: N,
|
|
2463
2469
|
label: x,
|
|
2464
2470
|
leading: S,
|
|
2465
2471
|
onClick: $,
|
|
2466
|
-
trailing:
|
|
2472
|
+
trailing: M
|
|
2467
2473
|
} = v.props;
|
|
2468
2474
|
return /* @__PURE__ */ i(
|
|
2469
2475
|
Tn,
|
|
2470
2476
|
{
|
|
2471
2477
|
disabled: C,
|
|
2472
2478
|
icon: N,
|
|
2473
|
-
label: x ??
|
|
2479
|
+
label: x ?? h,
|
|
2474
2480
|
leading: S,
|
|
2475
2481
|
onClick: (k) => {
|
|
2476
|
-
|
|
2482
|
+
g(!1), $ == null || $(k);
|
|
2477
2483
|
},
|
|
2478
|
-
trailing:
|
|
2484
|
+
trailing: M
|
|
2479
2485
|
},
|
|
2480
2486
|
v.key ?? y
|
|
2481
2487
|
);
|
|
@@ -2485,9 +2491,9 @@ const un = ({ actions: e, className: t, align: n, stack: o, maxActions: l, moreL
|
|
|
2485
2491
|
] })
|
|
2486
2492
|
] }) : null;
|
|
2487
2493
|
};
|
|
2488
|
-
|
|
2494
|
+
dn.displayName = "Actions";
|
|
2489
2495
|
const Lo = ({ children: e, iconSlot: t, icon: n, showIcon: o, iconColor: l, className: c }) => {
|
|
2490
|
-
const r =
|
|
2496
|
+
const r = re("uui-dialog-content", c);
|
|
2491
2497
|
return e ? /* @__PURE__ */ L("div", { className: r, children: [
|
|
2492
2498
|
o !== !1 && n && (t === "contentLeft" || t === "contentRight") && /* @__PURE__ */ i(En, { className: `uui-icon-${t}`, color: l, icon: n }),
|
|
2493
2499
|
/* @__PURE__ */ i("div", { className: "uui-content", children: e })
|
|
@@ -2505,7 +2511,7 @@ const Io = ({
|
|
|
2505
2511
|
font: d = "headlineSmall"
|
|
2506
2512
|
}) => {
|
|
2507
2513
|
const f = c !== !1 && t && (n === "top" || n === "leading");
|
|
2508
|
-
return e || f ? /* @__PURE__ */ L("div", { className:
|
|
2514
|
+
return e || f ? /* @__PURE__ */ L("div", { className: re("uui-dialog-title", `uui-title-${n}`, o, Ee(d)), children: [
|
|
2509
2515
|
f && /* @__PURE__ */ i(En, { className: `uui-icon-${n}`, color: l, icon: t }),
|
|
2510
2516
|
e && /* @__PURE__ */ i("div", { className: `uui-title uui-title-${r}`, children: e })
|
|
2511
2517
|
] }) : null;
|
|
@@ -2522,7 +2528,7 @@ const Bo = ({
|
|
|
2522
2528
|
iconSlot: d,
|
|
2523
2529
|
titleAlign: f,
|
|
2524
2530
|
label: m,
|
|
2525
|
-
actions:
|
|
2531
|
+
actions: g,
|
|
2526
2532
|
actionsAlign: u,
|
|
2527
2533
|
actionsStack: s,
|
|
2528
2534
|
maxActions: a,
|
|
@@ -2530,13 +2536,13 @@ const Bo = ({
|
|
|
2530
2536
|
moreIcon: b,
|
|
2531
2537
|
trailing: v,
|
|
2532
2538
|
showClose: y,
|
|
2533
|
-
onClose:
|
|
2539
|
+
onClose: h,
|
|
2534
2540
|
closeIcon: C,
|
|
2535
2541
|
font: N
|
|
2536
2542
|
}) => {
|
|
2537
|
-
const x = n ??
|
|
2538
|
-
return /* @__PURE__ */ L("div", { className:
|
|
2539
|
-
/* @__PURE__ */ i(zt, { content: e, start:
|
|
2543
|
+
const x = n ?? h, S = o ?? Pi, $ = C ?? bo, M = t && /* @__PURE__ */ i(Vt, { icon: S, onClick: x }), k = y && /* @__PURE__ */ i(Vt, { icon: $, onClick: h });
|
|
2544
|
+
return /* @__PURE__ */ L("div", { className: re("uui-dialog-header"), children: [
|
|
2545
|
+
/* @__PURE__ */ i(zt, { content: e, start: M }),
|
|
2540
2546
|
/* @__PURE__ */ i(
|
|
2541
2547
|
Io,
|
|
2542
2548
|
{
|
|
@@ -2550,11 +2556,11 @@ const Bo = ({
|
|
|
2550
2556
|
}
|
|
2551
2557
|
),
|
|
2552
2558
|
/* @__PURE__ */ i(
|
|
2553
|
-
|
|
2559
|
+
dn,
|
|
2554
2560
|
{
|
|
2555
|
-
actions:
|
|
2561
|
+
actions: g,
|
|
2556
2562
|
align: u,
|
|
2557
|
-
className:
|
|
2563
|
+
className: re("uui-dialog-actions", "uui-actions-inline"),
|
|
2558
2564
|
maxActions: a,
|
|
2559
2565
|
moreIcon: b,
|
|
2560
2566
|
moreLabel: p,
|
|
@@ -2565,9 +2571,9 @@ const Bo = ({
|
|
|
2565
2571
|
] });
|
|
2566
2572
|
};
|
|
2567
2573
|
Bo.displayName = "DialogHeader";
|
|
2568
|
-
const rr =
|
|
2574
|
+
const rr = B((e, t) => /* @__PURE__ */ i(fn, { ref: t, ...e, elementClass: "uui-drawer", type: "dockRight" }));
|
|
2569
2575
|
rr.displayName = "Drawer";
|
|
2570
|
-
const sr =
|
|
2576
|
+
const sr = B((e, t) => /* @__PURE__ */ i(fn, { ref: t, ...e, elementClass: "uui-bottom-sheet", type: "dockBottom" }));
|
|
2571
2577
|
sr.displayName = "BottomSheet";
|
|
2572
2578
|
const lr = {
|
|
2573
2579
|
basic: "scale",
|
|
@@ -2579,7 +2585,7 @@ const lr = {
|
|
|
2579
2585
|
}, ar = (e, t) => {
|
|
2580
2586
|
const n = typeof t == "string" ? t : t == null ? void 0 : t.animation;
|
|
2581
2587
|
return n === "none" ? "none" : n ?? lr[e];
|
|
2582
|
-
},
|
|
2588
|
+
}, fn = B(
|
|
2583
2589
|
({
|
|
2584
2590
|
open: e,
|
|
2585
2591
|
onClose: t,
|
|
@@ -2591,7 +2597,7 @@ const lr = {
|
|
|
2591
2597
|
fullHeight: d,
|
|
2592
2598
|
size: f,
|
|
2593
2599
|
animation: m,
|
|
2594
|
-
fit:
|
|
2600
|
+
fit: g,
|
|
2595
2601
|
detached: u,
|
|
2596
2602
|
closeOnBackdrop: s = !0,
|
|
2597
2603
|
closeOnEsc: a = !0,
|
|
@@ -2599,113 +2605,113 @@ const lr = {
|
|
|
2599
2605
|
label: b,
|
|
2600
2606
|
icon: v,
|
|
2601
2607
|
showIcon: y,
|
|
2602
|
-
iconColor:
|
|
2608
|
+
iconColor: h,
|
|
2603
2609
|
iconSlot: C = "leading",
|
|
2604
2610
|
titleAlign: N,
|
|
2605
2611
|
leading: x,
|
|
2606
2612
|
trailing: S,
|
|
2607
2613
|
actions: $,
|
|
2608
|
-
actionsPlacement:
|
|
2614
|
+
actionsPlacement: M,
|
|
2609
2615
|
actionsAlign: k,
|
|
2610
|
-
actionsStack:
|
|
2616
|
+
actionsStack: R,
|
|
2611
2617
|
maxActions: H,
|
|
2612
2618
|
moreLabel: z,
|
|
2613
2619
|
moreIcon: P,
|
|
2614
2620
|
showClose: Ce,
|
|
2615
2621
|
closeIcon: ge,
|
|
2616
2622
|
showBack: xe,
|
|
2617
|
-
backIcon:
|
|
2618
|
-
onBack:
|
|
2623
|
+
backIcon: me,
|
|
2624
|
+
onBack: se,
|
|
2619
2625
|
className: j,
|
|
2620
2626
|
modal: O,
|
|
2621
2627
|
autoFocus: ke,
|
|
2622
|
-
flush:
|
|
2623
|
-
docked:
|
|
2628
|
+
flush: ue,
|
|
2629
|
+
docked: je,
|
|
2624
2630
|
anchored: J,
|
|
2625
2631
|
titleFont: De,
|
|
2626
|
-
...
|
|
2632
|
+
...le
|
|
2627
2633
|
}, ee) => {
|
|
2628
|
-
const ye = l ?? (n !== "fullscreen" ? 3 : void 0),
|
|
2634
|
+
const ye = l ?? (n !== "fullscreen" ? 3 : void 0), he = U(null), _ = U(null), [D, ae] = Z(!1), [Re, Te] = Z(!1), [Se, W] = Z(!1), te = m, { animationVars: Q, animate: de, animating: Me, idle: oe, active: Le, animationClasses: $e } = nn({
|
|
2629
2635
|
animation: ar(n, m),
|
|
2630
|
-
duration: (
|
|
2631
|
-
style:
|
|
2632
|
-
}), Ie = De ?? (n === "dockLeft" || n === "dockRight" ? "titleLarge" : void 0),
|
|
2633
|
-
if (_.current &&
|
|
2634
|
-
const { width: I, height: Y } = _.current.getBoundingClientRect(), { width:
|
|
2635
|
-
|
|
2636
|
+
duration: (te == null ? void 0 : te.duration) ?? 500,
|
|
2637
|
+
style: te == null ? void 0 : te.style
|
|
2638
|
+
}), Ie = De ?? (n === "dockLeft" || n === "dockRight" ? "titleLarge" : void 0), fe = (be) => {
|
|
2639
|
+
if (_.current && he.current) {
|
|
2640
|
+
const { width: I, height: Y } = _.current.getBoundingClientRect(), { width: Ve, height: ne } = he.current.getBoundingClientRect(), Ge = 1;
|
|
2641
|
+
Te((n === "dockLeft" || n === "dockRight") && Ve >= I - Ge), W((n === "dockTop" || n === "dockBottom") && ne >= Y - Ge);
|
|
2636
2642
|
}
|
|
2637
2643
|
}, we = n !== "basic" && n !== "fullscreen" && !u;
|
|
2638
|
-
|
|
2639
|
-
ref:
|
|
2640
|
-
enabled: O &&
|
|
2644
|
+
Nn(he, fe, we && !Me, !0), Nn(_, fe, we && !Me, !0), Mi(a && D, () => t == null ? void 0 : t()), Di({
|
|
2645
|
+
ref: he,
|
|
2646
|
+
enabled: O && D,
|
|
2641
2647
|
autoFocus: ke && !Le
|
|
2642
|
-
}),
|
|
2643
|
-
e ? (
|
|
2648
|
+
}), pe(() => {
|
|
2649
|
+
e ? (de("open"), ae(!0), W(!1), Te(!1)) : oe || (de("closed"), ae(!1));
|
|
2644
2650
|
}, [e]);
|
|
2645
|
-
const
|
|
2651
|
+
const ie = (be) => {
|
|
2646
2652
|
s && be.target === be.currentTarget && (t == null || t());
|
|
2647
2653
|
};
|
|
2648
|
-
|
|
2649
|
-
if (
|
|
2654
|
+
pe(() => {
|
|
2655
|
+
if (D && O && !J && !je) {
|
|
2650
2656
|
const be = document.body.style.overflow;
|
|
2651
2657
|
return document.body.style.overflow = "hidden", () => {
|
|
2652
2658
|
document.body.style.overflow = be;
|
|
2653
2659
|
};
|
|
2654
2660
|
}
|
|
2655
|
-
}, [J,
|
|
2656
|
-
|
|
2661
|
+
}, [J, je, O, D]), pe(() => {
|
|
2662
|
+
Te(!1), W(!1);
|
|
2657
2663
|
}, [n]);
|
|
2658
|
-
const Be =
|
|
2664
|
+
const Be = F();
|
|
2659
2665
|
Be.merge(Q);
|
|
2660
|
-
const
|
|
2666
|
+
const ce = f ?? (n === "dockLeft" || n === "dockRight" ? "small" : "medium"), Ne = re(
|
|
2661
2667
|
"uui-dlg-backdrop",
|
|
2662
2668
|
O && "uui-modal",
|
|
2663
|
-
|
|
2664
|
-
|
|
2669
|
+
D && "uui-open",
|
|
2670
|
+
je && "uui-docked",
|
|
2665
2671
|
J && "uui-anchored"
|
|
2666
|
-
), G =
|
|
2672
|
+
), G = re(
|
|
2667
2673
|
"uui-dlg",
|
|
2668
2674
|
`uui-dlg-${Tt(n)}`,
|
|
2669
2675
|
r && "uui-w-full",
|
|
2670
2676
|
d && "uui-h-full",
|
|
2671
|
-
(
|
|
2672
|
-
|
|
2673
|
-
|
|
2677
|
+
(Re || Se) && "uui-maximized",
|
|
2678
|
+
g && "uui-fit",
|
|
2679
|
+
ue && "uui-flush",
|
|
2674
2680
|
u && "uui-detached",
|
|
2675
|
-
ft(
|
|
2681
|
+
ft(ce),
|
|
2676
2682
|
$e,
|
|
2677
2683
|
j
|
|
2678
2684
|
);
|
|
2679
|
-
if (!(
|
|
2685
|
+
if (!(D || Le))
|
|
2680
2686
|
return null;
|
|
2681
|
-
const K =
|
|
2682
|
-
|
|
2687
|
+
const K = M !== "inline" ? /* @__PURE__ */ i(
|
|
2688
|
+
dn,
|
|
2683
2689
|
{
|
|
2684
2690
|
actions: $,
|
|
2685
2691
|
align: k,
|
|
2686
|
-
className:
|
|
2692
|
+
className: re("uui-dialog-actions", M && `uui-actions-${M}`),
|
|
2687
2693
|
maxActions: H,
|
|
2688
2694
|
moreIcon: P,
|
|
2689
2695
|
moreLabel: z,
|
|
2690
|
-
stack:
|
|
2696
|
+
stack: R
|
|
2691
2697
|
}
|
|
2692
2698
|
) : null, He = /* @__PURE__ */ i(
|
|
2693
2699
|
"div",
|
|
2694
2700
|
{
|
|
2695
2701
|
className: Ne,
|
|
2696
|
-
onClick:
|
|
2702
|
+
onClick: ie,
|
|
2697
2703
|
ref: _,
|
|
2698
2704
|
role: "presentation",
|
|
2699
2705
|
style: Q,
|
|
2700
2706
|
children: /* @__PURE__ */ L(
|
|
2701
|
-
|
|
2707
|
+
Fe,
|
|
2702
2708
|
{
|
|
2703
|
-
...
|
|
2709
|
+
...le,
|
|
2704
2710
|
"aria-modal": O ? !0 : void 0,
|
|
2705
2711
|
className: G,
|
|
2706
2712
|
color: o,
|
|
2707
2713
|
elevation: ye,
|
|
2708
|
-
ref: st(ee,
|
|
2714
|
+
ref: st(ee, he),
|
|
2709
2715
|
role: "dialog",
|
|
2710
2716
|
shape: c,
|
|
2711
2717
|
style: Be.get(),
|
|
@@ -2713,21 +2719,21 @@ const lr = {
|
|
|
2713
2719
|
/* @__PURE__ */ i(
|
|
2714
2720
|
Bo,
|
|
2715
2721
|
{
|
|
2716
|
-
actions:
|
|
2722
|
+
actions: M === "inline" && $,
|
|
2717
2723
|
actionsAlign: k,
|
|
2718
|
-
actionsStack:
|
|
2719
|
-
backIcon:
|
|
2724
|
+
actionsStack: R,
|
|
2725
|
+
backIcon: me,
|
|
2720
2726
|
closeIcon: ge,
|
|
2721
2727
|
font: Ie,
|
|
2722
2728
|
icon: v,
|
|
2723
|
-
iconColor:
|
|
2729
|
+
iconColor: h,
|
|
2724
2730
|
iconSlot: C,
|
|
2725
2731
|
label: b,
|
|
2726
2732
|
leading: x,
|
|
2727
2733
|
maxActions: H,
|
|
2728
2734
|
moreIcon: P,
|
|
2729
2735
|
moreLabel: z,
|
|
2730
|
-
onBack:
|
|
2736
|
+
onBack: se,
|
|
2731
2737
|
onClose: t,
|
|
2732
2738
|
showBack: xe,
|
|
2733
2739
|
showClose: Ce,
|
|
@@ -2736,18 +2742,18 @@ const lr = {
|
|
|
2736
2742
|
trailing: S
|
|
2737
2743
|
}
|
|
2738
2744
|
),
|
|
2739
|
-
/* @__PURE__ */ i(Lo, { icon: v, iconColor:
|
|
2745
|
+
/* @__PURE__ */ i(Lo, { icon: v, iconColor: h, iconSlot: C, showIcon: y, children: p }),
|
|
2740
2746
|
K
|
|
2741
2747
|
]
|
|
2742
2748
|
}
|
|
2743
2749
|
)
|
|
2744
2750
|
}
|
|
2745
2751
|
);
|
|
2746
|
-
return
|
|
2752
|
+
return je || J ? He : ln("uui-dialog-root", He);
|
|
2747
2753
|
}
|
|
2748
2754
|
);
|
|
2749
|
-
|
|
2750
|
-
const tt =
|
|
2755
|
+
fn.displayName = "DialogBase";
|
|
2756
|
+
const tt = B((e, t) => {
|
|
2751
2757
|
const {
|
|
2752
2758
|
elementClass: n,
|
|
2753
2759
|
color: o,
|
|
@@ -2757,7 +2763,7 @@ const tt = M((e, t) => {
|
|
|
2757
2763
|
labelFont: d,
|
|
2758
2764
|
id: f,
|
|
2759
2765
|
outlined: m,
|
|
2760
|
-
filled:
|
|
2766
|
+
filled: g,
|
|
2761
2767
|
classic: u,
|
|
2762
2768
|
disabled: s,
|
|
2763
2769
|
font: a,
|
|
@@ -2765,46 +2771,46 @@ const tt = M((e, t) => {
|
|
|
2765
2771
|
placeholderColor: b,
|
|
2766
2772
|
onFocus: v,
|
|
2767
2773
|
onBlur: y,
|
|
2768
|
-
border:
|
|
2774
|
+
border: h,
|
|
2769
2775
|
borderColor: C,
|
|
2770
2776
|
shape: N,
|
|
2771
2777
|
required: x,
|
|
2772
2778
|
title: S,
|
|
2773
2779
|
description: $,
|
|
2774
|
-
descriptionColor:
|
|
2780
|
+
descriptionColor: M,
|
|
2775
2781
|
descriptionFont: k,
|
|
2776
|
-
name:
|
|
2782
|
+
name: R,
|
|
2777
2783
|
error: H,
|
|
2778
2784
|
className: z,
|
|
2779
2785
|
placeholder: P,
|
|
2780
2786
|
type: Ce = "text",
|
|
2781
2787
|
icon: ge,
|
|
2782
2788
|
leading: xe,
|
|
2783
|
-
trailing:
|
|
2784
|
-
endIcon:
|
|
2789
|
+
trailing: me,
|
|
2790
|
+
endIcon: se,
|
|
2785
2791
|
variant: j,
|
|
2786
2792
|
value: O,
|
|
2787
2793
|
textColor: ke,
|
|
2788
|
-
defaultValue:
|
|
2789
|
-
...
|
|
2790
|
-
} = e, [J, De] = Z(
|
|
2794
|
+
defaultValue: ue,
|
|
2795
|
+
...je
|
|
2796
|
+
} = e, [J, De] = Z(ue ?? ""), le = O !== void 0, ye = (le ? O : J).length === 0, he = U(null), _ = U(null), D = Nt("input"), ae = f ?? D, [Re, Te] = Z(0), Se = xe ?? ge, W = j ?? (g && "filled") ?? (m && "outlined") ?? (u && "classic") ?? "filled", { isFocused: te, focusHandlers: Q } = wt(v, y), de = (V) => {
|
|
2791
2797
|
var E;
|
|
2792
|
-
|
|
2798
|
+
le || De(V.target.value), (E = e.onChange) == null || E.call(e, V);
|
|
2793
2799
|
}, Me = (V) => {
|
|
2794
2800
|
var E;
|
|
2795
|
-
V.preventDefault(), (E =
|
|
2801
|
+
V.preventDefault(), (E = he.current) == null || E.focus();
|
|
2796
2802
|
};
|
|
2797
|
-
|
|
2798
|
-
const V =
|
|
2803
|
+
pe(() => {
|
|
2804
|
+
const V = he.current;
|
|
2799
2805
|
V && V.value && De(V.value);
|
|
2800
|
-
}, []),
|
|
2801
|
-
const V = _.current, E =
|
|
2806
|
+
}, []), Sn(() => {
|
|
2807
|
+
const V = _.current, E = he.current;
|
|
2802
2808
|
if (!V || !E)
|
|
2803
2809
|
return;
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2810
|
+
const Ae = V.getBoundingClientRect().left - E.getBoundingClientRect().left + 16;
|
|
2811
|
+
Te((_e) => _e === Ae ? _e : Ae);
|
|
2806
2812
|
}, [Se]);
|
|
2807
|
-
const
|
|
2813
|
+
const oe = [
|
|
2808
2814
|
n,
|
|
2809
2815
|
z,
|
|
2810
2816
|
"uui-field uui-field-wrapper",
|
|
@@ -2822,7 +2828,7 @@ const tt = M((e, t) => {
|
|
|
2822
2828
|
children: V
|
|
2823
2829
|
}
|
|
2824
2830
|
) : null
|
|
2825
|
-
) }), $e =
|
|
2831
|
+
) }), $e = me ?? se, Ke = $e && /* @__PURE__ */ i("div", { className: "uui-trailing", children: et.Children.map(
|
|
2826
2832
|
$e,
|
|
2827
2833
|
(V) => V ? /* @__PURE__ */ i(
|
|
2828
2834
|
"span",
|
|
@@ -2837,65 +2843,65 @@ const tt = M((e, t) => {
|
|
|
2837
2843
|
) }), Ie = c && /* @__PURE__ */ L(nt, { children: [
|
|
2838
2844
|
c,
|
|
2839
2845
|
x && /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
|
|
2840
|
-
] }),
|
|
2846
|
+
] }), fe = h ?? (W !== "filled" ? 1 : void 0), we = [
|
|
2841
2847
|
"uui-field-control",
|
|
2842
2848
|
Ee(a ?? "bodyLarge"),
|
|
2843
2849
|
We(N ?? "rounded"),
|
|
2844
|
-
W !== "outlined" && rt(
|
|
2850
|
+
W !== "outlined" && rt(fe),
|
|
2845
2851
|
H && "uui-error",
|
|
2846
|
-
|
|
2852
|
+
te && "uui-active",
|
|
2847
2853
|
s && "uui-disabled",
|
|
2848
2854
|
Le && "uui-has-leading",
|
|
2849
2855
|
Ke && "uui-has-trailing"
|
|
2850
2856
|
];
|
|
2851
|
-
let
|
|
2852
|
-
const G =
|
|
2857
|
+
let ie, Be, ce, Ne;
|
|
2858
|
+
const G = F(), K = ["uui-fb-label"];
|
|
2853
2859
|
if (Ie)
|
|
2854
2860
|
if (W !== "classic")
|
|
2855
|
-
|
|
2861
|
+
te || !ye ? (G.text((H ? "error" : void 0) ?? o ?? "primary"), K.push(Ee(d ?? "bodySmall")), we.push("uui-fb-label-up")) : (G.text((H ? "error" : void 0) ?? "onSurfaceVariant"), K.push(Ee(a ?? "bodyLarge"))), K.push("uui-field-float-label"), W === "outlined" ? (ce = /* @__PURE__ */ i("legend", { className: Ee(d ?? "bodySmall"), children: Ie }), ie = /* @__PURE__ */ i("span", { className: K.join(" "), children: Ie })) : (Be = /* @__PURE__ */ i("span", { className: Ee(d ?? "bodySmall"), children: " " }), ie = /* @__PURE__ */ i("span", { className: K.join(" "), children: Ie }));
|
|
2856
2862
|
else {
|
|
2857
2863
|
G.text((H ? "error" : void 0) ?? "onSurface"), K.push(Ee(d ?? "bodyMedium"));
|
|
2858
2864
|
const V = K.filter(Boolean).join(" ");
|
|
2859
|
-
Ne = /* @__PURE__ */ i("label", { className: V, htmlFor:
|
|
2865
|
+
Ne = /* @__PURE__ */ i("label", { className: V, htmlFor: ae, style: G.get(), children: Ie });
|
|
2860
2866
|
}
|
|
2861
2867
|
let He;
|
|
2862
2868
|
if (W === "outlined") {
|
|
2863
|
-
const V = ["uui-field-fieldset", We(N ?? "rounded")].filter(Boolean).join(" "), E =
|
|
2864
|
-
E.set("borderWidth", `${
|
|
2869
|
+
const V = ["uui-field-fieldset", We(N ?? "rounded")].filter(Boolean).join(" "), E = F(), Ae = Ln(0, 4, h, 1);
|
|
2870
|
+
E.set("borderWidth", `${Ae}px`), E.border(C ?? "onSurfaceVariant"), He = /* @__PURE__ */ i("fieldset", { className: V, style: E.get(), children: ce });
|
|
2865
2871
|
}
|
|
2866
|
-
const be =
|
|
2867
|
-
be.set("--uui-label-up-x", `${
|
|
2868
|
-
const I = ["uui-field-state"].filter(Boolean).join(" "), Y =
|
|
2869
|
-
H ?
|
|
2870
|
-
const
|
|
2872
|
+
const be = F();
|
|
2873
|
+
be.set("--uui-label-up-x", `${Re}px`), W === "classic" && be.border(C ?? "outline"), W === "filled" && be.border(C ?? "onSurfaceVariant");
|
|
2874
|
+
const I = ["uui-field-state"].filter(Boolean).join(" "), Y = F(), Ve = F();
|
|
2875
|
+
H ? Ve.text("error") : M ? Ve.text(M) : Ve.text.on("surfaceVariant");
|
|
2876
|
+
const ne = [
|
|
2871
2877
|
Ee(k ?? "bodySmall"),
|
|
2872
2878
|
H && "uui-error uui-support-text",
|
|
2873
2879
|
$ && !H && "uui-description uui-support-text"
|
|
2874
|
-
].filter(Boolean).join(" "), Ge = ($ ?? H) && /* @__PURE__ */ i("div", { className:
|
|
2875
|
-
Ze.text("onSurface"), !
|
|
2876
|
-
const qe = ["uui-field-input-wrapper"].filter(Boolean).join(" "),
|
|
2877
|
-
return /* @__PURE__ */ L("div", { className:
|
|
2880
|
+
].filter(Boolean).join(" "), Ge = ($ ?? H) && /* @__PURE__ */ i("div", { className: ne, style: Ve.get(), children: H ?? $ }), ze = "uui-field-input", Ze = F();
|
|
2881
|
+
Ze.text("onSurface"), !te && ie && ye && Ze.set("opacity", 0);
|
|
2882
|
+
const qe = ["uui-field-input-wrapper"].filter(Boolean).join(" "), T = oe.filter(Boolean).join(" "), q = we.filter(Boolean).join(" ");
|
|
2883
|
+
return /* @__PURE__ */ L("div", { className: T, title: S, children: [
|
|
2878
2884
|
Ne,
|
|
2879
2885
|
/* @__PURE__ */ L("div", { className: q, onPointerDown: Me, ref: _, style: be.get(), children: [
|
|
2880
2886
|
Le,
|
|
2881
2887
|
/* @__PURE__ */ L("div", { className: qe, children: [
|
|
2882
2888
|
Be,
|
|
2883
|
-
|
|
2889
|
+
ie,
|
|
2884
2890
|
/* @__PURE__ */ i(
|
|
2885
2891
|
"input",
|
|
2886
2892
|
{
|
|
2887
2893
|
...Q,
|
|
2888
|
-
...
|
|
2889
|
-
...
|
|
2894
|
+
...je,
|
|
2895
|
+
...le ? { value: O } : { defaultValue: ue },
|
|
2890
2896
|
"aria-invalid": !!H,
|
|
2891
2897
|
autoComplete: "email",
|
|
2892
2898
|
className: ze,
|
|
2893
2899
|
disabled: s,
|
|
2894
|
-
id:
|
|
2895
|
-
name:
|
|
2896
|
-
onChange:
|
|
2900
|
+
id: ae,
|
|
2901
|
+
name: R,
|
|
2902
|
+
onChange: de,
|
|
2897
2903
|
placeholder: P,
|
|
2898
|
-
ref: st(t,
|
|
2904
|
+
ref: st(t, he),
|
|
2899
2905
|
style: Ze.get(),
|
|
2900
2906
|
type: Ce
|
|
2901
2907
|
}
|
|
@@ -2909,7 +2915,7 @@ const tt = M((e, t) => {
|
|
|
2909
2915
|
] });
|
|
2910
2916
|
});
|
|
2911
2917
|
tt.displayName = "FieldBase";
|
|
2912
|
-
const pt =
|
|
2918
|
+
const pt = B((e, t) => {
|
|
2913
2919
|
const {
|
|
2914
2920
|
as: n,
|
|
2915
2921
|
font: o,
|
|
@@ -2919,13 +2925,13 @@ const pt = M((e, t) => {
|
|
|
2919
2925
|
border: d,
|
|
2920
2926
|
borderColor: f,
|
|
2921
2927
|
elementClass: m,
|
|
2922
|
-
children:
|
|
2928
|
+
children: g,
|
|
2923
2929
|
className: u,
|
|
2924
2930
|
style: s,
|
|
2925
2931
|
...a
|
|
2926
|
-
} = e, p = n ?? "span", b =
|
|
2927
|
-
|
|
2928
|
-
const
|
|
2932
|
+
} = e, p = n ?? "span", { wrapperStyle: b, otherProps: v } = sn(a), y = F(b);
|
|
2933
|
+
y.merge(s), y.border(f), y.text(l);
|
|
2934
|
+
const h = re(
|
|
2929
2935
|
"uui-inline",
|
|
2930
2936
|
m,
|
|
2931
2937
|
...o ? [Ee(o)] : [],
|
|
@@ -2934,10 +2940,10 @@ const pt = M((e, t) => {
|
|
|
2934
2940
|
...d !== void 0 ? [rt(d)] : [],
|
|
2935
2941
|
u
|
|
2936
2942
|
);
|
|
2937
|
-
return /* @__PURE__ */ i(p, { className:
|
|
2943
|
+
return /* @__PURE__ */ i(p, { className: h, ref: t, style: y.get(), ...v, children: g });
|
|
2938
2944
|
});
|
|
2939
2945
|
pt.displayName = "TextBase";
|
|
2940
|
-
const Vn =
|
|
2946
|
+
const Vn = B(
|
|
2941
2947
|
({ font: e, size: t = "small", ...n }, o) => /* @__PURE__ */ i(jt, { font: e ?? {
|
|
2942
2948
|
extraSmall: "labelLarge",
|
|
2943
2949
|
small: "labelLarge",
|
|
@@ -2948,7 +2954,7 @@ const Vn = M(
|
|
|
2948
2954
|
);
|
|
2949
2955
|
Vn.displayName = "Button";
|
|
2950
2956
|
Object.assign(Vn, { [So]: !0 });
|
|
2951
|
-
const cr =
|
|
2957
|
+
const cr = B(
|
|
2952
2958
|
({
|
|
2953
2959
|
font: e,
|
|
2954
2960
|
size: t = "small",
|
|
@@ -2977,7 +2983,7 @@ const cr = M(
|
|
|
2977
2983
|
)
|
|
2978
2984
|
);
|
|
2979
2985
|
cr.displayName = "Chip";
|
|
2980
|
-
const ur =
|
|
2986
|
+
const ur = B(
|
|
2981
2987
|
({
|
|
2982
2988
|
as: e = "article",
|
|
2983
2989
|
children: t,
|
|
@@ -2989,36 +2995,36 @@ const ur = M(
|
|
|
2989
2995
|
elevation: d,
|
|
2990
2996
|
border: f,
|
|
2991
2997
|
borderColor: m,
|
|
2992
|
-
shape:
|
|
2998
|
+
shape: g,
|
|
2993
2999
|
flush: u,
|
|
2994
3000
|
style: s,
|
|
2995
3001
|
...a
|
|
2996
3002
|
}, p) => {
|
|
2997
|
-
const [b, v] = Z(l === void 0), { animationVars: y, animate:
|
|
3003
|
+
const [b, v] = Z(l === void 0), { animationVars: y, animate: h, idle: C, active: N, animationClasses: x } = nn(c, {
|
|
2998
3004
|
animation: "scale",
|
|
2999
3005
|
duration: 240
|
|
3000
3006
|
});
|
|
3001
|
-
if (
|
|
3002
|
-
l ? (
|
|
3007
|
+
if (pe(() => {
|
|
3008
|
+
l ? (h("open"), v(!0)) : l === !1 && !C && (h("closed"), v(!1));
|
|
3003
3009
|
}, [l]), !(b || N))
|
|
3004
3010
|
return null;
|
|
3005
|
-
const S = r ?? (o === "filled" ? "surfaceContainerHighest" : o === "outlined" ? "surface" : "surfaceContainerLow"), $ = d ?? (o === "elevated" ? 1 : 0),
|
|
3006
|
-
return
|
|
3007
|
-
|
|
3011
|
+
const S = r ?? (o === "filled" ? "surfaceContainerHighest" : o === "outlined" ? "surface" : "surfaceContainerLow"), $ = d ?? (o === "elevated" ? 1 : 0), M = f ?? (o === "outlined" ? 1 : void 0), k = m ?? (o === "outlined" ? "outlineVariant" : void 0), R = F();
|
|
3012
|
+
return R.merge(s), R.merge(y), /* @__PURE__ */ i(
|
|
3013
|
+
Fe,
|
|
3008
3014
|
{
|
|
3009
3015
|
as: e,
|
|
3010
|
-
border:
|
|
3016
|
+
border: M,
|
|
3011
3017
|
borderColor: k,
|
|
3012
|
-
className:
|
|
3018
|
+
className: re(`uui-card-${o}`, x, n),
|
|
3013
3019
|
color: S,
|
|
3014
3020
|
elementClass: "uui-card",
|
|
3015
3021
|
elevation: $,
|
|
3016
3022
|
ref: p,
|
|
3017
|
-
shape:
|
|
3018
|
-
style:
|
|
3023
|
+
shape: g,
|
|
3024
|
+
style: R.get(),
|
|
3019
3025
|
type: "block",
|
|
3020
3026
|
...a,
|
|
3021
|
-
children: /* @__PURE__ */ i("div", { className:
|
|
3027
|
+
children: /* @__PURE__ */ i("div", { className: re("uui-card-content", u && "uui-flush"), children: t })
|
|
3022
3028
|
}
|
|
3023
3029
|
);
|
|
3024
3030
|
}
|
|
@@ -3029,7 +3035,7 @@ const Mo = ({
|
|
|
3029
3035
|
className: t,
|
|
3030
3036
|
align: n = "start",
|
|
3031
3037
|
font: o = "titleMedium"
|
|
3032
|
-
}) => e ? /* @__PURE__ */ i("div", { className:
|
|
3038
|
+
}) => e ? /* @__PURE__ */ i("div", { className: re("uui-card-title", t, Ee(o)), children: e && /* @__PURE__ */ i("div", { className: `uui-title uui-title-${n}`, children: e }) }) : null;
|
|
3033
3039
|
Mo.displayName = "CardTitle";
|
|
3034
3040
|
const dr = ({
|
|
3035
3041
|
leading: e,
|
|
@@ -3042,21 +3048,21 @@ const dr = ({
|
|
|
3042
3048
|
moreLabel: d,
|
|
3043
3049
|
moreIcon: f,
|
|
3044
3050
|
trailing: m,
|
|
3045
|
-
showClose:
|
|
3051
|
+
showClose: g,
|
|
3046
3052
|
onClose: u,
|
|
3047
3053
|
closeIcon: s,
|
|
3048
3054
|
font: a
|
|
3049
3055
|
}) => {
|
|
3050
|
-
const b =
|
|
3051
|
-
return /* @__PURE__ */ L("div", { className:
|
|
3056
|
+
const b = g && /* @__PURE__ */ i(Vt, { icon: s ?? bo, onClick: u });
|
|
3057
|
+
return /* @__PURE__ */ L("div", { className: re("uui-card-header"), children: [
|
|
3052
3058
|
/* @__PURE__ */ i(zt, { content: e }),
|
|
3053
3059
|
/* @__PURE__ */ i(Mo, { align: t, font: a, label: n }),
|
|
3054
3060
|
/* @__PURE__ */ i(
|
|
3055
|
-
|
|
3061
|
+
dn,
|
|
3056
3062
|
{
|
|
3057
3063
|
actions: o,
|
|
3058
3064
|
align: l,
|
|
3059
|
-
className:
|
|
3065
|
+
className: re("uui-card-actions", "uui-actions-inline"),
|
|
3060
3066
|
maxActions: 0,
|
|
3061
3067
|
moreIcon: f,
|
|
3062
3068
|
moreLabel: d,
|
|
@@ -3067,9 +3073,9 @@ const dr = ({
|
|
|
3067
3073
|
] });
|
|
3068
3074
|
};
|
|
3069
3075
|
dr.displayName = "CardHeader";
|
|
3070
|
-
const fr = ({ children: e, className: t }) => /* @__PURE__ */ i("div", { className:
|
|
3076
|
+
const fr = ({ children: e, className: t }) => /* @__PURE__ */ i("div", { className: re("uui-card-media", t), children: e });
|
|
3071
3077
|
fr.displayName = "CardMedia";
|
|
3072
|
-
const pr =
|
|
3078
|
+
const pr = B(
|
|
3073
3079
|
({
|
|
3074
3080
|
shape: e = "smooth",
|
|
3075
3081
|
border: t,
|
|
@@ -3081,12 +3087,12 @@ const pr = M(
|
|
|
3081
3087
|
uncheckedIcon: d,
|
|
3082
3088
|
indeterminateIcon: f,
|
|
3083
3089
|
indeterminate: m,
|
|
3084
|
-
icon:
|
|
3090
|
+
icon: g,
|
|
3085
3091
|
size: u = "small",
|
|
3086
3092
|
filled: s = !0,
|
|
3087
3093
|
...a
|
|
3088
3094
|
}, p) => {
|
|
3089
|
-
const b = o ?? "primary", v = !
|
|
3095
|
+
const b = o ?? "primary", v = !g && t === void 0 ? void 0 : t;
|
|
3090
3096
|
let y;
|
|
3091
3097
|
return m ? y = t : y = !d && n === void 0 ? t ?? 2 : n, /* @__PURE__ */ i(
|
|
3092
3098
|
Dn,
|
|
@@ -3097,7 +3103,7 @@ const pr = M(
|
|
|
3097
3103
|
color: b,
|
|
3098
3104
|
elementClass: "uui-checkbox",
|
|
3099
3105
|
filled: s,
|
|
3100
|
-
icon:
|
|
3106
|
+
icon: g ?? Oi,
|
|
3101
3107
|
indeterminate: m,
|
|
3102
3108
|
indeterminateIcon: f ?? Hi,
|
|
3103
3109
|
ref: p,
|
|
@@ -3113,11 +3119,11 @@ const pr = M(
|
|
|
3113
3119
|
}
|
|
3114
3120
|
);
|
|
3115
3121
|
pr.displayName = "Checkbox";
|
|
3116
|
-
const mr =
|
|
3122
|
+
const mr = B(
|
|
3117
3123
|
(e, t) => /* @__PURE__ */ i(tt, { ref: t, ...e, elementClass: "uui-text-field" })
|
|
3118
3124
|
);
|
|
3119
3125
|
mr.displayName = "TextField";
|
|
3120
|
-
const hr =
|
|
3126
|
+
const hr = B(
|
|
3121
3127
|
(e, t) => /* @__PURE__ */ i(
|
|
3122
3128
|
tt,
|
|
3123
3129
|
{
|
|
@@ -3129,7 +3135,7 @@ const hr = M(
|
|
|
3129
3135
|
)
|
|
3130
3136
|
);
|
|
3131
3137
|
hr.displayName = "NumberField";
|
|
3132
|
-
const gr =
|
|
3138
|
+
const gr = B(
|
|
3133
3139
|
(e, t) => /* @__PURE__ */ i(
|
|
3134
3140
|
tt,
|
|
3135
3141
|
{
|
|
@@ -3141,7 +3147,7 @@ const gr = M(
|
|
|
3141
3147
|
)
|
|
3142
3148
|
);
|
|
3143
3149
|
gr.displayName = "EmailField";
|
|
3144
|
-
const yr =
|
|
3150
|
+
const yr = B(
|
|
3145
3151
|
(e, t) => /* @__PURE__ */ i(
|
|
3146
3152
|
tt,
|
|
3147
3153
|
{
|
|
@@ -3153,7 +3159,7 @@ const yr = M(
|
|
|
3153
3159
|
)
|
|
3154
3160
|
);
|
|
3155
3161
|
yr.displayName = "PhoneField";
|
|
3156
|
-
const br =
|
|
3162
|
+
const br = B(
|
|
3157
3163
|
(e, t) => /* @__PURE__ */ i(
|
|
3158
3164
|
tt,
|
|
3159
3165
|
{
|
|
@@ -3165,7 +3171,7 @@ const br = M(
|
|
|
3165
3171
|
)
|
|
3166
3172
|
);
|
|
3167
3173
|
br.displayName = "PasswordField";
|
|
3168
|
-
const vr =
|
|
3174
|
+
const vr = B(
|
|
3169
3175
|
(e, t) => /* @__PURE__ */ i(
|
|
3170
3176
|
tt,
|
|
3171
3177
|
{
|
|
@@ -3177,7 +3183,7 @@ const vr = M(
|
|
|
3177
3183
|
)
|
|
3178
3184
|
);
|
|
3179
3185
|
vr.displayName = "DateField";
|
|
3180
|
-
const Cr =
|
|
3186
|
+
const Cr = B(
|
|
3181
3187
|
(e, t) => /* @__PURE__ */ i(
|
|
3182
3188
|
tt,
|
|
3183
3189
|
{
|
|
@@ -3189,7 +3195,7 @@ const Cr = M(
|
|
|
3189
3195
|
)
|
|
3190
3196
|
);
|
|
3191
3197
|
Cr.displayName = "DateTimeField";
|
|
3192
|
-
const xr =
|
|
3198
|
+
const xr = B(
|
|
3193
3199
|
(e, t) => /* @__PURE__ */ i(
|
|
3194
3200
|
tt,
|
|
3195
3201
|
{
|
|
@@ -3201,7 +3207,7 @@ const xr = M(
|
|
|
3201
3207
|
)
|
|
3202
3208
|
);
|
|
3203
3209
|
xr.displayName = "TimeField";
|
|
3204
|
-
const wr =
|
|
3210
|
+
const wr = B(
|
|
3205
3211
|
(e, t) => /* @__PURE__ */ i(
|
|
3206
3212
|
tt,
|
|
3207
3213
|
{
|
|
@@ -3213,7 +3219,7 @@ const wr = M(
|
|
|
3213
3219
|
)
|
|
3214
3220
|
);
|
|
3215
3221
|
wr.displayName = "MonthField";
|
|
3216
|
-
const Nr =
|
|
3222
|
+
const Nr = B(
|
|
3217
3223
|
(e, t) => /* @__PURE__ */ i(
|
|
3218
3224
|
tt,
|
|
3219
3225
|
{
|
|
@@ -3225,11 +3231,11 @@ const Nr = M(
|
|
|
3225
3231
|
)
|
|
3226
3232
|
);
|
|
3227
3233
|
Nr.displayName = "WeekField";
|
|
3228
|
-
const kr =
|
|
3234
|
+
const kr = B(
|
|
3229
3235
|
(e, t) => /* @__PURE__ */ i(tt, { ref: t, ...e, elementClass: "uui-url-field", type: "url" })
|
|
3230
3236
|
);
|
|
3231
3237
|
kr.displayName = "UrlField";
|
|
3232
|
-
const Sr =
|
|
3238
|
+
const Sr = B(
|
|
3233
3239
|
({ elevation: e = 3, font: t, size: n = "medium", shape: o = "rounded", label: l, ...c }, r) => /* @__PURE__ */ i(
|
|
3234
3240
|
jt,
|
|
3235
3241
|
{
|
|
@@ -3251,7 +3257,7 @@ const Sr = M(
|
|
|
3251
3257
|
)
|
|
3252
3258
|
);
|
|
3253
3259
|
Sr.displayName = "Fab";
|
|
3254
|
-
const Lr =
|
|
3260
|
+
const Lr = B(
|
|
3255
3261
|
({
|
|
3256
3262
|
selected: e = !1,
|
|
3257
3263
|
shape: t = "rounded",
|
|
@@ -3282,43 +3288,43 @@ const $o = (e) => {
|
|
|
3282
3288
|
spacing: d = 8,
|
|
3283
3289
|
vertical: f,
|
|
3284
3290
|
variant: m = "strong",
|
|
3285
|
-
elevation:
|
|
3291
|
+
elevation: g,
|
|
3286
3292
|
shape: u,
|
|
3287
3293
|
style: s,
|
|
3288
3294
|
height: a,
|
|
3289
3295
|
...p
|
|
3290
3296
|
} = e, b = U(null), [v, y] = Z(!1);
|
|
3291
|
-
|
|
3297
|
+
Sn(() => {
|
|
3292
3298
|
const S = b.current;
|
|
3293
3299
|
if (!(S != null && S.parentElement))
|
|
3294
3300
|
return;
|
|
3295
3301
|
const $ = getComputedStyle(S.parentElement).display;
|
|
3296
3302
|
y($.includes("flex"));
|
|
3297
3303
|
}, []);
|
|
3298
|
-
const
|
|
3304
|
+
const h = Math.min(4, Math.max(0, l)), C = re(
|
|
3299
3305
|
"uui-divider",
|
|
3300
|
-
rt(
|
|
3306
|
+
rt(h === 0 ? 0 : 1),
|
|
3301
3307
|
t,
|
|
3302
|
-
ut(
|
|
3308
|
+
ut(g),
|
|
3303
3309
|
u && We(u)
|
|
3304
|
-
), N =
|
|
3310
|
+
), N = F(s), x = tn(n ?? o ?? "outlineVariant");
|
|
3305
3311
|
if (N.border(x), N.bg(x), m !== "strong" && (m === "subtle" ? N.set("opacity", "var(--uui-subtle-opacity)") : N.set("opacity", "var(--uui-medium-opacity)")), v ? f ? N.merge({
|
|
3306
3312
|
height: a,
|
|
3307
3313
|
alignSelf: "stretch",
|
|
3308
|
-
width: `${
|
|
3314
|
+
width: `${h}px`,
|
|
3309
3315
|
marginInline: `${d}px`
|
|
3310
3316
|
}) : N.merge({
|
|
3311
3317
|
flex: "1 1 auto",
|
|
3312
|
-
height: `${
|
|
3318
|
+
height: `${h}px`,
|
|
3313
3319
|
marginBlock: `${d}px`
|
|
3314
3320
|
}) : f ? N.merge({
|
|
3315
3321
|
height: a,
|
|
3316
3322
|
display: "inline-block",
|
|
3317
3323
|
verticalAlign: "middle",
|
|
3318
|
-
width: `${
|
|
3324
|
+
width: `${h}px`,
|
|
3319
3325
|
marginInline: `${d}px`
|
|
3320
3326
|
}) : N.merge({
|
|
3321
|
-
height: `${
|
|
3327
|
+
height: `${h}px`,
|
|
3322
3328
|
marginBlock: `${d}px`
|
|
3323
3329
|
}), c !== "none") {
|
|
3324
3330
|
const S = c === "left" || c === "top" || c === "middle", $ = c === "right" || c === "bottom" || c === "middle";
|
|
@@ -3338,7 +3344,7 @@ const $o = (e) => {
|
|
|
3338
3344
|
};
|
|
3339
3345
|
$o[ko] = !0;
|
|
3340
3346
|
$o.displayName = "Divider";
|
|
3341
|
-
const Ir =
|
|
3347
|
+
const Ir = B(
|
|
3342
3348
|
({
|
|
3343
3349
|
uncheckedBorder: e,
|
|
3344
3350
|
border: t,
|
|
@@ -3350,14 +3356,14 @@ const Ir = M(
|
|
|
3350
3356
|
filled: d = !1,
|
|
3351
3357
|
icon: f,
|
|
3352
3358
|
uncheckedIcon: m,
|
|
3353
|
-
animation:
|
|
3359
|
+
animation: g,
|
|
3354
3360
|
...u
|
|
3355
3361
|
}, s) => {
|
|
3356
3362
|
const a = n ?? "primary";
|
|
3357
3363
|
return /* @__PURE__ */ i(
|
|
3358
3364
|
Dn,
|
|
3359
3365
|
{
|
|
3360
|
-
animation:
|
|
3366
|
+
animation: g ?? "scale",
|
|
3361
3367
|
border: !f && t === void 0 ? 2 : t,
|
|
3362
3368
|
borderColor: o ?? a,
|
|
3363
3369
|
color: a,
|
|
@@ -3392,15 +3398,15 @@ const Eo = ({
|
|
|
3392
3398
|
density: d,
|
|
3393
3399
|
...f
|
|
3394
3400
|
}) => {
|
|
3395
|
-
const m = l !== void 0, [
|
|
3396
|
-
(
|
|
3397
|
-
const C = s.includes(
|
|
3401
|
+
const m = l !== void 0, [g, u] = Z(() => eo(c)), s = m ? eo(l) : g, a = mo("vertical"), p = Ue(
|
|
3402
|
+
(h) => {
|
|
3403
|
+
const C = s.includes(h), N = o === "single" ? C ? [] : [h] : C ? s.filter((x) => x !== h) : [...s, h];
|
|
3398
3404
|
m || u(N), r == null || r(N);
|
|
3399
3405
|
},
|
|
3400
3406
|
[s, o, m, r]
|
|
3401
3407
|
), b = Ue(
|
|
3402
|
-
(
|
|
3403
|
-
const C = [
|
|
3408
|
+
(h) => {
|
|
3409
|
+
const C = [h];
|
|
3404
3410
|
m || u(C), r == null || r(C);
|
|
3405
3411
|
},
|
|
3406
3412
|
[m, r]
|
|
@@ -3412,7 +3418,7 @@ const Eo = ({
|
|
|
3412
3418
|
variant: n
|
|
3413
3419
|
};
|
|
3414
3420
|
return /* @__PURE__ */ i(Ut.Provider, { value: { values: s, toggle: p, set: b, clear: v, type: o, roving: a, config: y }, children: /* @__PURE__ */ i(
|
|
3415
|
-
|
|
3421
|
+
Fe,
|
|
3416
3422
|
{
|
|
3417
3423
|
...f,
|
|
3418
3424
|
as: "div",
|
|
@@ -3432,13 +3438,13 @@ const Eo = ({
|
|
|
3432
3438
|
density: r,
|
|
3433
3439
|
...d
|
|
3434
3440
|
}) => {
|
|
3435
|
-
const f = e !== void 0, [m,
|
|
3441
|
+
const f = e !== void 0, [m, g] = Z(t), [u, s] = Z(!1), a = U(null), p = U(null), [b, v] = Z({ position: "fixed", opacity: 0 }), y = f ? e : m;
|
|
3436
3442
|
co(u, [a, p], () => {
|
|
3437
3443
|
s(!1);
|
|
3438
|
-
}),
|
|
3444
|
+
}), Sn(() => {
|
|
3439
3445
|
if (!u || !a.current || !p.current)
|
|
3440
3446
|
return;
|
|
3441
|
-
const N =
|
|
3447
|
+
const N = Bn(a, p, { mode: "dropdown", placement: "auto", offset: 4 }), { width: x } = a.current.getBoundingClientRect();
|
|
3442
3448
|
v({
|
|
3443
3449
|
position: "fixed",
|
|
3444
3450
|
left: (N == null ? void 0 : N.x) ?? 0,
|
|
@@ -3448,10 +3454,10 @@ const Eo = ({
|
|
|
3448
3454
|
opacity: 1
|
|
3449
3455
|
});
|
|
3450
3456
|
}, [u]);
|
|
3451
|
-
const
|
|
3457
|
+
const h = Ue(
|
|
3452
3458
|
(N) => {
|
|
3453
3459
|
const x = o ? N : N[0];
|
|
3454
|
-
f ||
|
|
3460
|
+
f || g(x), n == null || n(x), o || s(!1);
|
|
3455
3461
|
},
|
|
3456
3462
|
[f, o, n]
|
|
3457
3463
|
), C = Array.isArray(y) ? y.join(", ") : y ?? "";
|
|
@@ -3471,14 +3477,14 @@ const Eo = ({
|
|
|
3471
3477
|
value: C
|
|
3472
3478
|
}
|
|
3473
3479
|
),
|
|
3474
|
-
u &&
|
|
3480
|
+
u && ln(
|
|
3475
3481
|
"select-root",
|
|
3476
3482
|
/* @__PURE__ */ i("div", { ref: p, style: b, children: /* @__PURE__ */ i(
|
|
3477
3483
|
Eo,
|
|
3478
3484
|
{
|
|
3479
3485
|
className: "uui-select-list",
|
|
3480
3486
|
density: r,
|
|
3481
|
-
onChange:
|
|
3487
|
+
onChange: h,
|
|
3482
3488
|
type: o ? "multiple" : "single",
|
|
3483
3489
|
value: Array.isArray(y) ? y : y !== void 0 ? [y] : [],
|
|
3484
3490
|
variant: "listbox",
|
|
@@ -3489,7 +3495,7 @@ const Eo = ({
|
|
|
3489
3495
|
] });
|
|
3490
3496
|
};
|
|
3491
3497
|
Br.displayName = "Select";
|
|
3492
|
-
const
|
|
3498
|
+
const Ds = ({ children: e, colorMode: t, seedColor: n, colors: o, breakpoints: l, fonts: c }) => {
|
|
3493
3499
|
const [r, d] = Z(() => {
|
|
3494
3500
|
const s = t === "dark", a = Xn(n, o);
|
|
3495
3501
|
return {
|
|
@@ -3506,35 +3512,35 @@ const Es = ({ children: e, colorMode: t, seedColor: n, colors: o, breakpoints: l
|
|
|
3506
3512
|
), m = Ue(
|
|
3507
3513
|
(s) => (r.darkMode ? r.schemes.dark : r.schemes.light)[s] ?? "",
|
|
3508
3514
|
[r]
|
|
3509
|
-
),
|
|
3515
|
+
), g = Ue(
|
|
3510
3516
|
(s, a) => r.schemes[s][a] ?? "",
|
|
3511
3517
|
[r]
|
|
3512
3518
|
);
|
|
3513
|
-
|
|
3519
|
+
pe(() => {
|
|
3514
3520
|
if (t) {
|
|
3515
3521
|
const s = t === "dark";
|
|
3516
3522
|
document.body.classList.toggle("dark", s), d((a) => ({ ...a, darkMode: s }));
|
|
3517
3523
|
}
|
|
3518
|
-
}, [t]),
|
|
3524
|
+
}, [t]), pe(() => {
|
|
3519
3525
|
const s = Xn(n, o);
|
|
3520
3526
|
d((a) => ({
|
|
3521
3527
|
...a,
|
|
3522
3528
|
schemes: s
|
|
3523
3529
|
}));
|
|
3524
|
-
}, [o, n]),
|
|
3530
|
+
}, [o, n]), pe(() => {
|
|
3525
3531
|
d((s) => ({
|
|
3526
3532
|
...s,
|
|
3527
3533
|
breakpoints: _t(Xt.breakpoints, l).merged
|
|
3528
3534
|
}));
|
|
3529
|
-
}, [l]),
|
|
3535
|
+
}, [l]), pe(() => {
|
|
3530
3536
|
const s = _t(Xt.fonts, c).merged;
|
|
3531
3537
|
d((a) => ({
|
|
3532
3538
|
...a,
|
|
3533
3539
|
fonts: s
|
|
3534
3540
|
}));
|
|
3535
|
-
}, [c]),
|
|
3541
|
+
}, [c]), pe(() => {
|
|
3536
3542
|
mi(r.schemes);
|
|
3537
|
-
}, [r.schemes]),
|
|
3543
|
+
}, [r.schemes]), pe(() => {
|
|
3538
3544
|
di(r.fonts);
|
|
3539
3545
|
}, [r.fonts]);
|
|
3540
3546
|
const u = ht(
|
|
@@ -3544,12 +3550,12 @@ const Es = ({ children: e, colorMode: t, seedColor: n, colors: o, breakpoints: l
|
|
|
3544
3550
|
darkMode: r.darkMode,
|
|
3545
3551
|
setDarkMode: f,
|
|
3546
3552
|
getColorValue: m,
|
|
3547
|
-
getThemeColorValue:
|
|
3553
|
+
getThemeColorValue: g
|
|
3548
3554
|
}),
|
|
3549
|
-
[m,
|
|
3555
|
+
[m, g, f, r]
|
|
3550
3556
|
);
|
|
3551
3557
|
return /* @__PURE__ */ i(fo.Provider, { value: u, children: e });
|
|
3552
|
-
}, Mr =
|
|
3558
|
+
}, Mr = B(
|
|
3553
3559
|
({ children: e, className: t = "", title: n = "", align: o = "topRight", value: l, ...c }, r) => {
|
|
3554
3560
|
const d = U(null);
|
|
3555
3561
|
return /* @__PURE__ */ L("span", { className: "uui-tooltip-wrapper", ref: r, ...c, children: [
|
|
@@ -3559,31 +3565,31 @@ const Es = ({ children: e, colorMode: t, seedColor: n, colors: o, breakpoints: l
|
|
|
3559
3565
|
}
|
|
3560
3566
|
);
|
|
3561
3567
|
Mr.displayName = "Tooltip";
|
|
3562
|
-
const $r =
|
|
3568
|
+
const $r = B(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "article", direction: e, elementClass: "uui-article" }));
|
|
3563
3569
|
$r.displayName = "Article";
|
|
3564
|
-
const Er =
|
|
3570
|
+
const Er = B(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "aside", direction: e, elementClass: "uui-aside" }));
|
|
3565
3571
|
Er.displayName = "Aside";
|
|
3566
|
-
const Dr =
|
|
3572
|
+
const Dr = B(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, direction: e, elementClass: "uui-article-content" }));
|
|
3567
3573
|
Dr.displayName = "Content";
|
|
3568
|
-
const Fr =
|
|
3574
|
+
const Fr = B((e, t) => /* @__PURE__ */ i(Fe, { ...e, ref: t, type: "block" }));
|
|
3569
3575
|
Fr.displayName = "Div";
|
|
3570
|
-
const Do =
|
|
3571
|
-
({ direction: e = "row", ...t }, n) => /* @__PURE__ */ i(Ae, { ...t, direction: e, ref: n, type: "flex" })
|
|
3572
|
-
);
|
|
3576
|
+
const Do = B(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ i(Fe, { ...t, direction: e, ref: n, type: "flex" }));
|
|
3573
3577
|
Do.displayName = "Flex";
|
|
3574
|
-
const Rr =
|
|
3578
|
+
const Rr = B(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "footer", direction: e, elementClass: "uui-footer" }));
|
|
3575
3579
|
Rr.displayName = "Footer";
|
|
3576
|
-
const Fo =
|
|
3580
|
+
const Fo = B((e, t) => /* @__PURE__ */ i(Fe, { ...e, ref: t, type: "grid" }));
|
|
3577
3581
|
Fo.displayName = "Grid";
|
|
3578
|
-
const Tr =
|
|
3582
|
+
const Tr = B(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "header", direction: e, elementClass: "uui-header" }));
|
|
3579
3583
|
Tr.displayName = "Header";
|
|
3580
|
-
const Vr =
|
|
3584
|
+
const Vr = B(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "main", direction: e, elementClass: "uui-main" }));
|
|
3581
3585
|
Vr.displayName = "Main";
|
|
3582
|
-
const Ar =
|
|
3586
|
+
const Ar = B(({ direction: e = "row", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "nav", direction: e, elementClass: "uui-nav" }));
|
|
3583
3587
|
Ar.displayName = "Nav";
|
|
3584
|
-
const Pr =
|
|
3588
|
+
const Pr = B(({ direction: e = "col", ...t }, n) => /* @__PURE__ */ i(Fe, { ref: n, ...t, as: "section", direction: e, elementClass: "uui-section" }));
|
|
3585
3589
|
Pr.displayName = "Section";
|
|
3586
|
-
const
|
|
3590
|
+
const jr = B((e, t) => /* @__PURE__ */ i(Fe, { ...e, direction: "col", ref: t, type: "flex" }));
|
|
3591
|
+
jr.displayName = "Stack";
|
|
3592
|
+
const Ro = B(
|
|
3587
3593
|
({
|
|
3588
3594
|
description: e,
|
|
3589
3595
|
error: t,
|
|
@@ -3595,21 +3601,21 @@ const Ro = M(
|
|
|
3595
3601
|
direction: d = "col",
|
|
3596
3602
|
required: f,
|
|
3597
3603
|
descriptionColor: m,
|
|
3598
|
-
descriptionFont:
|
|
3604
|
+
descriptionFont: g,
|
|
3599
3605
|
alignItems: u = "start",
|
|
3600
3606
|
...s
|
|
3601
3607
|
}, a) => {
|
|
3602
|
-
const p = c ?? o, b = ["uui-fieldset-legend", Ee(n ?? "labelLarge")].filter(Boolean).join(" "), v =
|
|
3608
|
+
const p = c ?? o, b = ["uui-fieldset-legend", Ee(n ?? "labelLarge")].filter(Boolean).join(" "), v = F();
|
|
3603
3609
|
t ? v.text("error") : m ? v.text(m) : v.text.on("surfaceVariant");
|
|
3604
3610
|
const y = [
|
|
3605
3611
|
"uui-support-text",
|
|
3606
|
-
Ee(
|
|
3612
|
+
Ee(g ?? "bodySmall"),
|
|
3607
3613
|
t && "uui-error",
|
|
3608
3614
|
e && !t && "uui-description"
|
|
3609
|
-
].filter(Boolean).join(" "),
|
|
3615
|
+
].filter(Boolean).join(" "), h = (e ?? t) && /* @__PURE__ */ i("div", { className: y, style: v.get(), children: t ?? e });
|
|
3610
3616
|
return /* @__PURE__ */ L(nt, { children: [
|
|
3611
3617
|
/* @__PURE__ */ i(on.Provider, { value: { disabled: l }, children: /* @__PURE__ */ L(
|
|
3612
|
-
|
|
3618
|
+
Fe,
|
|
3613
3619
|
{
|
|
3614
3620
|
ref: a,
|
|
3615
3621
|
...s,
|
|
@@ -3627,12 +3633,12 @@ const Ro = M(
|
|
|
3627
3633
|
]
|
|
3628
3634
|
}
|
|
3629
3635
|
) }),
|
|
3630
|
-
|
|
3636
|
+
h
|
|
3631
3637
|
] });
|
|
3632
3638
|
}
|
|
3633
3639
|
);
|
|
3634
3640
|
Ro.displayName = "Fieldset";
|
|
3635
|
-
const
|
|
3641
|
+
const Or = B(
|
|
3636
3642
|
({
|
|
3637
3643
|
name: e,
|
|
3638
3644
|
disabled: t,
|
|
@@ -3642,11 +3648,11 @@ const jr = M(
|
|
|
3642
3648
|
children: c,
|
|
3643
3649
|
...r
|
|
3644
3650
|
}, d) => {
|
|
3645
|
-
const [f, m] = Z(l),
|
|
3651
|
+
const [f, m] = Z(l), g = o !== void 0, u = g ? o : f, s = Ue(
|
|
3646
3652
|
(p) => {
|
|
3647
|
-
|
|
3653
|
+
g || m(p), n == null || n(p);
|
|
3648
3654
|
},
|
|
3649
|
-
[
|
|
3655
|
+
[g, n]
|
|
3650
3656
|
), a = ht(
|
|
3651
3657
|
() => ({ name: e, value: u, setValue: s, disabled: t }),
|
|
3652
3658
|
[e, u, s, t]
|
|
@@ -3654,8 +3660,8 @@ const jr = M(
|
|
|
3654
3660
|
return /* @__PURE__ */ i(Ro, { disabled: t, ref: d, ...r, children: /* @__PURE__ */ i(uo.Provider, { value: a, children: c }) });
|
|
3655
3661
|
}
|
|
3656
3662
|
);
|
|
3657
|
-
|
|
3658
|
-
const
|
|
3663
|
+
Or.displayName = "RadioGroup";
|
|
3664
|
+
const Hr = Symbol.for("uui.listItem"), An = B(
|
|
3659
3665
|
({
|
|
3660
3666
|
shape: e,
|
|
3661
3667
|
touchEffects: t = ["ripple"],
|
|
@@ -3667,7 +3673,7 @@ const Or = Symbol.for("uui.listItem"), An = M(
|
|
|
3667
3673
|
textColor: d,
|
|
3668
3674
|
labelColor: f,
|
|
3669
3675
|
descriptionColor: m,
|
|
3670
|
-
shortcutColor:
|
|
3676
|
+
shortcutColor: g,
|
|
3671
3677
|
fixedLeading: u,
|
|
3672
3678
|
color: s,
|
|
3673
3679
|
icon: a,
|
|
@@ -3675,75 +3681,75 @@ const Or = Symbol.for("uui.listItem"), An = M(
|
|
|
3675
3681
|
leading: b,
|
|
3676
3682
|
trailing: v,
|
|
3677
3683
|
label: y,
|
|
3678
|
-
disabled:
|
|
3684
|
+
disabled: h = !1,
|
|
3679
3685
|
className: C,
|
|
3680
3686
|
onClick: N,
|
|
3681
3687
|
badge: x,
|
|
3682
3688
|
expanded: S,
|
|
3683
3689
|
active: $,
|
|
3684
|
-
children:
|
|
3690
|
+
children: M,
|
|
3685
3691
|
focusVisible: k,
|
|
3686
|
-
type:
|
|
3692
|
+
type: R = "item",
|
|
3687
3693
|
checked: H,
|
|
3688
3694
|
description: z,
|
|
3689
3695
|
shortcut: P,
|
|
3690
3696
|
density: Ce,
|
|
3691
3697
|
horizontal: ge,
|
|
3692
3698
|
labelFont: xe,
|
|
3693
|
-
font:
|
|
3694
|
-
descriptionFont:
|
|
3699
|
+
font: me,
|
|
3700
|
+
descriptionFont: se,
|
|
3695
3701
|
shortcutFont: j,
|
|
3696
3702
|
selected: O,
|
|
3697
3703
|
__index: ke,
|
|
3698
|
-
__interactionsDisabled:
|
|
3699
|
-
onChange:
|
|
3704
|
+
__interactionsDisabled: ue,
|
|
3705
|
+
onChange: je,
|
|
3700
3706
|
variant: J = "classic",
|
|
3701
3707
|
...De
|
|
3702
|
-
},
|
|
3703
|
-
const ee = U(null), ye = et.Children.toArray(
|
|
3704
|
-
let
|
|
3705
|
-
|
|
3706
|
-
const
|
|
3708
|
+
}, le) => {
|
|
3709
|
+
const ee = U(null), ye = et.Children.toArray(M), he = ye.find((ne) => At(ne)), _ = ye.filter((ne) => !At(ne)), D = !!he;
|
|
3710
|
+
let ae;
|
|
3711
|
+
R !== "item" && (R === "radio" ? ae = H ? l ?? vo : c ?? Co : R === "checkbox" && (ae = H ? l ?? Wi : c));
|
|
3712
|
+
const Re = ae ?? b ?? a ?? (u && !ge), Te = Re && /* @__PURE__ */ i("div", { className: "uui-icon uui-leading", children: Re }), Se = v ?? p;
|
|
3707
3713
|
let W;
|
|
3708
3714
|
x && (typeof x == "string" || typeof x == "number" ? W = /* @__PURE__ */ i(Rn, { value: x }) : W = x);
|
|
3709
|
-
const
|
|
3710
|
-
|
|
3711
|
-
const Le =
|
|
3715
|
+
const te = J === "modern" ? "labelLarge" : "bodyLarge", Q = xe ?? me ?? te, de = se ?? (J === "modern" ? "bodySmall" : "bodyMedium"), Me = j ?? te, oe = F();
|
|
3716
|
+
oe.text(g);
|
|
3717
|
+
const Le = D && !ge ? yo : Se, $e = P && /* @__PURE__ */ i("div", { className: `uui-menu-item-shortcut ${Ee(Me)}`, style: oe.get(), children: P }), Ke = (P ?? x ?? Le) && /* @__PURE__ */ L(nt, { children: [
|
|
3712
3718
|
$e,
|
|
3713
3719
|
W,
|
|
3714
3720
|
Le && /* @__PURE__ */ i("div", { className: "uui-icon uui-trailing", children: Le })
|
|
3715
|
-
] }), Ie =
|
|
3721
|
+
] }), Ie = F();
|
|
3716
3722
|
Ie.text(f);
|
|
3717
|
-
const
|
|
3723
|
+
const fe = y && /* @__PURE__ */ i("div", { className: `uui-menu-item-label ${Ee(Q)}`, style: Ie.get(), children: y }), we = F();
|
|
3718
3724
|
(m || !d && J === "classic" && (s != null && s.startsWith("surface"))) && (m ? we.text(m) : we.text.on("surfaceVariant"));
|
|
3719
|
-
const
|
|
3725
|
+
const ie = z && /* @__PURE__ */ i(
|
|
3720
3726
|
"div",
|
|
3721
3727
|
{
|
|
3722
|
-
className: `uui-menu-item-description ${Ee(
|
|
3728
|
+
className: `uui-menu-item-description ${Ee(de)}`,
|
|
3723
3729
|
style: we.get(),
|
|
3724
3730
|
children: z
|
|
3725
3731
|
}
|
|
3726
|
-
), Be = (
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
] }),
|
|
3730
|
-
if (
|
|
3731
|
-
|
|
3732
|
+
), Be = (fe ?? ie) && /* @__PURE__ */ L("div", { className: "uui-menu-item-text", children: [
|
|
3733
|
+
fe,
|
|
3734
|
+
ie
|
|
3735
|
+
] }), ce = (ne) => {
|
|
3736
|
+
if (ue || h) {
|
|
3737
|
+
ne == null || ne.preventDefault();
|
|
3732
3738
|
return;
|
|
3733
3739
|
}
|
|
3734
|
-
N == null || N(
|
|
3740
|
+
N == null || N(ne), t.includes("ripple") && ee.current && ne && Mt(ee.current, ne);
|
|
3735
3741
|
};
|
|
3736
3742
|
let Ne = s ?? (J === "modern" ? "surfaceContainerLow" : "surfaceContainer");
|
|
3737
|
-
|
|
3738
|
-
const G =
|
|
3743
|
+
R === "option" && O && o.includes("color") && (Ne = r ?? (J === "modern" ? "tertiaryContainer" : "secondaryContainer"));
|
|
3744
|
+
const G = F();
|
|
3739
3745
|
G.bg.on(Ne);
|
|
3740
|
-
const K =
|
|
3746
|
+
const K = F();
|
|
3741
3747
|
K.bg(Ne), d ? K.text(d) : K.text.on(Ne);
|
|
3742
3748
|
const He = [
|
|
3743
3749
|
"uui-menu-item",
|
|
3744
3750
|
C,
|
|
3745
3751
|
ot(Ce),
|
|
3746
|
-
|
|
3752
|
+
h && "uui-disabled",
|
|
3747
3753
|
J === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
|
|
3748
3754
|
].filter(Boolean).join(" "), be = We(e ?? (J === "modern" ? "rounded" : "smooth")), I = [
|
|
3749
3755
|
"uui-menu-item-content",
|
|
@@ -3754,7 +3760,7 @@ const Or = Symbol.for("uui.listItem"), An = M(
|
|
|
3754
3760
|
$ && k && "uui-focus-visible"
|
|
3755
3761
|
].filter(Boolean).join(" "), Y = /* @__PURE__ */ L("div", { className: I, style: K.get(), children: [
|
|
3756
3762
|
_.length > 0 ? /* @__PURE__ */ i("div", { className: "uui-menu-item-children", children: _ }) : /* @__PURE__ */ L(nt, { children: [
|
|
3757
|
-
|
|
3763
|
+
Te,
|
|
3758
3764
|
Be,
|
|
3759
3765
|
Ke
|
|
3760
3766
|
] }),
|
|
@@ -3766,13 +3772,13 @@ const Or = Symbol.for("uui.listItem"), An = M(
|
|
|
3766
3772
|
"div",
|
|
3767
3773
|
{
|
|
3768
3774
|
...De,
|
|
3769
|
-
"aria-checked":
|
|
3770
|
-
"aria-disabled":
|
|
3771
|
-
"aria-expanded":
|
|
3772
|
-
"aria-haspopup":
|
|
3775
|
+
"aria-checked": R === "radio" || R === "checkbox" ? H ?? !1 : void 0,
|
|
3776
|
+
"aria-disabled": h ? "true" : void 0,
|
|
3777
|
+
"aria-expanded": D ? S : void 0,
|
|
3778
|
+
"aria-haspopup": D ? "menu" : void 0,
|
|
3773
3779
|
className: He,
|
|
3774
|
-
onClick:
|
|
3775
|
-
ref: st(ee,
|
|
3780
|
+
onClick: ce,
|
|
3781
|
+
ref: st(ee, le),
|
|
3776
3782
|
role: "option",
|
|
3777
3783
|
tabIndex: -1,
|
|
3778
3784
|
children: Y
|
|
@@ -3781,35 +3787,35 @@ const Or = Symbol.for("uui.listItem"), An = M(
|
|
|
3781
3787
|
);
|
|
3782
3788
|
}
|
|
3783
3789
|
);
|
|
3784
|
-
An[
|
|
3790
|
+
An[Hr] = !0;
|
|
3785
3791
|
An[Fn] = !0;
|
|
3786
3792
|
An.displayName = "ListItem";
|
|
3787
|
-
const
|
|
3788
|
-
function
|
|
3793
|
+
const Fs = (e) => /* @__PURE__ */ i(Eo, { ...e, variant: "listbox" }), To = Symbol.for("uui.item");
|
|
3794
|
+
function Rs(e) {
|
|
3789
3795
|
return dt(e) && typeof e.type != "string" && !!e.type[To];
|
|
3790
3796
|
}
|
|
3791
|
-
const Pn =
|
|
3792
|
-
({ label: e, description: t, leading: n, trailing: o, value: l, disabled: c, className: r, onClick: d, onKeyDown: f, ...m },
|
|
3797
|
+
const Pn = B(
|
|
3798
|
+
({ label: e, description: t, leading: n, trailing: o, value: l, disabled: c, className: r, onClick: d, onKeyDown: f, ...m }, g) => {
|
|
3793
3799
|
const u = Bt(Ut), s = u == null ? void 0 : u.config, a = U(null), p = l ? (u == null ? void 0 : u.values.includes(l)) ?? !1 : !1, b = (s == null ? void 0 : s.itemRole) ?? "listitem";
|
|
3794
|
-
|
|
3795
|
-
const
|
|
3796
|
-
if (!(!
|
|
3797
|
-
return u.roving.register(
|
|
3800
|
+
pe(() => {
|
|
3801
|
+
const h = a.current;
|
|
3802
|
+
if (!(!h || !(u != null && u.roving)))
|
|
3803
|
+
return u.roving.register(h), () => {
|
|
3798
3804
|
var C;
|
|
3799
|
-
return (C = u.roving) == null ? void 0 : C.unregister(
|
|
3805
|
+
return (C = u.roving) == null ? void 0 : C.unregister(h);
|
|
3800
3806
|
};
|
|
3801
3807
|
}, [u == null ? void 0 : u.roving]);
|
|
3802
|
-
const v = (
|
|
3803
|
-
c || (l && u && u.toggle(l), d == null || d(
|
|
3804
|
-
}, y = (
|
|
3808
|
+
const v = (h) => {
|
|
3809
|
+
c || (l && u && u.toggle(l), d == null || d(h), a.current && Mt(a.current, h));
|
|
3810
|
+
}, y = (h) => {
|
|
3805
3811
|
var C;
|
|
3806
|
-
(C = u == null ? void 0 : u.roving) == null || C.onKeyDown(
|
|
3812
|
+
(C = u == null ? void 0 : u.roving) == null || C.onKeyDown(h), (h.key === "Enter" || h.key === " ") && !c && l && u && (h.preventDefault(), u.toggle(l)), f == null || f(h);
|
|
3807
3813
|
};
|
|
3808
3814
|
return /* @__PURE__ */ L(
|
|
3809
3815
|
"div",
|
|
3810
3816
|
{
|
|
3811
3817
|
...m,
|
|
3812
|
-
ref: st(a,
|
|
3818
|
+
ref: st(a, g),
|
|
3813
3819
|
role: b,
|
|
3814
3820
|
"aria-selected": p,
|
|
3815
3821
|
"aria-disabled": c || void 0,
|
|
@@ -3837,7 +3843,7 @@ const Pn = M(
|
|
|
3837
3843
|
);
|
|
3838
3844
|
Pn[To] = !0;
|
|
3839
3845
|
Pn.displayName = "Item";
|
|
3840
|
-
const
|
|
3846
|
+
const Ts = Pn, _r = B((e, t) => {
|
|
3841
3847
|
const {
|
|
3842
3848
|
density: n,
|
|
3843
3849
|
icon: o,
|
|
@@ -3847,7 +3853,7 @@ const Rs = Pn, Hr = M((e, t) => {
|
|
|
3847
3853
|
children: d,
|
|
3848
3854
|
color: f = "primary",
|
|
3849
3855
|
uncheckedColor: m,
|
|
3850
|
-
defaultChecked:
|
|
3856
|
+
defaultChecked: g,
|
|
3851
3857
|
hoverEffects: u = ["overlay"],
|
|
3852
3858
|
touchEffects: s = ["ripple"],
|
|
3853
3859
|
focusEffects: a = ["ring"],
|
|
@@ -3855,48 +3861,48 @@ const Rs = Pn, Hr = M((e, t) => {
|
|
|
3855
3861
|
pressedEffects: b = ["overlay", "scale"],
|
|
3856
3862
|
id: v,
|
|
3857
3863
|
name: y,
|
|
3858
|
-
label:
|
|
3864
|
+
label: h,
|
|
3859
3865
|
font: C,
|
|
3860
3866
|
border: N,
|
|
3861
3867
|
borderColor: x,
|
|
3862
3868
|
uncheckedBorder: S,
|
|
3863
3869
|
uncheckedBorderColor: $,
|
|
3864
|
-
onChange:
|
|
3870
|
+
onChange: M,
|
|
3865
3871
|
onClick: k,
|
|
3866
|
-
onFocus:
|
|
3872
|
+
onFocus: R,
|
|
3867
3873
|
onBlur: H,
|
|
3868
3874
|
required: z,
|
|
3869
3875
|
shape: P = "round",
|
|
3870
3876
|
title: Ce,
|
|
3871
3877
|
value: ge,
|
|
3872
3878
|
size: xe = "small",
|
|
3873
|
-
uncheckedIcon:
|
|
3874
|
-
description:
|
|
3879
|
+
uncheckedIcon: me,
|
|
3880
|
+
description: se,
|
|
3875
3881
|
className: j,
|
|
3876
3882
|
error: O,
|
|
3877
3883
|
focusColor: ke,
|
|
3878
|
-
duration:
|
|
3879
|
-
tooltipAlign:
|
|
3884
|
+
duration: ue = 200,
|
|
3885
|
+
tooltipAlign: je = "auto",
|
|
3880
3886
|
textPlacement: J = "end",
|
|
3881
3887
|
"aria-label": De,
|
|
3882
|
-
readOnly:
|
|
3888
|
+
readOnly: le,
|
|
3883
3889
|
...ee
|
|
3884
|
-
} = e, ye = U(null),
|
|
3885
|
-
if (
|
|
3890
|
+
} = e, ye = U(null), he = Bt(on), _ = l ?? (he == null ? void 0 : he.disabled), { focusVisible: D, isFocused: ae, focusHandlers: Re } = wt(R, H), Te = U(null), Se = U(null), W = U(null), te = Nt("check"), Q = v ?? te, de = r !== void 0, [Me, oe] = Z(g ?? !1), Le = de ? !!r : Me, $e = De ?? (h ? void 0 : Ce), Ke = O ? "error" : f, Ie = Ce ? /* @__PURE__ */ i("div", { id: `${Q}-tip`, children: Ce }) : null, fe = (E) => {
|
|
3891
|
+
if (le) {
|
|
3886
3892
|
E.preventDefault();
|
|
3887
3893
|
return;
|
|
3888
3894
|
}
|
|
3889
|
-
const
|
|
3890
|
-
|
|
3895
|
+
const Ae = E.currentTarget;
|
|
3896
|
+
de || oe(Ae.checked), M == null || M(E);
|
|
3891
3897
|
}, we = (E) => {
|
|
3892
|
-
if (
|
|
3898
|
+
if (le) {
|
|
3893
3899
|
E.preventDefault();
|
|
3894
3900
|
return;
|
|
3895
3901
|
}
|
|
3896
3902
|
s.includes("ripple") && (ye.current && clearTimeout(ye.current), ye.current = window.setTimeout(() => {
|
|
3897
3903
|
W.current && Se.current && (Mt(W.current, E, Se.current), ye.current = null);
|
|
3898
|
-
},
|
|
3899
|
-
},
|
|
3904
|
+
}, ue)), k == null || k(E);
|
|
3905
|
+
}, ie = [
|
|
3900
3906
|
"uui-switch",
|
|
3901
3907
|
ot(n),
|
|
3902
3908
|
j,
|
|
@@ -3906,23 +3912,23 @@ const Rs = Pn, Hr = M((e, t) => {
|
|
|
3906
3912
|
].filter(Boolean).join(" "), Be = [
|
|
3907
3913
|
"uui-switch-control",
|
|
3908
3914
|
Le && "uui-checked",
|
|
3909
|
-
|
|
3910
|
-
...u.includes("overlay") && !
|
|
3911
|
-
...a.includes("overlay") &&
|
|
3915
|
+
me && "uui-symmetric-thumb",
|
|
3916
|
+
...u.includes("overlay") && !le ? ["uui-hover-overlay"] : [],
|
|
3917
|
+
...a.includes("overlay") && D && ae ? ["uui-focus-overlay"] : [],
|
|
3912
3918
|
...p.includes("overlay") ? ["uui-selected-overlay"] : [],
|
|
3913
|
-
...b.includes("overlay") && !
|
|
3914
|
-
...b.includes("scale") && !
|
|
3919
|
+
...b.includes("overlay") && !le ? ["uui-pressed-overlay"] : [],
|
|
3920
|
+
...b.includes("scale") && !le ? ["uui-pressed-scale"] : [],
|
|
3915
3921
|
We(P),
|
|
3916
|
-
a.includes("ring") &&
|
|
3917
|
-
].filter(Boolean).join(" "),
|
|
3918
|
-
ke &&
|
|
3919
|
-
const Ne = ["uui-input"].filter(Boolean).join(" "), G = ["uui-state", We("round")].filter(Boolean).join(" "), K =
|
|
3922
|
+
a.includes("ring") && D && ae && "uui-focus-visible uui-focus-ring"
|
|
3923
|
+
].filter(Boolean).join(" "), ce = F();
|
|
3924
|
+
ke && D && ae && ce.set("--uui-focus-color", so(ke).color), ce.set("--uui-switch-duration", `${ue}ms`);
|
|
3925
|
+
const Ne = ["uui-input"].filter(Boolean).join(" "), G = ["uui-state", We("round")].filter(Boolean).join(" "), K = F(), be = [
|
|
3920
3926
|
"uui-switch-track",
|
|
3921
3927
|
rt(Le ? N : S ?? N ?? 2),
|
|
3922
3928
|
We(P),
|
|
3923
3929
|
ut(c)
|
|
3924
|
-
].filter(Boolean).join(" "), I =
|
|
3925
|
-
I.border(O ? "error" : x ?? "outline"), Ze.border(O ? "error" : x ?? "outline"), Le ? (K.bg(Ke), I.bg(O ? "errorContainer" : f), ze.bg.on(f),
|
|
3930
|
+
].filter(Boolean).join(" "), I = F(), Y = ["uui-switch-thumb", We(P)].filter(Boolean).join(" "), Ve = ["uui-icon"].filter(Boolean).join(" "), ne = F(), Ge = ["uui-switch-glyph"].filter(Boolean).join(" "), ze = F(), Ze = F();
|
|
3931
|
+
I.border(O ? "error" : x ?? "outline"), Ze.border(O ? "error" : x ?? "outline"), Le ? (K.bg(Ke), I.bg(O ? "errorContainer" : f), ze.bg.on(f), ne.text.onContainer(f)) : ($ && (I.border(O ? "error" : $), Ze.border(O ? "error" : $)), K.bg(O ? "error" : m ?? "onSurface"), I.bg(O ? "errorContainer" : m ?? "surfaceContainerHighest"), m ? (ze.bg.on(m), ne.text.onContainer(m)) : (ze.bg(me ? "onSurfaceVariant" : "outline"), ne.text("surfaceContainerHighest")));
|
|
3926
3932
|
let qe;
|
|
3927
3933
|
if (d) {
|
|
3928
3934
|
const E = [
|
|
@@ -3936,74 +3942,74 @@ const Rs = Pn, Hr = M((e, t) => {
|
|
|
3936
3942
|
/* @__PURE__ */ i("div", { className: G, ref: W, style: K.get() })
|
|
3937
3943
|
] });
|
|
3938
3944
|
} else {
|
|
3939
|
-
const E = Le ? o :
|
|
3945
|
+
const E = Le ? o : me;
|
|
3940
3946
|
qe = /* @__PURE__ */ L(nt, { children: [
|
|
3941
3947
|
/* @__PURE__ */ i("div", { className: be, style: I.get() }),
|
|
3942
3948
|
/* @__PURE__ */ L("div", { className: Y, children: [
|
|
3943
|
-
/* @__PURE__ */ i("div", { className: Ge, style: ze.get(), children: /* @__PURE__ */ i("div", { className:
|
|
3949
|
+
/* @__PURE__ */ i("div", { className: Ge, style: ze.get(), children: /* @__PURE__ */ i("div", { className: Ve, style: ne.get(), children: E }) }),
|
|
3944
3950
|
/* @__PURE__ */ i("div", { className: G, ref: W, style: K.get() })
|
|
3945
3951
|
] })
|
|
3946
3952
|
] });
|
|
3947
3953
|
}
|
|
3948
|
-
const
|
|
3954
|
+
const T = h && /* @__PURE__ */ i($n, { font: C, htmlFor: Q, label: h, required: z }), q = /* @__PURE__ */ i(cn, { description: se, error: O }), V = /* @__PURE__ */ i("div", { className: "uui-switch-control-wrapper", children: /* @__PURE__ */ L("div", { className: Be, ref: Se, style: ce.get(), children: [
|
|
3949
3955
|
/* @__PURE__ */ i(
|
|
3950
3956
|
"input",
|
|
3951
3957
|
{
|
|
3952
|
-
...
|
|
3958
|
+
...Re,
|
|
3953
3959
|
"aria-label": $e,
|
|
3954
|
-
"aria-readonly":
|
|
3960
|
+
"aria-readonly": le === !0 ? !0 : void 0,
|
|
3955
3961
|
checked: !!Le,
|
|
3956
3962
|
className: Ne,
|
|
3957
3963
|
disabled: _,
|
|
3958
3964
|
id: Q,
|
|
3959
3965
|
name: y,
|
|
3960
|
-
onChange:
|
|
3966
|
+
onChange: fe,
|
|
3961
3967
|
onClick: we,
|
|
3962
|
-
readOnly:
|
|
3963
|
-
ref: st(
|
|
3968
|
+
readOnly: le,
|
|
3969
|
+
ref: st(Te, t),
|
|
3964
3970
|
type: "checkbox",
|
|
3965
3971
|
value: ge,
|
|
3966
3972
|
...ee
|
|
3967
3973
|
}
|
|
3968
3974
|
),
|
|
3969
3975
|
qe,
|
|
3970
|
-
Ie && /* @__PURE__ */ i(Pt, { align:
|
|
3976
|
+
Ie && /* @__PURE__ */ i(Pt, { align: je, tooltip: Ie, triggerRef: Te })
|
|
3971
3977
|
] }) });
|
|
3972
3978
|
return /* @__PURE__ */ i(
|
|
3973
|
-
|
|
3979
|
+
an,
|
|
3974
3980
|
{
|
|
3975
|
-
className:
|
|
3981
|
+
className: ie,
|
|
3976
3982
|
control: V,
|
|
3977
3983
|
description: q,
|
|
3978
|
-
label:
|
|
3984
|
+
label: T,
|
|
3979
3985
|
textPlacement: J
|
|
3980
3986
|
}
|
|
3981
3987
|
);
|
|
3982
3988
|
});
|
|
3983
|
-
|
|
3984
|
-
const
|
|
3985
|
-
|
|
3986
|
-
const
|
|
3987
|
-
|
|
3988
|
-
const
|
|
3989
|
-
|
|
3990
|
-
const
|
|
3991
|
-
|
|
3992
|
-
const
|
|
3993
|
-
|
|
3994
|
-
const
|
|
3995
|
-
|
|
3996
|
-
const
|
|
3997
|
-
|
|
3998
|
-
const
|
|
3999
|
-
|
|
4000
|
-
const
|
|
4001
|
-
|
|
3989
|
+
_r.displayName = "Switch";
|
|
3990
|
+
const Wr = B(({ font: e = "headlineLarge", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h1", elementClass: "uui-h1", font: e }));
|
|
3991
|
+
Wr.displayName = "H1";
|
|
3992
|
+
const Ur = B(({ font: e = "headlineMedium", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h2", elementClass: "uui-h2", font: e }));
|
|
3993
|
+
Ur.displayName = "H2";
|
|
3994
|
+
const zr = B(({ font: e = "headlineSmall", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h3", elementClass: "uui-h3", font: e }));
|
|
3995
|
+
zr.displayName = "H3";
|
|
3996
|
+
const Kr = B(({ font: e = "titleLarge", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h4", elementClass: "uui-h4", font: e }));
|
|
3997
|
+
Kr.displayName = "H4";
|
|
3998
|
+
const Zr = B(({ font: e = "titleMedium", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h5", elementClass: "uui-h5", font: e }));
|
|
3999
|
+
Zr.displayName = "H5";
|
|
4000
|
+
const qr = B(({ font: e = "titleSmall", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "h6", elementClass: "uui-h6", font: e }));
|
|
4001
|
+
qr.displayName = "H6";
|
|
4002
|
+
const Gr = B((e, t) => /* @__PURE__ */ i(pt, { ref: t, ...e, as: "p", elementClass: "uui-p" }));
|
|
4003
|
+
Gr.displayName = "P";
|
|
4004
|
+
const Yr = B((e, t) => /* @__PURE__ */ i(pt, { ref: t, ...e, as: "span", elementClass: "uui-span" }));
|
|
4005
|
+
Yr.displayName = "Span";
|
|
4006
|
+
const Xr = B(({ font: e = "labelLarge", ...t }, n) => /* @__PURE__ */ i(pt, { ref: n, ...t, as: "label", elementClass: "uui-label", font: e }));
|
|
4007
|
+
Xr.displayName = "Label";
|
|
4002
4008
|
const Vo = Symbol.for("uui.accordionItem");
|
|
4003
|
-
function
|
|
4009
|
+
function Jr(e) {
|
|
4004
4010
|
return dt(e) && typeof e.type != "string" && !!e.type[Vo];
|
|
4005
4011
|
}
|
|
4006
|
-
const
|
|
4012
|
+
const Vs = ({
|
|
4007
4013
|
type: e = "single",
|
|
4008
4014
|
variant: t = "segmented",
|
|
4009
4015
|
children: n,
|
|
@@ -4014,11 +4020,11 @@ const Ts = ({
|
|
|
4014
4020
|
showIcon: d,
|
|
4015
4021
|
font: f,
|
|
4016
4022
|
shape: m,
|
|
4017
|
-
animation:
|
|
4023
|
+
animation: g,
|
|
4018
4024
|
color: u,
|
|
4019
4025
|
disabled: s
|
|
4020
4026
|
}) => {
|
|
4021
|
-
const a = Ei(e, "vertical"), { values: p } = a, b = et.Children.toArray(n).filter(
|
|
4027
|
+
const a = Ei(e, "vertical"), { values: p } = a, b = et.Children.toArray(n).filter(Jr), h = {
|
|
4022
4028
|
elevation: r,
|
|
4023
4029
|
border: l ?? (t !== "text" ? 1 : void 0),
|
|
4024
4030
|
borderColor: c,
|
|
@@ -4028,10 +4034,10 @@ const Ts = ({
|
|
|
4028
4034
|
variant: t,
|
|
4029
4035
|
showIcon: d,
|
|
4030
4036
|
font: f,
|
|
4031
|
-
animation:
|
|
4037
|
+
animation: g,
|
|
4032
4038
|
color: u,
|
|
4033
4039
|
disabled: s,
|
|
4034
|
-
...
|
|
4040
|
+
...h
|
|
4035
4041
|
}, N = ht(
|
|
4036
4042
|
() => ({
|
|
4037
4043
|
...a,
|
|
@@ -4039,17 +4045,17 @@ const Ts = ({
|
|
|
4039
4045
|
}),
|
|
4040
4046
|
[C, a]
|
|
4041
4047
|
), x = [], S = [];
|
|
4042
|
-
b.forEach((
|
|
4043
|
-
t === "pills" || t === "segmented" ? x.push([
|
|
4048
|
+
b.forEach((M) => {
|
|
4049
|
+
t === "pills" || t === "segmented" ? x.push([M]) : S.push(M);
|
|
4044
4050
|
}), S.length && x.push(S);
|
|
4045
4051
|
const $ = ["uui-accordion-group", ot(o)];
|
|
4046
|
-
return /* @__PURE__ */ i(Ut.Provider, { value: N, children: /* @__PURE__ */ i("div", { className: `uui-accordion uui-accordion-${t}`, children: x.map((
|
|
4047
|
-
const H =
|
|
4052
|
+
return /* @__PURE__ */ i(Ut.Provider, { value: N, children: /* @__PURE__ */ i("div", { className: `uui-accordion uui-accordion-${t}`, children: x.map((M, k) => {
|
|
4053
|
+
const H = M[0].props.value, z = p.includes(H), P = k === 0, Ce = k === b.length - 1, ge = b[k - 1], xe = b[k + 1], me = ge && p.includes(ge.props.value), se = xe && p.includes(xe.props.value), j = t === "segmented", O = j && !P && !z && !me, ke = j && !Ce && !z && !se;
|
|
4048
4054
|
return /* @__PURE__ */ i(
|
|
4049
|
-
|
|
4055
|
+
Fe,
|
|
4050
4056
|
{
|
|
4051
|
-
...
|
|
4052
|
-
className:
|
|
4057
|
+
...h,
|
|
4058
|
+
className: re($, z && "uui-open"),
|
|
4053
4059
|
direction: "col",
|
|
4054
4060
|
style: j ? {
|
|
4055
4061
|
borderTopLeftRadius: O ? 0 : void 0,
|
|
@@ -4060,12 +4066,12 @@ const Ts = ({
|
|
|
4060
4066
|
position: "relative",
|
|
4061
4067
|
transition: "all 250ms ease"
|
|
4062
4068
|
} : void 0,
|
|
4063
|
-
children:
|
|
4069
|
+
children: M
|
|
4064
4070
|
},
|
|
4065
4071
|
H
|
|
4066
4072
|
);
|
|
4067
4073
|
}) }) });
|
|
4068
|
-
},
|
|
4074
|
+
}, Qr = ({
|
|
4069
4075
|
value: e,
|
|
4070
4076
|
label: t,
|
|
4071
4077
|
children: n,
|
|
@@ -4076,7 +4082,7 @@ const Ts = ({
|
|
|
4076
4082
|
font: d,
|
|
4077
4083
|
variant: f,
|
|
4078
4084
|
animation: m,
|
|
4079
|
-
flush:
|
|
4085
|
+
flush: g,
|
|
4080
4086
|
divided: u,
|
|
4081
4087
|
onFocus: s,
|
|
4082
4088
|
onBlur: a,
|
|
@@ -4084,35 +4090,35 @@ const Ts = ({
|
|
|
4084
4090
|
disabled: b,
|
|
4085
4091
|
hoverEffects: v = ["overlay"],
|
|
4086
4092
|
focusEffects: y = ["ring", "overlay"],
|
|
4087
|
-
pressedEffects:
|
|
4093
|
+
pressedEffects: h = ["overlay"],
|
|
4088
4094
|
touchEffects: C = ["ripple"],
|
|
4089
4095
|
selectedEffects: N = ["color"]
|
|
4090
4096
|
}) => {
|
|
4091
|
-
const x = U(null), { values: S, toggle: $, roving:
|
|
4097
|
+
const x = U(null), { values: S, toggle: $, roving: M, config: k } = po(), R = S.includes(e), { focusVisible: H, focusHandlers: z } = wt(s, a), P = `accordion-${e}`, Ce = c ?? (k == null ? void 0 : k.showIcon) ?? !0, ge = f ?? (k == null ? void 0 : k.variant) ?? "segmented", xe = b ?? (k == null ? void 0 : k.disabled), me = p ?? (k == null ? void 0 : k.color), se = Ce && /* @__PURE__ */ i("div", { className: "uui-accordion-icon uui-icon", children: r ?? xo }), j = o && /* @__PURE__ */ i(zt, { content: o }), O = (l ?? Ce) && /* @__PURE__ */ i(Kt, { content: l, end: se }), ke = [
|
|
4092
4098
|
"uui-accordion-trigger",
|
|
4093
4099
|
Ee(d ?? (k == null ? void 0 : k.font) ?? "labelLarge"),
|
|
4094
4100
|
...y.includes("ring") && H ? ["uui-focus-ring"] : [],
|
|
4095
4101
|
...y.includes("overlay") ? ["uui-focus-overlay"] : [],
|
|
4096
4102
|
...v.includes("overlay") ? ["uui-hover-overlay"] : [],
|
|
4097
|
-
...
|
|
4103
|
+
...h.includes("overlay") ? ["uui-pressed-overlay"] : []
|
|
4098
4104
|
].filter(Boolean).join(" ");
|
|
4099
|
-
function
|
|
4105
|
+
function ue(ee) {
|
|
4100
4106
|
$(e), C.includes("ripple") && x.current && Mt(x.current, ee);
|
|
4101
4107
|
}
|
|
4102
|
-
const
|
|
4108
|
+
const je = [
|
|
4103
4109
|
`uui-accordion-item uui-accordion-item-${ge}`,
|
|
4104
|
-
|
|
4110
|
+
g && "uui-flush",
|
|
4105
4111
|
u && "uui-divided"
|
|
4106
|
-
].filter(Boolean).join(" "), J =
|
|
4107
|
-
De.bg.on(
|
|
4108
|
-
const
|
|
4112
|
+
].filter(Boolean).join(" "), J = F(), De = F();
|
|
4113
|
+
De.bg.on(me), J.bg(me), J.text.on(me);
|
|
4114
|
+
const le = {
|
|
4109
4115
|
animation: "fade",
|
|
4110
4116
|
duration: 220,
|
|
4111
4117
|
style: "regular",
|
|
4112
4118
|
...typeof (k == null ? void 0 : k.animation) == "string" ? { animation: k.animation } : k == null ? void 0 : k.animation,
|
|
4113
4119
|
...typeof m == "string" ? { animation: m } : m
|
|
4114
4120
|
};
|
|
4115
|
-
return /* @__PURE__ */ L("div", { className:
|
|
4121
|
+
return /* @__PURE__ */ L("div", { className: je, "data-open": R, children: [
|
|
4116
4122
|
/* @__PURE__ */ L("div", { className: "uui-accordion-header", ref: x, style: J.get(), children: [
|
|
4117
4123
|
j,
|
|
4118
4124
|
/* @__PURE__ */ L(
|
|
@@ -4120,13 +4126,13 @@ const Ts = ({
|
|
|
4120
4126
|
{
|
|
4121
4127
|
...z,
|
|
4122
4128
|
"aria-controls": `${P}-content`,
|
|
4123
|
-
"aria-expanded":
|
|
4129
|
+
"aria-expanded": R,
|
|
4124
4130
|
className: ke,
|
|
4125
4131
|
disabled: xe,
|
|
4126
4132
|
id: `${P}-trigger`,
|
|
4127
|
-
onClick:
|
|
4128
|
-
onKeyDown:
|
|
4129
|
-
ref:
|
|
4133
|
+
onClick: ue,
|
|
4134
|
+
onKeyDown: M == null ? void 0 : M.onKeyDown,
|
|
4135
|
+
ref: M == null ? void 0 : M.register,
|
|
4130
4136
|
type: "button",
|
|
4131
4137
|
children: [
|
|
4132
4138
|
t,
|
|
@@ -4136,18 +4142,18 @@ const Ts = ({
|
|
|
4136
4142
|
),
|
|
4137
4143
|
O
|
|
4138
4144
|
] }),
|
|
4139
|
-
/* @__PURE__ */ i(rn, { animation:
|
|
4145
|
+
/* @__PURE__ */ i(rn, { animation: le, open: R, children: /* @__PURE__ */ i("div", { "aria-labelledby": `${P}-trigger`, id: `${P}-content`, role: "region", children: n }) })
|
|
4140
4146
|
] });
|
|
4141
4147
|
};
|
|
4142
|
-
|
|
4148
|
+
Qr[Vo] = !0;
|
|
4143
4149
|
const Ao = Symbol.for("uui.tab");
|
|
4144
|
-
function
|
|
4150
|
+
function es(e) {
|
|
4145
4151
|
return dt(e) && typeof e.type != "string" && !!e.type[Ao];
|
|
4146
4152
|
}
|
|
4147
|
-
const
|
|
4148
|
-
const [o, l] = Z([e]), c = oo.toArray(t).filter(
|
|
4149
|
-
function r(
|
|
4150
|
-
l([
|
|
4153
|
+
const As = ({ defaultValue: e, children: t, ...n }) => {
|
|
4154
|
+
const [o, l] = Z([e]), c = oo.toArray(t).filter(es);
|
|
4155
|
+
function r(g) {
|
|
4156
|
+
l([g]);
|
|
4151
4157
|
}
|
|
4152
4158
|
const d = ht(
|
|
4153
4159
|
() => ({
|
|
@@ -4161,12 +4167,12 @@ const Vs = ({ defaultValue: e, children: t, ...n }) => {
|
|
|
4161
4167
|
}),
|
|
4162
4168
|
[o]
|
|
4163
4169
|
);
|
|
4164
|
-
function f(
|
|
4170
|
+
function f(g) {
|
|
4165
4171
|
const u = c.findIndex((b) => o.includes(b.props.value));
|
|
4166
4172
|
if (u === -1)
|
|
4167
4173
|
return;
|
|
4168
4174
|
let s;
|
|
4169
|
-
switch (
|
|
4175
|
+
switch (g.key) {
|
|
4170
4176
|
case "ArrowRight":
|
|
4171
4177
|
s = (u + 1) % c.length;
|
|
4172
4178
|
break;
|
|
@@ -4182,16 +4188,16 @@ const Vs = ({ defaultValue: e, children: t, ...n }) => {
|
|
|
4182
4188
|
default:
|
|
4183
4189
|
return;
|
|
4184
4190
|
}
|
|
4185
|
-
|
|
4191
|
+
g.preventDefault();
|
|
4186
4192
|
const a = c[s].props.value;
|
|
4187
4193
|
r(a);
|
|
4188
4194
|
const p = document.getElementById(`uui-tab-${a}-trigger`);
|
|
4189
4195
|
p == null || p.focus();
|
|
4190
4196
|
}
|
|
4191
|
-
const m = c.map((
|
|
4192
|
-
label:
|
|
4193
|
-
value:
|
|
4194
|
-
})).map(({ label:
|
|
4197
|
+
const m = c.map((g) => ({
|
|
4198
|
+
label: g.props.label,
|
|
4199
|
+
value: g.props.value
|
|
4200
|
+
})).map(({ label: g, value: u }) => /* @__PURE__ */ i(
|
|
4195
4201
|
"button",
|
|
4196
4202
|
{
|
|
4197
4203
|
"aria-controls": `uui-tab-${u}-panel`,
|
|
@@ -4203,11 +4209,11 @@ const Vs = ({ defaultValue: e, children: t, ...n }) => {
|
|
|
4203
4209
|
},
|
|
4204
4210
|
role: "tab",
|
|
4205
4211
|
tabIndex: o.includes(u) ? 0 : -1,
|
|
4206
|
-
children:
|
|
4212
|
+
children: g
|
|
4207
4213
|
},
|
|
4208
4214
|
u
|
|
4209
4215
|
));
|
|
4210
|
-
return /* @__PURE__ */ i(Ut.Provider, { value: d, children: /* @__PURE__ */ L(
|
|
4216
|
+
return /* @__PURE__ */ i(Ut.Provider, { value: d, children: /* @__PURE__ */ L(Fe, { direction: "col", gap: 2, ...n, children: [
|
|
4211
4217
|
/* @__PURE__ */ i("div", { "aria-orientation": "horizontal", className: "uui-tabs-list", onKeyDown: f, role: "tablist", children: m }),
|
|
4212
4218
|
/* @__PURE__ */ i("div", { className: "uui-tabs-panels", children: c })
|
|
4213
4219
|
] }) });
|
|
@@ -4227,7 +4233,7 @@ const Vs = ({ defaultValue: e, children: t, ...n }) => {
|
|
|
4227
4233
|
};
|
|
4228
4234
|
Po[Ao] = !0;
|
|
4229
4235
|
Po.displayName = "Tab";
|
|
4230
|
-
const
|
|
4236
|
+
const ts = B(
|
|
4231
4237
|
({
|
|
4232
4238
|
variant: e = "docked",
|
|
4233
4239
|
color: t,
|
|
@@ -4239,16 +4245,16 @@ const es = M(
|
|
|
4239
4245
|
fixed: d,
|
|
4240
4246
|
divider: f,
|
|
4241
4247
|
children: m,
|
|
4242
|
-
className:
|
|
4248
|
+
className: g,
|
|
4243
4249
|
disabled: u,
|
|
4244
4250
|
orientation: s = "horizontal",
|
|
4245
4251
|
...a
|
|
4246
4252
|
}, p) => {
|
|
4247
|
-
const b = e === "floating", v = n ?? (b ? 3 : 0), y = o ?? (b ? "round" : void 0),
|
|
4253
|
+
const b = e === "floating", v = n ?? (b ? 3 : 0), y = o ?? (b ? "round" : void 0), h = t ?? (e === "floating" ? "surfaceContainerHigh" : "surfaceContainer"), C = [
|
|
4248
4254
|
"uui-toolbar",
|
|
4249
4255
|
`uui-toolbar-${e}`,
|
|
4250
4256
|
u && "uui-disabled",
|
|
4251
|
-
|
|
4257
|
+
g,
|
|
4252
4258
|
c && "uui-toolbar-full",
|
|
4253
4259
|
d && "uui-toolbar-fixed",
|
|
4254
4260
|
f && "uui-toolbar-divider",
|
|
@@ -4258,13 +4264,13 @@ const es = M(
|
|
|
4258
4264
|
s === "horizontal" ? "uui-horizontal" : "uui-vertical"
|
|
4259
4265
|
].filter(Boolean).join(" ");
|
|
4260
4266
|
return /* @__PURE__ */ i(
|
|
4261
|
-
|
|
4267
|
+
Fe,
|
|
4262
4268
|
{
|
|
4263
4269
|
ref: p,
|
|
4264
4270
|
...a,
|
|
4265
4271
|
as: "div",
|
|
4266
4272
|
className: C,
|
|
4267
|
-
color:
|
|
4273
|
+
color: h,
|
|
4268
4274
|
"data-position": r,
|
|
4269
4275
|
direction: s === "horizontal" ? "row" : "col",
|
|
4270
4276
|
disabled: u,
|
|
@@ -4273,8 +4279,8 @@ const es = M(
|
|
|
4273
4279
|
);
|
|
4274
4280
|
}
|
|
4275
4281
|
);
|
|
4276
|
-
|
|
4277
|
-
const
|
|
4282
|
+
ts.displayName = "Toolbar";
|
|
4283
|
+
const ns = ({
|
|
4278
4284
|
variant: e = "linear",
|
|
4279
4285
|
value: t,
|
|
4280
4286
|
min: n = 0,
|
|
@@ -4286,23 +4292,23 @@ const ts = ({
|
|
|
4286
4292
|
style: f,
|
|
4287
4293
|
...m
|
|
4288
4294
|
}) => {
|
|
4289
|
-
const { wrapperStyle:
|
|
4295
|
+
const { wrapperStyle: g, otherProps: u } = sn(m), s = F(g);
|
|
4290
4296
|
s.merge(f);
|
|
4291
4297
|
const a = typeof t == "number", p = Math.min(Math.max(t ?? n, n), o), b = o - n, v = b > 0 ? (p - n) / b * 100 : 0, y = {
|
|
4292
4298
|
role: "progressbar",
|
|
4293
4299
|
"aria-valuemin": n,
|
|
4294
4300
|
"aria-valuemax": o,
|
|
4295
4301
|
...a && { "aria-valuenow": p }
|
|
4296
|
-
},
|
|
4302
|
+
}, h = re(
|
|
4297
4303
|
d,
|
|
4298
4304
|
"uui-progress",
|
|
4299
4305
|
e === "circular" ? "uui-progress-circular" : "uui-progress-linear",
|
|
4300
4306
|
a ? "" : "uui-progress-indeterminate",
|
|
4301
4307
|
ft(r)
|
|
4302
|
-
), C =
|
|
4308
|
+
), C = F(), N = F();
|
|
4303
4309
|
if (e === "circular") {
|
|
4304
4310
|
C.stroke(c), N.stroke(l);
|
|
4305
|
-
const x =
|
|
4311
|
+
const x = re("uui-spinner", !a && "uui-spinner-ring", h);
|
|
4306
4312
|
return /* @__PURE__ */ i(
|
|
4307
4313
|
wo,
|
|
4308
4314
|
{
|
|
@@ -4326,7 +4332,7 @@ const ts = ({
|
|
|
4326
4332
|
}
|
|
4327
4333
|
);
|
|
4328
4334
|
}
|
|
4329
|
-
return C.bg(c), N.bg(l), /* @__PURE__ */ i("div", { className:
|
|
4335
|
+
return C.bg(c), N.bg(l), /* @__PURE__ */ i("div", { className: h, style: s.get(), ...y, ...u, children: /* @__PURE__ */ i("div", { className: "uui-progress-track", style: C.get(), children: /* @__PURE__ */ i(
|
|
4330
4336
|
"div",
|
|
4331
4337
|
{
|
|
4332
4338
|
className: "uui-progress-indicator",
|
|
@@ -4337,7 +4343,7 @@ const ts = ({
|
|
|
4337
4343
|
}
|
|
4338
4344
|
) }) });
|
|
4339
4345
|
};
|
|
4340
|
-
|
|
4346
|
+
ns.displayName = "Progress";
|
|
4341
4347
|
const to = ({
|
|
4342
4348
|
ariaLabel: e,
|
|
4343
4349
|
ariaLabelledby: t,
|
|
@@ -4349,7 +4355,7 @@ const to = ({
|
|
|
4349
4355
|
isFocused: d,
|
|
4350
4356
|
max: f,
|
|
4351
4357
|
min: m,
|
|
4352
|
-
onBlur:
|
|
4358
|
+
onBlur: g,
|
|
4353
4359
|
onFocus: u,
|
|
4354
4360
|
onKeyDown: s,
|
|
4355
4361
|
onPointer: a,
|
|
@@ -4357,7 +4363,7 @@ const to = ({
|
|
|
4357
4363
|
pct: b,
|
|
4358
4364
|
readOnly: v,
|
|
4359
4365
|
showValue: y,
|
|
4360
|
-
value:
|
|
4366
|
+
value: h
|
|
4361
4367
|
}) => {
|
|
4362
4368
|
const C = l.includes("ring") && c && d, N = p === "vertical" ? { bottom: `${b}%`, left: "50%", transform: "translate(-50%, 50%)" } : { left: `${b}%`, top: "50%", transform: "translate(-50%, -50%)" };
|
|
4363
4369
|
return /* @__PURE__ */ L(
|
|
@@ -4369,14 +4375,14 @@ const to = ({
|
|
|
4369
4375
|
"aria-readonly": v ?? void 0,
|
|
4370
4376
|
"aria-valuemax": f,
|
|
4371
4377
|
"aria-valuemin": m,
|
|
4372
|
-
"aria-valuenow":
|
|
4378
|
+
"aria-valuenow": h,
|
|
4373
4379
|
"aria-valuetext": o,
|
|
4374
|
-
className:
|
|
4380
|
+
className: re(
|
|
4375
4381
|
"uui-slider-handle",
|
|
4376
4382
|
y === "always" && "uui-slider-label-always",
|
|
4377
4383
|
C && "uui-focus-visible uui-focus-ring"
|
|
4378
4384
|
),
|
|
4379
|
-
onBlur:
|
|
4385
|
+
onBlur: g,
|
|
4380
4386
|
onFocus: u,
|
|
4381
4387
|
onKeyDown: s,
|
|
4382
4388
|
onPointerDown: (x) => {
|
|
@@ -4396,7 +4402,7 @@ const to = ({
|
|
|
4396
4402
|
/* @__PURE__ */ i("span", { className: "uui-slider-state" }),
|
|
4397
4403
|
/* @__PURE__ */ i("span", { className: "uui-slider-glyph" }),
|
|
4398
4404
|
y !== "none" && /* @__PURE__ */ i(
|
|
4399
|
-
|
|
4405
|
+
Fe,
|
|
4400
4406
|
{
|
|
4401
4407
|
className: "uui-slider-value-label",
|
|
4402
4408
|
color: "inverseSurface",
|
|
@@ -4409,7 +4415,7 @@ const to = ({
|
|
|
4409
4415
|
]
|
|
4410
4416
|
}
|
|
4411
4417
|
);
|
|
4412
|
-
},
|
|
4418
|
+
}, bn = (e) => Array.isArray(e) && e.length === 2, ct = (e, t, n) => Math.max(t, Math.min(n, e)), os = (e, t, n) => n > 0 ? t + Math.round((e - t) / n) * n : e, vn = (e, t, n) => (e - t) / (n - t || 1) * 100, is = B((e, t) => {
|
|
4413
4419
|
const {
|
|
4414
4420
|
"aria-label": n,
|
|
4415
4421
|
"aria-labelledby": o,
|
|
@@ -4419,7 +4425,7 @@ const to = ({
|
|
|
4419
4425
|
density: d,
|
|
4420
4426
|
description: f,
|
|
4421
4427
|
disabled: m,
|
|
4422
|
-
error:
|
|
4428
|
+
error: g,
|
|
4423
4429
|
focusEffects: u = ["ring"],
|
|
4424
4430
|
font: s,
|
|
4425
4431
|
formatValue: a,
|
|
@@ -4427,105 +4433,105 @@ const to = ({
|
|
|
4427
4433
|
label: b,
|
|
4428
4434
|
stops: v = !1,
|
|
4429
4435
|
max: y = 100,
|
|
4430
|
-
min:
|
|
4436
|
+
min: h = 0,
|
|
4431
4437
|
name: C,
|
|
4432
4438
|
onBlur: N,
|
|
4433
4439
|
onChange: x,
|
|
4434
4440
|
onChangeCommitted: S,
|
|
4435
4441
|
onFocus: $,
|
|
4436
|
-
orientation:
|
|
4442
|
+
orientation: M = "horizontal",
|
|
4437
4443
|
readOnly: k,
|
|
4438
|
-
required:
|
|
4444
|
+
required: R,
|
|
4439
4445
|
showValue: H,
|
|
4440
4446
|
size: z = "medium",
|
|
4441
4447
|
step: P = 1,
|
|
4442
4448
|
style: Ce,
|
|
4443
4449
|
textPlacement: ge = "top",
|
|
4444
4450
|
trackColor: xe = "secondaryContainer",
|
|
4445
|
-
type:
|
|
4446
|
-
value:
|
|
4447
|
-
} = e, j =
|
|
4448
|
-
(
|
|
4449
|
-
|
|
4451
|
+
type: me = "standard",
|
|
4452
|
+
value: se
|
|
4453
|
+
} = e, j = me === "range", O = me === "centered", ke = Bt(on), ue = m ?? (ke == null ? void 0 : ke.disabled), je = U(typeof r == "number" ? r : h), J = U(bn(r) ? r : [h, y]), [De, le] = Z(je.current), [ee, ye] = Z(J.current), he = se !== void 0, _ = ct(j ? bn(se) ? se[0] : ee[0] : typeof se == "number" ? se : De, h, y), D = j ? ct(bn(se) ? se[1] : ee[1], h, y) : y, ae = U(null), Re = U(null), Te = U(null), Se = Nt("slider"), W = p ?? Se, te = Ue(
|
|
4454
|
+
(T) => {
|
|
4455
|
+
he || (typeof T == "number" ? le(T) : ye(T)), x == null || x(T);
|
|
4450
4456
|
},
|
|
4451
|
-
[
|
|
4457
|
+
[he, x]
|
|
4452
4458
|
), Q = Ue(
|
|
4453
|
-
(
|
|
4459
|
+
(T) => {
|
|
4454
4460
|
var _e;
|
|
4455
|
-
const q = (_e =
|
|
4461
|
+
const q = (_e = ae.current) == null ? void 0 : _e.getBoundingClientRect();
|
|
4456
4462
|
if (!q)
|
|
4457
|
-
return
|
|
4458
|
-
const V = Number(
|
|
4459
|
-
return ct(
|
|
4463
|
+
return h;
|
|
4464
|
+
const V = Number(h), E = Number(y), Ae = M === "vertical" ? 1 - (T.clientY - q.top) / q.height : (T.clientX - q.left) / q.width;
|
|
4465
|
+
return ct(os(V + Ae * (E - V), V, Number(P)), V, E);
|
|
4460
4466
|
},
|
|
4461
|
-
[
|
|
4462
|
-
),
|
|
4463
|
-
(
|
|
4467
|
+
[h, y, P, M]
|
|
4468
|
+
), de = Ue(
|
|
4469
|
+
(T, q, V) => {
|
|
4464
4470
|
var _e;
|
|
4465
|
-
if (
|
|
4471
|
+
if (ue || q !== "move" && k || q === "move" && !(T.buttons & 1))
|
|
4466
4472
|
return;
|
|
4467
|
-
q === "down" && (
|
|
4468
|
-
const E = Q(
|
|
4469
|
-
q === "up" ? S == null || S(
|
|
4473
|
+
q === "down" && (T.currentTarget.setPointerCapture(T.pointerId), (_e = (V === 0 ? Re : Te).current) == null || _e.focus());
|
|
4474
|
+
const E = Q(T), Ae = j ? V === 0 ? [ct(E, h, D), D] : [_, ct(E, _, y)] : E;
|
|
4475
|
+
q === "up" ? S == null || S(Ae) : te(Ae);
|
|
4470
4476
|
},
|
|
4471
|
-
[
|
|
4477
|
+
[ue, k, Q, j, _, D, h, y, te, S]
|
|
4472
4478
|
), Me = Ue(
|
|
4473
|
-
(
|
|
4474
|
-
var E,
|
|
4475
|
-
if (
|
|
4479
|
+
(T) => {
|
|
4480
|
+
var E, Ae;
|
|
4481
|
+
if (ue || k || T.target.closest(".uui-slider-handle"))
|
|
4476
4482
|
return;
|
|
4477
|
-
const q = Q(
|
|
4483
|
+
const q = Q(T);
|
|
4478
4484
|
if (!j) {
|
|
4479
|
-
|
|
4485
|
+
te(q), (E = Re.current) == null || E.focus();
|
|
4480
4486
|
return;
|
|
4481
4487
|
}
|
|
4482
|
-
const V = Math.abs(q - _) <= Math.abs(q -
|
|
4483
|
-
|
|
4488
|
+
const V = Math.abs(q - _) <= Math.abs(q - D);
|
|
4489
|
+
te(V ? [ct(q, h, D), D] : [_, ct(q, _, y)]), (Ae = (V ? Re : Te).current) == null || Ae.focus();
|
|
4484
4490
|
},
|
|
4485
|
-
[
|
|
4486
|
-
), { focusVisible:
|
|
4491
|
+
[ue, k, Q, j, _, D, h, y, te]
|
|
4492
|
+
), { focusVisible: oe, isFocused: Le, focusHandlers: $e } = wt($, N), { isFocused: Ke, focusHandlers: Ie } = wt(), fe = kn({
|
|
4487
4493
|
value: _,
|
|
4488
|
-
min:
|
|
4489
|
-
max: j ?
|
|
4494
|
+
min: h,
|
|
4495
|
+
max: j ? D : y,
|
|
4490
4496
|
step: P,
|
|
4491
|
-
disabled:
|
|
4497
|
+
disabled: ue,
|
|
4492
4498
|
readOnly: k,
|
|
4493
|
-
onChange: (
|
|
4494
|
-
|
|
4499
|
+
onChange: (T) => {
|
|
4500
|
+
te(j ? [ct(T, h, D), D] : T);
|
|
4495
4501
|
}
|
|
4496
|
-
}), we =
|
|
4497
|
-
value:
|
|
4502
|
+
}), we = kn({
|
|
4503
|
+
value: D,
|
|
4498
4504
|
min: _,
|
|
4499
4505
|
max: y,
|
|
4500
4506
|
step: P,
|
|
4501
|
-
disabled:
|
|
4507
|
+
disabled: ue,
|
|
4502
4508
|
readOnly: k,
|
|
4503
|
-
onChange: (
|
|
4504
|
-
|
|
4509
|
+
onChange: (T) => {
|
|
4510
|
+
te([_, ct(T, _, y)]);
|
|
4505
4511
|
}
|
|
4506
|
-
}),
|
|
4512
|
+
}), ie = a ?? String, Be = H === "always" ? "always" : H ? "hover" : "none", ce = (T) => T.replace(/[A-Z]/g, (q) => `-${q.toLowerCase()}`), Ne = {};
|
|
4507
4513
|
if (c) {
|
|
4508
|
-
const
|
|
4514
|
+
const T = ce(c);
|
|
4509
4515
|
Object.assign(Ne, {
|
|
4510
|
-
"--uui-slider-active-color": `var(--uui-color-${
|
|
4511
|
-
"--uui-slider-active-on-color": `var(--uui-color-on-${
|
|
4516
|
+
"--uui-slider-active-color": `var(--uui-color-${T})`,
|
|
4517
|
+
"--uui-slider-active-on-color": `var(--uui-color-on-${T})`
|
|
4512
4518
|
});
|
|
4513
4519
|
}
|
|
4514
4520
|
if (xe) {
|
|
4515
|
-
const
|
|
4521
|
+
const T = ce(xe);
|
|
4516
4522
|
Object.assign(Ne, {
|
|
4517
|
-
"--uui-slider-inactive-color": `var(--uui-color-${
|
|
4518
|
-
"--uui-slider-inactive-on-color": `var(--uui-color-on-${
|
|
4523
|
+
"--uui-slider-inactive-color": `var(--uui-color-${T})`,
|
|
4524
|
+
"--uui-slider-inactive-on-color": `var(--uui-color-on-${T})`
|
|
4519
4525
|
});
|
|
4520
4526
|
}
|
|
4521
|
-
const G =
|
|
4527
|
+
const G = vn(_, h, y), K = vn(D, h, y), He = ht(() => {
|
|
4522
4528
|
if (!v || P <= 0)
|
|
4523
4529
|
return [];
|
|
4524
|
-
const
|
|
4525
|
-
for (let V =
|
|
4526
|
-
|
|
4527
|
-
return
|
|
4528
|
-
}, [v, P,
|
|
4530
|
+
const T = [], q = Number(P);
|
|
4531
|
+
for (let V = h; V <= y; V = V + q)
|
|
4532
|
+
T.push(vn(V, h, y));
|
|
4533
|
+
return T;
|
|
4534
|
+
}, [v, P, h, y]), be = 50, I = j ? G : O ? Math.min(G, be) : 0, Y = j ? K - G : O ? Math.abs(G - be) : G, Ve = M === "vertical" ? "bottom" : "left", ne = M === "vertical" ? { bottom: `${I}%`, height: `${Y}%`, top: "auto", width: "100%" } : { left: `${I}%`, width: `${Y}%` }, Ge = !n && b ? `${W}-label` : void 0, ze = { disabled: ue, focusEffects: u, focusVisible: oe, orientation: M, readOnly: k, showValue: Be }, Ze = {
|
|
4529
4535
|
"--uui-slider-h0": `${G}%`,
|
|
4530
4536
|
...j ? { "--uui-slider-h1": `${K}%` } : {},
|
|
4531
4537
|
...Ne,
|
|
@@ -4535,10 +4541,10 @@ const to = ({
|
|
|
4535
4541
|
"input",
|
|
4536
4542
|
{
|
|
4537
4543
|
"aria-hidden": "true",
|
|
4538
|
-
disabled:
|
|
4544
|
+
disabled: ue,
|
|
4539
4545
|
id: W,
|
|
4540
4546
|
max: y,
|
|
4541
|
-
min:
|
|
4547
|
+
min: h,
|
|
4542
4548
|
name: C,
|
|
4543
4549
|
onChange: () => {
|
|
4544
4550
|
},
|
|
@@ -4549,22 +4555,22 @@ const to = ({
|
|
|
4549
4555
|
value: _
|
|
4550
4556
|
}
|
|
4551
4557
|
),
|
|
4552
|
-
/* @__PURE__ */ L("div", { className: "uui-slider-control", onPointerDown: Me, ref:
|
|
4558
|
+
/* @__PURE__ */ L("div", { className: "uui-slider-control", onPointerDown: Me, ref: ae, style: Ze, children: [
|
|
4553
4559
|
/* @__PURE__ */ L("div", { "aria-hidden": "true", className: "uui-slider-track", children: [
|
|
4554
4560
|
/* @__PURE__ */ i("div", { className: "uui-slider-track-inactive" }),
|
|
4555
|
-
/* @__PURE__ */ i("div", { className: "uui-slider-track-active", style:
|
|
4556
|
-
He.length > 0 && /* @__PURE__ */ i("div", { className: "uui-slider-stops", children: He.map((
|
|
4557
|
-
const q = j ?
|
|
4561
|
+
/* @__PURE__ */ i("div", { className: "uui-slider-track-active", style: ne }),
|
|
4562
|
+
He.length > 0 && /* @__PURE__ */ i("div", { className: "uui-slider-stops", children: He.map((T) => {
|
|
4563
|
+
const q = j ? T >= G && T <= K : O ? T >= Math.min(G, be) && T <= Math.max(G, be) : T <= G;
|
|
4558
4564
|
return /* @__PURE__ */ i(
|
|
4559
4565
|
"span",
|
|
4560
4566
|
{
|
|
4561
|
-
className:
|
|
4567
|
+
className: re(
|
|
4562
4568
|
"uui-slider-stop",
|
|
4563
4569
|
q ? "uui-slider-stop-active" : "uui-slider-stop-inactive"
|
|
4564
4570
|
),
|
|
4565
|
-
style: { [
|
|
4571
|
+
style: { [Ve]: `${T}%` }
|
|
4566
4572
|
},
|
|
4567
|
-
|
|
4573
|
+
T
|
|
4568
4574
|
);
|
|
4569
4575
|
}) })
|
|
4570
4576
|
] }),
|
|
@@ -4574,16 +4580,16 @@ const to = ({
|
|
|
4574
4580
|
...ze,
|
|
4575
4581
|
ariaLabel: j && n ? `${n} start` : n,
|
|
4576
4582
|
ariaLabelledby: n ? o : Ge ?? o,
|
|
4577
|
-
displayValue:
|
|
4578
|
-
handleRef: st(
|
|
4583
|
+
displayValue: ie(_),
|
|
4584
|
+
handleRef: st(Re, j ? null : t),
|
|
4579
4585
|
isFocused: Le,
|
|
4580
|
-
max: j ?
|
|
4581
|
-
min:
|
|
4586
|
+
max: j ? D : y,
|
|
4587
|
+
min: h,
|
|
4582
4588
|
onBlur: $e.onBlur,
|
|
4583
4589
|
onFocus: $e.onFocus,
|
|
4584
|
-
onKeyDown:
|
|
4585
|
-
onPointer: (
|
|
4586
|
-
|
|
4590
|
+
onKeyDown: fe.onKeyDown,
|
|
4591
|
+
onPointer: (T, q) => {
|
|
4592
|
+
de(T, q, 0);
|
|
4587
4593
|
},
|
|
4588
4594
|
pct: G,
|
|
4589
4595
|
value: _
|
|
@@ -4595,76 +4601,76 @@ const to = ({
|
|
|
4595
4601
|
...ze,
|
|
4596
4602
|
ariaLabel: n ? `${n} end` : void 0,
|
|
4597
4603
|
ariaLabelledby: n ? o : Ge ?? o,
|
|
4598
|
-
displayValue:
|
|
4599
|
-
handleRef: st(
|
|
4604
|
+
displayValue: ie(D),
|
|
4605
|
+
handleRef: st(Te, t),
|
|
4600
4606
|
isFocused: Ke,
|
|
4601
4607
|
max: y,
|
|
4602
4608
|
min: _,
|
|
4603
4609
|
onBlur: Ie.onBlur,
|
|
4604
4610
|
onFocus: Ie.onFocus,
|
|
4605
4611
|
onKeyDown: we.onKeyDown,
|
|
4606
|
-
onPointer: (
|
|
4607
|
-
|
|
4612
|
+
onPointer: (T, q) => {
|
|
4613
|
+
de(T, q, 1);
|
|
4608
4614
|
},
|
|
4609
4615
|
pct: K,
|
|
4610
|
-
value:
|
|
4616
|
+
value: D
|
|
4611
4617
|
}
|
|
4612
4618
|
)
|
|
4613
4619
|
] })
|
|
4614
4620
|
] });
|
|
4615
4621
|
return /* @__PURE__ */ i(
|
|
4616
|
-
|
|
4622
|
+
an,
|
|
4617
4623
|
{
|
|
4618
|
-
className:
|
|
4624
|
+
className: re(
|
|
4619
4625
|
"uui-slider",
|
|
4620
|
-
|
|
4626
|
+
M === "vertical" && "uui-slider-vertical",
|
|
4621
4627
|
ft(z),
|
|
4622
4628
|
ot(d),
|
|
4623
4629
|
l,
|
|
4624
|
-
|
|
4625
|
-
|
|
4630
|
+
g && "uui-error",
|
|
4631
|
+
ue && "uui-disabled",
|
|
4626
4632
|
j && "uui-slider-range",
|
|
4627
4633
|
O && "uui-slider-centered"
|
|
4628
4634
|
),
|
|
4629
4635
|
control: qe,
|
|
4630
|
-
description: /* @__PURE__ */ i(
|
|
4631
|
-
label: b ? /* @__PURE__ */ i($n, { font: s, htmlFor: W, label: b, required:
|
|
4636
|
+
description: /* @__PURE__ */ i(cn, { description: f, error: g }),
|
|
4637
|
+
label: b ? /* @__PURE__ */ i($n, { font: s, htmlFor: W, label: b, required: R }) : void 0,
|
|
4632
4638
|
textPlacement: ge
|
|
4633
4639
|
}
|
|
4634
4640
|
);
|
|
4635
4641
|
});
|
|
4636
|
-
|
|
4637
|
-
const jn = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(),
|
|
4642
|
+
is.displayName = "Slider";
|
|
4643
|
+
const jn = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), rs = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth(), ss = (e) => jn(e, /* @__PURE__ */ new Date()), ls = (e) => new Date(e.getFullYear(), e.getMonth(), 1), as = (e) => new Date(e.getFullYear(), e.getMonth() + 1, 0), jo = (e, t = 1) => {
|
|
4638
4644
|
const n = new Date(e), o = n.getDay(), l = (o < t ? 7 : 0) + o - t;
|
|
4639
4645
|
return n.setDate(n.getDate() - l), n.setHours(0, 0, 0, 0), n;
|
|
4640
|
-
},
|
|
4646
|
+
}, cs = (e, t = 1) => {
|
|
4641
4647
|
const n = jo(e, t);
|
|
4642
4648
|
return n.setDate(n.getDate() + 6), n.setHours(23, 59, 59, 999), n;
|
|
4643
4649
|
}, no = (e, t) => {
|
|
4644
4650
|
const n = new Date(e);
|
|
4645
4651
|
return n.setMonth(n.getMonth() + t), n;
|
|
4646
|
-
},
|
|
4647
|
-
const n =
|
|
4652
|
+
}, us = (e, t) => {
|
|
4653
|
+
const n = ls(e), o = as(n), l = jo(n, 1), c = cs(o, 1), r = [], d = new Date(l);
|
|
4648
4654
|
for (; d <= c; )
|
|
4649
4655
|
r.push({
|
|
4650
4656
|
date: new Date(d),
|
|
4651
|
-
isCurrentMonth:
|
|
4652
|
-
isToday:
|
|
4657
|
+
isCurrentMonth: rs(d, n),
|
|
4658
|
+
isToday: ss(d),
|
|
4653
4659
|
isSelected: !!t && jn(d, t)
|
|
4654
4660
|
}), d.setDate(d.getDate() + 1);
|
|
4655
4661
|
return r;
|
|
4656
|
-
},
|
|
4662
|
+
}, ds = () => ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], fs = (e) => e.toLocaleDateString("en-US", { month: "long", year: "numeric" }), ps = B(
|
|
4657
4663
|
({ value: e, onChange: t, viewDate: n, className: o, ...l }, c) => {
|
|
4658
4664
|
const [r, d] = Z(n || e || /* @__PURE__ */ new Date()), f = (p) => {
|
|
4659
4665
|
p.preventDefault(), d(no(r, -1));
|
|
4660
4666
|
}, m = (p) => {
|
|
4661
4667
|
p.preventDefault(), d(no(r, 1));
|
|
4662
|
-
},
|
|
4668
|
+
}, g = (p) => {
|
|
4663
4669
|
t == null || t(p);
|
|
4664
|
-
}, u =
|
|
4665
|
-
return a.bg("surfaceContainerHigh"), a.text.on("surface"), /* @__PURE__ */ L(
|
|
4670
|
+
}, u = us(r, e), s = ds(), a = F();
|
|
4671
|
+
return a.bg("surfaceContainerHigh"), a.text.on("surface"), /* @__PURE__ */ L(Fe, { className: re("uui-calendar", o), ...l, style: a.get(), children: [
|
|
4666
4672
|
/* @__PURE__ */ L("div", { className: "uui-calendar-header", children: [
|
|
4667
|
-
/* @__PURE__ */ i("div", { className: "uui-calendar-title", children:
|
|
4673
|
+
/* @__PURE__ */ i("div", { className: "uui-calendar-title", children: fs(r) }),
|
|
4668
4674
|
/* @__PURE__ */ L("div", { className: "uui-calendar-nav", children: [
|
|
4669
4675
|
/* @__PURE__ */ i(
|
|
4670
4676
|
"button",
|
|
@@ -4695,11 +4701,11 @@ const jn = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.g
|
|
|
4695
4701
|
return /* @__PURE__ */ i(
|
|
4696
4702
|
Vt,
|
|
4697
4703
|
{
|
|
4698
|
-
className:
|
|
4704
|
+
className: re("uui-calendar-day"),
|
|
4699
4705
|
disabled: !p.isCurrentMonth,
|
|
4700
4706
|
filled: v,
|
|
4701
4707
|
onClick: () => {
|
|
4702
|
-
|
|
4708
|
+
g(p.date);
|
|
4703
4709
|
},
|
|
4704
4710
|
outlined: p.isToday,
|
|
4705
4711
|
children: /* @__PURE__ */ i("span", { children: p.date.getDate() })
|
|
@@ -4711,32 +4717,32 @@ const jn = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.g
|
|
|
4711
4717
|
] });
|
|
4712
4718
|
}
|
|
4713
4719
|
);
|
|
4714
|
-
|
|
4720
|
+
ps.displayName = "Calendar";
|
|
4715
4721
|
const Oo = Symbol.for("uui.avatar");
|
|
4716
|
-
function
|
|
4722
|
+
function ms(e) {
|
|
4717
4723
|
return dt(e) && typeof e.type != "string" && !!e.type[Oo];
|
|
4718
4724
|
}
|
|
4719
|
-
function
|
|
4725
|
+
function hs(e) {
|
|
4720
4726
|
let t = 0;
|
|
4721
4727
|
for (let n = 0; n < e.length; n++)
|
|
4722
4728
|
t = e.charCodeAt(n) + ((t << 5) - t);
|
|
4723
4729
|
return Math.abs(t);
|
|
4724
4730
|
}
|
|
4725
|
-
function
|
|
4731
|
+
function gs(e) {
|
|
4726
4732
|
const t = e == null ? void 0 : e.trim().split(/\s+/).filter(Boolean);
|
|
4727
4733
|
if (!(t != null && t.length))
|
|
4728
4734
|
return "";
|
|
4729
4735
|
const n = t[0][0], o = t.length > 1 ? t[t.length - 1][0] : "";
|
|
4730
4736
|
return (n + o).toUpperCase();
|
|
4731
4737
|
}
|
|
4732
|
-
const On =
|
|
4738
|
+
const On = B(
|
|
4733
4739
|
({ children: e, className: t, shape: n = "round", size: o = "medium", src: l, alt: c, name: r, color: d, ...f }, m) => {
|
|
4734
|
-
const [
|
|
4740
|
+
const [g, u] = Z(!1), s = re("uui-avatar", ft(o), t), a = !!(l && !g), p = gs(r), b = ht(() => {
|
|
4735
4741
|
const y = [...qn("semantic"), ...qn("extended")];
|
|
4736
4742
|
if (!r || a || d)
|
|
4737
4743
|
return;
|
|
4738
|
-
const
|
|
4739
|
-
return y[
|
|
4744
|
+
const h = hs(r) % y.length;
|
|
4745
|
+
return y[h];
|
|
4740
4746
|
}, [r, a, d]);
|
|
4741
4747
|
let v;
|
|
4742
4748
|
return a ? v = /* @__PURE__ */ i(
|
|
@@ -4766,7 +4772,7 @@ const On = M(
|
|
|
4766
4772
|
);
|
|
4767
4773
|
On[Oo] = !0;
|
|
4768
4774
|
On.displayName = "Avatar";
|
|
4769
|
-
const
|
|
4775
|
+
const ys = B(
|
|
4770
4776
|
({
|
|
4771
4777
|
children: e,
|
|
4772
4778
|
max: t,
|
|
@@ -4778,24 +4784,24 @@ const gs = M(
|
|
|
4778
4784
|
overflow: d,
|
|
4779
4785
|
className: f,
|
|
4780
4786
|
...m
|
|
4781
|
-
},
|
|
4782
|
-
const u = oo.toArray(e).filter(
|
|
4787
|
+
}, g) => {
|
|
4788
|
+
const u = oo.toArray(e).filter(ms), s = u.length;
|
|
4783
4789
|
let a = u, p = 0;
|
|
4784
4790
|
if (t !== void 0 && s > t) {
|
|
4785
4791
|
const y = Math.max(t - 1, 0);
|
|
4786
4792
|
a = u.slice(0, y), p = s - y;
|
|
4787
4793
|
}
|
|
4788
4794
|
const b = a.map(
|
|
4789
|
-
(y,
|
|
4790
|
-
key: y.key ??
|
|
4795
|
+
(y, h) => Wt(y, {
|
|
4796
|
+
key: y.key ?? h,
|
|
4791
4797
|
size: o ?? y.props.size,
|
|
4792
4798
|
shape: l ?? y.props.shape,
|
|
4793
4799
|
border: c ?? y.props.border,
|
|
4794
4800
|
borderColor: r ?? y.props.borderColor,
|
|
4795
4801
|
style: {
|
|
4796
4802
|
...y.props.style ?? {},
|
|
4797
|
-
marginInlineStart:
|
|
4798
|
-
zIndex:
|
|
4803
|
+
marginInlineStart: h === 0 ? 0 : -n,
|
|
4804
|
+
zIndex: h,
|
|
4799
4805
|
position: "relative"
|
|
4800
4806
|
}
|
|
4801
4807
|
})
|
|
@@ -4817,11 +4823,11 @@ const gs = M(
|
|
|
4817
4823
|
);
|
|
4818
4824
|
}
|
|
4819
4825
|
const v = ["uui-avatar-group", f].filter(Boolean).join(" ");
|
|
4820
|
-
return /* @__PURE__ */ i(Do, { alignItems: "center", ref:
|
|
4826
|
+
return /* @__PURE__ */ i(Do, { alignItems: "center", ref: g, ...m, className: v, children: b });
|
|
4821
4827
|
}
|
|
4822
4828
|
);
|
|
4823
|
-
|
|
4824
|
-
const
|
|
4829
|
+
ys.displayName = "AvatarGroup";
|
|
4830
|
+
const bs = B(
|
|
4825
4831
|
({
|
|
4826
4832
|
size: e = "small",
|
|
4827
4833
|
value: t,
|
|
@@ -4833,7 +4839,7 @@ const ys = M(
|
|
|
4833
4839
|
icon: d,
|
|
4834
4840
|
font: f,
|
|
4835
4841
|
emptyIcon: m,
|
|
4836
|
-
color:
|
|
4842
|
+
color: g,
|
|
4837
4843
|
name: u,
|
|
4838
4844
|
id: s,
|
|
4839
4845
|
label: a,
|
|
@@ -4841,76 +4847,76 @@ const ys = M(
|
|
|
4841
4847
|
error: b,
|
|
4842
4848
|
required: v,
|
|
4843
4849
|
density: y,
|
|
4844
|
-
onChange:
|
|
4850
|
+
onChange: h,
|
|
4845
4851
|
onFocus: C,
|
|
4846
4852
|
onBlur: N,
|
|
4847
4853
|
title: x,
|
|
4848
4854
|
textPlacement: S = "start",
|
|
4849
4855
|
focusEffects: $ = ["ring"],
|
|
4850
|
-
className:
|
|
4856
|
+
className: M,
|
|
4851
4857
|
tooltipAlign: k = "auto",
|
|
4852
|
-
"aria-label":
|
|
4858
|
+
"aria-label": R,
|
|
4853
4859
|
filled: H,
|
|
4854
4860
|
...z
|
|
4855
4861
|
}, P) => {
|
|
4856
|
-
const Ce = Nt("rating"), ge = s ?? u ?? Ce, xe = a ? `${ge}_label` : void 0, { isFocused:
|
|
4857
|
-
function
|
|
4862
|
+
const Ce = Nt("rating"), ge = s ?? u ?? Ce, xe = a ? `${ge}_label` : void 0, { isFocused: me, focusHandlers: se, focusVisible: j } = wt(C, N), O = U(null), ke = U(null), ue = t !== void 0, [je, J] = Z(n), [De, le] = Z(null), ee = ue ? t ?? 0 : je, ye = De ?? ee, he = Math.max(0, Math.min(ye, o)), _ = x ? /* @__PURE__ */ i("div", { id: `${ge}-tip`, children: x }) : null;
|
|
4863
|
+
function D(fe) {
|
|
4858
4864
|
if (!O.current)
|
|
4859
4865
|
return ee;
|
|
4860
|
-
const we = O.current,
|
|
4861
|
-
if (
|
|
4866
|
+
const we = O.current, ie = we.getBoundingClientRect(), Be = we.getElementsByClassName("uui-rating-icon"), ce = fe - ie.left;
|
|
4867
|
+
if (ce < 5)
|
|
4862
4868
|
return 0;
|
|
4863
|
-
const Ne =
|
|
4864
|
-
let G = Math.floor(
|
|
4869
|
+
const Ne = ie.width / o;
|
|
4870
|
+
let G = Math.floor(ce / Ne);
|
|
4865
4871
|
G = Math.max(0, Math.min(G, o - 1));
|
|
4866
|
-
const K = Be[G].getBoundingClientRect(), He =
|
|
4872
|
+
const K = Be[G].getBoundingClientRect(), He = fe - K.left, be = Math.max(0, Math.min(1, He / K.width)), I = 1 / l, Y = G + Math.ceil(be * I) / I;
|
|
4867
4873
|
return parseFloat(Math.min(Y, o).toFixed(10));
|
|
4868
4874
|
}
|
|
4869
|
-
function
|
|
4870
|
-
|
|
4875
|
+
function ae(fe) {
|
|
4876
|
+
ue || J(fe), h == null || h(fe);
|
|
4871
4877
|
}
|
|
4872
|
-
function
|
|
4873
|
-
c || r ||
|
|
4878
|
+
function Re(fe) {
|
|
4879
|
+
c || r || le(D(fe.clientX));
|
|
4874
4880
|
}
|
|
4875
|
-
function
|
|
4876
|
-
!c && !r &&
|
|
4881
|
+
function Te() {
|
|
4882
|
+
!c && !r && le(null);
|
|
4877
4883
|
}
|
|
4878
|
-
function Se(
|
|
4884
|
+
function Se(fe) {
|
|
4879
4885
|
if (c || r)
|
|
4880
4886
|
return;
|
|
4881
|
-
const we =
|
|
4882
|
-
|
|
4887
|
+
const we = D(fe.clientX);
|
|
4888
|
+
le(null), ae(we === ee ? 0 : we);
|
|
4883
4889
|
}
|
|
4884
|
-
const W =
|
|
4890
|
+
const W = kn({
|
|
4885
4891
|
value: ye,
|
|
4886
4892
|
min: 0,
|
|
4887
4893
|
max: o,
|
|
4888
4894
|
step: l,
|
|
4889
4895
|
disabled: r,
|
|
4890
4896
|
readOnly: c,
|
|
4891
|
-
onChange:
|
|
4892
|
-
}),
|
|
4897
|
+
onChange: ae
|
|
4898
|
+
}), te = d ?? Ki, Q = m ?? (H ? te : zi), de = re(
|
|
4893
4899
|
"uui-rating",
|
|
4894
4900
|
ft(e),
|
|
4895
|
-
|
|
4901
|
+
M,
|
|
4896
4902
|
H && "uui-filled",
|
|
4897
4903
|
c && "uui-read-only",
|
|
4898
4904
|
b && "uui-error",
|
|
4899
4905
|
r && "uui-disabled"
|
|
4900
|
-
), Me =
|
|
4906
|
+
), Me = re(
|
|
4901
4907
|
"uui-rating-control",
|
|
4902
|
-
...$.includes("ring") &&
|
|
4908
|
+
...$.includes("ring") && me && j ? ["uui-focus-ring uui-focus-visible"] : [],
|
|
4903
4909
|
ot(y)
|
|
4904
|
-
),
|
|
4905
|
-
const
|
|
4906
|
-
return Be.text(
|
|
4910
|
+
), oe = b ? "error" : g, Le = Array.from({ length: Math.ceil(o) }).map((fe, we) => {
|
|
4911
|
+
const ie = Math.min(Math.max(he - we, 0), 1) * 100, Be = F();
|
|
4912
|
+
return Be.text(oe), Be.set("width", `${ie}%`), /* @__PURE__ */ L(
|
|
4907
4913
|
"div",
|
|
4908
4914
|
{
|
|
4909
4915
|
className: "uui-icon uui-rating-icon",
|
|
4910
4916
|
style: { cursor: c || r ? "default" : "pointer", lineHeight: 0 },
|
|
4911
4917
|
children: [
|
|
4912
4918
|
/* @__PURE__ */ i("div", { className: "uui-rating-empty-icon", children: Q }),
|
|
4913
|
-
/* @__PURE__ */ i("div", { className: "uui-rating-filled-icon", style: Be.get(), children:
|
|
4919
|
+
/* @__PURE__ */ i("div", { className: "uui-rating-filled-icon", style: Be.get(), children: te })
|
|
4914
4920
|
]
|
|
4915
4921
|
},
|
|
4916
4922
|
`${ge}-star-${we}`
|
|
@@ -4918,9 +4924,9 @@ const ys = M(
|
|
|
4918
4924
|
}), $e = /* @__PURE__ */ L(
|
|
4919
4925
|
"div",
|
|
4920
4926
|
{
|
|
4921
|
-
...
|
|
4927
|
+
...se,
|
|
4922
4928
|
"aria-disabled": r || void 0,
|
|
4923
|
-
"aria-label": a ? void 0 :
|
|
4929
|
+
"aria-label": a ? void 0 : R ?? x,
|
|
4924
4930
|
"aria-labelledby": xe,
|
|
4925
4931
|
"aria-valuemax": o,
|
|
4926
4932
|
"aria-valuemin": 0,
|
|
@@ -4929,8 +4935,8 @@ const ys = M(
|
|
|
4929
4935
|
id: ge,
|
|
4930
4936
|
onClick: Se,
|
|
4931
4937
|
onKeyDown: W.onKeyDown,
|
|
4932
|
-
onMouseLeave:
|
|
4933
|
-
onMouseMove:
|
|
4938
|
+
onMouseLeave: Te,
|
|
4939
|
+
onMouseMove: Re,
|
|
4934
4940
|
ref: O,
|
|
4935
4941
|
role: "slider",
|
|
4936
4942
|
tabIndex: c || r ? -1 : 0,
|
|
@@ -4942,11 +4948,11 @@ const ys = M(
|
|
|
4942
4948
|
}
|
|
4943
4949
|
);
|
|
4944
4950
|
return /* @__PURE__ */ i(
|
|
4945
|
-
|
|
4951
|
+
an,
|
|
4946
4952
|
{
|
|
4947
|
-
className:
|
|
4953
|
+
className: de,
|
|
4948
4954
|
control: $e,
|
|
4949
|
-
description: (p ?? b) && /* @__PURE__ */ i(
|
|
4955
|
+
description: (p ?? b) && /* @__PURE__ */ i(cn, { description: p, error: b }),
|
|
4950
4956
|
label: a && /* @__PURE__ */ i($n, { focusRef: O, font: f, id: xe, label: a, required: v, tag: "span" }),
|
|
4951
4957
|
ref: ke,
|
|
4952
4958
|
spanDesc: !0,
|
|
@@ -4955,8 +4961,8 @@ const ys = M(
|
|
|
4955
4961
|
);
|
|
4956
4962
|
}
|
|
4957
4963
|
);
|
|
4958
|
-
|
|
4959
|
-
const
|
|
4964
|
+
bs.displayName = "Rating";
|
|
4965
|
+
const vs = B(
|
|
4960
4966
|
({
|
|
4961
4967
|
items: e,
|
|
4962
4968
|
children: t,
|
|
@@ -4968,7 +4974,7 @@ const bs = M(
|
|
|
4968
4974
|
renderSeparator: d,
|
|
4969
4975
|
renderCollapse: f,
|
|
4970
4976
|
as: m = "nav",
|
|
4971
|
-
itemComponent:
|
|
4977
|
+
itemComponent: g = "a",
|
|
4972
4978
|
animation: u,
|
|
4973
4979
|
...s
|
|
4974
4980
|
}, a) => {
|
|
@@ -4980,13 +4986,13 @@ const bs = M(
|
|
|
4980
4986
|
visible: [...x, { label: "__collapse__" }, ...S],
|
|
4981
4987
|
hidden: $
|
|
4982
4988
|
};
|
|
4983
|
-
}, [e, o, l, c]),
|
|
4989
|
+
}, [e, o, l, c]), h = (x, S) => {
|
|
4984
4990
|
const $ = x.current || S === v.length - 1;
|
|
4985
4991
|
return /* @__PURE__ */ L(
|
|
4986
|
-
|
|
4992
|
+
Fe,
|
|
4987
4993
|
{
|
|
4988
4994
|
"aria-current": $ ? "page" : void 0,
|
|
4989
|
-
as:
|
|
4995
|
+
as: g,
|
|
4990
4996
|
disabled: x.disabled,
|
|
4991
4997
|
style: {
|
|
4992
4998
|
display: "inline-flex",
|
|
@@ -5024,7 +5030,7 @@ const bs = M(
|
|
|
5024
5030
|
...typeof u == "string" ? { animation: u } : u
|
|
5025
5031
|
};
|
|
5026
5032
|
return /* @__PURE__ */ L(
|
|
5027
|
-
|
|
5033
|
+
Fe,
|
|
5028
5034
|
{
|
|
5029
5035
|
"aria-label": "breadcrumb",
|
|
5030
5036
|
as: m,
|
|
@@ -5040,7 +5046,7 @@ const bs = M(
|
|
|
5040
5046
|
t || v.map((x, S) => {
|
|
5041
5047
|
const $ = x.label === "__collapse__";
|
|
5042
5048
|
return /* @__PURE__ */ L(ti, { children: [
|
|
5043
|
-
$ ? f ? f(y) : C() : r ? r(x, S) :
|
|
5049
|
+
$ ? f ? f(y) : C() : r ? r(x, S) : h(x, S),
|
|
5044
5050
|
S < v.length - 1 && (d ? d(S) : /* @__PURE__ */ i(
|
|
5045
5051
|
"span",
|
|
5046
5052
|
{
|
|
@@ -5054,7 +5060,7 @@ const bs = M(
|
|
|
5054
5060
|
] }, S);
|
|
5055
5061
|
}),
|
|
5056
5062
|
/* @__PURE__ */ i(rn, { animation: N, open: p, children: /* @__PURE__ */ i(
|
|
5057
|
-
|
|
5063
|
+
Fe,
|
|
5058
5064
|
{
|
|
5059
5065
|
style: {
|
|
5060
5066
|
marginTop: 4,
|
|
@@ -5071,8 +5077,8 @@ const bs = M(
|
|
|
5071
5077
|
);
|
|
5072
5078
|
}
|
|
5073
5079
|
);
|
|
5074
|
-
|
|
5075
|
-
const
|
|
5080
|
+
vs.displayName = "Breadcrumbs";
|
|
5081
|
+
const Cs = (e, t) => {
|
|
5076
5082
|
const {
|
|
5077
5083
|
as: n,
|
|
5078
5084
|
children: o,
|
|
@@ -5082,7 +5088,7 @@ const vs = (e, t) => {
|
|
|
5082
5088
|
underline: d = "hover",
|
|
5083
5089
|
font: f = "labelLarge",
|
|
5084
5090
|
external: m,
|
|
5085
|
-
label:
|
|
5091
|
+
label: g,
|
|
5086
5092
|
className: u,
|
|
5087
5093
|
disabled: s,
|
|
5088
5094
|
hoverEffects: a = ["overlay"],
|
|
@@ -5090,33 +5096,33 @@ const vs = (e, t) => {
|
|
|
5090
5096
|
pressedEffects: b = ["overlay"],
|
|
5091
5097
|
underlineAnimation: v,
|
|
5092
5098
|
underlineOrigin: y,
|
|
5093
|
-
"aria-label":
|
|
5099
|
+
"aria-label": h,
|
|
5094
5100
|
...C
|
|
5095
|
-
} = e, N = n ?? "a", { onClick: x, ...S } = C, { href: $ } = S,
|
|
5101
|
+
} = e, N = n ?? "a", { onClick: x, ...S } = C, { href: $ } = S, M = re(
|
|
5096
5102
|
...p.includes("overlay") ? ["uui-focus-overlay"] : [],
|
|
5097
5103
|
...a.includes("overlay") ? ["uui-hover-overlay"] : [],
|
|
5098
5104
|
...b.includes("overlay") ? ["uui-pressed-overlay"] : []
|
|
5099
|
-
), k =
|
|
5105
|
+
), k = re(
|
|
5100
5106
|
"uui-link",
|
|
5101
5107
|
"uui-text-trigger",
|
|
5102
5108
|
Ee(f),
|
|
5103
5109
|
`uui-link-underline-${d}`,
|
|
5104
5110
|
v && `uui-link-anim-${v}`,
|
|
5105
5111
|
u,
|
|
5106
|
-
|
|
5112
|
+
M,
|
|
5107
5113
|
...p.includes("ring") ? ["uui-focus-ring"] : []
|
|
5108
|
-
),
|
|
5114
|
+
), R = h ?? g ?? (typeof o == "string" ? o : void 0), H = F();
|
|
5109
5115
|
H.text(r), y && H.set("--uui-underline-origin", y);
|
|
5110
5116
|
const z = /* @__PURE__ */ L("span", { className: "uui-link-content", children: [
|
|
5111
5117
|
l && /* @__PURE__ */ i(zt, { content: l }),
|
|
5112
|
-
/* @__PURE__ */ i("span", { className: "uui-link-text", children: o ??
|
|
5118
|
+
/* @__PURE__ */ i("span", { className: "uui-link-text", children: o ?? g }),
|
|
5113
5119
|
c && /* @__PURE__ */ i(Kt, { content: c })
|
|
5114
5120
|
] });
|
|
5115
5121
|
return /* @__PURE__ */ i(
|
|
5116
5122
|
N,
|
|
5117
5123
|
{
|
|
5118
5124
|
"aria-disabled": s || void 0,
|
|
5119
|
-
"aria-label":
|
|
5125
|
+
"aria-label": R,
|
|
5120
5126
|
className: k,
|
|
5121
5127
|
onClick: (P) => {
|
|
5122
5128
|
if (s) {
|
|
@@ -5136,25 +5142,25 @@ const vs = (e, t) => {
|
|
|
5136
5142
|
children: z
|
|
5137
5143
|
}
|
|
5138
5144
|
);
|
|
5139
|
-
},
|
|
5140
|
-
|
|
5145
|
+
}, xs = B(Cs);
|
|
5146
|
+
xs.displayName = "Link";
|
|
5141
5147
|
export {
|
|
5142
|
-
|
|
5143
|
-
|
|
5148
|
+
Vs as Accordion,
|
|
5149
|
+
Qr as AccordionItem,
|
|
5144
5150
|
Pi as ArrowBackIcon,
|
|
5145
5151
|
$r as Article,
|
|
5146
5152
|
Er as Aside,
|
|
5147
5153
|
On as Avatar,
|
|
5148
|
-
|
|
5154
|
+
ys as AvatarGroup,
|
|
5149
5155
|
Rn as Badge,
|
|
5150
5156
|
sr as BottomSheet,
|
|
5151
|
-
|
|
5152
|
-
|
|
5157
|
+
Fe as BoxBase,
|
|
5158
|
+
vs as Breadcrumbs,
|
|
5153
5159
|
Vn as Button,
|
|
5154
5160
|
jt as ButtonBase,
|
|
5155
|
-
|
|
5161
|
+
ps as Calendar,
|
|
5156
5162
|
ur as Card,
|
|
5157
|
-
|
|
5163
|
+
dn as CardActions,
|
|
5158
5164
|
dr as CardHeader,
|
|
5159
5165
|
fr as CardMedia,
|
|
5160
5166
|
pr as Checkbox,
|
|
@@ -5166,12 +5172,12 @@ export {
|
|
|
5166
5172
|
bo as CloseIcon,
|
|
5167
5173
|
rn as Collapse,
|
|
5168
5174
|
Dr as Content,
|
|
5169
|
-
|
|
5175
|
+
F as ControlStyle,
|
|
5170
5176
|
vr as DateField,
|
|
5171
5177
|
Cr as DateTimeField,
|
|
5172
5178
|
nr as Dialog,
|
|
5173
|
-
|
|
5174
|
-
|
|
5179
|
+
dn as DialogActions,
|
|
5180
|
+
fn as DialogBase,
|
|
5175
5181
|
Lo as DialogContent,
|
|
5176
5182
|
Bo as DialogHeader,
|
|
5177
5183
|
Io as DialogTitle,
|
|
@@ -5187,12 +5193,12 @@ export {
|
|
|
5187
5193
|
Do as Flex,
|
|
5188
5194
|
Rr as Footer,
|
|
5189
5195
|
Fo as Grid,
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
+
Wr as H1,
|
|
5197
|
+
Ur as H2,
|
|
5198
|
+
zr as H3,
|
|
5199
|
+
Kr as H4,
|
|
5200
|
+
Zr as H5,
|
|
5201
|
+
qr as H6,
|
|
5196
5202
|
Tr as Header,
|
|
5197
5203
|
ko as IS_DIVIDER,
|
|
5198
5204
|
To as IS_ITEM,
|
|
@@ -5201,36 +5207,36 @@ export {
|
|
|
5201
5207
|
Vt as IconButton,
|
|
5202
5208
|
Hi as IndeterminateIcon,
|
|
5203
5209
|
Pn as Item,
|
|
5204
|
-
|
|
5205
|
-
|
|
5210
|
+
Xr as Label,
|
|
5211
|
+
xs as Link,
|
|
5206
5212
|
Eo as List,
|
|
5207
|
-
|
|
5213
|
+
Fs as ListBox,
|
|
5208
5214
|
An as ListItem,
|
|
5209
5215
|
Vr as Main,
|
|
5210
|
-
|
|
5216
|
+
un as Menu,
|
|
5211
5217
|
Ui as MenuCheckIcon,
|
|
5212
5218
|
Tn as MenuItem,
|
|
5213
5219
|
wr as MonthField,
|
|
5214
5220
|
ji as MoreVertIcon,
|
|
5215
5221
|
Ar as Nav,
|
|
5216
5222
|
hr as NumberField,
|
|
5217
|
-
|
|
5218
|
-
|
|
5223
|
+
Ts as Option,
|
|
5224
|
+
Gr as P,
|
|
5219
5225
|
br as PasswordField,
|
|
5220
5226
|
yr as PhoneField,
|
|
5221
|
-
|
|
5227
|
+
ns as Progress,
|
|
5222
5228
|
Ir as Radio,
|
|
5223
5229
|
vo as RadioCheckedIcon,
|
|
5224
|
-
|
|
5230
|
+
Or as RadioGroup,
|
|
5225
5231
|
uo as RadioGroupContext,
|
|
5226
5232
|
_i as RadioIcon,
|
|
5227
5233
|
Co as RadioUncheckedIcon,
|
|
5228
|
-
|
|
5234
|
+
bs as Rating,
|
|
5229
5235
|
Pr as Section,
|
|
5230
5236
|
Br as Select,
|
|
5231
5237
|
Ut as SelectionContext,
|
|
5232
|
-
|
|
5233
|
-
|
|
5238
|
+
is as Slider,
|
|
5239
|
+
Yr as Span,
|
|
5234
5240
|
tr as Spinner,
|
|
5235
5241
|
Xi as SpinnerArcSvg,
|
|
5236
5242
|
Gi as SpinnerBarsSvg,
|
|
@@ -5240,29 +5246,30 @@ export {
|
|
|
5240
5246
|
Yi as SpinnerOrbitSvg,
|
|
5241
5247
|
wo as SpinnerRingSvg,
|
|
5242
5248
|
Ji as SpinnerStepBarSvg,
|
|
5249
|
+
jr as Stack,
|
|
5243
5250
|
Ki as StarFilledIcon,
|
|
5244
5251
|
zi as StarIcon,
|
|
5245
|
-
|
|
5252
|
+
_r as Switch,
|
|
5246
5253
|
Po as Tab,
|
|
5247
|
-
|
|
5254
|
+
As as Tabs,
|
|
5248
5255
|
pt as TextBase,
|
|
5249
5256
|
mr as TextField,
|
|
5250
5257
|
fo as ThemeContext,
|
|
5251
|
-
|
|
5258
|
+
Ds as ThemeProvider,
|
|
5252
5259
|
xr as TimeField,
|
|
5253
5260
|
ho as Toast,
|
|
5254
5261
|
Ri as ToastViewport,
|
|
5255
5262
|
Lr as ToggleButton,
|
|
5256
|
-
|
|
5263
|
+
ts as Toolbar,
|
|
5257
5264
|
Mr as Tooltip,
|
|
5258
5265
|
kr as UrlField,
|
|
5259
5266
|
Nr as WeekField,
|
|
5260
5267
|
mi as applyThemeColors,
|
|
5261
|
-
|
|
5262
|
-
|
|
5268
|
+
pn as breakpointStore,
|
|
5269
|
+
Bn as calculateFloatingPosition,
|
|
5263
5270
|
ai as capitalize,
|
|
5264
|
-
|
|
5265
|
-
|
|
5271
|
+
Ln as clampInt,
|
|
5272
|
+
re as cn,
|
|
5266
5273
|
Mt as createRipple,
|
|
5267
5274
|
Xt as defaultTheme,
|
|
5268
5275
|
fi as ensureInputMethod,
|
|
@@ -5270,7 +5277,7 @@ export {
|
|
|
5270
5277
|
Vi as flatChildren,
|
|
5271
5278
|
Xn as generateMaterialColors,
|
|
5272
5279
|
Ii as getAnimationClass,
|
|
5273
|
-
|
|
5280
|
+
Ms as getAnimationList,
|
|
5274
5281
|
rt as getBorderClass,
|
|
5275
5282
|
tn as getBorderColor,
|
|
5276
5283
|
qn as getColorNames,
|
|
@@ -5278,45 +5285,45 @@ export {
|
|
|
5278
5285
|
ot as getDensityClass,
|
|
5279
5286
|
ut as getElevationClass,
|
|
5280
5287
|
Ee as getFontClass,
|
|
5281
|
-
|
|
5288
|
+
Bs as getFontNames,
|
|
5282
5289
|
pi as getInputMethod,
|
|
5283
5290
|
Bi as getMotionStyleClass,
|
|
5284
|
-
|
|
5291
|
+
Cn as getOnColorName,
|
|
5285
5292
|
gi as getOrderedBreakpoints,
|
|
5286
5293
|
ci as getPlacementClass,
|
|
5287
5294
|
We as getShapeClass,
|
|
5288
5295
|
ft as getSizeClass,
|
|
5289
5296
|
so as getSurfaceColorVar,
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5297
|
+
Is as getTintOverlayColor,
|
|
5298
|
+
sn as getWrapperStyle,
|
|
5299
|
+
Ls as hexToRgb,
|
|
5293
5300
|
li as hexToRgbValues,
|
|
5294
|
-
|
|
5295
|
-
|
|
5301
|
+
yn as isDivider,
|
|
5302
|
+
Rs as isItem,
|
|
5296
5303
|
At as isMenu,
|
|
5297
|
-
|
|
5304
|
+
gn as isMenuItem,
|
|
5298
5305
|
_t as mergeOverrides,
|
|
5299
5306
|
st as mergeRefs,
|
|
5300
|
-
|
|
5301
|
-
|
|
5307
|
+
Mn as motionClassMap,
|
|
5308
|
+
ln as renderPortal,
|
|
5302
5309
|
yi as resolveBreakpoint,
|
|
5303
5310
|
bi as resolveResponsiveValue,
|
|
5304
5311
|
si as setColorRegistry,
|
|
5305
5312
|
di as setFontRegistry,
|
|
5306
5313
|
Tt as toKebabCase,
|
|
5307
5314
|
hi as toPx,
|
|
5308
|
-
|
|
5315
|
+
Es as toast,
|
|
5309
5316
|
Si as useAnimate,
|
|
5310
5317
|
co as useClickOutside,
|
|
5311
5318
|
Mi as useEscapeHandler,
|
|
5312
5319
|
Di as useFocusTrap,
|
|
5313
5320
|
wt as useFocusVisible,
|
|
5314
5321
|
nn as useMotion,
|
|
5315
|
-
|
|
5316
|
-
|
|
5322
|
+
Nn as useResizeObserver,
|
|
5323
|
+
$s as useResponsive,
|
|
5317
5324
|
po as useSelection,
|
|
5318
5325
|
Ei as useSelectionState,
|
|
5319
|
-
|
|
5326
|
+
kn as useSliderKeys,
|
|
5320
5327
|
$i as useTheme,
|
|
5321
5328
|
Nt as useUniqueId,
|
|
5322
5329
|
Li as useUpdateEffect
|