@sito/ui 0.1.5 → 0.2.0
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/LICENSE +21 -21
- package/README.md +33 -2
- package/dist/components/Button/Button.d.ts +2 -3
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/types.d.ts +26 -6
- package/dist/components/Dialog/Dialog.d.ts +7 -0
- package/dist/components/Dialog/DialogActions.d.ts +7 -0
- package/dist/components/Dialog/constants.d.ts +3 -0
- package/dist/components/Dialog/index.d.ts +3 -0
- package/dist/components/Dialog/types.d.ts +58 -0
- package/dist/components/Dialog/utils.d.ts +19 -0
- package/dist/components/IconButton/IconButton.d.ts +2 -3
- package/dist/components/IconButton/index.d.ts +2 -2
- package/dist/components/IconButton/types.d.ts +13 -5
- package/dist/components/index.d.ts +6 -10
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/useDialog/index.d.ts +2 -0
- package/dist/hooks/useDialog/types.d.ts +7 -0
- package/dist/hooks/useDialog/useDialog.d.ts +7 -0
- package/dist/main.d.ts +4 -3
- package/dist/styles.css +327 -0
- package/dist/theme.css +76 -0
- package/dist/ui.cjs +1 -11
- package/dist/ui.d.ts +2 -1
- package/dist/ui.js +210 -1732
- package/dist/utils/classNames.d.ts +6 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +82 -54
- package/dist/components/Button/styles.d.ts +0 -5
- package/dist/components/Error/Error.d.ts +0 -3
- package/dist/components/Error/Handler.d.ts +0 -3
- package/dist/components/Error/index.d.ts +0 -4
- package/dist/components/Error/styles.d.ts +0 -4
- package/dist/components/Error/types.d.ts +0 -18
- package/dist/components/Image/Image.d.ts +0 -3
- package/dist/components/Image/index.d.ts +0 -3
- package/dist/components/Image/styles.d.ts +0 -9
- package/dist/components/Image/types.d.ts +0 -4
- package/dist/components/InputControl/Input.d.ts +0 -4
- package/dist/components/InputControl/Select.d.ts +0 -4
- package/dist/components/InputControl/Textarea.d.ts +0 -4
- package/dist/components/InputControl/index.d.ts +0 -5
- package/dist/components/InputControl/styles.d.ts +0 -4
- package/dist/components/InputControl/types.d.ts +0 -33
- package/dist/components/Loading/Loading.d.ts +0 -3
- package/dist/components/Loading/index.d.ts +0 -3
- package/dist/components/Loading/styles.d.ts +0 -11
- package/dist/components/Loading/types.d.ts +0 -8
- package/dist/components/Notification/Notification.d.ts +0 -2
- package/dist/components/Notification/index.d.ts +0 -3
- package/dist/components/Notification/styles.d.ts +0 -9
- package/dist/components/Notification/types.d.ts +0 -4
- package/dist/components/PrintAfter/PrintAfter.d.ts +0 -4
- package/dist/components/PrintAfter/index.d.ts +0 -3
- package/dist/components/PrintAfter/types.d.ts +0 -7
- package/dist/components/SplashScreen/SplashScreen.d.ts +0 -3
- package/dist/components/SplashScreen/index.d.ts +0 -3
- package/dist/components/SplashScreen/styles.d.ts +0 -9
- package/dist/components/SplashScreen/types.d.ts +0 -9
- package/dist/components/Switch/Switch.d.ts +0 -4
- package/dist/components/Switch/index.d.ts +0 -3
- package/dist/components/Switch/styles.d.ts +0 -4
- package/dist/components/Switch/types.d.ts +0 -8
- package/dist/hooks/useIsElementInViewport/index.d.ts +0 -5
- package/dist/hooks/useScreenHandler/index.d.ts +0 -7
- package/dist/lib/Notification.d.ts +0 -11
- package/dist/lib/index.d.ts +0 -3
- package/dist/main.css +0 -1
- package/dist/providers/ModeProvider/ModeProvider.d.ts +0 -3
- package/dist/providers/ModeProvider/index.d.ts +0 -2
- package/dist/providers/ModeProvider/types.d.ts +0 -10
- package/dist/providers/NotificationProvider/NotificationProvider.d.ts +0 -7
- package/dist/providers/NotificationProvider/index.d.ts +0 -2
- package/dist/providers/NotificationProvider/types.d.ts +0 -20
- package/dist/providers/StyleProvider/StyleProvider.d.ts +0 -4
- package/dist/providers/StyleProvider/data.d.ts +0 -4
- package/dist/providers/StyleProvider/index.d.ts +0 -3
- package/dist/providers/StyleProvider/types.d.ts +0 -27
- package/dist/providers/index.d.ts +0 -3
package/dist/ui.js
CHANGED
|
@@ -1,1733 +1,211 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
d += Dt(I);
|
|
210
|
-
break;
|
|
211
|
-
case 92:
|
|
212
|
-
d += yt(X() - 1, 7);
|
|
213
|
-
continue;
|
|
214
|
-
case 47:
|
|
215
|
-
switch (b()) {
|
|
216
|
-
case 42:
|
|
217
|
-
case 47:
|
|
218
|
-
q(zt(dt(x(), X()), t, r), a);
|
|
219
|
-
break;
|
|
220
|
-
default:
|
|
221
|
-
d += "/";
|
|
222
|
-
}
|
|
223
|
-
break;
|
|
224
|
-
case 123 * j:
|
|
225
|
-
o[u++] = C(d) * z;
|
|
226
|
-
case 125 * j:
|
|
227
|
-
case 59:
|
|
228
|
-
case 0:
|
|
229
|
-
switch (O) {
|
|
230
|
-
case 0:
|
|
231
|
-
case 125:
|
|
232
|
-
A = 0;
|
|
233
|
-
case 59 + M:
|
|
234
|
-
z == -1 && (d = D(d, /\f/g, "")), f > 0 && C(d) - l && q(f > 32 ? Te(d + ";", n, r, l - 1) : Te(D(d, " ", "") + ";", n, r, l - 2), a);
|
|
235
|
-
break;
|
|
236
|
-
case 59:
|
|
237
|
-
d += ";";
|
|
238
|
-
default:
|
|
239
|
-
if (q(E = Oe(d, t, r, u, M, s, o, S, B = [], U = [], l), i), O === 123)
|
|
240
|
-
if (M === 0)
|
|
241
|
-
te(d, t, E, E, B, i, l, o, U);
|
|
242
|
-
else
|
|
243
|
-
switch (y === 99 && T(d, 3) === 110 ? 100 : y) {
|
|
244
|
-
case 100:
|
|
245
|
-
case 108:
|
|
246
|
-
case 109:
|
|
247
|
-
case 115:
|
|
248
|
-
te(e, E, E, n && q(Oe(e, E, E, 0, 0, s, o, S, s, B = [], l), U), s, U, l, o, n ? B : U);
|
|
249
|
-
break;
|
|
250
|
-
default:
|
|
251
|
-
te(d, E, E, E, [""], U, 0, o, U);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
u = M = f = 0, j = z = 1, S = d = "", l = c;
|
|
255
|
-
break;
|
|
256
|
-
case 58:
|
|
257
|
-
l = 1 + C(d), f = I;
|
|
258
|
-
default:
|
|
259
|
-
if (j < 1) {
|
|
260
|
-
if (O == 123)
|
|
261
|
-
--j;
|
|
262
|
-
else if (O == 125 && j++ == 0 && gt() == 125)
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
switch (d += oe(O), O * j) {
|
|
266
|
-
case 38:
|
|
267
|
-
z = M > 0 ? 1 : (d += "\f", -1);
|
|
268
|
-
break;
|
|
269
|
-
case 44:
|
|
270
|
-
o[u++] = (C(d) - 1) * z, z = 1;
|
|
271
|
-
break;
|
|
272
|
-
case 64:
|
|
273
|
-
b() === 45 && (d += ee(x())), y = b(), M = l = C(S = d += It(X())), O++;
|
|
274
|
-
break;
|
|
275
|
-
case 45:
|
|
276
|
-
I === 45 && C(d) == 2 && (j = 0);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
return i;
|
|
280
|
-
}
|
|
281
|
-
function Oe(e, t, r, n, s, i, c, o, a, u, M) {
|
|
282
|
-
for (var l = s - 1, y = s === 0 ? i : [""], f = ze(y), I = 0, j = 0, A = 0; I < n; ++I)
|
|
283
|
-
for (var z = 0, O = Z(e, l + 1, l = at(j = c[I])), S = e; z < f; ++z)
|
|
284
|
-
(S = $e(j > 0 ? y[z] + " " + O : D(O, /&\f/g, y[z]))) && (a[A++] = S);
|
|
285
|
-
return ae(e, t, r, s === 0 ? Ie : o, a, u, M);
|
|
286
|
-
}
|
|
287
|
-
function zt(e, t, r) {
|
|
288
|
-
return ae(e, t, r, de, oe(jt()), Z(e, 2, -2), 0);
|
|
289
|
-
}
|
|
290
|
-
function Te(e, t, r, n) {
|
|
291
|
-
return ae(e, t, r, fe, Z(e, 0, n), Z(e, n + 1, -1), n);
|
|
292
|
-
}
|
|
293
|
-
function R(e, t) {
|
|
294
|
-
for (var r = "", n = ze(e), s = 0; s < n; s++)
|
|
295
|
-
r += t(e[s], s, e, t) || "";
|
|
296
|
-
return r;
|
|
297
|
-
}
|
|
298
|
-
function ht(e, t, r, n) {
|
|
299
|
-
switch (e.type) {
|
|
300
|
-
case ct:
|
|
301
|
-
if (e.children.length)
|
|
302
|
-
break;
|
|
303
|
-
case ot:
|
|
304
|
-
case fe:
|
|
305
|
-
return e.return = e.return || e.value;
|
|
306
|
-
case de:
|
|
307
|
-
return "";
|
|
308
|
-
case Ye:
|
|
309
|
-
return e.return = e.value + "{" + R(e.children, n) + "}";
|
|
310
|
-
case Ie:
|
|
311
|
-
e.value = e.props.join(",");
|
|
312
|
-
}
|
|
313
|
-
return C(r = R(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
314
|
-
}
|
|
315
|
-
function At(e) {
|
|
316
|
-
var t = ze(e);
|
|
317
|
-
return function(r, n, s, i) {
|
|
318
|
-
for (var c = "", o = 0; o < t; o++)
|
|
319
|
-
c += e[o](r, n, s, i) || "";
|
|
320
|
-
return c;
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
function Ot(e) {
|
|
324
|
-
return function(t) {
|
|
325
|
-
t.root || (t = t.return) && e(t);
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
function Tt(e) {
|
|
329
|
-
var t = /* @__PURE__ */ Object.create(null);
|
|
330
|
-
return function(r) {
|
|
331
|
-
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
var pt = function(t, r, n) {
|
|
335
|
-
for (var s = 0, i = 0; s = i, i = b(), s === 38 && i === 12 && (r[n] = 1), !J(i); )
|
|
336
|
-
x();
|
|
337
|
-
return K(t, L);
|
|
338
|
-
}, Lt = function(t, r) {
|
|
339
|
-
var n = -1, s = 44;
|
|
340
|
-
do
|
|
341
|
-
switch (J(s)) {
|
|
342
|
-
case 0:
|
|
343
|
-
s === 38 && b() === 12 && (r[n] = 1), t[n] += pt(L - 1, r, n);
|
|
344
|
-
break;
|
|
345
|
-
case 2:
|
|
346
|
-
t[n] += ee(s);
|
|
347
|
-
break;
|
|
348
|
-
case 4:
|
|
349
|
-
if (s === 44) {
|
|
350
|
-
t[++n] = b() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
351
|
-
break;
|
|
352
|
-
}
|
|
353
|
-
default:
|
|
354
|
-
t[n] += oe(s);
|
|
355
|
-
}
|
|
356
|
-
while (s = x());
|
|
357
|
-
return t;
|
|
358
|
-
}, xt = function(t, r) {
|
|
359
|
-
return Pe(Lt(Ve(t), r));
|
|
360
|
-
}, pe = /* @__PURE__ */ new WeakMap(), mt = function(t) {
|
|
361
|
-
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
362
|
-
// negative .length indicates that this rule has been already prefixed
|
|
363
|
-
t.length < 1)) {
|
|
364
|
-
for (var r = t.value, n = t.parent, s = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
365
|
-
if (n = n.parent, !n)
|
|
366
|
-
return;
|
|
367
|
-
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !pe.get(n)) && !s) {
|
|
368
|
-
pe.set(t, !0);
|
|
369
|
-
for (var i = [], c = xt(r, i), o = n.props, a = 0, u = 0; a < c.length; a++)
|
|
370
|
-
for (var M = 0; M < o.length; M++, u++)
|
|
371
|
-
t.props[u] = i[a] ? c[a].replace(/&\f/g, o[M]) : o[M] + " " + c[a];
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}, wt = function(t) {
|
|
375
|
-
if (t.type === "decl") {
|
|
376
|
-
var r = t.value;
|
|
377
|
-
// charcode for l
|
|
378
|
-
r.charCodeAt(0) === 108 && // charcode for b
|
|
379
|
-
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
380
|
-
}
|
|
381
|
-
}, St = "emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason", Et = function(t) {
|
|
382
|
-
return t.type === "comm" && t.children.indexOf(St) > -1;
|
|
383
|
-
}, kt = function(t) {
|
|
384
|
-
return function(r, n, s) {
|
|
385
|
-
if (!(r.type !== "rule" || t.compat)) {
|
|
386
|
-
var i = r.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
387
|
-
if (i) {
|
|
388
|
-
for (var c = !!r.parent, o = c ? r.parent.children : (
|
|
389
|
-
// global rule at the root level
|
|
390
|
-
s
|
|
391
|
-
), a = o.length - 1; a >= 0; a--) {
|
|
392
|
-
var u = o[a];
|
|
393
|
-
if (u.line < r.line)
|
|
394
|
-
break;
|
|
395
|
-
if (u.column < r.column) {
|
|
396
|
-
if (Et(u))
|
|
397
|
-
return;
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
i.forEach(function(M) {
|
|
402
|
-
console.error('The pseudo class "' + M + '" is potentially unsafe when doing server-side rendering. Try changing it to "' + M.split("-child")[0] + '-of-type".');
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
|
-
}, _e = function(t) {
|
|
408
|
-
return t.type.charCodeAt(1) === 105 && t.type.charCodeAt(0) === 64;
|
|
409
|
-
}, Ct = function(t, r) {
|
|
410
|
-
for (var n = t - 1; n >= 0; n--)
|
|
411
|
-
if (!_e(r[n]))
|
|
412
|
-
return !0;
|
|
413
|
-
return !1;
|
|
414
|
-
}, Le = function(t) {
|
|
415
|
-
t.type = "", t.value = "", t.return = "", t.children = "", t.props = "";
|
|
416
|
-
}, bt = function(t, r, n) {
|
|
417
|
-
_e(t) && (t.parent ? (console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."), Le(t)) : Ct(r, n) && (console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."), Le(t)));
|
|
418
|
-
};
|
|
419
|
-
function We(e, t) {
|
|
420
|
-
switch (ut(e, t)) {
|
|
421
|
-
case 5103:
|
|
422
|
-
return g + "print-" + e + e;
|
|
423
|
-
case 5737:
|
|
424
|
-
case 4201:
|
|
425
|
-
case 3177:
|
|
426
|
-
case 3433:
|
|
427
|
-
case 1641:
|
|
428
|
-
case 4457:
|
|
429
|
-
case 2921:
|
|
430
|
-
case 5572:
|
|
431
|
-
case 6356:
|
|
432
|
-
case 5844:
|
|
433
|
-
case 3191:
|
|
434
|
-
case 6645:
|
|
435
|
-
case 3005:
|
|
436
|
-
case 6391:
|
|
437
|
-
case 5879:
|
|
438
|
-
case 5623:
|
|
439
|
-
case 6135:
|
|
440
|
-
case 4599:
|
|
441
|
-
case 4855:
|
|
442
|
-
case 4215:
|
|
443
|
-
case 6389:
|
|
444
|
-
case 5109:
|
|
445
|
-
case 5365:
|
|
446
|
-
case 5621:
|
|
447
|
-
case 3829:
|
|
448
|
-
return g + e + e;
|
|
449
|
-
case 5349:
|
|
450
|
-
case 4246:
|
|
451
|
-
case 4810:
|
|
452
|
-
case 6968:
|
|
453
|
-
case 2756:
|
|
454
|
-
return g + e + ne + e + p + e + e;
|
|
455
|
-
case 6828:
|
|
456
|
-
case 4268:
|
|
457
|
-
return g + e + p + e + e;
|
|
458
|
-
case 6165:
|
|
459
|
-
return g + e + p + "flex-" + e + e;
|
|
460
|
-
case 5187:
|
|
461
|
-
return g + e + D(e, /(\w+).+(:[^]+)/, g + "box-$1$2" + p + "flex-$1$2") + e;
|
|
462
|
-
case 5443:
|
|
463
|
-
return g + e + p + "flex-item-" + D(e, /flex-|-self/, "") + e;
|
|
464
|
-
case 4675:
|
|
465
|
-
return g + e + p + "flex-line-pack" + D(e, /align-content|flex-|-self/, "") + e;
|
|
466
|
-
case 5548:
|
|
467
|
-
return g + e + p + D(e, "shrink", "negative") + e;
|
|
468
|
-
case 5292:
|
|
469
|
-
return g + e + p + D(e, "basis", "preferred-size") + e;
|
|
470
|
-
case 6060:
|
|
471
|
-
return g + "box-" + D(e, "-grow", "") + g + e + p + D(e, "grow", "positive") + e;
|
|
472
|
-
case 4554:
|
|
473
|
-
return g + D(e, /([^-])(transform)/g, "$1" + g + "$2") + e;
|
|
474
|
-
case 6187:
|
|
475
|
-
return D(D(D(e, /(zoom-|grab)/, g + "$1"), /(image-set)/, g + "$1"), e, "") + e;
|
|
476
|
-
case 5495:
|
|
477
|
-
case 3959:
|
|
478
|
-
return D(e, /(image-set\([^]*)/, g + "$1$`$1");
|
|
479
|
-
case 4968:
|
|
480
|
-
return D(D(e, /(.+:)(flex-)?(.*)/, g + "box-pack:$3" + p + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + g + e + e;
|
|
481
|
-
case 4095:
|
|
482
|
-
case 3583:
|
|
483
|
-
case 4068:
|
|
484
|
-
case 2532:
|
|
485
|
-
return D(e, /(.+)-inline(.+)/, g + "$1$2") + e;
|
|
486
|
-
case 8116:
|
|
487
|
-
case 7059:
|
|
488
|
-
case 5753:
|
|
489
|
-
case 5535:
|
|
490
|
-
case 5445:
|
|
491
|
-
case 5701:
|
|
492
|
-
case 4933:
|
|
493
|
-
case 4677:
|
|
494
|
-
case 5533:
|
|
495
|
-
case 5789:
|
|
496
|
-
case 5021:
|
|
497
|
-
case 4765:
|
|
498
|
-
if (C(e) - 1 - t > 6)
|
|
499
|
-
switch (T(e, t + 1)) {
|
|
500
|
-
case 109:
|
|
501
|
-
if (T(e, t + 4) !== 45)
|
|
502
|
-
break;
|
|
503
|
-
case 102:
|
|
504
|
-
return D(e, /(.+:)(.+)-([^]+)/, "$1" + g + "$2-$3$1" + ne + (T(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
505
|
-
case 115:
|
|
506
|
-
return ~le(e, "stretch") ? We(D(e, "stretch", "fill-available"), t) + e : e;
|
|
507
|
-
}
|
|
508
|
-
break;
|
|
509
|
-
case 4949:
|
|
510
|
-
if (T(e, t + 1) !== 115)
|
|
511
|
-
break;
|
|
512
|
-
case 6444:
|
|
513
|
-
switch (T(e, C(e) - 3 - (~le(e, "!important") && 10))) {
|
|
514
|
-
case 107:
|
|
515
|
-
return D(e, ":", ":" + g) + e;
|
|
516
|
-
case 101:
|
|
517
|
-
return D(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + g + (T(e, 14) === 45 ? "inline-" : "") + "box$3$1" + g + "$2$3$1" + p + "$2box$3") + e;
|
|
518
|
-
}
|
|
519
|
-
break;
|
|
520
|
-
case 5936:
|
|
521
|
-
switch (T(e, t + 11)) {
|
|
522
|
-
case 114:
|
|
523
|
-
return g + e + p + D(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
524
|
-
case 108:
|
|
525
|
-
return g + e + p + D(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
526
|
-
case 45:
|
|
527
|
-
return g + e + p + D(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
528
|
-
}
|
|
529
|
-
return g + e + p + e + e;
|
|
530
|
-
}
|
|
531
|
-
return e;
|
|
532
|
-
}
|
|
533
|
-
var vt = function(t, r, n, s) {
|
|
534
|
-
if (t.length > -1 && !t.return)
|
|
535
|
-
switch (t.type) {
|
|
536
|
-
case fe:
|
|
537
|
-
t.return = We(t.value, t.length);
|
|
538
|
-
break;
|
|
539
|
-
case Ye:
|
|
540
|
-
return R([F(t, {
|
|
541
|
-
value: D(t.value, "@", "@" + g)
|
|
542
|
-
})], s);
|
|
543
|
-
case Ie:
|
|
544
|
-
if (t.length)
|
|
545
|
-
return lt(t.props, function(i) {
|
|
546
|
-
switch (Nt(i, /(::plac\w+|:read-\w+)/)) {
|
|
547
|
-
case ":read-only":
|
|
548
|
-
case ":read-write":
|
|
549
|
-
return R([F(t, {
|
|
550
|
-
props: [D(i, /:(read-\w+)/, ":" + ne + "$1")]
|
|
551
|
-
})], s);
|
|
552
|
-
case "::placeholder":
|
|
553
|
-
return R([F(t, {
|
|
554
|
-
props: [D(i, /:(plac\w+)/, ":" + g + "input-$1")]
|
|
555
|
-
}), F(t, {
|
|
556
|
-
props: [D(i, /:(plac\w+)/, ":" + ne + "$1")]
|
|
557
|
-
}), F(t, {
|
|
558
|
-
props: [D(i, /:(plac\w+)/, p + "input-$1")]
|
|
559
|
-
})], s);
|
|
560
|
-
}
|
|
561
|
-
return "";
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
}, Qt = [vt], Ut = function(t) {
|
|
565
|
-
var r = t.key;
|
|
566
|
-
if (process.env.NODE_ENV !== "production" && !r)
|
|
567
|
-
throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
568
|
-
If multiple caches share the same key they might "fight" for each other's style elements.`);
|
|
569
|
-
if (r === "css") {
|
|
570
|
-
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
571
|
-
Array.prototype.forEach.call(n, function(j) {
|
|
572
|
-
var A = j.getAttribute("data-emotion");
|
|
573
|
-
A.indexOf(" ") !== -1 && (document.head.appendChild(j), j.setAttribute("data-s", ""));
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
var s = t.stylisPlugins || Qt;
|
|
577
|
-
if (process.env.NODE_ENV !== "production" && /[^a-z-]/.test(r))
|
|
578
|
-
throw new Error('Emotion key must only contain lower case alphabetical characters and - but "' + r + '" was passed');
|
|
579
|
-
var i = {}, c, o = [];
|
|
580
|
-
c = t.container || document.head, Array.prototype.forEach.call(
|
|
581
|
-
// this means we will ignore elements which don't have a space in them which
|
|
582
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
583
|
-
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
584
|
-
function(j) {
|
|
585
|
-
for (var A = j.getAttribute("data-emotion").split(" "), z = 1; z < A.length; z++)
|
|
586
|
-
i[A[z]] = !0;
|
|
587
|
-
o.push(j);
|
|
588
|
-
}
|
|
589
|
-
);
|
|
590
|
-
var a, u = [mt, wt];
|
|
591
|
-
process.env.NODE_ENV !== "production" && u.push(kt({
|
|
592
|
-
get compat() {
|
|
593
|
-
return I.compat;
|
|
594
|
-
}
|
|
595
|
-
}), bt);
|
|
596
|
-
{
|
|
597
|
-
var M, l = [ht, process.env.NODE_ENV !== "production" ? function(j) {
|
|
598
|
-
j.root || (j.return ? M.insert(j.return) : j.value && j.type !== de && M.insert(j.value + "{}"));
|
|
599
|
-
} : Ot(function(j) {
|
|
600
|
-
M.insert(j);
|
|
601
|
-
})], y = At(u.concat(s, l)), f = function(A) {
|
|
602
|
-
return R(ft(A), y);
|
|
603
|
-
};
|
|
604
|
-
a = function(A, z, O, S) {
|
|
605
|
-
M = O, process.env.NODE_ENV !== "production" && z.map !== void 0 && (M = {
|
|
606
|
-
insert: function(U) {
|
|
607
|
-
O.insert(U + z.map);
|
|
608
|
-
}
|
|
609
|
-
}), f(A ? A + "{" + z.styles + "}" : z.styles), S && (I.inserted[z.name] = !0);
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
var I = {
|
|
613
|
-
key: r,
|
|
614
|
-
sheet: new it({
|
|
615
|
-
key: r,
|
|
616
|
-
container: c,
|
|
617
|
-
nonce: t.nonce,
|
|
618
|
-
speedy: t.speedy,
|
|
619
|
-
prepend: t.prepend,
|
|
620
|
-
insertionPoint: t.insertionPoint
|
|
621
|
-
}),
|
|
622
|
-
nonce: t.nonce,
|
|
623
|
-
inserted: i,
|
|
624
|
-
registered: {},
|
|
625
|
-
insert: a
|
|
626
|
-
};
|
|
627
|
-
return I.sheet.hydrate(o), I;
|
|
628
|
-
};
|
|
629
|
-
function Yt(e) {
|
|
630
|
-
for (var t = 0, r, n = 0, s = e.length; s >= 4; ++n, s -= 4)
|
|
631
|
-
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
632
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
633
|
-
r >>> 24, t = /* Math.imul(k, m): */
|
|
634
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
635
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
636
|
-
switch (s) {
|
|
637
|
-
case 3:
|
|
638
|
-
t ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
639
|
-
case 2:
|
|
640
|
-
t ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
641
|
-
case 1:
|
|
642
|
-
t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
|
|
643
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
644
|
-
}
|
|
645
|
-
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
646
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
647
|
-
}
|
|
648
|
-
var $t = {
|
|
649
|
-
animationIterationCount: 1,
|
|
650
|
-
aspectRatio: 1,
|
|
651
|
-
borderImageOutset: 1,
|
|
652
|
-
borderImageSlice: 1,
|
|
653
|
-
borderImageWidth: 1,
|
|
654
|
-
boxFlex: 1,
|
|
655
|
-
boxFlexGroup: 1,
|
|
656
|
-
boxOrdinalGroup: 1,
|
|
657
|
-
columnCount: 1,
|
|
658
|
-
columns: 1,
|
|
659
|
-
flex: 1,
|
|
660
|
-
flexGrow: 1,
|
|
661
|
-
flexPositive: 1,
|
|
662
|
-
flexShrink: 1,
|
|
663
|
-
flexNegative: 1,
|
|
664
|
-
flexOrder: 1,
|
|
665
|
-
gridRow: 1,
|
|
666
|
-
gridRowEnd: 1,
|
|
667
|
-
gridRowSpan: 1,
|
|
668
|
-
gridRowStart: 1,
|
|
669
|
-
gridColumn: 1,
|
|
670
|
-
gridColumnEnd: 1,
|
|
671
|
-
gridColumnSpan: 1,
|
|
672
|
-
gridColumnStart: 1,
|
|
673
|
-
msGridRow: 1,
|
|
674
|
-
msGridRowSpan: 1,
|
|
675
|
-
msGridColumn: 1,
|
|
676
|
-
msGridColumnSpan: 1,
|
|
677
|
-
fontWeight: 1,
|
|
678
|
-
lineHeight: 1,
|
|
679
|
-
opacity: 1,
|
|
680
|
-
order: 1,
|
|
681
|
-
orphans: 1,
|
|
682
|
-
tabSize: 1,
|
|
683
|
-
widows: 1,
|
|
684
|
-
zIndex: 1,
|
|
685
|
-
zoom: 1,
|
|
686
|
-
WebkitLineClamp: 1,
|
|
687
|
-
// SVG-related properties
|
|
688
|
-
fillOpacity: 1,
|
|
689
|
-
floodOpacity: 1,
|
|
690
|
-
stopOpacity: 1,
|
|
691
|
-
strokeDasharray: 1,
|
|
692
|
-
strokeDashoffset: 1,
|
|
693
|
-
strokeMiterlimit: 1,
|
|
694
|
-
strokeOpacity: 1,
|
|
695
|
-
strokeWidth: 1
|
|
696
|
-
}, xe = `You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
697
|
-
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
698
|
-
You can read more about this here:
|
|
699
|
-
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`, Rt = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).", Vt = /[A-Z]|^ms/g, Be = /_EMO_([^_]+?)_([^]*?)_EMO_/g, he = function(t) {
|
|
700
|
-
return t.charCodeAt(1) === 45;
|
|
701
|
-
}, me = function(t) {
|
|
702
|
-
return t != null && typeof t != "boolean";
|
|
703
|
-
}, ue = /* @__PURE__ */ Tt(function(e) {
|
|
704
|
-
return he(e) ? e : e.replace(Vt, "-$&").toLowerCase();
|
|
705
|
-
}), se = function(t, r) {
|
|
706
|
-
switch (t) {
|
|
707
|
-
case "animation":
|
|
708
|
-
case "animationName":
|
|
709
|
-
if (typeof r == "string")
|
|
710
|
-
return r.replace(Be, function(n, s, i) {
|
|
711
|
-
return m = {
|
|
712
|
-
name: s,
|
|
713
|
-
styles: i,
|
|
714
|
-
next: m
|
|
715
|
-
}, s;
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
return $t[t] !== 1 && !he(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
719
|
-
};
|
|
720
|
-
if (process.env.NODE_ENV !== "production") {
|
|
721
|
-
var Pt = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/, _t = ["normal", "none", "initial", "inherit", "unset"], Wt = se, Bt = /^-ms-/, Ft = /-(.)/g, we = {};
|
|
722
|
-
se = function(t, r) {
|
|
723
|
-
if (t === "content" && (typeof r != "string" || _t.indexOf(r) === -1 && !Pt.test(r) && (r.charAt(0) !== r.charAt(r.length - 1) || r.charAt(0) !== '"' && r.charAt(0) !== "'")))
|
|
724
|
-
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + r + "\"'`");
|
|
725
|
-
var n = Wt(t, r);
|
|
726
|
-
return n !== "" && !he(t) && t.indexOf("-") !== -1 && we[t] === void 0 && (we[t] = !0, console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + t.replace(Bt, "ms-").replace(Ft, function(s, i) {
|
|
727
|
-
return i.toUpperCase();
|
|
728
|
-
}) + "?")), n;
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
var Fe = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
|
|
732
|
-
function H(e, t, r) {
|
|
733
|
-
if (r == null)
|
|
734
|
-
return "";
|
|
735
|
-
if (r.__emotion_styles !== void 0) {
|
|
736
|
-
if (process.env.NODE_ENV !== "production" && r.toString() === "NO_COMPONENT_SELECTOR")
|
|
737
|
-
throw new Error(Fe);
|
|
738
|
-
return r;
|
|
739
|
-
}
|
|
740
|
-
switch (typeof r) {
|
|
741
|
-
case "boolean":
|
|
742
|
-
return "";
|
|
743
|
-
case "object": {
|
|
744
|
-
if (r.anim === 1)
|
|
745
|
-
return m = {
|
|
746
|
-
name: r.name,
|
|
747
|
-
styles: r.styles,
|
|
748
|
-
next: m
|
|
749
|
-
}, r.name;
|
|
750
|
-
if (r.styles !== void 0) {
|
|
751
|
-
var n = r.next;
|
|
752
|
-
if (n !== void 0)
|
|
753
|
-
for (; n !== void 0; )
|
|
754
|
-
m = {
|
|
755
|
-
name: n.name,
|
|
756
|
-
styles: n.styles,
|
|
757
|
-
next: m
|
|
758
|
-
}, n = n.next;
|
|
759
|
-
var s = r.styles + ";";
|
|
760
|
-
return process.env.NODE_ENV !== "production" && r.map !== void 0 && (s += r.map), s;
|
|
761
|
-
}
|
|
762
|
-
return Gt(e, t, r);
|
|
763
|
-
}
|
|
764
|
-
case "function": {
|
|
765
|
-
if (e !== void 0) {
|
|
766
|
-
var i = m, c = r(e);
|
|
767
|
-
return m = i, H(e, t, c);
|
|
768
|
-
} else
|
|
769
|
-
process.env.NODE_ENV !== "production" && console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
case "string":
|
|
773
|
-
if (process.env.NODE_ENV !== "production") {
|
|
774
|
-
var o = [], a = r.replace(Be, function(M, l, y) {
|
|
775
|
-
var f = "animation" + o.length;
|
|
776
|
-
return o.push("const " + f + " = keyframes`" + y.replace(/^@keyframes animation-\w+/, "") + "`"), "${" + f + "}";
|
|
777
|
-
});
|
|
778
|
-
o.length && console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n" + [].concat(o, ["`" + a + "`"]).join(`
|
|
779
|
-
`) + `
|
|
780
|
-
|
|
781
|
-
You should wrap it with \`css\` like this:
|
|
782
|
-
|
|
783
|
-
` + ("css`" + a + "`"));
|
|
784
|
-
}
|
|
785
|
-
break;
|
|
786
|
-
}
|
|
787
|
-
if (t == null)
|
|
788
|
-
return r;
|
|
789
|
-
var u = t[r];
|
|
790
|
-
return u !== void 0 ? u : r;
|
|
791
|
-
}
|
|
792
|
-
function Gt(e, t, r) {
|
|
793
|
-
var n = "";
|
|
794
|
-
if (Array.isArray(r))
|
|
795
|
-
for (var s = 0; s < r.length; s++)
|
|
796
|
-
n += H(e, t, r[s]) + ";";
|
|
797
|
-
else
|
|
798
|
-
for (var i in r) {
|
|
799
|
-
var c = r[i];
|
|
800
|
-
if (typeof c != "object")
|
|
801
|
-
t != null && t[c] !== void 0 ? n += i + "{" + t[c] + "}" : me(c) && (n += ue(i) + ":" + se(i, c) + ";");
|
|
802
|
-
else {
|
|
803
|
-
if (i === "NO_COMPONENT_SELECTOR" && process.env.NODE_ENV !== "production")
|
|
804
|
-
throw new Error(Fe);
|
|
805
|
-
if (Array.isArray(c) && typeof c[0] == "string" && (t == null || t[c[0]] === void 0))
|
|
806
|
-
for (var o = 0; o < c.length; o++)
|
|
807
|
-
me(c[o]) && (n += ue(i) + ":" + se(i, c[o]) + ";");
|
|
808
|
-
else {
|
|
809
|
-
var a = H(e, t, c);
|
|
810
|
-
switch (i) {
|
|
811
|
-
case "animation":
|
|
812
|
-
case "animationName": {
|
|
813
|
-
n += ue(i) + ":" + a + ";";
|
|
814
|
-
break;
|
|
815
|
-
}
|
|
816
|
-
default:
|
|
817
|
-
process.env.NODE_ENV !== "production" && i === "undefined" && console.error(Rt), n += i + "{" + a + "}";
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return n;
|
|
823
|
-
}
|
|
824
|
-
var Se = /label:\s*([^\s;\n{]+)\s*(;|$)/g, Ge;
|
|
825
|
-
process.env.NODE_ENV !== "production" && (Ge = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);
|
|
826
|
-
var m, Ne = function(t, r, n) {
|
|
827
|
-
if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0)
|
|
828
|
-
return t[0];
|
|
829
|
-
var s = !0, i = "";
|
|
830
|
-
m = void 0;
|
|
831
|
-
var c = t[0];
|
|
832
|
-
c == null || c.raw === void 0 ? (s = !1, i += H(n, r, c)) : (process.env.NODE_ENV !== "production" && c[0] === void 0 && console.error(xe), i += c[0]);
|
|
833
|
-
for (var o = 1; o < t.length; o++)
|
|
834
|
-
i += H(n, r, t[o]), s && (process.env.NODE_ENV !== "production" && c[o] === void 0 && console.error(xe), i += c[o]);
|
|
835
|
-
var a;
|
|
836
|
-
process.env.NODE_ENV !== "production" && (i = i.replace(Ge, function(y) {
|
|
837
|
-
return a = y, "";
|
|
838
|
-
})), Se.lastIndex = 0;
|
|
839
|
-
for (var u = "", M; (M = Se.exec(i)) !== null; )
|
|
840
|
-
u += "-" + // $FlowFixMe we know it's not null
|
|
841
|
-
M[1];
|
|
842
|
-
var l = Yt(i) + u;
|
|
843
|
-
return process.env.NODE_ENV !== "production" ? {
|
|
844
|
-
name: l,
|
|
845
|
-
styles: i,
|
|
846
|
-
map: a,
|
|
847
|
-
next: m,
|
|
848
|
-
toString: function() {
|
|
849
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
850
|
-
}
|
|
851
|
-
} : {
|
|
852
|
-
name: l,
|
|
853
|
-
styles: i,
|
|
854
|
-
next: m
|
|
855
|
-
};
|
|
856
|
-
}, Zt = !0;
|
|
857
|
-
function Ze(e, t, r) {
|
|
858
|
-
var n = "";
|
|
859
|
-
return r.split(" ").forEach(function(s) {
|
|
860
|
-
e[s] !== void 0 ? t.push(e[s] + ";") : n += s + " ";
|
|
861
|
-
}), n;
|
|
862
|
-
}
|
|
863
|
-
var Jt = function(t, r, n) {
|
|
864
|
-
var s = t.key + "-" + r.name;
|
|
865
|
-
// we only need to add the styles to the registered cache if the
|
|
866
|
-
// class name could be used further down
|
|
867
|
-
// the tree but if it's a string tag, we know it won't
|
|
868
|
-
// so we don't have to add it to registered cache.
|
|
869
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
870
|
-
(n === !1 || // we need to always store it if we're in compat mode and
|
|
871
|
-
// in node since emotion-server relies on whether a style is in
|
|
872
|
-
// the registered cache to know whether a style is global or not
|
|
873
|
-
// also, note that this check will be dead code eliminated in the browser
|
|
874
|
-
Zt === !1) && t.registered[s] === void 0 && (t.registered[s] = r.styles);
|
|
875
|
-
}, Ht = function(t, r, n) {
|
|
876
|
-
Jt(t, r, n);
|
|
877
|
-
var s = t.key + "-" + r.name;
|
|
878
|
-
if (t.inserted[r.name] === void 0) {
|
|
879
|
-
var i = r;
|
|
880
|
-
do
|
|
881
|
-
t.insert(r === i ? "." + s : "", i, t.sheet, !0), i = i.next;
|
|
882
|
-
while (i !== void 0);
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
function Ee(e, t) {
|
|
886
|
-
if (e.inserted[t.name] === void 0)
|
|
887
|
-
return e.insert("", t, e.sheet, !0);
|
|
888
|
-
}
|
|
889
|
-
function ke(e, t, r) {
|
|
890
|
-
var n = [], s = Ze(e, n, r);
|
|
891
|
-
return n.length < 2 ? r : s + t(n);
|
|
892
|
-
}
|
|
893
|
-
var Kt = function(t) {
|
|
894
|
-
var r = Ut(t);
|
|
895
|
-
r.sheet.speedy = function(o) {
|
|
896
|
-
if (process.env.NODE_ENV !== "production" && this.ctr !== 0)
|
|
897
|
-
throw new Error("speedy must be changed before any rules are inserted");
|
|
898
|
-
this.isSpeedy = o;
|
|
899
|
-
}, r.compat = !0;
|
|
900
|
-
var n = function() {
|
|
901
|
-
for (var a = arguments.length, u = new Array(a), M = 0; M < a; M++)
|
|
902
|
-
u[M] = arguments[M];
|
|
903
|
-
var l = Ne(u, r.registered, void 0);
|
|
904
|
-
return Ht(r, l, !1), r.key + "-" + l.name;
|
|
905
|
-
}, s = function() {
|
|
906
|
-
for (var a = arguments.length, u = new Array(a), M = 0; M < a; M++)
|
|
907
|
-
u[M] = arguments[M];
|
|
908
|
-
var l = Ne(u, r.registered), y = "animation-" + l.name;
|
|
909
|
-
return Ee(r, {
|
|
910
|
-
name: l.name,
|
|
911
|
-
styles: "@keyframes " + y + "{" + l.styles + "}"
|
|
912
|
-
}), y;
|
|
913
|
-
}, i = function() {
|
|
914
|
-
for (var a = arguments.length, u = new Array(a), M = 0; M < a; M++)
|
|
915
|
-
u[M] = arguments[M];
|
|
916
|
-
var l = Ne(u, r.registered);
|
|
917
|
-
Ee(r, l);
|
|
918
|
-
}, c = function() {
|
|
919
|
-
for (var a = arguments.length, u = new Array(a), M = 0; M < a; M++)
|
|
920
|
-
u[M] = arguments[M];
|
|
921
|
-
return ke(r.registered, n, qt(u));
|
|
922
|
-
};
|
|
923
|
-
return {
|
|
924
|
-
css: n,
|
|
925
|
-
cx: c,
|
|
926
|
-
injectGlobal: i,
|
|
927
|
-
keyframes: s,
|
|
928
|
-
hydrate: function(a) {
|
|
929
|
-
a.forEach(function(u) {
|
|
930
|
-
r.inserted[u] = !0;
|
|
931
|
-
});
|
|
932
|
-
},
|
|
933
|
-
flush: function() {
|
|
934
|
-
r.registered = {}, r.inserted = {}, r.sheet.flush();
|
|
935
|
-
},
|
|
936
|
-
// $FlowFixMe
|
|
937
|
-
sheet: r.sheet,
|
|
938
|
-
cache: r,
|
|
939
|
-
getRegisteredStyles: Ze.bind(null, r.registered),
|
|
940
|
-
merge: ke.bind(null, r.registered, n)
|
|
941
|
-
};
|
|
942
|
-
}, qt = function e(t) {
|
|
943
|
-
for (var r = "", n = 0; n < t.length; n++) {
|
|
944
|
-
var s = t[n];
|
|
945
|
-
if (s != null) {
|
|
946
|
-
var i = void 0;
|
|
947
|
-
switch (typeof s) {
|
|
948
|
-
case "boolean":
|
|
949
|
-
break;
|
|
950
|
-
case "object": {
|
|
951
|
-
if (Array.isArray(s))
|
|
952
|
-
i = e(s);
|
|
953
|
-
else {
|
|
954
|
-
i = "";
|
|
955
|
-
for (var c in s)
|
|
956
|
-
s[c] && c && (i && (i += " "), i += c);
|
|
957
|
-
}
|
|
958
|
-
break;
|
|
959
|
-
}
|
|
960
|
-
default:
|
|
961
|
-
i = s;
|
|
962
|
-
}
|
|
963
|
-
i && (r && (r += " "), r += i);
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
return r;
|
|
967
|
-
}, Je = Kt({
|
|
968
|
-
key: "css"
|
|
969
|
-
}), Xt = Je.injectGlobal, $ = Je.css;
|
|
970
|
-
const He = De({}), Er = (e) => {
|
|
971
|
-
const { children: t, defaultMode: r } = e, [n, s] = Y(
|
|
972
|
-
(r || localStorage.theme) ?? "dark"
|
|
973
|
-
), i = re(() => {
|
|
974
|
-
s(n === "dark" ? "light" : "dark");
|
|
975
|
-
}, [n]);
|
|
976
|
-
v(() => {
|
|
977
|
-
n === "dark" ? (localStorage.theme = "dark", document.documentElement.classList.add("dark")) : (localStorage.theme = "light", document.documentElement.classList.remove("dark")), n === "OS" && localStorage.removeItem("theme");
|
|
978
|
-
}, [n]);
|
|
979
|
-
const c = { mode: n, setMode: s, toggleMode: i };
|
|
980
|
-
return /* @__PURE__ */ N(He.Provider, { value: c, children: t });
|
|
981
|
-
}, er = () => {
|
|
982
|
-
const e = ye(He);
|
|
983
|
-
if (!e)
|
|
984
|
-
throw new Error("modeContext must be used within a Provider");
|
|
985
|
-
return e;
|
|
986
|
-
}, tr = {
|
|
987
|
-
text: "#f7f7f7",
|
|
988
|
-
dark: "#101010",
|
|
989
|
-
default: "#202020",
|
|
990
|
-
light: "#303030"
|
|
991
|
-
}, rr = {
|
|
992
|
-
text: "#101010",
|
|
993
|
-
dark: "#e1e1e1",
|
|
994
|
-
default: "#ededed",
|
|
995
|
-
light: "#f7f7f7"
|
|
996
|
-
}, Ce = {
|
|
997
|
-
primary: {
|
|
998
|
-
text: "#ededed",
|
|
999
|
-
light: "#d74d54",
|
|
1000
|
-
// 500
|
|
1001
|
-
default: "#CD212A",
|
|
1002
|
-
// 600
|
|
1003
|
-
dark: "#8f171d"
|
|
1004
|
-
// 700
|
|
1005
|
-
},
|
|
1006
|
-
secondary: {
|
|
1007
|
-
text: "#f7f7f7",
|
|
1008
|
-
light: "#364b67",
|
|
1009
|
-
// 600
|
|
1010
|
-
default: "#041E42",
|
|
1011
|
-
// 700
|
|
1012
|
-
dark: "#02152e"
|
|
1013
|
-
// 800
|
|
1014
|
-
},
|
|
1015
|
-
error: {
|
|
1016
|
-
text: "#f7f7f7",
|
|
1017
|
-
light: "#d63333",
|
|
1018
|
-
default: "#CC0000",
|
|
1019
|
-
dark: "#8e0000"
|
|
1020
|
-
},
|
|
1021
|
-
warning: {
|
|
1022
|
-
text: "#101010",
|
|
1023
|
-
light: "#e2bf33",
|
|
1024
|
-
default: "#DBAF00",
|
|
1025
|
-
dark: "#997a00"
|
|
1026
|
-
},
|
|
1027
|
-
success: {
|
|
1028
|
-
text: "#f7f7f7",
|
|
1029
|
-
light: "#559b33",
|
|
1030
|
-
default: "#007733",
|
|
1031
|
-
dark: "#1e5b00"
|
|
1032
|
-
},
|
|
1033
|
-
info: {
|
|
1034
|
-
text: "#f7f7f7",
|
|
1035
|
-
light: "#3397b9",
|
|
1036
|
-
default: "#007EA8",
|
|
1037
|
-
dark: "#005875"
|
|
1038
|
-
}
|
|
1039
|
-
}, be = (e, t) => ({
|
|
1040
|
-
basics: e,
|
|
1041
|
-
...t
|
|
1042
|
-
}), G = {
|
|
1043
|
-
dark: be(tr, Ce),
|
|
1044
|
-
light: be(rr, Ce)
|
|
1045
|
-
}, Ke = De({}), k = (e, t, r = "") => `${e === "light" ? "" : `.${e}`} ${r}${t.length && t !== "body" ? "." : ""}${t}`, kr = (e) => {
|
|
1046
|
-
const { mode: t } = er(), { children: r, theme: n } = e, s = ie(() => n ? n[t] || G[t] || G.dark : G[t] || G.light, [t]);
|
|
1047
|
-
return v(() => {
|
|
1048
|
-
const i = {}, c = { ...G, ...n };
|
|
1049
|
-
for (const o of Object.keys(c)) {
|
|
1050
|
-
i[k(o, "body")] = {
|
|
1051
|
-
backgroundColor: c[o].basics.dark,
|
|
1052
|
-
color: c[o].basics.text
|
|
1053
|
-
};
|
|
1054
|
-
for (const a of Object.keys(c[o])) {
|
|
1055
|
-
const u = a;
|
|
1056
|
-
i[k(o, a)] = {
|
|
1057
|
-
color: a === "basics" ? c[o][u].text : c[o][u].default
|
|
1058
|
-
};
|
|
1059
|
-
const M = {
|
|
1060
|
-
color: c[o][u].light,
|
|
1061
|
-
backgroundColor: `${c[o][u].light}2f`
|
|
1062
|
-
};
|
|
1063
|
-
i[k(o, a, ".button:hover")] = M, i[k(o, a, "button:hover")] = M;
|
|
1064
|
-
const l = {
|
|
1065
|
-
color: c[o][u].text,
|
|
1066
|
-
backgroundColor: c[o][u].default
|
|
1067
|
-
};
|
|
1068
|
-
i[k(o, a, ".filled")] = l;
|
|
1069
|
-
const y = {
|
|
1070
|
-
color: c[o][u].text,
|
|
1071
|
-
backgroundColor: c[o][u].light
|
|
1072
|
-
};
|
|
1073
|
-
i[k(o, a, ".button.filled:hover")] = y, i[k(o, a, "button.filled:hover")] = y;
|
|
1074
|
-
const f = {
|
|
1075
|
-
color: c[o][u].default,
|
|
1076
|
-
borderColor: c[o][u].default
|
|
1077
|
-
};
|
|
1078
|
-
i[k(o, a, ".outlined")] = f;
|
|
1079
|
-
const I = {
|
|
1080
|
-
color: c[o][u].text,
|
|
1081
|
-
borderColor: c[o][u].light,
|
|
1082
|
-
backgroundColor: c[o][u].light
|
|
1083
|
-
};
|
|
1084
|
-
i[k(o, a, ".button.outlined:hover")] = I, i[k(o, a, "button.outlined:hover")] = I;
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
Xt({ ...i });
|
|
1088
|
-
}, []), /* @__PURE__ */ N(Ke.Provider, { value: { colors: s }, children: r });
|
|
1089
|
-
}, Q = () => {
|
|
1090
|
-
const e = ye(Ke);
|
|
1091
|
-
if (!e)
|
|
1092
|
-
throw new Error("modeContext must be used within a Provider");
|
|
1093
|
-
return e;
|
|
1094
|
-
}, nr = (e, t, r) => {
|
|
1095
|
-
const n = {}, s = {
|
|
1096
|
-
filled: () => {
|
|
1097
|
-
n.color = e[t].text, n.backgroundColor = e[t].default, n["&:hover"] = {
|
|
1098
|
-
backgroundColor: e[t].light
|
|
1099
|
-
};
|
|
1100
|
-
},
|
|
1101
|
-
outlined: () => {
|
|
1102
|
-
t !== "basics" ? (n.color = e[t].default, n.borderColor = e[t].default, n["&:hover"] = {
|
|
1103
|
-
color: e[t].text,
|
|
1104
|
-
borderColor: e[t].light,
|
|
1105
|
-
backgroundColor: e[t].light
|
|
1106
|
-
}) : (n.color = e[t].text, n.borderColor = e[t].default, n["&:hover"] = {
|
|
1107
|
-
color: e[t].text,
|
|
1108
|
-
borderColor: e[t].light,
|
|
1109
|
-
backgroundColor: e[t].light
|
|
1110
|
-
});
|
|
1111
|
-
},
|
|
1112
|
-
text: () => {
|
|
1113
|
-
t === "basics" ? n.color = e[t].text : n.color = e[t].default, n["&:hover"] = {
|
|
1114
|
-
color: t === "basics" ? e[t].text : e[t].default,
|
|
1115
|
-
backgroundColor: `${e[t].light}2f`
|
|
1116
|
-
};
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
return (s[r] || s.text)(), { root: $({ ...n }) };
|
|
1120
|
-
}, sr = _(function(e, t) {
|
|
1121
|
-
const { color: r = "primary", type: n = "button", shape: s = "text", ...i } = e, { colors: c } = Q(), o = nr(c, r, s);
|
|
1122
|
-
return /* @__PURE__ */ N(
|
|
1123
|
-
"button",
|
|
1124
|
-
{
|
|
1125
|
-
type: n,
|
|
1126
|
-
ref: t,
|
|
1127
|
-
...i,
|
|
1128
|
-
className: `button ${s} ${o.root} ${i.className}`,
|
|
1129
|
-
children: i.children
|
|
1130
|
-
}
|
|
1131
|
-
);
|
|
1132
|
-
}), qe = sr, ir = _(function(e, t) {
|
|
1133
|
-
const { icon: r, size: n = "normal", className: s = "", ...i } = e;
|
|
1134
|
-
return /* @__PURE__ */ N(
|
|
1135
|
-
qe,
|
|
1136
|
-
{
|
|
1137
|
-
...i,
|
|
1138
|
-
ref: t,
|
|
1139
|
-
type: "button",
|
|
1140
|
-
className: `icon-button ${n} ${s}`,
|
|
1141
|
-
children: r
|
|
1142
|
-
}
|
|
1143
|
-
);
|
|
1144
|
-
}), or = ir, Ae = (e, t) => {
|
|
1145
|
-
const r = {
|
|
1146
|
-
color: e[t].text,
|
|
1147
|
-
backgroundColor: e[t].default,
|
|
1148
|
-
option: {
|
|
1149
|
-
color: e[t].text,
|
|
1150
|
-
backgroundColor: e[t].default
|
|
1151
|
-
}
|
|
1152
|
-
};
|
|
1153
|
-
return {
|
|
1154
|
-
input: $({ ...r })
|
|
1155
|
-
};
|
|
1156
|
-
}, cr = _(function(e, t) {
|
|
1157
|
-
const {
|
|
1158
|
-
helperText: r = "",
|
|
1159
|
-
helperTextClassName: n = "basics",
|
|
1160
|
-
orientation: s = "column",
|
|
1161
|
-
color: i = "basics",
|
|
1162
|
-
labelClassName: c = "basics",
|
|
1163
|
-
label: o,
|
|
1164
|
-
...a
|
|
1165
|
-
} = e, { colors: u } = Q(), M = Ae(u, i);
|
|
1166
|
-
return /* @__PURE__ */ w("div", { className: `input-control ${s}`, children: [
|
|
1167
|
-
/* @__PURE__ */ N("label", { className: c, htmlFor: e.id, children: o }),
|
|
1168
|
-
/* @__PURE__ */ N(
|
|
1169
|
-
"textarea",
|
|
1170
|
-
{
|
|
1171
|
-
...a,
|
|
1172
|
-
className: `${M.input} ${a.className ?? ""}`,
|
|
1173
|
-
ref: t
|
|
1174
|
-
}
|
|
1175
|
-
),
|
|
1176
|
-
r && r.length ? /* @__PURE__ */ N("p", { className: n, children: r }) : null
|
|
1177
|
-
] });
|
|
1178
|
-
}), Cr = cr, ar = _(function(e, t) {
|
|
1179
|
-
const {
|
|
1180
|
-
helperText: r = "",
|
|
1181
|
-
helperTextClassName: n = "basics",
|
|
1182
|
-
orientation: s = "column",
|
|
1183
|
-
color: i = "basics",
|
|
1184
|
-
leftComponent: c,
|
|
1185
|
-
rightComponent: o,
|
|
1186
|
-
label: a,
|
|
1187
|
-
labelClassName: u = "basics",
|
|
1188
|
-
...M
|
|
1189
|
-
} = e, { colors: l } = Q(), y = Ae(l, i), f = ie(
|
|
1190
|
-
() => /* @__PURE__ */ N(
|
|
1191
|
-
"select",
|
|
1192
|
-
{
|
|
1193
|
-
...M,
|
|
1194
|
-
ref: t,
|
|
1195
|
-
className: `${c ? "s-no-padding-left" : ""} ${o ? "s-no-padding-right" : ""} ${y.input} ${M.className ?? ""}`,
|
|
1196
|
-
children: M.children
|
|
1197
|
-
}
|
|
1198
|
-
),
|
|
1199
|
-
[c, o, M, t, y]
|
|
1200
|
-
);
|
|
1201
|
-
return /* @__PURE__ */ w("div", { className: `input-control ${s}`, children: [
|
|
1202
|
-
/* @__PURE__ */ N("label", { className: u, htmlFor: e.id, children: a }),
|
|
1203
|
-
c || o ? /* @__PURE__ */ w("div", { className: `sub ${y.input}`, children: [
|
|
1204
|
-
c && c !== null ? /* @__PURE__ */ N("div", { children: c }) : null,
|
|
1205
|
-
f,
|
|
1206
|
-
o && o !== null ? /* @__PURE__ */ N("div", { children: o }) : null
|
|
1207
|
-
] }) : f,
|
|
1208
|
-
r && r.length ? /* @__PURE__ */ N("p", { className: n, children: r }) : null
|
|
1209
|
-
] });
|
|
1210
|
-
}), br = ar, Mr = _(function(e, t) {
|
|
1211
|
-
const {
|
|
1212
|
-
helperText: r = "",
|
|
1213
|
-
helperTextClassName: n = "basics",
|
|
1214
|
-
orientation: s = "column",
|
|
1215
|
-
color: i = "basics",
|
|
1216
|
-
labelClassName: c = "basics",
|
|
1217
|
-
leftComponent: o,
|
|
1218
|
-
rightComponent: a,
|
|
1219
|
-
label: u,
|
|
1220
|
-
type: M = "text",
|
|
1221
|
-
...l
|
|
1222
|
-
} = e, y = ie(() => [
|
|
1223
|
-
"date",
|
|
1224
|
-
"datetime-local",
|
|
1225
|
-
"email",
|
|
1226
|
-
"number",
|
|
1227
|
-
"password",
|
|
1228
|
-
"search",
|
|
1229
|
-
"tel",
|
|
1230
|
-
"time",
|
|
1231
|
-
"url"
|
|
1232
|
-
].includes(M) ? M : "text", [M]), { colors: f } = Q(), I = Ae(f, i);
|
|
1233
|
-
return /* @__PURE__ */ w("div", { className: `input-control ${s}`, children: [
|
|
1234
|
-
/* @__PURE__ */ N("label", { className: c, htmlFor: e.id, children: u }),
|
|
1235
|
-
o || a ? /* @__PURE__ */ w("div", { className: `sub ${I.input}`, children: [
|
|
1236
|
-
o && o !== null ? o : null,
|
|
1237
|
-
/* @__PURE__ */ N(
|
|
1238
|
-
"input",
|
|
1239
|
-
{
|
|
1240
|
-
...l,
|
|
1241
|
-
type: y,
|
|
1242
|
-
ref: t,
|
|
1243
|
-
className: `no-border-radius ${o ? "s-small-padding-left" : ""} ${a ? "s-small-padding-right" : ""} ${I.input} ${l.className ?? ""}`
|
|
1244
|
-
}
|
|
1245
|
-
),
|
|
1246
|
-
a && a !== null ? a : null
|
|
1247
|
-
] }) : /* @__PURE__ */ N(
|
|
1248
|
-
"input",
|
|
1249
|
-
{
|
|
1250
|
-
...l,
|
|
1251
|
-
type: M,
|
|
1252
|
-
className: `${I.input} ${l.className ?? ""}`,
|
|
1253
|
-
ref: t
|
|
1254
|
-
}
|
|
1255
|
-
),
|
|
1256
|
-
r && r.length ? /* @__PURE__ */ N("p", { className: n, children: r }) : null
|
|
1257
|
-
] });
|
|
1258
|
-
}), vr = Mr, ur = (e, t, r) => {
|
|
1259
|
-
const n = (s) => ({
|
|
1260
|
-
backgroundColor: e[s].default,
|
|
1261
|
-
"& .ball": {
|
|
1262
|
-
backgroundColor: e[s].text
|
|
1263
|
-
}
|
|
1264
|
-
});
|
|
1265
|
-
return {
|
|
1266
|
-
root: $({
|
|
1267
|
-
".s-active": n(t),
|
|
1268
|
-
".s-inactive": n(r)
|
|
1269
|
-
})
|
|
1270
|
-
};
|
|
1271
|
-
}, Nr = _(function(e, t) {
|
|
1272
|
-
const {
|
|
1273
|
-
label: r,
|
|
1274
|
-
value: n = !1,
|
|
1275
|
-
onChange: s,
|
|
1276
|
-
activeColor: i = "primary",
|
|
1277
|
-
inactiveColor: c = "secondary",
|
|
1278
|
-
id: o,
|
|
1279
|
-
className: a
|
|
1280
|
-
} = e, { colors: u } = Q(), M = ur(u, i, c);
|
|
1281
|
-
return /* @__PURE__ */ w(
|
|
1282
|
-
"div",
|
|
1283
|
-
{
|
|
1284
|
-
className: `switcher-root ${M.root} ${a}`,
|
|
1285
|
-
onClick: s,
|
|
1286
|
-
children: [
|
|
1287
|
-
/* @__PURE__ */ N(
|
|
1288
|
-
"input",
|
|
1289
|
-
{
|
|
1290
|
-
id: o,
|
|
1291
|
-
ref: t,
|
|
1292
|
-
checked: n,
|
|
1293
|
-
onChange: s,
|
|
1294
|
-
className: "check-input",
|
|
1295
|
-
type: "checkbox"
|
|
1296
|
-
}
|
|
1297
|
-
),
|
|
1298
|
-
/* @__PURE__ */ N("div", { className: `switcher ${n ? "s-active" : "s-inactive"}`, children: /* @__PURE__ */ N("div", { className: `ball ${n ? "activated" : "deactivated"}` }) }),
|
|
1299
|
-
/* @__PURE__ */ N("label", { className: "", children: r })
|
|
1300
|
-
]
|
|
1301
|
-
}
|
|
1302
|
-
);
|
|
1303
|
-
}), Qr = Nr;
|
|
1304
|
-
var V = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(V || {});
|
|
1305
|
-
const Xe = De({});
|
|
1306
|
-
function Ur(e) {
|
|
1307
|
-
const { children: t, container: r = document.body } = e, [n, s] = tt(
|
|
1308
|
-
(M, l) => {
|
|
1309
|
-
const { type: y, items: f, index: I } = l;
|
|
1310
|
-
switch (y) {
|
|
1311
|
-
case "set":
|
|
1312
|
-
return (f == null ? void 0 : f.map((j, A) => ({
|
|
1313
|
-
...j,
|
|
1314
|
-
id: A
|
|
1315
|
-
}))) ?? [];
|
|
1316
|
-
case "remove":
|
|
1317
|
-
return I ? M.filter((j, A) => A !== I) : [];
|
|
1318
|
-
}
|
|
1319
|
-
return M;
|
|
1320
|
-
},
|
|
1321
|
-
[],
|
|
1322
|
-
() => []
|
|
1323
|
-
), i = (M) => s({
|
|
1324
|
-
type: "set",
|
|
1325
|
-
items: [{ ...M, type: V.error }]
|
|
1326
|
-
}), c = (M) => s({
|
|
1327
|
-
type: "set",
|
|
1328
|
-
items: [{ ...M }]
|
|
1329
|
-
}), o = (M) => s({ type: "set", items: M }), a = (M) => s({
|
|
1330
|
-
type: "set",
|
|
1331
|
-
items: [{ ...M, type: V.success }]
|
|
1332
|
-
}), u = (M) => s({ type: "remove", index: M });
|
|
1333
|
-
return /* @__PURE__ */ N(
|
|
1334
|
-
Xe.Provider,
|
|
1335
|
-
{
|
|
1336
|
-
value: {
|
|
1337
|
-
notification: n,
|
|
1338
|
-
container: r,
|
|
1339
|
-
removeNotification: u,
|
|
1340
|
-
showErrorNotification: i,
|
|
1341
|
-
showNotification: c,
|
|
1342
|
-
showSuccessNotification: a,
|
|
1343
|
-
showStackNotifications: o
|
|
1344
|
-
},
|
|
1345
|
-
children: t
|
|
1346
|
-
}
|
|
1347
|
-
);
|
|
1348
|
-
}
|
|
1349
|
-
const lr = () => {
|
|
1350
|
-
const e = ye(Xe);
|
|
1351
|
-
if (e === void 0)
|
|
1352
|
-
throw new Error("NotificationContext must be used within a Provider");
|
|
1353
|
-
return e;
|
|
1354
|
-
}, jr = (e) => ({
|
|
1355
|
-
root: $({
|
|
1356
|
-
backgroundImage: `linear-gradient(to right, ${e.basics.default} calc(50% - 100px), ${e.basics.dark} 50%, ${e.basics.default} calc(50% - 100px));`
|
|
1357
|
-
})
|
|
1358
|
-
});
|
|
1359
|
-
function Yr(e) {
|
|
1360
|
-
const { container: t = {}, ...r } = e, [n, s] = Y(!1), { colors: i } = Q(), c = jr(i);
|
|
1361
|
-
return /* @__PURE__ */ N(
|
|
1362
|
-
"div",
|
|
1363
|
-
{
|
|
1364
|
-
...t,
|
|
1365
|
-
className: `${n ? null : `box ${c.root}`} ${t.className}`,
|
|
1366
|
-
children: /* @__PURE__ */ N("img", { onLoad: () => s(!0), ...r })
|
|
1367
|
-
}
|
|
1368
|
-
);
|
|
1369
|
-
}
|
|
1370
|
-
const gr = () => {
|
|
1371
|
-
const [e, t] = Y(!1), r = Ue(null);
|
|
1372
|
-
return v(() => {
|
|
1373
|
-
const n = new IntersectionObserver((s) => {
|
|
1374
|
-
s.forEach((i) => {
|
|
1375
|
-
t(i.isIntersecting);
|
|
1376
|
-
});
|
|
1377
|
-
});
|
|
1378
|
-
return r.current && n.observe(r.current), () => {
|
|
1379
|
-
r.current && n.unobserve(r.current);
|
|
1380
|
-
};
|
|
1381
|
-
}, []), { elementRef: r, isElementInViewport: e };
|
|
1382
|
-
};
|
|
1383
|
-
function Dr(e) {
|
|
1384
|
-
const {
|
|
1385
|
-
children: t,
|
|
1386
|
-
delay: r = 100,
|
|
1387
|
-
animation: n = "appear",
|
|
1388
|
-
onVisible: s = !1
|
|
1389
|
-
} = e, { elementRef: i, isElementInViewport: c } = gr(), [o, a] = Y(s !== !0), [u, M] = Y(!1);
|
|
1390
|
-
return v(() => {
|
|
1391
|
-
const l = setTimeout(() => {
|
|
1392
|
-
o && M(!0);
|
|
1393
|
-
}, r);
|
|
1394
|
-
return () => clearTimeout(l);
|
|
1395
|
-
}, [r, o]), v(() => {
|
|
1396
|
-
!o && c && a(!0);
|
|
1397
|
-
}, [c]), /* @__PURE__ */ N("div", { ref: i, className: u && o ? n : "invisible", children: t });
|
|
1398
|
-
}
|
|
1399
|
-
const et = rt(
|
|
1400
|
-
(e) => /* @__PURE__ */ N(Dr, { ...e }),
|
|
1401
|
-
yr
|
|
1402
|
-
);
|
|
1403
|
-
et.displayName = "PrintAfter";
|
|
1404
|
-
function yr(e, t) {
|
|
1405
|
-
return e.delay === t.delay && e.animation === t.animation && e.children === t.children && e.onVisible === t.onVisible;
|
|
1406
|
-
}
|
|
1407
|
-
const $r = et, dr = (e, t) => {
|
|
1408
|
-
const r = {
|
|
1409
|
-
color: e[t].text,
|
|
1410
|
-
backgroundColor: e[t].default,
|
|
1411
|
-
".close-notification-icon": {
|
|
1412
|
-
fill: e[t].text
|
|
1413
|
-
}
|
|
1414
|
-
};
|
|
1415
|
-
return {
|
|
1416
|
-
root: $(r)
|
|
1417
|
-
};
|
|
1418
|
-
};
|
|
1419
|
-
function Rr(e) {
|
|
1420
|
-
const { closeProps: t } = e, { notification: r, container: n, removeNotification: s } = lr(), i = re(
|
|
1421
|
-
(a) => s(a),
|
|
1422
|
-
[s]
|
|
1423
|
-
), c = re((a) => {
|
|
1424
|
-
switch (a) {
|
|
1425
|
-
case V.info:
|
|
1426
|
-
return "info";
|
|
1427
|
-
case V.warning:
|
|
1428
|
-
return "warning";
|
|
1429
|
-
case V.success:
|
|
1430
|
-
return "success";
|
|
1431
|
-
default:
|
|
1432
|
-
return "error";
|
|
1433
|
-
}
|
|
1434
|
-
}, []);
|
|
1435
|
-
v(() => (r != null && r.length && window.addEventListener("click", () => i()), () => {
|
|
1436
|
-
r != null && r.length && window.removeEventListener("click", () => i());
|
|
1437
|
-
}), [r, i]);
|
|
1438
|
-
const { colors: o } = Q();
|
|
1439
|
-
return /* @__PURE__ */ N(
|
|
1440
|
-
"div",
|
|
1441
|
-
{
|
|
1442
|
-
className: `notification-portal ${r != null && r.length ? "w-screen h-screen" : ""}`,
|
|
1443
|
-
children: r != null && r.length ? r == null ? void 0 : r.map(({ id: a, type: u, message: M }, l) => {
|
|
1444
|
-
const y = dr(o, c(u));
|
|
1445
|
-
return /* @__PURE__ */ w("div", { className: `notification-root ${y.root}`, children: [
|
|
1446
|
-
/* @__PURE__ */ N(
|
|
1447
|
-
or,
|
|
1448
|
-
{
|
|
1449
|
-
name: "close-notification",
|
|
1450
|
-
...t,
|
|
1451
|
-
icon: /* @__PURE__ */ N(
|
|
1452
|
-
"svg",
|
|
1453
|
-
{
|
|
1454
|
-
className: "close-notification-icon",
|
|
1455
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1456
|
-
viewBox: "0 0 384 512",
|
|
1457
|
-
children: /* @__PURE__ */ N("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
|
|
1458
|
-
}
|
|
1459
|
-
),
|
|
1460
|
-
ref: null,
|
|
1461
|
-
color: "basics",
|
|
1462
|
-
onClick: () => i(l),
|
|
1463
|
-
size: "small",
|
|
1464
|
-
className: `notification-close-button ${t == null ? void 0 : t.className}`
|
|
1465
|
-
}
|
|
1466
|
-
),
|
|
1467
|
-
/* @__PURE__ */ N("p", { children: M })
|
|
1468
|
-
] }, a);
|
|
1469
|
-
}) : null
|
|
1470
|
-
}
|
|
1471
|
-
);
|
|
1472
|
-
}
|
|
1473
|
-
const Ir = (e, t, r) => {
|
|
1474
|
-
const n = {};
|
|
1475
|
-
return r ? (n.backgroundColor = e[t].text, n["& .path"] = {
|
|
1476
|
-
stroke: e[t].default
|
|
1477
|
-
}) : (n.backgroundColor = e[t].default, n["& .path"] = {
|
|
1478
|
-
stroke: e[t].text
|
|
1479
|
-
}), { root: $({ ...n }) };
|
|
1480
|
-
}, fr = (e) => {
|
|
1481
|
-
const {
|
|
1482
|
-
color: t = "primary",
|
|
1483
|
-
colorInverted: r = !1,
|
|
1484
|
-
loaderClass: n = "",
|
|
1485
|
-
strokeWidth: s = "4",
|
|
1486
|
-
...i
|
|
1487
|
-
} = e, { colors: c } = Q(), o = Ir(c, t, r);
|
|
1488
|
-
return /* @__PURE__ */ N("div", { ...i, className: `loading ${o.root} ${i.className}`, children: /* @__PURE__ */ N("div", { className: "loader-container", children: /* @__PURE__ */ N("div", { className: `loader ${n}`, children: /* @__PURE__ */ N("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ N(
|
|
1489
|
-
"circle",
|
|
1490
|
-
{
|
|
1491
|
-
className: "path",
|
|
1492
|
-
cx: "50",
|
|
1493
|
-
cy: "50",
|
|
1494
|
-
r: "20",
|
|
1495
|
-
fill: "none",
|
|
1496
|
-
strokeWidth: s,
|
|
1497
|
-
strokeMiterlimit: "10"
|
|
1498
|
-
}
|
|
1499
|
-
) }) }) }) });
|
|
1500
|
-
}, zr = fr, ve = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODUiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA4NSA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xOC43NjQ3IDMxLjkwNzhDMTcuMjg3MiAzMS45MDc4IDE1Ljk2MzEgMzEuNjY3OSAxNC43OTI2IDMxLjE4ODNDMTMuNjIyMSAzMC43MDg2IDEyLjY4MTkgMjkuOTk4NSAxMS45NzE5IDI5LjA1ODNDMTEuMjgxMSAyOC4xMTgxIDEwLjkxNjUgMjYuOTg1OSAxMC44NzgxIDI1LjY2MTlIMTYuMTE2N0MxNi4xOTM0IDI2LjQxMDMgMTYuNDUyNSAyNi45ODU5IDE2Ljg5MzggMjcuMzg4OUMxNy4zMzUxIDI3Ljc3MjcgMTcuOTEwOCAyNy45NjQ2IDE4LjYyMDggMjcuOTY0NkMxOS4zNSAyNy45NjQ2IDE5LjkyNTYgMjcuODAxNSAyMC4zNDc4IDI3LjQ3NTJDMjAuNzY5OSAyNy4xMjk4IDIwLjk4MSAyNi42NTk2IDIwLjk4MSAyNi4wNjQ5QzIwLjk4MSAyNS41NjU5IDIwLjgwODMgMjUuMTUzNSAyMC40NjI5IDI0LjgyNzJDMjAuMTM2NyAyNC41MDA5IDE5LjcyNDEgMjQuMjMyNCAxOS4yMjUyIDI0LjAyMT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NTI3NiA3NC41NjQ4IDMwLjU3ODQgNzQuODQ1OSAzMC41Nzg0Qzc1LjEzNCAzMC41Nzg0IDc1LjM3ODIgMzAuNTI3NiA3NS41Nzg1IDMwLjQyNTdDNzUuNzgyMyAzMC4zMjM5IDc1LjkzNjcgMzAuMTY0IDc2LjA0MjIgMjkuOTQ2MUM3Ni4xNTEgMjkuNzI4MiA3Ni4yMDU3IDI5LjQ0NzEgNzYuMjA1NyAyOS4xMDI4VjI0LjAzMjdaTTgwLjc2NDQgMjQuMDMyN1YzMS43MDYzSDc5LjE4ODVWMjQuMDMyN0g4MC43NjQ0WiIgZmlsbD0iI0U4MzYzNiIvPg0KPHBhdGggZD0iTTcxLjA0NDEgMjAuODAwNEw2Ny4yOTE1IDMxLjkxMDNINjUuNzg3Nkw2OS41NDAyIDIwLjgwMDRINzEuMDQ0MVoiIGZpbGw9IiNDRDIxMkEiLz4NCjwvc3ZnPg0K", hr = (e, t) => {
|
|
1501
|
-
const r = {
|
|
1502
|
-
backgroundColor: e[t].default,
|
|
1503
|
-
WebkitMask: `url('${ve}') no-repeat center`,
|
|
1504
|
-
mask: `url('${ve}') no-repeat center`
|
|
1505
|
-
}, n = {
|
|
1506
|
-
backgroundColor: e.basics.dark
|
|
1507
|
-
};
|
|
1508
|
-
return {
|
|
1509
|
-
root: $({
|
|
1510
|
-
...n,
|
|
1511
|
-
".sito-logo": r
|
|
1512
|
-
})
|
|
1513
|
-
};
|
|
1514
|
-
};
|
|
1515
|
-
function Vr(e) {
|
|
1516
|
-
const { color: t = "primary", logo: r, logoClass: n, appName: s, visible: i = !0 } = e, { colors: c } = Q(), o = hr(c, t), [a, u] = Y(!1);
|
|
1517
|
-
v(() => {
|
|
1518
|
-
setTimeout(() => u(!0), 2500);
|
|
1519
|
-
}, []);
|
|
1520
|
-
const [M, l] = Y(!0);
|
|
1521
|
-
return v(() => {
|
|
1522
|
-
i !== void 0 && (i ? l(!0) : setTimeout(() => l(!1), 501));
|
|
1523
|
-
}, [i]), M ? /* @__PURE__ */ w(
|
|
1524
|
-
"div",
|
|
1525
|
-
{
|
|
1526
|
-
className: `splash-screen ${o.root} ${i ? "splash-loading-show " : "splash-loading-hide"}`,
|
|
1527
|
-
children: [
|
|
1528
|
-
/* @__PURE__ */ w("div", { className: "logo-container", children: [
|
|
1529
|
-
typeof r == "string" ? /* @__PURE__ */ N(
|
|
1530
|
-
"img",
|
|
1531
|
-
{
|
|
1532
|
-
alt: s,
|
|
1533
|
-
className: `puff-in-center splash-image ${n}`
|
|
1534
|
-
}
|
|
1535
|
-
) : /* @__PURE__ */ N("div", { className: `puff-in-center ${n}`, children: r }),
|
|
1536
|
-
/* @__PURE__ */ N(
|
|
1537
|
-
"div",
|
|
1538
|
-
{
|
|
1539
|
-
className: `splash-loading ${a ? "splash-loading-show" : "splash-loading-hide"} pointer-events-none`,
|
|
1540
|
-
children: /* @__PURE__ */ N(
|
|
1541
|
-
zr,
|
|
1542
|
-
{
|
|
1543
|
-
colorInverted: !0,
|
|
1544
|
-
className: "splash-loading",
|
|
1545
|
-
color: t,
|
|
1546
|
-
strokeWidth: "6"
|
|
1547
|
-
}
|
|
1548
|
-
)
|
|
1549
|
-
}
|
|
1550
|
-
)
|
|
1551
|
-
] }),
|
|
1552
|
-
/* @__PURE__ */ w("div", { className: "animated slideInUp brand", children: [
|
|
1553
|
-
/* @__PURE__ */ N("p", { children: "made width" }),
|
|
1554
|
-
/* @__PURE__ */ N("div", { className: "splash-sito-logo sito-logo" })
|
|
1555
|
-
] })
|
|
1556
|
-
]
|
|
1557
|
-
}
|
|
1558
|
-
) : null;
|
|
1559
|
-
}
|
|
1560
|
-
const Ar = (e) => ({
|
|
1561
|
-
root: $({
|
|
1562
|
-
".dark .s-error-title": {
|
|
1563
|
-
color: e.error.light
|
|
1564
|
-
},
|
|
1565
|
-
".s-error-title": {
|
|
1566
|
-
color: e.error.default
|
|
1567
|
-
}
|
|
1568
|
-
})
|
|
1569
|
-
}), Or = (e) => {
|
|
1570
|
-
const t = Ue(null), { colors: r } = Q(), n = Ar(r), {
|
|
1571
|
-
onRetry: s = () => window.location.reload(),
|
|
1572
|
-
className: i = "",
|
|
1573
|
-
title: c = "Something went wrong",
|
|
1574
|
-
text: o,
|
|
1575
|
-
button: a = "Try again",
|
|
1576
|
-
buttonProps: u
|
|
1577
|
-
} = e;
|
|
1578
|
-
return /* @__PURE__ */ w("div", { role: "alert", className: `error-root ${n.root} ${i}`, children: [
|
|
1579
|
-
/* @__PURE__ */ N(
|
|
1580
|
-
"svg",
|
|
1581
|
-
{
|
|
1582
|
-
className: "s-error-icon",
|
|
1583
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1584
|
-
viewBox: "0 0 512 512",
|
|
1585
|
-
children: /* @__PURE__ */ N("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" })
|
|
1586
|
-
}
|
|
1587
|
-
),
|
|
1588
|
-
/* @__PURE__ */ N("p", { className: "s-error-title", children: c }),
|
|
1589
|
-
/* @__PURE__ */ N("pre", { className: "s-error-body", children: o }),
|
|
1590
|
-
s ? /* @__PURE__ */ N(
|
|
1591
|
-
qe,
|
|
1592
|
-
{
|
|
1593
|
-
name: "reload",
|
|
1594
|
-
onClick: s,
|
|
1595
|
-
shape: "filled",
|
|
1596
|
-
color: "primary",
|
|
1597
|
-
"aria-label": "click to reload",
|
|
1598
|
-
...u,
|
|
1599
|
-
ref: t,
|
|
1600
|
-
children: a
|
|
1601
|
-
}
|
|
1602
|
-
) : null
|
|
1603
|
-
] });
|
|
1604
|
-
};
|
|
1605
|
-
function ge(e, t) {
|
|
1606
|
-
return ge = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, s) {
|
|
1607
|
-
return n.__proto__ = s, n;
|
|
1608
|
-
}, ge(e, t);
|
|
1609
|
-
}
|
|
1610
|
-
function Tr(e, t) {
|
|
1611
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ge(e, t);
|
|
1612
|
-
}
|
|
1613
|
-
var pr = function(t, r) {
|
|
1614
|
-
return t === void 0 && (t = []), r === void 0 && (r = []), t.length !== r.length || t.some(function(n, s) {
|
|
1615
|
-
return !Object.is(n, r[s]);
|
|
1616
|
-
});
|
|
1617
|
-
}, Qe = {
|
|
1618
|
-
error: null
|
|
1619
|
-
}, Lr = /* @__PURE__ */ function(e) {
|
|
1620
|
-
Tr(t, e);
|
|
1621
|
-
function t() {
|
|
1622
|
-
for (var n, s = arguments.length, i = new Array(s), c = 0; c < s; c++)
|
|
1623
|
-
i[c] = arguments[c];
|
|
1624
|
-
return n = e.call.apply(e, [this].concat(i)) || this, n.state = Qe, n.resetErrorBoundary = function() {
|
|
1625
|
-
for (var o, a = arguments.length, u = new Array(a), M = 0; M < a; M++)
|
|
1626
|
-
u[M] = arguments[M];
|
|
1627
|
-
n.props.onReset == null || (o = n.props).onReset.apply(o, u), n.reset();
|
|
1628
|
-
}, n;
|
|
1629
|
-
}
|
|
1630
|
-
t.getDerivedStateFromError = function(s) {
|
|
1631
|
-
return {
|
|
1632
|
-
error: s
|
|
1633
|
-
};
|
|
1634
|
-
};
|
|
1635
|
-
var r = t.prototype;
|
|
1636
|
-
return r.reset = function() {
|
|
1637
|
-
this.setState(Qe);
|
|
1638
|
-
}, r.componentDidCatch = function(s, i) {
|
|
1639
|
-
var c, o;
|
|
1640
|
-
(c = (o = this.props).onError) == null || c.call(o, s, i);
|
|
1641
|
-
}, r.componentDidUpdate = function(s, i) {
|
|
1642
|
-
var c = this.state.error, o = this.props.resetKeys;
|
|
1643
|
-
if (c !== null && i.error !== null && pr(s.resetKeys, o)) {
|
|
1644
|
-
var a, u;
|
|
1645
|
-
(a = (u = this.props).onResetKeysChange) == null || a.call(u, s.resetKeys, o), this.reset();
|
|
1646
|
-
}
|
|
1647
|
-
}, r.render = function() {
|
|
1648
|
-
var s = this.state.error, i = this.props, c = i.fallbackRender, o = i.FallbackComponent, a = i.fallback;
|
|
1649
|
-
if (s !== null) {
|
|
1650
|
-
var u = {
|
|
1651
|
-
error: s,
|
|
1652
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
1653
|
-
};
|
|
1654
|
-
if (/* @__PURE__ */ Me.isValidElement(a))
|
|
1655
|
-
return a;
|
|
1656
|
-
if (typeof c == "function")
|
|
1657
|
-
return c(u);
|
|
1658
|
-
if (o)
|
|
1659
|
-
return /* @__PURE__ */ Me.createElement(o, u);
|
|
1660
|
-
throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
|
|
1661
|
-
}
|
|
1662
|
-
return this.props.children;
|
|
1663
|
-
}, t;
|
|
1664
|
-
}(Me.Component);
|
|
1665
|
-
const xr = (e) => {
|
|
1666
|
-
const { error: t, resetErrorBoundary: r } = e;
|
|
1667
|
-
return /* @__PURE__ */ N(Or, { onRetry: r, text: t.message });
|
|
1668
|
-
};
|
|
1669
|
-
function Pr(e) {
|
|
1670
|
-
const { children: t, onRetry: r } = e;
|
|
1671
|
-
return /* @__PURE__ */ N(Lr, { FallbackComponent: xr, onReset: r, children: t });
|
|
1672
|
-
}
|
|
1673
|
-
const _r = (e) => {
|
|
1674
|
-
const [t, r] = Y(!1);
|
|
1675
|
-
return v(() => {
|
|
1676
|
-
const n = window.matchMedia(e);
|
|
1677
|
-
n.matches !== t && r(n.matches);
|
|
1678
|
-
const s = () => r(n.matches);
|
|
1679
|
-
return window.addEventListener("resize", s), () => window.removeEventListener("resize", s);
|
|
1680
|
-
}, [t, e]), t;
|
|
1681
|
-
}, Wr = () => {
|
|
1682
|
-
const [e, t] = Y({
|
|
1683
|
-
width: window.innerWidth,
|
|
1684
|
-
height: window.innerHeight
|
|
1685
|
-
}), r = ie(() => {
|
|
1686
|
-
const { width: s } = e;
|
|
1687
|
-
switch (!0) {
|
|
1688
|
-
case s <= 400:
|
|
1689
|
-
return "xs";
|
|
1690
|
-
case s <= 600:
|
|
1691
|
-
return "sm";
|
|
1692
|
-
case s <= 900:
|
|
1693
|
-
return "md";
|
|
1694
|
-
case s <= 1200:
|
|
1695
|
-
return "lg";
|
|
1696
|
-
case s <= 1536:
|
|
1697
|
-
return "xl";
|
|
1698
|
-
default:
|
|
1699
|
-
return "2xl";
|
|
1700
|
-
}
|
|
1701
|
-
}, [e]), n = re(() => {
|
|
1702
|
-
}, [t]);
|
|
1703
|
-
return v(() => (window.addEventListener("resize", n), () => window.removeEventListener("resize", n)), [n]), {
|
|
1704
|
-
width: e.width,
|
|
1705
|
-
height: e.height,
|
|
1706
|
-
breakpoint: r
|
|
1707
|
-
};
|
|
1708
|
-
};
|
|
1709
|
-
export {
|
|
1710
|
-
qe as Button,
|
|
1711
|
-
Or as Error,
|
|
1712
|
-
xr as ErrorFallback,
|
|
1713
|
-
Pr as Handler,
|
|
1714
|
-
or as IconButton,
|
|
1715
|
-
Yr as Image,
|
|
1716
|
-
vr as InputControl,
|
|
1717
|
-
zr as Loading,
|
|
1718
|
-
Er as ModeProvider,
|
|
1719
|
-
Rr as Notification,
|
|
1720
|
-
Ur as NotificationProvider,
|
|
1721
|
-
$r as PrintAfter,
|
|
1722
|
-
br as SelectControl,
|
|
1723
|
-
Vr as SplashScreen,
|
|
1724
|
-
kr as StyleProvider,
|
|
1725
|
-
Qr as Switcher,
|
|
1726
|
-
Cr as TextareaControl,
|
|
1727
|
-
gr as useIsElementInViewport,
|
|
1728
|
-
_r as useMediaQuery,
|
|
1729
|
-
er as useMode,
|
|
1730
|
-
lr as useNotification,
|
|
1731
|
-
Wr as useScreenHandler,
|
|
1732
|
-
Q as useStyle
|
|
1
|
+
import { forwardRef as e, useCallback as t, useEffect as n, useId 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
|
+
import { createPortal as l } from "react-dom";
|
|
4
|
+
//#region src/utils/classNames.ts
|
|
5
|
+
var u = (...e) => e.filter(Boolean).join(" "), d = {
|
|
6
|
+
DEFAULT: "default",
|
|
7
|
+
PRIMARY: "primary",
|
|
8
|
+
SECONDARY: "secondary",
|
|
9
|
+
ERROR: "error",
|
|
10
|
+
WARNING: "warning",
|
|
11
|
+
SUCCESS: "success",
|
|
12
|
+
INFO: "info"
|
|
13
|
+
}, f = {
|
|
14
|
+
TEXT: "text",
|
|
15
|
+
SUBMIT: "submit",
|
|
16
|
+
OUTLINED: "outlined"
|
|
17
|
+
}, p = e(function(e, t) {
|
|
18
|
+
let { color: n = d.DEFAULT, type: r = "button", variant: i = f.TEXT, loading: a = !1, loadingIndicator: l, loadingLabel: p = "Loading", disabled: m, className: h, children: g, ..._ } = e, v = u("sito-ui-button", `sito-ui-button--${i}`, `sito-ui-button--${n}`, a && "sito-ui-button--loading", h), y = l === void 0 ? /* @__PURE__ */ s("span", {
|
|
19
|
+
className: "sito-ui-button__spinner",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
"data-sito-ui": "button-spinner"
|
|
22
|
+
}) : l;
|
|
23
|
+
return /* @__PURE__ */ c("button", {
|
|
24
|
+
"data-sito-ui": "button",
|
|
25
|
+
..._,
|
|
26
|
+
type: r,
|
|
27
|
+
ref: t,
|
|
28
|
+
disabled: m || a,
|
|
29
|
+
"aria-busy": a || _["aria-busy"],
|
|
30
|
+
className: v,
|
|
31
|
+
children: [a ? /* @__PURE__ */ c(o, { children: [y, /* @__PURE__ */ s("span", {
|
|
32
|
+
className: "sito-ui-button__loading-label",
|
|
33
|
+
children: p
|
|
34
|
+
})] }) : null, g]
|
|
35
|
+
});
|
|
36
|
+
}), m = e(function(e, t) {
|
|
37
|
+
let { children: n, icon: r, iconClassName: i, type: a = "button", variant: o = "text", color: l = "default", loading: d = !1, className: f, ...m } = e, h = u("sito-ui-icon-button", f);
|
|
38
|
+
return /* @__PURE__ */ c(p, {
|
|
39
|
+
...m,
|
|
40
|
+
ref: t,
|
|
41
|
+
type: a,
|
|
42
|
+
variant: o,
|
|
43
|
+
color: l,
|
|
44
|
+
loading: d,
|
|
45
|
+
"data-sito-ui": "icon-button",
|
|
46
|
+
className: h,
|
|
47
|
+
children: [d ? null : /* @__PURE__ */ s("span", {
|
|
48
|
+
className: i,
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
children: r
|
|
51
|
+
}), n]
|
|
52
|
+
});
|
|
53
|
+
}), h = "input:not([type=\"hidden\"]):not([disabled]), textarea:not([disabled]), select:not([disabled])", g = "button[type=\"submit\"]:not([disabled]), input[type=\"submit\"]:not([disabled])", _ = [
|
|
54
|
+
"a[href]",
|
|
55
|
+
"button:not([disabled])",
|
|
56
|
+
"textarea:not([disabled])",
|
|
57
|
+
"input:not([disabled])",
|
|
58
|
+
"select:not([disabled])",
|
|
59
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
60
|
+
].join(","), v = 0, y = null, b = () => typeof document < "u" && !!document.body, x = () => {
|
|
61
|
+
b() && (v === 0 && (y = document.body.style.overflow, document.body.style.overflow = "hidden"), v += 1);
|
|
62
|
+
}, S = () => {
|
|
63
|
+
!b() || v === 0 || (--v, v === 0 && (document.body.style.overflow = y ?? "", y = null));
|
|
64
|
+
}, C = (e) => Array.from(e.querySelectorAll(_)).filter((e) => e.getAttribute("aria-disabled") !== "true"), w = () => typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null, T = (e) => {
|
|
65
|
+
let a = r(), o = i(null), d = i(null), { dialogId: f, title: p, ariaLabel: _, children: v, onClose: y, initialFocus: b = "none", closeOnBackdropClick: T = !1, closeOnEscape: E = !0, lockBodyScroll: D = !0, onSubmit: O, open: k = !1, mobileFullScreen: A = !1, containerClassName: j, className: M, closeLabel: N = "Close dialog", closeIcon: P = "x", showCloseButton: F = !0, portalContainer: I } = e, L = p ? `${f ?? a}-title` : void 0, R = t((e) => {
|
|
66
|
+
if (e.key === "Escape" && k && E) {
|
|
67
|
+
y();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (e.key !== "Tab" || !k) return;
|
|
71
|
+
let t = o.current;
|
|
72
|
+
if (!t) return;
|
|
73
|
+
let n = C(t);
|
|
74
|
+
if (n.length === 0) {
|
|
75
|
+
e.preventDefault(), t.focus();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
let r = n[0], i = n[n.length - 1], a = w(), s = !a || !t.contains(a);
|
|
79
|
+
if (e.shiftKey && (s || a === r)) {
|
|
80
|
+
e.preventDefault(), i.focus();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
!e.shiftKey && (s || a === i) && (e.preventDefault(), r.focus());
|
|
84
|
+
}, [
|
|
85
|
+
E,
|
|
86
|
+
y,
|
|
87
|
+
k
|
|
88
|
+
]);
|
|
89
|
+
n(() => {
|
|
90
|
+
if (!(!k || typeof window > "u")) return window.addEventListener("keydown", R), () => {
|
|
91
|
+
window.removeEventListener("keydown", R);
|
|
92
|
+
};
|
|
93
|
+
}, [R, k]), n(() => {
|
|
94
|
+
if (k) return d.current = w(), () => {
|
|
95
|
+
d.current?.isConnected && d.current.focus(), d.current = null;
|
|
96
|
+
};
|
|
97
|
+
}, [k]), n(() => {
|
|
98
|
+
if (!k) return;
|
|
99
|
+
let e = o.current;
|
|
100
|
+
if (e) {
|
|
101
|
+
if (b === "first-input") {
|
|
102
|
+
let t = e.querySelector(h);
|
|
103
|
+
if (t) {
|
|
104
|
+
t.focus();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (b === "submit") {
|
|
109
|
+
let t = e.querySelector(g);
|
|
110
|
+
if (t) {
|
|
111
|
+
t.focus();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
e.focus();
|
|
116
|
+
}
|
|
117
|
+
}, [b, k]), n(() => {
|
|
118
|
+
if (!(!k || !D)) return x(), () => {
|
|
119
|
+
S();
|
|
120
|
+
};
|
|
121
|
+
}, [k, D]);
|
|
122
|
+
let z = t((e) => {
|
|
123
|
+
T && e.target === e.currentTarget && y();
|
|
124
|
+
}, [T, y]), B = t((e) => {
|
|
125
|
+
e.preventDefault(), O?.(e);
|
|
126
|
+
}, [O]);
|
|
127
|
+
if (!k || typeof document > "u") return null;
|
|
128
|
+
let V = O ? /* @__PURE__ */ s("form", {
|
|
129
|
+
onSubmit: B,
|
|
130
|
+
children: v
|
|
131
|
+
}) : v, H = typeof P == "string" ? /* @__PURE__ */ s("span", {
|
|
132
|
+
"aria-hidden": "true",
|
|
133
|
+
children: P
|
|
134
|
+
}) : P;
|
|
135
|
+
return l(/* @__PURE__ */ s("div", {
|
|
136
|
+
id: f ? `backdrop-${f}` : void 0,
|
|
137
|
+
"data-sito-ui": "dialog-backdrop",
|
|
138
|
+
onClick: z,
|
|
139
|
+
className: u("sito-ui-dialog-backdrop", j),
|
|
140
|
+
children: /* @__PURE__ */ c("div", {
|
|
141
|
+
id: f,
|
|
142
|
+
ref: o,
|
|
143
|
+
role: "dialog",
|
|
144
|
+
"aria-modal": "true",
|
|
145
|
+
"aria-label": p ? void 0 : _,
|
|
146
|
+
"aria-labelledby": L,
|
|
147
|
+
tabIndex: -1,
|
|
148
|
+
"data-sito-ui": "dialog",
|
|
149
|
+
className: u("sito-ui-dialog", A && "sito-ui-dialog--mobile-full-screen", M),
|
|
150
|
+
children: [/* @__PURE__ */ c("div", {
|
|
151
|
+
className: "sito-ui-dialog__header",
|
|
152
|
+
children: [p ? /* @__PURE__ */ s("h3", {
|
|
153
|
+
id: L,
|
|
154
|
+
className: "sito-ui-dialog__title",
|
|
155
|
+
children: p
|
|
156
|
+
}) : null, F ? /* @__PURE__ */ s(m, {
|
|
157
|
+
icon: H,
|
|
158
|
+
disabled: !k,
|
|
159
|
+
"aria-disabled": !k,
|
|
160
|
+
onClick: y,
|
|
161
|
+
variant: "text",
|
|
162
|
+
color: "error",
|
|
163
|
+
className: "sito-ui-dialog__close",
|
|
164
|
+
"aria-label": N
|
|
165
|
+
}) : null]
|
|
166
|
+
}), V]
|
|
167
|
+
})
|
|
168
|
+
}), I ?? document.body);
|
|
169
|
+
}, E = (e) => {
|
|
170
|
+
let { primaryText: t, cancelText: n, onPrimaryClick: r, onCancel: i, isLoading: a = !1, loadingIndicator: o, disabled: l = !1, primaryType: d = "submit", containerClassName: f, primaryClassName: m, cancelClassName: h, alignEnd: g = !1, primaryName: _, primaryAriaLabel: v, cancelName: y, cancelAriaLabel: b, extraActions: x = [] } = e;
|
|
171
|
+
return /* @__PURE__ */ c("div", {
|
|
172
|
+
"data-sito-ui": "dialog-actions",
|
|
173
|
+
className: u("sito-ui-dialog-actions", g && "sito-ui-dialog-actions--end", f),
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ s(p, {
|
|
176
|
+
type: d,
|
|
177
|
+
color: "primary",
|
|
178
|
+
variant: "submit",
|
|
179
|
+
className: m,
|
|
180
|
+
disabled: l,
|
|
181
|
+
loading: a,
|
|
182
|
+
loadingIndicator: o,
|
|
183
|
+
onClick: r,
|
|
184
|
+
name: _,
|
|
185
|
+
"aria-label": v,
|
|
186
|
+
children: t
|
|
187
|
+
}),
|
|
188
|
+
x.map(({ id: e, ...t }) => /* @__PURE__ */ s(p, { ...t }, e)),
|
|
189
|
+
/* @__PURE__ */ s(p, {
|
|
190
|
+
type: "button",
|
|
191
|
+
variant: "outlined",
|
|
192
|
+
className: h,
|
|
193
|
+
disabled: l || a,
|
|
194
|
+
onClick: i,
|
|
195
|
+
name: y,
|
|
196
|
+
"aria-label": b,
|
|
197
|
+
children: n
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
}, D = (e = !1) => {
|
|
202
|
+
let [t, n] = a(e);
|
|
203
|
+
return {
|
|
204
|
+
open: t,
|
|
205
|
+
setOpen: n,
|
|
206
|
+
handleClose: () => n(!1),
|
|
207
|
+
handleOpen: () => n(!0)
|
|
208
|
+
};
|
|
1733
209
|
};
|
|
210
|
+
//#endregion
|
|
211
|
+
export { p as Button, T as Dialog, E as DialogActions, m as IconButton, D as useDialog };
|