@cerberus-design/react 0.13.2-next-4bdc7c3 → 0.13.2-next-46f23d2
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 +49 -22
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/NotificationDescription.cjs.map +1 -1
- package/build/legacy/components/NotificationHeading.cjs.map +1 -1
- package/build/legacy/components/ProgressBar.cjs.map +1 -1
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Text.cjs +59 -0
- package/build/legacy/components/Text.cjs.map +1 -0
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +2 -3
- package/build/legacy/context/cta-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +118 -86
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +49 -22
- package/build/modern/chunk-2ZNIYPDV.js +47 -0
- package/build/modern/chunk-2ZNIYPDV.js.map +1 -0
- package/build/modern/{chunk-7SGPJM66.js → chunk-35L6DOHE.js} +2 -2
- package/build/modern/chunk-35L6DOHE.js.map +1 -0
- package/build/modern/{chunk-XL4JREDT.js → chunk-3DGV4ESI.js} +2 -2
- package/build/modern/{chunk-4QBPJVEN.js → chunk-42RVVWGM.js} +4 -4
- package/build/modern/chunk-42RVVWGM.js.map +1 -0
- package/build/modern/{chunk-N4QTLDVM.js → chunk-67KLFLNR.js} +3 -3
- package/build/modern/{chunk-SPZYPRZ6.js → chunk-C3HYHH3H.js} +2 -2
- package/build/modern/{chunk-TM5AS6M6.js → chunk-CMDPTXHB.js} +3 -3
- package/build/modern/chunk-CMDPTXHB.js.map +1 -0
- package/build/modern/{chunk-CP7OUC2Q.js → chunk-E3PAEB7Y.js} +1 -1
- package/build/modern/chunk-E3PAEB7Y.js.map +1 -0
- package/build/modern/{chunk-NMNONSHU.js → chunk-MRH2EO3L.js} +2 -2
- package/build/modern/{chunk-622N7YRT.js → chunk-NF5WV3OW.js} +5 -6
- package/build/modern/chunk-NF5WV3OW.js.map +1 -0
- package/build/modern/{chunk-W4DXACNV.js → chunk-OFAATLPF.js} +3 -3
- package/build/modern/{chunk-NB6DV4VA.js → chunk-PGXJJDPH.js} +2 -2
- package/build/modern/{chunk-7MM5KYEX.js → chunk-RET4YOBV.js} +4 -4
- package/build/modern/{chunk-C3CDRCHS.js → chunk-RHHFH6JJ.js} +4 -4
- package/build/modern/chunk-RHHFH6JJ.js.map +1 -0
- package/build/modern/{chunk-SXIXDXG3.js → chunk-SLHYBPJ5.js} +1 -1
- package/build/modern/chunk-SLHYBPJ5.js.map +1 -0
- package/build/modern/{chunk-NKM6PISB.js → chunk-SVFZJYLV.js} +2 -2
- package/build/modern/{chunk-VERRHMW4.js → chunk-UBN2CZLV.js} +2 -2
- package/build/modern/{chunk-XEW6TJJ4.js → chunk-UXY3KCC3.js} +1 -1
- package/build/modern/chunk-UXY3KCC3.js.map +1 -0
- package/build/modern/{chunk-F72ZABKX.js → chunk-W3YI64C5.js} +2 -2
- package/build/modern/{chunk-KCANMM64.js → chunk-WZJ5UQNM.js} +1 -1
- package/build/modern/chunk-WZJ5UQNM.js.map +1 -0
- package/build/modern/{chunk-F27AAKQ3.js → chunk-XNX3OTJK.js} +2 -2
- package/build/modern/components/Admonition.js +5 -5
- package/build/modern/components/Avatar.js +4 -4
- package/build/modern/components/Checkbox.js +4 -4
- package/build/modern/components/FileStatus.js +6 -6
- package/build/modern/components/FileUploader.js +5 -5
- package/build/modern/components/Input.js +4 -4
- package/build/modern/components/Notification.js +4 -4
- package/build/modern/components/NotificationDescription.js +1 -1
- package/build/modern/components/NotificationHeading.js +1 -1
- package/build/modern/components/ProgressBar.js +1 -1
- package/build/modern/components/Select.js +4 -4
- package/build/modern/components/Tag.js +4 -4
- package/build/modern/components/Text.js +7 -0
- package/build/modern/components/Text.js.map +1 -0
- package/build/modern/components/Toggle.js +4 -4
- package/build/modern/config/cerbIcons.js +2 -2
- package/build/modern/config/defineIcons.js +3 -3
- package/build/modern/config/icons/checkbox.icons.js +1 -1
- package/build/modern/context/confirm-modal.js +5 -5
- package/build/modern/context/cta-modal.js +5 -5
- package/build/modern/context/notification-center.js +7 -7
- package/build/modern/context/prompt-modal.js +6 -6
- package/build/modern/index.js +24 -20
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Notification.tsx +6 -3
- package/src/components/NotificationDescription.tsx +2 -2
- package/src/components/NotificationHeading.tsx +1 -2
- package/src/components/ProgressBar.tsx +1 -1
- package/src/components/Text.tsx +70 -0
- package/src/config/icons/checkbox.icons.tsx +2 -2
- package/src/context/confirm-modal.tsx +1 -1
- package/src/context/cta-modal.tsx +6 -7
- package/src/context/notification-center.tsx +1 -1
- package/src/context/prompt-modal.tsx +1 -1
- package/src/index.ts +1 -0
- package/build/modern/chunk-4QBPJVEN.js.map +0 -1
- package/build/modern/chunk-622N7YRT.js.map +0 -1
- package/build/modern/chunk-7SGPJM66.js.map +0 -1
- package/build/modern/chunk-C3CDRCHS.js.map +0 -1
- package/build/modern/chunk-CP7OUC2Q.js.map +0 -1
- package/build/modern/chunk-KCANMM64.js.map +0 -1
- package/build/modern/chunk-SXIXDXG3.js.map +0 -1
- package/build/modern/chunk-TM5AS6M6.js.map +0 -1
- package/build/modern/chunk-XEW6TJJ4.js.map +0 -1
- /package/build/modern/{chunk-XL4JREDT.js.map → chunk-3DGV4ESI.js.map} +0 -0
- /package/build/modern/{chunk-N4QTLDVM.js.map → chunk-67KLFLNR.js.map} +0 -0
- /package/build/modern/{chunk-SPZYPRZ6.js.map → chunk-C3HYHH3H.js.map} +0 -0
- /package/build/modern/{chunk-NMNONSHU.js.map → chunk-MRH2EO3L.js.map} +0 -0
- /package/build/modern/{chunk-W4DXACNV.js.map → chunk-OFAATLPF.js.map} +0 -0
- /package/build/modern/{chunk-NB6DV4VA.js.map → chunk-PGXJJDPH.js.map} +0 -0
- /package/build/modern/{chunk-7MM5KYEX.js.map → chunk-RET4YOBV.js.map} +0 -0
- /package/build/modern/{chunk-NKM6PISB.js.map → chunk-SVFZJYLV.js.map} +0 -0
- /package/build/modern/{chunk-VERRHMW4.js.map → chunk-UBN2CZLV.js.map} +0 -0
- /package/build/modern/{chunk-F72ZABKX.js.map → chunk-W3YI64C5.js.map} +0 -0
- /package/build/modern/{chunk-F27AAKQ3.js.map → chunk-XNX3OTJK.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -89,6 +89,7 @@ __export(src_exports, {
|
|
|
89
89
|
Tag: () => Tag,
|
|
90
90
|
Tbody: () => Tbody,
|
|
91
91
|
Td: () => Td,
|
|
92
|
+
Text: () => Text,
|
|
92
93
|
Textarea: () => Textarea,
|
|
93
94
|
Th: () => Th,
|
|
94
95
|
Thead: () => Thead,
|
|
@@ -2336,14 +2337,45 @@ var closableCss = (0, import_css40.css)({
|
|
|
2336
2337
|
paddingInlineEnd: "0"
|
|
2337
2338
|
});
|
|
2338
2339
|
|
|
2340
|
+
// src/components/Text.tsx
|
|
2341
|
+
var import_jsx = require("@cerberus-design/styled-system/jsx");
|
|
2342
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2343
|
+
function Text(props) {
|
|
2344
|
+
const { as = "p", ...pandaJSXProps } = props;
|
|
2345
|
+
switch (as) {
|
|
2346
|
+
case "h1":
|
|
2347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H1, { ...pandaJSXProps });
|
|
2348
|
+
case "h2":
|
|
2349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H2, { ...pandaJSXProps });
|
|
2350
|
+
case "h3":
|
|
2351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H3, { ...pandaJSXProps });
|
|
2352
|
+
case "h4":
|
|
2353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H4, { ...pandaJSXProps });
|
|
2354
|
+
case "h5":
|
|
2355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H5, { ...pandaJSXProps });
|
|
2356
|
+
case "h6":
|
|
2357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.H6, { ...pandaJSXProps });
|
|
2358
|
+
case "strong":
|
|
2359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Strong, { ...pandaJSXProps });
|
|
2360
|
+
case "em":
|
|
2361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Em, { ...pandaJSXProps });
|
|
2362
|
+
case "small":
|
|
2363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Small, { ...pandaJSXProps });
|
|
2364
|
+
case "span":
|
|
2365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.Span, { ...pandaJSXProps });
|
|
2366
|
+
default:
|
|
2367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx.P, { ...pandaJSXProps });
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2339
2371
|
// src/components/Textarea.tsx
|
|
2340
2372
|
var import_css41 = require("@cerberus/styled-system/css");
|
|
2341
2373
|
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2342
|
-
var
|
|
2374
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2343
2375
|
function Textarea(props) {
|
|
2344
2376
|
const { describedBy, ...nativeProps } = props;
|
|
2345
2377
|
const { invalid, ...fieldState } = useFieldContext();
|
|
2346
|
-
return /* @__PURE__ */ (0,
|
|
2378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2347
2379
|
"textarea",
|
|
2348
2380
|
{
|
|
2349
2381
|
...nativeProps,
|
|
@@ -2368,19 +2400,19 @@ function Textarea(props) {
|
|
|
2368
2400
|
var import_css42 = require("@cerberus/styled-system/css");
|
|
2369
2401
|
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
2370
2402
|
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
2371
|
-
var
|
|
2403
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2372
2404
|
function Toggle(props) {
|
|
2373
2405
|
const { size, describedBy, ...nativeProps } = props;
|
|
2374
2406
|
const styles = (0, import_recipes33.toggle)({ size });
|
|
2375
2407
|
const { invalid, ...state } = useFieldContext();
|
|
2376
2408
|
const Icon = $cerberusIcons.toggleChecked;
|
|
2377
|
-
return /* @__PURE__ */ (0,
|
|
2409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2378
2410
|
"span",
|
|
2379
2411
|
{
|
|
2380
2412
|
className: (0, import_css42.cx)("group", styles.track, (0, import_patterns15.hstack)()),
|
|
2381
2413
|
"data-checked": props.checked || props.defaultChecked,
|
|
2382
2414
|
children: [
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2384
2416
|
"input",
|
|
2385
2417
|
{
|
|
2386
2418
|
...nativeProps,
|
|
@@ -2392,7 +2424,7 @@ function Toggle(props) {
|
|
|
2392
2424
|
type: "checkbox"
|
|
2393
2425
|
}
|
|
2394
2426
|
),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2396
2428
|
"span",
|
|
2397
2429
|
{
|
|
2398
2430
|
className: (0, import_css42.cx)(
|
|
@@ -2401,7 +2433,7 @@ function Toggle(props) {
|
|
|
2401
2433
|
justify: "center"
|
|
2402
2434
|
})
|
|
2403
2435
|
),
|
|
2404
|
-
children: /* @__PURE__ */ (0,
|
|
2436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, {})
|
|
2405
2437
|
}
|
|
2406
2438
|
)
|
|
2407
2439
|
]
|
|
@@ -2413,22 +2445,22 @@ function Toggle(props) {
|
|
|
2413
2445
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
2414
2446
|
var import_css43 = require("@cerberus/styled-system/css");
|
|
2415
2447
|
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
2416
|
-
var
|
|
2448
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2417
2449
|
function Tooltip(props) {
|
|
2418
2450
|
const { content, children, asChild, ...nativeProps } = props;
|
|
2419
2451
|
const styles = (0, import_recipes34.tooltip)();
|
|
2420
2452
|
const position = {
|
|
2421
2453
|
placement: props.position || "top"
|
|
2422
2454
|
};
|
|
2423
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
2456
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
2426
2458
|
import_tooltip.Tooltip.Content,
|
|
2427
2459
|
{
|
|
2428
2460
|
...nativeProps,
|
|
2429
2461
|
className: (0, import_css43.cx)(nativeProps.className, styles.content),
|
|
2430
2462
|
children: [
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
2432
2464
|
content
|
|
2433
2465
|
]
|
|
2434
2466
|
}
|
|
@@ -2467,8 +2499,8 @@ function useModal() {
|
|
|
2467
2499
|
}
|
|
2468
2500
|
|
|
2469
2501
|
// src/context/confirm-modal.tsx
|
|
2470
|
-
var
|
|
2471
|
-
var
|
|
2502
|
+
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2503
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2472
2504
|
var ConfirmModalContext = (0, import_react19.createContext)(null);
|
|
2473
2505
|
function ConfirmModal(props) {
|
|
2474
2506
|
const { modalRef, show, close } = useModal();
|
|
@@ -2509,36 +2541,36 @@ function ConfirmModal(props) {
|
|
|
2509
2541
|
}),
|
|
2510
2542
|
[handleShow]
|
|
2511
2543
|
);
|
|
2512
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2513
2545
|
props.children,
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2515
|
-
/* @__PURE__ */ (0,
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2546
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx2.VStack, { gap: "xl", w: "full", children: [
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(ModalHeader, { children: [
|
|
2548
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2517
2549
|
"div",
|
|
2518
2550
|
{
|
|
2519
2551
|
className: (0, import_patterns16.hstack)({
|
|
2520
2552
|
justify: "center",
|
|
2521
2553
|
w: "full"
|
|
2522
2554
|
}),
|
|
2523
|
-
children: /* @__PURE__ */ (0,
|
|
2555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2524
2556
|
Show,
|
|
2525
2557
|
{
|
|
2526
2558
|
when: palette === "danger",
|
|
2527
|
-
fallback: /* @__PURE__ */ (0,
|
|
2559
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2528
2560
|
Avatar,
|
|
2529
2561
|
{
|
|
2530
2562
|
ariaLabel: "",
|
|
2531
2563
|
gradient: "charon-light",
|
|
2532
|
-
icon: /* @__PURE__ */ (0,
|
|
2564
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConfirmIcon, { size: 24 }),
|
|
2533
2565
|
src: ""
|
|
2534
2566
|
}
|
|
2535
2567
|
),
|
|
2536
|
-
children: /* @__PURE__ */ (0,
|
|
2568
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2537
2569
|
Avatar,
|
|
2538
2570
|
{
|
|
2539
2571
|
ariaLabel: "",
|
|
2540
2572
|
gradient: "hades-dark",
|
|
2541
|
-
icon: /* @__PURE__ */ (0,
|
|
2573
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConfirmIcon, { size: 24 }),
|
|
2542
2574
|
src: ""
|
|
2543
2575
|
}
|
|
2544
2576
|
)
|
|
@@ -2546,11 +2578,11 @@ function ConfirmModal(props) {
|
|
|
2546
2578
|
)
|
|
2547
2579
|
}
|
|
2548
2580
|
),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2551
2583
|
] }),
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx2.HStack, { gap: "4", w: "full", children: [
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2554
2586
|
Button,
|
|
2555
2587
|
{
|
|
2556
2588
|
autoFocus: true,
|
|
@@ -2564,7 +2596,7 @@ function ConfirmModal(props) {
|
|
|
2564
2596
|
children: content == null ? void 0 : content.actionText
|
|
2565
2597
|
}
|
|
2566
2598
|
),
|
|
2567
|
-
/* @__PURE__ */ (0,
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2568
2600
|
Button,
|
|
2569
2601
|
{
|
|
2570
2602
|
className: (0, import_css44.css)({
|
|
@@ -2593,10 +2625,10 @@ function useConfirmModal() {
|
|
|
2593
2625
|
|
|
2594
2626
|
// src/context/cta-modal.tsx
|
|
2595
2627
|
var import_react20 = require("react");
|
|
2596
|
-
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2597
|
-
var import_css45 = require("@cerberus/styled-system/css");
|
|
2598
2628
|
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
2599
|
-
var
|
|
2629
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
2630
|
+
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
2631
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2600
2632
|
var CTAModalContext = (0, import_react20.createContext)(null);
|
|
2601
2633
|
function CTAModal(props) {
|
|
2602
2634
|
var _a, _b;
|
|
@@ -2623,9 +2655,8 @@ function CTAModal(props) {
|
|
|
2623
2655
|
(event) => {
|
|
2624
2656
|
const index = event.currentTarget.getAttribute("data-index");
|
|
2625
2657
|
const action = content == null ? void 0 : content.actions[Number(index)];
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
}
|
|
2658
|
+
const { onClick } = action || {};
|
|
2659
|
+
onClick == null ? void 0 : onClick(event);
|
|
2629
2660
|
close();
|
|
2630
2661
|
},
|
|
2631
2662
|
[content, close]
|
|
@@ -2636,10 +2667,10 @@ function CTAModal(props) {
|
|
|
2636
2667
|
}),
|
|
2637
2668
|
[handleShow]
|
|
2638
2669
|
);
|
|
2639
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2640
2671
|
props.children,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2643
2674
|
"span",
|
|
2644
2675
|
{
|
|
2645
2676
|
className: (0, import_css45.css)({
|
|
@@ -2649,31 +2680,31 @@ function CTAModal(props) {
|
|
|
2649
2680
|
top: 0,
|
|
2650
2681
|
zIndex: "decorator"
|
|
2651
2682
|
}),
|
|
2652
|
-
children: /* @__PURE__ */ (0,
|
|
2683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseIcon, {}) })
|
|
2653
2684
|
}
|
|
2654
2685
|
),
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2686
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
|
|
2687
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2658
2689
|
Avatar,
|
|
2659
2690
|
{
|
|
2660
2691
|
ariaLabel: "",
|
|
2661
2692
|
gradient: "charon-light",
|
|
2662
|
-
icon: /* @__PURE__ */ (0,
|
|
2693
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2663
2694
|
Show,
|
|
2664
2695
|
{
|
|
2665
2696
|
when: Boolean(confirmIcon),
|
|
2666
|
-
fallback: /* @__PURE__ */ (0,
|
|
2697
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FallbackIcon, { size: 24 }),
|
|
2667
2698
|
children: confirmIcon
|
|
2668
2699
|
}
|
|
2669
2700
|
),
|
|
2670
2701
|
src: ""
|
|
2671
2702
|
}
|
|
2672
2703
|
),
|
|
2673
|
-
/* @__PURE__ */ (0,
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
2704
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2675
2706
|
] }) }),
|
|
2676
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx3.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Show, { when: Boolean((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.length), children: (_b = content == null ? void 0 : content.actions) == null ? void 0 : _b.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2677
2708
|
Button,
|
|
2678
2709
|
{
|
|
2679
2710
|
"data-index": index,
|
|
@@ -2704,7 +2735,7 @@ var import_react21 = require("react");
|
|
|
2704
2735
|
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2705
2736
|
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
2706
2737
|
var import_css46 = require("@cerberus/styled-system/css");
|
|
2707
|
-
var
|
|
2738
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2708
2739
|
var NotificationsContext = (0, import_react21.createContext)(null);
|
|
2709
2740
|
function NotificationCenter(props) {
|
|
2710
2741
|
const [activeNotifications, setActiveNotifications] = (0, import_react21.useState)([]);
|
|
@@ -2737,10 +2768,10 @@ function NotificationCenter(props) {
|
|
|
2737
2768
|
}),
|
|
2738
2769
|
[handleNotify]
|
|
2739
2770
|
);
|
|
2740
|
-
return /* @__PURE__ */ (0,
|
|
2771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2741
2772
|
props.children,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2743
|
-
/* @__PURE__ */ (0,
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: styles.center, children: [
|
|
2774
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2744
2775
|
Button,
|
|
2745
2776
|
{
|
|
2746
2777
|
className: (0, import_css46.cx)(styles.closeAll, (0, import_patterns17.animateIn)()),
|
|
@@ -2752,7 +2783,7 @@ function NotificationCenter(props) {
|
|
|
2752
2783
|
children: "Close all"
|
|
2753
2784
|
}
|
|
2754
2785
|
) }),
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2786
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2756
2787
|
"div",
|
|
2757
2788
|
{
|
|
2758
2789
|
className: (0, import_patterns17.vstack)({
|
|
@@ -2762,7 +2793,7 @@ function NotificationCenter(props) {
|
|
|
2762
2793
|
style: {
|
|
2763
2794
|
alignItems: "flex-end"
|
|
2764
2795
|
},
|
|
2765
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
2796
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2766
2797
|
MatchNotification,
|
|
2767
2798
|
{
|
|
2768
2799
|
...option,
|
|
@@ -2779,7 +2810,7 @@ function MatchNotification(props) {
|
|
|
2779
2810
|
const { palette, id, onClose, heading, description } = props;
|
|
2780
2811
|
switch (palette) {
|
|
2781
2812
|
case "success":
|
|
2782
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
2783
2814
|
Notification,
|
|
2784
2815
|
{
|
|
2785
2816
|
id,
|
|
@@ -2787,14 +2818,14 @@ function MatchNotification(props) {
|
|
|
2787
2818
|
open: true,
|
|
2788
2819
|
palette: "success",
|
|
2789
2820
|
children: [
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2791
|
-
/* @__PURE__ */ (0,
|
|
2821
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2792
2823
|
]
|
|
2793
2824
|
},
|
|
2794
2825
|
id
|
|
2795
2826
|
);
|
|
2796
2827
|
case "warning":
|
|
2797
|
-
return /* @__PURE__ */ (0,
|
|
2828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
2798
2829
|
Notification,
|
|
2799
2830
|
{
|
|
2800
2831
|
id,
|
|
@@ -2802,22 +2833,22 @@ function MatchNotification(props) {
|
|
|
2802
2833
|
open: true,
|
|
2803
2834
|
palette: "warning",
|
|
2804
2835
|
children: [
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2807
2838
|
]
|
|
2808
2839
|
},
|
|
2809
2840
|
id
|
|
2810
2841
|
);
|
|
2811
2842
|
case "danger":
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
2843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
2845
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2815
2846
|
] }, id);
|
|
2816
2847
|
case "info":
|
|
2817
2848
|
default:
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2821
2852
|
] }, id);
|
|
2822
2853
|
}
|
|
2823
2854
|
}
|
|
@@ -2835,7 +2866,7 @@ function useNotificationCenter() {
|
|
|
2835
2866
|
var import_react22 = require("react");
|
|
2836
2867
|
var import_css47 = require("@cerberus/styled-system/css");
|
|
2837
2868
|
var import_patterns18 = require("@cerberus/styled-system/patterns");
|
|
2838
|
-
var
|
|
2869
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2839
2870
|
var PromptModalContext = (0, import_react22.createContext)(null);
|
|
2840
2871
|
function PromptModal(props) {
|
|
2841
2872
|
const { modalRef, show, close } = useModal();
|
|
@@ -2885,36 +2916,36 @@ function PromptModal(props) {
|
|
|
2885
2916
|
}),
|
|
2886
2917
|
[handleShow]
|
|
2887
2918
|
);
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
2919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2889
2920
|
props.children,
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2891
|
-
/* @__PURE__ */ (0,
|
|
2892
|
-
/* @__PURE__ */ (0,
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ModalHeader, { children: [
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2893
2924
|
"div",
|
|
2894
2925
|
{
|
|
2895
2926
|
className: (0, import_patterns18.hstack)({
|
|
2896
2927
|
justify: "center",
|
|
2897
2928
|
w: "full"
|
|
2898
2929
|
}),
|
|
2899
|
-
children: /* @__PURE__ */ (0,
|
|
2930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2900
2931
|
Show,
|
|
2901
2932
|
{
|
|
2902
2933
|
when: palette === "danger",
|
|
2903
|
-
fallback: /* @__PURE__ */ (0,
|
|
2934
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2904
2935
|
Avatar,
|
|
2905
2936
|
{
|
|
2906
2937
|
ariaLabel: "",
|
|
2907
2938
|
gradient: "charon-light",
|
|
2908
|
-
icon: /* @__PURE__ */ (0,
|
|
2939
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PromptIcon, { size: 24 }),
|
|
2909
2940
|
src: ""
|
|
2910
2941
|
}
|
|
2911
2942
|
),
|
|
2912
|
-
children: /* @__PURE__ */ (0,
|
|
2943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2913
2944
|
Avatar,
|
|
2914
2945
|
{
|
|
2915
2946
|
ariaLabel: "",
|
|
2916
2947
|
gradient: "hades-dark",
|
|
2917
|
-
icon: /* @__PURE__ */ (0,
|
|
2948
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PromptIcon, { size: 24 }),
|
|
2918
2949
|
src: ""
|
|
2919
2950
|
}
|
|
2920
2951
|
)
|
|
@@ -2922,10 +2953,10 @@ function PromptModal(props) {
|
|
|
2922
2953
|
)
|
|
2923
2954
|
}
|
|
2924
2955
|
),
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
2926
|
-
/* @__PURE__ */ (0,
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2927
2958
|
] }),
|
|
2928
|
-
/* @__PURE__ */ (0,
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2929
2960
|
"div",
|
|
2930
2961
|
{
|
|
2931
2962
|
className: (0, import_patterns18.vstack)({
|
|
@@ -2933,8 +2964,8 @@ function PromptModal(props) {
|
|
|
2933
2964
|
mt: "4",
|
|
2934
2965
|
mb: "8"
|
|
2935
2966
|
}),
|
|
2936
|
-
children: /* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
2967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Field, { invalid: !isValid, children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
2938
2969
|
Label,
|
|
2939
2970
|
{
|
|
2940
2971
|
className: (0, import_css47.css)({
|
|
@@ -2945,7 +2976,7 @@ function PromptModal(props) {
|
|
|
2945
2976
|
size: "md",
|
|
2946
2977
|
children: [
|
|
2947
2978
|
"Type",
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2949
2980
|
"strong",
|
|
2950
2981
|
{
|
|
2951
2982
|
className: (0, import_css47.css)({
|
|
@@ -2958,7 +2989,7 @@ function PromptModal(props) {
|
|
|
2958
2989
|
]
|
|
2959
2990
|
}
|
|
2960
2991
|
),
|
|
2961
|
-
/* @__PURE__ */ (0,
|
|
2992
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2962
2993
|
Input,
|
|
2963
2994
|
{
|
|
2964
2995
|
id: "confirm",
|
|
@@ -2970,7 +3001,7 @@ function PromptModal(props) {
|
|
|
2970
3001
|
] })
|
|
2971
3002
|
}
|
|
2972
3003
|
),
|
|
2973
|
-
/* @__PURE__ */ (0,
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
2974
3005
|
"div",
|
|
2975
3006
|
{
|
|
2976
3007
|
className: (0, import_patterns18.hstack)({
|
|
@@ -2978,7 +3009,7 @@ function PromptModal(props) {
|
|
|
2978
3009
|
gap: "4"
|
|
2979
3010
|
}),
|
|
2980
3011
|
children: [
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
3012
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2982
3013
|
Button,
|
|
2983
3014
|
{
|
|
2984
3015
|
autoFocus: true,
|
|
@@ -2993,7 +3024,7 @@ function PromptModal(props) {
|
|
|
2993
3024
|
children: content == null ? void 0 : content.actionText
|
|
2994
3025
|
}
|
|
2995
3026
|
),
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3027
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2997
3028
|
Button,
|
|
2998
3029
|
{
|
|
2999
3030
|
className: (0, import_css47.css)({
|
|
@@ -3087,7 +3118,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3087
3118
|
}
|
|
3088
3119
|
|
|
3089
3120
|
// src/context/theme.tsx
|
|
3090
|
-
var
|
|
3121
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3091
3122
|
var ThemeContext = (0, import_react24.createContext)(
|
|
3092
3123
|
null
|
|
3093
3124
|
);
|
|
@@ -3097,7 +3128,7 @@ function ThemeProvider(props) {
|
|
|
3097
3128
|
updateMode: props.updateMode,
|
|
3098
3129
|
updateTheme: props.updateTheme
|
|
3099
3130
|
});
|
|
3100
|
-
return /* @__PURE__ */ (0,
|
|
3131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
3101
3132
|
}
|
|
3102
3133
|
function useThemeContext() {
|
|
3103
3134
|
const context = (0, import_react24.useContext)(ThemeContext);
|
|
@@ -3325,6 +3356,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3325
3356
|
Tag,
|
|
3326
3357
|
Tbody,
|
|
3327
3358
|
Td,
|
|
3359
|
+
Text,
|
|
3328
3360
|
Textarea,
|
|
3329
3361
|
Th,
|
|
3330
3362
|
Thead,
|