@cerberus-design/react 0.10.4-next-53914c0 → 0.10.4-next-b0cf2d7
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/build/legacy/_tsup-dts-rollup.d.cts +10 -0
- package/build/legacy/components/AnimatingUploadIcon.cjs +124 -0
- package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -0
- package/build/legacy/components/Avatar.cjs +106 -9
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +103 -6
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +134 -35
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +115 -18
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +104 -7
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +105 -8
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +107 -10
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +102 -5
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +104 -7
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +98 -1
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +98 -1
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +129 -32
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +125 -28
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +143 -46
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +325 -226
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +10 -0
- package/build/modern/{chunk-O6JYYVO7.js → chunk-3XZRRGFQ.js} +2 -2
- package/build/modern/{chunk-JCGWTIR4.js → chunk-4HDONKKB.js} +4 -4
- package/build/modern/chunk-4HDONKKB.js.map +1 -0
- package/build/modern/{chunk-NBG2OSYI.js → chunk-5NELG2TB.js} +2 -2
- package/build/modern/{chunk-CMUFJU4S.js → chunk-A42MQEHJ.js} +2 -2
- package/build/modern/{chunk-AUAPBPGW.js → chunk-DH57GIIW.js} +2 -2
- package/build/modern/chunk-HVKM54BA.js +100 -0
- package/build/modern/chunk-HVKM54BA.js.map +1 -0
- package/build/modern/{chunk-BDNY6R3H.js → chunk-K2QH37AW.js} +3 -3
- package/build/modern/{chunk-S7XGIQY6.js → chunk-QHVJAPSD.js} +2 -2
- package/build/modern/{chunk-GMG3B34U.js → chunk-SRGQQYBQ.js} +2 -2
- package/build/modern/{chunk-ZBRG3FQV.js → chunk-U56OV7EK.js} +7 -7
- package/build/modern/{chunk-BDCFYW34.js → chunk-V7YG7JUJ.js} +6 -2
- package/build/modern/chunk-V7YG7JUJ.js.map +1 -0
- package/build/modern/{chunk-WZOYPFUU.js → chunk-WSGQZZVU.js} +2 -2
- package/build/modern/{chunk-UXHAFEBA.js → chunk-XREDYSAP.js} +5 -3
- package/build/modern/chunk-XREDYSAP.js.map +1 -0
- package/build/modern/{chunk-477G5ZEL.js → chunk-XWQEINEL.js} +2 -2
- package/build/modern/{chunk-SP6O64KQ.js → chunk-ZUQ2MHMQ.js} +2 -2
- package/build/modern/components/AnimatingUploadIcon.js +7 -0
- package/build/modern/components/AnimatingUploadIcon.js.map +1 -0
- package/build/modern/components/Avatar.js +4 -3
- package/build/modern/components/Checkbox.js +4 -3
- package/build/modern/components/FileStatus.js +5 -4
- package/build/modern/components/FileUploader.js +5 -4
- package/build/modern/components/Input.js +4 -3
- package/build/modern/components/Notification.js +4 -3
- package/build/modern/components/Select.js +4 -3
- package/build/modern/components/Tag.js +4 -3
- package/build/modern/components/Toggle.js +4 -3
- package/build/modern/config/cerbIcons.js +2 -1
- package/build/modern/config/defineIcons.js +3 -2
- package/build/modern/context/confirm-modal.js +5 -4
- package/build/modern/context/notification-center.js +5 -4
- package/build/modern/context/prompt-modal.js +7 -6
- package/build/modern/index.js +33 -32
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/AnimatingUploadIcon.tsx +83 -0
- package/src/components/FileStatus.tsx +2 -0
- package/src/components/FileUploader.tsx +1 -1
- package/src/config/cerbIcons.ts +4 -1
- package/build/modern/chunk-BDCFYW34.js.map +0 -1
- package/build/modern/chunk-JCGWTIR4.js.map +0 -1
- package/build/modern/chunk-UXHAFEBA.js.map +0 -1
- /package/build/modern/{chunk-O6JYYVO7.js.map → chunk-3XZRRGFQ.js.map} +0 -0
- /package/build/modern/{chunk-NBG2OSYI.js.map → chunk-5NELG2TB.js.map} +0 -0
- /package/build/modern/{chunk-CMUFJU4S.js.map → chunk-A42MQEHJ.js.map} +0 -0
- /package/build/modern/{chunk-AUAPBPGW.js.map → chunk-DH57GIIW.js.map} +0 -0
- /package/build/modern/{chunk-BDNY6R3H.js.map → chunk-K2QH37AW.js.map} +0 -0
- /package/build/modern/{chunk-S7XGIQY6.js.map → chunk-QHVJAPSD.js.map} +0 -0
- /package/build/modern/{chunk-GMG3B34U.js.map → chunk-SRGQQYBQ.js.map} +0 -0
- /package/build/modern/{chunk-ZBRG3FQV.js.map → chunk-U56OV7EK.js.map} +0 -0
- /package/build/modern/{chunk-WZOYPFUU.js.map → chunk-WSGQZZVU.js.map} +0 -0
- /package/build/modern/{chunk-477G5ZEL.js.map → chunk-XWQEINEL.js.map} +0 -0
- /package/build/modern/{chunk-SP6O64KQ.js.map → chunk-ZUQ2MHMQ.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -142,6 +142,102 @@ function IndeterminateIcon(props) {
|
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
// src/components/AnimatingUploadIcon.tsx
|
|
146
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
147
|
+
function AnimatingUploadIcon(props) {
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
149
|
+
"svg",
|
|
150
|
+
{
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
153
|
+
width: props.size ?? "1em",
|
|
154
|
+
height: props.size ?? "1em",
|
|
155
|
+
viewBox: "0 0 24 24",
|
|
156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
157
|
+
"g",
|
|
158
|
+
{
|
|
159
|
+
fill: "none",
|
|
160
|
+
stroke: "currentColor",
|
|
161
|
+
strokeLinecap: "square",
|
|
162
|
+
strokeLinejoin: "round",
|
|
163
|
+
strokeWidth: 1.5,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
166
|
+
"path",
|
|
167
|
+
{
|
|
168
|
+
"data-name": "animating-trail",
|
|
169
|
+
strokeDasharray: "2 4",
|
|
170
|
+
strokeDashoffset: 6,
|
|
171
|
+
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
173
|
+
"animate",
|
|
174
|
+
{
|
|
175
|
+
attributeName: "stroke-dashoffset",
|
|
176
|
+
dur: "0.45s",
|
|
177
|
+
repeatCount: "indefinite",
|
|
178
|
+
values: "6;0"
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
184
|
+
"path",
|
|
185
|
+
{
|
|
186
|
+
"data-name": "half-circle",
|
|
187
|
+
strokeDasharray: 32,
|
|
188
|
+
strokeDashoffset: 32,
|
|
189
|
+
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
191
|
+
"animate",
|
|
192
|
+
{
|
|
193
|
+
fill: "freeze",
|
|
194
|
+
attributeName: "stroke-dashoffset",
|
|
195
|
+
begin: "0.075s",
|
|
196
|
+
dur: "0.3s",
|
|
197
|
+
values: "32;0"
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
203
|
+
"svg",
|
|
204
|
+
{
|
|
205
|
+
"aria-hidden": "true",
|
|
206
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
207
|
+
width: "0.8em",
|
|
208
|
+
height: "0.8em",
|
|
209
|
+
x: "27%",
|
|
210
|
+
y: "27%",
|
|
211
|
+
viewBox: "0 0 24 24",
|
|
212
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
213
|
+
"polygon",
|
|
214
|
+
{
|
|
215
|
+
fill: "currentColor",
|
|
216
|
+
stroke: "currentColor",
|
|
217
|
+
strokeWidth: 0.8,
|
|
218
|
+
opacity: "1",
|
|
219
|
+
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
221
|
+
"animate",
|
|
222
|
+
{
|
|
223
|
+
fill: "freeze",
|
|
224
|
+
attributeName: "opacity",
|
|
225
|
+
values: "1;0;1",
|
|
226
|
+
dur: "2s",
|
|
227
|
+
repeatCount: "indefinite"
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
145
241
|
// src/config/cerbIcons.ts
|
|
146
242
|
var defaultIcons = {
|
|
147
243
|
avatar: import_icons.UserFilled,
|
|
@@ -150,7 +246,8 @@ var defaultIcons = {
|
|
|
150
246
|
confirmModal: import_icons.Information,
|
|
151
247
|
delete: import_icons.TrashCan,
|
|
152
248
|
promptModal: import_icons.Information,
|
|
153
|
-
|
|
249
|
+
waitingFileUploader: import_icons.CloudUpload,
|
|
250
|
+
fileUploader: AnimatingUploadIcon,
|
|
154
251
|
indeterminate: IndeterminateIcon,
|
|
155
252
|
infoNotification: import_icons.InformationFilled,
|
|
156
253
|
successNotification: import_icons.CheckmarkFilled,
|
|
@@ -193,7 +290,7 @@ function Show(props) {
|
|
|
193
290
|
}
|
|
194
291
|
|
|
195
292
|
// src/components/Avatar.tsx
|
|
196
|
-
var
|
|
293
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
197
294
|
function Avatar(props) {
|
|
198
295
|
const {
|
|
199
296
|
ariaLabel,
|
|
@@ -208,7 +305,7 @@ function Avatar(props) {
|
|
|
208
305
|
} = props;
|
|
209
306
|
const { avatar: AvatarIcon } = $cerberusIcons;
|
|
210
307
|
const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
|
|
211
|
-
return /* @__PURE__ */ (0,
|
|
308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
212
309
|
"div",
|
|
213
310
|
{
|
|
214
311
|
...nativeProps,
|
|
@@ -217,19 +314,19 @@ function Avatar(props) {
|
|
|
217
314
|
(0, import_recipes.avatar)({ gradient, size }),
|
|
218
315
|
(0, import_patterns.circle)()
|
|
219
316
|
),
|
|
220
|
-
children: /* @__PURE__ */ (0,
|
|
317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
221
318
|
Show,
|
|
222
319
|
{
|
|
223
320
|
when: Boolean(src) || Boolean(as),
|
|
224
|
-
fallback: /* @__PURE__ */ (0,
|
|
321
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
225
322
|
Show,
|
|
226
323
|
{
|
|
227
324
|
when: Boolean(initials),
|
|
228
|
-
fallback: /* @__PURE__ */ (0,
|
|
325
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
229
326
|
Show,
|
|
230
327
|
{
|
|
231
328
|
when: Boolean(icon),
|
|
232
|
-
fallback: /* @__PURE__ */ (0,
|
|
329
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
233
330
|
AvatarIcon,
|
|
234
331
|
{
|
|
235
332
|
size: iconSizeMap[size]
|
|
@@ -241,11 +338,11 @@ function Avatar(props) {
|
|
|
241
338
|
children: initials
|
|
242
339
|
}
|
|
243
340
|
),
|
|
244
|
-
children: /* @__PURE__ */ (0,
|
|
341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
245
342
|
Show,
|
|
246
343
|
{
|
|
247
344
|
when: Boolean(as),
|
|
248
|
-
fallback: /* @__PURE__ */ (0,
|
|
345
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
249
346
|
"img",
|
|
250
347
|
{
|
|
251
348
|
alt: props.ariaLabel,
|
|
@@ -283,10 +380,10 @@ var iconSizeMap = {
|
|
|
283
380
|
// src/components/Button.tsx
|
|
284
381
|
var import_css2 = require("@cerberus/styled-system/css");
|
|
285
382
|
var import_recipes2 = require("@cerberus/styled-system/recipes");
|
|
286
|
-
var
|
|
383
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
287
384
|
function Button(props) {
|
|
288
385
|
const { palette, usage, shape, ...nativeProps } = props;
|
|
289
|
-
return /* @__PURE__ */ (0,
|
|
386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
290
387
|
"button",
|
|
291
388
|
{
|
|
292
389
|
...nativeProps,
|
|
@@ -309,7 +406,7 @@ var import_css3 = require("@cerberus/styled-system/css");
|
|
|
309
406
|
|
|
310
407
|
// src/context/field.tsx
|
|
311
408
|
var import_react2 = require("react");
|
|
312
|
-
var
|
|
409
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
313
410
|
var FieldContext = (0, import_react2.createContext)(null);
|
|
314
411
|
function Field(props) {
|
|
315
412
|
const value = (0, import_react2.useMemo)(
|
|
@@ -321,7 +418,7 @@ function Field(props) {
|
|
|
321
418
|
}),
|
|
322
419
|
[props.disabled, props.readOnly, props.required, props.invalid]
|
|
323
420
|
);
|
|
324
|
-
return /* @__PURE__ */ (0,
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldContext.Provider, { value, children: props.children });
|
|
325
422
|
}
|
|
326
423
|
function useFieldContext() {
|
|
327
424
|
const context = (0, import_react2.useContext)(FieldContext);
|
|
@@ -332,13 +429,13 @@ function useFieldContext() {
|
|
|
332
429
|
}
|
|
333
430
|
|
|
334
431
|
// src/components/Checkbox.tsx
|
|
335
|
-
var
|
|
432
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
336
433
|
function Checkbox(props) {
|
|
337
434
|
const { describedBy, size, checked, mixed, ...nativeProps } = props;
|
|
338
435
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
339
436
|
const styles = (0, import_recipes3.checkbox)({ size });
|
|
340
437
|
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = $cerberusIcons;
|
|
341
|
-
return /* @__PURE__ */ (0,
|
|
438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
342
439
|
"div",
|
|
343
440
|
{
|
|
344
441
|
className: (0, import_css3.cx)(
|
|
@@ -349,7 +446,7 @@ function Checkbox(props) {
|
|
|
349
446
|
})
|
|
350
447
|
),
|
|
351
448
|
children: [
|
|
352
|
-
/* @__PURE__ */ (0,
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
353
450
|
"input",
|
|
354
451
|
{
|
|
355
452
|
...nativeProps,
|
|
@@ -361,8 +458,8 @@ function Checkbox(props) {
|
|
|
361
458
|
type: "checkbox"
|
|
362
459
|
}
|
|
363
460
|
),
|
|
364
|
-
/* @__PURE__ */ (0,
|
|
365
|
-
/* @__PURE__ */ (0,
|
|
461
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Show, { when: checked && !mixed, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckIcon, {}) }) }),
|
|
462
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Show, { when: mixed, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IndeterminateIcon2, {}) }) })
|
|
366
463
|
]
|
|
367
464
|
}
|
|
368
465
|
);
|
|
@@ -371,13 +468,13 @@ function Checkbox(props) {
|
|
|
371
468
|
// src/components/CircularProgress.tsx
|
|
372
469
|
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
373
470
|
var import_css4 = require("@cerberus/styled-system/css");
|
|
374
|
-
var
|
|
471
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
375
472
|
function CircularProgress(props) {
|
|
376
473
|
const strokeW = 14;
|
|
377
474
|
const radius = `calc(50% * (1 - ${strokeW}/100))`;
|
|
378
475
|
const status = props.syntax ?? "Done";
|
|
379
476
|
const now = props.now >= 100 ? 100 : props.now;
|
|
380
|
-
return /* @__PURE__ */ (0,
|
|
477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
381
478
|
"div",
|
|
382
479
|
{
|
|
383
480
|
id: props.id,
|
|
@@ -392,7 +489,7 @@ function CircularProgress(props) {
|
|
|
392
489
|
position: "relative"
|
|
393
490
|
}),
|
|
394
491
|
role: "progressbar",
|
|
395
|
-
children: /* @__PURE__ */ (0,
|
|
492
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
396
493
|
"svg",
|
|
397
494
|
{
|
|
398
495
|
"data-complete": now === 100,
|
|
@@ -407,17 +504,17 @@ function CircularProgress(props) {
|
|
|
407
504
|
viewBox: "0 0 100 100",
|
|
408
505
|
xmlns: "http://www.w3.org/2000/svg",
|
|
409
506
|
children: [
|
|
410
|
-
/* @__PURE__ */ (0,
|
|
411
|
-
/* @__PURE__ */ (0,
|
|
412
|
-
/* @__PURE__ */ (0,
|
|
413
|
-
/* @__PURE__ */ (0,
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("title", { children: props.title }),
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("desc", { children: `${now}% ${status}` }),
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("linearGradient", { id: "gradient", children: [
|
|
510
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
414
511
|
"stop",
|
|
415
512
|
{
|
|
416
513
|
offset: "0%",
|
|
417
514
|
stopColor: "var(--cerberus-colors-action-bg-initial)"
|
|
418
515
|
}
|
|
419
516
|
),
|
|
420
|
-
/* @__PURE__ */ (0,
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
421
518
|
"stop",
|
|
422
519
|
{
|
|
423
520
|
offset: "100%",
|
|
@@ -425,7 +522,7 @@ function CircularProgress(props) {
|
|
|
425
522
|
}
|
|
426
523
|
)
|
|
427
524
|
] }) }),
|
|
428
|
-
/* @__PURE__ */ (0,
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
429
526
|
"circle",
|
|
430
527
|
{
|
|
431
528
|
className: (0, import_css4.css)({
|
|
@@ -437,7 +534,7 @@ function CircularProgress(props) {
|
|
|
437
534
|
pathLength: "100"
|
|
438
535
|
}
|
|
439
536
|
),
|
|
440
|
-
/* @__PURE__ */ (0,
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
441
538
|
"circle",
|
|
442
539
|
{
|
|
443
540
|
className: (0, import_css4.css)({
|
|
@@ -449,7 +546,7 @@ function CircularProgress(props) {
|
|
|
449
546
|
pathLength: "100"
|
|
450
547
|
}
|
|
451
548
|
),
|
|
452
|
-
/* @__PURE__ */ (0,
|
|
549
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
453
550
|
"circle",
|
|
454
551
|
{
|
|
455
552
|
"data-complete": now === 100,
|
|
@@ -470,8 +567,8 @@ function CircularProgress(props) {
|
|
|
470
567
|
transform: "rotate(-90 50 50)"
|
|
471
568
|
}
|
|
472
569
|
),
|
|
473
|
-
/* @__PURE__ */ (0,
|
|
474
|
-
/* @__PURE__ */ (0,
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("g", { children: [
|
|
571
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
475
572
|
"text",
|
|
476
573
|
{
|
|
477
574
|
className: (0, import_css4.css)({
|
|
@@ -489,7 +586,7 @@ function CircularProgress(props) {
|
|
|
489
586
|
]
|
|
490
587
|
}
|
|
491
588
|
),
|
|
492
|
-
/* @__PURE__ */ (0,
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
493
590
|
"text",
|
|
494
591
|
{
|
|
495
592
|
className: (0, import_css4.css)({
|
|
@@ -515,7 +612,7 @@ function CircularProgress(props) {
|
|
|
515
612
|
// src/components/Droppable.tsx
|
|
516
613
|
var import_core = require("@dnd-kit/core");
|
|
517
614
|
var import_react3 = require("react");
|
|
518
|
-
var
|
|
615
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
519
616
|
function Droppable(props) {
|
|
520
617
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
521
618
|
const uuid = (0, import_react3.useId)();
|
|
@@ -525,7 +622,7 @@ function Droppable(props) {
|
|
|
525
622
|
id: id || uuid,
|
|
526
623
|
resizeObserverConfig
|
|
527
624
|
});
|
|
528
|
-
return /* @__PURE__ */ (0,
|
|
625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
529
626
|
"div",
|
|
530
627
|
{
|
|
531
628
|
...nativeProps,
|
|
@@ -540,10 +637,10 @@ function Droppable(props) {
|
|
|
540
637
|
// src/components/FieldMessage.tsx
|
|
541
638
|
var import_css5 = require("@cerberus/styled-system/css");
|
|
542
639
|
var import_recipes4 = require("@cerberus/styled-system/recipes");
|
|
543
|
-
var
|
|
640
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
544
641
|
function FieldMessage(props) {
|
|
545
642
|
const { invalid } = useFieldContext();
|
|
546
|
-
return /* @__PURE__ */ (0,
|
|
643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
547
644
|
"small",
|
|
548
645
|
{
|
|
549
646
|
...props,
|
|
@@ -555,10 +652,10 @@ function FieldMessage(props) {
|
|
|
555
652
|
|
|
556
653
|
// src/context/feature-flags.tsx
|
|
557
654
|
var import_react4 = require("react");
|
|
558
|
-
var
|
|
655
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
559
656
|
var FeatureFlagContext = (0, import_react4.createContext)(null);
|
|
560
657
|
function FeatureFlags(props) {
|
|
561
|
-
return /* @__PURE__ */ (0,
|
|
658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
562
659
|
}
|
|
563
660
|
function useFeatureFlags(key) {
|
|
564
661
|
const context = (0, import_react4.useContext)(FeatureFlagContext);
|
|
@@ -571,18 +668,18 @@ function useFeatureFlags(key) {
|
|
|
571
668
|
}
|
|
572
669
|
|
|
573
670
|
// src/components/FeatureFlag.tsx
|
|
574
|
-
var
|
|
671
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
575
672
|
function FeatureFlag(props) {
|
|
576
673
|
const showContent = useFeatureFlags(props.flag);
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Show, { when: showContent, children: props.children });
|
|
578
675
|
}
|
|
579
676
|
|
|
580
677
|
// src/components/Fieldset.tsx
|
|
581
678
|
var import_css6 = require("@cerberus/styled-system/css");
|
|
582
|
-
var
|
|
679
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
583
680
|
function Fieldset(props) {
|
|
584
681
|
const { invalid, ...formState } = useFieldContext();
|
|
585
|
-
return /* @__PURE__ */ (0,
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
586
683
|
"fieldset",
|
|
587
684
|
{
|
|
588
685
|
...props,
|
|
@@ -603,10 +700,10 @@ function Fieldset(props) {
|
|
|
603
700
|
// src/components/FieldsetLabel.tsx
|
|
604
701
|
var import_css7 = require("@cerberus/styled-system/css");
|
|
605
702
|
var import_recipes5 = require("@cerberus/styled-system/recipes");
|
|
606
|
-
var
|
|
703
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
607
704
|
function FieldsetLabel(props) {
|
|
608
705
|
const { size, usage, ...nativeProps } = props;
|
|
609
|
-
return /* @__PURE__ */ (0,
|
|
706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
610
707
|
"label",
|
|
611
708
|
{
|
|
612
709
|
...nativeProps,
|
|
@@ -630,7 +727,7 @@ var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
|
630
727
|
// src/components/ProgressBar.tsx
|
|
631
728
|
var import_css8 = require("@cerberus/styled-system/css");
|
|
632
729
|
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
633
|
-
var
|
|
730
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
634
731
|
function ProgressBar(props) {
|
|
635
732
|
const { indeterminate, size, usage, now, label: label4, ...nativeProps } = props;
|
|
636
733
|
const styles = (0, import_recipes6.progressBar)({ size, usage });
|
|
@@ -638,7 +735,7 @@ function ProgressBar(props) {
|
|
|
638
735
|
const width = {
|
|
639
736
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
640
737
|
};
|
|
641
|
-
return /* @__PURE__ */ (0,
|
|
738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
642
739
|
"div",
|
|
643
740
|
{
|
|
644
741
|
...nativeProps,
|
|
@@ -648,7 +745,7 @@ function ProgressBar(props) {
|
|
|
648
745
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
649
746
|
className: (0, import_css8.cx)(nativeProps.className, styles.root),
|
|
650
747
|
role: "progressbar",
|
|
651
|
-
children: /* @__PURE__ */ (0,
|
|
748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
652
749
|
"div",
|
|
653
750
|
{
|
|
654
751
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -664,10 +761,10 @@ function ProgressBar(props) {
|
|
|
664
761
|
// src/components/IconButton.tsx
|
|
665
762
|
var import_css9 = require("@cerberus/styled-system/css");
|
|
666
763
|
var import_recipes7 = require("@cerberus/styled-system/recipes");
|
|
667
|
-
var
|
|
764
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
668
765
|
function IconButton(props) {
|
|
669
766
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
670
|
-
return /* @__PURE__ */ (0,
|
|
767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
671
768
|
"button",
|
|
672
769
|
{
|
|
673
770
|
...nativeProps,
|
|
@@ -685,7 +782,7 @@ function IconButton(props) {
|
|
|
685
782
|
}
|
|
686
783
|
|
|
687
784
|
// src/components/FileStatus.tsx
|
|
688
|
-
var
|
|
785
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
689
786
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
690
787
|
processStatus2["TODO"] = "todo";
|
|
691
788
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -721,22 +818,22 @@ function FileStatus(props) {
|
|
|
721
818
|
},
|
|
722
819
|
[onClick]
|
|
723
820
|
);
|
|
724
|
-
return /* @__PURE__ */ (0,
|
|
821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
725
822
|
"div",
|
|
726
823
|
{
|
|
727
824
|
...nativeProps,
|
|
728
825
|
className: (0, import_css10.cx)(nativeProps.className, styles.root, (0, import_patterns4.hstack)()),
|
|
729
826
|
children: [
|
|
730
|
-
/* @__PURE__ */ (0,
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
731
828
|
Avatar,
|
|
732
829
|
{
|
|
733
830
|
ariaLabel: "",
|
|
734
831
|
gradient: modalIconPalette,
|
|
735
|
-
icon: /* @__PURE__ */ (0,
|
|
832
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
736
833
|
src: ""
|
|
737
834
|
}
|
|
738
835
|
),
|
|
739
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
740
837
|
"div",
|
|
741
838
|
{
|
|
742
839
|
className: (0, import_patterns4.vstack)({
|
|
@@ -745,7 +842,7 @@ function FileStatus(props) {
|
|
|
745
842
|
w: "full"
|
|
746
843
|
}),
|
|
747
844
|
children: [
|
|
748
|
-
/* @__PURE__ */ (0,
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
749
846
|
"small",
|
|
750
847
|
{
|
|
751
848
|
className: (0, import_css10.css)({
|
|
@@ -755,7 +852,7 @@ function FileStatus(props) {
|
|
|
755
852
|
children: file
|
|
756
853
|
}
|
|
757
854
|
),
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
759
856
|
ProgressBar,
|
|
760
857
|
{
|
|
761
858
|
id: props.id,
|
|
@@ -764,27 +861,27 @@ function FileStatus(props) {
|
|
|
764
861
|
size: "sm"
|
|
765
862
|
}
|
|
766
863
|
),
|
|
767
|
-
/* @__PURE__ */ (0,
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
768
865
|
FieldMessage,
|
|
769
866
|
{
|
|
770
867
|
className: (0, import_css10.css)({
|
|
771
868
|
color: "page.text.100"
|
|
772
869
|
}),
|
|
773
870
|
id: `help:${file}`,
|
|
774
|
-
children: /* @__PURE__ */ (0,
|
|
871
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MatchFileStatusText, { status, now })
|
|
775
872
|
}
|
|
776
873
|
) })
|
|
777
874
|
]
|
|
778
875
|
}
|
|
779
876
|
),
|
|
780
|
-
/* @__PURE__ */ (0,
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
781
878
|
IconButton,
|
|
782
879
|
{
|
|
783
880
|
ariaLabel: actionLabel,
|
|
784
881
|
onClick: handleClick,
|
|
785
882
|
palette,
|
|
786
883
|
size: "sm",
|
|
787
|
-
children: /* @__PURE__ */ (0,
|
|
884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MatchStatusAction, { status })
|
|
788
885
|
}
|
|
789
886
|
)
|
|
790
887
|
]
|
|
@@ -793,18 +890,20 @@ function FileStatus(props) {
|
|
|
793
890
|
}
|
|
794
891
|
function MatchFileStatusIcon(props) {
|
|
795
892
|
const {
|
|
893
|
+
waitingFileUploader: TodoIcon,
|
|
796
894
|
fileUploader: FileUploaderIcon,
|
|
797
895
|
invalidAlt: InvalidIcon,
|
|
798
896
|
successNotification: DoneIcon
|
|
799
897
|
} = $cerberusIcons;
|
|
800
898
|
switch (props.status) {
|
|
801
899
|
case "todo" /* TODO */:
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TodoIcon, { size: props.size });
|
|
802
901
|
case "processing" /* PROCESSING */:
|
|
803
|
-
return /* @__PURE__ */ (0,
|
|
902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FileUploaderIcon, { size: props.size });
|
|
804
903
|
case "done" /* DONE */:
|
|
805
|
-
return /* @__PURE__ */ (0,
|
|
904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DoneIcon, { size: props.size });
|
|
806
905
|
case "error" /* ERROR */:
|
|
807
|
-
return /* @__PURE__ */ (0,
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InvalidIcon, { size: props.size });
|
|
808
907
|
default:
|
|
809
908
|
throw new Error("Unknown status");
|
|
810
909
|
}
|
|
@@ -828,11 +927,11 @@ function MatchStatusAction(props) {
|
|
|
828
927
|
switch (props.status) {
|
|
829
928
|
case "todo" /* TODO */:
|
|
830
929
|
case "processing" /* PROCESSING */:
|
|
831
|
-
return /* @__PURE__ */ (0,
|
|
930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CloseIcon, {});
|
|
832
931
|
case "error" /* ERROR */:
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(RedoIcon, {});
|
|
834
933
|
case "done" /* DONE */:
|
|
835
|
-
return /* @__PURE__ */ (0,
|
|
934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TrashIcon, {});
|
|
836
935
|
default:
|
|
837
936
|
throw new Error("Invalid status");
|
|
838
937
|
}
|
|
@@ -881,12 +980,12 @@ function getModalIconPalette(status) {
|
|
|
881
980
|
var import_css11 = require("@cerberus/styled-system/css");
|
|
882
981
|
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
883
982
|
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
884
|
-
var
|
|
983
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
885
984
|
function FileUploader(props) {
|
|
886
985
|
var _a;
|
|
887
986
|
const styles = (0, import_recipes9.fileUploader)();
|
|
888
|
-
const Icon = $cerberusIcons
|
|
889
|
-
return /* @__PURE__ */ (0,
|
|
987
|
+
const { waitingFileUploader: Icon } = $cerberusIcons;
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
890
989
|
"div",
|
|
891
990
|
{
|
|
892
991
|
className: (0, import_css11.cx)(
|
|
@@ -896,17 +995,17 @@ function FileUploader(props) {
|
|
|
896
995
|
styles.container
|
|
897
996
|
),
|
|
898
997
|
children: [
|
|
899
|
-
/* @__PURE__ */ (0,
|
|
998
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
900
999
|
Avatar,
|
|
901
1000
|
{
|
|
902
1001
|
gradient: "charon-light",
|
|
903
1002
|
ariaLabel: "",
|
|
904
|
-
icon: /* @__PURE__ */ (0,
|
|
1003
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, {}),
|
|
905
1004
|
size: "md",
|
|
906
1005
|
src: ""
|
|
907
1006
|
}
|
|
908
1007
|
) }),
|
|
909
|
-
/* @__PURE__ */ (0,
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
910
1009
|
"label",
|
|
911
1010
|
{
|
|
912
1011
|
className: (0, import_css11.cx)(
|
|
@@ -917,12 +1016,12 @@ function FileUploader(props) {
|
|
|
917
1016
|
),
|
|
918
1017
|
htmlFor: props.name,
|
|
919
1018
|
children: [
|
|
920
|
-
/* @__PURE__ */ (0,
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
921
1020
|
"Import ",
|
|
922
1021
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
923
1022
|
" files",
|
|
924
|
-
/* @__PURE__ */ (0,
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
926
1025
|
"input",
|
|
927
1026
|
{
|
|
928
1027
|
...props,
|
|
@@ -941,16 +1040,16 @@ function FileUploader(props) {
|
|
|
941
1040
|
// src/components/Input.tsx
|
|
942
1041
|
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
943
1042
|
var import_css12 = require("@cerberus/styled-system/css");
|
|
944
|
-
var
|
|
1043
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
945
1044
|
function Input(props) {
|
|
946
1045
|
const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
|
|
947
1046
|
const inputStyles = (0, import_recipes10.input)({ size });
|
|
948
1047
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
949
1048
|
const hasEndIcon = Boolean(endIcon);
|
|
950
1049
|
const { invalid: InvalidIcon } = $cerberusIcons;
|
|
951
|
-
return /* @__PURE__ */ (0,
|
|
952
|
-
/* @__PURE__ */ (0,
|
|
953
|
-
/* @__PURE__ */ (0,
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: inputStyles.root, children: [
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
1052
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
954
1053
|
"input",
|
|
955
1054
|
{
|
|
956
1055
|
...nativeProps,
|
|
@@ -961,8 +1060,8 @@ function Input(props) {
|
|
|
961
1060
|
className: (0, import_css12.cx)("peer", nativeProps.className, inputStyles.input)
|
|
962
1061
|
}
|
|
963
1062
|
),
|
|
964
|
-
/* @__PURE__ */ (0,
|
|
965
|
-
/* @__PURE__ */ (0,
|
|
1063
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
966
1065
|
] });
|
|
967
1066
|
}
|
|
968
1067
|
|
|
@@ -970,12 +1069,12 @@ function Input(props) {
|
|
|
970
1069
|
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
971
1070
|
var import_css13 = require("@cerberus/styled-system/css");
|
|
972
1071
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
973
|
-
var
|
|
1072
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
974
1073
|
function Label(props) {
|
|
975
1074
|
const { hidden, size, ...nativeProps } = props;
|
|
976
1075
|
const { required, disabled } = useFieldContext();
|
|
977
1076
|
const usage = hidden ? "hidden" : "visible";
|
|
978
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
979
1078
|
"label",
|
|
980
1079
|
{
|
|
981
1080
|
...nativeProps,
|
|
@@ -990,7 +1089,7 @@ function Label(props) {
|
|
|
990
1089
|
),
|
|
991
1090
|
children: [
|
|
992
1091
|
props.children,
|
|
993
|
-
/* @__PURE__ */ (0,
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
994
1093
|
"span",
|
|
995
1094
|
{
|
|
996
1095
|
className: (0, import_css13.css)({
|
|
@@ -1009,11 +1108,11 @@ function Label(props) {
|
|
|
1009
1108
|
var import_css14 = require("@cerberus/styled-system/css");
|
|
1010
1109
|
var import_recipes12 = require("@cerberus-design/styled-system/recipes");
|
|
1011
1110
|
var import_patterns7 = require("@cerberus-design/styled-system/patterns");
|
|
1012
|
-
var
|
|
1111
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1013
1112
|
function Legend(props) {
|
|
1014
1113
|
const { size, ...nativeProps } = props;
|
|
1015
1114
|
const { invalid, ...formState } = useFieldContext();
|
|
1016
|
-
return /* @__PURE__ */ (0,
|
|
1115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1017
1116
|
"legend",
|
|
1018
1117
|
{
|
|
1019
1118
|
...nativeProps,
|
|
@@ -1031,7 +1130,7 @@ function Legend(props) {
|
|
|
1031
1130
|
),
|
|
1032
1131
|
children: [
|
|
1033
1132
|
nativeProps.children,
|
|
1034
|
-
/* @__PURE__ */ (0,
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1035
1134
|
"span",
|
|
1036
1135
|
{
|
|
1037
1136
|
className: (0, import_css14.css)({
|
|
@@ -1050,9 +1149,9 @@ function Legend(props) {
|
|
|
1050
1149
|
var import_css15 = require("@cerberus/styled-system/css");
|
|
1051
1150
|
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1052
1151
|
var import_react6 = require("react");
|
|
1053
|
-
var
|
|
1152
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1054
1153
|
function ModalEl(props, ref) {
|
|
1055
|
-
return /* @__PURE__ */ (0,
|
|
1154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1056
1155
|
"dialog",
|
|
1057
1156
|
{
|
|
1058
1157
|
...props,
|
|
@@ -1066,9 +1165,9 @@ var Modal = (0, import_react6.forwardRef)(ModalEl);
|
|
|
1066
1165
|
// src/components/ModalHeader.tsx
|
|
1067
1166
|
var import_css16 = require("@cerberus/styled-system/css");
|
|
1068
1167
|
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
1069
|
-
var
|
|
1168
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1070
1169
|
function ModalHeader(props) {
|
|
1071
|
-
return /* @__PURE__ */ (0,
|
|
1170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1072
1171
|
"div",
|
|
1073
1172
|
{
|
|
1074
1173
|
...props,
|
|
@@ -1087,17 +1186,17 @@ function ModalHeader(props) {
|
|
|
1087
1186
|
// src/components/ModalHeading.tsx
|
|
1088
1187
|
var import_css17 = require("@cerberus/styled-system/css");
|
|
1089
1188
|
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1090
|
-
var
|
|
1189
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1091
1190
|
function ModalHeading(props) {
|
|
1092
|
-
return /* @__PURE__ */ (0,
|
|
1191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { ...props, className: (0, import_css17.cx)(props.className, (0, import_recipes14.modal)().heading) });
|
|
1093
1192
|
}
|
|
1094
1193
|
|
|
1095
1194
|
// src/components/ModalDescription.tsx
|
|
1096
1195
|
var import_css18 = require("@cerberus/styled-system/css");
|
|
1097
1196
|
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1098
|
-
var
|
|
1197
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1099
1198
|
function ModalDescription(props) {
|
|
1100
|
-
return /* @__PURE__ */ (0,
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { ...props, className: (0, import_css18.cx)(props.className, (0, import_recipes15.modal)().description) });
|
|
1101
1200
|
}
|
|
1102
1201
|
|
|
1103
1202
|
// src/components/NavMenuTrigger.tsx
|
|
@@ -1116,7 +1215,7 @@ function createNavTriggerProps(values) {
|
|
|
1116
1215
|
// src/context/navMenu.tsx
|
|
1117
1216
|
var import_css19 = require("@cerberus/styled-system/css");
|
|
1118
1217
|
var import_react7 = require("react");
|
|
1119
|
-
var
|
|
1218
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1120
1219
|
var NavMenuContext = (0, import_react7.createContext)(null);
|
|
1121
1220
|
function NavMenu(props) {
|
|
1122
1221
|
const triggerRef = (0, import_react7.useRef)(null);
|
|
@@ -1134,7 +1233,7 @@ function NavMenu(props) {
|
|
|
1134
1233
|
}),
|
|
1135
1234
|
[expanded, handleToggle]
|
|
1136
1235
|
);
|
|
1137
|
-
return /* @__PURE__ */ (0,
|
|
1236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1138
1237
|
"nav",
|
|
1139
1238
|
{
|
|
1140
1239
|
className: (0, import_css19.css)({
|
|
@@ -1153,7 +1252,7 @@ function useNavMenuContext() {
|
|
|
1153
1252
|
}
|
|
1154
1253
|
|
|
1155
1254
|
// src/components/NavMenuTrigger.tsx
|
|
1156
|
-
var
|
|
1255
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1157
1256
|
function NavMenuTrigger(props) {
|
|
1158
1257
|
const {
|
|
1159
1258
|
as,
|
|
@@ -1179,11 +1278,11 @@ function NavMenuTrigger(props) {
|
|
|
1179
1278
|
},
|
|
1180
1279
|
[onClick, onToggle]
|
|
1181
1280
|
);
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1183
1282
|
Show,
|
|
1184
1283
|
{
|
|
1185
1284
|
when: hasAs,
|
|
1186
|
-
fallback: /* @__PURE__ */ (0,
|
|
1285
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1187
1286
|
"button",
|
|
1188
1287
|
{
|
|
1189
1288
|
...nativeProps,
|
|
@@ -1201,7 +1300,7 @@ function NavMenuTrigger(props) {
|
|
|
1201
1300
|
children: props.children
|
|
1202
1301
|
}
|
|
1203
1302
|
),
|
|
1204
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1303
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1205
1304
|
AsSub,
|
|
1206
1305
|
{
|
|
1207
1306
|
...nativeProps,
|
|
@@ -1218,7 +1317,7 @@ function NavMenuTrigger(props) {
|
|
|
1218
1317
|
var import_react9 = require("react");
|
|
1219
1318
|
var import_css21 = require("@cerberus/styled-system/css");
|
|
1220
1319
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1221
|
-
var
|
|
1320
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1222
1321
|
function getPosition(position) {
|
|
1223
1322
|
const defaultPositions = {
|
|
1224
1323
|
left: "auto",
|
|
@@ -1276,7 +1375,7 @@ function NavMenuList(props) {
|
|
|
1276
1375
|
() => getPosition(position ?? "bottom"),
|
|
1277
1376
|
[position]
|
|
1278
1377
|
);
|
|
1279
|
-
return /* @__PURE__ */ (0,
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1280
1379
|
"ul",
|
|
1281
1380
|
{
|
|
1282
1381
|
...nativeProps,
|
|
@@ -1290,22 +1389,22 @@ function NavMenuList(props) {
|
|
|
1290
1389
|
|
|
1291
1390
|
// src/components/NavMenuLink.tsx
|
|
1292
1391
|
var import_css22 = require("@cerberus/styled-system/css");
|
|
1293
|
-
var
|
|
1392
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1294
1393
|
function NavMenuLink(props) {
|
|
1295
1394
|
const { as, ...nativeProps } = props;
|
|
1296
1395
|
const hasAs = Boolean(as);
|
|
1297
1396
|
const AsSub = as;
|
|
1298
|
-
return /* @__PURE__ */ (0,
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1299
1398
|
"li",
|
|
1300
1399
|
{
|
|
1301
1400
|
className: (0, import_css22.css)({
|
|
1302
1401
|
w: "full"
|
|
1303
1402
|
}),
|
|
1304
|
-
children: /* @__PURE__ */ (0,
|
|
1403
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1305
1404
|
Show,
|
|
1306
1405
|
{
|
|
1307
1406
|
when: hasAs,
|
|
1308
|
-
fallback: /* @__PURE__ */ (0,
|
|
1407
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1309
1408
|
"a",
|
|
1310
1409
|
{
|
|
1311
1410
|
...nativeProps,
|
|
@@ -1321,7 +1420,7 @@ function NavMenuLink(props) {
|
|
|
1321
1420
|
)
|
|
1322
1421
|
}
|
|
1323
1422
|
),
|
|
1324
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1423
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AsSub, { ...nativeProps })
|
|
1325
1424
|
}
|
|
1326
1425
|
)
|
|
1327
1426
|
}
|
|
@@ -1362,19 +1461,19 @@ function trapFocus(modalRef) {
|
|
|
1362
1461
|
}
|
|
1363
1462
|
|
|
1364
1463
|
// src/components/Notification.tsx
|
|
1365
|
-
var
|
|
1464
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1366
1465
|
function MatchNotificationIcon(props) {
|
|
1367
1466
|
const palette = props.palette || "info";
|
|
1368
1467
|
const key = `${palette}Notification`;
|
|
1369
1468
|
const Icon = $cerberusIcons[key];
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, {});
|
|
1371
1470
|
}
|
|
1372
1471
|
function Notification(props) {
|
|
1373
1472
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1374
1473
|
const ref = (0, import_react10.useRef)(null);
|
|
1375
1474
|
const onKeyDown = trapFocus(ref);
|
|
1376
1475
|
const styles = (0, import_recipes17.notification)({ palette });
|
|
1377
|
-
return /* @__PURE__ */ (0,
|
|
1476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1378
1477
|
"dialog",
|
|
1379
1478
|
{
|
|
1380
1479
|
...nativeProps,
|
|
@@ -1389,8 +1488,8 @@ function Notification(props) {
|
|
|
1389
1488
|
onKeyDown,
|
|
1390
1489
|
ref,
|
|
1391
1490
|
children: [
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1393
|
-
/* @__PURE__ */ (0,
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MatchNotificationIcon, { palette }) }),
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1394
1493
|
"div",
|
|
1395
1494
|
{
|
|
1396
1495
|
className: (0, import_patterns10.vstack)({
|
|
@@ -1401,14 +1500,14 @@ function Notification(props) {
|
|
|
1401
1500
|
children
|
|
1402
1501
|
}
|
|
1403
1502
|
),
|
|
1404
|
-
/* @__PURE__ */ (0,
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1405
1504
|
"button",
|
|
1406
1505
|
{
|
|
1407
1506
|
"aria-label": "Close",
|
|
1408
1507
|
className: styles.close,
|
|
1409
1508
|
onClick: onClose,
|
|
1410
1509
|
value: props.id,
|
|
1411
|
-
children: /* @__PURE__ */ (0,
|
|
1510
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_icons2.Close, {})
|
|
1412
1511
|
}
|
|
1413
1512
|
)
|
|
1414
1513
|
]
|
|
@@ -1419,21 +1518,21 @@ function Notification(props) {
|
|
|
1419
1518
|
// src/components/NotificationHeading.tsx
|
|
1420
1519
|
var import_css24 = require("@cerberus/styled-system/css");
|
|
1421
1520
|
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1422
|
-
var
|
|
1521
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1423
1522
|
function NotificationHeading(props) {
|
|
1424
1523
|
const { palette, ...nativeProps } = props;
|
|
1425
1524
|
const styles = (0, import_recipes18.notification)({ palette });
|
|
1426
|
-
return /* @__PURE__ */ (0,
|
|
1525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: (0, import_css24.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1427
1526
|
}
|
|
1428
1527
|
|
|
1429
1528
|
// src/components/NotificationDescription.tsx
|
|
1430
1529
|
var import_css25 = require("@cerberus/styled-system/css");
|
|
1431
1530
|
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1432
|
-
var
|
|
1531
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1433
1532
|
function NotificationDescription(props) {
|
|
1434
1533
|
const { palette, ...nativeProps } = props;
|
|
1435
1534
|
const styles = (0, import_recipes19.notification)({ palette });
|
|
1436
|
-
return /* @__PURE__ */ (0,
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1437
1536
|
"p",
|
|
1438
1537
|
{
|
|
1439
1538
|
className: (0, import_css25.cx)(nativeProps.className, styles.description),
|
|
@@ -1456,13 +1555,13 @@ function Portal(props) {
|
|
|
1456
1555
|
var import_css26 = require("@cerberus/styled-system/css");
|
|
1457
1556
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1458
1557
|
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1459
|
-
var
|
|
1558
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1460
1559
|
function Radio(props) {
|
|
1461
1560
|
const { children, size, ...nativeProps } = props;
|
|
1462
1561
|
const { invalid, ...state } = useFieldContext();
|
|
1463
1562
|
const styles = (0, import_recipes20.radio)({ size });
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: (0, import_css26.cx)("group", (0, import_patterns11.hstack)(), styles.root), tabIndex: 0, children: [
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1466
1565
|
"input",
|
|
1467
1566
|
{
|
|
1468
1567
|
...nativeProps,
|
|
@@ -1481,7 +1580,7 @@ function Radio(props) {
|
|
|
1481
1580
|
var import_css27 = require("@cerberus/styled-system/css");
|
|
1482
1581
|
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1483
1582
|
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1484
|
-
var
|
|
1583
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1485
1584
|
function Select(props) {
|
|
1486
1585
|
const { describedBy, size, ...nativeProps } = props;
|
|
1487
1586
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
@@ -1489,8 +1588,8 @@ function Select(props) {
|
|
|
1489
1588
|
const styles = (0, import_recipes21.select)({
|
|
1490
1589
|
size
|
|
1491
1590
|
});
|
|
1492
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
-
/* @__PURE__ */ (0,
|
|
1591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: styles.root, children: [
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1494
1593
|
"select",
|
|
1495
1594
|
{
|
|
1496
1595
|
...nativeProps,
|
|
@@ -1500,7 +1599,7 @@ function Select(props) {
|
|
|
1500
1599
|
className: styles.input
|
|
1501
1600
|
}
|
|
1502
1601
|
),
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1602
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1504
1603
|
"span",
|
|
1505
1604
|
{
|
|
1506
1605
|
className: (0, import_css27.cx)(
|
|
@@ -1510,28 +1609,28 @@ function Select(props) {
|
|
|
1510
1609
|
})
|
|
1511
1610
|
),
|
|
1512
1611
|
children: [
|
|
1513
|
-
/* @__PURE__ */ (0,
|
|
1612
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1514
1613
|
"span",
|
|
1515
1614
|
{
|
|
1516
1615
|
...invalid && { "data-invalid": true },
|
|
1517
1616
|
className: styles.stateIcon,
|
|
1518
|
-
children: /* @__PURE__ */ (0,
|
|
1617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(InvalidIcon, {})
|
|
1519
1618
|
}
|
|
1520
1619
|
) }),
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectArrow, {}) })
|
|
1522
1621
|
]
|
|
1523
1622
|
}
|
|
1524
1623
|
)
|
|
1525
1624
|
] });
|
|
1526
1625
|
}
|
|
1527
1626
|
function Option(props) {
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("option", { ...props });
|
|
1529
1628
|
}
|
|
1530
1629
|
|
|
1531
1630
|
// src/components/Spinner.tsx
|
|
1532
|
-
var
|
|
1631
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1533
1632
|
function Spinner(props) {
|
|
1534
|
-
return /* @__PURE__ */ (0,
|
|
1633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1535
1634
|
"svg",
|
|
1536
1635
|
{
|
|
1537
1636
|
"aria-busy": "true",
|
|
@@ -1541,7 +1640,7 @@ function Spinner(props) {
|
|
|
1541
1640
|
width: props.size,
|
|
1542
1641
|
viewBox: "0 0 24 24",
|
|
1543
1642
|
...props,
|
|
1544
|
-
children: /* @__PURE__ */ (0,
|
|
1643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1545
1644
|
"g",
|
|
1546
1645
|
{
|
|
1547
1646
|
fill: "none",
|
|
@@ -1550,14 +1649,14 @@ function Spinner(props) {
|
|
|
1550
1649
|
strokeLinejoin: "round",
|
|
1551
1650
|
strokeWidth: 2,
|
|
1552
1651
|
children: [
|
|
1553
|
-
/* @__PURE__ */ (0,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1554
1653
|
"path",
|
|
1555
1654
|
{
|
|
1556
1655
|
strokeDasharray: 16,
|
|
1557
1656
|
strokeDashoffset: 16,
|
|
1558
1657
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1559
1658
|
children: [
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1561
1660
|
"animate",
|
|
1562
1661
|
{
|
|
1563
1662
|
fill: "freeze",
|
|
@@ -1566,7 +1665,7 @@ function Spinner(props) {
|
|
|
1566
1665
|
values: "16;0"
|
|
1567
1666
|
}
|
|
1568
1667
|
),
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1570
1669
|
"animateTransform",
|
|
1571
1670
|
{
|
|
1572
1671
|
attributeName: "transform",
|
|
@@ -1579,14 +1678,14 @@ function Spinner(props) {
|
|
|
1579
1678
|
]
|
|
1580
1679
|
}
|
|
1581
1680
|
),
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1681
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1583
1682
|
"path",
|
|
1584
1683
|
{
|
|
1585
1684
|
strokeDasharray: 64,
|
|
1586
1685
|
strokeDashoffset: 64,
|
|
1587
1686
|
strokeOpacity: 0.3,
|
|
1588
1687
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
1589
|
-
children: /* @__PURE__ */ (0,
|
|
1688
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1590
1689
|
"animate",
|
|
1591
1690
|
{
|
|
1592
1691
|
fill: "freeze",
|
|
@@ -1610,7 +1709,7 @@ var import_react13 = require("react");
|
|
|
1610
1709
|
// src/context/tabs.tsx
|
|
1611
1710
|
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
1612
1711
|
var import_react11 = require("react");
|
|
1613
|
-
var
|
|
1712
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1614
1713
|
var TabsContext = (0, import_react11.createContext)(null);
|
|
1615
1714
|
function Tabs(props) {
|
|
1616
1715
|
const { cache, active, id, palette } = props;
|
|
@@ -1642,7 +1741,7 @@ function Tabs(props) {
|
|
|
1642
1741
|
window.localStorage.setItem(uuid, activeTab);
|
|
1643
1742
|
}
|
|
1644
1743
|
}, [activeTab, cache]);
|
|
1645
|
-
return /* @__PURE__ */ (0,
|
|
1744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabsContext.Provider, { value, children: props.children });
|
|
1646
1745
|
}
|
|
1647
1746
|
function useTabsContext() {
|
|
1648
1747
|
const context = (0, import_react11.useContext)(TabsContext);
|
|
@@ -1712,7 +1811,7 @@ function useTabsKeyboardNavigation() {
|
|
|
1712
1811
|
}
|
|
1713
1812
|
|
|
1714
1813
|
// src/components/Tab.tsx
|
|
1715
|
-
var
|
|
1814
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1716
1815
|
function Tab(props) {
|
|
1717
1816
|
const { value, ...nativeProps } = props;
|
|
1718
1817
|
const { active, onTabUpdate, styles } = useTabsContext();
|
|
@@ -1724,7 +1823,7 @@ function Tab(props) {
|
|
|
1724
1823
|
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
1725
1824
|
startTransition(() => onTabUpdate(e.currentTarget.value));
|
|
1726
1825
|
}
|
|
1727
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1728
1827
|
"button",
|
|
1729
1828
|
{
|
|
1730
1829
|
...nativeProps,
|
|
@@ -1745,11 +1844,11 @@ function Tab(props) {
|
|
|
1745
1844
|
// src/components/TabList.tsx
|
|
1746
1845
|
var import_css29 = require("@cerberus/styled-system/css");
|
|
1747
1846
|
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
1748
|
-
var
|
|
1847
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1749
1848
|
function TabList(props) {
|
|
1750
1849
|
const { description, ...nativeProps } = props;
|
|
1751
1850
|
const { id, styles } = useTabsContext();
|
|
1752
|
-
return /* @__PURE__ */ (0,
|
|
1851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1753
1852
|
"div",
|
|
1754
1853
|
{
|
|
1755
1854
|
...nativeProps,
|
|
@@ -1770,12 +1869,12 @@ function TabList(props) {
|
|
|
1770
1869
|
// src/components/TabPanel.tsx
|
|
1771
1870
|
var import_css30 = require("@cerberus/styled-system/css");
|
|
1772
1871
|
var import_react14 = require("react");
|
|
1773
|
-
var
|
|
1872
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1774
1873
|
function TabPanel(props) {
|
|
1775
1874
|
const { tab, ...nativeProps } = props;
|
|
1776
1875
|
const { active, styles } = useTabsContext();
|
|
1777
1876
|
const isActive = (0, import_react14.useMemo)(() => active === tab, [active, tab]);
|
|
1778
|
-
return /* @__PURE__ */ (0,
|
|
1877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Show, { when: isActive, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1779
1878
|
"div",
|
|
1780
1879
|
{
|
|
1781
1880
|
...nativeProps,
|
|
@@ -1791,52 +1890,52 @@ function TabPanel(props) {
|
|
|
1791
1890
|
// src/components/Table.tsx
|
|
1792
1891
|
var import_css31 = require("@cerberus/styled-system/css");
|
|
1793
1892
|
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1794
|
-
var
|
|
1893
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1795
1894
|
function Table(props) {
|
|
1796
1895
|
const { caption, children, ...nativeProps } = props;
|
|
1797
1896
|
const styles = (0, import_recipes23.table)();
|
|
1798
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1799
1898
|
"table",
|
|
1800
1899
|
{
|
|
1801
1900
|
...nativeProps,
|
|
1802
1901
|
className: (0, import_css31.cx)(nativeProps.className, styles.table),
|
|
1803
1902
|
children: [
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("caption", { className: styles.caption, children: caption }),
|
|
1805
1904
|
children
|
|
1806
1905
|
]
|
|
1807
1906
|
}
|
|
1808
1907
|
) });
|
|
1809
1908
|
}
|
|
1810
1909
|
function Tr(props) {
|
|
1811
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tr", { ...props });
|
|
1812
1911
|
}
|
|
1813
1912
|
|
|
1814
1913
|
// src/components/Thead.tsx
|
|
1815
1914
|
var import_css32 = require("@cerberus/styled-system/css");
|
|
1816
1915
|
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
1817
|
-
var
|
|
1916
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1818
1917
|
function Thead(props) {
|
|
1819
|
-
return /* @__PURE__ */ (0,
|
|
1918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { ...props, className: (0, import_css32.cx)(props.className, (0, import_recipes24.thead)()) });
|
|
1820
1919
|
}
|
|
1821
1920
|
|
|
1822
1921
|
// src/components/Th.tsx
|
|
1823
1922
|
var import_css33 = require("@cerberus/styled-system/css");
|
|
1824
1923
|
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
1825
|
-
var
|
|
1924
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1826
1925
|
function Th(props) {
|
|
1827
1926
|
const { size, onClick, ...nativeProps } = props;
|
|
1828
|
-
return /* @__PURE__ */ (0,
|
|
1927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1829
1928
|
Show,
|
|
1830
1929
|
{
|
|
1831
1930
|
when: Boolean(onClick),
|
|
1832
|
-
fallback: /* @__PURE__ */ (0,
|
|
1931
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1833
1932
|
"th",
|
|
1834
1933
|
{
|
|
1835
1934
|
...nativeProps,
|
|
1836
1935
|
className: (0, import_css33.cx)(nativeProps.className, (0, import_recipes25.th)({ size }))
|
|
1837
1936
|
}
|
|
1838
1937
|
),
|
|
1839
|
-
children: /* @__PURE__ */ (0,
|
|
1938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1840
1939
|
"button",
|
|
1841
1940
|
{
|
|
1842
1941
|
className: (0, import_css33.cx)(
|
|
@@ -1861,10 +1960,10 @@ function Th(props) {
|
|
|
1861
1960
|
// src/components/Td.tsx
|
|
1862
1961
|
var import_css34 = require("@cerberus/styled-system/css");
|
|
1863
1962
|
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
1864
|
-
var
|
|
1963
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1865
1964
|
function Td(props) {
|
|
1866
1965
|
const { size, ...nativeProps } = props;
|
|
1867
|
-
return /* @__PURE__ */ (0,
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1868
1967
|
"td",
|
|
1869
1968
|
{
|
|
1870
1969
|
...nativeProps,
|
|
@@ -1881,10 +1980,10 @@ function Td(props) {
|
|
|
1881
1980
|
// src/components/Tbody.tsx
|
|
1882
1981
|
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
1883
1982
|
var import_css35 = require("@cerberus/styled-system/css");
|
|
1884
|
-
var
|
|
1983
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1885
1984
|
function Tbody(props) {
|
|
1886
1985
|
const { decoration, ...nativeProps } = props;
|
|
1887
|
-
return /* @__PURE__ */ (0,
|
|
1986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1888
1987
|
"tbody",
|
|
1889
1988
|
{
|
|
1890
1989
|
...nativeProps,
|
|
@@ -1901,7 +2000,7 @@ function Tbody(props) {
|
|
|
1901
2000
|
// src/components/Tag.tsx
|
|
1902
2001
|
var import_css36 = require("@cerberus/styled-system/css");
|
|
1903
2002
|
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
1904
|
-
var
|
|
2003
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1905
2004
|
function Tag(props) {
|
|
1906
2005
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
1907
2006
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -1909,7 +2008,7 @@ function Tag(props) {
|
|
|
1909
2008
|
const shape = isClosable ? "pill" : initShape;
|
|
1910
2009
|
const closableStyles = isClosable ? closableCss : "";
|
|
1911
2010
|
const { close: Close2 } = $cerberusIcons;
|
|
1912
|
-
return /* @__PURE__ */ (0,
|
|
2011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
1913
2012
|
"span",
|
|
1914
2013
|
{
|
|
1915
2014
|
...nativeProps,
|
|
@@ -1925,7 +2024,7 @@ function Tag(props) {
|
|
|
1925
2024
|
),
|
|
1926
2025
|
children: [
|
|
1927
2026
|
props.children,
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1929
2028
|
"button",
|
|
1930
2029
|
{
|
|
1931
2030
|
"aria-label": "Close",
|
|
@@ -1935,7 +2034,7 @@ function Tag(props) {
|
|
|
1935
2034
|
size: "sm"
|
|
1936
2035
|
}),
|
|
1937
2036
|
onClick,
|
|
1938
|
-
children: /* @__PURE__ */ (0,
|
|
2037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Close2, {})
|
|
1939
2038
|
}
|
|
1940
2039
|
) })
|
|
1941
2040
|
]
|
|
@@ -1951,11 +2050,11 @@ var closableCss = (0, import_css36.css)({
|
|
|
1951
2050
|
// src/components/Textarea.tsx
|
|
1952
2051
|
var import_css37 = require("@cerberus/styled-system/css");
|
|
1953
2052
|
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
1954
|
-
var
|
|
2053
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1955
2054
|
function Textarea(props) {
|
|
1956
2055
|
const { describedBy, ...nativeProps } = props;
|
|
1957
2056
|
const { invalid, ...fieldState } = useFieldContext();
|
|
1958
|
-
return /* @__PURE__ */ (0,
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1959
2058
|
"textarea",
|
|
1960
2059
|
{
|
|
1961
2060
|
...nativeProps,
|
|
@@ -1980,19 +2079,19 @@ function Textarea(props) {
|
|
|
1980
2079
|
var import_css38 = require("@cerberus/styled-system/css");
|
|
1981
2080
|
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
1982
2081
|
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
1983
|
-
var
|
|
2082
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1984
2083
|
function Toggle(props) {
|
|
1985
2084
|
const { size, describedBy, ...nativeProps } = props;
|
|
1986
2085
|
const styles = (0, import_recipes30.toggle)({ size });
|
|
1987
2086
|
const { invalid, ...state } = useFieldContext();
|
|
1988
2087
|
const Icon = $cerberusIcons.toggleChecked;
|
|
1989
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
1990
2089
|
"span",
|
|
1991
2090
|
{
|
|
1992
2091
|
className: (0, import_css38.cx)("group", styles.track, (0, import_patterns14.hstack)()),
|
|
1993
2092
|
"data-checked": props.checked || props.defaultChecked,
|
|
1994
2093
|
children: [
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1996
2095
|
"input",
|
|
1997
2096
|
{
|
|
1998
2097
|
...nativeProps,
|
|
@@ -2004,7 +2103,7 @@ function Toggle(props) {
|
|
|
2004
2103
|
type: "checkbox"
|
|
2005
2104
|
}
|
|
2006
2105
|
),
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2008
2107
|
"span",
|
|
2009
2108
|
{
|
|
2010
2109
|
className: (0, import_css38.cx)(
|
|
@@ -2013,7 +2112,7 @@ function Toggle(props) {
|
|
|
2013
2112
|
justify: "center"
|
|
2014
2113
|
})
|
|
2015
2114
|
),
|
|
2016
|
-
children: /* @__PURE__ */ (0,
|
|
2115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, {})
|
|
2017
2116
|
}
|
|
2018
2117
|
)
|
|
2019
2118
|
]
|
|
@@ -2052,7 +2151,7 @@ function useModal() {
|
|
|
2052
2151
|
}
|
|
2053
2152
|
|
|
2054
2153
|
// src/context/confirm-modal.tsx
|
|
2055
|
-
var
|
|
2154
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2056
2155
|
var ConfirmModalContext = (0, import_react16.createContext)(null);
|
|
2057
2156
|
function ConfirmModal(props) {
|
|
2058
2157
|
const { modalRef, show, close } = useModal();
|
|
@@ -2092,36 +2191,36 @@ function ConfirmModal(props) {
|
|
|
2092
2191
|
}),
|
|
2093
2192
|
[handleShow]
|
|
2094
2193
|
);
|
|
2095
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2096
2195
|
props.children,
|
|
2097
|
-
/* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2197
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ModalHeader, { children: [
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2100
2199
|
"div",
|
|
2101
2200
|
{
|
|
2102
2201
|
className: (0, import_patterns15.hstack)({
|
|
2103
2202
|
justify: "center",
|
|
2104
2203
|
w: "full"
|
|
2105
2204
|
}),
|
|
2106
|
-
children: /* @__PURE__ */ (0,
|
|
2205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2107
2206
|
Show,
|
|
2108
2207
|
{
|
|
2109
2208
|
when: palette === "danger",
|
|
2110
|
-
fallback: /* @__PURE__ */ (0,
|
|
2209
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2111
2210
|
Avatar,
|
|
2112
2211
|
{
|
|
2113
2212
|
ariaLabel: "",
|
|
2114
2213
|
gradient: "charon-light",
|
|
2115
|
-
icon: /* @__PURE__ */ (0,
|
|
2214
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ConfirmIcon, { size: 24 }),
|
|
2116
2215
|
src: ""
|
|
2117
2216
|
}
|
|
2118
2217
|
),
|
|
2119
|
-
children: /* @__PURE__ */ (0,
|
|
2218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2120
2219
|
Avatar,
|
|
2121
2220
|
{
|
|
2122
2221
|
ariaLabel: "",
|
|
2123
2222
|
gradient: "hades-dark",
|
|
2124
|
-
icon: /* @__PURE__ */ (0,
|
|
2223
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ConfirmIcon, { size: 24 }),
|
|
2125
2224
|
src: ""
|
|
2126
2225
|
}
|
|
2127
2226
|
)
|
|
@@ -2129,17 +2228,17 @@ function ConfirmModal(props) {
|
|
|
2129
2228
|
)
|
|
2130
2229
|
}
|
|
2131
2230
|
),
|
|
2132
|
-
/* @__PURE__ */ (0,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2134
2233
|
] }),
|
|
2135
|
-
/* @__PURE__ */ (0,
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2136
2235
|
"div",
|
|
2137
2236
|
{
|
|
2138
2237
|
className: (0, import_patterns15.hstack)({
|
|
2139
2238
|
gap: "4"
|
|
2140
2239
|
}),
|
|
2141
2240
|
children: [
|
|
2142
|
-
/* @__PURE__ */ (0,
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2143
2242
|
Button,
|
|
2144
2243
|
{
|
|
2145
2244
|
autoFocus: true,
|
|
@@ -2153,7 +2252,7 @@ function ConfirmModal(props) {
|
|
|
2153
2252
|
children: content == null ? void 0 : content.actionText
|
|
2154
2253
|
}
|
|
2155
2254
|
),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2157
2256
|
Button,
|
|
2158
2257
|
{
|
|
2159
2258
|
className: (0, import_css39.css)({
|
|
@@ -2187,7 +2286,7 @@ var import_react17 = require("react");
|
|
|
2187
2286
|
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
2188
2287
|
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2189
2288
|
var import_css40 = require("@cerberus/styled-system/css");
|
|
2190
|
-
var
|
|
2289
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2191
2290
|
var NotificationsContext = (0, import_react17.createContext)(null);
|
|
2192
2291
|
function NotificationCenter(props) {
|
|
2193
2292
|
const [activeNotifications, setActiveNotifications] = (0, import_react17.useState)([]);
|
|
@@ -2220,10 +2319,10 @@ function NotificationCenter(props) {
|
|
|
2220
2319
|
}),
|
|
2221
2320
|
[handleNotify]
|
|
2222
2321
|
);
|
|
2223
|
-
return /* @__PURE__ */ (0,
|
|
2322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2224
2323
|
props.children,
|
|
2225
|
-
/* @__PURE__ */ (0,
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2324
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: styles.center, children: [
|
|
2325
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2227
2326
|
Button,
|
|
2228
2327
|
{
|
|
2229
2328
|
className: (0, import_css40.cx)(styles.closeAll, (0, import_patterns16.animateIn)()),
|
|
@@ -2235,7 +2334,7 @@ function NotificationCenter(props) {
|
|
|
2235
2334
|
children: "Close all"
|
|
2236
2335
|
}
|
|
2237
2336
|
) }),
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2337
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2239
2338
|
"div",
|
|
2240
2339
|
{
|
|
2241
2340
|
className: (0, import_patterns16.vstack)({
|
|
@@ -2245,7 +2344,7 @@ function NotificationCenter(props) {
|
|
|
2245
2344
|
style: {
|
|
2246
2345
|
alignItems: "flex-end"
|
|
2247
2346
|
},
|
|
2248
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
2347
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2249
2348
|
MatchNotification,
|
|
2250
2349
|
{
|
|
2251
2350
|
...option,
|
|
@@ -2262,7 +2361,7 @@ function MatchNotification(props) {
|
|
|
2262
2361
|
const { palette, id, onClose, heading, description } = props;
|
|
2263
2362
|
switch (palette) {
|
|
2264
2363
|
case "success":
|
|
2265
|
-
return /* @__PURE__ */ (0,
|
|
2364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2266
2365
|
Notification,
|
|
2267
2366
|
{
|
|
2268
2367
|
id,
|
|
@@ -2270,14 +2369,14 @@ function MatchNotification(props) {
|
|
|
2270
2369
|
open: true,
|
|
2271
2370
|
palette: "success",
|
|
2272
2371
|
children: [
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
2373
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2275
2374
|
]
|
|
2276
2375
|
},
|
|
2277
2376
|
id
|
|
2278
2377
|
);
|
|
2279
2378
|
case "warning":
|
|
2280
|
-
return /* @__PURE__ */ (0,
|
|
2379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2281
2380
|
Notification,
|
|
2282
2381
|
{
|
|
2283
2382
|
id,
|
|
@@ -2285,22 +2384,22 @@ function MatchNotification(props) {
|
|
|
2285
2384
|
open: true,
|
|
2286
2385
|
palette: "warning",
|
|
2287
2386
|
children: [
|
|
2288
|
-
/* @__PURE__ */ (0,
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2290
2389
|
]
|
|
2291
2390
|
},
|
|
2292
2391
|
id
|
|
2293
2392
|
);
|
|
2294
2393
|
case "danger":
|
|
2295
|
-
return /* @__PURE__ */ (0,
|
|
2296
|
-
/* @__PURE__ */ (0,
|
|
2297
|
-
/* @__PURE__ */ (0,
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
2395
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2298
2397
|
] }, id);
|
|
2299
2398
|
case "info":
|
|
2300
2399
|
default:
|
|
2301
|
-
return /* @__PURE__ */ (0,
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2303
|
-
/* @__PURE__ */ (0,
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
2401
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2304
2403
|
] }, id);
|
|
2305
2404
|
}
|
|
2306
2405
|
}
|
|
@@ -2318,7 +2417,7 @@ function useNotificationCenter() {
|
|
|
2318
2417
|
var import_react18 = require("react");
|
|
2319
2418
|
var import_css41 = require("@cerberus/styled-system/css");
|
|
2320
2419
|
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2321
|
-
var
|
|
2420
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2322
2421
|
var PromptModalContext = (0, import_react18.createContext)(null);
|
|
2323
2422
|
function PromptModal(props) {
|
|
2324
2423
|
const { modalRef, show, close } = useModal();
|
|
@@ -2368,36 +2467,36 @@ function PromptModal(props) {
|
|
|
2368
2467
|
}),
|
|
2369
2468
|
[handleShow]
|
|
2370
2469
|
);
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2372
2471
|
props.children,
|
|
2373
|
-
/* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ModalHeader, { children: [
|
|
2474
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2376
2475
|
"div",
|
|
2377
2476
|
{
|
|
2378
2477
|
className: (0, import_patterns17.hstack)({
|
|
2379
2478
|
justify: "center",
|
|
2380
2479
|
w: "full"
|
|
2381
2480
|
}),
|
|
2382
|
-
children: /* @__PURE__ */ (0,
|
|
2481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2383
2482
|
Show,
|
|
2384
2483
|
{
|
|
2385
2484
|
when: palette === "danger",
|
|
2386
|
-
fallback: /* @__PURE__ */ (0,
|
|
2485
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2387
2486
|
Avatar,
|
|
2388
2487
|
{
|
|
2389
2488
|
ariaLabel: "",
|
|
2390
2489
|
gradient: "charon-light",
|
|
2391
|
-
icon: /* @__PURE__ */ (0,
|
|
2490
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PromptIcon, { size: 24 }),
|
|
2392
2491
|
src: ""
|
|
2393
2492
|
}
|
|
2394
2493
|
),
|
|
2395
|
-
children: /* @__PURE__ */ (0,
|
|
2494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2396
2495
|
Avatar,
|
|
2397
2496
|
{
|
|
2398
2497
|
ariaLabel: "",
|
|
2399
2498
|
gradient: "hades-dark",
|
|
2400
|
-
icon: /* @__PURE__ */ (0,
|
|
2499
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PromptIcon, { size: 24 }),
|
|
2401
2500
|
src: ""
|
|
2402
2501
|
}
|
|
2403
2502
|
)
|
|
@@ -2405,10 +2504,10 @@ function PromptModal(props) {
|
|
|
2405
2504
|
)
|
|
2406
2505
|
}
|
|
2407
2506
|
),
|
|
2408
|
-
/* @__PURE__ */ (0,
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2507
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2410
2509
|
] }),
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2412
2511
|
"div",
|
|
2413
2512
|
{
|
|
2414
2513
|
className: (0, import_patterns17.vstack)({
|
|
@@ -2416,10 +2515,10 @@ function PromptModal(props) {
|
|
|
2416
2515
|
mt: "4",
|
|
2417
2516
|
mb: "8"
|
|
2418
2517
|
}),
|
|
2419
|
-
children: /* @__PURE__ */ (0,
|
|
2420
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Field, { invalid: !isValid, children: [
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Label, { htmlFor: "confirm", size: "md", children: [
|
|
2421
2520
|
"Type",
|
|
2422
|
-
/* @__PURE__ */ (0,
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2423
2522
|
"strong",
|
|
2424
2523
|
{
|
|
2425
2524
|
className: (0, import_css41.css)({
|
|
@@ -2430,7 +2529,7 @@ function PromptModal(props) {
|
|
|
2430
2529
|
),
|
|
2431
2530
|
"to confirm"
|
|
2432
2531
|
] }),
|
|
2433
|
-
/* @__PURE__ */ (0,
|
|
2532
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2434
2533
|
Input,
|
|
2435
2534
|
{
|
|
2436
2535
|
id: "confirm",
|
|
@@ -2442,7 +2541,7 @@ function PromptModal(props) {
|
|
|
2442
2541
|
] })
|
|
2443
2542
|
}
|
|
2444
2543
|
),
|
|
2445
|
-
/* @__PURE__ */ (0,
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2446
2545
|
"div",
|
|
2447
2546
|
{
|
|
2448
2547
|
className: (0, import_patterns17.hstack)({
|
|
@@ -2450,7 +2549,7 @@ function PromptModal(props) {
|
|
|
2450
2549
|
gap: "4"
|
|
2451
2550
|
}),
|
|
2452
2551
|
children: [
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2552
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2454
2553
|
Button,
|
|
2455
2554
|
{
|
|
2456
2555
|
autoFocus: true,
|
|
@@ -2465,7 +2564,7 @@ function PromptModal(props) {
|
|
|
2465
2564
|
children: content == null ? void 0 : content.actionText
|
|
2466
2565
|
}
|
|
2467
2566
|
),
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2469
2568
|
Button,
|
|
2470
2569
|
{
|
|
2471
2570
|
className: (0, import_css41.css)({
|
|
@@ -2559,7 +2658,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
2559
2658
|
}
|
|
2560
2659
|
|
|
2561
2660
|
// src/context/theme.tsx
|
|
2562
|
-
var
|
|
2661
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2563
2662
|
var ThemeContext = (0, import_react20.createContext)(
|
|
2564
2663
|
null
|
|
2565
2664
|
);
|
|
@@ -2569,7 +2668,7 @@ function ThemeProvider(props) {
|
|
|
2569
2668
|
updateMode: props.updateMode,
|
|
2570
2669
|
updateTheme: props.updateTheme
|
|
2571
2670
|
});
|
|
2572
|
-
return /* @__PURE__ */ (0,
|
|
2671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
2573
2672
|
}
|
|
2574
2673
|
function useThemeContext() {
|
|
2575
2674
|
const context = (0, import_react20.useContext)(ThemeContext);
|