fic-designsystem-components 1.0.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1754 -271
- package/dist/style.css +3 -0
- package/package.json +16 -4
- package/dist/fic-designsystem-components.css +0 -3
package/dist/index.mjs
CHANGED
|
@@ -1,97 +1,102 @@
|
|
|
1
|
-
import e, {
|
|
2
|
-
import { Fragment as
|
|
3
|
-
//#region src/components/
|
|
4
|
-
var
|
|
5
|
-
let m = (e) => typeof e == "string" && !e.includes("+") ? /* @__PURE__ */
|
|
1
|
+
import e, { forwardRef as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
2
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Button/Button.tsx
|
|
4
|
+
var l = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, u = e.forwardRef(({ className: e = "", variant: t = "primary", size: n = "md", isLoading: r = !1, leftIcon: i, rightIcon: a, children: o, disabled: u, style: d, ...f }, p) => {
|
|
5
|
+
let m = (e) => typeof e == "string" && !e.includes("+") ? /* @__PURE__ */ s("i", {
|
|
6
6
|
className: `fa-solid fa-${e}`,
|
|
7
7
|
"aria-hidden": "true"
|
|
8
8
|
}) : e;
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ c("button", {
|
|
10
10
|
ref: p,
|
|
11
11
|
className: [
|
|
12
|
-
"
|
|
13
|
-
`
|
|
14
|
-
`
|
|
15
|
-
r ? "
|
|
12
|
+
"button",
|
|
13
|
+
`button--${t}`,
|
|
14
|
+
`button--${n}`,
|
|
15
|
+
r ? "button--loading" : "",
|
|
16
16
|
e
|
|
17
17
|
].filter(Boolean).join(" "),
|
|
18
18
|
disabled: u || r,
|
|
19
19
|
style: {
|
|
20
|
-
...
|
|
20
|
+
...l,
|
|
21
21
|
...d
|
|
22
22
|
},
|
|
23
23
|
...f,
|
|
24
24
|
children: [
|
|
25
|
-
r && /* @__PURE__ */
|
|
26
|
-
className: "
|
|
25
|
+
r && /* @__PURE__ */ s("span", {
|
|
26
|
+
className: "button__spinner",
|
|
27
27
|
"aria-hidden": "true"
|
|
28
28
|
}),
|
|
29
|
-
i && !r && /* @__PURE__ */
|
|
30
|
-
className: "
|
|
29
|
+
i && !r && /* @__PURE__ */ s("span", {
|
|
30
|
+
className: "button__icon button__icon--left",
|
|
31
31
|
"aria-hidden": "true",
|
|
32
32
|
children: m(i)
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
className: "
|
|
36
|
-
children:
|
|
34
|
+
/* @__PURE__ */ s("span", {
|
|
35
|
+
className: "button__label",
|
|
36
|
+
children: o
|
|
37
37
|
}),
|
|
38
|
-
a && !r && /* @__PURE__ */
|
|
39
|
-
className: "
|
|
38
|
+
a && !r && /* @__PURE__ */ s("span", {
|
|
39
|
+
className: "button__icon button__icon--right",
|
|
40
40
|
"aria-hidden": "true",
|
|
41
41
|
children: m(a)
|
|
42
42
|
})
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
|
-
|
|
46
|
+
u.displayName = "Button";
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region src/components/Checkbox.tsx
|
|
49
|
-
var
|
|
50
|
-
let
|
|
48
|
+
//#region src/components/Checkbox/Checkbox.tsx
|
|
49
|
+
var d = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, f = e.forwardRef(({ label: t = "Label", subtext: n, variant: r = "square", state: i = "default", checked: a = !1, indeterminate: o = !1, className: l = "", onChange: u, disabled: f, readOnly: p, ...m }, h) => {
|
|
50
|
+
let g = e.useRef(null), _ = h || g;
|
|
51
|
+
e.useEffect(() => {
|
|
52
|
+
_.current && (_.current.indeterminate = o);
|
|
53
|
+
}, [o, _]);
|
|
54
|
+
let v = i === "disabled" || f, y = i === "readonly" || p, b = [
|
|
51
55
|
"checkbox-container",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
].filter(Boolean).join(" "),
|
|
56
|
+
i === "focus" ? "checkbox-container--focus" : "",
|
|
57
|
+
i === "hover" ? "checkbox-container--hover" : "",
|
|
58
|
+
l
|
|
59
|
+
].filter(Boolean).join(" "), x = [
|
|
56
60
|
"checkbox-box",
|
|
57
|
-
`checkbox-box--${
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
`checkbox-box--${r}`,
|
|
62
|
+
a ? "checkbox-box--checked" : "",
|
|
63
|
+
o ? "checkbox-box--indeterminate" : "",
|
|
64
|
+
v ? "checkbox-box--disabled" : "",
|
|
65
|
+
y ? "checkbox-box--readonly" : ""
|
|
66
|
+
].filter(Boolean).join(" "), S = [
|
|
62
67
|
"checkbox-label",
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
v ? "checkbox-label--disabled" : "",
|
|
69
|
+
y ? "checkbox-label--readonly" : ""
|
|
65
70
|
].filter(Boolean).join(" ");
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
className:
|
|
68
|
-
style:
|
|
69
|
-
children: [/* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ c("label", {
|
|
72
|
+
className: b,
|
|
73
|
+
style: d,
|
|
74
|
+
children: [/* @__PURE__ */ c("div", {
|
|
70
75
|
className: "checkbox-row",
|
|
71
76
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
ref:
|
|
77
|
+
/* @__PURE__ */ s("input", {
|
|
78
|
+
ref: _,
|
|
74
79
|
type: "checkbox",
|
|
75
|
-
checked:
|
|
80
|
+
checked: a,
|
|
76
81
|
onChange: (e) => {
|
|
77
|
-
|
|
82
|
+
v || y || u && u(e);
|
|
78
83
|
},
|
|
79
|
-
disabled:
|
|
80
|
-
readOnly:
|
|
84
|
+
disabled: v,
|
|
85
|
+
readOnly: y,
|
|
81
86
|
style: { display: "none" },
|
|
82
|
-
...
|
|
87
|
+
...m
|
|
83
88
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
className:
|
|
86
|
-
children:
|
|
89
|
+
/* @__PURE__ */ c("div", {
|
|
90
|
+
className: x,
|
|
91
|
+
children: [a && !o && /* @__PURE__ */ s("div", {
|
|
87
92
|
className: "checkbox-icon",
|
|
88
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ s("svg", {
|
|
89
94
|
width: "12",
|
|
90
95
|
height: "9",
|
|
91
96
|
viewBox: "0 0 12 9",
|
|
92
97
|
fill: "none",
|
|
93
98
|
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ s("path", {
|
|
95
100
|
d: "M1 4.5L4.5 8L11 1",
|
|
96
101
|
stroke: "currentColor",
|
|
97
102
|
strokeWidth: "1.5",
|
|
@@ -99,24 +104,40 @@ var u = { fontFamily: "'DM Sans', sans-serif" }, d = e.forwardRef(({ label: e =
|
|
|
99
104
|
strokeLinejoin: "round"
|
|
100
105
|
})
|
|
101
106
|
})
|
|
102
|
-
})
|
|
107
|
+
}), o && /* @__PURE__ */ s("div", {
|
|
108
|
+
className: "checkbox-icon",
|
|
109
|
+
children: /* @__PURE__ */ s("svg", {
|
|
110
|
+
width: "12",
|
|
111
|
+
height: "2",
|
|
112
|
+
viewBox: "0 0 12 2",
|
|
113
|
+
fill: "none",
|
|
114
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
115
|
+
children: /* @__PURE__ */ s("path", {
|
|
116
|
+
d: "M1 1H11",
|
|
117
|
+
stroke: "currentColor",
|
|
118
|
+
strokeWidth: "1.5",
|
|
119
|
+
strokeLinecap: "round",
|
|
120
|
+
strokeLinejoin: "round"
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
103
124
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
className:
|
|
106
|
-
children:
|
|
125
|
+
/* @__PURE__ */ s("span", {
|
|
126
|
+
className: S,
|
|
127
|
+
children: t
|
|
107
128
|
})
|
|
108
129
|
]
|
|
109
|
-
}),
|
|
130
|
+
}), n && /* @__PURE__ */ s("div", {
|
|
110
131
|
className: "checkbox-subtext",
|
|
111
|
-
children:
|
|
132
|
+
children: n
|
|
112
133
|
})]
|
|
113
134
|
});
|
|
114
135
|
});
|
|
115
|
-
|
|
136
|
+
f.displayName = "Checkbox";
|
|
116
137
|
//#endregion
|
|
117
|
-
//#region src/components/DatePicker.tsx
|
|
118
|
-
var
|
|
119
|
-
Calendar: (e) => /* @__PURE__ */
|
|
138
|
+
//#region src/components/DatePicker/DatePicker.tsx
|
|
139
|
+
var p = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, m = {
|
|
140
|
+
Calendar: (e) => /* @__PURE__ */ c("svg", {
|
|
120
141
|
width: "16",
|
|
121
142
|
height: "16",
|
|
122
143
|
viewBox: "0 0 16 16",
|
|
@@ -124,7 +145,7 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
124
145
|
xmlns: "http://www.w3.org/2000/svg",
|
|
125
146
|
...e,
|
|
126
147
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ s("rect", {
|
|
128
149
|
x: "2",
|
|
129
150
|
y: "3",
|
|
130
151
|
width: "12",
|
|
@@ -133,18 +154,18 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
133
154
|
stroke: "currentColor",
|
|
134
155
|
strokeWidth: "1.5"
|
|
135
156
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ s("path", {
|
|
137
158
|
d: "M2 7H14",
|
|
138
159
|
stroke: "currentColor",
|
|
139
160
|
strokeWidth: "1.5"
|
|
140
161
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ s("path", {
|
|
142
163
|
d: "M5 2V4",
|
|
143
164
|
stroke: "currentColor",
|
|
144
165
|
strokeWidth: "1.5",
|
|
145
166
|
strokeLinecap: "round"
|
|
146
167
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ s("path", {
|
|
148
169
|
d: "M11 2V4",
|
|
149
170
|
stroke: "currentColor",
|
|
150
171
|
strokeWidth: "1.5",
|
|
@@ -152,14 +173,14 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
152
173
|
})
|
|
153
174
|
]
|
|
154
175
|
}),
|
|
155
|
-
ChevronDown: (e) => /* @__PURE__ */
|
|
176
|
+
ChevronDown: (e) => /* @__PURE__ */ s("svg", {
|
|
156
177
|
width: "10",
|
|
157
178
|
height: "6",
|
|
158
179
|
viewBox: "0 0 10 6",
|
|
159
180
|
fill: "none",
|
|
160
181
|
xmlns: "http://www.w3.org/2000/svg",
|
|
161
182
|
...e,
|
|
162
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ s("path", {
|
|
163
184
|
d: "M1 1L5 5L9 1",
|
|
164
185
|
stroke: "currentColor",
|
|
165
186
|
strokeWidth: "1.5",
|
|
@@ -167,21 +188,21 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
167
188
|
strokeLinejoin: "round"
|
|
168
189
|
})
|
|
169
190
|
}),
|
|
170
|
-
Star: (e) => /* @__PURE__ */
|
|
191
|
+
Star: (e) => /* @__PURE__ */ s("svg", {
|
|
171
192
|
width: "8",
|
|
172
193
|
height: "8",
|
|
173
194
|
viewBox: "0 0 8 8",
|
|
174
195
|
fill: "none",
|
|
175
196
|
xmlns: "http://www.w3.org/2000/svg",
|
|
176
197
|
...e,
|
|
177
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ s("path", {
|
|
178
199
|
d: "M4 0L4.8541 3.1459H8L5.44272 5L6.29682 8.1459L4 6.25L1.70318 8.1459L2.55728 5L0 3.1459H3.1459L4 0Z",
|
|
179
200
|
fill: "var(--colors-primitive-color-tokens-red-500, #E73D36)"
|
|
180
201
|
})
|
|
181
202
|
})
|
|
182
|
-
},
|
|
183
|
-
let [b, x] =
|
|
184
|
-
|
|
203
|
+
}, h = e.forwardRef(({ label: t = "Label", required: l = !1, placeholder: u = "Select Date", value: d = "", onChange: f, className: h = "", mode: g = "single", state: _ = "default", ...v }, y) => {
|
|
204
|
+
let [b, x] = a(!1), [S, C] = a(typeof d == "string" ? d : ""), [w, T] = a(typeof d == "string" ? d : ""), [E, D] = a(Array.isArray(d) ? d : ["", ""]), [O, k] = a(Array.isArray(d) ? d : ["", ""]);
|
|
205
|
+
n(() => {
|
|
185
206
|
if (typeof d == "string") {
|
|
186
207
|
if (C(d), T(d), d) {
|
|
187
208
|
let e = new Date(d);
|
|
@@ -192,7 +213,7 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
192
213
|
isNaN(e.getTime()) || (j(e.getMonth()), N(e.getFullYear()));
|
|
193
214
|
}
|
|
194
215
|
}, [d]);
|
|
195
|
-
let [A, j] =
|
|
216
|
+
let [A, j] = a((/* @__PURE__ */ new Date()).getMonth()), [M, N] = a((/* @__PURE__ */ new Date()).getFullYear()), [P, F] = a(!1), [I, L] = a(!1), [R, z] = a(null), B = i(null);
|
|
196
217
|
e.useImperativeHandle(y, () => B.current);
|
|
197
218
|
let V = g === "range", H = _ === "disabled", U = _ === "readonly", W = [
|
|
198
219
|
"Mon",
|
|
@@ -251,34 +272,34 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
251
272
|
getValue: () => ["", ""]
|
|
252
273
|
}
|
|
253
274
|
];
|
|
254
|
-
|
|
275
|
+
n(() => {
|
|
255
276
|
let e = (e) => {
|
|
256
277
|
B.current && !B.current.contains(e.target) && x(!1);
|
|
257
278
|
};
|
|
258
279
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
259
280
|
}, []);
|
|
260
|
-
let
|
|
281
|
+
let ee = () => {
|
|
261
282
|
H || U || (b || (T(S), k(E), F(!1), L(!1)), x(!b));
|
|
262
|
-
},
|
|
283
|
+
}, q = (e, t) => {
|
|
263
284
|
if (!t) if (V) if (!O[0] || O[0] && O[1]) k([e, ""]), z(null);
|
|
264
285
|
else {
|
|
265
286
|
let t = new Date(O[0]);
|
|
266
287
|
k(new Date(e) < t ? [e, O[0]] : [O[0], e]), z(null);
|
|
267
288
|
}
|
|
268
289
|
else T(e);
|
|
269
|
-
},
|
|
290
|
+
}, J = (e) => {
|
|
270
291
|
let t = e.getValue();
|
|
271
292
|
if (k(t), z(null), t[0]) {
|
|
272
293
|
let e = new Date(t[0]);
|
|
273
294
|
j(e.getMonth()), N(e.getFullYear());
|
|
274
295
|
}
|
|
296
|
+
}, Y = (e) => {
|
|
297
|
+
e.stopPropagation(), V ? (D(O), f && f(O)) : (C(w), f && f(w)), x(!1);
|
|
275
298
|
}, X = (e) => {
|
|
276
|
-
e.stopPropagation(), V ? (D(O), m && m(O)) : (C(w), m && m(w)), x(!1);
|
|
277
|
-
}, Z = (e) => {
|
|
278
299
|
e.stopPropagation(), V ? k(E) : T(S), x(!1);
|
|
279
|
-
},
|
|
280
|
-
let r = new Date(t, e, 1).getDay(), i = new Date(t, e + 1, 0).getDate(), a = new Date(t, e, 0).getDate(),
|
|
281
|
-
for (let n =
|
|
300
|
+
}, Z = (e, t, n = !1) => {
|
|
301
|
+
let r = new Date(t, e, 1).getDay(), i = new Date(t, e + 1, 0).getDate(), a = new Date(t, e, 0).getDate(), o = r === 0 ? 6 : r - 1, l = [];
|
|
302
|
+
for (let n = o - 1; n >= 0; n--) {
|
|
282
303
|
let r = a - n, i = e === 0 ? 11 : e - 1, o = e === 0 ? t - 1 : t;
|
|
283
304
|
l.push({
|
|
284
305
|
day: r,
|
|
@@ -305,14 +326,14 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
305
326
|
}
|
|
306
327
|
let d = [], f = (/* @__PURE__ */ new Date()).getFullYear();
|
|
307
328
|
for (let e = f - 10; e <= f + 10; e++) d.push(e);
|
|
308
|
-
return /* @__PURE__ */
|
|
329
|
+
return /* @__PURE__ */ c("div", {
|
|
309
330
|
className: "datepicker__calendar",
|
|
310
331
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ s("div", {
|
|
312
333
|
className: "datepicker__header",
|
|
313
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ c("div", {
|
|
314
335
|
className: "datepicker__header-selectors",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ c("div", {
|
|
316
337
|
className: "datepicker__header-select",
|
|
317
338
|
onClick: (e) => {
|
|
318
339
|
e.stopPropagation(), n || (F(!P), L(!1));
|
|
@@ -320,11 +341,11 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
320
341
|
style: { position: "relative" },
|
|
321
342
|
children: [
|
|
322
343
|
G[e],
|
|
323
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ s("span", {
|
|
324
345
|
className: "datepicker__header-icon",
|
|
325
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ s(m.ChevronDown, {})
|
|
326
347
|
}),
|
|
327
|
-
!n && P && /* @__PURE__ */
|
|
348
|
+
!n && P && /* @__PURE__ */ s("div", {
|
|
328
349
|
className: "datepicker__select-dropdown",
|
|
329
350
|
style: {
|
|
330
351
|
position: "absolute",
|
|
@@ -339,7 +360,7 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
339
360
|
zIndex: 10,
|
|
340
361
|
boxShadow: "0 4px 12px rgba(0,0,0,0.1)"
|
|
341
362
|
},
|
|
342
|
-
children: G.map((t, n) => /* @__PURE__ */
|
|
363
|
+
children: G.map((t, n) => /* @__PURE__ */ s("div", {
|
|
343
364
|
className: "datepicker__select-option",
|
|
344
365
|
style: {
|
|
345
366
|
padding: "8px 12px",
|
|
@@ -354,7 +375,7 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
354
375
|
}, t))
|
|
355
376
|
})
|
|
356
377
|
]
|
|
357
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ c("div", {
|
|
358
379
|
className: "datepicker__header-select",
|
|
359
380
|
onClick: (e) => {
|
|
360
381
|
e.stopPropagation(), n || (L(!I), F(!1));
|
|
@@ -362,11 +383,11 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
362
383
|
style: { position: "relative" },
|
|
363
384
|
children: [
|
|
364
385
|
t,
|
|
365
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ s("span", {
|
|
366
387
|
className: "datepicker__header-icon",
|
|
367
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ s(m.ChevronDown, {})
|
|
368
389
|
}),
|
|
369
|
-
!n && I && /* @__PURE__ */
|
|
390
|
+
!n && I && /* @__PURE__ */ s("div", {
|
|
370
391
|
className: "datepicker__select-dropdown",
|
|
371
392
|
style: {
|
|
372
393
|
position: "absolute",
|
|
@@ -381,7 +402,7 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
381
402
|
zIndex: 10,
|
|
382
403
|
boxShadow: "0 4px 12px rgba(0,0,0,0.1)"
|
|
383
404
|
},
|
|
384
|
-
children: d.map((e) => /* @__PURE__ */
|
|
405
|
+
children: d.map((e) => /* @__PURE__ */ s("div", {
|
|
385
406
|
className: "datepicker__select-option",
|
|
386
407
|
style: {
|
|
387
408
|
padding: "8px 12px",
|
|
@@ -399,15 +420,15 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
399
420
|
})]
|
|
400
421
|
})
|
|
401
422
|
}),
|
|
402
|
-
!V && /* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
423
|
+
!V && /* @__PURE__ */ s("div", { className: "datepicker__divider" }),
|
|
424
|
+
/* @__PURE__ */ s("div", {
|
|
404
425
|
className: "datepicker__weekdays",
|
|
405
|
-
children: W.map((e) => /* @__PURE__ */
|
|
426
|
+
children: W.map((e) => /* @__PURE__ */ s("div", {
|
|
406
427
|
className: "datepicker__weekday",
|
|
407
428
|
children: e
|
|
408
429
|
}, e))
|
|
409
430
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ s("div", {
|
|
411
432
|
className: "datepicker__days",
|
|
412
433
|
onMouseLeave: () => z(null),
|
|
413
434
|
children: l.map((e, t) => {
|
|
@@ -416,15 +437,15 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
416
437
|
let e = new Date(O[0]), t = O[1] ? new Date(O[1]) : R ? new Date(R) : null, r = new Date(n);
|
|
417
438
|
t && (i = r > (e < t ? e : t) && r < (e < t ? t : e));
|
|
418
439
|
}
|
|
419
|
-
return /* @__PURE__ */
|
|
440
|
+
return /* @__PURE__ */ s("div", {
|
|
420
441
|
className: `datepicker__day ${e.currentMonth ? "" : "datepicker__day--disabled"} ${r ? "datepicker__day--selected" : ""} ${i ? "datepicker__day--in-range" : ""}`,
|
|
421
442
|
onClick: (t) => {
|
|
422
|
-
t.stopPropagation(),
|
|
443
|
+
t.stopPropagation(), q(n, !e.currentMonth);
|
|
423
444
|
},
|
|
424
445
|
onMouseEnter: () => {
|
|
425
446
|
V && O[0] && !O[1] && z(n);
|
|
426
447
|
},
|
|
427
|
-
children: /* @__PURE__ */
|
|
448
|
+
children: /* @__PURE__ */ s("div", {
|
|
428
449
|
className: "datepicker__day-text",
|
|
429
450
|
children: e.day
|
|
430
451
|
})
|
|
@@ -433,11 +454,11 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
433
454
|
})
|
|
434
455
|
]
|
|
435
456
|
});
|
|
436
|
-
},
|
|
457
|
+
}, Q = r(() => V ? E[0] && E[1] ? `${E[0]} - ${E[1]}` : E[0] ? `${E[0]} - ...` : "" : S, [
|
|
437
458
|
V,
|
|
438
459
|
E,
|
|
439
460
|
S
|
|
440
|
-
]),
|
|
461
|
+
]), $ = [
|
|
441
462
|
"datepicker",
|
|
442
463
|
V ? "datepicker--range" : "",
|
|
443
464
|
h
|
|
@@ -448,78 +469,78 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
448
469
|
H ? "datepicker__input-wrapper--disabled" : "",
|
|
449
470
|
U ? "datepicker__input-wrapper--readonly" : ""
|
|
450
471
|
].filter(Boolean).join(" ");
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
className:
|
|
472
|
+
return /* @__PURE__ */ c("div", {
|
|
473
|
+
className: $,
|
|
453
474
|
ref: B,
|
|
454
|
-
style:
|
|
475
|
+
style: p,
|
|
455
476
|
...v,
|
|
456
477
|
children: [
|
|
457
|
-
|
|
478
|
+
t && /* @__PURE__ */ c("div", {
|
|
458
479
|
className: "datepicker__label-row",
|
|
459
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ s("span", {
|
|
460
481
|
className: "datepicker__label",
|
|
461
|
-
children:
|
|
462
|
-
}), l && /* @__PURE__ */
|
|
482
|
+
children: t
|
|
483
|
+
}), l && /* @__PURE__ */ s("span", {
|
|
463
484
|
className: "datepicker__required-star",
|
|
464
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ s(m.Star, {})
|
|
465
486
|
})]
|
|
466
487
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ c("div", {
|
|
468
489
|
className: te,
|
|
469
|
-
onClick:
|
|
470
|
-
children: [
|
|
490
|
+
onClick: ee,
|
|
491
|
+
children: [Q ? /* @__PURE__ */ s("span", {
|
|
471
492
|
className: "datepicker__value",
|
|
472
|
-
children:
|
|
473
|
-
}) : /* @__PURE__ */
|
|
493
|
+
children: Q
|
|
494
|
+
}) : /* @__PURE__ */ s("span", {
|
|
474
495
|
className: "datepicker__placeholder",
|
|
475
496
|
children: u
|
|
476
|
-
}), /* @__PURE__ */
|
|
497
|
+
}), /* @__PURE__ */ s("span", {
|
|
477
498
|
className: "datepicker__icon-wrapper",
|
|
478
|
-
children: /* @__PURE__ */
|
|
499
|
+
children: /* @__PURE__ */ s(m.Calendar, {})
|
|
479
500
|
})]
|
|
480
501
|
}),
|
|
481
|
-
b && /* @__PURE__ */
|
|
502
|
+
b && /* @__PURE__ */ s("div", {
|
|
482
503
|
className: `datepicker__dropdown ${V ? "datepicker__dropdown--range" : ""}`,
|
|
483
504
|
onClick: (e) => e.stopPropagation(),
|
|
484
|
-
children: V ? /* @__PURE__ */
|
|
505
|
+
children: V ? /* @__PURE__ */ c("div", {
|
|
485
506
|
style: {
|
|
486
507
|
display: "flex",
|
|
487
508
|
flex: 1
|
|
488
509
|
},
|
|
489
510
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ s("div", {
|
|
491
512
|
className: "datepicker__presets",
|
|
492
|
-
children: K.map((e) => /* @__PURE__ */
|
|
513
|
+
children: K.map((e) => /* @__PURE__ */ s("div", {
|
|
493
514
|
className: `datepicker__preset ${JSON.stringify(O) === JSON.stringify(e.getValue()) ? "datepicker__preset--active" : ""}`,
|
|
494
|
-
onClick: () =>
|
|
515
|
+
onClick: () => J(e),
|
|
495
516
|
children: e.label
|
|
496
517
|
}, e.label))
|
|
497
518
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ s("div", { className: "datepicker__vertical-divider" }),
|
|
520
|
+
/* @__PURE__ */ c("div", {
|
|
500
521
|
style: {
|
|
501
522
|
display: "flex",
|
|
502
523
|
flexDirection: "column",
|
|
503
524
|
flex: 1
|
|
504
525
|
},
|
|
505
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ c("div", {
|
|
506
527
|
className: "datepicker__calendar-container",
|
|
507
528
|
children: [
|
|
508
|
-
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
|
|
529
|
+
Z(A, M, !1),
|
|
530
|
+
/* @__PURE__ */ s("div", { className: "datepicker__vertical-divider datepicker__vertical-divider--calendar" }),
|
|
531
|
+
Z(A === 11 ? 0 : A + 1, A === 11 ? M + 1 : M, !0)
|
|
511
532
|
]
|
|
512
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ c("div", {
|
|
513
534
|
className: "datepicker__footer",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ s("div", { className: "datepicker__divider" }), /* @__PURE__ */ c("div", {
|
|
515
536
|
className: "datepicker__actions",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
537
|
+
children: [/* @__PURE__ */ s("button", {
|
|
517
538
|
className: "datepicker__button datepicker__button--cancel",
|
|
518
|
-
onClick:
|
|
539
|
+
onClick: X,
|
|
519
540
|
children: "CANCEL"
|
|
520
|
-
}), /* @__PURE__ */
|
|
541
|
+
}), /* @__PURE__ */ s("button", {
|
|
521
542
|
className: "datepicker__button datepicker__button--apply",
|
|
522
|
-
onClick:
|
|
543
|
+
onClick: Y,
|
|
523
544
|
disabled: !O[0] || !O[1],
|
|
524
545
|
children: "APPLY"
|
|
525
546
|
})]
|
|
@@ -527,23 +548,23 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
527
548
|
})]
|
|
528
549
|
})
|
|
529
550
|
]
|
|
530
|
-
}) : /* @__PURE__ */
|
|
551
|
+
}) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("div", {
|
|
531
552
|
className: "datepicker__dropdown-main",
|
|
532
|
-
children: /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ s("div", {
|
|
533
554
|
className: "datepicker__calendar-container",
|
|
534
|
-
children:
|
|
555
|
+
children: Z(A, M, !1)
|
|
535
556
|
})
|
|
536
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ c("div", {
|
|
537
558
|
className: "datepicker__footer",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ s("hr", {}), /* @__PURE__ */ c("div", {
|
|
539
560
|
className: "datepicker__actions",
|
|
540
|
-
children: [/* @__PURE__ */
|
|
561
|
+
children: [/* @__PURE__ */ s("button", {
|
|
541
562
|
className: "datepicker__button datepicker__button--cancel",
|
|
542
|
-
onClick:
|
|
563
|
+
onClick: X,
|
|
543
564
|
children: "CANCEL"
|
|
544
|
-
}), /* @__PURE__ */
|
|
565
|
+
}), /* @__PURE__ */ s("button", {
|
|
545
566
|
className: "datepicker__button datepicker__button--apply",
|
|
546
|
-
onClick:
|
|
567
|
+
onClick: Y,
|
|
547
568
|
disabled: !w,
|
|
548
569
|
children: "APPLY"
|
|
549
570
|
})]
|
|
@@ -553,75 +574,285 @@ var f = { fontFamily: "'DM Sans', sans-serif" }, p = {
|
|
|
553
574
|
]
|
|
554
575
|
});
|
|
555
576
|
});
|
|
556
|
-
|
|
577
|
+
h.displayName = "DatePicker";
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region src/components/InputField/InputField.tsx
|
|
580
|
+
var g = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, _ = e.forwardRef(({ label: e = "InputFieldLabel", placeholder: t = "Enter your text here", helperText: n = "Helper Text", errorText: r, state: i = "default", size: a = "md", required: o = !1, maxLength: l, currentLength: u = 0, leftIcon: d, rightIcon: f, showCharacterCount: p = !1, className: m = "", disabled: h, readOnly: _, value: v, onChange: y, ...b }, x) => {
|
|
581
|
+
let S = i === "disabled" || h, C = i === "readonly" || _, w = i === "error" || !!r, T = [
|
|
582
|
+
"inputfield-container",
|
|
583
|
+
`inputfield-container--${i}`,
|
|
584
|
+
`inputfield-container--${a}`,
|
|
585
|
+
m
|
|
586
|
+
].filter(Boolean).join(" "), E = [
|
|
587
|
+
"inputfield-wrapper",
|
|
588
|
+
`inputfield-wrapper--${i}`,
|
|
589
|
+
d ? "inputfield-wrapper--with-left-icon" : "",
|
|
590
|
+
f ? "inputfield-wrapper--with-right-icon" : ""
|
|
591
|
+
].filter(Boolean).join(" "), D = p && l !== void 0, O = D ? `${u}/${l}` : "", k = w ? r : n;
|
|
592
|
+
return /* @__PURE__ */ c("div", {
|
|
593
|
+
className: T,
|
|
594
|
+
children: [
|
|
595
|
+
e && /* @__PURE__ */ c("div", {
|
|
596
|
+
className: "inputfield-label-wrapper",
|
|
597
|
+
children: [
|
|
598
|
+
/* @__PURE__ */ s("label", {
|
|
599
|
+
className: "inputfield-label",
|
|
600
|
+
style: g,
|
|
601
|
+
children: e
|
|
602
|
+
}),
|
|
603
|
+
o && /* @__PURE__ */ s("span", {
|
|
604
|
+
className: "inputfield-required",
|
|
605
|
+
style: g,
|
|
606
|
+
children: "*"
|
|
607
|
+
}),
|
|
608
|
+
D && /* @__PURE__ */ s("span", {
|
|
609
|
+
className: "inputfield-character-count",
|
|
610
|
+
style: g,
|
|
611
|
+
children: O
|
|
612
|
+
})
|
|
613
|
+
]
|
|
614
|
+
}),
|
|
615
|
+
/* @__PURE__ */ c("div", {
|
|
616
|
+
className: E,
|
|
617
|
+
children: [
|
|
618
|
+
d && /* @__PURE__ */ s("div", {
|
|
619
|
+
className: "inputfield-left-icon",
|
|
620
|
+
children: d
|
|
621
|
+
}),
|
|
622
|
+
/* @__PURE__ */ s("input", {
|
|
623
|
+
ref: x,
|
|
624
|
+
type: "text",
|
|
625
|
+
className: "inputfield-input",
|
|
626
|
+
placeholder: t,
|
|
627
|
+
disabled: S,
|
|
628
|
+
readOnly: C,
|
|
629
|
+
value: v,
|
|
630
|
+
onChange: y,
|
|
631
|
+
style: g,
|
|
632
|
+
...b
|
|
633
|
+
}),
|
|
634
|
+
f && /* @__PURE__ */ s("div", {
|
|
635
|
+
className: "inputfield-right-icon",
|
|
636
|
+
children: f
|
|
637
|
+
})
|
|
638
|
+
]
|
|
639
|
+
}),
|
|
640
|
+
k && /* @__PURE__ */ s("div", {
|
|
641
|
+
className: "inputfield-helper-text-wrapper",
|
|
642
|
+
children: /* @__PURE__ */ s("span", {
|
|
643
|
+
className: `inputfield-helper-text ${w ? "inputfield-helper-text--error" : ""}`,
|
|
644
|
+
style: g,
|
|
645
|
+
children: k
|
|
646
|
+
})
|
|
647
|
+
})
|
|
648
|
+
]
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
_.displayName = "InputField";
|
|
652
|
+
//#endregion
|
|
653
|
+
//#region src/components/InputFieldIcon/InputFieldIcon.tsx
|
|
654
|
+
var v = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, y = e.forwardRef(({ label: e = "Percentage Off", placeholder: t = "Select Percentage", helperText: n = "Helper Text", errorText: r, state: i = "default", size: a = "md", required: o = !1, maxLength: l, currentLength: u = 0, prefixIcon: d, showCharacterCount: f = !1, className: p = "", disabled: m, readOnly: h, value: g, onChange: _, ...y }, b) => {
|
|
655
|
+
let x = i === "disabled" || m, S = i === "readonly" || h, C = i === "error" || !!r, w = [
|
|
656
|
+
"inputfield-icon-container",
|
|
657
|
+
`inputfield-icon-container--${i}`,
|
|
658
|
+
`inputfield-icon-container--${a}`,
|
|
659
|
+
p
|
|
660
|
+
].filter(Boolean).join(" "), T = [
|
|
661
|
+
"inputfield-icon-wrapper",
|
|
662
|
+
`inputfield-icon-wrapper--${i}`,
|
|
663
|
+
d ? "inputfield-icon-wrapper--with-prefix-icon" : ""
|
|
664
|
+
].filter(Boolean).join(" "), E = f && l !== void 0, D = E ? `${u}/${l}` : "", O = C ? r : n;
|
|
665
|
+
return /* @__PURE__ */ c("div", {
|
|
666
|
+
className: w,
|
|
667
|
+
children: [
|
|
668
|
+
e && /* @__PURE__ */ c("div", {
|
|
669
|
+
className: "inputfield-icon-label-wrapper",
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ s("label", {
|
|
672
|
+
className: "inputfield-icon-label",
|
|
673
|
+
style: v,
|
|
674
|
+
children: e
|
|
675
|
+
}),
|
|
676
|
+
o && /* @__PURE__ */ s("span", {
|
|
677
|
+
className: "inputfield-icon-required",
|
|
678
|
+
style: v,
|
|
679
|
+
children: "*"
|
|
680
|
+
}),
|
|
681
|
+
E && /* @__PURE__ */ s("span", {
|
|
682
|
+
className: "inputfield-icon-character-count",
|
|
683
|
+
style: v,
|
|
684
|
+
children: D
|
|
685
|
+
})
|
|
686
|
+
]
|
|
687
|
+
}),
|
|
688
|
+
/* @__PURE__ */ c("div", {
|
|
689
|
+
className: T,
|
|
690
|
+
children: [d && /* @__PURE__ */ s("div", {
|
|
691
|
+
className: "inputfield-icon-prefix",
|
|
692
|
+
children: d
|
|
693
|
+
}), /* @__PURE__ */ s("input", {
|
|
694
|
+
ref: b,
|
|
695
|
+
type: "text",
|
|
696
|
+
className: "inputfield-icon-input",
|
|
697
|
+
placeholder: t,
|
|
698
|
+
disabled: x,
|
|
699
|
+
readOnly: S,
|
|
700
|
+
value: g,
|
|
701
|
+
onChange: _,
|
|
702
|
+
style: v,
|
|
703
|
+
...y
|
|
704
|
+
})]
|
|
705
|
+
}),
|
|
706
|
+
O && /* @__PURE__ */ s("div", {
|
|
707
|
+
className: "inputfield-icon-helper-text-wrapper",
|
|
708
|
+
children: /* @__PURE__ */ s("span", {
|
|
709
|
+
className: `inputfield-icon-helper-text ${C ? "inputfield-icon-helper-text--error" : ""}`,
|
|
710
|
+
style: v,
|
|
711
|
+
children: O
|
|
712
|
+
})
|
|
713
|
+
})
|
|
714
|
+
]
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
y.displayName = "InputFieldIcon";
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region src/components/InputFieldPhone/InputFieldPhone.tsx
|
|
720
|
+
var b = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, x = e.forwardRef(({ label: e = "Percentage Off", placeholder: t = "Select Percentage", helperText: n = "Helper Text", errorText: r, state: i = "default", size: a = "md", required: o = !1, maxLength: l, currentLength: u = 0, prefixValue: d = "+126", showCharacterCount: f = !1, className: p = "", disabled: m, readOnly: h, value: g, onChange: _, ...v }, y) => {
|
|
721
|
+
let x = i === "disabled" || m, S = i === "readonly" || h, C = i === "error" || !!r, w = [
|
|
722
|
+
"inputfield-phone-container",
|
|
723
|
+
`inputfield-phone-container--${i}`,
|
|
724
|
+
`inputfield-phone-container--${a}`,
|
|
725
|
+
p
|
|
726
|
+
].filter(Boolean).join(" "), T = [
|
|
727
|
+
"inputfield-phone-wrapper",
|
|
728
|
+
`inputfield-phone-wrapper--${i}`,
|
|
729
|
+
d ? "inputfield-phone-wrapper--with-prefix" : ""
|
|
730
|
+
].filter(Boolean).join(" "), E = f && l !== void 0, D = E ? `${u}/${l}` : "", O = C ? r : n;
|
|
731
|
+
return /* @__PURE__ */ c("div", {
|
|
732
|
+
className: w,
|
|
733
|
+
children: [
|
|
734
|
+
e && /* @__PURE__ */ c("div", {
|
|
735
|
+
className: "inputfield-phone-label-wrapper",
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ s("label", {
|
|
738
|
+
className: "inputfield-phone-label",
|
|
739
|
+
style: b,
|
|
740
|
+
children: e
|
|
741
|
+
}),
|
|
742
|
+
o && /* @__PURE__ */ s("span", {
|
|
743
|
+
className: "inputfield-phone-required",
|
|
744
|
+
style: b,
|
|
745
|
+
children: "*"
|
|
746
|
+
}),
|
|
747
|
+
E && /* @__PURE__ */ s("span", {
|
|
748
|
+
className: "inputfield-phone-character-count",
|
|
749
|
+
style: b,
|
|
750
|
+
children: D
|
|
751
|
+
})
|
|
752
|
+
]
|
|
753
|
+
}),
|
|
754
|
+
/* @__PURE__ */ c("div", {
|
|
755
|
+
className: T,
|
|
756
|
+
children: [d && /* @__PURE__ */ s("div", {
|
|
757
|
+
className: "inputfield-phone-prefix",
|
|
758
|
+
children: /* @__PURE__ */ s("span", {
|
|
759
|
+
className: "inputfield-phone-prefix-value",
|
|
760
|
+
style: b,
|
|
761
|
+
children: d
|
|
762
|
+
})
|
|
763
|
+
}), /* @__PURE__ */ s("input", {
|
|
764
|
+
ref: y,
|
|
765
|
+
type: "text",
|
|
766
|
+
className: "inputfield-phone-input",
|
|
767
|
+
placeholder: t,
|
|
768
|
+
disabled: x,
|
|
769
|
+
readOnly: S,
|
|
770
|
+
value: g,
|
|
771
|
+
onChange: _,
|
|
772
|
+
style: b,
|
|
773
|
+
...v
|
|
774
|
+
})]
|
|
775
|
+
}),
|
|
776
|
+
O && /* @__PURE__ */ s("div", {
|
|
777
|
+
className: "inputfield-phone-helper-text-wrapper",
|
|
778
|
+
children: /* @__PURE__ */ s("span", {
|
|
779
|
+
className: `inputfield-phone-helper-text ${C ? "inputfield-phone-helper-text--error" : ""}`,
|
|
780
|
+
style: b,
|
|
781
|
+
children: O
|
|
782
|
+
})
|
|
783
|
+
})
|
|
784
|
+
]
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
x.displayName = "InputFieldPhone";
|
|
557
788
|
//#endregion
|
|
558
|
-
//#region src/components/PillBadge.tsx
|
|
559
|
-
var
|
|
789
|
+
//#region src/components/PillBadge/PillBadge.tsx
|
|
790
|
+
var S = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, C = e.forwardRef(({ className: e = "", variant: t = "blue", size: n = "md", stacked: r = !1, subtext: i, children: a, style: o, ...l }, u) => {
|
|
560
791
|
let d = [
|
|
561
792
|
"pill-badge",
|
|
562
793
|
`pill-badge--${t}`,
|
|
563
794
|
r ? "pill-badge--stacked" : `pill-badge--${n === "lg" ? "md" : n}`,
|
|
564
795
|
e
|
|
565
796
|
].filter(Boolean).join(" "), f = n === "lg" ? "pill-badge__title--lg" : "pill-badge__title--md";
|
|
566
|
-
return /* @__PURE__ */
|
|
797
|
+
return /* @__PURE__ */ c("div", {
|
|
567
798
|
ref: u,
|
|
568
799
|
className: d,
|
|
569
800
|
style: {
|
|
570
|
-
...
|
|
571
|
-
...
|
|
801
|
+
...S,
|
|
802
|
+
...o
|
|
572
803
|
},
|
|
573
804
|
...l,
|
|
574
|
-
children: [/* @__PURE__ */
|
|
805
|
+
children: [/* @__PURE__ */ s("div", {
|
|
575
806
|
className: `pill-badge__title ${r ? f : ""}`,
|
|
576
807
|
children: a
|
|
577
|
-
}), r && i && /* @__PURE__ */
|
|
808
|
+
}), r && i && /* @__PURE__ */ s("div", {
|
|
578
809
|
className: "pill-badge__subtext",
|
|
579
810
|
children: i
|
|
580
811
|
})]
|
|
581
812
|
});
|
|
582
813
|
});
|
|
583
|
-
|
|
814
|
+
C.displayName = "PillBadge";
|
|
584
815
|
//#endregion
|
|
585
|
-
//#region src/components/ProgressBar.tsx
|
|
586
|
-
var
|
|
816
|
+
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
817
|
+
var w = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, T = e.forwardRef(({ label: e, percentage: t = 0, usedText: n, remainingText: r, variant: i = "default", size: a = "sm", withCard: o = !1, width: l, className: u = "", style: d, ...f }, p) => {
|
|
587
818
|
let m = Math.max(0, Math.min(100, t)), h = [
|
|
588
819
|
"progressbar",
|
|
589
|
-
|
|
820
|
+
o ? "progressbar--card" : "",
|
|
590
821
|
u
|
|
591
|
-
].filter(Boolean).join(" "), g = ["progressbar__track", `progressbar__track--${a}`].join(" "),
|
|
592
|
-
return /* @__PURE__ */
|
|
822
|
+
].filter(Boolean).join(" "), g = ["progressbar__track", `progressbar__track--${a}`].join(" "), _ = ["progressbar__fill", `progressbar__fill--${i}`].join(" ");
|
|
823
|
+
return /* @__PURE__ */ c("div", {
|
|
593
824
|
ref: p,
|
|
594
825
|
className: h,
|
|
595
826
|
style: {
|
|
596
|
-
...
|
|
827
|
+
...w,
|
|
597
828
|
width: l,
|
|
598
829
|
...d
|
|
599
830
|
},
|
|
600
831
|
...f,
|
|
601
832
|
children: [
|
|
602
|
-
(e || t !== void 0) && /* @__PURE__ */
|
|
833
|
+
(e || t !== void 0) && /* @__PURE__ */ c("div", {
|
|
603
834
|
className: "progressbar__header",
|
|
604
|
-
children: [e && /* @__PURE__ */
|
|
835
|
+
children: [e && /* @__PURE__ */ s("span", {
|
|
605
836
|
className: "progressbar__label",
|
|
606
837
|
children: e
|
|
607
|
-
}), t !== void 0 && /* @__PURE__ */
|
|
838
|
+
}), t !== void 0 && /* @__PURE__ */ c("span", {
|
|
608
839
|
className: "progressbar__percentage",
|
|
609
840
|
children: [m, "%"]
|
|
610
841
|
})]
|
|
611
842
|
}),
|
|
612
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ s("div", {
|
|
613
844
|
className: g,
|
|
614
|
-
children: /* @__PURE__ */
|
|
615
|
-
className:
|
|
845
|
+
children: /* @__PURE__ */ s("div", {
|
|
846
|
+
className: _,
|
|
616
847
|
style: { width: `${m}%` }
|
|
617
848
|
})
|
|
618
849
|
}),
|
|
619
|
-
(n || r) && /* @__PURE__ */
|
|
850
|
+
(n || r) && /* @__PURE__ */ c("div", {
|
|
620
851
|
className: "progressbar__footer",
|
|
621
|
-
children: [n && /* @__PURE__ */
|
|
852
|
+
children: [n && /* @__PURE__ */ s("span", {
|
|
622
853
|
className: "progressbar__used",
|
|
623
854
|
children: n
|
|
624
|
-
}), r && /* @__PURE__ */
|
|
855
|
+
}), r && /* @__PURE__ */ s("span", {
|
|
625
856
|
className: "progressbar__remaining",
|
|
626
857
|
children: r
|
|
627
858
|
})]
|
|
@@ -629,12 +860,12 @@ var _ = { fontFamily: "'DM Sans', sans-serif" }, v = e.forwardRef(({ label: e, p
|
|
|
629
860
|
]
|
|
630
861
|
});
|
|
631
862
|
});
|
|
632
|
-
|
|
863
|
+
T.displayName = "ProgressBar";
|
|
633
864
|
//#endregion
|
|
634
|
-
//#region src/components/RadioButton.tsx
|
|
635
|
-
var
|
|
636
|
-
let d =
|
|
637
|
-
return /* @__PURE__ */
|
|
865
|
+
//#region src/components/RadioButton/RadioButton.tsx
|
|
866
|
+
var E = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, D = e.forwardRef(({ label: e, subtext: t, checked: n, disabled: r, readOnly: i = !1, className: a = "", id: o, ...l }, u) => {
|
|
867
|
+
let d = o || `radio-${Math.random().toString(36).substring(2, 9)}`;
|
|
868
|
+
return /* @__PURE__ */ c("div", {
|
|
638
869
|
className: [
|
|
639
870
|
"radio-button",
|
|
640
871
|
n ? "radio-button--checked" : "",
|
|
@@ -642,10 +873,10 @@ var y = { fontFamily: "\"DM Sans\", sans-serif" }, b = e.forwardRef(({ label: e,
|
|
|
642
873
|
i ? "radio-button--readonly" : "",
|
|
643
874
|
a
|
|
644
875
|
].filter(Boolean).join(" "),
|
|
645
|
-
style:
|
|
646
|
-
children: [/* @__PURE__ */
|
|
876
|
+
style: E,
|
|
877
|
+
children: [/* @__PURE__ */ c("div", {
|
|
647
878
|
className: "radio-button__wrapper",
|
|
648
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ s("input", {
|
|
649
880
|
ref: u,
|
|
650
881
|
type: "radio",
|
|
651
882
|
id: d,
|
|
@@ -653,106 +884,39 @@ var y = { fontFamily: "\"DM Sans\", sans-serif" }, b = e.forwardRef(({ label: e,
|
|
|
653
884
|
checked: n,
|
|
654
885
|
disabled: r || i,
|
|
655
886
|
...l
|
|
656
|
-
}), /* @__PURE__ */
|
|
887
|
+
}), /* @__PURE__ */ s("label", {
|
|
657
888
|
htmlFor: d,
|
|
658
889
|
className: "radio-button__visual",
|
|
659
|
-
children: /* @__PURE__ */
|
|
890
|
+
children: /* @__PURE__ */ s("span", {
|
|
660
891
|
className: "radio-button__outer-circle",
|
|
661
|
-
children: n && /* @__PURE__ */
|
|
892
|
+
children: n && /* @__PURE__ */ s("span", { className: "radio-button__inner-circle" })
|
|
662
893
|
})
|
|
663
894
|
})]
|
|
664
|
-
}), (e || t) && /* @__PURE__ */
|
|
895
|
+
}), (e || t) && /* @__PURE__ */ c("div", {
|
|
665
896
|
className: "radio-button__content",
|
|
666
|
-
children: [e && /* @__PURE__ */
|
|
897
|
+
children: [e && /* @__PURE__ */ s("label", {
|
|
667
898
|
htmlFor: d,
|
|
668
899
|
className: "radio-button__label",
|
|
669
900
|
children: e
|
|
670
|
-
}), t && /* @__PURE__ */
|
|
901
|
+
}), t && /* @__PURE__ */ s("span", {
|
|
671
902
|
className: "radio-button__subtext",
|
|
672
903
|
children: t
|
|
673
904
|
})]
|
|
674
905
|
})]
|
|
675
906
|
});
|
|
676
907
|
});
|
|
677
|
-
|
|
908
|
+
D.displayName = "RadioButton";
|
|
678
909
|
//#endregion
|
|
679
|
-
//#region src/components/
|
|
680
|
-
var
|
|
681
|
-
let [f, p] = i(!e), [m, h] = i(""), g = r(null);
|
|
682
|
-
return t(() => {
|
|
683
|
-
p(!e);
|
|
684
|
-
}, [e]), t(() => {
|
|
685
|
-
if (!e) return;
|
|
686
|
-
let t = (e) => {
|
|
687
|
-
g.current && !g.current.contains(e.target) && m === "" && p(!1);
|
|
688
|
-
};
|
|
689
|
-
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
690
|
-
}, [e, m]), /* @__PURE__ */ o("div", {
|
|
691
|
-
className: [
|
|
692
|
-
"search-box",
|
|
693
|
-
e ? "search-box--collapsible" : "",
|
|
694
|
-
f ? "search-box--expanded" : "search-box--collapsed",
|
|
695
|
-
a ? "search-box--disabled" : "",
|
|
696
|
-
n
|
|
697
|
-
].filter(Boolean).join(" "),
|
|
698
|
-
style: x,
|
|
699
|
-
ref: g,
|
|
700
|
-
children: /* @__PURE__ */ s("div", {
|
|
701
|
-
className: "search-box__wrapper",
|
|
702
|
-
onClick: () => {
|
|
703
|
-
e && !a && p(!f);
|
|
704
|
-
},
|
|
705
|
-
children: [/* @__PURE__ */ o("div", {
|
|
706
|
-
className: "search-box__icon-container",
|
|
707
|
-
children: /* @__PURE__ */ s("svg", {
|
|
708
|
-
className: "search-box__icon",
|
|
709
|
-
width: "16",
|
|
710
|
-
height: "16",
|
|
711
|
-
viewBox: "0 0 16 16",
|
|
712
|
-
fill: "none",
|
|
713
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
714
|
-
children: [/* @__PURE__ */ o("path", {
|
|
715
|
-
d: "M11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5Z",
|
|
716
|
-
stroke: "currentColor",
|
|
717
|
-
strokeWidth: "1.5"
|
|
718
|
-
}), /* @__PURE__ */ o("path", {
|
|
719
|
-
d: "M10 10L14 14",
|
|
720
|
-
stroke: "currentColor",
|
|
721
|
-
strokeWidth: "1.5",
|
|
722
|
-
strokeLinecap: "round"
|
|
723
|
-
})]
|
|
724
|
-
})
|
|
725
|
-
}), f && /* @__PURE__ */ o("input", {
|
|
726
|
-
ref: d,
|
|
727
|
-
type: "text",
|
|
728
|
-
className: "search-box__input",
|
|
729
|
-
placeholder: c,
|
|
730
|
-
value: m,
|
|
731
|
-
disabled: a,
|
|
732
|
-
onChange: (e) => {
|
|
733
|
-
h(e.target.value), u.onChange && u.onChange(e);
|
|
734
|
-
},
|
|
735
|
-
onKeyDown: (e) => {
|
|
736
|
-
e.key === "Enter" && l && l(m), u.onKeyDown && u.onKeyDown(e);
|
|
737
|
-
},
|
|
738
|
-
autoFocus: e && f,
|
|
739
|
-
...u
|
|
740
|
-
})]
|
|
741
|
-
})
|
|
742
|
-
});
|
|
743
|
-
});
|
|
744
|
-
S.displayName = "SearchBox";
|
|
745
|
-
//#endregion
|
|
746
|
-
//#region src/components/StateBadge.tsx
|
|
747
|
-
var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
910
|
+
//#region src/components/StateBadge/StateBadge.tsx
|
|
911
|
+
var O = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, k = (e) => {
|
|
748
912
|
switch (e) {
|
|
749
|
-
case "plus": return /* @__PURE__ */
|
|
913
|
+
case "plus": return /* @__PURE__ */ s("svg", {
|
|
750
914
|
width: "12",
|
|
751
915
|
height: "12",
|
|
752
916
|
viewBox: "0 0 14 14",
|
|
753
917
|
fill: "none",
|
|
754
918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
755
|
-
children: /* @__PURE__ */
|
|
919
|
+
children: /* @__PURE__ */ s("path", {
|
|
756
920
|
d: "M7 2.91666V11.0833M2.91666 7H11.0833",
|
|
757
921
|
stroke: "currentColor",
|
|
758
922
|
strokeWidth: "1.5",
|
|
@@ -760,13 +924,13 @@ var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
|
760
924
|
strokeLinejoin: "round"
|
|
761
925
|
})
|
|
762
926
|
});
|
|
763
|
-
case "check": return /* @__PURE__ */
|
|
927
|
+
case "check": return /* @__PURE__ */ s("svg", {
|
|
764
928
|
width: "12",
|
|
765
929
|
height: "12",
|
|
766
930
|
viewBox: "0 0 14 14",
|
|
767
931
|
fill: "none",
|
|
768
932
|
xmlns: "http://www.w3.org/2000/svg",
|
|
769
|
-
children: /* @__PURE__ */
|
|
933
|
+
children: /* @__PURE__ */ s("path", {
|
|
770
934
|
d: "M11.6667 3.5L5.25 9.91667L2.33333 7",
|
|
771
935
|
stroke: "currentColor",
|
|
772
936
|
strokeWidth: "1.5",
|
|
@@ -774,13 +938,13 @@ var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
|
774
938
|
strokeLinejoin: "round"
|
|
775
939
|
})
|
|
776
940
|
});
|
|
777
|
-
case "chevron-down": return /* @__PURE__ */
|
|
941
|
+
case "chevron-down": return /* @__PURE__ */ s("svg", {
|
|
778
942
|
width: "12",
|
|
779
943
|
height: "12",
|
|
780
944
|
viewBox: "0 0 14 14",
|
|
781
945
|
fill: "none",
|
|
782
946
|
xmlns: "http://www.w3.org/2000/svg",
|
|
783
|
-
children: /* @__PURE__ */
|
|
947
|
+
children: /* @__PURE__ */ s("path", {
|
|
784
948
|
d: "M3.5 5.25L7 8.75L10.5 5.25",
|
|
785
949
|
stroke: "currentColor",
|
|
786
950
|
strokeWidth: "1.5",
|
|
@@ -788,13 +952,13 @@ var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
|
788
952
|
strokeLinejoin: "round"
|
|
789
953
|
})
|
|
790
954
|
});
|
|
791
|
-
case "arrow-right": return /* @__PURE__ */
|
|
955
|
+
case "arrow-right": return /* @__PURE__ */ s("svg", {
|
|
792
956
|
width: "12",
|
|
793
957
|
height: "12",
|
|
794
958
|
viewBox: "0 0 14 14",
|
|
795
959
|
fill: "none",
|
|
796
960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
797
|
-
children: /* @__PURE__ */
|
|
961
|
+
children: /* @__PURE__ */ s("path", {
|
|
798
962
|
d: "M2.91666 7H11.0833M11.0833 7L7.58333 3.5M11.0833 7L7.58333 10.5",
|
|
799
963
|
stroke: "currentColor",
|
|
800
964
|
strokeWidth: "1.5",
|
|
@@ -804,7 +968,7 @@ var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
|
804
968
|
});
|
|
805
969
|
default: return null;
|
|
806
970
|
}
|
|
807
|
-
},
|
|
971
|
+
}, A = e.forwardRef(({ className: e = "", variant: t = "active", icon: n, children: r, style: i, ...a }, o) => {
|
|
808
972
|
let l = [
|
|
809
973
|
"state-badge",
|
|
810
974
|
`state-badge--${t}`,
|
|
@@ -812,31 +976,1350 @@ var C = { fontFamily: "'DM Sans', sans-serif" }, w = (e) => {
|
|
|
812
976
|
].filter(Boolean).join(" "), u = () => {
|
|
813
977
|
if (!n) return null;
|
|
814
978
|
if (typeof n == "string") {
|
|
815
|
-
let e =
|
|
816
|
-
return e ? /* @__PURE__ */
|
|
979
|
+
let e = k(n);
|
|
980
|
+
return e ? /* @__PURE__ */ s("span", {
|
|
817
981
|
className: "state-badge__icon",
|
|
818
982
|
children: e
|
|
819
983
|
}) : null;
|
|
820
984
|
}
|
|
821
|
-
return /* @__PURE__ */
|
|
985
|
+
return /* @__PURE__ */ s("span", {
|
|
822
986
|
className: "state-badge__icon",
|
|
823
987
|
children: n
|
|
824
988
|
});
|
|
825
989
|
};
|
|
826
|
-
return /* @__PURE__ */
|
|
827
|
-
ref:
|
|
990
|
+
return /* @__PURE__ */ c("div", {
|
|
991
|
+
ref: o,
|
|
828
992
|
className: l,
|
|
829
993
|
style: {
|
|
830
|
-
...
|
|
994
|
+
...O,
|
|
831
995
|
...i
|
|
832
996
|
},
|
|
833
997
|
...a,
|
|
834
|
-
children: [u(), /* @__PURE__ */
|
|
998
|
+
children: [u(), /* @__PURE__ */ s("div", {
|
|
835
999
|
className: "state-badge__label",
|
|
836
1000
|
children: r
|
|
837
1001
|
})]
|
|
838
1002
|
});
|
|
839
1003
|
});
|
|
840
|
-
|
|
1004
|
+
A.displayName = "StateBadge";
|
|
1005
|
+
//#endregion
|
|
1006
|
+
//#region src/components/Switch/Switch.tsx
|
|
1007
|
+
var j = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, M = e.forwardRef(({ id: e, checked: t, onChange: n, disabled: r, readOnly: i, ...a }, o) => /* @__PURE__ */ c("div", {
|
|
1008
|
+
className: "switch",
|
|
1009
|
+
children: [/* @__PURE__ */ s("input", {
|
|
1010
|
+
ref: o,
|
|
1011
|
+
type: "checkbox",
|
|
1012
|
+
id: e,
|
|
1013
|
+
className: "switch__input",
|
|
1014
|
+
checked: t,
|
|
1015
|
+
onChange: n,
|
|
1016
|
+
disabled: r || i,
|
|
1017
|
+
...a
|
|
1018
|
+
}), /* @__PURE__ */ s("label", {
|
|
1019
|
+
htmlFor: e,
|
|
1020
|
+
className: "switch__track",
|
|
1021
|
+
children: /* @__PURE__ */ s("span", { className: "switch__handle" })
|
|
1022
|
+
})]
|
|
1023
|
+
}));
|
|
1024
|
+
M.displayName = "Toggle";
|
|
1025
|
+
var N = e.forwardRef(({ size: t = "big", colorVariant: n = "teal", checked: r, defaultChecked: i, onChange: a, disabled: o, readOnly: c = !1, className: l = "", id: u, ...d }, f) => {
|
|
1026
|
+
let p = r !== void 0, [m, h] = e.useState(i || !1), g = p ? r : m, _ = (e) => {
|
|
1027
|
+
o || c || (p || h(e.target.checked), a && a(e));
|
|
1028
|
+
}, v = u || `switch-${Math.random().toString(36).substring(2, 9)}`;
|
|
1029
|
+
return /* @__PURE__ */ s("div", {
|
|
1030
|
+
className: [
|
|
1031
|
+
"switch-container",
|
|
1032
|
+
`switch-container--${t}`,
|
|
1033
|
+
`switch-container--${n}`,
|
|
1034
|
+
g ? "switch-container--checked" : "",
|
|
1035
|
+
o ? "switch-container--disabled" : "",
|
|
1036
|
+
c ? "switch-container--readonly" : "",
|
|
1037
|
+
l
|
|
1038
|
+
].filter(Boolean).join(" "),
|
|
1039
|
+
style: j,
|
|
1040
|
+
children: /* @__PURE__ */ s("div", {
|
|
1041
|
+
className: "switch__content-wrapper",
|
|
1042
|
+
children: /* @__PURE__ */ s(M, {
|
|
1043
|
+
ref: f,
|
|
1044
|
+
id: v,
|
|
1045
|
+
checked: g,
|
|
1046
|
+
onChange: _,
|
|
1047
|
+
disabled: o,
|
|
1048
|
+
readOnly: c,
|
|
1049
|
+
...d
|
|
1050
|
+
})
|
|
1051
|
+
})
|
|
1052
|
+
});
|
|
1053
|
+
});
|
|
1054
|
+
N.displayName = "Switch";
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region src/components/SwitchWithLabel/SwitchWithLabel.tsx
|
|
1057
|
+
var P = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, F = e.forwardRef(({ id: e, checked: t, onChange: n, disabled: r, readOnly: i, ...a }, o) => /* @__PURE__ */ c("div", {
|
|
1058
|
+
className: "switch",
|
|
1059
|
+
children: [/* @__PURE__ */ s("input", {
|
|
1060
|
+
ref: o,
|
|
1061
|
+
type: "checkbox",
|
|
1062
|
+
id: e,
|
|
1063
|
+
className: "switch__input",
|
|
1064
|
+
checked: t,
|
|
1065
|
+
onChange: n,
|
|
1066
|
+
disabled: r || i,
|
|
1067
|
+
...a
|
|
1068
|
+
}), /* @__PURE__ */ s("label", {
|
|
1069
|
+
htmlFor: e,
|
|
1070
|
+
className: "switch__track",
|
|
1071
|
+
children: /* @__PURE__ */ s("span", { className: "switch__handle" })
|
|
1072
|
+
})]
|
|
1073
|
+
}));
|
|
1074
|
+
F.displayName = "Toggle";
|
|
1075
|
+
var I = e.forwardRef(({ size: t = "big", colorVariant: n = "teal", label: r, activeLabel: i, inactiveLabel: a, offerText: o, checked: l, defaultChecked: u, onChange: d, disabled: f, readOnly: p = !1, className: m = "", id: h, ...g }, _) => {
|
|
1076
|
+
let v = l !== void 0, [y, b] = e.useState(u || !1), x = v ? l : y, S = (e) => {
|
|
1077
|
+
f || p || (v || b(e.target.checked), d && d(e));
|
|
1078
|
+
}, C = h || `switch-labeled-${Math.random().toString(36).substring(2, 9)}`;
|
|
1079
|
+
return /* @__PURE__ */ s("div", {
|
|
1080
|
+
className: [
|
|
1081
|
+
"switch-container",
|
|
1082
|
+
`switch-container--${t}`,
|
|
1083
|
+
`switch-container--${n}`,
|
|
1084
|
+
x ? "switch-container--checked" : "",
|
|
1085
|
+
f ? "switch-container--disabled" : "",
|
|
1086
|
+
p ? "switch-container--readonly" : "",
|
|
1087
|
+
m
|
|
1088
|
+
].filter(Boolean).join(" "),
|
|
1089
|
+
style: P,
|
|
1090
|
+
children: /* @__PURE__ */ c("div", {
|
|
1091
|
+
className: "switch__content-wrapper",
|
|
1092
|
+
children: [
|
|
1093
|
+
r && /* @__PURE__ */ s("label", {
|
|
1094
|
+
htmlFor: C,
|
|
1095
|
+
className: "switch__main-label",
|
|
1096
|
+
children: r
|
|
1097
|
+
}),
|
|
1098
|
+
a && /* @__PURE__ */ s("span", {
|
|
1099
|
+
className: `switch__value-label switch__value-label--inactive ${x ? "" : "switch__value-label--active-state"}`,
|
|
1100
|
+
children: a
|
|
1101
|
+
}),
|
|
1102
|
+
/* @__PURE__ */ s(F, {
|
|
1103
|
+
ref: _,
|
|
1104
|
+
id: C,
|
|
1105
|
+
checked: x,
|
|
1106
|
+
onChange: S,
|
|
1107
|
+
disabled: f,
|
|
1108
|
+
readOnly: p,
|
|
1109
|
+
...g
|
|
1110
|
+
}),
|
|
1111
|
+
i && /* @__PURE__ */ s("span", {
|
|
1112
|
+
className: `switch__value-label switch__value-label--active ${x ? "switch__value-label--active-state" : ""}`,
|
|
1113
|
+
children: i
|
|
1114
|
+
}),
|
|
1115
|
+
o && /* @__PURE__ */ s("div", {
|
|
1116
|
+
className: "switch__offer-badge",
|
|
1117
|
+
children: o
|
|
1118
|
+
})
|
|
1119
|
+
]
|
|
1120
|
+
})
|
|
1121
|
+
});
|
|
1122
|
+
});
|
|
1123
|
+
I.displayName = "SwitchWithLabel";
|
|
1124
|
+
//#endregion
|
|
1125
|
+
//#region src/components/Table/Table.tsx
|
|
1126
|
+
function L({ title: e, subtitle: t, actionButton: n, columns: r, data: i, onRowSelect: a, selectedItems: o = [], className: l = "" }) {
|
|
1127
|
+
let u = (e) => o.some((t) => t.id !== void 0 && t.id === e.id || t === e);
|
|
1128
|
+
return /* @__PURE__ */ c("div", {
|
|
1129
|
+
className: `table-container ${l}`,
|
|
1130
|
+
children: [(e || t || n) && /* @__PURE__ */ c("div", {
|
|
1131
|
+
className: "table-header",
|
|
1132
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1133
|
+
className: "table-header__content",
|
|
1134
|
+
children: [e && /* @__PURE__ */ s("h2", {
|
|
1135
|
+
className: "table-header__title",
|
|
1136
|
+
children: e
|
|
1137
|
+
}), t && /* @__PURE__ */ s("p", {
|
|
1138
|
+
className: "table-header__subtitle",
|
|
1139
|
+
children: t
|
|
1140
|
+
})]
|
|
1141
|
+
}), n && /* @__PURE__ */ s("button", {
|
|
1142
|
+
className: "table-header__button",
|
|
1143
|
+
onClick: n.onClick,
|
|
1144
|
+
children: n.label
|
|
1145
|
+
})]
|
|
1146
|
+
}), /* @__PURE__ */ s("div", {
|
|
1147
|
+
className: "table-wrapper",
|
|
1148
|
+
children: /* @__PURE__ */ c("table", {
|
|
1149
|
+
className: "table",
|
|
1150
|
+
children: [/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ c("tr", { children: [a && /* @__PURE__ */ s("th", {
|
|
1151
|
+
className: "table__cell table__cell--header table__cell--checkbox",
|
|
1152
|
+
children: /* @__PURE__ */ s("div", {
|
|
1153
|
+
className: "table__checkbox-wrapper",
|
|
1154
|
+
children: /* @__PURE__ */ s("input", {
|
|
1155
|
+
type: "checkbox",
|
|
1156
|
+
className: "table__checkbox",
|
|
1157
|
+
checked: i.length > 0 && i.every((e) => u(e)),
|
|
1158
|
+
onChange: (e) => {
|
|
1159
|
+
let t = e.target.checked;
|
|
1160
|
+
i.forEach((e) => a(e, t));
|
|
1161
|
+
}
|
|
1162
|
+
})
|
|
1163
|
+
})
|
|
1164
|
+
}), r.map((e, t) => /* @__PURE__ */ s("th", {
|
|
1165
|
+
className: "table__cell table__cell--header",
|
|
1166
|
+
style: { width: e.width },
|
|
1167
|
+
children: e.header
|
|
1168
|
+
}, t))] }) }), /* @__PURE__ */ s("tbody", { children: i.length > 0 ? i.map((e, t) => /* @__PURE__ */ c("tr", {
|
|
1169
|
+
className: `table__row ${u(e) ? "table__row--selected" : ""}`,
|
|
1170
|
+
children: [a && /* @__PURE__ */ s("td", {
|
|
1171
|
+
className: "table__cell table__cell--checkbox",
|
|
1172
|
+
children: /* @__PURE__ */ s("div", {
|
|
1173
|
+
className: "table__checkbox-wrapper",
|
|
1174
|
+
children: /* @__PURE__ */ s("input", {
|
|
1175
|
+
type: "checkbox",
|
|
1176
|
+
className: "table__checkbox",
|
|
1177
|
+
checked: u(e),
|
|
1178
|
+
onChange: (t) => a(e, t.target.checked)
|
|
1179
|
+
})
|
|
1180
|
+
})
|
|
1181
|
+
}), r.map((t, n) => /* @__PURE__ */ s("td", {
|
|
1182
|
+
className: "table__cell",
|
|
1183
|
+
children: typeof t.accessor == "function" ? t.accessor(e) : e[t.accessor]
|
|
1184
|
+
}, n))]
|
|
1185
|
+
}, e.id || t)) : /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", {
|
|
1186
|
+
colSpan: r.length + (a ? 1 : 0),
|
|
1187
|
+
className: "table__cell table__cell--empty",
|
|
1188
|
+
children: "No Data"
|
|
1189
|
+
}) }) })]
|
|
1190
|
+
})
|
|
1191
|
+
})]
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
//#endregion
|
|
1195
|
+
//#region src/components/SimpleTable/SimpleTable.tsx
|
|
1196
|
+
function R({ columns: e, data: t, onRowSelect: n, selectedItems: r = [], className: i = "", noDataMessage: a = "No Data", isResponsive: o = !1, onColumnSort: l, variant: u = "striped" }) {
|
|
1197
|
+
let d = (e) => r.some((t) => t.id !== void 0 && t.id === e.id || t === e), f = (e) => {
|
|
1198
|
+
n && t.forEach((t) => n(t, e));
|
|
1199
|
+
}, p = (e) => {
|
|
1200
|
+
!e.isSortable || !l || l(typeof e.accessor == "string" ? e.accessor : e.header, e.sortDirection === "asc" ? "desc" : "asc");
|
|
1201
|
+
};
|
|
1202
|
+
return /* @__PURE__ */ s("div", {
|
|
1203
|
+
className: `simple-table-container ${i} ${o ? "simple-table-container--responsive" : ""} simple-table-container--${u}`,
|
|
1204
|
+
children: /* @__PURE__ */ s("div", {
|
|
1205
|
+
className: "simple-table-wrapper",
|
|
1206
|
+
children: /* @__PURE__ */ c("table", {
|
|
1207
|
+
className: "simple-table",
|
|
1208
|
+
children: [/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ c("tr", { children: [n && /* @__PURE__ */ s("th", {
|
|
1209
|
+
className: "simple-table__cell simple-table__cell--header simple-table__cell--checkbox",
|
|
1210
|
+
children: /* @__PURE__ */ s("div", {
|
|
1211
|
+
className: "simple-table__checkbox-wrapper",
|
|
1212
|
+
children: /* @__PURE__ */ s("input", {
|
|
1213
|
+
type: "checkbox",
|
|
1214
|
+
className: "simple-table__checkbox",
|
|
1215
|
+
checked: t.length > 0 && t.every((e) => d(e)),
|
|
1216
|
+
onChange: (e) => f(e.target.checked)
|
|
1217
|
+
})
|
|
1218
|
+
})
|
|
1219
|
+
}), e.map((e, t) => /* @__PURE__ */ s("th", {
|
|
1220
|
+
className: `simple-table__cell simple-table__cell--header ${e.isSortable ? "simple-table__cell--sortable" : ""}`,
|
|
1221
|
+
style: { width: e.width },
|
|
1222
|
+
onClick: () => p(e),
|
|
1223
|
+
children: /* @__PURE__ */ c("div", {
|
|
1224
|
+
className: "simple-table__header-content",
|
|
1225
|
+
children: [e.header, e.isSortable && /* @__PURE__ */ s("span", {
|
|
1226
|
+
className: `simple-table__sort-icon ${e.sortDirection || ""}`,
|
|
1227
|
+
children: e.sortDirection === "asc" ? "↑" : e.sortDirection === "desc" ? "↓" : "↕"
|
|
1228
|
+
})]
|
|
1229
|
+
})
|
|
1230
|
+
}, t))] }) }), /* @__PURE__ */ s("tbody", { children: t.length > 0 ? t.map((t, r) => /* @__PURE__ */ c("tr", {
|
|
1231
|
+
className: `simple-table__row ${d(t) ? "simple-table__row--selected" : ""}`,
|
|
1232
|
+
children: [n && /* @__PURE__ */ s("td", {
|
|
1233
|
+
className: "simple-table__cell simple-table__cell--checkbox",
|
|
1234
|
+
children: /* @__PURE__ */ s("div", {
|
|
1235
|
+
className: "simple-table__checkbox-wrapper",
|
|
1236
|
+
children: /* @__PURE__ */ s("input", {
|
|
1237
|
+
type: "checkbox",
|
|
1238
|
+
className: "simple-table__checkbox",
|
|
1239
|
+
checked: d(t),
|
|
1240
|
+
onChange: (e) => n(t, e.target.checked)
|
|
1241
|
+
})
|
|
1242
|
+
})
|
|
1243
|
+
}), e.map((e, n) => /* @__PURE__ */ s("td", {
|
|
1244
|
+
className: "simple-table__cell",
|
|
1245
|
+
children: typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor]
|
|
1246
|
+
}, n))]
|
|
1247
|
+
}, t.id || r)) : /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", {
|
|
1248
|
+
colSpan: e.length + (n ? 1 : 0),
|
|
1249
|
+
className: "simple-table__cell simple-table__cell--empty",
|
|
1250
|
+
children: a
|
|
1251
|
+
}) }) })]
|
|
1252
|
+
})
|
|
1253
|
+
})
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region src/components/SearchBox/SearchBox.tsx
|
|
1258
|
+
var z = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, B = e.forwardRef(({ collapsible: e = !1, className: t = "", disabled: r, placeholder: o = "Search by whatever thing...", onSearch: l, ...u }, d) => {
|
|
1259
|
+
let [f, p] = a(!e), [m, h] = a(""), g = i(null);
|
|
1260
|
+
return n(() => {
|
|
1261
|
+
p(!e);
|
|
1262
|
+
}, [e]), n(() => {
|
|
1263
|
+
if (!e) return;
|
|
1264
|
+
let t = (e) => {
|
|
1265
|
+
g.current && !g.current.contains(e.target) && m === "" && p(!1);
|
|
1266
|
+
};
|
|
1267
|
+
return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
|
|
1268
|
+
}, [e, m]), /* @__PURE__ */ s("div", {
|
|
1269
|
+
className: [
|
|
1270
|
+
"search-box",
|
|
1271
|
+
e ? "search-box--collapsible" : "",
|
|
1272
|
+
f ? "search-box--expanded" : "search-box--collapsed",
|
|
1273
|
+
r ? "search-box--disabled" : "",
|
|
1274
|
+
t
|
|
1275
|
+
].filter(Boolean).join(" "),
|
|
1276
|
+
style: z,
|
|
1277
|
+
ref: g,
|
|
1278
|
+
children: /* @__PURE__ */ c("div", {
|
|
1279
|
+
className: "search-box__wrapper",
|
|
1280
|
+
onClick: () => {
|
|
1281
|
+
e && !r && p(!f);
|
|
1282
|
+
},
|
|
1283
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1284
|
+
className: "search-box__icon-container",
|
|
1285
|
+
children: /* @__PURE__ */ c("svg", {
|
|
1286
|
+
className: "search-box__icon",
|
|
1287
|
+
width: "16",
|
|
1288
|
+
height: "16",
|
|
1289
|
+
viewBox: "0 0 16 16",
|
|
1290
|
+
fill: "none",
|
|
1291
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1292
|
+
children: [/* @__PURE__ */ s("path", {
|
|
1293
|
+
d: "M11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5Z",
|
|
1294
|
+
stroke: "currentColor",
|
|
1295
|
+
strokeWidth: "1.5"
|
|
1296
|
+
}), /* @__PURE__ */ s("path", {
|
|
1297
|
+
d: "M10 10L14 14",
|
|
1298
|
+
stroke: "currentColor",
|
|
1299
|
+
strokeWidth: "1.5",
|
|
1300
|
+
strokeLinecap: "round"
|
|
1301
|
+
})]
|
|
1302
|
+
})
|
|
1303
|
+
}), f && /* @__PURE__ */ s("input", {
|
|
1304
|
+
ref: d,
|
|
1305
|
+
type: "text",
|
|
1306
|
+
className: "search-box__input",
|
|
1307
|
+
placeholder: o,
|
|
1308
|
+
value: m,
|
|
1309
|
+
disabled: r,
|
|
1310
|
+
onChange: (e) => {
|
|
1311
|
+
h(e.target.value), u.onChange && u.onChange(e);
|
|
1312
|
+
},
|
|
1313
|
+
onKeyDown: (e) => {
|
|
1314
|
+
e.key === "Enter" && l && l(m), u.onKeyDown && u.onKeyDown(e);
|
|
1315
|
+
},
|
|
1316
|
+
autoFocus: e && f,
|
|
1317
|
+
...u
|
|
1318
|
+
})]
|
|
1319
|
+
})
|
|
1320
|
+
});
|
|
1321
|
+
});
|
|
1322
|
+
B.displayName = "SearchBox";
|
|
1323
|
+
//#endregion
|
|
1324
|
+
//#region src/components/NavigationDropDown/NavigationDropDown.tsx
|
|
1325
|
+
var V = ({ label: e, icon: t, items: r, className: o = "", onSelect: l, variant: u = "default", hasLabel: d = !0, hasDropdownIcon: f = !0, menuPlacement: p = "left" }) => {
|
|
1326
|
+
let [m, h] = a(!1), g = i(null);
|
|
1327
|
+
n(() => {
|
|
1328
|
+
let e = (e) => {
|
|
1329
|
+
g.current && !g.current.contains(e.target) && h(!1);
|
|
1330
|
+
};
|
|
1331
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1332
|
+
}, []);
|
|
1333
|
+
let _ = () => {
|
|
1334
|
+
h(!m);
|
|
1335
|
+
}, v = (e) => {
|
|
1336
|
+
e.onClick && e.onClick(), l && l(e), h(!1);
|
|
1337
|
+
};
|
|
1338
|
+
return /* @__PURE__ */ c("div", {
|
|
1339
|
+
className: `nav-dropdown ${m ? "nav-dropdown--open" : ""} nav-dropdown--${u} ${o}`,
|
|
1340
|
+
ref: g,
|
|
1341
|
+
"data-has-label": d,
|
|
1342
|
+
"data-hasdropdwonboxicon": f ? "Show" : "None",
|
|
1343
|
+
children: [/* @__PURE__ */ c("button", {
|
|
1344
|
+
className: "nav-dropdown__trigger",
|
|
1345
|
+
onClick: _,
|
|
1346
|
+
type: "button",
|
|
1347
|
+
"aria-expanded": m,
|
|
1348
|
+
disabled: u === "disabled",
|
|
1349
|
+
children: [d && e && /* @__PURE__ */ s("span", {
|
|
1350
|
+
className: "nav-dropdown__label",
|
|
1351
|
+
children: e
|
|
1352
|
+
}), (t || f) && /* @__PURE__ */ c("div", {
|
|
1353
|
+
className: "nav-dropdown__icon-box",
|
|
1354
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1355
|
+
className: "nav-dropdown__icon-inner",
|
|
1356
|
+
children: t && /* @__PURE__ */ s("span", {
|
|
1357
|
+
className: "nav-dropdown__icon",
|
|
1358
|
+
children: t
|
|
1359
|
+
})
|
|
1360
|
+
}), f && /* @__PURE__ */ s("svg", {
|
|
1361
|
+
className: "nav-dropdown__caret",
|
|
1362
|
+
width: "9",
|
|
1363
|
+
height: "5",
|
|
1364
|
+
viewBox: "0 0 9 5",
|
|
1365
|
+
fill: "none",
|
|
1366
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1367
|
+
children: /* @__PURE__ */ s("path", {
|
|
1368
|
+
d: "M4.5 5L0.602886 0.5L8.39711 0.5L4.5 5Z",
|
|
1369
|
+
fill: "currentColor"
|
|
1370
|
+
})
|
|
1371
|
+
})]
|
|
1372
|
+
})]
|
|
1373
|
+
}), m && /* @__PURE__ */ s("div", {
|
|
1374
|
+
className: `nav-dropdown__menu ${p === "right" ? "nav-dropdown__menu--right" : ""}`,
|
|
1375
|
+
children: r.map((e, t) => /* @__PURE__ */ c("button", {
|
|
1376
|
+
className: "nav-dropdown__item",
|
|
1377
|
+
onClick: () => v(e),
|
|
1378
|
+
type: "button",
|
|
1379
|
+
children: [e.icon && /* @__PURE__ */ s("span", {
|
|
1380
|
+
className: "nav-dropdown__item-icon",
|
|
1381
|
+
children: e.icon
|
|
1382
|
+
}), /* @__PURE__ */ s("span", {
|
|
1383
|
+
className: "nav-dropdown__item-label",
|
|
1384
|
+
children: e.label
|
|
1385
|
+
})]
|
|
1386
|
+
}, e.id || t))
|
|
1387
|
+
})]
|
|
1388
|
+
});
|
|
1389
|
+
}, H = ({ logo: e, leftSelects: t = [], actions: n = [], profileAction: r, className: i = "" }) => /* @__PURE__ */ c("nav", {
|
|
1390
|
+
className: `admin-top-nav ${i}`,
|
|
1391
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1392
|
+
className: "admin-top-nav__left",
|
|
1393
|
+
children: [
|
|
1394
|
+
/* @__PURE__ */ s("div", {
|
|
1395
|
+
className: "admin-top-nav__logo",
|
|
1396
|
+
children: e || /* @__PURE__ */ c("div", {
|
|
1397
|
+
className: "admin-top-nav__logo-container",
|
|
1398
|
+
children: [
|
|
1399
|
+
/* @__PURE__ */ s("div", { className: "admin-top-nav__logo-square" }),
|
|
1400
|
+
/* @__PURE__ */ s("div", { className: "admin-top-nav__logo-square" }),
|
|
1401
|
+
/* @__PURE__ */ s("div", { className: "admin-top-nav__logo-square" }),
|
|
1402
|
+
/* @__PURE__ */ s("div", { className: "admin-top-nav__logo-square" })
|
|
1403
|
+
]
|
|
1404
|
+
})
|
|
1405
|
+
}),
|
|
1406
|
+
/* @__PURE__ */ s("div", {
|
|
1407
|
+
className: "admin-top-nav__selects",
|
|
1408
|
+
children: t.map((e, t) => /* @__PURE__ */ s(V, {
|
|
1409
|
+
label: e.value || e.placeholder,
|
|
1410
|
+
items: e.options.map((t) => ({
|
|
1411
|
+
label: t.label,
|
|
1412
|
+
onClick: () => e.onSelect?.(t.value)
|
|
1413
|
+
})),
|
|
1414
|
+
hasLabel: !0,
|
|
1415
|
+
hasDropdownIcon: !0,
|
|
1416
|
+
className: "admin-top-nav__dropdown"
|
|
1417
|
+
}, t))
|
|
1418
|
+
}),
|
|
1419
|
+
/* @__PURE__ */ s("div", {
|
|
1420
|
+
className: "admin-top-nav__search-wrapper",
|
|
1421
|
+
children: /* @__PURE__ */ s("div", {
|
|
1422
|
+
className: "admin-top-nav__search-icon-placeholder",
|
|
1423
|
+
children: /* @__PURE__ */ s("div", { className: "admin-top-nav__search-icon" })
|
|
1424
|
+
})
|
|
1425
|
+
})
|
|
1426
|
+
]
|
|
1427
|
+
}), /* @__PURE__ */ c("div", {
|
|
1428
|
+
className: "admin-top-nav__right",
|
|
1429
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1430
|
+
className: "admin-top-nav__actions-container",
|
|
1431
|
+
children: n.map((e, t) => /* @__PURE__ */ s("div", {
|
|
1432
|
+
className: "admin-top-nav__icon-action",
|
|
1433
|
+
onClick: e.onClick,
|
|
1434
|
+
children: /* @__PURE__ */ c("div", {
|
|
1435
|
+
className: "admin-top-nav__icon-box",
|
|
1436
|
+
children: [e.icon, e.badge && /* @__PURE__ */ s("span", {
|
|
1437
|
+
className: "admin-top-nav__badge-count",
|
|
1438
|
+
children: e.badge
|
|
1439
|
+
})]
|
|
1440
|
+
})
|
|
1441
|
+
}, t))
|
|
1442
|
+
}), /* @__PURE__ */ c("div", {
|
|
1443
|
+
className: "admin-top-nav__profile-group",
|
|
1444
|
+
children: [r && /* @__PURE__ */ s(V, {
|
|
1445
|
+
label: r.label,
|
|
1446
|
+
hasLabel: !!r.label,
|
|
1447
|
+
icon: r.icon || /* @__PURE__ */ s("div", { className: "admin-top-nav__avatar admin-top-nav__avatar--purple" }),
|
|
1448
|
+
items: r.items || [],
|
|
1449
|
+
onSelect: r.onClick ? () => r.onClick?.() : void 0,
|
|
1450
|
+
hasDropdownIcon: !0,
|
|
1451
|
+
menuPlacement: "right",
|
|
1452
|
+
className: "admin-top-nav__profile-dropdown"
|
|
1453
|
+
}), !r && /* @__PURE__ */ c(o, { children: [
|
|
1454
|
+
/* @__PURE__ */ s(V, {
|
|
1455
|
+
hasLabel: !1,
|
|
1456
|
+
icon: /* @__PURE__ */ s("div", { className: "admin-top-nav__avatar admin-top-nav__avatar--purple" }),
|
|
1457
|
+
items: [],
|
|
1458
|
+
hasDropdownIcon: !0,
|
|
1459
|
+
menuPlacement: "right",
|
|
1460
|
+
className: "admin-top-nav__profile-dropdown"
|
|
1461
|
+
}),
|
|
1462
|
+
/* @__PURE__ */ s(V, {
|
|
1463
|
+
hasLabel: !1,
|
|
1464
|
+
icon: /* @__PURE__ */ s("div", { className: "admin-top-nav__avatar admin-top-nav__avatar--gray" }),
|
|
1465
|
+
items: [],
|
|
1466
|
+
hasDropdownIcon: !0,
|
|
1467
|
+
menuPlacement: "right",
|
|
1468
|
+
className: "admin-top-nav__profile-dropdown"
|
|
1469
|
+
}),
|
|
1470
|
+
/* @__PURE__ */ s(V, {
|
|
1471
|
+
hasLabel: !1,
|
|
1472
|
+
icon: /* @__PURE__ */ s("div", { className: "admin-top-nav__avatar admin-top-nav__avatar--gray" }),
|
|
1473
|
+
items: [],
|
|
1474
|
+
hasDropdownIcon: !0,
|
|
1475
|
+
menuPlacement: "right",
|
|
1476
|
+
className: "admin-top-nav__profile-dropdown"
|
|
1477
|
+
})
|
|
1478
|
+
] })]
|
|
1479
|
+
})]
|
|
1480
|
+
})]
|
|
1481
|
+
}), U = () => /* @__PURE__ */ s("svg", {
|
|
1482
|
+
width: "16",
|
|
1483
|
+
height: "16",
|
|
1484
|
+
viewBox: "0 0 16 16",
|
|
1485
|
+
fill: "none",
|
|
1486
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1487
|
+
children: /* @__PURE__ */ s("path", {
|
|
1488
|
+
d: "M2 7.99711C2 8.80016 2.15686 9.55712 2.47059 10.268C2.78431 10.9788 3.21764 11.6041 3.77058 12.144C4.32353 12.6838 4.96176 13.1075 5.68529 13.4149C6.40882 13.7222 7.18039 13.8759 7.99999 13.8759C8.81962 13.8759 9.59118 13.7222 10.3147 13.4149C11.0382 13.1075 11.6765 12.6838 12.2294 12.144C12.7823 11.6041 13.2157 10.9788 13.5294 10.268C13.8431 9.55712 14 8.80016 14 7.99711C14 7.2901 13.8765 6.61768 13.6294 5.97986C13.3823 5.34203 13.0382 4.76471 12.5971 4.24791C12.1559 3.73111 11.6402 3.29884 11.05 2.95111C10.4598 2.60337 9.82156 2.36226 9.13528 2.22778V1.40935C9.13528 1.20186 9.07451 1.07314 8.95295 1.02319C8.83136 0.973241 8.69017 1.00398 8.52938 1.11541L6.65294 2.40068C6.51568 2.4929 6.44705 2.60049 6.44705 2.72344C6.44705 2.8464 6.51568 2.95591 6.65294 3.05197L8.52353 4.34301C8.68432 4.45828 8.82648 4.48998 8.95 4.43811C9.07352 4.38623 9.13528 4.25655 9.13528 4.04907V3.23064C9.69214 3.35359 10.2049 3.56108 10.6735 3.85311C11.1421 4.14512 11.55 4.50246 11.8971 4.92513C12.2441 5.34779 12.5137 5.81944 12.7058 6.34008C12.898 6.86071 12.9941 7.41306 12.9941 7.99711C12.9941 8.6772 12.8657 9.31408 12.6088 9.90773C12.352 10.5014 11.9951 11.022 11.5382 11.4697C11.0814 11.9173 10.551 12.267 9.94707 12.5186C9.34316 12.7703 8.69413 12.8962 7.99999 12.8962C7.30588 12.8962 6.65588 12.7703 6.04999 12.5186C5.44411 12.267 4.91274 11.9173 4.45588 11.4697C3.99902 11.022 3.64215 10.5014 3.38529 9.90773C3.12843 9.31408 3 8.6772 3 7.99711C3 7.4515 3.08627 6.93182 3.25882 6.43806C3.43137 5.94432 3.67255 5.4938 3.98235 5.08651C4.29215 4.67921 4.6549 4.32956 5.07059 4.03754C5.19215 3.94916 5.2696 3.84158 5.30294 3.71478C5.33627 3.58798 5.31568 3.46502 5.24117 3.34591C5.16666 3.23064 5.05882 3.16051 4.91764 3.13554C4.77647 3.11056 4.64117 3.14611 4.51176 3.24217C4.00588 3.59951 3.56471 4.02505 3.18824 4.5188C2.81177 5.01254 2.51961 5.55432 2.31176 6.14412C2.10392 6.73394 2 7.3516 2 7.99711ZM6.28235 10.3602C6.39607 10.3602 6.48627 10.3246 6.55293 10.2535C6.6196 10.1825 6.65294 10.0855 6.65294 9.9625V6.32567C6.65294 6.17582 6.61764 6.06343 6.54705 5.98851C6.47647 5.91358 6.37451 5.87611 6.24117 5.87611C6.15882 5.87611 6.08235 5.89052 6.01176 5.91934C5.94117 5.94816 5.85294 5.99715 5.74705 6.06632L4.94117 6.60233C4.87451 6.64844 4.82451 6.69935 4.79117 6.75506C4.75784 6.81077 4.74117 6.87129 4.74117 6.9366C4.74117 7.03268 4.77451 7.11529 4.84118 7.18442C4.90784 7.25359 4.98823 7.28817 5.08235 7.28817C5.14117 7.28817 5.19019 7.2805 5.22941 7.26516C5.26862 7.24977 5.31372 7.22095 5.3647 7.17869L5.92941 6.77523H5.91764V9.9625C5.91764 10.0816 5.95098 10.1777 6.01764 10.2507C6.08431 10.3237 6.17255 10.3602 6.28235 10.3602ZM9.27057 10.4293C9.75683 10.4293 10.148 10.2881 10.4441 10.0057C10.7402 9.72328 10.8882 9.34961 10.8882 8.88469C10.8882 8.46204 10.7569 8.1143 10.4941 7.84148C10.2314 7.56869 9.89019 7.4323 9.47055 7.4323C9.28234 7.4323 9.09902 7.47455 8.92061 7.55907C8.74215 7.64362 8.61371 7.75891 8.53528 7.90492H8.56468L8.67057 6.60233H10.4294C10.5157 6.60233 10.5912 6.57159 10.6559 6.51011C10.7206 6.44863 10.7529 6.36794 10.7529 6.26804C10.7529 6.17198 10.7206 6.09417 10.6559 6.03462C10.5912 5.97506 10.5157 5.94528 10.4294 5.94528H8.55293C8.24312 5.94528 8.0745 6.10474 8.04707 6.42366L7.91764 8.08357C7.90587 8.22573 7.93529 8.33236 8.00587 8.40345C8.07647 8.47451 8.17648 8.51004 8.3059 8.51004C8.39999 8.51004 8.47645 8.49851 8.53528 8.47546C8.59411 8.45244 8.66471 8.41018 8.74707 8.34868C8.86079 8.24879 8.96667 8.17674 9.06469 8.13256C9.16275 8.08837 9.27059 8.06628 9.38821 8.06628C9.61566 8.06628 9.79998 8.14216 9.94117 8.29391C10.0824 8.44571 10.153 8.64647 10.153 8.8962C10.153 9.14983 10.0726 9.35925 9.91178 9.52446C9.75099 9.68967 9.54902 9.77228 9.30587 9.77228C9.12942 9.77228 8.9706 9.72713 8.82941 9.63683C8.68822 9.54653 8.58038 9.42647 8.50589 9.27664C8.46276 9.20361 8.41373 9.14694 8.35879 9.10661C8.3039 9.06624 8.2392 9.04605 8.16471 9.04605C8.06666 9.04605 7.98725 9.0768 7.92647 9.1383C7.86568 9.19976 7.83529 9.28046 7.83529 9.38039C7.83529 9.4188 7.83921 9.45722 7.84705 9.49566C7.85489 9.53406 7.86666 9.57248 7.88234 9.61092C7.96078 9.81839 8.12254 10.0067 8.36765 10.1757C8.61272 10.3448 8.9137 10.4293 9.27057 10.4293Z",
|
|
1489
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1490
|
+
})
|
|
1491
|
+
}), W = () => /* @__PURE__ */ s("svg", {
|
|
1492
|
+
width: "16",
|
|
1493
|
+
height: "16",
|
|
1494
|
+
viewBox: "0 0 16 16",
|
|
1495
|
+
fill: "none",
|
|
1496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1497
|
+
children: /* @__PURE__ */ s("path", {
|
|
1498
|
+
d: "M2.74691 15.0001C2.91209 15.0001 3.06902 14.9712 3.2177 14.9134C3.36637 14.8556 3.52331 14.7771 3.6885 14.678L13.3192 9.11098C13.6661 8.90725 13.907 8.72692 14.0419 8.56998C14.1768 8.41305 14.2442 8.22446 14.2442 8.0042C14.2442 7.78394 14.1768 7.59534 14.0419 7.43841C13.907 7.28148 13.6661 7.1039 13.3192 6.90567L3.6885 1.33044C3.52331 1.23683 3.36637 1.16111 3.2177 1.1033C3.06902 1.04548 2.91209 1.01657 2.74691 1.01657C2.44405 1.01657 2.20314 1.12395 2.02419 1.3387C1.84523 1.55345 1.75575 1.83978 1.75575 2.1977V13.8107C1.75575 14.1686 1.84523 14.4563 2.02419 14.6738C2.20314 14.8913 2.44405 15.0001 2.74691 15.0001Z",
|
|
1499
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1500
|
+
})
|
|
1501
|
+
}), G = () => /* @__PURE__ */ c("svg", {
|
|
1502
|
+
width: "16",
|
|
1503
|
+
height: "16",
|
|
1504
|
+
viewBox: "0 0 16 16",
|
|
1505
|
+
fill: "none",
|
|
1506
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1507
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
1508
|
+
x: "3",
|
|
1509
|
+
y: "2",
|
|
1510
|
+
width: "3",
|
|
1511
|
+
height: "12",
|
|
1512
|
+
rx: "1",
|
|
1513
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1514
|
+
}), /* @__PURE__ */ s("rect", {
|
|
1515
|
+
x: "10",
|
|
1516
|
+
y: "2",
|
|
1517
|
+
width: "3",
|
|
1518
|
+
height: "12",
|
|
1519
|
+
rx: "1",
|
|
1520
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1521
|
+
})]
|
|
1522
|
+
}), K = () => /* @__PURE__ */ s("svg", {
|
|
1523
|
+
width: "16",
|
|
1524
|
+
height: "16",
|
|
1525
|
+
viewBox: "0 0 16 16",
|
|
1526
|
+
fill: "none",
|
|
1527
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1528
|
+
children: /* @__PURE__ */ s("path", {
|
|
1529
|
+
d: "M2 7.99711C2 8.80042 2.15686 9.55759 2.47059 10.2686C2.78431 10.9796 3.21764 11.6052 3.77058 12.1452C4.32353 12.6852 4.96176 13.1089 5.68529 13.4164C6.40882 13.7239 7.18039 13.8776 7.99999 13.8776C8.81962 13.8776 9.59118 13.7239 10.3147 13.4164C11.0382 13.1089 11.6765 12.6852 12.2294 12.1452C12.7823 11.6052 13.2157 10.9796 13.5294 10.2686C13.8431 9.55759 14 8.80042 14 7.99711C14 7.35142 13.8961 6.73359 13.6882 6.14363C13.4804 5.55366 13.1882 5.01173 12.8117 4.51785C12.4353 4.02396 11.9941 3.5983 11.4883 3.24086C11.3588 3.14478 11.2235 3.10923 11.0823 3.13421C10.9412 3.15919 10.8333 3.22933 10.7588 3.34464C10.6843 3.46378 10.6637 3.58677 10.6971 3.71361C10.7304 3.84044 10.8078 3.94805 10.9294 4.03645C11.3451 4.32856 11.7078 4.67831 12.0177 5.08572C12.3274 5.49312 12.5686 5.94377 12.7411 6.43765C12.9137 6.93153 13 7.45134 13 7.99711C13 8.67743 12.8716 9.31448 12.6147 9.90826C12.3578 10.5021 12.001 11.0229 11.5441 11.4706C11.0872 11.9184 10.5559 12.2682 9.94997 12.5199C9.34412 12.7717 8.69413 12.8975 7.99999 12.8975C7.30588 12.8975 6.65686 12.7717 6.05294 12.5199C5.44902 12.2682 4.91862 11.9184 4.46176 11.4706C4.0049 11.0229 3.64804 10.5021 3.39117 9.90826C3.13431 9.31448 3.00588 8.67743 3.00588 7.99711C3.00588 7.41293 3.10196 6.86044 3.29412 6.33964C3.48627 5.81886 3.75588 5.34707 4.10294 4.92429C4.45 4.50151 4.85882 4.14407 5.32941 3.85197C5.79999 3.55987 6.31176 3.35232 6.8647 3.22933V4.05375C6.8647 4.25746 6.92646 4.38525 7.04999 4.43713C7.17352 4.48902 7.31568 4.45924 7.47647 4.34778L9.35291 3.05638C9.48627 2.96798 9.55392 2.86132 9.55585 2.73641C9.55781 2.6115 9.49017 2.50292 9.35291 2.41068L7.48234 1.11928C7.31764 1.00398 7.17352 0.972268 7.04999 1.02415C6.92646 1.07604 6.8647 1.20576 6.8647 1.4133V2.22619C6.17843 2.36071 5.54019 2.60189 4.95 2.94972C4.3598 3.29755 3.84411 3.72994 3.40294 4.24689C2.96176 4.76383 2.61765 5.34131 2.37059 5.97932C2.12353 6.61735 2 7.28994 2 7.99711ZM6.25294 10.3608C6.36666 10.3608 6.45686 10.3253 6.52353 10.2542C6.59019 10.1831 6.62352 10.086 6.62352 9.96304V6.32523C6.62352 6.17534 6.58823 6.06292 6.51764 5.98797C6.44705 5.91302 6.34509 5.87555 6.21176 5.87555C6.12941 5.87555 6.05294 5.88996 5.98235 5.91879C5.91176 5.94761 5.82353 5.99661 5.71765 6.06579L4.91176 6.60196C4.84509 6.64808 4.79509 6.699 4.76176 6.75474C4.72843 6.81047 4.71176 6.87101 4.71176 6.93636C4.71176 7.03243 4.74509 7.11506 4.81176 7.18425C4.87843 7.25344 4.95882 7.28803 5.05294 7.28803C5.11176 7.28803 5.16078 7.28034 5.2 7.26495C5.23921 7.24956 5.28431 7.22073 5.33529 7.17846L5.9 6.77492H5.88823V9.96304C5.88823 10.0822 5.92156 10.1783 5.98823 10.2513C6.0549 10.3243 6.14313 10.3608 6.25294 10.3608ZM9.24118 10.43C9.72744 10.43 10.1186 10.2888 10.4147 10.0063C10.7108 9.72381 10.8588 9.35002 10.8588 8.88494C10.8588 8.46217 10.7274 8.11435 10.4647 7.84149C10.2019 7.56859 9.86076 7.43214 9.44116 7.43214C9.25294 7.43214 9.06961 7.47443 8.89115 7.55901C8.71273 7.64354 8.58431 7.75884 8.50589 7.90489H8.53528L8.64117 6.60196H10.4C10.4863 6.60196 10.5618 6.57121 10.6265 6.50972C10.6912 6.44822 10.7235 6.36751 10.7235 6.26758C10.7235 6.17149 10.6912 6.09366 10.6265 6.03409C10.5618 5.97452 10.4863 5.94473 10.4 5.94473H8.52353C8.21372 5.94473 8.04509 6.10423 8.01764 6.42324L7.88823 8.08359C7.87646 8.22583 7.90587 8.33249 7.97647 8.40357C8.04707 8.47468 8.14706 8.51024 8.27645 8.51024C8.37058 8.51024 8.44706 8.49871 8.50589 8.47565C8.56472 8.45258 8.63529 8.4103 8.71761 8.34878C8.83134 8.24885 8.93723 8.17679 9.03529 8.13259C9.13332 8.0884 9.24116 8.0663 9.35882 8.0663C9.58626 8.0663 9.77058 8.14222 9.91178 8.29405C10.0529 8.44585 10.1235 8.64667 10.1235 8.89651C10.1235 9.15017 10.0431 9.35962 9.88232 9.52488C9.72153 9.69018 9.51958 9.77283 9.27647 9.77283C9.09999 9.77283 8.94117 9.72767 8.80001 9.63735C8.65882 9.54702 8.55098 9.4269 8.47649 9.27699C8.43332 9.20399 8.38429 9.14729 8.3294 9.10691C8.2745 9.06657 8.20979 9.0464 8.13526 9.0464C8.03724 9.0464 7.95784 9.07714 7.89705 9.13861C7.83627 9.20013 7.80587 9.28085 7.80587 9.38078C7.80587 9.41919 7.8098 9.45762 7.81764 9.49607C7.82548 9.53453 7.83725 9.57296 7.85294 9.61137C7.93137 9.81894 8.09314 10.0073 8.33825 10.1763C8.58333 10.3455 8.8843 10.43 9.24118 10.43Z",
|
|
1530
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1531
|
+
})
|
|
1532
|
+
}), ee = () => /* @__PURE__ */ c("svg", {
|
|
1533
|
+
width: "22",
|
|
1534
|
+
height: "16",
|
|
1535
|
+
viewBox: "0 0 22 16",
|
|
1536
|
+
fill: "none",
|
|
1537
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1538
|
+
children: [/* @__PURE__ */ s("g", {
|
|
1539
|
+
clipPath: "url(#clip0_15777_1245)",
|
|
1540
|
+
children: /* @__PURE__ */ s("path", {
|
|
1541
|
+
d: "M8.75134 15.0118C9.02195 15.0118 9.2425 14.9252 9.41297 14.752C9.5835 14.5788 9.66876 14.3623 9.66876 14.1025V1.64926C9.66876 1.38407 9.58216 1.15811 9.40898 0.97139C9.23579 0.784674 9.01117 0.691317 8.73513 0.691317C8.5457 0.691317 8.37522 0.734614 8.22369 0.821207C8.07215 0.907801 7.89355 1.05122 7.6879 1.25147L4.22956 4.49873C4.17544 4.54744 4.10778 4.5718 4.02661 4.5718H1.6967C1.15007 4.5718 0.730636 4.72198 0.438381 5.02235C0.146127 5.32272 0 5.76516 0 6.34967V9.36966C0 9.95955 0.146127 10.4033 0.438381 10.701C0.730636 10.9986 1.15007 11.1475 1.6967 11.1475H4.02661C4.10778 11.1475 4.17544 11.1718 4.22956 11.2205L7.6879 14.5003C7.87191 14.6789 8.0478 14.8088 8.21557 14.89C8.38332 14.9712 8.56191 15.0118 8.75134 15.0118ZM12.5588 11.3018C12.6995 11.3938 12.8537 11.4249 13.0216 11.3951C13.1893 11.3654 13.3273 11.272 13.4355 11.1151C13.7494 10.7037 13.9943 10.2112 14.1702 9.6375C14.3461 9.06385 14.4341 8.46582 14.4341 7.84342C14.4341 7.22102 14.3461 6.62298 14.1702 6.0493C13.9943 5.47562 13.7494 4.98312 13.4355 4.5718C13.3273 4.41485 13.1893 4.32013 13.0216 4.28766C12.8537 4.25519 12.6995 4.28766 12.5588 4.38508C12.3964 4.49873 12.3031 4.64621 12.2787 4.82752C12.2544 5.00882 12.3071 5.18336 12.437 5.35114C12.6751 5.67587 12.8578 6.05472 12.985 6.48768C13.1122 6.92065 13.1758 7.37256 13.1758 7.84342C13.1758 8.31425 13.1108 8.7648 12.9809 9.19508C12.8511 9.62536 12.6697 10.0056 12.437 10.3357C12.3125 10.5089 12.2611 10.6848 12.2828 10.8633C12.3044 11.042 12.3964 11.1881 12.5588 11.3018ZM15.5787 13.4206C15.7303 13.518 15.89 13.5518 16.0577 13.5221C16.2255 13.4923 16.3635 13.399 16.4718 13.242C16.9913 12.5276 17.3959 11.6995 17.6854 10.7578C17.975 9.81615 18.1197 8.84467 18.1197 7.84342C18.1197 6.84217 17.9763 5.86799 17.6895 4.92088C17.4026 3.97376 16.9967 3.14841 16.4718 2.44483C16.3635 2.28789 16.2255 2.19318 16.0577 2.1607C15.89 2.12823 15.7303 2.16341 15.5787 2.26624C15.4326 2.36907 15.3474 2.50573 15.323 2.67621C15.2987 2.84669 15.346 3.01582 15.4651 3.18359C15.9089 3.8114 16.2526 4.5285 16.4961 5.3349C16.7397 6.14131 16.8614 6.97748 16.8614 7.84342C16.8614 8.70934 16.7383 9.54415 16.4921 10.3478C16.2458 11.1515 15.9034 11.87 15.4651 12.5032C15.3514 12.671 15.3054 12.8401 15.3271 13.0106C15.3487 13.1811 15.4326 13.3178 15.5787 13.4206ZM18.623 15.5719C18.7637 15.6747 18.9207 15.7072 19.0939 15.6693C19.2671 15.6314 19.4078 15.5313 19.5161 15.369C19.9923 14.6816 20.3996 13.9388 20.7378 13.1405C21.0761 12.3422 21.3358 11.4993 21.5172 10.6117C21.6985 9.7241 21.7891 8.80133 21.7891 7.84342C21.7891 6.88547 21.6971 5.96271 21.5131 5.07512C21.3291 4.18753 21.0666 3.3446 20.7256 2.54632C20.3847 1.74803 19.9815 1.00522 19.5161 0.317881C19.4078 0.150106 19.2671 0.0486294 19.0939 0.0134507C18.9207 -0.021728 18.7637 0.0120977 18.623 0.114928C18.4715 0.217757 18.3849 0.355766 18.3632 0.528953C18.3416 0.702141 18.3876 0.872622 18.5013 1.0404C18.918 1.66279 19.2793 2.33254 19.5851 3.04964C19.8908 3.76674 20.1276 4.52714 20.2954 5.33084C20.4632 6.13454 20.5471 6.97207 20.5471 7.84342C20.5471 8.70934 20.4632 9.54415 20.2954 10.3478C20.1276 11.1515 19.8908 11.9147 19.5851 12.6372C19.2793 13.3597 18.918 14.0294 18.5013 14.6464C18.3876 14.8088 18.3416 14.9779 18.3632 15.1538C18.3849 15.3297 18.4715 15.4691 18.623 15.5719Z",
|
|
1542
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_DarkGray, #4B4B4A)"
|
|
1543
|
+
})
|
|
1544
|
+
}), /* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("clipPath", {
|
|
1545
|
+
id: "clip0_15777_1245",
|
|
1546
|
+
children: /* @__PURE__ */ s("rect", {
|
|
1547
|
+
width: "21.7891",
|
|
1548
|
+
height: "15.6949",
|
|
1549
|
+
fill: "white"
|
|
1550
|
+
})
|
|
1551
|
+
}) })]
|
|
1552
|
+
}), q = (e) => `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`, J = t(({ variant: e = "long", currentTime: t = 0, duration: r = 83, isPlaying: o = !1, isMuted: l = !1, disabled: u = !1, source: d, onPlayPause: f, onBackward: p, onForward: m, onVolumeChange: h, onTimeUpdate: g, onSeek: _ }, v) => {
|
|
1553
|
+
let [y, b] = a(o), [x, S] = a(t), [C, w] = a(r), [T, E] = a(l), D = i(null);
|
|
1554
|
+
n(() => {
|
|
1555
|
+
b(o);
|
|
1556
|
+
}, [o]), n(() => {
|
|
1557
|
+
S(t), D.current && Math.abs(D.current.currentTime - t) > 1 && (D.current.currentTime = t);
|
|
1558
|
+
}, [t]), n(() => {
|
|
1559
|
+
w(r);
|
|
1560
|
+
}, [r]), n(() => {
|
|
1561
|
+
E(l), D.current && (D.current.muted = l);
|
|
1562
|
+
}, [l]), n(() => {
|
|
1563
|
+
D.current && (y ? D.current.play().catch((e) => console.log("Playback failed:", e)) : D.current.pause());
|
|
1564
|
+
}, [y, d]), n(() => {
|
|
1565
|
+
let e;
|
|
1566
|
+
return !d && y && (e = setInterval(() => {
|
|
1567
|
+
S((e) => {
|
|
1568
|
+
let t = e + 1;
|
|
1569
|
+
return t >= C ? (b(!1), g && g(C), C) : (g && g(t), t);
|
|
1570
|
+
});
|
|
1571
|
+
}, 1e3)), () => {
|
|
1572
|
+
e && clearInterval(e);
|
|
1573
|
+
};
|
|
1574
|
+
}, [
|
|
1575
|
+
y,
|
|
1576
|
+
C,
|
|
1577
|
+
g,
|
|
1578
|
+
d
|
|
1579
|
+
]);
|
|
1580
|
+
let O = () => {
|
|
1581
|
+
D.current && (S(D.current.currentTime), g && g(D.current.currentTime));
|
|
1582
|
+
}, k = () => {
|
|
1583
|
+
D.current && w(D.current.duration);
|
|
1584
|
+
}, A = () => {
|
|
1585
|
+
b(!1), g && g(C);
|
|
1586
|
+
}, j = C > 0 ? x / C * 100 : 0, M = () => {
|
|
1587
|
+
u || (b(!y), f && f());
|
|
1588
|
+
}, N = () => {
|
|
1589
|
+
if (u) return;
|
|
1590
|
+
let e = Math.max(0, x - 10);
|
|
1591
|
+
S(e), D.current && (D.current.currentTime = e), p && p(), _ && _(e);
|
|
1592
|
+
}, P = () => {
|
|
1593
|
+
if (u) return;
|
|
1594
|
+
let e = Math.min(C, x + 10);
|
|
1595
|
+
S(e), D.current && (D.current.currentTime = e), m && m(), _ && _(e);
|
|
1596
|
+
}, F = (e) => {
|
|
1597
|
+
if (!u && C > 0) {
|
|
1598
|
+
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, n / t.width)) * C;
|
|
1599
|
+
S(r), D.current && (D.current.currentTime = r), _ && _(r);
|
|
1600
|
+
}
|
|
1601
|
+
}, I = () => {
|
|
1602
|
+
if (u) return;
|
|
1603
|
+
let e = !T;
|
|
1604
|
+
E(e), D.current && (D.current.muted = e), h && h(e ? 0 : 1);
|
|
1605
|
+
};
|
|
1606
|
+
return /* @__PURE__ */ c("div", {
|
|
1607
|
+
ref: v,
|
|
1608
|
+
className: "audioplayer-container",
|
|
1609
|
+
children: [d && /* @__PURE__ */ s("audio", {
|
|
1610
|
+
ref: D,
|
|
1611
|
+
src: d,
|
|
1612
|
+
onTimeUpdate: O,
|
|
1613
|
+
onLoadedMetadata: k,
|
|
1614
|
+
onEnded: A,
|
|
1615
|
+
muted: T
|
|
1616
|
+
}), /* @__PURE__ */ c("div", {
|
|
1617
|
+
className: `audioplayer-wrapper audioplayer-wrapper--${e}`,
|
|
1618
|
+
children: [
|
|
1619
|
+
/* @__PURE__ */ c("div", {
|
|
1620
|
+
className: "audioplayer-controls",
|
|
1621
|
+
children: [
|
|
1622
|
+
/* @__PURE__ */ s("button", {
|
|
1623
|
+
type: "button",
|
|
1624
|
+
className: `audioplayer-control-btn ${u ? "audioplayer-icon-disabled" : ""}`,
|
|
1625
|
+
onClick: N,
|
|
1626
|
+
disabled: u,
|
|
1627
|
+
"aria-label": "Backward",
|
|
1628
|
+
children: /* @__PURE__ */ s(U, {})
|
|
1629
|
+
}),
|
|
1630
|
+
/* @__PURE__ */ s("button", {
|
|
1631
|
+
type: "button",
|
|
1632
|
+
className: `audioplayer-control-btn ${u ? "audioplayer-icon-disabled" : ""}`,
|
|
1633
|
+
onClick: M,
|
|
1634
|
+
disabled: u,
|
|
1635
|
+
"aria-label": y ? "Pause" : "Play",
|
|
1636
|
+
children: s(y ? G : W, {})
|
|
1637
|
+
}),
|
|
1638
|
+
/* @__PURE__ */ s("button", {
|
|
1639
|
+
type: "button",
|
|
1640
|
+
className: `audioplayer-control-btn ${u ? "audioplayer-icon-disabled" : ""}`,
|
|
1641
|
+
onClick: P,
|
|
1642
|
+
disabled: u,
|
|
1643
|
+
"aria-label": "Forward",
|
|
1644
|
+
children: /* @__PURE__ */ s(K, {})
|
|
1645
|
+
})
|
|
1646
|
+
]
|
|
1647
|
+
}),
|
|
1648
|
+
/* @__PURE__ */ c("div", {
|
|
1649
|
+
className: "audioplayer-timeline",
|
|
1650
|
+
children: [
|
|
1651
|
+
/* @__PURE__ */ s("span", {
|
|
1652
|
+
className: "audioplayer-time",
|
|
1653
|
+
children: q(x)
|
|
1654
|
+
}),
|
|
1655
|
+
/* @__PURE__ */ s("div", {
|
|
1656
|
+
className: `audioplayer-progress-track ${u ? "audioplayer-icon-disabled" : ""}`,
|
|
1657
|
+
onClick: F,
|
|
1658
|
+
role: "slider",
|
|
1659
|
+
"aria-label": "Seek",
|
|
1660
|
+
"aria-valuemin": 0,
|
|
1661
|
+
"aria-valuemax": C,
|
|
1662
|
+
"aria-valuenow": x,
|
|
1663
|
+
style: { cursor: u ? "not-allowed" : "pointer" },
|
|
1664
|
+
children: /* @__PURE__ */ s("div", {
|
|
1665
|
+
className: "audioplayer-progress-fill",
|
|
1666
|
+
style: { width: `${j}%` }
|
|
1667
|
+
})
|
|
1668
|
+
}),
|
|
1669
|
+
/* @__PURE__ */ s("span", {
|
|
1670
|
+
className: "audioplayer-time",
|
|
1671
|
+
children: q(C)
|
|
1672
|
+
})
|
|
1673
|
+
]
|
|
1674
|
+
}),
|
|
1675
|
+
/* @__PURE__ */ s("div", {
|
|
1676
|
+
className: "audioplayer-volume",
|
|
1677
|
+
children: /* @__PURE__ */ s("button", {
|
|
1678
|
+
type: "button",
|
|
1679
|
+
className: `audioplayer-volume-btn ${u ? "audioplayer-icon-disabled" : ""}`,
|
|
1680
|
+
onClick: I,
|
|
1681
|
+
disabled: u,
|
|
1682
|
+
"aria-label": T ? "Unmute" : "Mute",
|
|
1683
|
+
style: { opacity: T ? .5 : 1 },
|
|
1684
|
+
children: /* @__PURE__ */ s(ee, {})
|
|
1685
|
+
})
|
|
1686
|
+
})
|
|
1687
|
+
]
|
|
1688
|
+
})]
|
|
1689
|
+
});
|
|
1690
|
+
});
|
|
1691
|
+
J.displayName = "AudioPlayer";
|
|
1692
|
+
//#endregion
|
|
1693
|
+
//#region src/components/LinkButton/LinkButton.tsx
|
|
1694
|
+
var Y = () => /* @__PURE__ */ s("svg", {
|
|
1695
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1696
|
+
width: "16",
|
|
1697
|
+
height: "16",
|
|
1698
|
+
viewBox: "0 0 16 16",
|
|
1699
|
+
fill: "none",
|
|
1700
|
+
children: /* @__PURE__ */ s("path", {
|
|
1701
|
+
d: "M8.94126 1.5397C9.07618 1.21202 9.39743 1 9.7508 1H14.1262C14.6081 1 15 1.39192 15 1.8738V6.2492C15 6.60257 14.788 6.92382 14.4603 7.05874C14.1326 7.19367 13.76 7.11657 13.503 6.87242L11.9353 5.30473L7.73979 9.50023C7.39927 9.84075 6.84029 9.84075 6.49977 9.50023C6.15925 9.15971 6.15925 8.60073 6.49977 8.26021L10.6953 4.06471L9.12758 2.49702C8.87701 2.24644 8.79991 1.8738 8.94126 1.5397ZM1 5.8123C1 4.60441 1.97659 3.62139 3.19091 3.62139H5.38183C5.8637 3.62139 6.25562 4.01331 6.25562 4.49518C6.25562 4.97705 5.8637 5.36898 5.38183 5.36898H3.19091C2.95319 5.36898 2.75402 5.56815 2.75402 5.80587V12.8091C2.75402 13.0468 2.95319 13.246 3.19091 13.246H10.1941C10.4318 13.246 10.631 13.0468 10.631 12.8091V10.6182C10.631 10.1363 11.0229 9.74438 11.5048 9.74438C11.9867 9.74438 12.3786 10.1363 12.3786 10.6182V12.8091C12.3786 14.017 11.402 15 10.1877 15H3.19091C1.98302 15 1 14.0234 1 12.8091V5.8123Z",
|
|
1702
|
+
fill: "currentColor"
|
|
1703
|
+
})
|
|
1704
|
+
}), X = {
|
|
1705
|
+
warning: Y,
|
|
1706
|
+
error: Y,
|
|
1707
|
+
disabled: Y,
|
|
1708
|
+
readonly: Y,
|
|
1709
|
+
teal: Y,
|
|
1710
|
+
brand: Y
|
|
1711
|
+
}, Z = e.forwardRef(({ variant: e = "warning", filled: t = !1, label: n = "View Licenses & Billing", className: r = "", disabled: i, style: a, leftIcon: o, rightIcon: l, hasIcon: u = !0, ...d }, f) => {
|
|
1712
|
+
let p = X[e];
|
|
1713
|
+
return /* @__PURE__ */ c("button", {
|
|
1714
|
+
ref: f,
|
|
1715
|
+
className: [
|
|
1716
|
+
"link-button",
|
|
1717
|
+
`link-button--${e}`,
|
|
1718
|
+
t ? "link-button--filled" : "",
|
|
1719
|
+
r
|
|
1720
|
+
].filter(Boolean).join(" "),
|
|
1721
|
+
disabled: i || e === "disabled",
|
|
1722
|
+
style: a,
|
|
1723
|
+
...d,
|
|
1724
|
+
children: [
|
|
1725
|
+
o && /* @__PURE__ */ s("span", {
|
|
1726
|
+
className: "link-button__icon link-button__icon--left",
|
|
1727
|
+
children: o
|
|
1728
|
+
}),
|
|
1729
|
+
/* @__PURE__ */ s("span", {
|
|
1730
|
+
className: "link-button__label",
|
|
1731
|
+
children: n
|
|
1732
|
+
}),
|
|
1733
|
+
l ? /* @__PURE__ */ s("span", {
|
|
1734
|
+
className: "link-button__icon link-button__icon--right",
|
|
1735
|
+
children: l
|
|
1736
|
+
}) : u && p && /* @__PURE__ */ s(p, {})
|
|
1737
|
+
]
|
|
1738
|
+
});
|
|
1739
|
+
});
|
|
1740
|
+
Z.displayName = "LinkButton";
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region src/components/AddOnsCard/AddOnsCard.tsx
|
|
1743
|
+
var Q = ({ className: t = "", title: n = "Eligibility Verification", variant: r = "more-than-1-option", options: i, onAdd: a }) => /* @__PURE__ */ c("div", {
|
|
1744
|
+
className: `addon-card addon-card--${r} ${t}`,
|
|
1745
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1746
|
+
className: "addon-card__title",
|
|
1747
|
+
children: n
|
|
1748
|
+
}), /* @__PURE__ */ s("div", {
|
|
1749
|
+
className: "addon-card__options",
|
|
1750
|
+
children: i.map((t, n) => /* @__PURE__ */ c(e.Fragment, { children: [n > 0 && r === "more-than-1-option" && /* @__PURE__ */ s("div", { className: "addon-card__divider" }), /* @__PURE__ */ c("div", {
|
|
1751
|
+
className: "addon-card__option-row",
|
|
1752
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1753
|
+
className: "addon-card__option-info",
|
|
1754
|
+
children: [
|
|
1755
|
+
/* @__PURE__ */ s("span", {
|
|
1756
|
+
className: "addon-card__verifications",
|
|
1757
|
+
children: t.verifications
|
|
1758
|
+
}),
|
|
1759
|
+
/* @__PURE__ */ s("br", {}),
|
|
1760
|
+
/* @__PURE__ */ s("span", {
|
|
1761
|
+
className: "addon-card__price",
|
|
1762
|
+
children: t.price
|
|
1763
|
+
}),
|
|
1764
|
+
t.provider && /* @__PURE__ */ c("span", {
|
|
1765
|
+
className: "addon-card__provider",
|
|
1766
|
+
children: [" ", t.provider]
|
|
1767
|
+
})
|
|
1768
|
+
]
|
|
1769
|
+
}), /* @__PURE__ */ s("button", {
|
|
1770
|
+
className: "addon-card__add-btn",
|
|
1771
|
+
onClick: () => a?.(t.id),
|
|
1772
|
+
children: "ADD"
|
|
1773
|
+
})]
|
|
1774
|
+
})] }, t.id))
|
|
1775
|
+
})]
|
|
1776
|
+
}), $ = ({ tabs: e = "two-tabs", theme: t = "neutral", className: n = "", onTabChange: r, activeTab: i }) => {
|
|
1777
|
+
let [l, u] = a("unread"), d = i !== void 0, f = d ? i : l, p = (e) => {
|
|
1778
|
+
d || u(e), r?.(e);
|
|
1779
|
+
};
|
|
1780
|
+
return /* @__PURE__ */ c("div", {
|
|
1781
|
+
className: `simple-tab-set ${e} ${t} ${n}`,
|
|
1782
|
+
children: [
|
|
1783
|
+
/* @__PURE__ */ s("div", {
|
|
1784
|
+
className: `slected-tab ${(e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) ? f === "inbox" : f === "unread") ? "active" : ""}`,
|
|
1785
|
+
onClick: () => {
|
|
1786
|
+
p(e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) ? "inbox" : "unread");
|
|
1787
|
+
},
|
|
1788
|
+
children: /* @__PURE__ */ c("div", {
|
|
1789
|
+
className: "inbox",
|
|
1790
|
+
children: [e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) && /* @__PURE__ */ s(o, { children: "Inbox (12)" }), (e === "two-tabs" || t === "teal") && /* @__PURE__ */ s(o, { children: "Unread (2)" })]
|
|
1791
|
+
})
|
|
1792
|
+
}),
|
|
1793
|
+
/* @__PURE__ */ s("div", {
|
|
1794
|
+
className: `non-slected-tab ${(e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) ? f === "unread" : f === "all") ? "active" : ""}`,
|
|
1795
|
+
onClick: () => {
|
|
1796
|
+
p(e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) ? "unread" : "all");
|
|
1797
|
+
},
|
|
1798
|
+
children: /* @__PURE__ */ c("div", {
|
|
1799
|
+
className: "all",
|
|
1800
|
+
children: [e === "two-tabs" && /* @__PURE__ */ s(o, { children: "All" }), e === "more-than-2-tabs" && /* @__PURE__ */ s(o, { children: "Unread (2)" })]
|
|
1801
|
+
})
|
|
1802
|
+
}),
|
|
1803
|
+
e === "more-than-2-tabs" && /* @__PURE__ */ s("div", {
|
|
1804
|
+
className: `non-slected-tab ${e === "more-than-2-tabs" && ["fusia", "neutral"].includes(t) && f === "all" ? "active" : ""}`,
|
|
1805
|
+
onClick: () => p("all"),
|
|
1806
|
+
children: /* @__PURE__ */ s("div", {
|
|
1807
|
+
className: "text-wrapper",
|
|
1808
|
+
children: "All"
|
|
1809
|
+
})
|
|
1810
|
+
})
|
|
1811
|
+
]
|
|
1812
|
+
});
|
|
1813
|
+
}, te = ({ type: e, read: t }) => t ? /* @__PURE__ */ c("svg", {
|
|
1814
|
+
width: "42",
|
|
1815
|
+
height: "42",
|
|
1816
|
+
viewBox: "0 0 42 42",
|
|
1817
|
+
fill: "none",
|
|
1818
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1819
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
1820
|
+
width: "42",
|
|
1821
|
+
height: "42",
|
|
1822
|
+
rx: "21",
|
|
1823
|
+
fill: "var(--Colors-PrimitiveColorTokens-Neutrals-Bkg-300, #E5E4DD)"
|
|
1824
|
+
}), /* @__PURE__ */ s("path", {
|
|
1825
|
+
d: "M20.95 10.765C20.24 10.765 19.67 11.335 19.67 12.045V12.175C16.75 12.765 14.55 15.345 14.55 18.445V19.315C14.55 21.235 13.89 23.105 12.7 24.605L12.31 25.095C12.11 25.345 12 25.655 12 25.985C12 26.765 12.64 27.405 13.42 27.405H28.49C29.27 27.405 29.91 26.765 29.91 25.985C29.91 25.665 29.8 25.345 29.6 25.095L29.21 24.605C28.01 23.105 27.36 21.235 27.36 19.315V18.445C27.36 15.355 25.16 12.765 22.24 12.175V12.045C22.24 11.335 21.67 10.765 20.96 10.765H20.95ZM18.47 29.315C18.75 30.415 19.76 31.235 20.95 31.235C22.14 31.235 23.14 30.415 23.43 29.315H18.47Z",
|
|
1826
|
+
fill: "var(--Colors-PrimitiveColorTokens-Neutrals-Bkg-500, #959490)"
|
|
1827
|
+
})]
|
|
1828
|
+
}) : e === "warning" ? /* @__PURE__ */ c("svg", {
|
|
1829
|
+
width: "42",
|
|
1830
|
+
height: "42",
|
|
1831
|
+
viewBox: "0 0 42 42",
|
|
1832
|
+
fill: "none",
|
|
1833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1834
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
1835
|
+
cx: "21",
|
|
1836
|
+
cy: "21",
|
|
1837
|
+
r: "21",
|
|
1838
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_Warning-Light, #FFD3B1)"
|
|
1839
|
+
}), /* @__PURE__ */ s("path", {
|
|
1840
|
+
d: "M21.23 31.46C26.88 31.46 31.46 26.88 31.46 21.23C31.46 15.58 26.88 11 21.23 11C15.58 11 11 15.58 11 21.23C11 26.88 15.58 31.46 21.23 31.46ZM21.23 16.42C21.76 16.42 22.19 16.85 22.19 17.38V21.86C22.19 22.39 21.76 22.82 21.23 22.82C20.7 22.82 20.27 22.39 20.27 21.86V17.38C20.27 16.85 20.7 16.42 21.23 16.42ZM20.16 25.06C20.14 24.66 20.33 24.29 20.67 24.08C21.01 23.88 21.44 23.88 21.78 24.08C22.12 24.29 22.32 24.66 22.29 25.06C22.31 25.46 22.12 25.83 21.78 26.04C21.44 26.24 21.01 26.24 20.67 26.04C20.33 25.83 20.13 25.46 20.16 25.06Z",
|
|
1841
|
+
fill: "var(--Colors-Navigation-Icons-Alert-Warning-Orange500, #F27E25)"
|
|
1842
|
+
})]
|
|
1843
|
+
}) : /* @__PURE__ */ c("svg", {
|
|
1844
|
+
width: "42",
|
|
1845
|
+
height: "42",
|
|
1846
|
+
viewBox: "0 0 42 42",
|
|
1847
|
+
fill: "none",
|
|
1848
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1849
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
1850
|
+
cx: "21",
|
|
1851
|
+
cy: "21",
|
|
1852
|
+
r: "21",
|
|
1853
|
+
fill: "var(--Colors-Functional-Input-Icons-Icon_Error-Light, #FFD3D2)"
|
|
1854
|
+
}), /* @__PURE__ */ s("path", {
|
|
1855
|
+
d: "M21.2453 10.2439C21.8353 10.2439 22.3753 10.5717 22.6553 11.1044L31.2853 27.4844C31.5553 27.9966 31.5453 28.6112 31.2553 29.1029C30.9653 29.5946 30.4453 29.9019 29.8753 29.9019H12.6053C12.0453 29.9019 11.5253 29.5946 11.2253 29.1029C10.9353 28.6112 10.9253 27.9966 11.1953 27.4844L19.8253 11.1044C20.1053 10.5717 20.6453 10.2439 21.2353 10.2439H21.2453ZM21.2453 17.1278C20.7153 17.1278 20.2853 17.5683 20.2853 18.1112V22.7005C20.2853 23.2434 20.7153 23.6839 21.2453 23.6839C21.7753 23.6839 22.2053 23.2434 22.2053 22.7005V18.1112C22.2053 17.5683 21.7753 17.1278 21.2453 17.1278ZM22.3053 25.9683C22.3253 25.5585 22.1353 25.1795 21.7953 24.9644C21.4553 24.7595 21.0253 24.7595 20.6853 24.9644C20.3453 25.1795 20.1453 25.5585 20.1753 25.9683C20.1553 26.378 20.3453 26.7571 20.6853 26.9722C21.0253 27.1771 21.4553 27.1771 21.7953 26.9722C22.1353 26.7571 22.3353 26.378 22.3053 25.9683Z",
|
|
1856
|
+
fill: "var(--Colors-Navigation-Icons-Alert-High-Red500, #E73D36)"
|
|
1857
|
+
})]
|
|
1858
|
+
}), ne = ({ isNew: e, read: t }) => !e && !t ? null : t ? /* @__PURE__ */ s("svg", {
|
|
1859
|
+
width: "13",
|
|
1860
|
+
height: "13",
|
|
1861
|
+
viewBox: "0 0 13 13",
|
|
1862
|
+
fill: "none",
|
|
1863
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1864
|
+
children: /* @__PURE__ */ s("circle", {
|
|
1865
|
+
cx: "6.5",
|
|
1866
|
+
cy: "6.5",
|
|
1867
|
+
r: "6.5",
|
|
1868
|
+
fill: "var(--Colors-Navigation-Icons-Alert-Count_Inactive-400, #8BA1B9)"
|
|
1869
|
+
})
|
|
1870
|
+
}) : /* @__PURE__ */ s("svg", {
|
|
1871
|
+
width: "13",
|
|
1872
|
+
height: "13",
|
|
1873
|
+
viewBox: "0 0 13 13",
|
|
1874
|
+
fill: "none",
|
|
1875
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1876
|
+
children: /* @__PURE__ */ s("circle", {
|
|
1877
|
+
cx: "6.5",
|
|
1878
|
+
cy: "6.5",
|
|
1879
|
+
r: "6.5",
|
|
1880
|
+
fill: "var(--Colors-Navigation-Icons-Alert-High-Red500, #E73D36)"
|
|
1881
|
+
})
|
|
1882
|
+
}), re = ({ notification: e }) => {
|
|
1883
|
+
let { type: t, subject: n, heading: r, body: i, time: a, isNew: o, read: l, onLinkClick: u, id: d } = e, f = l ? "notification-card--read" : `notification-card--${t}`, p = l ? "notification-card__subject--read" : `notification-card__subject--${t}`;
|
|
1884
|
+
return /* @__PURE__ */ s("div", {
|
|
1885
|
+
className: `notification-card ${f}`,
|
|
1886
|
+
children: /* @__PURE__ */ c("div", {
|
|
1887
|
+
className: "notification-card__content",
|
|
1888
|
+
children: [
|
|
1889
|
+
/* @__PURE__ */ s("div", {
|
|
1890
|
+
className: "notification-card__icon",
|
|
1891
|
+
children: /* @__PURE__ */ s(te, {
|
|
1892
|
+
type: t,
|
|
1893
|
+
read: l
|
|
1894
|
+
})
|
|
1895
|
+
}),
|
|
1896
|
+
/* @__PURE__ */ c("div", {
|
|
1897
|
+
className: "notification-card__details",
|
|
1898
|
+
children: [
|
|
1899
|
+
/* @__PURE__ */ s("span", {
|
|
1900
|
+
className: `notification-card__subject ${p}`,
|
|
1901
|
+
children: n
|
|
1902
|
+
}),
|
|
1903
|
+
/* @__PURE__ */ s("span", {
|
|
1904
|
+
className: "notification-card__heading",
|
|
1905
|
+
children: r
|
|
1906
|
+
}),
|
|
1907
|
+
/* @__PURE__ */ c("div", {
|
|
1908
|
+
className: "notification-card__footer",
|
|
1909
|
+
children: [
|
|
1910
|
+
/* @__PURE__ */ s("span", {
|
|
1911
|
+
className: "notification-card__body",
|
|
1912
|
+
children: i
|
|
1913
|
+
}),
|
|
1914
|
+
/* @__PURE__ */ s(Z, {
|
|
1915
|
+
variant: l ? "readonly" : t === "warning" ? "warning" : "error",
|
|
1916
|
+
label: "View Licenses & Billing",
|
|
1917
|
+
onClick: () => u?.(d)
|
|
1918
|
+
}),
|
|
1919
|
+
/* @__PURE__ */ s("span", {
|
|
1920
|
+
className: "notification-card__time",
|
|
1921
|
+
children: a
|
|
1922
|
+
})
|
|
1923
|
+
]
|
|
1924
|
+
})
|
|
1925
|
+
]
|
|
1926
|
+
}),
|
|
1927
|
+
/* @__PURE__ */ s("div", {
|
|
1928
|
+
className: "notification-card__status",
|
|
1929
|
+
children: /* @__PURE__ */ s(ne, {
|
|
1930
|
+
isNew: o,
|
|
1931
|
+
read: l
|
|
1932
|
+
})
|
|
1933
|
+
})
|
|
1934
|
+
]
|
|
1935
|
+
})
|
|
1936
|
+
});
|
|
1937
|
+
}, ie = () => /* @__PURE__ */ s("svg", {
|
|
1938
|
+
width: "33",
|
|
1939
|
+
height: "33",
|
|
1940
|
+
viewBox: "0 0 33 33",
|
|
1941
|
+
fill: "none",
|
|
1942
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1943
|
+
children: /* @__PURE__ */ s("path", {
|
|
1944
|
+
d: "M24.9841 24.9841C29.672 20.2961 29.672 12.7039 24.9841 8.01594C20.2961 3.32802 12.7039 3.32802 8.01594 8.01594C3.32802 12.7039 3.32802 20.2961 8.01594 24.9841C12.7039 29.672 20.2961 29.672 24.9841 24.9841ZM18.619 20.2062L16.5 18.0872L14.381 20.2062C13.9392 20.6479 13.2356 20.6479 12.7938 20.2062C12.3521 19.7644 12.3521 19.0608 12.7938 18.619L14.9128 16.5L12.7938 14.381C12.3521 13.9392 12.3521 13.2356 12.7938 12.7938C13.2356 12.3521 13.9392 12.3521 14.381 12.7938L16.5 14.9128L18.619 12.7938C19.0608 12.3521 19.7644 12.3521 20.2062 12.7938C20.6479 13.2356 20.6479 13.9392 20.2062 14.381L18.0872 16.5L20.2062 18.619C20.6479 19.0608 20.6479 19.7644 20.2062 20.2062C19.7644 20.6479 19.0608 20.6479 18.619 20.2062Z",
|
|
1945
|
+
fill: "var(--Colors-Navigation-Icons-Gray-Bkg--400, #959490)"
|
|
1946
|
+
})
|
|
1947
|
+
}), ae = () => /* @__PURE__ */ s("svg", {
|
|
1948
|
+
width: "32",
|
|
1949
|
+
height: "32",
|
|
1950
|
+
viewBox: "0 0 32 32",
|
|
1951
|
+
fill: "none",
|
|
1952
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1953
|
+
children: /* @__PURE__ */ s("path", {
|
|
1954
|
+
d: "M23.5073 6.72842C22.8643 6.33294 22.0306 6.53163 21.6351 7.1746L21.5627 7.29233C18.5897 6.20014 15.1603 7.31115 13.4335 10.1185L12.9489 10.9064C11.8795 12.6451 10.2401 13.9709 8.32695 14.6665L7.70083 14.893C7.38045 15.008 7.10816 15.2275 6.92435 15.5263C6.48987 16.2327 6.71296 17.1687 7.41933 17.6032L21.0667 25.9975C21.7731 26.432 22.7091 26.2089 23.1436 25.5025C23.3219 25.2127 23.4005 24.8616 23.3586 24.5238L23.2784 23.8629C23.0272 21.836 23.4802 19.7805 24.5496 18.0418L25.0342 17.2539C26.7554 14.4556 26.2058 10.8847 23.8901 8.72387L23.9625 8.60614C24.358 7.96317 24.1593 7.12948 23.5163 6.734L23.5073 6.72842ZM10.9287 22.1459C10.5695 23.298 11.0274 24.6032 12.1051 25.266C13.1828 25.9289 14.5451 25.7433 15.4205 24.9087L10.9287 22.1459Z",
|
|
1955
|
+
fill: "var(--Colors-Navigation-Icons-Yellow600, #F3B51E)"
|
|
1956
|
+
})
|
|
1957
|
+
}), oe = [
|
|
1958
|
+
{
|
|
1959
|
+
id: "1",
|
|
1960
|
+
type: "warning",
|
|
1961
|
+
subject: "Billing Assistant",
|
|
1962
|
+
heading: "Trial will end in 5 days.",
|
|
1963
|
+
body: "Upgrade to continue using all feature.",
|
|
1964
|
+
time: "10 minutes ago",
|
|
1965
|
+
isNew: !0
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
id: "2",
|
|
1969
|
+
type: "error",
|
|
1970
|
+
subject: "Billing Assistant",
|
|
1971
|
+
heading: "Trial will end in 5 days.",
|
|
1972
|
+
body: "Upgrade to continue using all feature.",
|
|
1973
|
+
time: "10 minutes ago",
|
|
1974
|
+
isNew: !0
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
id: "3",
|
|
1978
|
+
type: "warning",
|
|
1979
|
+
subject: "Billing Assistant",
|
|
1980
|
+
heading: "Trial will end in 5 days.",
|
|
1981
|
+
body: "Upgrade to continue using all feature.",
|
|
1982
|
+
time: "10 minutes ago",
|
|
1983
|
+
isNew: !1,
|
|
1984
|
+
read: !0
|
|
1985
|
+
}
|
|
1986
|
+
], se = ({ className: t = "", notifications: n, tabs: r = "two-tabs", theme: i = "teal", defaultTab: a = "unread", onTabChange: o, onLinkClick: l }) => {
|
|
1987
|
+
let [u, d] = e.useState(a), f = u, p = (e) => {
|
|
1988
|
+
let t = e === "inbox" ? "unread" : e;
|
|
1989
|
+
d(t), o?.(t);
|
|
1990
|
+
}, m = n || oe, h = f === "unread" ? m.filter((e) => e.isNew) : m;
|
|
1991
|
+
return /* @__PURE__ */ c("div", {
|
|
1992
|
+
className: `notification-dropdown-menu ${t}`,
|
|
1993
|
+
children: [
|
|
1994
|
+
/* @__PURE__ */ c("div", {
|
|
1995
|
+
className: "notification-dropdown-menu__header",
|
|
1996
|
+
children: [/* @__PURE__ */ c("div", {
|
|
1997
|
+
className: "notification-dropdown-menu__title-section",
|
|
1998
|
+
children: [/* @__PURE__ */ s("div", {
|
|
1999
|
+
className: "notification-dropdown-menu__bell-icon",
|
|
2000
|
+
children: /* @__PURE__ */ s(ae, {})
|
|
2001
|
+
}), /* @__PURE__ */ s("span", {
|
|
2002
|
+
className: "notification-dropdown-menu__title",
|
|
2003
|
+
children: "Alerts"
|
|
2004
|
+
})]
|
|
2005
|
+
}), /* @__PURE__ */ s("div", {
|
|
2006
|
+
className: "notification-dropdown-menu__close-icon",
|
|
2007
|
+
children: /* @__PURE__ */ s(ie, {})
|
|
2008
|
+
})]
|
|
2009
|
+
}),
|
|
2010
|
+
/* @__PURE__ */ c("div", {
|
|
2011
|
+
className: "notification-dropdown-menu__tab-band",
|
|
2012
|
+
children: [/* @__PURE__ */ s($, {
|
|
2013
|
+
tabs: r,
|
|
2014
|
+
theme: i,
|
|
2015
|
+
onTabChange: p,
|
|
2016
|
+
activeTab: f
|
|
2017
|
+
}), /* @__PURE__ */ s(Z, {
|
|
2018
|
+
hasIcon: !1,
|
|
2019
|
+
variant: "teal",
|
|
2020
|
+
label: "Mark all as read"
|
|
2021
|
+
})]
|
|
2022
|
+
}),
|
|
2023
|
+
/* @__PURE__ */ s("div", {
|
|
2024
|
+
className: "notification-dropdown-menu__notifications",
|
|
2025
|
+
children: h.map((e) => /* @__PURE__ */ s(re, { notification: {
|
|
2026
|
+
...e,
|
|
2027
|
+
onLinkClick: l
|
|
2028
|
+
} }, e.id))
|
|
2029
|
+
})
|
|
2030
|
+
]
|
|
2031
|
+
});
|
|
2032
|
+
}, ce = () => /* @__PURE__ */ s("svg", {
|
|
2033
|
+
width: "9",
|
|
2034
|
+
height: "5",
|
|
2035
|
+
viewBox: "0 0 9 5",
|
|
2036
|
+
fill: "none",
|
|
2037
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2038
|
+
children: /* @__PURE__ */ s("path", {
|
|
2039
|
+
d: "M0.646446 0.646446C0.841708 0.451184 1.15829 0.451184 1.35355 0.646446L4.5 3.79289L7.64644 0.646446C7.84171 0.451184 8.15829 0.451184 8.35355 0.646446C8.54882 0.841708 8.54882 1.15829 8.35355 1.35355L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14644 4.85355L0.646446 1.35355C0.451184 1.15829 0.451184 0.841708 0.646446 0.646446Z",
|
|
2040
|
+
fill: "currentColor"
|
|
2041
|
+
})
|
|
2042
|
+
}), le = ({ className: e = "", label: t = "Input_Label", placeholder: r = "Select", options: o, value: l, onChange: u, state: d = "default", size: f = "md" }) => {
|
|
2043
|
+
let [p, m] = a(!1), [h, g] = a(""), _ = i(null), v = l !== void 0, y = v ? l : h, b = o.find((e) => e.value === y), x = (e) => {
|
|
2044
|
+
v || g(e), u?.(e), m(!1);
|
|
2045
|
+
}, S = (e) => {
|
|
2046
|
+
_.current && !_.current.contains(e.target) && m(!1);
|
|
2047
|
+
};
|
|
2048
|
+
return n(() => (p ? document.addEventListener("mousedown", S) : document.removeEventListener("mousedown", S), () => {
|
|
2049
|
+
document.removeEventListener("mousedown", S);
|
|
2050
|
+
}), [p]), /* @__PURE__ */ c("div", {
|
|
2051
|
+
className: [
|
|
2052
|
+
"single-select-dropdown",
|
|
2053
|
+
`single-select-dropdown--${f}`,
|
|
2054
|
+
(() => {
|
|
2055
|
+
if (p) return "single-select-dropdown--focus";
|
|
2056
|
+
switch (d) {
|
|
2057
|
+
case "focus": return "single-select-dropdown--focus";
|
|
2058
|
+
case "hover": return "single-select-dropdown--hover";
|
|
2059
|
+
case "selected": return "single-select-dropdown--selected";
|
|
2060
|
+
case "disabled": return "single-select-dropdown--disabled";
|
|
2061
|
+
default: return "";
|
|
2062
|
+
}
|
|
2063
|
+
})(),
|
|
2064
|
+
e
|
|
2065
|
+
].filter(Boolean).join(" "),
|
|
2066
|
+
ref: _,
|
|
2067
|
+
children: [/* @__PURE__ */ s("label", {
|
|
2068
|
+
className: "single-select-dropdown__label",
|
|
2069
|
+
children: t
|
|
2070
|
+
}), /* @__PURE__ */ c("div", {
|
|
2071
|
+
className: "single-select-dropdown__select-container",
|
|
2072
|
+
onClick: () => !d.includes("disabled") && m(!p),
|
|
2073
|
+
children: [/* @__PURE__ */ c("div", {
|
|
2074
|
+
className: "single-select-dropdown__select",
|
|
2075
|
+
children: [/* @__PURE__ */ s("span", {
|
|
2076
|
+
className: `single-select-dropdown__value ${b ? "" : "single-select-dropdown__value--placeholder"}`,
|
|
2077
|
+
children: b ? b.label : r
|
|
2078
|
+
}), /* @__PURE__ */ s("span", {
|
|
2079
|
+
className: "single-select-dropdown__caret",
|
|
2080
|
+
children: /* @__PURE__ */ s(ce, {})
|
|
2081
|
+
})]
|
|
2082
|
+
}), p && /* @__PURE__ */ s("div", {
|
|
2083
|
+
className: "single-select-dropdown__dropdown",
|
|
2084
|
+
children: o.map((e) => /* @__PURE__ */ s("div", {
|
|
2085
|
+
className: `single-select-dropdown__option ${e.value === y ? "single-select-dropdown__option--selected" : ""}`,
|
|
2086
|
+
onClick: (t) => {
|
|
2087
|
+
t.stopPropagation(), x(e.value);
|
|
2088
|
+
},
|
|
2089
|
+
children: /* @__PURE__ */ s("span", { children: e.label })
|
|
2090
|
+
}, e.value))
|
|
2091
|
+
})]
|
|
2092
|
+
})]
|
|
2093
|
+
});
|
|
2094
|
+
}, ue = ({ isOpen: e }) => /* @__PURE__ */ s("svg", {
|
|
2095
|
+
width: "24",
|
|
2096
|
+
height: "24",
|
|
2097
|
+
viewBox: "0 0 24 24",
|
|
2098
|
+
fill: "none",
|
|
2099
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2100
|
+
style: {
|
|
2101
|
+
transform: e ? "rotate(180deg)" : "none",
|
|
2102
|
+
transition: "transform 0.2s"
|
|
2103
|
+
},
|
|
2104
|
+
children: /* @__PURE__ */ s("path", {
|
|
2105
|
+
fillRule: "evenodd",
|
|
2106
|
+
clipRule: "evenodd",
|
|
2107
|
+
d: "M7.12636 9.63447C7.20737 9.54836 7.31719 9.5 7.43169 9.5C7.54618 9.5 7.656 9.54836 7.73701 9.63447L11.4032 13.5359C11.4166 13.5502 11.4325 13.5615 11.45 13.5692C11.4675 13.577 11.4863 13.5809 11.5052 13.5809C11.5241 13.5809 11.5429 13.577 11.5604 13.5692C11.5779 13.5615 11.5938 13.5502 11.6072 13.5359L15.2734 9.63447C15.3553 9.55325 15.4636 9.50903 15.5756 9.51114C15.6875 9.51324 15.7943 9.56149 15.8735 9.64573C15.9526 9.72997 15.998 9.84362 15.9999 9.96274C16.0019 10.0819 15.9604 10.1971 15.884 10.2843L12.2178 14.1857C12.1242 14.2854 12.0131 14.3644 11.8907 14.4183C11.7684 14.4722 11.6373 14.5 11.5049 14.5C11.3725 14.5 11.2414 14.4722 11.1191 14.4183C10.9968 14.3644 10.8856 14.2854 10.792 14.1857L7.12636 10.2843C7.04545 10.1981 7 10.0812 7 9.95938C7 9.83754 7.04545 9.72068 7.12636 9.63447Z",
|
|
2108
|
+
fill: "currentColor"
|
|
2109
|
+
})
|
|
2110
|
+
}), de = ({ className: e = "", label: t = "Input_Label", placeholder: r = "Select", options: o, value: l, onChange: u, state: d = "default", size: p = "md" }) => {
|
|
2111
|
+
let [m, h] = a(!1), [g, _] = a([]), v = i(null), y = l !== void 0, b = y ? l : g, x = (e) => {
|
|
2112
|
+
let t = b.includes(e) ? b.filter((t) => t !== e) : [...b, e];
|
|
2113
|
+
y || _(t), u?.(t);
|
|
2114
|
+
}, S = () => {
|
|
2115
|
+
let e = o.map((e) => e.value), t = b.length === o.length ? [] : e;
|
|
2116
|
+
y || _(t), u?.(t);
|
|
2117
|
+
}, C = (e) => {
|
|
2118
|
+
v.current && !v.current.contains(e.target) && h(!1);
|
|
2119
|
+
};
|
|
2120
|
+
n(() => (m ? document.addEventListener("mousedown", C) : document.removeEventListener("mousedown", C), () => {
|
|
2121
|
+
document.removeEventListener("mousedown", C);
|
|
2122
|
+
}), [m]);
|
|
2123
|
+
let w = [
|
|
2124
|
+
"multi-select-dropdown",
|
|
2125
|
+
`multi-select-dropdown--${p}`,
|
|
2126
|
+
(() => {
|
|
2127
|
+
switch (d) {
|
|
2128
|
+
case "disabled": return "multi-select-dropdown--disabled";
|
|
2129
|
+
case "readonly": return "multi-select-dropdown--readonly";
|
|
2130
|
+
default: return "";
|
|
2131
|
+
}
|
|
2132
|
+
})(),
|
|
2133
|
+
e
|
|
2134
|
+
].filter(Boolean).join(" "), T = o.filter((e) => b.includes(e.value)), E = T.length > 0 ? T.map((e) => e.label).join(", ") : r, D = b.length === o.length, O = b.length > 0 && !D;
|
|
2135
|
+
return /* @__PURE__ */ c("div", {
|
|
2136
|
+
className: w,
|
|
2137
|
+
ref: v,
|
|
2138
|
+
children: [/* @__PURE__ */ s("label", {
|
|
2139
|
+
className: "multi-select-dropdown__label",
|
|
2140
|
+
children: t
|
|
2141
|
+
}), /* @__PURE__ */ c("div", {
|
|
2142
|
+
className: "multi-select-dropdown__select-container",
|
|
2143
|
+
onClick: () => d === "default" && h(!m),
|
|
2144
|
+
children: [/* @__PURE__ */ c("div", {
|
|
2145
|
+
className: "multi-select-dropdown__select",
|
|
2146
|
+
children: [
|
|
2147
|
+
/* @__PURE__ */ s("div", {
|
|
2148
|
+
className: "multi-select-dropdown__checkbox-icon",
|
|
2149
|
+
children: /* @__PURE__ */ s(f, {
|
|
2150
|
+
checked: D,
|
|
2151
|
+
indeterminate: O,
|
|
2152
|
+
label: "",
|
|
2153
|
+
className: "multi-select-dropdown__base-checkbox"
|
|
2154
|
+
})
|
|
2155
|
+
}),
|
|
2156
|
+
/* @__PURE__ */ s("div", {
|
|
2157
|
+
className: "multi-select-dropdown__value",
|
|
2158
|
+
children: E
|
|
2159
|
+
}),
|
|
2160
|
+
/* @__PURE__ */ s("span", {
|
|
2161
|
+
className: "multi-select-dropdown__caret",
|
|
2162
|
+
children: /* @__PURE__ */ s(ue, { isOpen: m })
|
|
2163
|
+
})
|
|
2164
|
+
]
|
|
2165
|
+
}), m && /* @__PURE__ */ c("div", {
|
|
2166
|
+
className: "multi-select-dropdown__dropdown",
|
|
2167
|
+
children: [/* @__PURE__ */ c("div", {
|
|
2168
|
+
className: `multi-select-dropdown__option ${D ? "multi-select-dropdown__option--selected" : ""}`,
|
|
2169
|
+
onClick: (e) => {
|
|
2170
|
+
e.stopPropagation(), S();
|
|
2171
|
+
},
|
|
2172
|
+
children: [/* @__PURE__ */ s("div", {
|
|
2173
|
+
className: "multi-select-dropdown__option-checkbox",
|
|
2174
|
+
children: /* @__PURE__ */ s(f, {
|
|
2175
|
+
checked: D,
|
|
2176
|
+
indeterminate: O,
|
|
2177
|
+
label: "",
|
|
2178
|
+
className: "multi-select-dropdown__base-checkbox"
|
|
2179
|
+
})
|
|
2180
|
+
}), /* @__PURE__ */ s("span", {
|
|
2181
|
+
className: "multi-select-dropdown__option-text",
|
|
2182
|
+
children: "Select All"
|
|
2183
|
+
})]
|
|
2184
|
+
}), o.map((e) => /* @__PURE__ */ c("div", {
|
|
2185
|
+
className: `multi-select-dropdown__option ${b.includes(e.value) ? "multi-select-dropdown__option--selected" : ""}`,
|
|
2186
|
+
onClick: (t) => {
|
|
2187
|
+
t.stopPropagation(), x(e.value);
|
|
2188
|
+
},
|
|
2189
|
+
children: [/* @__PURE__ */ s("div", {
|
|
2190
|
+
className: "multi-select-dropdown__option-checkbox",
|
|
2191
|
+
children: /* @__PURE__ */ s(f, {
|
|
2192
|
+
checked: b.includes(e.value),
|
|
2193
|
+
label: "",
|
|
2194
|
+
className: "multi-select-dropdown__base-checkbox"
|
|
2195
|
+
})
|
|
2196
|
+
}), /* @__PURE__ */ s("span", {
|
|
2197
|
+
className: "multi-select-dropdown__option-text",
|
|
2198
|
+
children: e.label
|
|
2199
|
+
})]
|
|
2200
|
+
}, e.value))]
|
|
2201
|
+
})]
|
|
2202
|
+
})]
|
|
2203
|
+
});
|
|
2204
|
+
}, fe = ({ className: e = "", title: t, value: n, statusText: r, type: i = "info", icon: a }) => /* @__PURE__ */ s("div", {
|
|
2205
|
+
className: `dashboard-widget dashboard-widget--${i} ${e}`,
|
|
2206
|
+
children: /* @__PURE__ */ c("div", {
|
|
2207
|
+
className: "dashboard-widget__content",
|
|
2208
|
+
children: [/* @__PURE__ */ c("div", {
|
|
2209
|
+
className: "dashboard-widget__details",
|
|
2210
|
+
children: [
|
|
2211
|
+
/* @__PURE__ */ s("div", {
|
|
2212
|
+
className: "dashboard-widget__title",
|
|
2213
|
+
children: t
|
|
2214
|
+
}),
|
|
2215
|
+
/* @__PURE__ */ s("div", {
|
|
2216
|
+
className: "dashboard-widget__value",
|
|
2217
|
+
children: n
|
|
2218
|
+
}),
|
|
2219
|
+
/* @__PURE__ */ s("div", {
|
|
2220
|
+
className: "dashboard-widget__status",
|
|
2221
|
+
children: r
|
|
2222
|
+
})
|
|
2223
|
+
]
|
|
2224
|
+
}), /* @__PURE__ */ s("div", {
|
|
2225
|
+
className: "dashboard-widget__icon-container",
|
|
2226
|
+
children: /* @__PURE__ */ s("div", {
|
|
2227
|
+
className: "dashboard-widget__icon-box",
|
|
2228
|
+
children: a || /* @__PURE__ */ s("svg", {
|
|
2229
|
+
className: "dashboard-widget__default-icon",
|
|
2230
|
+
width: "19",
|
|
2231
|
+
height: "19",
|
|
2232
|
+
viewBox: "0 0 19 19",
|
|
2233
|
+
fill: "none",
|
|
2234
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2235
|
+
children: /* @__PURE__ */ s("path", {
|
|
2236
|
+
d: "M1.18164 3.54366C1.18164 2.24322 2.24323 1.18164 3.54367 1.18164H15.3626C16.663 1.18164 17.7246 2.24322 17.7246 3.54366V15.3626C17.7246 16.663 16.663 17.7246 15.3626 17.7246H3.54367C2.24323 17.7246 1.18164 16.663 1.18164 15.3626V3.54366ZM3.54367 5.90567V15.3537H6.53379V5.90567H3.54367ZM15.3538 5.90567H8.85157V15.3537H15.3538V5.90567Z",
|
|
2237
|
+
fill: "currentColor"
|
|
2238
|
+
})
|
|
2239
|
+
})
|
|
2240
|
+
})
|
|
2241
|
+
})]
|
|
2242
|
+
})
|
|
2243
|
+
}), pe = { fontFamily: "var(--FontFamily-Family, \"DM Sans\", sans-serif)" }, me = e.forwardRef(({ label: t, helperText: n, error: r = !1, errorMessage: i, showCount: a = !1, maxLength: o, required: l = !1, readOnly: u = !1, disabled: d = !1, className: f = "", value: p, defaultValue: m, onChange: h, id: g, ..._ }, v) => {
|
|
2244
|
+
let [y, b] = e.useState(m || ""), x = p !== void 0, S = x ? p : y, C = String(S || "").length, w = g || `textarea-${Math.random().toString(36).substring(2, 9)}`;
|
|
2245
|
+
return /* @__PURE__ */ c("div", {
|
|
2246
|
+
className: [
|
|
2247
|
+
"textarea-container",
|
|
2248
|
+
r ? "textarea-container--error" : "",
|
|
2249
|
+
d ? "textarea-container--disabled" : "",
|
|
2250
|
+
u ? "textarea-container--readonly" : "",
|
|
2251
|
+
f
|
|
2252
|
+
].filter(Boolean).join(" "),
|
|
2253
|
+
style: pe,
|
|
2254
|
+
children: [
|
|
2255
|
+
/* @__PURE__ */ c("div", {
|
|
2256
|
+
className: "textarea__header",
|
|
2257
|
+
children: [t && /* @__PURE__ */ c("label", {
|
|
2258
|
+
htmlFor: w,
|
|
2259
|
+
className: "textarea__label",
|
|
2260
|
+
children: [t, l && /* @__PURE__ */ s("span", {
|
|
2261
|
+
className: "textarea__required",
|
|
2262
|
+
children: "*"
|
|
2263
|
+
})]
|
|
2264
|
+
}), a && o && /* @__PURE__ */ c("span", {
|
|
2265
|
+
className: "textarea__count",
|
|
2266
|
+
children: [
|
|
2267
|
+
C,
|
|
2268
|
+
"/",
|
|
2269
|
+
o
|
|
2270
|
+
]
|
|
2271
|
+
})]
|
|
2272
|
+
}),
|
|
2273
|
+
/* @__PURE__ */ c("div", {
|
|
2274
|
+
className: "textarea__wrapper",
|
|
2275
|
+
children: [/* @__PURE__ */ s("textarea", {
|
|
2276
|
+
ref: v,
|
|
2277
|
+
id: w,
|
|
2278
|
+
className: "textarea__input",
|
|
2279
|
+
value: p,
|
|
2280
|
+
defaultValue: m,
|
|
2281
|
+
onChange: (e) => {
|
|
2282
|
+
x || b(e.target.value), h && h(e);
|
|
2283
|
+
},
|
|
2284
|
+
maxLength: o,
|
|
2285
|
+
disabled: d,
|
|
2286
|
+
readOnly: u,
|
|
2287
|
+
..._
|
|
2288
|
+
}), r && /* @__PURE__ */ s("div", {
|
|
2289
|
+
className: "textarea__error-icon",
|
|
2290
|
+
children: /* @__PURE__ */ c("svg", {
|
|
2291
|
+
width: "12",
|
|
2292
|
+
height: "12",
|
|
2293
|
+
viewBox: "0 0 12 12",
|
|
2294
|
+
fill: "none",
|
|
2295
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2296
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
2297
|
+
width: "12",
|
|
2298
|
+
height: "12",
|
|
2299
|
+
fill: "currentColor"
|
|
2300
|
+
}), /* @__PURE__ */ s("path", {
|
|
2301
|
+
d: "M6 3V7M6 9H6.01",
|
|
2302
|
+
stroke: "white",
|
|
2303
|
+
strokeWidth: "1.5",
|
|
2304
|
+
strokeLinecap: "round",
|
|
2305
|
+
strokeLinejoin: "round"
|
|
2306
|
+
})]
|
|
2307
|
+
})
|
|
2308
|
+
})]
|
|
2309
|
+
}),
|
|
2310
|
+
r && i || n ? /* @__PURE__ */ s("div", {
|
|
2311
|
+
className: "textarea__footer",
|
|
2312
|
+
children: r && i ? /* @__PURE__ */ s("span", {
|
|
2313
|
+
className: "textarea__error-message",
|
|
2314
|
+
children: i
|
|
2315
|
+
}) : n && /* @__PURE__ */ s("span", {
|
|
2316
|
+
className: "textarea__helper-text",
|
|
2317
|
+
children: n
|
|
2318
|
+
})
|
|
2319
|
+
}) : null
|
|
2320
|
+
]
|
|
2321
|
+
});
|
|
2322
|
+
});
|
|
2323
|
+
me.displayName = "TextArea";
|
|
841
2324
|
//#endregion
|
|
842
|
-
export {
|
|
2325
|
+
export { Q as AddOnsCard, H as AdminTopNav, J as AudioPlayer, u as Button, f as Checkbox, fe as DashboardWidget, h as DatePicker, _ as InputField, y as InputFieldIcon, x as InputFieldPhone, Z as LinkButton, de as MultiSelectDropDown, V as NavigationDropDown, se as NotificationDropDownMenu, C as PillBadge, T as ProgressBar, D as RadioButton, B as SearchBox, $ as SimpleTab, R as SimpleTable, le as SingleSelectDropDown, A as StateBadge, N as Switch, I as SwitchWithLabel, L as Table, me as TextArea };
|