@okam/stack-ui 1.7.0 → 1.8.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/components/fields/Select/Select.interface.d.ts +2 -0
- package/index.js +1 -1
- package/index.mjs +87 -86
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Ss from "react";
|
|
2
2
|
import I, { useMemo as L, useRef as A, memo as Rn, lazy as Ts, Suspense as Es, useState as H, useEffect as W, useCallback as _, useContext as De } from "react";
|
|
3
|
-
import { jsx as $, jsxs as
|
|
3
|
+
import { jsx as $, jsxs as z, Fragment as Rs } from "react/jsx-runtime";
|
|
4
4
|
import { tv as O } from "tailwind-variants";
|
|
5
5
|
import { get as ks } from "radash";
|
|
6
6
|
import { useLink as Cs, useButton as Pa, useOverlay as kn, useModal as Cn, useDialog as Ja, FocusScope as Mn, mergeProps as Nn, DismissButton as wa, useOverlayTrigger as Ms, useOverlayPosition as Ns, OverlayContainer as Is, useIsSSR as Ls, useListBox as Fs, useOption as As, usePopover as Os, Overlay as Bs, useSelect as Vs, HiddenSelect as zs, useTextField as In, useLocale as Ks } from "react-aria";
|
|
@@ -656,16 +656,16 @@ const ec = (e) => ({ children: a }) => /* @__PURE__ */ $(Xs, { brandTheme: e, ch
|
|
|
656
656
|
return /* @__PURE__ */ $(Es, { fallback: /* @__PURE__ */ $(Kn, { className: "overflow-visible pointer-events-none" }), children: /* @__PURE__ */ $(r, { ...a, className: "overflow-visible pointer-events-none", ...e }) });
|
|
657
657
|
}, Ee = (e) => {
|
|
658
658
|
const { icon: t, as: a = "span", tokens: r, customTheme: n, themeName: o = "icon", children: i, ...l } = e, s = F(o, r, n);
|
|
659
|
-
return typeof t != "string" ? /* @__PURE__ */
|
|
659
|
+
return typeof t != "string" ? /* @__PURE__ */ z(a, { ...l, className: s, children: [
|
|
660
660
|
i,
|
|
661
661
|
t
|
|
662
|
-
] }) : /* @__PURE__ */
|
|
662
|
+
] }) : /* @__PURE__ */ z(a, { className: s, children: [
|
|
663
663
|
i,
|
|
664
664
|
/* @__PURE__ */ $(_c, { icon: t, ...l })
|
|
665
665
|
] });
|
|
666
666
|
}, up = (e) => {
|
|
667
667
|
const { customTheme: t, themeName: a = "accordion", id: r, tokens: n, title: o, ariaLabel: i, onClick: l, icon: s, children: c } = e, [d, p] = H(!1), u = F(`${a}.container`, { ...n, isOpen: d }, t), m = F(`${a}.title`, { ...n, isOpen: d }, t), h = F(`${a}.icon`, { ...n, isOpen: d }, t), y = F(`${a}.region`, { ...n, isOpen: d }, t), P = F(`${a}.content`, { ...n, isOpen: d }, t);
|
|
668
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ z(
|
|
669
669
|
"div",
|
|
670
670
|
{
|
|
671
671
|
className: u,
|
|
@@ -674,7 +674,7 @@ const ec = (e) => ({ children: a }) => /* @__PURE__ */ $(Xs, { brandTheme: e, ch
|
|
|
674
674
|
"aria-expanded": d,
|
|
675
675
|
"aria-controls": `accordion-content-${r}`,
|
|
676
676
|
children: [
|
|
677
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ z(
|
|
678
678
|
Ge,
|
|
679
679
|
{
|
|
680
680
|
themeName: `${a}.button`,
|
|
@@ -741,7 +741,7 @@ const ec = (e) => ({ children: a }) => /* @__PURE__ */ $(Xs, { brandTheme: e, ch
|
|
|
741
741
|
} = e, [d, p] = H(!1), u = F(`${l}.container`, s, i), m = () => {
|
|
742
742
|
p(!d);
|
|
743
743
|
};
|
|
744
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ z("div", { className: u, children: [
|
|
745
745
|
/* @__PURE__ */ $(
|
|
746
746
|
Ge,
|
|
747
747
|
{
|
|
@@ -3389,7 +3389,7 @@ function br(e) {
|
|
|
3389
3389
|
}), S = fe((f) => {
|
|
3390
3390
|
let R = y.current;
|
|
3391
3391
|
R.isPressed && (R.isOverTarget && T(he(R.target, f), R.pointerType, !1), R.isPressed = !1, R.isOverTarget = !1, R.activePointerId = null, R.pointerType = null, w(), d || Tt(R.target));
|
|
3392
|
-
}),
|
|
3392
|
+
}), V = fe((f) => {
|
|
3393
3393
|
c && S(f);
|
|
3394
3394
|
}), C = L(() => {
|
|
3395
3395
|
let f = y.current, R = {
|
|
@@ -3439,7 +3439,7 @@ function br(e) {
|
|
|
3439
3439
|
!v.currentTarget.contains(v.target) || f.pointerType === "virtual" || v.button === 0 && ze(v, v.currentTarget) && x(v, f.pointerType || v.pointerType);
|
|
3440
3440
|
};
|
|
3441
3441
|
let b = (v) => {
|
|
3442
|
-
v.pointerId === f.activePointerId && (ze(v, f.target) ? f.isOverTarget || (f.isOverTarget = !0, g(he(f.target, v), f.pointerType)) : f.isOverTarget && (f.isOverTarget = !1, T(he(f.target, v), f.pointerType, !1),
|
|
3442
|
+
v.pointerId === f.activePointerId && (ze(v, f.target) ? f.isOverTarget || (f.isOverTarget = !0, g(he(f.target, v), f.pointerType)) : f.isOverTarget && (f.isOverTarget = !1, T(he(f.target, v), f.pointerType, !1), V(v)));
|
|
3443
3443
|
}, B = (v) => {
|
|
3444
3444
|
v.pointerId === f.activePointerId && f.isPressed && v.button === 0 && (ze(v, f.target) ? T(he(f.target, v), f.pointerType) : f.isOverTarget && T(he(f.target, v), f.pointerType, !1), f.isPressed = !1, f.isOverTarget = !1, f.activePointerId = null, f.pointerType = null, w(), d || Tt(f.target));
|
|
3445
3445
|
}, D = (v) => {
|
|
@@ -3466,7 +3466,7 @@ function br(e) {
|
|
|
3466
3466
|
if (!D.currentTarget.contains(D.target))
|
|
3467
3467
|
return;
|
|
3468
3468
|
let v = !0;
|
|
3469
|
-
f.isPressed && !f.ignoreEmulatedMouseEvents && (f.isOverTarget = !1, v = T(D, f.pointerType, !1),
|
|
3469
|
+
f.isPressed && !f.ignoreEmulatedMouseEvents && (f.isOverTarget = !1, v = T(D, f.pointerType, !1), V(D)), v && D.stopPropagation();
|
|
3470
3470
|
}, R.onMouseUp = (D) => {
|
|
3471
3471
|
D.currentTarget.contains(D.target) && !f.ignoreEmulatedMouseEvents && D.button === 0 && x(D, f.pointerType);
|
|
3472
3472
|
};
|
|
@@ -3494,7 +3494,7 @@ function br(e) {
|
|
|
3494
3494
|
return;
|
|
3495
3495
|
}
|
|
3496
3496
|
let v = ln(D.nativeEvent, f.activePointerId), K = !0;
|
|
3497
|
-
v && ze(v, D.currentTarget) ? f.isOverTarget || (f.isOverTarget = !0, K = g(D, f.pointerType)) : f.isOverTarget && (f.isOverTarget = !1, K = T(D, f.pointerType, !1),
|
|
3497
|
+
v && ze(v, D.currentTarget) ? f.isOverTarget || (f.isOverTarget = !0, K = g(D, f.pointerType)) : f.isOverTarget && (f.isOverTarget = !1, K = T(D, f.pointerType, !1), V(D)), K && D.stopPropagation();
|
|
3498
3498
|
}, R.onTouchEnd = (D) => {
|
|
3499
3499
|
if (!D.currentTarget.contains(D.target))
|
|
3500
3500
|
return;
|
|
@@ -3528,7 +3528,7 @@ function br(e) {
|
|
|
3528
3528
|
w,
|
|
3529
3529
|
d,
|
|
3530
3530
|
S,
|
|
3531
|
-
|
|
3531
|
+
V,
|
|
3532
3532
|
T,
|
|
3533
3533
|
g,
|
|
3534
3534
|
x
|
|
@@ -4528,15 +4528,15 @@ function bn(e, t, a, r, n, o) {
|
|
|
4528
4528
|
return i === l ? Math.max(0, a[l] - e[l] - e.scroll[l] + t[l] - r[l] - r[Gt[l]] - n) : Math.max(0, e[s] + e[l] + e.scroll[l] - t[l] - a[l] - a[s] - r[l] - r[Gt[l]] - n);
|
|
4529
4529
|
}
|
|
4530
4530
|
function Mf(e, t, a, r, n, o, i, l, s, c, d, p, u, m, h) {
|
|
4531
|
-
let y = $n(e), { size: P, crossAxis: w, crossSize: g, placement: T, crossPlacement: x } = y, S = ya(t, l, a, y, c, d, s, p, m, h),
|
|
4531
|
+
let y = $n(e), { size: P, crossAxis: w, crossSize: g, placement: T, crossPlacement: x } = y, S = ya(t, l, a, y, c, d, s, p, m, h), V = c, C = bn(l, s, t, n, o + c, y);
|
|
4532
4532
|
if (i && r[P] > C) {
|
|
4533
4533
|
let M = $n(`${Gt[T]} ${x}`), U = ya(t, l, a, M, c, d, s, p, m, h);
|
|
4534
|
-
bn(l, s, t, n, o + c, M) > C && (y = M, S = U,
|
|
4534
|
+
bn(l, s, t, n, o + c, M) > C && (y = M, S = U, V = c);
|
|
4535
4535
|
}
|
|
4536
4536
|
let f = hn(w, S[w], a[g], l, o);
|
|
4537
4537
|
S[w] += f;
|
|
4538
4538
|
let R = Cf(S, l, s, t, n, o);
|
|
4539
|
-
u && u < R && (R = u), a.height = Math.min(a.height, R), S = ya(t, l, a, y,
|
|
4539
|
+
u && u < R && (R = u), a.height = Math.min(a.height, R), S = ya(t, l, a, y, V, d, s, p, m, h), f = hn(w, S[w], a[g], l, o), S[w] += f;
|
|
4540
4540
|
let E = {}, b = t[w] + 0.5 * t[g] - a[w];
|
|
4541
4541
|
const B = m / 2 + h, D = a[g] - m / 2 - h, v = t[w] - a[w] + m / 2, K = t[w] + t[g] - a[w] - m / 2, k = Sa(b, v, K);
|
|
4542
4542
|
return E[w] = Sa(k, B, D), {
|
|
@@ -4557,8 +4557,8 @@ function Nf(e) {
|
|
|
4557
4557
|
}
|
|
4558
4558
|
let g = Ye(r), T = kf(r);
|
|
4559
4559
|
g.width += T.left + T.right, g.height += T.top + T.bottom;
|
|
4560
|
-
let x = Rf(n), S = Ef(l),
|
|
4561
|
-
return Mf(t, w, g, x, T, o, i, S,
|
|
4560
|
+
let x = Rf(n), S = Ef(l), V = l.tagName === "BODY" ? Ye(m) : yn(m, l);
|
|
4561
|
+
return Mf(t, w, g, x, T, o, i, S, V, s, c, P, d, p, u);
|
|
4562
4562
|
}
|
|
4563
4563
|
function Ye(e) {
|
|
4564
4564
|
let { top: t, left: a, width: r, height: n } = e.getBoundingClientRect(), { scrollTop: o, scrollLeft: i, clientTop: l, clientLeft: s } = document.documentElement;
|
|
@@ -4681,7 +4681,7 @@ function Af(e) {
|
|
|
4681
4681
|
}, [
|
|
4682
4682
|
x
|
|
4683
4683
|
]);
|
|
4684
|
-
let
|
|
4684
|
+
let V = _(() => {
|
|
4685
4685
|
S.current || h();
|
|
4686
4686
|
}, [
|
|
4687
4687
|
h,
|
|
@@ -4690,7 +4690,7 @@ function Af(e) {
|
|
|
4690
4690
|
return Ff({
|
|
4691
4691
|
triggerRef: r,
|
|
4692
4692
|
isOpen: m,
|
|
4693
|
-
onClose: h &&
|
|
4693
|
+
onClose: h && V
|
|
4694
4694
|
}), {
|
|
4695
4695
|
overlayProps: {
|
|
4696
4696
|
style: {
|
|
@@ -5231,7 +5231,7 @@ const Qf = "fixed", Xf = ({ isVisible: e, children: t }) => qa(e, {
|
|
|
5231
5231
|
}, [n.isOpen]), t ? /* @__PURE__ */ $(Yf, { children: /* @__PURE__ */ $(i, { isVisible: n.isOpen, children: /* @__PURE__ */ $(em, { isOpen: n.isOpen, onClose: l, isDismissable: !0, children: r }) }) }) : null;
|
|
5232
5232
|
}, tm = (e) => {
|
|
5233
5233
|
const { children: t, closeBtnRender: a, themeName: r = "sidePanel", tokens: n, customTheme: o } = e, i = F(`${r}.wrapper`, n, o), l = F(`${r}.container`, n, o), s = F(`${r}.innerContainer`, n, o), { overlayState: c } = Gc();
|
|
5234
|
-
return /* @__PURE__ */ $(xi, { state: c, transitionComponent: Xc, children: /* @__PURE__ */
|
|
5234
|
+
return /* @__PURE__ */ $(xi, { state: c, transitionComponent: Xc, children: /* @__PURE__ */ z(Us, { className: i, children: [
|
|
5235
5235
|
a && a(),
|
|
5236
5236
|
/* @__PURE__ */ $(qc, { isVisible: c.isOpen, children: /* @__PURE__ */ $("div", { className: l, children: /* @__PURE__ */ $("div", { className: s, children: t }) }) })
|
|
5237
5237
|
] }) });
|
|
@@ -5251,12 +5251,12 @@ const Qf = "fixed", Xf = ({ isVisible: e, children: t }) => qa(e, {
|
|
|
5251
5251
|
n,
|
|
5252
5252
|
o
|
|
5253
5253
|
), y = F(`${l}.container`, s, c);
|
|
5254
|
-
return /* @__PURE__ */
|
|
5255
|
-
/* @__PURE__ */
|
|
5254
|
+
return /* @__PURE__ */ z("div", { children: [
|
|
5255
|
+
/* @__PURE__ */ z("div", { ref: p, ...u, ...r ? { tabIndex: -1 } : {}, children: [
|
|
5256
5256
|
i && /* @__PURE__ */ $(Te, { themeName: `${l}.label`, tokens: { size: "footnotes" }, children: i }),
|
|
5257
5257
|
a
|
|
5258
5258
|
] }),
|
|
5259
|
-
/* @__PURE__ */ $(xi, { onCloseCallBack: o, state: d, children: /* @__PURE__ */
|
|
5259
|
+
/* @__PURE__ */ $(xi, { onCloseCallBack: o, state: d, children: /* @__PURE__ */ z("div", { children: [
|
|
5260
5260
|
/* @__PURE__ */ $(
|
|
5261
5261
|
tr,
|
|
5262
5262
|
{
|
|
@@ -5280,7 +5280,7 @@ const Qf = "fixed", Xf = ({ isVisible: e, children: t }) => qa(e, {
|
|
|
5280
5280
|
},
|
|
5281
5281
|
t
|
|
5282
5282
|
), { modalProps: l } = Cn(), { dialogProps: s } = Ja({}, t);
|
|
5283
|
-
return /* @__PURE__ */ $(Mn, { contain: !0, restoreFocus: !0, children: /* @__PURE__ */
|
|
5283
|
+
return /* @__PURE__ */ $(Mn, { contain: !0, restoreFocus: !0, children: /* @__PURE__ */ z(
|
|
5284
5284
|
"div",
|
|
5285
5285
|
{
|
|
5286
5286
|
...Nn(i, l, s),
|
|
@@ -5311,7 +5311,7 @@ function $p({
|
|
|
5311
5311
|
offset: r,
|
|
5312
5312
|
isOpen: n.isOpen
|
|
5313
5313
|
}), { onPress: d, ...p } = l;
|
|
5314
|
-
return /* @__PURE__ */
|
|
5314
|
+
return /* @__PURE__ */ z(Rs, { children: [
|
|
5315
5315
|
/* @__PURE__ */ $(tr, { handlePress: d, ...t, ...p, ref: o, children: "Open Popover" }),
|
|
5316
5316
|
n.isOpen && /* @__PURE__ */ $(Is, { children: /* @__PURE__ */ $(am, { ...s, ...c, ref: i, isOpen: n.isOpen, onClose: n.close, children: e }) })
|
|
5317
5317
|
] });
|
|
@@ -5328,7 +5328,7 @@ const bp = ({ content: e, themeName: t = "wysiwyg", ...a }) => /* @__PURE__ */ $
|
|
|
5328
5328
|
})
|
|
5329
5329
|
}
|
|
5330
5330
|
}
|
|
5331
|
-
), rm = (e) => /* @__PURE__ */
|
|
5331
|
+
), rm = (e) => /* @__PURE__ */ z("svg", { width: 24, height: 24, fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...e, children: [
|
|
5332
5332
|
/* @__PURE__ */ $("g", { children: /* @__PURE__ */ $("path", { d: "M23.92 12.38a1 1 0 0 0 0-.76 1 1 0 0 0-.21-.33l-8-8a1.003 1.003 0 1 0-1.42 1.42l6.3 6.29H1a1 1 0 1 0 0 2h19.59l-6.3 6.29a1 1 0 0 0 0 1.42 1.002 1.002 0 0 0 1.42 0l8-8c.091-.095.162-.207.21-.33Z" }) }),
|
|
5333
5333
|
/* @__PURE__ */ $("defs", { children: /* @__PURE__ */ $("clipPath", { children: /* @__PURE__ */ $("path", { fill: "currentColor", d: "M0 0h24v24H0z" }) }) })
|
|
5334
5334
|
] }), nm = Rn(rm, Zs), om = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -5359,9 +5359,9 @@ const bp = ({ content: e, themeName: t = "wysiwyg", ...a }) => /* @__PURE__ */ $
|
|
|
5359
5359
|
},
|
|
5360
5360
|
r
|
|
5361
5361
|
);
|
|
5362
|
-
return /* @__PURE__ */
|
|
5362
|
+
return /* @__PURE__ */ z(Bs, { children: [
|
|
5363
5363
|
/* @__PURE__ */ $("div", { ...s, style: { position: "fixed", inset: 0 } }),
|
|
5364
|
-
/* @__PURE__ */
|
|
5364
|
+
/* @__PURE__ */ z(er, { themeName: o, ...i, ...l, as: "div", ref: a, children: [
|
|
5365
5365
|
/* @__PURE__ */ $(wa, { onDismiss: r.close }),
|
|
5366
5366
|
n,
|
|
5367
5367
|
/* @__PURE__ */ $(wa, { onDismiss: r.close })
|
|
@@ -5382,40 +5382,41 @@ const bp = ({ content: e, themeName: t = "wysiwyg", ...a }) => /* @__PURE__ */ $
|
|
|
5382
5382
|
onSelectionChange: p,
|
|
5383
5383
|
defaultValue: u,
|
|
5384
5384
|
value: m,
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5385
|
+
icon: h,
|
|
5386
|
+
...y
|
|
5387
|
+
} = e, P = A(null), w = Hs({
|
|
5388
|
+
...y,
|
|
5388
5389
|
selectedKey: m,
|
|
5389
5390
|
defaultSelectedKey: u,
|
|
5390
5391
|
onSelectionChange: p
|
|
5391
|
-
}), { triggerProps:
|
|
5392
|
-
return /* @__PURE__ */
|
|
5393
|
-
d && /* @__PURE__ */ $(Te, { ...
|
|
5394
|
-
/* @__PURE__ */ $(zs, { ...n, state:
|
|
5395
|
-
/* @__PURE__ */
|
|
5396
|
-
/* @__PURE__ */
|
|
5392
|
+
}), { triggerProps: g, menuProps: T, labelProps: x } = Vs({ ...y }, w, P), S = F(`${l}.wrapper`, s, c), V = F(`${l}.container`, s, c);
|
|
5393
|
+
return /* @__PURE__ */ z("div", { className: S, children: [
|
|
5394
|
+
d && /* @__PURE__ */ $(Te, { ...x, as: "label", themeName: `${l}.label`, children: d }),
|
|
5395
|
+
/* @__PURE__ */ $(zs, { ...n, state: w, triggerRef: P, name: t, isDisabled: !0 }),
|
|
5396
|
+
/* @__PURE__ */ z("div", { className: V, children: [
|
|
5397
|
+
/* @__PURE__ */ z(
|
|
5397
5398
|
tr,
|
|
5398
5399
|
{
|
|
5399
|
-
...
|
|
5400
|
-
ref:
|
|
5400
|
+
...g,
|
|
5401
|
+
ref: P,
|
|
5401
5402
|
disabled: r,
|
|
5402
5403
|
themeName: `${l}.button`,
|
|
5403
5404
|
tokens: { ...s, intent: o ? "error" : "default" },
|
|
5404
5405
|
children: [
|
|
5405
|
-
|
|
5406
|
-
/* @__PURE__ */ $(Ee, { icon: "ArrowDown" })
|
|
5406
|
+
w.selectedItem ? w.selectedItem.rendered : a,
|
|
5407
|
+
/* @__PURE__ */ $(Ee, { icon: h ?? "ArrowDown" })
|
|
5407
5408
|
]
|
|
5408
5409
|
}
|
|
5409
5410
|
),
|
|
5410
|
-
|
|
5411
|
+
w.isOpen && P.current && /* @__PURE__ */ $(
|
|
5411
5412
|
sm,
|
|
5412
5413
|
{
|
|
5413
|
-
state:
|
|
5414
|
-
tokens: { width: `${
|
|
5415
|
-
triggerRef:
|
|
5414
|
+
state: w,
|
|
5415
|
+
tokens: { width: `${P.current?.offsetWidth}` },
|
|
5416
|
+
triggerRef: P,
|
|
5416
5417
|
placement: "bottom",
|
|
5417
5418
|
themeName: `${l}.popover`,
|
|
5418
|
-
children: /* @__PURE__ */ $(lm, { ...
|
|
5419
|
+
children: /* @__PURE__ */ $(lm, { ...T, themeName: l, state: w })
|
|
5419
5420
|
}
|
|
5420
5421
|
),
|
|
5421
5422
|
o && /* @__PURE__ */ $(Te, { tokens: { ...s, isError: o }, themeName: `${l}.errorMessage`, children: i })
|
|
@@ -5546,8 +5547,8 @@ const vp = (e) => {
|
|
|
5546
5547
|
tokens: s,
|
|
5547
5548
|
customTheme: c
|
|
5548
5549
|
} = e, d = fm(e), p = A(null), { inputProps: u } = mm(e, d, p), { focusProps: m, isFocusVisible: h } = xr(), y = { ...s, selected: d.isSelected, isDisabled: r, isError: n, isFocusVisible: h }, P = F(`${l}.label`, y, c), w = F(`${l}.checkBox`, y, c), g = F(`${l}.checkMark`, y, c);
|
|
5549
|
-
return /* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
5550
|
+
return /* @__PURE__ */ z("div", { children: [
|
|
5551
|
+
/* @__PURE__ */ z("label", { htmlFor: t, className: P, children: [
|
|
5551
5552
|
/* @__PURE__ */ $(zo, { children: /* @__PURE__ */ $("input", { type: "checkbox", ref: p, "aria-label": i, ...Nn(m, u) }) }),
|
|
5552
5553
|
/* @__PURE__ */ $(Pr, { focusRingClass: "focus-ring", children: /* @__PURE__ */ $("div", { className: w, children: /* @__PURE__ */ $("div", { className: g }) }) }),
|
|
5553
5554
|
/* @__PURE__ */ $("span", { children: a })
|
|
@@ -5571,9 +5572,9 @@ const vp = (e) => {
|
|
|
5571
5572
|
themeName: m = "textarea",
|
|
5572
5573
|
tokens: h,
|
|
5573
5574
|
customTheme: y
|
|
5574
|
-
} = e, P = A(null), { errorMessageProps: w, inputProps: g, labelProps: T } = In(e, P), x = { ...h, isDisabled: i, isError: l != null }, S = F(`${m}.wrapper`, x, y),
|
|
5575
|
-
return /* @__PURE__ */
|
|
5576
|
-
/* @__PURE__ */
|
|
5575
|
+
} = e, P = A(null), { errorMessageProps: w, inputProps: g, labelProps: T } = In(e, P), x = { ...h, isDisabled: i, isError: l != null }, S = F(`${m}.wrapper`, x, y), V = F(`${m}.input`, x, y), C = F(`${m}.label`, x, y), f = F(`${m}.container`, x, y);
|
|
5576
|
+
return /* @__PURE__ */ z("div", { children: [
|
|
5577
|
+
/* @__PURE__ */ z("div", { className: S, "aria-disabled": i, children: [
|
|
5577
5578
|
a && /* @__PURE__ */ $("label", { className: C, ...T, children: a }),
|
|
5578
5579
|
/* @__PURE__ */ $("div", { className: f, children: /* @__PURE__ */ $(Pr, { focusRingClass: "focus-ring", children: /* @__PURE__ */ $(
|
|
5579
5580
|
"textarea",
|
|
@@ -5581,7 +5582,7 @@ const vp = (e) => {
|
|
|
5581
5582
|
ref: (R) => {
|
|
5582
5583
|
u?.(R), P.current = R;
|
|
5583
5584
|
},
|
|
5584
|
-
className:
|
|
5585
|
+
className: V,
|
|
5585
5586
|
placeholder: n,
|
|
5586
5587
|
disabled: i,
|
|
5587
5588
|
required: o,
|
|
@@ -5615,12 +5616,12 @@ const vp = (e) => {
|
|
|
5615
5616
|
themeName: m = "textInput",
|
|
5616
5617
|
tokens: h,
|
|
5617
5618
|
customTheme: y
|
|
5618
|
-
} = e, P = A(null), { errorMessageProps: w, inputProps: g, labelProps: T } = In(e, P), x = { ...h, isDisabled: n, isError: o != null }, S = F(`${m}.wrapper`, x, y),
|
|
5619
|
-
return /* @__PURE__ */
|
|
5620
|
-
/* @__PURE__ */
|
|
5619
|
+
} = e, P = A(null), { errorMessageProps: w, inputProps: g, labelProps: T } = In(e, P), x = { ...h, isDisabled: n, isError: o != null }, S = F(`${m}.wrapper`, x, y), V = F(`${m}.label`, x, y), C = F(`${m}.input`, x, y), f = F(`${m}.container`, x, y);
|
|
5620
|
+
return /* @__PURE__ */ z("div", { children: [
|
|
5621
|
+
/* @__PURE__ */ z("div", { "aria-disabled": n, className: S, children: [
|
|
5621
5622
|
a && // eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
5622
|
-
/* @__PURE__ */ $("label", { className:
|
|
5623
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ $("label", { className: V, ...T, children: a }),
|
|
5624
|
+
/* @__PURE__ */ z("div", { className: f, children: [
|
|
5624
5625
|
u,
|
|
5625
5626
|
/* @__PURE__ */ $(Pr, { focusRingClass: "focus-ring", children: /* @__PURE__ */ $(
|
|
5626
5627
|
"input",
|
|
@@ -5922,9 +5923,9 @@ function ym(e) {
|
|
|
5922
5923
|
P(), c(), t.current = window.setTimeout(() => {
|
|
5923
5924
|
(isNaN(o) || isNaN(a) || a < o) && S(60);
|
|
5924
5925
|
}, E);
|
|
5925
|
-
}),
|
|
5926
|
+
}), V = fe((E) => {
|
|
5926
5927
|
P(), p(), t.current = window.setTimeout(() => {
|
|
5927
|
-
(isNaN(n) || isNaN(a) || a > n) &&
|
|
5928
|
+
(isNaN(n) || isNaN(a) || a > n) && V(60);
|
|
5928
5929
|
}, E);
|
|
5929
5930
|
});
|
|
5930
5931
|
let C = (E) => {
|
|
@@ -5956,7 +5957,7 @@ function ym(e) {
|
|
|
5956
5957
|
},
|
|
5957
5958
|
decrementButtonProps: {
|
|
5958
5959
|
onPressStart: () => {
|
|
5959
|
-
|
|
5960
|
+
V(400), f(window, "contextmenu", C);
|
|
5960
5961
|
},
|
|
5961
5962
|
onPressEnd: () => {
|
|
5962
5963
|
P(), R();
|
|
@@ -6958,7 +6959,7 @@ function wm(e, t, a) {
|
|
|
6958
6959
|
return M.setHours(12), T.formatToParts(M).find((U) => U.type === "dayPeriod").value;
|
|
6959
6960
|
}, [
|
|
6960
6961
|
T
|
|
6961
|
-
]),
|
|
6962
|
+
]), V = me({
|
|
6962
6963
|
year: "numeric",
|
|
6963
6964
|
era: "narrow",
|
|
6964
6965
|
timeZone: "UTC"
|
|
@@ -6971,7 +6972,7 @@ function wm(e, t, a) {
|
|
|
6971
6972
|
month: 1,
|
|
6972
6973
|
day: 1,
|
|
6973
6974
|
era: ee
|
|
6974
|
-
}).toDate("UTC"), J =
|
|
6975
|
+
}).toDate("UTC"), J = V.formatToParts(ne).find((ae) => ae.type === "era").value;
|
|
6975
6976
|
return {
|
|
6976
6977
|
era: ee,
|
|
6977
6978
|
formatted: J
|
|
@@ -6982,7 +6983,7 @@ function wm(e, t, a) {
|
|
|
6982
6983
|
ee.formatted = ee.formatted.slice(j);
|
|
6983
6984
|
return U;
|
|
6984
6985
|
}, [
|
|
6985
|
-
|
|
6986
|
+
V,
|
|
6986
6987
|
t.calendar,
|
|
6987
6988
|
e.type
|
|
6988
6989
|
]), f = (M) => {
|
|
@@ -7227,14 +7228,14 @@ function Rm(e) {
|
|
|
7227
7228
|
formatValue(x, S) {
|
|
7228
7229
|
if (!s)
|
|
7229
7230
|
return "";
|
|
7230
|
-
let
|
|
7231
|
+
let V = Za(S, {
|
|
7231
7232
|
granularity: i,
|
|
7232
7233
|
timeZone: l,
|
|
7233
7234
|
hideTimeZone: e.hideTimeZone,
|
|
7234
7235
|
hourCycle: e.hourCycle,
|
|
7235
7236
|
showEra: r.calendar.identifier === "gregory" && r.era === "BC"
|
|
7236
7237
|
});
|
|
7237
|
-
return new _e(x,
|
|
7238
|
+
return new _e(x, V).format(s);
|
|
7238
7239
|
}
|
|
7239
7240
|
};
|
|
7240
7241
|
}
|
|
@@ -7667,11 +7668,11 @@ function Nm(e) {
|
|
|
7667
7668
|
c,
|
|
7668
7669
|
r,
|
|
7669
7670
|
T
|
|
7670
|
-
]),
|
|
7671
|
+
]), V = L(() => Za({}, S), [
|
|
7671
7672
|
S
|
|
7672
|
-
]), C = L(() => new _e(t,
|
|
7673
|
+
]), C = L(() => new _e(t, V), [
|
|
7673
7674
|
t,
|
|
7674
|
-
|
|
7675
|
+
V
|
|
7675
7676
|
]), f = L(() => C.resolvedOptions(), [
|
|
7676
7677
|
C
|
|
7677
7678
|
]), R = L(() => C.formatToParts(/* @__PURE__ */ new Date()).filter((N) => Nt[N.type]).reduce((N, J) => (N[J.type] = !0, N), {}), [
|
|
@@ -8731,7 +8732,7 @@ function zm(e, t, a) {
|
|
|
8731
8732
|
i
|
|
8732
8733
|
]), w = "";
|
|
8733
8734
|
"anchorDate" in t && d && !t.isReadOnly && u && (t.anchorDate ? w = l.format("finishRangeSelectionPrompt") : w = l.format("startRangeSelectionPrompt"));
|
|
8734
|
-
let g = rr(w), T = A(!1), x = A(!1), S = A(null), { pressProps:
|
|
8735
|
+
let g = rr(w), T = A(!1), x = A(!1), S = A(null), { pressProps: V, isPressed: C } = br({
|
|
8735
8736
|
// When dragging to select a range, we don't want dragging over the original anchor
|
|
8736
8737
|
// again to trigger onPressStart. Cancel presses immediately when the pointer exits.
|
|
8737
8738
|
shouldCancelOnPointerExit: "anchorDate" in t && !!t.anchorDate,
|
|
@@ -8805,7 +8806,7 @@ function zm(e, t, a) {
|
|
|
8805
8806
|
"aria-selected": c || null,
|
|
8806
8807
|
"aria-invalid": m || null
|
|
8807
8808
|
},
|
|
8808
|
-
buttonProps: te(
|
|
8809
|
+
buttonProps: te(V, {
|
|
8809
8810
|
onFocus() {
|
|
8810
8811
|
n || t.setFocusedDate(r);
|
|
8811
8812
|
},
|
|
@@ -8914,7 +8915,7 @@ function Um(e) {
|
|
|
8914
8915
|
default:
|
|
8915
8916
|
return Tn(g, o, r, i, l);
|
|
8916
8917
|
}
|
|
8917
|
-
}), [
|
|
8918
|
+
}), [V, C] = H(e.autoFocus || !1), f = L(() => {
|
|
8918
8919
|
let k = {
|
|
8919
8920
|
...o
|
|
8920
8921
|
};
|
|
@@ -9026,7 +9027,7 @@ function Um(e) {
|
|
|
9026
9027
|
selectDate(k) {
|
|
9027
9028
|
B(k);
|
|
9028
9029
|
},
|
|
9029
|
-
isFocused:
|
|
9030
|
+
isFocused: V,
|
|
9030
9031
|
setFocused: C,
|
|
9031
9032
|
isInvalid(k) {
|
|
9032
9033
|
return Da(k, i, l);
|
|
@@ -9035,7 +9036,7 @@ function Um(e) {
|
|
|
9035
9036
|
return h != null && Q(k, h) && !this.isCellDisabled(k) && !this.isCellUnavailable(k);
|
|
9036
9037
|
},
|
|
9037
9038
|
isCellFocused(k) {
|
|
9038
|
-
return
|
|
9039
|
+
return V && g && Q(k, g);
|
|
9039
9040
|
},
|
|
9040
9041
|
isCellDisabled(k) {
|
|
9041
9042
|
return e.isDisabled || k.compare(x) < 0 || k.compare(f) > 0 || this.isInvalid(k, i, l);
|
|
@@ -9094,7 +9095,7 @@ function jm({ themeName: e = "calendar", tokens: t, state: a, date: r }) {
|
|
|
9094
9095
|
isDisabled: c,
|
|
9095
9096
|
isRoundedLeft: P,
|
|
9096
9097
|
isRoundedRight: w
|
|
9097
|
-
}),
|
|
9098
|
+
}), V = F(`${e}.cellDate`, {
|
|
9098
9099
|
...t,
|
|
9099
9100
|
isSelected: l,
|
|
9100
9101
|
isInvalid: p,
|
|
@@ -9102,11 +9103,11 @@ function jm({ themeName: e = "calendar", tokens: t, state: a, date: r }) {
|
|
|
9102
9103
|
isSelectionStart: u,
|
|
9103
9104
|
isSelectionEnd: m
|
|
9104
9105
|
});
|
|
9105
|
-
return /* @__PURE__ */ $("td", { ...o, "aria-disabled": !1, className: x, children: /* @__PURE__ */ $("div", { ...te(i, g), ref: n, hidden: s, className: S, children: /* @__PURE__ */ $("div", { className:
|
|
9106
|
+
return /* @__PURE__ */ $("td", { ...o, "aria-disabled": !1, className: x, children: /* @__PURE__ */ $("div", { ...te(i, g), ref: n, hidden: s, className: S, children: /* @__PURE__ */ $("div", { className: V, children: d }) }) });
|
|
9106
9107
|
}
|
|
9107
9108
|
function Hm({ themeName: e = "calendar", customTheme: t, tokens: a, state: r, ...n }) {
|
|
9108
9109
|
const { locale: o } = se(), { gridProps: i, headerProps: l, weekDays: s } = Vm({ ...n }, r), c = Vd(r.visibleRange.start, o), d = F(`${e}.calendarTable`, a), p = F(`${e}.dayLabel`, a);
|
|
9109
|
-
return /* @__PURE__ */
|
|
9110
|
+
return /* @__PURE__ */ z("table", { ...i, cellPadding: "0", className: d, children: [
|
|
9110
9111
|
/* @__PURE__ */ $("thead", { ...l, children: /* @__PURE__ */ $("tr", { children: s.map((u) => /* @__PURE__ */ $("th", { className: p, children: u }, `${u}`)) }) }),
|
|
9111
9112
|
/* @__PURE__ */ $("tbody", { children: [...new Array(c).keys()].map((u) => /* @__PURE__ */ $("tr", { children: r.getDatesInWeek(u).map((m, h) => m ? /* @__PURE__ */ $(jm, { state: r, date: m }, m?.day) : /* @__PURE__ */ $("td", {}, h)) }, u)) })
|
|
9112
9113
|
] });
|
|
@@ -9117,10 +9118,10 @@ function Wm({ buttons: e, tokens: t, customTheme: a, themeName: r = "calendar",
|
|
|
9117
9118
|
locale: o,
|
|
9118
9119
|
createCalendar: Eo
|
|
9119
9120
|
}), l = A(null), { calendarProps: s, prevButtonProps: c, nextButtonProps: d, title: p } = Bm({ ...n }, i), u = F(`${r}.container`, t), m = F(`${r}.header`, t), h = F(`${r}.navigationButtonsContainer`, t);
|
|
9120
|
-
return /* @__PURE__ */
|
|
9121
|
-
/* @__PURE__ */
|
|
9121
|
+
return /* @__PURE__ */ z("div", { ...s, ref: l, className: u, children: [
|
|
9122
|
+
/* @__PURE__ */ z("div", { className: m, children: [
|
|
9122
9123
|
/* @__PURE__ */ $(Te, { as: "p", tokens: { size: "h6" }, children: p }),
|
|
9123
|
-
/* @__PURE__ */
|
|
9124
|
+
/* @__PURE__ */ z("div", { className: h, children: [
|
|
9124
9125
|
/* @__PURE__ */ $(
|
|
9125
9126
|
Ge,
|
|
9126
9127
|
{
|
|
@@ -9160,9 +9161,9 @@ function _m({ themeName: e = "datePicker", tokens: t, ...a }) {
|
|
|
9160
9161
|
},
|
|
9161
9162
|
n
|
|
9162
9163
|
), s = F(`${e}.calendarUnderlay`, t), c = F(`${e}.calendarPopover`, t);
|
|
9163
|
-
return /* @__PURE__ */
|
|
9164
|
+
return /* @__PURE__ */ z(qf, { children: [
|
|
9164
9165
|
/* @__PURE__ */ $("div", { ...l, className: s }),
|
|
9165
|
-
/* @__PURE__ */
|
|
9166
|
+
/* @__PURE__ */ z("div", { ...i, ref: r, className: c, children: [
|
|
9166
9167
|
/* @__PURE__ */ $(xn, { onDismiss: n.close }),
|
|
9167
9168
|
o,
|
|
9168
9169
|
/* @__PURE__ */ $(xn, { onDismiss: n.close })
|
|
@@ -9171,7 +9172,7 @@ function _m({ themeName: e = "datePicker", tokens: t, ...a }) {
|
|
|
9171
9172
|
}
|
|
9172
9173
|
function Ym({ segment: e, state: t }) {
|
|
9173
9174
|
const a = A(null), { segmentProps: r } = wm(e, t, a);
|
|
9174
|
-
return /* @__PURE__ */
|
|
9175
|
+
return /* @__PURE__ */ z("div", { ...r, ref: a, children: [
|
|
9175
9176
|
/* @__PURE__ */ $(
|
|
9176
9177
|
"span",
|
|
9177
9178
|
{
|
|
@@ -9210,10 +9211,10 @@ function Pp({
|
|
|
9210
9211
|
...l
|
|
9211
9212
|
}) {
|
|
9212
9213
|
const s = Rm({ ...l }), c = A(null), { groupProps: d, fieldProps: p, labelProps: u, descriptionProps: m, buttonProps: h, dialogProps: y, calendarProps: P } = Dm({ ...l }, s, c), { label: w } = { ...l }, g = F(`${r}.container`, t), T = F(`${r}.dateField`, t), x = F(`${r}.label`, t);
|
|
9213
|
-
return /* @__PURE__ */
|
|
9214
|
+
return /* @__PURE__ */ z("div", { className: g, children: [
|
|
9214
9215
|
w && /* @__PURE__ */ $("span", { ...u, children: w }),
|
|
9215
9216
|
o && /* @__PURE__ */ $("div", { ...m, children: o }),
|
|
9216
|
-
/* @__PURE__ */ $("div", { ...d, ref: c, children: /* @__PURE__ */
|
|
9217
|
+
/* @__PURE__ */ $("div", { ...d, ref: c, children: /* @__PURE__ */ z(
|
|
9217
9218
|
Ge,
|
|
9218
9219
|
{
|
|
9219
9220
|
themeName: `${r}.button`,
|
|
@@ -9223,7 +9224,7 @@ function Pp({
|
|
|
9223
9224
|
handlePress: h.onPress,
|
|
9224
9225
|
children: [
|
|
9225
9226
|
i && /* @__PURE__ */ $("p", { className: x, children: i }),
|
|
9226
|
-
/* @__PURE__ */
|
|
9227
|
+
/* @__PURE__ */ z("div", { className: T, children: [
|
|
9227
9228
|
/* @__PURE__ */ $(En, { ...p }),
|
|
9228
9229
|
s.validationState === "invalid" && "❌"
|
|
9229
9230
|
] }),
|
|
@@ -9231,8 +9232,8 @@ function Pp({
|
|
|
9231
9232
|
]
|
|
9232
9233
|
}
|
|
9233
9234
|
) }),
|
|
9234
|
-
s.isOpen && /* @__PURE__ */ $(_m, { triggerRef: c, state: s, placement: e, children: /* @__PURE__ */
|
|
9235
|
-
/* @__PURE__ */
|
|
9235
|
+
s.isOpen && /* @__PURE__ */ $(_m, { triggerRef: c, state: s, placement: e, children: /* @__PURE__ */ z(Zm, { ...y, children: [
|
|
9236
|
+
/* @__PURE__ */ z("div", { children: [
|
|
9236
9237
|
/* @__PURE__ */ $(En, { ...p }),
|
|
9237
9238
|
s.validationState === "invalid" && "❌"
|
|
9238
9239
|
] }),
|