@sakaniui/react 0.3.4 → 0.3.6
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/TopBar-DjB9Z6ne.cjs +1 -0
- package/dist/{TopBar-CgWKcAb7.js → TopBar-lEYP4HTb.js} +293 -282
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.mjs +52 -52
- package/dist/favicon.svg +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/TopBar-BmFhpsnu.cjs +0 -1
|
@@ -4,7 +4,7 @@ import { Bell as o, BellOff as s, Camera as c, Check as l, CheckCheck as u, Chev
|
|
|
4
4
|
import { PolarAngleAxis as le, RadialBar as ue, RadialBarChart as de, ResponsiveContainer as fe } from "recharts";
|
|
5
5
|
import pe, { createPortal as me } from "react-dom";
|
|
6
6
|
//#region src/lib/iconStrokeWidth.ts
|
|
7
|
-
var O = (e, t = 1.5) => 24 / e * t,
|
|
7
|
+
var O = (e, t = 1.5) => 24 / e * t, he = {
|
|
8
8
|
accordion: "_accordion_1njer_3",
|
|
9
9
|
item: "_item_1njer_10",
|
|
10
10
|
item__header: "_item__header_1njer_12",
|
|
@@ -15,20 +15,20 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
15
15
|
"item__panelWrap--open": "_item__panelWrap--open_1njer_50",
|
|
16
16
|
item__panel: "_item__panel_1njer_45",
|
|
17
17
|
item__panelInner: "_item__panelInner_1njer_53"
|
|
18
|
-
},
|
|
18
|
+
}, ge = ({ title: t, children: n, open: r, defaultOpen: o = !1, className: s }) => {
|
|
19
19
|
let c = r !== void 0, [l, u] = e.useState(o), d = c ? r : l;
|
|
20
20
|
return /* @__PURE__ */ a("div", {
|
|
21
|
-
className: [
|
|
21
|
+
className: [he.item, s ?? ""].filter(Boolean).join(" "),
|
|
22
22
|
children: [/* @__PURE__ */ a("button", {
|
|
23
23
|
type: "button",
|
|
24
|
-
className:
|
|
24
|
+
className: he.item__header,
|
|
25
25
|
"aria-expanded": d,
|
|
26
26
|
onClick: () => !c && u((e) => !e),
|
|
27
27
|
children: [/* @__PURE__ */ i("span", {
|
|
28
|
-
className:
|
|
28
|
+
className: he.item__title,
|
|
29
29
|
children: t
|
|
30
30
|
}), /* @__PURE__ */ i("span", {
|
|
31
|
-
className: [
|
|
31
|
+
className: [he.item__chevron, d ? he["item__chevron--open"] : ""].join(" "),
|
|
32
32
|
"aria-hidden": "true",
|
|
33
33
|
children: /* @__PURE__ */ i("svg", {
|
|
34
34
|
viewBox: "0 0 24 24",
|
|
@@ -43,20 +43,20 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
43
43
|
})
|
|
44
44
|
})]
|
|
45
45
|
}), /* @__PURE__ */ i("div", {
|
|
46
|
-
className: [
|
|
46
|
+
className: [he.item__panelWrap, d ? he["item__panelWrap--open"] : ""].join(" "),
|
|
47
47
|
children: /* @__PURE__ */ i("div", {
|
|
48
|
-
className:
|
|
48
|
+
className: he.item__panel,
|
|
49
49
|
children: /* @__PURE__ */ i("div", {
|
|
50
|
-
className:
|
|
50
|
+
className: he.item__panelInner,
|
|
51
51
|
children: n
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
54
|
})]
|
|
55
55
|
});
|
|
56
|
-
},
|
|
57
|
-
className: [
|
|
56
|
+
}, _e = ({ children: e, className: t }) => /* @__PURE__ */ i("div", {
|
|
57
|
+
className: [he.accordion, t ?? ""].filter(Boolean).join(" "),
|
|
58
58
|
children: e
|
|
59
|
-
}),
|
|
59
|
+
}), ve = {
|
|
60
60
|
avatar: "_avatar_1igqs_3",
|
|
61
61
|
"avatar--sm": "_avatar--sm_1igqs_17",
|
|
62
62
|
"avatar--md": "_avatar--md_1igqs_18",
|
|
@@ -66,12 +66,12 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
66
66
|
avatar__image: "_avatar__image_1igqs_31",
|
|
67
67
|
avatar__initials: "_avatar__initials_1igqs_39",
|
|
68
68
|
avatar__icon: "_avatar__icon_1igqs_46"
|
|
69
|
-
},
|
|
69
|
+
}, ye = {
|
|
70
70
|
sm: 14,
|
|
71
71
|
md: 18,
|
|
72
72
|
lg: 22,
|
|
73
73
|
xl: 26
|
|
74
|
-
},
|
|
74
|
+
}, be = ({ px: e }) => /* @__PURE__ */ a("svg", {
|
|
75
75
|
viewBox: "0 0 24 24",
|
|
76
76
|
fill: "none",
|
|
77
77
|
stroke: "currentColor",
|
|
@@ -84,18 +84,18 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
84
84
|
cy: "7",
|
|
85
85
|
r: "4"
|
|
86
86
|
})]
|
|
87
|
-
}),
|
|
87
|
+
}), xe = ({ size: t = "md", src: n, alt: r = "", initials: a, icon: o, className: s }) => {
|
|
88
88
|
let c = [
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
ve.avatar,
|
|
90
|
+
ve[`avatar--${t}`],
|
|
91
91
|
s ?? ""
|
|
92
92
|
].filter(Boolean).join(" ");
|
|
93
93
|
if (n) return /* @__PURE__ */ i("span", {
|
|
94
|
-
className: [c,
|
|
94
|
+
className: [c, ve["avatar--bordered"]].join(" "),
|
|
95
95
|
children: /* @__PURE__ */ i("img", {
|
|
96
96
|
src: n,
|
|
97
97
|
alt: r,
|
|
98
|
-
className:
|
|
98
|
+
className: ve.avatar__image
|
|
99
99
|
})
|
|
100
100
|
});
|
|
101
101
|
if (a) return /* @__PURE__ */ i("span", {
|
|
@@ -103,24 +103,24 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
103
103
|
role: "img",
|
|
104
104
|
"aria-label": r || a,
|
|
105
105
|
children: /* @__PURE__ */ i("span", {
|
|
106
|
-
className:
|
|
106
|
+
className: ve.avatar__initials,
|
|
107
107
|
children: a.slice(0, 2).toUpperCase()
|
|
108
108
|
})
|
|
109
109
|
});
|
|
110
|
-
let l =
|
|
110
|
+
let l = ye[t], u = e.isValidElement(o) ? e.cloneElement(o, {
|
|
111
111
|
size: l,
|
|
112
112
|
strokeWidth: O(l)
|
|
113
|
-
}) : o ?? /* @__PURE__ */ i(
|
|
113
|
+
}) : o ?? /* @__PURE__ */ i(be, { px: l });
|
|
114
114
|
return /* @__PURE__ */ i("span", {
|
|
115
115
|
className: c,
|
|
116
116
|
role: "img",
|
|
117
117
|
"aria-label": r || "avatar",
|
|
118
118
|
children: /* @__PURE__ */ i("span", {
|
|
119
|
-
className:
|
|
119
|
+
className: ve.avatar__icon,
|
|
120
120
|
children: u
|
|
121
121
|
})
|
|
122
122
|
});
|
|
123
|
-
},
|
|
123
|
+
}, k = {
|
|
124
124
|
feed: "_feed_1pvgl_1",
|
|
125
125
|
"feed--compact": "_feed--compact_1pvgl_8",
|
|
126
126
|
"row--default": "_row--default_1pvgl_13",
|
|
@@ -135,35 +135,35 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
135
135
|
actor: "_actor_1pvgl_88",
|
|
136
136
|
highlight: "_highlight_1pvgl_89",
|
|
137
137
|
timestamp: "_timestamp_1pvgl_92"
|
|
138
|
-
},
|
|
139
|
-
className:
|
|
138
|
+
}, Se = ({ children: e }) => /* @__PURE__ */ i("span", {
|
|
139
|
+
className: k.highlight,
|
|
140
140
|
children: e
|
|
141
|
-
}),
|
|
142
|
-
size:
|
|
143
|
-
strokeWidth: O(
|
|
144
|
-
}) : t,
|
|
141
|
+
}), Ce = 16, we = (t) => e.isValidElement(t) ? e.cloneElement(t, {
|
|
142
|
+
size: Ce,
|
|
143
|
+
strokeWidth: O(Ce)
|
|
144
|
+
}) : t, Te = ({ items: e, variant: t = "default", className: n }) => {
|
|
145
145
|
let r = t === "compact";
|
|
146
146
|
return /* @__PURE__ */ i("div", {
|
|
147
147
|
className: [
|
|
148
|
-
|
|
149
|
-
r ?
|
|
148
|
+
k.feed,
|
|
149
|
+
r ? k["feed--compact"] : "",
|
|
150
150
|
n ?? ""
|
|
151
151
|
].filter(Boolean).join(" "),
|
|
152
152
|
children: e.map((t, n) => {
|
|
153
153
|
let o = n === e.length - 1, s = t.id ?? n;
|
|
154
154
|
return r ? /* @__PURE__ */ a("div", {
|
|
155
|
-
className:
|
|
155
|
+
className: k["row--compact"],
|
|
156
156
|
children: [/* @__PURE__ */ a("div", {
|
|
157
|
-
className:
|
|
158
|
-
children: [/* @__PURE__ */ i(
|
|
157
|
+
className: k.compactLeft,
|
|
158
|
+
children: [/* @__PURE__ */ i(xe, {
|
|
159
159
|
size: "sm",
|
|
160
160
|
src: t.avatarSrc,
|
|
161
161
|
alt: t.avatarAlt ?? t.actor
|
|
162
162
|
}), /* @__PURE__ */ a("p", {
|
|
163
|
-
className:
|
|
163
|
+
className: k.text,
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ i("span", {
|
|
166
|
-
className:
|
|
166
|
+
className: k.actor,
|
|
167
167
|
children: t.actor
|
|
168
168
|
}),
|
|
169
169
|
" ",
|
|
@@ -171,49 +171,49 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
171
171
|
]
|
|
172
172
|
})]
|
|
173
173
|
}), /* @__PURE__ */ i("span", {
|
|
174
|
-
className:
|
|
174
|
+
className: k.timestamp,
|
|
175
175
|
children: t.timestamp
|
|
176
176
|
})]
|
|
177
177
|
}, s) : /* @__PURE__ */ a("div", {
|
|
178
|
-
className:
|
|
178
|
+
className: k["row--default"],
|
|
179
179
|
children: [/* @__PURE__ */ a("div", {
|
|
180
|
-
className:
|
|
180
|
+
className: k.rail,
|
|
181
181
|
children: [/* @__PURE__ */ i("div", {
|
|
182
|
-
className:
|
|
183
|
-
children:
|
|
184
|
-
}), !o && /* @__PURE__ */ i("div", { className:
|
|
182
|
+
className: k.dot,
|
|
183
|
+
children: we(t.icon)
|
|
184
|
+
}), !o && /* @__PURE__ */ i("div", { className: k.connector })]
|
|
185
185
|
}), /* @__PURE__ */ a("div", {
|
|
186
|
-
className: [
|
|
186
|
+
className: [k.content, o ? "" : k["content--spaced"]].filter(Boolean).join(" "),
|
|
187
187
|
children: [/* @__PURE__ */ a("p", {
|
|
188
|
-
className:
|
|
188
|
+
className: k.text,
|
|
189
189
|
children: [
|
|
190
190
|
/* @__PURE__ */ i("span", {
|
|
191
|
-
className:
|
|
191
|
+
className: k.actor,
|
|
192
192
|
children: t.actor
|
|
193
193
|
}),
|
|
194
194
|
" ",
|
|
195
195
|
t.description
|
|
196
196
|
]
|
|
197
197
|
}), /* @__PURE__ */ i("span", {
|
|
198
|
-
className:
|
|
198
|
+
className: k.timestamp,
|
|
199
199
|
children: t.timestamp
|
|
200
200
|
})]
|
|
201
201
|
})]
|
|
202
202
|
}, s);
|
|
203
203
|
})
|
|
204
204
|
});
|
|
205
|
-
},
|
|
205
|
+
}, Ee = {
|
|
206
206
|
link: "_link_1g7dc_3",
|
|
207
207
|
link__external: "_link__external_1g7dc_34"
|
|
208
|
-
},
|
|
208
|
+
}, De = e.forwardRef(({ external: e, children: t, className: n, href: r, ...o }, s) => /* @__PURE__ */ a("a", {
|
|
209
209
|
ref: s,
|
|
210
210
|
href: r,
|
|
211
|
-
className: [
|
|
211
|
+
className: [Ee.link, n ?? ""].filter(Boolean).join(" "),
|
|
212
212
|
target: e ? "_blank" : o.target,
|
|
213
213
|
rel: e ? "noopener noreferrer" : o.rel,
|
|
214
214
|
...o,
|
|
215
215
|
children: [t, e && /* @__PURE__ */ i("span", {
|
|
216
|
-
className:
|
|
216
|
+
className: Ee.link__external,
|
|
217
217
|
"aria-label": "(opens in new tab)",
|
|
218
218
|
children: /* @__PURE__ */ a("svg", {
|
|
219
219
|
width: 12,
|
|
@@ -238,8 +238,8 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
238
238
|
})
|
|
239
239
|
})]
|
|
240
240
|
}));
|
|
241
|
-
|
|
242
|
-
var
|
|
241
|
+
De.displayName = "Link";
|
|
242
|
+
var Oe = {
|
|
243
243
|
button: "_button_1ls4o_2",
|
|
244
244
|
"button--sm": "_button--sm_1ls4o_18",
|
|
245
245
|
"button--md": "_button--md_1ls4o_19",
|
|
@@ -249,28 +249,28 @@ var De = {
|
|
|
249
249
|
"button--outline": "_button--outline_1ls4o_35",
|
|
250
250
|
"button--ghost": "_button--ghost_1ls4o_40",
|
|
251
251
|
"button--destructive": "_button--destructive_1ls4o_45"
|
|
252
|
-
},
|
|
252
|
+
}, ke = {
|
|
253
253
|
sm: 16,
|
|
254
254
|
md: 18,
|
|
255
255
|
lg: 20
|
|
256
|
-
},
|
|
256
|
+
}, Ae = e.forwardRef(({ icon: e, variant: t = "primary", size: n = "md", disabled: r, className: a, ...o }, s) => /* @__PURE__ */ i("button", {
|
|
257
257
|
ref: s,
|
|
258
258
|
disabled: r,
|
|
259
259
|
className: [
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
Oe.button,
|
|
261
|
+
Oe[`button--${t}`],
|
|
262
|
+
Oe[`button--${n}`],
|
|
263
263
|
a ?? ""
|
|
264
264
|
].filter(Boolean).join(" "),
|
|
265
265
|
...o,
|
|
266
266
|
children: /* @__PURE__ */ i(e, {
|
|
267
|
-
size:
|
|
268
|
-
strokeWidth: O(
|
|
267
|
+
size: ke[n],
|
|
268
|
+
strokeWidth: O(ke[n]),
|
|
269
269
|
"aria-hidden": "true"
|
|
270
270
|
})
|
|
271
271
|
}));
|
|
272
|
-
|
|
273
|
-
var
|
|
272
|
+
Ae.displayName = "IconButton";
|
|
273
|
+
var A = {
|
|
274
274
|
button: "_button_17bv9_21",
|
|
275
275
|
"button--primary": "_button--primary_17bv9_72",
|
|
276
276
|
"button--secondary": "_button--secondary_17bv9_99",
|
|
@@ -287,17 +287,17 @@ var j = {
|
|
|
287
287
|
"button--loading": "_button--loading_17bv9_251",
|
|
288
288
|
button__spinner: "_button__spinner_17bv9_255",
|
|
289
289
|
"sakani-btn-spin": "_sakani-btn-spin_17bv9_1"
|
|
290
|
-
},
|
|
290
|
+
}, j = e.forwardRef(({ variant: e = "primary", size: t = "md", leftIcon: n, rightIcon: r, loading: o = !1, disabled: s, children: c, className: l, ...u }, d) => {
|
|
291
291
|
let f = s || o;
|
|
292
292
|
return /* @__PURE__ */ a("button", {
|
|
293
293
|
ref: d,
|
|
294
294
|
className: [
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
o ?
|
|
299
|
-
n && !o ?
|
|
300
|
-
r && !o ?
|
|
295
|
+
A.button,
|
|
296
|
+
A[`button--${e}`],
|
|
297
|
+
A[`button--${t}`],
|
|
298
|
+
o ? A["button--loading"] : "",
|
|
299
|
+
n && !o ? A["button--hasLeftIcon"] : "",
|
|
300
|
+
r && !o ? A["button--hasRightIcon"] : "",
|
|
301
301
|
l ?? ""
|
|
302
302
|
].filter(Boolean).join(" "),
|
|
303
303
|
disabled: f,
|
|
@@ -305,7 +305,7 @@ var j = {
|
|
|
305
305
|
...u,
|
|
306
306
|
children: [
|
|
307
307
|
o && /* @__PURE__ */ i("span", {
|
|
308
|
-
className: [
|
|
308
|
+
className: [A.button__icon, A.button__spinner].join(" "),
|
|
309
309
|
"aria-hidden": "true",
|
|
310
310
|
children: /* @__PURE__ */ i("svg", {
|
|
311
311
|
viewBox: "0 0 24 24",
|
|
@@ -317,24 +317,24 @@ var j = {
|
|
|
317
317
|
})
|
|
318
318
|
}),
|
|
319
319
|
n && !o && /* @__PURE__ */ i("span", {
|
|
320
|
-
className:
|
|
320
|
+
className: A.button__icon,
|
|
321
321
|
"aria-hidden": "true",
|
|
322
322
|
children: n
|
|
323
323
|
}),
|
|
324
324
|
/* @__PURE__ */ i("span", {
|
|
325
|
-
className:
|
|
325
|
+
className: A.button__label,
|
|
326
326
|
children: c
|
|
327
327
|
}),
|
|
328
328
|
r && !o && /* @__PURE__ */ i("span", {
|
|
329
|
-
className:
|
|
329
|
+
className: A.button__icon,
|
|
330
330
|
"aria-hidden": "true",
|
|
331
331
|
children: r
|
|
332
332
|
})
|
|
333
333
|
]
|
|
334
334
|
});
|
|
335
335
|
});
|
|
336
|
-
|
|
337
|
-
var
|
|
336
|
+
j.displayName = "Button";
|
|
337
|
+
var M = {
|
|
338
338
|
wrap: "_wrap_3mj75_1",
|
|
339
339
|
"wrap--vertical": "_wrap--vertical_3mj75_7",
|
|
340
340
|
"wrap--horizontal": "_wrap--horizontal_3mj75_11",
|
|
@@ -348,36 +348,36 @@ var N = {
|
|
|
348
348
|
hint: "_hint_3mj75_79",
|
|
349
349
|
link: "_link_3mj75_88",
|
|
350
350
|
input: "_input_3mj75_92"
|
|
351
|
-
},
|
|
351
|
+
}, je = ({ src: t, alt: n, orientation: r = "vertical", accept: o = "image/jpeg,image/png", title: s = "Upload a photo", hint: l = "JPG or PNG, max 5MB.", onFileSelect: u, onRemove: d, className: f }) => {
|
|
352
352
|
let p = e.useRef(null), m = t !== void 0, [h, g] = e.useState(void 0), _ = m ? t : h, v = r === "horizontal", y = !!_, b = () => p.current?.click(), x = () => {
|
|
353
353
|
d?.(), m || g(void 0);
|
|
354
354
|
}, S = /* @__PURE__ */ a("div", {
|
|
355
|
-
className: [
|
|
355
|
+
className: [M.textStack, v ? "" : M["textStack--center"]].filter(Boolean).join(" "),
|
|
356
356
|
children: [/* @__PURE__ */ i("p", {
|
|
357
|
-
className:
|
|
357
|
+
className: M.title,
|
|
358
358
|
children: s
|
|
359
359
|
}), /* @__PURE__ */ i("p", {
|
|
360
|
-
className:
|
|
360
|
+
className: M.hint,
|
|
361
361
|
children: l
|
|
362
362
|
})]
|
|
363
363
|
});
|
|
364
364
|
return /* @__PURE__ */ a("div", {
|
|
365
365
|
className: [
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
M.wrap,
|
|
367
|
+
M[`wrap--${r}`],
|
|
368
368
|
f ?? ""
|
|
369
369
|
].filter(Boolean).join(" "),
|
|
370
370
|
children: [
|
|
371
371
|
/* @__PURE__ */ a("div", {
|
|
372
|
-
className:
|
|
373
|
-
children: [/* @__PURE__ */ i(
|
|
372
|
+
className: M.circleWrap,
|
|
373
|
+
children: [/* @__PURE__ */ i(xe, {
|
|
374
374
|
size: v ? "lg" : "xl",
|
|
375
375
|
src: _,
|
|
376
376
|
alt: n,
|
|
377
|
-
className: v ? void 0 :
|
|
377
|
+
className: v ? void 0 : M.bigAvatar
|
|
378
378
|
}), !v && /* @__PURE__ */ i("button", {
|
|
379
379
|
type: "button",
|
|
380
|
-
className:
|
|
380
|
+
className: M.badge,
|
|
381
381
|
onClick: b,
|
|
382
382
|
"aria-label": "Change photo",
|
|
383
383
|
children: /* @__PURE__ */ i(c, {
|
|
@@ -387,8 +387,8 @@ var N = {
|
|
|
387
387
|
})]
|
|
388
388
|
}),
|
|
389
389
|
v && /* @__PURE__ */ a("div", {
|
|
390
|
-
className:
|
|
391
|
-
children: [S, y ? /* @__PURE__ */ i(
|
|
390
|
+
className: M.horizontalContent,
|
|
391
|
+
children: [S, y ? /* @__PURE__ */ i(j, {
|
|
392
392
|
variant: "outline",
|
|
393
393
|
size: "sm",
|
|
394
394
|
onClick: x,
|
|
@@ -397,19 +397,19 @@ var N = {
|
|
|
397
397
|
borderColor: "var(--color-danger-border)"
|
|
398
398
|
},
|
|
399
399
|
children: "Remove"
|
|
400
|
-
}) : /* @__PURE__ */ i(
|
|
400
|
+
}) : /* @__PURE__ */ i(j, {
|
|
401
401
|
variant: "outline",
|
|
402
402
|
size: "sm",
|
|
403
403
|
onClick: b,
|
|
404
404
|
children: "Upload"
|
|
405
405
|
})]
|
|
406
406
|
}),
|
|
407
|
-
!v && (y ? /* @__PURE__ */ i(
|
|
407
|
+
!v && (y ? /* @__PURE__ */ i(De, {
|
|
408
408
|
href: "#",
|
|
409
409
|
onClick: (e) => {
|
|
410
410
|
e.preventDefault(), b();
|
|
411
411
|
},
|
|
412
|
-
className:
|
|
412
|
+
className: M.link,
|
|
413
413
|
style: {
|
|
414
414
|
color: "var(--color-brand-fg)",
|
|
415
415
|
fontSize: 16,
|
|
@@ -421,7 +421,7 @@ var N = {
|
|
|
421
421
|
ref: p,
|
|
422
422
|
type: "file",
|
|
423
423
|
accept: o,
|
|
424
|
-
className:
|
|
424
|
+
className: M.input,
|
|
425
425
|
onChange: (e) => {
|
|
426
426
|
let t = e.target.files?.[0];
|
|
427
427
|
t && (u?.(t), m || g(URL.createObjectURL(t))), e.target.value = "";
|
|
@@ -432,7 +432,7 @@ var N = {
|
|
|
432
432
|
};
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/lib/useThemeTick.ts
|
|
435
|
-
function
|
|
435
|
+
function Me() {
|
|
436
436
|
let [e, r] = n(0);
|
|
437
437
|
return t(() => {
|
|
438
438
|
if (typeof document > "u") return;
|
|
@@ -444,7 +444,7 @@ function je() {
|
|
|
444
444
|
}), () => e.disconnect();
|
|
445
445
|
}, []), e;
|
|
446
446
|
}
|
|
447
|
-
var
|
|
447
|
+
var N = {
|
|
448
448
|
balance: "_balance_kaxp5_1",
|
|
449
449
|
"balance--progress": "_balance--progress_kaxp5_8",
|
|
450
450
|
content: "_content_kaxp5_17",
|
|
@@ -462,14 +462,14 @@ var P = {
|
|
|
462
462
|
changeValue__down: "_changeValue__down_kaxp5_117",
|
|
463
463
|
changeLabel: "_changeLabel_kaxp5_124",
|
|
464
464
|
ringCard: "_ringCard_kaxp5_132"
|
|
465
|
-
},
|
|
466
|
-
let t = Math.min(e,
|
|
467
|
-
return Array.from({ length: t }, () =>
|
|
468
|
-
},
|
|
469
|
-
|
|
470
|
-
let t =
|
|
465
|
+
}, Ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Pe = 8, Fe = 6, Ie = 90, Le = (e) => {
|
|
466
|
+
let t = Math.min(e, Pe);
|
|
467
|
+
return Array.from({ length: t }, () => Ne[Math.floor(Math.random() * 36)]).join("");
|
|
468
|
+
}, Re = (e) => typeof window < "u" && getComputedStyle(document.documentElement).getPropertyValue(e).trim() || void 0, ze = ({ progress: e }) => {
|
|
469
|
+
Me();
|
|
470
|
+
let t = Re("--color-chart-1") ?? "#ff4700", n = Re("--color-bg-subtle") ?? "#f5f4f2", r = [{ value: Math.max(0, Math.min(100, e)) }];
|
|
471
471
|
return /* @__PURE__ */ i("div", {
|
|
472
|
-
className:
|
|
472
|
+
className: N.ringCard,
|
|
473
473
|
children: /* @__PURE__ */ i(fe, {
|
|
474
474
|
width: 64,
|
|
475
475
|
height: 64,
|
|
@@ -495,7 +495,7 @@ var P = {
|
|
|
495
495
|
})
|
|
496
496
|
})
|
|
497
497
|
});
|
|
498
|
-
},
|
|
498
|
+
}, Be = ({ label: t = "Available balance", value: n, change: r, progress: o, hidden: s, onToggleHidden: c, className: l }) => {
|
|
499
499
|
let u = s !== void 0, [d, f] = e.useState(!1), p = u ? s : d, m = o !== void 0, h = r?.direction ?? "up", g = h === "up" ? oe : ae, y = () => {
|
|
500
500
|
let e = !p;
|
|
501
501
|
c?.(e), u || f(e);
|
|
@@ -504,23 +504,23 @@ var P = {
|
|
|
504
504
|
if (p && !w.current) {
|
|
505
505
|
x(!0);
|
|
506
506
|
let e = 0, t = setInterval(() => {
|
|
507
|
-
e += 1, C((e) => e + 1), e >=
|
|
508
|
-
},
|
|
507
|
+
e += 1, C((e) => e + 1), e >= Fe && (clearInterval(t), x(!1));
|
|
508
|
+
}, Ie);
|
|
509
509
|
return w.current = !0, () => clearInterval(t);
|
|
510
510
|
}
|
|
511
511
|
w.current = p;
|
|
512
512
|
}, [p]);
|
|
513
|
-
let T = e.useMemo(() =>
|
|
514
|
-
className:
|
|
513
|
+
let T = e.useMemo(() => Le(n.length), [n, S]), ee = e.useMemo(() => r ? Le(r.value.length) : "", [r?.value, S]), E = /* @__PURE__ */ a("div", {
|
|
514
|
+
className: N.content,
|
|
515
515
|
children: [
|
|
516
516
|
/* @__PURE__ */ a("div", {
|
|
517
|
-
className:
|
|
517
|
+
className: N.labelRow,
|
|
518
518
|
children: [/* @__PURE__ */ i("p", {
|
|
519
|
-
className:
|
|
519
|
+
className: N.label,
|
|
520
520
|
children: t
|
|
521
521
|
}), /* @__PURE__ */ i("button", {
|
|
522
522
|
type: "button",
|
|
523
|
-
className:
|
|
523
|
+
className: N.hideToggle,
|
|
524
524
|
"aria-label": p ? "Show balance" : "Hide balance",
|
|
525
525
|
onClick: y,
|
|
526
526
|
children: i(p ? v : _, {
|
|
@@ -531,26 +531,26 @@ var P = {
|
|
|
531
531
|
}),
|
|
532
532
|
/* @__PURE__ */ i("p", {
|
|
533
533
|
className: [
|
|
534
|
-
|
|
535
|
-
p ?
|
|
536
|
-
b ?
|
|
534
|
+
N.value,
|
|
535
|
+
p ? N["value--hidden"] : "",
|
|
536
|
+
b ? N["value--glitching"] : ""
|
|
537
537
|
].filter(Boolean).join(" "),
|
|
538
538
|
children: p ? T : n
|
|
539
539
|
}),
|
|
540
540
|
r && /* @__PURE__ */ a("div", {
|
|
541
|
-
className:
|
|
541
|
+
className: N.changeRow,
|
|
542
542
|
children: [
|
|
543
543
|
/* @__PURE__ */ i(g, {
|
|
544
544
|
size: 24,
|
|
545
545
|
strokeWidth: 1.5,
|
|
546
|
-
className: h === "up" ?
|
|
546
|
+
className: h === "up" ? N.trendIcon__up : N.trendIcon__down
|
|
547
547
|
}),
|
|
548
548
|
/* @__PURE__ */ i("span", {
|
|
549
|
-
className: [h === "up" ?
|
|
549
|
+
className: [h === "up" ? N.changeValue__up : N.changeValue__down, b ? N["value--glitching"] : ""].filter(Boolean).join(" "),
|
|
550
550
|
children: p ? ee : r.value
|
|
551
551
|
}),
|
|
552
552
|
/* @__PURE__ */ i("span", {
|
|
553
|
-
className:
|
|
553
|
+
className: N.changeLabel,
|
|
554
554
|
children: r.label ?? "this month"
|
|
555
555
|
})
|
|
556
556
|
]
|
|
@@ -559,13 +559,13 @@ var P = {
|
|
|
559
559
|
});
|
|
560
560
|
return /* @__PURE__ */ a("div", {
|
|
561
561
|
className: [
|
|
562
|
-
|
|
563
|
-
m ?
|
|
562
|
+
N.balance,
|
|
563
|
+
m ? N["balance--progress"] : "",
|
|
564
564
|
l ?? ""
|
|
565
565
|
].filter(Boolean).join(" "),
|
|
566
|
-
children: [m && /* @__PURE__ */ i(
|
|
566
|
+
children: [m && /* @__PURE__ */ i(ze, { progress: o }), E]
|
|
567
567
|
});
|
|
568
|
-
},
|
|
568
|
+
}, Ve = {
|
|
569
569
|
progress: "_progress_1qaz4_11",
|
|
570
570
|
"progress--sm": "_progress--sm_1qaz4_20",
|
|
571
571
|
"progress--md": "_progress--md_1qaz4_21",
|
|
@@ -573,7 +573,7 @@ var P = {
|
|
|
573
573
|
progress__fill: "_progress__fill_1qaz4_25",
|
|
574
574
|
"progress__fill--indeterminate": "_progress__fill--indeterminate_1qaz4_33",
|
|
575
575
|
"progress-scan": "_progress-scan_1qaz4_1"
|
|
576
|
-
},
|
|
576
|
+
}, He = ({ value: e, size: t = "md", label: n = "Progress", className: r }) => {
|
|
577
577
|
let a = e === void 0, o = Math.min(100, Math.max(0, e ?? 0));
|
|
578
578
|
return /* @__PURE__ */ i("div", {
|
|
579
579
|
role: "progressbar",
|
|
@@ -582,45 +582,45 @@ var P = {
|
|
|
582
582
|
"aria-valuemin": 0,
|
|
583
583
|
"aria-valuemax": 100,
|
|
584
584
|
className: [
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
Ve.progress,
|
|
586
|
+
Ve[`progress--${t}`],
|
|
587
587
|
r ?? ""
|
|
588
588
|
].filter(Boolean).join(" "),
|
|
589
589
|
children: /* @__PURE__ */ i("div", {
|
|
590
|
-
className: [
|
|
590
|
+
className: [Ve.progress__fill, a ? Ve["progress__fill--indeterminate"] : ""].filter(Boolean).join(" "),
|
|
591
591
|
style: a ? void 0 : { width: `${o}%` }
|
|
592
592
|
})
|
|
593
593
|
});
|
|
594
|
-
},
|
|
595
|
-
function
|
|
594
|
+
}, Ue = ["dark", "force-light"];
|
|
595
|
+
function We(e, r) {
|
|
596
596
|
let [i, a] = n("");
|
|
597
597
|
return t(() => {
|
|
598
598
|
if (!r || typeof document > "u") return;
|
|
599
599
|
let t = e.current;
|
|
600
600
|
if (!t) return;
|
|
601
|
-
let n = t.closest(
|
|
601
|
+
let n = t.closest(Ue.map((e) => `.${e}`).join(", ")), i = n ? Ue.find((e) => n.classList.contains(e)) ?? "" : "";
|
|
602
602
|
a(i);
|
|
603
603
|
}, [e, r]), i;
|
|
604
604
|
}
|
|
605
|
-
var
|
|
605
|
+
var Ge = {
|
|
606
606
|
"divider--horizontal": "_divider--horizontal_nem37_4",
|
|
607
607
|
"divider--labeled": "_divider--labeled_nem37_13",
|
|
608
608
|
"divider--vertical": "_divider--vertical_nem37_27",
|
|
609
609
|
divider__label: "_divider__label_nem37_38"
|
|
610
|
-
},
|
|
610
|
+
}, Ke = ({ orientation: e = "horizontal", label: t, className: n }) => /* @__PURE__ */ i("div", {
|
|
611
611
|
role: "separator",
|
|
612
612
|
"aria-orientation": e,
|
|
613
613
|
className: [
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
t ?
|
|
614
|
+
Ge.divider,
|
|
615
|
+
Ge[`divider--${e}`],
|
|
616
|
+
t ? Ge["divider--labeled"] : "",
|
|
617
617
|
n ?? ""
|
|
618
618
|
].filter(Boolean).join(" "),
|
|
619
619
|
children: t && e === "horizontal" && /* @__PURE__ */ i("span", {
|
|
620
|
-
className:
|
|
620
|
+
className: Ge.divider__label,
|
|
621
621
|
children: t
|
|
622
622
|
})
|
|
623
|
-
}),
|
|
623
|
+
}), P = {
|
|
624
624
|
backdrop: "_backdrop_123ke_1",
|
|
625
625
|
card: "_card_123ke_12",
|
|
626
626
|
header: "_header_123ke_32",
|
|
@@ -639,8 +639,8 @@ var We = {
|
|
|
639
639
|
"sakani-modal-card-in": "_sakani-modal-card-in_123ke_1",
|
|
640
640
|
"card--exiting": "_card--exiting_123ke_113",
|
|
641
641
|
"sakani-modal-card-out": "_sakani-modal-card-out_123ke_1"
|
|
642
|
-
},
|
|
643
|
-
let S = c === "destructive", C = e.useRef(null), w = e.useRef(null), T = e.useRef(null), ee =
|
|
642
|
+
}, qe = ({ open: t, onClose: n, title: o, description: s, variant: c = "default", icon: l, cancelLabel: u = "Cancel", confirmLabel: d, onCancel: f, onConfirm: p, confirmLoading: m, closeOnEscape: h = !0, closeOnBackdropClick: g = !0, children: _, hideHeader: v = !1, hideFooterDivider: y = !1, footerJustify: b = "end", className: x }) => {
|
|
643
|
+
let S = c === "destructive", C = e.useRef(null), w = e.useRef(null), T = e.useRef(null), ee = We(T, t), [E, D] = e.useState(!1);
|
|
644
644
|
return e.useEffect(() => {
|
|
645
645
|
t && D(!0);
|
|
646
646
|
}, [t]), e.useEffect(() => {
|
|
@@ -678,9 +678,9 @@ var We = {
|
|
|
678
678
|
"aria-hidden": "true"
|
|
679
679
|
}), E && me(/* @__PURE__ */ i("div", {
|
|
680
680
|
className: [
|
|
681
|
-
|
|
681
|
+
P.backdrop,
|
|
682
682
|
ee,
|
|
683
|
-
t ?
|
|
683
|
+
t ? P["backdrop--entering"] : P["backdrop--exiting"]
|
|
684
684
|
].filter(Boolean).join(" "),
|
|
685
685
|
onMouseDown: (e) => {
|
|
686
686
|
g && e.target === e.currentTarget && n();
|
|
@@ -693,8 +693,8 @@ var We = {
|
|
|
693
693
|
"aria-label": v ? o : void 0,
|
|
694
694
|
tabIndex: -1,
|
|
695
695
|
className: [
|
|
696
|
-
|
|
697
|
-
t ?
|
|
696
|
+
P.card,
|
|
697
|
+
t ? P["card--entering"] : P["card--exiting"],
|
|
698
698
|
x ?? ""
|
|
699
699
|
].filter(Boolean).join(" "),
|
|
700
700
|
onAnimationEnd: (e) => {
|
|
@@ -702,23 +702,23 @@ var We = {
|
|
|
702
702
|
},
|
|
703
703
|
children: [
|
|
704
704
|
!v && /* @__PURE__ */ a("div", {
|
|
705
|
-
className:
|
|
705
|
+
className: P.header,
|
|
706
706
|
children: [/* @__PURE__ */ a("div", {
|
|
707
|
-
className:
|
|
707
|
+
className: P.titleGroup,
|
|
708
708
|
children: [S && /* @__PURE__ */ i("span", {
|
|
709
|
-
className:
|
|
709
|
+
className: P.iconWrap,
|
|
710
710
|
"aria-hidden": "true",
|
|
711
711
|
children: l ?? /* @__PURE__ */ i(se, {
|
|
712
712
|
size: 24,
|
|
713
713
|
strokeWidth: O(24),
|
|
714
|
-
className:
|
|
714
|
+
className: P.icon
|
|
715
715
|
})
|
|
716
716
|
}), /* @__PURE__ */ i("p", {
|
|
717
717
|
id: "modal-title",
|
|
718
|
-
className:
|
|
718
|
+
className: P.title,
|
|
719
719
|
children: o
|
|
720
720
|
})]
|
|
721
|
-
}), /* @__PURE__ */ i(
|
|
721
|
+
}), /* @__PURE__ */ i(Ae, {
|
|
722
722
|
icon: ce,
|
|
723
723
|
variant: "ghost",
|
|
724
724
|
size: "lg",
|
|
@@ -727,19 +727,19 @@ var We = {
|
|
|
727
727
|
})]
|
|
728
728
|
}),
|
|
729
729
|
s && /* @__PURE__ */ i("p", {
|
|
730
|
-
className:
|
|
730
|
+
className: P.description,
|
|
731
731
|
children: s
|
|
732
732
|
}),
|
|
733
733
|
_,
|
|
734
|
-
!y && /* @__PURE__ */ i(
|
|
734
|
+
!y && /* @__PURE__ */ i(Ke, {}),
|
|
735
735
|
/* @__PURE__ */ a("div", {
|
|
736
|
-
className: [
|
|
737
|
-
children: [/* @__PURE__ */ i(
|
|
736
|
+
className: [P.footer, b === "between" ? P["footer--between"] : ""].filter(Boolean).join(" "),
|
|
737
|
+
children: [/* @__PURE__ */ i(j, {
|
|
738
738
|
variant: "secondary",
|
|
739
739
|
onClick: () => (f ?? n)(),
|
|
740
740
|
style: { borderColor: "transparent" },
|
|
741
741
|
children: u
|
|
742
|
-
}), /* @__PURE__ */ i(
|
|
742
|
+
}), /* @__PURE__ */ i(j, {
|
|
743
743
|
variant: S ? "destructive" : "primary",
|
|
744
744
|
onClick: p,
|
|
745
745
|
loading: m,
|
|
@@ -749,7 +749,7 @@ var We = {
|
|
|
749
749
|
]
|
|
750
750
|
})
|
|
751
751
|
}), document.body)] });
|
|
752
|
-
},
|
|
752
|
+
}, F = {
|
|
753
753
|
row: "_row_88l3n_2",
|
|
754
754
|
"row--unread": "_row--unread_88l3n_12",
|
|
755
755
|
iconWrapSurface: "_iconWrapSurface_88l3n_17",
|
|
@@ -763,32 +763,32 @@ var We = {
|
|
|
763
763
|
cardTop: "_cardTop_88l3n_87",
|
|
764
764
|
description: "_description_88l3n_94",
|
|
765
765
|
actions: "_actions_88l3n_102"
|
|
766
|
-
},
|
|
766
|
+
}, Je = ({ icon: e, title: t, timestamp: n, read: r = !1, description: s, onDismiss: c, dismissLabel: l = "Dismiss", actionLabel: u, onAction: d, className: f }) => {
|
|
767
767
|
let p = s !== void 0, m = !r && !p, h = e ?? /* @__PURE__ */ i(o, {
|
|
768
768
|
size: 24,
|
|
769
769
|
strokeWidth: O(24)
|
|
770
770
|
});
|
|
771
771
|
return p ? /* @__PURE__ */ a("div", {
|
|
772
|
-
className: [
|
|
772
|
+
className: [F.card, f ?? ""].filter(Boolean).join(" "),
|
|
773
773
|
children: [/* @__PURE__ */ a("div", {
|
|
774
|
-
className:
|
|
774
|
+
className: F.cardTop,
|
|
775
775
|
children: [
|
|
776
776
|
/* @__PURE__ */ i("span", {
|
|
777
|
-
className:
|
|
777
|
+
className: F.iconWrapCanvas,
|
|
778
778
|
"aria-hidden": "true",
|
|
779
779
|
children: h
|
|
780
780
|
}),
|
|
781
781
|
/* @__PURE__ */ a("div", {
|
|
782
|
-
className:
|
|
782
|
+
className: F.content,
|
|
783
783
|
children: [/* @__PURE__ */ i("p", {
|
|
784
|
-
className:
|
|
784
|
+
className: F.titleBold,
|
|
785
785
|
children: t
|
|
786
786
|
}), /* @__PURE__ */ i("p", {
|
|
787
|
-
className:
|
|
787
|
+
className: F.description,
|
|
788
788
|
children: s
|
|
789
789
|
})]
|
|
790
790
|
}),
|
|
791
|
-
c && /* @__PURE__ */ i(
|
|
791
|
+
c && /* @__PURE__ */ i(Ae, {
|
|
792
792
|
icon: ce,
|
|
793
793
|
variant: "ghost",
|
|
794
794
|
size: "sm",
|
|
@@ -797,13 +797,13 @@ var We = {
|
|
|
797
797
|
})
|
|
798
798
|
]
|
|
799
799
|
}), /* @__PURE__ */ a("div", {
|
|
800
|
-
className:
|
|
801
|
-
children: [c && /* @__PURE__ */ i(
|
|
800
|
+
className: F.actions,
|
|
801
|
+
children: [c && /* @__PURE__ */ i(j, {
|
|
802
802
|
variant: "ghost",
|
|
803
803
|
size: "sm",
|
|
804
804
|
onClick: c,
|
|
805
805
|
children: l
|
|
806
|
-
}), u && /* @__PURE__ */ i(
|
|
806
|
+
}), u && /* @__PURE__ */ i(j, {
|
|
807
807
|
variant: "secondary",
|
|
808
808
|
size: "sm",
|
|
809
809
|
onClick: d,
|
|
@@ -812,51 +812,51 @@ var We = {
|
|
|
812
812
|
})]
|
|
813
813
|
})]
|
|
814
814
|
}) : /* @__PURE__ */ a("div", {
|
|
815
|
-
className: [
|
|
815
|
+
className: [F.row, m ? F["row--unread"] : ""].filter(Boolean).join(" "),
|
|
816
816
|
children: [
|
|
817
817
|
/* @__PURE__ */ i("span", {
|
|
818
|
-
className:
|
|
818
|
+
className: F.iconWrapSurface,
|
|
819
819
|
"aria-hidden": "true",
|
|
820
820
|
children: h
|
|
821
821
|
}),
|
|
822
822
|
/* @__PURE__ */ a("div", {
|
|
823
|
-
className:
|
|
823
|
+
className: F.content,
|
|
824
824
|
children: [/* @__PURE__ */ i("p", {
|
|
825
|
-
className: m ?
|
|
825
|
+
className: m ? F.titleBold : F.titleMuted,
|
|
826
826
|
children: t
|
|
827
827
|
}), n && /* @__PURE__ */ i("p", {
|
|
828
|
-
className:
|
|
828
|
+
className: F.timestamp,
|
|
829
829
|
children: n
|
|
830
830
|
})]
|
|
831
831
|
}),
|
|
832
832
|
m && /* @__PURE__ */ i("span", {
|
|
833
|
-
className:
|
|
833
|
+
className: F.dot,
|
|
834
834
|
"aria-hidden": "true"
|
|
835
835
|
})
|
|
836
836
|
]
|
|
837
837
|
});
|
|
838
|
-
},
|
|
838
|
+
}, Ye = {
|
|
839
839
|
stat: "_stat_krs8c_1",
|
|
840
840
|
labelRow: "_labelRow_krs8c_10",
|
|
841
841
|
label: "_label_krs8c_10",
|
|
842
842
|
value: "_value_krs8c_27"
|
|
843
|
-
},
|
|
844
|
-
className: [
|
|
843
|
+
}, Xe = ({ label: e, value: t, progress: n, className: r }) => /* @__PURE__ */ a("div", {
|
|
844
|
+
className: [Ye.stat, r ?? ""].filter(Boolean).join(" "),
|
|
845
845
|
children: [/* @__PURE__ */ a("div", {
|
|
846
|
-
className:
|
|
846
|
+
className: Ye.labelRow,
|
|
847
847
|
children: [/* @__PURE__ */ i("p", {
|
|
848
|
-
className:
|
|
848
|
+
className: Ye.label,
|
|
849
849
|
children: e
|
|
850
850
|
}), /* @__PURE__ */ i("p", {
|
|
851
|
-
className:
|
|
851
|
+
className: Ye.value,
|
|
852
852
|
children: t
|
|
853
853
|
})]
|
|
854
|
-
}), /* @__PURE__ */ i(
|
|
854
|
+
}), /* @__PURE__ */ i(He, {
|
|
855
855
|
value: n,
|
|
856
856
|
size: "lg",
|
|
857
857
|
label: e
|
|
858
858
|
})]
|
|
859
|
-
}),
|
|
859
|
+
}), Ze = {
|
|
860
860
|
balance: "_balance_5gcu5_1",
|
|
861
861
|
label: "_label_5gcu5_10",
|
|
862
862
|
amountRow: "_amountRow_5gcu5_19",
|
|
@@ -866,25 +866,25 @@ var We = {
|
|
|
866
866
|
fill: "_fill_5gcu5_50",
|
|
867
867
|
"fill--over": "_fill--over_5gcu5_57",
|
|
868
868
|
footer: "_footer_5gcu5_61"
|
|
869
|
-
},
|
|
869
|
+
}, Qe = (e) => e.toLocaleString("en-US", {
|
|
870
870
|
style: "currency",
|
|
871
871
|
currency: "USD"
|
|
872
|
-
}),
|
|
872
|
+
}), $e = ({ label: e = "Spent this month", spent: t, limit: n, formatAmount: r = Qe, className: o }) => {
|
|
873
873
|
let s = t > n, c = s ? 100 : n > 0 ? t / n * 100 : 0, l = s ? `${r(t - n)} over your limit` : `${r(n - t)} remaining`;
|
|
874
874
|
return /* @__PURE__ */ a("div", {
|
|
875
|
-
className: [
|
|
875
|
+
className: [Ze.balance, o ?? ""].filter(Boolean).join(" "),
|
|
876
876
|
children: [
|
|
877
877
|
/* @__PURE__ */ i("p", {
|
|
878
|
-
className:
|
|
878
|
+
className: Ze.label,
|
|
879
879
|
children: e
|
|
880
880
|
}),
|
|
881
881
|
/* @__PURE__ */ a("div", {
|
|
882
|
-
className:
|
|
882
|
+
className: Ze.amountRow,
|
|
883
883
|
children: [/* @__PURE__ */ i("p", {
|
|
884
|
-
className:
|
|
884
|
+
className: Ze.amount,
|
|
885
885
|
children: r(t)
|
|
886
886
|
}), /* @__PURE__ */ a("p", {
|
|
887
|
-
className:
|
|
887
|
+
className: Ze.limit,
|
|
888
888
|
children: [
|
|
889
889
|
"of ",
|
|
890
890
|
r(n),
|
|
@@ -893,24 +893,24 @@ var We = {
|
|
|
893
893
|
})]
|
|
894
894
|
}),
|
|
895
895
|
/* @__PURE__ */ i("div", {
|
|
896
|
-
className:
|
|
896
|
+
className: Ze.track,
|
|
897
897
|
role: "progressbar",
|
|
898
898
|
"aria-label": e,
|
|
899
899
|
"aria-valuenow": Math.round(c),
|
|
900
900
|
"aria-valuemin": 0,
|
|
901
901
|
"aria-valuemax": 100,
|
|
902
902
|
children: /* @__PURE__ */ i("div", {
|
|
903
|
-
className: [
|
|
903
|
+
className: [Ze.fill, s ? Ze["fill--over"] : ""].filter(Boolean).join(" "),
|
|
904
904
|
style: { width: `${c}%` }
|
|
905
905
|
})
|
|
906
906
|
}),
|
|
907
907
|
/* @__PURE__ */ i("p", {
|
|
908
|
-
className:
|
|
908
|
+
className: Ze.footer,
|
|
909
909
|
children: l
|
|
910
910
|
})
|
|
911
911
|
]
|
|
912
912
|
});
|
|
913
|
-
},
|
|
913
|
+
}, et = {
|
|
914
914
|
badge: "_badge_a5a38_6",
|
|
915
915
|
"badge--neutral-subtle": "_badge--neutral-subtle_a5a38_20",
|
|
916
916
|
"badge--neutral-solid": "_badge--neutral-solid_a5a38_21",
|
|
@@ -926,29 +926,29 @@ var We = {
|
|
|
926
926
|
"badge--info-solid": "_badge--info-solid_a5a38_41",
|
|
927
927
|
badge__icon: "_badge__icon_a5a38_44",
|
|
928
928
|
badge__label: "_badge__label_a5a38_45"
|
|
929
|
-
},
|
|
929
|
+
}, tt = ({ variant: e = "neutral", emphasis: t = "subtle", leftIcon: n, rightIcon: r, children: o, className: s }) => /* @__PURE__ */ a("span", {
|
|
930
930
|
className: [
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
et.badge,
|
|
932
|
+
et[`badge--${e}-${t}`],
|
|
933
933
|
s ?? ""
|
|
934
934
|
].filter(Boolean).join(" "),
|
|
935
935
|
children: [
|
|
936
936
|
n && /* @__PURE__ */ i("span", {
|
|
937
|
-
className:
|
|
937
|
+
className: et.badge__icon,
|
|
938
938
|
"aria-hidden": "true",
|
|
939
939
|
children: n
|
|
940
940
|
}),
|
|
941
941
|
/* @__PURE__ */ i("span", {
|
|
942
|
-
className:
|
|
942
|
+
className: et.badge__label,
|
|
943
943
|
children: o
|
|
944
944
|
}),
|
|
945
945
|
r && /* @__PURE__ */ i("span", {
|
|
946
|
-
className:
|
|
946
|
+
className: et.badge__icon,
|
|
947
947
|
"aria-hidden": "true",
|
|
948
948
|
children: r
|
|
949
949
|
})
|
|
950
950
|
]
|
|
951
|
-
}),
|
|
951
|
+
}), I = {
|
|
952
952
|
stepper: "_stepper_1w3rz_1",
|
|
953
953
|
stepBtn: "_stepBtn_1w3rz_10",
|
|
954
954
|
stepDivider: "_stepDivider_1w3rz_27",
|
|
@@ -967,7 +967,7 @@ var We = {
|
|
|
967
967
|
"roll-out-down": "_roll-out-down_1w3rz_1",
|
|
968
968
|
rollInDown: "_rollInDown_1w3rz_133",
|
|
969
969
|
"roll-in-down": "_roll-in-down_1w3rz_1"
|
|
970
|
-
},
|
|
970
|
+
}, nt = ({ value: t }) => {
|
|
971
971
|
let n = e.useRef(t), [r, o] = e.useState(null);
|
|
972
972
|
return t !== n.current && (o({
|
|
973
973
|
value: n.current,
|
|
@@ -977,30 +977,30 @@ var We = {
|
|
|
977
977
|
let e = setTimeout(() => o(null), 260);
|
|
978
978
|
return () => clearTimeout(e);
|
|
979
979
|
}, [r]), /* @__PURE__ */ a("span", {
|
|
980
|
-
className:
|
|
980
|
+
className: I.roll,
|
|
981
981
|
children: [r && /* @__PURE__ */ i("span", {
|
|
982
|
-
className: [
|
|
982
|
+
className: [I.rollNum, r.direction === "up" ? I.rollOutUp : I.rollOutDown].join(" "),
|
|
983
983
|
"aria-hidden": "true",
|
|
984
984
|
children: r.value
|
|
985
985
|
}, `out-${r.value}`), /* @__PURE__ */ i("span", {
|
|
986
|
-
className: [
|
|
986
|
+
className: [I.rollNum, r ? r.direction === "up" ? I.rollInUp : I.rollInDown : ""].filter(Boolean).join(" "),
|
|
987
987
|
onAnimationEnd: () => o(null),
|
|
988
988
|
children: t
|
|
989
989
|
}, `in-${t}`)]
|
|
990
990
|
});
|
|
991
|
-
},
|
|
991
|
+
}, rt = ({ quantity: t, onQuantityChange: n, min: r = 1, max: o, label: s = "Quantity", className: c }) => {
|
|
992
992
|
let l = t > r, u = o === void 0 || t < o, d = e.useRef(null), [f, p] = e.useState(!1), [m, h] = e.useState(String(t)), g = (e) => {
|
|
993
993
|
let t = e;
|
|
994
994
|
return r !== void 0 && (t = Math.max(r, t)), o !== void 0 && (t = Math.min(o, t)), t;
|
|
995
995
|
};
|
|
996
996
|
return /* @__PURE__ */ a("div", {
|
|
997
|
-
className: [
|
|
997
|
+
className: [I.stepper, c ?? ""].filter(Boolean).join(" "),
|
|
998
998
|
role: "group",
|
|
999
999
|
"aria-label": s,
|
|
1000
1000
|
children: [
|
|
1001
1001
|
/* @__PURE__ */ i("button", {
|
|
1002
1002
|
type: "button",
|
|
1003
|
-
className:
|
|
1003
|
+
className: I.stepBtn,
|
|
1004
1004
|
disabled: !l,
|
|
1005
1005
|
onClick: () => n?.(Math.max(r, t - 1)),
|
|
1006
1006
|
"aria-label": "Decrease quantity",
|
|
@@ -1010,17 +1010,17 @@ var We = {
|
|
|
1010
1010
|
})
|
|
1011
1011
|
}),
|
|
1012
1012
|
/* @__PURE__ */ i("span", {
|
|
1013
|
-
className:
|
|
1013
|
+
className: I.stepDivider,
|
|
1014
1014
|
"aria-hidden": "true"
|
|
1015
1015
|
}),
|
|
1016
1016
|
/* @__PURE__ */ a("span", {
|
|
1017
|
-
className:
|
|
1017
|
+
className: I.stepValue,
|
|
1018
1018
|
children: [/* @__PURE__ */ i("input", {
|
|
1019
1019
|
ref: d,
|
|
1020
1020
|
type: "text",
|
|
1021
1021
|
inputMode: "numeric",
|
|
1022
1022
|
size: Math.max((f ? m : String(t)).length, 1),
|
|
1023
|
-
className: [
|
|
1023
|
+
className: [I.stepInput, f ? "" : I.stepInputResting].filter(Boolean).join(" "),
|
|
1024
1024
|
value: f ? m : String(t),
|
|
1025
1025
|
"aria-label": s,
|
|
1026
1026
|
onFocus: (e) => {
|
|
@@ -1039,18 +1039,18 @@ var We = {
|
|
|
1039
1039
|
e.key === "Enter" && (e.preventDefault(), d.current?.blur()), e.key === "Escape" && (h(String(t)), d.current?.blur());
|
|
1040
1040
|
}
|
|
1041
1041
|
}), /* @__PURE__ */ i("span", {
|
|
1042
|
-
className: [
|
|
1042
|
+
className: [I.rollOverlay, f ? I.rollOverlayHidden : ""].filter(Boolean).join(" "),
|
|
1043
1043
|
"aria-hidden": "true",
|
|
1044
|
-
children: /* @__PURE__ */ i(
|
|
1044
|
+
children: /* @__PURE__ */ i(nt, { value: t })
|
|
1045
1045
|
})]
|
|
1046
1046
|
}),
|
|
1047
1047
|
/* @__PURE__ */ i("span", {
|
|
1048
|
-
className:
|
|
1048
|
+
className: I.stepDivider,
|
|
1049
1049
|
"aria-hidden": "true"
|
|
1050
1050
|
}),
|
|
1051
1051
|
/* @__PURE__ */ i("button", {
|
|
1052
1052
|
type: "button",
|
|
1053
|
-
className:
|
|
1053
|
+
className: I.stepBtn,
|
|
1054
1054
|
disabled: !u,
|
|
1055
1055
|
onClick: () => n?.(o === void 0 ? t + 1 : Math.min(o, t + 1)),
|
|
1056
1056
|
"aria-label": "Increase quantity",
|
|
@@ -1061,7 +1061,7 @@ var We = {
|
|
|
1061
1061
|
})
|
|
1062
1062
|
]
|
|
1063
1063
|
});
|
|
1064
|
-
},
|
|
1064
|
+
}, L = {
|
|
1065
1065
|
item: "_item_15jww_1",
|
|
1066
1066
|
thumb: "_thumb_15jww_11",
|
|
1067
1067
|
info: "_info_15jww_19",
|
|
@@ -1072,31 +1072,31 @@ var We = {
|
|
|
1072
1072
|
priceRow: "_priceRow_15jww_67",
|
|
1073
1073
|
priceOriginal: "_priceOriginal_15jww_75",
|
|
1074
1074
|
priceSale: "_priceSale_15jww_80"
|
|
1075
|
-
},
|
|
1075
|
+
}, it = (e) => e.toLocaleString("en-US", {
|
|
1076
1076
|
style: "currency",
|
|
1077
1077
|
currency: "USD"
|
|
1078
|
-
}),
|
|
1078
|
+
}), at = ({ image: e, imageAlt: t, name: n, variant: r, price: o, compareAtPrice: s, quantity: c, onQuantityChange: l, minQuantity: u = 1, maxQuantity: d, onRemove: f, removeLabel: p = "Remove item", formatPrice: m = it, className: h }) => {
|
|
1079
1079
|
let g = s !== void 0;
|
|
1080
1080
|
return /* @__PURE__ */ a("div", {
|
|
1081
|
-
className: [
|
|
1081
|
+
className: [L.item, h ?? ""].filter(Boolean).join(" "),
|
|
1082
1082
|
children: [
|
|
1083
1083
|
/* @__PURE__ */ i("img", {
|
|
1084
1084
|
src: e,
|
|
1085
1085
|
alt: t ?? n,
|
|
1086
|
-
className:
|
|
1086
|
+
className: L.thumb
|
|
1087
1087
|
}),
|
|
1088
1088
|
/* @__PURE__ */ a("div", {
|
|
1089
|
-
className:
|
|
1089
|
+
className: L.info,
|
|
1090
1090
|
children: [
|
|
1091
1091
|
/* @__PURE__ */ i("p", {
|
|
1092
|
-
className:
|
|
1092
|
+
className: L.name,
|
|
1093
1093
|
children: n
|
|
1094
1094
|
}),
|
|
1095
1095
|
r && /* @__PURE__ */ i("p", {
|
|
1096
|
-
className:
|
|
1096
|
+
className: L.variant,
|
|
1097
1097
|
children: r
|
|
1098
1098
|
}),
|
|
1099
|
-
/* @__PURE__ */ i(
|
|
1099
|
+
/* @__PURE__ */ i(rt, {
|
|
1100
1100
|
quantity: c,
|
|
1101
1101
|
onQuantityChange: l,
|
|
1102
1102
|
min: u,
|
|
@@ -1106,20 +1106,20 @@ var We = {
|
|
|
1106
1106
|
]
|
|
1107
1107
|
}),
|
|
1108
1108
|
/* @__PURE__ */ a("div", {
|
|
1109
|
-
className:
|
|
1109
|
+
className: L.right,
|
|
1110
1110
|
children: [g ? /* @__PURE__ */ a("div", {
|
|
1111
|
-
className:
|
|
1111
|
+
className: L.priceRow,
|
|
1112
1112
|
children: [/* @__PURE__ */ i("span", {
|
|
1113
|
-
className:
|
|
1113
|
+
className: L.priceOriginal,
|
|
1114
1114
|
children: m(s)
|
|
1115
1115
|
}), /* @__PURE__ */ i("span", {
|
|
1116
|
-
className:
|
|
1116
|
+
className: L.priceSale,
|
|
1117
1117
|
children: m(o)
|
|
1118
1118
|
})]
|
|
1119
1119
|
}) : /* @__PURE__ */ i("p", {
|
|
1120
|
-
className:
|
|
1120
|
+
className: L.price,
|
|
1121
1121
|
children: m(o)
|
|
1122
|
-
}), /* @__PURE__ */ i(
|
|
1122
|
+
}), /* @__PURE__ */ i(Ae, {
|
|
1123
1123
|
icon: C,
|
|
1124
1124
|
variant: "outline",
|
|
1125
1125
|
size: "sm",
|
|
@@ -1129,7 +1129,7 @@ var We = {
|
|
|
1129
1129
|
})
|
|
1130
1130
|
]
|
|
1131
1131
|
});
|
|
1132
|
-
},
|
|
1132
|
+
}, R = {
|
|
1133
1133
|
steps: "_steps_t53um_1",
|
|
1134
1134
|
step: "_step_t53um_1",
|
|
1135
1135
|
connector: "_connector_t53um_16",
|
|
@@ -1146,20 +1146,20 @@ var We = {
|
|
|
1146
1146
|
"Payment",
|
|
1147
1147
|
"Confirmation"
|
|
1148
1148
|
], st = ({ steps: t = ot, currentStep: n, className: r }) => /* @__PURE__ */ i("div", {
|
|
1149
|
-
className: [
|
|
1149
|
+
className: [R.steps, r ?? ""].filter(Boolean).join(" "),
|
|
1150
1150
|
role: "list",
|
|
1151
1151
|
children: t.map((r, o) => {
|
|
1152
1152
|
let s = o < n ? "completed" : o === n ? "active" : "upcoming", c = o === t.length - 1;
|
|
1153
1153
|
return /* @__PURE__ */ a(e.Fragment, { children: [/* @__PURE__ */ a("div", {
|
|
1154
|
-
className:
|
|
1154
|
+
className: R.step,
|
|
1155
1155
|
role: "listitem",
|
|
1156
1156
|
"aria-current": s === "active" ? "step" : void 0,
|
|
1157
1157
|
children: [/* @__PURE__ */ i("span", {
|
|
1158
1158
|
className: [
|
|
1159
|
-
|
|
1160
|
-
s === "completed" ?
|
|
1161
|
-
s === "active" ?
|
|
1162
|
-
s === "upcoming" ?
|
|
1159
|
+
R.circle,
|
|
1160
|
+
s === "completed" ? R.circleCompleted : "",
|
|
1161
|
+
s === "active" ? R.circleActive : "",
|
|
1162
|
+
s === "upcoming" ? R.circleUpcoming : ""
|
|
1163
1163
|
].filter(Boolean).join(" "),
|
|
1164
1164
|
"aria-hidden": "true",
|
|
1165
1165
|
children: /* @__PURE__ */ i(l, {
|
|
@@ -1168,14 +1168,14 @@ var We = {
|
|
|
1168
1168
|
})
|
|
1169
1169
|
}), /* @__PURE__ */ i("span", {
|
|
1170
1170
|
className: [
|
|
1171
|
-
|
|
1172
|
-
s === "active" ?
|
|
1173
|
-
s === "upcoming" ?
|
|
1171
|
+
R.label,
|
|
1172
|
+
s === "active" ? R.labelActive : "",
|
|
1173
|
+
s === "upcoming" ? R.labelUpcoming : ""
|
|
1174
1174
|
].filter(Boolean).join(" "),
|
|
1175
1175
|
children: r
|
|
1176
1176
|
})]
|
|
1177
1177
|
}), !c && /* @__PURE__ */ i("span", {
|
|
1178
|
-
className:
|
|
1178
|
+
className: R.connector,
|
|
1179
1179
|
"aria-hidden": "true"
|
|
1180
1180
|
})] }, r);
|
|
1181
1181
|
})
|
|
@@ -1257,7 +1257,7 @@ var We = {
|
|
|
1257
1257
|
className: [gt.price, s ? gt.priceSale : ""].filter(Boolean).join(" "),
|
|
1258
1258
|
children: r(e)
|
|
1259
1259
|
}),
|
|
1260
|
-
s && n && /* @__PURE__ */ a(
|
|
1260
|
+
s && n && /* @__PURE__ */ a(tt, {
|
|
1261
1261
|
variant: "danger",
|
|
1262
1262
|
emphasis: "solid",
|
|
1263
1263
|
children: [
|
|
@@ -1327,7 +1327,7 @@ var We = {
|
|
|
1327
1327
|
alt: t ?? n,
|
|
1328
1328
|
className: [z.image, f ? "" : z.imageDimmed].filter(Boolean).join(" ")
|
|
1329
1329
|
}),
|
|
1330
|
-
y && f && /* @__PURE__ */ a(
|
|
1330
|
+
y && f && /* @__PURE__ */ a(tt, {
|
|
1331
1331
|
variant: "danger",
|
|
1332
1332
|
emphasis: "solid",
|
|
1333
1333
|
className: z.saleBadge,
|
|
@@ -1391,7 +1391,7 @@ var We = {
|
|
|
1391
1391
|
onSelect: () => d?.(e.id ?? e.label)
|
|
1392
1392
|
}, e.id ?? e.label))
|
|
1393
1393
|
}),
|
|
1394
|
-
/* @__PURE__ */ i(
|
|
1394
|
+
/* @__PURE__ */ i(j, {
|
|
1395
1395
|
variant: "primary",
|
|
1396
1396
|
size: "md",
|
|
1397
1397
|
disabled: !f,
|
|
@@ -1556,7 +1556,7 @@ var We = {
|
|
|
1556
1556
|
});
|
|
1557
1557
|
}, kt = ({ quantity: e, lowStockThreshold: t = 5, label: n, className: r }) => {
|
|
1558
1558
|
let a = e <= 0, o = !a && e <= t, s = a ? "danger" : o ? "warning" : "success", c = a ? "Out of stock" : o ? `Only ${e} left` : "In stock";
|
|
1559
|
-
return /* @__PURE__ */ i(
|
|
1559
|
+
return /* @__PURE__ */ i(tt, {
|
|
1560
1560
|
variant: s,
|
|
1561
1561
|
emphasis: "subtle",
|
|
1562
1562
|
className: r,
|
|
@@ -1601,7 +1601,7 @@ var We = {
|
|
|
1601
1601
|
children: [
|
|
1602
1602
|
/* @__PURE__ */ a("div", {
|
|
1603
1603
|
className: V.metaRow,
|
|
1604
|
-
children: [/* @__PURE__ */ i(
|
|
1604
|
+
children: [/* @__PURE__ */ i(tt, {
|
|
1605
1605
|
variant: "accent",
|
|
1606
1606
|
emphasis: "subtle",
|
|
1607
1607
|
children: n
|
|
@@ -1620,7 +1620,7 @@ var We = {
|
|
|
1620
1620
|
}),
|
|
1621
1621
|
/* @__PURE__ */ a("div", {
|
|
1622
1622
|
className: V.author,
|
|
1623
|
-
children: [/* @__PURE__ */ i(
|
|
1623
|
+
children: [/* @__PURE__ */ i(xe, {
|
|
1624
1624
|
size: "sm",
|
|
1625
1625
|
src: c.avatarSrc,
|
|
1626
1626
|
alt: c.avatarAlt ?? c.name
|
|
@@ -1663,7 +1663,7 @@ var We = {
|
|
|
1663
1663
|
}), /* @__PURE__ */ a("div", {
|
|
1664
1664
|
className: f ? H.bodyVertical : H.bodyHorizontal,
|
|
1665
1665
|
children: [
|
|
1666
|
-
/* @__PURE__ */ i(
|
|
1666
|
+
/* @__PURE__ */ i(tt, {
|
|
1667
1667
|
variant: "accent",
|
|
1668
1668
|
emphasis: "subtle",
|
|
1669
1669
|
children: n
|
|
@@ -1680,7 +1680,7 @@ var We = {
|
|
|
1680
1680
|
className: H.footer,
|
|
1681
1681
|
children: [/* @__PURE__ */ a("div", {
|
|
1682
1682
|
className: H.author,
|
|
1683
|
-
children: [/* @__PURE__ */ i(
|
|
1683
|
+
children: [/* @__PURE__ */ i(xe, {
|
|
1684
1684
|
size: "md",
|
|
1685
1685
|
src: s.avatarSrc,
|
|
1686
1686
|
alt: s.avatarAlt ?? s.name,
|
|
@@ -1693,7 +1693,7 @@ var We = {
|
|
|
1693
1693
|
s.date
|
|
1694
1694
|
]
|
|
1695
1695
|
})]
|
|
1696
|
-
}), /* @__PURE__ */ i(
|
|
1696
|
+
}), /* @__PURE__ */ i(j, {
|
|
1697
1697
|
variant: "secondary",
|
|
1698
1698
|
size: "sm",
|
|
1699
1699
|
onClick: l,
|
|
@@ -1752,7 +1752,7 @@ var We = {
|
|
|
1752
1752
|
].filter(Boolean).join(" "),
|
|
1753
1753
|
children: [o.map((t, n) => /* @__PURE__ */ i("span", {
|
|
1754
1754
|
className: Ft.group__item,
|
|
1755
|
-
children: /* @__PURE__ */ i(
|
|
1755
|
+
children: /* @__PURE__ */ i(xe, {
|
|
1756
1756
|
size: e,
|
|
1757
1757
|
src: t.src,
|
|
1758
1758
|
initials: t.initials,
|
|
@@ -1800,12 +1800,12 @@ var We = {
|
|
|
1800
1800
|
}), /* @__PURE__ */ a("div", {
|
|
1801
1801
|
className: zt.metaRow,
|
|
1802
1802
|
children: [
|
|
1803
|
-
/* @__PURE__ */ i(
|
|
1803
|
+
/* @__PURE__ */ i(tt, {
|
|
1804
1804
|
variant: "accent",
|
|
1805
1805
|
emphasis: "subtle",
|
|
1806
1806
|
children: n
|
|
1807
1807
|
}),
|
|
1808
|
-
/* @__PURE__ */ i(
|
|
1808
|
+
/* @__PURE__ */ i(tt, {
|
|
1809
1809
|
variant: "neutral",
|
|
1810
1810
|
emphasis: "subtle",
|
|
1811
1811
|
children: o
|
|
@@ -1825,7 +1825,7 @@ var We = {
|
|
|
1825
1825
|
children: [/* @__PURE__ */ i("div", {
|
|
1826
1826
|
className: zt.rowLeft,
|
|
1827
1827
|
children: m
|
|
1828
|
-
}), /* @__PURE__ */ i(
|
|
1828
|
+
}), /* @__PURE__ */ i(j, {
|
|
1829
1829
|
variant: "secondary",
|
|
1830
1830
|
size: "sm",
|
|
1831
1831
|
className: zt.applyBtn,
|
|
@@ -1838,7 +1838,7 @@ var We = {
|
|
|
1838
1838
|
zt.rootCard,
|
|
1839
1839
|
f ?? ""
|
|
1840
1840
|
].filter(Boolean).join(" "),
|
|
1841
|
-
children: [m, /* @__PURE__ */ i(
|
|
1841
|
+
children: [m, /* @__PURE__ */ i(j, {
|
|
1842
1842
|
variant: "secondary",
|
|
1843
1843
|
size: "sm",
|
|
1844
1844
|
onClick: l,
|
|
@@ -1858,7 +1858,7 @@ var We = {
|
|
|
1858
1858
|
s ?? ""
|
|
1859
1859
|
].filter(Boolean).join(" "),
|
|
1860
1860
|
children: [
|
|
1861
|
-
e && /* @__PURE__ */ i(
|
|
1861
|
+
e && /* @__PURE__ */ i(tt, {
|
|
1862
1862
|
variant: "accent",
|
|
1863
1863
|
emphasis: "subtle",
|
|
1864
1864
|
children: e
|
|
@@ -2271,7 +2271,7 @@ var We = {
|
|
|
2271
2271
|
})
|
|
2272
2272
|
})]
|
|
2273
2273
|
}),
|
|
2274
|
-
/* @__PURE__ */ i(
|
|
2274
|
+
/* @__PURE__ */ i(Ae, {
|
|
2275
2275
|
icon: ce,
|
|
2276
2276
|
variant: "ghost",
|
|
2277
2277
|
size: "md",
|
|
@@ -2362,7 +2362,7 @@ var We = {
|
|
|
2362
2362
|
/* @__PURE__ */ a("div", {
|
|
2363
2363
|
className: G.row,
|
|
2364
2364
|
children: [
|
|
2365
|
-
/* @__PURE__ */ i(
|
|
2365
|
+
/* @__PURE__ */ i(Ae, {
|
|
2366
2366
|
icon: ee,
|
|
2367
2367
|
variant: "ghost",
|
|
2368
2368
|
size: "sm",
|
|
@@ -2384,7 +2384,7 @@ var We = {
|
|
|
2384
2384
|
e.key === "Enter" && re && (e.preventDefault(), s?.());
|
|
2385
2385
|
}
|
|
2386
2386
|
}),
|
|
2387
|
-
/* @__PURE__ */ i(
|
|
2387
|
+
/* @__PURE__ */ i(Ae, {
|
|
2388
2388
|
ref: T,
|
|
2389
2389
|
icon: ne,
|
|
2390
2390
|
variant: "ghost",
|
|
@@ -2447,7 +2447,7 @@ var We = {
|
|
|
2447
2447
|
children: e
|
|
2448
2448
|
}, e))
|
|
2449
2449
|
}), document.body),
|
|
2450
|
-
/* @__PURE__ */ i(
|
|
2450
|
+
/* @__PURE__ */ i(Ae, {
|
|
2451
2451
|
icon: te,
|
|
2452
2452
|
variant: "primary",
|
|
2453
2453
|
size: "sm",
|
|
@@ -3013,7 +3013,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3013
3013
|
option__label: "_option__label_wvw9t_161",
|
|
3014
3014
|
option__check: "_option__check_wvw9t_162"
|
|
3015
3015
|
}, vn = ({ label: t, description: n, error: r, size: o = "md", placeholder: s = "Select an option", options: c, value: l, defaultValue: u, onChange: d, disabled: f, id: p, className: m }) => {
|
|
3016
|
-
let h = e.useId(), g = `${p ?? h}-trigger`, _ = `${p ?? h}-panel`, v = !!r, [y, b] = e.useState(u), x = l === void 0 ? y : l, S = c.find((e) => e.value === x), [C, w] = e.useState(!1), [T, ee] = e.useState(!1), [E, D] = e.useState(0), te = e.useRef(null), ne = e.useRef(null), re = e.useRef(null), ie =
|
|
3016
|
+
let h = e.useId(), g = `${p ?? h}-trigger`, _ = `${p ?? h}-panel`, v = !!r, [y, b] = e.useState(u), x = l === void 0 ? y : l, S = c.find((e) => e.value === x), [C, w] = e.useState(!1), [T, ee] = e.useState(!1), [E, D] = e.useState(0), te = e.useRef(null), ne = e.useRef(null), re = e.useRef(null), ie = We(te, T), [ae, oe] = e.useState(null);
|
|
3017
3017
|
e.useEffect(() => {
|
|
3018
3018
|
C && ee(!0);
|
|
3019
3019
|
}, [C]), e.useLayoutEffect(() => {
|
|
@@ -3413,31 +3413,33 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3413
3413
|
});
|
|
3414
3414
|
Mn.displayName = "Slider";
|
|
3415
3415
|
var Q = {
|
|
3416
|
-
wrap: "
|
|
3417
|
-
"wrap--bordered": "_wrap--
|
|
3418
|
-
table: "
|
|
3419
|
-
headerRow: "
|
|
3420
|
-
headerCell: "
|
|
3421
|
-
bodyRow: "
|
|
3422
|
-
"bodyRow--
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3416
|
+
wrap: "_wrap_1oz8g_6",
|
|
3417
|
+
"wrap--bordered": "_wrap--bordered_1oz8g_17",
|
|
3418
|
+
table: "_table_1oz8g_22",
|
|
3419
|
+
headerRow: "_headerRow_1oz8g_44",
|
|
3420
|
+
headerCell: "_headerCell_1oz8g_45",
|
|
3421
|
+
bodyRow: "_bodyRow_1oz8g_61",
|
|
3422
|
+
"bodyRow--selectable": "_bodyRow--selectable_1oz8g_68",
|
|
3423
|
+
"bodyRow--selected": "_bodyRow--selected_1oz8g_69",
|
|
3424
|
+
bodyCell: "_bodyCell_1oz8g_71",
|
|
3425
|
+
checkCell: "_checkCell_1oz8g_83",
|
|
3426
|
+
checkbox: "_checkbox_1oz8g_107",
|
|
3427
|
+
checkbox__input: "_checkbox__input_1oz8g_114",
|
|
3428
|
+
checkbox__box: "_checkbox__box_1oz8g_116",
|
|
3429
|
+
checkbox__check: "_checkbox__check_1oz8g_137",
|
|
3430
|
+
checkbox__dash: "_checkbox__dash_1oz8g_144",
|
|
3431
|
+
stackedList: "_stackedList_1oz8g_163",
|
|
3432
|
+
card: "_card_1oz8g_170",
|
|
3433
|
+
"card--selectable": "_card--selectable_1oz8g_179",
|
|
3434
|
+
"card--selected": "_card--selected_1oz8g_181",
|
|
3435
|
+
card__field: "_card__field_1oz8g_183",
|
|
3436
|
+
card__label: "_card__label_1oz8g_191",
|
|
3437
|
+
card__value: "_card__value_1oz8g_197",
|
|
3438
|
+
card__selectRow: "_card__selectRow_1oz8g_207",
|
|
3439
|
+
"bodyRow--dragging": "_bodyRow--dragging_1oz8g_217",
|
|
3440
|
+
"bodyRow--dropTarget": "_bodyRow--dropTarget_1oz8g_218",
|
|
3441
|
+
dragCell: "_dragCell_1oz8g_225",
|
|
3442
|
+
dragHandle: "_dragHandle_1oz8g_241"
|
|
3441
3443
|
}, Nn = 640;
|
|
3442
3444
|
function Pn(t) {
|
|
3443
3445
|
let [n, r] = e.useState(!1);
|
|
@@ -3490,7 +3492,9 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3490
3492
|
}
|
|
3491
3493
|
let e = [...n], [t] = e.splice(C, 1);
|
|
3492
3494
|
e.splice(T, 0, t), u?.(e), w(null), ee(null);
|
|
3493
|
-
}, D = () => y(x ? [] : n.map((e, t) => t)), te = (e) => y(v.includes(e) ? v.filter((t) => t !== e) : [...v, e])
|
|
3495
|
+
}, D = () => y(x ? [] : n.map((e, t) => t)), te = (e) => y(v.includes(e) ? v.filter((t) => t !== e) : [...v, e]), ne = (e) => (t) => {
|
|
3496
|
+
t.target.closest("a, button, input, select, textarea, label, [role=\"button\"], [draggable=\"true\"]") || window.getSelection()?.isCollapsed && te(e);
|
|
3497
|
+
};
|
|
3494
3498
|
return m === "stacked" ? /* @__PURE__ */ i("div", {
|
|
3495
3499
|
className: [Q.stackedList, p ?? ""].filter(Boolean).join(" "),
|
|
3496
3500
|
role: "list",
|
|
@@ -3498,7 +3502,12 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3498
3502
|
let o = v.includes(n);
|
|
3499
3503
|
return /* @__PURE__ */ a("div", {
|
|
3500
3504
|
role: "listitem",
|
|
3501
|
-
|
|
3505
|
+
onClick: r ? ne(n) : void 0,
|
|
3506
|
+
className: [
|
|
3507
|
+
Q.card,
|
|
3508
|
+
o ? Q["card--selected"] : "",
|
|
3509
|
+
r ? Q["card--selectable"] : ""
|
|
3510
|
+
].filter(Boolean).join(" "),
|
|
3502
3511
|
children: [r && /* @__PURE__ */ i("div", {
|
|
3503
3512
|
className: Q.card__selectRow,
|
|
3504
3513
|
children: /* @__PURE__ */ i(Fn, {
|
|
@@ -3554,6 +3563,7 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3554
3563
|
}) }), /* @__PURE__ */ i("tbody", { children: n.map((e, n) => {
|
|
3555
3564
|
let o = v.includes(n);
|
|
3556
3565
|
return /* @__PURE__ */ a("tr", {
|
|
3566
|
+
onClick: r ? ne(n) : void 0,
|
|
3557
3567
|
onDragOver: l ? (e) => {
|
|
3558
3568
|
e.preventDefault(), ee(n);
|
|
3559
3569
|
} : void 0,
|
|
@@ -3563,6 +3573,7 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3563
3573
|
} : void 0,
|
|
3564
3574
|
className: [
|
|
3565
3575
|
Q.bodyRow,
|
|
3576
|
+
r ? Q["bodyRow--selectable"] : "",
|
|
3566
3577
|
o ? Q["bodyRow--selected"] : "",
|
|
3567
3578
|
T === n && C !== null && C !== n ? Q["bodyRow--dropTarget"] : "",
|
|
3568
3579
|
C === n ? Q["bodyRow--dragging"] : ""
|
|
@@ -3836,4 +3847,4 @@ var Ln = {
|
|
|
3836
3847
|
});
|
|
3837
3848
|
};
|
|
3838
3849
|
//#endregion
|
|
3839
|
-
export {
|
|
3850
|
+
export { Ke as $, Rt as A, bt as B, Qt as C, Ut as D, Kt as E, kt as F, ot as G, ht as H, Ot as I, tt as J, at as K, Tt as L, Pt as M, jt as N, Ht as O, At as P, qe as Q, Ct as R, $t as S, qt as T, pt as U, vt as V, st as W, Xe as X, $e as Y, Je as Z, dn as _, Mn as a, De as at, nn as b, En as c, xe as ct, Sn as d, O as dt, He as et, bn as f, fn as g, hn as h, In as i, Ae as it, It as j, Bt as k, Tn as l, _e as lt, _n as m, Bn as n, je as nt, An as o, Te as ot, vn as p, rt as q, Rn as r, j as rt, On as s, Se as st, Vn as t, Be as tt, wn as u, ge as ut, cn as v, Xt as w, tn as x, on as y, St as z };
|