@veevarts/design-system 1.16.0 → 1.17.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/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as f, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { HeroUIProvider as ki, Button as Ci, Select as Si, cn as g, SelectItem as
|
|
2
|
+
import { HeroUIProvider as ki, Button as Ci, Select as Si, cn as g, SelectItem as it, Alert as Oe, Tooltip as _e, Card as ve, CardBody as Se, Divider as Ye, Dropdown as kn, DropdownTrigger as Cn, DropdownMenu as Sn, DropdownItem as Et, Input as Ae, Popover as $n, PopoverTrigger as An, PopoverContent as Dn, ButtonGroup as $i, useInput as Ai, NumberInput as ta, CardHeader as na, Image as ra, CardFooter as Di, Chip as ot, Skeleton as te, Autocomplete as Ei, AutocompleteItem as Ii, Checkbox as aa, Modal as En, ModalContent as In, ModalHeader as Mn, ModalBody as Fn, ModalFooter as ia, Accordion as Ln, AccordionItem as Tn, Tabs as Mi, Tab as ar, DatePicker as sa, DropdownSection as ir, Spinner as Fi, Switch as Li, CheckboxGroup as Ti, RadioGroup as _i, Radio as zi } from "@heroui/react";
|
|
3
3
|
export * from "@heroui/react";
|
|
4
|
-
import H, { forwardRef as
|
|
4
|
+
import H, { forwardRef as ct, useRef as ze, useState as W, useEffect as De, useReducer as Oi, useCallback as ee, useMemo as de, createElement as ln, isValidElement as Pi, useId as Ri } from "react";
|
|
5
5
|
import { Globe as sr, User as lr, Heading as la, Check as oa, ListTodo as ca, ListOrdered as da, List as _n, AlignJustify as Vi, AlignRight as Bi, AlignCenter as Ui, AlignLeft as ua, CornerDownLeft as ji, Redo2 as Hi, Undo2 as qi, Eraser as or, Minus as Wi, Quote as Yi, CodeSquare as Ki, FileText as Qi, Link2 as Gi, Highlighter as fa, Palette as ma, Code as Zi, Underline as Ji, Strikethrough as Xi, Italic as es, Bold as ts, X as ns, ZoomOut as rs, ZoomIn as as, Link as is, Clock as cr, CheckCircle as ss, AlertCircle as ls, Plus as zn, CircleDollarSign as ha } from "lucide-react";
|
|
6
6
|
import { LazyMotion as os, domAnimation as cs, m as on, motion as It, AnimatePresence as cn } from "framer-motion";
|
|
7
7
|
import { EditorProvider as ds, useCurrentEditor as pa } from "@tiptap/react";
|
|
@@ -35,7 +35,7 @@ import { Gapcursor as _s } from "@tiptap/extension-gapcursor";
|
|
|
35
35
|
function ff({ children: e }) {
|
|
36
36
|
return /* @__PURE__ */ i(ki, { children: e });
|
|
37
37
|
}
|
|
38
|
-
const Q =
|
|
38
|
+
const Q = ct(
|
|
39
39
|
({ color: e = "primary", radius: t = "full", testId: n = "veevart-button", ...r }, a) => /* @__PURE__ */ i(Ci, { ref: a, color: e, radius: t, "data-testid": n, ...r })
|
|
40
40
|
);
|
|
41
41
|
Q.displayName = "Button";
|
|
@@ -43,7 +43,7 @@ function zs(e) {
|
|
|
43
43
|
const t = e?.closest('[role="dialog"]');
|
|
44
44
|
return t?.parentElement ?? t ?? void 0;
|
|
45
45
|
}
|
|
46
|
-
const Xe =
|
|
46
|
+
const Xe = ct(
|
|
47
47
|
({ popoverProps: e, ...t }, n) => {
|
|
48
48
|
const r = ze(null), [a, s] = W(void 0), o = {
|
|
49
49
|
...e,
|
|
@@ -95,7 +95,7 @@ function Ps({
|
|
|
95
95
|
size: "md",
|
|
96
96
|
radius: "full",
|
|
97
97
|
children: e.map((s) => /* @__PURE__ */ i(
|
|
98
|
-
|
|
98
|
+
it,
|
|
99
99
|
{
|
|
100
100
|
textValue: s.label,
|
|
101
101
|
"data-testid": `language-select-option-${s.code}`,
|
|
@@ -124,7 +124,7 @@ function Ps({
|
|
|
124
124
|
size: "md",
|
|
125
125
|
radius: "full",
|
|
126
126
|
children: e.map((s) => /* @__PURE__ */ i(
|
|
127
|
-
|
|
127
|
+
it,
|
|
128
128
|
{
|
|
129
129
|
textValue: s.code.toUpperCase(),
|
|
130
130
|
"data-testid": `language-select-option-mobile-${s.code}`,
|
|
@@ -1183,7 +1183,7 @@ const xe = {
|
|
|
1183
1183
|
right: Bi,
|
|
1184
1184
|
justify: Vi
|
|
1185
1185
|
};
|
|
1186
|
-
function
|
|
1186
|
+
function rt(e) {
|
|
1187
1187
|
return Zs[e];
|
|
1188
1188
|
}
|
|
1189
1189
|
function Xs({ value: e, onChange: t, onApply: n, placeholder: r = "#000000" }) {
|
|
@@ -1588,7 +1588,7 @@ function il({ editor: e, modifiers: t, onToolbarAction: n }) {
|
|
|
1588
1588
|
)
|
|
1589
1589
|
);
|
|
1590
1590
|
return s.length === 0 ? null : /* @__PURE__ */ i(nl, { id: "text-formatting", label: "Text formatting", children: s.map((o) => {
|
|
1591
|
-
const l = r[o], c =
|
|
1591
|
+
const l = r[o], c = rt(o);
|
|
1592
1592
|
return /* @__PURE__ */ i(
|
|
1593
1593
|
Ze,
|
|
1594
1594
|
{
|
|
@@ -1690,7 +1690,7 @@ function sl({
|
|
|
1690
1690
|
x && /* @__PURE__ */ i(
|
|
1691
1691
|
Ze,
|
|
1692
1692
|
{
|
|
1693
|
-
icon:
|
|
1693
|
+
icon: rt("blockquote"),
|
|
1694
1694
|
label: "Blockquote",
|
|
1695
1695
|
isActive: l.blockquote?.isActive,
|
|
1696
1696
|
isDisabled: l.blockquote?.isDisabled,
|
|
@@ -1700,7 +1700,7 @@ function sl({
|
|
|
1700
1700
|
w && /* @__PURE__ */ i(
|
|
1701
1701
|
Ze,
|
|
1702
1702
|
{
|
|
1703
|
-
icon:
|
|
1703
|
+
icon: rt("codeBlock"),
|
|
1704
1704
|
label: "Code block",
|
|
1705
1705
|
isActive: l.codeBlock?.isActive,
|
|
1706
1706
|
isDisabled: l.codeBlock?.isDisabled,
|
|
@@ -1717,7 +1717,7 @@ function sl({
|
|
|
1717
1717
|
E && /* @__PURE__ */ i(
|
|
1718
1718
|
Ze,
|
|
1719
1719
|
{
|
|
1720
|
-
icon:
|
|
1720
|
+
icon: rt("horizontalRule"),
|
|
1721
1721
|
label: "Horizontal rule",
|
|
1722
1722
|
onClick: () => c("horizontalRule")
|
|
1723
1723
|
}
|
|
@@ -1730,7 +1730,7 @@ function sl({
|
|
|
1730
1730
|
u.includes("undo") && /* @__PURE__ */ i(
|
|
1731
1731
|
Ze,
|
|
1732
1732
|
{
|
|
1733
|
-
icon:
|
|
1733
|
+
icon: rt("undo"),
|
|
1734
1734
|
label: "Undo",
|
|
1735
1735
|
isDisabled: l.undo?.isDisabled,
|
|
1736
1736
|
onClick: () => c("undo")
|
|
@@ -1739,7 +1739,7 @@ function sl({
|
|
|
1739
1739
|
u.includes("redo") && /* @__PURE__ */ i(
|
|
1740
1740
|
Ze,
|
|
1741
1741
|
{
|
|
1742
|
-
icon:
|
|
1742
|
+
icon: rt("redo"),
|
|
1743
1743
|
label: "Redo",
|
|
1744
1744
|
isDisabled: l.redo?.isDisabled,
|
|
1745
1745
|
onClick: () => c("redo")
|
|
@@ -2230,7 +2230,7 @@ const ml = ({
|
|
|
2230
2230
|
" words"
|
|
2231
2231
|
] })
|
|
2232
2232
|
] });
|
|
2233
|
-
}, dn =
|
|
2233
|
+
}, dn = ct((e, t) => {
|
|
2234
2234
|
const {
|
|
2235
2235
|
minRows: n = 10,
|
|
2236
2236
|
maxRows: r = 30,
|
|
@@ -2323,7 +2323,7 @@ const ml = ({
|
|
|
2323
2323
|
] });
|
|
2324
2324
|
});
|
|
2325
2325
|
dn.displayName = "TipTapEditor";
|
|
2326
|
-
const pl =
|
|
2326
|
+
const pl = ct((e, t) => {
|
|
2327
2327
|
const { adapter: n = "tiptap", variant: r = "bordered", ...a } = e;
|
|
2328
2328
|
return n === "tiptap" ? /* @__PURE__ */ i(dn, { ...a, variant: r, ref: t }) : (console.warn(`Adapter "${n}" is not supported. Using TipTap.`), /* @__PURE__ */ i(dn, { ...a, variant: r, ref: t }));
|
|
2329
2329
|
});
|
|
@@ -2718,7 +2718,7 @@ function Al(e, t) {
|
|
|
2718
2718
|
missing: /* @__PURE__ */ new Set()
|
|
2719
2719
|
};
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function st(e, t) {
|
|
2722
2722
|
const n = br[e] || (br[e] = /* @__PURE__ */ Object.create(null));
|
|
2723
2723
|
return n[t] || (n[t] = Al(e, t));
|
|
2724
2724
|
}
|
|
@@ -2776,14 +2776,14 @@ function Ca(e) {
|
|
|
2776
2776
|
function yr(e) {
|
|
2777
2777
|
const t = typeof e == "string" ? Pt(e, !0, xt) : e;
|
|
2778
2778
|
if (t) {
|
|
2779
|
-
const n =
|
|
2779
|
+
const n = st(t.provider, t.prefix), r = t.name;
|
|
2780
2780
|
return n.icons[r] || (n.missing.has(r) ? null : void 0);
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
2783
|
function El(e, t) {
|
|
2784
2784
|
const n = Pt(e, !0, xt);
|
|
2785
2785
|
if (!n) return !1;
|
|
2786
|
-
const r =
|
|
2786
|
+
const r = st(n.provider, n.prefix);
|
|
2787
2787
|
return t ? Dl(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
2788
2788
|
}
|
|
2789
2789
|
function Il(e, t) {
|
|
@@ -2799,7 +2799,7 @@ function Il(e, t) {
|
|
|
2799
2799
|
prefix: n,
|
|
2800
2800
|
name: "a"
|
|
2801
2801
|
})) return !1;
|
|
2802
|
-
const r =
|
|
2802
|
+
const r = st(t, n);
|
|
2803
2803
|
return !!Na(r, e);
|
|
2804
2804
|
}
|
|
2805
2805
|
const Sa = Object.freeze({
|
|
@@ -3107,7 +3107,7 @@ function eo(e) {
|
|
|
3107
3107
|
return e.forEach((a) => {
|
|
3108
3108
|
if (r.name === a.name && r.prefix === a.prefix && r.provider === a.provider) return;
|
|
3109
3109
|
r = a;
|
|
3110
|
-
const s = a.provider, o = a.prefix, l = a.name, c = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), d = c[o] || (c[o] =
|
|
3110
|
+
const s = a.provider, o = a.prefix, l = a.name, c = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), d = c[o] || (c[o] = st(s, o));
|
|
3111
3111
|
let u;
|
|
3112
3112
|
l in d.icons ? u = t.loaded : o === "" || d.missing.has(l) ? u = t.missing : u = t.pending;
|
|
3113
3113
|
const p = {
|
|
@@ -3387,11 +3387,11 @@ const co = (e, t) => {
|
|
|
3387
3387
|
return r.pending.forEach((c) => {
|
|
3388
3388
|
const { provider: d, prefix: u } = c;
|
|
3389
3389
|
if (u === l && d === o) return;
|
|
3390
|
-
o = d, l = u, s.push(
|
|
3390
|
+
o = d, l = u, s.push(st(d, u));
|
|
3391
3391
|
const p = a[d] || (a[d] = /* @__PURE__ */ Object.create(null));
|
|
3392
3392
|
p[u] || (p[u] = []);
|
|
3393
3393
|
}), r.pending.forEach((c) => {
|
|
3394
|
-
const { provider: d, prefix: u, name: p } = c, y =
|
|
3394
|
+
const { provider: d, prefix: u, name: p } = c, y = st(d, u), m = y.pendingIcons || (y.pendingIcons = /* @__PURE__ */ new Set());
|
|
3395
3395
|
m.has(p) || (m.add(p), a[d][u].push(p));
|
|
3396
3396
|
}), s.forEach((c) => {
|
|
3397
3397
|
const d = a[c.provider][c.prefix];
|
|
@@ -3689,11 +3689,11 @@ function Ma(e) {
|
|
|
3689
3689
|
...y
|
|
3690
3690
|
}, e, p) : e.children ? e.children : e.fallback ? e.fallback : ln("span", {});
|
|
3691
3691
|
}
|
|
3692
|
-
const j =
|
|
3692
|
+
const j = ct((e, t) => Ma({
|
|
3693
3693
|
...e,
|
|
3694
3694
|
_ref: t
|
|
3695
3695
|
}));
|
|
3696
|
-
|
|
3696
|
+
ct((e, t) => Ma({
|
|
3697
3697
|
inline: !0,
|
|
3698
3698
|
...e,
|
|
3699
3699
|
_ref: t
|
|
@@ -3992,7 +3992,7 @@ const $o = {
|
|
|
3992
3992
|
)
|
|
3993
3993
|
] });
|
|
3994
3994
|
}, Ke = (le, he) => l?.renderDisabledState ? l.renderDisabledState(le, he) : le === "soldOut" && l?.renderSoldOut ? l.renderSoldOut(he) : le === "maxReached" && l?.renderMaxReachedAlert ? l.renderMaxReachedAlert(he) : /* @__PURE__ */ i(
|
|
3995
|
-
|
|
3995
|
+
ot,
|
|
3996
3996
|
{
|
|
3997
3997
|
"data-testid": se[le],
|
|
3998
3998
|
color: fe[le],
|
|
@@ -4724,12 +4724,12 @@ function yn(e, t = {}) {
|
|
|
4724
4724
|
}
|
|
4725
4725
|
return t;
|
|
4726
4726
|
}
|
|
4727
|
-
function
|
|
4727
|
+
function at(e, t, n) {
|
|
4728
4728
|
n || (n = yn(t));
|
|
4729
4729
|
for (const r in e) {
|
|
4730
4730
|
const a = e[r];
|
|
4731
4731
|
if (Ra(a))
|
|
4732
|
-
ue(t) || bn(n[r]) ? n[r] = yn(a, Array.isArray(a) ? [] : {}) :
|
|
4732
|
+
ue(t) || bn(n[r]) ? n[r] = yn(a, Array.isArray(a) ? [] : {}) : at(a, $e(t) ? {} : t[r], n[r]);
|
|
4733
4733
|
else {
|
|
4734
4734
|
const s = t[r];
|
|
4735
4735
|
n[r] = !Te(a, s);
|
|
@@ -4848,7 +4848,7 @@ function zr(e, t, n = "validate") {
|
|
|
4848
4848
|
ref: t
|
|
4849
4849
|
};
|
|
4850
4850
|
}
|
|
4851
|
-
var
|
|
4851
|
+
var nt = (e) => be(e) && !Tt(e) ? e : {
|
|
4852
4852
|
value: e,
|
|
4853
4853
|
message: ""
|
|
4854
4854
|
}, Or = async (e, t, n, r, a, s) => {
|
|
@@ -4867,7 +4867,7 @@ var tt = (e) => be(e) && !Tt(e) ? e : {
|
|
|
4867
4867
|
};
|
|
4868
4868
|
};
|
|
4869
4869
|
if (s ? !Array.isArray(S) || !S.length : c && (!P && (A || $e(S)) || Ie(S) && !S || F && !Va(l).isValid || I && !Ua(l).isValid)) {
|
|
4870
|
-
const { value: $, message: L } = Me(c) ? { value: !!c, message: c } :
|
|
4870
|
+
const { value: $, message: L } = Me(c) ? { value: !!c, message: c } : nt(c);
|
|
4871
4871
|
if ($ && (C[N] = {
|
|
4872
4872
|
type: Re.required,
|
|
4873
4873
|
message: L,
|
|
@@ -4878,7 +4878,7 @@ var tt = (e) => be(e) && !Tt(e) ? e : {
|
|
|
4878
4878
|
}
|
|
4879
4879
|
if (!A && (!$e(p) || !$e(y))) {
|
|
4880
4880
|
let $, L;
|
|
4881
|
-
const z =
|
|
4881
|
+
const z = nt(y), U = nt(p);
|
|
4882
4882
|
if (!$e(S) && !isNaN(S)) {
|
|
4883
4883
|
const J = o.valueAsNumber || S && +S;
|
|
4884
4884
|
$e(z.value) || ($ = J > z.value), $e(U.value) || (L = J < U.value);
|
|
@@ -4890,12 +4890,12 @@ var tt = (e) => be(e) && !Tt(e) ? e : {
|
|
|
4890
4890
|
return b(C[N].message), C;
|
|
4891
4891
|
}
|
|
4892
4892
|
if ((d || u) && !A && (Me(S) || s && Array.isArray(S))) {
|
|
4893
|
-
const $ =
|
|
4893
|
+
const $ = nt(d), L = nt(u), z = !$e($.value) && S.length > +$.value, U = !$e(L.value) && S.length < +L.value;
|
|
4894
4894
|
if ((z || U) && (M(z, $.message, L.message), !r))
|
|
4895
4895
|
return b(C[N].message), C;
|
|
4896
4896
|
}
|
|
4897
4897
|
if (m && !A && Me(S)) {
|
|
4898
|
-
const { value: $, message: L } =
|
|
4898
|
+
const { value: $, message: L } = nt(m);
|
|
4899
4899
|
if (Tt($) && !S.match($) && (C[N] = {
|
|
4900
4900
|
type: Re.pattern,
|
|
4901
4901
|
message: L,
|
|
@@ -5015,7 +5015,7 @@ function nc(e = {}) {
|
|
|
5015
5015
|
const q = D(R(n.touchedFields, h), B.argA, B.argB);
|
|
5016
5016
|
O && oe(n.touchedFields, h, q);
|
|
5017
5017
|
}
|
|
5018
|
-
(p.dirtyFields || y.dirtyFields) && (n.dirtyFields =
|
|
5018
|
+
(p.dirtyFields || y.dirtyFields) && (n.dirtyFields = at(a, s)), m.state.next({
|
|
5019
5019
|
name: h,
|
|
5020
5020
|
isDirty: $(h, v),
|
|
5021
5021
|
dirtyFields: n.dirtyFields,
|
|
@@ -5135,7 +5135,7 @@ function nc(e = {}) {
|
|
|
5135
5135
|
values: pe(s)
|
|
5136
5136
|
}), (p.isDirty || p.dirtyFields || y.isDirty || y.dirtyFields) && D.shouldDirty && m.state.next({
|
|
5137
5137
|
name: h,
|
|
5138
|
-
dirtyFields:
|
|
5138
|
+
dirtyFields: at(a, s),
|
|
5139
5139
|
isDirty: $(h, T)
|
|
5140
5140
|
})) : B && !B._f && !$e(T) ? J(h, T, D) : U(h, T, D), Tr(h, l) ? m.state.next({
|
|
5141
5141
|
...n,
|
|
@@ -5349,7 +5349,7 @@ function nc(e = {}) {
|
|
|
5349
5349
|
if (v.keepDirtyValues) {
|
|
5350
5350
|
const q = /* @__PURE__ */ new Set([
|
|
5351
5351
|
...l.mount,
|
|
5352
|
-
...Object.keys(
|
|
5352
|
+
...Object.keys(at(a, s))
|
|
5353
5353
|
]);
|
|
5354
5354
|
for (const re of Array.from(q)) {
|
|
5355
5355
|
const ae = R(n.dirtyFields, re), Ne = R(s, re), Qe = R(T, re);
|
|
@@ -5394,7 +5394,7 @@ function nc(e = {}) {
|
|
|
5394
5394
|
submitCount: v.keepSubmitCount ? n.submitCount : 0,
|
|
5395
5395
|
isDirty: O ? !1 : v.keepDirty ? n.isDirty : !!(v.keepDefaultValues && !Te(h, a)),
|
|
5396
5396
|
isSubmitted: v.keepIsSubmitted ? n.isSubmitted : !1,
|
|
5397
|
-
dirtyFields: O ? {} : v.keepDirtyValues ? v.keepDefaultValues && s ?
|
|
5397
|
+
dirtyFields: O ? {} : v.keepDirtyValues ? v.keepDefaultValues && s ? at(a, s) : n.dirtyFields : v.keepDefaultValues && h ? at(a, h) : v.keepDirty ? n.dirtyFields : {},
|
|
5398
5398
|
touchedFields: v.keepTouched ? n.touchedFields : {},
|
|
5399
5399
|
errors: v.keepErrors ? n.errors : {},
|
|
5400
5400
|
isSubmitSuccessful: v.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
@@ -6761,7 +6761,7 @@ function Za(e, t) {
|
|
|
6761
6761
|
function Zn(e, t) {
|
|
6762
6762
|
if (kc(e.calendar, t)) return e;
|
|
6763
6763
|
let n = t.fromJulianDay(e.calendar.toJulianDay(e)), r = e.copy();
|
|
6764
|
-
return r.calendar = t, r.era = n.era, r.year = n.year, r.month = n.month, r.day = n.day,
|
|
6764
|
+
return r.calendar = t, r.era = n.era, r.year = n.year, r.month = n.month, r.day = n.day, lt(r), r;
|
|
6765
6765
|
}
|
|
6766
6766
|
function Jn(e, t) {
|
|
6767
6767
|
let n = e.copy(), r = "hour" in n ? Lc(n, t) : 0;
|
|
@@ -6796,7 +6796,7 @@ function Dc(e) {
|
|
|
6796
6796
|
function Ja(e) {
|
|
6797
6797
|
e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
|
|
6798
6798
|
}
|
|
6799
|
-
function
|
|
6799
|
+
function lt(e) {
|
|
6800
6800
|
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), Ja(e);
|
|
6801
6801
|
}
|
|
6802
6802
|
function Ec(e) {
|
|
@@ -6809,7 +6809,7 @@ function Xa(e, t) {
|
|
|
6809
6809
|
}
|
|
6810
6810
|
function ei(e, t) {
|
|
6811
6811
|
let n = e.copy();
|
|
6812
|
-
return t.era != null && (n.era = t.era), t.year != null && (n.year = t.year), t.month != null && (n.month = t.month), t.day != null && (n.day = t.day),
|
|
6812
|
+
return t.era != null && (n.era = t.era), t.year != null && (n.year = t.year), t.month != null && (n.month = t.month), t.day != null && (n.day = t.day), lt(n), n;
|
|
6813
6813
|
}
|
|
6814
6814
|
function Ic(e, t) {
|
|
6815
6815
|
let n = e.copy();
|
|
@@ -6836,7 +6836,7 @@ function ti(e, t, n, r) {
|
|
|
6836
6836
|
case "era": {
|
|
6837
6837
|
let l = e.calendar.getEras(), c = l.indexOf(e.era);
|
|
6838
6838
|
if (c < 0) throw new Error("Invalid era: " + e.era);
|
|
6839
|
-
c = We(c, n, 0, l.length - 1, r?.round), a.era = l[c],
|
|
6839
|
+
c = We(c, n, 0, l.length - 1, r?.round), a.era = l[c], lt(a);
|
|
6840
6840
|
break;
|
|
6841
6841
|
}
|
|
6842
6842
|
case "year":
|
|
@@ -6852,7 +6852,7 @@ function ti(e, t, n, r) {
|
|
|
6852
6852
|
default:
|
|
6853
6853
|
throw new Error("Unsupported field " + t);
|
|
6854
6854
|
}
|
|
6855
|
-
return e.calendar.balanceDate && e.calendar.balanceDate(a),
|
|
6855
|
+
return e.calendar.balanceDate && e.calendar.balanceDate(a), lt(a), a;
|
|
6856
6856
|
}
|
|
6857
6857
|
function Tc(e, t, n, r) {
|
|
6858
6858
|
let a = e.copy();
|
|
@@ -6978,7 +6978,7 @@ class vt {
|
|
|
6978
6978
|
value: void 0
|
|
6979
6979
|
});
|
|
6980
6980
|
let [n, r, a, s, o] = ai(t);
|
|
6981
|
-
this.calendar = n, this.era = r, this.year = a, this.month = s, this.day = o,
|
|
6981
|
+
this.calendar = n, this.era = r, this.year = a, this.month = s, this.day = o, lt(this);
|
|
6982
6982
|
}
|
|
6983
6983
|
}
|
|
6984
6984
|
var Uc = /* @__PURE__ */ new WeakMap();
|
|
@@ -7033,7 +7033,7 @@ class _t {
|
|
|
7033
7033
|
value: void 0
|
|
7034
7034
|
});
|
|
7035
7035
|
let [n, r, a, s, o] = ai(t);
|
|
7036
|
-
this.calendar = n, this.era = r, this.year = a, this.month = s, this.day = o, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0,
|
|
7036
|
+
this.calendar = n, this.era = r, this.year = a, this.month = s, this.day = o, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, lt(this);
|
|
7037
7037
|
}
|
|
7038
7038
|
}
|
|
7039
7039
|
const jc = {
|
|
@@ -7426,7 +7426,7 @@ function sd({
|
|
|
7426
7426
|
});
|
|
7427
7427
|
},
|
|
7428
7428
|
classNames: jr,
|
|
7429
|
-
children: Zc.map((l) => /* @__PURE__ */ i(
|
|
7429
|
+
children: Zc.map((l) => /* @__PURE__ */ i(it, { textValue: n[l], children: n[l] }, l))
|
|
7430
7430
|
}
|
|
7431
7431
|
) }, o);
|
|
7432
7432
|
if (o === "dayOfMonth") {
|
|
@@ -7449,7 +7449,7 @@ function sd({
|
|
|
7449
7449
|
});
|
|
7450
7450
|
},
|
|
7451
7451
|
classNames: jr,
|
|
7452
|
-
children: Jc.map((c) => /* @__PURE__ */ i(
|
|
7452
|
+
children: Jc.map((c) => /* @__PURE__ */ i(it, { textValue: qr(c), children: qr(c) }, String(c)))
|
|
7453
7453
|
}
|
|
7454
7454
|
) }, o);
|
|
7455
7455
|
}
|
|
@@ -7508,7 +7508,7 @@ function ld({
|
|
|
7508
7508
|
/* @__PURE__ */ i("span", { children: "▪" }),
|
|
7509
7509
|
/* @__PURE__ */ i("span", { children: td(d.dueDate, a) }),
|
|
7510
7510
|
u === 0 && t.length > 1 && /* @__PURE__ */ i(
|
|
7511
|
-
|
|
7511
|
+
ot,
|
|
7512
7512
|
{
|
|
7513
7513
|
size: "sm",
|
|
7514
7514
|
radius: "full",
|
|
@@ -7811,7 +7811,7 @@ function If({
|
|
|
7811
7811
|
/* @__PURE__ */ i("td", { className: "px-2 py-3", children: x.format(b.amount) }),
|
|
7812
7812
|
/* @__PURE__ */ i("td", { className: "px-2 py-3", children: Kr(b.dueDate, n) }),
|
|
7813
7813
|
/* @__PURE__ */ i("td", { className: "px-2 py-3", children: /* @__PURE__ */ i(
|
|
7814
|
-
|
|
7814
|
+
ot,
|
|
7815
7815
|
{
|
|
7816
7816
|
size: "sm",
|
|
7817
7817
|
radius: "full",
|
|
@@ -8108,7 +8108,7 @@ const hd = {
|
|
|
8108
8108
|
children: /* @__PURE__ */ i("p", { className: "text-center", children: n })
|
|
8109
8109
|
}
|
|
8110
8110
|
),
|
|
8111
|
-
w && /* @__PURE__ */ i(
|
|
8111
|
+
w && /* @__PURE__ */ i(ot, { "data-testid": "item-card-status", color: m, size: "sm", variant: "flat", className: "px-2", children: w })
|
|
8112
8112
|
] }),
|
|
8113
8113
|
o && /* @__PURE__ */ i("p", { className: g("font-semibold text-right", d ? "text-lg" : "text-2xl"), "data-testid": "item-card-price", children: N })
|
|
8114
8114
|
] })
|
|
@@ -9059,7 +9059,7 @@ const Vd = "No sessions available for this date", Bd = (e) => e === "sold-out" |
|
|
|
9059
9059
|
A.endTime
|
|
9060
9060
|
] }),
|
|
9061
9061
|
/* @__PURE__ */ i(
|
|
9062
|
-
|
|
9062
|
+
ot,
|
|
9063
9063
|
{
|
|
9064
9064
|
size: "sm",
|
|
9065
9065
|
color: u ? u(A) : Bd(A.status),
|
|
@@ -9426,7 +9426,7 @@ const Qd = {
|
|
|
9426
9426
|
]
|
|
9427
9427
|
}
|
|
9428
9428
|
},
|
|
9429
|
-
children: t.map((C) => /* @__PURE__ */ i(
|
|
9429
|
+
children: t.map((C) => /* @__PURE__ */ i(it, { "data-testid": `${d}-method-option-${C.value}`, children: C.label }, C.value))
|
|
9430
9430
|
}
|
|
9431
9431
|
),
|
|
9432
9432
|
o && /* @__PURE__ */ i(
|
|
@@ -9574,7 +9574,7 @@ const au = ({
|
|
|
9574
9574
|
/* @__PURE__ */ i("span", { className: "flex-1 truncate", "data-testid": `${d}-label`, children: t.label }),
|
|
9575
9575
|
/* @__PURE__ */ i("span", { className: "font-semibold tabular-nums", "data-testid": `${d}-amount`, children: et(t.amount, n, r) }),
|
|
9576
9576
|
/* @__PURE__ */ i(
|
|
9577
|
-
|
|
9577
|
+
ot,
|
|
9578
9578
|
{
|
|
9579
9579
|
size: "sm",
|
|
9580
9580
|
radius: "full",
|
|
@@ -9778,7 +9778,7 @@ const cu = {
|
|
|
9778
9778
|
}
|
|
9779
9779
|
},
|
|
9780
9780
|
children: e.map((u) => /* @__PURE__ */ i(
|
|
9781
|
-
|
|
9781
|
+
it,
|
|
9782
9782
|
{
|
|
9783
9783
|
isDisabled: u.isDisabled,
|
|
9784
9784
|
startContent: /* @__PURE__ */ i("span", { "aria-hidden": "true", className: "shrink-0", children: sn(u.icon) }),
|
|
@@ -10224,7 +10224,7 @@ const xu = 60, vu = (e, t, n = xu) => t ? e > n : e < -n, ci = (e, t) => Math.ma
|
|
|
10224
10224
|
onDragEnd: (t, n) => {
|
|
10225
10225
|
vu(n?.offset?.y ?? 0, e.open) && e.onToggleOpen?.(), e.setDragHeight(null);
|
|
10226
10226
|
}
|
|
10227
|
-
}),
|
|
10227
|
+
}), tt = (e, t) => et(e.value, t, e.currency), er = ({
|
|
10228
10228
|
item: e,
|
|
10229
10229
|
locale: t,
|
|
10230
10230
|
onRemove: n,
|
|
@@ -10250,7 +10250,7 @@ const xu = 60, vu = (e, t, n = xu) => t ? e > n : e < -n, ci = (e, t) => Math.ma
|
|
|
10250
10250
|
)
|
|
10251
10251
|
] }),
|
|
10252
10252
|
/* @__PURE__ */ f("div", { className: "flex shrink-0 items-center", children: [
|
|
10253
|
-
e.amount && /* @__PURE__ */ i("span", { "data-testid": `summary-item-amount-${e.id}`, className: "whitespace-nowrap text-base text-foreground", children:
|
|
10253
|
+
e.amount && /* @__PURE__ */ i("span", { "data-testid": `summary-item-amount-${e.id}`, className: "whitespace-nowrap text-base text-foreground", children: tt(e.amount, t) }),
|
|
10254
10254
|
o && /* @__PURE__ */ i(
|
|
10255
10255
|
Q,
|
|
10256
10256
|
{
|
|
@@ -10374,7 +10374,7 @@ const di = ({ fee: e, locale: t, className: n }) => /* @__PURE__ */ f("div", { "
|
|
|
10374
10374
|
]
|
|
10375
10375
|
}
|
|
10376
10376
|
),
|
|
10377
|
-
/* @__PURE__ */ i("span", { "data-testid": "summary-service-fee-amount", className: "whitespace-nowrap text-base text-foreground", children:
|
|
10377
|
+
/* @__PURE__ */ i("span", { "data-testid": "summary-service-fee-amount", className: "whitespace-nowrap text-base text-foreground", children: tt(e.amount, t) })
|
|
10378
10378
|
] });
|
|
10379
10379
|
di.displayName = "SummaryServiceFeeRow";
|
|
10380
10380
|
const ui = ({ row: e, locale: t, emphasized: n }) => /* @__PURE__ */ f(
|
|
@@ -10391,7 +10391,7 @@ const ui = ({ row: e, locale: t, emphasized: n }) => /* @__PURE__ */ f(
|
|
|
10391
10391
|
children: e.label
|
|
10392
10392
|
}
|
|
10393
10393
|
),
|
|
10394
|
-
/* @__PURE__ */ i("span", { "data-testid": `summary-row-amount-${e.key}`, className: "whitespace-nowrap text-base", children:
|
|
10394
|
+
/* @__PURE__ */ i("span", { "data-testid": `summary-row-amount-${e.key}`, className: "whitespace-nowrap text-base", children: tt(e.amount, t) })
|
|
10395
10395
|
]
|
|
10396
10396
|
}
|
|
10397
10397
|
);
|
|
@@ -10448,7 +10448,7 @@ const mi = ({ total: e, locale: t, className: n }) => /* @__PURE__ */ f(
|
|
|
10448
10448
|
className: g("flex items-center justify-between text-xl font-semibold leading-7 text-foreground", n),
|
|
10449
10449
|
children: [
|
|
10450
10450
|
/* @__PURE__ */ i("span", { children: e.label ?? "Total" }),
|
|
10451
|
-
/* @__PURE__ */ i("span", { "data-testid": "summary-total-amount", className: "whitespace-nowrap text-xl font-semibold leading-7", children:
|
|
10451
|
+
/* @__PURE__ */ i("span", { "data-testid": "summary-total-amount", className: "whitespace-nowrap text-xl font-semibold leading-7", children: tt(e.amount, t) })
|
|
10452
10452
|
]
|
|
10453
10453
|
}
|
|
10454
10454
|
);
|
|
@@ -10460,7 +10460,7 @@ const hi = ({ secondaryTotal: e, locale: t, className: n }) => /* @__PURE__ */ f
|
|
|
10460
10460
|
className: g("flex items-center justify-between text-lg font-semibold leading-7 text-primary", n),
|
|
10461
10461
|
children: [
|
|
10462
10462
|
/* @__PURE__ */ i("span", { children: e.label }),
|
|
10463
|
-
/* @__PURE__ */ i("span", { "data-testid": "summary-secondary-total-amount", className: "whitespace-nowrap text-lg font-semibold leading-7", children:
|
|
10463
|
+
/* @__PURE__ */ i("span", { "data-testid": "summary-secondary-total-amount", className: "whitespace-nowrap text-lg font-semibold leading-7", children: tt(e.amount, t) })
|
|
10464
10464
|
]
|
|
10465
10465
|
}
|
|
10466
10466
|
);
|
|
@@ -10488,38 +10488,39 @@ Ot.displayName = "SummaryPrimaryCta";
|
|
|
10488
10488
|
const pi = ({
|
|
10489
10489
|
title: e,
|
|
10490
10490
|
total: t,
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10491
|
+
secondaryTotal: n,
|
|
10492
|
+
locale: r,
|
|
10493
|
+
open: a,
|
|
10494
|
+
progress: s,
|
|
10495
|
+
dragging: o,
|
|
10496
|
+
toggleAriaLabel: l,
|
|
10497
|
+
onToggleOpen: c,
|
|
10498
|
+
classNames: d
|
|
10498
10499
|
}) => /* @__PURE__ */ i("h2", { children: /* @__PURE__ */ f(
|
|
10499
10500
|
"button",
|
|
10500
10501
|
{
|
|
10501
10502
|
type: "button",
|
|
10502
10503
|
"data-testid": "summary-collapse-toggle",
|
|
10503
|
-
"aria-expanded":
|
|
10504
|
-
"aria-label":
|
|
10505
|
-
onClick:
|
|
10506
|
-
className: g("-mx-4 -mt-4 grid w-[calc(100%_+_32px)] grid-cols-1 px-4 pb-4 pt-4 text-left",
|
|
10504
|
+
"aria-expanded": a,
|
|
10505
|
+
"aria-label": l,
|
|
10506
|
+
onClick: c,
|
|
10507
|
+
className: g("-mx-4 -mt-4 grid w-[calc(100%_+_32px)] grid-cols-1 px-4 pb-4 pt-4 text-left", d.header),
|
|
10507
10508
|
children: [
|
|
10508
10509
|
/* @__PURE__ */ f(
|
|
10509
10510
|
"span",
|
|
10510
10511
|
{
|
|
10511
|
-
"aria-hidden": !
|
|
10512
|
-
style: { opacity:
|
|
10512
|
+
"aria-hidden": !a,
|
|
10513
|
+
style: { opacity: s },
|
|
10513
10514
|
className: g(
|
|
10514
10515
|
"col-start-1 row-start-1 flex items-center justify-between",
|
|
10515
|
-
!
|
|
10516
|
+
!o && "transition-opacity duration-300"
|
|
10516
10517
|
),
|
|
10517
10518
|
children: [
|
|
10518
10519
|
/* @__PURE__ */ i(
|
|
10519
10520
|
"span",
|
|
10520
10521
|
{
|
|
10521
10522
|
"data-testid": "summary-title",
|
|
10522
|
-
className: g("text-xl font-semibold leading-7 text-foreground",
|
|
10523
|
+
className: g("text-xl font-semibold leading-7 text-foreground", d.title),
|
|
10523
10524
|
children: e
|
|
10524
10525
|
}
|
|
10525
10526
|
),
|
|
@@ -10528,7 +10529,7 @@ const pi = ({
|
|
|
10528
10529
|
{
|
|
10529
10530
|
"data-testid": "summary-close",
|
|
10530
10531
|
"aria-hidden": "true",
|
|
10531
|
-
className: g("shrink-0 text-foreground",
|
|
10532
|
+
className: g("shrink-0 text-foreground", d.closeButton),
|
|
10532
10533
|
children: /* @__PURE__ */ i(j, { icon: "lucide:x", width: 20, height: 20 })
|
|
10533
10534
|
}
|
|
10534
10535
|
)
|
|
@@ -10538,15 +10539,21 @@ const pi = ({
|
|
|
10538
10539
|
/* @__PURE__ */ f(
|
|
10539
10540
|
"span",
|
|
10540
10541
|
{
|
|
10541
|
-
"aria-hidden":
|
|
10542
|
-
style: { opacity: 1 -
|
|
10542
|
+
"aria-hidden": a,
|
|
10543
|
+
style: { opacity: 1 - s },
|
|
10543
10544
|
className: g(
|
|
10544
|
-
"col-start-1 row-start-1 flex
|
|
10545
|
-
!
|
|
10545
|
+
"col-start-1 row-start-1 flex flex-col gap-2",
|
|
10546
|
+
!o && "transition-opacity duration-300"
|
|
10546
10547
|
),
|
|
10547
10548
|
children: [
|
|
10548
|
-
/* @__PURE__ */
|
|
10549
|
-
|
|
10549
|
+
/* @__PURE__ */ f("span", { className: "flex items-center justify-between text-xl font-semibold leading-7 text-foreground", children: [
|
|
10550
|
+
/* @__PURE__ */ i("span", { children: t.label ?? "Total" }),
|
|
10551
|
+
/* @__PURE__ */ i("span", { className: "whitespace-nowrap", children: tt(t.amount, r) })
|
|
10552
|
+
] }),
|
|
10553
|
+
n && /* @__PURE__ */ f("span", { className: "flex items-center justify-between text-lg font-semibold leading-7 text-primary", children: [
|
|
10554
|
+
/* @__PURE__ */ i("span", { children: n.label }),
|
|
10555
|
+
/* @__PURE__ */ i("span", { className: "whitespace-nowrap", children: tt(n.amount, r) })
|
|
10556
|
+
] })
|
|
10550
10557
|
]
|
|
10551
10558
|
}
|
|
10552
10559
|
)
|
|
@@ -10620,7 +10627,7 @@ const bi = ({
|
|
|
10620
10627
|
{
|
|
10621
10628
|
action: r,
|
|
10622
10629
|
disabledByLoading: a,
|
|
10623
|
-
className: g("flex-1", d.cta),
|
|
10630
|
+
className: g("h-[52px] flex-1", d.cta),
|
|
10624
10631
|
testId: "summary-cta-compact"
|
|
10625
10632
|
}
|
|
10626
10633
|
)
|
|
@@ -10642,21 +10649,13 @@ const bi = ({
|
|
|
10642
10649
|
{
|
|
10643
10650
|
action: r,
|
|
10644
10651
|
disabledByLoading: a,
|
|
10645
|
-
className: g("w-full", d.cta)
|
|
10652
|
+
className: g("h-[52px] w-full", d.cta)
|
|
10646
10653
|
}
|
|
10647
10654
|
)
|
|
10648
10655
|
}
|
|
10649
10656
|
)
|
|
10650
10657
|
] }),
|
|
10651
|
-
l && /* @__PURE__ */ i(
|
|
10652
|
-
"div",
|
|
10653
|
-
{
|
|
10654
|
-
"aria-hidden": !e,
|
|
10655
|
-
style: { opacity: t },
|
|
10656
|
-
className: g(!e && "pointer-events-none", !n && "transition-opacity duration-300"),
|
|
10657
|
-
children: l
|
|
10658
|
-
}
|
|
10659
|
-
)
|
|
10658
|
+
l && /* @__PURE__ */ i("div", { children: l })
|
|
10660
10659
|
] });
|
|
10661
10660
|
bi.displayName = "SummaryActionBar";
|
|
10662
10661
|
const Au = "(max-width: 767px)", Du = (e) => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia(e).matches : !1, Eu = (e = Au) => {
|
|
@@ -10756,6 +10755,7 @@ const Au = "(max-width: 767px)", Du = (e) => typeof window < "u" && typeof windo
|
|
|
10756
10755
|
{
|
|
10757
10756
|
title: e,
|
|
10758
10757
|
total: l,
|
|
10758
|
+
secondaryTotal: c,
|
|
10759
10759
|
locale: r,
|
|
10760
10760
|
open: X,
|
|
10761
10761
|
progress: Ue,
|
|
@@ -6,6 +6,12 @@ export interface CollapseHeaderProps {
|
|
|
6
6
|
label?: React.ReactNode;
|
|
7
7
|
amount: Money;
|
|
8
8
|
};
|
|
9
|
+
/** Optional primary-colored row mirrored under the Total in the compact bar
|
|
10
|
+
* (e.g. "Due Today"); cross-fades like the Total. */
|
|
11
|
+
secondaryTotal?: {
|
|
12
|
+
label: React.ReactNode;
|
|
13
|
+
amount: Money;
|
|
14
|
+
};
|
|
9
15
|
locale: string;
|
|
10
16
|
open: boolean;
|
|
11
17
|
/** Open progress 0→1; drives the cross-fade opacity. */
|