@grapadigital/shared-app-modules 0.0.119 → 0.0.121
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/assets/switch.css +1 -1
- package/dist/chuncks/{card.BEPmJhJa.js → card.CETIU_xl.js} +2 -2
- package/dist/chuncks/{field-textarea.component.DXB1qEY1.js → field-textarea.component.DrQuklAf.js} +2 -2
- package/dist/chuncks/{format.util.DR7VHTpM.js → format.util.DCFzwb9t.js} +1 -1
- package/dist/chuncks/{popover.BIXpZwtw.js → popover.BTkUnFPO.js} +196 -160
- package/dist/chuncks/{switch.sICPxzDh.js → switch.BzSgZLDU.js} +1 -1
- package/dist/components.js +3 -3
- package/dist/constants.js +2 -2
- package/dist/events.js +1 -1
- package/dist/pages.js +1 -1
- package/dist/shadcn.d.ts +6 -0
- package/dist/shadcn.js +28 -25
- package/dist/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as g, jsxs as rn } from "react/jsx-runtime";
|
|
2
2
|
import * as I from "react";
|
|
3
3
|
import f, { useMemo as ce, createContext as an, useContext as sn, useCallback as q, useRef as ve, useLayoutEffect as ln, useState as Ie, useEffect as dn } from "react";
|
|
4
|
-
import { a as cn, c as
|
|
4
|
+
import { a as cn, c as b, b as un, L as fn, S as hn, b0 as mn, a$ as pn, b1 as Ke, B as yn, b2 as ot, b3 as gn, b4 as vn, b5 as bn, b6 as Mn, b7 as rt, b8 as at, b9 as ue, ba as st, bb as it, bc as kn, bd as wn, be as Dn, bf as On, bg as Cn, bh as Wn, bi as Sn, bj as xn, bk as Nn } from "./switch.BzSgZLDU.js";
|
|
5
5
|
import { addDays as Pn, addMonths as _n, addWeeks as En, addYears as Tn, differenceInCalendarDays as An, differenceInCalendarMonths as Fn, eachMonthOfInterval as In, eachYearOfInterval as Bn, endOfISOWeek as Yn, endOfMonth as Rn, endOfWeek as zn, endOfYear as jn, format as qn, getISOWeek as Hn, getMonth as $n, getYear as Zn, getWeek as Un, isAfter as Gn, isBefore as Vn, isDate as Kn, isSameDay as Ln, isSameMonth as Jn, isSameYear as Xn, max as Qn, min as eo, setMonth as to, setYear as no, startOfDay as oo, startOfISOWeek as ro, startOfMonth as ao, startOfWeek as so, startOfYear as io } from "date-fns";
|
|
6
6
|
const lo = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], co = cn("chevron-left", lo);
|
|
7
7
|
function $a({ className: e, ...t }) {
|
|
8
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ g(
|
|
9
9
|
"fieldset",
|
|
10
10
|
{
|
|
11
11
|
"data-slot": "field-set",
|
|
12
|
-
className:
|
|
12
|
+
className: b(
|
|
13
13
|
"flex flex-col gap-6",
|
|
14
14
|
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
15
15
|
e
|
|
@@ -23,12 +23,12 @@ function Za({
|
|
|
23
23
|
variant: t = "legend",
|
|
24
24
|
...o
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ g(
|
|
27
27
|
"legend",
|
|
28
28
|
{
|
|
29
29
|
"data-slot": "field-legend",
|
|
30
30
|
"data-variant": t,
|
|
31
|
-
className:
|
|
31
|
+
className: b(
|
|
32
32
|
"mb-3 font-medium",
|
|
33
33
|
"data-[variant=legend]:text-base",
|
|
34
34
|
"data-[variant=label]:text-sm",
|
|
@@ -39,11 +39,11 @@ function Za({
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
function Ua({ className: e, ...t }) {
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ g(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
"data-slot": "field-group",
|
|
46
|
-
className:
|
|
46
|
+
className: b(
|
|
47
47
|
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
|
|
48
48
|
e
|
|
49
49
|
),
|
|
@@ -79,23 +79,23 @@ function Ga({
|
|
|
79
79
|
orientation: t = "vertical",
|
|
80
80
|
...o
|
|
81
81
|
}) {
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ g(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
role: "group",
|
|
86
86
|
"data-slot": "field",
|
|
87
87
|
"data-orientation": t,
|
|
88
|
-
className:
|
|
88
|
+
className: b(uo({ orientation: t }), e),
|
|
89
89
|
...o
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
function Va({ className: e, ...t }) {
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ g(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
"data-slot": "field-content",
|
|
98
|
-
className:
|
|
98
|
+
className: b(
|
|
99
99
|
"group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
|
|
100
100
|
e
|
|
101
101
|
),
|
|
@@ -107,11 +107,11 @@ function Ka({
|
|
|
107
107
|
className: e,
|
|
108
108
|
...t
|
|
109
109
|
}) {
|
|
110
|
-
return /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ g(
|
|
111
111
|
fn,
|
|
112
112
|
{
|
|
113
113
|
"data-slot": "field-label",
|
|
114
|
-
className:
|
|
114
|
+
className: b(
|
|
115
115
|
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
116
116
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
|
|
117
117
|
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
@@ -122,11 +122,11 @@ function Ka({
|
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
function La({ className: e, ...t }) {
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ g(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
"data-slot": "field-label",
|
|
129
|
-
className:
|
|
129
|
+
className: b(
|
|
130
130
|
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
131
131
|
e
|
|
132
132
|
),
|
|
@@ -135,11 +135,11 @@ function La({ className: e, ...t }) {
|
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
137
|
function Ja({ className: e, ...t }) {
|
|
138
|
-
return /* @__PURE__ */
|
|
138
|
+
return /* @__PURE__ */ g(
|
|
139
139
|
"p",
|
|
140
140
|
{
|
|
141
141
|
"data-slot": "field-description",
|
|
142
|
-
className:
|
|
142
|
+
className: b(
|
|
143
143
|
"text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
144
144
|
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
145
145
|
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
@@ -159,14 +159,14 @@ function Xa({
|
|
|
159
159
|
{
|
|
160
160
|
"data-slot": "field-separator",
|
|
161
161
|
"data-content": !!e,
|
|
162
|
-
className:
|
|
162
|
+
className: b(
|
|
163
163
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
164
164
|
t
|
|
165
165
|
),
|
|
166
166
|
...o,
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
e && /* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ g(hn, { className: "absolute inset-0 top-1/2" }),
|
|
169
|
+
e && /* @__PURE__ */ g(
|
|
170
170
|
"span",
|
|
171
171
|
{
|
|
172
172
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -184,15 +184,15 @@ function Qa({
|
|
|
184
184
|
errors: o,
|
|
185
185
|
...n
|
|
186
186
|
}) {
|
|
187
|
-
const r = ce(() => t || (o ? o?.length === 1 && o[0]?.message ? o[0].message : /* @__PURE__ */
|
|
188
|
-
(i, a) => i?.message && /* @__PURE__ */
|
|
187
|
+
const r = ce(() => t || (o ? o?.length === 1 && o[0]?.message ? o[0].message : /* @__PURE__ */ g("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: o.map(
|
|
188
|
+
(i, a) => i?.message && /* @__PURE__ */ g("li", { children: i.message }, a)
|
|
189
189
|
) }) : null), [t, o]);
|
|
190
|
-
return r ? /* @__PURE__ */
|
|
190
|
+
return r ? /* @__PURE__ */ g(
|
|
191
191
|
"div",
|
|
192
192
|
{
|
|
193
193
|
role: "alert",
|
|
194
194
|
"data-slot": "field-error",
|
|
195
|
-
className:
|
|
195
|
+
className: b("text-destructive text-sm font-normal", e),
|
|
196
196
|
...n,
|
|
197
197
|
children: r
|
|
198
198
|
}
|
|
@@ -286,7 +286,7 @@ function lt(e) {
|
|
|
286
286
|
const h = re(e.timeZone, e), y = h > 0 ? Math.floor(h) : Math.ceil(h), N = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - y, w = y !== o, W = N - l;
|
|
287
287
|
if (w && W) {
|
|
288
288
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + W);
|
|
289
|
-
const P = re(e.timeZone, e),
|
|
289
|
+
const P = re(e.timeZone, e), k = P > 0 ? Math.floor(P) : Math.ceil(P), O = y - k;
|
|
290
290
|
O && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + O), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O));
|
|
291
291
|
}
|
|
292
292
|
}
|
|
@@ -1151,22 +1151,22 @@ function te(e, t, o = L) {
|
|
|
1151
1151
|
});
|
|
1152
1152
|
}
|
|
1153
1153
|
function Wr(e, t, o, n, r) {
|
|
1154
|
-
const { disabled: i, hidden: a, modifiers: s, showOutsideDays: l, broadcastCalendar: d, today: u = r.today() } = t, { isSameDay: c, isSameMonth: h, startOfMonth: y, isBefore: C, endOfMonth: N, isAfter: w } = r, W = o && y(o), P = n && N(n),
|
|
1154
|
+
const { disabled: i, hidden: a, modifiers: s, showOutsideDays: l, broadcastCalendar: d, today: u = r.today() } = t, { isSameDay: c, isSameMonth: h, startOfMonth: y, isBefore: C, endOfMonth: N, isAfter: w } = r, W = o && y(o), P = n && N(n), k = {
|
|
1155
1155
|
[A.focused]: [],
|
|
1156
1156
|
[A.outside]: [],
|
|
1157
1157
|
[A.disabled]: [],
|
|
1158
1158
|
[A.hidden]: [],
|
|
1159
1159
|
[A.today]: []
|
|
1160
1160
|
}, O = {};
|
|
1161
|
-
for (const
|
|
1162
|
-
const { date: m, displayMonth: S } =
|
|
1161
|
+
for (const v of e) {
|
|
1162
|
+
const { date: m, displayMonth: S } = v, T = !!(S && !h(m, S)), B = !!(W && C(m, W)), F = !!(P && w(m, P)), U = !!(i && te(m, i, r)), ne = !!(a && te(m, a, r)) || B || F || // Broadcast calendar will show outside days as default
|
|
1163
1163
|
!d && !l && T || d && l === !1 && T, J = c(m, u);
|
|
1164
|
-
T &&
|
|
1164
|
+
T && k.outside.push(v), U && k.disabled.push(v), ne && k.hidden.push(v), J && k.today.push(v), s && Object.keys(s).forEach((j) => {
|
|
1165
1165
|
const ae = s?.[j];
|
|
1166
|
-
ae && te(m, ae, r) && (O[j] ? O[j].push(
|
|
1166
|
+
ae && te(m, ae, r) && (O[j] ? O[j].push(v) : O[j] = [v]);
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
|
-
return (
|
|
1169
|
+
return (v) => {
|
|
1170
1170
|
const m = {
|
|
1171
1171
|
[A.focused]: !1,
|
|
1172
1172
|
[A.disabled]: !1,
|
|
@@ -1174,12 +1174,12 @@ function Wr(e, t, o, n, r) {
|
|
|
1174
1174
|
[A.outside]: !1,
|
|
1175
1175
|
[A.today]: !1
|
|
1176
1176
|
}, S = {};
|
|
1177
|
-
for (const T in
|
|
1178
|
-
const B =
|
|
1179
|
-
m[T] = B.some((F) => F ===
|
|
1177
|
+
for (const T in k) {
|
|
1178
|
+
const B = k[T];
|
|
1179
|
+
m[T] = B.some((F) => F === v);
|
|
1180
1180
|
}
|
|
1181
1181
|
for (const T in O)
|
|
1182
|
-
S[T] = O[T].some((B) => B ===
|
|
1182
|
+
S[T] = O[T].some((B) => B === v);
|
|
1183
1183
|
return {
|
|
1184
1184
|
...m,
|
|
1185
1185
|
// custom modifiers should override all the previous ones
|
|
@@ -1365,14 +1365,14 @@ function ra(e, t, { classNames: o, months: n, focused: r, dateLib: i }) {
|
|
|
1365
1365
|
n.length === 0 || d.length === 0 || n.length !== d.length)
|
|
1366
1366
|
return;
|
|
1367
1367
|
const u = i.isSameMonth(n[0].date, d[0].date), c = i.isAfter(n[0].date, d[0].date), h = c ? o[R.caption_after_enter] : o[R.caption_before_enter], y = c ? o[R.weeks_after_enter] : o[R.weeks_before_enter], C = a.current, N = e.current.cloneNode(!0);
|
|
1368
|
-
if (N instanceof HTMLElement ? (Ee(N).forEach((
|
|
1369
|
-
if (!(
|
|
1368
|
+
if (N instanceof HTMLElement ? (Ee(N).forEach((k) => {
|
|
1369
|
+
if (!(k instanceof HTMLElement))
|
|
1370
1370
|
return;
|
|
1371
|
-
const O = ta(
|
|
1372
|
-
O &&
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1375
|
-
const m = Ae(
|
|
1371
|
+
const O = ta(k);
|
|
1372
|
+
O && k.contains(O) && k.removeChild(O);
|
|
1373
|
+
const v = Te(k);
|
|
1374
|
+
v && v.classList.remove(h);
|
|
1375
|
+
const m = Ae(k);
|
|
1376
1376
|
m && m.classList.remove(y);
|
|
1377
1377
|
}), a.current = N) : a.current = null, l.current || u || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
1378
1378
|
r)
|
|
@@ -1381,31 +1381,31 @@ function ra(e, t, { classNames: o, months: n, focused: r, dateLib: i }) {
|
|
|
1381
1381
|
if (W?.every((P) => P instanceof HTMLElement) && w && w.every((P) => P instanceof HTMLElement)) {
|
|
1382
1382
|
l.current = !0, e.current.style.isolation = "isolate";
|
|
1383
1383
|
const P = na(e.current);
|
|
1384
|
-
P && (P.style.zIndex = "1"), W.forEach((
|
|
1385
|
-
const
|
|
1386
|
-
if (!
|
|
1384
|
+
P && (P.style.zIndex = "1"), W.forEach((k, O) => {
|
|
1385
|
+
const v = w[O];
|
|
1386
|
+
if (!v)
|
|
1387
1387
|
return;
|
|
1388
|
-
|
|
1389
|
-
const m = Te(
|
|
1388
|
+
k.style.position = "relative", k.style.overflow = "hidden";
|
|
1389
|
+
const m = Te(k);
|
|
1390
1390
|
m && m.classList.add(h);
|
|
1391
|
-
const S = Ae(
|
|
1391
|
+
const S = Ae(k);
|
|
1392
1392
|
S && S.classList.add(y);
|
|
1393
1393
|
const T = () => {
|
|
1394
|
-
l.current = !1, e.current && (e.current.style.isolation = ""), P && (P.style.zIndex = ""), m && m.classList.remove(h), S && S.classList.remove(y),
|
|
1394
|
+
l.current = !1, e.current && (e.current.style.isolation = ""), P && (P.style.zIndex = ""), m && m.classList.remove(h), S && S.classList.remove(y), k.style.position = "", k.style.overflow = "", k.contains(v) && k.removeChild(v);
|
|
1395
1395
|
};
|
|
1396
|
-
|
|
1397
|
-
const B = oa(
|
|
1396
|
+
v.style.pointerEvents = "none", v.style.position = "absolute", v.style.overflow = "hidden", v.setAttribute("aria-hidden", "true");
|
|
1397
|
+
const B = oa(v);
|
|
1398
1398
|
B && (B.style.opacity = "0");
|
|
1399
|
-
const F = Te(
|
|
1399
|
+
const F = Te(v);
|
|
1400
1400
|
F && (F.classList.add(c ? o[R.caption_before_exit] : o[R.caption_after_exit]), F.addEventListener("animationend", T));
|
|
1401
|
-
const U = Ae(
|
|
1402
|
-
U && U.classList.add(c ? o[R.weeks_before_exit] : o[R.weeks_after_exit]),
|
|
1401
|
+
const U = Ae(v);
|
|
1402
|
+
U && U.classList.add(c ? o[R.weeks_before_exit] : o[R.weeks_after_exit]), k.insertBefore(v, k.firstChild);
|
|
1403
1403
|
});
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
}
|
|
1407
1407
|
function aa(e, t, o, n) {
|
|
1408
|
-
const r = e[0], i = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: l } = o ?? {}, { addDays: d, differenceInCalendarDays: u, differenceInCalendarMonths: c, endOfBroadcastWeek: h, endOfISOWeek: y, endOfMonth: C, endOfWeek: N, isAfter: w, startOfBroadcastWeek: W, startOfISOWeek: P, startOfWeek:
|
|
1408
|
+
const r = e[0], i = e[e.length - 1], { ISOWeek: a, fixedWeeks: s, broadcastCalendar: l } = o ?? {}, { addDays: d, differenceInCalendarDays: u, differenceInCalendarMonths: c, endOfBroadcastWeek: h, endOfISOWeek: y, endOfMonth: C, endOfWeek: N, isAfter: w, startOfBroadcastWeek: W, startOfISOWeek: P, startOfWeek: k } = n, O = l ? W(r, n) : a ? P(r) : k(r), v = l ? h(i) : a ? y(C(i)) : N(C(i)), m = t && (l ? h(t) : a ? y(t) : N(t)), S = m && w(v, m) ? m : v, T = u(S, O), B = c(i, r) + 1, F = [];
|
|
1409
1409
|
for (let J = 0; J <= T; J++) {
|
|
1410
1410
|
const j = d(O, J);
|
|
1411
1411
|
F.push(j);
|
|
@@ -1449,18 +1449,18 @@ function Qe(e, t, o, n) {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
function la(e, t, o, n) {
|
|
1451
1451
|
const { addDays: r, endOfBroadcastWeek: i, endOfISOWeek: a, endOfMonth: s, endOfWeek: l, getISOWeek: d, getWeek: u, startOfBroadcastWeek: c, startOfISOWeek: h, startOfWeek: y } = n, C = e.reduce((N, w) => {
|
|
1452
|
-
const W = o.broadcastCalendar ? c(w, n) : o.ISOWeek ? h(w) : y(w), P = o.broadcastCalendar ? i(w) : o.ISOWeek ? a(s(w)) : l(s(w)),
|
|
1453
|
-
if (o.fixedWeeks &&
|
|
1452
|
+
const W = o.broadcastCalendar ? c(w, n) : o.ISOWeek ? h(w) : y(w), P = o.broadcastCalendar ? i(w) : o.ISOWeek ? a(s(w)) : l(s(w)), k = t.filter((S) => S >= W && S <= P), O = o.broadcastCalendar ? 35 : 42;
|
|
1453
|
+
if (o.fixedWeeks && k.length < O) {
|
|
1454
1454
|
const S = t.filter((T) => {
|
|
1455
|
-
const B = O -
|
|
1455
|
+
const B = O - k.length;
|
|
1456
1456
|
return T > P && T <= r(P, B);
|
|
1457
1457
|
});
|
|
1458
|
-
|
|
1458
|
+
k.push(...S);
|
|
1459
1459
|
}
|
|
1460
|
-
const
|
|
1460
|
+
const v = k.reduce((S, T) => {
|
|
1461
1461
|
const B = o.ISOWeek ? d(T) : u(T), F = S.find((ne) => ne.weekNumber === B), U = new ut(T, w, n);
|
|
1462
1462
|
return F ? F.days.push(U) : S.push(new Xo(B, [U])), S;
|
|
1463
|
-
}, []), m = new Jo(w,
|
|
1463
|
+
}, []), m = new Jo(w, v);
|
|
1464
1464
|
return N.push(m), N;
|
|
1465
1465
|
}, []);
|
|
1466
1466
|
return o.reverseMonths ? C.reverse() : C;
|
|
@@ -1512,11 +1512,11 @@ function ha(e, t) {
|
|
|
1512
1512
|
l(O);
|
|
1513
1513
|
}, [e.timeZone]);
|
|
1514
1514
|
const { months: d, weeks: u, days: c, previousMonth: h, nextMonth: y } = ce(() => {
|
|
1515
|
-
const O = ia(s, n, { numberOfMonths: e.numberOfMonths }, t),
|
|
1515
|
+
const O = ia(s, n, { numberOfMonths: e.numberOfMonths }, t), v = aa(O, e.endMonth ? i(e.endMonth) : void 0, {
|
|
1516
1516
|
ISOWeek: e.ISOWeek,
|
|
1517
1517
|
fixedWeeks: e.fixedWeeks,
|
|
1518
1518
|
broadcastCalendar: e.broadcastCalendar
|
|
1519
|
-
}, t), m = la(O,
|
|
1519
|
+
}, t), m = la(O, v, {
|
|
1520
1520
|
broadcastCalendar: e.broadcastCalendar,
|
|
1521
1521
|
fixedWeeks: e.fixedWeeks,
|
|
1522
1522
|
ISOWeek: e.ISOWeek,
|
|
@@ -1542,11 +1542,11 @@ function ha(e, t) {
|
|
|
1542
1542
|
e.numberOfMonths,
|
|
1543
1543
|
e.pagedNavigation,
|
|
1544
1544
|
e.reverseMonths
|
|
1545
|
-
]), { disableNavigation: C, onMonthChange: N } = e, w = (O) => u.some((
|
|
1545
|
+
]), { disableNavigation: C, onMonthChange: N } = e, w = (O) => u.some((v) => v.days.some((m) => m.isEqualTo(O))), W = (O) => {
|
|
1546
1546
|
if (C)
|
|
1547
1547
|
return;
|
|
1548
|
-
let
|
|
1549
|
-
o &&
|
|
1548
|
+
let v = r(O);
|
|
1549
|
+
o && v < r(o) && (v = r(o)), n && v > r(n) && (v = r(n)), l(v), N?.(v);
|
|
1550
1550
|
};
|
|
1551
1551
|
return {
|
|
1552
1552
|
months: d,
|
|
@@ -1578,13 +1578,13 @@ function ma(e, t, o, n) {
|
|
|
1578
1578
|
return r || (r = e.find((a) => et(t(a)))), r;
|
|
1579
1579
|
}
|
|
1580
1580
|
function pa(e, t, o, n, r, i, a) {
|
|
1581
|
-
const { ISOWeek: s, broadcastCalendar: l } = i, { addDays: d, addMonths: u, addWeeks: c, addYears: h, endOfBroadcastWeek: y, endOfISOWeek: C, endOfWeek: N, max: w, min: W, startOfBroadcastWeek: P, startOfISOWeek:
|
|
1581
|
+
const { ISOWeek: s, broadcastCalendar: l } = i, { addDays: d, addMonths: u, addWeeks: c, addYears: h, endOfBroadcastWeek: y, endOfISOWeek: C, endOfWeek: N, max: w, min: W, startOfBroadcastWeek: P, startOfISOWeek: k, startOfWeek: O } = a;
|
|
1582
1582
|
let m = {
|
|
1583
1583
|
day: d,
|
|
1584
1584
|
week: c,
|
|
1585
1585
|
month: u,
|
|
1586
1586
|
year: h,
|
|
1587
|
-
startOfWeek: (S) => l ? P(S, a) : s ?
|
|
1587
|
+
startOfWeek: (S) => l ? P(S, a) : s ? k(S) : O(S),
|
|
1588
1588
|
endOfWeek: (S) => l ? y(S) : s ? C(S) : N(S)
|
|
1589
1589
|
}[e](o, t === "after" ? 1 : -1);
|
|
1590
1590
|
return t === "before" && n ? m = w([n, m]) : t === "after" && r && (m = W([r, m])), m;
|
|
@@ -1608,7 +1608,7 @@ function ya(e, t, o, n, r) {
|
|
|
1608
1608
|
if (!d)
|
|
1609
1609
|
return;
|
|
1610
1610
|
const W = bt(N, w, d, t.navStart, t.navEnd, e, r);
|
|
1611
|
-
W && (e.disableNavigation && !t.days.some((
|
|
1611
|
+
W && (e.disableNavigation && !t.days.some((k) => k.isEqualTo(W)) || (t.goToDay(W), u(W)));
|
|
1612
1612
|
}
|
|
1613
1613
|
};
|
|
1614
1614
|
}
|
|
@@ -1794,48 +1794,48 @@ function Oa(e) {
|
|
|
1794
1794
|
t.classNames
|
|
1795
1795
|
]);
|
|
1796
1796
|
t.today || (t = { ...t, today: a.today() });
|
|
1797
|
-
const { captionLayout: d, mode: u, navLayout: c, numberOfMonths: h = 1, onDayBlur: y, onDayClick: C, onDayFocus: N, onDayKeyDown: w, onDayMouseEnter: W, onDayMouseLeave: P, onNextClick:
|
|
1797
|
+
const { captionLayout: d, mode: u, navLayout: c, numberOfMonths: h = 1, onDayBlur: y, onDayClick: C, onDayFocus: N, onDayKeyDown: w, onDayMouseEnter: W, onDayMouseLeave: P, onNextClick: k, onPrevClick: O, showWeekNumber: v, styles: m } = t, { formatCaption: S, formatDay: T, formatMonthDropdown: B, formatWeekNumber: F, formatWeekNumberHeader: U, formatWeekdayName: ne, formatYearDropdown: J } = r, j = ha(t, a), { days: ae, months: pe, navStart: we, navEnd: De, previousMonth: H, nextMonth: $, goToMonth: X } = j, Oe = Wr(ae, t, we, De, a), { isSelected: Ce, select: We, selected: ye } = Da(t, a) ?? {}, { blur: He, focused: $e, isFocusTarget: _t, moveFocus: Ze, setFocused: ge } = ya(t, j, Oe, Ce ?? (() => !1), a), { labelDayButton: Et, labelGridcell: Tt, labelGrid: At, labelMonthDropdown: Ft, labelNav: Ue, labelPrevious: It, labelNext: Bt, labelWeekday: Yt, labelWeekNumber: Rt, labelWeekNumberHeader: zt, labelYearDropdown: jt } = i, qt = ce(() => jr(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Ge = u !== void 0 || C !== void 0, Se = q(() => {
|
|
1798
1798
|
H && (X(H), O?.(H));
|
|
1799
1799
|
}, [H, X, O]), xe = q(() => {
|
|
1800
|
-
$ && (X($),
|
|
1801
|
-
}, [X, $,
|
|
1802
|
-
|
|
1803
|
-
}, [We, C, ge]), $t = q((D, E) => (
|
|
1804
|
-
ge(D), N?.(D.date, E,
|
|
1805
|
-
}, [N, ge]), Zt = q((D, E) => (
|
|
1806
|
-
He(), y?.(D.date, E,
|
|
1807
|
-
}, [He, y]), Ut = q((D, E) => (
|
|
1800
|
+
$ && (X($), k?.($));
|
|
1801
|
+
}, [X, $, k]), Ht = q((D, E) => (M) => {
|
|
1802
|
+
M.preventDefault(), M.stopPropagation(), ge(D), !E.disabled && (We?.(D.date, E, M), C?.(D.date, E, M));
|
|
1803
|
+
}, [We, C, ge]), $t = q((D, E) => (M) => {
|
|
1804
|
+
ge(D), N?.(D.date, E, M);
|
|
1805
|
+
}, [N, ge]), Zt = q((D, E) => (M) => {
|
|
1806
|
+
He(), y?.(D.date, E, M);
|
|
1807
|
+
}, [He, y]), Ut = q((D, E) => (M) => {
|
|
1808
1808
|
const _ = {
|
|
1809
1809
|
ArrowLeft: [
|
|
1810
|
-
|
|
1810
|
+
M.shiftKey ? "month" : "day",
|
|
1811
1811
|
t.dir === "rtl" ? "after" : "before"
|
|
1812
1812
|
],
|
|
1813
1813
|
ArrowRight: [
|
|
1814
|
-
|
|
1814
|
+
M.shiftKey ? "month" : "day",
|
|
1815
1815
|
t.dir === "rtl" ? "before" : "after"
|
|
1816
1816
|
],
|
|
1817
|
-
ArrowDown: [
|
|
1818
|
-
ArrowUp: [
|
|
1819
|
-
PageUp: [
|
|
1820
|
-
PageDown: [
|
|
1817
|
+
ArrowDown: [M.shiftKey ? "year" : "week", "after"],
|
|
1818
|
+
ArrowUp: [M.shiftKey ? "year" : "week", "before"],
|
|
1819
|
+
PageUp: [M.shiftKey ? "year" : "month", "before"],
|
|
1820
|
+
PageDown: [M.shiftKey ? "year" : "month", "after"],
|
|
1821
1821
|
Home: ["startOfWeek", "before"],
|
|
1822
1822
|
End: ["endOfWeek", "after"]
|
|
1823
1823
|
};
|
|
1824
|
-
if (_[
|
|
1825
|
-
|
|
1826
|
-
const [G, x] = _[
|
|
1824
|
+
if (_[M.key]) {
|
|
1825
|
+
M.preventDefault(), M.stopPropagation();
|
|
1826
|
+
const [G, x] = _[M.key];
|
|
1827
1827
|
Ze(G, x);
|
|
1828
1828
|
}
|
|
1829
|
-
w?.(D.date, E,
|
|
1830
|
-
}, [Ze, w, t.dir]), Gt = q((D, E) => (
|
|
1831
|
-
W?.(D.date, E,
|
|
1832
|
-
}, [W]), Vt = q((D, E) => (
|
|
1833
|
-
P?.(D.date, E,
|
|
1829
|
+
w?.(D.date, E, M);
|
|
1830
|
+
}, [Ze, w, t.dir]), Gt = q((D, E) => (M) => {
|
|
1831
|
+
W?.(D.date, E, M);
|
|
1832
|
+
}, [W]), Vt = q((D, E) => (M) => {
|
|
1833
|
+
P?.(D.date, E, M);
|
|
1834
1834
|
}, [P]), Kt = q((D) => (E) => {
|
|
1835
|
-
const
|
|
1835
|
+
const M = Number(E.target.value), _ = a.setMonth(a.startOfMonth(D), M);
|
|
1836
1836
|
X(_);
|
|
1837
1837
|
}, [a, X]), Lt = q((D) => (E) => {
|
|
1838
|
-
const
|
|
1838
|
+
const M = Number(E.target.value), _ = a.setYear(a.startOfMonth(D), M);
|
|
1839
1839
|
X(_);
|
|
1840
1840
|
}, [a, X]), { className: Jt, style: Xt } = ce(() => ({
|
|
1841
1841
|
className: [l[p.Root], t.className].filter(Boolean).join(" "),
|
|
@@ -1893,8 +1893,8 @@ function Oa(e) {
|
|
|
1893
1893
|
n.DropdownNav,
|
|
1894
1894
|
{ className: l[p.Dropdowns], style: m?.[p.Dropdowns] },
|
|
1895
1895
|
(() => {
|
|
1896
|
-
const
|
|
1897
|
-
return a.getMonthYearOrder() === "year-first" ? [_,
|
|
1896
|
+
const M = d === "dropdown" || d === "dropdown-months" ? f.createElement(n.MonthsDropdown, { key: "month", className: l[p.MonthsDropdown], "aria-label": Ft(), classNames: l, components: n, disabled: !!t.disableNavigation, onChange: Kt(D.date), options: Rr(D.date, we, De, r, a), style: m?.[p.Dropdown], value: a.getMonth(D.date) }) : f.createElement("span", { key: "month" }, B(D.date, a)), _ = d === "dropdown" || d === "dropdown-years" ? f.createElement(n.YearsDropdown, { key: "year", className: l[p.YearsDropdown], "aria-label": jt(a.options), classNames: l, components: n, disabled: !!t.disableNavigation, onChange: Lt(D.date), options: qr(we, De, r, a, !!t.reverseYears), style: m?.[p.Dropdown], value: a.getYear(D.date) }) : f.createElement("span", { key: "year" }, J(D.date, a));
|
|
1897
|
+
return a.getMonthYearOrder() === "year-first" ? [_, M] : [M, _];
|
|
1898
1898
|
})(),
|
|
1899
1899
|
f.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
1900
1900
|
border: 0,
|
|
@@ -1921,16 +1921,16 @@ function Oa(e) {
|
|
|
1921
1921
|
!t.hideWeekdays && f.createElement(
|
|
1922
1922
|
n.Weekdays,
|
|
1923
1923
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: l[p.Weekdays], style: m?.[p.Weekdays] },
|
|
1924
|
-
|
|
1925
|
-
qt.map((
|
|
1924
|
+
v && f.createElement(n.WeekNumberHeader, { "aria-label": zt(a.options), className: l[p.WeekNumberHeader], style: m?.[p.WeekNumberHeader], scope: "col" }, U()),
|
|
1925
|
+
qt.map((M) => f.createElement(n.Weekday, { "aria-label": Yt(M, a.options, a), className: l[p.Weekday], key: String(M), style: m?.[p.Weekday], scope: "col" }, ne(M, a.options, a)))
|
|
1926
1926
|
),
|
|
1927
|
-
f.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: l[p.Weeks], style: m?.[p.Weeks] }, D.weeks.map((
|
|
1927
|
+
f.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: l[p.Weeks], style: m?.[p.Weeks] }, D.weeks.map((M) => f.createElement(
|
|
1928
1928
|
n.Week,
|
|
1929
|
-
{ className: l[p.Week], key:
|
|
1930
|
-
|
|
1929
|
+
{ className: l[p.Week], key: M.weekNumber, style: m?.[p.Week], week: M },
|
|
1930
|
+
v && f.createElement(n.WeekNumber, { week: M, style: m?.[p.WeekNumber], "aria-label": Rt(M.weekNumber, {
|
|
1931
1931
|
locale: s
|
|
1932
|
-
}), className: l[p.WeekNumber], scope: "row", role: "rowheader" }, F(
|
|
1933
|
-
|
|
1932
|
+
}), className: l[p.WeekNumber], scope: "row", role: "rowheader" }, F(M.weekNumber, a)),
|
|
1933
|
+
M.days.map((_) => {
|
|
1934
1934
|
const { date: G } = _, x = Oe(_);
|
|
1935
1935
|
if (x[A.focused] = !x.hidden && !!$e?.isEqualTo(_), x[Z.selected] = Ce?.(G) || x.selected, be(ye)) {
|
|
1936
1936
|
const { from: Ne, to: Pe } = ye;
|
|
@@ -1958,11 +1958,11 @@ function es({
|
|
|
1958
1958
|
...s
|
|
1959
1959
|
}) {
|
|
1960
1960
|
const l = je();
|
|
1961
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ g(
|
|
1962
1962
|
Oa,
|
|
1963
1963
|
{
|
|
1964
1964
|
showOutsideDays: o,
|
|
1965
|
-
className:
|
|
1965
|
+
className: b(
|
|
1966
1966
|
"bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
1967
1967
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
1968
1968
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
@@ -1974,106 +1974,106 @@ function es({
|
|
|
1974
1974
|
...i
|
|
1975
1975
|
},
|
|
1976
1976
|
classNames: {
|
|
1977
|
-
root:
|
|
1978
|
-
months:
|
|
1977
|
+
root: b("w-fit", l.root),
|
|
1978
|
+
months: b(
|
|
1979
1979
|
"relative flex flex-col gap-4 md:flex-row",
|
|
1980
1980
|
l.months
|
|
1981
1981
|
),
|
|
1982
|
-
month:
|
|
1983
|
-
nav:
|
|
1982
|
+
month: b("flex w-full flex-col gap-4", l.month),
|
|
1983
|
+
nav: b(
|
|
1984
1984
|
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
1985
1985
|
l.nav
|
|
1986
1986
|
),
|
|
1987
|
-
button_previous:
|
|
1987
|
+
button_previous: b(
|
|
1988
1988
|
Ke({ variant: r }),
|
|
1989
1989
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1990
1990
|
l.button_previous
|
|
1991
1991
|
),
|
|
1992
|
-
button_next:
|
|
1992
|
+
button_next: b(
|
|
1993
1993
|
Ke({ variant: r }),
|
|
1994
1994
|
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
1995
1995
|
l.button_next
|
|
1996
1996
|
),
|
|
1997
|
-
month_caption:
|
|
1997
|
+
month_caption: b(
|
|
1998
1998
|
"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",
|
|
1999
1999
|
l.month_caption
|
|
2000
2000
|
),
|
|
2001
|
-
dropdowns:
|
|
2001
|
+
dropdowns: b(
|
|
2002
2002
|
"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
2003
2003
|
l.dropdowns
|
|
2004
2004
|
),
|
|
2005
|
-
dropdown_root:
|
|
2005
|
+
dropdown_root: b(
|
|
2006
2006
|
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
|
2007
2007
|
l.dropdown_root
|
|
2008
2008
|
),
|
|
2009
|
-
dropdown:
|
|
2009
|
+
dropdown: b(
|
|
2010
2010
|
"bg-popover absolute inset-0 opacity-0",
|
|
2011
2011
|
l.dropdown
|
|
2012
2012
|
),
|
|
2013
|
-
caption_label:
|
|
2013
|
+
caption_label: b(
|
|
2014
2014
|
"select-none font-medium",
|
|
2015
2015
|
n === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",
|
|
2016
2016
|
l.caption_label
|
|
2017
2017
|
),
|
|
2018
2018
|
table: "w-full border-collapse",
|
|
2019
|
-
weekdays:
|
|
2020
|
-
weekday:
|
|
2019
|
+
weekdays: b("flex", l.weekdays),
|
|
2020
|
+
weekday: b(
|
|
2021
2021
|
"text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",
|
|
2022
2022
|
l.weekday
|
|
2023
2023
|
),
|
|
2024
|
-
week:
|
|
2025
|
-
week_number_header:
|
|
2024
|
+
week: b("mt-2 flex w-full", l.week),
|
|
2025
|
+
week_number_header: b(
|
|
2026
2026
|
"w-[--cell-size] select-none",
|
|
2027
2027
|
l.week_number_header
|
|
2028
2028
|
),
|
|
2029
|
-
week_number:
|
|
2029
|
+
week_number: b(
|
|
2030
2030
|
"text-muted-foreground select-none text-[0.8rem]",
|
|
2031
2031
|
l.week_number
|
|
2032
2032
|
),
|
|
2033
|
-
day:
|
|
2033
|
+
day: b(
|
|
2034
2034
|
"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
2035
2035
|
l.day
|
|
2036
2036
|
),
|
|
2037
|
-
range_start:
|
|
2037
|
+
range_start: b(
|
|
2038
2038
|
"bg-accent rounded-l-md",
|
|
2039
2039
|
l.range_start
|
|
2040
2040
|
),
|
|
2041
|
-
range_middle:
|
|
2042
|
-
range_end:
|
|
2043
|
-
today:
|
|
2041
|
+
range_middle: b("rounded-none", l.range_middle),
|
|
2042
|
+
range_end: b("bg-accent rounded-r-md", l.range_end),
|
|
2043
|
+
today: b(
|
|
2044
2044
|
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
2045
2045
|
l.today
|
|
2046
2046
|
),
|
|
2047
|
-
outside:
|
|
2047
|
+
outside: b(
|
|
2048
2048
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
2049
2049
|
l.outside
|
|
2050
2050
|
),
|
|
2051
|
-
disabled:
|
|
2051
|
+
disabled: b(
|
|
2052
2052
|
"text-muted-foreground opacity-50",
|
|
2053
2053
|
l.disabled
|
|
2054
2054
|
),
|
|
2055
|
-
hidden:
|
|
2055
|
+
hidden: b("invisible", l.hidden),
|
|
2056
2056
|
...t
|
|
2057
2057
|
},
|
|
2058
2058
|
components: {
|
|
2059
|
-
Root: ({ className: d, rootRef: u, ...c }) => /* @__PURE__ */
|
|
2059
|
+
Root: ({ className: d, rootRef: u, ...c }) => /* @__PURE__ */ g(
|
|
2060
2060
|
"div",
|
|
2061
2061
|
{
|
|
2062
2062
|
"data-slot": "calendar",
|
|
2063
2063
|
ref: u,
|
|
2064
|
-
className:
|
|
2064
|
+
className: b(d),
|
|
2065
2065
|
...c
|
|
2066
2066
|
}
|
|
2067
2067
|
),
|
|
2068
|
-
Chevron: ({ className: d, orientation: u, ...c }) => u === "left" ? /* @__PURE__ */
|
|
2068
|
+
Chevron: ({ className: d, orientation: u, ...c }) => u === "left" ? /* @__PURE__ */ g(co, { className: b("size-4", d), ...c }) : u === "right" ? /* @__PURE__ */ g(
|
|
2069
2069
|
mn,
|
|
2070
2070
|
{
|
|
2071
|
-
className:
|
|
2071
|
+
className: b("size-4", d),
|
|
2072
2072
|
...c
|
|
2073
2073
|
}
|
|
2074
|
-
) : /* @__PURE__ */
|
|
2074
|
+
) : /* @__PURE__ */ g(pn, { className: b("size-4", d), ...c }),
|
|
2075
2075
|
DayButton: Ca,
|
|
2076
|
-
WeekNumber: ({ children: d, ...u }) => /* @__PURE__ */
|
|
2076
|
+
WeekNumber: ({ children: d, ...u }) => /* @__PURE__ */ g("td", { ...u, children: /* @__PURE__ */ g("div", { className: "flex size-[--cell-size] items-center justify-center text-center", children: d }) }),
|
|
2077
2077
|
...a
|
|
2078
2078
|
},
|
|
2079
2079
|
...s
|
|
@@ -2089,7 +2089,7 @@ function Ca({
|
|
|
2089
2089
|
const r = je(), i = I.useRef(null);
|
|
2090
2090
|
return I.useEffect(() => {
|
|
2091
2091
|
o.focused && i.current?.focus();
|
|
2092
|
-
}, [o.focused]), /* @__PURE__ */
|
|
2092
|
+
}, [o.focused]), /* @__PURE__ */ g(
|
|
2093
2093
|
yn,
|
|
2094
2094
|
{
|
|
2095
2095
|
ref: i,
|
|
@@ -2100,7 +2100,7 @@ function Ca({
|
|
|
2100
2100
|
"data-range-start": o.range_start,
|
|
2101
2101
|
"data-range-end": o.range_end,
|
|
2102
2102
|
"data-range-middle": o.range_middle,
|
|
2103
|
-
className:
|
|
2103
|
+
className: b(
|
|
2104
2104
|
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",
|
|
2105
2105
|
r.day,
|
|
2106
2106
|
e
|
|
@@ -2125,7 +2125,7 @@ var ke = "Popover", [Mt] = bn(ke, [
|
|
|
2125
2125
|
onChange: i,
|
|
2126
2126
|
caller: ke
|
|
2127
2127
|
});
|
|
2128
|
-
return /* @__PURE__ */
|
|
2128
|
+
return /* @__PURE__ */ g(vn, { ...s, children: /* @__PURE__ */ g(
|
|
2129
2129
|
Wa,
|
|
2130
2130
|
{
|
|
2131
2131
|
scope: t,
|
|
@@ -2146,13 +2146,13 @@ kt.displayName = ke;
|
|
|
2146
2146
|
var wt = "PopoverAnchor", Dt = I.forwardRef(
|
|
2147
2147
|
(e, t) => {
|
|
2148
2148
|
const { __scopePopover: o, ...n } = e, r = oe(wt, o), i = me(o), { onCustomAnchorAdd: a, onCustomAnchorRemove: s } = r;
|
|
2149
|
-
return I.useEffect(() => (a(), () => s()), [a, s]), /* @__PURE__ */
|
|
2149
|
+
return I.useEffect(() => (a(), () => s()), [a, s]), /* @__PURE__ */ g(st, { ...i, ...n, ref: t });
|
|
2150
2150
|
}
|
|
2151
2151
|
);
|
|
2152
2152
|
Dt.displayName = wt;
|
|
2153
2153
|
var Ot = "PopoverTrigger", Ct = I.forwardRef(
|
|
2154
2154
|
(e, t) => {
|
|
2155
|
-
const { __scopePopover: o, ...n } = e, r = oe(Ot, o), i = me(o), a = rt(t, r.triggerRef), s = /* @__PURE__ */
|
|
2155
|
+
const { __scopePopover: o, ...n } = e, r = oe(Ot, o), i = me(o), a = rt(t, r.triggerRef), s = /* @__PURE__ */ g(
|
|
2156
2156
|
at.button,
|
|
2157
2157
|
{
|
|
2158
2158
|
type: "button",
|
|
@@ -2165,7 +2165,7 @@ var Ot = "PopoverTrigger", Ct = I.forwardRef(
|
|
|
2165
2165
|
onClick: ue(e.onClick, r.onOpenToggle)
|
|
2166
2166
|
}
|
|
2167
2167
|
);
|
|
2168
|
-
return r.hasCustomAnchor ? s : /* @__PURE__ */
|
|
2168
|
+
return r.hasCustomAnchor ? s : /* @__PURE__ */ g(st, { asChild: !0, ...i, children: s });
|
|
2169
2169
|
}
|
|
2170
2170
|
);
|
|
2171
2171
|
Ct.displayName = Ot;
|
|
@@ -2173,13 +2173,13 @@ var qe = "PopoverPortal", [Sa, xa] = Mt(qe, {
|
|
|
2173
2173
|
forceMount: void 0
|
|
2174
2174
|
}), Wt = (e) => {
|
|
2175
2175
|
const { __scopePopover: t, forceMount: o, children: n, container: r } = e, i = oe(qe, t);
|
|
2176
|
-
return /* @__PURE__ */
|
|
2176
|
+
return /* @__PURE__ */ g(Sa, { scope: t, forceMount: o, children: /* @__PURE__ */ g(it, { present: o || i.open, children: /* @__PURE__ */ g(kn, { asChild: !0, container: r, children: n }) }) });
|
|
2177
2177
|
};
|
|
2178
2178
|
Wt.displayName = qe;
|
|
2179
2179
|
var se = "PopoverContent", St = I.forwardRef(
|
|
2180
2180
|
(e, t) => {
|
|
2181
2181
|
const o = xa(se, e.__scopePopover), { forceMount: n = o.forceMount, ...r } = e, i = oe(se, e.__scopePopover);
|
|
2182
|
-
return /* @__PURE__ */
|
|
2182
|
+
return /* @__PURE__ */ g(it, { present: n || i.open, children: i.modal ? /* @__PURE__ */ g(Pa, { ...r, ref: t }) : /* @__PURE__ */ g(_a, { ...r, ref: t }) });
|
|
2183
2183
|
}
|
|
2184
2184
|
);
|
|
2185
2185
|
St.displayName = se;
|
|
@@ -2189,7 +2189,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2189
2189
|
return I.useEffect(() => {
|
|
2190
2190
|
const a = n.current;
|
|
2191
2191
|
if (a) return wn(a);
|
|
2192
|
-
}, []), /* @__PURE__ */
|
|
2192
|
+
}, []), /* @__PURE__ */ g(Dn, { as: Na, allowPinchZoom: !0, children: /* @__PURE__ */ g(
|
|
2193
2193
|
xt,
|
|
2194
2194
|
{
|
|
2195
2195
|
...e,
|
|
@@ -2218,7 +2218,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2218
2218
|
), _a = I.forwardRef(
|
|
2219
2219
|
(e, t) => {
|
|
2220
2220
|
const o = oe(se, e.__scopePopover), n = I.useRef(!1), r = I.useRef(!1);
|
|
2221
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ g(
|
|
2222
2222
|
xt,
|
|
2223
2223
|
{
|
|
2224
2224
|
...e,
|
|
@@ -2250,7 +2250,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2250
2250
|
onInteractOutside: u,
|
|
2251
2251
|
...c
|
|
2252
2252
|
} = e, h = oe(se, o), y = me(o);
|
|
2253
|
-
return Cn(), /* @__PURE__ */
|
|
2253
|
+
return Cn(), /* @__PURE__ */ g(
|
|
2254
2254
|
Wn,
|
|
2255
2255
|
{
|
|
2256
2256
|
asChild: !0,
|
|
@@ -2258,7 +2258,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2258
2258
|
trapped: n,
|
|
2259
2259
|
onMountAutoFocus: r,
|
|
2260
2260
|
onUnmountAutoFocus: i,
|
|
2261
|
-
children: /* @__PURE__ */
|
|
2261
|
+
children: /* @__PURE__ */ g(
|
|
2262
2262
|
Sn,
|
|
2263
2263
|
{
|
|
2264
2264
|
asChild: !0,
|
|
@@ -2268,7 +2268,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2268
2268
|
onPointerDownOutside: l,
|
|
2269
2269
|
onFocusOutside: d,
|
|
2270
2270
|
onDismiss: () => h.onOpenChange(!1),
|
|
2271
|
-
children: /* @__PURE__ */
|
|
2271
|
+
children: /* @__PURE__ */ g(
|
|
2272
2272
|
xn,
|
|
2273
2273
|
{
|
|
2274
2274
|
"data-state": Pt(h.open),
|
|
@@ -2295,7 +2295,7 @@ var Na = On("PopoverContent.RemoveScroll"), Pa = I.forwardRef(
|
|
|
2295
2295
|
), Nt = "PopoverClose", Ea = I.forwardRef(
|
|
2296
2296
|
(e, t) => {
|
|
2297
2297
|
const { __scopePopover: o, ...n } = e, r = oe(Nt, o);
|
|
2298
|
-
return /* @__PURE__ */
|
|
2298
|
+
return /* @__PURE__ */ g(
|
|
2299
2299
|
at.button,
|
|
2300
2300
|
{
|
|
2301
2301
|
type: "button",
|
|
@@ -2310,7 +2310,7 @@ Ea.displayName = Nt;
|
|
|
2310
2310
|
var Ta = "PopoverArrow", Aa = I.forwardRef(
|
|
2311
2311
|
(e, t) => {
|
|
2312
2312
|
const { __scopePopover: o, ...n } = e, r = me(o);
|
|
2313
|
-
return /* @__PURE__ */
|
|
2313
|
+
return /* @__PURE__ */ g(Nn, { ...r, ...n, ref: t });
|
|
2314
2314
|
}
|
|
2315
2315
|
);
|
|
2316
2316
|
Aa.displayName = Ta;
|
|
@@ -2321,12 +2321,12 @@ var Fa = kt, Ia = Dt, Ba = Ct, Ya = Wt, Ra = St;
|
|
|
2321
2321
|
function ts({
|
|
2322
2322
|
...e
|
|
2323
2323
|
}) {
|
|
2324
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ g(Fa, { "data-slot": "popover", ...e });
|
|
2325
2325
|
}
|
|
2326
2326
|
function ns({
|
|
2327
2327
|
...e
|
|
2328
2328
|
}) {
|
|
2329
|
-
return /* @__PURE__ */
|
|
2329
|
+
return /* @__PURE__ */ g(Ba, { "data-slot": "popover-trigger", ...e });
|
|
2330
2330
|
}
|
|
2331
2331
|
function os({
|
|
2332
2332
|
className: e,
|
|
@@ -2334,13 +2334,13 @@ function os({
|
|
|
2334
2334
|
sideOffset: o = 4,
|
|
2335
2335
|
...n
|
|
2336
2336
|
}) {
|
|
2337
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ g(Ya, { children: /* @__PURE__ */ g(
|
|
2338
2338
|
Ra,
|
|
2339
2339
|
{
|
|
2340
2340
|
"data-slot": "popover-content",
|
|
2341
2341
|
align: t,
|
|
2342
2342
|
sideOffset: o,
|
|
2343
|
-
className:
|
|
2343
|
+
className: b(
|
|
2344
2344
|
"z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
2345
2345
|
e
|
|
2346
2346
|
),
|
|
@@ -2351,7 +2351,40 @@ function os({
|
|
|
2351
2351
|
function rs({
|
|
2352
2352
|
...e
|
|
2353
2353
|
}) {
|
|
2354
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ g(Ia, { "data-slot": "popover-anchor", ...e });
|
|
2355
|
+
}
|
|
2356
|
+
function as({ className: e, ...t }) {
|
|
2357
|
+
return /* @__PURE__ */ g(
|
|
2358
|
+
"div",
|
|
2359
|
+
{
|
|
2360
|
+
"data-slot": "popover-header",
|
|
2361
|
+
className: b("flex flex-col gap-1 text-sm", e),
|
|
2362
|
+
...t
|
|
2363
|
+
}
|
|
2364
|
+
);
|
|
2365
|
+
}
|
|
2366
|
+
function ss({ className: e, ...t }) {
|
|
2367
|
+
return /* @__PURE__ */ g(
|
|
2368
|
+
"div",
|
|
2369
|
+
{
|
|
2370
|
+
"data-slot": "popover-title",
|
|
2371
|
+
className: b("font-medium", e),
|
|
2372
|
+
...t
|
|
2373
|
+
}
|
|
2374
|
+
);
|
|
2375
|
+
}
|
|
2376
|
+
function is({
|
|
2377
|
+
className: e,
|
|
2378
|
+
...t
|
|
2379
|
+
}) {
|
|
2380
|
+
return /* @__PURE__ */ g(
|
|
2381
|
+
"p",
|
|
2382
|
+
{
|
|
2383
|
+
"data-slot": "popover-description",
|
|
2384
|
+
className: b("text-muted-foreground", e),
|
|
2385
|
+
...t
|
|
2386
|
+
}
|
|
2387
|
+
);
|
|
2355
2388
|
}
|
|
2356
2389
|
export {
|
|
2357
2390
|
es as C,
|
|
@@ -2370,8 +2403,11 @@ export {
|
|
|
2370
2403
|
ns as k,
|
|
2371
2404
|
os as l,
|
|
2372
2405
|
rs as m,
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2406
|
+
as as n,
|
|
2407
|
+
ss as o,
|
|
2408
|
+
is as p,
|
|
2409
|
+
_e as q,
|
|
2410
|
+
ie as r,
|
|
2411
|
+
le as s,
|
|
2412
|
+
Ao as t
|
|
2377
2413
|
};
|