astrogators-shared-ui 0.2.3 → 0.2.5
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/components/forms/Select.d.ts +1 -1
- package/dist/index.js +74 -73
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElemen
|
|
|
9
9
|
label?: string;
|
|
10
10
|
error?: string;
|
|
11
11
|
helperText?: string;
|
|
12
|
-
options
|
|
12
|
+
options?: SelectOption[];
|
|
13
13
|
placeholder?: string;
|
|
14
14
|
fullWidth?: boolean;
|
|
15
15
|
className?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ue = Object.defineProperty;
|
|
2
2
|
var me = (t, e, s) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
3
|
var R = (t, e, s) => me(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { jsx as
|
|
4
|
+
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
5
5
|
import ne, { createContext as he, useState as $, useCallback as A, useEffect as J, useContext as ge } from "react";
|
|
6
6
|
const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
7
7
|
container: pe,
|
|
@@ -15,11 +15,11 @@ const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
|
15
15
|
children: t,
|
|
16
16
|
maxWidth: e = "xl",
|
|
17
17
|
padding: s = !0,
|
|
18
|
-
className:
|
|
19
|
-
}) => /* @__PURE__ */
|
|
18
|
+
className: n = ""
|
|
19
|
+
}) => /* @__PURE__ */ r(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
|
-
className: `${Q.container} ${Q[`maxWidth-${e}`]} ${s ? Q.padding : ""} ${
|
|
22
|
+
className: `${Q.container} ${Q[`maxWidth-${e}`]} ${s ? Q.padding : ""} ${n}`,
|
|
23
23
|
children: t
|
|
24
24
|
}
|
|
25
25
|
), ye = "_topBar_10g3c_1", ve = "_content_10g3c_13", $e = "_left_10g3c_23", we = "_right_10g3c_30", be = "_logo_10g3c_36", B = {
|
|
@@ -32,26 +32,26 @@ const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
|
32
32
|
logo: t,
|
|
33
33
|
leftContent: e,
|
|
34
34
|
rightContent: s,
|
|
35
|
-
className:
|
|
36
|
-
}) => /* @__PURE__ */
|
|
35
|
+
className: n = ""
|
|
36
|
+
}) => /* @__PURE__ */ r("header", { className: `${B.topBar} ${n}`, children: /* @__PURE__ */ h("div", { className: B.content, children: [
|
|
37
37
|
/* @__PURE__ */ h("div", { className: B.left, children: [
|
|
38
|
-
t && /* @__PURE__ */
|
|
38
|
+
t && /* @__PURE__ */ r("div", { className: B.logo, children: t }),
|
|
39
39
|
e
|
|
40
40
|
] }),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ r("div", { className: B.right, children: s })
|
|
42
42
|
] }) }), Ne = "_footer_zjuj8_1", Se = "_content_zjuj8_7", Ae = "_defaultContent_zjuj8_13", xe = "_copyright_zjuj8_21", Te = "_disclaimer_zjuj8_26", P = {
|
|
43
43
|
footer: Ne,
|
|
44
44
|
content: Se,
|
|
45
45
|
defaultContent: Ae,
|
|
46
46
|
copyright: xe,
|
|
47
47
|
disclaimer: Te
|
|
48
|
-
}, fs = ({ children: t, className: e = "" }) => /* @__PURE__ */
|
|
48
|
+
}, fs = ({ children: t, className: e = "" }) => /* @__PURE__ */ r("footer", { className: `${P.footer} ${e}`, children: /* @__PURE__ */ r("div", { className: P.content, children: t || /* @__PURE__ */ h("div", { className: P.defaultContent, children: [
|
|
49
49
|
/* @__PURE__ */ h("p", { className: P.copyright, children: [
|
|
50
50
|
"© ",
|
|
51
51
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
52
52
|
" The Astrogator's Table. All rights reserved."
|
|
53
53
|
] }),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ r("p", { className: P.disclaimer, children: "Star Wars: Galaxy of Heroes is a trademark of Electronic Arts Inc." })
|
|
55
55
|
] }) }) }), Ce = "_button_159ms_1", ke = "_sm_159ms_22", Ee = "_md_159ms_28", We = "_lg_159ms_34", Ie = "_primary_159ms_41", Le = "_secondary_159ms_55", qe = "_outline_159ms_69", Re = "_ghost_159ms_80", Be = "_danger_159ms_89", Pe = "_fullWidth_159ms_100", Ue = "_loading_159ms_105", je = "_loadingSpinner_159ms_110", De = "_spinner_159ms_116", Fe = "_spin_159ms_116", ze = "_loadingText_159ms_131", x = {
|
|
56
56
|
button: Ce,
|
|
57
57
|
sm: ke,
|
|
@@ -72,20 +72,20 @@ const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
|
72
72
|
children: t,
|
|
73
73
|
variant: e = "primary",
|
|
74
74
|
size: s = "md",
|
|
75
|
-
fullWidth:
|
|
75
|
+
fullWidth: n = !1,
|
|
76
76
|
loading: d = !1,
|
|
77
77
|
disabled: u = !1,
|
|
78
78
|
className: l = "",
|
|
79
79
|
...i
|
|
80
|
-
}) => /* @__PURE__ */
|
|
80
|
+
}) => /* @__PURE__ */ r(
|
|
81
81
|
"button",
|
|
82
82
|
{
|
|
83
|
-
className: `${x.button} ${x[e]} ${x[s]} ${
|
|
83
|
+
className: `${x.button} ${x[e]} ${x[s]} ${n ? x.fullWidth : ""} ${d ? x.loading : ""} ${l}`,
|
|
84
84
|
disabled: u || d,
|
|
85
85
|
...i,
|
|
86
86
|
children: d ? /* @__PURE__ */ h("span", { className: x.loadingSpinner, children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ r("span", { className: x.spinner }),
|
|
88
|
+
/* @__PURE__ */ r("span", { className: x.loadingText, children: t })
|
|
89
89
|
] }) : t
|
|
90
90
|
}
|
|
91
91
|
), Oe = "_inputWrapper_15t4g_1", Me = "_fullWidth_15t4g_7", Je = "_label_15t4g_11", He = "_required_15t4g_20", Ye = "_input_15t4g_1", Ge = "_error_15t4g_55", Ke = "_errorText_15t4g_63", Ve = "_helperText_15t4g_68", T = {
|
|
@@ -102,18 +102,18 @@ const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
|
102
102
|
label: t,
|
|
103
103
|
error: e,
|
|
104
104
|
helperText: s,
|
|
105
|
-
fullWidth:
|
|
105
|
+
fullWidth: n = !1,
|
|
106
106
|
className: d = "",
|
|
107
107
|
id: u,
|
|
108
108
|
...l
|
|
109
109
|
}, i) => {
|
|
110
110
|
const c = u || `input-${Math.random().toString(36).substr(2, 9)}`, p = !!e;
|
|
111
|
-
return /* @__PURE__ */ h("div", { className: `${T.inputWrapper} ${
|
|
111
|
+
return /* @__PURE__ */ h("div", { className: `${T.inputWrapper} ${n ? T.fullWidth : ""} ${d}`, children: [
|
|
112
112
|
t && /* @__PURE__ */ h("label", { htmlFor: c, className: T.label, children: [
|
|
113
113
|
t,
|
|
114
|
-
l.required && /* @__PURE__ */
|
|
114
|
+
l.required && /* @__PURE__ */ r("span", { className: T.required, children: "*" })
|
|
115
115
|
] }),
|
|
116
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ r(
|
|
117
117
|
"input",
|
|
118
118
|
{
|
|
119
119
|
ref: i,
|
|
@@ -122,8 +122,8 @@ const pe = "_container_u3o0e_1", fe = "_padding_u3o0e_7", Q = {
|
|
|
122
122
|
...l
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
e && /* @__PURE__ */
|
|
126
|
-
s && !e && /* @__PURE__ */
|
|
125
|
+
e && /* @__PURE__ */ r("span", { className: T.errorText, children: e }),
|
|
126
|
+
s && !e && /* @__PURE__ */ r("span", { className: T.helperText, children: s })
|
|
127
127
|
] });
|
|
128
128
|
}
|
|
129
129
|
);
|
|
@@ -144,7 +144,7 @@ const Qe = "_selectWrapper_ir4bq_1", Xe = "_fullWidth_ir4bq_7", Ze = "_label_ir4
|
|
|
144
144
|
label: t,
|
|
145
145
|
error: e,
|
|
146
146
|
helperText: s,
|
|
147
|
-
options:
|
|
147
|
+
options: n,
|
|
148
148
|
placeholder: d,
|
|
149
149
|
fullWidth: u = !1,
|
|
150
150
|
className: l = "",
|
|
@@ -155,7 +155,7 @@ const Qe = "_selectWrapper_ir4bq_1", Xe = "_fullWidth_ir4bq_7", Ze = "_label_ir4
|
|
|
155
155
|
return /* @__PURE__ */ h("div", { className: `${w.selectWrapper} ${u ? w.fullWidth : ""} ${l}`, children: [
|
|
156
156
|
t && /* @__PURE__ */ h("label", { htmlFor: f, className: w.label, children: [
|
|
157
157
|
t,
|
|
158
|
-
c.required && /* @__PURE__ */
|
|
158
|
+
c.required && /* @__PURE__ */ r("span", { className: w.required, children: "*" })
|
|
159
159
|
] }),
|
|
160
160
|
/* @__PURE__ */ h("div", { className: w.selectContainer, children: [
|
|
161
161
|
/* @__PURE__ */ h(
|
|
@@ -166,8 +166,8 @@ const Qe = "_selectWrapper_ir4bq_1", Xe = "_fullWidth_ir4bq_7", Ze = "_label_ir4
|
|
|
166
166
|
className: `${w.select} ${I ? w.error : ""}`,
|
|
167
167
|
...c,
|
|
168
168
|
children: [
|
|
169
|
-
d && /* @__PURE__ */
|
|
170
|
-
|
|
169
|
+
d && /* @__PURE__ */ r("option", { value: "", disabled: !0, children: d }),
|
|
170
|
+
n && n.map((y) => /* @__PURE__ */ r(
|
|
171
171
|
"option",
|
|
172
172
|
{
|
|
173
173
|
value: y.value,
|
|
@@ -175,14 +175,15 @@ const Qe = "_selectWrapper_ir4bq_1", Xe = "_fullWidth_ir4bq_7", Ze = "_label_ir4
|
|
|
175
175
|
children: y.label
|
|
176
176
|
},
|
|
177
177
|
y.value
|
|
178
|
-
))
|
|
178
|
+
)),
|
|
179
|
+
!n && c.children
|
|
179
180
|
]
|
|
180
181
|
}
|
|
181
182
|
),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ r("span", { className: w.arrow, children: "▼" })
|
|
183
184
|
] }),
|
|
184
|
-
e && /* @__PURE__ */
|
|
185
|
-
s && !e && /* @__PURE__ */
|
|
185
|
+
e && /* @__PURE__ */ r("span", { className: w.errorText, children: e }),
|
|
186
|
+
s && !e && /* @__PURE__ */ r("span", { className: w.helperText, children: s })
|
|
186
187
|
] });
|
|
187
188
|
}
|
|
188
189
|
);
|
|
@@ -222,21 +223,21 @@ class mt {
|
|
|
222
223
|
});
|
|
223
224
|
if (!s.ok)
|
|
224
225
|
throw Z(), (d = this.onUnauthorized) == null || d.call(this), new Error("Token refresh failed");
|
|
225
|
-
const
|
|
226
|
-
return ce(
|
|
226
|
+
const n = await s.json();
|
|
227
|
+
return ce(n.access_token, e), n.access_token;
|
|
227
228
|
}
|
|
228
229
|
async request(e, s = {}) {
|
|
229
|
-
const
|
|
230
|
+
const n = le(), d = {
|
|
230
231
|
"Content-Type": "application/json",
|
|
231
232
|
...s.headers
|
|
232
233
|
};
|
|
233
|
-
|
|
234
|
+
n && (d.Authorization = `Bearer ${n}`);
|
|
234
235
|
const u = `${this.baseURL}${e}`;
|
|
235
236
|
let l = await fetch(u, {
|
|
236
237
|
...s,
|
|
237
238
|
headers: d
|
|
238
239
|
});
|
|
239
|
-
if (l.status === 401 &&
|
|
240
|
+
if (l.status === 401 && n) {
|
|
240
241
|
this.isRefreshing || (this.isRefreshing = !0, this.refreshPromise = this.refreshAccessToken().finally(() => {
|
|
241
242
|
this.isRefreshing = !1, this.refreshPromise = null;
|
|
242
243
|
}));
|
|
@@ -271,23 +272,23 @@ class mt {
|
|
|
271
272
|
async get(e, s) {
|
|
272
273
|
return this.request(e, { ...s, method: "GET" });
|
|
273
274
|
}
|
|
274
|
-
async post(e, s,
|
|
275
|
+
async post(e, s, n) {
|
|
275
276
|
return this.request(e, {
|
|
276
|
-
...
|
|
277
|
+
...n,
|
|
277
278
|
method: "POST",
|
|
278
279
|
body: s ? JSON.stringify(s) : void 0
|
|
279
280
|
});
|
|
280
281
|
}
|
|
281
|
-
async put(e, s,
|
|
282
|
+
async put(e, s, n) {
|
|
282
283
|
return this.request(e, {
|
|
283
|
-
...
|
|
284
|
+
...n,
|
|
284
285
|
method: "PUT",
|
|
285
286
|
body: s ? JSON.stringify(s) : void 0
|
|
286
287
|
});
|
|
287
288
|
}
|
|
288
|
-
async patch(e, s,
|
|
289
|
+
async patch(e, s, n) {
|
|
289
290
|
return this.request(e, {
|
|
290
|
-
...
|
|
291
|
+
...n,
|
|
291
292
|
method: "PATCH",
|
|
292
293
|
body: s ? JSON.stringify(s) : void 0
|
|
293
294
|
});
|
|
@@ -309,7 +310,7 @@ const ys = (t) => {
|
|
|
309
310
|
}, ht = (t) => {
|
|
310
311
|
try {
|
|
311
312
|
const e = N();
|
|
312
|
-
if (e.some((
|
|
313
|
+
if (e.some((n) => n.ally_code === t.ally_code))
|
|
313
314
|
return;
|
|
314
315
|
e.push(t), localStorage.setItem(U, JSON.stringify(e));
|
|
315
316
|
} catch (e) {
|
|
@@ -317,7 +318,7 @@ const ys = (t) => {
|
|
|
317
318
|
}
|
|
318
319
|
}, gt = (t) => {
|
|
319
320
|
try {
|
|
320
|
-
const s = N().filter((
|
|
321
|
+
const s = N().filter((n) => n.ally_code !== t);
|
|
321
322
|
localStorage.setItem(U, JSON.stringify(s));
|
|
322
323
|
} catch (e) {
|
|
323
324
|
console.error("Failed to remove ally code from localStorage:", e);
|
|
@@ -325,7 +326,7 @@ const ys = (t) => {
|
|
|
325
326
|
}, oe = (t) => {
|
|
326
327
|
try {
|
|
327
328
|
const s = N().map(
|
|
328
|
-
(
|
|
329
|
+
(n) => n.ally_code === t ? { ...n, last_used_at: (/* @__PURE__ */ new Date()).toISOString() } : n
|
|
329
330
|
);
|
|
330
331
|
localStorage.setItem(U, JSON.stringify(s));
|
|
331
332
|
} catch (e) {
|
|
@@ -336,7 +337,7 @@ const ys = (t) => {
|
|
|
336
337
|
}, yt = () => {
|
|
337
338
|
localStorage.removeItem(U), localStorage.removeItem(H);
|
|
338
339
|
}, ie = he(void 0), vs = ({ children: t }) => {
|
|
339
|
-
const [e, s] = $(null), [
|
|
340
|
+
const [e, s] = $(null), [n, d] = $(!0), [u, l] = $([]), [i, c] = $(null), [p, f] = $(!1), [I, y] = $({
|
|
340
341
|
show: !1,
|
|
341
342
|
localStorageCodes: []
|
|
342
343
|
}), k = A(async () => {
|
|
@@ -473,7 +474,7 @@ const ys = (t) => {
|
|
|
473
474
|
const _e = {
|
|
474
475
|
user: e,
|
|
475
476
|
isAuthenticated: !!e,
|
|
476
|
-
isLoading:
|
|
477
|
+
isLoading: n,
|
|
477
478
|
login: j,
|
|
478
479
|
register: L,
|
|
479
480
|
logout: D,
|
|
@@ -494,7 +495,7 @@ const ys = (t) => {
|
|
|
494
495
|
dismissMigrationPrompt: V,
|
|
495
496
|
migrateLocalStorageCodes: de
|
|
496
497
|
};
|
|
497
|
-
return /* @__PURE__ */
|
|
498
|
+
return /* @__PURE__ */ r(ie.Provider, { value: _e, children: t });
|
|
498
499
|
}, vt = () => {
|
|
499
500
|
const t = ge(ie);
|
|
500
501
|
if (t === void 0)
|
|
@@ -518,7 +519,7 @@ const ys = (t) => {
|
|
|
518
519
|
}) => {
|
|
519
520
|
const {
|
|
520
521
|
allyCodes: s,
|
|
521
|
-
selectedAllyCode:
|
|
522
|
+
selectedAllyCode: n,
|
|
522
523
|
selectAllyCode: d,
|
|
523
524
|
removeAllyCode: u,
|
|
524
525
|
addAllyCode: l,
|
|
@@ -550,11 +551,11 @@ const ys = (t) => {
|
|
|
550
551
|
}
|
|
551
552
|
};
|
|
552
553
|
return s.length === 0 ? null : /* @__PURE__ */ h("div", { className: `${v.allyCodeDropdown} ${e}`, children: [
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ r(
|
|
554
555
|
ae,
|
|
555
556
|
{
|
|
556
557
|
options: Y,
|
|
557
|
-
value:
|
|
558
|
+
value: n || "",
|
|
558
559
|
onChange: G,
|
|
559
560
|
placeholder: "Select ally code",
|
|
560
561
|
disabled: i,
|
|
@@ -562,10 +563,10 @@ const ys = (t) => {
|
|
|
562
563
|
}
|
|
563
564
|
),
|
|
564
565
|
c && /* @__PURE__ */ h("div", { className: v.managePanel, children: [
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ r("h4", { children: "Manage Ally Codes" }),
|
|
566
567
|
/* @__PURE__ */ h("div", { className: v.addSection, children: [
|
|
567
568
|
/* @__PURE__ */ h("div", { className: v.addInputGroup, children: [
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ r(
|
|
569
570
|
re,
|
|
570
571
|
{
|
|
571
572
|
type: "text",
|
|
@@ -575,7 +576,7 @@ const ys = (t) => {
|
|
|
575
576
|
disabled: D
|
|
576
577
|
}
|
|
577
578
|
),
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ r(
|
|
579
580
|
z,
|
|
580
581
|
{
|
|
581
582
|
variant: "primary",
|
|
@@ -587,12 +588,12 @@ const ys = (t) => {
|
|
|
587
588
|
}
|
|
588
589
|
)
|
|
589
590
|
] }),
|
|
590
|
-
y && /* @__PURE__ */
|
|
591
|
-
j && /* @__PURE__ */
|
|
591
|
+
y && /* @__PURE__ */ r("div", { className: v.error, children: y }),
|
|
592
|
+
j && /* @__PURE__ */ r("div", { className: v.success, children: j })
|
|
592
593
|
] }),
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ r("div", { className: v.codesList, children: s.map((_) => /* @__PURE__ */ h("div", { className: v.codeItem, children: [
|
|
595
|
+
/* @__PURE__ */ r("span", { children: _.player_name ? `${_.player_name} (${O(_.ally_code)})` : O(_.ally_code) }),
|
|
596
|
+
/* @__PURE__ */ r(
|
|
596
597
|
z,
|
|
597
598
|
{
|
|
598
599
|
variant: "ghost",
|
|
@@ -602,7 +603,7 @@ const ys = (t) => {
|
|
|
602
603
|
}
|
|
603
604
|
)
|
|
604
605
|
] }, _.ally_code)) }),
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ r(
|
|
606
607
|
z,
|
|
607
608
|
{
|
|
608
609
|
variant: "secondary",
|
|
@@ -613,7 +614,7 @@ const ys = (t) => {
|
|
|
613
614
|
}
|
|
614
615
|
)
|
|
615
616
|
] }),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ r(
|
|
617
618
|
z,
|
|
618
619
|
{
|
|
619
620
|
variant: "ghost",
|
|
@@ -638,14 +639,14 @@ const ys = (t) => {
|
|
|
638
639
|
children: t,
|
|
639
640
|
variant: e = "default",
|
|
640
641
|
chamfered: s = !1,
|
|
641
|
-
chamferSize:
|
|
642
|
+
chamferSize: n = "md",
|
|
642
643
|
padding: d = "md",
|
|
643
644
|
hoverable: u = !1,
|
|
644
645
|
className: l = "",
|
|
645
646
|
onClick: i
|
|
646
647
|
}) => {
|
|
647
|
-
const c = s ?
|
|
648
|
-
return /* @__PURE__ */
|
|
648
|
+
const c = s ? n === "sm" ? "chamfered-box-sm" : n === "lg" ? "chamfered-box-lg" : "chamfered-box" : "";
|
|
649
|
+
return /* @__PURE__ */ r(
|
|
649
650
|
"div",
|
|
650
651
|
{
|
|
651
652
|
className: `${M.card} ${M[e]} ${M[`padding-${d}`]} ${c} ${u ? M.hoverable : ""} ${l}`,
|
|
@@ -671,8 +672,8 @@ const ys = (t) => {
|
|
|
671
672
|
children: t,
|
|
672
673
|
variant: e = "default",
|
|
673
674
|
size: s = "md",
|
|
674
|
-
className:
|
|
675
|
-
}) => /* @__PURE__ */
|
|
675
|
+
className: n = ""
|
|
676
|
+
}) => /* @__PURE__ */ r("span", { className: `${X.badge} ${X[e]} ${X[s]} ${n}`, children: t }), Jt = "_overlay_1b3yt_1", Ht = "_fadeIn_1b3yt_1", Yt = "_modal_1b3yt_13", Gt = "_slideUp_1b3yt_1", Kt = "_sm_1b3yt_25", Vt = "_md_1b3yt_30", Qt = "_lg_1b3yt_35", Xt = "_xl_1b3yt_40", Zt = "_header_1b3yt_45", es = "_title_1b3yt_53", ts = "_closeButton_1b3yt_60", ss = "_content_1b3yt_78", W = {
|
|
676
677
|
overlay: Jt,
|
|
677
678
|
fadeIn: Ht,
|
|
678
679
|
modal: Yt,
|
|
@@ -689,7 +690,7 @@ const ys = (t) => {
|
|
|
689
690
|
isOpen: t,
|
|
690
691
|
onClose: e,
|
|
691
692
|
title: s,
|
|
692
|
-
children:
|
|
693
|
+
children: n,
|
|
693
694
|
size: d = "md",
|
|
694
695
|
closeOnOverlayClick: u = !0,
|
|
695
696
|
className: l = ""
|
|
@@ -705,12 +706,12 @@ const ys = (t) => {
|
|
|
705
706
|
const i = (c) => {
|
|
706
707
|
u && c.target === c.currentTarget && e();
|
|
707
708
|
};
|
|
708
|
-
return /* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ r("div", { className: W.overlay, onClick: i, children: /* @__PURE__ */ h("div", { className: `${W.modal} ${W[d]} ${l}`, role: "dialog", "aria-modal": "true", children: [
|
|
709
710
|
s && /* @__PURE__ */ h("div", { className: W.header, children: [
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ r("h2", { className: W.title, children: s }),
|
|
712
|
+
/* @__PURE__ */ r("button", { className: W.closeButton, onClick: e, "aria-label": "Close modal", children: "✕" })
|
|
712
713
|
] }),
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ r("div", { className: W.content, children: n })
|
|
714
715
|
] }) });
|
|
715
716
|
}, os = "_spinner_1uhnh_2", ns = "_spin_1uhnh_2", rs = "_sm_1uhnh_9", as = "_md_1uhnh_15", ls = "_lg_1uhnh_21", cs = "_dots_1uhnh_34", is = "_dot_1uhnh_34", ds = "_bounce_1uhnh_1", _s = "_visuallyHidden_1uhnh_91", C = {
|
|
716
717
|
spinner: os,
|
|
@@ -727,10 +728,10 @@ const ys = (t) => {
|
|
|
727
728
|
variant: e = "spinner",
|
|
728
729
|
className: s = ""
|
|
729
730
|
}) => e === "dots" ? /* @__PURE__ */ h("div", { className: `${C.dots} ${C[t]} ${s}`, children: [
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
] }) : /* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ r("span", { className: C.dot }),
|
|
732
|
+
/* @__PURE__ */ r("span", { className: C.dot }),
|
|
733
|
+
/* @__PURE__ */ r("span", { className: C.dot })
|
|
734
|
+
] }) : /* @__PURE__ */ r("div", { className: `${C.spinner} ${C[t]} ${s}`, role: "status", children: /* @__PURE__ */ r("span", { className: C.visuallyHidden, children: "Loading..." }) });
|
|
734
735
|
export {
|
|
735
736
|
ws as AllyCodeDropdown,
|
|
736
737
|
mt as ApiClient,
|