@sakaniui/react 0.3.20 → 0.3.21
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-CFlK053j.js → TopBar-BKSCwKnQ.js} +803 -657
- package/dist/TopBar-BWbOTcpt.cjs +1 -0
- package/dist/blocks.cjs +1 -1
- package/dist/blocks.mjs +2130 -2106
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +1304 -1292
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/TopBar-A-y2TkSF.cjs +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import e, { useEffect as t, useState as n } from "react";
|
|
2
2
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import { Bell as o, BellOff as s, Camera as c, Check as l, CheckCheck as u, ChevronDown as d, ChevronLeft as f, ChevronRight as p, CircleAlert as m, CircleHelp as h, Download as g, Eye as _, EyeOff as v, File as y, GripVertical as b, Heart as x, Inbox as S, Minus as C, PanelLeft as w, PanelLeftClose as T, Paperclip as
|
|
4
|
-
import { PolarAngleAxis as
|
|
5
|
-
import
|
|
3
|
+
import { Bell as o, BellOff as s, Camera as c, Check as l, CheckCheck as u, ChevronDown as d, ChevronLeft as f, ChevronRight as p, CircleAlert as m, CircleHelp as h, Download as g, Eye as _, EyeOff as v, File as y, GripVertical as b, Heart as x, Inbox as S, Minus as C, PanelLeft as w, PanelLeftClose as T, Paperclip as E, Plus as D, Search as O, Send as ee, Smile as te, Star as k, StarHalf as ne, TrendingDown as re, TrendingUp as ie, TriangleAlert as ae, X as oe } from "lucide-react";
|
|
4
|
+
import { PolarAngleAxis as se, RadialBar as ce, RadialBarChart as le, ResponsiveContainer as ue } from "recharts";
|
|
5
|
+
import de, { createPortal as fe } from "react-dom";
|
|
6
6
|
//#region src/lib/iconStrokeWidth.ts
|
|
7
|
-
var
|
|
7
|
+
var A = (e, t = 1.5) => 24 / e * t, pe = {
|
|
8
8
|
accordion: "_accordion_1njer_3",
|
|
9
9
|
item: "_item_1njer_10",
|
|
10
10
|
item__header: "_item__header_1njer_12",
|
|
@@ -15,26 +15,26 @@ 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
|
+
}, me = ({ 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: [pe.item, s ?? ""].filter(Boolean).join(" "),
|
|
22
22
|
children: [/* @__PURE__ */ a("button", {
|
|
23
23
|
type: "button",
|
|
24
|
-
className:
|
|
24
|
+
className: pe.item__header,
|
|
25
25
|
"aria-expanded": d,
|
|
26
26
|
onClick: () => !c && u((e) => !e),
|
|
27
27
|
children: [/* @__PURE__ */ i("span", {
|
|
28
|
-
className:
|
|
28
|
+
className: pe.item__title,
|
|
29
29
|
children: t
|
|
30
30
|
}), /* @__PURE__ */ i("span", {
|
|
31
|
-
className: [
|
|
31
|
+
className: [pe.item__chevron, d ? pe["item__chevron--open"] : ""].join(" "),
|
|
32
32
|
"aria-hidden": "true",
|
|
33
33
|
children: /* @__PURE__ */ i("svg", {
|
|
34
34
|
viewBox: "0 0 24 24",
|
|
35
35
|
fill: "none",
|
|
36
36
|
stroke: "currentColor",
|
|
37
|
-
strokeWidth:
|
|
37
|
+
strokeWidth: A(18),
|
|
38
38
|
strokeLinecap: "round",
|
|
39
39
|
strokeLinejoin: "round",
|
|
40
40
|
width: 18,
|
|
@@ -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: [pe.item__panelWrap, d ? pe["item__panelWrap--open"] : ""].join(" "),
|
|
47
47
|
children: /* @__PURE__ */ i("div", {
|
|
48
|
-
className:
|
|
48
|
+
className: pe.item__panel,
|
|
49
49
|
children: /* @__PURE__ */ i("div", {
|
|
50
|
-
className:
|
|
50
|
+
className: pe.item__panelInner,
|
|
51
51
|
children: n
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
54
|
})]
|
|
55
55
|
});
|
|
56
|
-
},
|
|
57
|
-
className: [
|
|
56
|
+
}, he = ({ children: e, className: t }) => /* @__PURE__ */ i("div", {
|
|
57
|
+
className: [pe.accordion, t ?? ""].filter(Boolean).join(" "),
|
|
58
58
|
children: e
|
|
59
|
-
}),
|
|
59
|
+
}), ge = {
|
|
60
60
|
avatar: "_avatar_1igqs_3",
|
|
61
61
|
"avatar--sm": "_avatar--sm_1igqs_17",
|
|
62
62
|
"avatar--md": "_avatar--md_1igqs_18",
|
|
@@ -66,16 +66,16 @@ 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
|
+
}, _e = {
|
|
70
70
|
sm: 14,
|
|
71
71
|
md: 18,
|
|
72
72
|
lg: 22,
|
|
73
73
|
xl: 26
|
|
74
|
-
},
|
|
74
|
+
}, ve = ({ px: e }) => /* @__PURE__ */ a("svg", {
|
|
75
75
|
viewBox: "0 0 24 24",
|
|
76
76
|
fill: "none",
|
|
77
77
|
stroke: "currentColor",
|
|
78
|
-
strokeWidth:
|
|
78
|
+
strokeWidth: A(e),
|
|
79
79
|
strokeLinecap: "round",
|
|
80
80
|
strokeLinejoin: "round",
|
|
81
81
|
"aria-hidden": "true",
|
|
@@ -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
|
+
}), ye = ({ size: t = "md", src: n, alt: r = "", initials: a, icon: o, className: s }) => {
|
|
88
88
|
let c = [
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
ge.avatar,
|
|
90
|
+
ge[`avatar--${t}`],
|
|
91
91
|
s ?? ""
|
|
92
92
|
].filter(Boolean).join(" ");
|
|
93
93
|
if (n) return /* @__PURE__ */ i("span", {
|
|
94
|
-
className: [c,
|
|
94
|
+
className: [c, ge["avatar--bordered"]].join(" "),
|
|
95
95
|
children: /* @__PURE__ */ i("img", {
|
|
96
96
|
src: n,
|
|
97
97
|
alt: r,
|
|
98
|
-
className:
|
|
98
|
+
className: ge.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: ge.avatar__initials,
|
|
107
107
|
children: a.slice(0, 2).toUpperCase()
|
|
108
108
|
})
|
|
109
109
|
});
|
|
110
|
-
let l =
|
|
110
|
+
let l = _e[t], u = e.isValidElement(o) ? e.cloneElement(o, {
|
|
111
111
|
size: l,
|
|
112
|
-
strokeWidth:
|
|
113
|
-
}) : o ?? /* @__PURE__ */ i(
|
|
112
|
+
strokeWidth: A(l)
|
|
113
|
+
}) : o ?? /* @__PURE__ */ i(ve, { 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: ge.avatar__icon,
|
|
120
120
|
children: u
|
|
121
121
|
})
|
|
122
122
|
});
|
|
123
|
-
},
|
|
123
|
+
}, j = {
|
|
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
|
+
}, be = ({ children: e }) => /* @__PURE__ */ i("span", {
|
|
139
|
+
className: j.highlight,
|
|
140
140
|
children: e
|
|
141
|
-
}),
|
|
142
|
-
size:
|
|
143
|
-
strokeWidth:
|
|
144
|
-
}) : t,
|
|
141
|
+
}), xe = 16, Se = (t) => e.isValidElement(t) ? e.cloneElement(t, {
|
|
142
|
+
size: xe,
|
|
143
|
+
strokeWidth: A(xe)
|
|
144
|
+
}) : t, Ce = ({ 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
|
+
j.feed,
|
|
149
|
+
r ? j["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: j["row--compact"],
|
|
156
156
|
children: [/* @__PURE__ */ a("div", {
|
|
157
|
-
className:
|
|
158
|
-
children: [/* @__PURE__ */ i(
|
|
157
|
+
className: j.compactLeft,
|
|
158
|
+
children: [/* @__PURE__ */ i(ye, {
|
|
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: j.text,
|
|
164
164
|
children: [
|
|
165
165
|
/* @__PURE__ */ i("span", {
|
|
166
|
-
className:
|
|
166
|
+
className: j.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: j.timestamp,
|
|
175
175
|
children: t.timestamp
|
|
176
176
|
})]
|
|
177
177
|
}, s) : /* @__PURE__ */ a("div", {
|
|
178
|
-
className:
|
|
178
|
+
className: j["row--default"],
|
|
179
179
|
children: [/* @__PURE__ */ a("div", {
|
|
180
|
-
className:
|
|
180
|
+
className: j.rail,
|
|
181
181
|
children: [/* @__PURE__ */ i("div", {
|
|
182
|
-
className:
|
|
183
|
-
children:
|
|
184
|
-
}), !o && /* @__PURE__ */ i("div", { className:
|
|
182
|
+
className: j.dot,
|
|
183
|
+
children: Se(t.icon)
|
|
184
|
+
}), !o && /* @__PURE__ */ i("div", { className: j.connector })]
|
|
185
185
|
}), /* @__PURE__ */ a("div", {
|
|
186
|
-
className: [
|
|
186
|
+
className: [j.content, o ? "" : j["content--spaced"]].filter(Boolean).join(" "),
|
|
187
187
|
children: [/* @__PURE__ */ a("p", {
|
|
188
|
-
className:
|
|
188
|
+
className: j.text,
|
|
189
189
|
children: [
|
|
190
190
|
/* @__PURE__ */ i("span", {
|
|
191
|
-
className:
|
|
191
|
+
className: j.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: j.timestamp,
|
|
199
199
|
children: t.timestamp
|
|
200
200
|
})]
|
|
201
201
|
})]
|
|
202
202
|
}, s);
|
|
203
203
|
})
|
|
204
204
|
});
|
|
205
|
-
},
|
|
205
|
+
}, we = {
|
|
206
206
|
link: "_link_1g7dc_3",
|
|
207
207
|
link__external: "_link__external_1g7dc_34"
|
|
208
|
-
},
|
|
208
|
+
}, Te = 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: [we.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: we.link__external,
|
|
217
217
|
"aria-label": "(opens in new tab)",
|
|
218
218
|
children: /* @__PURE__ */ a("svg", {
|
|
219
219
|
width: 12,
|
|
@@ -221,7 +221,7 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
221
221
|
viewBox: "0 0 24 24",
|
|
222
222
|
fill: "none",
|
|
223
223
|
stroke: "currentColor",
|
|
224
|
-
strokeWidth:
|
|
224
|
+
strokeWidth: A(12),
|
|
225
225
|
strokeLinecap: "round",
|
|
226
226
|
strokeLinejoin: "round",
|
|
227
227
|
"aria-hidden": "true",
|
|
@@ -238,8 +238,8 @@ var O = (e, t = 1.5) => 24 / e * t, k = {
|
|
|
238
238
|
})
|
|
239
239
|
})]
|
|
240
240
|
}));
|
|
241
|
-
|
|
242
|
-
var
|
|
241
|
+
Te.displayName = "Link";
|
|
242
|
+
var Ee = {
|
|
243
243
|
button: "_button_l09ur_2",
|
|
244
244
|
"button--sm": "_button--sm_l09ur_26",
|
|
245
245
|
"button--md": "_button--md_l09ur_27",
|
|
@@ -249,28 +249,28 @@ var De = {
|
|
|
249
249
|
"button--outline": "_button--outline_l09ur_43",
|
|
250
250
|
"button--ghost": "_button--ghost_l09ur_48",
|
|
251
251
|
"button--destructive": "_button--destructive_l09ur_53"
|
|
252
|
-
},
|
|
252
|
+
}, De = {
|
|
253
253
|
sm: 16,
|
|
254
254
|
md: 18,
|
|
255
255
|
lg: 20
|
|
256
|
-
},
|
|
256
|
+
}, Oe = 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
|
+
Ee.button,
|
|
261
|
+
Ee[`button--${t}`],
|
|
262
|
+
Ee[`button--${n}`],
|
|
263
263
|
a ?? ""
|
|
264
264
|
].filter(Boolean).join(" "),
|
|
265
265
|
...o,
|
|
266
266
|
children: /* @__PURE__ */ i(e, {
|
|
267
|
-
size:
|
|
268
|
-
strokeWidth:
|
|
267
|
+
size: De[n],
|
|
268
|
+
strokeWidth: A(De[n]),
|
|
269
269
|
"aria-hidden": "true"
|
|
270
270
|
})
|
|
271
271
|
}));
|
|
272
|
-
|
|
273
|
-
var
|
|
272
|
+
Oe.displayName = "IconButton";
|
|
273
|
+
var M = {
|
|
274
274
|
button: "_button_yjccc_21",
|
|
275
275
|
"button--primary": "_button--primary_yjccc_106",
|
|
276
276
|
"button--secondary": "_button--secondary_yjccc_133",
|
|
@@ -287,17 +287,17 @@ var j = {
|
|
|
287
287
|
"button--loading": "_button--loading_yjccc_285",
|
|
288
288
|
button__spinner: "_button__spinner_yjccc_289",
|
|
289
289
|
"sakani-btn-spin": "_sakani-btn-spin_yjccc_1"
|
|
290
|
-
},
|
|
290
|
+
}, N = 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
|
+
M.button,
|
|
296
|
+
M[`button--${e}`],
|
|
297
|
+
M[`button--${t}`],
|
|
298
|
+
o ? M["button--loading"] : "",
|
|
299
|
+
n && !o ? M["button--hasLeftIcon"] : "",
|
|
300
|
+
r && !o ? M["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: [M.button__icon, M.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: M.button__icon,
|
|
321
321
|
"aria-hidden": "true",
|
|
322
322
|
children: n
|
|
323
323
|
}),
|
|
324
324
|
/* @__PURE__ */ i("span", {
|
|
325
|
-
className:
|
|
325
|
+
className: M.button__label,
|
|
326
326
|
children: c
|
|
327
327
|
}),
|
|
328
328
|
r && !o && /* @__PURE__ */ i("span", {
|
|
329
|
-
className:
|
|
329
|
+
className: M.button__icon,
|
|
330
330
|
"aria-hidden": "true",
|
|
331
331
|
children: r
|
|
332
332
|
})
|
|
333
333
|
]
|
|
334
334
|
});
|
|
335
335
|
});
|
|
336
|
-
|
|
337
|
-
var
|
|
336
|
+
N.displayName = "Button";
|
|
337
|
+
var P = {
|
|
338
338
|
wrap: "_wrap_3mj75_1",
|
|
339
339
|
"wrap--vertical": "_wrap--vertical_3mj75_7",
|
|
340
340
|
"wrap--horizontal": "_wrap--horizontal_3mj75_11",
|
|
@@ -348,47 +348,47 @@ var N = {
|
|
|
348
348
|
hint: "_hint_3mj75_79",
|
|
349
349
|
link: "_link_3mj75_88",
|
|
350
350
|
input: "_input_3mj75_92"
|
|
351
|
-
},
|
|
351
|
+
}, ke = ({ 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: [P.textStack, v ? "" : P["textStack--center"]].filter(Boolean).join(" "),
|
|
356
356
|
children: [/* @__PURE__ */ i("p", {
|
|
357
|
-
className:
|
|
357
|
+
className: P.title,
|
|
358
358
|
children: s
|
|
359
359
|
}), /* @__PURE__ */ i("p", {
|
|
360
|
-
className:
|
|
360
|
+
className: P.hint,
|
|
361
361
|
children: l
|
|
362
362
|
})]
|
|
363
363
|
});
|
|
364
364
|
return /* @__PURE__ */ a("div", {
|
|
365
365
|
className: [
|
|
366
|
-
|
|
367
|
-
|
|
366
|
+
P.wrap,
|
|
367
|
+
P[`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: P.circleWrap,
|
|
373
|
+
children: [/* @__PURE__ */ i(ye, {
|
|
374
374
|
size: v ? "lg" : "xl",
|
|
375
375
|
src: _,
|
|
376
376
|
alt: n,
|
|
377
|
-
className: v ? void 0 :
|
|
377
|
+
className: v ? void 0 : P.bigAvatar
|
|
378
378
|
}), !v && /* @__PURE__ */ i("button", {
|
|
379
379
|
type: "button",
|
|
380
|
-
className:
|
|
380
|
+
className: P.badge,
|
|
381
381
|
onClick: b,
|
|
382
382
|
"aria-label": "Change photo",
|
|
383
383
|
children: /* @__PURE__ */ i(c, {
|
|
384
384
|
size: 16,
|
|
385
|
-
strokeWidth:
|
|
385
|
+
strokeWidth: A(16)
|
|
386
386
|
})
|
|
387
387
|
})]
|
|
388
388
|
}),
|
|
389
389
|
v && /* @__PURE__ */ a("div", {
|
|
390
|
-
className:
|
|
391
|
-
children: [S, y ? /* @__PURE__ */ i(
|
|
390
|
+
className: P.horizontalContent,
|
|
391
|
+
children: [S, y ? /* @__PURE__ */ i(N, {
|
|
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(N, {
|
|
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(Te, {
|
|
408
408
|
href: "#",
|
|
409
409
|
onClick: (e) => {
|
|
410
410
|
e.preventDefault(), b();
|
|
411
411
|
},
|
|
412
|
-
className:
|
|
412
|
+
className: P.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: P.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 Ae() {
|
|
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 F = {
|
|
448
448
|
balance: "_balance_kaxp5_1",
|
|
449
449
|
"balance--progress": "_balance--progress_kaxp5_8",
|
|
450
450
|
content: "_content_kaxp5_17",
|
|
@@ -462,30 +462,30 @@ 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
|
+
}, je = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Me = 8, Ne = 6, Pe = 90, Fe = (e) => {
|
|
466
|
+
let t = Math.min(e, Me);
|
|
467
|
+
return Array.from({ length: t }, () => je[Math.floor(Math.random() * 36)]).join("");
|
|
468
|
+
}, Ie = (e) => typeof window < "u" && getComputedStyle(document.documentElement).getPropertyValue(e).trim() || void 0, Le = ({ progress: e }) => {
|
|
469
|
+
Ae();
|
|
470
|
+
let t = Ie("--color-chart-1") ?? "#ff4700", n = Ie("--color-bg-subtle") ?? "#f5f4f2", r = [{ value: Math.max(0, Math.min(100, e)) }];
|
|
471
471
|
return /* @__PURE__ */ i("div", {
|
|
472
|
-
className:
|
|
473
|
-
children: /* @__PURE__ */ i(
|
|
472
|
+
className: F.ringCard,
|
|
473
|
+
children: /* @__PURE__ */ i(ue, {
|
|
474
474
|
width: 64,
|
|
475
475
|
height: 64,
|
|
476
|
-
children: /* @__PURE__ */ a(
|
|
476
|
+
children: /* @__PURE__ */ a(le, {
|
|
477
477
|
data: r,
|
|
478
478
|
startAngle: 90,
|
|
479
479
|
endAngle: -270,
|
|
480
480
|
innerRadius: "72%",
|
|
481
481
|
outerRadius: "100%",
|
|
482
482
|
barSize: 10,
|
|
483
|
-
children: [/* @__PURE__ */ i(
|
|
483
|
+
children: [/* @__PURE__ */ i(se, {
|
|
484
484
|
type: "number",
|
|
485
485
|
domain: [0, 100],
|
|
486
486
|
tick: !1,
|
|
487
487
|
axisLine: !1
|
|
488
|
-
}), /* @__PURE__ */ i(
|
|
488
|
+
}), /* @__PURE__ */ i(ce, {
|
|
489
489
|
dataKey: "value",
|
|
490
490
|
cornerRadius: 5,
|
|
491
491
|
fill: t,
|
|
@@ -495,8 +495,8 @@ var P = {
|
|
|
495
495
|
})
|
|
496
496
|
})
|
|
497
497
|
});
|
|
498
|
-
},
|
|
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" ?
|
|
498
|
+
}, Re = ({ label: t = "Available balance", value: n, change: r, progress: o, hidden: s, onToggleHidden: c, className: l }) => {
|
|
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" ? ie : re, y = () => {
|
|
500
500
|
let e = !p;
|
|
501
501
|
c?.(e), u || f(e);
|
|
502
502
|
}, [b, x] = e.useState(!1), [S, C] = e.useState(0), w = e.useRef(!1);
|
|
@@ -504,53 +504,53 @@ 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 >= Ne && (clearInterval(t), x(!1));
|
|
508
|
+
}, Pe);
|
|
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(() => Fe(n.length), [n, S]), E = e.useMemo(() => r ? Fe(r.value.length) : "", [r?.value, S]), D = /* @__PURE__ */ a("div", {
|
|
514
|
+
className: F.content,
|
|
515
515
|
children: [
|
|
516
516
|
/* @__PURE__ */ a("div", {
|
|
517
|
-
className:
|
|
517
|
+
className: F.labelRow,
|
|
518
518
|
children: [/* @__PURE__ */ i("p", {
|
|
519
|
-
className:
|
|
519
|
+
className: F.label,
|
|
520
520
|
children: t
|
|
521
521
|
}), /* @__PURE__ */ i("button", {
|
|
522
522
|
type: "button",
|
|
523
|
-
className:
|
|
523
|
+
className: F.hideToggle,
|
|
524
524
|
"aria-label": p ? "Show balance" : "Hide balance",
|
|
525
525
|
onClick: y,
|
|
526
526
|
children: i(p ? v : _, {
|
|
527
527
|
size: 16,
|
|
528
|
-
strokeWidth:
|
|
528
|
+
strokeWidth: A(16)
|
|
529
529
|
})
|
|
530
530
|
})]
|
|
531
531
|
}),
|
|
532
532
|
/* @__PURE__ */ i("p", {
|
|
533
533
|
className: [
|
|
534
|
-
|
|
535
|
-
p ?
|
|
536
|
-
b ?
|
|
534
|
+
F.value,
|
|
535
|
+
p ? F["value--hidden"] : "",
|
|
536
|
+
b ? F["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: F.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" ? F.trendIcon__up : F.trendIcon__down
|
|
547
547
|
}),
|
|
548
548
|
/* @__PURE__ */ i("span", {
|
|
549
|
-
className: [h === "up" ?
|
|
550
|
-
children: p ?
|
|
549
|
+
className: [h === "up" ? F.changeValue__up : F.changeValue__down, b ? F["value--glitching"] : ""].filter(Boolean).join(" "),
|
|
550
|
+
children: p ? E : r.value
|
|
551
551
|
}),
|
|
552
552
|
/* @__PURE__ */ i("span", {
|
|
553
|
-
className:
|
|
553
|
+
className: F.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
|
+
F.balance,
|
|
563
|
+
m ? F["balance--progress"] : "",
|
|
564
564
|
l ?? ""
|
|
565
565
|
].filter(Boolean).join(" "),
|
|
566
|
-
children: [m && /* @__PURE__ */ i(
|
|
566
|
+
children: [m && /* @__PURE__ */ i(Le, { progress: o }), D]
|
|
567
567
|
});
|
|
568
|
-
},
|
|
568
|
+
}, ze = {
|
|
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
|
+
}, Be = ({ 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
|
+
ze.progress,
|
|
586
|
+
ze[`progress--${t}`],
|
|
587
587
|
r ?? ""
|
|
588
588
|
].filter(Boolean).join(" "),
|
|
589
589
|
children: /* @__PURE__ */ i("div", {
|
|
590
|
-
className: [
|
|
590
|
+
className: [ze.progress__fill, a ? ze["progress__fill--indeterminate"] : ""].filter(Boolean).join(" "),
|
|
591
591
|
style: a ? void 0 : { width: `${o}%` }
|
|
592
592
|
})
|
|
593
593
|
});
|
|
594
|
-
},
|
|
595
|
-
function
|
|
594
|
+
}, Ve = ["dark", "force-light"];
|
|
595
|
+
function He(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(Ve.map((e) => `.${e}`).join(", ")), i = n ? Ve.find((e) => n.classList.contains(e)) ?? "" : "";
|
|
602
602
|
a(i);
|
|
603
603
|
}, [e, r]), i;
|
|
604
604
|
}
|
|
605
|
-
var
|
|
605
|
+
var Ue = {
|
|
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
|
+
}, We = ({ 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
|
+
Ue.divider,
|
|
615
|
+
Ue[`divider--${e}`],
|
|
616
|
+
t ? Ue["divider--labeled"] : "",
|
|
617
617
|
n ?? ""
|
|
618
618
|
].filter(Boolean).join(" "),
|
|
619
619
|
children: t && e === "horizontal" && /* @__PURE__ */ i("span", {
|
|
620
|
-
className:
|
|
620
|
+
className: Ue.divider__label,
|
|
621
621
|
children: t
|
|
622
622
|
})
|
|
623
|
-
}),
|
|
623
|
+
}), I = {
|
|
624
624
|
backdrop: "_backdrop_123ke_1",
|
|
625
625
|
card: "_card_123ke_12",
|
|
626
626
|
header: "_header_123ke_32",
|
|
@@ -639,15 +639,15 @@ 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),
|
|
642
|
+
}, Ge = ({ 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), E = He(T, t), [D, O] = e.useState(!1);
|
|
644
644
|
return e.useEffect(() => {
|
|
645
|
-
t &&
|
|
645
|
+
t && O(!0);
|
|
646
646
|
}, [t]), e.useEffect(() => {
|
|
647
|
-
if (t || !
|
|
648
|
-
let e = setTimeout(() =>
|
|
647
|
+
if (t || !D) return;
|
|
648
|
+
let e = setTimeout(() => O(!1), 240);
|
|
649
649
|
return () => clearTimeout(e);
|
|
650
|
-
}, [t,
|
|
650
|
+
}, [t, D]), e.useEffect(() => {
|
|
651
651
|
if (!t) return;
|
|
652
652
|
let e = (e) => {
|
|
653
653
|
if (h && e.key === "Escape") {
|
|
@@ -676,11 +676,11 @@ var We = {
|
|
|
676
676
|
ref: T,
|
|
677
677
|
style: { display: "none" },
|
|
678
678
|
"aria-hidden": "true"
|
|
679
|
-
}),
|
|
679
|
+
}), D && fe(/* @__PURE__ */ i("div", {
|
|
680
680
|
className: [
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
t ?
|
|
681
|
+
I.backdrop,
|
|
682
|
+
E,
|
|
683
|
+
t ? I["backdrop--entering"] : I["backdrop--exiting"]
|
|
684
684
|
].filter(Boolean).join(" "),
|
|
685
685
|
onMouseDown: (e) => {
|
|
686
686
|
g && e.target === e.currentTarget && n();
|
|
@@ -693,33 +693,33 @@ var We = {
|
|
|
693
693
|
"aria-label": v ? o : void 0,
|
|
694
694
|
tabIndex: -1,
|
|
695
695
|
className: [
|
|
696
|
-
|
|
697
|
-
t ?
|
|
696
|
+
I.card,
|
|
697
|
+
t ? I["card--entering"] : I["card--exiting"],
|
|
698
698
|
x ?? ""
|
|
699
699
|
].filter(Boolean).join(" "),
|
|
700
700
|
onAnimationEnd: (e) => {
|
|
701
|
-
e.target === e.currentTarget && !t &&
|
|
701
|
+
e.target === e.currentTarget && !t && O(!1);
|
|
702
702
|
},
|
|
703
703
|
children: [
|
|
704
704
|
!v && /* @__PURE__ */ a("div", {
|
|
705
|
-
className:
|
|
705
|
+
className: I.header,
|
|
706
706
|
children: [/* @__PURE__ */ a("div", {
|
|
707
|
-
className:
|
|
707
|
+
className: I.titleGroup,
|
|
708
708
|
children: [S && /* @__PURE__ */ i("span", {
|
|
709
|
-
className:
|
|
709
|
+
className: I.iconWrap,
|
|
710
710
|
"aria-hidden": "true",
|
|
711
|
-
children: l ?? /* @__PURE__ */ i(
|
|
711
|
+
children: l ?? /* @__PURE__ */ i(ae, {
|
|
712
712
|
size: 24,
|
|
713
|
-
strokeWidth:
|
|
714
|
-
className:
|
|
713
|
+
strokeWidth: A(24),
|
|
714
|
+
className: I.icon
|
|
715
715
|
})
|
|
716
716
|
}), /* @__PURE__ */ i("p", {
|
|
717
717
|
id: "modal-title",
|
|
718
|
-
className:
|
|
718
|
+
className: I.title,
|
|
719
719
|
children: o
|
|
720
720
|
})]
|
|
721
|
-
}), /* @__PURE__ */ i(
|
|
722
|
-
icon:
|
|
721
|
+
}), /* @__PURE__ */ i(Oe, {
|
|
722
|
+
icon: oe,
|
|
723
723
|
variant: "ghost",
|
|
724
724
|
size: "lg",
|
|
725
725
|
"aria-label": "Close",
|
|
@@ -727,19 +727,19 @@ var We = {
|
|
|
727
727
|
})]
|
|
728
728
|
}),
|
|
729
729
|
s && /* @__PURE__ */ i("p", {
|
|
730
|
-
className:
|
|
730
|
+
className: I.description,
|
|
731
731
|
children: s
|
|
732
732
|
}),
|
|
733
733
|
_,
|
|
734
|
-
!y && /* @__PURE__ */ i(
|
|
734
|
+
!y && /* @__PURE__ */ i(We, {}),
|
|
735
735
|
/* @__PURE__ */ a("div", {
|
|
736
|
-
className: [
|
|
737
|
-
children: [/* @__PURE__ */ i(
|
|
736
|
+
className: [I.footer, b === "between" ? I["footer--between"] : ""].filter(Boolean).join(" "),
|
|
737
|
+
children: [/* @__PURE__ */ i(N, {
|
|
738
738
|
variant: "secondary",
|
|
739
739
|
onClick: () => (f ?? n)(),
|
|
740
740
|
style: { borderColor: "transparent" },
|
|
741
741
|
children: u
|
|
742
|
-
}), /* @__PURE__ */ i(
|
|
742
|
+
}), /* @__PURE__ */ i(N, {
|
|
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
|
+
}, L = {
|
|
753
753
|
row: "_row_88l3n_2",
|
|
754
754
|
"row--unread": "_row--unread_88l3n_12",
|
|
755
755
|
iconWrapSurface: "_iconWrapSurface_88l3n_17",
|
|
@@ -763,33 +763,33 @@ var We = {
|
|
|
763
763
|
cardTop: "_cardTop_88l3n_87",
|
|
764
764
|
description: "_description_88l3n_94",
|
|
765
765
|
actions: "_actions_88l3n_102"
|
|
766
|
-
},
|
|
766
|
+
}, Ke = ({ 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
|
-
strokeWidth:
|
|
769
|
+
strokeWidth: A(24)
|
|
770
770
|
});
|
|
771
771
|
return p ? /* @__PURE__ */ a("div", {
|
|
772
|
-
className: [
|
|
772
|
+
className: [L.card, f ?? ""].filter(Boolean).join(" "),
|
|
773
773
|
children: [/* @__PURE__ */ a("div", {
|
|
774
|
-
className:
|
|
774
|
+
className: L.cardTop,
|
|
775
775
|
children: [
|
|
776
776
|
/* @__PURE__ */ i("span", {
|
|
777
|
-
className:
|
|
777
|
+
className: L.iconWrapCanvas,
|
|
778
778
|
"aria-hidden": "true",
|
|
779
779
|
children: h
|
|
780
780
|
}),
|
|
781
781
|
/* @__PURE__ */ a("div", {
|
|
782
|
-
className:
|
|
782
|
+
className: L.content,
|
|
783
783
|
children: [/* @__PURE__ */ i("p", {
|
|
784
|
-
className:
|
|
784
|
+
className: L.titleBold,
|
|
785
785
|
children: t
|
|
786
786
|
}), /* @__PURE__ */ i("p", {
|
|
787
|
-
className:
|
|
787
|
+
className: L.description,
|
|
788
788
|
children: s
|
|
789
789
|
})]
|
|
790
790
|
}),
|
|
791
|
-
c && /* @__PURE__ */ i(
|
|
792
|
-
icon:
|
|
791
|
+
c && /* @__PURE__ */ i(Oe, {
|
|
792
|
+
icon: oe,
|
|
793
793
|
variant: "ghost",
|
|
794
794
|
size: "sm",
|
|
795
795
|
"aria-label": "Close",
|
|
@@ -797,13 +797,13 @@ var We = {
|
|
|
797
797
|
})
|
|
798
798
|
]
|
|
799
799
|
}), /* @__PURE__ */ a("div", {
|
|
800
|
-
className:
|
|
801
|
-
children: [c && /* @__PURE__ */ i(
|
|
800
|
+
className: L.actions,
|
|
801
|
+
children: [c && /* @__PURE__ */ i(N, {
|
|
802
802
|
variant: "ghost",
|
|
803
803
|
size: "sm",
|
|
804
804
|
onClick: c,
|
|
805
805
|
children: l
|
|
806
|
-
}), u && /* @__PURE__ */ i(
|
|
806
|
+
}), u && /* @__PURE__ */ i(N, {
|
|
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: [L.row, m ? L["row--unread"] : ""].filter(Boolean).join(" "),
|
|
816
816
|
children: [
|
|
817
817
|
/* @__PURE__ */ i("span", {
|
|
818
|
-
className:
|
|
818
|
+
className: L.iconWrapSurface,
|
|
819
819
|
"aria-hidden": "true",
|
|
820
820
|
children: h
|
|
821
821
|
}),
|
|
822
822
|
/* @__PURE__ */ a("div", {
|
|
823
|
-
className:
|
|
823
|
+
className: L.content,
|
|
824
824
|
children: [/* @__PURE__ */ i("p", {
|
|
825
|
-
className: m ?
|
|
825
|
+
className: m ? L.titleBold : L.titleMuted,
|
|
826
826
|
children: t
|
|
827
827
|
}), n && /* @__PURE__ */ i("p", {
|
|
828
|
-
className:
|
|
828
|
+
className: L.timestamp,
|
|
829
829
|
children: n
|
|
830
830
|
})]
|
|
831
831
|
}),
|
|
832
832
|
m && /* @__PURE__ */ i("span", {
|
|
833
|
-
className:
|
|
833
|
+
className: L.dot,
|
|
834
834
|
"aria-hidden": "true"
|
|
835
835
|
})
|
|
836
836
|
]
|
|
837
837
|
});
|
|
838
|
-
},
|
|
838
|
+
}, qe = {
|
|
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
|
+
}, Je = ({ label: e, value: t, progress: n, className: r }) => /* @__PURE__ */ a("div", {
|
|
844
|
+
className: [qe.stat, r ?? ""].filter(Boolean).join(" "),
|
|
845
845
|
children: [/* @__PURE__ */ a("div", {
|
|
846
|
-
className:
|
|
846
|
+
className: qe.labelRow,
|
|
847
847
|
children: [/* @__PURE__ */ i("p", {
|
|
848
|
-
className:
|
|
848
|
+
className: qe.label,
|
|
849
849
|
children: e
|
|
850
850
|
}), /* @__PURE__ */ i("p", {
|
|
851
|
-
className:
|
|
851
|
+
className: qe.value,
|
|
852
852
|
children: t
|
|
853
853
|
})]
|
|
854
|
-
}), /* @__PURE__ */ i(
|
|
854
|
+
}), /* @__PURE__ */ i(Be, {
|
|
855
855
|
value: n,
|
|
856
856
|
size: "lg",
|
|
857
857
|
label: e
|
|
858
858
|
})]
|
|
859
|
-
}),
|
|
859
|
+
}), Ye = {
|
|
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
|
+
}, Xe = (e) => e.toLocaleString("en-US", {
|
|
870
870
|
style: "currency",
|
|
871
871
|
currency: "USD"
|
|
872
|
-
}),
|
|
872
|
+
}), Ze = ({ label: e = "Spent this month", spent: t, limit: n, formatAmount: r = Xe, 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: [Ye.balance, o ?? ""].filter(Boolean).join(" "),
|
|
876
876
|
children: [
|
|
877
877
|
/* @__PURE__ */ i("p", {
|
|
878
|
-
className:
|
|
878
|
+
className: Ye.label,
|
|
879
879
|
children: e
|
|
880
880
|
}),
|
|
881
881
|
/* @__PURE__ */ a("div", {
|
|
882
|
-
className:
|
|
882
|
+
className: Ye.amountRow,
|
|
883
883
|
children: [/* @__PURE__ */ i("p", {
|
|
884
|
-
className:
|
|
884
|
+
className: Ye.amount,
|
|
885
885
|
children: r(t)
|
|
886
886
|
}), /* @__PURE__ */ a("p", {
|
|
887
|
-
className:
|
|
887
|
+
className: Ye.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: Ye.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: [Ye.fill, s ? Ye["fill--over"] : ""].filter(Boolean).join(" "),
|
|
904
904
|
style: { width: `${c}%` }
|
|
905
905
|
})
|
|
906
906
|
}),
|
|
907
907
|
/* @__PURE__ */ i("p", {
|
|
908
|
-
className:
|
|
908
|
+
className: Ye.footer,
|
|
909
909
|
children: l
|
|
910
910
|
})
|
|
911
911
|
]
|
|
912
912
|
});
|
|
913
|
-
},
|
|
913
|
+
}, Qe = {
|
|
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
|
+
}, $e = ({ variant: e = "neutral", emphasis: t = "subtle", leftIcon: n, rightIcon: r, children: o, className: s }) => /* @__PURE__ */ a("span", {
|
|
930
930
|
className: [
|
|
931
|
-
|
|
932
|
-
|
|
931
|
+
Qe.badge,
|
|
932
|
+
Qe[`badge--${e}-${t}`],
|
|
933
933
|
s ?? ""
|
|
934
934
|
].filter(Boolean).join(" "),
|
|
935
935
|
children: [
|
|
936
936
|
n && /* @__PURE__ */ i("span", {
|
|
937
|
-
className:
|
|
937
|
+
className: Qe.badge__icon,
|
|
938
938
|
"aria-hidden": "true",
|
|
939
939
|
children: n
|
|
940
940
|
}),
|
|
941
941
|
/* @__PURE__ */ i("span", {
|
|
942
|
-
className:
|
|
942
|
+
className: Qe.badge__label,
|
|
943
943
|
children: o
|
|
944
944
|
}),
|
|
945
945
|
r && /* @__PURE__ */ i("span", {
|
|
946
|
-
className:
|
|
946
|
+
className: Qe.badge__icon,
|
|
947
947
|
"aria-hidden": "true",
|
|
948
948
|
children: r
|
|
949
949
|
})
|
|
950
950
|
]
|
|
951
|
-
}),
|
|
951
|
+
}), R = {
|
|
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
|
+
}, et = ({ 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,50 +977,50 @@ 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: R.roll,
|
|
981
981
|
children: [r && /* @__PURE__ */ i("span", {
|
|
982
|
-
className: [
|
|
982
|
+
className: [R.rollNum, r.direction === "up" ? R.rollOutUp : R.rollOutDown].join(" "),
|
|
983
983
|
"aria-hidden": "true",
|
|
984
984
|
children: r.value
|
|
985
985
|
}, `out-${r.value}`), /* @__PURE__ */ i("span", {
|
|
986
|
-
className: [
|
|
986
|
+
className: [R.rollNum, r ? r.direction === "up" ? R.rollInUp : R.rollInDown : ""].filter(Boolean).join(" "),
|
|
987
987
|
onAnimationEnd: () => o(null),
|
|
988
988
|
children: t
|
|
989
989
|
}, `in-${t}`)]
|
|
990
990
|
});
|
|
991
|
-
},
|
|
991
|
+
}, tt = ({ 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: [R.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: R.stepBtn,
|
|
1004
1004
|
disabled: !l,
|
|
1005
1005
|
onClick: () => n?.(Math.max(r, t - 1)),
|
|
1006
1006
|
"aria-label": "Decrease quantity",
|
|
1007
1007
|
children: /* @__PURE__ */ i(C, {
|
|
1008
1008
|
size: 14,
|
|
1009
|
-
strokeWidth:
|
|
1009
|
+
strokeWidth: A(14)
|
|
1010
1010
|
})
|
|
1011
1011
|
}),
|
|
1012
1012
|
/* @__PURE__ */ i("span", {
|
|
1013
|
-
className:
|
|
1013
|
+
className: R.stepDivider,
|
|
1014
1014
|
"aria-hidden": "true"
|
|
1015
1015
|
}),
|
|
1016
1016
|
/* @__PURE__ */ a("span", {
|
|
1017
|
-
className:
|
|
1017
|
+
className: R.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: [R.stepInput, f ? "" : R.stepInputResting].filter(Boolean).join(" "),
|
|
1024
1024
|
value: f ? m : String(t),
|
|
1025
1025
|
"aria-label": s,
|
|
1026
1026
|
onFocus: (e) => {
|
|
@@ -1039,29 +1039,29 @@ 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: [R.rollOverlay, f ? R.rollOverlayHidden : ""].filter(Boolean).join(" "),
|
|
1043
1043
|
"aria-hidden": "true",
|
|
1044
|
-
children: /* @__PURE__ */ i(
|
|
1044
|
+
children: /* @__PURE__ */ i(et, { value: t })
|
|
1045
1045
|
})]
|
|
1046
1046
|
}),
|
|
1047
1047
|
/* @__PURE__ */ i("span", {
|
|
1048
|
-
className:
|
|
1048
|
+
className: R.stepDivider,
|
|
1049
1049
|
"aria-hidden": "true"
|
|
1050
1050
|
}),
|
|
1051
1051
|
/* @__PURE__ */ i("button", {
|
|
1052
1052
|
type: "button",
|
|
1053
|
-
className:
|
|
1053
|
+
className: R.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",
|
|
1057
|
-
children: /* @__PURE__ */ i(
|
|
1057
|
+
children: /* @__PURE__ */ i(D, {
|
|
1058
1058
|
size: 14,
|
|
1059
|
-
strokeWidth:
|
|
1059
|
+
strokeWidth: A(14)
|
|
1060
1060
|
})
|
|
1061
1061
|
})
|
|
1062
1062
|
]
|
|
1063
1063
|
});
|
|
1064
|
-
},
|
|
1064
|
+
}, z = {
|
|
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
|
+
}, nt = (e) => e.toLocaleString("en-US", {
|
|
1076
1076
|
style: "currency",
|
|
1077
1077
|
currency: "USD"
|
|
1078
|
-
}),
|
|
1078
|
+
}), rt = ({ 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 = nt, className: h }) => {
|
|
1079
1079
|
let g = s !== void 0;
|
|
1080
1080
|
return /* @__PURE__ */ a("div", {
|
|
1081
|
-
className: [
|
|
1081
|
+
className: [z.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: z.thumb
|
|
1087
1087
|
}),
|
|
1088
1088
|
/* @__PURE__ */ a("div", {
|
|
1089
|
-
className:
|
|
1089
|
+
className: z.info,
|
|
1090
1090
|
children: [
|
|
1091
1091
|
/* @__PURE__ */ i("p", {
|
|
1092
|
-
className:
|
|
1092
|
+
className: z.name,
|
|
1093
1093
|
children: n
|
|
1094
1094
|
}),
|
|
1095
1095
|
r && /* @__PURE__ */ i("p", {
|
|
1096
|
-
className:
|
|
1096
|
+
className: z.variant,
|
|
1097
1097
|
children: r
|
|
1098
1098
|
}),
|
|
1099
|
-
/* @__PURE__ */ i(
|
|
1099
|
+
/* @__PURE__ */ i(tt, {
|
|
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: z.right,
|
|
1110
1110
|
children: [g ? /* @__PURE__ */ a("div", {
|
|
1111
|
-
className:
|
|
1111
|
+
className: z.priceRow,
|
|
1112
1112
|
children: [/* @__PURE__ */ i("span", {
|
|
1113
|
-
className:
|
|
1113
|
+
className: z.priceOriginal,
|
|
1114
1114
|
children: m(s)
|
|
1115
1115
|
}), /* @__PURE__ */ i("span", {
|
|
1116
|
-
className:
|
|
1116
|
+
className: z.priceSale,
|
|
1117
1117
|
children: m(o)
|
|
1118
1118
|
})]
|
|
1119
1119
|
}) : /* @__PURE__ */ i("p", {
|
|
1120
|
-
className:
|
|
1120
|
+
className: z.price,
|
|
1121
1121
|
children: m(o)
|
|
1122
|
-
}), /* @__PURE__ */ i(
|
|
1122
|
+
}), /* @__PURE__ */ i(Oe, {
|
|
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
|
+
}, it = {
|
|
1133
1133
|
steps: "_steps_t53um_1",
|
|
1134
1134
|
step: "_step_t53um_1",
|
|
1135
1135
|
connector: "_connector_t53um_16",
|
|
@@ -1146,36 +1146,36 @@ var We = {
|
|
|
1146
1146
|
"Payment",
|
|
1147
1147
|
"Confirmation"
|
|
1148
1148
|
], ot = ({ steps: t = at, currentStep: n, className: r }) => /* @__PURE__ */ i("div", {
|
|
1149
|
-
className: [
|
|
1149
|
+
className: [it.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: it.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
|
+
it.circle,
|
|
1160
|
+
s === "completed" ? it.circleCompleted : "",
|
|
1161
|
+
s === "active" ? it.circleActive : "",
|
|
1162
|
+
s === "upcoming" ? it.circleUpcoming : ""
|
|
1163
1163
|
].filter(Boolean).join(" "),
|
|
1164
1164
|
"aria-hidden": "true",
|
|
1165
1165
|
children: /* @__PURE__ */ i(l, {
|
|
1166
1166
|
size: 14,
|
|
1167
|
-
strokeWidth:
|
|
1167
|
+
strokeWidth: A(14)
|
|
1168
1168
|
})
|
|
1169
1169
|
}), /* @__PURE__ */ i("span", {
|
|
1170
1170
|
className: [
|
|
1171
|
-
|
|
1172
|
-
s === "active" ?
|
|
1173
|
-
s === "upcoming" ?
|
|
1171
|
+
it.label,
|
|
1172
|
+
s === "active" ? it.labelActive : "",
|
|
1173
|
+
s === "upcoming" ? it.labelUpcoming : ""
|
|
1174
1174
|
].filter(Boolean).join(" "),
|
|
1175
1175
|
children: r
|
|
1176
1176
|
})]
|
|
1177
1177
|
}), !c && /* @__PURE__ */ i("span", {
|
|
1178
|
-
className:
|
|
1178
|
+
className: it.connector,
|
|
1179
1179
|
"aria-hidden": "true"
|
|
1180
1180
|
})] }, r);
|
|
1181
1181
|
})
|
|
@@ -1224,7 +1224,7 @@ var We = {
|
|
|
1224
1224
|
}),
|
|
1225
1225
|
r && o && /* @__PURE__ */ i(l, {
|
|
1226
1226
|
size: 14,
|
|
1227
|
-
strokeWidth:
|
|
1227
|
+
strokeWidth: A(14),
|
|
1228
1228
|
className: pt.check,
|
|
1229
1229
|
style: { color: u },
|
|
1230
1230
|
"aria-hidden": "true"
|
|
@@ -1257,7 +1257,7 @@ var We = {
|
|
|
1257
1257
|
className: [ht.price, s ? ht.priceSale : ""].filter(Boolean).join(" "),
|
|
1258
1258
|
children: r(e)
|
|
1259
1259
|
}),
|
|
1260
|
-
s && n && /* @__PURE__ */ a(
|
|
1260
|
+
s && n && /* @__PURE__ */ a($e, {
|
|
1261
1261
|
variant: "danger",
|
|
1262
1262
|
emphasis: "solid",
|
|
1263
1263
|
children: [
|
|
@@ -1286,7 +1286,7 @@ var We = {
|
|
|
1286
1286
|
},
|
|
1287
1287
|
children: /* @__PURE__ */ i(x, {
|
|
1288
1288
|
size: 16,
|
|
1289
|
-
strokeWidth:
|
|
1289
|
+
strokeWidth: A(16),
|
|
1290
1290
|
className: [t ? vt.iconSaved : vt.icon, o ? vt.bounce : ""].filter(Boolean).join(" "),
|
|
1291
1291
|
fill: t ? "currentColor" : "none",
|
|
1292
1292
|
onAnimationEnd: () => s(!1)
|
|
@@ -1327,7 +1327,7 @@ var We = {
|
|
|
1327
1327
|
alt: t ?? n,
|
|
1328
1328
|
className: [B.image, f ? "" : B.imageDimmed].filter(Boolean).join(" ")
|
|
1329
1329
|
}),
|
|
1330
|
-
y && f && /* @__PURE__ */ a(
|
|
1330
|
+
y && f && /* @__PURE__ */ a($e, {
|
|
1331
1331
|
variant: "danger",
|
|
1332
1332
|
emphasis: "solid",
|
|
1333
1333
|
className: B.saleBadge,
|
|
@@ -1355,9 +1355,9 @@ var We = {
|
|
|
1355
1355
|
className: B.rating,
|
|
1356
1356
|
role: "img",
|
|
1357
1357
|
"aria-label": `Rated ${c} out of 5${l ? ` (${l} reviews)` : ""}`,
|
|
1358
|
-
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ i(
|
|
1358
|
+
children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ i(k, {
|
|
1359
1359
|
size: 16,
|
|
1360
|
-
strokeWidth:
|
|
1360
|
+
strokeWidth: A(16),
|
|
1361
1361
|
className: t < x ? B.starFilled : B.starEmpty,
|
|
1362
1362
|
fill: t < x ? "currentColor" : "none"
|
|
1363
1363
|
}, t))
|
|
@@ -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(N, {
|
|
1395
1395
|
variant: "primary",
|
|
1396
1396
|
size: "md",
|
|
1397
1397
|
disabled: !f,
|
|
@@ -1508,23 +1508,23 @@ var We = {
|
|
|
1508
1508
|
role: "img",
|
|
1509
1509
|
"aria-label": `${c} out of 5 stars`,
|
|
1510
1510
|
children: [
|
|
1511
|
-
Array.from({ length: u }, (e, t) => /* @__PURE__ */ i(
|
|
1511
|
+
Array.from({ length: u }, (e, t) => /* @__PURE__ */ i(k, {
|
|
1512
1512
|
size: 24,
|
|
1513
|
-
strokeWidth:
|
|
1513
|
+
strokeWidth: A(24),
|
|
1514
1514
|
className: Tt.starFull,
|
|
1515
1515
|
fill: "currentColor",
|
|
1516
1516
|
"aria-hidden": "true"
|
|
1517
1517
|
}, `full-${t}`)),
|
|
1518
|
-
d && /* @__PURE__ */ i(
|
|
1518
|
+
d && /* @__PURE__ */ i(ne, {
|
|
1519
1519
|
size: 24,
|
|
1520
|
-
strokeWidth:
|
|
1520
|
+
strokeWidth: A(24),
|
|
1521
1521
|
className: Tt.starFull,
|
|
1522
1522
|
fill: "currentColor",
|
|
1523
1523
|
"aria-hidden": "true"
|
|
1524
1524
|
}),
|
|
1525
|
-
Array.from({ length: f }, (e, t) => /* @__PURE__ */ i(
|
|
1525
|
+
Array.from({ length: f }, (e, t) => /* @__PURE__ */ i(k, {
|
|
1526
1526
|
size: 24,
|
|
1527
|
-
strokeWidth:
|
|
1527
|
+
strokeWidth: A(24),
|
|
1528
1528
|
className: Tt.starEmpty,
|
|
1529
1529
|
"aria-hidden": "true"
|
|
1530
1530
|
}, `empty-${t}`))
|
|
@@ -1556,7 +1556,7 @@ var We = {
|
|
|
1556
1556
|
});
|
|
1557
1557
|
}, Ot = ({ 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($e, {
|
|
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: H.metaRow,
|
|
1604
|
-
children: [/* @__PURE__ */ i(
|
|
1604
|
+
children: [/* @__PURE__ */ i($e, {
|
|
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: H.author,
|
|
1623
|
-
children: [/* @__PURE__ */ i(
|
|
1623
|
+
children: [/* @__PURE__ */ i(ye, {
|
|
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 ? U.bodyVertical : U.bodyHorizontal,
|
|
1665
1665
|
children: [
|
|
1666
|
-
/* @__PURE__ */ i(
|
|
1666
|
+
/* @__PURE__ */ i($e, {
|
|
1667
1667
|
variant: "accent",
|
|
1668
1668
|
emphasis: "subtle",
|
|
1669
1669
|
children: n
|
|
@@ -1680,7 +1680,7 @@ var We = {
|
|
|
1680
1680
|
className: U.footer,
|
|
1681
1681
|
children: [/* @__PURE__ */ a("div", {
|
|
1682
1682
|
className: U.author,
|
|
1683
|
-
children: [/* @__PURE__ */ i(
|
|
1683
|
+
children: [/* @__PURE__ */ i(ye, {
|
|
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(N, {
|
|
1697
1697
|
variant: "secondary",
|
|
1698
1698
|
size: "sm",
|
|
1699
1699
|
onClick: l,
|
|
@@ -1719,7 +1719,7 @@ var We = {
|
|
|
1719
1719
|
}, Nt = ({ icon: t, size: n = "md", variant: r = "light", className: a }) => {
|
|
1720
1720
|
let o = Mt[n], s = e.isValidElement(t) ? e.cloneElement(t, {
|
|
1721
1721
|
size: o,
|
|
1722
|
-
strokeWidth:
|
|
1722
|
+
strokeWidth: A(o)
|
|
1723
1723
|
}) : t;
|
|
1724
1724
|
return /* @__PURE__ */ i("div", {
|
|
1725
1725
|
className: [
|
|
@@ -1752,7 +1752,7 @@ var We = {
|
|
|
1752
1752
|
].filter(Boolean).join(" "),
|
|
1753
1753
|
children: [o.map((t, n) => /* @__PURE__ */ i("span", {
|
|
1754
1754
|
className: Pt.group__item,
|
|
1755
|
-
children: /* @__PURE__ */ i(
|
|
1755
|
+
children: /* @__PURE__ */ i(ye, {
|
|
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: Rt.metaRow,
|
|
1802
1802
|
children: [
|
|
1803
|
-
/* @__PURE__ */ i(
|
|
1803
|
+
/* @__PURE__ */ i($e, {
|
|
1804
1804
|
variant: "accent",
|
|
1805
1805
|
emphasis: "subtle",
|
|
1806
1806
|
children: n
|
|
1807
1807
|
}),
|
|
1808
|
-
/* @__PURE__ */ i(
|
|
1808
|
+
/* @__PURE__ */ i($e, {
|
|
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: Rt.rowLeft,
|
|
1827
1827
|
children: m
|
|
1828
|
-
}), /* @__PURE__ */ i(
|
|
1828
|
+
}), /* @__PURE__ */ i(N, {
|
|
1829
1829
|
variant: "secondary",
|
|
1830
1830
|
size: "sm",
|
|
1831
1831
|
className: Rt.applyBtn,
|
|
@@ -1838,7 +1838,7 @@ var We = {
|
|
|
1838
1838
|
Rt.rootCard,
|
|
1839
1839
|
f ?? ""
|
|
1840
1840
|
].filter(Boolean).join(" "),
|
|
1841
|
-
children: [m, /* @__PURE__ */ i(
|
|
1841
|
+
children: [m, /* @__PURE__ */ i(N, {
|
|
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($e, {
|
|
1862
1862
|
variant: "accent",
|
|
1863
1863
|
emphasis: "subtle",
|
|
1864
1864
|
children: e
|
|
@@ -2031,7 +2031,7 @@ var We = {
|
|
|
2031
2031
|
viewBox: "0 0 24 24",
|
|
2032
2032
|
fill: "none",
|
|
2033
2033
|
stroke: "currentColor",
|
|
2034
|
-
strokeWidth:
|
|
2034
|
+
strokeWidth: A(18),
|
|
2035
2035
|
strokeLinecap: "round",
|
|
2036
2036
|
strokeLinejoin: "round",
|
|
2037
2037
|
width: 18,
|
|
@@ -2119,67 +2119,192 @@ var We = {
|
|
|
2119
2119
|
]
|
|
2120
2120
|
});
|
|
2121
2121
|
}, qt = {
|
|
2122
|
-
breadcrumb: "
|
|
2123
|
-
list: "
|
|
2124
|
-
item: "
|
|
2125
|
-
crumb: "
|
|
2126
|
-
current: "
|
|
2127
|
-
separator: "
|
|
2128
|
-
"list--button": "_list--
|
|
2129
|
-
chip: "
|
|
2130
|
-
}, Jt =
|
|
2122
|
+
breadcrumb: "_breadcrumb_tszff_3",
|
|
2123
|
+
list: "_list_tszff_5",
|
|
2124
|
+
item: "_item_tszff_15",
|
|
2125
|
+
crumb: "_crumb_tszff_17",
|
|
2126
|
+
current: "_current_tszff_26",
|
|
2127
|
+
separator: "_separator_tszff_33",
|
|
2128
|
+
"list--button": "_list--button_tszff_38",
|
|
2129
|
+
chip: "_chip_tszff_41"
|
|
2130
|
+
}, Jt = {
|
|
2131
|
+
highlight: "_highlight_1u4m2_15",
|
|
2132
|
+
visible: "_visible_1u4m2_24",
|
|
2133
|
+
glide: "_glide_1u4m2_28"
|
|
2134
|
+
}, Yt = (e) => e.getAttribute("data-hover-item") === "off" || e.getAttribute("aria-disabled") === "true" || e.disabled === !0;
|
|
2135
|
+
function Xt(e, t) {
|
|
2136
|
+
let n = 0, r = 0, i = e;
|
|
2137
|
+
for (; i && i !== t;) {
|
|
2138
|
+
n += i.offsetLeft, r += i.offsetTop;
|
|
2139
|
+
let e = i.offsetParent;
|
|
2140
|
+
if (!e) break;
|
|
2141
|
+
e !== t && (n += e.clientLeft, r += e.clientTop), i = e;
|
|
2142
|
+
}
|
|
2143
|
+
for (let i = e.parentElement; i && i !== t; i = i.parentElement) n -= i.scrollLeft, r -= i.scrollTop;
|
|
2144
|
+
let a = getComputedStyle(e);
|
|
2145
|
+
return {
|
|
2146
|
+
x: n,
|
|
2147
|
+
y: r,
|
|
2148
|
+
w: e.offsetWidth,
|
|
2149
|
+
h: e.offsetHeight,
|
|
2150
|
+
radius: a.borderRadius,
|
|
2151
|
+
tone: a.getPropertyValue("--hover-tone").trim()
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
function Zt() {
|
|
2155
|
+
let t = e.useRef(null), [n, r] = e.useState(null), a = e.useCallback((e) => {
|
|
2156
|
+
t.current = e, r(e);
|
|
2157
|
+
}, []), o = e.useRef(null), s = e.useRef(!1), c = e.useRef(null), l = e.useRef(!1), u = e.useRef(null), [d, f] = e.useState(null), [p, m] = e.useState(!1), [h, g] = e.useState(!1), _ = e.useCallback(() => {
|
|
2158
|
+
s.current = !1, o.current = null, l.current = !1, m(!1);
|
|
2159
|
+
}, []), v = e.useCallback((e) => {
|
|
2160
|
+
let n = t.current;
|
|
2161
|
+
if (!n) return;
|
|
2162
|
+
n !== u.current && (u.current = n, s.current = !1), o.current = e;
|
|
2163
|
+
let r = Xt(e, n);
|
|
2164
|
+
if (s.current) {
|
|
2165
|
+
f(r);
|
|
2166
|
+
return;
|
|
2167
|
+
}
|
|
2168
|
+
s.current = !0, l.current = !0, g(!1), f(r), m(!0);
|
|
2169
|
+
}, []);
|
|
2170
|
+
e.useLayoutEffect(() => {
|
|
2171
|
+
!l.current || h || !p || (l.current = !1, c.current && getComputedStyle(c.current).transform, g(!0));
|
|
2172
|
+
}, [
|
|
2173
|
+
d,
|
|
2174
|
+
p,
|
|
2175
|
+
h
|
|
2176
|
+
]);
|
|
2177
|
+
let y = e.useCallback((e) => {
|
|
2178
|
+
let n = t.current;
|
|
2179
|
+
if (!n) return;
|
|
2180
|
+
let r = e.target.closest("[data-hover-item]");
|
|
2181
|
+
if (!(!r || r.closest("[data-hover-group]") !== n)) {
|
|
2182
|
+
if (Yt(r)) {
|
|
2183
|
+
_();
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
r !== o.current && v(r);
|
|
2187
|
+
}
|
|
2188
|
+
}, [_, v]);
|
|
2189
|
+
e.useEffect(() => {
|
|
2190
|
+
let e = n;
|
|
2191
|
+
if (!e) return;
|
|
2192
|
+
let t = () => {
|
|
2193
|
+
let t = o.current;
|
|
2194
|
+
if (!(!t || !s.current)) {
|
|
2195
|
+
if (!e.contains(t)) {
|
|
2196
|
+
_();
|
|
2197
|
+
return;
|
|
2198
|
+
}
|
|
2199
|
+
f(Xt(t, e));
|
|
2200
|
+
}
|
|
2201
|
+
}, r = new ResizeObserver(t);
|
|
2202
|
+
return r.observe(e), e.addEventListener("scroll", t, !0), () => {
|
|
2203
|
+
r.disconnect(), e.removeEventListener("scroll", t, !0);
|
|
2204
|
+
};
|
|
2205
|
+
}, [n, _]);
|
|
2206
|
+
let b = /* @__PURE__ */ i("span", {
|
|
2207
|
+
ref: c,
|
|
2208
|
+
"aria-hidden": "true",
|
|
2209
|
+
className: [
|
|
2210
|
+
Jt.highlight,
|
|
2211
|
+
p ? Jt.visible : "",
|
|
2212
|
+
h ? Jt.glide : ""
|
|
2213
|
+
].filter(Boolean).join(" "),
|
|
2214
|
+
style: d ? {
|
|
2215
|
+
transform: `translate(${d.x}px, ${d.y}px)`,
|
|
2216
|
+
width: d.w,
|
|
2217
|
+
height: d.h,
|
|
2218
|
+
borderRadius: d.radius,
|
|
2219
|
+
background: d.tone || void 0
|
|
2220
|
+
} : void 0
|
|
2221
|
+
}), x = e.useCallback((e) => {
|
|
2222
|
+
e && !Yt(e) ? v(e) : _();
|
|
2223
|
+
}, [_, v]);
|
|
2224
|
+
return {
|
|
2225
|
+
ref: a,
|
|
2226
|
+
groupProps: {
|
|
2227
|
+
"data-hover-group": "",
|
|
2228
|
+
onMouseOver: y,
|
|
2229
|
+
onMouseLeave: _
|
|
2230
|
+
},
|
|
2231
|
+
highlight: b,
|
|
2232
|
+
showItem: x
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
var Qt = ({ children: e, style: t, ...n }) => {
|
|
2236
|
+
let { ref: r, groupProps: i, highlight: o } = Zt();
|
|
2237
|
+
return /* @__PURE__ */ a("div", {
|
|
2238
|
+
ref: r,
|
|
2239
|
+
...n,
|
|
2240
|
+
...i,
|
|
2241
|
+
style: {
|
|
2242
|
+
position: "relative",
|
|
2243
|
+
...t
|
|
2244
|
+
},
|
|
2245
|
+
children: [o, e]
|
|
2246
|
+
});
|
|
2247
|
+
}, $t = ({ size: e }) => /* @__PURE__ */ i("span", {
|
|
2131
2248
|
className: qt.separator,
|
|
2132
2249
|
"aria-hidden": "true",
|
|
2133
2250
|
children: /* @__PURE__ */ i("svg", {
|
|
2134
2251
|
viewBox: "0 0 24 24",
|
|
2135
2252
|
fill: "none",
|
|
2136
2253
|
stroke: "currentColor",
|
|
2137
|
-
strokeWidth:
|
|
2254
|
+
strokeWidth: A(e),
|
|
2138
2255
|
strokeLinecap: "round",
|
|
2139
2256
|
strokeLinejoin: "round",
|
|
2140
2257
|
width: e,
|
|
2141
2258
|
height: e,
|
|
2142
2259
|
children: /* @__PURE__ */ i("path", { d: "m9 18 6-6-6-6" })
|
|
2143
2260
|
})
|
|
2144
|
-
}),
|
|
2145
|
-
let r = t === "button";
|
|
2261
|
+
}), en = ({ items: e, variant: t = "text", className: n }) => {
|
|
2262
|
+
let r = t === "button", o = Zt();
|
|
2146
2263
|
return /* @__PURE__ */ i("nav", {
|
|
2147
2264
|
"aria-label": "Breadcrumb",
|
|
2148
2265
|
className: [qt.breadcrumb, n ?? ""].filter(Boolean).join(" "),
|
|
2149
|
-
children: /* @__PURE__ */
|
|
2266
|
+
children: /* @__PURE__ */ a("ol", {
|
|
2267
|
+
ref: o.ref,
|
|
2268
|
+
...r ? o.groupProps : {},
|
|
2150
2269
|
className: [qt.list, r ? qt["list--button"] : ""].filter(Boolean).join(" "),
|
|
2151
|
-
children:
|
|
2270
|
+
children: [r && /* @__PURE__ */ i("li", {
|
|
2271
|
+
"aria-hidden": "true",
|
|
2272
|
+
style: { display: "contents" },
|
|
2273
|
+
children: o.highlight
|
|
2274
|
+
}), e.map((t, n) => {
|
|
2152
2275
|
let o = n === e.length - 1, s = r ? qt.chip : o ? qt.current : qt.crumb;
|
|
2153
2276
|
return /* @__PURE__ */ a("li", {
|
|
2154
2277
|
className: qt.item,
|
|
2155
2278
|
children: [o || !t.href ? /* @__PURE__ */ i("span", {
|
|
2156
2279
|
className: s,
|
|
2280
|
+
"data-hover-item": r ? "off" : void 0,
|
|
2157
2281
|
"aria-current": o ? "page" : void 0,
|
|
2158
2282
|
children: t.label
|
|
2159
2283
|
}) : /* @__PURE__ */ i("a", {
|
|
2160
2284
|
href: t.href,
|
|
2285
|
+
"data-hover-item": "",
|
|
2161
2286
|
className: s,
|
|
2162
2287
|
children: t.label
|
|
2163
|
-
}), !o && /* @__PURE__ */ i(
|
|
2288
|
+
}), !o && /* @__PURE__ */ i($t, { size: r ? 14 : 16 })]
|
|
2164
2289
|
}, n);
|
|
2165
|
-
})
|
|
2290
|
+
})]
|
|
2166
2291
|
})
|
|
2167
2292
|
});
|
|
2168
|
-
},
|
|
2293
|
+
}, tn = {
|
|
2169
2294
|
meta: "_meta_g1mpv_2",
|
|
2170
2295
|
meta__icon: "_meta__icon_g1mpv_3",
|
|
2171
2296
|
meta__label: "_meta__label_g1mpv_4"
|
|
2172
|
-
},
|
|
2173
|
-
className: [
|
|
2297
|
+
}, nn = ({ icon: e, children: t, className: n }) => /* @__PURE__ */ a("span", {
|
|
2298
|
+
className: [tn.meta, n ?? ""].filter(Boolean).join(" "),
|
|
2174
2299
|
children: [/* @__PURE__ */ i("span", {
|
|
2175
|
-
className:
|
|
2300
|
+
className: tn.meta__icon,
|
|
2176
2301
|
"aria-hidden": "true",
|
|
2177
2302
|
children: e
|
|
2178
2303
|
}), /* @__PURE__ */ i("span", {
|
|
2179
|
-
className:
|
|
2304
|
+
className: tn.meta__label,
|
|
2180
2305
|
children: t
|
|
2181
2306
|
})]
|
|
2182
|
-
}),
|
|
2307
|
+
}), rn = {
|
|
2183
2308
|
composer: "_composer_1yt54_2",
|
|
2184
2309
|
"composer--typing": "_composer--typing_1yt54_15",
|
|
2185
2310
|
input: "_input_1yt54_22",
|
|
@@ -2193,13 +2318,13 @@ var We = {
|
|
|
2193
2318
|
row: "_row_1yt54_36",
|
|
2194
2319
|
icon: "_icon_1yt54_37",
|
|
2195
2320
|
send: "_send_1yt54_52"
|
|
2196
|
-
},
|
|
2321
|
+
}, an = ({ state: t = "default", value: n, placeholder: r = "Message...", onChange: o, onSend: s, onAttachmentsChange: c, uploadName: l, uploadProgress: u = 0, onCancelUpload: d, className: f }) => {
|
|
2197
2322
|
let p = t === "disabled", [m, h] = e.useState(""), [g, _] = e.useState(!1), [v, b] = e.useState({
|
|
2198
2323
|
top: 0,
|
|
2199
2324
|
right: 0
|
|
2200
|
-
}), [x, S] = e.useState([]), C = e.useRef(null), w = e.useRef(null), T = e.useRef(null),
|
|
2325
|
+
}), [x, S] = e.useState([]), C = e.useRef(null), w = e.useRef(null), T = e.useRef(null), D = e.useRef(null), O = n === void 0 ? m : n, k = !p && (O.trim().length > 0 || t === "typing" || x.length > 0), ne = () => {
|
|
2201
2326
|
w.current?.click();
|
|
2202
|
-
},
|
|
2327
|
+
}, re = (e) => {
|
|
2203
2328
|
let t = e.target.files;
|
|
2204
2329
|
t && (Array.from(t).forEach((e) => {
|
|
2205
2330
|
if (e.type.startsWith("image/") || e.type.startsWith("video/")) {
|
|
@@ -2214,9 +2339,9 @@ var We = {
|
|
|
2214
2339
|
}, t.readAsDataURL(e);
|
|
2215
2340
|
}
|
|
2216
2341
|
}), e.target.value = "");
|
|
2217
|
-
},
|
|
2342
|
+
}, ie = (e) => {
|
|
2218
2343
|
S((t) => t.filter((t, n) => n !== e));
|
|
2219
|
-
},
|
|
2344
|
+
}, ae = () => {
|
|
2220
2345
|
if (!g && C.current) {
|
|
2221
2346
|
let e = C.current.getBoundingClientRect();
|
|
2222
2347
|
b({
|
|
@@ -2225,16 +2350,16 @@ var We = {
|
|
|
2225
2350
|
});
|
|
2226
2351
|
}
|
|
2227
2352
|
_(!g);
|
|
2228
|
-
},
|
|
2353
|
+
}, se = (e) => {
|
|
2229
2354
|
if (C.current) {
|
|
2230
|
-
let t = C.current.selectionStart ||
|
|
2355
|
+
let t = C.current.selectionStart || O.length, n = O.slice(0, t) + e + O.slice(t);
|
|
2231
2356
|
h(n), o?.(n), C.current.focus(), C.current.setSelectionRange(t + e.length, t + e.length);
|
|
2232
2357
|
}
|
|
2233
2358
|
_(!1);
|
|
2234
2359
|
};
|
|
2235
2360
|
return e.useEffect(() => {
|
|
2236
2361
|
let e = (e) => {
|
|
2237
|
-
|
|
2362
|
+
D.current && !D.current.contains(e.target) && T.current && !T.current.contains(e.target) && _(!1);
|
|
2238
2363
|
};
|
|
2239
2364
|
return g && document.addEventListener("mousedown", e), () => {
|
|
2240
2365
|
document.removeEventListener("mousedown", e);
|
|
@@ -2243,35 +2368,35 @@ var We = {
|
|
|
2243
2368
|
c?.(x);
|
|
2244
2369
|
}, [x, c]), /* @__PURE__ */ a("div", {
|
|
2245
2370
|
className: [
|
|
2246
|
-
|
|
2247
|
-
|
|
2371
|
+
rn.composer,
|
|
2372
|
+
rn[`composer--${t}`],
|
|
2248
2373
|
f ?? ""
|
|
2249
2374
|
].filter(Boolean).join(" "),
|
|
2250
2375
|
children: [
|
|
2251
2376
|
t === "uploading" && /* @__PURE__ */ a("div", {
|
|
2252
|
-
className:
|
|
2377
|
+
className: rn.upload,
|
|
2253
2378
|
children: [
|
|
2254
2379
|
/* @__PURE__ */ i(y, {
|
|
2255
2380
|
size: 16,
|
|
2256
|
-
strokeWidth:
|
|
2257
|
-
className:
|
|
2381
|
+
strokeWidth: A(16),
|
|
2382
|
+
className: rn.upload__icon,
|
|
2258
2383
|
"aria-hidden": "true"
|
|
2259
2384
|
}),
|
|
2260
2385
|
/* @__PURE__ */ a("div", {
|
|
2261
|
-
className:
|
|
2386
|
+
className: rn.upload__body,
|
|
2262
2387
|
children: [/* @__PURE__ */ i("span", {
|
|
2263
|
-
className:
|
|
2388
|
+
className: rn.upload__name,
|
|
2264
2389
|
children: l
|
|
2265
2390
|
}), /* @__PURE__ */ i("div", {
|
|
2266
|
-
className:
|
|
2391
|
+
className: rn.upload__track,
|
|
2267
2392
|
children: /* @__PURE__ */ i("div", {
|
|
2268
|
-
className:
|
|
2393
|
+
className: rn.upload__fill,
|
|
2269
2394
|
style: { width: `${u}%` }
|
|
2270
2395
|
})
|
|
2271
2396
|
})]
|
|
2272
2397
|
}),
|
|
2273
|
-
/* @__PURE__ */ i(
|
|
2274
|
-
icon:
|
|
2398
|
+
/* @__PURE__ */ i(Oe, {
|
|
2399
|
+
icon: oe,
|
|
2275
2400
|
variant: "ghost",
|
|
2276
2401
|
size: "md",
|
|
2277
2402
|
onClick: d,
|
|
@@ -2327,7 +2452,7 @@ var We = {
|
|
|
2327
2452
|
})]
|
|
2328
2453
|
}), /* @__PURE__ */ i("button", {
|
|
2329
2454
|
type: "button",
|
|
2330
|
-
onClick: () =>
|
|
2455
|
+
onClick: () => ie(t),
|
|
2331
2456
|
style: {
|
|
2332
2457
|
position: "absolute",
|
|
2333
2458
|
top: "-8px",
|
|
@@ -2355,45 +2480,45 @@ var We = {
|
|
|
2355
2480
|
type: "file",
|
|
2356
2481
|
multiple: !0,
|
|
2357
2482
|
accept: "image/*,video/*",
|
|
2358
|
-
onChange:
|
|
2483
|
+
onChange: re,
|
|
2359
2484
|
style: { display: "none" }
|
|
2360
2485
|
}),
|
|
2361
2486
|
/* @__PURE__ */ a("div", {
|
|
2362
|
-
className:
|
|
2487
|
+
className: rn.row,
|
|
2363
2488
|
children: [
|
|
2364
|
-
/* @__PURE__ */ i(
|
|
2365
|
-
icon:
|
|
2489
|
+
/* @__PURE__ */ i(Oe, {
|
|
2490
|
+
icon: E,
|
|
2366
2491
|
variant: "ghost",
|
|
2367
2492
|
size: "sm",
|
|
2368
|
-
onClick:
|
|
2493
|
+
onClick: ne,
|
|
2369
2494
|
disabled: p,
|
|
2370
2495
|
"aria-label": "Attach file"
|
|
2371
2496
|
}),
|
|
2372
2497
|
/* @__PURE__ */ i("input", {
|
|
2373
2498
|
ref: C,
|
|
2374
2499
|
type: "text",
|
|
2375
|
-
className:
|
|
2376
|
-
value:
|
|
2500
|
+
className: rn.input,
|
|
2501
|
+
value: O,
|
|
2377
2502
|
placeholder: p ? "You can't reply to this conversation" : r,
|
|
2378
2503
|
disabled: p,
|
|
2379
2504
|
onChange: (e) => {
|
|
2380
2505
|
n === void 0 && h(e.target.value), o?.(e.target.value);
|
|
2381
2506
|
},
|
|
2382
2507
|
onKeyDown: (e) => {
|
|
2383
|
-
e.key === "Enter" &&
|
|
2508
|
+
e.key === "Enter" && k && (e.preventDefault(), s?.());
|
|
2384
2509
|
}
|
|
2385
2510
|
}),
|
|
2386
|
-
/* @__PURE__ */ i(
|
|
2511
|
+
/* @__PURE__ */ i(Oe, {
|
|
2387
2512
|
ref: T,
|
|
2388
|
-
icon:
|
|
2513
|
+
icon: te,
|
|
2389
2514
|
variant: "ghost",
|
|
2390
2515
|
size: "sm",
|
|
2391
|
-
onClick:
|
|
2516
|
+
onClick: ae,
|
|
2392
2517
|
disabled: p,
|
|
2393
2518
|
"aria-label": "Add emoji"
|
|
2394
2519
|
}),
|
|
2395
|
-
g && !p &&
|
|
2396
|
-
ref:
|
|
2520
|
+
g && !p && de.createPortal(/* @__PURE__ */ i("div", {
|
|
2521
|
+
ref: D,
|
|
2397
2522
|
style: {
|
|
2398
2523
|
position: "fixed",
|
|
2399
2524
|
top: `${v.top}px`,
|
|
@@ -2427,7 +2552,7 @@ var We = {
|
|
|
2427
2552
|
"🤗",
|
|
2428
2553
|
"😎"
|
|
2429
2554
|
].map((e) => /* @__PURE__ */ i("button", {
|
|
2430
|
-
onClick: () =>
|
|
2555
|
+
onClick: () => se(e),
|
|
2431
2556
|
style: {
|
|
2432
2557
|
background: "none",
|
|
2433
2558
|
border: "none",
|
|
@@ -2446,19 +2571,19 @@ var We = {
|
|
|
2446
2571
|
children: e
|
|
2447
2572
|
}, e))
|
|
2448
2573
|
}), document.body),
|
|
2449
|
-
/* @__PURE__ */ i(
|
|
2450
|
-
icon:
|
|
2574
|
+
/* @__PURE__ */ i(Oe, {
|
|
2575
|
+
icon: ee,
|
|
2451
2576
|
variant: "primary",
|
|
2452
2577
|
size: "sm",
|
|
2453
2578
|
onClick: s,
|
|
2454
|
-
disabled: !
|
|
2579
|
+
disabled: !k,
|
|
2455
2580
|
"aria-label": "Send message"
|
|
2456
2581
|
})
|
|
2457
2582
|
]
|
|
2458
2583
|
})
|
|
2459
2584
|
]
|
|
2460
2585
|
});
|
|
2461
|
-
},
|
|
2586
|
+
}, on = {
|
|
2462
2587
|
wrapper: "_wrapper_1nmcn_3",
|
|
2463
2588
|
"wrapper--disabled": "_wrapper--disabled_1nmcn_11",
|
|
2464
2589
|
input: "_input_1nmcn_14",
|
|
@@ -2470,16 +2595,16 @@ var We = {
|
|
|
2470
2595
|
text__description: "_text__description_1nmcn_73",
|
|
2471
2596
|
checkbox: "_checkbox_1nmcn_77",
|
|
2472
2597
|
"wrapper--withDescription": "_wrapper--withDescription_1nmcn_81"
|
|
2473
|
-
},
|
|
2598
|
+
}, sn = e.forwardRef(({ label: t, description: n, indeterminate: r, disabled: o, id: s, className: c, ...l }, u) => {
|
|
2474
2599
|
let d = e.useId(), f = s ?? d, p = e.useRef(null);
|
|
2475
2600
|
return e.useImperativeHandle(u, () => p.current), e.useEffect(() => {
|
|
2476
2601
|
p.current && (p.current.indeterminate = !!r);
|
|
2477
2602
|
}, [r]), /* @__PURE__ */ a("label", {
|
|
2478
2603
|
htmlFor: f,
|
|
2479
2604
|
className: [
|
|
2480
|
-
|
|
2481
|
-
n ?
|
|
2482
|
-
o ?
|
|
2605
|
+
on.wrapper,
|
|
2606
|
+
n ? on["wrapper--withDescription"] : "",
|
|
2607
|
+
o ? on["wrapper--disabled"] : "",
|
|
2483
2608
|
c ?? ""
|
|
2484
2609
|
].filter(Boolean).join(" "),
|
|
2485
2610
|
children: [
|
|
@@ -2488,14 +2613,14 @@ var We = {
|
|
|
2488
2613
|
id: f,
|
|
2489
2614
|
type: "checkbox",
|
|
2490
2615
|
disabled: o,
|
|
2491
|
-
className:
|
|
2616
|
+
className: on.input,
|
|
2492
2617
|
...l
|
|
2493
2618
|
}),
|
|
2494
2619
|
/* @__PURE__ */ a("span", {
|
|
2495
|
-
className:
|
|
2620
|
+
className: on.box,
|
|
2496
2621
|
"aria-hidden": "true",
|
|
2497
2622
|
children: [/* @__PURE__ */ i("svg", {
|
|
2498
|
-
className:
|
|
2623
|
+
className: on.check,
|
|
2499
2624
|
width: 12,
|
|
2500
2625
|
height: 12,
|
|
2501
2626
|
viewBox: "0 0 24 24",
|
|
@@ -2505,39 +2630,40 @@ var We = {
|
|
|
2505
2630
|
strokeLinecap: "round",
|
|
2506
2631
|
strokeLinejoin: "round",
|
|
2507
2632
|
children: /* @__PURE__ */ i("polyline", { points: "20 6 9 17 4 12" })
|
|
2508
|
-
}), /* @__PURE__ */ i("span", { className:
|
|
2633
|
+
}), /* @__PURE__ */ i("span", { className: on.dash })]
|
|
2509
2634
|
}),
|
|
2510
2635
|
(t || n) && /* @__PURE__ */ a("span", {
|
|
2511
|
-
className:
|
|
2636
|
+
className: on.text,
|
|
2512
2637
|
children: [t && /* @__PURE__ */ i("span", {
|
|
2513
|
-
className:
|
|
2638
|
+
className: on.text__label,
|
|
2514
2639
|
children: t
|
|
2515
2640
|
}), n && /* @__PURE__ */ i("span", {
|
|
2516
|
-
className:
|
|
2641
|
+
className: on.text__description,
|
|
2517
2642
|
children: n
|
|
2518
2643
|
})]
|
|
2519
2644
|
})
|
|
2520
2645
|
]
|
|
2521
2646
|
});
|
|
2522
2647
|
});
|
|
2523
|
-
|
|
2648
|
+
sn.displayName = "Checkbox";
|
|
2524
2649
|
var K = {
|
|
2525
|
-
item: "
|
|
2526
|
-
"item--hover": "_item--
|
|
2527
|
-
"item--active": "_item--
|
|
2528
|
-
item__avatar: "
|
|
2529
|
-
item__presence: "
|
|
2530
|
-
item__body: "
|
|
2531
|
-
item__row: "
|
|
2532
|
-
item__name: "
|
|
2533
|
-
"item--unread": "_item--
|
|
2534
|
-
item__mute: "
|
|
2535
|
-
item__time: "
|
|
2536
|
-
item__preview: "
|
|
2537
|
-
item__typing: "
|
|
2538
|
-
item__badge: "
|
|
2539
|
-
},
|
|
2650
|
+
item: "_item_1bf0e_2",
|
|
2651
|
+
"item--hover": "_item--hover_1bf0e_12",
|
|
2652
|
+
"item--active": "_item--active_1bf0e_13",
|
|
2653
|
+
item__avatar: "_item__avatar_1bf0e_16",
|
|
2654
|
+
item__presence: "_item__presence_1bf0e_17",
|
|
2655
|
+
item__body: "_item__body_1bf0e_22",
|
|
2656
|
+
item__row: "_item__row_1bf0e_23",
|
|
2657
|
+
item__name: "_item__name_1bf0e_24",
|
|
2658
|
+
"item--unread": "_item--unread_1bf0e_28",
|
|
2659
|
+
item__mute: "_item__mute_1bf0e_29",
|
|
2660
|
+
item__time: "_item__time_1bf0e_30",
|
|
2661
|
+
item__preview: "_item__preview_1bf0e_31",
|
|
2662
|
+
item__typing: "_item__typing_1bf0e_36",
|
|
2663
|
+
item__badge: "_item__badge_1bf0e_37"
|
|
2664
|
+
}, cn = ({ state: e = "default", avatar: t, name: n, timestamp: r, preview: o, unreadCount: c, onClick: l, className: u }) => /* @__PURE__ */ a("div", {
|
|
2540
2665
|
role: "button",
|
|
2666
|
+
"data-hover-item": "",
|
|
2541
2667
|
tabIndex: 0,
|
|
2542
2668
|
onClick: l,
|
|
2543
2669
|
onKeyDown: (e) => {
|
|
@@ -2566,7 +2692,7 @@ var K = {
|
|
|
2566
2692
|
}),
|
|
2567
2693
|
e === "muted" && /* @__PURE__ */ i(s, {
|
|
2568
2694
|
size: 12,
|
|
2569
|
-
strokeWidth:
|
|
2695
|
+
strokeWidth: A(12),
|
|
2570
2696
|
className: K.item__mute,
|
|
2571
2697
|
"aria-hidden": "true"
|
|
2572
2698
|
}),
|
|
@@ -2589,26 +2715,26 @@ var K = {
|
|
|
2589
2715
|
})]
|
|
2590
2716
|
})]
|
|
2591
2717
|
})]
|
|
2592
|
-
}),
|
|
2718
|
+
}), ln = {
|
|
2593
2719
|
empty: "_empty_15v2t_2",
|
|
2594
2720
|
empty__chip: "_empty__chip_15v2t_12",
|
|
2595
2721
|
"empty__chip--error": "_empty__chip--error_15v2t_22",
|
|
2596
2722
|
empty__title: "_empty__title_15v2t_23",
|
|
2597
2723
|
empty__desc: "_empty__desc_15v2t_31",
|
|
2598
2724
|
empty__action: "_empty__action_15v2t_39"
|
|
2599
|
-
},
|
|
2725
|
+
}, un = {
|
|
2600
2726
|
"no-data": {
|
|
2601
2727
|
icon: /* @__PURE__ */ i(S, {
|
|
2602
2728
|
size: 18,
|
|
2603
|
-
strokeWidth:
|
|
2729
|
+
strokeWidth: A(18)
|
|
2604
2730
|
}),
|
|
2605
2731
|
title: "No data yet",
|
|
2606
2732
|
description: "Records will appear here once they are added."
|
|
2607
2733
|
},
|
|
2608
2734
|
"no-results": {
|
|
2609
|
-
icon: /* @__PURE__ */ i(
|
|
2735
|
+
icon: /* @__PURE__ */ i(O, {
|
|
2610
2736
|
size: 18,
|
|
2611
|
-
strokeWidth:
|
|
2737
|
+
strokeWidth: A(18)
|
|
2612
2738
|
}),
|
|
2613
2739
|
title: "No results found",
|
|
2614
2740
|
description: "Try adjusting your search or removing filters."
|
|
@@ -2616,80 +2742,80 @@ var K = {
|
|
|
2616
2742
|
error: {
|
|
2617
2743
|
icon: /* @__PURE__ */ i(m, {
|
|
2618
2744
|
size: 18,
|
|
2619
|
-
strokeWidth:
|
|
2745
|
+
strokeWidth: A(18)
|
|
2620
2746
|
}),
|
|
2621
2747
|
title: "Couldn't load data",
|
|
2622
2748
|
description: "Something went wrong while fetching records."
|
|
2623
2749
|
}
|
|
2624
|
-
},
|
|
2625
|
-
let l =
|
|
2750
|
+
}, dn = ({ type: e = "no-data", title: t, description: n, actionLabel: r, onAction: o, icon: s, className: c }) => {
|
|
2751
|
+
let l = un[e];
|
|
2626
2752
|
return /* @__PURE__ */ a("div", {
|
|
2627
|
-
className: [
|
|
2753
|
+
className: [ln.empty, c ?? ""].filter(Boolean).join(" "),
|
|
2628
2754
|
role: "status",
|
|
2629
2755
|
children: [
|
|
2630
2756
|
/* @__PURE__ */ i("span", {
|
|
2631
|
-
className: [
|
|
2757
|
+
className: [ln.empty__chip, ln[`empty__chip--${e}`]].join(" "),
|
|
2632
2758
|
"aria-hidden": "true",
|
|
2633
2759
|
children: s ?? l.icon
|
|
2634
2760
|
}),
|
|
2635
2761
|
/* @__PURE__ */ i("p", {
|
|
2636
|
-
className:
|
|
2762
|
+
className: ln.empty__title,
|
|
2637
2763
|
children: t ?? l.title
|
|
2638
2764
|
}),
|
|
2639
2765
|
/* @__PURE__ */ i("p", {
|
|
2640
|
-
className:
|
|
2766
|
+
className: ln.empty__desc,
|
|
2641
2767
|
children: n ?? l.description
|
|
2642
2768
|
}),
|
|
2643
2769
|
r && /* @__PURE__ */ i("button", {
|
|
2644
2770
|
type: "button",
|
|
2645
|
-
className:
|
|
2771
|
+
className: ln.empty__action,
|
|
2646
2772
|
onClick: o,
|
|
2647
2773
|
children: r
|
|
2648
2774
|
})
|
|
2649
2775
|
]
|
|
2650
2776
|
});
|
|
2651
|
-
},
|
|
2777
|
+
}, fn = {
|
|
2652
2778
|
chip: "_chip_rpkox_2",
|
|
2653
2779
|
chip__lead: "_chip__lead_rpkox_20",
|
|
2654
2780
|
chip__trail: "_chip__trail_rpkox_20",
|
|
2655
2781
|
"chip--active": "_chip--active_rpkox_22",
|
|
2656
2782
|
chip__remove: "_chip__remove_rpkox_29",
|
|
2657
2783
|
"chip--add": "_chip--add_rpkox_38"
|
|
2658
|
-
},
|
|
2784
|
+
}, pn = ({ type: e = "default", children: t, onClick: n, onRemove: r, className: o }) => /* @__PURE__ */ a("button", {
|
|
2659
2785
|
type: "button",
|
|
2660
2786
|
onClick: n,
|
|
2661
2787
|
className: [
|
|
2662
|
-
|
|
2663
|
-
|
|
2788
|
+
fn.chip,
|
|
2789
|
+
fn[`chip--${e}`],
|
|
2664
2790
|
o ?? ""
|
|
2665
2791
|
].filter(Boolean).join(" "),
|
|
2666
2792
|
children: [
|
|
2667
|
-
e === "add" && /* @__PURE__ */ i(
|
|
2793
|
+
e === "add" && /* @__PURE__ */ i(D, {
|
|
2668
2794
|
size: 14,
|
|
2669
|
-
strokeWidth:
|
|
2670
|
-
className:
|
|
2795
|
+
strokeWidth: A(14),
|
|
2796
|
+
className: fn.chip__lead,
|
|
2671
2797
|
"aria-hidden": "true"
|
|
2672
2798
|
}),
|
|
2673
2799
|
/* @__PURE__ */ i("span", {
|
|
2674
|
-
className:
|
|
2800
|
+
className: fn.chip__label,
|
|
2675
2801
|
children: t
|
|
2676
2802
|
}),
|
|
2677
2803
|
e === "default" && /* @__PURE__ */ i(d, {
|
|
2678
2804
|
size: 14,
|
|
2679
|
-
strokeWidth:
|
|
2680
|
-
className:
|
|
2805
|
+
strokeWidth: A(14),
|
|
2806
|
+
className: fn.chip__trail,
|
|
2681
2807
|
"aria-hidden": "true"
|
|
2682
2808
|
}),
|
|
2683
2809
|
e === "active" && /* @__PURE__ */ i("span", {
|
|
2684
2810
|
role: "button",
|
|
2685
2811
|
"aria-label": "Remove filter",
|
|
2686
|
-
className:
|
|
2812
|
+
className: fn.chip__remove,
|
|
2687
2813
|
onClick: (e) => {
|
|
2688
2814
|
e.stopPropagation(), r?.();
|
|
2689
2815
|
},
|
|
2690
|
-
children: /* @__PURE__ */ i(
|
|
2816
|
+
children: /* @__PURE__ */ i(oe, {
|
|
2691
2817
|
size: 14,
|
|
2692
|
-
strokeWidth:
|
|
2818
|
+
strokeWidth: A(14),
|
|
2693
2819
|
"aria-hidden": "true"
|
|
2694
2820
|
})
|
|
2695
2821
|
})
|
|
@@ -2708,10 +2834,10 @@ var K = {
|
|
|
2708
2834
|
input__control: "_input__control_1cywj_79",
|
|
2709
2835
|
input__icon: "_input__icon_1cywj_108",
|
|
2710
2836
|
"input--unstyled": "_input--unstyled_1cywj_118"
|
|
2711
|
-
},
|
|
2712
|
-
size:
|
|
2713
|
-
strokeWidth:
|
|
2714
|
-
}) : t,
|
|
2837
|
+
}, mn = 16, hn = (t) => e.isValidElement(t) ? e.cloneElement(t, {
|
|
2838
|
+
size: mn,
|
|
2839
|
+
strokeWidth: A(mn)
|
|
2840
|
+
}) : t, gn = e.forwardRef(({ label: t, description: n, error: r, size: o = "md", unstyled: s, leadingIcon: c, trailingIcon: l, disabled: u, id: d, className: f, ...p }, m) => {
|
|
2715
2841
|
let h = e.useId(), g = d ?? h, _ = !!r;
|
|
2716
2842
|
return /* @__PURE__ */ a("div", {
|
|
2717
2843
|
className: [q.field, f ?? ""].filter(Boolean).join(" "),
|
|
@@ -2732,7 +2858,7 @@ var K = {
|
|
|
2732
2858
|
c && /* @__PURE__ */ i("span", {
|
|
2733
2859
|
className: q.input__icon,
|
|
2734
2860
|
"aria-hidden": "true",
|
|
2735
|
-
children:
|
|
2861
|
+
children: hn(c)
|
|
2736
2862
|
}),
|
|
2737
2863
|
/* @__PURE__ */ i("input", {
|
|
2738
2864
|
ref: m,
|
|
@@ -2746,7 +2872,7 @@ var K = {
|
|
|
2746
2872
|
l && /* @__PURE__ */ i("span", {
|
|
2747
2873
|
className: q.input__icon,
|
|
2748
2874
|
"aria-hidden": "true",
|
|
2749
|
-
children:
|
|
2875
|
+
children: hn(l)
|
|
2750
2876
|
})
|
|
2751
2877
|
]
|
|
2752
2878
|
}),
|
|
@@ -2758,7 +2884,7 @@ var K = {
|
|
|
2758
2884
|
]
|
|
2759
2885
|
});
|
|
2760
2886
|
});
|
|
2761
|
-
|
|
2887
|
+
gn.displayName = "Input";
|
|
2762
2888
|
var J = {
|
|
2763
2889
|
row: "_row_1q1m5_2",
|
|
2764
2890
|
"row--sent": "_row--sent_1q1m5_3",
|
|
@@ -2783,7 +2909,7 @@ var J = {
|
|
|
2783
2909
|
foot__receipt: "_foot__receipt_1q1m5_32",
|
|
2784
2910
|
system: "_system_1q1m5_34",
|
|
2785
2911
|
system__pill: "_system__pill_1q1m5_35"
|
|
2786
|
-
},
|
|
2912
|
+
}, _n = ({ type: e = "received", content: t = "text", avatar: n, authorName: o, timestamp: s, children: c, image: l, fileName: d, fileSize: f, reactions: p, read: m, className: h }) => {
|
|
2787
2913
|
if (e === "system") return /* @__PURE__ */ i("div", {
|
|
2788
2914
|
className: [J.system, h ?? ""].filter(Boolean).join(" "),
|
|
2789
2915
|
children: /* @__PURE__ */ i("span", {
|
|
@@ -2826,7 +2952,7 @@ var J = {
|
|
|
2826
2952
|
children: [
|
|
2827
2953
|
/* @__PURE__ */ i(y, {
|
|
2828
2954
|
size: 18,
|
|
2829
|
-
strokeWidth:
|
|
2955
|
+
strokeWidth: A(18),
|
|
2830
2956
|
className: J.file__icon,
|
|
2831
2957
|
"aria-hidden": "true"
|
|
2832
2958
|
}),
|
|
@@ -2842,7 +2968,7 @@ var J = {
|
|
|
2842
2968
|
}),
|
|
2843
2969
|
/* @__PURE__ */ i(g, {
|
|
2844
2970
|
size: 16,
|
|
2845
|
-
strokeWidth:
|
|
2971
|
+
strokeWidth: A(16),
|
|
2846
2972
|
className: J.file__dl,
|
|
2847
2973
|
"aria-hidden": "true"
|
|
2848
2974
|
})
|
|
@@ -2861,7 +2987,7 @@ var J = {
|
|
|
2861
2987
|
children: s
|
|
2862
2988
|
}), m && /* @__PURE__ */ i(u, {
|
|
2863
2989
|
size: 13,
|
|
2864
|
-
strokeWidth:
|
|
2990
|
+
strokeWidth: A(13),
|
|
2865
2991
|
className: J.foot__receipt,
|
|
2866
2992
|
"aria-hidden": "true"
|
|
2867
2993
|
})] })]
|
|
@@ -2869,7 +2995,7 @@ var J = {
|
|
|
2869
2995
|
]
|
|
2870
2996
|
})]
|
|
2871
2997
|
});
|
|
2872
|
-
},
|
|
2998
|
+
}, vn = {
|
|
2873
2999
|
pagination: "_pagination_on2nb_2",
|
|
2874
3000
|
page: "_page_on2nb_9",
|
|
2875
3001
|
arrow: "_arrow_on2nb_9",
|
|
@@ -2878,7 +3004,7 @@ var J = {
|
|
|
2878
3004
|
};
|
|
2879
3005
|
//#endregion
|
|
2880
3006
|
//#region src/components/Pagination/Pagination.tsx
|
|
2881
|
-
function
|
|
3007
|
+
function yn(e, t, n) {
|
|
2882
3008
|
let r = t, i = Math.min(t + n, e), a = /* @__PURE__ */ new Set([1, e]);
|
|
2883
3009
|
for (let e = r; e <= i; e++) a.add(e);
|
|
2884
3010
|
let o = Array.from(a).sort((e, t) => e - t), s = [];
|
|
@@ -2886,55 +3012,55 @@ function mn(e, t, n) {
|
|
|
2886
3012
|
t > 0 && e - o[t - 1] > 1 && s.push("ellipsis"), s.push(e);
|
|
2887
3013
|
}), s;
|
|
2888
3014
|
}
|
|
2889
|
-
var
|
|
2890
|
-
let s =
|
|
3015
|
+
var bn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o }) => {
|
|
3016
|
+
let s = yn(e, t, r);
|
|
2891
3017
|
return /* @__PURE__ */ a("nav", {
|
|
2892
|
-
className: [
|
|
3018
|
+
className: [vn.pagination, o ?? ""].filter(Boolean).join(" "),
|
|
2893
3019
|
"aria-label": "Pagination",
|
|
2894
3020
|
children: [
|
|
2895
3021
|
/* @__PURE__ */ i("button", {
|
|
2896
3022
|
type: "button",
|
|
2897
|
-
className:
|
|
3023
|
+
className: vn.arrow,
|
|
2898
3024
|
disabled: t <= 1,
|
|
2899
3025
|
onClick: () => n(t - 1),
|
|
2900
3026
|
"aria-label": "Previous page",
|
|
2901
3027
|
children: /* @__PURE__ */ i(f, {
|
|
2902
3028
|
size: 16,
|
|
2903
|
-
strokeWidth:
|
|
3029
|
+
strokeWidth: A(16)
|
|
2904
3030
|
})
|
|
2905
3031
|
}),
|
|
2906
3032
|
s.map((e, r) => e === "ellipsis" ? /* @__PURE__ */ i("span", {
|
|
2907
|
-
className:
|
|
3033
|
+
className: vn.ellipsis,
|
|
2908
3034
|
"aria-hidden": "true",
|
|
2909
3035
|
children: "…"
|
|
2910
3036
|
}, `e${r}`) : /* @__PURE__ */ i("button", {
|
|
2911
3037
|
type: "button",
|
|
2912
|
-
className: [
|
|
3038
|
+
className: [vn.page, e === t ? vn["page--active"] : ""].filter(Boolean).join(" "),
|
|
2913
3039
|
"aria-current": e === t ? "page" : void 0,
|
|
2914
3040
|
onClick: () => n(e),
|
|
2915
3041
|
children: e
|
|
2916
3042
|
}, e)),
|
|
2917
3043
|
/* @__PURE__ */ i("button", {
|
|
2918
3044
|
type: "button",
|
|
2919
|
-
className:
|
|
3045
|
+
className: vn.arrow,
|
|
2920
3046
|
disabled: t >= e,
|
|
2921
3047
|
onClick: () => n(t + 1),
|
|
2922
3048
|
"aria-label": "Next page",
|
|
2923
3049
|
children: /* @__PURE__ */ i(p, {
|
|
2924
3050
|
size: 16,
|
|
2925
|
-
strokeWidth:
|
|
3051
|
+
strokeWidth: A(16)
|
|
2926
3052
|
})
|
|
2927
3053
|
})
|
|
2928
3054
|
]
|
|
2929
3055
|
});
|
|
2930
|
-
},
|
|
3056
|
+
}, xn = {
|
|
2931
3057
|
track: "_track_1br5v_2",
|
|
2932
3058
|
segment: "_segment_1br5v_12",
|
|
2933
3059
|
"segment--active": "_segment--active_1br5v_38",
|
|
2934
3060
|
thumb: "_thumb_1br5v_44",
|
|
2935
3061
|
"thumb--animated": "_thumb--animated_1br5v_62",
|
|
2936
3062
|
"track--fullWidth": "_track--fullWidth_1br5v_68"
|
|
2937
|
-
},
|
|
3063
|
+
}, Sn = ({ options: t, value: n, defaultValue: r, onChange: o, fullWidth: s, className: c }) => {
|
|
2938
3064
|
let l = n !== void 0, [u, d] = e.useState(r ?? t[0]?.value), f = l ? n : u, p = (e) => {
|
|
2939
3065
|
l || d(e), o?.(e);
|
|
2940
3066
|
}, m = e.useRef(null), h = e.useRef({}), [g, _] = e.useState(null), [v, y] = e.useState(!1);
|
|
@@ -2955,13 +3081,13 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
2955
3081
|
ref: m,
|
|
2956
3082
|
role: "tablist",
|
|
2957
3083
|
className: [
|
|
2958
|
-
|
|
2959
|
-
s ?
|
|
3084
|
+
xn.track,
|
|
3085
|
+
s ? xn["track--fullWidth"] : "",
|
|
2960
3086
|
c ?? ""
|
|
2961
3087
|
].filter(Boolean).join(" "),
|
|
2962
3088
|
children: [g && /* @__PURE__ */ i("span", {
|
|
2963
3089
|
"aria-hidden": "true",
|
|
2964
|
-
className: [
|
|
3090
|
+
className: [xn.thumb, v ? xn["thumb--animated"] : ""].filter(Boolean).join(" "),
|
|
2965
3091
|
style: {
|
|
2966
3092
|
transform: `translateX(${g.left}px)`,
|
|
2967
3093
|
width: g.width
|
|
@@ -2975,7 +3101,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
2975
3101
|
role: "tab",
|
|
2976
3102
|
type: "button",
|
|
2977
3103
|
"aria-selected": t,
|
|
2978
|
-
className: [
|
|
3104
|
+
className: [xn.segment, t ? xn["segment--active"] : ""].filter(Boolean).join(" "),
|
|
2979
3105
|
onClick: () => p(e.value),
|
|
2980
3106
|
children: e.label
|
|
2981
3107
|
}, e.value);
|
|
@@ -3011,47 +3137,47 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3011
3137
|
option__check: "_option__check_1b512_179",
|
|
3012
3138
|
optionHighlight: "_optionHighlight_1b512_151",
|
|
3013
3139
|
"optionHighlight--animated": "_optionHighlight--animated_1b512_201"
|
|
3014
|
-
},
|
|
3015
|
-
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,
|
|
3140
|
+
}, Cn = ({ 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 }) => {
|
|
3141
|
+
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, E] = e.useState(!1), [D, O] = e.useState(0), ee = e.useRef(null), te = e.useRef(null), k = e.useRef(null), ne = e.useRef({}), [re, ie] = e.useState(null), [ae, oe] = e.useState(!1);
|
|
3016
3142
|
e.useLayoutEffect(() => {
|
|
3017
|
-
let e =
|
|
3143
|
+
let e = ne.current[D];
|
|
3018
3144
|
if (!e) {
|
|
3019
|
-
|
|
3145
|
+
ie(null);
|
|
3020
3146
|
return;
|
|
3021
3147
|
}
|
|
3022
|
-
|
|
3148
|
+
ie({
|
|
3023
3149
|
top: e.offsetTop,
|
|
3024
3150
|
height: e.offsetHeight
|
|
3025
3151
|
});
|
|
3026
|
-
}, [
|
|
3152
|
+
}, [D, c.length]), e.useLayoutEffect(() => {
|
|
3027
3153
|
if (!T) {
|
|
3028
|
-
|
|
3154
|
+
oe(!1);
|
|
3029
3155
|
return;
|
|
3030
3156
|
}
|
|
3031
|
-
|
|
3032
|
-
let e = window.requestAnimationFrame(() =>
|
|
3157
|
+
oe(!1);
|
|
3158
|
+
let e = window.requestAnimationFrame(() => oe(!0));
|
|
3033
3159
|
return () => window.cancelAnimationFrame(e);
|
|
3034
3160
|
}, [T]), e.useEffect(() => {
|
|
3035
|
-
if (!
|
|
3161
|
+
if (!k.current) return;
|
|
3036
3162
|
let e = new ResizeObserver(() => {
|
|
3037
|
-
let e =
|
|
3038
|
-
e &&
|
|
3163
|
+
let e = ne.current[D];
|
|
3164
|
+
e && ie({
|
|
3039
3165
|
top: e.offsetTop,
|
|
3040
3166
|
height: e.offsetHeight
|
|
3041
3167
|
});
|
|
3042
3168
|
});
|
|
3043
|
-
return e.observe(
|
|
3169
|
+
return e.observe(k.current), () => e.disconnect();
|
|
3044
3170
|
}, [T]);
|
|
3045
|
-
let
|
|
3171
|
+
let se = He(ee, T), [ce, le] = e.useState(null);
|
|
3046
3172
|
e.useEffect(() => {
|
|
3047
|
-
C &&
|
|
3173
|
+
C && E(!0);
|
|
3048
3174
|
}, [C]), e.useLayoutEffect(() => {
|
|
3049
3175
|
if (!C) return;
|
|
3050
3176
|
let e = () => {
|
|
3051
|
-
let e =
|
|
3177
|
+
let e = te.current;
|
|
3052
3178
|
if (!e) return;
|
|
3053
3179
|
let t = e.getBoundingClientRect();
|
|
3054
|
-
|
|
3180
|
+
le({
|
|
3055
3181
|
top: t.bottom + 4,
|
|
3056
3182
|
left: t.left,
|
|
3057
3183
|
width: t.width
|
|
@@ -3064,22 +3190,22 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3064
3190
|
if (!C) return;
|
|
3065
3191
|
let e = (e) => {
|
|
3066
3192
|
let t = e.target;
|
|
3067
|
-
|
|
3193
|
+
ee.current?.contains(t) || k.current?.contains(t) || w(!1);
|
|
3068
3194
|
};
|
|
3069
3195
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
3070
3196
|
}, [C]), e.useEffect(() => {
|
|
3071
3197
|
if (!C) return;
|
|
3072
3198
|
let e = c.findIndex((e) => e.value === x);
|
|
3073
|
-
|
|
3199
|
+
O(e >= 0 ? e : 0);
|
|
3074
3200
|
}, [
|
|
3075
3201
|
C,
|
|
3076
3202
|
c,
|
|
3077
3203
|
x
|
|
3078
3204
|
]);
|
|
3079
|
-
let
|
|
3205
|
+
let ue = (e) => {
|
|
3080
3206
|
e.disabled || (l === void 0 && b(e.value), d?.(e.value), w(!1));
|
|
3081
|
-
},
|
|
3082
|
-
|
|
3207
|
+
}, de = (e) => {
|
|
3208
|
+
O((t) => {
|
|
3083
3209
|
let n = t;
|
|
3084
3210
|
for (let t = 0; t < c.length; t += 1) if (n = (n + e + c.length) % c.length, !c[n]?.disabled) return n;
|
|
3085
3211
|
return t;
|
|
@@ -3087,7 +3213,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3087
3213
|
};
|
|
3088
3214
|
return /* @__PURE__ */ a("div", {
|
|
3089
3215
|
className: [Y.field, m ?? ""].filter(Boolean).join(" "),
|
|
3090
|
-
ref:
|
|
3216
|
+
ref: ee,
|
|
3091
3217
|
children: [
|
|
3092
3218
|
t && /* @__PURE__ */ i("label", {
|
|
3093
3219
|
htmlFor: g,
|
|
@@ -3097,7 +3223,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3097
3223
|
/* @__PURE__ */ a("div", {
|
|
3098
3224
|
className: Y.anchor,
|
|
3099
3225
|
children: [/* @__PURE__ */ a("div", {
|
|
3100
|
-
ref:
|
|
3226
|
+
ref: te,
|
|
3101
3227
|
id: g,
|
|
3102
3228
|
role: "combobox",
|
|
3103
3229
|
tabIndex: f ? -1 : 0,
|
|
@@ -3106,7 +3232,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3106
3232
|
"aria-controls": _,
|
|
3107
3233
|
"aria-invalid": v || void 0,
|
|
3108
3234
|
"aria-disabled": f || void 0,
|
|
3109
|
-
"aria-activedescendant": C ? `${_}-opt-${
|
|
3235
|
+
"aria-activedescendant": C ? `${_}-opt-${D}` : void 0,
|
|
3110
3236
|
onClick: () => !f && w((e) => !e),
|
|
3111
3237
|
onKeyDown: (e) => {
|
|
3112
3238
|
if (!f) {
|
|
@@ -3114,14 +3240,14 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3114
3240
|
e.preventDefault(), w(!0);
|
|
3115
3241
|
return;
|
|
3116
3242
|
}
|
|
3117
|
-
if (C) if (e.key === "ArrowDown") e.preventDefault(),
|
|
3118
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3119
|
-
else if (e.key === "Home") e.preventDefault(),
|
|
3120
|
-
else if (e.key === "End") e.preventDefault(),
|
|
3243
|
+
if (C) if (e.key === "ArrowDown") e.preventDefault(), de(1);
|
|
3244
|
+
else if (e.key === "ArrowUp") e.preventDefault(), de(-1);
|
|
3245
|
+
else if (e.key === "Home") e.preventDefault(), O(0);
|
|
3246
|
+
else if (e.key === "End") e.preventDefault(), O(c.length - 1);
|
|
3121
3247
|
else if (e.key === "Enter" || e.key === " ") {
|
|
3122
3248
|
e.preventDefault();
|
|
3123
|
-
let t = c[
|
|
3124
|
-
t &&
|
|
3249
|
+
let t = c[D];
|
|
3250
|
+
t && ue(t);
|
|
3125
3251
|
} else e.key === "Escape" && (e.preventDefault(), w(!1));
|
|
3126
3252
|
}
|
|
3127
3253
|
},
|
|
@@ -3144,47 +3270,47 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3144
3270
|
viewBox: "0 0 24 24",
|
|
3145
3271
|
fill: "none",
|
|
3146
3272
|
stroke: "currentColor",
|
|
3147
|
-
strokeWidth:
|
|
3273
|
+
strokeWidth: A(16),
|
|
3148
3274
|
strokeLinecap: "round",
|
|
3149
3275
|
strokeLinejoin: "round",
|
|
3150
3276
|
children: /* @__PURE__ */ i("path", { d: "m6 9 6 6 6-6" })
|
|
3151
3277
|
})
|
|
3152
3278
|
})]
|
|
3153
|
-
}), T &&
|
|
3154
|
-
ref:
|
|
3279
|
+
}), T && ce && fe(/* @__PURE__ */ a("div", {
|
|
3280
|
+
ref: k,
|
|
3155
3281
|
id: _,
|
|
3156
3282
|
role: "listbox",
|
|
3157
3283
|
className: [
|
|
3158
|
-
|
|
3284
|
+
se,
|
|
3159
3285
|
Y.panel,
|
|
3160
3286
|
C ? Y["panel--entering"] : Y["panel--exiting"]
|
|
3161
3287
|
].filter(Boolean).join(" "),
|
|
3162
3288
|
style: {
|
|
3163
3289
|
position: "fixed",
|
|
3164
|
-
top:
|
|
3165
|
-
left:
|
|
3166
|
-
width:
|
|
3290
|
+
top: ce.top,
|
|
3291
|
+
left: ce.left,
|
|
3292
|
+
width: ce.width
|
|
3167
3293
|
},
|
|
3168
3294
|
onAnimationEnd: () => {
|
|
3169
|
-
C ||
|
|
3295
|
+
C || E(!1);
|
|
3170
3296
|
},
|
|
3171
|
-
children: [
|
|
3297
|
+
children: [re && /* @__PURE__ */ i("span", {
|
|
3172
3298
|
"aria-hidden": "true",
|
|
3173
|
-
className: [Y.optionHighlight,
|
|
3299
|
+
className: [Y.optionHighlight, ae ? Y["optionHighlight--animated"] : ""].filter(Boolean).join(" "),
|
|
3174
3300
|
style: {
|
|
3175
|
-
transform: `translateY(${
|
|
3176
|
-
height:
|
|
3301
|
+
transform: `translateY(${re.top}px)`,
|
|
3302
|
+
height: re.height
|
|
3177
3303
|
}
|
|
3178
3304
|
}), c.map((e, t) => /* @__PURE__ */ a("div", {
|
|
3179
3305
|
ref: (e) => {
|
|
3180
|
-
|
|
3306
|
+
ne.current[t] = e;
|
|
3181
3307
|
},
|
|
3182
3308
|
id: `${_}-opt-${t}`,
|
|
3183
3309
|
role: "option",
|
|
3184
3310
|
"aria-selected": e.value === x,
|
|
3185
3311
|
"aria-disabled": e.disabled || void 0,
|
|
3186
|
-
onMouseEnter: () => !e.disabled &&
|
|
3187
|
-
onClick: () =>
|
|
3312
|
+
onMouseEnter: () => !e.disabled && O(t),
|
|
3313
|
+
onClick: () => ue(e),
|
|
3188
3314
|
className: [
|
|
3189
3315
|
Y.option,
|
|
3190
3316
|
e.value === x ? Y["option--selected"] : "",
|
|
@@ -3217,22 +3343,27 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3217
3343
|
})
|
|
3218
3344
|
]
|
|
3219
3345
|
});
|
|
3220
|
-
},
|
|
3221
|
-
sidebar: "
|
|
3222
|
-
"sidebar--collapsed": "_sidebar--
|
|
3223
|
-
},
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3346
|
+
}, wn = {
|
|
3347
|
+
sidebar: "_sidebar_m27tb_4",
|
|
3348
|
+
"sidebar--collapsed": "_sidebar--collapsed_m27tb_21"
|
|
3349
|
+
}, Tn = ({ collapsed: e = !1, children: t, className: n }) => {
|
|
3350
|
+
let r = Zt();
|
|
3351
|
+
return /* @__PURE__ */ a("nav", {
|
|
3352
|
+
ref: r.ref,
|
|
3353
|
+
...r.groupProps,
|
|
3354
|
+
className: [
|
|
3355
|
+
wn.sidebar,
|
|
3356
|
+
e ? wn["sidebar--collapsed"] : "",
|
|
3357
|
+
n ?? ""
|
|
3358
|
+
].filter(Boolean).join(" "),
|
|
3359
|
+
"data-collapsed": e,
|
|
3360
|
+
children: [r.highlight, t]
|
|
3361
|
+
});
|
|
3362
|
+
}, En = { divider: "_divider_18c5j_1" }, Dn = () => /* @__PURE__ */ i("div", {
|
|
3363
|
+
className: En.divider,
|
|
3233
3364
|
role: "separator"
|
|
3234
|
-
}),
|
|
3235
|
-
className:
|
|
3365
|
+
}), On = { groupLabel: "_groupLabel_62q1j_2" }, kn = ({ children: e }) => /* @__PURE__ */ i("div", {
|
|
3366
|
+
className: On.groupLabel,
|
|
3236
3367
|
children: e
|
|
3237
3368
|
}), X = {
|
|
3238
3369
|
header: "_header_1wyz2_2",
|
|
@@ -3246,7 +3377,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3246
3377
|
header__title: "_header__title_1wyz2_65",
|
|
3247
3378
|
header__subtitle: "_header__subtitle_1wyz2_66",
|
|
3248
3379
|
header__toggle: "_header__toggle_1wyz2_67"
|
|
3249
|
-
},
|
|
3380
|
+
}, An = ({ type: e = "brand", title: t, subtitle: n, logo: r, collapsed: o, onToggle: s, toggleIcon: c = T }) => /* @__PURE__ */ a("div", {
|
|
3250
3381
|
className: [X.header, o ? X["header--collapsed"] : ""].filter(Boolean).join(" "),
|
|
3251
3382
|
children: [
|
|
3252
3383
|
r && (o && e === "brand-toggle" && s ? /* @__PURE__ */ i("button", {
|
|
@@ -3264,7 +3395,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3264
3395
|
"aria-hidden": "true",
|
|
3265
3396
|
children: /* @__PURE__ */ i(c, {
|
|
3266
3397
|
size: 16,
|
|
3267
|
-
strokeWidth:
|
|
3398
|
+
strokeWidth: A(16)
|
|
3268
3399
|
})
|
|
3269
3400
|
})]
|
|
3270
3401
|
})
|
|
@@ -3293,23 +3424,23 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3293
3424
|
"aria-label": "Collapse sidebar",
|
|
3294
3425
|
children: /* @__PURE__ */ i(c, {
|
|
3295
3426
|
size: 18,
|
|
3296
|
-
strokeWidth:
|
|
3427
|
+
strokeWidth: A(18)
|
|
3297
3428
|
})
|
|
3298
3429
|
})
|
|
3299
3430
|
]
|
|
3300
3431
|
}), Z = {
|
|
3301
|
-
item: "
|
|
3302
|
-
"item--disabled": "_item--
|
|
3303
|
-
"item--active": "_item--
|
|
3304
|
-
"item--active-flat": "_item--active-
|
|
3305
|
-
item__icon: "
|
|
3306
|
-
item__bar: "
|
|
3307
|
-
item__chevron: "
|
|
3308
|
-
item__badge: "
|
|
3309
|
-
"item--collapsed": "_item--
|
|
3310
|
-
item__label: "
|
|
3311
|
-
"item__label--collapsed": "_item__label--
|
|
3312
|
-
},
|
|
3432
|
+
item: "_item_wn22d_5",
|
|
3433
|
+
"item--disabled": "_item--disabled_wn22d_37",
|
|
3434
|
+
"item--active": "_item--active_wn22d_37",
|
|
3435
|
+
"item--active-flat": "_item--active-flat_wn22d_37",
|
|
3436
|
+
item__icon: "_item__icon_wn22d_38",
|
|
3437
|
+
item__bar: "_item__bar_wn22d_49",
|
|
3438
|
+
item__chevron: "_item__chevron_wn22d_78",
|
|
3439
|
+
item__badge: "_item__badge_wn22d_80",
|
|
3440
|
+
"item--collapsed": "_item--collapsed_wn22d_101",
|
|
3441
|
+
item__label: "_item__label_wn22d_128",
|
|
3442
|
+
"item__label--collapsed": "_item__label--collapsed_wn22d_137"
|
|
3443
|
+
}, jn = ({ icon: e, label: t, active: n, activeIndicator: o = !0, disabled: s, badge: c, hasSubmenu: l, collapsed: u, onClick: d, href: f, nativeTooltip: m = !0 }) => {
|
|
3313
3444
|
let h = n && (u || o), g = n && !u && !o, _ = [
|
|
3314
3445
|
Z.item,
|
|
3315
3446
|
h ? Z["item--active"] : "",
|
|
@@ -3326,7 +3457,7 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3326
3457
|
"aria-hidden": "true",
|
|
3327
3458
|
children: /* @__PURE__ */ i(e, {
|
|
3328
3459
|
size: 18,
|
|
3329
|
-
strokeWidth:
|
|
3460
|
+
strokeWidth: A(18)
|
|
3330
3461
|
})
|
|
3331
3462
|
}),
|
|
3332
3463
|
/* @__PURE__ */ i("span", {
|
|
@@ -3342,11 +3473,12 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3342
3473
|
"aria-hidden": "true",
|
|
3343
3474
|
children: /* @__PURE__ */ i(p, {
|
|
3344
3475
|
size: 16,
|
|
3345
|
-
strokeWidth:
|
|
3476
|
+
strokeWidth: A(16)
|
|
3346
3477
|
})
|
|
3347
3478
|
})
|
|
3348
3479
|
] }), y = {
|
|
3349
3480
|
className: _,
|
|
3481
|
+
"data-hover-item": "",
|
|
3350
3482
|
title: u && m ? t : void 0,
|
|
3351
3483
|
"aria-label": u ? t : void 0,
|
|
3352
3484
|
"aria-current": n ? "page" : void 0
|
|
@@ -3362,25 +3494,26 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3362
3494
|
...y,
|
|
3363
3495
|
children: v
|
|
3364
3496
|
});
|
|
3365
|
-
},
|
|
3366
|
-
subItem: "
|
|
3367
|
-
"subItem--disabled": "_subItem--
|
|
3368
|
-
"subItem--active": "_subItem--
|
|
3369
|
-
subItem__dot: "
|
|
3370
|
-
subItem__label: "
|
|
3371
|
-
},
|
|
3497
|
+
}, Mn = {
|
|
3498
|
+
subItem: "_subItem_1sz05_2",
|
|
3499
|
+
"subItem--disabled": "_subItem--disabled_1sz05_26",
|
|
3500
|
+
"subItem--active": "_subItem--active_1sz05_27",
|
|
3501
|
+
subItem__dot: "_subItem__dot_1sz05_31",
|
|
3502
|
+
subItem__label: "_subItem__label_1sz05_41"
|
|
3503
|
+
}, Nn = ({ label: e, active: t, disabled: n, onClick: o, href: s }) => {
|
|
3372
3504
|
let c = {
|
|
3373
3505
|
className: [
|
|
3374
|
-
|
|
3375
|
-
t ?
|
|
3376
|
-
n ?
|
|
3506
|
+
Mn.subItem,
|
|
3507
|
+
t ? Mn["subItem--active"] : "",
|
|
3508
|
+
n ? Mn["subItem--disabled"] : ""
|
|
3377
3509
|
].filter(Boolean).join(" "),
|
|
3510
|
+
"data-hover-item": "",
|
|
3378
3511
|
"aria-current": t ? "page" : void 0
|
|
3379
3512
|
}, l = /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("span", {
|
|
3380
|
-
className:
|
|
3513
|
+
className: Mn.subItem__dot,
|
|
3381
3514
|
"aria-hidden": "true"
|
|
3382
3515
|
}), /* @__PURE__ */ i("span", {
|
|
3383
|
-
className:
|
|
3516
|
+
className: Mn.subItem__label,
|
|
3384
3517
|
children: e
|
|
3385
3518
|
})] });
|
|
3386
3519
|
return s && !n ? /* @__PURE__ */ i("a", {
|
|
@@ -3394,41 +3527,41 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3394
3527
|
...c,
|
|
3395
3528
|
children: l
|
|
3396
3529
|
});
|
|
3397
|
-
},
|
|
3530
|
+
}, Pn = {
|
|
3398
3531
|
skeleton: "_skeleton_94hr3_9",
|
|
3399
3532
|
"skeleton-shimmer": "_skeleton-shimmer_94hr3_1",
|
|
3400
3533
|
"skeleton--text": "_skeleton--text_94hr3_22",
|
|
3401
3534
|
"skeleton--rect": "_skeleton--rect_94hr3_29",
|
|
3402
3535
|
"skeleton--circle": "_skeleton--circle_94hr3_35"
|
|
3403
|
-
},
|
|
3536
|
+
}, Fn = ({ variant: e = "text", width: t, height: n, className: r }) => {
|
|
3404
3537
|
let a = {};
|
|
3405
3538
|
return t !== void 0 && (a.width = typeof t == "number" ? `${t}px` : t), n !== void 0 && (a.height = typeof n == "number" ? `${n}px` : n), /* @__PURE__ */ i("span", {
|
|
3406
3539
|
"aria-hidden": "true",
|
|
3407
3540
|
className: [
|
|
3408
|
-
|
|
3409
|
-
|
|
3541
|
+
Pn.skeleton,
|
|
3542
|
+
Pn[`skeleton--${e}`],
|
|
3410
3543
|
r ?? ""
|
|
3411
3544
|
].filter(Boolean).join(" "),
|
|
3412
3545
|
style: a
|
|
3413
3546
|
});
|
|
3414
|
-
},
|
|
3547
|
+
}, In = {
|
|
3415
3548
|
field: "_field_drnb1_3",
|
|
3416
3549
|
header: "_header_drnb1_4",
|
|
3417
3550
|
label: "_label_drnb1_5",
|
|
3418
3551
|
value: "_value_drnb1_6",
|
|
3419
3552
|
slider: "_slider_drnb1_8"
|
|
3420
|
-
},
|
|
3553
|
+
}, Ln = e.forwardRef(({ label: t, showValue: n, min: r = 0, max: o = 100, value: s, defaultValue: c, disabled: l, id: u, className: d, onChange: f, ...p }, m) => {
|
|
3421
3554
|
let h = e.useId(), g = u ?? h, _ = Number(s ?? c ?? r), [v, y] = e.useState(_), b = s === void 0 ? v : Number(s), x = (b - r) / (o - r) * 100;
|
|
3422
3555
|
return /* @__PURE__ */ a("div", {
|
|
3423
|
-
className: [
|
|
3556
|
+
className: [In.field, d ?? ""].filter(Boolean).join(" "),
|
|
3424
3557
|
children: [(t || n) && /* @__PURE__ */ a("div", {
|
|
3425
|
-
className:
|
|
3558
|
+
className: In.header,
|
|
3426
3559
|
children: [t && /* @__PURE__ */ i("label", {
|
|
3427
3560
|
htmlFor: g,
|
|
3428
|
-
className:
|
|
3561
|
+
className: In.label,
|
|
3429
3562
|
children: t
|
|
3430
3563
|
}), n && /* @__PURE__ */ i("span", {
|
|
3431
|
-
className:
|
|
3564
|
+
className: In.value,
|
|
3432
3565
|
children: b
|
|
3433
3566
|
})]
|
|
3434
3567
|
}), /* @__PURE__ */ i("input", {
|
|
@@ -3443,53 +3576,53 @@ var hn = ({ total: e, page: t, onPageChange: n, siblings: r = 1, className: o })
|
|
|
3443
3576
|
onChange: (e) => {
|
|
3444
3577
|
s === void 0 && y(Number(e.target.value)), f?.(e);
|
|
3445
3578
|
},
|
|
3446
|
-
className:
|
|
3579
|
+
className: In.slider,
|
|
3447
3580
|
style: { "--pct": `${x}%` },
|
|
3448
3581
|
...p
|
|
3449
3582
|
})]
|
|
3450
3583
|
});
|
|
3451
3584
|
});
|
|
3452
|
-
|
|
3585
|
+
Ln.displayName = "Slider";
|
|
3453
3586
|
var Q = {
|
|
3454
|
-
wrap: "
|
|
3455
|
-
"wrap--bordered": "_wrap--
|
|
3456
|
-
table: "
|
|
3457
|
-
headerRow: "
|
|
3458
|
-
headerCell: "
|
|
3459
|
-
bodyRow: "
|
|
3460
|
-
"bodyRow--selectable": "_bodyRow--
|
|
3461
|
-
"bodyRow--selected": "_bodyRow--
|
|
3462
|
-
bodyCell: "
|
|
3463
|
-
checkCell: "
|
|
3464
|
-
checkbox: "
|
|
3465
|
-
checkbox__input: "
|
|
3466
|
-
checkbox__box: "
|
|
3467
|
-
checkbox__check: "
|
|
3468
|
-
checkbox__dash: "
|
|
3469
|
-
stackedList: "
|
|
3470
|
-
card: "
|
|
3471
|
-
"card--selectable": "_card--
|
|
3472
|
-
"card--selected": "_card--
|
|
3473
|
-
card__field: "
|
|
3474
|
-
card__label: "
|
|
3475
|
-
card__value: "
|
|
3476
|
-
card__selectRow: "
|
|
3477
|
-
"bodyRow--dragging": "_bodyRow--
|
|
3478
|
-
"bodyRow--dropTarget": "_bodyRow--
|
|
3479
|
-
dragCell: "
|
|
3480
|
-
dragHandle: "
|
|
3481
|
-
},
|
|
3482
|
-
function
|
|
3587
|
+
wrap: "_wrap_1hulo_6",
|
|
3588
|
+
"wrap--bordered": "_wrap--bordered_1hulo_20",
|
|
3589
|
+
table: "_table_1hulo_25",
|
|
3590
|
+
headerRow: "_headerRow_1hulo_47",
|
|
3591
|
+
headerCell: "_headerCell_1hulo_48",
|
|
3592
|
+
bodyRow: "_bodyRow_1hulo_64",
|
|
3593
|
+
"bodyRow--selectable": "_bodyRow--selectable_1hulo_74",
|
|
3594
|
+
"bodyRow--selected": "_bodyRow--selected_1hulo_75",
|
|
3595
|
+
bodyCell: "_bodyCell_1hulo_77",
|
|
3596
|
+
checkCell: "_checkCell_1hulo_89",
|
|
3597
|
+
checkbox: "_checkbox_1hulo_113",
|
|
3598
|
+
checkbox__input: "_checkbox__input_1hulo_120",
|
|
3599
|
+
checkbox__box: "_checkbox__box_1hulo_122",
|
|
3600
|
+
checkbox__check: "_checkbox__check_1hulo_143",
|
|
3601
|
+
checkbox__dash: "_checkbox__dash_1hulo_150",
|
|
3602
|
+
stackedList: "_stackedList_1hulo_169",
|
|
3603
|
+
card: "_card_1hulo_176",
|
|
3604
|
+
"card--selectable": "_card--selectable_1hulo_185",
|
|
3605
|
+
"card--selected": "_card--selected_1hulo_187",
|
|
3606
|
+
card__field: "_card__field_1hulo_189",
|
|
3607
|
+
card__label: "_card__label_1hulo_197",
|
|
3608
|
+
card__value: "_card__value_1hulo_203",
|
|
3609
|
+
card__selectRow: "_card__selectRow_1hulo_213",
|
|
3610
|
+
"bodyRow--dragging": "_bodyRow--dragging_1hulo_223",
|
|
3611
|
+
"bodyRow--dropTarget": "_bodyRow--dropTarget_1hulo_224",
|
|
3612
|
+
dragCell: "_dragCell_1hulo_231",
|
|
3613
|
+
dragHandle: "_dragHandle_1hulo_247"
|
|
3614
|
+
}, Rn = 640;
|
|
3615
|
+
function zn(t) {
|
|
3483
3616
|
let [n, r] = e.useState(!1);
|
|
3484
3617
|
return e.useEffect(() => {
|
|
3485
3618
|
if (t !== "auto") return;
|
|
3486
|
-
let e = window.matchMedia(`(max-width: ${
|
|
3619
|
+
let e = window.matchMedia(`(max-width: ${Rn}px)`);
|
|
3487
3620
|
r(e.matches);
|
|
3488
3621
|
let n = (e) => r(e.matches);
|
|
3489
3622
|
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
3490
3623
|
}, [t]), t === "default" ? "default" : t === "stacked" || n ? "stacked" : "default";
|
|
3491
3624
|
}
|
|
3492
|
-
var
|
|
3625
|
+
var Bn = ({ checked: t, indeterminate: n, onChange: r, label: o }) => {
|
|
3493
3626
|
let s = e.useRef(null);
|
|
3494
3627
|
return e.useEffect(() => {
|
|
3495
3628
|
s.current && (s.current.indeterminate = !!n);
|
|
@@ -3520,17 +3653,17 @@ var Fn = ({ checked: t, indeterminate: n, onChange: r, label: o }) => {
|
|
|
3520
3653
|
})]
|
|
3521
3654
|
});
|
|
3522
3655
|
};
|
|
3523
|
-
function
|
|
3524
|
-
let m =
|
|
3656
|
+
function Vn({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionChange: s, rowKey: c, reorderable: l, onReorder: u, bordered: d = !0, responsive: f = "auto", className: p }) {
|
|
3657
|
+
let m = zn(f), h = o !== void 0, [g, _] = e.useState([]), v = h ? o : g, y = (e) => {
|
|
3525
3658
|
h || _(e), s?.(e);
|
|
3526
|
-
}, x = n.length > 0 && v.length === n.length, S = v.length > 0 && !x, [C, w] = e.useState(null), [T,
|
|
3659
|
+
}, x = n.length > 0 && v.length === n.length, S = v.length > 0 && !x, [C, w] = e.useState(null), [T, E] = e.useState(null), D = Zt(), O = () => {
|
|
3527
3660
|
if (C === null || T === null || C === T) {
|
|
3528
|
-
w(null),
|
|
3661
|
+
w(null), E(null);
|
|
3529
3662
|
return;
|
|
3530
3663
|
}
|
|
3531
3664
|
let e = [...n], [t] = e.splice(C, 1);
|
|
3532
|
-
e.splice(T, 0, t), u?.(e), w(null),
|
|
3533
|
-
},
|
|
3665
|
+
e.splice(T, 0, t), u?.(e), w(null), E(null);
|
|
3666
|
+
}, ee = () => y(x ? [] : n.map((e, t) => t)), te = (e) => y(v.includes(e) ? v.filter((t) => t !== e) : [...v, e]), k = (e) => (t) => {
|
|
3534
3667
|
t.target.closest("a, button, input, select, textarea, label, [role=\"button\"], [draggable=\"true\"]") || window.getSelection()?.isCollapsed && te(e);
|
|
3535
3668
|
};
|
|
3536
3669
|
return m === "stacked" ? /* @__PURE__ */ i("div", {
|
|
@@ -3540,7 +3673,7 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3540
3673
|
let o = v.includes(n);
|
|
3541
3674
|
return /* @__PURE__ */ a("div", {
|
|
3542
3675
|
role: "listitem",
|
|
3543
|
-
onClick: r ?
|
|
3676
|
+
onClick: r ? k(n) : void 0,
|
|
3544
3677
|
className: [
|
|
3545
3678
|
Q.card,
|
|
3546
3679
|
o ? Q["card--selected"] : "",
|
|
@@ -3548,7 +3681,7 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3548
3681
|
].filter(Boolean).join(" "),
|
|
3549
3682
|
children: [r && /* @__PURE__ */ i("div", {
|
|
3550
3683
|
className: Q.card__selectRow,
|
|
3551
|
-
children: /* @__PURE__ */ i(
|
|
3684
|
+
children: /* @__PURE__ */ i(Bn, {
|
|
3552
3685
|
checked: o,
|
|
3553
3686
|
onChange: () => te(n),
|
|
3554
3687
|
label: `Select row ${n + 1}`
|
|
@@ -3565,13 +3698,15 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3565
3698
|
}, t.key))]
|
|
3566
3699
|
}, c ? c(e, n) : n);
|
|
3567
3700
|
})
|
|
3568
|
-
}) : /* @__PURE__ */
|
|
3701
|
+
}) : /* @__PURE__ */ a("div", {
|
|
3702
|
+
ref: D.ref,
|
|
3703
|
+
...D.groupProps,
|
|
3569
3704
|
className: [
|
|
3570
3705
|
Q.wrap,
|
|
3571
3706
|
d ? Q["wrap--bordered"] : "",
|
|
3572
3707
|
p ?? ""
|
|
3573
3708
|
].filter(Boolean).join(" "),
|
|
3574
|
-
children: /* @__PURE__ */ a("table", {
|
|
3709
|
+
children: [D.highlight, /* @__PURE__ */ a("table", {
|
|
3575
3710
|
className: Q.table,
|
|
3576
3711
|
children: [/* @__PURE__ */ i("thead", { children: /* @__PURE__ */ a("tr", {
|
|
3577
3712
|
className: Q.headerRow,
|
|
@@ -3582,10 +3717,10 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3582
3717
|
}),
|
|
3583
3718
|
r && /* @__PURE__ */ i("th", {
|
|
3584
3719
|
className: Q.checkCell,
|
|
3585
|
-
children: /* @__PURE__ */ i(
|
|
3720
|
+
children: /* @__PURE__ */ i(Bn, {
|
|
3586
3721
|
checked: x,
|
|
3587
3722
|
indeterminate: S,
|
|
3588
|
-
onChange:
|
|
3723
|
+
onChange: ee,
|
|
3589
3724
|
label: "Select all rows"
|
|
3590
3725
|
})
|
|
3591
3726
|
}),
|
|
@@ -3601,13 +3736,14 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3601
3736
|
}) }), /* @__PURE__ */ i("tbody", { children: n.map((e, n) => {
|
|
3602
3737
|
let o = v.includes(n);
|
|
3603
3738
|
return /* @__PURE__ */ a("tr", {
|
|
3604
|
-
|
|
3739
|
+
"data-hover-item": "",
|
|
3740
|
+
onClick: r ? k(n) : void 0,
|
|
3605
3741
|
onDragOver: l ? (e) => {
|
|
3606
|
-
e.preventDefault(),
|
|
3742
|
+
e.preventDefault(), E(n);
|
|
3607
3743
|
} : void 0,
|
|
3608
|
-
onDrop: l ?
|
|
3744
|
+
onDrop: l ? O : void 0,
|
|
3609
3745
|
onDragEnd: l ? () => {
|
|
3610
|
-
w(null),
|
|
3746
|
+
w(null), E(null);
|
|
3611
3747
|
} : void 0,
|
|
3612
3748
|
className: [
|
|
3613
3749
|
Q.bodyRow,
|
|
@@ -3634,7 +3770,7 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3634
3770
|
}),
|
|
3635
3771
|
r && /* @__PURE__ */ i("td", {
|
|
3636
3772
|
className: Q.checkCell,
|
|
3637
|
-
children: /* @__PURE__ */ i(
|
|
3773
|
+
children: /* @__PURE__ */ i(Bn, {
|
|
3638
3774
|
checked: o,
|
|
3639
3775
|
onChange: () => te(n),
|
|
3640
3776
|
label: `Select row ${n + 1}`
|
|
@@ -3648,10 +3784,10 @@ function In({ columns: t, rows: n, selectable: r, selectedRows: o, onSelectionCh
|
|
|
3648
3784
|
]
|
|
3649
3785
|
}, c ? c(e, n) : n);
|
|
3650
3786
|
}) })]
|
|
3651
|
-
})
|
|
3787
|
+
})]
|
|
3652
3788
|
});
|
|
3653
3789
|
}
|
|
3654
|
-
var
|
|
3790
|
+
var Hn = {
|
|
3655
3791
|
tabs: "_tabs_1122j_3",
|
|
3656
3792
|
"tabs--borderless": "_tabs--borderless_1122j_16",
|
|
3657
3793
|
"tabs--fill": "_tabs--fill_1122j_21",
|
|
@@ -3660,7 +3796,7 @@ var Ln = {
|
|
|
3660
3796
|
"tab--active": "_tab--active_1122j_63",
|
|
3661
3797
|
indicator: "_indicator_1122j_74",
|
|
3662
3798
|
"indicator--animated": "_indicator--animated_1122j_88"
|
|
3663
|
-
},
|
|
3799
|
+
}, Un = ({ items: t, value: n, defaultValue: r, onChange: o, bordered: s = !0, fill: c = !1, className: l }) => {
|
|
3664
3800
|
let u = n !== void 0, [d, f] = e.useState(r ?? t[0]?.value), p = u ? n : d, m = (e) => {
|
|
3665
3801
|
u || f(e), o?.(e);
|
|
3666
3802
|
}, h = e.useRef(null), g = e.useRef({}), [_, v] = e.useState(null), [y, b] = e.useState(!1);
|
|
@@ -3681,9 +3817,9 @@ var Ln = {
|
|
|
3681
3817
|
ref: h,
|
|
3682
3818
|
role: "tablist",
|
|
3683
3819
|
className: [
|
|
3684
|
-
|
|
3685
|
-
s ? "" :
|
|
3686
|
-
c ?
|
|
3820
|
+
Hn.tabs,
|
|
3821
|
+
s ? "" : Hn["tabs--borderless"],
|
|
3822
|
+
c ? Hn["tabs--fill"] : "",
|
|
3687
3823
|
l ?? ""
|
|
3688
3824
|
].filter(Boolean).join(" "),
|
|
3689
3825
|
children: [t.map((e) => {
|
|
@@ -3697,27 +3833,27 @@ var Ln = {
|
|
|
3697
3833
|
"aria-selected": t,
|
|
3698
3834
|
disabled: e.disabled,
|
|
3699
3835
|
className: [
|
|
3700
|
-
|
|
3701
|
-
t ?
|
|
3702
|
-
e.disabled ?
|
|
3836
|
+
Hn.tab,
|
|
3837
|
+
t ? Hn["tab--active"] : "",
|
|
3838
|
+
e.disabled ? Hn["tab--disabled"] : ""
|
|
3703
3839
|
].filter(Boolean).join(" "),
|
|
3704
3840
|
onClick: () => m(e.value),
|
|
3705
3841
|
children: [n && /* @__PURE__ */ i(n, {
|
|
3706
3842
|
size: 16,
|
|
3707
|
-
strokeWidth:
|
|
3843
|
+
strokeWidth: A(16),
|
|
3708
3844
|
"aria-hidden": "true"
|
|
3709
3845
|
}), e.label]
|
|
3710
3846
|
}, e.value);
|
|
3711
3847
|
}), _ && /* @__PURE__ */ i("span", {
|
|
3712
3848
|
"aria-hidden": "true",
|
|
3713
|
-
className: [
|
|
3849
|
+
className: [Hn.indicator, y ? Hn["indicator--animated"] : ""].filter(Boolean).join(" "),
|
|
3714
3850
|
style: {
|
|
3715
3851
|
transform: `translateX(${_.left}px)`,
|
|
3716
3852
|
width: _.width
|
|
3717
3853
|
}
|
|
3718
3854
|
})]
|
|
3719
3855
|
});
|
|
3720
|
-
},
|
|
3856
|
+
}, Wn = {
|
|
3721
3857
|
wrapper: "_wrapper_w6wtp_8",
|
|
3722
3858
|
bubble: "_bubble_w6wtp_8",
|
|
3723
3859
|
bubble__title: "_bubble__title_w6wtp_46",
|
|
@@ -3739,7 +3875,7 @@ var Ln = {
|
|
|
3739
3875
|
"caret--center-left": "_caret--center-left_w6wtp_121",
|
|
3740
3876
|
"bubble--center-right": "_bubble--center-right_w6wtp_131",
|
|
3741
3877
|
"caret--center-right": "_caret--center-right_w6wtp_139"
|
|
3742
|
-
},
|
|
3878
|
+
}, Gn = ({ title: t, subtitle: n, pointer: r = "top-center", children: o, className: s }) => {
|
|
3743
3879
|
let [c, l] = e.useState(!1);
|
|
3744
3880
|
return e.useEffect(() => {
|
|
3745
3881
|
let e = (e) => {
|
|
@@ -3747,53 +3883,54 @@ var Ln = {
|
|
|
3747
3883
|
};
|
|
3748
3884
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
3749
3885
|
}, []), /* @__PURE__ */ a("span", {
|
|
3750
|
-
className: [
|
|
3886
|
+
className: [Wn.wrapper, s ?? ""].filter(Boolean).join(" "),
|
|
3751
3887
|
"data-dismissed": c || void 0,
|
|
3752
3888
|
onMouseLeave: () => l(!1),
|
|
3753
3889
|
onBlur: () => l(!1),
|
|
3754
3890
|
children: [o, /* @__PURE__ */ a("span", {
|
|
3755
3891
|
role: "tooltip",
|
|
3756
|
-
className: [
|
|
3892
|
+
className: [Wn.bubble, Wn[`bubble--${r}`]].join(" "),
|
|
3757
3893
|
children: [
|
|
3758
3894
|
/* @__PURE__ */ i("span", {
|
|
3759
|
-
className:
|
|
3895
|
+
className: Wn.bubble__title,
|
|
3760
3896
|
children: t
|
|
3761
3897
|
}),
|
|
3762
3898
|
n && /* @__PURE__ */ i("span", {
|
|
3763
|
-
className:
|
|
3899
|
+
className: Wn.bubble__subtitle,
|
|
3764
3900
|
children: n
|
|
3765
3901
|
}),
|
|
3766
3902
|
/* @__PURE__ */ i("span", {
|
|
3767
|
-
className: [
|
|
3903
|
+
className: [Wn.caret, Wn[`caret--${r}`]].join(" "),
|
|
3768
3904
|
"aria-hidden": "true"
|
|
3769
3905
|
})
|
|
3770
3906
|
]
|
|
3771
3907
|
})]
|
|
3772
3908
|
});
|
|
3773
3909
|
}, $ = {
|
|
3774
|
-
bar: "
|
|
3775
|
-
"bar--md": "_bar--
|
|
3776
|
-
"bar--sm": "_bar--
|
|
3777
|
-
bar__leftGroup: "
|
|
3778
|
-
bar__left: "
|
|
3779
|
-
bar__spacer: "
|
|
3780
|
-
bar__right: "
|
|
3781
|
-
bar__icon: "
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3910
|
+
bar: "_bar_yqi1k_2",
|
|
3911
|
+
"bar--md": "_bar--md_yqi1k_11",
|
|
3912
|
+
"bar--sm": "_bar--sm_yqi1k_12",
|
|
3913
|
+
bar__leftGroup: "_bar__leftGroup_yqi1k_20",
|
|
3914
|
+
bar__left: "_bar__left_yqi1k_20",
|
|
3915
|
+
bar__spacer: "_bar__spacer_yqi1k_27",
|
|
3916
|
+
bar__right: "_bar__right_yqi1k_30",
|
|
3917
|
+
bar__icon: "_bar__icon_yqi1k_36",
|
|
3918
|
+
bar__iconGroup: "_bar__iconGroup_yqi1k_44",
|
|
3919
|
+
bar__bell: "_bar__bell_yqi1k_48",
|
|
3920
|
+
bar__dot: "_bar__dot_yqi1k_49",
|
|
3921
|
+
bar__divider: "_bar__divider_yqi1k_54",
|
|
3922
|
+
bar__account: "_bar__account_yqi1k_55",
|
|
3923
|
+
"bar--chat": "_bar--chat_yqi1k_61",
|
|
3924
|
+
bar__chatAvatar: "_bar__chatAvatar_yqi1k_69",
|
|
3925
|
+
bar__chatMeta: "_bar__chatMeta_yqi1k_70",
|
|
3926
|
+
bar__chatTitle: "_bar__chatTitle_yqi1k_71",
|
|
3927
|
+
bar__chatSubtitle: "_bar__chatSubtitle_yqi1k_76",
|
|
3928
|
+
bar__chatActions: "_bar__chatActions_yqi1k_80",
|
|
3929
|
+
"bar__left--search": "_bar__left--search_yqi1k_84",
|
|
3930
|
+
bar__accountChevron: "_bar__accountChevron_yqi1k_98",
|
|
3931
|
+
"bar__accountChevron--open": "_bar__accountChevron--open_yqi1k_104"
|
|
3932
|
+
}, Kn = ({ type: e = "search", density: t = "md", left: n, showToggle: s = !0, onToggle: c, toggleIcon: l = w, showActions: u = !0, showHelp: f = !0, hasUnread: p = !1, rightSlot: m, account: g, accountOpen: _ = !1, avatar: v, title: y, subtitle: b, actions: x, className: S }) => {
|
|
3933
|
+
let C = Zt(), T = Zt(), E = t === "md" ? 20 : 18, D = A(E);
|
|
3797
3934
|
return /* @__PURE__ */ i("header", {
|
|
3798
3935
|
className: [
|
|
3799
3936
|
$.bar,
|
|
@@ -3817,9 +3954,11 @@ var Ln = {
|
|
|
3817
3954
|
})]
|
|
3818
3955
|
}),
|
|
3819
3956
|
/* @__PURE__ */ i("div", { className: $.bar__spacer }),
|
|
3820
|
-
x && /* @__PURE__ */
|
|
3957
|
+
x && /* @__PURE__ */ a("div", {
|
|
3958
|
+
ref: T.ref,
|
|
3959
|
+
...T.groupProps,
|
|
3821
3960
|
className: $.bar__chatActions,
|
|
3822
|
-
children: x
|
|
3961
|
+
children: [T.highlight, x]
|
|
3823
3962
|
})
|
|
3824
3963
|
] }) : /* @__PURE__ */ a(r, { children: [
|
|
3825
3964
|
/* @__PURE__ */ a("div", {
|
|
@@ -3830,8 +3969,8 @@ var Ln = {
|
|
|
3830
3969
|
onClick: c,
|
|
3831
3970
|
"aria-label": "Toggle sidebar",
|
|
3832
3971
|
children: /* @__PURE__ */ i(l, {
|
|
3833
|
-
size:
|
|
3834
|
-
strokeWidth:
|
|
3972
|
+
size: E,
|
|
3973
|
+
strokeWidth: D
|
|
3835
3974
|
})
|
|
3836
3975
|
}), /* @__PURE__ */ i("div", {
|
|
3837
3976
|
className: [$.bar__left, e === "search" ? $["bar__left--search"] : ""].filter(Boolean).join(" "),
|
|
@@ -3844,38 +3983,45 @@ var Ln = {
|
|
|
3844
3983
|
className: $.bar__right,
|
|
3845
3984
|
children: [
|
|
3846
3985
|
m,
|
|
3847
|
-
u && /* @__PURE__ */ a(r, { children: [
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3986
|
+
u && /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("span", {
|
|
3987
|
+
ref: C.ref,
|
|
3988
|
+
...C.groupProps,
|
|
3989
|
+
className: $.bar__iconGroup,
|
|
3990
|
+
children: [
|
|
3991
|
+
C.highlight,
|
|
3992
|
+
f && /* @__PURE__ */ i("button", {
|
|
3993
|
+
type: "button",
|
|
3994
|
+
"data-hover-item": "",
|
|
3995
|
+
className: $.bar__icon,
|
|
3996
|
+
"aria-label": "Help",
|
|
3997
|
+
children: /* @__PURE__ */ i(h, {
|
|
3998
|
+
size: E,
|
|
3999
|
+
strokeWidth: D
|
|
4000
|
+
})
|
|
4001
|
+
}),
|
|
4002
|
+
/* @__PURE__ */ i("button", {
|
|
4003
|
+
type: "button",
|
|
4004
|
+
"data-hover-item": "",
|
|
4005
|
+
className: $.bar__icon,
|
|
4006
|
+
"aria-label": "Notifications",
|
|
4007
|
+
children: /* @__PURE__ */ a("span", {
|
|
4008
|
+
className: $.bar__bell,
|
|
4009
|
+
children: [/* @__PURE__ */ i(o, {
|
|
4010
|
+
size: E,
|
|
4011
|
+
strokeWidth: D
|
|
4012
|
+
}), p && /* @__PURE__ */ i("span", {
|
|
4013
|
+
className: $.bar__dot,
|
|
4014
|
+
"aria-hidden": "true"
|
|
4015
|
+
})]
|
|
4016
|
+
})
|
|
3870
4017
|
})
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
] }),
|
|
4018
|
+
]
|
|
4019
|
+
}), /* @__PURE__ */ i("span", { className: $.bar__divider })] }),
|
|
3874
4020
|
g && /* @__PURE__ */ a("div", {
|
|
3875
4021
|
className: $.bar__account,
|
|
3876
4022
|
children: [g, /* @__PURE__ */ i(d, {
|
|
3877
4023
|
size: 16,
|
|
3878
|
-
strokeWidth:
|
|
4024
|
+
strokeWidth: A(16),
|
|
3879
4025
|
className: [$.bar__accountChevron, _ ? $["bar__accountChevron--open"] : ""].filter(Boolean).join(" ")
|
|
3880
4026
|
})]
|
|
3881
4027
|
})
|
|
@@ -3885,4 +4031,4 @@ var Ln = {
|
|
|
3885
4031
|
});
|
|
3886
4032
|
};
|
|
3887
4033
|
//#endregion
|
|
3888
|
-
export {
|
|
4034
|
+
export { Ke as $, Vt as A, St as B, nn as C, Kt as D, Zt as E, At as F, ft as G, yt as H, kt as I, rt as J, ot as K, Ot as L, Lt as M, Ft as N, Gt as O, Nt as P, Je as Q, Dt as R, an as S, Qt as T, _t as U, xt as V, mt as W, $e as X, tt as Y, Ze as Z, gn as _, Ln as a, N as at, cn as b, jn as c, Ce as ct, Dn as d, he as dt, Ge as et, Tn as f, me as ft, _n as g, bn as h, Vn as i, ke as it, zt as j, Ht as k, An as l, be as lt, Sn as m, Gn as n, Be as nt, Fn as o, Oe as ot, Cn as p, A as pt, at as q, Un as r, Re as rt, Nn as s, Te as st, Kn as t, We as tt, kn as u, ye as ut, pn as v, en as w, sn as x, dn as y, wt as z };
|