@lgsm/modules 1.6.3 → 1.6.4
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/main.js +132 -132
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as v, Fragment as Le, jsxs as $ } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import
|
|
3
|
+
import w, { useState as hn, forwardRef as kr, createElement as tn, useEffect as Cr, useRef as ps } from "react";
|
|
4
4
|
import * as hs from "react-dom";
|
|
5
5
|
import Nr from "react-dom";
|
|
6
6
|
import './assets/main.css';function In(e, t) {
|
|
@@ -33,9 +33,9 @@ function gn(e) {
|
|
|
33
33
|
const { children: s, ...a } = r, i = m.Children.toArray(s), u = i.find(vs);
|
|
34
34
|
if (u) {
|
|
35
35
|
const c = u.props.children, d = i.map((l) => l === u ? m.Children.count(c) > 1 ? m.Children.only(null) : m.isValidElement(c) ? c.props.children : null : l);
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ v(t, { ...a, ref: o, children: m.isValidElement(c) ? m.cloneElement(c, void 0, d) : null });
|
|
37
37
|
}
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ v(t, { ...a, ref: o, children: s });
|
|
39
39
|
});
|
|
40
40
|
return n.displayName = `${e}.Slot`, n;
|
|
41
41
|
}
|
|
@@ -2868,7 +2868,7 @@ const na = Or(
|
|
|
2868
2868
|
}
|
|
2869
2869
|
}
|
|
2870
2870
|
), sn = m.forwardRef(
|
|
2871
|
-
({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => /* @__PURE__ */
|
|
2871
|
+
({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => /* @__PURE__ */ v(
|
|
2872
2872
|
r ? gs : "button",
|
|
2873
2873
|
{
|
|
2874
2874
|
className: xe(na({ variant: t, size: n, className: e })),
|
|
@@ -2879,17 +2879,17 @@ const na = Or(
|
|
|
2879
2879
|
);
|
|
2880
2880
|
sn.displayName = "Button";
|
|
2881
2881
|
function ot({ primary: e = !1, size: t = "medium", label: n, icon: r, ...o }) {
|
|
2882
|
-
return /* @__PURE__ */
|
|
2882
|
+
return /* @__PURE__ */ v(Le, { children: e ? /* @__PURE__ */ $(
|
|
2883
2883
|
sn,
|
|
2884
2884
|
{
|
|
2885
2885
|
className: `bg-red-lgsm ${t === "large" ? "w-full" : ""}`,
|
|
2886
2886
|
...o,
|
|
2887
2887
|
children: [
|
|
2888
|
-
r !== null ? r : /* @__PURE__ */
|
|
2888
|
+
r !== null ? r : /* @__PURE__ */ v(Le, {}),
|
|
2889
2889
|
n
|
|
2890
2890
|
]
|
|
2891
2891
|
}
|
|
2892
|
-
) : /* @__PURE__ */
|
|
2892
|
+
) : /* @__PURE__ */ v(
|
|
2893
2893
|
sn,
|
|
2894
2894
|
{
|
|
2895
2895
|
className: `bg-white text-base-gray hover:bg-base-light-gray/50 ${t === "large" ? "w-full" : ""}`,
|
|
@@ -2920,7 +2920,7 @@ function pu({
|
|
|
2920
2920
|
"Count: ",
|
|
2921
2921
|
o
|
|
2922
2922
|
] }),
|
|
2923
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ v(
|
|
2924
2924
|
ot,
|
|
2925
2925
|
{
|
|
2926
2926
|
primary: !0,
|
|
@@ -2929,7 +2929,7 @@ function pu({
|
|
|
2929
2929
|
disabled: o >= r
|
|
2930
2930
|
}
|
|
2931
2931
|
),
|
|
2932
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ v(
|
|
2933
2933
|
ot,
|
|
2934
2934
|
{
|
|
2935
2935
|
primary: !0,
|
|
@@ -2938,7 +2938,7 @@ function pu({
|
|
|
2938
2938
|
disabled: o <= n
|
|
2939
2939
|
}
|
|
2940
2940
|
),
|
|
2941
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ v(
|
|
2942
2942
|
ot,
|
|
2943
2943
|
{
|
|
2944
2944
|
label: "Reset",
|
|
@@ -2956,7 +2956,7 @@ function hu({ primary: e = !1, title: t, ...n }) {
|
|
|
2956
2956
|
const r = bn(Wn.title, {
|
|
2957
2957
|
[Wn["title--primary"]]: e
|
|
2958
2958
|
});
|
|
2959
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ v(
|
|
2960
2960
|
"h1",
|
|
2961
2961
|
{
|
|
2962
2962
|
className: r,
|
|
@@ -3109,7 +3109,7 @@ const ba = [
|
|
|
3109
3109
|
variant: "default"
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
-
), Hr = m.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */
|
|
3112
|
+
), Hr = m.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ v(
|
|
3113
3113
|
"div",
|
|
3114
3114
|
{
|
|
3115
3115
|
ref: r,
|
|
@@ -3119,7 +3119,7 @@ const ba = [
|
|
|
3119
3119
|
}
|
|
3120
3120
|
));
|
|
3121
3121
|
Hr.displayName = "Alert";
|
|
3122
|
-
const Wr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
3122
|
+
const Wr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
3123
3123
|
"h5",
|
|
3124
3124
|
{
|
|
3125
3125
|
ref: n,
|
|
@@ -3128,7 +3128,7 @@ const Wr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
|
3128
3128
|
}
|
|
3129
3129
|
));
|
|
3130
3130
|
Wr.displayName = "AlertTitle";
|
|
3131
|
-
const Kr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
3131
|
+
const Kr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
3132
3132
|
"div",
|
|
3133
3133
|
{
|
|
3134
3134
|
ref: n,
|
|
@@ -3150,18 +3150,18 @@ function wa({ type: e, title: t, message: n, onClose: r, duration: o = 3e3 }) {
|
|
|
3150
3150
|
className: `fixed top-4 left-1/2 -translate-x-1/2 z-50 bg-white shadow-2xl max-w-sm w-[90%] p-4 animate-slide-in transition-opacity duration-500 ${s ? "opacity-100" : "opacity-0"}`,
|
|
3151
3151
|
children: [
|
|
3152
3152
|
/* @__PURE__ */ $("div", { className: "flex mb-4 gap-2", children: [
|
|
3153
|
-
e === "success" ? /* @__PURE__ */
|
|
3154
|
-
/* @__PURE__ */
|
|
3153
|
+
e === "success" ? /* @__PURE__ */ v(pa, { className: "text-green-600", size: 18 }) : e === "error" ? /* @__PURE__ */ v(ga, { className: "text-red-500", size: 18 }) : /* @__PURE__ */ v(fa, { className: "text-yellow-400", size: 18 }),
|
|
3154
|
+
/* @__PURE__ */ v(Wr, { children: t })
|
|
3155
3155
|
] }),
|
|
3156
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ v(Kr, { className: "text-gray-700 leading-relaxed", children: n })
|
|
3157
3157
|
]
|
|
3158
3158
|
}
|
|
3159
3159
|
);
|
|
3160
3160
|
}
|
|
3161
|
-
const gu = () => /* @__PURE__ */
|
|
3162
|
-
/* @__PURE__ */
|
|
3163
|
-
/* @__PURE__ */
|
|
3164
|
-
/* @__PURE__ */
|
|
3161
|
+
const gu = () => /* @__PURE__ */ v(Le, { children: /* @__PURE__ */ $("div", { className: "min-h-screen fast-center gap-2", children: [
|
|
3162
|
+
/* @__PURE__ */ v("div", { className: "w-4 h-4 bg-red-500 rounded-full animate-bounce" }),
|
|
3163
|
+
/* @__PURE__ */ v("div", { className: "w-4 h-4 rounded-full bg-red-500 animate-bounce [animation-delay:-.3s]" }),
|
|
3164
|
+
/* @__PURE__ */ v("div", { className: "w-4 h-4 rounded-full bg-red-500 animate-bounce [animation-delay:-.5s]" })
|
|
3165
3165
|
] }) }), Vn = (e) => {
|
|
3166
3166
|
let t;
|
|
3167
3167
|
const n = /* @__PURE__ */ new Set(), r = (c, d) => {
|
|
@@ -3174,12 +3174,12 @@ const gu = () => /* @__PURE__ */ w(Le, { children: /* @__PURE__ */ $("div", { cl
|
|
|
3174
3174
|
return i;
|
|
3175
3175
|
}, xa = (e) => e ? Vn(e) : Vn, Ea = (e) => e;
|
|
3176
3176
|
function Sa(e, t = Ea) {
|
|
3177
|
-
const n =
|
|
3177
|
+
const n = w.useSyncExternalStore(
|
|
3178
3178
|
e.subscribe,
|
|
3179
|
-
|
|
3180
|
-
|
|
3179
|
+
w.useCallback(() => t(e.getState()), [e, t]),
|
|
3180
|
+
w.useCallback(() => t(e.getInitialState()), [e, t])
|
|
3181
3181
|
);
|
|
3182
|
-
return
|
|
3182
|
+
return w.useDebugValue(n), n;
|
|
3183
3183
|
}
|
|
3184
3184
|
const qn = (e) => {
|
|
3185
3185
|
const t = xa(e), n = (r) => Sa(t, r);
|
|
@@ -3190,7 +3190,7 @@ const qn = (e) => {
|
|
|
3190
3190
|
}));
|
|
3191
3191
|
function bu() {
|
|
3192
3192
|
const { notification: e, setNotification: t } = ka();
|
|
3193
|
-
return e ? /* @__PURE__ */
|
|
3193
|
+
return e ? /* @__PURE__ */ v(
|
|
3194
3194
|
wa,
|
|
3195
3195
|
{
|
|
3196
3196
|
type: "",
|
|
@@ -3218,58 +3218,58 @@ const Na = (e) => {
|
|
|
3218
3218
|
default:
|
|
3219
3219
|
return null;
|
|
3220
3220
|
}
|
|
3221
|
-
}, Aa = Array(12).fill(0), Ta = ({ visible: e, className: t }) => /* @__PURE__ */
|
|
3221
|
+
}, Aa = Array(12).fill(0), Ta = ({ visible: e, className: t }) => /* @__PURE__ */ w.createElement("div", {
|
|
3222
3222
|
className: [
|
|
3223
3223
|
"sonner-loading-wrapper",
|
|
3224
3224
|
t
|
|
3225
3225
|
].filter(Boolean).join(" "),
|
|
3226
3226
|
"data-visible": e
|
|
3227
|
-
}, /* @__PURE__ */
|
|
3227
|
+
}, /* @__PURE__ */ w.createElement("div", {
|
|
3228
3228
|
className: "sonner-spinner"
|
|
3229
|
-
}, Aa.map((n, r) => /* @__PURE__ */
|
|
3229
|
+
}, Aa.map((n, r) => /* @__PURE__ */ w.createElement("div", {
|
|
3230
3230
|
className: "sonner-loading-bar",
|
|
3231
3231
|
key: `spinner-bar-${r}`
|
|
3232
|
-
})))), Oa = /* @__PURE__ */
|
|
3232
|
+
})))), Oa = /* @__PURE__ */ w.createElement("svg", {
|
|
3233
3233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3234
3234
|
viewBox: "0 0 20 20",
|
|
3235
3235
|
fill: "currentColor",
|
|
3236
3236
|
height: "20",
|
|
3237
3237
|
width: "20"
|
|
3238
|
-
}, /* @__PURE__ */
|
|
3238
|
+
}, /* @__PURE__ */ w.createElement("path", {
|
|
3239
3239
|
fillRule: "evenodd",
|
|
3240
3240
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
3241
3241
|
clipRule: "evenodd"
|
|
3242
|
-
})), Da = /* @__PURE__ */
|
|
3242
|
+
})), Da = /* @__PURE__ */ w.createElement("svg", {
|
|
3243
3243
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3244
3244
|
viewBox: "0 0 24 24",
|
|
3245
3245
|
fill: "currentColor",
|
|
3246
3246
|
height: "20",
|
|
3247
3247
|
width: "20"
|
|
3248
|
-
}, /* @__PURE__ */
|
|
3248
|
+
}, /* @__PURE__ */ w.createElement("path", {
|
|
3249
3249
|
fillRule: "evenodd",
|
|
3250
3250
|
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
3251
3251
|
clipRule: "evenodd"
|
|
3252
|
-
})), Pa = /* @__PURE__ */
|
|
3252
|
+
})), Pa = /* @__PURE__ */ w.createElement("svg", {
|
|
3253
3253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3254
3254
|
viewBox: "0 0 20 20",
|
|
3255
3255
|
fill: "currentColor",
|
|
3256
3256
|
height: "20",
|
|
3257
3257
|
width: "20"
|
|
3258
|
-
}, /* @__PURE__ */
|
|
3258
|
+
}, /* @__PURE__ */ w.createElement("path", {
|
|
3259
3259
|
fillRule: "evenodd",
|
|
3260
3260
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
3261
3261
|
clipRule: "evenodd"
|
|
3262
|
-
})), Ma = /* @__PURE__ */
|
|
3262
|
+
})), Ma = /* @__PURE__ */ w.createElement("svg", {
|
|
3263
3263
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3264
3264
|
viewBox: "0 0 20 20",
|
|
3265
3265
|
fill: "currentColor",
|
|
3266
3266
|
height: "20",
|
|
3267
3267
|
width: "20"
|
|
3268
|
-
}, /* @__PURE__ */
|
|
3268
|
+
}, /* @__PURE__ */ w.createElement("path", {
|
|
3269
3269
|
fillRule: "evenodd",
|
|
3270
3270
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
3271
3271
|
clipRule: "evenodd"
|
|
3272
|
-
})), Fa = /* @__PURE__ */
|
|
3272
|
+
})), Fa = /* @__PURE__ */ w.createElement("svg", {
|
|
3273
3273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3274
3274
|
width: "12",
|
|
3275
3275
|
height: "12",
|
|
@@ -3279,19 +3279,19 @@ const Na = (e) => {
|
|
|
3279
3279
|
strokeWidth: "1.5",
|
|
3280
3280
|
strokeLinecap: "round",
|
|
3281
3281
|
strokeLinejoin: "round"
|
|
3282
|
-
}, /* @__PURE__ */
|
|
3282
|
+
}, /* @__PURE__ */ w.createElement("line", {
|
|
3283
3283
|
x1: "18",
|
|
3284
3284
|
y1: "6",
|
|
3285
3285
|
x2: "6",
|
|
3286
3286
|
y2: "18"
|
|
3287
|
-
}), /* @__PURE__ */
|
|
3287
|
+
}), /* @__PURE__ */ w.createElement("line", {
|
|
3288
3288
|
x1: "6",
|
|
3289
3289
|
y1: "6",
|
|
3290
3290
|
x2: "18",
|
|
3291
3291
|
y2: "18"
|
|
3292
3292
|
})), Ia = () => {
|
|
3293
|
-
const [e, t] =
|
|
3294
|
-
return
|
|
3293
|
+
const [e, t] = w.useState(document.hidden);
|
|
3294
|
+
return w.useEffect(() => {
|
|
3295
3295
|
const n = () => {
|
|
3296
3296
|
t(document.hidden);
|
|
3297
3297
|
};
|
|
@@ -3379,7 +3379,7 @@ class Ba {
|
|
|
3379
3379
|
if (a = [
|
|
3380
3380
|
"resolve",
|
|
3381
3381
|
c
|
|
3382
|
-
],
|
|
3382
|
+
], w.isValidElement(c))
|
|
3383
3383
|
s = !1, this.create({
|
|
3384
3384
|
id: r,
|
|
3385
3385
|
type: "default",
|
|
@@ -3387,7 +3387,7 @@ class Ba {
|
|
|
3387
3387
|
});
|
|
3388
3388
|
else if (Ua(c) && !c.ok) {
|
|
3389
3389
|
s = !1;
|
|
3390
|
-
const l = typeof n.error == "function" ? await n.error(`HTTP error! status: ${c.status}`) : n.error, b = typeof n.description == "function" ? await n.description(`HTTP error! status: ${c.status}`) : n.description, h = typeof l == "object" && !
|
|
3390
|
+
const l = typeof n.error == "function" ? await n.error(`HTTP error! status: ${c.status}`) : n.error, b = typeof n.description == "function" ? await n.description(`HTTP error! status: ${c.status}`) : n.description, h = typeof l == "object" && !w.isValidElement(l) ? l : {
|
|
3391
3391
|
message: l
|
|
3392
3392
|
};
|
|
3393
3393
|
this.create({
|
|
@@ -3398,7 +3398,7 @@ class Ba {
|
|
|
3398
3398
|
});
|
|
3399
3399
|
} else if (c instanceof Error) {
|
|
3400
3400
|
s = !1;
|
|
3401
|
-
const l = typeof n.error == "function" ? await n.error(c) : n.error, b = typeof n.description == "function" ? await n.description(c) : n.description, h = typeof l == "object" && !
|
|
3401
|
+
const l = typeof n.error == "function" ? await n.error(c) : n.error, b = typeof n.description == "function" ? await n.description(c) : n.description, h = typeof l == "object" && !w.isValidElement(l) ? l : {
|
|
3402
3402
|
message: l
|
|
3403
3403
|
};
|
|
3404
3404
|
this.create({
|
|
@@ -3409,7 +3409,7 @@ class Ba {
|
|
|
3409
3409
|
});
|
|
3410
3410
|
} else if (n.success !== void 0) {
|
|
3411
3411
|
s = !1;
|
|
3412
|
-
const l = typeof n.success == "function" ? await n.success(c) : n.success, b = typeof n.description == "function" ? await n.description(c) : n.description, h = typeof l == "object" && !
|
|
3412
|
+
const l = typeof n.success == "function" ? await n.success(c) : n.success, b = typeof n.description == "function" ? await n.description(c) : n.description, h = typeof l == "object" && !w.isValidElement(l) ? l : {
|
|
3413
3413
|
message: l
|
|
3414
3414
|
};
|
|
3415
3415
|
this.create({
|
|
@@ -3425,7 +3425,7 @@ class Ba {
|
|
|
3425
3425
|
c
|
|
3426
3426
|
], n.error !== void 0) {
|
|
3427
3427
|
s = !1;
|
|
3428
|
-
const d = typeof n.error == "function" ? await n.error(c) : n.error, l = typeof n.description == "function" ? await n.description(c) : n.description, x = typeof d == "object" && !
|
|
3428
|
+
const d = typeof n.error == "function" ? await n.error(c) : n.error, l = typeof n.description == "function" ? await n.description(c) : n.description, x = typeof d == "object" && !w.isValidElement(d) ? d : {
|
|
3429
3429
|
message: d
|
|
3430
3430
|
};
|
|
3431
3431
|
this.create({
|
|
@@ -3488,32 +3488,32 @@ function Ga(e) {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
const Qa = (e) => {
|
|
3490
3490
|
var t, n, r, o, s, a, i, u, c;
|
|
3491
|
-
const { invert: d, toast: l, unstyled: b, interacting: x, setHeights: h, visibleToasts: p, heights: g, index: y, toasts: O, expanded: C, removeToast: T, defaultRichColors: P, closeButton: L, style: A, cancelButtonStyle: S, actionButtonStyle: H, className: oe = "", descriptionClassName: Ee = "", duration: ee, position: K, gap: G, expandByDefault: te, classNames: D, icons: j, closeButtonAriaLabel: E = "Close toast" } = e, [le, Q] =
|
|
3491
|
+
const { invert: d, toast: l, unstyled: b, interacting: x, setHeights: h, visibleToasts: p, heights: g, index: y, toasts: O, expanded: C, removeToast: T, defaultRichColors: P, closeButton: L, style: A, cancelButtonStyle: S, actionButtonStyle: H, className: oe = "", descriptionClassName: Ee = "", duration: ee, position: K, gap: G, expandByDefault: te, classNames: D, icons: j, closeButtonAriaLabel: E = "Close toast" } = e, [le, Q] = w.useState(null), [V, ne] = w.useState(null), [N, I] = w.useState(!1), [U, re] = w.useState(!1), [_, z] = w.useState(!1), [fe, Se] = w.useState(!1), [Ne, me] = w.useState(!1), [ns, jt] = w.useState(0), [rs, Cn] = w.useState(0), et = w.useRef(l.duration || ee || Yn), Nn = w.useRef(null), Re = w.useRef(null), os = y === 0, ss = y + 1 <= p, ce = l.type, _e = l.dismissible !== !1, as = l.className || "", is = l.descriptionClassName || "", dt = w.useMemo(() => g.findIndex((F) => F.toastId === l.id) || 0, [
|
|
3492
3492
|
g,
|
|
3493
3493
|
l.id
|
|
3494
|
-
]), ls =
|
|
3494
|
+
]), ls = w.useMemo(() => {
|
|
3495
3495
|
var F;
|
|
3496
3496
|
return (F = l.closeButton) != null ? F : L;
|
|
3497
3497
|
}, [
|
|
3498
3498
|
l.closeButton,
|
|
3499
3499
|
L
|
|
3500
|
-
]), An =
|
|
3500
|
+
]), An = w.useMemo(() => l.duration || ee || Yn, [
|
|
3501
3501
|
l.duration,
|
|
3502
3502
|
ee
|
|
3503
|
-
]), zt =
|
|
3503
|
+
]), zt = w.useRef(0), He = w.useRef(0), Tn = w.useRef(0), We = w.useRef(null), [cs, us] = K.split("-"), On = w.useMemo(() => g.reduce((F, Y, X) => X >= dt ? F : F + Y.height, 0), [
|
|
3504
3504
|
g,
|
|
3505
3505
|
dt
|
|
3506
3506
|
]), Dn = Ia(), ds = l.invert || d, _t = ce === "loading";
|
|
3507
|
-
He.current =
|
|
3507
|
+
He.current = w.useMemo(() => dt * G + On, [
|
|
3508
3508
|
dt,
|
|
3509
3509
|
On
|
|
3510
|
-
]),
|
|
3510
|
+
]), w.useEffect(() => {
|
|
3511
3511
|
et.current = An;
|
|
3512
3512
|
}, [
|
|
3513
3513
|
An
|
|
3514
|
-
]),
|
|
3514
|
+
]), w.useEffect(() => {
|
|
3515
3515
|
I(!0);
|
|
3516
|
-
}, []),
|
|
3516
|
+
}, []), w.useEffect(() => {
|
|
3517
3517
|
const F = Re.current;
|
|
3518
3518
|
if (F) {
|
|
3519
3519
|
const Y = F.getBoundingClientRect().height;
|
|
@@ -3529,7 +3529,7 @@ const Qa = (e) => {
|
|
|
3529
3529
|
}, [
|
|
3530
3530
|
h,
|
|
3531
3531
|
l.id
|
|
3532
|
-
]),
|
|
3532
|
+
]), w.useLayoutEffect(() => {
|
|
3533
3533
|
if (!N) return;
|
|
3534
3534
|
const F = Re.current, Y = F.style.height;
|
|
3535
3535
|
F.style.height = "auto";
|
|
@@ -3555,7 +3555,7 @@ const Qa = (e) => {
|
|
|
3555
3555
|
l.action,
|
|
3556
3556
|
l.cancel
|
|
3557
3557
|
]);
|
|
3558
|
-
const Ae =
|
|
3558
|
+
const Ae = w.useCallback(() => {
|
|
3559
3559
|
re(!0), jt(He.current), h((F) => F.filter((Y) => Y.toastId !== l.id)), setTimeout(() => {
|
|
3560
3560
|
T(l);
|
|
3561
3561
|
}, Ja);
|
|
@@ -3565,7 +3565,7 @@ const Qa = (e) => {
|
|
|
3565
3565
|
h,
|
|
3566
3566
|
He
|
|
3567
3567
|
]);
|
|
3568
|
-
|
|
3568
|
+
w.useEffect(() => {
|
|
3569
3569
|
if (l.promise && ce === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
3570
3570
|
let F;
|
|
3571
3571
|
return C || x || Dn ? (() => {
|
|
@@ -3586,7 +3586,7 @@ const Qa = (e) => {
|
|
|
3586
3586
|
ce,
|
|
3587
3587
|
Dn,
|
|
3588
3588
|
Ae
|
|
3589
|
-
]),
|
|
3589
|
+
]), w.useEffect(() => {
|
|
3590
3590
|
l.delete && (Ae(), l.onDismiss == null || l.onDismiss.call(l, l));
|
|
3591
3591
|
}, [
|
|
3592
3592
|
Ae,
|
|
@@ -3596,19 +3596,19 @@ const Qa = (e) => {
|
|
|
3596
3596
|
var F;
|
|
3597
3597
|
if (j != null && j.loading) {
|
|
3598
3598
|
var Y;
|
|
3599
|
-
return /* @__PURE__ */
|
|
3599
|
+
return /* @__PURE__ */ w.createElement("div", {
|
|
3600
3600
|
className: ye(D == null ? void 0 : D.loader, l == null || (Y = l.classNames) == null ? void 0 : Y.loader, "sonner-loader"),
|
|
3601
3601
|
"data-visible": ce === "loading"
|
|
3602
3602
|
}, j.loading);
|
|
3603
3603
|
}
|
|
3604
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ w.createElement(Ta, {
|
|
3605
3605
|
className: ye(D == null ? void 0 : D.loader, l == null || (F = l.classNames) == null ? void 0 : F.loader),
|
|
3606
3606
|
visible: ce === "loading"
|
|
3607
3607
|
});
|
|
3608
3608
|
}
|
|
3609
3609
|
const ms = l.icon || (j == null ? void 0 : j[ce]) || Na(ce);
|
|
3610
3610
|
var Pn, Mn;
|
|
3611
|
-
return /* @__PURE__ */
|
|
3611
|
+
return /* @__PURE__ */ w.createElement("li", {
|
|
3612
3612
|
tabIndex: 0,
|
|
3613
3613
|
ref: Re,
|
|
3614
3614
|
className: ye(oe, as, D == null ? void 0 : D.toast, l == null || (t = l.classNames) == null ? void 0 : t.toast, D == null ? void 0 : D.default, D == null ? void 0 : D[ce], l == null || (n = l.classNames) == null ? void 0 : n[ce]),
|
|
@@ -3693,7 +3693,7 @@ const Qa = (e) => {
|
|
|
3693
3693
|
}
|
|
3694
3694
|
(Math.abs(he.x) > 0 || Math.abs(he.y) > 0) && me(!0), (X = Re.current) == null || X.style.setProperty("--swipe-amount-x", `${he.x}px`), (ue = Re.current) == null || ue.style.setProperty("--swipe-amount-y", `${he.y}px`);
|
|
3695
3695
|
}
|
|
3696
|
-
}, ls && !l.jsx && ce !== "loading" ? /* @__PURE__ */
|
|
3696
|
+
}, ls && !l.jsx && ce !== "loading" ? /* @__PURE__ */ w.createElement("button", {
|
|
3697
3697
|
"aria-label": E,
|
|
3698
3698
|
"data-disabled": _t,
|
|
3699
3699
|
"data-close-button": !0,
|
|
@@ -3702,19 +3702,19 @@ const Qa = (e) => {
|
|
|
3702
3702
|
Ae(), l.onDismiss == null || l.onDismiss.call(l, l);
|
|
3703
3703
|
},
|
|
3704
3704
|
className: ye(D == null ? void 0 : D.closeButton, l == null || (r = l.classNames) == null ? void 0 : r.closeButton)
|
|
3705
|
-
}, (Mn = j == null ? void 0 : j.close) != null ? Mn : Fa) : null, (ce || l.icon || l.promise) && l.icon !== null && ((j == null ? void 0 : j[ce]) !== null || l.icon) ? /* @__PURE__ */
|
|
3705
|
+
}, (Mn = j == null ? void 0 : j.close) != null ? Mn : Fa) : null, (ce || l.icon || l.promise) && l.icon !== null && ((j == null ? void 0 : j[ce]) !== null || l.icon) ? /* @__PURE__ */ w.createElement("div", {
|
|
3706
3706
|
"data-icon": "",
|
|
3707
3707
|
className: ye(D == null ? void 0 : D.icon, l == null || (o = l.classNames) == null ? void 0 : o.icon)
|
|
3708
|
-
}, l.promise || l.type === "loading" && !l.icon ? l.icon || fs() : null, l.type !== "loading" ? ms : null) : null, /* @__PURE__ */
|
|
3708
|
+
}, l.promise || l.type === "loading" && !l.icon ? l.icon || fs() : null, l.type !== "loading" ? ms : null) : null, /* @__PURE__ */ w.createElement("div", {
|
|
3709
3709
|
"data-content": "",
|
|
3710
3710
|
className: ye(D == null ? void 0 : D.content, l == null || (s = l.classNames) == null ? void 0 : s.content)
|
|
3711
|
-
}, /* @__PURE__ */
|
|
3711
|
+
}, /* @__PURE__ */ w.createElement("div", {
|
|
3712
3712
|
"data-title": "",
|
|
3713
3713
|
className: ye(D == null ? void 0 : D.title, l == null || (a = l.classNames) == null ? void 0 : a.title)
|
|
3714
|
-
}, l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title), l.description ? /* @__PURE__ */
|
|
3714
|
+
}, l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title), l.description ? /* @__PURE__ */ w.createElement("div", {
|
|
3715
3715
|
"data-description": "",
|
|
3716
3716
|
className: ye(Ee, is, D == null ? void 0 : D.description, l == null || (i = l.classNames) == null ? void 0 : i.description)
|
|
3717
|
-
}, typeof l.description == "function" ? l.description() : l.description) : null), /* @__PURE__ */
|
|
3717
|
+
}, typeof l.description == "function" ? l.description() : l.description) : null), /* @__PURE__ */ w.isValidElement(l.cancel) ? l.cancel : l.cancel && gt(l.cancel) ? /* @__PURE__ */ w.createElement("button", {
|
|
3718
3718
|
"data-button": !0,
|
|
3719
3719
|
"data-cancel": !0,
|
|
3720
3720
|
style: l.cancelButtonStyle || S,
|
|
@@ -3722,7 +3722,7 @@ const Qa = (e) => {
|
|
|
3722
3722
|
gt(l.cancel) && _e && (l.cancel.onClick == null || l.cancel.onClick.call(l.cancel, F), Ae());
|
|
3723
3723
|
},
|
|
3724
3724
|
className: ye(D == null ? void 0 : D.cancelButton, l == null || (u = l.classNames) == null ? void 0 : u.cancelButton)
|
|
3725
|
-
}, l.cancel.label) : null, /* @__PURE__ */
|
|
3725
|
+
}, l.cancel.label) : null, /* @__PURE__ */ w.isValidElement(l.action) ? l.action : l.action && gt(l.action) ? /* @__PURE__ */ w.createElement("button", {
|
|
3726
3726
|
"data-button": !0,
|
|
3727
3727
|
"data-action": !0,
|
|
3728
3728
|
style: l.actionButtonStyle || H,
|
|
@@ -3764,25 +3764,25 @@ function Xa(e, t) {
|
|
|
3764
3764
|
}) : u(i);
|
|
3765
3765
|
}), n;
|
|
3766
3766
|
}
|
|
3767
|
-
const Za = /* @__PURE__ */
|
|
3767
|
+
const Za = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
3768
3768
|
const { id: r, invert: o, position: s = "bottom-right", hotkey: a = [
|
|
3769
3769
|
"altKey",
|
|
3770
3770
|
"KeyT"
|
|
3771
|
-
], expand: i, closeButton: u, className: c, offset: d, mobileOffset: l, theme: b = "light", richColors: x, duration: h, style: p, visibleToasts: g = Ha, toastOptions: y, dir: O = Jn(), gap: C = qa, icons: T, containerAriaLabel: P = "Notifications" } = t, [L, A] =
|
|
3771
|
+
], expand: i, closeButton: u, className: c, offset: d, mobileOffset: l, theme: b = "light", richColors: x, duration: h, style: p, visibleToasts: g = Ha, toastOptions: y, dir: O = Jn(), gap: C = qa, icons: T, containerAriaLabel: P = "Notifications" } = t, [L, A] = w.useState([]), S = w.useMemo(() => r ? L.filter((N) => N.toasterId === r) : L.filter((N) => !N.toasterId), [
|
|
3772
3772
|
L,
|
|
3773
3773
|
r
|
|
3774
|
-
]), H =
|
|
3774
|
+
]), H = w.useMemo(() => Array.from(new Set([
|
|
3775
3775
|
s
|
|
3776
3776
|
].concat(S.filter((N) => N.position).map((N) => N.position)))), [
|
|
3777
3777
|
S,
|
|
3778
3778
|
s
|
|
3779
|
-
]), [oe, Ee] =
|
|
3779
|
+
]), [oe, Ee] = w.useState([]), [ee, K] = w.useState(!1), [G, te] = w.useState(!1), [D, j] = w.useState(b !== "system" ? b : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), E = w.useRef(null), le = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), Q = w.useRef(null), V = w.useRef(!1), ne = w.useCallback((N) => {
|
|
3780
3780
|
A((I) => {
|
|
3781
3781
|
var U;
|
|
3782
3782
|
return (U = I.find((re) => re.id === N.id)) != null && U.delete || se.dismiss(N.id), I.filter(({ id: re }) => re !== N.id);
|
|
3783
3783
|
});
|
|
3784
3784
|
}, []);
|
|
3785
|
-
return
|
|
3785
|
+
return w.useEffect(() => se.subscribe((N) => {
|
|
3786
3786
|
if (N.dismiss) {
|
|
3787
3787
|
requestAnimationFrame(() => {
|
|
3788
3788
|
A((I) => I.map((U) => U.id === N.id ? {
|
|
@@ -3812,7 +3812,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3812
3812
|
});
|
|
3813
3813
|
}), [
|
|
3814
3814
|
L
|
|
3815
|
-
]),
|
|
3815
|
+
]), w.useEffect(() => {
|
|
3816
3816
|
if (b !== "system") {
|
|
3817
3817
|
j(b);
|
|
3818
3818
|
return;
|
|
@@ -3834,11 +3834,11 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3834
3834
|
}
|
|
3835
3835
|
}, [
|
|
3836
3836
|
b
|
|
3837
|
-
]),
|
|
3837
|
+
]), w.useEffect(() => {
|
|
3838
3838
|
L.length <= 1 && K(!1);
|
|
3839
3839
|
}, [
|
|
3840
3840
|
L
|
|
3841
|
-
]),
|
|
3841
|
+
]), w.useEffect(() => {
|
|
3842
3842
|
const N = (I) => {
|
|
3843
3843
|
var U;
|
|
3844
3844
|
if (a.every((z) => I[z] || I.code === z)) {
|
|
@@ -3850,7 +3850,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3850
3850
|
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
3851
3851
|
}, [
|
|
3852
3852
|
a
|
|
3853
|
-
]),
|
|
3853
|
+
]), w.useEffect(() => {
|
|
3854
3854
|
if (E.current)
|
|
3855
3855
|
return () => {
|
|
3856
3856
|
Q.current && (Q.current.focus({
|
|
@@ -3860,7 +3860,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3860
3860
|
}, [
|
|
3861
3861
|
E.current
|
|
3862
3862
|
]), // Remove item from normal navigation flow, only available via hotkey
|
|
3863
|
-
/* @__PURE__ */
|
|
3863
|
+
/* @__PURE__ */ w.createElement("section", {
|
|
3864
3864
|
ref: n,
|
|
3865
3865
|
"aria-label": `${P} ${le}`,
|
|
3866
3866
|
tabIndex: -1,
|
|
@@ -3871,7 +3871,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3871
3871
|
}, H.map((N, I) => {
|
|
3872
3872
|
var U;
|
|
3873
3873
|
const [re, _] = N.split("-");
|
|
3874
|
-
return S.length ? /* @__PURE__ */
|
|
3874
|
+
return S.length ? /* @__PURE__ */ w.createElement("ol", {
|
|
3875
3875
|
key: N,
|
|
3876
3876
|
dir: O === "auto" ? Jn() : O,
|
|
3877
3877
|
tabIndex: -1,
|
|
@@ -3908,7 +3908,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3908
3908
|
onPointerUp: () => te(!1)
|
|
3909
3909
|
}, S.filter((z) => !z.position && I === 0 || z.position === N).map((z, fe) => {
|
|
3910
3910
|
var Se, Ne;
|
|
3911
|
-
return /* @__PURE__ */
|
|
3911
|
+
return /* @__PURE__ */ w.createElement(Qa, {
|
|
3912
3912
|
key: z.id,
|
|
3913
3913
|
icons: T,
|
|
3914
3914
|
index: fe,
|
|
@@ -3939,7 +3939,7 @@ const Za = /* @__PURE__ */ v.forwardRef(function(t, n) {
|
|
|
3939
3939
|
});
|
|
3940
3940
|
})) : null;
|
|
3941
3941
|
}));
|
|
3942
|
-
}), yu = () => /* @__PURE__ */
|
|
3942
|
+
}), yu = () => /* @__PURE__ */ v(
|
|
3943
3943
|
Za,
|
|
3944
3944
|
{
|
|
3945
3945
|
richColors: !0,
|
|
@@ -3958,7 +3958,7 @@ function De(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
3958
3958
|
function $a(e, t) {
|
|
3959
3959
|
const n = m.createContext(t), r = (s) => {
|
|
3960
3960
|
const { children: a, ...i } = s, u = m.useMemo(() => i, Object.values(i));
|
|
3961
|
-
return /* @__PURE__ */
|
|
3961
|
+
return /* @__PURE__ */ v(n.Provider, { value: u, children: a });
|
|
3962
3962
|
};
|
|
3963
3963
|
r.displayName = e + "Provider";
|
|
3964
3964
|
function o(s) {
|
|
@@ -3977,7 +3977,7 @@ function ei(e, t = []) {
|
|
|
3977
3977
|
const c = (l) => {
|
|
3978
3978
|
var y;
|
|
3979
3979
|
const { scope: b, children: x, ...h } = l, p = ((y = b == null ? void 0 : b[e]) == null ? void 0 : y[u]) || i, g = m.useMemo(() => h, Object.values(h));
|
|
3980
|
-
return /* @__PURE__ */
|
|
3980
|
+
return /* @__PURE__ */ v(p.Provider, { value: g, children: x });
|
|
3981
3981
|
};
|
|
3982
3982
|
c.displayName = s + "Provider";
|
|
3983
3983
|
function d(l, b) {
|
|
@@ -4098,7 +4098,7 @@ var li = [
|
|
|
4098
4098
|
], Ce = li.reduce((e, t) => {
|
|
4099
4099
|
const n = /* @__PURE__ */ gn(`Primitive.${t}`), r = m.forwardRef((o, s) => {
|
|
4100
4100
|
const { asChild: a, ...i } = o, u = a ? n : t;
|
|
4101
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
4101
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(u, { ...i, ref: s });
|
|
4102
4102
|
});
|
|
4103
4103
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
4104
4104
|
}, {});
|
|
@@ -4156,7 +4156,7 @@ var di = "DismissableLayer", ln = "dismissableLayer.update", fi = "dismissableLa
|
|
|
4156
4156
|
}, [d, c]), m.useEffect(() => {
|
|
4157
4157
|
const A = () => x({});
|
|
4158
4158
|
return document.addEventListener(ln, A), () => document.removeEventListener(ln, A);
|
|
4159
|
-
}, []), /* @__PURE__ */
|
|
4159
|
+
}, []), /* @__PURE__ */ v(
|
|
4160
4160
|
Ce.div,
|
|
4161
4161
|
{
|
|
4162
4162
|
...u,
|
|
@@ -4184,7 +4184,7 @@ var pi = "DismissableLayerBranch", hi = m.forwardRef((e, t) => {
|
|
|
4184
4184
|
return n.branches.add(s), () => {
|
|
4185
4185
|
n.branches.delete(s);
|
|
4186
4186
|
};
|
|
4187
|
-
}, [n.branches]), /* @__PURE__ */
|
|
4187
|
+
}, [n.branches]), /* @__PURE__ */ v(Ce.div, { ...e, ref: o });
|
|
4188
4188
|
});
|
|
4189
4189
|
hi.displayName = pi;
|
|
4190
4190
|
function gi(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -4303,7 +4303,7 @@ var Vt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
4303
4303
|
},
|
|
4304
4304
|
[n, r, x.paused]
|
|
4305
4305
|
);
|
|
4306
|
-
return /* @__PURE__ */
|
|
4306
|
+
return /* @__PURE__ */ v(Ce.div, { tabIndex: -1, ...a, ref: b, onKeyDown: h });
|
|
4307
4307
|
});
|
|
4308
4308
|
Jr.displayName = yi;
|
|
4309
4309
|
function vi(e, { select: t = !1 } = {}) {
|
|
@@ -4373,7 +4373,7 @@ var ki = "Portal", Qr = m.forwardRef((e, t) => {
|
|
|
4373
4373
|
const { container: n, ...r } = e, [o, s] = m.useState(!1);
|
|
4374
4374
|
st(() => s(!0), []);
|
|
4375
4375
|
const a = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
4376
|
-
return a ? Nr.createPortal(/* @__PURE__ */
|
|
4376
|
+
return a ? Nr.createPortal(/* @__PURE__ */ v(Ce.div, { ...r, ref: t }), a) : null;
|
|
4377
4377
|
});
|
|
4378
4378
|
Qr.displayName = ki;
|
|
4379
4379
|
function Ci(e, t) {
|
|
@@ -4988,7 +4988,7 @@ var fl = function(e) {
|
|
|
4988
4988
|
onChange: s,
|
|
4989
4989
|
caller: Mt
|
|
4990
4990
|
});
|
|
4991
|
-
return /* @__PURE__ */
|
|
4991
|
+
return /* @__PURE__ */ v(
|
|
4992
4992
|
gl,
|
|
4993
4993
|
{
|
|
4994
4994
|
scope: t,
|
|
@@ -5009,7 +5009,7 @@ io.displayName = Mt;
|
|
|
5009
5009
|
var lo = "DialogTrigger", bl = m.forwardRef(
|
|
5010
5010
|
(e, t) => {
|
|
5011
5011
|
const { __scopeDialog: n, ...r } = e, o = ge(lo, n), s = ze(t, o.triggerRef);
|
|
5012
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ v(
|
|
5013
5013
|
Ce.button,
|
|
5014
5014
|
{
|
|
5015
5015
|
type: "button",
|
|
@@ -5029,13 +5029,13 @@ var wn = "DialogPortal", [yl, co] = ao(wn, {
|
|
|
5029
5029
|
forceMount: void 0
|
|
5030
5030
|
}), uo = (e) => {
|
|
5031
5031
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = ge(wn, t);
|
|
5032
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ v(yl, { scope: t, forceMount: n, children: m.Children.map(r, (a) => /* @__PURE__ */ v(Dt, { present: n || s.open, children: /* @__PURE__ */ v(Qr, { asChild: !0, container: o, children: a }) })) });
|
|
5033
5033
|
};
|
|
5034
5034
|
uo.displayName = wn;
|
|
5035
5035
|
var At = "DialogOverlay", fo = m.forwardRef(
|
|
5036
5036
|
(e, t) => {
|
|
5037
5037
|
const n = co(At, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = ge(At, e.__scopeDialog);
|
|
5038
|
-
return s.modal ? /* @__PURE__ */
|
|
5038
|
+
return s.modal ? /* @__PURE__ */ v(Dt, { present: r || s.open, children: /* @__PURE__ */ v(wl, { ...o, ref: t }) }) : null;
|
|
5039
5039
|
}
|
|
5040
5040
|
);
|
|
5041
5041
|
fo.displayName = At;
|
|
@@ -5045,7 +5045,7 @@ var vl = /* @__PURE__ */ gn("DialogOverlay.RemoveScroll"), wl = m.forwardRef(
|
|
|
5045
5045
|
return (
|
|
5046
5046
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
5047
5047
|
// ie. when `Overlay` and `Content` are siblings
|
|
5048
|
-
/* @__PURE__ */
|
|
5048
|
+
/* @__PURE__ */ v(oo, { as: vl, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ v(
|
|
5049
5049
|
Ce.div,
|
|
5050
5050
|
{
|
|
5051
5051
|
"data-state": En(o.open),
|
|
@@ -5059,7 +5059,7 @@ var vl = /* @__PURE__ */ gn("DialogOverlay.RemoveScroll"), wl = m.forwardRef(
|
|
|
5059
5059
|
), Ue = "DialogContent", mo = m.forwardRef(
|
|
5060
5060
|
(e, t) => {
|
|
5061
5061
|
const n = co(Ue, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = ge(Ue, e.__scopeDialog);
|
|
5062
|
-
return /* @__PURE__ */
|
|
5062
|
+
return /* @__PURE__ */ v(Dt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ v(xl, { ...o, ref: t }) : /* @__PURE__ */ v(El, { ...o, ref: t }) });
|
|
5063
5063
|
}
|
|
5064
5064
|
);
|
|
5065
5065
|
mo.displayName = Ue;
|
|
@@ -5069,7 +5069,7 @@ var xl = m.forwardRef(
|
|
|
5069
5069
|
return m.useEffect(() => {
|
|
5070
5070
|
const s = r.current;
|
|
5071
5071
|
if (s) return hl(s);
|
|
5072
|
-
}, []), /* @__PURE__ */
|
|
5072
|
+
}, []), /* @__PURE__ */ v(
|
|
5073
5073
|
po,
|
|
5074
5074
|
{
|
|
5075
5075
|
...e,
|
|
@@ -5094,7 +5094,7 @@ var xl = m.forwardRef(
|
|
|
5094
5094
|
), El = m.forwardRef(
|
|
5095
5095
|
(e, t) => {
|
|
5096
5096
|
const n = ge(Ue, e.__scopeDialog), r = m.useRef(!1), o = m.useRef(!1);
|
|
5097
|
-
return /* @__PURE__ */
|
|
5097
|
+
return /* @__PURE__ */ v(
|
|
5098
5098
|
po,
|
|
5099
5099
|
{
|
|
5100
5100
|
...e,
|
|
@@ -5118,7 +5118,7 @@ var xl = m.forwardRef(
|
|
|
5118
5118
|
(e, t) => {
|
|
5119
5119
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = e, i = ge(Ue, n), u = m.useRef(null), c = ze(t, u);
|
|
5120
5120
|
return Ti(), /* @__PURE__ */ $(Le, { children: [
|
|
5121
|
-
/* @__PURE__ */
|
|
5121
|
+
/* @__PURE__ */ v(
|
|
5122
5122
|
Jr,
|
|
5123
5123
|
{
|
|
5124
5124
|
asChild: !0,
|
|
@@ -5126,7 +5126,7 @@ var xl = m.forwardRef(
|
|
|
5126
5126
|
trapped: r,
|
|
5127
5127
|
onMountAutoFocus: o,
|
|
5128
5128
|
onUnmountAutoFocus: s,
|
|
5129
|
-
children: /* @__PURE__ */
|
|
5129
|
+
children: /* @__PURE__ */ v(
|
|
5130
5130
|
qr,
|
|
5131
5131
|
{
|
|
5132
5132
|
role: "dialog",
|
|
@@ -5142,29 +5142,29 @@ var xl = m.forwardRef(
|
|
|
5142
5142
|
}
|
|
5143
5143
|
),
|
|
5144
5144
|
/* @__PURE__ */ $(Le, { children: [
|
|
5145
|
-
/* @__PURE__ */
|
|
5146
|
-
/* @__PURE__ */
|
|
5145
|
+
/* @__PURE__ */ v(Sl, { titleId: i.titleId }),
|
|
5146
|
+
/* @__PURE__ */ v(kl, { contentRef: u, descriptionId: i.descriptionId })
|
|
5147
5147
|
] })
|
|
5148
5148
|
] });
|
|
5149
5149
|
}
|
|
5150
5150
|
), xn = "DialogTitle", ho = m.forwardRef(
|
|
5151
5151
|
(e, t) => {
|
|
5152
5152
|
const { __scopeDialog: n, ...r } = e, o = ge(xn, n);
|
|
5153
|
-
return /* @__PURE__ */
|
|
5153
|
+
return /* @__PURE__ */ v(Ce.h2, { id: o.titleId, ...r, ref: t });
|
|
5154
5154
|
}
|
|
5155
5155
|
);
|
|
5156
5156
|
ho.displayName = xn;
|
|
5157
5157
|
var go = "DialogDescription", bo = m.forwardRef(
|
|
5158
5158
|
(e, t) => {
|
|
5159
5159
|
const { __scopeDialog: n, ...r } = e, o = ge(go, n);
|
|
5160
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ v(Ce.p, { id: o.descriptionId, ...r, ref: t });
|
|
5161
5161
|
}
|
|
5162
5162
|
);
|
|
5163
5163
|
bo.displayName = go;
|
|
5164
5164
|
var yo = "DialogClose", vo = m.forwardRef(
|
|
5165
5165
|
(e, t) => {
|
|
5166
5166
|
const { __scopeDialog: n, ...r } = e, o = ge(yo, n);
|
|
5167
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ v(
|
|
5168
5168
|
Ce.button,
|
|
5169
5169
|
{
|
|
5170
5170
|
type: "button",
|
|
@@ -5200,7 +5200,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
5200
5200
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
5201
5201
|
}, [r, e, t]), null;
|
|
5202
5202
|
}, Cl = io, Nl = uo, Eo = fo, So = mo, Ro = ho, ko = bo, Co = vo;
|
|
5203
|
-
const Al = Cl, Tl = Nl, Ol = Co, No = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
5203
|
+
const Al = Cl, Tl = Nl, Ol = Co, No = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
5204
5204
|
Eo,
|
|
5205
5205
|
{
|
|
5206
5206
|
ref: n,
|
|
@@ -5213,7 +5213,7 @@ const Al = Cl, Tl = Nl, Ol = Co, No = m.forwardRef(({ className: e, ...t }, n) =
|
|
|
5213
5213
|
));
|
|
5214
5214
|
No.displayName = Eo.displayName;
|
|
5215
5215
|
const Ao = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ $(Tl, { children: [
|
|
5216
|
-
/* @__PURE__ */
|
|
5216
|
+
/* @__PURE__ */ v(No, {}),
|
|
5217
5217
|
/* @__PURE__ */ $(
|
|
5218
5218
|
So,
|
|
5219
5219
|
{
|
|
@@ -5226,8 +5226,8 @@ const Ao = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
5226
5226
|
children: [
|
|
5227
5227
|
t,
|
|
5228
5228
|
/* @__PURE__ */ $(Co, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
/* @__PURE__ */
|
|
5229
|
+
/* @__PURE__ */ v(ya, { className: "h-4 w-4" }),
|
|
5230
|
+
/* @__PURE__ */ v("span", { className: "sr-only", children: "Close" })
|
|
5231
5231
|
] })
|
|
5232
5232
|
]
|
|
5233
5233
|
}
|
|
@@ -5237,7 +5237,7 @@ Ao.displayName = So.displayName;
|
|
|
5237
5237
|
const To = ({
|
|
5238
5238
|
className: e,
|
|
5239
5239
|
...t
|
|
5240
|
-
}) => /* @__PURE__ */
|
|
5240
|
+
}) => /* @__PURE__ */ v(
|
|
5241
5241
|
"div",
|
|
5242
5242
|
{
|
|
5243
5243
|
className: xe(
|
|
@@ -5251,7 +5251,7 @@ To.displayName = "DialogHeader";
|
|
|
5251
5251
|
const Oo = ({
|
|
5252
5252
|
className: e,
|
|
5253
5253
|
...t
|
|
5254
|
-
}) => /* @__PURE__ */
|
|
5254
|
+
}) => /* @__PURE__ */ v(
|
|
5255
5255
|
"div",
|
|
5256
5256
|
{
|
|
5257
5257
|
className: xe(
|
|
@@ -5262,7 +5262,7 @@ const Oo = ({
|
|
|
5262
5262
|
}
|
|
5263
5263
|
);
|
|
5264
5264
|
Oo.displayName = "DialogFooter";
|
|
5265
|
-
const Do = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
5265
|
+
const Do = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
5266
5266
|
Ro,
|
|
5267
5267
|
{
|
|
5268
5268
|
ref: n,
|
|
@@ -5274,7 +5274,7 @@ const Do = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
|
5274
5274
|
}
|
|
5275
5275
|
));
|
|
5276
5276
|
Do.displayName = Ro.displayName;
|
|
5277
|
-
const Dl = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
5277
|
+
const Dl = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ v(
|
|
5278
5278
|
ko,
|
|
5279
5279
|
{
|
|
5280
5280
|
ref: n,
|
|
@@ -5283,17 +5283,17 @@ const Dl = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ w(
|
|
|
5283
5283
|
}
|
|
5284
5284
|
));
|
|
5285
5285
|
Dl.displayName = ko.displayName;
|
|
5286
|
-
const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, buttonText: s }) => /* @__PURE__ */
|
|
5286
|
+
const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, buttonText: s }) => /* @__PURE__ */ v(Le, { children: /* @__PURE__ */ v(
|
|
5287
5287
|
Al,
|
|
5288
5288
|
{
|
|
5289
5289
|
open: r,
|
|
5290
5290
|
onOpenChange: (a) => a ? void 0 : o(),
|
|
5291
5291
|
children: /* @__PURE__ */ $(Ao, { className: "gap-8", children: [
|
|
5292
|
-
/* @__PURE__ */
|
|
5293
|
-
/* @__PURE__ */
|
|
5292
|
+
/* @__PURE__ */ v(To, { children: /* @__PURE__ */ v(Do, { className: "text-center", children: t }) }),
|
|
5293
|
+
/* @__PURE__ */ v("div", { children: e }),
|
|
5294
5294
|
/* @__PURE__ */ $(Oo, { children: [
|
|
5295
|
-
/* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5295
|
+
/* @__PURE__ */ v(Ol, { asChild: !0, children: /* @__PURE__ */ v(ot, { primary: !1, label: "Cancel", size: "large" }) }),
|
|
5296
|
+
/* @__PURE__ */ v(ot, { primary: !0, label: s, onClick: n, size: "large" })
|
|
5297
5297
|
] })
|
|
5298
5298
|
] })
|
|
5299
5299
|
}
|
|
@@ -5312,8 +5312,8 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5312
5312
|
i.current && !i.current.contains(c.target) && t();
|
|
5313
5313
|
};
|
|
5314
5314
|
return e && document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
|
|
5315
|
-
}, [e, t]), /* @__PURE__ */
|
|
5316
|
-
/* @__PURE__ */
|
|
5315
|
+
}, [e, t]), /* @__PURE__ */ v("div", { ref: i, className: "flex items-center", children: /* @__PURE__ */ $("div", { className: "relative inline-block h-full", children: [
|
|
5316
|
+
/* @__PURE__ */ v(
|
|
5317
5317
|
"div",
|
|
5318
5318
|
{
|
|
5319
5319
|
onClick: t,
|
|
@@ -5322,7 +5322,7 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5322
5322
|
transition-all duration-200
|
|
5323
5323
|
${e ? `${r === "circle" ? "border-2 border-[#A50034]" : "grayscale-0"}` : `border-transparent ${r === "circle" ? "hover:border-[#A50034] border-2" : "opacity-40 hover:grayscale-0 hover:opacity-100"}`}
|
|
5324
5324
|
`,
|
|
5325
|
-
children: /* @__PURE__ */
|
|
5325
|
+
children: /* @__PURE__ */ v(
|
|
5326
5326
|
"img",
|
|
5327
5327
|
{
|
|
5328
5328
|
src: n,
|
|
@@ -5332,7 +5332,7 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5332
5332
|
)
|
|
5333
5333
|
}
|
|
5334
5334
|
),
|
|
5335
|
-
/* @__PURE__ */
|
|
5335
|
+
/* @__PURE__ */ v(
|
|
5336
5336
|
"div",
|
|
5337
5337
|
{
|
|
5338
5338
|
className: `
|
|
@@ -5340,23 +5340,23 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5340
5340
|
transition-all duration-200 ease-out transform origin-top-right
|
|
5341
5341
|
${e ? "scale-100 opacity-100 visible" : "scale-95 opacity-0 invisible"}
|
|
5342
5342
|
`,
|
|
5343
|
-
children: s === "text" ? a == null ? void 0 : a.map(
|
|
5344
|
-
(u) => /* @__PURE__ */
|
|
5343
|
+
children: s === "text" ? /* @__PURE__ */ v("div", { className: "w-full h-full max-h-64 overflow-y-auto rounded-lg bg-white p-2 custom-scrollbar", children: a == null ? void 0 : a.map(
|
|
5344
|
+
(u) => /* @__PURE__ */ v("ul", { className: "flex flex-col gap-2 text-sm list-none pl-0", children: /* @__PURE__ */ v(
|
|
5345
5345
|
"li",
|
|
5346
5346
|
{
|
|
5347
5347
|
onClick: u.action,
|
|
5348
|
-
className: "px-4 py-2 hover:bg-gray-100 cursor-pointer
|
|
5348
|
+
className: "px-4 py-2 hover:bg-gray-100 rounded-lg cursor-pointer",
|
|
5349
5349
|
children: u.title
|
|
5350
5350
|
}
|
|
5351
5351
|
) })
|
|
5352
|
-
) : s === "icon" ? /* @__PURE__ */
|
|
5352
|
+
) }) : s === "icon" ? /* @__PURE__ */ v("div", { className: "w-full h-full max-h-64 overflow-y-auto bg-white rounded-lg p-2 custom-scrollbar", children: /* @__PURE__ */ v("div", { className: "grid grid-cols-3 gap-2", children: a == null ? void 0 : a.map(
|
|
5353
5353
|
(u) => /* @__PURE__ */ $(
|
|
5354
5354
|
"div",
|
|
5355
5355
|
{
|
|
5356
5356
|
className: "flex flex-col items-center gap-1 px-2 py-2 rounded-lg cursor-pointer hover:bg-gray-100",
|
|
5357
5357
|
onClick: u.action,
|
|
5358
5358
|
children: [
|
|
5359
|
-
/* @__PURE__ */
|
|
5359
|
+
/* @__PURE__ */ v("div", { className: "flex items-center justify-center h-12 w-12", children: /* @__PURE__ */ v(
|
|
5360
5360
|
"img",
|
|
5361
5361
|
{
|
|
5362
5362
|
src: u.icon || ir,
|
|
@@ -5364,18 +5364,18 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5364
5364
|
className: "max-h-10 max-w-10 object-contain"
|
|
5365
5365
|
}
|
|
5366
5366
|
) }),
|
|
5367
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ v("p", { className: "text-[13px] text-center text-[#404041] font-medium w-full", children: u.title })
|
|
5368
5368
|
]
|
|
5369
5369
|
}
|
|
5370
5370
|
)
|
|
5371
|
-
) }) }) : s === "smallerIcon" ? /* @__PURE__ */
|
|
5371
|
+
) }) }) : s === "smallerIcon" ? /* @__PURE__ */ v("div", { className: "w-full h-full max-h-100 overflow-y-auto bg-white rounded-lg p-2 custom-scrollbar", children: /* @__PURE__ */ v("div", { className: "grid grid-cols-4 gap-2", children: a == null ? void 0 : a.map(
|
|
5372
5372
|
(u) => /* @__PURE__ */ $(
|
|
5373
5373
|
"div",
|
|
5374
5374
|
{
|
|
5375
5375
|
className: "flex flex-col items-center gap-1 px-2 py-2 rounded-lg cursor-pointer hover:bg-gray-100",
|
|
5376
5376
|
onClick: u.action,
|
|
5377
5377
|
children: [
|
|
5378
|
-
/* @__PURE__ */
|
|
5378
|
+
/* @__PURE__ */ v("div", { className: "flex items-center justify-center h-12 w-12", children: /* @__PURE__ */ v(
|
|
5379
5379
|
"img",
|
|
5380
5380
|
{
|
|
5381
5381
|
src: u.icon || ir,
|
|
@@ -5383,11 +5383,11 @@ const xu = ({ children: e, title: t, action: n, isDialogOpen: r, onClose: o, but
|
|
|
5383
5383
|
className: "max-h-5 max-w-5 object-contain"
|
|
5384
5384
|
}
|
|
5385
5385
|
) }),
|
|
5386
|
-
/* @__PURE__ */
|
|
5386
|
+
/* @__PURE__ */ v("p", { className: "text-[13px] text-center text-[#404041] font-medium w-full", children: u.title })
|
|
5387
5387
|
]
|
|
5388
5388
|
}
|
|
5389
5389
|
)
|
|
5390
|
-
) }) }) : /* @__PURE__ */
|
|
5390
|
+
) }) }) : /* @__PURE__ */ v(Le, {})
|
|
5391
5391
|
}
|
|
5392
5392
|
)
|
|
5393
5393
|
] }) });
|