cattle-care-ui 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/VideoCard.d.ts +1 -4
- package/dist/index.css +1 -1
- package/dist/index.js +310 -315
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -213,12 +213,12 @@ var M = {
|
|
|
213
213
|
};
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region src/components/Badge.tsx
|
|
216
|
-
function
|
|
216
|
+
function N(...e) {
|
|
217
217
|
return e.filter(Boolean).join(" ");
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function P({ variant: e = "neutral", size: t = "base", children: n, iconLeft: r, iconRight: i, dot: a, ...o }) {
|
|
220
220
|
return /* @__PURE__ */ y("span", {
|
|
221
|
-
className:
|
|
221
|
+
className: N(M.badge, M[e], M[t]),
|
|
222
222
|
...o,
|
|
223
223
|
children: [
|
|
224
224
|
a && /* @__PURE__ */ v("span", {
|
|
@@ -239,13 +239,13 @@ function N({ variant: e = "neutral", size: t = "base", children: n, iconLeft: r,
|
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs
|
|
242
|
-
var
|
|
242
|
+
var F = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
243
243
|
//#endregion
|
|
244
244
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs
|
|
245
|
-
function
|
|
245
|
+
function I(e, t, n = []) {
|
|
246
246
|
if (t == null) throw Error("[lucide]: iconNode is required when icon name is used");
|
|
247
247
|
return {
|
|
248
|
-
name:
|
|
248
|
+
name: F(e),
|
|
249
249
|
size: 24,
|
|
250
250
|
node: t,
|
|
251
251
|
...n.length > 0 ? { aliases: n } : {}
|
|
@@ -253,7 +253,7 @@ function F(e, t, n = []) {
|
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs
|
|
256
|
-
var
|
|
256
|
+
var ee = (e) => {
|
|
257
257
|
let t = "", n = !1;
|
|
258
258
|
for (let r of e) {
|
|
259
259
|
if (r === "-" || r === "_" || r <= " ") {
|
|
@@ -263,10 +263,10 @@ var te = (e) => {
|
|
|
263
263
|
t.length === 0 ? t += r.toLowerCase() : t += n ? r.toUpperCase() : r, n = !1;
|
|
264
264
|
}
|
|
265
265
|
return t;
|
|
266
|
-
},
|
|
267
|
-
let t =
|
|
266
|
+
}, te = (e) => {
|
|
267
|
+
let t = ee(e);
|
|
268
268
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
269
|
-
},
|
|
269
|
+
}, L = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), R = {
|
|
270
270
|
xmlns: "http://www.w3.org/2000/svg",
|
|
271
271
|
width: 24,
|
|
272
272
|
height: 24,
|
|
@@ -279,22 +279,22 @@ var te = (e) => {
|
|
|
279
279
|
};
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs
|
|
282
|
-
function
|
|
282
|
+
function z(e) {
|
|
283
283
|
return e != null;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ??
|
|
285
|
+
function B(e, t = {}) {
|
|
286
|
+
let n = t.attributeNames ?? {}, r = (e) => n[e] ?? e, i = e.size ?? e.width ?? R.width, a = e.size ?? e.height ?? R.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 ? L(...c) : L("lucide", ...s, ...c), u = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? R["stroke-width"]) * Number(e.size ?? e.width ?? R.width) / Number(t.size ?? t.width ?? R.width) : t.strokeWidth ?? R["stroke-width"];
|
|
287
287
|
return [
|
|
288
288
|
"svg",
|
|
289
289
|
{
|
|
290
|
-
...Object.entries(
|
|
290
|
+
...Object.entries(R).reduce((e, [t, n]) => (e[r(t)] = n, e), {}),
|
|
291
291
|
..."color" in t && t.color && { [r("stroke")]: t.color },
|
|
292
|
-
..."size" in t &&
|
|
292
|
+
..."size" in t && z(t.size) && {
|
|
293
293
|
[r("width")]: t.size,
|
|
294
294
|
[r("height")]: t.size
|
|
295
295
|
},
|
|
296
|
-
..."width" in t &&
|
|
297
|
-
..."height" in t &&
|
|
296
|
+
..."width" in t && z(t.width) && { [r("width")]: t.width },
|
|
297
|
+
..."height" in t && z(t.height) && { [r("height")]: t.height },
|
|
298
298
|
[r("stroke-width")]: u,
|
|
299
299
|
...l && { [r("class")]: l },
|
|
300
300
|
[r("viewBox")]: `0 0 ${i} ${a}`,
|
|
@@ -316,8 +316,8 @@ function z(e, t = {}) {
|
|
|
316
316
|
}
|
|
317
317
|
//#endregion
|
|
318
318
|
//#region node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function ne(e, t = {}) {
|
|
320
|
+
return B(e, {
|
|
321
321
|
...t,
|
|
322
322
|
attributeNames: {
|
|
323
323
|
...t.attributeNames,
|
|
@@ -331,22 +331,22 @@ function re(e, t = {}) {
|
|
|
331
331
|
}
|
|
332
332
|
//#endregion
|
|
333
333
|
//#region node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs
|
|
334
|
-
var
|
|
334
|
+
var re = (e) => {
|
|
335
335
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
336
336
|
return !1;
|
|
337
|
-
},
|
|
337
|
+
}, ie = r({}), ae = () => c(ie), oe = a(({ color: e, size: t, width: n, height: r, strokeWidth: a, absoluteStrokeWidth: o, nonScalingStroke: s, className: c = "", children: l, iconNode: u = [], icon: d = {
|
|
338
338
|
node: u,
|
|
339
339
|
aliases: [],
|
|
340
340
|
size: 24
|
|
341
341
|
}, ...f }, p) => {
|
|
342
|
-
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } =
|
|
342
|
+
let { size: m = 24, strokeWidth: h = 2, absoluteStrokeWidth: g = !1, nonScalingStroke: _ = !1, color: v = "currentColor", className: y = "" } = ae() ?? {}, b = !!l || re(f), [x, S, C = []] = ne(d, {
|
|
343
343
|
color: e ?? v,
|
|
344
344
|
width: n ?? t ?? m,
|
|
345
345
|
height: r ?? t ?? m,
|
|
346
346
|
strokeWidth: a ?? h,
|
|
347
347
|
absoluteStrokeWidth: o ?? g,
|
|
348
348
|
nonScalingStroke: s ?? _,
|
|
349
|
-
className:
|
|
349
|
+
className: L(y, c),
|
|
350
350
|
hasA11yProp: b,
|
|
351
351
|
attributes: f
|
|
352
352
|
});
|
|
@@ -357,18 +357,18 @@ var ie = (e) => {
|
|
|
357
357
|
});
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region node_modules/lucide-react/dist/esm/createLucideIcon.mjs
|
|
360
|
-
function
|
|
361
|
-
let r = typeof e == "string" ?
|
|
360
|
+
function V(e, t = [], n = []) {
|
|
361
|
+
let r = typeof e == "string" ? I(e, t, n) : e, o = a(({ className: e, ...t }, n) => i(oe, {
|
|
362
362
|
ref: n,
|
|
363
363
|
icon: r,
|
|
364
364
|
className: e,
|
|
365
365
|
...t
|
|
366
366
|
}));
|
|
367
|
-
return r.name && (o.displayName =
|
|
367
|
+
return r.name && (o.displayName = te(r.name)), o;
|
|
368
368
|
}
|
|
369
369
|
//#endregion
|
|
370
370
|
//#region node_modules/lucide-react/dist/esm/icons/archive.mjs
|
|
371
|
-
var
|
|
371
|
+
var H = {
|
|
372
372
|
name: "archive",
|
|
373
373
|
size: 24,
|
|
374
374
|
node: [
|
|
@@ -390,8 +390,8 @@ var V = {
|
|
|
390
390
|
}]
|
|
391
391
|
]
|
|
392
392
|
};
|
|
393
|
-
|
|
394
|
-
var
|
|
393
|
+
H.node;
|
|
394
|
+
var se = V(H), U = {
|
|
395
395
|
name: "calendar-days",
|
|
396
396
|
size: 24,
|
|
397
397
|
node: [
|
|
@@ -442,7 +442,7 @@ var H = B(V), U = {
|
|
|
442
442
|
]
|
|
443
443
|
};
|
|
444
444
|
U.node;
|
|
445
|
-
var ce =
|
|
445
|
+
var ce = V(U), le = {
|
|
446
446
|
name: "check",
|
|
447
447
|
size: 24,
|
|
448
448
|
node: [["path", {
|
|
@@ -451,7 +451,7 @@ var ce = B(U), le = {
|
|
|
451
451
|
}]]
|
|
452
452
|
};
|
|
453
453
|
le.node;
|
|
454
|
-
var W =
|
|
454
|
+
var W = V(le), ue = {
|
|
455
455
|
name: "chevron-down",
|
|
456
456
|
size: 24,
|
|
457
457
|
node: [["path", {
|
|
@@ -460,7 +460,7 @@ var W = B(le), ue = {
|
|
|
460
460
|
}]]
|
|
461
461
|
};
|
|
462
462
|
ue.node;
|
|
463
|
-
var de =
|
|
463
|
+
var de = V(ue), fe = {
|
|
464
464
|
name: "chevron-left",
|
|
465
465
|
size: 24,
|
|
466
466
|
node: [["path", {
|
|
@@ -469,7 +469,7 @@ var de = B(ue), fe = {
|
|
|
469
469
|
}]]
|
|
470
470
|
};
|
|
471
471
|
fe.node;
|
|
472
|
-
var pe =
|
|
472
|
+
var pe = V(fe), me = {
|
|
473
473
|
name: "chevron-right",
|
|
474
474
|
size: 24,
|
|
475
475
|
node: [["path", {
|
|
@@ -478,7 +478,7 @@ var pe = B(fe), me = {
|
|
|
478
478
|
}]]
|
|
479
479
|
};
|
|
480
480
|
me.node;
|
|
481
|
-
var he =
|
|
481
|
+
var he = V(me), ge = {
|
|
482
482
|
name: "eye-off",
|
|
483
483
|
size: 24,
|
|
484
484
|
node: [
|
|
@@ -501,7 +501,7 @@ var he = B(me), ge = {
|
|
|
501
501
|
]
|
|
502
502
|
};
|
|
503
503
|
ge.node;
|
|
504
|
-
var _e =
|
|
504
|
+
var _e = V(ge), ve = {
|
|
505
505
|
name: "eye",
|
|
506
506
|
size: 24,
|
|
507
507
|
node: [["path", {
|
|
@@ -515,7 +515,7 @@ var _e = B(ge), ve = {
|
|
|
515
515
|
}]]
|
|
516
516
|
};
|
|
517
517
|
ve.node;
|
|
518
|
-
var ye =
|
|
518
|
+
var ye = V(ve), be = {
|
|
519
519
|
name: "lock",
|
|
520
520
|
size: 24,
|
|
521
521
|
node: [["rect", {
|
|
@@ -532,7 +532,7 @@ var ye = B(ve), be = {
|
|
|
532
532
|
}]]
|
|
533
533
|
};
|
|
534
534
|
be.node;
|
|
535
|
-
var xe =
|
|
535
|
+
var xe = V(be), Se = {
|
|
536
536
|
name: "play",
|
|
537
537
|
size: 24,
|
|
538
538
|
node: [["path", {
|
|
@@ -541,7 +541,7 @@ var xe = B(be), Se = {
|
|
|
541
541
|
}]]
|
|
542
542
|
};
|
|
543
543
|
Se.node;
|
|
544
|
-
var Ce =
|
|
544
|
+
var Ce = V(Se), we = {
|
|
545
545
|
name: "search",
|
|
546
546
|
size: 24,
|
|
547
547
|
node: [["path", {
|
|
@@ -555,7 +555,7 @@ var Ce = B(Se), we = {
|
|
|
555
555
|
}]]
|
|
556
556
|
};
|
|
557
557
|
we.node;
|
|
558
|
-
var Te =
|
|
558
|
+
var Te = V(we), Ee = {
|
|
559
559
|
name: "user",
|
|
560
560
|
size: 24,
|
|
561
561
|
node: [["path", {
|
|
@@ -569,7 +569,7 @@ var Te = B(we), Ee = {
|
|
|
569
569
|
}]]
|
|
570
570
|
};
|
|
571
571
|
Ee.node;
|
|
572
|
-
var De =
|
|
572
|
+
var De = V(Ee), Oe = {
|
|
573
573
|
name: "x",
|
|
574
574
|
size: 24,
|
|
575
575
|
node: [["path", {
|
|
@@ -581,7 +581,7 @@ var De = B(Ee), Oe = {
|
|
|
581
581
|
}]]
|
|
582
582
|
};
|
|
583
583
|
Oe.node;
|
|
584
|
-
var ke =
|
|
584
|
+
var ke = V(Oe), Ae = {
|
|
585
585
|
neutral: "_neutral_11vj2_1",
|
|
586
586
|
pill: "_pill_11vj2_2",
|
|
587
587
|
accent: "_accent_11vj2_3",
|
|
@@ -759,13 +759,13 @@ function Be({ searchValue: e, onSearchChange: t, placeholder: n = "Search…", s
|
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
761
|
var Ve = {
|
|
762
|
-
anchor: "
|
|
763
|
-
sentinel: "
|
|
764
|
-
header: "
|
|
765
|
-
animated: "
|
|
766
|
-
card: "
|
|
767
|
-
left: "
|
|
768
|
-
right: "
|
|
762
|
+
anchor: "_anchor_1r8q2_3",
|
|
763
|
+
sentinel: "_sentinel_1r8q2_8",
|
|
764
|
+
header: "_header_1r8q2_17",
|
|
765
|
+
animated: "_animated_1r8q2_43",
|
|
766
|
+
card: "_card_1r8q2_49",
|
|
767
|
+
left: "_left_1r8q2_104",
|
|
768
|
+
right: "_right_1r8q2_105"
|
|
769
769
|
}, He = 4;
|
|
770
770
|
function Ue(e) {
|
|
771
771
|
let t = e.parentElement;
|
|
@@ -831,13 +831,13 @@ function We({ left: e, right: t, children: n, scrollRoot: r, threshold: i = He,
|
|
|
831
831
|
})] });
|
|
832
832
|
}
|
|
833
833
|
var Ge = {
|
|
834
|
-
checkbox: "
|
|
835
|
-
control: "
|
|
836
|
-
labelText: "
|
|
837
|
-
input: "
|
|
838
|
-
box: "
|
|
839
|
-
icon: "
|
|
840
|
-
indicator: "
|
|
834
|
+
checkbox: "_checkbox_553ny_1",
|
|
835
|
+
control: "_control_553ny_8",
|
|
836
|
+
labelText: "_labelText_553ny_17",
|
|
837
|
+
input: "_input_553ny_25",
|
|
838
|
+
box: "_box_553ny_33",
|
|
839
|
+
icon: "_icon_553ny_64",
|
|
840
|
+
indicator: "_indicator_553ny_100"
|
|
841
841
|
};
|
|
842
842
|
//#endregion
|
|
843
843
|
//#region src/components/Checkbox.tsx
|
|
@@ -905,12 +905,12 @@ function Je({ label: e, items: t, value: n, onChange: r, disabled: i, ...a }) {
|
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
907
|
var Ye = {
|
|
908
|
-
radio: "
|
|
909
|
-
control: "
|
|
910
|
-
labelText: "
|
|
911
|
-
input: "
|
|
912
|
-
circle: "
|
|
913
|
-
dot: "
|
|
908
|
+
radio: "_radio_2lj6y_1",
|
|
909
|
+
control: "_control_2lj6y_8",
|
|
910
|
+
labelText: "_labelText_2lj6y_17",
|
|
911
|
+
input: "_input_2lj6y_25",
|
|
912
|
+
circle: "_circle_2lj6y_33",
|
|
913
|
+
dot: "_dot_2lj6y_64"
|
|
914
914
|
};
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region src/components/RadioButton.tsx
|
|
@@ -994,22 +994,22 @@ function $e({ checked: e, onChange: t, size: n = "base", label: r, ariaLabel: i,
|
|
|
994
994
|
});
|
|
995
995
|
}
|
|
996
996
|
var G = {
|
|
997
|
-
field: "
|
|
998
|
-
inputWrap: "
|
|
999
|
-
input: "
|
|
1000
|
-
toolbar: "
|
|
1001
|
-
errorWrap: "
|
|
1002
|
-
sm: "
|
|
1003
|
-
base: "
|
|
1004
|
-
icon: "
|
|
1005
|
-
helperText: "
|
|
1006
|
-
errorText: "
|
|
1007
|
-
trailing: "
|
|
1008
|
-
pickerChevron: "
|
|
1009
|
-
pickerChevronSm: "
|
|
1010
|
-
pickerInput: "
|
|
1011
|
-
shortcut: "
|
|
1012
|
-
kbd: "
|
|
997
|
+
field: "_field_19a7m_1",
|
|
998
|
+
inputWrap: "_inputWrap_19a7m_6",
|
|
999
|
+
input: "_input_19a7m_6",
|
|
1000
|
+
toolbar: "_toolbar_19a7m_14",
|
|
1001
|
+
errorWrap: "_errorWrap_19a7m_24",
|
|
1002
|
+
sm: "_sm_19a7m_71",
|
|
1003
|
+
base: "_base_19a7m_79",
|
|
1004
|
+
icon: "_icon_19a7m_87",
|
|
1005
|
+
helperText: "_helperText_19a7m_125",
|
|
1006
|
+
errorText: "_errorText_19a7m_130",
|
|
1007
|
+
trailing: "_trailing_19a7m_134",
|
|
1008
|
+
pickerChevron: "_pickerChevron_19a7m_165",
|
|
1009
|
+
pickerChevronSm: "_pickerChevronSm_19a7m_175",
|
|
1010
|
+
pickerInput: "_pickerInput_19a7m_182",
|
|
1011
|
+
shortcut: "_shortcut_19a7m_193",
|
|
1012
|
+
kbd: "_kbd_19a7m_201"
|
|
1013
1013
|
};
|
|
1014
1014
|
//#endregion
|
|
1015
1015
|
//#region src/components/TextField.tsx
|
|
@@ -1081,7 +1081,7 @@ function tt(e, t) {
|
|
|
1081
1081
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
1082
1082
|
}
|
|
1083
1083
|
function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "vertical", autoResize: a = !1, maxRows: o = 8, showCount: c = !1, id: l, className: f, ref: h, rows: g = 3, value: _, defaultValue: b, maxLength: x, disabled: S, readOnly: C, onChange: w, onInput: T, "aria-describedby": E, ...D }) {
|
|
1084
|
-
let O = u(), k = l ?? O, A = p(null), j = _ !== void 0, [M,
|
|
1084
|
+
let O = u(), k = l ?? O, A = p(null), j = _ !== void 0, [M, N] = m(() => String(b ?? "").length), P = j ? String(_).length : M, F = s(() => {
|
|
1085
1085
|
let e = A.current;
|
|
1086
1086
|
if (!e || !a) return;
|
|
1087
1087
|
let t = getComputedStyle(e), n = parseFloat(t.fontSize) || 14, r = parseFloat(t.lineHeight) || n * 1.4, i = (parseFloat(t.paddingTop) || 0) + (parseFloat(t.paddingBottom) || 0), s = r * o + i;
|
|
@@ -1090,9 +1090,9 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1090
1090
|
e.style.height = `${c}px`, e.style.overflowY = e.scrollHeight > s ? "auto" : "hidden";
|
|
1091
1091
|
}, [a, o]);
|
|
1092
1092
|
d(() => {
|
|
1093
|
-
|
|
1093
|
+
F();
|
|
1094
1094
|
}, [
|
|
1095
|
-
|
|
1095
|
+
F,
|
|
1096
1096
|
_,
|
|
1097
1097
|
g,
|
|
1098
1098
|
r
|
|
@@ -1100,28 +1100,28 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1100
1100
|
let e = A.current;
|
|
1101
1101
|
if (!a || !e || typeof ResizeObserver > "u") return;
|
|
1102
1102
|
let t = e.clientWidth, n = new ResizeObserver(() => {
|
|
1103
|
-
e.clientWidth !== t && (t = e.clientWidth,
|
|
1103
|
+
e.clientWidth !== t && (t = e.clientWidth, F());
|
|
1104
1104
|
});
|
|
1105
1105
|
return n.observe(e), () => n.disconnect();
|
|
1106
|
-
}, [a,
|
|
1106
|
+
}, [a, F]), d(() => {
|
|
1107
1107
|
let e = A.current;
|
|
1108
1108
|
!a && e && (e.style.height = "", e.style.overflowY = "");
|
|
1109
1109
|
}, [a]);
|
|
1110
|
-
let
|
|
1111
|
-
j ||
|
|
1112
|
-
},
|
|
1113
|
-
j || (
|
|
1114
|
-
},
|
|
1110
|
+
let I = (e) => {
|
|
1111
|
+
j || N(e.target.value.length), w?.(e);
|
|
1112
|
+
}, ee = (e) => {
|
|
1113
|
+
j || (N(e.currentTarget.value.length), F()), T?.(e);
|
|
1114
|
+
}, te = `${k}-helper`, L = `${k}-error`, R = `${k}-count`, z = [
|
|
1115
1115
|
E,
|
|
1116
|
-
n ?
|
|
1117
|
-
c ?
|
|
1118
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1116
|
+
n ? L : t ? te : null,
|
|
1117
|
+
c ? R : null
|
|
1118
|
+
].filter(Boolean).join(" ") || void 0, B = x ? P / x : 0, ne = B >= 1 ? K.countLimit : B >= .9 ? K.countNear : "", re = [
|
|
1119
1119
|
K.wrap,
|
|
1120
1120
|
K[r],
|
|
1121
1121
|
n ? K.errorWrap : "",
|
|
1122
1122
|
S ? K.disabled : "",
|
|
1123
1123
|
C ? K.readOnly : ""
|
|
1124
|
-
].filter(Boolean).join(" "),
|
|
1124
|
+
].filter(Boolean).join(" "), ie = a ? "none" : i;
|
|
1125
1125
|
return /* @__PURE__ */ y("div", {
|
|
1126
1126
|
className: [K.field, f].filter(Boolean).join(" "),
|
|
1127
1127
|
children: [
|
|
@@ -1130,14 +1130,14 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1130
1130
|
children: e
|
|
1131
1131
|
}),
|
|
1132
1132
|
/* @__PURE__ */ v("div", {
|
|
1133
|
-
className:
|
|
1133
|
+
className: re,
|
|
1134
1134
|
children: /* @__PURE__ */ v("textarea", {
|
|
1135
1135
|
...D,
|
|
1136
1136
|
ref: (e) => {
|
|
1137
1137
|
A.current = e, tt(h, e);
|
|
1138
1138
|
},
|
|
1139
1139
|
id: k,
|
|
1140
|
-
className: `${K.textarea} ${K[`resize-${
|
|
1140
|
+
className: `${K.textarea} ${K[`resize-${ie}`]}`,
|
|
1141
1141
|
rows: g,
|
|
1142
1142
|
value: _,
|
|
1143
1143
|
defaultValue: b,
|
|
@@ -1145,25 +1145,25 @@ function nt({ label: e, helperText: t, error: n, size: r = "base", resize: i = "
|
|
|
1145
1145
|
disabled: S,
|
|
1146
1146
|
readOnly: C,
|
|
1147
1147
|
"aria-invalid": n ? !0 : D["aria-invalid"],
|
|
1148
|
-
"aria-describedby":
|
|
1149
|
-
onChange:
|
|
1150
|
-
onInput:
|
|
1148
|
+
"aria-describedby": z,
|
|
1149
|
+
onChange: I,
|
|
1150
|
+
onInput: ee
|
|
1151
1151
|
})
|
|
1152
1152
|
}),
|
|
1153
1153
|
(n || t || c) && /* @__PURE__ */ y("div", {
|
|
1154
1154
|
className: K.footer,
|
|
1155
1155
|
children: [n ? /* @__PURE__ */ v("span", {
|
|
1156
|
-
id:
|
|
1156
|
+
id: L,
|
|
1157
1157
|
className: K.errorText,
|
|
1158
1158
|
children: n
|
|
1159
1159
|
}) : t ? /* @__PURE__ */ v("span", {
|
|
1160
|
-
id:
|
|
1160
|
+
id: te,
|
|
1161
1161
|
className: K.helperText,
|
|
1162
1162
|
children: t
|
|
1163
1163
|
}) : null, c && /* @__PURE__ */ v("span", {
|
|
1164
|
-
id:
|
|
1165
|
-
className: `${K.count} ${
|
|
1166
|
-
children: x ? `${
|
|
1164
|
+
id: R,
|
|
1165
|
+
className: `${K.count} ${ne}`,
|
|
1166
|
+
children: x ? `${P} / ${x}` : P
|
|
1167
1167
|
})]
|
|
1168
1168
|
})
|
|
1169
1169
|
]
|
|
@@ -1300,22 +1300,22 @@ function gt(e, t, n) {
|
|
|
1300
1300
|
return i;
|
|
1301
1301
|
}
|
|
1302
1302
|
var q = {
|
|
1303
|
-
calendar: "
|
|
1304
|
-
header: "
|
|
1305
|
-
navButton: "
|
|
1306
|
-
title: "
|
|
1307
|
-
grid: "
|
|
1308
|
-
row: "
|
|
1309
|
-
weekday: "
|
|
1310
|
-
day: "
|
|
1311
|
-
selected: "
|
|
1312
|
-
disabled: "
|
|
1313
|
-
outside: "
|
|
1314
|
-
today: "
|
|
1315
|
-
inRange: "
|
|
1316
|
-
rangeStart: "
|
|
1317
|
-
rangeEnd: "
|
|
1318
|
-
hiddenDay: "
|
|
1303
|
+
calendar: "_calendar_1mr3c_1",
|
|
1304
|
+
header: "_header_1mr3c_7",
|
|
1305
|
+
navButton: "_navButton_1mr3c_13",
|
|
1306
|
+
title: "_title_1mr3c_21",
|
|
1307
|
+
grid: "_grid_1mr3c_27",
|
|
1308
|
+
row: "_row_1mr3c_32",
|
|
1309
|
+
weekday: "_weekday_1mr3c_36",
|
|
1310
|
+
day: "_day_1mr3c_45",
|
|
1311
|
+
selected: "_selected_1mr3c_62",
|
|
1312
|
+
disabled: "_disabled_1mr3c_62",
|
|
1313
|
+
outside: "_outside_1mr3c_69",
|
|
1314
|
+
today: "_today_1mr3c_72",
|
|
1315
|
+
inRange: "_inRange_1mr3c_85",
|
|
1316
|
+
rangeStart: "_rangeStart_1mr3c_92",
|
|
1317
|
+
rangeEnd: "_rangeEnd_1mr3c_96",
|
|
1318
|
+
hiddenDay: "_hiddenDay_1mr3c_100"
|
|
1319
1319
|
}, _t = (e) => `${e.getFullYear()}-${e.getMonth() + 1}-${e.getDate()}`;
|
|
1320
1320
|
function vt(e, t) {
|
|
1321
1321
|
let n = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
@@ -1329,15 +1329,15 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1329
1329
|
w !== T && (E(w), _ && (S.getFullYear() !== _.getFullYear() || S.getMonth() !== _.getMonth()) && C(vt(_, S.getDate())));
|
|
1330
1330
|
let D = e ? _t(e) : null, [O, A] = m(D);
|
|
1331
1331
|
D !== O && (A(D), e && C(ft(e, n, r)));
|
|
1332
|
-
let j = p(null), M = p(!!o),
|
|
1332
|
+
let j = p(null), M = p(!!o), N = u();
|
|
1333
1333
|
l(() => {
|
|
1334
1334
|
M.current && (M.current = !1, j.current?.querySelector(`[data-date="${_t(S)}"]`)?.focus());
|
|
1335
1335
|
}, [S]);
|
|
1336
|
-
let
|
|
1337
|
-
N,
|
|
1336
|
+
let P = S.getFullYear(), F = S.getMonth(), I = f(() => gt(P, F, a), [
|
|
1338
1337
|
P,
|
|
1338
|
+
F,
|
|
1339
1339
|
a
|
|
1340
|
-
]),
|
|
1340
|
+
]), ee = at(/* @__PURE__ */ new Date()), te = !!(h?.start && h.end && ut(h.start, h.end) > 0), L = te ? h.end : h?.start ?? null, R = te ? h.start : h?.end ?? null, z = !!(L && R && ut(L, R) !== 0), B = f(() => ({
|
|
1341
1341
|
title: new Intl.DateTimeFormat(i, {
|
|
1342
1342
|
month: "long",
|
|
1343
1343
|
year: "numeric"
|
|
@@ -1345,21 +1345,21 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1345
1345
|
short: new Intl.DateTimeFormat(i, { weekday: "short" }),
|
|
1346
1346
|
long: new Intl.DateTimeFormat(i, { weekday: "long" }),
|
|
1347
1347
|
full: new Intl.DateTimeFormat(i, { dateStyle: "full" })
|
|
1348
|
-
}), [i]), re =
|
|
1349
|
-
short: yt(
|
|
1350
|
-
long:
|
|
1351
|
-
})), ie = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < at(n), ae = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > at(r), oe = ie(S),
|
|
1352
|
-
function
|
|
1348
|
+
}), [i]), ne = h ? I.filter((e) => e.some((e) => e.inMonth)) : I, re = I[0].map(({ date: e }) => ({
|
|
1349
|
+
short: yt(B.short.format(e), i).slice(0, 2),
|
|
1350
|
+
long: B.long.format(e)
|
|
1351
|
+
})), ie = (e) => !!n && new Date(e.getFullYear(), e.getMonth(), 0) < at(n), ae = (e) => !!r && new Date(e.getFullYear(), e.getMonth() + 1, 1) > at(r), oe = ie(S), V = ae(S);
|
|
1352
|
+
function H(e) {
|
|
1353
1353
|
b && (e.getFullYear() !== S.getFullYear() || e.getMonth() !== S.getMonth()) && b(e), C(e);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
M.current = !0,
|
|
1355
|
+
function se(e) {
|
|
1356
|
+
M.current = !0, H(ft(e, n, r));
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function U(e) {
|
|
1359
1359
|
let t = ft(ct(S, e), n, r);
|
|
1360
|
-
M.current = e < 0 ? ie(t) : ae(t),
|
|
1360
|
+
M.current = e < 0 ? ie(t) : ae(t), H(t);
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function ce(e) {
|
|
1363
1363
|
let t = null;
|
|
1364
1364
|
switch (e.key) {
|
|
1365
1365
|
case "ArrowLeft":
|
|
@@ -1385,11 +1385,11 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1385
1385
|
break;
|
|
1386
1386
|
case "End": t = mt(S, a);
|
|
1387
1387
|
}
|
|
1388
|
-
t && (e.preventDefault(),
|
|
1388
|
+
t && (e.preventDefault(), se(t));
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function le(e) {
|
|
1391
1391
|
let n = at(e);
|
|
1392
|
-
|
|
1392
|
+
H(n), t(n);
|
|
1393
1393
|
}
|
|
1394
1394
|
return /* @__PURE__ */ y("div", {
|
|
1395
1395
|
className: [q.calendar, d].filter(Boolean).join(" "),
|
|
@@ -1403,13 +1403,13 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1403
1403
|
leadingIcon: /* @__PURE__ */ v(pe, {}),
|
|
1404
1404
|
"aria-label": s,
|
|
1405
1405
|
disabled: oe,
|
|
1406
|
-
onClick: () =>
|
|
1406
|
+
onClick: () => U(-1)
|
|
1407
1407
|
}),
|
|
1408
1408
|
/* @__PURE__ */ v("div", {
|
|
1409
|
-
id:
|
|
1409
|
+
id: N,
|
|
1410
1410
|
className: q.title,
|
|
1411
1411
|
"aria-live": "polite",
|
|
1412
|
-
children: yt(
|
|
1412
|
+
children: yt(B.title.format(S), i)
|
|
1413
1413
|
}),
|
|
1414
1414
|
x === "next" ? /* @__PURE__ */ v("span", {}) : /* @__PURE__ */ v(k, {
|
|
1415
1415
|
variant: "tertiary",
|
|
@@ -1417,16 +1417,16 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1417
1417
|
className: q.navButton,
|
|
1418
1418
|
leadingIcon: /* @__PURE__ */ v(he, {}),
|
|
1419
1419
|
"aria-label": c,
|
|
1420
|
-
disabled:
|
|
1421
|
-
onClick: () =>
|
|
1420
|
+
disabled: V,
|
|
1421
|
+
onClick: () => U(1)
|
|
1422
1422
|
})
|
|
1423
1423
|
]
|
|
1424
1424
|
}), /* @__PURE__ */ y("div", {
|
|
1425
1425
|
ref: j,
|
|
1426
1426
|
role: "grid",
|
|
1427
|
-
"aria-labelledby":
|
|
1427
|
+
"aria-labelledby": N,
|
|
1428
1428
|
className: q.grid,
|
|
1429
|
-
onKeyDown:
|
|
1429
|
+
onKeyDown: ce,
|
|
1430
1430
|
onMouseLeave: g ? () => g(null) : void 0,
|
|
1431
1431
|
children: [/* @__PURE__ */ v("div", {
|
|
1432
1432
|
role: "row",
|
|
@@ -1437,11 +1437,11 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1437
1437
|
className: q.weekday,
|
|
1438
1438
|
children: e.short
|
|
1439
1439
|
}, e.long))
|
|
1440
|
-
}),
|
|
1440
|
+
}), ne.map((t) => /* @__PURE__ */ v("div", {
|
|
1441
1441
|
role: "row",
|
|
1442
1442
|
className: q.row,
|
|
1443
1443
|
children: t.map(({ date: t, inMonth: i }) => {
|
|
1444
|
-
let a = dt(t, n, r), o = !!
|
|
1444
|
+
let a = dt(t, n, r), o = !!L && lt(t, L), s = !!R && lt(t, R), c = !!(L && R) && ut(t, L) > 0 && ut(t, R) < 0, l = h ? o || s : !!e && lt(t, e), u = !!h && !i, d = lt(t, ee);
|
|
1445
1445
|
return /* @__PURE__ */ v("button", {
|
|
1446
1446
|
type: "button",
|
|
1447
1447
|
role: "gridcell",
|
|
@@ -1451,20 +1451,20 @@ function bt({ value: e, onChange: t, minDate: n, maxDate: r, locale: i = "en", w
|
|
|
1451
1451
|
"aria-hidden": u || void 0,
|
|
1452
1452
|
"aria-disabled": a || void 0,
|
|
1453
1453
|
"aria-current": d ? "date" : void 0,
|
|
1454
|
-
"aria-label":
|
|
1454
|
+
"aria-label": B.full.format(t),
|
|
1455
1455
|
className: [
|
|
1456
1456
|
q.day,
|
|
1457
1457
|
!i && q.outside,
|
|
1458
1458
|
u && q.hiddenDay,
|
|
1459
1459
|
c && q.inRange,
|
|
1460
|
-
|
|
1461
|
-
|
|
1460
|
+
z && o && q.rangeStart,
|
|
1461
|
+
z && s && q.rangeEnd,
|
|
1462
1462
|
d && q.today,
|
|
1463
1463
|
l && q.selected,
|
|
1464
1464
|
a && q.disabled
|
|
1465
1465
|
].filter(Boolean).join(" "),
|
|
1466
1466
|
onMouseDown: a ? (e) => e.preventDefault() : void 0,
|
|
1467
|
-
onClick: a || u ? void 0 : () =>
|
|
1467
|
+
onClick: a || u ? void 0 : () => le(t),
|
|
1468
1468
|
onMouseEnter: g && !u ? () => g(t) : void 0,
|
|
1469
1469
|
onFocus: g && !u ? () => g(t) : void 0,
|
|
1470
1470
|
children: t.getDate()
|
|
@@ -1536,10 +1536,10 @@ var wt = { popup: "_popup_eco0g_1" };
|
|
|
1536
1536
|
//#endregion
|
|
1537
1537
|
//#region src/components/DatePicker.tsx
|
|
1538
1538
|
function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale: a = "en", weekStartsOn: o = 0, formatValue: c, placement: l = "bottom-start", label: d, helperText: h, error: b, size: x, openLabel: S, placeholder: C, dialogLabel: w = "Choose date", className: T, id: E }) {
|
|
1539
|
-
let [D, O] = m(!1), k = p(null), A = p(null), j = u(), M = D && !i,
|
|
1539
|
+
let [D, O] = m(!1), k = p(null), A = p(null), j = u(), M = D && !i, N = f(() => new Intl.DateTimeFormat(a, {
|
|
1540
1540
|
month: "short",
|
|
1541
1541
|
day: "2-digit"
|
|
1542
|
-
}), [a]),
|
|
1542
|
+
}), [a]), P = e ? c ? c(e) : N.format(e) : "";
|
|
1543
1543
|
Ct({
|
|
1544
1544
|
isOpen: M,
|
|
1545
1545
|
popupRef: A,
|
|
@@ -1549,10 +1549,10 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1549
1549
|
O(!1), e && k.current?.focus();
|
|
1550
1550
|
}, [])
|
|
1551
1551
|
});
|
|
1552
|
-
function
|
|
1552
|
+
function F(e) {
|
|
1553
1553
|
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), i || O(!0));
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function I(e) {
|
|
1556
1556
|
t(e), O(!1), k.current?.focus();
|
|
1557
1557
|
}
|
|
1558
1558
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(it, {
|
|
@@ -1566,13 +1566,13 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1566
1566
|
openLabel: S,
|
|
1567
1567
|
placeholder: C,
|
|
1568
1568
|
disabled: i,
|
|
1569
|
-
value:
|
|
1569
|
+
value: P,
|
|
1570
1570
|
role: "combobox",
|
|
1571
1571
|
"aria-haspopup": "dialog",
|
|
1572
1572
|
"aria-expanded": M,
|
|
1573
1573
|
"aria-controls": M ? j : void 0,
|
|
1574
1574
|
onClick: () => !i && O((e) => !e),
|
|
1575
|
-
onKeyDown:
|
|
1575
|
+
onKeyDown: F
|
|
1576
1576
|
}), M && g(/* @__PURE__ */ v("div", {
|
|
1577
1577
|
ref: A,
|
|
1578
1578
|
id: j,
|
|
@@ -1582,7 +1582,7 @@ function Tt({ value: e, onChange: t, minDate: n, maxDate: r, disabled: i, locale
|
|
|
1582
1582
|
children: /* @__PURE__ */ v(bt, {
|
|
1583
1583
|
autoFocus: !0,
|
|
1584
1584
|
value: e,
|
|
1585
|
-
onChange:
|
|
1585
|
+
onChange: I,
|
|
1586
1586
|
minDate: n,
|
|
1587
1587
|
maxDate: r,
|
|
1588
1588
|
locale: a,
|
|
@@ -1686,74 +1686,74 @@ function Lt(e, t, n, r) {
|
|
|
1686
1686
|
return r && (i = ct(i, -1)), t && ut(i, Ft(t)) < 0 && (i = Ft(t)), i;
|
|
1687
1687
|
}
|
|
1688
1688
|
function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], activePresetId: a, disabled: o, loading: c, locale: l = "en", weekStartsOn: d = 0, formatValue: h, placement: b = "bottom-start", size: x = "base", label: S, helperText: C, error: w, placeholder: T = "Select period", openLabel: E = "Choose period", dialogLabel: D = "Choose period", applyLabel: O = "Apply", cancelLabel: A = "Cancel", className: j, id: M }) {
|
|
1689
|
-
let [
|
|
1689
|
+
let [N, P] = m(!1), [F, I] = m({
|
|
1690
1690
|
start: null,
|
|
1691
1691
|
end: null
|
|
1692
|
-
}), [
|
|
1692
|
+
}), [ee, te] = m(null), [L, R] = m(() => Lt(e, n, r, !0)), [z, B] = m(() => at(/* @__PURE__ */ new Date())), ne = p(null), re = p(null), ie = u(), ae = M ?? ie, oe = u(), V = Pt(Nt), H = N && !o && !c, se = a ? i.find((e) => e.id === a) : void 0, U = (e, t) => e && t ? ut(e, t) === 0 : e === t, le = H && !!F.start && !(U(F.start, e.start) && U(F.end, e.end)), W = f(() => le ? Mt(F, {
|
|
1693
1693
|
locale: l,
|
|
1694
1694
|
formatValue: h
|
|
1695
|
-
}) :
|
|
1695
|
+
}) : se?.label ?? Mt(e, {
|
|
1696
1696
|
locale: l,
|
|
1697
1697
|
formatValue: h
|
|
1698
1698
|
}), [
|
|
1699
1699
|
le,
|
|
1700
|
-
|
|
1701
|
-
|
|
1700
|
+
F,
|
|
1701
|
+
se,
|
|
1702
1702
|
e,
|
|
1703
1703
|
l,
|
|
1704
1704
|
h
|
|
1705
|
-
]), ue = s(() =>
|
|
1706
|
-
|
|
1705
|
+
]), ue = s(() => ne.current, []), fe = s((e) => {
|
|
1706
|
+
P(!1), e && ne.current?.focus();
|
|
1707
1707
|
}, []);
|
|
1708
1708
|
Ct({
|
|
1709
|
-
isOpen:
|
|
1710
|
-
popupRef:
|
|
1709
|
+
isOpen: H,
|
|
1710
|
+
popupRef: re,
|
|
1711
1711
|
getAnchor: ue,
|
|
1712
1712
|
placement: b,
|
|
1713
1713
|
onClose: fe,
|
|
1714
|
-
layoutKey:
|
|
1714
|
+
layoutKey: `${V}-${L.getTime()}`
|
|
1715
1715
|
});
|
|
1716
1716
|
function pe() {
|
|
1717
|
-
o || c || (
|
|
1717
|
+
o || c || (I({
|
|
1718
1718
|
start: e.start,
|
|
1719
1719
|
end: e.end
|
|
1720
|
-
}),
|
|
1720
|
+
}), te(null), R(Lt(e, n, r, V)), B(e.end ?? e.start ?? at(/* @__PURE__ */ new Date())), P(!0));
|
|
1721
1721
|
}
|
|
1722
1722
|
function me() {
|
|
1723
|
-
|
|
1723
|
+
H ? fe(!1) : pe();
|
|
1724
1724
|
}
|
|
1725
1725
|
function he(e) {
|
|
1726
|
-
e.key === "ArrowDown" && !
|
|
1726
|
+
e.key === "ArrowDown" && !H && (e.preventDefault(), pe());
|
|
1727
1727
|
}
|
|
1728
1728
|
function ge(e) {
|
|
1729
1729
|
t(e.range()), fe(!0);
|
|
1730
1730
|
}
|
|
1731
1731
|
function _e() {
|
|
1732
|
-
Ot(
|
|
1733
|
-
start:
|
|
1734
|
-
end:
|
|
1732
|
+
Ot(F) && (t({
|
|
1733
|
+
start: F.start,
|
|
1734
|
+
end: F.end
|
|
1735
1735
|
}), fe(!0));
|
|
1736
1736
|
}
|
|
1737
|
-
let ve = (e) => (t) =>
|
|
1738
|
-
value:
|
|
1739
|
-
onChange: (e) =>
|
|
1737
|
+
let ve = (e) => (t) => R(ct(Ft(t), -e)), ye = At(F, ee), be = ct(L, 1), xe = V && It(z, be), Se = {
|
|
1738
|
+
value: z,
|
|
1739
|
+
onChange: (e) => I((t) => kt(t, e)),
|
|
1740
1740
|
minDate: n,
|
|
1741
1741
|
maxDate: r,
|
|
1742
1742
|
locale: l,
|
|
1743
1743
|
weekStartsOn: d,
|
|
1744
1744
|
range: ye,
|
|
1745
|
-
onDayHover:
|
|
1745
|
+
onDayHover: te
|
|
1746
1746
|
}, Ce = i.length > 0;
|
|
1747
1747
|
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
|
|
1748
1748
|
className: [J.field, j].filter(Boolean).join(" "),
|
|
1749
1749
|
children: [
|
|
1750
1750
|
S && /* @__PURE__ */ v(Le, {
|
|
1751
|
-
htmlFor:
|
|
1751
|
+
htmlFor: ae,
|
|
1752
1752
|
children: S
|
|
1753
1753
|
}),
|
|
1754
1754
|
/* @__PURE__ */ y("button", {
|
|
1755
|
-
ref:
|
|
1756
|
-
id:
|
|
1755
|
+
ref: ne,
|
|
1756
|
+
id: ae,
|
|
1757
1757
|
type: "button",
|
|
1758
1758
|
className: [
|
|
1759
1759
|
J.trigger,
|
|
@@ -1763,8 +1763,8 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1763
1763
|
disabled: o || c,
|
|
1764
1764
|
"aria-label": S ? void 0 : E,
|
|
1765
1765
|
"aria-haspopup": "dialog",
|
|
1766
|
-
"aria-expanded":
|
|
1767
|
-
"aria-controls":
|
|
1766
|
+
"aria-expanded": H,
|
|
1767
|
+
"aria-controls": H ? oe : void 0,
|
|
1768
1768
|
"aria-busy": c || void 0,
|
|
1769
1769
|
onClick: me,
|
|
1770
1770
|
onKeyDown: he,
|
|
@@ -1785,7 +1785,7 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1785
1785
|
children: W || T
|
|
1786
1786
|
}),
|
|
1787
1787
|
/* @__PURE__ */ v("span", {
|
|
1788
|
-
className: [J.chevron,
|
|
1788
|
+
className: [J.chevron, H && J.chevronOpen].filter(Boolean).join(" "),
|
|
1789
1789
|
"aria-hidden": !0,
|
|
1790
1790
|
children: /* @__PURE__ */ v(de, {})
|
|
1791
1791
|
})
|
|
@@ -1799,9 +1799,9 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1799
1799
|
children: C
|
|
1800
1800
|
}) : null
|
|
1801
1801
|
]
|
|
1802
|
-
}),
|
|
1803
|
-
ref:
|
|
1804
|
-
id:
|
|
1802
|
+
}), H && g(/* @__PURE__ */ y("div", {
|
|
1803
|
+
ref: re,
|
|
1804
|
+
id: oe,
|
|
1805
1805
|
role: "dialog",
|
|
1806
1806
|
"aria-label": D,
|
|
1807
1807
|
className: J.popup,
|
|
@@ -1825,11 +1825,11 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1825
1825
|
children: /* @__PURE__ */ v(bt, {
|
|
1826
1826
|
...Se,
|
|
1827
1827
|
autoFocus: !xe,
|
|
1828
|
-
month:
|
|
1828
|
+
month: L,
|
|
1829
1829
|
onMonthChange: ve(0),
|
|
1830
|
-
hideNavigation:
|
|
1830
|
+
hideNavigation: V ? "next" : void 0
|
|
1831
1831
|
})
|
|
1832
|
-
}),
|
|
1832
|
+
}), V && /* @__PURE__ */ v("div", {
|
|
1833
1833
|
className: J.month,
|
|
1834
1834
|
children: /* @__PURE__ */ v(bt, {
|
|
1835
1835
|
...Se,
|
|
@@ -1849,7 +1849,7 @@ function Rt({ value: e, onChange: t, minDate: n, maxDate: r, presets: i = [], ac
|
|
|
1849
1849
|
}), /* @__PURE__ */ v(k, {
|
|
1850
1850
|
variant: "primary",
|
|
1851
1851
|
size: "sm",
|
|
1852
|
-
disabled: !Ot(
|
|
1852
|
+
disabled: !Ot(F),
|
|
1853
1853
|
onClick: _e,
|
|
1854
1854
|
children: O
|
|
1855
1855
|
})]
|
|
@@ -2022,7 +2022,7 @@ function qt(e) {
|
|
|
2022
2022
|
}
|
|
2023
2023
|
var Jt = (e) => `and ${e} more`;
|
|
2024
2024
|
function Yt(e) {
|
|
2025
|
-
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: c = "base", placeholder: f = "Select…", options: h, disabled: g, searchable: b, searchPlaceholder: x = "Search…", noResultsText: S = "No matches", defaultOpen: C = !1, autoFocus: w, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, A = e.multiple === !0, [j, M] = m(C), [
|
|
2025
|
+
let { variant: t = "field", triggerLabel: n, menuAlign: r = "start", label: i, helperText: a, error: o, size: c = "base", placeholder: f = "Select…", options: h, disabled: g, searchable: b, searchPlaceholder: x = "Search…", noResultsText: S = "No matches", defaultOpen: C = !1, autoFocus: w, className: T, labelClassName: E, "aria-label": D, "data-testid": O } = e, A = e.multiple === !0, [j, M] = m(C), [N, P] = m(C), [F, I] = m(""), [ee, te] = m(!1), [L, R] = m(null), z = p(null), B = p(null), ne = p(null), re = p(null), ie = s((e) => {
|
|
2026
2026
|
if (!e) return;
|
|
2027
2027
|
let t = () => e.toggleAttribute("data-scrollable", e.scrollHeight > e.clientHeight);
|
|
2028
2028
|
t();
|
|
@@ -2033,39 +2033,39 @@ function Yt(e) {
|
|
|
2033
2033
|
return r.observe(e, { childList: !0 }), () => {
|
|
2034
2034
|
n.disconnect(), r.disconnect();
|
|
2035
2035
|
};
|
|
2036
|
-
}, []),
|
|
2036
|
+
}, []), ae = u(), oe = u(), V = e.multiple ? void 0 : e.value, H = e.multiple && e.value || [], se = H.map((e) => h.find((t) => t.value === e)).filter((e) => e !== void 0), U = A ? void 0 : h.find((e) => e.value === V), ce = F.trim().toLowerCase(), le = b && ce ? h.filter((e) => Kt(e).toLowerCase().includes(ce)) : h, W = le.filter((e) => !e.disabled).map((e) => e.value), ue = t === "field";
|
|
2037
2037
|
function fe() {
|
|
2038
|
-
|
|
2038
|
+
P(!0), M(!0);
|
|
2039
2039
|
}
|
|
2040
2040
|
function pe() {
|
|
2041
|
-
M(!1),
|
|
2041
|
+
M(!1), I("");
|
|
2042
2042
|
}
|
|
2043
2043
|
l(() => {
|
|
2044
2044
|
if (!j) return;
|
|
2045
2045
|
if (b) {
|
|
2046
|
-
|
|
2046
|
+
re.current?.focus();
|
|
2047
2047
|
return;
|
|
2048
2048
|
}
|
|
2049
|
-
let e = (A ?
|
|
2050
|
-
(
|
|
2049
|
+
let e = (A ? se.find((e) => !e.disabled)?.value : V) ?? W[0];
|
|
2050
|
+
(z.current?.querySelector(`[data-value="${e}"]`))?.focus();
|
|
2051
2051
|
}, [j]), d(() => {
|
|
2052
|
-
if (!j || !
|
|
2053
|
-
let e =
|
|
2054
|
-
|
|
2052
|
+
if (!j || !ne.current || !z.current) return;
|
|
2053
|
+
let e = z.current.getBoundingClientRect(), t = ne.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
|
|
2054
|
+
te(n < t + 8 && r > n);
|
|
2055
2055
|
}, [j]), l(() => {
|
|
2056
2056
|
if (!j) return;
|
|
2057
2057
|
function e(e) {
|
|
2058
|
-
|
|
2058
|
+
z.current?.contains(e.target) || pe();
|
|
2059
2059
|
}
|
|
2060
2060
|
function t(e) {
|
|
2061
|
-
e.key === "Escape" && (pe(),
|
|
2061
|
+
e.key === "Escape" && (pe(), B.current?.focus()), e.key === "Tab" && A && pe();
|
|
2062
2062
|
}
|
|
2063
2063
|
return window.addEventListener("pointerdown", e), window.addEventListener("keydown", t), () => {
|
|
2064
2064
|
window.removeEventListener("pointerdown", e), window.removeEventListener("keydown", t);
|
|
2065
2065
|
};
|
|
2066
2066
|
}, [j, A]);
|
|
2067
2067
|
function me(e) {
|
|
2068
|
-
e !== void 0 &&
|
|
2068
|
+
e !== void 0 && z.current?.querySelector(`[data-value="${e}"]`)?.focus();
|
|
2069
2069
|
}
|
|
2070
2070
|
function he(e) {
|
|
2071
2071
|
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), fe());
|
|
@@ -2079,7 +2079,7 @@ function Yt(e) {
|
|
|
2079
2079
|
let r = null;
|
|
2080
2080
|
if (e.key === "ArrowDown" && (r = (n + 1) % W.length), e.key === "ArrowUp") {
|
|
2081
2081
|
if (b && n === 0) {
|
|
2082
|
-
e.preventDefault(),
|
|
2082
|
+
e.preventDefault(), re.current?.focus();
|
|
2083
2083
|
return;
|
|
2084
2084
|
}
|
|
2085
2085
|
r = (n - 1 + W.length) % W.length;
|
|
@@ -2087,7 +2087,7 @@ function Yt(e) {
|
|
|
2087
2087
|
e.key === "Home" && (r = 0), e.key === "End" && (r = W.length - 1), r !== null && (e.preventDefault(), me(W[r]));
|
|
2088
2088
|
}
|
|
2089
2089
|
function ve(e) {
|
|
2090
|
-
|
|
2090
|
+
R((t) => ({
|
|
2091
2091
|
top: e.offsetTop,
|
|
2092
2092
|
height: e.offsetHeight,
|
|
2093
2093
|
instant: !t
|
|
@@ -2099,22 +2099,22 @@ function Yt(e) {
|
|
|
2099
2099
|
e.onChange(n.includes(t) ? n.filter((e) => e !== t) : [...n, t]);
|
|
2100
2100
|
return;
|
|
2101
2101
|
}
|
|
2102
|
-
e.onChange(t), pe(),
|
|
2102
|
+
e.onChange(t), pe(), B.current?.focus();
|
|
2103
2103
|
}
|
|
2104
2104
|
function be() {
|
|
2105
|
-
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(
|
|
2106
|
-
let t =
|
|
2107
|
-
if (
|
|
2105
|
+
if (e.multiple && e.renderTriggerLabel) return e.renderTriggerLabel(se);
|
|
2106
|
+
let t = se[0];
|
|
2107
|
+
if (se.length === 1) return t.label;
|
|
2108
2108
|
let n = qt(t);
|
|
2109
|
-
return n === void 0 ? `${
|
|
2109
|
+
return n === void 0 ? `${se.length} selected` : `${n} ${(e.multiple && e.moreText || Jt)(se.length - 1)}`;
|
|
2110
2110
|
}
|
|
2111
|
-
let xe = n === void 0 && (A ?
|
|
2111
|
+
let xe = n === void 0 && (A ? se.length === 0 : !U), Se = A && e.triggerPrefix ? /* @__PURE__ */ y("span", {
|
|
2112
2112
|
className: Y.prefix,
|
|
2113
2113
|
children: [e.triggerPrefix, " "]
|
|
2114
2114
|
}) : null, Ce = n ?? (xe ? f : A ? be() : U?.label), we = /* @__PURE__ */ y(_, { children: [Se, Ce] }), Te = {
|
|
2115
2115
|
"aria-haspopup": "listbox",
|
|
2116
2116
|
"aria-expanded": j,
|
|
2117
|
-
"aria-controls": j ?
|
|
2117
|
+
"aria-controls": j ? oe : void 0,
|
|
2118
2118
|
"aria-label": i ? void 0 : D,
|
|
2119
2119
|
autoFocus: w,
|
|
2120
2120
|
disabled: g,
|
|
@@ -2123,17 +2123,17 @@ function Yt(e) {
|
|
|
2123
2123
|
};
|
|
2124
2124
|
return /* @__PURE__ */ y("div", {
|
|
2125
2125
|
className: [ue ? Y.field : Y.fieldInline, T].filter(Boolean).join(" "),
|
|
2126
|
-
ref:
|
|
2126
|
+
ref: z,
|
|
2127
2127
|
"data-testid": O,
|
|
2128
2128
|
children: [
|
|
2129
2129
|
ue && i && /* @__PURE__ */ v(Le, {
|
|
2130
|
-
htmlFor:
|
|
2130
|
+
htmlFor: ae,
|
|
2131
2131
|
className: E,
|
|
2132
2132
|
children: i
|
|
2133
2133
|
}),
|
|
2134
2134
|
ue ? /* @__PURE__ */ y("button", {
|
|
2135
|
-
ref:
|
|
2136
|
-
id:
|
|
2135
|
+
ref: B,
|
|
2136
|
+
id: ae,
|
|
2137
2137
|
type: "button",
|
|
2138
2138
|
role: "combobox",
|
|
2139
2139
|
className: `${Y.trigger} ${Y[c]} ${o ? Y.errorWrap : ""}`,
|
|
@@ -2153,8 +2153,8 @@ function Yt(e) {
|
|
|
2153
2153
|
})
|
|
2154
2154
|
]
|
|
2155
2155
|
}) : t === "pill" ? /* @__PURE__ */ y("button", {
|
|
2156
|
-
ref:
|
|
2157
|
-
id:
|
|
2156
|
+
ref: B,
|
|
2157
|
+
id: ae,
|
|
2158
2158
|
type: "button",
|
|
2159
2159
|
className: Y.pillTrigger,
|
|
2160
2160
|
...Te,
|
|
@@ -2170,8 +2170,8 @@ function Yt(e) {
|
|
|
2170
2170
|
})
|
|
2171
2171
|
]
|
|
2172
2172
|
}) : /* @__PURE__ */ v(k, {
|
|
2173
|
-
ref:
|
|
2174
|
-
id:
|
|
2173
|
+
ref: B,
|
|
2174
|
+
id: ae,
|
|
2175
2175
|
variant: t,
|
|
2176
2176
|
size: c,
|
|
2177
2177
|
className: c === "base" ? Y.buttonTriggerBase : void 0,
|
|
@@ -2183,53 +2183,53 @@ function Yt(e) {
|
|
|
2183
2183
|
...Te,
|
|
2184
2184
|
children: we
|
|
2185
2185
|
}),
|
|
2186
|
-
|
|
2187
|
-
ref:
|
|
2186
|
+
N && /* @__PURE__ */ v("div", {
|
|
2187
|
+
ref: ne,
|
|
2188
2188
|
className: [
|
|
2189
2189
|
Y.menuWrap,
|
|
2190
2190
|
!ue && Y.menuWrapAuto,
|
|
2191
2191
|
!ue && A && Y.menuWrapMultiple,
|
|
2192
2192
|
!ue && r === "end" && Y.menuWrapEnd,
|
|
2193
|
-
|
|
2193
|
+
ee && Y.menuWrapUp,
|
|
2194
2194
|
!j && Y.menuWrapClosing
|
|
2195
2195
|
].filter(Boolean).join(" "),
|
|
2196
2196
|
onAnimationEnd: (e) => {
|
|
2197
|
-
j || e.target !== e.currentTarget || (
|
|
2197
|
+
j || e.target !== e.currentTarget || (P(!1), te(!1));
|
|
2198
2198
|
},
|
|
2199
2199
|
children: /* @__PURE__ */ y(Ht, {
|
|
2200
2200
|
role: "presentation",
|
|
2201
2201
|
style: ue ? { width: "100%" } : void 0,
|
|
2202
2202
|
children: [b && /* @__PURE__ */ v("input", {
|
|
2203
|
-
ref:
|
|
2203
|
+
ref: re,
|
|
2204
2204
|
type: "text",
|
|
2205
2205
|
className: Y.search,
|
|
2206
|
-
value:
|
|
2206
|
+
value: F,
|
|
2207
2207
|
placeholder: x,
|
|
2208
2208
|
"aria-label": x,
|
|
2209
|
-
"aria-controls":
|
|
2209
|
+
"aria-controls": oe,
|
|
2210
2210
|
autoComplete: "off",
|
|
2211
2211
|
spellCheck: !1,
|
|
2212
2212
|
onChange: (e) => {
|
|
2213
|
-
|
|
2213
|
+
I(e.target.value), R(null);
|
|
2214
2214
|
},
|
|
2215
2215
|
onKeyDown: ge
|
|
2216
2216
|
}), /* @__PURE__ */ y("div", {
|
|
2217
|
-
id:
|
|
2217
|
+
id: oe,
|
|
2218
2218
|
role: "listbox",
|
|
2219
2219
|
"aria-multiselectable": A || void 0,
|
|
2220
2220
|
"aria-label": i ?? D,
|
|
2221
|
-
ref:
|
|
2221
|
+
ref: ie,
|
|
2222
2222
|
className: Y.list,
|
|
2223
|
-
onMouseLeave: () =>
|
|
2223
|
+
onMouseLeave: () => R(null),
|
|
2224
2224
|
onBlur: (e) => {
|
|
2225
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
2225
|
+
e.currentTarget.contains(e.relatedTarget) || R(null);
|
|
2226
2226
|
},
|
|
2227
|
-
children: [
|
|
2227
|
+
children: [L && le.length > 0 && /* @__PURE__ */ v("span", {
|
|
2228
2228
|
"aria-hidden": "true",
|
|
2229
|
-
className: `${Y.highlight} ${
|
|
2229
|
+
className: `${Y.highlight} ${L.instant ? Y.highlightInstant : ""}`,
|
|
2230
2230
|
style: {
|
|
2231
|
-
transform: `translateY(${
|
|
2232
|
-
height:
|
|
2231
|
+
transform: `translateY(${L.top}px)`,
|
|
2232
|
+
height: L.height
|
|
2233
2233
|
}
|
|
2234
2234
|
}), le.length === 0 ? /* @__PURE__ */ v("div", {
|
|
2235
2235
|
className: Y.noResults,
|
|
@@ -2239,14 +2239,14 @@ function Yt(e) {
|
|
|
2239
2239
|
style: { "--i": Math.min(n, 8) },
|
|
2240
2240
|
"data-value": e.value,
|
|
2241
2241
|
role: "option",
|
|
2242
|
-
"aria-selected": A ?
|
|
2242
|
+
"aria-selected": A ? H.includes(e.value) : e.value === V,
|
|
2243
2243
|
size: t === "pill" ? "sm" : c,
|
|
2244
2244
|
icon: e.icon,
|
|
2245
2245
|
leading: A ? /* @__PURE__ */ v(qe, {
|
|
2246
|
-
checked:
|
|
2246
|
+
checked: H.includes(e.value),
|
|
2247
2247
|
disabled: e.disabled
|
|
2248
2248
|
}) : void 0,
|
|
2249
|
-
selected: !A && e.value ===
|
|
2249
|
+
selected: !A && e.value === V,
|
|
2250
2250
|
disabled: e.disabled,
|
|
2251
2251
|
onClick: () => ye(e.value),
|
|
2252
2252
|
onMouseEnter: (t) => !e.disabled && ve(t.currentTarget),
|
|
@@ -2746,39 +2746,39 @@ function wn(e) {
|
|
|
2746
2746
|
}, [e]), t;
|
|
2747
2747
|
}
|
|
2748
2748
|
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": h, "data-testid": _, className: y, children: b }) {
|
|
2749
|
-
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 = wn(vn),
|
|
2750
|
-
|
|
2749
|
+
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 = wn(vn), N = wn(yn), P = p(null), F = p(null), I = p(!1), ee = p(!1), te = p(Symbol("modal")), L = p(e), R = p(t);
|
|
2750
|
+
R.current = t, l(() => T(!0), []), l(() => {
|
|
2751
2751
|
if (e) {
|
|
2752
|
-
if (
|
|
2753
|
-
if (
|
|
2752
|
+
if (I.current) return;
|
|
2753
|
+
if (F.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, D(!0), L.current && o) {
|
|
2754
2754
|
k(!0);
|
|
2755
2755
|
return;
|
|
2756
2756
|
}
|
|
2757
2757
|
let e = requestAnimationFrame(() => k(!0));
|
|
2758
2758
|
return () => cancelAnimationFrame(e);
|
|
2759
2759
|
}
|
|
2760
|
-
if (
|
|
2761
|
-
let t = setTimeout(() => D(!1),
|
|
2760
|
+
if (I.current = !1, k(!1), !E) return;
|
|
2761
|
+
let t = setTimeout(() => D(!1), N ? 0 : _n);
|
|
2762
2762
|
return () => clearTimeout(t);
|
|
2763
2763
|
}, [e]), l(() => {
|
|
2764
|
-
!E &&
|
|
2764
|
+
!E && F.current && (F.current.focus?.(), F.current = null);
|
|
2765
2765
|
}, [E]);
|
|
2766
|
-
let
|
|
2767
|
-
if (!a ||
|
|
2768
|
-
|
|
2769
|
-
let e =
|
|
2770
|
-
window.setTimeout(() =>
|
|
2771
|
-
}, [a,
|
|
2766
|
+
let z = s(() => {
|
|
2767
|
+
if (!a || I.current) return;
|
|
2768
|
+
I.current = !0, k(!1);
|
|
2769
|
+
let e = N ? 0 : _n;
|
|
2770
|
+
window.setTimeout(() => R.current(), e);
|
|
2771
|
+
}, [a, N]);
|
|
2772
2772
|
l(() => {
|
|
2773
2773
|
if (!E) return;
|
|
2774
|
-
let e =
|
|
2774
|
+
let e = te.current;
|
|
2775
2775
|
d && Cn.push(e);
|
|
2776
2776
|
let t = (t) => {
|
|
2777
|
-
t.key === "Escape" && Cn[Cn.length - 1] === e && (t.preventDefault(),
|
|
2777
|
+
t.key === "Escape" && Cn[Cn.length - 1] === e && (t.preventDefault(), z());
|
|
2778
2778
|
};
|
|
2779
2779
|
document.addEventListener("keydown", t);
|
|
2780
2780
|
let { body: n } = document, r = n.style.overflow, i = n.style.paddingRight, a = window.innerWidth - document.documentElement.clientWidth;
|
|
2781
|
-
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`),
|
|
2781
|
+
return n.style.overflow = "hidden", a > 0 && (n.style.paddingRight = `${a}px`), P.current?.focus({ preventScroll: !0 }), () => {
|
|
2782
2782
|
document.removeEventListener("keydown", t);
|
|
2783
2783
|
let a = Cn.indexOf(e);
|
|
2784
2784
|
a !== -1 && Cn.splice(a, 1), n.style.overflow = r, n.style.paddingRight = i;
|
|
@@ -2786,66 +2786,66 @@ function Q({ open: e, onClose: t, layout: n = "vertical", mobile: r = "sheet", o
|
|
|
2786
2786
|
}, [
|
|
2787
2787
|
E,
|
|
2788
2788
|
d,
|
|
2789
|
-
|
|
2789
|
+
z
|
|
2790
2790
|
]);
|
|
2791
|
-
let
|
|
2792
|
-
if (e.key !== "Tab" || !
|
|
2793
|
-
let t = Array.from(
|
|
2791
|
+
let B = (e) => {
|
|
2792
|
+
if (e.key !== "Tab" || !P.current) return;
|
|
2793
|
+
let t = Array.from(P.current.querySelectorAll(bn));
|
|
2794
2794
|
if (t.length === 0) {
|
|
2795
2795
|
e.preventDefault();
|
|
2796
2796
|
return;
|
|
2797
2797
|
}
|
|
2798
2798
|
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
2799
|
-
e.shiftKey && (i === n || i ===
|
|
2799
|
+
e.shiftKey && (i === n || i === P.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
2800
2800
|
};
|
|
2801
2801
|
if (!w || !E) return null;
|
|
2802
|
-
let
|
|
2802
|
+
let ne = document.querySelector(c) ?? document.body, re = [
|
|
2803
2803
|
Z.modal,
|
|
2804
2804
|
Z[n],
|
|
2805
2805
|
Z[r],
|
|
2806
2806
|
O && Z.visible,
|
|
2807
2807
|
o && Z.instant,
|
|
2808
2808
|
y
|
|
2809
|
-
].filter(Boolean).join(" "),
|
|
2809
|
+
].filter(Boolean).join(" "), ie = {
|
|
2810
2810
|
role: f,
|
|
2811
2811
|
"aria-modal": !0,
|
|
2812
2812
|
"aria-labelledby": h ?? S,
|
|
2813
2813
|
"aria-describedby": A ? C : void 0,
|
|
2814
2814
|
tabIndex: -1,
|
|
2815
|
-
className:
|
|
2815
|
+
className: re,
|
|
2816
2816
|
"data-testid": _,
|
|
2817
|
-
onKeyDown:
|
|
2818
|
-
},
|
|
2817
|
+
onKeyDown: B
|
|
2818
|
+
}, ae = {
|
|
2819
2819
|
layout: n,
|
|
2820
2820
|
titleId: h ?? S,
|
|
2821
2821
|
descriptionId: C,
|
|
2822
2822
|
isMobile: M,
|
|
2823
2823
|
dismissible: a,
|
|
2824
2824
|
setHasDescription: j,
|
|
2825
|
-
requestClose:
|
|
2825
|
+
requestClose: z
|
|
2826
2826
|
};
|
|
2827
2827
|
return g(/* @__PURE__ */ v(xn.Provider, {
|
|
2828
|
-
value:
|
|
2828
|
+
value: ae,
|
|
2829
2829
|
children: /* @__PURE__ */ v("div", {
|
|
2830
2830
|
className: `${Z.backdrop} ${O ? Z.visible : ""} ${o ? Z.instant : ""}`.trim(),
|
|
2831
2831
|
onPointerDown: (e) => {
|
|
2832
|
-
|
|
2832
|
+
ee.current = e.target !== e.currentTarget;
|
|
2833
2833
|
},
|
|
2834
2834
|
onClick: (e) => {
|
|
2835
|
-
e.target === e.currentTarget && !
|
|
2835
|
+
e.target === e.currentTarget && !ee.current && z(), ee.current = !1;
|
|
2836
2836
|
},
|
|
2837
2837
|
children: i ? /* @__PURE__ */ v("form", {
|
|
2838
|
-
ref:
|
|
2838
|
+
ref: P,
|
|
2839
2839
|
onSubmit: i,
|
|
2840
|
-
...
|
|
2840
|
+
...ie,
|
|
2841
2841
|
children: b
|
|
2842
2842
|
}) : /* @__PURE__ */ v("div", {
|
|
2843
|
-
ref:
|
|
2844
|
-
...
|
|
2843
|
+
ref: P,
|
|
2844
|
+
...ie,
|
|
2845
2845
|
children: b
|
|
2846
2846
|
})
|
|
2847
2847
|
})
|
|
2848
|
-
}),
|
|
2848
|
+
}), ne);
|
|
2849
2849
|
}
|
|
2850
2850
|
function Tn({ children: e, onClose: t }) {
|
|
2851
2851
|
let { requestClose: n, dismissible: r } = Sn("Modal.Cover");
|
|
@@ -3040,40 +3040,38 @@ function Vn({ src: e, size: t = Ln, children: r }) {
|
|
|
3040
3040
|
}), document.body)] });
|
|
3041
3041
|
}
|
|
3042
3042
|
var $ = {
|
|
3043
|
-
root: "
|
|
3044
|
-
hasActions: "
|
|
3045
|
-
current: "
|
|
3046
|
-
interactive: "
|
|
3047
|
-
side: "
|
|
3048
|
-
thumb: "
|
|
3049
|
-
thumbImg: "
|
|
3050
|
-
tile: "
|
|
3051
|
-
icon: "
|
|
3052
|
-
tilePlay: "
|
|
3053
|
-
badge: "
|
|
3054
|
-
main: "
|
|
3055
|
-
columns: "
|
|
3056
|
-
info: "
|
|
3057
|
-
aside: "
|
|
3058
|
-
date: "
|
|
3059
|
-
label: "
|
|
3060
|
-
title: "
|
|
3061
|
-
workerName: "
|
|
3062
|
-
description: "
|
|
3063
|
-
meta: "
|
|
3064
|
-
comment: "
|
|
3065
|
-
worker: "
|
|
3066
|
-
workerRow: "
|
|
3067
|
-
photo: "
|
|
3068
|
-
emptyPhoto: "
|
|
3069
|
-
workerText: "
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
srOnly: "_srOnly_1wz24_248"
|
|
3043
|
+
root: "_root_awfe3_1",
|
|
3044
|
+
hasActions: "_hasActions_awfe3_20",
|
|
3045
|
+
current: "_current_awfe3_25",
|
|
3046
|
+
interactive: "_interactive_awfe3_30",
|
|
3047
|
+
side: "_side_awfe3_52",
|
|
3048
|
+
thumb: "_thumb_awfe3_61",
|
|
3049
|
+
thumbImg: "_thumbImg_awfe3_68",
|
|
3050
|
+
tile: "_tile_awfe3_75",
|
|
3051
|
+
icon: "_icon_awfe3_95",
|
|
3052
|
+
tilePlay: "_tilePlay_awfe3_100",
|
|
3053
|
+
badge: "_badge_awfe3_104",
|
|
3054
|
+
main: "_main_awfe3_117",
|
|
3055
|
+
columns: "_columns_awfe3_125",
|
|
3056
|
+
info: "_info_awfe3_133",
|
|
3057
|
+
aside: "_aside_awfe3_134",
|
|
3058
|
+
date: "_date_awfe3_145",
|
|
3059
|
+
label: "_label_awfe3_146",
|
|
3060
|
+
title: "_title_awfe3_154",
|
|
3061
|
+
workerName: "_workerName_awfe3_155",
|
|
3062
|
+
description: "_description_awfe3_162",
|
|
3063
|
+
meta: "_meta_awfe3_163",
|
|
3064
|
+
comment: "_comment_awfe3_180",
|
|
3065
|
+
worker: "_worker_awfe3_155",
|
|
3066
|
+
workerRow: "_workerRow_awfe3_205",
|
|
3067
|
+
photo: "_photo_awfe3_211",
|
|
3068
|
+
emptyPhoto: "_emptyPhoto_awfe3_219",
|
|
3069
|
+
workerText: "_workerText_awfe3_227",
|
|
3070
|
+
actions: "_actions_awfe3_232",
|
|
3071
|
+
srOnly: "_srOnly_awfe3_243"
|
|
3073
3072
|
}, Hn = {
|
|
3074
3073
|
worker: "Worker:",
|
|
3075
3074
|
comment: "Comment:",
|
|
3076
|
-
pending: "Card still in progress",
|
|
3077
3075
|
inaccessible: "Inaccessible",
|
|
3078
3076
|
archived: "Archived",
|
|
3079
3077
|
new: "Unwatched"
|
|
@@ -3082,20 +3080,20 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3082
3080
|
let C = {
|
|
3083
3081
|
...Hn,
|
|
3084
3082
|
...g
|
|
3085
|
-
}, [w, T] = m(), [E, D] = m(), O = !!e && w !== e, k = c?.photo, A = !!k && E !== k, j = !!
|
|
3083
|
+
}, [w, T] = m(), [E, D] = m(), O = !!e && w !== e, k = c?.photo, A = !!k && E !== k, j = !!f, M = (e) => {
|
|
3086
3084
|
e.target === e.currentTarget && (e.key === "Enter" ? f?.() : e.key === " " && (e.preventDefault(), f?.()));
|
|
3087
3085
|
}, N = [
|
|
3088
3086
|
$.root,
|
|
3089
|
-
(
|
|
3087
|
+
(j || p) && $.interactive,
|
|
3090
3088
|
d && $.current,
|
|
3091
3089
|
h != null && $.hasActions,
|
|
3092
3090
|
x
|
|
3093
|
-
].filter(Boolean).join(" "), P =
|
|
3091
|
+
].filter(Boolean).join(" "), P = j ? {
|
|
3094
3092
|
role: "button",
|
|
3095
3093
|
tabIndex: 0,
|
|
3096
3094
|
"aria-label": b ?? (l ? `Video ${l}` : "Video"),
|
|
3097
3095
|
onClick: f,
|
|
3098
|
-
onKeyDown:
|
|
3096
|
+
onKeyDown: M
|
|
3099
3097
|
} : { "aria-label": b };
|
|
3100
3098
|
return /* @__PURE__ */ y("div", {
|
|
3101
3099
|
className: N,
|
|
@@ -3122,7 +3120,7 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3122
3120
|
"aria-hidden": "true"
|
|
3123
3121
|
}) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
|
|
3124
3122
|
className: $.icon,
|
|
3125
|
-
children: v(t === "archived" ?
|
|
3123
|
+
children: v(t === "archived" ? se : xe, {
|
|
3126
3124
|
size: 12,
|
|
3127
3125
|
strokeWidth: 1,
|
|
3128
3126
|
"aria-hidden": "true"
|
|
@@ -3181,15 +3179,12 @@ function Un({ preview: e, previewFallback: t = "inaccessible", onPreviewError: n
|
|
|
3181
3179
|
className: `${$.photo} ${$.emptyPhoto}`,
|
|
3182
3180
|
"aria-hidden": "true",
|
|
3183
3181
|
children: /* @__PURE__ */ v(De, { size: 20 })
|
|
3184
|
-
}), /* @__PURE__ */
|
|
3182
|
+
}), /* @__PURE__ */ v("div", {
|
|
3185
3183
|
className: $.workerText,
|
|
3186
|
-
children:
|
|
3184
|
+
children: /* @__PURE__ */ v("div", {
|
|
3187
3185
|
className: $.workerName,
|
|
3188
3186
|
children: c.name
|
|
3189
|
-
})
|
|
3190
|
-
className: $.pending,
|
|
3191
|
-
children: C.pending
|
|
3192
|
-
})]
|
|
3187
|
+
})
|
|
3193
3188
|
})]
|
|
3194
3189
|
})]
|
|
3195
3190
|
})
|
|
@@ -3255,6 +3250,6 @@ function qn(e, t) {
|
|
|
3255
3250
|
return `${i(n)}:${i(r)}:${i(t)}`;
|
|
3256
3251
|
}
|
|
3257
3252
|
//#endregion
|
|
3258
|
-
export {
|
|
3253
|
+
export { P as Badge, k as Button, bt as Calendar, j as Card, Ke as Checkbox, Je as CheckboxGroup, Nn as ConfirmDialog, it as DateField, Tt as DatePicker, Rt as DateRangePicker, Yt as Dropdown, Fn as EmptyState, Le as FieldLabel, un as FilterSection, cn as HighlightText, an as LanguageSwitch, tn as Logo, Ht as Menu, Ut as MenuDivider, Gt as MenuItem, Q as Modal, $t as NavItem, en as NavList, Bt as NumberField, rt as PasswordField, Vn as PhotoPreview, Xe as RadioButton, Ze as RadioGroup, nn as Sidebar, rn as SidebarFooter, Dt as Skeleton, gn as Spinner, $e as Switch, fn as Tabs, Ne as Tag, Re as TagGroup, nt as TextArea, et as TextField, mn as Toggle, Be as Toolbar, We as ToolbarAdaptive, C as Tooltip, Gn as VideoCard, Kn as formatDuration, qn as formatDurationHMS };
|
|
3259
3254
|
|
|
3260
3255
|
//# sourceMappingURL=index.js.map
|