cattle-care-ui 0.1.39 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button.d.ts +7 -1
- package/dist/components/MenuItem.d.ts +3 -1
- package/dist/components/shortcut.d.ts +8 -0
- package/dist/index.css +1 -1
- package/dist/index.js +641 -607
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,70 +65,112 @@ function S({ content: e, side: t = "bottom", delay: r = 400, children: i }) {
|
|
|
65
65
|
children: e
|
|
66
66
|
}), document.body)] });
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/shortcut.ts
|
|
70
|
+
var C = () => typeof navigator < "u" && /mac|iphone|ipad/i.test(navigator.platform), w = {
|
|
71
|
+
alt: "⌥",
|
|
72
|
+
shift: "⇧",
|
|
73
|
+
ctrl: "Ctrl",
|
|
74
|
+
enter: "↵",
|
|
75
|
+
esc: "Esc"
|
|
76
|
+
};
|
|
77
|
+
function T(e) {
|
|
78
|
+
let t = C(), n = e.toLowerCase().split("+").map((e) => e.trim()), r = n[n.length - 1], i = new Set(n.slice(0, -1)), a = [...i].map((e) => e === "mod" ? t ? "⌘" : "Ctrl" : w[e] ?? e);
|
|
79
|
+
return a.push(w[r] ?? r.toUpperCase()), {
|
|
80
|
+
key: r,
|
|
81
|
+
mods: i,
|
|
82
|
+
mac: t,
|
|
83
|
+
labels: a
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function E(e, t, n = !0) {
|
|
87
|
+
l(() => {
|
|
88
|
+
if (!e || !n) return;
|
|
89
|
+
let { key: r, mods: i, mac: a } = T(e), o = (e) => {
|
|
90
|
+
e.key.toLowerCase() === r && (a ? e.metaKey : e.ctrlKey) === (i.has("mod") || !a && i.has("ctrl")) && e.altKey === i.has("alt") && e.shiftKey === i.has("shift") && (e.preventDefault(), t());
|
|
91
|
+
};
|
|
92
|
+
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
93
|
+
}, [e, n]);
|
|
94
|
+
}
|
|
95
|
+
var D = {
|
|
96
|
+
primary: "_primary_1egrp_1",
|
|
97
|
+
secondary: "_secondary_1egrp_2",
|
|
98
|
+
tertiary: "_tertiary_1egrp_3",
|
|
99
|
+
onDark: "_onDark_1egrp_4",
|
|
100
|
+
dangerous: "_dangerous_1egrp_5",
|
|
101
|
+
xs: "_xs_1egrp_45",
|
|
102
|
+
sm: "_sm_1egrp_51",
|
|
103
|
+
base: "_base_1egrp_57",
|
|
104
|
+
lg: "_lg_1egrp_63",
|
|
105
|
+
icon: "_icon_1egrp_70",
|
|
106
|
+
leadingIcon: "_leadingIcon_1egrp_78",
|
|
107
|
+
trailingIcon: "_trailingIcon_1egrp_81",
|
|
108
|
+
iconOnly: "_iconOnly_1egrp_89",
|
|
109
|
+
fullWidth: "_fullWidth_1egrp_105",
|
|
110
|
+
link: "_link_1egrp_226",
|
|
111
|
+
underlineHover: "_underlineHover_1egrp_250",
|
|
112
|
+
shortcut: "_shortcut_1egrp_265",
|
|
113
|
+
kbd: "_kbd_1egrp_273"
|
|
85
114
|
};
|
|
86
115
|
//#endregion
|
|
87
116
|
//#region src/components/Button.tsx
|
|
88
|
-
function
|
|
117
|
+
function O({ variant: e = "primary", size: t = "base", leadingIcon: n, trailingIcon: r, fullWidth: i, shortcut: a, underline: o = "always", children: s, className: c, ref: l, ...u }) {
|
|
118
|
+
let d = p(null);
|
|
119
|
+
E(a, () => d.current?.click(), !u.disabled);
|
|
120
|
+
let f = (e) => {
|
|
121
|
+
d.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
|
|
122
|
+
};
|
|
89
123
|
if (e === "link") {
|
|
90
124
|
let e = [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
D.link,
|
|
126
|
+
o === "hover" && D.underlineHover,
|
|
127
|
+
c
|
|
94
128
|
].filter(Boolean).join(" ");
|
|
95
129
|
return /* @__PURE__ */ _("button", {
|
|
96
|
-
ref:
|
|
130
|
+
ref: f,
|
|
97
131
|
type: "button",
|
|
98
132
|
className: e,
|
|
99
|
-
...
|
|
100
|
-
children:
|
|
133
|
+
...u,
|
|
134
|
+
children: s
|
|
101
135
|
});
|
|
102
136
|
}
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
i &&
|
|
108
|
-
|
|
109
|
-
].filter(Boolean).join(" "),
|
|
110
|
-
ref:
|
|
137
|
+
let m = !s && !!n, h = [
|
|
138
|
+
D[e],
|
|
139
|
+
D[t],
|
|
140
|
+
m && D.iconOnly,
|
|
141
|
+
i && D.fullWidth,
|
|
142
|
+
c
|
|
143
|
+
].filter(Boolean).join(" "), g = /* @__PURE__ */ v("button", {
|
|
144
|
+
ref: f,
|
|
111
145
|
type: "button",
|
|
112
|
-
className:
|
|
113
|
-
...
|
|
146
|
+
className: h,
|
|
147
|
+
...u,
|
|
114
148
|
children: [
|
|
115
149
|
n && /* @__PURE__ */ _("span", {
|
|
116
|
-
className: `${
|
|
150
|
+
className: `${D.icon} ${m ? "" : D.leadingIcon}`.trim(),
|
|
117
151
|
children: n
|
|
118
152
|
}),
|
|
119
|
-
|
|
153
|
+
s,
|
|
154
|
+
a && !m && /* @__PURE__ */ _("span", {
|
|
155
|
+
className: D.shortcut,
|
|
156
|
+
"aria-hidden": "true",
|
|
157
|
+
children: T(a).labels.map((e) => /* @__PURE__ */ _("kbd", {
|
|
158
|
+
className: D.kbd,
|
|
159
|
+
children: e
|
|
160
|
+
}, e))
|
|
161
|
+
}),
|
|
120
162
|
r && /* @__PURE__ */ _("span", {
|
|
121
|
-
className: `${
|
|
163
|
+
className: `${D.icon} ${D.trailingIcon}`,
|
|
122
164
|
children: r
|
|
123
165
|
})
|
|
124
166
|
]
|
|
125
167
|
});
|
|
126
|
-
return
|
|
127
|
-
content:
|
|
128
|
-
children:
|
|
129
|
-
}) :
|
|
168
|
+
return m ? /* @__PURE__ */ _(S, {
|
|
169
|
+
content: u["aria-label"],
|
|
170
|
+
children: g
|
|
171
|
+
}) : g;
|
|
130
172
|
}
|
|
131
|
-
var
|
|
173
|
+
var k = {
|
|
132
174
|
wrap: "_wrap_1spnu_1",
|
|
133
175
|
fluid: "_fluid_1spnu_9",
|
|
134
176
|
backing: "_backing_1spnu_14",
|
|
@@ -140,16 +182,16 @@ var T = {
|
|
|
140
182
|
};
|
|
141
183
|
//#endregion
|
|
142
184
|
//#region src/components/Card.tsx
|
|
143
|
-
function
|
|
185
|
+
function A({ stacked: e, completed: t, interactive: n, draggable: r, dragging: i, fluid: a, children: o, ...s }) {
|
|
144
186
|
return /* @__PURE__ */ v("div", {
|
|
145
|
-
className: `${
|
|
146
|
-
children: [e && /* @__PURE__ */ _("div", { className: `${
|
|
187
|
+
className: `${k.wrap} ${a ? k.fluid : ""}`,
|
|
188
|
+
children: [e && /* @__PURE__ */ _("div", { className: `${k.backing} ${t ? k.completed : ""}` }), /* @__PURE__ */ _("div", {
|
|
147
189
|
className: [
|
|
148
|
-
|
|
149
|
-
t ?
|
|
150
|
-
n ?
|
|
151
|
-
r ?
|
|
152
|
-
i ?
|
|
190
|
+
k.card,
|
|
191
|
+
t ? k.completed : "",
|
|
192
|
+
n ? k.interactive : "",
|
|
193
|
+
r ? k.grabbable : "",
|
|
194
|
+
i ? k.dragging : ""
|
|
153
195
|
].filter(Boolean).join(" "),
|
|
154
196
|
...s,
|
|
155
197
|
children: o
|
|
@@ -158,13 +200,13 @@ function E({ stacked: e, completed: t, interactive: n, draggable: r, dragging: i
|
|
|
158
200
|
}
|
|
159
201
|
//#endregion
|
|
160
202
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
161
|
-
var
|
|
203
|
+
var j = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
162
204
|
//#endregion
|
|
163
205
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
164
|
-
function
|
|
206
|
+
function M(e, t, n = []) {
|
|
165
207
|
if (t == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
166
208
|
return {
|
|
167
|
-
name:
|
|
209
|
+
name: j(e),
|
|
168
210
|
size: 24,
|
|
169
211
|
node: t,
|
|
170
212
|
...n.length > 0 ? { aliases: n } : {}
|
|
@@ -172,7 +214,7 @@ function O(e, t, n = []) {
|
|
|
172
214
|
}
|
|
173
215
|
//#endregion
|
|
174
216
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
175
|
-
var
|
|
217
|
+
var N = (e) => {
|
|
176
218
|
let t = "", n = !1;
|
|
177
219
|
for (let r of e) {
|
|
178
220
|
if (r === "-" || r === "_" || r <= " ") {
|
|
@@ -182,10 +224,10 @@ var k = (e) => {
|
|
|
182
224
|
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
183
225
|
}
|
|
184
226
|
return t;
|
|
185
|
-
},
|
|
186
|
-
let t =
|
|
227
|
+
}, P = (e) => {
|
|
228
|
+
let t = N(e);
|
|
187
229
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
188
|
-
},
|
|
230
|
+
}, F = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), I = {
|
|
189
231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
190
232
|
width: 24,
|
|
191
233
|
height: 24,
|
|
@@ -198,22 +240,22 @@ var k = (e) => {
|
|
|
198
240
|
};
|
|
199
241
|
//#endregion
|
|
200
242
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
201
|
-
function
|
|
243
|
+
function L(e) {
|
|
202
244
|
return e != null;
|
|
203
245
|
}
|
|
204
|
-
function
|
|
205
|
-
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ??
|
|
246
|
+
function R(e, t = {}) {
|
|
247
|
+
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ?? I.width, a = e.size ?? e.height ?? I.height, o = e.aliases?.filter((e) => typeof e == "string" && e.trim() !== "").map((e) => `lucide-${e}`) ?? [], s = [...e.name ? [`lucide-${e.name}`] : [], ...o], c = t.className?.split(" ").filter(Boolean) ?? [], l = t.includeDefaultClasses === !1 ? F(...c) : F("lucide", ...s, ...c), u = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? I["stroke-width"]) * Number(e.size ?? e.width ?? I.width) / Number(t.size ?? t.width ?? I.width) : t.strokeWidth ?? I["stroke-width"];
|
|
206
248
|
return [
|
|
207
249
|
"svg",
|
|
208
250
|
{
|
|
209
|
-
...Object.entries(
|
|
251
|
+
...Object.entries(I).reduce((e, [t, n]) => (e[r(t)] = n, e), {}),
|
|
210
252
|
..."color" in t && t.color && { [r("stroke")]: t.color },
|
|
211
|
-
..."size" in t &&
|
|
253
|
+
..."size" in t && L(t.size) && {
|
|
212
254
|
[r("width")]: t.size,
|
|
213
255
|
[r("height")]: t.size
|
|
214
256
|
},
|
|
215
|
-
..."width" in t &&
|
|
216
|
-
..."height" in t &&
|
|
257
|
+
..."width" in t && L(t.width) && { [r("width")]: t.width },
|
|
258
|
+
..."height" in t && L(t.height) && { [r("height")]: t.height },
|
|
217
259
|
[r("stroke-width")]: u,
|
|
218
260
|
...l && { [r("class")]: l },
|
|
219
261
|
[r("viewBox")]: `0 0 ${i} ${a}`,
|
|
@@ -235,8 +277,8 @@ function P(e, t = {}) {
|
|
|
235
277
|
}
|
|
236
278
|
//#endregion
|
|
237
279
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
238
|
-
function
|
|
239
|
-
return
|
|
280
|
+
function z(e, t = {}) {
|
|
281
|
+
return R(e, {
|
|
240
282
|
...t,
|
|
241
283
|
attributeNames: {
|
|
242
284
|
...t.attributeNames,
|
|
@@ -253,19 +295,19 @@ function F(e, t = {}) {
|
|
|
253
295
|
var ee = (e) => {
|
|
254
296
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
255
297
|
return !1;
|
|
256
|
-
},
|
|
298
|
+
}, te = r({}), ne = () => c(te), re = a(({ color: e, size: t, width: n, height: r, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
257
299
|
node: u,
|
|
258
300
|
aliases: [],
|
|
259
301
|
size: 24
|
|
260
302
|
}, ...f }, p) => {
|
|
261
|
-
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } =
|
|
303
|
+
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } = ne() ?? {}, b = !!l || ee(f), [x, S, C = []] = z(d, {
|
|
262
304
|
color: e ?? v,
|
|
263
305
|
width: n ?? t ?? m,
|
|
264
306
|
height: r ?? t ?? m,
|
|
265
307
|
strokeWidth: a ?? h,
|
|
266
308
|
absoluteStrokeWidth: o ?? g,
|
|
267
309
|
nonScalingStroke: s ?? _,
|
|
268
|
-
className:
|
|
310
|
+
className: F(y, c),
|
|
269
311
|
hasA11yProp: b,
|
|
270
312
|
attributes: f
|
|
271
313
|
});
|
|
@@ -276,18 +318,18 @@ var ee = (e) => {
|
|
|
276
318
|
});
|
|
277
319
|
//#endregion
|
|
278
320
|
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
279
|
-
function
|
|
280
|
-
let r = typeof e == "string" ?
|
|
321
|
+
function B(e, t = [], n = []) {
|
|
322
|
+
let r = typeof e == "string" ? M(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(re, {
|
|
281
323
|
ref: n,
|
|
282
324
|
icon: r,
|
|
283
325
|
className: e,
|
|
284
326
|
...t
|
|
285
327
|
}));
|
|
286
|
-
return r.name && (o.displayName =
|
|
328
|
+
return r.name && (o.displayName = P(r.name)), o;
|
|
287
329
|
}
|
|
288
330
|
//#endregion
|
|
289
331
|
//#region node_modules/lucide-react/dist/esm/icons/archive.mjs
|
|
290
|
-
var
|
|
332
|
+
var ie = {
|
|
291
333
|
name: "archive",
|
|
292
334
|
size: 24,
|
|
293
335
|
node: [
|
|
@@ -309,8 +351,8 @@ var B = {
|
|
|
309
351
|
}]
|
|
310
352
|
]
|
|
311
353
|
};
|
|
312
|
-
|
|
313
|
-
var
|
|
354
|
+
ie.node;
|
|
355
|
+
var ae = B(ie), oe = {
|
|
314
356
|
name: "check",
|
|
315
357
|
size: 24,
|
|
316
358
|
node: [["path", {
|
|
@@ -318,8 +360,8 @@ var te = z(B), ne = {
|
|
|
318
360
|
key: "1gmf2c"
|
|
319
361
|
}]]
|
|
320
362
|
};
|
|
321
|
-
|
|
322
|
-
var
|
|
363
|
+
oe.node;
|
|
364
|
+
var se = B(oe), ce = {
|
|
323
365
|
name: "chevron-down",
|
|
324
366
|
size: 24,
|
|
325
367
|
node: [["path", {
|
|
@@ -327,8 +369,8 @@ var re = z(ne), ie = {
|
|
|
327
369
|
key: "qrunsl"
|
|
328
370
|
}]]
|
|
329
371
|
};
|
|
330
|
-
|
|
331
|
-
var
|
|
372
|
+
ce.node;
|
|
373
|
+
var le = B(ce), ue = {
|
|
332
374
|
name: "chevron-left",
|
|
333
375
|
size: 24,
|
|
334
376
|
node: [["path", {
|
|
@@ -336,8 +378,8 @@ var ae = z(ie), oe = {
|
|
|
336
378
|
key: "1wnfg3"
|
|
337
379
|
}]]
|
|
338
380
|
};
|
|
339
|
-
|
|
340
|
-
var
|
|
381
|
+
ue.node;
|
|
382
|
+
var de = B(ue), fe = {
|
|
341
383
|
name: "chevron-right",
|
|
342
384
|
size: 24,
|
|
343
385
|
node: [["path", {
|
|
@@ -345,8 +387,8 @@ var se = z(oe), ce = {
|
|
|
345
387
|
key: "mthhwq"
|
|
346
388
|
}]]
|
|
347
389
|
};
|
|
348
|
-
|
|
349
|
-
var
|
|
390
|
+
fe.node;
|
|
391
|
+
var pe = B(fe), me = {
|
|
350
392
|
name: "eye-off",
|
|
351
393
|
size: 24,
|
|
352
394
|
node: [
|
|
@@ -368,8 +410,8 @@ var le = z(ce), ue = {
|
|
|
368
410
|
}]
|
|
369
411
|
]
|
|
370
412
|
};
|
|
371
|
-
|
|
372
|
-
var
|
|
413
|
+
me.node;
|
|
414
|
+
var V = B(me), H = {
|
|
373
415
|
name: "eye",
|
|
374
416
|
size: 24,
|
|
375
417
|
node: [["path", {
|
|
@@ -382,8 +424,8 @@ var de = z(ue), V = {
|
|
|
382
424
|
key: "1v7zrd"
|
|
383
425
|
}]]
|
|
384
426
|
};
|
|
385
|
-
|
|
386
|
-
var
|
|
427
|
+
H.node;
|
|
428
|
+
var he = B(H), ge = {
|
|
387
429
|
name: "lock",
|
|
388
430
|
size: 24,
|
|
389
431
|
node: [["rect", {
|
|
@@ -399,8 +441,8 @@ var fe = z(V), pe = {
|
|
|
399
441
|
key: "fwvmzm"
|
|
400
442
|
}]]
|
|
401
443
|
};
|
|
402
|
-
|
|
403
|
-
var
|
|
444
|
+
ge.node;
|
|
445
|
+
var _e = B(ge), ve = {
|
|
404
446
|
name: "play",
|
|
405
447
|
size: 24,
|
|
406
448
|
node: [["path", {
|
|
@@ -408,8 +450,8 @@ var me = z(pe), he = {
|
|
|
408
450
|
key: "10ikf1"
|
|
409
451
|
}]]
|
|
410
452
|
};
|
|
411
|
-
|
|
412
|
-
var
|
|
453
|
+
ve.node;
|
|
454
|
+
var ye = B(ve), be = {
|
|
413
455
|
name: "search",
|
|
414
456
|
size: 24,
|
|
415
457
|
node: [["path", {
|
|
@@ -422,8 +464,8 @@ var ge = z(he), _e = {
|
|
|
422
464
|
key: "4ej97u"
|
|
423
465
|
}]]
|
|
424
466
|
};
|
|
425
|
-
|
|
426
|
-
var
|
|
467
|
+
be.node;
|
|
468
|
+
var xe = B(be), Se = {
|
|
427
469
|
name: "user",
|
|
428
470
|
size: 24,
|
|
429
471
|
node: [["path", {
|
|
@@ -436,8 +478,8 @@ var ve = z(_e), ye = {
|
|
|
436
478
|
key: "17ys0d"
|
|
437
479
|
}]]
|
|
438
480
|
};
|
|
439
|
-
|
|
440
|
-
var
|
|
481
|
+
Se.node;
|
|
482
|
+
var Ce = B(Se), we = {
|
|
441
483
|
name: "x",
|
|
442
484
|
size: 24,
|
|
443
485
|
node: [["path", {
|
|
@@ -448,8 +490,8 @@ var be = z(ye), xe = {
|
|
|
448
490
|
key: "d8bk6v"
|
|
449
491
|
}]]
|
|
450
492
|
};
|
|
451
|
-
|
|
452
|
-
var
|
|
493
|
+
we.node;
|
|
494
|
+
var Te = B(we), U = {
|
|
453
495
|
neutral: "_neutral_13wj2_1",
|
|
454
496
|
pill: "_pill_13wj2_2",
|
|
455
497
|
accent: "_accent_13wj2_3",
|
|
@@ -467,53 +509,53 @@ var Se = z(xe), H = {
|
|
|
467
509
|
main: "_main_13wj2_161",
|
|
468
510
|
remove: "_remove_13wj2_162",
|
|
469
511
|
removable: "_removable_13wj2_189"
|
|
470
|
-
},
|
|
512
|
+
}, Ee = {
|
|
471
513
|
chip: "_chip_1vf29_5",
|
|
472
514
|
disabled: "_disabled_1vf29_15",
|
|
473
515
|
selected: "_selected_1vf29_28"
|
|
474
516
|
};
|
|
475
517
|
//#endregion
|
|
476
518
|
//#region src/components/Tag.tsx
|
|
477
|
-
function
|
|
519
|
+
function De(...e) {
|
|
478
520
|
return e.filter(Boolean).join(" ");
|
|
479
521
|
}
|
|
480
|
-
function
|
|
522
|
+
function Oe(e) {
|
|
481
523
|
if (e.variant === "count") {
|
|
482
524
|
let { variant: t, children: n, ...r } = e;
|
|
483
525
|
return /* @__PURE__ */ _("span", {
|
|
484
|
-
className:
|
|
526
|
+
className: U[t],
|
|
485
527
|
...r,
|
|
486
528
|
children: n
|
|
487
529
|
});
|
|
488
530
|
}
|
|
489
|
-
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m =
|
|
490
|
-
className:
|
|
531
|
+
let { variant: t = "neutral", children: n, onClick: r, pressed: i, disabled: a, leading: o, onRemove: s, removeLabel: c, ...l } = e, u = !!r, d = !!s, f = t === "chip", p = u && i === !0, m = De(U[t], f && Ee.chip, f && p && Ee.selected, f && a && Ee.disabled, (u || d) && U.interactive, p && U.pressed, a && U.disabled, (o != null || d) && U.slots), h = /* @__PURE__ */ v(g, { children: [o != null && /* @__PURE__ */ _("span", {
|
|
532
|
+
className: U.leading,
|
|
491
533
|
children: o
|
|
492
534
|
}), n] });
|
|
493
535
|
return d ? /* @__PURE__ */ v("span", {
|
|
494
|
-
className:
|
|
536
|
+
className: De(m, U.removable),
|
|
495
537
|
...l,
|
|
496
538
|
children: [u ? /* @__PURE__ */ _("button", {
|
|
497
539
|
type: "button",
|
|
498
|
-
className:
|
|
540
|
+
className: De(U.main, U.slots),
|
|
499
541
|
"aria-pressed": i,
|
|
500
542
|
disabled: a,
|
|
501
543
|
onClick: r,
|
|
502
544
|
children: h
|
|
503
545
|
}) : h, /* @__PURE__ */ _("button", {
|
|
504
546
|
type: "button",
|
|
505
|
-
className:
|
|
547
|
+
className: U.remove,
|
|
506
548
|
"aria-label": c,
|
|
507
549
|
disabled: a,
|
|
508
550
|
onClick: () => s(),
|
|
509
|
-
children: /* @__PURE__ */ _(
|
|
551
|
+
children: /* @__PURE__ */ _(Te, {
|
|
510
552
|
size: 12,
|
|
511
553
|
"aria-hidden": "true"
|
|
512
554
|
})
|
|
513
555
|
})]
|
|
514
556
|
}) : u ? /* @__PURE__ */ _("button", {
|
|
515
557
|
type: "button",
|
|
516
|
-
className:
|
|
558
|
+
className: De(m, U.button),
|
|
517
559
|
"aria-pressed": i,
|
|
518
560
|
disabled: a,
|
|
519
561
|
onClick: r,
|
|
@@ -525,20 +567,20 @@ function Te(e) {
|
|
|
525
567
|
children: h
|
|
526
568
|
});
|
|
527
569
|
}
|
|
528
|
-
var
|
|
570
|
+
var ke = {
|
|
529
571
|
group: "_group_rrzc7_1",
|
|
530
572
|
sm: "_sm_rrzc7_9",
|
|
531
573
|
chip: "_chip_rrzc7_13 _chip_1vf29_5",
|
|
532
574
|
base: "_base_rrzc7_28",
|
|
533
575
|
selected: "_selected_rrzc7_44 _selected_1vf29_28"
|
|
534
|
-
},
|
|
576
|
+
}, Ae = {
|
|
535
577
|
group: "_group_16vyf_1",
|
|
536
578
|
groupLabel: "_groupLabel_16vyf_7"
|
|
537
|
-
},
|
|
579
|
+
}, je = { label: "_label_tef1a_1" };
|
|
538
580
|
//#endregion
|
|
539
581
|
//#region src/components/FieldLabel.tsx
|
|
540
|
-
function
|
|
541
|
-
let r = `${
|
|
582
|
+
function W({ children: e, htmlFor: t, className: n }) {
|
|
583
|
+
let r = `${je.label} ${n ?? ""}`.trim();
|
|
542
584
|
return t ? /* @__PURE__ */ _("label", {
|
|
543
585
|
className: r,
|
|
544
586
|
htmlFor: t,
|
|
@@ -550,36 +592,36 @@ function U({ children: e, htmlFor: t, className: n }) {
|
|
|
550
592
|
}
|
|
551
593
|
//#endregion
|
|
552
594
|
//#region src/components/TagGroup.tsx
|
|
553
|
-
function
|
|
595
|
+
function Me({ items: e, value: t, onChange: n, size: r = "base", disabled: i = !1, label: a, ...o }) {
|
|
554
596
|
function s(e) {
|
|
555
597
|
n(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
556
598
|
}
|
|
557
599
|
let c = /* @__PURE__ */ _("div", {
|
|
558
600
|
role: "group",
|
|
559
601
|
"aria-label": a ? void 0 : o["aria-label"],
|
|
560
|
-
className: `${
|
|
602
|
+
className: `${ke.group} ${ke[r]}`,
|
|
561
603
|
children: e.map((e) => {
|
|
562
604
|
let n = t.includes(e.value), r = i || e.disabled;
|
|
563
605
|
return /* @__PURE__ */ _("button", {
|
|
564
606
|
type: "button",
|
|
565
607
|
"aria-pressed": n,
|
|
566
608
|
disabled: r,
|
|
567
|
-
className: [
|
|
609
|
+
className: [ke.chip, n && ke.selected].filter(Boolean).join(" "),
|
|
568
610
|
onClick: () => !r && s(e.value),
|
|
569
611
|
children: e.label
|
|
570
612
|
}, e.value);
|
|
571
613
|
})
|
|
572
614
|
});
|
|
573
615
|
return a ? /* @__PURE__ */ v("div", {
|
|
574
|
-
className:
|
|
616
|
+
className: Ae.group,
|
|
575
617
|
...o,
|
|
576
|
-
children: [/* @__PURE__ */ _(
|
|
577
|
-
className:
|
|
618
|
+
children: [/* @__PURE__ */ _(W, {
|
|
619
|
+
className: Ae.groupLabel,
|
|
578
620
|
children: a
|
|
579
621
|
}), c]
|
|
580
622
|
}) : c;
|
|
581
623
|
}
|
|
582
|
-
var
|
|
624
|
+
var Ne = {
|
|
583
625
|
toolbar: "_toolbar_17vse_1",
|
|
584
626
|
searchWrap: "_searchWrap_17vse_14",
|
|
585
627
|
searchIcon: "_searchIcon_17vse_33",
|
|
@@ -589,7 +631,7 @@ var Ae = {
|
|
|
589
631
|
};
|
|
590
632
|
//#endregion
|
|
591
633
|
//#region src/components/Toolbar.tsx
|
|
592
|
-
function
|
|
634
|
+
function Pe({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", shortcutLabel: r = "⌘K", shortcutKey: i = "k", children: a }) {
|
|
593
635
|
let o = p(null);
|
|
594
636
|
return l(() => {
|
|
595
637
|
function e(e) {
|
|
@@ -597,36 +639,36 @@ function je({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", s
|
|
|
597
639
|
}
|
|
598
640
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
599
641
|
}, [i]), /* @__PURE__ */ v("div", {
|
|
600
|
-
className:
|
|
642
|
+
className: Ne.toolbar,
|
|
601
643
|
children: [/* @__PURE__ */ v("div", {
|
|
602
|
-
className:
|
|
644
|
+
className: Ne.searchWrap,
|
|
603
645
|
children: [
|
|
604
646
|
/* @__PURE__ */ _("span", {
|
|
605
|
-
className:
|
|
606
|
-
children: /* @__PURE__ */ _(
|
|
647
|
+
className: Ne.searchIcon,
|
|
648
|
+
children: /* @__PURE__ */ _(xe, {})
|
|
607
649
|
}),
|
|
608
650
|
/* @__PURE__ */ _("input", {
|
|
609
651
|
ref: o,
|
|
610
652
|
type: "text",
|
|
611
|
-
className:
|
|
653
|
+
className: Ne.search,
|
|
612
654
|
placeholder: n,
|
|
613
655
|
autoComplete: "off",
|
|
614
656
|
value: e,
|
|
615
657
|
onChange: (e) => t?.(e.target.value)
|
|
616
658
|
}),
|
|
617
659
|
r && /* @__PURE__ */ _("span", {
|
|
618
|
-
className:
|
|
660
|
+
className: Ne.searchShortcut,
|
|
619
661
|
"aria-hidden": "true",
|
|
620
662
|
children: r
|
|
621
663
|
})
|
|
622
664
|
]
|
|
623
665
|
}), a && /* @__PURE__ */ _("div", {
|
|
624
|
-
className:
|
|
666
|
+
className: Ne.controls,
|
|
625
667
|
children: a
|
|
626
668
|
})]
|
|
627
669
|
});
|
|
628
670
|
}
|
|
629
|
-
var
|
|
671
|
+
var Fe = {
|
|
630
672
|
anchor: "_anchor_bty8b_3",
|
|
631
673
|
sentinel: "_sentinel_bty8b_8",
|
|
632
674
|
header: "_header_bty8b_17",
|
|
@@ -634,8 +676,8 @@ var Me = {
|
|
|
634
676
|
animated: "_animated_bty8b_57",
|
|
635
677
|
left: "_left_bty8b_66",
|
|
636
678
|
right: "_right_bty8b_67"
|
|
637
|
-
},
|
|
638
|
-
function
|
|
679
|
+
}, Ie = 16;
|
|
680
|
+
function Le(e) {
|
|
639
681
|
let t = e.parentElement;
|
|
640
682
|
for (; t && t !== document.body && t !== document.documentElement;) {
|
|
641
683
|
let { overflowY: e } = getComputedStyle(t);
|
|
@@ -644,7 +686,7 @@ function Pe(e) {
|
|
|
644
686
|
}
|
|
645
687
|
return null;
|
|
646
688
|
}
|
|
647
|
-
function
|
|
689
|
+
function Re({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ie, onStateChange: a, className: o, "data-testid": s = "header" }) {
|
|
648
690
|
let c = p(null), [u, d] = m("top"), [f, h] = m(!1), y = p(a);
|
|
649
691
|
l(() => {
|
|
650
692
|
y.current = a;
|
|
@@ -656,7 +698,7 @@ function Fe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ne,
|
|
|
656
698
|
let e = c.current;
|
|
657
699
|
if (!e) return;
|
|
658
700
|
let t, n, i = !0, a = 0, o = () => {
|
|
659
|
-
let o = r === void 0 ?
|
|
701
|
+
let o = r === void 0 ? Le(e) : r;
|
|
660
702
|
t && o === n || (t?.disconnect(), n = o, t = new IntersectionObserver((e) => {
|
|
661
703
|
let t = e[e.length - 1];
|
|
662
704
|
d(t.isIntersecting ? "top" : "floating"), i && (i = !1, a = requestAnimationFrame(() => h(!0)));
|
|
@@ -667,35 +709,35 @@ function Fe({ left: e, right: t, children: n, scrollRoot: r, threshold: i = Ne,
|
|
|
667
709
|
};
|
|
668
710
|
}, [r, i]);
|
|
669
711
|
let x = [
|
|
670
|
-
|
|
671
|
-
f ?
|
|
712
|
+
Fe.card,
|
|
713
|
+
f ? Fe.animated : "",
|
|
672
714
|
o
|
|
673
715
|
].filter(Boolean).join(" ");
|
|
674
716
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
|
|
675
|
-
className:
|
|
717
|
+
className: Fe.anchor,
|
|
676
718
|
"aria-hidden": "true",
|
|
677
719
|
children: /* @__PURE__ */ _("div", {
|
|
678
720
|
ref: c,
|
|
679
|
-
className:
|
|
721
|
+
className: Fe.sentinel,
|
|
680
722
|
style: { top: i }
|
|
681
723
|
})
|
|
682
724
|
}), /* @__PURE__ */ _("header", {
|
|
683
|
-
className:
|
|
725
|
+
className: Fe.header,
|
|
684
726
|
"data-testid": s,
|
|
685
727
|
children: /* @__PURE__ */ _("div", {
|
|
686
728
|
className: x,
|
|
687
729
|
"data-state": u,
|
|
688
730
|
children: n ?? /* @__PURE__ */ v(g, { children: [e && /* @__PURE__ */ _("div", {
|
|
689
|
-
className:
|
|
731
|
+
className: Fe.left,
|
|
690
732
|
children: e
|
|
691
733
|
}), t && /* @__PURE__ */ _("div", {
|
|
692
|
-
className:
|
|
734
|
+
className: Fe.right,
|
|
693
735
|
children: t
|
|
694
736
|
})] })
|
|
695
737
|
})
|
|
696
738
|
})] });
|
|
697
739
|
}
|
|
698
|
-
var
|
|
740
|
+
var ze = {
|
|
699
741
|
checkbox: "_checkbox_fknu2_1",
|
|
700
742
|
control: "_control_fknu2_8",
|
|
701
743
|
labelText: "_labelText_fknu2_17",
|
|
@@ -706,15 +748,15 @@ var Ie = {
|
|
|
706
748
|
};
|
|
707
749
|
//#endregion
|
|
708
750
|
//#region src/components/Checkbox.tsx
|
|
709
|
-
function
|
|
751
|
+
function Be({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel: a, disabled: o, className: s, ref: c }) {
|
|
710
752
|
return /* @__PURE__ */ v("label", {
|
|
711
|
-
className: `${
|
|
753
|
+
className: `${ze.checkbox} ${s ?? ""}`,
|
|
712
754
|
children: [/* @__PURE__ */ v("span", {
|
|
713
|
-
className:
|
|
755
|
+
className: ze.control,
|
|
714
756
|
children: [/* @__PURE__ */ _("input", {
|
|
715
757
|
ref: c,
|
|
716
758
|
type: "checkbox",
|
|
717
|
-
className:
|
|
759
|
+
className: ze.input,
|
|
718
760
|
checked: e,
|
|
719
761
|
onChange: t,
|
|
720
762
|
onBlur: n,
|
|
@@ -722,46 +764,46 @@ function Le({ checked: e, onChange: t, onBlur: n, name: r, label: i, ariaLabel:
|
|
|
722
764
|
"aria-label": a,
|
|
723
765
|
disabled: o
|
|
724
766
|
}), /* @__PURE__ */ _("span", {
|
|
725
|
-
className:
|
|
767
|
+
className: ze.box,
|
|
726
768
|
children: /* @__PURE__ */ _("svg", {
|
|
727
|
-
className:
|
|
769
|
+
className: ze.icon,
|
|
728
770
|
viewBox: "0 0 17 18",
|
|
729
771
|
"aria-hidden": "true",
|
|
730
772
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
731
773
|
})
|
|
732
774
|
})]
|
|
733
775
|
}), i && /* @__PURE__ */ _("span", {
|
|
734
|
-
className:
|
|
776
|
+
className: ze.labelText,
|
|
735
777
|
children: i
|
|
736
778
|
})]
|
|
737
779
|
});
|
|
738
780
|
}
|
|
739
|
-
function
|
|
781
|
+
function Ve({ checked: e, disabled: t }) {
|
|
740
782
|
return /* @__PURE__ */ _("span", {
|
|
741
|
-
className: `${
|
|
783
|
+
className: `${ze.box} ${ze.indicator}`,
|
|
742
784
|
"data-checked": e,
|
|
743
785
|
"data-disabled": t || void 0,
|
|
744
786
|
"aria-hidden": "true",
|
|
745
787
|
children: /* @__PURE__ */ _("svg", {
|
|
746
|
-
className:
|
|
788
|
+
className: ze.icon,
|
|
747
789
|
viewBox: "0 0 17 18",
|
|
748
790
|
"aria-hidden": "true",
|
|
749
791
|
children: /* @__PURE__ */ _("polyline", { points: "1 9 7 14 15 4" })
|
|
750
792
|
})
|
|
751
793
|
});
|
|
752
794
|
}
|
|
753
|
-
function
|
|
795
|
+
function He({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
754
796
|
function o(e) {
|
|
755
797
|
r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]);
|
|
756
798
|
}
|
|
757
799
|
return /* @__PURE__ */ v("div", {
|
|
758
800
|
role: "group",
|
|
759
801
|
"aria-label": e ? void 0 : a["aria-label"],
|
|
760
|
-
className:
|
|
761
|
-
children: [e && /* @__PURE__ */ _(
|
|
762
|
-
className:
|
|
802
|
+
className: Ae.group,
|
|
803
|
+
children: [e && /* @__PURE__ */ _(W, {
|
|
804
|
+
className: Ae.groupLabel,
|
|
763
805
|
children: e
|
|
764
|
-
}), t.map((e) => /* @__PURE__ */ _(
|
|
806
|
+
}), t.map((e) => /* @__PURE__ */ _(Be, {
|
|
765
807
|
checked: n.includes(e.value),
|
|
766
808
|
onChange: () => o(e.value),
|
|
767
809
|
label: e.label,
|
|
@@ -769,7 +811,7 @@ function ze({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
769
811
|
}, e.value))]
|
|
770
812
|
});
|
|
771
813
|
}
|
|
772
|
-
var
|
|
814
|
+
var Ue = {
|
|
773
815
|
radio: "_radio_46a3j_1",
|
|
774
816
|
control: "_control_46a3j_8",
|
|
775
817
|
labelText: "_labelText_46a3j_17",
|
|
@@ -779,15 +821,15 @@ var Be = {
|
|
|
779
821
|
};
|
|
780
822
|
//#endregion
|
|
781
823
|
//#region src/components/RadioButton.tsx
|
|
782
|
-
function
|
|
824
|
+
function We({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, ariaLabel: o, disabled: s, className: c, ref: l }) {
|
|
783
825
|
return /* @__PURE__ */ v("label", {
|
|
784
|
-
className: `${
|
|
826
|
+
className: `${Ue.radio} ${c ?? ""}`,
|
|
785
827
|
children: [/* @__PURE__ */ v("span", {
|
|
786
|
-
className:
|
|
828
|
+
className: Ue.control,
|
|
787
829
|
children: [/* @__PURE__ */ _("input", {
|
|
788
830
|
ref: l,
|
|
789
831
|
type: "radio",
|
|
790
|
-
className:
|
|
832
|
+
className: Ue.input,
|
|
791
833
|
checked: e,
|
|
792
834
|
onChange: t,
|
|
793
835
|
onBlur: n,
|
|
@@ -796,24 +838,24 @@ function Ve({ checked: e, onChange: t, onBlur: n, name: r, value: i, label: a, a
|
|
|
796
838
|
"aria-label": o,
|
|
797
839
|
disabled: s
|
|
798
840
|
}), /* @__PURE__ */ _("span", {
|
|
799
|
-
className:
|
|
800
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
841
|
+
className: Ue.circle,
|
|
842
|
+
children: /* @__PURE__ */ _("span", { className: Ue.dot })
|
|
801
843
|
})]
|
|
802
844
|
}), a && /* @__PURE__ */ _("span", {
|
|
803
|
-
className:
|
|
845
|
+
className: Ue.labelText,
|
|
804
846
|
children: a
|
|
805
847
|
})]
|
|
806
848
|
});
|
|
807
849
|
}
|
|
808
|
-
function
|
|
850
|
+
function Ge({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, ...o }) {
|
|
809
851
|
return /* @__PURE__ */ v("div", {
|
|
810
852
|
role: "radiogroup",
|
|
811
853
|
"aria-label": e ? void 0 : o["aria-label"],
|
|
812
|
-
className:
|
|
813
|
-
children: [e && /* @__PURE__ */ _(
|
|
814
|
-
className:
|
|
854
|
+
className: Ae.group,
|
|
855
|
+
children: [e && /* @__PURE__ */ _(W, {
|
|
856
|
+
className: Ae.groupLabel,
|
|
815
857
|
children: e
|
|
816
|
-
}), n.map((e) => /* @__PURE__ */ _(
|
|
858
|
+
}), n.map((e) => /* @__PURE__ */ _(We, {
|
|
817
859
|
name: t,
|
|
818
860
|
value: e.value,
|
|
819
861
|
checked: r === e.value,
|
|
@@ -823,7 +865,7 @@ function He({ label: e, name: t, items: n, value: r, onChange: i, disabled: a, .
|
|
|
823
865
|
}, e.value))]
|
|
824
866
|
});
|
|
825
867
|
}
|
|
826
|
-
var
|
|
868
|
+
var Ke = {
|
|
827
869
|
switch: "_switch_2mkka_1",
|
|
828
870
|
input: "_input_2mkka_7",
|
|
829
871
|
control: "_control_2mkka_10",
|
|
@@ -835,30 +877,30 @@ var Ue = {
|
|
|
835
877
|
};
|
|
836
878
|
//#endregion
|
|
837
879
|
//#region src/components/Switch.tsx
|
|
838
|
-
function
|
|
880
|
+
function qe({ checked: e, onChange: t, size: n = "base", label: r, ariaLabel: i, disabled: a, className: o }) {
|
|
839
881
|
return /* @__PURE__ */ v("label", {
|
|
840
|
-
className: `${
|
|
882
|
+
className: `${Ke.switch} ${o ?? ""}`,
|
|
841
883
|
children: [/* @__PURE__ */ v("span", {
|
|
842
|
-
className: `${
|
|
884
|
+
className: `${Ke.control} ${Ke[n]}`,
|
|
843
885
|
children: [/* @__PURE__ */ _("input", {
|
|
844
886
|
type: "checkbox",
|
|
845
887
|
role: "switch",
|
|
846
|
-
className:
|
|
888
|
+
className: Ke.input,
|
|
847
889
|
checked: e,
|
|
848
890
|
onChange: t,
|
|
849
891
|
"aria-label": i,
|
|
850
892
|
disabled: a
|
|
851
893
|
}), /* @__PURE__ */ _("span", {
|
|
852
|
-
className:
|
|
853
|
-
children: /* @__PURE__ */ _("span", { className:
|
|
894
|
+
className: Ke.track,
|
|
895
|
+
children: /* @__PURE__ */ _("span", { className: Ke.thumb })
|
|
854
896
|
})]
|
|
855
897
|
}), r && /* @__PURE__ */ _("span", {
|
|
856
|
-
className:
|
|
898
|
+
className: Ke.labelText,
|
|
857
899
|
children: r
|
|
858
900
|
})]
|
|
859
901
|
});
|
|
860
902
|
}
|
|
861
|
-
var
|
|
903
|
+
var G = {
|
|
862
904
|
field: "_field_f8lam_1",
|
|
863
905
|
inputWrap: "_inputWrap_f8lam_6",
|
|
864
906
|
input: "_input_f8lam_6",
|
|
@@ -873,73 +915,54 @@ var W = {
|
|
|
873
915
|
pickerInput: "_pickerInput_f8lam_165",
|
|
874
916
|
shortcut: "_shortcut_f8lam_173",
|
|
875
917
|
kbd: "_kbd_f8lam_181"
|
|
876
|
-
}, Ge = () => typeof navigator < "u" && /mac|iphone|ipad/i.test(navigator.platform), Ke = {
|
|
877
|
-
alt: "⌥",
|
|
878
|
-
shift: "⇧",
|
|
879
|
-
ctrl: "Ctrl",
|
|
880
|
-
enter: "↵",
|
|
881
|
-
esc: "Esc"
|
|
882
918
|
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
labels: a
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
function Je({ label: e, helperText: t, error: n, size: r = "base", variant: i = "default", leadingIcon: a, shortcut: o, id: s, className: c, ref: d, ...f }) {
|
|
893
|
-
let m = u(), h = s ?? m, g = p(null);
|
|
894
|
-
return l(() => {
|
|
895
|
-
if (!o) return;
|
|
896
|
-
let { key: e, mods: t, mac: n } = qe(o), r = (r) => {
|
|
897
|
-
r.key.toLowerCase() === e && (n ? r.metaKey : r.ctrlKey) === (t.has("mod") || !n && t.has("ctrl")) && r.altKey === t.has("alt") && r.shiftKey === t.has("shift") && (r.preventDefault(), g.current?.focus());
|
|
898
|
-
};
|
|
899
|
-
return window.addEventListener("keydown", r), () => window.removeEventListener("keydown", r);
|
|
900
|
-
}, [o]), /* @__PURE__ */ v("div", {
|
|
901
|
-
className: [W.field, c].filter(Boolean).join(" "),
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region src/components/TextField.tsx
|
|
921
|
+
function Je({ label: e, helperText: t, error: n, size: r = "base", variant: i = "default", leadingIcon: a, shortcut: o, id: s, className: c, ref: l, ...d }) {
|
|
922
|
+
let f = u(), m = s ?? f, h = p(null);
|
|
923
|
+
return E(o, () => h.current?.focus()), /* @__PURE__ */ v("div", {
|
|
924
|
+
className: [G.field, c].filter(Boolean).join(" "),
|
|
902
925
|
children: [
|
|
903
|
-
e && /* @__PURE__ */ _(
|
|
904
|
-
htmlFor:
|
|
926
|
+
e && /* @__PURE__ */ _(W, {
|
|
927
|
+
htmlFor: m,
|
|
905
928
|
children: e
|
|
906
929
|
}),
|
|
907
930
|
/* @__PURE__ */ v("div", {
|
|
908
|
-
className: `${
|
|
931
|
+
className: `${G.inputWrap} ${G[i]} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
909
932
|
children: [
|
|
910
933
|
a && /* @__PURE__ */ _("span", {
|
|
911
|
-
className:
|
|
934
|
+
className: G.icon,
|
|
912
935
|
children: a
|
|
913
936
|
}),
|
|
914
937
|
/* @__PURE__ */ _("input", {
|
|
915
938
|
ref: (e) => {
|
|
916
|
-
|
|
939
|
+
h.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
|
|
917
940
|
},
|
|
918
|
-
id:
|
|
919
|
-
className:
|
|
920
|
-
...
|
|
941
|
+
id: m,
|
|
942
|
+
className: G.input,
|
|
943
|
+
...d
|
|
921
944
|
}),
|
|
922
945
|
o && /* @__PURE__ */ _("span", {
|
|
923
|
-
className:
|
|
946
|
+
className: G.shortcut,
|
|
924
947
|
"aria-hidden": "true",
|
|
925
|
-
children:
|
|
926
|
-
className:
|
|
948
|
+
children: T(o).labels.map((e) => /* @__PURE__ */ _("kbd", {
|
|
949
|
+
className: G.kbd,
|
|
927
950
|
children: e
|
|
928
951
|
}, e))
|
|
929
952
|
})
|
|
930
953
|
]
|
|
931
954
|
}),
|
|
932
955
|
n ? /* @__PURE__ */ _("span", {
|
|
933
|
-
className:
|
|
956
|
+
className: G.errorText,
|
|
934
957
|
children: n
|
|
935
958
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
936
|
-
className:
|
|
959
|
+
className: G.helperText,
|
|
937
960
|
children: t
|
|
938
961
|
}) : null
|
|
939
962
|
]
|
|
940
963
|
});
|
|
941
964
|
}
|
|
942
|
-
var
|
|
965
|
+
var K = {
|
|
943
966
|
field: "_field_9sqb4_3",
|
|
944
967
|
wrap: "_wrap_9sqb4_1",
|
|
945
968
|
readOnly: "_readOnly_9sqb4_14",
|
|
@@ -989,37 +1012,37 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
989
1012
|
let e = A.current;
|
|
990
1013
|
!a && e && (e.style.height = "", e.style.overflowY = "");
|
|
991
1014
|
}, [a]);
|
|
992
|
-
let
|
|
1015
|
+
let I = (e) => {
|
|
993
1016
|
j || N(e.target.value.length), w?.(e);
|
|
994
|
-
},
|
|
1017
|
+
}, L = (e) => {
|
|
995
1018
|
j || (N(e.currentTarget.value.length), F()), T?.(e);
|
|
996
|
-
},
|
|
1019
|
+
}, R = `${k}-helper`, z = `${k}-error`, ee = `${k}-count`, te = [
|
|
997
1020
|
E,
|
|
998
|
-
n ?
|
|
999
|
-
c ?
|
|
1000
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
n ?
|
|
1004
|
-
S ?
|
|
1005
|
-
C ?
|
|
1021
|
+
n ? z : t ? R : null,
|
|
1022
|
+
c ? ee : null
|
|
1023
|
+
].filter(Boolean).join(" ") || void 0, ne = x ? P / x : 0, re = ne >= 1 ? K.countLimit : ne >= .9 ? K.countNear : "", B = [
|
|
1024
|
+
K.wrap,
|
|
1025
|
+
K[r],
|
|
1026
|
+
n ? K.errorWrap : "",
|
|
1027
|
+
S ? K.disabled : "",
|
|
1028
|
+
C ? K.readOnly : ""
|
|
1006
1029
|
].filter(Boolean).join(" "), ie = a ? "none" : i;
|
|
1007
1030
|
return /* @__PURE__ */ v("div", {
|
|
1008
|
-
className: [
|
|
1031
|
+
className: [K.field, f].filter(Boolean).join(" "),
|
|
1009
1032
|
children: [
|
|
1010
|
-
e && /* @__PURE__ */ _(
|
|
1033
|
+
e && /* @__PURE__ */ _(W, {
|
|
1011
1034
|
htmlFor: k,
|
|
1012
1035
|
children: e
|
|
1013
1036
|
}),
|
|
1014
1037
|
/* @__PURE__ */ _("div", {
|
|
1015
|
-
className:
|
|
1038
|
+
className: B,
|
|
1016
1039
|
children: /* @__PURE__ */ _("textarea", {
|
|
1017
1040
|
...D,
|
|
1018
1041
|
ref: (e) => {
|
|
1019
1042
|
A.current = e, Ye(h, e);
|
|
1020
1043
|
},
|
|
1021
1044
|
id: k,
|
|
1022
|
-
className: `${
|
|
1045
|
+
className: `${K.textarea} ${K[`resize-${ie}`]}`,
|
|
1023
1046
|
rows: g,
|
|
1024
1047
|
value: y,
|
|
1025
1048
|
defaultValue: b,
|
|
@@ -1027,24 +1050,24 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1027
1050
|
disabled: S,
|
|
1028
1051
|
readOnly: C,
|
|
1029
1052
|
"aria-invalid": n ? !0 : D["aria-invalid"],
|
|
1030
|
-
"aria-describedby":
|
|
1031
|
-
onChange:
|
|
1032
|
-
onInput:
|
|
1053
|
+
"aria-describedby": te,
|
|
1054
|
+
onChange: I,
|
|
1055
|
+
onInput: L
|
|
1033
1056
|
})
|
|
1034
1057
|
}),
|
|
1035
1058
|
(n || t || c) && /* @__PURE__ */ v("div", {
|
|
1036
|
-
className:
|
|
1059
|
+
className: K.footer,
|
|
1037
1060
|
children: [n ? /* @__PURE__ */ _("span", {
|
|
1038
|
-
id:
|
|
1039
|
-
className:
|
|
1061
|
+
id: z,
|
|
1062
|
+
className: K.errorText,
|
|
1040
1063
|
children: n
|
|
1041
1064
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1042
|
-
id:
|
|
1043
|
-
className:
|
|
1065
|
+
id: R,
|
|
1066
|
+
className: K.helperText,
|
|
1044
1067
|
children: t
|
|
1045
1068
|
}) : null, c && /* @__PURE__ */ _("span", {
|
|
1046
|
-
id:
|
|
1047
|
-
className: `${
|
|
1069
|
+
id: ee,
|
|
1070
|
+
className: `${K.count} ${re}`,
|
|
1048
1071
|
children: x ? `${P} / ${x}` : P
|
|
1049
1072
|
})]
|
|
1050
1073
|
})
|
|
@@ -1056,38 +1079,38 @@ function Xe({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1056
1079
|
function Ze({ label: e, helperText: t, error: n, size: r = "base", showLabel: i = "Show password", hideLabel: a = "Hide password", defaultVisible: o = !1, id: s, className: c, ref: l, disabled: d, ...f }) {
|
|
1057
1080
|
let p = u(), h = s ?? p, [g, y] = m(o);
|
|
1058
1081
|
return /* @__PURE__ */ v("div", {
|
|
1059
|
-
className: [
|
|
1082
|
+
className: [G.field, c].filter(Boolean).join(" "),
|
|
1060
1083
|
children: [
|
|
1061
|
-
e && /* @__PURE__ */ _(
|
|
1084
|
+
e && /* @__PURE__ */ _(W, {
|
|
1062
1085
|
htmlFor: h,
|
|
1063
1086
|
children: e
|
|
1064
1087
|
}),
|
|
1065
1088
|
/* @__PURE__ */ v("div", {
|
|
1066
|
-
className: `${
|
|
1089
|
+
className: `${G.inputWrap} ${G.default} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
1067
1090
|
children: [/* @__PURE__ */ _("input", {
|
|
1068
1091
|
ref: l,
|
|
1069
1092
|
id: h,
|
|
1070
|
-
className:
|
|
1093
|
+
className: G.input,
|
|
1071
1094
|
type: g ? "text" : "password",
|
|
1072
1095
|
autoComplete: "off",
|
|
1073
1096
|
disabled: d,
|
|
1074
1097
|
...f
|
|
1075
1098
|
}), /* @__PURE__ */ _("button", {
|
|
1076
1099
|
type: "button",
|
|
1077
|
-
className:
|
|
1100
|
+
className: G.trailing,
|
|
1078
1101
|
"aria-label": g ? a : i,
|
|
1079
1102
|
"aria-pressed": g,
|
|
1080
1103
|
"aria-controls": h,
|
|
1081
1104
|
disabled: d,
|
|
1082
1105
|
onClick: () => y((e) => !e),
|
|
1083
|
-
children: _(g ?
|
|
1106
|
+
children: _(g ? V : he, {})
|
|
1084
1107
|
})]
|
|
1085
1108
|
}),
|
|
1086
1109
|
n ? /* @__PURE__ */ _("span", {
|
|
1087
|
-
className:
|
|
1110
|
+
className: G.errorText,
|
|
1088
1111
|
children: n
|
|
1089
1112
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1090
|
-
className:
|
|
1113
|
+
className: G.helperText,
|
|
1091
1114
|
children: t
|
|
1092
1115
|
}) : null
|
|
1093
1116
|
]
|
|
@@ -1101,19 +1124,19 @@ function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1101
1124
|
h.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
1102
1125
|
}
|
|
1103
1126
|
return /* @__PURE__ */ v("div", {
|
|
1104
|
-
className: [
|
|
1127
|
+
className: [G.field, o].filter(Boolean).join(" "),
|
|
1105
1128
|
children: [
|
|
1106
|
-
e && /* @__PURE__ */ _(
|
|
1129
|
+
e && /* @__PURE__ */ _(W, {
|
|
1107
1130
|
htmlFor: m,
|
|
1108
1131
|
children: e
|
|
1109
1132
|
}),
|
|
1110
1133
|
/* @__PURE__ */ v("div", {
|
|
1111
|
-
className: `${
|
|
1134
|
+
className: `${G.inputWrap} ${G.default} ${G[r]} ${n ? G.errorWrap : ""}`,
|
|
1112
1135
|
children: [/* @__PURE__ */ _("input", {
|
|
1113
1136
|
...d,
|
|
1114
1137
|
ref: g,
|
|
1115
1138
|
id: m,
|
|
1116
|
-
className: `${
|
|
1139
|
+
className: `${G.input} ${G.pickerInput}`,
|
|
1117
1140
|
inputMode: "none",
|
|
1118
1141
|
readOnly: !0,
|
|
1119
1142
|
disabled: l,
|
|
@@ -1121,18 +1144,18 @@ function Qe({ label: e, helperText: t, error: n, size: r = "base", openLabel: i
|
|
|
1121
1144
|
}), /* @__PURE__ */ _("button", {
|
|
1122
1145
|
type: "button",
|
|
1123
1146
|
tabIndex: -1,
|
|
1124
|
-
className:
|
|
1147
|
+
className: G.trailing,
|
|
1125
1148
|
"aria-label": i,
|
|
1126
1149
|
disabled: l,
|
|
1127
1150
|
onClick: () => h.current?.click(),
|
|
1128
|
-
children: /* @__PURE__ */ _(
|
|
1151
|
+
children: /* @__PURE__ */ _(le, {})
|
|
1129
1152
|
})]
|
|
1130
1153
|
}),
|
|
1131
1154
|
n ? /* @__PURE__ */ _("span", {
|
|
1132
|
-
className:
|
|
1155
|
+
className: G.errorText,
|
|
1133
1156
|
children: n
|
|
1134
1157
|
}) : t ? /* @__PURE__ */ _("span", {
|
|
1135
|
-
className:
|
|
1158
|
+
className: G.helperText,
|
|
1136
1159
|
children: t
|
|
1137
1160
|
}) : null
|
|
1138
1161
|
]
|
|
@@ -1187,7 +1210,7 @@ function ut(e, t, n) {
|
|
|
1187
1210
|
}
|
|
1188
1211
|
return i;
|
|
1189
1212
|
}
|
|
1190
|
-
var
|
|
1213
|
+
var q = {
|
|
1191
1214
|
calendar: "_calendar_12ign_1",
|
|
1192
1215
|
header: "_header_12ign_7",
|
|
1193
1216
|
navButton: "_navButton_12ign_13",
|
|
@@ -1207,13 +1230,13 @@ function ft(e, t) {
|
|
|
1207
1230
|
function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", weekStartsOn: a = 0, autoFocus: o, previousMonthLabel: s = "Previous month", nextMonthLabel: c = "Next month", className: d }) {
|
|
1208
1231
|
let [h, g] = m(() => ot(e ?? /* @__PURE__ */ new Date(), n, r)), y = e ? dt(e) : null, [b, x] = m(y);
|
|
1209
1232
|
y !== b && (x(y), e && g(ot(e, n, r)));
|
|
1210
|
-
let S = p(null), C = p(!!o),
|
|
1233
|
+
let S = p(null), C = p(!!o), w = u();
|
|
1211
1234
|
l(() => {
|
|
1212
1235
|
C.current && (C.current = !1, S.current?.querySelector(`[data-date="${dt(h)}"]`)?.focus());
|
|
1213
1236
|
}, [h]);
|
|
1214
|
-
let
|
|
1237
|
+
let T = h.getFullYear(), E = h.getMonth(), D = f(() => ut(T, E, a), [
|
|
1238
|
+
T,
|
|
1215
1239
|
E,
|
|
1216
|
-
D,
|
|
1217
1240
|
a
|
|
1218
1241
|
]), k = $e(/* @__PURE__ */ new Date()), A = f(() => ({
|
|
1219
1242
|
title: new Intl.DateTimeFormat(i, {
|
|
@@ -1223,18 +1246,18 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1223
1246
|
short: new Intl.DateTimeFormat(i, { weekday: "short" }),
|
|
1224
1247
|
long: new Intl.DateTimeFormat(i, { weekday: "long" }),
|
|
1225
1248
|
full: new Intl.DateTimeFormat(i, { dateStyle: "full" })
|
|
1226
|
-
}), [i]), j =
|
|
1249
|
+
}), [i]), j = D[0].map(({ date: e }) => ({
|
|
1227
1250
|
short: ft(A.short.format(e), i).slice(0, 2),
|
|
1228
1251
|
long: A.long.format(e)
|
|
1229
1252
|
})), M = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < $e(n), N = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > $e(r), P = M(h), F = N(h);
|
|
1230
|
-
function
|
|
1253
|
+
function I(e) {
|
|
1231
1254
|
C.current = !0, g(ot(e, n, r));
|
|
1232
1255
|
}
|
|
1233
|
-
function
|
|
1256
|
+
function L(e) {
|
|
1234
1257
|
let t = ot(nt(h, e), n, r);
|
|
1235
1258
|
C.current = e < 0 ? M(t) : N(t), g(t);
|
|
1236
1259
|
}
|
|
1237
|
-
function
|
|
1260
|
+
function R(e) {
|
|
1238
1261
|
let t = null;
|
|
1239
1262
|
switch (e.key) {
|
|
1240
1263
|
case "ArrowLeft":
|
|
@@ -1260,60 +1283,60 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1260
1283
|
break;
|
|
1261
1284
|
case "End": t = ct(h, a);
|
|
1262
1285
|
}
|
|
1263
|
-
t && (e.preventDefault(),
|
|
1286
|
+
t && (e.preventDefault(), I(t));
|
|
1264
1287
|
}
|
|
1265
|
-
function
|
|
1288
|
+
function z(e) {
|
|
1266
1289
|
let n = $e(e);
|
|
1267
1290
|
g(n), t(n);
|
|
1268
1291
|
}
|
|
1269
1292
|
return /* @__PURE__ */ v("div", {
|
|
1270
|
-
className: [
|
|
1293
|
+
className: [q.calendar, d].filter(Boolean).join(" "),
|
|
1271
1294
|
children: [/* @__PURE__ */ v("div", {
|
|
1272
|
-
className:
|
|
1295
|
+
className: q.header,
|
|
1273
1296
|
children: [
|
|
1274
|
-
/* @__PURE__ */ _(
|
|
1297
|
+
/* @__PURE__ */ _(O, {
|
|
1275
1298
|
variant: "tertiary",
|
|
1276
1299
|
size: "sm",
|
|
1277
|
-
className:
|
|
1278
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
1300
|
+
className: q.navButton,
|
|
1301
|
+
leadingIcon: /* @__PURE__ */ _(de, {}),
|
|
1279
1302
|
"aria-label": s,
|
|
1280
1303
|
disabled: P,
|
|
1281
|
-
onClick: () =>
|
|
1304
|
+
onClick: () => L(-1)
|
|
1282
1305
|
}),
|
|
1283
1306
|
/* @__PURE__ */ _("div", {
|
|
1284
|
-
id:
|
|
1285
|
-
className:
|
|
1307
|
+
id: w,
|
|
1308
|
+
className: q.title,
|
|
1286
1309
|
"aria-live": "polite",
|
|
1287
1310
|
children: ft(A.title.format(h), i)
|
|
1288
1311
|
}),
|
|
1289
|
-
/* @__PURE__ */ _(
|
|
1312
|
+
/* @__PURE__ */ _(O, {
|
|
1290
1313
|
variant: "tertiary",
|
|
1291
1314
|
size: "sm",
|
|
1292
|
-
className:
|
|
1293
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
1315
|
+
className: q.navButton,
|
|
1316
|
+
leadingIcon: /* @__PURE__ */ _(pe, {}),
|
|
1294
1317
|
"aria-label": c,
|
|
1295
1318
|
disabled: F,
|
|
1296
|
-
onClick: () =>
|
|
1319
|
+
onClick: () => L(1)
|
|
1297
1320
|
})
|
|
1298
1321
|
]
|
|
1299
1322
|
}), /* @__PURE__ */ v("div", {
|
|
1300
1323
|
ref: S,
|
|
1301
1324
|
role: "grid",
|
|
1302
|
-
"aria-labelledby":
|
|
1303
|
-
className:
|
|
1304
|
-
onKeyDown:
|
|
1325
|
+
"aria-labelledby": w,
|
|
1326
|
+
className: q.grid,
|
|
1327
|
+
onKeyDown: R,
|
|
1305
1328
|
children: [/* @__PURE__ */ _("div", {
|
|
1306
1329
|
role: "row",
|
|
1307
|
-
className:
|
|
1330
|
+
className: q.row,
|
|
1308
1331
|
children: j.map((e) => /* @__PURE__ */ _("span", {
|
|
1309
1332
|
role: "columnheader",
|
|
1310
1333
|
"aria-label": e.long,
|
|
1311
|
-
className:
|
|
1334
|
+
className: q.weekday,
|
|
1312
1335
|
children: e.short
|
|
1313
1336
|
}, e.long))
|
|
1314
|
-
}),
|
|
1337
|
+
}), D.map((t) => /* @__PURE__ */ _("div", {
|
|
1315
1338
|
role: "row",
|
|
1316
|
-
className:
|
|
1339
|
+
className: q.row,
|
|
1317
1340
|
children: t.map(({ date: t, inMonth: i }) => {
|
|
1318
1341
|
let a = at(t, n, r), o = !!e && rt(t, e), s = rt(t, k);
|
|
1319
1342
|
return /* @__PURE__ */ _("button", {
|
|
@@ -1326,14 +1349,14 @@ function pt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1326
1349
|
"aria-current": s ? "date" : void 0,
|
|
1327
1350
|
"aria-label": A.full.format(t),
|
|
1328
1351
|
className: [
|
|
1329
|
-
|
|
1330
|
-
!i &&
|
|
1331
|
-
s &&
|
|
1332
|
-
o &&
|
|
1333
|
-
a &&
|
|
1352
|
+
q.day,
|
|
1353
|
+
!i && q.outside,
|
|
1354
|
+
s && q.today,
|
|
1355
|
+
o && q.selected,
|
|
1356
|
+
a && q.disabled
|
|
1334
1357
|
].filter(Boolean).join(" "),
|
|
1335
1358
|
onMouseDown: a ? (e) => e.preventDefault() : void 0,
|
|
1336
|
-
onClick: a ? void 0 : () =>
|
|
1359
|
+
onClick: a ? void 0 : () => z(t),
|
|
1337
1360
|
children: t.getDate()
|
|
1338
1361
|
}, dt(t));
|
|
1339
1362
|
})
|
|
@@ -1346,8 +1369,8 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1346
1369
|
let [k, A] = m(!1), j = p(null), M = p(null), N = u(), P = k && !i, F = f(() => new Intl.DateTimeFormat(a, {
|
|
1347
1370
|
month: "short",
|
|
1348
1371
|
day: "2-digit"
|
|
1349
|
-
}), [a]),
|
|
1350
|
-
let e = M.current, t =
|
|
1372
|
+
}), [a]), I = e ? c ? c(e) : F.format(e) : "", L = s(() => j.current?.parentElement ?? j.current, []), R = s(() => {
|
|
1373
|
+
let e = M.current, t = L();
|
|
1351
1374
|
if (!e || !t) return;
|
|
1352
1375
|
if (window.matchMedia(ht).matches) {
|
|
1353
1376
|
e.style.left = "", e.style.top = "";
|
|
@@ -1357,19 +1380,19 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1357
1380
|
s = Math.max(_t, Math.min(s, a - r - _t));
|
|
1358
1381
|
let c = n.bottom + gt, l = c + i <= o - _t, u = n.top - gt - i >= _t;
|
|
1359
1382
|
!l && u && (c = n.top - gt - i), e.style.left = `${s}px`, e.style.top = `${c}px`;
|
|
1360
|
-
}, [
|
|
1383
|
+
}, [L, y]);
|
|
1361
1384
|
d(() => {
|
|
1362
|
-
if (P) return
|
|
1363
|
-
window.removeEventListener("resize",
|
|
1385
|
+
if (P) return R(), window.addEventListener("resize", R), window.addEventListener("scroll", R, !0), () => {
|
|
1386
|
+
window.removeEventListener("resize", R), window.removeEventListener("scroll", R, !0);
|
|
1364
1387
|
};
|
|
1365
|
-
}, [P,
|
|
1388
|
+
}, [P, R]), l(() => {
|
|
1366
1389
|
if (!P) return;
|
|
1367
1390
|
function e() {
|
|
1368
1391
|
A(!1), j.current?.focus();
|
|
1369
1392
|
}
|
|
1370
1393
|
function t(e) {
|
|
1371
1394
|
let t = e.target;
|
|
1372
|
-
M.current?.contains(t) ||
|
|
1395
|
+
M.current?.contains(t) || L()?.contains(t) || A(!1);
|
|
1373
1396
|
}
|
|
1374
1397
|
function n(t) {
|
|
1375
1398
|
if (t.key === "Escape") {
|
|
@@ -1390,11 +1413,11 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1390
1413
|
return window.addEventListener("pointerdown", t), window.addEventListener("keydown", n), () => {
|
|
1391
1414
|
window.removeEventListener("pointerdown", t), window.removeEventListener("keydown", n);
|
|
1392
1415
|
};
|
|
1393
|
-
}, [P,
|
|
1394
|
-
function
|
|
1416
|
+
}, [P, L]);
|
|
1417
|
+
function z(e) {
|
|
1395
1418
|
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), i || A(!0));
|
|
1396
1419
|
}
|
|
1397
|
-
function
|
|
1420
|
+
function ee(e) {
|
|
1398
1421
|
t(e), A(!1), j.current?.focus();
|
|
1399
1422
|
}
|
|
1400
1423
|
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(Qe, {
|
|
@@ -1408,13 +1431,13 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1408
1431
|
openLabel: w,
|
|
1409
1432
|
placeholder: T,
|
|
1410
1433
|
disabled: i,
|
|
1411
|
-
value:
|
|
1434
|
+
value: I,
|
|
1412
1435
|
role: "combobox",
|
|
1413
1436
|
"aria-haspopup": "dialog",
|
|
1414
1437
|
"aria-expanded": P,
|
|
1415
1438
|
"aria-controls": P ? N : void 0,
|
|
1416
1439
|
onClick: () => !i && A((e) => !e),
|
|
1417
|
-
onKeyDown:
|
|
1440
|
+
onKeyDown: z
|
|
1418
1441
|
}), P && h(/* @__PURE__ */ _("div", {
|
|
1419
1442
|
ref: M,
|
|
1420
1443
|
id: N,
|
|
@@ -1424,7 +1447,7 @@ function vt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1424
1447
|
children: /* @__PURE__ */ _(pt, {
|
|
1425
1448
|
autoFocus: !0,
|
|
1426
1449
|
value: e,
|
|
1427
|
-
onChange:
|
|
1450
|
+
onChange: ee,
|
|
1428
1451
|
minDate: n,
|
|
1429
1452
|
maxDate: r,
|
|
1430
1453
|
locale: a,
|
|
@@ -1451,7 +1474,7 @@ function bt({ label: e, helperText: t, error: n, size: r = "base", prefix: i, su
|
|
|
1451
1474
|
return /* @__PURE__ */ v("div", {
|
|
1452
1475
|
className: yt.field,
|
|
1453
1476
|
children: [
|
|
1454
|
-
e && /* @__PURE__ */ _(
|
|
1477
|
+
e && /* @__PURE__ */ _(W, {
|
|
1455
1478
|
htmlFor: l,
|
|
1456
1479
|
children: e
|
|
1457
1480
|
}),
|
|
@@ -1504,28 +1527,30 @@ function Ct() {
|
|
|
1504
1527
|
});
|
|
1505
1528
|
}
|
|
1506
1529
|
var wt = {
|
|
1507
|
-
item: "
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1530
|
+
item: "_item_1uq1n_1",
|
|
1531
|
+
base: "_base_1uq1n_21",
|
|
1532
|
+
icon: "_icon_1uq1n_28",
|
|
1533
|
+
check: "_check_1uq1n_29",
|
|
1534
|
+
leading: "_leading_1uq1n_43",
|
|
1535
|
+
label: "_label_1uq1n_63",
|
|
1536
|
+
trailing: "_trailing_1uq1n_70",
|
|
1537
|
+
selected: "_selected_1uq1n_78",
|
|
1538
|
+
destructive: "_destructive_1uq1n_103"
|
|
1515
1539
|
};
|
|
1516
1540
|
//#endregion
|
|
1517
1541
|
//#region src/components/MenuItem.tsx
|
|
1518
|
-
function Tt({ leading: e, icon: t, trailing: n, selected: r, destructive: i,
|
|
1519
|
-
let
|
|
1542
|
+
function Tt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, size: a = "sm", children: o, ...s }) {
|
|
1543
|
+
let c = [
|
|
1520
1544
|
wt.item,
|
|
1545
|
+
a === "base" && wt.base,
|
|
1521
1546
|
r && wt.selected,
|
|
1522
1547
|
i && wt.destructive
|
|
1523
1548
|
].filter(Boolean).join(" ");
|
|
1524
1549
|
return /* @__PURE__ */ v("button", {
|
|
1525
1550
|
type: "button",
|
|
1526
1551
|
role: "menuitem",
|
|
1527
|
-
className:
|
|
1528
|
-
...
|
|
1552
|
+
className: c,
|
|
1553
|
+
...s,
|
|
1529
1554
|
children: [
|
|
1530
1555
|
e && /* @__PURE__ */ _("span", {
|
|
1531
1556
|
className: wt.leading,
|
|
@@ -1537,7 +1562,7 @@ function Tt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, chi
|
|
|
1537
1562
|
}),
|
|
1538
1563
|
/* @__PURE__ */ _("span", {
|
|
1539
1564
|
className: wt.label,
|
|
1540
|
-
children:
|
|
1565
|
+
children: o
|
|
1541
1566
|
}),
|
|
1542
1567
|
n && /* @__PURE__ */ _("span", {
|
|
1543
1568
|
className: wt.trailing,
|
|
@@ -1545,44 +1570,46 @@ function Tt({ leading: e, icon: t, trailing: n, selected: r, destructive: i, chi
|
|
|
1545
1570
|
}),
|
|
1546
1571
|
r && /* @__PURE__ */ _("span", {
|
|
1547
1572
|
className: wt.check,
|
|
1548
|
-
children: /* @__PURE__ */ _(
|
|
1573
|
+
children: /* @__PURE__ */ _(se, {})
|
|
1549
1574
|
})
|
|
1550
1575
|
]
|
|
1551
1576
|
});
|
|
1552
1577
|
}
|
|
1553
|
-
var
|
|
1554
|
-
field: "
|
|
1555
|
-
fieldInline: "
|
|
1556
|
-
trigger: "
|
|
1557
|
-
errorWrap: "
|
|
1558
|
-
sm: "
|
|
1559
|
-
base: "
|
|
1560
|
-
icon: "
|
|
1561
|
-
value: "
|
|
1562
|
-
placeholder: "
|
|
1563
|
-
chevron: "
|
|
1564
|
-
chevronOpen: "
|
|
1565
|
-
menuWrap: "
|
|
1566
|
-
menuIn: "
|
|
1567
|
-
menuWrapAuto: "
|
|
1568
|
-
menuWrapEnd: "
|
|
1569
|
-
menuWrapUp: "
|
|
1570
|
-
menuWrapClosing: "
|
|
1571
|
-
menuOut: "
|
|
1572
|
-
list: "
|
|
1573
|
-
itemIn: "
|
|
1574
|
-
highlight: "
|
|
1575
|
-
highlightInstant: "
|
|
1576
|
-
pillChevron: "
|
|
1577
|
-
buttonChevron: "
|
|
1578
|
-
pillTrigger: "
|
|
1579
|
-
pillIcon: "
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1578
|
+
var J = {
|
|
1579
|
+
field: "_field_7dhvb_1",
|
|
1580
|
+
fieldInline: "_fieldInline_7dhvb_2",
|
|
1581
|
+
trigger: "_trigger_7dhvb_19",
|
|
1582
|
+
errorWrap: "_errorWrap_7dhvb_43",
|
|
1583
|
+
sm: "_sm_7dhvb_62",
|
|
1584
|
+
base: "_base_7dhvb_70",
|
|
1585
|
+
icon: "_icon_7dhvb_79",
|
|
1586
|
+
value: "_value_7dhvb_93",
|
|
1587
|
+
placeholder: "_placeholder_7dhvb_101",
|
|
1588
|
+
chevron: "_chevron_7dhvb_104",
|
|
1589
|
+
chevronOpen: "_chevronOpen_7dhvb_119",
|
|
1590
|
+
menuWrap: "_menuWrap_7dhvb_123",
|
|
1591
|
+
menuIn: "_menuIn_7dhvb_1",
|
|
1592
|
+
menuWrapAuto: "_menuWrapAuto_7dhvb_134",
|
|
1593
|
+
menuWrapEnd: "_menuWrapEnd_7dhvb_141",
|
|
1594
|
+
menuWrapUp: "_menuWrapUp_7dhvb_146",
|
|
1595
|
+
menuWrapClosing: "_menuWrapClosing_7dhvb_158",
|
|
1596
|
+
menuOut: "_menuOut_7dhvb_1",
|
|
1597
|
+
list: "_list_7dhvb_182",
|
|
1598
|
+
itemIn: "_itemIn_7dhvb_1",
|
|
1599
|
+
highlight: "_highlight_7dhvb_199",
|
|
1600
|
+
highlightInstant: "_highlightInstant_7dhvb_212",
|
|
1601
|
+
pillChevron: "_pillChevron_7dhvb_237",
|
|
1602
|
+
buttonChevron: "_buttonChevron_7dhvb_238",
|
|
1603
|
+
pillTrigger: "_pillTrigger_7dhvb_244",
|
|
1604
|
+
pillIcon: "_pillIcon_7dhvb_280",
|
|
1605
|
+
buttonTriggerBase: "_buttonTriggerBase_7dhvb_292",
|
|
1606
|
+
listScrolling: "_listScrolling_7dhvb_324",
|
|
1607
|
+
search: "_search_7dhvb_330",
|
|
1608
|
+
noResults: "_noResults_7dhvb_348",
|
|
1609
|
+
helperText: "_helperText_7dhvb_353",
|
|
1610
|
+
errorText: "_errorText_7dhvb_358",
|
|
1611
|
+
prefix: "_prefix_7dhvb_363",
|
|
1612
|
+
menuWrapMultiple: "_menuWrapMultiple_7dhvb_367"
|
|
1586
1613
|
};
|
|
1587
1614
|
//#endregion
|
|
1588
1615
|
//#region src/components/Dropdown.tsx
|
|
@@ -1594,283 +1621,290 @@ function Dt(e) {
|
|
|
1594
1621
|
}
|
|
1595
1622
|
var Ot = (e) => `and ${e} more`;
|
|
1596
1623
|
function kt(e) {
|
|
1597
|
-
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: s = "base", placeholder: c = "Select…", options: f, disabled: h, searchable: y, searchPlaceholder: b = "Search…", noResultsText: x = "No matches", defaultOpen: S = !1, autoFocus: C, className:
|
|
1598
|
-
function
|
|
1624
|
+
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: s = "base", placeholder: c = "Select…", options: f, disabled: h, searchable: y, searchPlaceholder: b = "Search…", noResultsText: x = "No matches", defaultOpen: S = !1, autoFocus: C, className: w, labelClassName: T, "aria-label": E, "data-testid": D } = e, k = e.multiple === !0, [A, j] = m(S), [M, N] = m(S), [P, F] = m(""), [I, L] = m(!1), [R, z] = m(null), [ee, te] = m(!1), ne = p(void 0), re = p(null), B = p(null), ie = p(null), ae = p(null), oe = u(), se = u(), ce = e.multiple ? void 0 : e.value, ue = e.multiple && e.value || [], de = ue.map((e) => f.find((t) => t.value === e)).filter((e) => e !== void 0), fe = k ? void 0 : f.find((e) => e.value === ce), pe = P.trim().toLowerCase(), me = y && pe ? f.filter((e) => Et(e).toLowerCase().includes(pe)) : f, V = me.filter((e) => !e.disabled).map((e) => e.value), H = t === "field";
|
|
1625
|
+
function he() {
|
|
1599
1626
|
N(!0), j(!0);
|
|
1600
1627
|
}
|
|
1601
|
-
function
|
|
1628
|
+
function ge() {
|
|
1602
1629
|
j(!1), F("");
|
|
1603
1630
|
}
|
|
1604
1631
|
l(() => {
|
|
1605
1632
|
if (!A) return;
|
|
1606
1633
|
if (y) {
|
|
1607
|
-
|
|
1634
|
+
ae.current?.focus();
|
|
1608
1635
|
return;
|
|
1609
1636
|
}
|
|
1610
|
-
let e = (k ?
|
|
1611
|
-
(
|
|
1637
|
+
let e = (k ? de.find((e) => !e.disabled)?.value : ce) ?? V[0];
|
|
1638
|
+
(re.current?.querySelector(`[data-value="${e}"]`))?.focus();
|
|
1612
1639
|
}, [A]), d(() => {
|
|
1613
|
-
if (!A || !
|
|
1614
|
-
let e =
|
|
1615
|
-
|
|
1640
|
+
if (!A || !ie.current || !re.current) return;
|
|
1641
|
+
let e = re.current.getBoundingClientRect(), t = ie.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
|
|
1642
|
+
L(n < t + 8 && r > n);
|
|
1616
1643
|
}, [A]), l(() => {
|
|
1617
1644
|
if (!A) return;
|
|
1618
1645
|
function e(e) {
|
|
1619
|
-
|
|
1646
|
+
re.current?.contains(e.target) || ge();
|
|
1620
1647
|
}
|
|
1621
1648
|
function t(e) {
|
|
1622
|
-
e.key === "Escape" && (
|
|
1649
|
+
e.key === "Escape" && (ge(), B.current?.focus()), e.key === "Tab" && k && ge();
|
|
1623
1650
|
}
|
|
1624
1651
|
return window.addEventListener("pointerdown", e), window.addEventListener("keydown", t), () => {
|
|
1625
1652
|
window.removeEventListener("pointerdown", e), window.removeEventListener("keydown", t);
|
|
1626
1653
|
};
|
|
1627
1654
|
}, [A, k]);
|
|
1628
|
-
function
|
|
1629
|
-
e !== void 0 &&
|
|
1655
|
+
function _e(e) {
|
|
1656
|
+
e !== void 0 && re.current?.querySelector(`[data-value="${e}"]`)?.focus();
|
|
1630
1657
|
}
|
|
1631
|
-
function
|
|
1632
|
-
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1658
|
+
function ve(e) {
|
|
1659
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), he());
|
|
1633
1660
|
}
|
|
1634
|
-
function
|
|
1635
|
-
e.key === "ArrowDown" && (e.preventDefault(),
|
|
1661
|
+
function ye(e) {
|
|
1662
|
+
e.key === "ArrowDown" && (e.preventDefault(), _e(V[0])), e.key === "Enter" && V.length === 1 && (e.preventDefault(), Ce(V[0]));
|
|
1636
1663
|
}
|
|
1637
|
-
function
|
|
1664
|
+
function be(e, t) {
|
|
1638
1665
|
let n = V.indexOf(t);
|
|
1639
1666
|
if (n === -1) return;
|
|
1640
1667
|
let r = null;
|
|
1641
1668
|
if (e.key === "ArrowDown" && (r = (n + 1) % V.length), e.key === "ArrowUp") {
|
|
1642
1669
|
if (y && n === 0) {
|
|
1643
|
-
e.preventDefault(),
|
|
1670
|
+
e.preventDefault(), ae.current?.focus();
|
|
1644
1671
|
return;
|
|
1645
1672
|
}
|
|
1646
1673
|
r = (n - 1 + V.length) % V.length;
|
|
1647
1674
|
}
|
|
1648
|
-
e.key === "Home" && (r = 0), e.key === "End" && (r = V.length - 1), r !== null && (e.preventDefault(),
|
|
1675
|
+
e.key === "Home" && (r = 0), e.key === "End" && (r = V.length - 1), r !== null && (e.preventDefault(), _e(V[r]));
|
|
1649
1676
|
}
|
|
1650
|
-
function
|
|
1651
|
-
|
|
1677
|
+
function xe() {
|
|
1678
|
+
te(!0), window.clearTimeout(ne.current), ne.current = window.setTimeout(() => te(!1), 700);
|
|
1679
|
+
}
|
|
1680
|
+
l(() => () => window.clearTimeout(ne.current), []);
|
|
1681
|
+
function Se(e) {
|
|
1682
|
+
z((t) => ({
|
|
1652
1683
|
top: e.offsetTop,
|
|
1653
1684
|
height: e.offsetHeight,
|
|
1654
1685
|
instant: !t
|
|
1655
1686
|
}));
|
|
1656
1687
|
}
|
|
1657
|
-
function
|
|
1688
|
+
function Ce(t) {
|
|
1658
1689
|
if (e.multiple) {
|
|
1659
1690
|
let n = e.value ?? [];
|
|
1660
1691
|
e.onChange(n.includes(t) ? n.filter((e) => e !== t) : [...n, t]);
|
|
1661
1692
|
return;
|
|
1662
1693
|
}
|
|
1663
|
-
e.onChange(t),
|
|
1694
|
+
e.onChange(t), ge(), B.current?.focus();
|
|
1664
1695
|
}
|
|
1665
|
-
function
|
|
1666
|
-
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(
|
|
1667
|
-
let t =
|
|
1668
|
-
if (
|
|
1696
|
+
function we() {
|
|
1697
|
+
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(de);
|
|
1698
|
+
let t = de[0];
|
|
1699
|
+
if (de.length === 1) return t.label;
|
|
1669
1700
|
let n = Dt(t);
|
|
1670
|
-
return n === void 0 ? `${
|
|
1701
|
+
return n === void 0 ? `${de.length} selected` : `${n} ${(e.multiple && e.moreText || Ot)(de.length - 1)}`;
|
|
1671
1702
|
}
|
|
1672
|
-
let
|
|
1673
|
-
className:
|
|
1703
|
+
let Te = n === void 0 && (k ? de.length === 0 : !fe), U = k && e.triggerPrefix ? /* @__PURE__ */ v("span", {
|
|
1704
|
+
className: J.prefix,
|
|
1674
1705
|
children: [e.triggerPrefix, " "]
|
|
1675
|
-
}) : null,
|
|
1706
|
+
}) : null, Ee = n ?? (Te ? c : k ? we() : fe?.label), De = /* @__PURE__ */ v(g, { children: [U, Ee] }), Oe = {
|
|
1676
1707
|
"aria-haspopup": "listbox",
|
|
1677
1708
|
"aria-expanded": A,
|
|
1678
|
-
"aria-controls": A ?
|
|
1679
|
-
"aria-label": i ? void 0 :
|
|
1709
|
+
"aria-controls": A ? se : void 0,
|
|
1710
|
+
"aria-label": i ? void 0 : E,
|
|
1680
1711
|
autoFocus: C,
|
|
1681
1712
|
disabled: h,
|
|
1682
|
-
onClick: () => A ?
|
|
1683
|
-
onKeyDown:
|
|
1713
|
+
onClick: () => A ? ge() : he(),
|
|
1714
|
+
onKeyDown: ve
|
|
1684
1715
|
};
|
|
1685
1716
|
return /* @__PURE__ */ v("div", {
|
|
1686
|
-
className: [
|
|
1687
|
-
ref:
|
|
1688
|
-
"data-testid":
|
|
1717
|
+
className: [H ? J.field : J.fieldInline, w].filter(Boolean).join(" "),
|
|
1718
|
+
ref: re,
|
|
1719
|
+
"data-testid": D,
|
|
1689
1720
|
children: [
|
|
1690
|
-
|
|
1691
|
-
htmlFor:
|
|
1692
|
-
className:
|
|
1721
|
+
H && i && /* @__PURE__ */ _(W, {
|
|
1722
|
+
htmlFor: oe,
|
|
1723
|
+
className: T,
|
|
1693
1724
|
children: i
|
|
1694
1725
|
}),
|
|
1695
|
-
|
|
1726
|
+
H ? /* @__PURE__ */ v("button", {
|
|
1696
1727
|
ref: B,
|
|
1697
|
-
id:
|
|
1728
|
+
id: oe,
|
|
1698
1729
|
type: "button",
|
|
1699
1730
|
role: "combobox",
|
|
1700
|
-
className: `${
|
|
1701
|
-
...
|
|
1731
|
+
className: `${J.trigger} ${J[s]} ${o ? J.errorWrap : ""}`,
|
|
1732
|
+
...Oe,
|
|
1702
1733
|
children: [
|
|
1703
|
-
|
|
1704
|
-
className:
|
|
1705
|
-
children:
|
|
1734
|
+
fe?.icon && /* @__PURE__ */ _("span", {
|
|
1735
|
+
className: J.icon,
|
|
1736
|
+
children: fe.icon
|
|
1706
1737
|
}),
|
|
1707
1738
|
/* @__PURE__ */ _("span", {
|
|
1708
|
-
className: `${
|
|
1709
|
-
children:
|
|
1739
|
+
className: `${J.value} ${Te ? J.placeholder : ""}`,
|
|
1740
|
+
children: De
|
|
1710
1741
|
}),
|
|
1711
1742
|
/* @__PURE__ */ _("span", {
|
|
1712
|
-
className: `${
|
|
1713
|
-
children: /* @__PURE__ */ _(
|
|
1743
|
+
className: `${J.chevron} ${A ? J.chevronOpen : ""}`,
|
|
1744
|
+
children: /* @__PURE__ */ _(le, {})
|
|
1714
1745
|
})
|
|
1715
1746
|
]
|
|
1716
1747
|
}) : t === "pill" ? /* @__PURE__ */ v("button", {
|
|
1717
1748
|
ref: B,
|
|
1718
|
-
id:
|
|
1749
|
+
id: oe,
|
|
1719
1750
|
type: "button",
|
|
1720
|
-
className:
|
|
1721
|
-
...
|
|
1751
|
+
className: J.pillTrigger,
|
|
1752
|
+
...Oe,
|
|
1722
1753
|
children: [
|
|
1723
|
-
|
|
1724
|
-
className:
|
|
1725
|
-
children:
|
|
1754
|
+
fe?.icon && /* @__PURE__ */ _("span", {
|
|
1755
|
+
className: J.pillIcon,
|
|
1756
|
+
children: fe.icon
|
|
1726
1757
|
}),
|
|
1727
|
-
|
|
1758
|
+
De,
|
|
1728
1759
|
/* @__PURE__ */ _("span", {
|
|
1729
|
-
className: `${
|
|
1730
|
-
children: /* @__PURE__ */ _(
|
|
1760
|
+
className: `${J.pillChevron} ${A ? J.chevronOpen : ""}`,
|
|
1761
|
+
children: /* @__PURE__ */ _(le, {})
|
|
1731
1762
|
})
|
|
1732
1763
|
]
|
|
1733
|
-
}) : /* @__PURE__ */ _(
|
|
1764
|
+
}) : /* @__PURE__ */ _(O, {
|
|
1734
1765
|
ref: B,
|
|
1735
|
-
id:
|
|
1766
|
+
id: oe,
|
|
1736
1767
|
variant: t,
|
|
1737
1768
|
size: s,
|
|
1738
|
-
|
|
1769
|
+
className: s === "base" ? J.buttonTriggerBase : void 0,
|
|
1770
|
+
leadingIcon: fe?.icon,
|
|
1739
1771
|
trailingIcon: /* @__PURE__ */ _("span", {
|
|
1740
|
-
className: `${
|
|
1741
|
-
children: /* @__PURE__ */ _(
|
|
1772
|
+
className: `${J.buttonChevron} ${A ? J.chevronOpen : ""}`,
|
|
1773
|
+
children: /* @__PURE__ */ _(le, {})
|
|
1742
1774
|
}),
|
|
1743
|
-
...
|
|
1744
|
-
children:
|
|
1775
|
+
...Oe,
|
|
1776
|
+
children: De
|
|
1745
1777
|
}),
|
|
1746
1778
|
M && /* @__PURE__ */ _("div", {
|
|
1747
|
-
ref:
|
|
1779
|
+
ref: ie,
|
|
1748
1780
|
className: [
|
|
1749
|
-
|
|
1750
|
-
!
|
|
1751
|
-
!
|
|
1752
|
-
!
|
|
1753
|
-
|
|
1754
|
-
!A &&
|
|
1781
|
+
J.menuWrap,
|
|
1782
|
+
!H && J.menuWrapAuto,
|
|
1783
|
+
!H && k && J.menuWrapMultiple,
|
|
1784
|
+
!H && r === "end" && J.menuWrapEnd,
|
|
1785
|
+
I && J.menuWrapUp,
|
|
1786
|
+
!A && J.menuWrapClosing
|
|
1755
1787
|
].filter(Boolean).join(" "),
|
|
1756
1788
|
onAnimationEnd: (e) => {
|
|
1757
|
-
A || e.target !== e.currentTarget || (N(!1),
|
|
1789
|
+
A || e.target !== e.currentTarget || (N(!1), L(!1));
|
|
1758
1790
|
},
|
|
1759
1791
|
children: /* @__PURE__ */ v(St, {
|
|
1760
1792
|
role: "presentation",
|
|
1761
|
-
style:
|
|
1793
|
+
style: H ? { width: "100%" } : void 0,
|
|
1762
1794
|
children: [y && /* @__PURE__ */ _("input", {
|
|
1763
|
-
ref:
|
|
1795
|
+
ref: ae,
|
|
1764
1796
|
type: "text",
|
|
1765
|
-
className:
|
|
1797
|
+
className: J.search,
|
|
1766
1798
|
value: P,
|
|
1767
1799
|
placeholder: b,
|
|
1768
1800
|
"aria-label": b,
|
|
1769
|
-
"aria-controls":
|
|
1801
|
+
"aria-controls": se,
|
|
1770
1802
|
autoComplete: "off",
|
|
1771
1803
|
spellCheck: !1,
|
|
1772
1804
|
onChange: (e) => {
|
|
1773
|
-
F(e.target.value),
|
|
1805
|
+
F(e.target.value), z(null);
|
|
1774
1806
|
},
|
|
1775
|
-
onKeyDown:
|
|
1807
|
+
onKeyDown: ye
|
|
1776
1808
|
}), /* @__PURE__ */ v("div", {
|
|
1777
|
-
id:
|
|
1809
|
+
id: se,
|
|
1778
1810
|
role: "listbox",
|
|
1779
1811
|
"aria-multiselectable": k || void 0,
|
|
1780
|
-
"aria-label": i ??
|
|
1781
|
-
className:
|
|
1782
|
-
|
|
1812
|
+
"aria-label": i ?? E,
|
|
1813
|
+
className: `${J.list} ${ee ? J.listScrolling : ""}`,
|
|
1814
|
+
onScroll: xe,
|
|
1815
|
+
onMouseLeave: () => z(null),
|
|
1783
1816
|
onBlur: (e) => {
|
|
1784
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
1817
|
+
e.currentTarget.contains(e.relatedTarget) || z(null);
|
|
1785
1818
|
},
|
|
1786
|
-
children: [
|
|
1819
|
+
children: [R && me.length > 0 && /* @__PURE__ */ _("span", {
|
|
1787
1820
|
"aria-hidden": "true",
|
|
1788
|
-
className: `${
|
|
1821
|
+
className: `${J.highlight} ${R.instant ? J.highlightInstant : ""}`,
|
|
1789
1822
|
style: {
|
|
1790
|
-
transform: `translateY(${
|
|
1791
|
-
height:
|
|
1823
|
+
transform: `translateY(${R.top}px)`,
|
|
1824
|
+
height: R.height
|
|
1792
1825
|
}
|
|
1793
|
-
}),
|
|
1794
|
-
className:
|
|
1826
|
+
}), me.length === 0 ? /* @__PURE__ */ _("div", {
|
|
1827
|
+
className: J.noResults,
|
|
1795
1828
|
role: "presentation",
|
|
1796
1829
|
children: x
|
|
1797
|
-
}) :
|
|
1798
|
-
style: { "--i": Math.min(
|
|
1830
|
+
}) : me.map((e, n) => /* @__PURE__ */ _(Tt, {
|
|
1831
|
+
style: { "--i": Math.min(n, 8) },
|
|
1799
1832
|
"data-value": e.value,
|
|
1800
1833
|
role: "option",
|
|
1801
|
-
"aria-selected": k ?
|
|
1834
|
+
"aria-selected": k ? ue.includes(e.value) : e.value === ce,
|
|
1835
|
+
size: t === "pill" ? "sm" : s,
|
|
1802
1836
|
icon: e.icon,
|
|
1803
|
-
leading: k ? /* @__PURE__ */ _(
|
|
1804
|
-
checked:
|
|
1837
|
+
leading: k ? /* @__PURE__ */ _(Ve, {
|
|
1838
|
+
checked: ue.includes(e.value),
|
|
1805
1839
|
disabled: e.disabled
|
|
1806
1840
|
}) : void 0,
|
|
1807
|
-
selected: !k && e.value ===
|
|
1841
|
+
selected: !k && e.value === ce,
|
|
1808
1842
|
disabled: e.disabled,
|
|
1809
|
-
onClick: () =>
|
|
1810
|
-
onMouseEnter: (t) => !e.disabled &&
|
|
1811
|
-
onFocus: (e) =>
|
|
1812
|
-
onKeyDown: (t) =>
|
|
1843
|
+
onClick: () => Ce(e.value),
|
|
1844
|
+
onMouseEnter: (t) => !e.disabled && Se(t.currentTarget),
|
|
1845
|
+
onFocus: (e) => Se(e.currentTarget),
|
|
1846
|
+
onKeyDown: (t) => be(t, e.value),
|
|
1813
1847
|
children: e.label
|
|
1814
1848
|
}, e.value))]
|
|
1815
1849
|
})]
|
|
1816
1850
|
})
|
|
1817
1851
|
}),
|
|
1818
|
-
|
|
1819
|
-
className:
|
|
1852
|
+
H && o ? /* @__PURE__ */ _("span", {
|
|
1853
|
+
className: J.errorText,
|
|
1820
1854
|
children: o
|
|
1821
|
-
}) :
|
|
1822
|
-
className:
|
|
1855
|
+
}) : H && a ? /* @__PURE__ */ _("span", {
|
|
1856
|
+
className: J.helperText,
|
|
1823
1857
|
children: a
|
|
1824
1858
|
}) : null
|
|
1825
1859
|
]
|
|
1826
1860
|
});
|
|
1827
1861
|
}
|
|
1828
|
-
var
|
|
1829
|
-
item: "
|
|
1830
|
-
active: "
|
|
1831
|
-
inList: "
|
|
1832
|
-
icon: "
|
|
1833
|
-
label: "
|
|
1834
|
-
trailing: "
|
|
1835
|
-
list: "
|
|
1836
|
-
glide: "
|
|
1837
|
-
glideAnimated: "
|
|
1838
|
-
glideVisible: "
|
|
1839
|
-
},
|
|
1840
|
-
function
|
|
1841
|
-
let l = c(
|
|
1842
|
-
|
|
1843
|
-
n &&
|
|
1844
|
-
l &&
|
|
1862
|
+
var At = {
|
|
1863
|
+
item: "_item_19izo_2",
|
|
1864
|
+
active: "_active_19izo_38",
|
|
1865
|
+
inList: "_inList_19izo_41",
|
|
1866
|
+
icon: "_icon_19izo_69",
|
|
1867
|
+
label: "_label_19izo_83",
|
|
1868
|
+
trailing: "_trailing_19izo_91",
|
|
1869
|
+
list: "_list_19izo_100",
|
|
1870
|
+
glide: "_glide_19izo_115",
|
|
1871
|
+
glideAnimated: "_glideAnimated_19izo_128",
|
|
1872
|
+
glideVisible: "_glideVisible_19izo_134"
|
|
1873
|
+
}, jt = "data-nav-item", Mt = r(!1);
|
|
1874
|
+
function Nt({ icon: e, trailing: t, active: n, as: r, href: i, className: a, children: o, ...s }) {
|
|
1875
|
+
let l = c(Mt), u = r ?? (i === void 0 ? "button" : "a"), d = u === "button", f = [
|
|
1876
|
+
At.item,
|
|
1877
|
+
n && At.active,
|
|
1878
|
+
l && At.inList,
|
|
1845
1879
|
a
|
|
1846
1880
|
].filter(Boolean).join(" ");
|
|
1847
1881
|
return /* @__PURE__ */ v(u, {
|
|
1848
1882
|
...d ? { type: "button" } : {},
|
|
1849
1883
|
...i === void 0 ? {} : { href: i },
|
|
1850
|
-
[
|
|
1884
|
+
[jt]: "",
|
|
1851
1885
|
"aria-current": n ? "page" : void 0,
|
|
1852
1886
|
className: f,
|
|
1853
1887
|
...s,
|
|
1854
1888
|
children: [
|
|
1855
1889
|
e && /* @__PURE__ */ _("span", {
|
|
1856
|
-
className:
|
|
1890
|
+
className: At.icon,
|
|
1857
1891
|
"aria-hidden": !0,
|
|
1858
1892
|
children: e
|
|
1859
1893
|
}),
|
|
1860
1894
|
/* @__PURE__ */ _("span", {
|
|
1861
|
-
className:
|
|
1895
|
+
className: At.label,
|
|
1862
1896
|
children: o
|
|
1863
1897
|
}),
|
|
1864
1898
|
t && /* @__PURE__ */ _("span", {
|
|
1865
|
-
className:
|
|
1899
|
+
className: At.trailing,
|
|
1866
1900
|
children: t
|
|
1867
1901
|
})
|
|
1868
1902
|
]
|
|
1869
1903
|
});
|
|
1870
1904
|
}
|
|
1871
|
-
function
|
|
1905
|
+
function Pt({ children: e, className: t, ...n }) {
|
|
1872
1906
|
let r = p(null), [i, a] = m(null), [o, c] = m(!1), [l, u] = m(!1), f = s((e) => {
|
|
1873
|
-
let t = r.current, n = e instanceof Element ? e.closest(`[${
|
|
1907
|
+
let t = r.current, n = e instanceof Element ? e.closest(`[${jt}]`) : null;
|
|
1874
1908
|
if (!t || !n || !t.contains(n)) return;
|
|
1875
1909
|
if (n.matches(":disabled, [aria-disabled=\"true\"], [hidden]")) {
|
|
1876
1910
|
c(!1);
|
|
@@ -1884,11 +1918,11 @@ function Nt({ children: e, className: t, ...n }) {
|
|
|
1884
1918
|
}, [o]);
|
|
1885
1919
|
return d(() => {
|
|
1886
1920
|
o || u(!1);
|
|
1887
|
-
}, [o]), /* @__PURE__ */ _(
|
|
1921
|
+
}, [o]), /* @__PURE__ */ _(Mt.Provider, {
|
|
1888
1922
|
value: !0,
|
|
1889
1923
|
children: /* @__PURE__ */ v("div", {
|
|
1890
1924
|
ref: r,
|
|
1891
|
-
className: [
|
|
1925
|
+
className: [At.list, t].filter(Boolean).join(" "),
|
|
1892
1926
|
onMouseOver: (e) => f(e.target),
|
|
1893
1927
|
onMouseLeave: () => c(!1),
|
|
1894
1928
|
onFocus: (e) => e.target.matches(":focus-visible") && f(e.target),
|
|
@@ -1897,9 +1931,9 @@ function Nt({ children: e, className: t, ...n }) {
|
|
|
1897
1931
|
children: [/* @__PURE__ */ _("span", {
|
|
1898
1932
|
"aria-hidden": !0,
|
|
1899
1933
|
className: [
|
|
1900
|
-
|
|
1901
|
-
l &&
|
|
1902
|
-
o &&
|
|
1934
|
+
At.glide,
|
|
1935
|
+
l && At.glideAnimated,
|
|
1936
|
+
o && At.glideVisible
|
|
1903
1937
|
].filter(Boolean).join(" "),
|
|
1904
1938
|
style: i ? {
|
|
1905
1939
|
translate: `0 ${i.top}px`,
|
|
@@ -1911,7 +1945,7 @@ function Nt({ children: e, className: t, ...n }) {
|
|
|
1911
1945
|
}
|
|
1912
1946
|
//#endregion
|
|
1913
1947
|
//#region src/components/Logo.tsx
|
|
1914
|
-
function
|
|
1948
|
+
function Ft({ size: e = 40, "aria-label": t, ...n }) {
|
|
1915
1949
|
return /* @__PURE__ */ v("svg", {
|
|
1916
1950
|
width: e,
|
|
1917
1951
|
height: e,
|
|
@@ -1953,7 +1987,7 @@ var Y = {
|
|
|
1953
1987
|
};
|
|
1954
1988
|
//#endregion
|
|
1955
1989
|
//#region src/components/Sidebar.tsx
|
|
1956
|
-
function
|
|
1990
|
+
function It({ header: e, switcher: t, children: n, footer: r, switcherLayout: i = "inset", "aria-label": a, className: o }) {
|
|
1957
1991
|
return /* @__PURE__ */ v("aside", {
|
|
1958
1992
|
className: [Y.root, o].filter(Boolean).join(" "),
|
|
1959
1993
|
children: [
|
|
@@ -1979,7 +2013,7 @@ function Ft({ header: e, switcher: t, children: n, footer: r, switcherLayout: i
|
|
|
1979
2013
|
]
|
|
1980
2014
|
});
|
|
1981
2015
|
}
|
|
1982
|
-
function
|
|
2016
|
+
function Lt({ title: e, subtitle: t, action: n }) {
|
|
1983
2017
|
return /* @__PURE__ */ v("div", {
|
|
1984
2018
|
className: Y.footerRow,
|
|
1985
2019
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -1997,7 +2031,7 @@ function It({ title: e, subtitle: t, action: n }) {
|
|
|
1997
2031
|
})]
|
|
1998
2032
|
});
|
|
1999
2033
|
}
|
|
2000
|
-
function
|
|
2034
|
+
function Rt({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
2001
2035
|
return /* @__PURE__ */ _("div", {
|
|
2002
2036
|
role: "group",
|
|
2003
2037
|
"aria-label": r,
|
|
@@ -2023,21 +2057,21 @@ function Lt({ items: e, value: t, onChange: n, "aria-label": r }) {
|
|
|
2023
2057
|
}, e.value))
|
|
2024
2058
|
});
|
|
2025
2059
|
}
|
|
2026
|
-
var
|
|
2060
|
+
var zt = { highlight: "_highlight_1anli_1" };
|
|
2027
2061
|
//#endregion
|
|
2028
2062
|
//#region src/components/HighlightText.tsx
|
|
2029
|
-
function
|
|
2063
|
+
function Bt(e) {
|
|
2030
2064
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2031
2065
|
}
|
|
2032
|
-
function
|
|
2066
|
+
function Vt({ text: e, query: n }) {
|
|
2033
2067
|
if (!n) return /* @__PURE__ */ _(g, { children: e });
|
|
2034
|
-
let r = e.split(RegExp(`(${
|
|
2068
|
+
let r = e.split(RegExp(`(${Bt(n)})`, "ig"));
|
|
2035
2069
|
return /* @__PURE__ */ _(g, { children: r.map((e, r) => e.toLowerCase() === n.toLowerCase() ? /* @__PURE__ */ _("mark", {
|
|
2036
|
-
className:
|
|
2070
|
+
className: zt.highlight,
|
|
2037
2071
|
children: e
|
|
2038
2072
|
}, r) : /* @__PURE__ */ _(t, { children: e }, r)) });
|
|
2039
2073
|
}
|
|
2040
|
-
var
|
|
2074
|
+
var Ht = {
|
|
2041
2075
|
group: "_group_1rvgf_1",
|
|
2042
2076
|
btn: "_btn_1rvgf_4",
|
|
2043
2077
|
caret: "_caret_1rvgf_29",
|
|
@@ -2059,24 +2093,24 @@ var Vt = {
|
|
|
2059
2093
|
};
|
|
2060
2094
|
//#endregion
|
|
2061
2095
|
//#region src/components/FilterSection.tsx
|
|
2062
|
-
function
|
|
2096
|
+
function Ut({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, onSetAll: a, searchable: o }) {
|
|
2063
2097
|
let [s, c] = m(""), l = s.trim().toLowerCase(), u = l ? t.filter((e) => n(e).toLowerCase().includes(l)) : t, d = t.length > 0 && r.size === t.length;
|
|
2064
2098
|
return /* @__PURE__ */ v("div", { children: [
|
|
2065
2099
|
/* @__PURE__ */ v("div", {
|
|
2066
|
-
className:
|
|
2100
|
+
className: Ht.sectionHeader,
|
|
2067
2101
|
children: [/* @__PURE__ */ _("div", {
|
|
2068
|
-
className:
|
|
2102
|
+
className: Ht.sectionLabel,
|
|
2069
2103
|
children: e
|
|
2070
2104
|
}), a && /* @__PURE__ */ _("button", {
|
|
2071
2105
|
type: "button",
|
|
2072
|
-
className:
|
|
2106
|
+
className: Ht.allToggle,
|
|
2073
2107
|
onClick: () => a(d ? [] : t),
|
|
2074
2108
|
children: d ? "Deselect all" : "Select all"
|
|
2075
2109
|
})]
|
|
2076
2110
|
}),
|
|
2077
2111
|
o && /* @__PURE__ */ _("input", {
|
|
2078
2112
|
type: "text",
|
|
2079
|
-
className:
|
|
2113
|
+
className: Ht.search,
|
|
2080
2114
|
placeholder: `Search ${e.toLowerCase()}…`,
|
|
2081
2115
|
autoComplete: "off",
|
|
2082
2116
|
value: s,
|
|
@@ -2084,12 +2118,12 @@ function Ht({ label: e, options: t, optionLabel: n, activeSet: r, onToggle: i, o
|
|
|
2084
2118
|
onChange: (e) => c(e.target.value)
|
|
2085
2119
|
}),
|
|
2086
2120
|
/* @__PURE__ */ v("div", {
|
|
2087
|
-
className:
|
|
2121
|
+
className: Ht.optionsList,
|
|
2088
2122
|
children: [u.length === 0 && /* @__PURE__ */ _("div", {
|
|
2089
|
-
className:
|
|
2123
|
+
className: Ht.empty,
|
|
2090
2124
|
children: "No match"
|
|
2091
|
-
}), u.map((e) => /* @__PURE__ */ _(
|
|
2092
|
-
className:
|
|
2125
|
+
}), u.map((e) => /* @__PURE__ */ _(Be, {
|
|
2126
|
+
className: Ht.option,
|
|
2093
2127
|
checked: r.has(e),
|
|
2094
2128
|
onChange: () => i(e),
|
|
2095
2129
|
label: n(e)
|
|
@@ -2113,7 +2147,7 @@ var X = {
|
|
|
2113
2147
|
};
|
|
2114
2148
|
//#endregion
|
|
2115
2149
|
//#region src/components/Tabs.tsx
|
|
2116
|
-
function
|
|
2150
|
+
function Wt({ items: e, value: t, onChange: n, variant: r = "line", size: i = "base", ...a }) {
|
|
2117
2151
|
let o = e.filter((e) => !e.disabled).map((e) => e.value), s = p(null), c = p(/* @__PURE__ */ new Map()), l = p(t), [u, f] = m(null), [h, g] = m("idle");
|
|
2118
2152
|
d(() => {
|
|
2119
2153
|
let e = c.current.get(t);
|
|
@@ -2197,21 +2231,21 @@ function Ut({ items: e, value: t, onChange: n, variant: r = "line", size: i = "b
|
|
|
2197
2231
|
})]
|
|
2198
2232
|
});
|
|
2199
2233
|
}
|
|
2200
|
-
var
|
|
2234
|
+
var Gt = {
|
|
2201
2235
|
root: "_root_1605f_1",
|
|
2202
2236
|
label: "_label_1605f_7"
|
|
2203
2237
|
};
|
|
2204
2238
|
//#endregion
|
|
2205
2239
|
//#region src/components/Toggle.tsx
|
|
2206
|
-
function
|
|
2240
|
+
function Kt({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
2207
2241
|
let a = u();
|
|
2208
2242
|
return /* @__PURE__ */ v("div", {
|
|
2209
|
-
className:
|
|
2243
|
+
className: Gt.root,
|
|
2210
2244
|
children: [r && /* @__PURE__ */ _("span", {
|
|
2211
2245
|
id: a,
|
|
2212
|
-
className:
|
|
2246
|
+
className: Gt.label,
|
|
2213
2247
|
children: r
|
|
2214
|
-
}), /* @__PURE__ */ _(
|
|
2248
|
+
}), /* @__PURE__ */ _(Wt, {
|
|
2215
2249
|
items: e,
|
|
2216
2250
|
value: t,
|
|
2217
2251
|
onChange: n,
|
|
@@ -2222,7 +2256,7 @@ function Gt({ items: e, value: t, onChange: n, label: r, "aria-label": i }) {
|
|
|
2222
2256
|
})]
|
|
2223
2257
|
});
|
|
2224
2258
|
}
|
|
2225
|
-
var
|
|
2259
|
+
var qt = {
|
|
2226
2260
|
spinner: "_spinner_9jjxr_3",
|
|
2227
2261
|
inner: "_inner_9jjxr_11",
|
|
2228
2262
|
outer: "_outer_9jjxr_12",
|
|
@@ -2233,10 +2267,10 @@ var Kt = {
|
|
|
2233
2267
|
};
|
|
2234
2268
|
//#endregion
|
|
2235
2269
|
//#region src/components/Spinner.tsx
|
|
2236
|
-
function
|
|
2270
|
+
function Jt({ variant: e = "default", size: t = 64, label: n = "Loading", className: r, "data-testid": i }) {
|
|
2237
2271
|
let a = [
|
|
2238
|
-
|
|
2239
|
-
|
|
2272
|
+
qt.spinner,
|
|
2273
|
+
qt[e],
|
|
2240
2274
|
r
|
|
2241
2275
|
].filter(Boolean).join(" ");
|
|
2242
2276
|
return /* @__PURE__ */ v("div", {
|
|
@@ -2249,7 +2283,7 @@ function qt({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2249
2283
|
},
|
|
2250
2284
|
"data-testid": i,
|
|
2251
2285
|
children: [/* @__PURE__ */ _("svg", {
|
|
2252
|
-
className:
|
|
2286
|
+
className: qt.inner,
|
|
2253
2287
|
width: t,
|
|
2254
2288
|
height: t,
|
|
2255
2289
|
viewBox: "0 0 64 64",
|
|
@@ -2257,7 +2291,7 @@ function qt({ variant: e = "default", size: t = 64, label: n = "Loading", classN
|
|
|
2257
2291
|
"aria-hidden": "true",
|
|
2258
2292
|
children: /* @__PURE__ */ _("path", { d: "M45.4273 17.5099C45.5053 17.5796 45.5088 17.6535 45.4377 17.7316L38.8829 24.8071C38.8634 24.828 38.8365 24.8404 38.8079 24.8416C38.7793 24.8428 38.7514 24.8326 38.7303 24.8134C36.6569 22.9045 34.221 22.0275 31.4225 22.1823C29.9153 22.2659 28.5572 22.6333 27.3483 23.2845C25.0295 24.5352 23.4428 26.4155 22.588 28.9253C20.717 34.4308 24.3708 40.1612 29.8184 41.6584C30.8097 41.9302 31.99 41.9735 33.3593 41.788C35.158 41.5433 36.8709 40.5854 38.3412 39.5627C38.4022 39.5203 38.4764 39.5014 38.5502 39.5094C38.6241 39.5175 38.6925 39.552 38.7428 39.6066L45.1742 46.6069C45.1803 46.6137 45.185 46.6217 45.188 46.6303C45.191 46.639 45.1923 46.6482 45.1917 46.6573C45.1911 46.6665 45.1887 46.6754 45.1846 46.6836C45.1805 46.6918 45.1748 46.6992 45.1679 46.7052C44.4401 47.3033 43.6502 47.8855 42.7982 48.4516C39.8799 50.3897 36.6339 51.4633 33.0602 51.6725C29.3847 51.8872 25.9031 51.1106 22.6152 49.3425C19.7917 47.8227 17.4903 45.764 15.7112 43.1663C14.4132 41.2707 13.4349 39.3097 12.8667 37.0717C11.973 33.5775 11.9925 30.1014 12.9253 26.6435C13.1679 25.7483 13.5465 24.8469 13.8414 23.9412C14.6703 21.4035 16.9915 18.887 18.9133 17.1899C26.3467 10.6186 38.1184 10.8908 45.4273 17.5099Z" })
|
|
2259
2293
|
}), /* @__PURE__ */ _("svg", {
|
|
2260
|
-
className:
|
|
2294
|
+
className: qt.outer,
|
|
2261
2295
|
width: t,
|
|
2262
2296
|
height: t,
|
|
2263
2297
|
viewBox: "0 0 64 64",
|
|
@@ -2289,14 +2323,14 @@ var Z = {
|
|
|
2289
2323
|
sheet: "_sheet_g9q2m_206",
|
|
2290
2324
|
fullscreen: "_fullscreen_g9q2m_212",
|
|
2291
2325
|
instant: "_instant_g9q2m_222"
|
|
2292
|
-
},
|
|
2293
|
-
function
|
|
2294
|
-
let t = c(
|
|
2326
|
+
}, Yt = 200, Xt = "(max-width: 639px)", Zt = "(prefers-reduced-motion: reduce)", Qt = "a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", $t = r(null);
|
|
2327
|
+
function en(e) {
|
|
2328
|
+
let t = c($t);
|
|
2295
2329
|
if (!t) throw Error(`${e} must be rendered inside <Modal>`);
|
|
2296
2330
|
return t;
|
|
2297
2331
|
}
|
|
2298
|
-
var
|
|
2299
|
-
function
|
|
2332
|
+
var tn = [];
|
|
2333
|
+
function nn(e) {
|
|
2300
2334
|
let [t, n] = m(() => typeof window < "u" && window.matchMedia(e).matches);
|
|
2301
2335
|
return l(() => {
|
|
2302
2336
|
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
@@ -2304,51 +2338,51 @@ function tn(e) {
|
|
|
2304
2338
|
}, [e]), t;
|
|
2305
2339
|
}
|
|
2306
2340
|
function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", onSubmit: i, dismissible: a = !0, instantInitialOpen: o = !1, portalSelector: c = "#container", isTop: d = !0, role: f = "dialog", "aria-labelledby": g, "data-testid": v, className: y, children: b }) {
|
|
2307
|
-
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M =
|
|
2308
|
-
|
|
2341
|
+
let x = u(), S = `${x}-title`, C = `${x}-description`, [w, T] = m(!1), [E, D] = m(e), [O, k] = m(e && o), [A, j] = m(!1), M = nn(Xt), N = nn(Zt), P = p(null), F = p(null), I = p(!1), L = p(!1), R = p(Symbol("modal")), z = p(e), ee = p(t);
|
|
2342
|
+
ee.current = t, l(() => T(!0), []), l(() => {
|
|
2309
2343
|
if (e) {
|
|
2310
|
-
if (
|
|
2311
|
-
if (F.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0),
|
|
2344
|
+
if (I.current) return;
|
|
2345
|
+
if (F.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0), z.current && o) {
|
|
2312
2346
|
k(!0);
|
|
2313
2347
|
return;
|
|
2314
2348
|
}
|
|
2315
2349
|
let e = requestAnimationFrame(() => k(!0));
|
|
2316
2350
|
return () => cancelAnimationFrame(e);
|
|
2317
2351
|
}
|
|
2318
|
-
if (
|
|
2319
|
-
let t = setTimeout(() => D(!1), N ? 0 :
|
|
2352
|
+
if (I.current = !1, k(!1), !E) return;
|
|
2353
|
+
let t = setTimeout(() => D(!1), N ? 0 : Yt);
|
|
2320
2354
|
return () => clearTimeout(t);
|
|
2321
2355
|
}, [e]), l(() => {
|
|
2322
2356
|
!E && F.current && (F.current.focus?.(), F.current = null);
|
|
2323
2357
|
}, [E]);
|
|
2324
|
-
let
|
|
2325
|
-
if (!a ||
|
|
2326
|
-
|
|
2327
|
-
let e = N ? 0 :
|
|
2328
|
-
window.setTimeout(() =>
|
|
2358
|
+
let te = s(() => {
|
|
2359
|
+
if (!a || I.current) return;
|
|
2360
|
+
I.current = !0, k(!1);
|
|
2361
|
+
let e = N ? 0 : Yt;
|
|
2362
|
+
window.setTimeout(() => ee.current(), e);
|
|
2329
2363
|
}, [a, N]);
|
|
2330
2364
|
l(() => {
|
|
2331
2365
|
if (!E) return;
|
|
2332
|
-
let e =
|
|
2333
|
-
d &&
|
|
2366
|
+
let e = R.current;
|
|
2367
|
+
d && tn.push(e);
|
|
2334
2368
|
let t = (t) => {
|
|
2335
|
-
t.key === "Escape" &&
|
|
2369
|
+
t.key === "Escape" && tn[tn.length - 1] === e && (t.preventDefault(), te());
|
|
2336
2370
|
};
|
|
2337
2371
|
document.addEventListener("keydown", t);
|
|
2338
2372
|
let { body: n } = document, r = n.style.overflow, i = n.style.paddingRight, a = window.innerWidth - document.documentElement.clientWidth;
|
|
2339
2373
|
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`), P.current?.focus({ preventScroll: !0 }), () => {
|
|
2340
2374
|
document.removeEventListener("keydown", t);
|
|
2341
|
-
let a =
|
|
2342
|
-
a !== -1 &&
|
|
2375
|
+
let a = tn.indexOf(e);
|
|
2376
|
+
a !== -1 && tn.splice(a, 1), n.style.overflow = r, n.style.paddingRight = i;
|
|
2343
2377
|
};
|
|
2344
2378
|
}, [
|
|
2345
2379
|
E,
|
|
2346
2380
|
d,
|
|
2347
|
-
|
|
2381
|
+
te
|
|
2348
2382
|
]);
|
|
2349
|
-
let
|
|
2383
|
+
let ne = (e) => {
|
|
2350
2384
|
if (e.key !== "Tab" || !P.current) return;
|
|
2351
|
-
let t = Array.from(P.current.querySelectorAll(
|
|
2385
|
+
let t = Array.from(P.current.querySelectorAll(Qt));
|
|
2352
2386
|
if (t.length === 0) {
|
|
2353
2387
|
e.preventDefault();
|
|
2354
2388
|
return;
|
|
@@ -2357,7 +2391,7 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2357
2391
|
e.shiftKey && (i === n || i === P.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
2358
2392
|
};
|
|
2359
2393
|
if (!w || !E) return null;
|
|
2360
|
-
let
|
|
2394
|
+
let re = document.querySelector(c) ?? document.body, B = [
|
|
2361
2395
|
Z.modal,
|
|
2362
2396
|
Z[n],
|
|
2363
2397
|
Z[r],
|
|
@@ -2370,9 +2404,9 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2370
2404
|
"aria-labelledby": g ?? S,
|
|
2371
2405
|
"aria-describedby": A ? C : void 0,
|
|
2372
2406
|
tabIndex: -1,
|
|
2373
|
-
className:
|
|
2407
|
+
className: B,
|
|
2374
2408
|
"data-testid": v,
|
|
2375
|
-
onKeyDown:
|
|
2409
|
+
onKeyDown: ne
|
|
2376
2410
|
}, ae = {
|
|
2377
2411
|
layout: n,
|
|
2378
2412
|
titleId: g ?? S,
|
|
@@ -2380,17 +2414,17 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2380
2414
|
isMobile: M,
|
|
2381
2415
|
dismissible: a,
|
|
2382
2416
|
setHasDescription: j,
|
|
2383
|
-
requestClose:
|
|
2417
|
+
requestClose: te
|
|
2384
2418
|
};
|
|
2385
|
-
return h(/* @__PURE__ */ _(
|
|
2419
|
+
return h(/* @__PURE__ */ _($t.Provider, {
|
|
2386
2420
|
value: ae,
|
|
2387
2421
|
children: /* @__PURE__ */ _("div", {
|
|
2388
2422
|
className: `${Z.backdrop} ${O ? Z.visible : ""} ${o ? Z.instant : ""}`.trim(),
|
|
2389
2423
|
onPointerDown: (e) => {
|
|
2390
|
-
|
|
2424
|
+
L.current = e.target !== e.currentTarget;
|
|
2391
2425
|
},
|
|
2392
2426
|
onClick: (e) => {
|
|
2393
|
-
e.target === e.currentTarget && !
|
|
2427
|
+
e.target === e.currentTarget && !L.current && te(), L.current = !1;
|
|
2394
2428
|
},
|
|
2395
2429
|
children: i ? /* @__PURE__ */ _("form", {
|
|
2396
2430
|
ref: P,
|
|
@@ -2403,15 +2437,15 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2403
2437
|
children: b
|
|
2404
2438
|
})
|
|
2405
2439
|
})
|
|
2406
|
-
}),
|
|
2440
|
+
}), re);
|
|
2407
2441
|
}
|
|
2408
|
-
function
|
|
2409
|
-
let { requestClose: n, dismissible: r } =
|
|
2442
|
+
function rn({ children: e, onClose: t }) {
|
|
2443
|
+
let { requestClose: n, dismissible: r } = en("Modal.Cover");
|
|
2410
2444
|
return /* @__PURE__ */ v("div", {
|
|
2411
2445
|
className: Z.cover,
|
|
2412
|
-
children: [e, t && /* @__PURE__ */ _(
|
|
2446
|
+
children: [e, t && /* @__PURE__ */ _(O, {
|
|
2413
2447
|
variant: "tertiary",
|
|
2414
|
-
leadingIcon: /* @__PURE__ */ _(
|
|
2448
|
+
leadingIcon: /* @__PURE__ */ _(Te, {}),
|
|
2415
2449
|
"aria-label": "Close",
|
|
2416
2450
|
"data-testid": "modal-close",
|
|
2417
2451
|
className: Z.closeButton,
|
|
@@ -2422,7 +2456,7 @@ function nn({ children: e, onClose: t }) {
|
|
|
2422
2456
|
})]
|
|
2423
2457
|
});
|
|
2424
2458
|
}
|
|
2425
|
-
function
|
|
2459
|
+
function an({ children: t }) {
|
|
2426
2460
|
let n = e.toArray(t), r = n.filter((e) => o(e) && e.type.isModalIcon === !0), i = n.filter((e) => !r.includes(e));
|
|
2427
2461
|
return /* @__PURE__ */ v("div", {
|
|
2428
2462
|
className: Z.message,
|
|
@@ -2432,52 +2466,52 @@ function rn({ children: t }) {
|
|
|
2432
2466
|
})]
|
|
2433
2467
|
});
|
|
2434
2468
|
}
|
|
2435
|
-
function
|
|
2469
|
+
function on({ children: e, tone: t = "neutral" }) {
|
|
2436
2470
|
return /* @__PURE__ */ _("div", {
|
|
2437
2471
|
className: `${Z.icon} ${Z[`tone-${t}`]}`,
|
|
2438
2472
|
"aria-hidden": "true",
|
|
2439
2473
|
children: e
|
|
2440
2474
|
});
|
|
2441
2475
|
}
|
|
2442
|
-
function
|
|
2443
|
-
let { titleId: n } =
|
|
2476
|
+
function sn({ children: e, id: t }) {
|
|
2477
|
+
let { titleId: n } = en("Modal.Title");
|
|
2444
2478
|
return /* @__PURE__ */ _("h2", {
|
|
2445
2479
|
id: t ?? n,
|
|
2446
2480
|
className: Z.title,
|
|
2447
2481
|
children: e
|
|
2448
2482
|
});
|
|
2449
2483
|
}
|
|
2450
|
-
function
|
|
2451
|
-
let { descriptionId: t, setHasDescription: n } =
|
|
2484
|
+
function cn({ children: e }) {
|
|
2485
|
+
let { descriptionId: t, setHasDescription: n } = en("Modal.Description");
|
|
2452
2486
|
return l(() => (n(!0), () => n(!1)), [n]), /* @__PURE__ */ _("p", {
|
|
2453
2487
|
id: t,
|
|
2454
2488
|
className: Z.description,
|
|
2455
2489
|
children: e
|
|
2456
2490
|
});
|
|
2457
2491
|
}
|
|
2458
|
-
function
|
|
2492
|
+
function ln({ children: e }) {
|
|
2459
2493
|
return /* @__PURE__ */ _("p", {
|
|
2460
2494
|
className: Z.hint,
|
|
2461
2495
|
children: e
|
|
2462
2496
|
});
|
|
2463
2497
|
}
|
|
2464
|
-
function
|
|
2498
|
+
function un({ children: e }) {
|
|
2465
2499
|
return /* @__PURE__ */ _("div", {
|
|
2466
2500
|
className: Z.body,
|
|
2467
2501
|
children: e
|
|
2468
2502
|
});
|
|
2469
2503
|
}
|
|
2470
|
-
function
|
|
2471
|
-
let { isMobile: r } =
|
|
2504
|
+
function dn({ children: t }) {
|
|
2505
|
+
let { isMobile: r } = en("Modal.Footer"), i = r ? e.map(t, (e) => o(e) && e.type === O ? n(e, { size: "base" }) : e) : t;
|
|
2472
2506
|
return /* @__PURE__ */ _("div", {
|
|
2473
2507
|
className: Z.footer,
|
|
2474
2508
|
children: i
|
|
2475
2509
|
});
|
|
2476
2510
|
}
|
|
2477
|
-
Q.Cover =
|
|
2511
|
+
Q.Cover = rn, Q.Message = an, on.isModalIcon = !0, Q.Icon = on, Q.Title = sn, Q.Description = cn, Q.Hint = ln, Q.Body = un, Q.Footer = dn;
|
|
2478
2512
|
//#endregion
|
|
2479
2513
|
//#region src/components/ConfirmDialog.tsx
|
|
2480
|
-
function
|
|
2514
|
+
function fn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon: a, confirmLabel: o, cancelLabel: s = "Cancel", tone: c = "default", loading: l = !1, "data-testid": u }) {
|
|
2481
2515
|
let d = c === "dangerous";
|
|
2482
2516
|
return /* @__PURE__ */ v(Q, {
|
|
2483
2517
|
open: e,
|
|
@@ -2493,12 +2527,12 @@ function dn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon:
|
|
|
2493
2527
|
}),
|
|
2494
2528
|
/* @__PURE__ */ _(Q.Title, { children: r }),
|
|
2495
2529
|
i && /* @__PURE__ */ _(Q.Description, { children: i })
|
|
2496
|
-
] }), /* @__PURE__ */ v(Q.Footer, { children: [/* @__PURE__ */ _(
|
|
2530
|
+
] }), /* @__PURE__ */ v(Q.Footer, { children: [/* @__PURE__ */ _(O, {
|
|
2497
2531
|
variant: d ? "dangerous" : "primary",
|
|
2498
2532
|
disabled: l,
|
|
2499
2533
|
onClick: n,
|
|
2500
2534
|
children: o
|
|
2501
|
-
}), /* @__PURE__ */ _(
|
|
2535
|
+
}), /* @__PURE__ */ _(O, {
|
|
2502
2536
|
variant: "secondary",
|
|
2503
2537
|
disabled: l,
|
|
2504
2538
|
onClick: t,
|
|
@@ -2506,7 +2540,7 @@ function dn({ open: e, onClose: t, onConfirm: n, title: r, description: i, icon:
|
|
|
2506
2540
|
})] })]
|
|
2507
2541
|
});
|
|
2508
2542
|
}
|
|
2509
|
-
var
|
|
2543
|
+
var pn = {
|
|
2510
2544
|
skeleton: "_skeleton_3os3v_2",
|
|
2511
2545
|
rect: "_rect_3os3v_7",
|
|
2512
2546
|
text: "_text_3os3v_13",
|
|
@@ -2516,11 +2550,11 @@ var fn = {
|
|
|
2516
2550
|
};
|
|
2517
2551
|
//#endregion
|
|
2518
2552
|
//#region src/components/Skeleton.tsx
|
|
2519
|
-
function
|
|
2553
|
+
function mn({ variant: e = "rect", width: t, height: n, size: r, animated: i = !0, className: a, "data-testid": o }) {
|
|
2520
2554
|
let s = [
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
i &&
|
|
2555
|
+
pn.skeleton,
|
|
2556
|
+
pn[e],
|
|
2557
|
+
i && pn.animated,
|
|
2524
2558
|
a
|
|
2525
2559
|
].filter(Boolean).join(" "), c = {};
|
|
2526
2560
|
return e === "circle" && r !== void 0 && (c.width = r, c.height = r), t !== void 0 && (c.width = t), n !== void 0 && (c.height = n), /* @__PURE__ */ _("div", {
|
|
@@ -2530,7 +2564,7 @@ function pn({ variant: e = "rect", width: t, height: n, size: r, animated: i = !
|
|
|
2530
2564
|
"data-testid": o
|
|
2531
2565
|
});
|
|
2532
2566
|
}
|
|
2533
|
-
var
|
|
2567
|
+
var hn = {
|
|
2534
2568
|
root: "_root_1h55m_1",
|
|
2535
2569
|
success: "_success_1h55m_11",
|
|
2536
2570
|
warning: "_warning_1h55m_17",
|
|
@@ -2543,45 +2577,45 @@ var mn = {
|
|
|
2543
2577
|
};
|
|
2544
2578
|
//#endregion
|
|
2545
2579
|
//#region src/components/EmptyState.tsx
|
|
2546
|
-
function
|
|
2580
|
+
function gn({ tone: e = "neutral", icon: t, title: n, children: r, action: i, ...a }) {
|
|
2547
2581
|
return /* @__PURE__ */ v("div", {
|
|
2548
|
-
className: `${
|
|
2582
|
+
className: `${hn.root} ${e === "neutral" ? "" : hn[e]}`,
|
|
2549
2583
|
...a,
|
|
2550
2584
|
children: [t != null && /* @__PURE__ */ _("div", {
|
|
2551
|
-
className:
|
|
2585
|
+
className: hn.icon,
|
|
2552
2586
|
"aria-hidden": "true",
|
|
2553
2587
|
children: t
|
|
2554
2588
|
}), /* @__PURE__ */ v("div", {
|
|
2555
|
-
className:
|
|
2589
|
+
className: hn.body,
|
|
2556
2590
|
children: [
|
|
2557
2591
|
/* @__PURE__ */ _("p", {
|
|
2558
|
-
className:
|
|
2592
|
+
className: hn.title,
|
|
2559
2593
|
children: n
|
|
2560
2594
|
}),
|
|
2561
2595
|
r != null && /* @__PURE__ */ _("div", {
|
|
2562
|
-
className:
|
|
2596
|
+
className: hn.text,
|
|
2563
2597
|
children: r
|
|
2564
2598
|
}),
|
|
2565
2599
|
i != null && /* @__PURE__ */ _("div", {
|
|
2566
|
-
className:
|
|
2600
|
+
className: hn.action,
|
|
2567
2601
|
children: i
|
|
2568
2602
|
})
|
|
2569
2603
|
]
|
|
2570
2604
|
})]
|
|
2571
2605
|
});
|
|
2572
2606
|
}
|
|
2573
|
-
var
|
|
2574
|
-
function
|
|
2607
|
+
var _n = { photoPreview: "_photoPreview_zsbn2_2" }, vn = 120, yn = 12, bn = 8;
|
|
2608
|
+
function xn(e, t, n = vn) {
|
|
2575
2609
|
let r = (e, t) => {
|
|
2576
|
-
let r = e +
|
|
2577
|
-
return Math.max(
|
|
2610
|
+
let r = e + yn, i = r + n + bn > t ? e - yn - n : r;
|
|
2611
|
+
return Math.max(bn, i);
|
|
2578
2612
|
};
|
|
2579
2613
|
return {
|
|
2580
2614
|
left: r(e, window.innerWidth),
|
|
2581
2615
|
top: r(t, window.innerHeight)
|
|
2582
2616
|
};
|
|
2583
2617
|
}
|
|
2584
|
-
function
|
|
2618
|
+
function Sn({ src: e, size: t = vn, children: r }) {
|
|
2585
2619
|
let [i, a] = m(null), [o, s] = m(), c = i !== null;
|
|
2586
2620
|
if (l(() => {
|
|
2587
2621
|
if (!c) return;
|
|
@@ -2607,14 +2641,14 @@ function xn({ src: e, size: t = _n, children: r }) {
|
|
|
2607
2641
|
}
|
|
2608
2642
|
});
|
|
2609
2643
|
return /* @__PURE__ */ v(g, { children: [f, i && h(/* @__PURE__ */ _("img", {
|
|
2610
|
-
className:
|
|
2644
|
+
className: _n.photoPreview,
|
|
2611
2645
|
src: e,
|
|
2612
2646
|
alt: "",
|
|
2613
2647
|
"aria-hidden": "true",
|
|
2614
2648
|
style: {
|
|
2615
2649
|
width: t,
|
|
2616
2650
|
height: t,
|
|
2617
|
-
...
|
|
2651
|
+
...xn(i.x, i.y, t)
|
|
2618
2652
|
},
|
|
2619
2653
|
onError: () => {
|
|
2620
2654
|
s(e), a(null);
|
|
@@ -2651,7 +2685,7 @@ var $ = {
|
|
|
2651
2685
|
pending: "_pending_kvx36_211",
|
|
2652
2686
|
actions: "_actions_kvx36_217",
|
|
2653
2687
|
srOnly: "_srOnly_kvx36_228"
|
|
2654
|
-
},
|
|
2688
|
+
}, Cn = {
|
|
2655
2689
|
worker: "Worker:",
|
|
2656
2690
|
comment: "Comment:",
|
|
2657
2691
|
pending: "Card still in progress",
|
|
@@ -2659,9 +2693,9 @@ var $ = {
|
|
|
2659
2693
|
archived: "Archived",
|
|
2660
2694
|
new: "New"
|
|
2661
2695
|
};
|
|
2662
|
-
function
|
|
2696
|
+
function wn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n, previewAlt: r, dateTime: i, title: a, description: o, meta: s, worker: c, comment: l, viewed: u = !1, current: d, onClick: f, hoverable: p, actions: h, labels: y, "aria-label": b, className: x, "data-testid": S }) {
|
|
2663
2697
|
let C = {
|
|
2664
|
-
...
|
|
2698
|
+
...Cn,
|
|
2665
2699
|
...y
|
|
2666
2700
|
}, [w, T] = m(), [E, D] = m(), O = !!e && w !== e, k = c?.photo, A = !!k && E !== k, j = !!c && (c.pending || !A), M = !!f, N = (e) => {
|
|
2667
2701
|
e.target === e.currentTarget && (e.key === "Enter" ? f?.() : e.key === " " && (e.preventDefault(), f?.()));
|
|
@@ -2698,12 +2732,12 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2698
2732
|
}
|
|
2699
2733
|
}) : /* @__PURE__ */ _("div", {
|
|
2700
2734
|
className: `${$.tile} ${t === "play" ? $.tilePlay : ""}`,
|
|
2701
|
-
children: t === "play" ? /* @__PURE__ */ _(
|
|
2735
|
+
children: t === "play" ? /* @__PURE__ */ _(ye, {
|
|
2702
2736
|
size: 20,
|
|
2703
2737
|
"aria-hidden": "true"
|
|
2704
2738
|
}) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
|
|
2705
2739
|
className: $.icon,
|
|
2706
|
-
children: _(t === "archived" ?
|
|
2740
|
+
children: _(t === "archived" ? ae : _e, {
|
|
2707
2741
|
size: 12,
|
|
2708
2742
|
strokeWidth: 1,
|
|
2709
2743
|
"aria-hidden": "true"
|
|
@@ -2746,7 +2780,7 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2746
2780
|
children: C.worker
|
|
2747
2781
|
}), /* @__PURE__ */ v("div", {
|
|
2748
2782
|
className: $.workerRow,
|
|
2749
|
-
children: [A ? /* @__PURE__ */ _(
|
|
2783
|
+
children: [A ? /* @__PURE__ */ _(Sn, {
|
|
2750
2784
|
src: k,
|
|
2751
2785
|
children: /* @__PURE__ */ _("img", {
|
|
2752
2786
|
className: $.photo,
|
|
@@ -2759,7 +2793,7 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2759
2793
|
}) : /* @__PURE__ */ _("div", {
|
|
2760
2794
|
className: `${$.photo} ${$.emptyPhoto}`,
|
|
2761
2795
|
"aria-hidden": "true",
|
|
2762
|
-
children: /* @__PURE__ */ _(
|
|
2796
|
+
children: /* @__PURE__ */ _(Ce, { size: 20 })
|
|
2763
2797
|
}), /* @__PURE__ */ v("div", {
|
|
2764
2798
|
className: $.workerText,
|
|
2765
2799
|
children: [/* @__PURE__ */ _("div", {
|
|
@@ -2788,14 +2822,14 @@ function Cn({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
2788
2822
|
]
|
|
2789
2823
|
});
|
|
2790
2824
|
}
|
|
2791
|
-
function
|
|
2825
|
+
function Tn({ className: e, "data-testid": t }) {
|
|
2792
2826
|
return /* @__PURE__ */ v("div", {
|
|
2793
2827
|
className: `${$.root} ${e ?? ""}`,
|
|
2794
2828
|
"data-testid": t,
|
|
2795
2829
|
"aria-hidden": "true",
|
|
2796
2830
|
children: [/* @__PURE__ */ _("div", {
|
|
2797
2831
|
className: $.side,
|
|
2798
|
-
children: /* @__PURE__ */ _(
|
|
2832
|
+
children: /* @__PURE__ */ _(mn, {
|
|
2799
2833
|
width: 72,
|
|
2800
2834
|
height: 48
|
|
2801
2835
|
})
|
|
@@ -2804,15 +2838,15 @@ function wn({ className: e, "data-testid": t }) {
|
|
|
2804
2838
|
children: /* @__PURE__ */ v("div", {
|
|
2805
2839
|
className: $.info,
|
|
2806
2840
|
children: [
|
|
2807
|
-
/* @__PURE__ */ _(
|
|
2841
|
+
/* @__PURE__ */ _(mn, {
|
|
2808
2842
|
variant: "text",
|
|
2809
2843
|
width: "40%"
|
|
2810
2844
|
}),
|
|
2811
|
-
/* @__PURE__ */ _(
|
|
2845
|
+
/* @__PURE__ */ _(mn, {
|
|
2812
2846
|
variant: "text",
|
|
2813
2847
|
width: "65%"
|
|
2814
2848
|
}),
|
|
2815
|
-
/* @__PURE__ */ _(
|
|
2849
|
+
/* @__PURE__ */ _(mn, {
|
|
2816
2850
|
variant: "text",
|
|
2817
2851
|
width: "90%"
|
|
2818
2852
|
})
|
|
@@ -2821,18 +2855,18 @@ function wn({ className: e, "data-testid": t }) {
|
|
|
2821
2855
|
})]
|
|
2822
2856
|
});
|
|
2823
2857
|
}
|
|
2824
|
-
var
|
|
2858
|
+
var En = Object.assign(wn, { Skeleton: Tn });
|
|
2825
2859
|
//#endregion
|
|
2826
2860
|
//#region src/utils/format.ts
|
|
2827
|
-
function
|
|
2861
|
+
function Dn(e) {
|
|
2828
2862
|
let t = Math.floor(e / 60), n = e % 60;
|
|
2829
2863
|
return `${t}h:${String(n).padStart(2, "0")}m`;
|
|
2830
2864
|
}
|
|
2831
|
-
function
|
|
2865
|
+
function On(e, t) {
|
|
2832
2866
|
let n = Math.floor(e / 60), r = e % 60, i = (e) => String(e).padStart(2, "0");
|
|
2833
2867
|
return `${i(n)}:${i(r)}:${i(t)}`;
|
|
2834
2868
|
}
|
|
2835
2869
|
//#endregion
|
|
2836
|
-
export {
|
|
2870
|
+
export { O as Button, pt as Calendar, A as Card, Be as Checkbox, He as CheckboxGroup, fn as ConfirmDialog, Qe as DateField, vt as DatePicker, kt as Dropdown, gn as EmptyState, W as FieldLabel, Ut as FilterSection, Vt as HighlightText, Rt as LanguageSwitch, Ft as Logo, St as Menu, Ct as MenuDivider, Tt as MenuItem, Q as Modal, Nt as NavItem, Pt as NavList, bt as NumberField, Ze as PasswordField, Sn as PhotoPreview, We as RadioButton, Ge as RadioGroup, It as Sidebar, Lt as SidebarFooter, mn as Skeleton, Jt as Spinner, qe as Switch, Wt as Tabs, Oe as Tag, Me as TagGroup, Xe as TextArea, Je as TextField, Kt as Toggle, Pe as Toolbar, Re as ToolbarAdaptive, S as Tooltip, En as VideoCard, Dn as formatDuration, On as formatDurationHMS };
|
|
2837
2871
|
|
|
2838
2872
|
//# sourceMappingURL=index.js.map
|