@cerberus-design/react 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/_tsup-dts-rollup.d.cts +244 -33
- package/build/legacy/components/Admonition.cjs +1 -1
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs +1 -1
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +1 -1
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/FileStatus.cjs +1 -1
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +1 -1
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +1 -1
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Menu.cjs +82 -0
- package/build/legacy/components/Menu.cjs.map +1 -0
- package/build/legacy/components/ModalHeader.cjs +2 -1
- package/build/legacy/components/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/NavMenuLink.cjs.map +1 -1
- package/build/legacy/components/NavMenuList.cjs.map +1 -1
- package/build/legacy/components/NavMenuTrigger.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +3 -3
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +1 -1
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +3 -3
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Tbody.cjs.map +1 -1
- package/build/legacy/components/Td.cjs.map +1 -1
- package/build/legacy/components/Th.cjs +1 -0
- package/build/legacy/components/Th.cjs.map +1 -1
- package/build/legacy/components/Thead.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +1 -1
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +1 -1
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +1 -1
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +3 -2
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +567 -0
- package/build/legacy/context/cta-modal.cjs.map +1 -0
- package/build/legacy/context/navMenu.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +3 -3
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +3 -2
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +501 -324
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/utils/index.cjs +34 -0
- package/build/legacy/utils/index.cjs.map +1 -0
- package/build/modern/_tsup-dts-rollup.d.ts +244 -33
- package/build/modern/{chunk-HPM2XRWT.js → chunk-3R4TIF2X.js} +1 -1
- package/build/modern/{chunk-HPM2XRWT.js.map → chunk-3R4TIF2X.js.map} +1 -1
- package/build/modern/{chunk-RDQHHCFR.js → chunk-5OSUZUR4.js} +2 -2
- package/build/modern/{chunk-O75QAT4Z.js → chunk-6WS765J3.js} +1 -1
- package/build/modern/chunk-6WS765J3.js.map +1 -0
- package/build/modern/{chunk-KLUBAM4U.js → chunk-7SGPJM66.js} +4 -4
- package/build/modern/chunk-7SGPJM66.js.map +1 -0
- package/build/modern/{chunk-X4Y4WTRU.js → chunk-CSEHDNMJ.js} +7 -7
- package/build/modern/{chunk-TMR7JGMP.js → chunk-F27AAKQ3.js} +3 -3
- package/build/modern/chunk-F27AAKQ3.js.map +1 -0
- package/build/modern/{chunk-243VUIA6.js → chunk-F72ZABKX.js} +2 -2
- package/build/modern/chunk-F72ZABKX.js.map +1 -0
- package/build/modern/{chunk-KF6V5JLW.js → chunk-N4QTLDVM.js} +3 -3
- package/build/modern/{chunk-MDIUFBDX.js → chunk-NB6DV4VA.js} +2 -2
- package/build/modern/{chunk-UJKS4DDN.js → chunk-NKM6PISB.js} +2 -2
- package/build/modern/{chunk-YWCTMLLO.js → chunk-NMNONSHU.js} +2 -2
- package/build/modern/{chunk-OWKN5IV7.js → chunk-PM7CWT3N.js} +2 -2
- package/build/modern/chunk-PM7CWT3N.js.map +1 -0
- package/build/modern/chunk-RUR5MV54.js +52 -0
- package/build/modern/chunk-RUR5MV54.js.map +1 -0
- package/build/modern/{chunk-CO4BKT7K.js → chunk-SGKHA4EB.js} +1 -1
- package/build/modern/chunk-SGKHA4EB.js.map +1 -0
- package/build/modern/{chunk-ZX6DBC2Z.js → chunk-SPZYPRZ6.js} +2 -2
- package/build/modern/chunk-T6LS5P5W.js +155 -0
- package/build/modern/chunk-T6LS5P5W.js.map +1 -0
- package/build/modern/chunk-UTGEFJ3L.js +10 -0
- package/build/modern/chunk-UTGEFJ3L.js.map +1 -0
- package/build/modern/{chunk-5V5MBSM3.js → chunk-UZVQ4INR.js} +2 -2
- package/build/modern/chunk-UZVQ4INR.js.map +1 -0
- package/build/modern/{chunk-FT7DFRHQ.js → chunk-VERRHMW4.js} +2 -2
- package/build/modern/{chunk-3NE6C66J.js → chunk-VP5ERLAY.js} +8 -8
- package/build/modern/{chunk-HCB5NQ5J.js → chunk-W4DXACNV.js} +3 -3
- package/build/modern/{chunk-KBBASJIY.js → chunk-WPVDQRRF.js} +1 -1
- package/build/modern/chunk-WPVDQRRF.js.map +1 -0
- package/build/modern/{chunk-PA5EB7EO.js → chunk-XL4JREDT.js} +2 -2
- package/build/modern/{chunk-PKY46RRA.js → chunk-Y6QQCRQV.js} +1 -1
- package/build/modern/{chunk-PKY46RRA.js.map → chunk-Y6QQCRQV.js.map} +1 -1
- package/build/modern/{chunk-YMJMB6OP.js → chunk-ZBMA5G54.js} +6 -6
- package/build/modern/{chunk-ULYQLKWA.js → chunk-ZFAIE47A.js} +3 -2
- package/build/modern/{chunk-ULYQLKWA.js.map → chunk-ZFAIE47A.js.map} +1 -1
- package/build/modern/{chunk-PKQTTFWA.js → chunk-ZR37P4NZ.js} +1 -1
- package/build/modern/{chunk-PKQTTFWA.js.map → chunk-ZR37P4NZ.js.map} +1 -1
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +3 -3
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/FileStatus.js +5 -5
- package/build/modern/components/FileUploader.js +4 -4
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Menu.js +19 -0
- package/build/modern/components/Menu.js.map +1 -0
- package/build/modern/components/ModalHeader.js +1 -1
- package/build/modern/components/NavMenuLink.js +1 -1
- package/build/modern/components/NavMenuList.js +2 -2
- package/build/modern/components/NavMenuTrigger.js +2 -2
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Tbody.js +1 -1
- package/build/modern/components/Td.js +1 -1
- package/build/modern/components/Th.js +2 -1
- package/build/modern/components/Thead.js +1 -1
- package/build/modern/components/Toggle.js +3 -3
- package/build/modern/config/cerbIcons.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/context/confirm-modal.js +6 -6
- package/build/modern/context/cta-modal.js +25 -0
- package/build/modern/context/cta-modal.js.map +1 -0
- package/build/modern/context/navMenu.js +1 -1
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +7 -7
- package/build/modern/index.js +72 -46
- package/build/modern/index.js.map +1 -1
- package/build/modern/utils/index.js +7 -0
- package/build/modern/utils/index.js.map +1 -0
- package/package.json +3 -2
- package/src/components/Menu.tsx +244 -0
- package/src/components/ModalHeader.tsx +1 -0
- package/src/components/NavMenuLink.tsx +1 -11
- package/src/components/NavMenuList.tsx +1 -3
- package/src/components/NavMenuTrigger.tsx +1 -10
- package/src/components/Notification.tsx +2 -2
- package/src/components/Tag.tsx +8 -4
- package/src/components/Tbody.tsx +1 -2
- package/src/components/Td.tsx +1 -2
- package/src/components/Th.tsx +4 -2
- package/src/components/Thead.tsx +1 -2
- package/src/config/cerbIcons.ts +2 -2
- package/src/context/cta-modal.tsx +210 -0
- package/src/context/navMenu.tsx +1 -2
- package/src/index.ts +3 -0
- package/src/utils/index.ts +19 -0
- package/build/modern/chunk-243VUIA6.js.map +0 -1
- package/build/modern/chunk-5V5MBSM3.js.map +0 -1
- package/build/modern/chunk-CO4BKT7K.js.map +0 -1
- package/build/modern/chunk-KBBASJIY.js.map +0 -1
- package/build/modern/chunk-KLUBAM4U.js.map +0 -1
- package/build/modern/chunk-O75QAT4Z.js.map +0 -1
- package/build/modern/chunk-OWKN5IV7.js.map +0 -1
- package/build/modern/chunk-TMR7JGMP.js.map +0 -1
- /package/build/modern/{chunk-RDQHHCFR.js.map → chunk-5OSUZUR4.js.map} +0 -0
- /package/build/modern/{chunk-X4Y4WTRU.js.map → chunk-CSEHDNMJ.js.map} +0 -0
- /package/build/modern/{chunk-KF6V5JLW.js.map → chunk-N4QTLDVM.js.map} +0 -0
- /package/build/modern/{chunk-MDIUFBDX.js.map → chunk-NB6DV4VA.js.map} +0 -0
- /package/build/modern/{chunk-UJKS4DDN.js.map → chunk-NKM6PISB.js.map} +0 -0
- /package/build/modern/{chunk-YWCTMLLO.js.map → chunk-NMNONSHU.js.map} +0 -0
- /package/build/modern/{chunk-ZX6DBC2Z.js.map → chunk-SPZYPRZ6.js.map} +0 -0
- /package/build/modern/{chunk-FT7DFRHQ.js.map → chunk-VERRHMW4.js.map} +0 -0
- /package/build/modern/{chunk-3NE6C66J.js.map → chunk-VP5ERLAY.js.map} +0 -0
- /package/build/modern/{chunk-HCB5NQ5J.js.map → chunk-W4DXACNV.js.map} +0 -0
- /package/build/modern/{chunk-PA5EB7EO.js.map → chunk-XL4JREDT.js.map} +0 -0
- /package/build/modern/{chunk-YMJMB6OP.js.map → chunk-ZBMA5G54.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(src_exports, {
|
|
|
27
27
|
AdmonitionHeading: () => AdmonitionHeading,
|
|
28
28
|
Avatar: () => Avatar,
|
|
29
29
|
Button: () => Button,
|
|
30
|
+
CTAModal: () => CTAModal,
|
|
30
31
|
Checkbox: () => Checkbox,
|
|
31
32
|
CircularProgress: () => CircularProgress,
|
|
32
33
|
ConfirmModal: () => ConfirmModal,
|
|
@@ -44,6 +45,13 @@ __export(src_exports, {
|
|
|
44
45
|
Label: () => Label,
|
|
45
46
|
Legend: () => Legend,
|
|
46
47
|
MODE_KEY: () => MODE_KEY,
|
|
48
|
+
Menu: () => Menu,
|
|
49
|
+
MenuContent: () => MenuContent,
|
|
50
|
+
MenuGroupLabel: () => MenuGroupLabel,
|
|
51
|
+
MenuItem: () => MenuItem,
|
|
52
|
+
MenuItemGroup: () => MenuItemGroup,
|
|
53
|
+
MenuSeparator: () => MenuSeparator,
|
|
54
|
+
MenuTrigger: () => MenuTrigger,
|
|
47
55
|
Modal: () => Modal,
|
|
48
56
|
ModalDescription: () => ModalDescription,
|
|
49
57
|
ModalHeader: () => ModalHeader,
|
|
@@ -82,9 +90,11 @@ __export(src_exports, {
|
|
|
82
90
|
Tr: () => Tr,
|
|
83
91
|
createNavTriggerProps: () => createNavTriggerProps,
|
|
84
92
|
defineIcons: () => defineIcons,
|
|
93
|
+
formatNotifyCount: () => formatNotifyCount,
|
|
85
94
|
getPosition: () => getPosition,
|
|
86
95
|
processStatus: () => processStatus,
|
|
87
96
|
trapFocus: () => trapFocus,
|
|
97
|
+
useCTAModal: () => useCTAModal,
|
|
88
98
|
useConfirmModal: () => useConfirmModal,
|
|
89
99
|
useFeatureFlags: () => useFeatureFlags,
|
|
90
100
|
useFieldContext: () => useFieldContext,
|
|
@@ -245,7 +255,7 @@ function AnimatingUploadIcon(props) {
|
|
|
245
255
|
var defaultIcons = {
|
|
246
256
|
avatar: import_icons.UserFilled,
|
|
247
257
|
checkbox: CheckmarkIcon,
|
|
248
|
-
close: import_icons.
|
|
258
|
+
close: import_icons.Close,
|
|
249
259
|
confirmModal: import_icons.Information,
|
|
250
260
|
delete: import_icons.TrashCan,
|
|
251
261
|
promptModal: import_icons.Information,
|
|
@@ -1272,38 +1282,81 @@ function Legend(props) {
|
|
|
1272
1282
|
);
|
|
1273
1283
|
}
|
|
1274
1284
|
|
|
1275
|
-
// src/components/
|
|
1276
|
-
var
|
|
1285
|
+
// src/components/Menu.tsx
|
|
1286
|
+
var import_react6 = require("@ark-ui/react");
|
|
1277
1287
|
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1278
|
-
var
|
|
1288
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1279
1289
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1280
|
-
|
|
1290
|
+
var menuStyles = (0, import_recipes14.menu)();
|
|
1291
|
+
var Menu = import_react6.Menu.Root;
|
|
1292
|
+
function MenuTrigger(props) {
|
|
1293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react6.Menu.Trigger, { ...props, asChild: true });
|
|
1294
|
+
}
|
|
1295
|
+
function MenuContent(props) {
|
|
1296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react6.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1297
|
+
import_react6.Menu.Content,
|
|
1298
|
+
{
|
|
1299
|
+
...props,
|
|
1300
|
+
className: (0, import_css16.cx)(props.className, menuStyles.content)
|
|
1301
|
+
}
|
|
1302
|
+
) });
|
|
1303
|
+
}
|
|
1304
|
+
function MenuItem(props) {
|
|
1305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react6.Menu.Item, { ...props, className: (0, import_css16.cx)(props.className, menuStyles.item) });
|
|
1306
|
+
}
|
|
1307
|
+
var MenuItemGroup = import_react6.Menu.ItemGroup;
|
|
1308
|
+
function MenuGroupLabel(props) {
|
|
1281
1309
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1310
|
+
import_react6.Menu.ItemGroupLabel,
|
|
1311
|
+
{
|
|
1312
|
+
...props,
|
|
1313
|
+
className: (0, import_css16.cx)(props.className, menuStyles.itemGroupLabel)
|
|
1314
|
+
}
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
function MenuSeparator(props) {
|
|
1318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1319
|
+
import_react6.Menu.Separator,
|
|
1320
|
+
{
|
|
1321
|
+
...props,
|
|
1322
|
+
className: (0, import_css16.cx)(props.className, menuStyles.separator)
|
|
1323
|
+
}
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
// src/components/Modal.tsx
|
|
1328
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1329
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1330
|
+
var import_react7 = require("react");
|
|
1331
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1332
|
+
function ModalEl(props, ref) {
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1282
1334
|
"dialog",
|
|
1283
1335
|
{
|
|
1284
1336
|
...props,
|
|
1285
|
-
className: (0,
|
|
1337
|
+
className: (0, import_css17.cx)(props.className, (0, import_recipes15.modal)().dialog),
|
|
1286
1338
|
ref
|
|
1287
1339
|
}
|
|
1288
1340
|
);
|
|
1289
1341
|
}
|
|
1290
|
-
var Modal = (0,
|
|
1342
|
+
var Modal = (0, import_react7.forwardRef)(ModalEl);
|
|
1291
1343
|
|
|
1292
1344
|
// src/components/ModalHeader.tsx
|
|
1293
|
-
var
|
|
1345
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1294
1346
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1295
|
-
var
|
|
1347
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1296
1348
|
function ModalHeader(props) {
|
|
1297
|
-
return /* @__PURE__ */ (0,
|
|
1349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1298
1350
|
"div",
|
|
1299
1351
|
{
|
|
1300
1352
|
...props,
|
|
1301
|
-
className: (0,
|
|
1353
|
+
className: (0, import_css18.cx)(
|
|
1302
1354
|
props.className,
|
|
1303
1355
|
(0, import_patterns9.vstack)({
|
|
1304
1356
|
alignItems: "flex-start",
|
|
1305
1357
|
gap: "md",
|
|
1306
|
-
mb: "md"
|
|
1358
|
+
mb: "md",
|
|
1359
|
+
position: "relative"
|
|
1307
1360
|
})
|
|
1308
1361
|
)
|
|
1309
1362
|
}
|
|
@@ -1311,25 +1364,25 @@ function ModalHeader(props) {
|
|
|
1311
1364
|
}
|
|
1312
1365
|
|
|
1313
1366
|
// src/components/ModalHeading.tsx
|
|
1314
|
-
var
|
|
1315
|
-
var
|
|
1316
|
-
var
|
|
1367
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1368
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1369
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1317
1370
|
function ModalHeading(props) {
|
|
1318
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { ...props, className: (0, import_css19.cx)(props.className, (0, import_recipes16.modal)().heading) });
|
|
1319
1372
|
}
|
|
1320
1373
|
|
|
1321
1374
|
// src/components/ModalDescription.tsx
|
|
1322
|
-
var
|
|
1323
|
-
var
|
|
1324
|
-
var
|
|
1375
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1376
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1377
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1325
1378
|
function ModalDescription(props) {
|
|
1326
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { ...props, className: (0, import_css20.cx)(props.className, (0, import_recipes17.modal)().description) });
|
|
1327
1380
|
}
|
|
1328
1381
|
|
|
1329
1382
|
// src/components/NavMenuTrigger.tsx
|
|
1330
|
-
var
|
|
1331
|
-
var
|
|
1332
|
-
var
|
|
1383
|
+
var import_react9 = require("react");
|
|
1384
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1385
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1333
1386
|
|
|
1334
1387
|
// src/aria-helpers/nav-menu.aria.ts
|
|
1335
1388
|
function createNavTriggerProps(values) {
|
|
@@ -1340,18 +1393,18 @@ function createNavTriggerProps(values) {
|
|
|
1340
1393
|
}
|
|
1341
1394
|
|
|
1342
1395
|
// src/context/navMenu.tsx
|
|
1343
|
-
var
|
|
1344
|
-
var
|
|
1345
|
-
var
|
|
1346
|
-
var NavMenuContext = (0,
|
|
1396
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1397
|
+
var import_react8 = require("react");
|
|
1398
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1399
|
+
var NavMenuContext = (0, import_react8.createContext)(null);
|
|
1347
1400
|
function NavMenu(props) {
|
|
1348
|
-
const triggerRef = (0,
|
|
1349
|
-
const menuRef = (0,
|
|
1350
|
-
const [expanded, setExpanded] = (0,
|
|
1351
|
-
const handleToggle = (0,
|
|
1401
|
+
const triggerRef = (0, import_react8.useRef)(null);
|
|
1402
|
+
const menuRef = (0, import_react8.useRef)(null);
|
|
1403
|
+
const [expanded, setExpanded] = (0, import_react8.useState)(false);
|
|
1404
|
+
const handleToggle = (0, import_react8.useCallback)(() => {
|
|
1352
1405
|
setExpanded((prev) => !prev);
|
|
1353
1406
|
}, []);
|
|
1354
|
-
const value = (0,
|
|
1407
|
+
const value = (0, import_react8.useMemo)(
|
|
1355
1408
|
() => ({
|
|
1356
1409
|
triggerRef,
|
|
1357
1410
|
menuRef,
|
|
@@ -1360,10 +1413,10 @@ function NavMenu(props) {
|
|
|
1360
1413
|
}),
|
|
1361
1414
|
[expanded, handleToggle]
|
|
1362
1415
|
);
|
|
1363
|
-
return /* @__PURE__ */ (0,
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1364
1417
|
"nav",
|
|
1365
1418
|
{
|
|
1366
|
-
className: (0,
|
|
1419
|
+
className: (0, import_css21.css)({
|
|
1367
1420
|
position: "relative"
|
|
1368
1421
|
}),
|
|
1369
1422
|
children: props.children
|
|
@@ -1371,7 +1424,7 @@ function NavMenu(props) {
|
|
|
1371
1424
|
) });
|
|
1372
1425
|
}
|
|
1373
1426
|
function useNavMenuContext() {
|
|
1374
|
-
const context = (0,
|
|
1427
|
+
const context = (0, import_react8.useContext)(NavMenuContext);
|
|
1375
1428
|
if (!context) {
|
|
1376
1429
|
throw new Error("useNavMenuContext must be used within a NavMenu.");
|
|
1377
1430
|
}
|
|
@@ -1379,7 +1432,7 @@ function useNavMenuContext() {
|
|
|
1379
1432
|
}
|
|
1380
1433
|
|
|
1381
1434
|
// src/components/NavMenuTrigger.tsx
|
|
1382
|
-
var
|
|
1435
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1383
1436
|
function NavMenuTrigger(props) {
|
|
1384
1437
|
const {
|
|
1385
1438
|
as,
|
|
@@ -1398,25 +1451,25 @@ function NavMenuTrigger(props) {
|
|
|
1398
1451
|
});
|
|
1399
1452
|
const hasAs = Boolean(as);
|
|
1400
1453
|
const AsSub = as;
|
|
1401
|
-
const handleClick = (0,
|
|
1454
|
+
const handleClick = (0, import_react9.useCallback)(
|
|
1402
1455
|
(e) => {
|
|
1403
1456
|
if (onClick) return onClick(e);
|
|
1404
1457
|
onToggle();
|
|
1405
1458
|
},
|
|
1406
1459
|
[onClick, onToggle]
|
|
1407
1460
|
);
|
|
1408
|
-
return /* @__PURE__ */ (0,
|
|
1461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1409
1462
|
Show,
|
|
1410
1463
|
{
|
|
1411
1464
|
when: hasAs,
|
|
1412
|
-
fallback: /* @__PURE__ */ (0,
|
|
1465
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1413
1466
|
"button",
|
|
1414
1467
|
{
|
|
1415
1468
|
...nativeProps,
|
|
1416
1469
|
...ariaProps,
|
|
1417
|
-
className: (0,
|
|
1470
|
+
className: (0, import_css22.cx)(
|
|
1418
1471
|
nativeProps.className,
|
|
1419
|
-
(0,
|
|
1472
|
+
(0, import_recipes18.button)({
|
|
1420
1473
|
palette,
|
|
1421
1474
|
usage,
|
|
1422
1475
|
shape
|
|
@@ -1427,7 +1480,7 @@ function NavMenuTrigger(props) {
|
|
|
1427
1480
|
children: props.children
|
|
1428
1481
|
}
|
|
1429
1482
|
),
|
|
1430
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1483
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1431
1484
|
AsSub,
|
|
1432
1485
|
{
|
|
1433
1486
|
...nativeProps,
|
|
@@ -1441,10 +1494,10 @@ function NavMenuTrigger(props) {
|
|
|
1441
1494
|
}
|
|
1442
1495
|
|
|
1443
1496
|
// src/components/NavMenuList.tsx
|
|
1444
|
-
var
|
|
1445
|
-
var
|
|
1497
|
+
var import_react10 = require("react");
|
|
1498
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1446
1499
|
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1447
|
-
var
|
|
1500
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1448
1501
|
function getPosition(position) {
|
|
1449
1502
|
const defaultPositions = {
|
|
1450
1503
|
left: "auto",
|
|
@@ -1498,16 +1551,16 @@ var navListStyles = (0, import_patterns10.vstack)({
|
|
|
1498
1551
|
function NavMenuList(props) {
|
|
1499
1552
|
const { position, ...nativeProps } = props;
|
|
1500
1553
|
const { menuRef, expanded } = useNavMenuContext();
|
|
1501
|
-
const locationStyles = (0,
|
|
1554
|
+
const locationStyles = (0, import_react10.useMemo)(
|
|
1502
1555
|
() => getPosition(position ?? "bottom"),
|
|
1503
1556
|
[position]
|
|
1504
1557
|
);
|
|
1505
|
-
return /* @__PURE__ */ (0,
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1506
1559
|
"ul",
|
|
1507
1560
|
{
|
|
1508
1561
|
...nativeProps,
|
|
1509
1562
|
"data-position": position ?? "bottom",
|
|
1510
|
-
className: (0,
|
|
1563
|
+
className: (0, import_css23.cx)(nativeProps.className, navListStyles),
|
|
1511
1564
|
ref: menuRef,
|
|
1512
1565
|
style: locationStyles
|
|
1513
1566
|
}
|
|
@@ -1515,29 +1568,29 @@ function NavMenuList(props) {
|
|
|
1515
1568
|
}
|
|
1516
1569
|
|
|
1517
1570
|
// src/components/NavMenuLink.tsx
|
|
1518
|
-
var
|
|
1519
|
-
var
|
|
1571
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1572
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1520
1573
|
function NavMenuLink(props) {
|
|
1521
1574
|
const { as, ...nativeProps } = props;
|
|
1522
1575
|
const hasAs = Boolean(as);
|
|
1523
1576
|
const AsSub = as;
|
|
1524
|
-
return /* @__PURE__ */ (0,
|
|
1577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1525
1578
|
"li",
|
|
1526
1579
|
{
|
|
1527
|
-
className: (0,
|
|
1580
|
+
className: (0, import_css24.css)({
|
|
1528
1581
|
w: "full"
|
|
1529
1582
|
}),
|
|
1530
|
-
children: /* @__PURE__ */ (0,
|
|
1583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1531
1584
|
Show,
|
|
1532
1585
|
{
|
|
1533
1586
|
when: hasAs,
|
|
1534
|
-
fallback: /* @__PURE__ */ (0,
|
|
1587
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1535
1588
|
"a",
|
|
1536
1589
|
{
|
|
1537
1590
|
...nativeProps,
|
|
1538
|
-
className: (0,
|
|
1591
|
+
className: (0, import_css24.cx)(
|
|
1539
1592
|
nativeProps.className,
|
|
1540
|
-
(0,
|
|
1593
|
+
(0, import_css24.css)({
|
|
1541
1594
|
color: "action.navigation.initial",
|
|
1542
1595
|
textStyle: "link",
|
|
1543
1596
|
_hover: {
|
|
@@ -1547,7 +1600,7 @@ function NavMenuLink(props) {
|
|
|
1547
1600
|
)
|
|
1548
1601
|
}
|
|
1549
1602
|
),
|
|
1550
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1603
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AsSub, { ...nativeProps })
|
|
1551
1604
|
}
|
|
1552
1605
|
)
|
|
1553
1606
|
}
|
|
@@ -1555,11 +1608,10 @@ function NavMenuLink(props) {
|
|
|
1555
1608
|
}
|
|
1556
1609
|
|
|
1557
1610
|
// src/components/Notification.tsx
|
|
1558
|
-
var
|
|
1611
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1559
1612
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1562
|
-
var import_icons2 = require("@cerberus/icons");
|
|
1613
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1614
|
+
var import_react11 = require("react");
|
|
1563
1615
|
|
|
1564
1616
|
// src/aria-helpers/trap-focus.aria.ts
|
|
1565
1617
|
function trapFocus(modalRef) {
|
|
@@ -1588,23 +1640,24 @@ function trapFocus(modalRef) {
|
|
|
1588
1640
|
}
|
|
1589
1641
|
|
|
1590
1642
|
// src/components/Notification.tsx
|
|
1591
|
-
var
|
|
1643
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1592
1644
|
function MatchNotificationIcon(props) {
|
|
1593
1645
|
const palette = props.palette || "info";
|
|
1594
1646
|
const key = `${palette}Notification`;
|
|
1595
1647
|
const Icon = $cerberusIcons[key];
|
|
1596
|
-
return /* @__PURE__ */ (0,
|
|
1648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, {});
|
|
1597
1649
|
}
|
|
1598
1650
|
function Notification(props) {
|
|
1599
1651
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1600
|
-
const ref = (0,
|
|
1652
|
+
const ref = (0, import_react11.useRef)(null);
|
|
1601
1653
|
const onKeyDown = trapFocus(ref);
|
|
1602
|
-
const styles = (0,
|
|
1603
|
-
|
|
1654
|
+
const styles = (0, import_recipes19.notification)({ palette });
|
|
1655
|
+
const { close: CloseIcon } = $cerberusIcons;
|
|
1656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
1604
1657
|
"dialog",
|
|
1605
1658
|
{
|
|
1606
1659
|
...nativeProps,
|
|
1607
|
-
className: (0,
|
|
1660
|
+
className: (0, import_css25.cx)(
|
|
1608
1661
|
nativeProps.className,
|
|
1609
1662
|
(0, import_patterns11.hstack)({
|
|
1610
1663
|
position: "relative",
|
|
@@ -1615,8 +1668,8 @@ function Notification(props) {
|
|
|
1615
1668
|
onKeyDown,
|
|
1616
1669
|
ref,
|
|
1617
1670
|
children: [
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MatchNotificationIcon, { palette }) }),
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1620
1673
|
"div",
|
|
1621
1674
|
{
|
|
1622
1675
|
className: (0, import_patterns11.vstack)({
|
|
@@ -1627,14 +1680,14 @@ function Notification(props) {
|
|
|
1627
1680
|
children
|
|
1628
1681
|
}
|
|
1629
1682
|
),
|
|
1630
|
-
/* @__PURE__ */ (0,
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1631
1684
|
"button",
|
|
1632
1685
|
{
|
|
1633
1686
|
"aria-label": "Close",
|
|
1634
1687
|
className: styles.close,
|
|
1635
1688
|
onClick: onClose,
|
|
1636
1689
|
value: props.id,
|
|
1637
|
-
children: /* @__PURE__ */ (0,
|
|
1690
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CloseIcon, {})
|
|
1638
1691
|
}
|
|
1639
1692
|
)
|
|
1640
1693
|
]
|
|
@@ -1643,26 +1696,26 @@ function Notification(props) {
|
|
|
1643
1696
|
}
|
|
1644
1697
|
|
|
1645
1698
|
// src/components/NotificationHeading.tsx
|
|
1646
|
-
var
|
|
1647
|
-
var
|
|
1648
|
-
var
|
|
1699
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1700
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1701
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1649
1702
|
function NotificationHeading(props) {
|
|
1650
1703
|
const { palette, ...nativeProps } = props;
|
|
1651
|
-
const styles = (0,
|
|
1652
|
-
return /* @__PURE__ */ (0,
|
|
1704
|
+
const styles = (0, import_recipes20.notification)({ palette });
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: (0, import_css26.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1653
1706
|
}
|
|
1654
1707
|
|
|
1655
1708
|
// src/components/NotificationDescription.tsx
|
|
1656
|
-
var
|
|
1657
|
-
var
|
|
1658
|
-
var
|
|
1709
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1710
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1711
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1659
1712
|
function NotificationDescription(props) {
|
|
1660
1713
|
const { palette, ...nativeProps } = props;
|
|
1661
|
-
const styles = (0,
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1714
|
+
const styles = (0, import_recipes21.notification)({ palette });
|
|
1715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1663
1716
|
"p",
|
|
1664
1717
|
{
|
|
1665
|
-
className: (0,
|
|
1718
|
+
className: (0, import_css27.cx)(nativeProps.className, styles.description),
|
|
1666
1719
|
...nativeProps
|
|
1667
1720
|
}
|
|
1668
1721
|
);
|
|
@@ -1679,18 +1732,18 @@ function Portal(props) {
|
|
|
1679
1732
|
}
|
|
1680
1733
|
|
|
1681
1734
|
// src/components/Radio.tsx
|
|
1682
|
-
var
|
|
1735
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
1683
1736
|
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1737
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
1738
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1686
1739
|
function Radio(props) {
|
|
1687
1740
|
const { children, size, ...nativeProps } = props;
|
|
1688
1741
|
const { invalid, ...state } = useFieldContext();
|
|
1689
|
-
const styles = (0,
|
|
1690
|
-
return /* @__PURE__ */ (0,
|
|
1742
|
+
const styles = (0, import_recipes22.radio)({ size });
|
|
1743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1691
1744
|
"div",
|
|
1692
1745
|
{
|
|
1693
|
-
className: (0,
|
|
1746
|
+
className: (0, import_css28.cx)(
|
|
1694
1747
|
"group",
|
|
1695
1748
|
(0, import_patterns12.hstack)({
|
|
1696
1749
|
gap: "sm"
|
|
@@ -1699,13 +1752,13 @@ function Radio(props) {
|
|
|
1699
1752
|
),
|
|
1700
1753
|
tabIndex: 0,
|
|
1701
1754
|
children: [
|
|
1702
|
-
/* @__PURE__ */ (0,
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1703
1756
|
"input",
|
|
1704
1757
|
{
|
|
1705
1758
|
...nativeProps,
|
|
1706
1759
|
...state,
|
|
1707
1760
|
...invalid && { "aria-invalid": true },
|
|
1708
|
-
className: (0,
|
|
1761
|
+
className: (0, import_css28.cx)(nativeProps.className, styles.input),
|
|
1709
1762
|
tabIndex: -1,
|
|
1710
1763
|
type: "radio"
|
|
1711
1764
|
}
|
|
@@ -1717,19 +1770,19 @@ function Radio(props) {
|
|
|
1717
1770
|
}
|
|
1718
1771
|
|
|
1719
1772
|
// src/components/Select.tsx
|
|
1720
|
-
var
|
|
1773
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
1721
1774
|
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
1722
|
-
var
|
|
1723
|
-
var
|
|
1775
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1776
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1724
1777
|
function Select(props) {
|
|
1725
1778
|
const { describedBy, size, ...nativeProps } = props;
|
|
1726
1779
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1727
1780
|
const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons;
|
|
1728
|
-
const styles = (0,
|
|
1781
|
+
const styles = (0, import_recipes23.select)({
|
|
1729
1782
|
size
|
|
1730
1783
|
});
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
1732
|
-
/* @__PURE__ */ (0,
|
|
1784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: styles.root, children: [
|
|
1785
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1733
1786
|
"select",
|
|
1734
1787
|
{
|
|
1735
1788
|
...nativeProps,
|
|
@@ -1739,38 +1792,38 @@ function Select(props) {
|
|
|
1739
1792
|
className: styles.input
|
|
1740
1793
|
}
|
|
1741
1794
|
),
|
|
1742
|
-
/* @__PURE__ */ (0,
|
|
1795
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1743
1796
|
"span",
|
|
1744
1797
|
{
|
|
1745
|
-
className: (0,
|
|
1798
|
+
className: (0, import_css29.cx)(
|
|
1746
1799
|
styles.iconStack,
|
|
1747
1800
|
(0, import_patterns13.hstack)({
|
|
1748
1801
|
gap: "2"
|
|
1749
1802
|
})
|
|
1750
1803
|
),
|
|
1751
1804
|
children: [
|
|
1752
|
-
/* @__PURE__ */ (0,
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1753
1806
|
"span",
|
|
1754
1807
|
{
|
|
1755
1808
|
...invalid && { "data-invalid": true },
|
|
1756
1809
|
className: styles.stateIcon,
|
|
1757
|
-
children: /* @__PURE__ */ (0,
|
|
1810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(InvalidIcon, {})
|
|
1758
1811
|
}
|
|
1759
1812
|
) }),
|
|
1760
|
-
/* @__PURE__ */ (0,
|
|
1813
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectArrow, {}) })
|
|
1761
1814
|
]
|
|
1762
1815
|
}
|
|
1763
1816
|
)
|
|
1764
1817
|
] });
|
|
1765
1818
|
}
|
|
1766
1819
|
function Option(props) {
|
|
1767
|
-
return /* @__PURE__ */ (0,
|
|
1820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("option", { ...props });
|
|
1768
1821
|
}
|
|
1769
1822
|
|
|
1770
1823
|
// src/components/Spinner.tsx
|
|
1771
|
-
var
|
|
1824
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1772
1825
|
function Spinner(props) {
|
|
1773
|
-
return /* @__PURE__ */ (0,
|
|
1826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1774
1827
|
"svg",
|
|
1775
1828
|
{
|
|
1776
1829
|
"aria-busy": "true",
|
|
@@ -1780,7 +1833,7 @@ function Spinner(props) {
|
|
|
1780
1833
|
width: props.size,
|
|
1781
1834
|
viewBox: "0 0 24 24",
|
|
1782
1835
|
...props,
|
|
1783
|
-
children: /* @__PURE__ */ (0,
|
|
1836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1784
1837
|
"g",
|
|
1785
1838
|
{
|
|
1786
1839
|
fill: "none",
|
|
@@ -1789,14 +1842,14 @@ function Spinner(props) {
|
|
|
1789
1842
|
strokeLinejoin: "round",
|
|
1790
1843
|
strokeWidth: 2,
|
|
1791
1844
|
children: [
|
|
1792
|
-
/* @__PURE__ */ (0,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1793
1846
|
"path",
|
|
1794
1847
|
{
|
|
1795
1848
|
strokeDasharray: 16,
|
|
1796
1849
|
strokeDashoffset: 16,
|
|
1797
1850
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1798
1851
|
children: [
|
|
1799
|
-
/* @__PURE__ */ (0,
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1800
1853
|
"animate",
|
|
1801
1854
|
{
|
|
1802
1855
|
fill: "freeze",
|
|
@@ -1805,7 +1858,7 @@ function Spinner(props) {
|
|
|
1805
1858
|
values: "16;0"
|
|
1806
1859
|
}
|
|
1807
1860
|
),
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1809
1862
|
"animateTransform",
|
|
1810
1863
|
{
|
|
1811
1864
|
attributeName: "transform",
|
|
@@ -1818,14 +1871,14 @@ function Spinner(props) {
|
|
|
1818
1871
|
]
|
|
1819
1872
|
}
|
|
1820
1873
|
),
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1822
1875
|
"path",
|
|
1823
1876
|
{
|
|
1824
1877
|
strokeDasharray: 64,
|
|
1825
1878
|
strokeDashoffset: 64,
|
|
1826
1879
|
strokeOpacity: 0.3,
|
|
1827
1880
|
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",
|
|
1828
|
-
children: /* @__PURE__ */ (0,
|
|
1881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1829
1882
|
"animate",
|
|
1830
1883
|
{
|
|
1831
1884
|
fill: "freeze",
|
|
@@ -1844,31 +1897,31 @@ function Spinner(props) {
|
|
|
1844
1897
|
}
|
|
1845
1898
|
|
|
1846
1899
|
// src/components/Tab.tsx
|
|
1847
|
-
var
|
|
1900
|
+
var import_react14 = require("react");
|
|
1848
1901
|
|
|
1849
1902
|
// src/context/tabs.tsx
|
|
1850
|
-
var
|
|
1851
|
-
var
|
|
1852
|
-
var
|
|
1853
|
-
var TabsContext = (0,
|
|
1903
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
1904
|
+
var import_react12 = require("react");
|
|
1905
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1906
|
+
var TabsContext = (0, import_react12.createContext)(null);
|
|
1854
1907
|
function Tabs(props) {
|
|
1855
1908
|
const { cache, active, id, palette } = props;
|
|
1856
|
-
const [activeTab, setActiveTab] = (0,
|
|
1857
|
-
const tabsList = (0,
|
|
1858
|
-
const uuid = (0,
|
|
1909
|
+
const [activeTab, setActiveTab] = (0, import_react12.useState)(() => cache ? "" : active ?? "");
|
|
1910
|
+
const tabsList = (0, import_react12.useRef)([]);
|
|
1911
|
+
const uuid = (0, import_react12.useMemo)(() => {
|
|
1859
1912
|
return id ? `cerberus-tabs-${id}` : "cerberus-tabs";
|
|
1860
1913
|
}, [id]);
|
|
1861
|
-
const value = (0,
|
|
1914
|
+
const value = (0, import_react12.useMemo)(
|
|
1862
1915
|
() => ({
|
|
1863
1916
|
tabs: tabsList,
|
|
1864
1917
|
id: uuid,
|
|
1865
1918
|
active: activeTab,
|
|
1866
|
-
styles: (0,
|
|
1919
|
+
styles: (0, import_recipes24.tabs)({ palette }),
|
|
1867
1920
|
onTabUpdate: setActiveTab
|
|
1868
1921
|
}),
|
|
1869
1922
|
[activeTab, setActiveTab, palette, uuid, tabsList]
|
|
1870
1923
|
);
|
|
1871
|
-
(0,
|
|
1924
|
+
(0, import_react12.useEffect)(() => {
|
|
1872
1925
|
if (cache) {
|
|
1873
1926
|
const cachedTab = window.localStorage.getItem(uuid);
|
|
1874
1927
|
setActiveTab(
|
|
@@ -1876,15 +1929,15 @@ function Tabs(props) {
|
|
|
1876
1929
|
);
|
|
1877
1930
|
}
|
|
1878
1931
|
}, [cache, active, uuid]);
|
|
1879
|
-
(0,
|
|
1932
|
+
(0, import_react12.useEffect)(() => {
|
|
1880
1933
|
if (cache && activeTab) {
|
|
1881
1934
|
window.localStorage.setItem(uuid, activeTab);
|
|
1882
1935
|
}
|
|
1883
1936
|
}, [activeTab, cache]);
|
|
1884
|
-
return /* @__PURE__ */ (0,
|
|
1937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsContext.Provider, { value, children: props.children });
|
|
1885
1938
|
}
|
|
1886
1939
|
function useTabsContext() {
|
|
1887
|
-
const context = (0,
|
|
1940
|
+
const context = (0, import_react12.useContext)(TabsContext);
|
|
1888
1941
|
if (!context) {
|
|
1889
1942
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
1890
1943
|
}
|
|
@@ -1892,10 +1945,10 @@ function useTabsContext() {
|
|
|
1892
1945
|
}
|
|
1893
1946
|
|
|
1894
1947
|
// src/components/Tab.tsx
|
|
1895
|
-
var
|
|
1948
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
1896
1949
|
|
|
1897
1950
|
// src/aria-helpers/tabs.aria.ts
|
|
1898
|
-
var
|
|
1951
|
+
var import_react13 = require("react");
|
|
1899
1952
|
function getNextIndex(index, length) {
|
|
1900
1953
|
return index === length - 1 ? 0 : index + 1;
|
|
1901
1954
|
}
|
|
@@ -1904,8 +1957,8 @@ function getPrevIndex(index, length) {
|
|
|
1904
1957
|
}
|
|
1905
1958
|
function useTabsKeyboardNavigation() {
|
|
1906
1959
|
const { tabs: tabs2 } = useTabsContext();
|
|
1907
|
-
const [activeTab, setActiveTab] = (0,
|
|
1908
|
-
(0,
|
|
1960
|
+
const [activeTab, setActiveTab] = (0, import_react13.useState)(-1);
|
|
1961
|
+
(0, import_react13.useEffect)(() => {
|
|
1909
1962
|
const handleKeyDown = (event) => {
|
|
1910
1963
|
const index = activeTab === -1 ? tabs2.current.findIndex((tab) => tab.ariaSelected === "true") : activeTab;
|
|
1911
1964
|
const nextIndex = getNextIndex(index, tabs2.current.length);
|
|
@@ -1951,19 +2004,19 @@ function useTabsKeyboardNavigation() {
|
|
|
1951
2004
|
}
|
|
1952
2005
|
|
|
1953
2006
|
// src/components/Tab.tsx
|
|
1954
|
-
var
|
|
2007
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1955
2008
|
function Tab(props) {
|
|
1956
2009
|
const { value, ...nativeProps } = props;
|
|
1957
2010
|
const { active, onTabUpdate, styles } = useTabsContext();
|
|
1958
|
-
const [isPending, startTransition] = (0,
|
|
2011
|
+
const [isPending, startTransition] = (0, import_react14.useTransition)();
|
|
1959
2012
|
const { ref } = useTabsKeyboardNavigation();
|
|
1960
|
-
const isActive = (0,
|
|
2013
|
+
const isActive = (0, import_react14.useMemo)(() => active === value, [active, value]);
|
|
1961
2014
|
function handleClick(e) {
|
|
1962
2015
|
var _a;
|
|
1963
2016
|
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
1964
2017
|
startTransition(() => onTabUpdate(e.currentTarget.value));
|
|
1965
2018
|
}
|
|
1966
|
-
return /* @__PURE__ */ (0,
|
|
2019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1967
2020
|
"button",
|
|
1968
2021
|
{
|
|
1969
2022
|
...nativeProps,
|
|
@@ -1972,7 +2025,7 @@ function Tab(props) {
|
|
|
1972
2025
|
"aria-busy": isPending,
|
|
1973
2026
|
"aria-selected": isActive,
|
|
1974
2027
|
id: `tab:${value}`,
|
|
1975
|
-
className: (0,
|
|
2028
|
+
className: (0, import_css30.cx)(nativeProps.className, styles.tab),
|
|
1976
2029
|
onClick: handleClick,
|
|
1977
2030
|
role: "tab",
|
|
1978
2031
|
ref,
|
|
@@ -1982,18 +2035,18 @@ function Tab(props) {
|
|
|
1982
2035
|
}
|
|
1983
2036
|
|
|
1984
2037
|
// src/components/TabList.tsx
|
|
1985
|
-
var
|
|
2038
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
1986
2039
|
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
1987
|
-
var
|
|
2040
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1988
2041
|
function TabList(props) {
|
|
1989
2042
|
const { description, ...nativeProps } = props;
|
|
1990
2043
|
const { id, styles } = useTabsContext();
|
|
1991
|
-
return /* @__PURE__ */ (0,
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1992
2045
|
"div",
|
|
1993
2046
|
{
|
|
1994
2047
|
...nativeProps,
|
|
1995
2048
|
"aria-label": description,
|
|
1996
|
-
className: (0,
|
|
2049
|
+
className: (0, import_css31.cx)(
|
|
1997
2050
|
nativeProps.className,
|
|
1998
2051
|
(0, import_patterns14.hstack)({
|
|
1999
2052
|
gap: "0"
|
|
@@ -2007,20 +2060,20 @@ function TabList(props) {
|
|
|
2007
2060
|
}
|
|
2008
2061
|
|
|
2009
2062
|
// src/components/TabPanel.tsx
|
|
2010
|
-
var
|
|
2011
|
-
var
|
|
2012
|
-
var
|
|
2063
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
2064
|
+
var import_react15 = require("react");
|
|
2065
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2013
2066
|
function TabPanel(props) {
|
|
2014
2067
|
const { tab, ...nativeProps } = props;
|
|
2015
2068
|
const { active, styles } = useTabsContext();
|
|
2016
|
-
const isActive = (0,
|
|
2017
|
-
return /* @__PURE__ */ (0,
|
|
2069
|
+
const isActive = (0, import_react15.useMemo)(() => active === tab, [active, tab]);
|
|
2070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Show, { when: isActive, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2018
2071
|
"div",
|
|
2019
2072
|
{
|
|
2020
2073
|
...nativeProps,
|
|
2021
2074
|
...isActive && { tabIndex: 0 },
|
|
2022
2075
|
"aria-labelledby": `tab:${tab}`,
|
|
2023
|
-
className: (0,
|
|
2076
|
+
className: (0, import_css32.cx)(nativeProps.className, styles.tabPanel),
|
|
2024
2077
|
id: `panel:${tab}`,
|
|
2025
2078
|
role: "tabpanel"
|
|
2026
2079
|
}
|
|
@@ -2028,60 +2081,60 @@ function TabPanel(props) {
|
|
|
2028
2081
|
}
|
|
2029
2082
|
|
|
2030
2083
|
// src/components/Table.tsx
|
|
2031
|
-
var
|
|
2032
|
-
var
|
|
2033
|
-
var
|
|
2084
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2085
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2086
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2034
2087
|
function Table(props) {
|
|
2035
2088
|
const { caption, children, ...nativeProps } = props;
|
|
2036
|
-
const styles = (0,
|
|
2037
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
+
const styles = (0, import_recipes25.table)();
|
|
2090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2038
2091
|
"table",
|
|
2039
2092
|
{
|
|
2040
2093
|
...nativeProps,
|
|
2041
|
-
className: (0,
|
|
2094
|
+
className: (0, import_css33.cx)(nativeProps.className, styles.table),
|
|
2042
2095
|
children: [
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("caption", { className: styles.caption, children: caption }),
|
|
2044
2097
|
children
|
|
2045
2098
|
]
|
|
2046
2099
|
}
|
|
2047
2100
|
) });
|
|
2048
2101
|
}
|
|
2049
2102
|
function Tr(props) {
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("tr", { ...props });
|
|
2051
2104
|
}
|
|
2052
2105
|
|
|
2053
2106
|
// src/components/Thead.tsx
|
|
2054
|
-
var
|
|
2055
|
-
var
|
|
2056
|
-
var
|
|
2107
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2108
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2109
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2057
2110
|
function Thead(props) {
|
|
2058
|
-
return /* @__PURE__ */ (0,
|
|
2111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("thead", { ...props, className: (0, import_css34.cx)(props.className, (0, import_recipes26.thead)()) });
|
|
2059
2112
|
}
|
|
2060
2113
|
|
|
2061
2114
|
// src/components/Th.tsx
|
|
2062
|
-
var
|
|
2063
|
-
var
|
|
2064
|
-
var
|
|
2115
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
2116
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2117
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2065
2118
|
function Th(props) {
|
|
2066
2119
|
const { size, onClick, ...nativeProps } = props;
|
|
2067
|
-
return /* @__PURE__ */ (0,
|
|
2120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2068
2121
|
Show,
|
|
2069
2122
|
{
|
|
2070
2123
|
when: Boolean(onClick),
|
|
2071
|
-
fallback: /* @__PURE__ */ (0,
|
|
2124
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2072
2125
|
"th",
|
|
2073
2126
|
{
|
|
2074
2127
|
...nativeProps,
|
|
2075
|
-
className: (0,
|
|
2128
|
+
className: (0, import_css35.cx)(nativeProps.className, (0, import_recipes27.th)({ size }))
|
|
2076
2129
|
}
|
|
2077
2130
|
),
|
|
2078
|
-
children: /* @__PURE__ */ (0,
|
|
2131
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2079
2132
|
"button",
|
|
2080
2133
|
{
|
|
2081
|
-
className: (0,
|
|
2134
|
+
className: (0, import_css35.cx)(
|
|
2082
2135
|
nativeProps.className,
|
|
2083
|
-
(0,
|
|
2084
|
-
(0,
|
|
2136
|
+
(0, import_recipes27.th)({ size }),
|
|
2137
|
+
(0, import_css35.css)({
|
|
2085
2138
|
alignItems: "center",
|
|
2086
2139
|
display: "inline-flex",
|
|
2087
2140
|
justifyContent: "space-between",
|
|
@@ -2101,18 +2154,18 @@ function Th(props) {
|
|
|
2101
2154
|
}
|
|
2102
2155
|
|
|
2103
2156
|
// src/components/Td.tsx
|
|
2104
|
-
var
|
|
2105
|
-
var
|
|
2106
|
-
var
|
|
2157
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2158
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2159
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2107
2160
|
function Td(props) {
|
|
2108
2161
|
const { size, ...nativeProps } = props;
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2110
2163
|
"td",
|
|
2111
2164
|
{
|
|
2112
2165
|
...nativeProps,
|
|
2113
|
-
className: (0,
|
|
2166
|
+
className: (0, import_css36.cx)(
|
|
2114
2167
|
nativeProps.className,
|
|
2115
|
-
(0,
|
|
2168
|
+
(0, import_recipes28.td)({
|
|
2116
2169
|
size
|
|
2117
2170
|
})
|
|
2118
2171
|
)
|
|
@@ -2121,18 +2174,18 @@ function Td(props) {
|
|
|
2121
2174
|
}
|
|
2122
2175
|
|
|
2123
2176
|
// src/components/Tbody.tsx
|
|
2124
|
-
var
|
|
2125
|
-
var
|
|
2126
|
-
var
|
|
2177
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2178
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2179
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2127
2180
|
function Tbody(props) {
|
|
2128
2181
|
const { decoration, ...nativeProps } = props;
|
|
2129
|
-
return /* @__PURE__ */ (0,
|
|
2182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2130
2183
|
"tbody",
|
|
2131
2184
|
{
|
|
2132
2185
|
...nativeProps,
|
|
2133
|
-
className: (0,
|
|
2186
|
+
className: (0, import_css37.cx)(
|
|
2134
2187
|
nativeProps.className,
|
|
2135
|
-
(0,
|
|
2188
|
+
(0, import_recipes29.tbody)({
|
|
2136
2189
|
decoration
|
|
2137
2190
|
})
|
|
2138
2191
|
)
|
|
@@ -2141,9 +2194,9 @@ function Tbody(props) {
|
|
|
2141
2194
|
}
|
|
2142
2195
|
|
|
2143
2196
|
// src/components/Tag.tsx
|
|
2144
|
-
var
|
|
2145
|
-
var
|
|
2146
|
-
var
|
|
2197
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
2198
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2199
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2147
2200
|
function Tag(props) {
|
|
2148
2201
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
2149
2202
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -2151,13 +2204,13 @@ function Tag(props) {
|
|
|
2151
2204
|
const shape = isClosable ? "pill" : initShape;
|
|
2152
2205
|
const closableStyles = isClosable ? closableCss : "";
|
|
2153
2206
|
const { close: Close2 } = $cerberusIcons;
|
|
2154
|
-
return /* @__PURE__ */ (0,
|
|
2207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2155
2208
|
"span",
|
|
2156
2209
|
{
|
|
2157
2210
|
...nativeProps,
|
|
2158
|
-
className: (0,
|
|
2211
|
+
className: (0, import_css38.cx)(
|
|
2159
2212
|
nativeProps.className,
|
|
2160
|
-
(0,
|
|
2213
|
+
(0, import_recipes30.tag)({
|
|
2161
2214
|
gradient,
|
|
2162
2215
|
palette,
|
|
2163
2216
|
shape,
|
|
@@ -2167,47 +2220,47 @@ function Tag(props) {
|
|
|
2167
2220
|
),
|
|
2168
2221
|
children: [
|
|
2169
2222
|
props.children,
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2223
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2171
2224
|
"button",
|
|
2172
2225
|
{
|
|
2173
2226
|
"aria-label": "Close",
|
|
2174
|
-
className: (0,
|
|
2227
|
+
className: (0, import_recipes30.iconButton)({
|
|
2175
2228
|
palette: "action",
|
|
2176
2229
|
usage: "filled",
|
|
2177
2230
|
size: "sm"
|
|
2178
2231
|
}),
|
|
2179
2232
|
onClick,
|
|
2180
|
-
children: /* @__PURE__ */ (0,
|
|
2233
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Close2, {})
|
|
2181
2234
|
}
|
|
2182
2235
|
) })
|
|
2183
2236
|
]
|
|
2184
2237
|
}
|
|
2185
2238
|
);
|
|
2186
2239
|
}
|
|
2187
|
-
var closableCss = (0,
|
|
2240
|
+
var closableCss = (0, import_css38.css)({
|
|
2188
2241
|
bgColor: "action.bg.active",
|
|
2189
2242
|
color: "action.text.initial",
|
|
2190
2243
|
paddingInlineEnd: "0"
|
|
2191
2244
|
});
|
|
2192
2245
|
|
|
2193
2246
|
// src/components/Textarea.tsx
|
|
2194
|
-
var
|
|
2195
|
-
var
|
|
2196
|
-
var
|
|
2247
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2248
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2249
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2197
2250
|
function Textarea(props) {
|
|
2198
2251
|
const { describedBy, ...nativeProps } = props;
|
|
2199
2252
|
const { invalid, ...fieldState } = useFieldContext();
|
|
2200
|
-
return /* @__PURE__ */ (0,
|
|
2253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2201
2254
|
"textarea",
|
|
2202
2255
|
{
|
|
2203
2256
|
...nativeProps,
|
|
2204
2257
|
...fieldState,
|
|
2205
2258
|
...describedBy && { "aria-describedby": describedBy },
|
|
2206
2259
|
...invalid && { "aria-invalid": true },
|
|
2207
|
-
className: (0,
|
|
2260
|
+
className: (0, import_css39.cx)(
|
|
2208
2261
|
props.className,
|
|
2209
|
-
(0,
|
|
2210
|
-
(0,
|
|
2262
|
+
(0, import_recipes31.input)().input,
|
|
2263
|
+
(0, import_css39.css)({
|
|
2211
2264
|
pxi: "2",
|
|
2212
2265
|
py: "2",
|
|
2213
2266
|
resize: "vertical"
|
|
@@ -2219,43 +2272,43 @@ function Textarea(props) {
|
|
|
2219
2272
|
}
|
|
2220
2273
|
|
|
2221
2274
|
// src/components/Toggle.tsx
|
|
2222
|
-
var
|
|
2275
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2223
2276
|
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
2224
|
-
var
|
|
2225
|
-
var
|
|
2277
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2278
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2226
2279
|
function Toggle(props) {
|
|
2227
2280
|
const { size, describedBy, ...nativeProps } = props;
|
|
2228
|
-
const styles = (0,
|
|
2281
|
+
const styles = (0, import_recipes32.toggle)({ size });
|
|
2229
2282
|
const { invalid, ...state } = useFieldContext();
|
|
2230
2283
|
const Icon = $cerberusIcons.toggleChecked;
|
|
2231
|
-
return /* @__PURE__ */ (0,
|
|
2284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2232
2285
|
"span",
|
|
2233
2286
|
{
|
|
2234
|
-
className: (0,
|
|
2287
|
+
className: (0, import_css40.cx)("group", styles.track, (0, import_patterns15.hstack)()),
|
|
2235
2288
|
"data-checked": props.checked || props.defaultChecked,
|
|
2236
2289
|
children: [
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2290
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2238
2291
|
"input",
|
|
2239
2292
|
{
|
|
2240
2293
|
...nativeProps,
|
|
2241
2294
|
...state,
|
|
2242
2295
|
...describedBy && { "aria-describedby": describedBy },
|
|
2243
2296
|
...invalid && { "aria-invalid": true },
|
|
2244
|
-
className: (0,
|
|
2297
|
+
className: (0, import_css40.cx)("peer", styles.input),
|
|
2245
2298
|
role: "switch",
|
|
2246
2299
|
type: "checkbox"
|
|
2247
2300
|
}
|
|
2248
2301
|
),
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2250
2303
|
"span",
|
|
2251
2304
|
{
|
|
2252
|
-
className: (0,
|
|
2305
|
+
className: (0, import_css40.cx)(
|
|
2253
2306
|
styles.thumb,
|
|
2254
2307
|
(0, import_patterns15.vstack)({
|
|
2255
2308
|
justify: "center"
|
|
2256
2309
|
})
|
|
2257
2310
|
),
|
|
2258
|
-
children: /* @__PURE__ */ (0,
|
|
2311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, {})
|
|
2259
2312
|
}
|
|
2260
2313
|
)
|
|
2261
2314
|
]
|
|
@@ -2264,26 +2317,26 @@ function Toggle(props) {
|
|
|
2264
2317
|
}
|
|
2265
2318
|
|
|
2266
2319
|
// src/context/confirm-modal.tsx
|
|
2267
|
-
var
|
|
2268
|
-
var
|
|
2320
|
+
var import_react17 = require("react");
|
|
2321
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
2269
2322
|
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
2270
2323
|
|
|
2271
2324
|
// src/hooks/useModal.ts
|
|
2272
|
-
var
|
|
2325
|
+
var import_react16 = require("react");
|
|
2273
2326
|
function useModal() {
|
|
2274
|
-
const modalRef = (0,
|
|
2275
|
-
const [isOpen, setIsOpen] = (0,
|
|
2276
|
-
const show = (0,
|
|
2327
|
+
const modalRef = (0, import_react16.useRef)(null);
|
|
2328
|
+
const [isOpen, setIsOpen] = (0, import_react16.useState)(false);
|
|
2329
|
+
const show = (0, import_react16.useCallback)(() => {
|
|
2277
2330
|
var _a;
|
|
2278
2331
|
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
2279
2332
|
setIsOpen(true);
|
|
2280
2333
|
}, []);
|
|
2281
|
-
const close = (0,
|
|
2334
|
+
const close = (0, import_react16.useCallback)(() => {
|
|
2282
2335
|
var _a;
|
|
2283
2336
|
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
2284
2337
|
setIsOpen(false);
|
|
2285
2338
|
}, []);
|
|
2286
|
-
return (0,
|
|
2339
|
+
return (0, import_react16.useMemo)(() => {
|
|
2287
2340
|
return {
|
|
2288
2341
|
modalRef,
|
|
2289
2342
|
show,
|
|
@@ -2294,19 +2347,19 @@ function useModal() {
|
|
|
2294
2347
|
}
|
|
2295
2348
|
|
|
2296
2349
|
// src/context/confirm-modal.tsx
|
|
2297
|
-
var
|
|
2298
|
-
var ConfirmModalContext = (0,
|
|
2350
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2351
|
+
var ConfirmModalContext = (0, import_react17.createContext)(null);
|
|
2299
2352
|
function ConfirmModal(props) {
|
|
2300
2353
|
const { modalRef, show, close } = useModal();
|
|
2301
|
-
const resolveRef = (0,
|
|
2302
|
-
const [content, setContent] = (0,
|
|
2354
|
+
const resolveRef = (0, import_react17.useRef)(null);
|
|
2355
|
+
const [content, setContent] = (0, import_react17.useState)(null);
|
|
2303
2356
|
const focusTrap = trapFocus(modalRef);
|
|
2304
2357
|
const ConfirmIcon = $cerberusIcons.confirmModal;
|
|
2305
|
-
const palette = (0,
|
|
2358
|
+
const palette = (0, import_react17.useMemo)(
|
|
2306
2359
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
2307
2360
|
[content]
|
|
2308
2361
|
);
|
|
2309
|
-
const handleChoice = (0,
|
|
2362
|
+
const handleChoice = (0, import_react17.useCallback)(
|
|
2310
2363
|
(e) => {
|
|
2311
2364
|
var _a, _b;
|
|
2312
2365
|
const target = e.currentTarget;
|
|
@@ -2318,7 +2371,7 @@ function ConfirmModal(props) {
|
|
|
2318
2371
|
},
|
|
2319
2372
|
[close]
|
|
2320
2373
|
);
|
|
2321
|
-
const handleShow = (0,
|
|
2374
|
+
const handleShow = (0, import_react17.useCallback)(
|
|
2322
2375
|
(options) => {
|
|
2323
2376
|
return new Promise((resolve) => {
|
|
2324
2377
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -2328,42 +2381,42 @@ function ConfirmModal(props) {
|
|
|
2328
2381
|
},
|
|
2329
2382
|
[show]
|
|
2330
2383
|
);
|
|
2331
|
-
const value = (0,
|
|
2384
|
+
const value = (0, import_react17.useMemo)(
|
|
2332
2385
|
() => ({
|
|
2333
2386
|
show: handleShow
|
|
2334
2387
|
}),
|
|
2335
2388
|
[handleShow]
|
|
2336
2389
|
);
|
|
2337
|
-
return /* @__PURE__ */ (0,
|
|
2390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2338
2391
|
props.children,
|
|
2339
|
-
/* @__PURE__ */ (0,
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(ModalHeader, { children: [
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2342
2395
|
"div",
|
|
2343
2396
|
{
|
|
2344
2397
|
className: (0, import_patterns16.hstack)({
|
|
2345
2398
|
justify: "center",
|
|
2346
2399
|
w: "full"
|
|
2347
2400
|
}),
|
|
2348
|
-
children: /* @__PURE__ */ (0,
|
|
2401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2349
2402
|
Show,
|
|
2350
2403
|
{
|
|
2351
2404
|
when: palette === "danger",
|
|
2352
|
-
fallback: /* @__PURE__ */ (0,
|
|
2405
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2353
2406
|
Avatar,
|
|
2354
2407
|
{
|
|
2355
2408
|
ariaLabel: "",
|
|
2356
2409
|
gradient: "charon-light",
|
|
2357
|
-
icon: /* @__PURE__ */ (0,
|
|
2410
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ConfirmIcon, { size: 24 }),
|
|
2358
2411
|
src: ""
|
|
2359
2412
|
}
|
|
2360
2413
|
),
|
|
2361
|
-
children: /* @__PURE__ */ (0,
|
|
2414
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2362
2415
|
Avatar,
|
|
2363
2416
|
{
|
|
2364
2417
|
ariaLabel: "",
|
|
2365
2418
|
gradient: "hades-dark",
|
|
2366
|
-
icon: /* @__PURE__ */ (0,
|
|
2419
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ConfirmIcon, { size: 24 }),
|
|
2367
2420
|
src: ""
|
|
2368
2421
|
}
|
|
2369
2422
|
)
|
|
@@ -2371,21 +2424,21 @@ function ConfirmModal(props) {
|
|
|
2371
2424
|
)
|
|
2372
2425
|
}
|
|
2373
2426
|
),
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2376
2429
|
] }),
|
|
2377
|
-
/* @__PURE__ */ (0,
|
|
2430
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
2378
2431
|
"div",
|
|
2379
2432
|
{
|
|
2380
2433
|
className: (0, import_patterns16.hstack)({
|
|
2381
2434
|
gap: "4"
|
|
2382
2435
|
}),
|
|
2383
2436
|
children: [
|
|
2384
|
-
/* @__PURE__ */ (0,
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2385
2438
|
Button,
|
|
2386
2439
|
{
|
|
2387
2440
|
autoFocus: true,
|
|
2388
|
-
className: (0,
|
|
2441
|
+
className: (0, import_css41.css)({
|
|
2389
2442
|
w: "1/2"
|
|
2390
2443
|
}),
|
|
2391
2444
|
name: "confirm",
|
|
@@ -2395,10 +2448,10 @@ function ConfirmModal(props) {
|
|
|
2395
2448
|
children: content == null ? void 0 : content.actionText
|
|
2396
2449
|
}
|
|
2397
2450
|
),
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2399
2452
|
Button,
|
|
2400
2453
|
{
|
|
2401
|
-
className: (0,
|
|
2454
|
+
className: (0, import_css41.css)({
|
|
2402
2455
|
w: "1/2"
|
|
2403
2456
|
}),
|
|
2404
2457
|
name: "cancel",
|
|
@@ -2415,7 +2468,7 @@ function ConfirmModal(props) {
|
|
|
2415
2468
|
] });
|
|
2416
2469
|
}
|
|
2417
2470
|
function useConfirmModal() {
|
|
2418
|
-
const context = (0,
|
|
2471
|
+
const context = (0, import_react17.useContext)(ConfirmModalContext);
|
|
2419
2472
|
if (context === null) {
|
|
2420
2473
|
throw new Error(
|
|
2421
2474
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -2424,23 +2477,131 @@ function useConfirmModal() {
|
|
|
2424
2477
|
return context;
|
|
2425
2478
|
}
|
|
2426
2479
|
|
|
2480
|
+
// src/context/cta-modal.tsx
|
|
2481
|
+
var import_react18 = require("react");
|
|
2482
|
+
var import_jsx = require("@cerberus/styled-system/jsx");
|
|
2483
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
2484
|
+
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2485
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2486
|
+
var CTAModalContext = (0, import_react18.createContext)(null);
|
|
2487
|
+
function CTAModal(props) {
|
|
2488
|
+
var _a, _b;
|
|
2489
|
+
const { modalRef, show, close } = useModal();
|
|
2490
|
+
const [content, setContent] = (0, import_react18.useState)(null);
|
|
2491
|
+
const focusTrap = trapFocus(modalRef);
|
|
2492
|
+
const FallbackIcon = $cerberusIcons.confirmModal;
|
|
2493
|
+
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2494
|
+
const { close: CloseIcon } = $cerberusIcons;
|
|
2495
|
+
const handleShow = (0, import_react18.useCallback)(
|
|
2496
|
+
(options) => {
|
|
2497
|
+
const maxActions = 2;
|
|
2498
|
+
if (options.actions.length > maxActions) {
|
|
2499
|
+
throw new Error(
|
|
2500
|
+
`CTA Modal only supports a maximum of ${maxActions} actions.`
|
|
2501
|
+
);
|
|
2502
|
+
}
|
|
2503
|
+
setContent({ ...options });
|
|
2504
|
+
show();
|
|
2505
|
+
},
|
|
2506
|
+
[show]
|
|
2507
|
+
);
|
|
2508
|
+
const handleActionClick = (0, import_react18.useCallback)(
|
|
2509
|
+
(event) => {
|
|
2510
|
+
const index = event.currentTarget.getAttribute("data-index");
|
|
2511
|
+
const action = content == null ? void 0 : content.actions[Number(index)];
|
|
2512
|
+
if (typeof (action == null ? void 0 : action.onClick) === "function") {
|
|
2513
|
+
action.onClick(event);
|
|
2514
|
+
}
|
|
2515
|
+
close();
|
|
2516
|
+
},
|
|
2517
|
+
[content, close]
|
|
2518
|
+
);
|
|
2519
|
+
const value = (0, import_react18.useMemo)(
|
|
2520
|
+
() => ({
|
|
2521
|
+
show: handleShow
|
|
2522
|
+
}),
|
|
2523
|
+
[handleShow]
|
|
2524
|
+
);
|
|
2525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2526
|
+
props.children,
|
|
2527
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2529
|
+
"span",
|
|
2530
|
+
{
|
|
2531
|
+
className: (0, import_css42.css)({
|
|
2532
|
+
padding: "md",
|
|
2533
|
+
position: "absolute",
|
|
2534
|
+
right: 0,
|
|
2535
|
+
top: 0,
|
|
2536
|
+
zIndex: "decorator"
|
|
2537
|
+
}),
|
|
2538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CloseIcon, {}) })
|
|
2539
|
+
}
|
|
2540
|
+
),
|
|
2541
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(ModalHeader, { children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx.HStack, { justify: "center", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2543
|
+
Avatar,
|
|
2544
|
+
{
|
|
2545
|
+
ariaLabel: "",
|
|
2546
|
+
gradient: "charon-light",
|
|
2547
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2548
|
+
Show,
|
|
2549
|
+
{
|
|
2550
|
+
when: Boolean(confirmIcon),
|
|
2551
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FallbackIcon, { size: 24 }),
|
|
2552
|
+
children: confirmIcon
|
|
2553
|
+
}
|
|
2554
|
+
),
|
|
2555
|
+
src: ""
|
|
2556
|
+
}
|
|
2557
|
+
) }),
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx2.VStack, { gap: "lg", w: "full", children: [
|
|
2559
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2560
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2561
|
+
] })
|
|
2562
|
+
] }),
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx.HStack, { gap: "md", pt: "sm", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime50.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_runtime50.jsx)(
|
|
2564
|
+
Button,
|
|
2565
|
+
{
|
|
2566
|
+
"data-index": index,
|
|
2567
|
+
className: (0, import_css42.css)({
|
|
2568
|
+
w: "1/2"
|
|
2569
|
+
}),
|
|
2570
|
+
onClick: handleActionClick,
|
|
2571
|
+
shape: "rounded",
|
|
2572
|
+
usage: "outlined",
|
|
2573
|
+
children: action.text
|
|
2574
|
+
},
|
|
2575
|
+
index
|
|
2576
|
+
)) }) })
|
|
2577
|
+
] }) })
|
|
2578
|
+
] });
|
|
2579
|
+
}
|
|
2580
|
+
function useCTAModal() {
|
|
2581
|
+
const context = (0, import_react18.useContext)(CTAModalContext);
|
|
2582
|
+
if (context === null) {
|
|
2583
|
+
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2584
|
+
}
|
|
2585
|
+
return context;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2427
2588
|
// src/context/notification-center.tsx
|
|
2428
|
-
var
|
|
2589
|
+
var import_react19 = require("react");
|
|
2429
2590
|
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2430
|
-
var
|
|
2431
|
-
var
|
|
2432
|
-
var
|
|
2433
|
-
var NotificationsContext = (0,
|
|
2591
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
2592
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
2593
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2594
|
+
var NotificationsContext = (0, import_react19.createContext)(null);
|
|
2434
2595
|
function NotificationCenter(props) {
|
|
2435
|
-
const [activeNotifications, setActiveNotifications] = (0,
|
|
2436
|
-
const styles = (0,
|
|
2437
|
-
const handleNotify = (0,
|
|
2596
|
+
const [activeNotifications, setActiveNotifications] = (0, import_react19.useState)([]);
|
|
2597
|
+
const styles = (0, import_recipes33.notification)();
|
|
2598
|
+
const handleNotify = (0, import_react19.useCallback)((options) => {
|
|
2438
2599
|
setActiveNotifications((prev) => {
|
|
2439
2600
|
const id = `${options.palette}:${prev.length + 1}`;
|
|
2440
2601
|
return [...prev, { ...options, id }];
|
|
2441
2602
|
});
|
|
2442
2603
|
}, []);
|
|
2443
|
-
const handleClose = (0,
|
|
2604
|
+
const handleClose = (0, import_react19.useCallback)((e) => {
|
|
2444
2605
|
const target = e.currentTarget;
|
|
2445
2606
|
setActiveNotifications((prev) => {
|
|
2446
2607
|
const item = prev.find((option) => option.id === target.value);
|
|
@@ -2448,7 +2609,7 @@ function NotificationCenter(props) {
|
|
|
2448
2609
|
return prev.filter((option) => option.id !== target.value);
|
|
2449
2610
|
});
|
|
2450
2611
|
}, []);
|
|
2451
|
-
const handleCloseAll = (0,
|
|
2612
|
+
const handleCloseAll = (0, import_react19.useCallback)(() => {
|
|
2452
2613
|
setActiveNotifications((prev) => {
|
|
2453
2614
|
prev.forEach((item) => {
|
|
2454
2615
|
if (item.onClose) item.onClose();
|
|
@@ -2456,19 +2617,19 @@ function NotificationCenter(props) {
|
|
|
2456
2617
|
return [];
|
|
2457
2618
|
});
|
|
2458
2619
|
}, []);
|
|
2459
|
-
const value = (0,
|
|
2620
|
+
const value = (0, import_react19.useMemo)(
|
|
2460
2621
|
() => ({
|
|
2461
2622
|
notify: handleNotify
|
|
2462
2623
|
}),
|
|
2463
2624
|
[handleNotify]
|
|
2464
2625
|
);
|
|
2465
|
-
return /* @__PURE__ */ (0,
|
|
2626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2466
2627
|
props.children,
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2468
|
-
/* @__PURE__ */ (0,
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: styles.center, children: [
|
|
2629
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2469
2630
|
Button,
|
|
2470
2631
|
{
|
|
2471
|
-
className: (0,
|
|
2632
|
+
className: (0, import_css43.cx)(styles.closeAll, (0, import_patterns17.animateIn)()),
|
|
2472
2633
|
onClick: handleCloseAll,
|
|
2473
2634
|
palette: "action",
|
|
2474
2635
|
shape: "rounded",
|
|
@@ -2477,7 +2638,7 @@ function NotificationCenter(props) {
|
|
|
2477
2638
|
children: "Close all"
|
|
2478
2639
|
}
|
|
2479
2640
|
) }),
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2481
2642
|
"div",
|
|
2482
2643
|
{
|
|
2483
2644
|
className: (0, import_patterns17.vstack)({
|
|
@@ -2487,7 +2648,7 @@ function NotificationCenter(props) {
|
|
|
2487
2648
|
style: {
|
|
2488
2649
|
alignItems: "flex-end"
|
|
2489
2650
|
},
|
|
2490
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
2651
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2491
2652
|
MatchNotification,
|
|
2492
2653
|
{
|
|
2493
2654
|
...option,
|
|
@@ -2504,7 +2665,7 @@ function MatchNotification(props) {
|
|
|
2504
2665
|
const { palette, id, onClose, heading, description } = props;
|
|
2505
2666
|
switch (palette) {
|
|
2506
2667
|
case "success":
|
|
2507
|
-
return /* @__PURE__ */ (0,
|
|
2668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2508
2669
|
Notification,
|
|
2509
2670
|
{
|
|
2510
2671
|
id,
|
|
@@ -2512,14 +2673,14 @@ function MatchNotification(props) {
|
|
|
2512
2673
|
open: true,
|
|
2513
2674
|
palette: "success",
|
|
2514
2675
|
children: [
|
|
2515
|
-
/* @__PURE__ */ (0,
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
2677
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2517
2678
|
]
|
|
2518
2679
|
},
|
|
2519
2680
|
id
|
|
2520
2681
|
);
|
|
2521
2682
|
case "warning":
|
|
2522
|
-
return /* @__PURE__ */ (0,
|
|
2683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2523
2684
|
Notification,
|
|
2524
2685
|
{
|
|
2525
2686
|
id,
|
|
@@ -2527,27 +2688,27 @@ function MatchNotification(props) {
|
|
|
2527
2688
|
open: true,
|
|
2528
2689
|
palette: "warning",
|
|
2529
2690
|
children: [
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
2692
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2532
2693
|
]
|
|
2533
2694
|
},
|
|
2534
2695
|
id
|
|
2535
2696
|
);
|
|
2536
2697
|
case "danger":
|
|
2537
|
-
return /* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2539
|
-
/* @__PURE__ */ (0,
|
|
2698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2540
2701
|
] }, id);
|
|
2541
2702
|
case "info":
|
|
2542
2703
|
default:
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2546
2707
|
] }, id);
|
|
2547
2708
|
}
|
|
2548
2709
|
}
|
|
2549
2710
|
function useNotificationCenter() {
|
|
2550
|
-
const context = (0,
|
|
2711
|
+
const context = (0, import_react19.useContext)(NotificationsContext);
|
|
2551
2712
|
if (!context) {
|
|
2552
2713
|
throw new Error(
|
|
2553
2714
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -2557,33 +2718,33 @@ function useNotificationCenter() {
|
|
|
2557
2718
|
}
|
|
2558
2719
|
|
|
2559
2720
|
// src/context/prompt-modal.tsx
|
|
2560
|
-
var
|
|
2561
|
-
var
|
|
2721
|
+
var import_react20 = require("react");
|
|
2722
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
2562
2723
|
var import_patterns18 = require("@cerberus/styled-system/patterns");
|
|
2563
|
-
var
|
|
2564
|
-
var PromptModalContext = (0,
|
|
2724
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2725
|
+
var PromptModalContext = (0, import_react20.createContext)(null);
|
|
2565
2726
|
function PromptModal(props) {
|
|
2566
2727
|
const { modalRef, show, close } = useModal();
|
|
2567
|
-
const resolveRef = (0,
|
|
2568
|
-
const [content, setContent] = (0,
|
|
2569
|
-
const [inputValue, setInputValue] = (0,
|
|
2728
|
+
const resolveRef = (0, import_react20.useRef)(null);
|
|
2729
|
+
const [content, setContent] = (0, import_react20.useState)(null);
|
|
2730
|
+
const [inputValue, setInputValue] = (0, import_react20.useState)("");
|
|
2570
2731
|
const focusTrap = trapFocus(modalRef);
|
|
2571
2732
|
const PromptIcon = $cerberusIcons.promptModal;
|
|
2572
|
-
const isValid = (0,
|
|
2733
|
+
const isValid = (0, import_react20.useMemo)(
|
|
2573
2734
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
2574
2735
|
[inputValue, content]
|
|
2575
2736
|
);
|
|
2576
|
-
const palette = (0,
|
|
2737
|
+
const palette = (0, import_react20.useMemo)(
|
|
2577
2738
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
2578
2739
|
[content]
|
|
2579
2740
|
);
|
|
2580
|
-
const handleChange = (0,
|
|
2741
|
+
const handleChange = (0, import_react20.useCallback)(
|
|
2581
2742
|
(e) => {
|
|
2582
2743
|
setInputValue(e.currentTarget.value);
|
|
2583
2744
|
},
|
|
2584
2745
|
[content]
|
|
2585
2746
|
);
|
|
2586
|
-
const handleChoice = (0,
|
|
2747
|
+
const handleChoice = (0, import_react20.useCallback)(
|
|
2587
2748
|
(e) => {
|
|
2588
2749
|
var _a;
|
|
2589
2750
|
const target = e.currentTarget;
|
|
@@ -2594,7 +2755,7 @@ function PromptModal(props) {
|
|
|
2594
2755
|
},
|
|
2595
2756
|
[inputValue, close]
|
|
2596
2757
|
);
|
|
2597
|
-
const handleShow = (0,
|
|
2758
|
+
const handleShow = (0, import_react20.useCallback)(
|
|
2598
2759
|
(options) => {
|
|
2599
2760
|
return new Promise((resolve) => {
|
|
2600
2761
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -2604,42 +2765,42 @@ function PromptModal(props) {
|
|
|
2604
2765
|
},
|
|
2605
2766
|
[show]
|
|
2606
2767
|
);
|
|
2607
|
-
const value = (0,
|
|
2768
|
+
const value = (0, import_react20.useMemo)(
|
|
2608
2769
|
() => ({
|
|
2609
2770
|
show: handleShow
|
|
2610
2771
|
}),
|
|
2611
2772
|
[handleShow]
|
|
2612
2773
|
);
|
|
2613
|
-
return /* @__PURE__ */ (0,
|
|
2774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2614
2775
|
props.children,
|
|
2615
|
-
/* @__PURE__ */ (0,
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(ModalHeader, { children: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2618
2779
|
"div",
|
|
2619
2780
|
{
|
|
2620
2781
|
className: (0, import_patterns18.hstack)({
|
|
2621
2782
|
justify: "center",
|
|
2622
2783
|
w: "full"
|
|
2623
2784
|
}),
|
|
2624
|
-
children: /* @__PURE__ */ (0,
|
|
2785
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2625
2786
|
Show,
|
|
2626
2787
|
{
|
|
2627
2788
|
when: palette === "danger",
|
|
2628
|
-
fallback: /* @__PURE__ */ (0,
|
|
2789
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2629
2790
|
Avatar,
|
|
2630
2791
|
{
|
|
2631
2792
|
ariaLabel: "",
|
|
2632
2793
|
gradient: "charon-light",
|
|
2633
|
-
icon: /* @__PURE__ */ (0,
|
|
2794
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PromptIcon, { size: 24 }),
|
|
2634
2795
|
src: ""
|
|
2635
2796
|
}
|
|
2636
2797
|
),
|
|
2637
|
-
children: /* @__PURE__ */ (0,
|
|
2798
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2638
2799
|
Avatar,
|
|
2639
2800
|
{
|
|
2640
2801
|
ariaLabel: "",
|
|
2641
2802
|
gradient: "hades-dark",
|
|
2642
|
-
icon: /* @__PURE__ */ (0,
|
|
2803
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PromptIcon, { size: 24 }),
|
|
2643
2804
|
src: ""
|
|
2644
2805
|
}
|
|
2645
2806
|
)
|
|
@@ -2647,10 +2808,10 @@ function PromptModal(props) {
|
|
|
2647
2808
|
)
|
|
2648
2809
|
}
|
|
2649
2810
|
),
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2651
|
-
/* @__PURE__ */ (0,
|
|
2811
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2652
2813
|
] }),
|
|
2653
|
-
/* @__PURE__ */ (0,
|
|
2814
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2654
2815
|
"div",
|
|
2655
2816
|
{
|
|
2656
2817
|
className: (0, import_patterns18.vstack)({
|
|
@@ -2658,11 +2819,11 @@ function PromptModal(props) {
|
|
|
2658
2819
|
mt: "4",
|
|
2659
2820
|
mb: "8"
|
|
2660
2821
|
}),
|
|
2661
|
-
children: /* @__PURE__ */ (0,
|
|
2662
|
-
/* @__PURE__ */ (0,
|
|
2822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Field, { invalid: !isValid, children: [
|
|
2823
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
2663
2824
|
Label,
|
|
2664
2825
|
{
|
|
2665
|
-
className: (0,
|
|
2826
|
+
className: (0, import_css44.css)({
|
|
2666
2827
|
gap: 1,
|
|
2667
2828
|
justifyContent: "flex-start"
|
|
2668
2829
|
}),
|
|
@@ -2670,10 +2831,10 @@ function PromptModal(props) {
|
|
|
2670
2831
|
size: "md",
|
|
2671
2832
|
children: [
|
|
2672
2833
|
"Type",
|
|
2673
|
-
/* @__PURE__ */ (0,
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2674
2835
|
"strong",
|
|
2675
2836
|
{
|
|
2676
|
-
className: (0,
|
|
2837
|
+
className: (0, import_css44.css)({
|
|
2677
2838
|
textTransform: "uppercase"
|
|
2678
2839
|
}),
|
|
2679
2840
|
children: content == null ? void 0 : content.key
|
|
@@ -2683,7 +2844,7 @@ function PromptModal(props) {
|
|
|
2683
2844
|
]
|
|
2684
2845
|
}
|
|
2685
2846
|
),
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2687
2848
|
Input,
|
|
2688
2849
|
{
|
|
2689
2850
|
id: "confirm",
|
|
@@ -2695,7 +2856,7 @@ function PromptModal(props) {
|
|
|
2695
2856
|
] })
|
|
2696
2857
|
}
|
|
2697
2858
|
),
|
|
2698
|
-
/* @__PURE__ */ (0,
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
2699
2860
|
"div",
|
|
2700
2861
|
{
|
|
2701
2862
|
className: (0, import_patterns18.hstack)({
|
|
@@ -2703,11 +2864,11 @@ function PromptModal(props) {
|
|
|
2703
2864
|
gap: "4"
|
|
2704
2865
|
}),
|
|
2705
2866
|
children: [
|
|
2706
|
-
/* @__PURE__ */ (0,
|
|
2867
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2707
2868
|
Button,
|
|
2708
2869
|
{
|
|
2709
2870
|
autoFocus: true,
|
|
2710
|
-
className: (0,
|
|
2871
|
+
className: (0, import_css44.css)({
|
|
2711
2872
|
w: "1/2"
|
|
2712
2873
|
}),
|
|
2713
2874
|
disabled: !isValid,
|
|
@@ -2718,10 +2879,10 @@ function PromptModal(props) {
|
|
|
2718
2879
|
children: content == null ? void 0 : content.actionText
|
|
2719
2880
|
}
|
|
2720
2881
|
),
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2722
2883
|
Button,
|
|
2723
2884
|
{
|
|
2724
|
-
className: (0,
|
|
2885
|
+
className: (0, import_css44.css)({
|
|
2725
2886
|
w: "1/2"
|
|
2726
2887
|
}),
|
|
2727
2888
|
name: "cancel",
|
|
@@ -2738,7 +2899,7 @@ function PromptModal(props) {
|
|
|
2738
2899
|
] });
|
|
2739
2900
|
}
|
|
2740
2901
|
function usePromptModal() {
|
|
2741
|
-
const context = (0,
|
|
2902
|
+
const context = (0, import_react20.useContext)(PromptModalContext);
|
|
2742
2903
|
if (context === null) {
|
|
2743
2904
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
2744
2905
|
}
|
|
@@ -2746,50 +2907,50 @@ function usePromptModal() {
|
|
|
2746
2907
|
}
|
|
2747
2908
|
|
|
2748
2909
|
// src/context/theme.tsx
|
|
2749
|
-
var
|
|
2910
|
+
var import_react22 = require("react");
|
|
2750
2911
|
|
|
2751
2912
|
// src/hooks/useTheme.ts
|
|
2752
|
-
var
|
|
2913
|
+
var import_react21 = require("react");
|
|
2753
2914
|
var THEME_KEY = "cerberus-theme";
|
|
2754
2915
|
var MODE_KEY = "cerberus-mode";
|
|
2755
2916
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
2756
2917
|
const { updateMode, updateTheme, cache } = options;
|
|
2757
|
-
const [theme, setTheme] = (0,
|
|
2758
|
-
const [colorMode, setColorMode] = (0,
|
|
2759
|
-
const handleThemeChange = (0,
|
|
2918
|
+
const [theme, setTheme] = (0, import_react21.useState)(defaultTheme);
|
|
2919
|
+
const [colorMode, setColorMode] = (0, import_react21.useState)(defaultColorMode);
|
|
2920
|
+
const handleThemeChange = (0, import_react21.useCallback)(
|
|
2760
2921
|
(newTheme) => {
|
|
2761
2922
|
setTheme(newTheme);
|
|
2762
2923
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
2763
2924
|
},
|
|
2764
2925
|
[updateTheme]
|
|
2765
2926
|
);
|
|
2766
|
-
const handleColorModeChange = (0,
|
|
2927
|
+
const handleColorModeChange = (0, import_react21.useCallback)(
|
|
2767
2928
|
(newMode) => {
|
|
2768
2929
|
setColorMode(newMode);
|
|
2769
2930
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
2770
2931
|
},
|
|
2771
2932
|
[updateMode]
|
|
2772
2933
|
);
|
|
2773
|
-
(0,
|
|
2934
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
2774
2935
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
2775
2936
|
if (theme2) {
|
|
2776
2937
|
setTheme(theme2);
|
|
2777
2938
|
}
|
|
2778
2939
|
}, []);
|
|
2779
|
-
(0,
|
|
2940
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
2780
2941
|
const mode = localStorage.getItem(MODE_KEY);
|
|
2781
2942
|
if (mode) {
|
|
2782
2943
|
setColorMode(mode);
|
|
2783
2944
|
}
|
|
2784
2945
|
}, []);
|
|
2785
|
-
(0,
|
|
2946
|
+
(0, import_react21.useEffect)(() => {
|
|
2786
2947
|
const root = document.documentElement;
|
|
2787
2948
|
root.dataset.pandaTheme = theme;
|
|
2788
2949
|
if (cache) {
|
|
2789
2950
|
localStorage.setItem(THEME_KEY, theme);
|
|
2790
2951
|
}
|
|
2791
2952
|
}, [theme, cache]);
|
|
2792
|
-
(0,
|
|
2953
|
+
(0, import_react21.useEffect)(() => {
|
|
2793
2954
|
const root = document.documentElement;
|
|
2794
2955
|
if (colorMode === "system") {
|
|
2795
2956
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -2800,7 +2961,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
2800
2961
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
2801
2962
|
}
|
|
2802
2963
|
}, [colorMode, cache]);
|
|
2803
|
-
return (0,
|
|
2964
|
+
return (0, import_react21.useMemo)(
|
|
2804
2965
|
() => ({
|
|
2805
2966
|
theme,
|
|
2806
2967
|
mode: colorMode,
|
|
@@ -2812,8 +2973,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
2812
2973
|
}
|
|
2813
2974
|
|
|
2814
2975
|
// src/context/theme.tsx
|
|
2815
|
-
var
|
|
2816
|
-
var ThemeContext = (0,
|
|
2976
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2977
|
+
var ThemeContext = (0, import_react22.createContext)(
|
|
2817
2978
|
null
|
|
2818
2979
|
);
|
|
2819
2980
|
function ThemeProvider(props) {
|
|
@@ -2822,10 +2983,10 @@ function ThemeProvider(props) {
|
|
|
2822
2983
|
updateMode: props.updateMode,
|
|
2823
2984
|
updateTheme: props.updateTheme
|
|
2824
2985
|
});
|
|
2825
|
-
return /* @__PURE__ */ (0,
|
|
2986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
2826
2987
|
}
|
|
2827
2988
|
function useThemeContext() {
|
|
2828
|
-
const context = (0,
|
|
2989
|
+
const context = (0, import_react22.useContext)(ThemeContext);
|
|
2829
2990
|
if (!context) {
|
|
2830
2991
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
2831
2992
|
}
|
|
@@ -2833,11 +2994,11 @@ function useThemeContext() {
|
|
|
2833
2994
|
}
|
|
2834
2995
|
|
|
2835
2996
|
// src/hooks/useToggle.ts
|
|
2836
|
-
var
|
|
2997
|
+
var import_react23 = require("react");
|
|
2837
2998
|
function useToggle(options) {
|
|
2838
|
-
const [checked, setChecked] = (0,
|
|
2999
|
+
const [checked, setChecked] = (0, import_react23.useState)((options == null ? void 0 : options.checked) ?? "");
|
|
2839
3000
|
const onChange = options == null ? void 0 : options.onChange;
|
|
2840
|
-
const handleChange = (0,
|
|
3001
|
+
const handleChange = (0, import_react23.useCallback)(
|
|
2841
3002
|
(e) => {
|
|
2842
3003
|
const target = e.currentTarget;
|
|
2843
3004
|
setChecked((prev) => {
|
|
@@ -2847,7 +3008,13 @@ function useToggle(options) {
|
|
|
2847
3008
|
},
|
|
2848
3009
|
[onChange]
|
|
2849
3010
|
);
|
|
2850
|
-
return (0,
|
|
3011
|
+
return (0, import_react23.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
// src/utils/index.ts
|
|
3015
|
+
function formatNotifyCount(count) {
|
|
3016
|
+
if (count > 99) return "99+";
|
|
3017
|
+
return count.toString();
|
|
2851
3018
|
}
|
|
2852
3019
|
|
|
2853
3020
|
// src/index.ts
|
|
@@ -2860,6 +3027,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2860
3027
|
AdmonitionHeading,
|
|
2861
3028
|
Avatar,
|
|
2862
3029
|
Button,
|
|
3030
|
+
CTAModal,
|
|
2863
3031
|
Checkbox,
|
|
2864
3032
|
CircularProgress,
|
|
2865
3033
|
ConfirmModal,
|
|
@@ -2877,6 +3045,13 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2877
3045
|
Label,
|
|
2878
3046
|
Legend,
|
|
2879
3047
|
MODE_KEY,
|
|
3048
|
+
Menu,
|
|
3049
|
+
MenuContent,
|
|
3050
|
+
MenuGroupLabel,
|
|
3051
|
+
MenuItem,
|
|
3052
|
+
MenuItemGroup,
|
|
3053
|
+
MenuSeparator,
|
|
3054
|
+
MenuTrigger,
|
|
2880
3055
|
Modal,
|
|
2881
3056
|
ModalDescription,
|
|
2882
3057
|
ModalHeader,
|
|
@@ -2915,9 +3090,11 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2915
3090
|
Tr,
|
|
2916
3091
|
createNavTriggerProps,
|
|
2917
3092
|
defineIcons,
|
|
3093
|
+
formatNotifyCount,
|
|
2918
3094
|
getPosition,
|
|
2919
3095
|
processStatus,
|
|
2920
3096
|
trapFocus,
|
|
3097
|
+
useCTAModal,
|
|
2921
3098
|
useConfirmModal,
|
|
2922
3099
|
useFeatureFlags,
|
|
2923
3100
|
useFieldContext,
|