@aivenio/aquarium 2.0.0 → 2.1.1
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/README.md +10 -2
- package/dist/atoms.cjs +144 -38
- package/dist/atoms.mjs +143 -38
- package/dist/charts.cjs +47 -21
- package/dist/charts.mjs +44 -21
- package/dist/src/atoms/Modal/Modal.d.ts +287 -3
- package/dist/src/atoms/Modal/Modal.js +121 -31
- package/dist/src/atoms/Select/Select.js +3 -2
- package/dist/src/charts/Axis/Axis.d.ts +11 -1
- package/dist/src/charts/Axis/Axis.js +15 -8
- package/dist/src/charts/lib/utils.d.ts +7 -2
- package/dist/src/charts/lib/utils.js +37 -13
- package/dist/src/icons/disasterRecovery.d.ts +9 -0
- package/dist/src/icons/disasterRecovery.js +11 -0
- package/dist/src/icons/index.d.ts +1 -0
- package/dist/src/icons/index.js +2 -1
- package/dist/src/molecules/Drawer/Drawer.d.ts +1 -1
- package/dist/src/molecules/Drawer/Drawer.js +37 -53
- package/dist/src/molecules/Modal/Modal.d.ts +3 -8
- package/dist/src/molecules/Modal/Modal.js +31 -50
- package/dist/src/molecules/Modal/ModalTitle.d.ts +5 -0
- package/dist/src/molecules/Modal/ModalTitle.js +20 -0
- package/dist/src/molecules/Pagination/Pagination.js +2 -2
- package/dist/styles.css +17 -3
- package/dist/system.cjs +658 -592
- package/dist/system.mjs +623 -557
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
@@ -1482,6 +1482,22 @@ var require_deliveryLocation = __commonJS({
|
|
1482
1482
|
}
|
1483
1483
|
});
|
1484
1484
|
|
1485
|
+
// src/icons/disasterRecovery.js
|
1486
|
+
var require_disasterRecovery = __commonJS({
|
1487
|
+
"src/icons/disasterRecovery.js"(exports) {
|
1488
|
+
"use strict";
|
1489
|
+
var data = {
|
1490
|
+
"body": '<mask id="svgIDa" fill="#fff"><path d="m13.838 8.734 1.983.731.515-1.396-1.983-.73zm-4.947.96 1.983.73.515-1.396-1.983-.73zM8.077 1.7l-3.73 10.128c.561-.45 1.211-.795 1.963-.814l2.693-7.312 9.639 3.55-1.388 3.773c.533.013 1.04.208 1.458.55l1.934-5.248zm4.88 9.491 1.983.73.515-1.395-1.984-.73zM9.772 7.237l1.984.73.514-1.395-1.983-.73zM2.748 15.91c.725.065 1.48-.262 2.082-.897l.219-.236c.184-.203.572-.627.9-.902.033.572.254 1.073.428 1.336a1.95 1.95 0 001.472.89c.759.067 1.616-.305 2.246-.968l.213-.231c.21-.23.655-.715 1.024-1.02a2.85 2.85 0 00.429 1.326c.346.523.87.837 1.474.89.761.064 1.622-.305 2.251-.968.065-.067.133-.143.205-.22.193-.211.655-.715 1.038-1.027a2.85 2.85 0 00.429 1.325c.369.557.912.892 1.528.944q.09.008.177.008c.665 0 1.346-.32 1.892-.894l-1.13-1.074c-.253.268-.564.426-.804.406-.088-.008-.22-.042-.361-.255-.096-.143-.263-.614-.107-.923l.237-.465-.34-.396a1.38 1.38 0 00-1.048-.499h-.024c-.912 0-1.734.814-2.63 1.797a9 9 0 01-.19.205c-.294.31-.692.504-.983.48-.093-.007-.203-.038-.31-.2-.095-.145-.262-.613-.106-.922l.229-.46-.343-.395a1.38 1.38 0 00-1.048-.5h-.02c-.986 0-1.89.991-2.62 1.79l-.198.212c-.292.31-.692.502-.978.481-.09-.008-.2-.039-.307-.2-.096-.143-.262-.614-.106-.923l.236-.465-.34-.395a1.4 1.4 0 00-1.066-.512h-.02c-.952 0-1.8.928-2.48 1.676-.074.078-.141.154-.201.219-.257.27-.577.434-.811.41-.088-.007-.218-.041-.356-.25l-1.3.864c.367.554.907.886 1.518.938m16.068 2.834c-.088-.008-.22-.042-.361-.255-.096-.143-.263-.613-.107-.923l.237-.465-.34-.395a1.38 1.38 0 00-1.048-.5h-.024c-.912 0-1.734.814-2.633 1.797a9 9 0 01-.19.205c-.294.31-.697.505-.983.481-.093-.008-.202-.039-.309-.2-.096-.145-.262-.613-.107-.923l.237-.465-.343-.395a1.38 1.38 0 00-1.048-.5h-.02c-.91 0-1.727.812-2.62 1.79l-.196.212c-.291.307-.691.505-.977.481-.091-.008-.2-.039-.307-.2-.096-.143-.263-.613-.107-.923l.237-.465-.34-.395a1.4 1.4 0 00-1.066-.512H6.38c-.952 0-1.8.928-2.48 1.676-.073.078-.14.154-.2.219-.258.27-.578.429-.811.41-.091-.007-.221-.041-.36-.25l-1.299.864c.367.554.907.887 1.518.939.72.06 1.48-.263 2.082-.897q.101-.111.219-.237c.184-.203.572-.626.9-.902a2.9 2.9 0 00.428 1.336c.346.523.871.837 1.472.89.756.064 1.616-.305 2.246-.968l.21-.229c.21-.228.655-.715 1.024-1.019a2.85 2.85 0 00.43 1.326c.345.523.87.837 1.473.89.757.064 1.622-.305 2.252-.968l.205-.22c.192-.211.655-.718 1.037-1.03.037.57.255 1.066.429 1.326.37.556.912.891 1.529.943q.091.008.176.008c.666 0 1.347-.32 1.893-.894l-1.134-1.069c-.252.268-.561.424-.803.406"/></mask><path fill="none" stroke="currentColor" stroke-miterlimit="16" stroke-width="1.6" d="m13.838 8.734 1.983.731.515-1.396-1.983-.73zm-4.947.96 1.983.73.515-1.396-1.983-.73zM8.077 1.7l-3.73 10.128c.561-.45 1.211-.795 1.963-.814l2.693-7.312 9.639 3.55-1.388 3.773c.533.013 1.04.208 1.458.55l1.934-5.248zm4.88 9.491 1.983.73.515-1.395-1.984-.73zM9.772 7.237l1.984.73.514-1.395-1.983-.73zM2.748 15.91c.725.065 1.48-.262 2.082-.897l.219-.236c.184-.203.572-.627.9-.902.033.572.254 1.073.428 1.336a1.95 1.95 0 001.472.89c.759.067 1.616-.305 2.246-.968l.213-.231c.21-.23.655-.715 1.024-1.02a2.85 2.85 0 00.429 1.326c.346.523.87.837 1.474.89.761.064 1.622-.305 2.251-.968.065-.067.133-.143.205-.22.193-.211.655-.715 1.038-1.027a2.85 2.85 0 00.429 1.325c.369.557.912.892 1.528.944q.09.008.177.008c.665 0 1.346-.32 1.892-.894l-1.13-1.074c-.253.268-.564.426-.804.406-.088-.008-.22-.042-.361-.255-.096-.143-.263-.614-.107-.923l.237-.465-.34-.396a1.38 1.38 0 00-1.048-.499h-.024c-.912 0-1.734.814-2.63 1.797a9 9 0 01-.19.205c-.294.31-.692.504-.983.48-.093-.007-.203-.038-.31-.2-.095-.145-.262-.613-.106-.922l.229-.46-.343-.395a1.38 1.38 0 00-1.048-.5h-.02c-.986 0-1.89.991-2.62 1.79l-.198.212c-.292.31-.692.502-.978.481-.09-.008-.2-.039-.307-.2-.096-.143-.262-.614-.106-.923l.236-.465-.34-.395a1.4 1.4 0 00-1.066-.512h-.02c-.952 0-1.8.928-2.48 1.676-.074.078-.141.154-.201.219-.257.27-.577.434-.811.41-.088-.007-.218-.041-.356-.25l-1.3.864c.367.554.907.886 1.518.938Zm16.068 2.834c-.088-.008-.22-.042-.361-.255-.096-.143-.263-.613-.107-.923l.237-.465-.34-.395a1.38 1.38 0 00-1.048-.5h-.024c-.912 0-1.734.814-2.633 1.797a9 9 0 01-.19.205c-.294.31-.697.505-.983.481-.093-.008-.202-.039-.309-.2-.096-.145-.262-.613-.107-.923l.237-.465-.343-.395a1.38 1.38 0 00-1.048-.5h-.02c-.91 0-1.727.812-2.62 1.79l-.196.212c-.291.307-.691.505-.977.481-.091-.008-.2-.039-.307-.2-.096-.143-.263-.613-.107-.923l.237-.465-.34-.395a1.4 1.4 0 00-1.066-.512H6.38c-.952 0-1.8.928-2.48 1.676-.073.078-.14.154-.2.219-.258.27-.578.429-.811.41-.091-.007-.221-.041-.36-.25l-1.299.864c.367.554.907.887 1.518.939.72.06 1.48-.263 2.082-.897q.101-.111.219-.237c.184-.203.572-.626.9-.902a2.9 2.9 0 00.428 1.336c.346.523.871.837 1.472.89.756.064 1.616-.305 2.246-.968l.21-.229c.21-.228.655-.715 1.024-1.019a2.85 2.85 0 00.43 1.326c.345.523.87.837 1.473.89.757.064 1.622-.305 2.252-.968l.205-.22c.192-.211.655-.718 1.037-1.03.037.57.255 1.066.429 1.326.37.556.912.891 1.529.943q.091.008.176.008c.666 0 1.347-.32 1.893-.894l-1.134-1.069c-.252.268-.561.424-.803.406Z" mask="url(#svgIDa)"/>',
|
1491
|
+
"left": 0,
|
1492
|
+
"top": 0,
|
1493
|
+
"width": 22,
|
1494
|
+
"height": 22
|
1495
|
+
};
|
1496
|
+
exports.__esModule = true;
|
1497
|
+
exports.default = data;
|
1498
|
+
}
|
1499
|
+
});
|
1500
|
+
|
1485
1501
|
// src/icons/document.js
|
1486
1502
|
var require_document = __commonJS({
|
1487
1503
|
"src/icons/document.js"(exports) {
|
@@ -4477,6 +4493,7 @@ var Group = React2.forwardRef((_a, ref) => {
|
|
4477
4493
|
)
|
4478
4494
|
}, props), children);
|
4479
4495
|
});
|
4496
|
+
var endAdornmentSize = { width: 14, height: 14 };
|
4480
4497
|
var Item = React2.forwardRef(
|
4481
4498
|
(_a, ref) => {
|
4482
4499
|
var _b = _a, { highlighted, selected, className, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "children"]);
|
@@ -4489,8 +4506,10 @@ var Item = React2.forwardRef(
|
|
4489
4506
|
})
|
4490
4507
|
}, props), /* @__PURE__ */ React2.createElement("span", {
|
4491
4508
|
className: tw("grow flex gap-x-3")
|
4492
|
-
}, children), selected
|
4509
|
+
}, children), selected ? /* @__PURE__ */ React2.createElement(InlineIcon, __spreadValues({
|
4493
4510
|
icon: import_tick.default
|
4511
|
+
}, endAdornmentSize)) : /* @__PURE__ */ React2.createElement("div", {
|
4512
|
+
style: endAdornmentSize
|
4494
4513
|
}));
|
4495
4514
|
}
|
4496
4515
|
);
|
@@ -4634,6 +4653,7 @@ var import_dataflow03 = __toESM(require_dataflow03());
|
|
4634
4653
|
var import_dbBackup = __toESM(require_dbBackup());
|
4635
4654
|
var import_delete = __toESM(require_delete());
|
4636
4655
|
var import_deliveryLocation = __toESM(require_deliveryLocation());
|
4656
|
+
var import_disasterRecovery = __toESM(require_disasterRecovery());
|
4637
4657
|
var import_document = __toESM(require_document());
|
4638
4658
|
var import_dot = __toESM(require_dot());
|
4639
4659
|
var import_doubleCaretHorizontal = __toESM(require_doubleCaretHorizontal());
|
@@ -10921,7 +10941,7 @@ var Pagination = ({
|
|
10921
10941
|
color: "default"
|
10922
10942
|
}, "Page")), /* @__PURE__ */ React59.createElement(InputBase, {
|
10923
10943
|
"aria-label": "Page",
|
10924
|
-
className: classNames(tw("text-center
|
10944
|
+
className: classNames(tw("text-center"), "no-arrows"),
|
10925
10945
|
type: "number",
|
10926
10946
|
min: 1,
|
10927
10947
|
max: totalPages,
|
@@ -13376,6 +13396,102 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
13376
13396
|
|
13377
13397
|
// src/atoms/Modal/Modal.tsx
|
13378
13398
|
import React86 from "react";
|
13399
|
+
import { tv as tv6 } from "tailwind-variants";
|
13400
|
+
var modalStyles = tv6({
|
13401
|
+
slots: {
|
13402
|
+
overlay: "inset-0 overflow-y-auto z-modal fixed",
|
13403
|
+
backdrop: "-z-10 fixed min-w-full min-h-full bg-body-intense opacity-70",
|
13404
|
+
dialog: "bg-popover-content max-h-full flex flex-col",
|
13405
|
+
header: "pl-7 pr-[64px] py-6 gap-3 flex items-center",
|
13406
|
+
headerImage: "h-[120px] min-h-[120px] w-full",
|
13407
|
+
titleContainer: "flex flex-col grow",
|
13408
|
+
title: "",
|
13409
|
+
closeButtonContainer: "absolute top-[24px] right-[28px]",
|
13410
|
+
body: "px-7 grow overflow-y-auto text-default",
|
13411
|
+
footer: "px-7 py-6",
|
13412
|
+
actions: "flex gap-4 justify-end"
|
13413
|
+
},
|
13414
|
+
variants: {
|
13415
|
+
kind: {
|
13416
|
+
dialog: {
|
13417
|
+
overlay: "py-7 justify-center flex items-center",
|
13418
|
+
dialog: "relative w-full rounded mx-7"
|
13419
|
+
},
|
13420
|
+
drawer: {
|
13421
|
+
overlay: "overflow-x-hidden",
|
13422
|
+
dialog: "absolute h-full",
|
13423
|
+
title: "text-ellipsis overflow-x-hidden whitespace-nowrap"
|
13424
|
+
}
|
13425
|
+
},
|
13426
|
+
size: {
|
13427
|
+
sm: "",
|
13428
|
+
md: "",
|
13429
|
+
full: "",
|
13430
|
+
screen: {
|
13431
|
+
overlay: "py-0",
|
13432
|
+
dialog: "w-dvw h-dvh mx-0 rounded-none",
|
13433
|
+
header: "border-b-1 border-muted mb-6"
|
13434
|
+
}
|
13435
|
+
},
|
13436
|
+
noFooter: {
|
13437
|
+
true: {
|
13438
|
+
body: "pb-6"
|
13439
|
+
}
|
13440
|
+
},
|
13441
|
+
backgroundImage: {
|
13442
|
+
true: {
|
13443
|
+
headerImage: "object-cover"
|
13444
|
+
},
|
13445
|
+
false: {
|
13446
|
+
headerImage: "bg-default"
|
13447
|
+
}
|
13448
|
+
}
|
13449
|
+
},
|
13450
|
+
compoundVariants: [
|
13451
|
+
{
|
13452
|
+
kind: "dialog",
|
13453
|
+
size: "sm",
|
13454
|
+
class: {
|
13455
|
+
dialog: "max-w-[600px]"
|
13456
|
+
}
|
13457
|
+
},
|
13458
|
+
{
|
13459
|
+
kind: "dialog",
|
13460
|
+
size: "md",
|
13461
|
+
class: {
|
13462
|
+
dialog: "max-w-[940px]"
|
13463
|
+
}
|
13464
|
+
},
|
13465
|
+
{
|
13466
|
+
kind: "dialog",
|
13467
|
+
size: "full",
|
13468
|
+
class: {
|
13469
|
+
dialog: "min-h-full"
|
13470
|
+
}
|
13471
|
+
},
|
13472
|
+
{
|
13473
|
+
kind: "drawer",
|
13474
|
+
size: "sm",
|
13475
|
+
class: {
|
13476
|
+
dialog: "w-[360px]"
|
13477
|
+
}
|
13478
|
+
},
|
13479
|
+
{
|
13480
|
+
kind: "drawer",
|
13481
|
+
size: "md",
|
13482
|
+
class: {
|
13483
|
+
dialog: "w-[560px]"
|
13484
|
+
}
|
13485
|
+
},
|
13486
|
+
{
|
13487
|
+
kind: "drawer",
|
13488
|
+
size: "full",
|
13489
|
+
class: {
|
13490
|
+
dialog: "w-[1080px]"
|
13491
|
+
}
|
13492
|
+
}
|
13493
|
+
]
|
13494
|
+
});
|
13379
13495
|
var Modal = (_a) => {
|
13380
13496
|
var _b = _a, {
|
13381
13497
|
children,
|
@@ -13388,80 +13504,64 @@ var Modal = (_a) => {
|
|
13388
13504
|
"className",
|
13389
13505
|
"open"
|
13390
13506
|
]);
|
13507
|
+
const { overlay } = modalStyles({ kind });
|
13391
13508
|
return open ? /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13392
|
-
className:
|
13393
|
-
tw("inset-0 overflow-y-auto z-modal fixed"),
|
13394
|
-
{
|
13395
|
-
"py-7 justify-center flex items-center": kind === "dialog"
|
13396
|
-
},
|
13397
|
-
className
|
13398
|
-
)
|
13509
|
+
className: overlay({ className })
|
13399
13510
|
}), children) : null;
|
13400
13511
|
};
|
13401
13512
|
Modal.BackDrop = (_a) => {
|
13402
13513
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13514
|
+
const { backdrop } = modalStyles();
|
13403
13515
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13404
|
-
className:
|
13516
|
+
className: backdrop({ className })
|
13405
13517
|
}));
|
13406
13518
|
};
|
13407
13519
|
Modal.Dialog = React86.forwardRef(
|
13408
13520
|
(_a, ref) => {
|
13409
|
-
var _b = _a, { kind = "dialog", children, className, size = "
|
13410
|
-
const
|
13411
|
-
const dialogClasses = classNames("relative w-full rounded mx-7", {
|
13412
|
-
"max-w-[600px]": size === "sm",
|
13413
|
-
"max-w-[940px]": size === "md",
|
13414
|
-
"min-h-full": size === "full"
|
13415
|
-
});
|
13416
|
-
const drawerClasses = classNames("absolute h-full", {
|
13417
|
-
"w-[360px]": size === "sm",
|
13418
|
-
"w-[560px]": size === "md",
|
13419
|
-
"w-[1080px]": size === "full"
|
13420
|
-
});
|
13521
|
+
var _b = _a, { kind = "dialog", children, className, size = "md" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
13522
|
+
const { dialog } = modalStyles({ kind, size });
|
13421
13523
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({
|
13422
13524
|
ref,
|
13423
13525
|
"aria-modal": "true"
|
13424
13526
|
}, rest), {
|
13425
|
-
className:
|
13527
|
+
className: dialog({ className })
|
13426
13528
|
}), children);
|
13427
13529
|
}
|
13428
13530
|
);
|
13429
13531
|
Modal.Header = (_a) => {
|
13430
|
-
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13532
|
+
var _b = _a, { kind = "dialog", size = "md", children, className } = _b, rest = __objRest(_b, ["kind", "size", "children", "className"]);
|
13533
|
+
const { header } = modalStyles({ kind, size });
|
13431
13534
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13432
|
-
className:
|
13535
|
+
className: header({ className })
|
13433
13536
|
}), children);
|
13434
13537
|
};
|
13435
13538
|
Modal.HeaderImage = (_a) => {
|
13436
13539
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
13437
|
-
const
|
13540
|
+
const { headerImage } = modalStyles({ backgroundImage: Boolean(backgroundImage) });
|
13438
13541
|
return backgroundImage ? /* @__PURE__ */ React86.createElement("img", __spreadProps(__spreadValues({
|
13439
13542
|
"aria-hidden": true,
|
13440
13543
|
src: backgroundImage != null ? backgroundImage : void 0
|
13441
13544
|
}, rest), {
|
13442
|
-
className:
|
13545
|
+
className: headerImage({ className })
|
13443
13546
|
})) : /* @__PURE__ */ React86.createElement("div", {
|
13444
|
-
className:
|
13547
|
+
className: headerImage({ className })
|
13445
13548
|
});
|
13446
13549
|
};
|
13447
13550
|
Modal.CloseButtonContainer = (_a) => {
|
13448
13551
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13552
|
+
const { closeButtonContainer } = modalStyles();
|
13449
13553
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13450
|
-
className:
|
13554
|
+
className: closeButtonContainer({ className })
|
13451
13555
|
}));
|
13452
13556
|
};
|
13453
13557
|
Modal.Title = (_a) => {
|
13454
13558
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
13559
|
+
const { title } = modalStyles({ kind });
|
13455
13560
|
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
13456
13561
|
htmlTag: "h2",
|
13457
13562
|
variant: "subheading",
|
13458
13563
|
color: "intense",
|
13459
|
-
className:
|
13460
|
-
tw({
|
13461
|
-
"text-ellipsis overflow-x-hidden whitespace-nowrap": kind === "drawer"
|
13462
|
-
}),
|
13463
|
-
className
|
13464
|
-
)
|
13564
|
+
className: title({ className })
|
13465
13565
|
}, rest), children);
|
13466
13566
|
};
|
13467
13567
|
Modal.Subtitle = (_a) => {
|
@@ -13473,27 +13573,31 @@ Modal.Subtitle = (_a) => {
|
|
13473
13573
|
};
|
13474
13574
|
Modal.TitleContainer = (_a) => {
|
13475
13575
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13576
|
+
const { titleContainer } = modalStyles();
|
13476
13577
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13477
|
-
className:
|
13578
|
+
className: titleContainer({ className })
|
13478
13579
|
}), children);
|
13479
13580
|
};
|
13480
13581
|
Modal.Body = (_a) => {
|
13481
13582
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
13583
|
+
const { body } = modalStyles();
|
13482
13584
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13483
|
-
className:
|
13585
|
+
className: body({ noFooter, className }),
|
13484
13586
|
style: __spreadValues({ maxHeight }, style)
|
13485
13587
|
}), children);
|
13486
13588
|
};
|
13487
13589
|
Modal.Footer = (_a) => {
|
13488
13590
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13591
|
+
const { footer } = modalStyles();
|
13489
13592
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13490
|
-
className:
|
13593
|
+
className: footer({ className })
|
13491
13594
|
}), children);
|
13492
13595
|
};
|
13493
13596
|
Modal.Actions = (_a) => {
|
13494
13597
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13598
|
+
const { actions } = modalStyles();
|
13495
13599
|
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13496
|
-
className:
|
13600
|
+
className: actions({ className })
|
13497
13601
|
}), children);
|
13498
13602
|
};
|
13499
13603
|
|
@@ -13560,28 +13664,36 @@ var DialogWrapper = ({
|
|
13560
13664
|
};
|
13561
13665
|
|
13562
13666
|
// src/molecules/Drawer/Drawer.tsx
|
13563
|
-
import
|
13564
|
-
import {
|
13565
|
-
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
13566
|
-
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
13567
|
-
import { useId as useId13 } from "@react-aria/utils";
|
13667
|
+
import React90 from "react";
|
13668
|
+
import { Dialog as AriaDialog2, Modal as AriaModal, ModalOverlay as AriaModalOverlay } from "react-aria-components";
|
13568
13669
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
13569
13670
|
import castArray3 from "lodash/castArray";
|
13570
13671
|
import omit12 from "lodash/omit";
|
13571
13672
|
|
13673
|
+
// src/molecules/Modal/ModalTitle.tsx
|
13674
|
+
import React88 from "react";
|
13675
|
+
import { HeadingContext, useContextProps } from "react-aria-components";
|
13676
|
+
var ModalTitle = (_a) => {
|
13677
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
13678
|
+
const [ctxProps] = useContextProps(__spreadProps(__spreadValues({}, props), { slot: "title" }), null, HeadingContext);
|
13679
|
+
return /* @__PURE__ */ React88.createElement(Modal.Title, __spreadValues({
|
13680
|
+
id: ctxProps.id
|
13681
|
+
}, props), children);
|
13682
|
+
};
|
13683
|
+
|
13572
13684
|
// src/molecules/Tabs/Tabs.tsx
|
13573
|
-
import
|
13685
|
+
import React89, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
|
13574
13686
|
import isNumber5 from "lodash/isNumber";
|
13575
13687
|
import kebabCase from "lodash/kebabCase";
|
13576
13688
|
var import_chevronLeft5 = __toESM(require_chevronLeft());
|
13577
13689
|
var import_chevronRight5 = __toESM(require_chevronRight());
|
13578
13690
|
var import_warningSign4 = __toESM(require_warningSign());
|
13579
13691
|
var isTabComponent = (c) => {
|
13580
|
-
return
|
13692
|
+
return React89.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
13581
13693
|
};
|
13582
|
-
var Tab =
|
13694
|
+
var Tab = React89.forwardRef(
|
13583
13695
|
({ className, id, title, children }, ref) => {
|
13584
|
-
return /* @__PURE__ */
|
13696
|
+
return /* @__PURE__ */ React89.createElement("div", {
|
13585
13697
|
ref,
|
13586
13698
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
13587
13699
|
className,
|
@@ -13593,14 +13705,14 @@ var Tab = React88.forwardRef(
|
|
13593
13705
|
);
|
13594
13706
|
var TabContainer = (_a) => {
|
13595
13707
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
13596
|
-
return /* @__PURE__ */
|
13708
|
+
return /* @__PURE__ */ React89.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13597
13709
|
className: classNames("py-6 z-0", className)
|
13598
13710
|
}), children);
|
13599
13711
|
};
|
13600
13712
|
var ModalTab = Tab;
|
13601
13713
|
var ModalTabContainer = TabContainer;
|
13602
13714
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
13603
|
-
const Tab2 =
|
13715
|
+
const Tab2 = React89.forwardRef(
|
13604
13716
|
(_a, ref) => {
|
13605
13717
|
var _b = _a, {
|
13606
13718
|
id,
|
@@ -13632,17 +13744,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13632
13744
|
const _id = id != null ? id : kebabCase(title);
|
13633
13745
|
let statusIcon = void 0;
|
13634
13746
|
if (status === "warning") {
|
13635
|
-
statusIcon = /* @__PURE__ */
|
13747
|
+
statusIcon = /* @__PURE__ */ React89.createElement(InlineIcon, {
|
13636
13748
|
icon: import_warningSign4.default,
|
13637
13749
|
color: selected ? void 0 : "warning-default"
|
13638
13750
|
});
|
13639
13751
|
} else if (status === "error") {
|
13640
|
-
statusIcon = /* @__PURE__ */
|
13752
|
+
statusIcon = /* @__PURE__ */ React89.createElement(InlineIcon, {
|
13641
13753
|
icon: import_warningSign4.default,
|
13642
13754
|
color: selected ? void 0 : "danger-default"
|
13643
13755
|
});
|
13644
13756
|
}
|
13645
|
-
const tab = /* @__PURE__ */
|
13757
|
+
const tab = /* @__PURE__ */ React89.createElement(Component, __spreadValues({
|
13646
13758
|
ref,
|
13647
13759
|
id: `${_id}-tab`,
|
13648
13760
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -13659,29 +13771,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13659
13771
|
"aria-selected": selected,
|
13660
13772
|
"aria-controls": `${_id}-panel`,
|
13661
13773
|
tabIndex: disabled ? void 0 : 0
|
13662
|
-
}, rest), /* @__PURE__ */
|
13774
|
+
}, rest), /* @__PURE__ */ React89.createElement(Typography2, {
|
13663
13775
|
htmlTag: "div",
|
13664
13776
|
variant: "small-strong",
|
13665
13777
|
color: selected ? "primary-default" : disabled ? "default" : "current",
|
13666
13778
|
className: tw("inline-flex items-center gap-3")
|
13667
|
-
}, showNotification ? /* @__PURE__ */
|
13779
|
+
}, showNotification ? /* @__PURE__ */ React89.createElement(Badge.Notification, {
|
13668
13780
|
right: "-4px",
|
13669
13781
|
top: "3px"
|
13670
|
-
}, /* @__PURE__ */
|
13782
|
+
}, /* @__PURE__ */ React89.createElement("span", {
|
13671
13783
|
className: tw("whitespace-nowrap")
|
13672
|
-
}, title)) : /* @__PURE__ */
|
13784
|
+
}, title)) : /* @__PURE__ */ React89.createElement("span", {
|
13673
13785
|
className: tw("whitespace-nowrap")
|
13674
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
13786
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React89.createElement(Typography2, {
|
13675
13787
|
htmlTag: "span",
|
13676
13788
|
variant: "small",
|
13677
13789
|
color: selected ? "primary-intense" : "grey-5",
|
13678
13790
|
className: "leading-none"
|
13679
|
-
}, /* @__PURE__ */
|
13791
|
+
}, /* @__PURE__ */ React89.createElement(TabBadge, {
|
13680
13792
|
kind: "filled",
|
13681
13793
|
value: badge,
|
13682
13794
|
textClassname: classNames({ "text-white": selected, "text-muted": !selected })
|
13683
13795
|
})), statusIcon));
|
13684
|
-
return tooltip ? /* @__PURE__ */
|
13796
|
+
return tooltip ? /* @__PURE__ */ React89.createElement(Tooltip, {
|
13685
13797
|
content: tooltip
|
13686
13798
|
}, tab) : tab;
|
13687
13799
|
}
|
@@ -13695,7 +13807,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13695
13807
|
const Tabs2 = (props) => {
|
13696
13808
|
var _a, _b;
|
13697
13809
|
const { className, value, defaultValue, onChange, children } = props;
|
13698
|
-
const childArr =
|
13810
|
+
const childArr = React89.Children.toArray(children);
|
13699
13811
|
const firstTab = childArr[0];
|
13700
13812
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
13701
13813
|
const [selected, setSelected] = useState11((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -13708,7 +13820,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13708
13820
|
var _a2, _b2;
|
13709
13821
|
const container = containerRef.current;
|
13710
13822
|
const tabs = tabsRef.current;
|
13711
|
-
const values =
|
13823
|
+
const values = React89.Children.map(
|
13712
13824
|
children,
|
13713
13825
|
(tab, i) => {
|
13714
13826
|
var _a3;
|
@@ -13749,7 +13861,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13749
13861
|
updateCarets();
|
13750
13862
|
setSelected(value);
|
13751
13863
|
revealSelectedTab({ smooth: value !== selected });
|
13752
|
-
}, [value,
|
13864
|
+
}, [value, React89.Children.count(children)]);
|
13753
13865
|
useLayoutEffect2(() => {
|
13754
13866
|
var _a2;
|
13755
13867
|
updateCarets();
|
@@ -13813,27 +13925,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13813
13925
|
const handleSelected = (key) => {
|
13814
13926
|
(onChange != null ? onChange : setSelected)(key);
|
13815
13927
|
};
|
13816
|
-
|
13928
|
+
React89.Children.forEach(children, (c) => {
|
13817
13929
|
if (c && !isTabComponent(c)) {
|
13818
13930
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
13819
13931
|
}
|
13820
13932
|
});
|
13821
|
-
return /* @__PURE__ */
|
13933
|
+
return /* @__PURE__ */ React89.createElement("div", {
|
13822
13934
|
ref: parentRef,
|
13823
13935
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
13824
|
-
}, /* @__PURE__ */
|
13936
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
13825
13937
|
className: tw("relative flex items-center border-b-2 border-default")
|
13826
|
-
}, /* @__PURE__ */
|
13938
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
13827
13939
|
ref: containerRef,
|
13828
13940
|
className: tw("overflow-y-auto scrollbar-hide mb-[-2px] h-auto")
|
13829
|
-
}, /* @__PURE__ */
|
13941
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
13830
13942
|
ref: tabsRef,
|
13831
13943
|
role: "tablist",
|
13832
13944
|
"aria-label": "tabs",
|
13833
13945
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
13834
|
-
},
|
13946
|
+
}, React89.Children.map(
|
13835
13947
|
children,
|
13836
|
-
(tab, index) => tab ? /* @__PURE__ */
|
13948
|
+
(tab, index) => tab ? /* @__PURE__ */ React89.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
13837
13949
|
key: tab.props.value
|
13838
13950
|
}, tab.props), {
|
13839
13951
|
index,
|
@@ -13841,20 +13953,20 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13841
13953
|
onKeyDown: handleKeyDown,
|
13842
13954
|
onSelected: handleSelected
|
13843
13955
|
})) : void 0
|
13844
|
-
))), leftCaret && /* @__PURE__ */
|
13956
|
+
))), leftCaret && /* @__PURE__ */ React89.createElement("div", {
|
13845
13957
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
13846
|
-
}, /* @__PURE__ */
|
13958
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
13847
13959
|
onClick: () => handleScrollToNext("left"),
|
13848
13960
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13849
|
-
}, /* @__PURE__ */
|
13961
|
+
}, /* @__PURE__ */ React89.createElement(InlineIcon, {
|
13850
13962
|
icon: import_chevronLeft5.default
|
13851
|
-
}))), rightCaret && /* @__PURE__ */
|
13963
|
+
}))), rightCaret && /* @__PURE__ */ React89.createElement("div", {
|
13852
13964
|
onClick: () => handleScrollToNext("right"),
|
13853
13965
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
13854
|
-
}, /* @__PURE__ */
|
13966
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
13855
13967
|
onClick: () => handleScrollToNext("right"),
|
13856
13968
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13857
|
-
}, /* @__PURE__ */
|
13969
|
+
}, /* @__PURE__ */ React89.createElement(InlineIcon, {
|
13858
13970
|
icon: import_chevronRight5.default
|
13859
13971
|
})))), renderChildren(children, selected, props));
|
13860
13972
|
};
|
@@ -13862,7 +13974,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13862
13974
|
Tabs2.Tab = TabComponent;
|
13863
13975
|
return Tabs2;
|
13864
13976
|
};
|
13865
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
13977
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React89.createElement(TabContainer, null, children.find(
|
13866
13978
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13867
13979
|
)));
|
13868
13980
|
|
@@ -13876,20 +13988,25 @@ var WIDTHS = {
|
|
13876
13988
|
md: 560,
|
13877
13989
|
lg: 1080
|
13878
13990
|
};
|
13879
|
-
var Drawer = (
|
13880
|
-
|
13881
|
-
|
13882
|
-
|
13883
|
-
|
13884
|
-
|
13991
|
+
var Drawer = ({
|
13992
|
+
open,
|
13993
|
+
onClose,
|
13994
|
+
size = "sm",
|
13995
|
+
children,
|
13996
|
+
title,
|
13997
|
+
menu,
|
13998
|
+
menuAriaLabel,
|
13999
|
+
menuLabel,
|
14000
|
+
onMenuOpenChange,
|
14001
|
+
onAction,
|
14002
|
+
primaryAction,
|
14003
|
+
secondaryActions,
|
14004
|
+
closeOnEsc = true
|
14005
|
+
}) => {
|
14006
|
+
const [hidden, setHidden] = React90.useState(!open);
|
13885
14007
|
if (open && hidden) {
|
13886
14008
|
setHidden(!open);
|
13887
14009
|
}
|
13888
|
-
const { modalProps, underlayProps } = useModalOverlay2(
|
13889
|
-
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
13890
|
-
state,
|
13891
|
-
ref
|
13892
|
-
);
|
13893
14010
|
const { opacity, right } = useSpring4({
|
13894
14011
|
right: open ? "0px" : `-${WIDTHS[size]}px`,
|
13895
14012
|
opacity: open ? 0.6 : 0,
|
@@ -13904,130 +14021,89 @@ var Drawer = (_a) => {
|
|
13904
14021
|
}
|
13905
14022
|
}
|
13906
14023
|
});
|
13907
|
-
if (
|
14024
|
+
if (hidden) {
|
13908
14025
|
return null;
|
13909
14026
|
}
|
13910
|
-
|
13911
|
-
|
13912
|
-
|
13913
|
-
|
13914
|
-
|
13915
|
-
|
13916
|
-
|
14027
|
+
const dialogSize = size === "lg" ? "full" : size;
|
14028
|
+
const styles = modalStyles({ kind: "drawer", size: dialogSize });
|
14029
|
+
const childElements = React90.Children.toArray(children).filter(React90.isValidElement);
|
14030
|
+
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
14031
|
+
const hasTabs = isComponentType(onlyChild, Tabs);
|
14032
|
+
return /* @__PURE__ */ React90.createElement(AriaModalOverlay, {
|
14033
|
+
isOpen: !hidden,
|
14034
|
+
onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()),
|
14035
|
+
isDismissable: false,
|
14036
|
+
isKeyboardDismissDisabled: !closeOnEsc,
|
14037
|
+
className: styles.overlay({ className: "Aquarium-Drawer" })
|
14038
|
+
}, /* @__PURE__ */ React90.createElement(AnimatedBackDrop, {
|
13917
14039
|
style: { opacity }
|
13918
|
-
},
|
13919
|
-
|
13920
|
-
|
13921
|
-
|
13922
|
-
|
13923
|
-
}
|
13924
|
-
|
13925
|
-
|
13926
|
-
var
|
13927
|
-
|
13928
|
-
children,
|
13929
|
-
size = "sm",
|
13930
|
-
primaryAction,
|
13931
|
-
secondaryActions,
|
13932
|
-
onClose,
|
13933
|
-
spring,
|
13934
|
-
onAction,
|
13935
|
-
menu,
|
13936
|
-
onMenuOpenChange,
|
13937
|
-
menuLabel,
|
13938
|
-
menuAriaLabel
|
13939
|
-
} = _b, props = __objRest(_b, [
|
13940
|
-
"title",
|
13941
|
-
"children",
|
13942
|
-
"size",
|
13943
|
-
"primaryAction",
|
13944
|
-
"secondaryActions",
|
13945
|
-
"onClose",
|
13946
|
-
"spring",
|
13947
|
-
"onAction",
|
13948
|
-
"menu",
|
13949
|
-
"onMenuOpenChange",
|
13950
|
-
"menuLabel",
|
13951
|
-
"menuAriaLabel"
|
13952
|
-
]);
|
13953
|
-
var _a2;
|
13954
|
-
const labelledBy = useId13();
|
13955
|
-
const describedBy = useId13();
|
13956
|
-
const { dialogProps } = useDialog2(
|
13957
|
-
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13958
|
-
ref
|
13959
|
-
);
|
13960
|
-
const dialogSize = size === "lg" ? "full" : size;
|
13961
|
-
const childElements = React89.Children.toArray(children).filter(React89.isValidElement);
|
13962
|
-
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
13963
|
-
const hasTabs = isComponentType(onlyChild, Tabs);
|
13964
|
-
return /* @__PURE__ */ React89.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
13965
|
-
ref,
|
13966
|
-
kind: "drawer",
|
13967
|
-
"aria-modal": "true",
|
13968
|
-
size: dialogSize
|
13969
|
-
}, props), dialogProps), {
|
13970
|
-
style: { position: "fixed", right: spring.right }
|
13971
|
-
}), /* @__PURE__ */ React89.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
14040
|
+
}), /* @__PURE__ */ React90.createElement(AriaModal, null, /* @__PURE__ */ React90.createElement(AnimatedDialog, {
|
14041
|
+
kind: "drawer",
|
14042
|
+
"aria-modal": "true",
|
14043
|
+
size: dialogSize,
|
14044
|
+
style: { position: "fixed", right }
|
14045
|
+
}, /* @__PURE__ */ React90.createElement(AriaDialog2, {
|
14046
|
+
className: "flex flex-col grow overflow-y-auto"
|
14047
|
+
}, ({ close }) => {
|
14048
|
+
var _a;
|
14049
|
+
return /* @__PURE__ */ React90.createElement(React90.Fragment, null, /* @__PURE__ */ React90.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React90.createElement(Button.Icon, {
|
13972
14050
|
"aria-label": "Close",
|
13973
14051
|
icon: import_cross6.default,
|
13974
|
-
onClick:
|
13975
|
-
})), /* @__PURE__ */
|
14052
|
+
onClick: close
|
14053
|
+
})), /* @__PURE__ */ React90.createElement(Modal.Header, {
|
13976
14054
|
className: tw({ "pb-3": hasTabs })
|
13977
|
-
}, /* @__PURE__ */
|
13978
|
-
id: labelledBy,
|
14055
|
+
}, /* @__PURE__ */ React90.createElement(ModalTitle, {
|
13979
14056
|
kind: "drawer"
|
13980
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
14057
|
+
}, title)), hasTabs ? /* @__PURE__ */ React90.createElement(DrawerTabs, __spreadProps(__spreadValues({}, onlyChild.props), {
|
13981
14058
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
13982
|
-
})) : /* @__PURE__ */
|
13983
|
-
id: describedBy,
|
14059
|
+
})) : /* @__PURE__ */ React90.createElement(Modal.Body, {
|
13984
14060
|
tabIndex: 0,
|
13985
14061
|
noFooter: !(secondaryActions || primaryAction)
|
13986
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
14062
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React90.createElement(Modal.Footer, null, /* @__PURE__ */ React90.createElement(Modal.Actions, {
|
13987
14063
|
className: size === "sm" ? tw("flex-col") : void 0
|
13988
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
14064
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React90.createElement(Box.Flex, {
|
13989
14065
|
alignItems: "center"
|
13990
|
-
}, /* @__PURE__ */
|
14066
|
+
}, /* @__PURE__ */ React90.createElement(DropdownMenu2, {
|
13991
14067
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13992
14068
|
onOpenChange: onMenuOpenChange
|
13993
|
-
}, /* @__PURE__ */
|
13994
|
-
"aria-label": (
|
14069
|
+
}, /* @__PURE__ */ React90.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React90.createElement(Button.Icon, {
|
14070
|
+
"aria-label": (_a = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a : "Context menu",
|
13995
14071
|
icon: import_more4.default
|
13996
|
-
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((
|
13997
|
-
var _c =
|
13998
|
-
return /* @__PURE__ */
|
14072
|
+
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_b) => {
|
14073
|
+
var _c = _b, { text } = _c, action = __objRest(_c, ["text"]);
|
14074
|
+
return /* @__PURE__ */ React90.createElement(Button.Secondary, __spreadValues({
|
13999
14075
|
key: text
|
14000
14076
|
}, action), text);
|
14001
|
-
}), primaryAction && /* @__PURE__ */
|
14077
|
+
}), primaryAction && /* @__PURE__ */ React90.createElement(Button.Primary, __spreadValues({
|
14002
14078
|
key: primaryAction.text
|
14003
14079
|
}, omit12(primaryAction, "text")), primaryAction.text))));
|
14004
|
-
}
|
14005
|
-
|
14006
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
14080
|
+
}))));
|
14081
|
+
};
|
14082
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React90.createElement(Modal.Body, {
|
14007
14083
|
className: tw("h-full")
|
14008
|
-
}, /* @__PURE__ */
|
14084
|
+
}, /* @__PURE__ */ React90.createElement(ModalTabContainer, null, children.find(
|
14009
14085
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
14010
14086
|
))));
|
14011
14087
|
|
14012
14088
|
// src/molecules/Dropdown/Dropdown.tsx
|
14013
|
-
import
|
14089
|
+
import React93 from "react";
|
14014
14090
|
|
14015
14091
|
// src/molecules/Popover/Popover.tsx
|
14016
|
-
import
|
14092
|
+
import React92, { useRef as useRef11 } from "react";
|
14017
14093
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
14018
14094
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
14019
14095
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
14020
|
-
import { useOverlayTriggerState as
|
14096
|
+
import { useOverlayTriggerState as useOverlayTriggerState3 } from "@react-stately/overlays";
|
14021
14097
|
import classNames10 from "classnames";
|
14022
14098
|
import omit13 from "lodash/omit";
|
14023
14099
|
|
14024
14100
|
// src/molecules/Popover/Dialog.tsx
|
14025
|
-
import
|
14026
|
-
import { useDialog as
|
14101
|
+
import React91 from "react";
|
14102
|
+
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
14027
14103
|
var Dialog3 = ({ children }) => {
|
14028
|
-
const ref =
|
14029
|
-
const { dialogProps } =
|
14030
|
-
return /* @__PURE__ */
|
14104
|
+
const ref = React91.useRef(null);
|
14105
|
+
const { dialogProps } = useDialog2({}, ref);
|
14106
|
+
return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({
|
14031
14107
|
ref
|
14032
14108
|
}, dialogProps), {
|
14033
14109
|
className: tw("outline-none")
|
@@ -14059,7 +14135,7 @@ var Popover3 = (props) => {
|
|
14059
14135
|
shouldFlip
|
14060
14136
|
} = props;
|
14061
14137
|
const triggerRef = useRef11(null);
|
14062
|
-
const state =
|
14138
|
+
const state = useOverlayTriggerState3(__spreadProps(__spreadValues({}, props), {
|
14063
14139
|
onOpenChange: (isOpen) => {
|
14064
14140
|
var _a, _b;
|
14065
14141
|
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, isOpen);
|
@@ -14067,22 +14143,22 @@ var Popover3 = (props) => {
|
|
14067
14143
|
}
|
14068
14144
|
}));
|
14069
14145
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
14070
|
-
return /* @__PURE__ */
|
14146
|
+
return /* @__PURE__ */ React92.createElement(PopoverContext2.Provider, {
|
14071
14147
|
value: {
|
14072
14148
|
state
|
14073
14149
|
}
|
14074
|
-
},
|
14150
|
+
}, React92.Children.map(props.children, (child) => {
|
14075
14151
|
if (isComponentType(child, Popover3.Trigger)) {
|
14076
|
-
return /* @__PURE__ */
|
14152
|
+
return /* @__PURE__ */ React92.createElement(PressResponder2, __spreadValues({
|
14077
14153
|
ref: triggerRef
|
14078
|
-
}, omit13(triggerProps, "aria-expanded")), /* @__PURE__ */
|
14154
|
+
}, omit13(triggerProps, "aria-expanded")), /* @__PURE__ */ React92.createElement(PopoverTriggerWrapper, {
|
14079
14155
|
"data-testid": props["data-testid"],
|
14080
14156
|
"aria-controls": id,
|
14081
14157
|
"aria-expanded": triggerProps["aria-expanded"]
|
14082
14158
|
}, child.props.children));
|
14083
14159
|
}
|
14084
14160
|
if (isComponentType(child, Popover3.Panel)) {
|
14085
|
-
return state.isOpen && /* @__PURE__ */
|
14161
|
+
return state.isOpen && /* @__PURE__ */ React92.createElement(PopoverOverlay, __spreadValues({
|
14086
14162
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
14087
14163
|
state,
|
14088
14164
|
placement,
|
@@ -14093,7 +14169,7 @@ var Popover3 = (props) => {
|
|
14093
14169
|
offset,
|
14094
14170
|
crossOffset,
|
14095
14171
|
shouldFlip
|
14096
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
14172
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React92.createElement(Dialog3, null, child.props.children) : child.props.children);
|
14097
14173
|
}
|
14098
14174
|
throw new Error("Invalid children element type");
|
14099
14175
|
}));
|
@@ -14112,7 +14188,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
14112
14188
|
state.close();
|
14113
14189
|
onClick == null ? void 0 : onClick(e);
|
14114
14190
|
};
|
14115
|
-
return /* @__PURE__ */
|
14191
|
+
return /* @__PURE__ */ React92.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
14116
14192
|
onClick: handleClick
|
14117
14193
|
}));
|
14118
14194
|
};
|
@@ -14125,9 +14201,9 @@ var PopoverTriggerWrapper = (_a) => {
|
|
14125
14201
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14126
14202
|
var _a2;
|
14127
14203
|
const ref = useRef11(null);
|
14128
|
-
const trigger =
|
14204
|
+
const trigger = React92.Children.only(children);
|
14129
14205
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
14130
|
-
return
|
14206
|
+
return React92.cloneElement(trigger, __spreadProps(__spreadValues({
|
14131
14207
|
"ref": ref
|
14132
14208
|
}, mergeProps3(pressProps, trigger.props)), {
|
14133
14209
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -14136,10 +14212,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
14136
14212
|
|
14137
14213
|
// src/molecules/Dropdown/Dropdown.tsx
|
14138
14214
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
14139
|
-
return /* @__PURE__ */
|
14215
|
+
return /* @__PURE__ */ React93.createElement(Popover3, {
|
14140
14216
|
type: "menu",
|
14141
14217
|
placement
|
14142
|
-
}, /* @__PURE__ */
|
14218
|
+
}, /* @__PURE__ */ React93.createElement(Popover3.Trigger, null, children), /* @__PURE__ */ React93.createElement(Popover3.Panel, {
|
14143
14219
|
className: "Aquarium-Dropdown"
|
14144
14220
|
}, content));
|
14145
14221
|
};
|
@@ -14150,26 +14226,26 @@ var DropdownMenu3 = ({
|
|
14150
14226
|
triggerId,
|
14151
14227
|
setClose = () => void 0
|
14152
14228
|
}) => {
|
14153
|
-
const menuRef =
|
14154
|
-
|
14229
|
+
const menuRef = React93.useRef(null);
|
14230
|
+
React93.useEffect(() => {
|
14155
14231
|
const id = setTimeout(() => {
|
14156
14232
|
var _a, _b, _c;
|
14157
14233
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
14158
14234
|
});
|
14159
14235
|
return () => clearTimeout(id);
|
14160
14236
|
}, [menuRef.current]);
|
14161
|
-
return /* @__PURE__ */
|
14237
|
+
return /* @__PURE__ */ React93.createElement("div", {
|
14162
14238
|
style: { minWidth: "250px" },
|
14163
14239
|
className: tw("py-3 bg-popover-content")
|
14164
|
-
}, !!title && /* @__PURE__ */
|
14240
|
+
}, !!title && /* @__PURE__ */ React93.createElement("div", {
|
14165
14241
|
className: tw("px-4 py-4 text-left text-intense typography-default-strong")
|
14166
|
-
}, title), /* @__PURE__ */
|
14242
|
+
}, title), /* @__PURE__ */ React93.createElement("ol", {
|
14167
14243
|
role: "menu",
|
14168
14244
|
ref: menuRef,
|
14169
14245
|
id: contentId,
|
14170
14246
|
"aria-labelledby": triggerId
|
14171
|
-
},
|
14172
|
-
return
|
14247
|
+
}, React93.Children.map(children, (child) => {
|
14248
|
+
return React93.cloneElement(child, { setClose });
|
14173
14249
|
})));
|
14174
14250
|
};
|
14175
14251
|
var DropdownItem = (_a) => {
|
@@ -14224,10 +14300,10 @@ var DropdownItem = (_a) => {
|
|
14224
14300
|
handleSelect();
|
14225
14301
|
}
|
14226
14302
|
};
|
14227
|
-
const itemContent = /* @__PURE__ */
|
14303
|
+
const itemContent = /* @__PURE__ */ React93.createElement("div", {
|
14228
14304
|
className: tw("py-3 px-4")
|
14229
14305
|
}, children);
|
14230
|
-
return /* @__PURE__ */
|
14306
|
+
return /* @__PURE__ */ React93.createElement("li", __spreadProps(__spreadValues({
|
14231
14307
|
role: "menuitem",
|
14232
14308
|
tabIndex: -1,
|
14233
14309
|
onClick: handleClick,
|
@@ -14241,11 +14317,11 @@ var DropdownItem = (_a) => {
|
|
14241
14317
|
"text-danger-default": color === "danger" && !disabled
|
14242
14318
|
})
|
14243
14319
|
)
|
14244
|
-
}), tooltip ? /* @__PURE__ */
|
14320
|
+
}), tooltip ? /* @__PURE__ */ React93.createElement(Tooltip, {
|
14245
14321
|
content: tooltip,
|
14246
14322
|
placement: tooltipPlacement,
|
14247
14323
|
inline: false
|
14248
|
-
}, /* @__PURE__ */
|
14324
|
+
}, /* @__PURE__ */ React93.createElement("div", {
|
14249
14325
|
tabIndex: 0,
|
14250
14326
|
className: tw("grow")
|
14251
14327
|
}, itemContent)) : itemContent);
|
@@ -14254,7 +14330,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
14254
14330
|
Dropdown.Item = DropdownItem;
|
14255
14331
|
|
14256
14332
|
// src/molecules/EmptyState/EmptyState.tsx
|
14257
|
-
import
|
14333
|
+
import React94 from "react";
|
14258
14334
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
14259
14335
|
EmptyStateLayout2["Vertical"] = "vertical";
|
14260
14336
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -14311,7 +14387,7 @@ var EmptyState = ({
|
|
14311
14387
|
fullHeight = isVerticalLayout(layout) ? true : false
|
14312
14388
|
}) => {
|
14313
14389
|
const template = layoutStyle(layout);
|
14314
|
-
return /* @__PURE__ */
|
14390
|
+
return /* @__PURE__ */ React94.createElement(Box, {
|
14315
14391
|
className: classNames(
|
14316
14392
|
"Aquarium-EmptyState",
|
14317
14393
|
tw("rounded p-[56px]", {
|
@@ -14324,39 +14400,39 @@ var EmptyState = ({
|
|
14324
14400
|
),
|
14325
14401
|
backgroundColor: "transparent",
|
14326
14402
|
borderColor: "default"
|
14327
|
-
}, /* @__PURE__ */
|
14403
|
+
}, /* @__PURE__ */ React94.createElement(Box.Flex, {
|
14328
14404
|
style: { gap: "56px" },
|
14329
14405
|
flexDirection: template.layout,
|
14330
14406
|
justifyContent: template.justifyContent,
|
14331
14407
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
14332
14408
|
height: fullHeight ? "full" : void 0
|
14333
|
-
}, image && /* @__PURE__ */
|
14409
|
+
}, image && /* @__PURE__ */ React94.createElement("img", {
|
14334
14410
|
src: image,
|
14335
14411
|
alt: imageAlt,
|
14336
14412
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
14337
|
-
}), /* @__PURE__ */
|
14413
|
+
}), /* @__PURE__ */ React94.createElement(Box.Flex, {
|
14338
14414
|
flexDirection: "column",
|
14339
14415
|
justifyContent: template.justifyContent,
|
14340
14416
|
alignItems: template.alignItems
|
14341
|
-
}, /* @__PURE__ */
|
14417
|
+
}, /* @__PURE__ */ React94.createElement(Typography2.Heading, {
|
14342
14418
|
htmlTag: "h2"
|
14343
|
-
}, title), (description || children) && /* @__PURE__ */
|
14419
|
+
}, title), (description || children) && /* @__PURE__ */ React94.createElement(Box, {
|
14344
14420
|
marginTop: "5"
|
14345
|
-
}, /* @__PURE__ */
|
14421
|
+
}, /* @__PURE__ */ React94.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React94.createElement(Box.Flex, {
|
14346
14422
|
marginTop: "7",
|
14347
14423
|
gap: "4",
|
14348
14424
|
justifyContent: "center",
|
14349
14425
|
alignItems: "center",
|
14350
14426
|
flexWrap: "wrap"
|
14351
|
-
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */
|
14427
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React94.createElement(Box, {
|
14352
14428
|
marginTop: "5"
|
14353
|
-
}, /* @__PURE__ */
|
14429
|
+
}, /* @__PURE__ */ React94.createElement(Typography2.Small, {
|
14354
14430
|
color: "default"
|
14355
14431
|
}, footer)))));
|
14356
14432
|
};
|
14357
14433
|
|
14358
14434
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
14359
|
-
import
|
14435
|
+
import React95 from "react";
|
14360
14436
|
var FlexboxItem = Tailwindify(
|
14361
14437
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
14362
14438
|
const hookStyle = useStyle({
|
@@ -14368,7 +14444,7 @@ var FlexboxItem = Tailwindify(
|
|
14368
14444
|
alignSelf
|
14369
14445
|
});
|
14370
14446
|
const HtmlElement = htmlTag;
|
14371
|
-
return /* @__PURE__ */
|
14447
|
+
return /* @__PURE__ */ React95.createElement(HtmlElement, {
|
14372
14448
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
14373
14449
|
className
|
14374
14450
|
}, children);
|
@@ -14376,7 +14452,7 @@ var FlexboxItem = Tailwindify(
|
|
14376
14452
|
);
|
14377
14453
|
|
14378
14454
|
// src/molecules/Grid/GridItem.tsx
|
14379
|
-
import
|
14455
|
+
import React96 from "react";
|
14380
14456
|
var GridItem2 = Tailwindify(
|
14381
14457
|
({
|
14382
14458
|
htmlTag = "div",
|
@@ -14407,7 +14483,7 @@ var GridItem2 = Tailwindify(
|
|
14407
14483
|
gridRowEnd: rowEnd
|
14408
14484
|
});
|
14409
14485
|
const HtmlElement = htmlTag;
|
14410
|
-
return /* @__PURE__ */
|
14486
|
+
return /* @__PURE__ */ React96.createElement(HtmlElement, {
|
14411
14487
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
14412
14488
|
className
|
14413
14489
|
}, children);
|
@@ -14415,7 +14491,7 @@ var GridItem2 = Tailwindify(
|
|
14415
14491
|
);
|
14416
14492
|
|
14417
14493
|
// src/molecules/LineClamp/LineClamp.tsx
|
14418
|
-
import
|
14494
|
+
import React97 from "react";
|
14419
14495
|
var LineClamp2 = ({
|
14420
14496
|
lines,
|
14421
14497
|
children,
|
@@ -14424,10 +14500,10 @@ var LineClamp2 = ({
|
|
14424
14500
|
collapseLabel,
|
14425
14501
|
onClampedChange
|
14426
14502
|
}) => {
|
14427
|
-
const ref =
|
14428
|
-
const [clamped, setClamped] =
|
14429
|
-
const [isClampingEnabled, setClampingEnabled] =
|
14430
|
-
|
14503
|
+
const ref = React97.useRef(null);
|
14504
|
+
const [clamped, setClamped] = React97.useState(true);
|
14505
|
+
const [isClampingEnabled, setClampingEnabled] = React97.useState(false);
|
14506
|
+
React97.useEffect(() => {
|
14431
14507
|
var _a, _b;
|
14432
14508
|
const el = ref.current;
|
14433
14509
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -14436,28 +14512,28 @@ var LineClamp2 = ({
|
|
14436
14512
|
setClamped(!clamped);
|
14437
14513
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
14438
14514
|
};
|
14439
|
-
return /* @__PURE__ */
|
14515
|
+
return /* @__PURE__ */ React97.createElement("div", {
|
14440
14516
|
className: "Aquarium-LineClamp"
|
14441
|
-
}, /* @__PURE__ */
|
14517
|
+
}, /* @__PURE__ */ React97.createElement(LineClamp, {
|
14442
14518
|
ref,
|
14443
14519
|
lines,
|
14444
14520
|
clamped,
|
14445
14521
|
wordBreak
|
14446
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
14522
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React97.createElement(Button.Ghost, {
|
14447
14523
|
dense: true,
|
14448
14524
|
onClick: handleClampedChange
|
14449
14525
|
}, clamped ? expandLabel : collapseLabel));
|
14450
14526
|
};
|
14451
14527
|
|
14452
14528
|
// src/molecules/Link/Link.tsx
|
14453
|
-
import
|
14529
|
+
import React99 from "react";
|
14454
14530
|
import classNames11 from "classnames";
|
14455
14531
|
|
14456
14532
|
// src/atoms/Link/Link.tsx
|
14457
|
-
import
|
14533
|
+
import React98 from "react";
|
14458
14534
|
var Link = (_a) => {
|
14459
14535
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
14460
|
-
return /* @__PURE__ */
|
14536
|
+
return /* @__PURE__ */ React98.createElement("a", __spreadValues({
|
14461
14537
|
className: classNames(className, linkStyle)
|
14462
14538
|
}, props), children);
|
14463
14539
|
};
|
@@ -14465,27 +14541,27 @@ var Link = (_a) => {
|
|
14465
14541
|
// src/molecules/Link/Link.tsx
|
14466
14542
|
var Link2 = (_a) => {
|
14467
14543
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
14468
|
-
return /* @__PURE__ */
|
14544
|
+
return /* @__PURE__ */ React99.createElement(Link, __spreadValues({
|
14469
14545
|
className: classNames11("Aquarium-Link", className)
|
14470
14546
|
}, props));
|
14471
14547
|
};
|
14472
14548
|
|
14473
14549
|
// src/molecules/List/useStaticInfiniteList.ts
|
14474
|
-
import
|
14550
|
+
import React100 from "react";
|
14475
14551
|
var useStaticInfiniteList = ({
|
14476
14552
|
items,
|
14477
14553
|
pageSize,
|
14478
14554
|
autoReset = true
|
14479
14555
|
}) => {
|
14480
|
-
const [currentPage, setCurrentPage] =
|
14556
|
+
const [currentPage, setCurrentPage] = React100.useState(1);
|
14481
14557
|
const numberOfVisible = currentPage * pageSize;
|
14482
|
-
const next =
|
14558
|
+
const next = React100.useCallback(() => {
|
14483
14559
|
setCurrentPage((page) => page + 1);
|
14484
14560
|
}, [setCurrentPage]);
|
14485
|
-
const reset =
|
14561
|
+
const reset = React100.useCallback(() => {
|
14486
14562
|
setCurrentPage(1);
|
14487
14563
|
}, [setCurrentPage]);
|
14488
|
-
|
14564
|
+
React100.useEffect(() => {
|
14489
14565
|
if (autoReset) {
|
14490
14566
|
setCurrentPage(1);
|
14491
14567
|
}
|
@@ -14500,17 +14576,17 @@ var useStaticInfiniteList = ({
|
|
14500
14576
|
};
|
14501
14577
|
|
14502
14578
|
// src/molecules/ListItem/ListItem.tsx
|
14503
|
-
import
|
14579
|
+
import React101 from "react";
|
14504
14580
|
var ListItem = ({ name, icon, active = false }) => {
|
14505
|
-
return /* @__PURE__ */
|
14581
|
+
return /* @__PURE__ */ React101.createElement(Box.Flex, {
|
14506
14582
|
className: "Aquarium-ListItem",
|
14507
14583
|
alignItems: "center"
|
14508
|
-
}, /* @__PURE__ */
|
14584
|
+
}, /* @__PURE__ */ React101.createElement(Typography2, {
|
14509
14585
|
variant: active ? "small-strong" : "small",
|
14510
14586
|
color: "default",
|
14511
14587
|
htmlTag: "span",
|
14512
14588
|
className: `px-4 py-2 rounded-full ${active ? "bg-default" : "hover:bg-muted"}`
|
14513
|
-
}, /* @__PURE__ */
|
14589
|
+
}, /* @__PURE__ */ React101.createElement("img", {
|
14514
14590
|
src: icon,
|
14515
14591
|
alt: "",
|
14516
14592
|
className: "inline mr-4",
|
@@ -14520,96 +14596,86 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
14520
14596
|
};
|
14521
14597
|
|
14522
14598
|
// src/molecules/Modal/Modal.tsx
|
14523
|
-
import
|
14524
|
-
import {
|
14525
|
-
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
14526
|
-
import { useId as useId14 } from "@react-aria/utils";
|
14527
|
-
import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
|
14599
|
+
import React102 from "react";
|
14600
|
+
import { Dialog as AriaDialog3, Modal as AriaModal2, ModalOverlay as AriaModalOverlay2 } from "react-aria-components";
|
14528
14601
|
import castArray4 from "lodash/castArray";
|
14529
14602
|
import omit14 from "lodash/omit";
|
14530
14603
|
var import_cross7 = __toESM(require_cross());
|
14531
|
-
var Modal2 = (
|
14532
|
-
|
14533
|
-
|
14534
|
-
|
14535
|
-
|
14536
|
-
|
14537
|
-
|
14538
|
-
|
14539
|
-
|
14540
|
-
|
14541
|
-
|
14604
|
+
var Modal2 = ({
|
14605
|
+
open,
|
14606
|
+
onClose,
|
14607
|
+
closeOnEsc = true,
|
14608
|
+
size = "md",
|
14609
|
+
headerImage,
|
14610
|
+
children,
|
14611
|
+
title,
|
14612
|
+
subtitle,
|
14613
|
+
primaryAction,
|
14614
|
+
secondaryActions
|
14615
|
+
}) => {
|
14616
|
+
if (!open) {
|
14542
14617
|
return null;
|
14543
14618
|
}
|
14544
|
-
|
14545
|
-
|
14546
|
-
|
14547
|
-
|
14548
|
-
|
14549
|
-
|
14550
|
-
|
14551
|
-
|
14552
|
-
},
|
14619
|
+
const styles = modalStyles({ kind: "dialog", size });
|
14620
|
+
const hasTabs = isComponentType(children, ModalTabs);
|
14621
|
+
return /* @__PURE__ */ React102.createElement(AriaModalOverlay2, {
|
14622
|
+
isOpen: open,
|
14623
|
+
onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()),
|
14624
|
+
isDismissable: false,
|
14625
|
+
isKeyboardDismissDisabled: !closeOnEsc,
|
14626
|
+
className: styles.overlay({ className: "Aquarium-Modal" })
|
14627
|
+
}, size !== "screen" && /* @__PURE__ */ React102.createElement(Modal.BackDrop, {
|
14628
|
+
className: styles.backdrop()
|
14629
|
+
}), /* @__PURE__ */ React102.createElement(AriaModal2, {
|
14630
|
+
className: styles.dialog()
|
14631
|
+
}, /* @__PURE__ */ React102.createElement(AriaDialog3, {
|
14632
|
+
className: "flex flex-col grow overflow-y-auto"
|
14633
|
+
}, ({ close }) => /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React102.createElement(Button.Icon, {
|
14634
|
+
"aria-label": "Close",
|
14635
|
+
icon: import_cross7.default,
|
14636
|
+
onClick: close
|
14637
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React102.createElement(Modal.HeaderImage, {
|
14638
|
+
backgroundImage: headerImage
|
14639
|
+
}), /* @__PURE__ */ React102.createElement(Modal.Header, {
|
14640
|
+
kind: "dialog",
|
14641
|
+
size,
|
14642
|
+
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
14643
|
+
}, /* @__PURE__ */ React102.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React102.createElement(ModalTitle, {
|
14644
|
+
kind: "dialog"
|
14645
|
+
}, title), subtitle && /* @__PURE__ */ React102.createElement(Modal.Subtitle, null, subtitle))), hasTabs ? React102.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React102.createElement(Modal.Body, {
|
14646
|
+
tabIndex: 0,
|
14647
|
+
noFooter: !(secondaryActions || primaryAction)
|
14648
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React102.createElement(Modal.Footer, null, /* @__PURE__ */ React102.createElement(Modal.Actions, null, secondaryActions && castArray4(secondaryActions).filter(Boolean).map((_a) => {
|
14649
|
+
var _b = _a, { text } = _b, action = __objRest(_b, ["text"]);
|
14650
|
+
return /* @__PURE__ */ React102.createElement(Button.Secondary, __spreadValues({
|
14651
|
+
key: text
|
14652
|
+
}, action), text);
|
14653
|
+
}), primaryAction && /* @__PURE__ */ React102.createElement(Button.Primary, __spreadValues({
|
14654
|
+
key: primaryAction.text
|
14655
|
+
}, omit14(primaryAction, "text")), primaryAction.text)))))));
|
14553
14656
|
};
|
14554
|
-
var ModalWrapper = React101.forwardRef(
|
14555
|
-
(_a, ref) => {
|
14556
|
-
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
14557
|
-
const labelledBy = useId14();
|
14558
|
-
const describedBy = useId14();
|
14559
|
-
const { dialogProps } = useDialog4(
|
14560
|
-
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
14561
|
-
ref
|
14562
|
-
);
|
14563
|
-
return /* @__PURE__ */ React101.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
14564
|
-
ref
|
14565
|
-
}, props), dialogProps), {
|
14566
|
-
tabIndex: -1
|
14567
|
-
}), /* @__PURE__ */ React101.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React101.createElement(IconButton, {
|
14568
|
-
"aria-label": "Close",
|
14569
|
-
icon: import_cross7.default,
|
14570
|
-
onClick: onClose
|
14571
|
-
})), headerImage !== void 0 && /* @__PURE__ */ React101.createElement(Modal.HeaderImage, {
|
14572
|
-
backgroundImage: headerImage
|
14573
|
-
}), /* @__PURE__ */ React101.createElement(Modal.Header, {
|
14574
|
-
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
14575
|
-
}, /* @__PURE__ */ React101.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React101.createElement(Modal.Title, {
|
14576
|
-
id: labelledBy
|
14577
|
-
}, title), subtitle && /* @__PURE__ */ React101.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React101.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React101.createElement(Modal.Body, {
|
14578
|
-
id: describedBy,
|
14579
|
-
tabIndex: 0,
|
14580
|
-
noFooter: !(secondaryActions || primaryAction)
|
14581
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React101.createElement(Modal.Footer, null, /* @__PURE__ */ React101.createElement(Modal.Actions, null, secondaryActions && castArray4(secondaryActions).filter(Boolean).map((_a2) => {
|
14582
|
-
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
14583
|
-
return /* @__PURE__ */ React101.createElement(Button.Secondary, __spreadValues({
|
14584
|
-
key: text
|
14585
|
-
}, action), text);
|
14586
|
-
}), primaryAction && /* @__PURE__ */ React101.createElement(Button.Primary, __spreadValues({
|
14587
|
-
key: primaryAction.text
|
14588
|
-
}, omit14(primaryAction, "text")), primaryAction.text))));
|
14589
|
-
}
|
14590
|
-
);
|
14591
14657
|
var ModalTabs = createTabsComponent(
|
14592
14658
|
ModalTab,
|
14593
14659
|
TabItem,
|
14594
14660
|
"ModalTabs",
|
14595
|
-
(children, selected, props) => /* @__PURE__ */
|
14661
|
+
(children, selected, props) => /* @__PURE__ */ React102.createElement(Modal.Body, {
|
14596
14662
|
maxHeight: props.maxHeight
|
14597
|
-
}, /* @__PURE__ */
|
14663
|
+
}, /* @__PURE__ */ React102.createElement(ModalTabContainer, null, children.find(
|
14598
14664
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
14599
14665
|
)))
|
14600
14666
|
);
|
14601
14667
|
|
14602
14668
|
// src/molecules/MultiInput/MultiInput.tsx
|
14603
|
-
import
|
14604
|
-
import { useId as
|
14669
|
+
import React104, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
|
14670
|
+
import { useId as useId13 } from "@react-aria/utils";
|
14605
14671
|
import castArray5 from "lodash/castArray";
|
14606
14672
|
import identity from "lodash/identity";
|
14607
14673
|
import omit15 from "lodash/omit";
|
14608
14674
|
|
14609
14675
|
// src/molecules/MultiInput/InputChip.tsx
|
14610
|
-
import
|
14676
|
+
import React103 from "react";
|
14611
14677
|
var import_smallCross3 = __toESM(require_smallCross());
|
14612
|
-
var InputChip =
|
14678
|
+
var InputChip = React103.forwardRef(
|
14613
14679
|
(_a, ref) => {
|
14614
14680
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
14615
14681
|
const onClick = (e) => {
|
@@ -14617,18 +14683,18 @@ var InputChip = React102.forwardRef(
|
|
14617
14683
|
_onClick == null ? void 0 : _onClick(e);
|
14618
14684
|
}
|
14619
14685
|
};
|
14620
|
-
return /* @__PURE__ */
|
14686
|
+
return /* @__PURE__ */ React103.createElement("div", {
|
14621
14687
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
14622
14688
|
"bg-status-danger ": invalid,
|
14623
14689
|
"bg-muted ": !invalid && !disabled,
|
14624
14690
|
"bg-default": disabled
|
14625
14691
|
})
|
14626
|
-
}, /* @__PURE__ */
|
14692
|
+
}, /* @__PURE__ */ React103.createElement("div", {
|
14627
14693
|
className: tw("px-2 py-1")
|
14628
|
-
}, /* @__PURE__ */
|
14694
|
+
}, /* @__PURE__ */ React103.createElement(Typography2, {
|
14629
14695
|
variant: "small",
|
14630
14696
|
color: invalid ? "warning-default" : disabled ? "inactive" : "default"
|
14631
|
-
}, children)), !readOnly && /* @__PURE__ */
|
14697
|
+
}, children)), !readOnly && /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({
|
14632
14698
|
ref
|
14633
14699
|
}, props), {
|
14634
14700
|
onClick,
|
@@ -14639,7 +14705,7 @@ var InputChip = React102.forwardRef(
|
|
14639
14705
|
}),
|
14640
14706
|
role: "button",
|
14641
14707
|
"aria-label": `Remove ${String(children)}`
|
14642
|
-
}), !disabled && /* @__PURE__ */
|
14708
|
+
}), !disabled && /* @__PURE__ */ React103.createElement(Icon, {
|
14643
14709
|
icon: import_smallCross3.default,
|
14644
14710
|
className: tw({
|
14645
14711
|
"text-danger-default": invalid,
|
@@ -14780,7 +14846,7 @@ var MultiInputBase = (_a) => {
|
|
14780
14846
|
};
|
14781
14847
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
14782
14848
|
var _a3;
|
14783
|
-
return /* @__PURE__ */
|
14849
|
+
return /* @__PURE__ */ React104.createElement(InputChip, {
|
14784
14850
|
key: `${itemToString(item)}.${index}`,
|
14785
14851
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
14786
14852
|
readOnly,
|
@@ -14791,13 +14857,13 @@ var MultiInputBase = (_a) => {
|
|
14791
14857
|
}
|
14792
14858
|
}, itemToString(item));
|
14793
14859
|
});
|
14794
|
-
return /* @__PURE__ */
|
14860
|
+
return /* @__PURE__ */ React104.createElement("div", {
|
14795
14861
|
className: "Aquarium-MultiInputBase"
|
14796
|
-
}, /* @__PURE__ */
|
14862
|
+
}, /* @__PURE__ */ React104.createElement(Select.InputContainer, {
|
14797
14863
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14798
|
-
}, /* @__PURE__ */
|
14864
|
+
}, /* @__PURE__ */ React104.createElement("div", {
|
14799
14865
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
14800
|
-
}, inline && renderChips(), /* @__PURE__ */
|
14866
|
+
}, inline && renderChips(), /* @__PURE__ */ React104.createElement(Select.Input, __spreadProps(__spreadValues({
|
14801
14867
|
ref: inputRef,
|
14802
14868
|
id: id != null ? id : name,
|
14803
14869
|
name,
|
@@ -14815,11 +14881,11 @@ var MultiInputBase = (_a) => {
|
|
14815
14881
|
onFocus: handleFocus,
|
14816
14882
|
onBlur: handleBlur,
|
14817
14883
|
autoComplete: "off"
|
14818
|
-
}))), endAdornment && /* @__PURE__ */
|
14884
|
+
}))), endAdornment && /* @__PURE__ */ React104.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React104.createElement("div", {
|
14819
14885
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
14820
14886
|
}, renderChips()));
|
14821
14887
|
};
|
14822
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
14888
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React104.createElement(Skeleton, {
|
14823
14889
|
height: 38
|
14824
14890
|
});
|
14825
14891
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -14831,13 +14897,13 @@ var MultiInput = (props) => {
|
|
14831
14897
|
var _a2;
|
14832
14898
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
14833
14899
|
}, [JSON.stringify(props.value)]);
|
14834
|
-
const defaultId =
|
14900
|
+
const defaultId = useId13();
|
14835
14901
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
14836
|
-
const errorMessageId =
|
14902
|
+
const errorMessageId = useId13();
|
14837
14903
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14838
14904
|
const labelControlProps = getLabelControlProps(props);
|
14839
14905
|
const baseProps = omit15(props, Object.keys(labelControlProps));
|
14840
|
-
return /* @__PURE__ */
|
14906
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues({
|
14841
14907
|
id: `${id}-label`,
|
14842
14908
|
htmlFor: `${id}-input`,
|
14843
14909
|
messageId: errorMessageId
|
@@ -14845,7 +14911,7 @@ var MultiInput = (props) => {
|
|
14845
14911
|
length: value.length,
|
14846
14912
|
maxLength,
|
14847
14913
|
className: "Aquarium-MultiInput"
|
14848
|
-
}), /* @__PURE__ */
|
14914
|
+
}), /* @__PURE__ */ React104.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14849
14915
|
id: `${id}-input`,
|
14850
14916
|
onChange: (value2) => {
|
14851
14917
|
var _a2;
|
@@ -14857,14 +14923,14 @@ var MultiInput = (props) => {
|
|
14857
14923
|
valid: props.valid
|
14858
14924
|
})));
|
14859
14925
|
};
|
14860
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
14926
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement(MultiInputBase.Skeleton, null));
|
14861
14927
|
MultiInput.Skeleton = MultiInputSkeleton;
|
14862
14928
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
14863
14929
|
|
14864
14930
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
14865
|
-
import
|
14931
|
+
import React105, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
|
14866
14932
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
14867
|
-
import { useId as
|
14933
|
+
import { useId as useId14 } from "@react-aria/utils";
|
14868
14934
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
14869
14935
|
import isArray4 from "lodash/isArray";
|
14870
14936
|
import isEqual from "lodash/isEqual";
|
@@ -15023,16 +15089,16 @@ var MultiSelectBase = (_a) => {
|
|
15023
15089
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
15024
15090
|
}
|
15025
15091
|
}, [state.isOpen, inputRef, popoverRef]);
|
15026
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
15092
|
+
const renderItem = (item, index) => /* @__PURE__ */ React105.createElement(Select.Item, __spreadValues({
|
15027
15093
|
key: itemToString(item),
|
15028
15094
|
highlighted: index === highlightedIndex,
|
15029
15095
|
selected: selectedItems.includes(item)
|
15030
15096
|
}, getItemProps({ item, index })), renderOption(item));
|
15031
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
15097
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React105.createElement(React105.Fragment, {
|
15032
15098
|
key: group.label
|
15033
|
-
}, /* @__PURE__ */
|
15099
|
+
}, /* @__PURE__ */ React105.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
15034
15100
|
const renderChips = () => {
|
15035
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
15101
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React105.createElement(InputChip, __spreadProps(__spreadValues({
|
15036
15102
|
key: `${itemToString(selectedItem)}.chip`,
|
15037
15103
|
className: tw("mx-0"),
|
15038
15104
|
disabled,
|
@@ -15050,14 +15116,14 @@ var MultiSelectBase = (_a) => {
|
|
15050
15116
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
15051
15117
|
);
|
15052
15118
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
15053
|
-
return /* @__PURE__ */
|
15119
|
+
return /* @__PURE__ */ React105.createElement("div", {
|
15054
15120
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
15055
|
-
}, /* @__PURE__ */
|
15121
|
+
}, /* @__PURE__ */ React105.createElement(Select.InputContainer, {
|
15056
15122
|
ref: targetRef,
|
15057
15123
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
15058
|
-
}, /* @__PURE__ */
|
15124
|
+
}, /* @__PURE__ */ React105.createElement("div", {
|
15059
15125
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
15060
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
15126
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React105.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
15061
15127
|
name,
|
15062
15128
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
15063
15129
|
}, inputProps), props), {
|
@@ -15076,12 +15142,12 @@ var MultiSelectBase = (_a) => {
|
|
15076
15142
|
setFocus(false);
|
15077
15143
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
15078
15144
|
}
|
15079
|
-
}))), !readOnly && /* @__PURE__ */
|
15145
|
+
}))), !readOnly && /* @__PURE__ */ React105.createElement(Select.Toggle, __spreadValues({
|
15080
15146
|
hasFocus,
|
15081
15147
|
isOpen
|
15082
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
15148
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React105.createElement("div", {
|
15083
15149
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
15084
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
15150
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React105.createElement(PopoverOverlay, {
|
15085
15151
|
ref: popoverRef,
|
15086
15152
|
triggerRef: targetRef,
|
15087
15153
|
state,
|
@@ -15089,13 +15155,13 @@ var MultiSelectBase = (_a) => {
|
|
15089
15155
|
shouldFlip: true,
|
15090
15156
|
isNonModal: true,
|
15091
15157
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
15092
|
-
}, /* @__PURE__ */
|
15158
|
+
}, /* @__PURE__ */ React105.createElement(Select.Menu, __spreadValues({
|
15093
15159
|
maxHeight
|
15094
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
15160
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React105.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
15095
15161
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
15096
15162
|
))));
|
15097
15163
|
};
|
15098
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
15164
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React105.createElement(Skeleton, {
|
15099
15165
|
height: 38
|
15100
15166
|
});
|
15101
15167
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -15110,19 +15176,19 @@ var MultiSelect = (_a) => {
|
|
15110
15176
|
"emptyState"
|
15111
15177
|
]);
|
15112
15178
|
var _a2;
|
15113
|
-
const defaultId =
|
15179
|
+
const defaultId = useId14();
|
15114
15180
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
15115
|
-
const errorMessageId =
|
15181
|
+
const errorMessageId = useId14();
|
15116
15182
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15117
15183
|
const labelControlProps = getLabelControlProps(props);
|
15118
15184
|
const baseProps = omit16(props, Object.keys(labelControlProps));
|
15119
|
-
return /* @__PURE__ */
|
15185
|
+
return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues({
|
15120
15186
|
id: `${id}-label`,
|
15121
15187
|
htmlFor: `${id}-input`,
|
15122
15188
|
messageId: errorMessageId
|
15123
15189
|
}, labelControlProps), {
|
15124
15190
|
className: "Aquarium-MultiSelect"
|
15125
|
-
}), /* @__PURE__ */
|
15191
|
+
}), /* @__PURE__ */ React105.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
15126
15192
|
id,
|
15127
15193
|
options,
|
15128
15194
|
emptyState,
|
@@ -15130,17 +15196,17 @@ var MultiSelect = (_a) => {
|
|
15130
15196
|
valid: props.valid
|
15131
15197
|
})));
|
15132
15198
|
};
|
15133
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
15199
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement(MultiSelectBase.Skeleton, null));
|
15134
15200
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
15135
15201
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
15136
15202
|
|
15137
15203
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
15138
|
-
import
|
15139
|
-
import { useId as
|
15204
|
+
import React106 from "react";
|
15205
|
+
import { useId as useId15 } from "@react-aria/utils";
|
15140
15206
|
import omit17 from "lodash/omit";
|
15141
15207
|
import uniqueId from "lodash/uniqueId";
|
15142
15208
|
var import_caretDown2 = __toESM(require_caretDown());
|
15143
|
-
var NativeSelectBase =
|
15209
|
+
var NativeSelectBase = React106.forwardRef(
|
15144
15210
|
(_a, ref) => {
|
15145
15211
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
15146
15212
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -15157,16 +15223,16 @@ var NativeSelectBase = React105.forwardRef(
|
|
15157
15223
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
15158
15224
|
}
|
15159
15225
|
};
|
15160
|
-
return /* @__PURE__ */
|
15226
|
+
return /* @__PURE__ */ React106.createElement("span", {
|
15161
15227
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
15162
|
-
}, !readOnly && /* @__PURE__ */
|
15228
|
+
}, !readOnly && /* @__PURE__ */ React106.createElement("span", {
|
15163
15229
|
className: tw(
|
15164
15230
|
"absolute right-0 inset-y-0 mr-4 text-inactive flex ml-3 pointer-events-none typography-default-strong mt-4"
|
15165
15231
|
)
|
15166
|
-
}, /* @__PURE__ */
|
15232
|
+
}, /* @__PURE__ */ React106.createElement(Icon, {
|
15167
15233
|
icon: import_caretDown2.default,
|
15168
15234
|
"data-testid": "icon-dropdown"
|
15169
|
-
})), /* @__PURE__ */
|
15235
|
+
})), /* @__PURE__ */ React106.createElement("select", __spreadProps(__spreadValues({
|
15170
15236
|
ref,
|
15171
15237
|
disabled: disabled || readOnly,
|
15172
15238
|
required
|
@@ -15185,32 +15251,32 @@ var NativeSelectBase = React105.forwardRef(
|
|
15185
15251
|
),
|
15186
15252
|
props.className
|
15187
15253
|
)
|
15188
|
-
}), props.placeholder && /* @__PURE__ */
|
15254
|
+
}), props.placeholder && /* @__PURE__ */ React106.createElement("option", {
|
15189
15255
|
value: placeholderValue,
|
15190
15256
|
disabled: true
|
15191
15257
|
}, props.placeholder), children));
|
15192
15258
|
}
|
15193
15259
|
);
|
15194
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
15260
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React106.createElement(Skeleton, {
|
15195
15261
|
height: 38
|
15196
15262
|
});
|
15197
|
-
var NativeSelect =
|
15263
|
+
var NativeSelect = React106.forwardRef(
|
15198
15264
|
(_a, ref) => {
|
15199
15265
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
15200
15266
|
var _a2;
|
15201
|
-
const defaultId =
|
15267
|
+
const defaultId = useId15();
|
15202
15268
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
15203
|
-
const errorMessageId =
|
15269
|
+
const errorMessageId = useId15();
|
15204
15270
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15205
15271
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
15206
15272
|
const baseProps = omit17(props, Object.keys(labelControlProps));
|
15207
|
-
return /* @__PURE__ */
|
15273
|
+
return /* @__PURE__ */ React106.createElement(LabelControl, __spreadProps(__spreadValues({
|
15208
15274
|
id: `${id}-label`,
|
15209
15275
|
htmlFor: id,
|
15210
15276
|
messageId: errorMessageId
|
15211
15277
|
}, labelControlProps), {
|
15212
15278
|
className: "Aquarium-NativeSelect"
|
15213
|
-
}), /* @__PURE__ */
|
15279
|
+
}), /* @__PURE__ */ React106.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
15214
15280
|
ref
|
15215
15281
|
}, baseProps), errorProps), {
|
15216
15282
|
id,
|
@@ -15224,63 +15290,63 @@ var NativeSelect = React105.forwardRef(
|
|
15224
15290
|
}
|
15225
15291
|
);
|
15226
15292
|
NativeSelect.displayName = "NativeSelect";
|
15227
|
-
var Option =
|
15293
|
+
var Option = React106.forwardRef((_a, ref) => {
|
15228
15294
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
15229
|
-
return /* @__PURE__ */
|
15295
|
+
return /* @__PURE__ */ React106.createElement("option", __spreadValues({
|
15230
15296
|
ref
|
15231
15297
|
}, props), children);
|
15232
15298
|
});
|
15233
15299
|
Option.displayName = "Option";
|
15234
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
15300
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React106.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React106.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React106.createElement("div", {
|
15235
15301
|
style: { height: "1px" }
|
15236
15302
|
}));
|
15237
15303
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
15238
15304
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
15239
15305
|
|
15240
15306
|
// src/molecules/Navigation/Navigation.tsx
|
15241
|
-
import
|
15307
|
+
import React108 from "react";
|
15242
15308
|
import classNames12 from "classnames";
|
15243
15309
|
|
15244
15310
|
// src/atoms/Navigation/Navigation.tsx
|
15245
|
-
import
|
15311
|
+
import React107 from "react";
|
15246
15312
|
var Navigation = (_a) => {
|
15247
15313
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
15248
|
-
return /* @__PURE__ */
|
15314
|
+
return /* @__PURE__ */ React107.createElement("nav", {
|
15249
15315
|
className: classNames(tw("bg-muted h-full"))
|
15250
|
-
}, /* @__PURE__ */
|
15316
|
+
}, /* @__PURE__ */ React107.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
15251
15317
|
className: classNames(tw("flex flex-col h-full"), className),
|
15252
15318
|
role: "menubar"
|
15253
15319
|
}), children));
|
15254
15320
|
};
|
15255
15321
|
var Header = (_a) => {
|
15256
15322
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15257
|
-
return /* @__PURE__ */
|
15323
|
+
return /* @__PURE__ */ React107.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
15258
15324
|
role: "presentation",
|
15259
15325
|
className: classNames(tw("px-6 py-5"), className)
|
15260
15326
|
}));
|
15261
15327
|
};
|
15262
15328
|
var Footer = (_a) => {
|
15263
15329
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15264
|
-
return /* @__PURE__ */
|
15330
|
+
return /* @__PURE__ */ React107.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
15265
15331
|
role: "presentation",
|
15266
15332
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
15267
15333
|
}));
|
15268
15334
|
};
|
15269
15335
|
var Section2 = (_a) => {
|
15270
15336
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
15271
|
-
return /* @__PURE__ */
|
15337
|
+
return /* @__PURE__ */ React107.createElement("li", {
|
15272
15338
|
role: "presentation",
|
15273
15339
|
className: tw("py-5")
|
15274
|
-
}, title && /* @__PURE__ */
|
15340
|
+
}, title && /* @__PURE__ */ React107.createElement("div", {
|
15275
15341
|
className: classNames(className, "py-2 px-6 text-inactive uppercase cursor-default typography-caption")
|
15276
|
-
}, title), /* @__PURE__ */
|
15342
|
+
}, title), /* @__PURE__ */ React107.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
15277
15343
|
role: "group",
|
15278
15344
|
className: classNames(tw("flex flex-col"), className)
|
15279
15345
|
})));
|
15280
15346
|
};
|
15281
15347
|
var Divider3 = (_a) => {
|
15282
15348
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15283
|
-
return /* @__PURE__ */
|
15349
|
+
return /* @__PURE__ */ React107.createElement("li", __spreadProps(__spreadValues({
|
15284
15350
|
role: "separator"
|
15285
15351
|
}, rest), {
|
15286
15352
|
className: classNames(tw("border-t-2 border-muted"), className)
|
@@ -15288,9 +15354,9 @@ var Divider3 = (_a) => {
|
|
15288
15354
|
};
|
15289
15355
|
var Item5 = (_a) => {
|
15290
15356
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
15291
|
-
return /* @__PURE__ */
|
15357
|
+
return /* @__PURE__ */ React107.createElement("li", {
|
15292
15358
|
role: "presentation"
|
15293
|
-
}, /* @__PURE__ */
|
15359
|
+
}, /* @__PURE__ */ React107.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
15294
15360
|
role: "menuitem",
|
15295
15361
|
className: classNames(
|
15296
15362
|
tw("py-3 px-6 hover:bg-default cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -15310,7 +15376,7 @@ Navigation.Divider = Divider3;
|
|
15310
15376
|
// src/molecules/Navigation/Navigation.tsx
|
15311
15377
|
var Navigation2 = (_a) => {
|
15312
15378
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
15313
|
-
return /* @__PURE__ */
|
15379
|
+
return /* @__PURE__ */ React108.createElement(Navigation, __spreadValues({
|
15314
15380
|
className: classNames12("Aquarium-Navigation", className)
|
15315
15381
|
}, props));
|
15316
15382
|
};
|
@@ -15324,11 +15390,11 @@ var Item6 = (_a) => {
|
|
15324
15390
|
"icon",
|
15325
15391
|
"showNotification"
|
15326
15392
|
]);
|
15327
|
-
return /* @__PURE__ */
|
15393
|
+
return /* @__PURE__ */ React108.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React108.createElement(Badge.Notification, null, /* @__PURE__ */ React108.createElement(InlineIcon, {
|
15328
15394
|
icon,
|
15329
15395
|
width: "20px",
|
15330
15396
|
height: "20px"
|
15331
|
-
})), icon && !showNotification && /* @__PURE__ */
|
15397
|
+
})), icon && !showNotification && /* @__PURE__ */ React108.createElement(InlineIcon, {
|
15332
15398
|
icon,
|
15333
15399
|
width: "20px",
|
15334
15400
|
height: "20px"
|
@@ -15341,32 +15407,32 @@ Navigation2.Header = Navigation.Header;
|
|
15341
15407
|
Navigation2.Section = Navigation.Section;
|
15342
15408
|
|
15343
15409
|
// src/molecules/PageHeader/PageHeader.tsx
|
15344
|
-
import
|
15410
|
+
import React110 from "react";
|
15345
15411
|
import castArray6 from "lodash/castArray";
|
15346
15412
|
|
15347
15413
|
// src/atoms/PageHeader/PageHeader.tsx
|
15348
|
-
import
|
15414
|
+
import React109 from "react";
|
15349
15415
|
var PageHeader = (_a) => {
|
15350
15416
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15351
|
-
return /* @__PURE__ */
|
15417
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadValues({
|
15352
15418
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
15353
15419
|
}, rest), children);
|
15354
15420
|
};
|
15355
15421
|
PageHeader.Container = (_a) => {
|
15356
15422
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15357
|
-
return /* @__PURE__ */
|
15423
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadValues({
|
15358
15424
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
15359
15425
|
}, rest), children);
|
15360
15426
|
};
|
15361
15427
|
PageHeader.TitleContainer = (_a) => {
|
15362
15428
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15363
|
-
return /* @__PURE__ */
|
15429
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadValues({
|
15364
15430
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
15365
15431
|
}, rest), children);
|
15366
15432
|
};
|
15367
15433
|
PageHeader.Title = (_a) => {
|
15368
15434
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
15369
|
-
return /* @__PURE__ */
|
15435
|
+
return /* @__PURE__ */ React109.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
15370
15436
|
color: "intense",
|
15371
15437
|
variant: isSubHeader ? "subheading" : "heading",
|
15372
15438
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -15374,19 +15440,19 @@ PageHeader.Title = (_a) => {
|
|
15374
15440
|
};
|
15375
15441
|
PageHeader.Subtitle = (_a) => {
|
15376
15442
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15377
|
-
return /* @__PURE__ */
|
15443
|
+
return /* @__PURE__ */ React109.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
15378
15444
|
color: "default"
|
15379
15445
|
}), children);
|
15380
15446
|
};
|
15381
15447
|
PageHeader.Chips = (_a) => {
|
15382
15448
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15383
|
-
return /* @__PURE__ */
|
15449
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadValues({
|
15384
15450
|
className: classNames(tw("flex gap-3"), className)
|
15385
15451
|
}, rest), children);
|
15386
15452
|
};
|
15387
15453
|
PageHeader.Actions = (_a) => {
|
15388
15454
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15389
|
-
return /* @__PURE__ */
|
15455
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadValues({
|
15390
15456
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
15391
15457
|
}, rest), children);
|
15392
15458
|
};
|
@@ -15410,64 +15476,64 @@ var CommonPageHeader = ({
|
|
15410
15476
|
onMenuOpenChange,
|
15411
15477
|
isSubHeader = false
|
15412
15478
|
}) => {
|
15413
|
-
return /* @__PURE__ */
|
15479
|
+
return /* @__PURE__ */ React110.createElement(PageHeader, {
|
15414
15480
|
className: "Aquarium-PageHeader"
|
15415
|
-
}, /* @__PURE__ */
|
15481
|
+
}, /* @__PURE__ */ React110.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React110.createElement(Box, {
|
15416
15482
|
marginBottom: "3"
|
15417
|
-
}, /* @__PURE__ */
|
15483
|
+
}, /* @__PURE__ */ React110.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React110.createElement(Spacing, {
|
15418
15484
|
row: true,
|
15419
15485
|
gap: "5"
|
15420
|
-
}, image && /* @__PURE__ */
|
15486
|
+
}, image && /* @__PURE__ */ React110.createElement("img", {
|
15421
15487
|
src: image,
|
15422
15488
|
alt: imageAlt != null ? imageAlt : "",
|
15423
15489
|
className: tw("w-[56px] h-[56px]")
|
15424
|
-
}), /* @__PURE__ */
|
15490
|
+
}), /* @__PURE__ */ React110.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React110.createElement(PageHeader.Title, {
|
15425
15491
|
isSubHeader
|
15426
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
15492
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React110.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React110.createElement(Chip2, {
|
15427
15493
|
key: chip,
|
15428
15494
|
dense: true,
|
15429
15495
|
text: chip
|
15430
|
-
}))), subtitle && /* @__PURE__ */
|
15496
|
+
}))), subtitle && /* @__PURE__ */ React110.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React110.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React110.createElement(Box.Flex, {
|
15431
15497
|
alignItems: "center"
|
15432
|
-
}, /* @__PURE__ */
|
15498
|
+
}, /* @__PURE__ */ React110.createElement(DropdownMenu2, {
|
15433
15499
|
placement: defaultContextualMenuPlacement,
|
15434
15500
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
15435
15501
|
onOpenChange: onMenuOpenChange
|
15436
|
-
}, /* @__PURE__ */
|
15502
|
+
}, /* @__PURE__ */ React110.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React110.createElement(Button.Icon, {
|
15437
15503
|
"aria-label": menuAriaLabel,
|
15438
15504
|
icon: import_more5.default
|
15439
15505
|
})), menu)), secondaryActions && castArray6(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
15440
15506
|
};
|
15441
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
15507
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React110.createElement(CommonPageHeader, __spreadValues({}, props));
|
15442
15508
|
PageHeader2.displayName = "PageHeader";
|
15443
|
-
var SubHeader = (props) => /* @__PURE__ */
|
15509
|
+
var SubHeader = (props) => /* @__PURE__ */ React110.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
15444
15510
|
isSubHeader: true
|
15445
15511
|
}));
|
15446
15512
|
PageHeader2.SubHeader = SubHeader;
|
15447
15513
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
15448
15514
|
|
15449
15515
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
15450
|
-
import
|
15516
|
+
import React112 from "react";
|
15451
15517
|
import omit18 from "lodash/omit";
|
15452
15518
|
|
15453
15519
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
15454
|
-
import
|
15520
|
+
import React111 from "react";
|
15455
15521
|
var Header2 = (_a) => {
|
15456
15522
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15457
|
-
return /* @__PURE__ */
|
15523
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15458
15524
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
15459
15525
|
}), children);
|
15460
15526
|
};
|
15461
15527
|
var Title2 = (_a) => {
|
15462
15528
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15463
|
-
return /* @__PURE__ */
|
15529
|
+
return /* @__PURE__ */ React111.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
15464
15530
|
htmlTag: "h1",
|
15465
15531
|
variant: "small-strong"
|
15466
15532
|
}), children);
|
15467
15533
|
};
|
15468
15534
|
var Body = (_a) => {
|
15469
15535
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15470
|
-
return /* @__PURE__ */
|
15536
|
+
return /* @__PURE__ */ React111.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
15471
15537
|
htmlTag: "div",
|
15472
15538
|
variant: "caption",
|
15473
15539
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -15475,13 +15541,13 @@ var Body = (_a) => {
|
|
15475
15541
|
};
|
15476
15542
|
var Footer2 = (_a) => {
|
15477
15543
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15478
|
-
return /* @__PURE__ */
|
15544
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15479
15545
|
className: classNames(tw("p-5"), className)
|
15480
15546
|
}), children);
|
15481
15547
|
};
|
15482
15548
|
var Actions2 = (_a) => {
|
15483
15549
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15484
|
-
return /* @__PURE__ */
|
15550
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15485
15551
|
className: classNames(tw("flex gap-4"), className)
|
15486
15552
|
}), children);
|
15487
15553
|
};
|
@@ -15497,13 +15563,13 @@ var PopoverDialog = {
|
|
15497
15563
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
15498
15564
|
const wrapPromptWithBody = (child) => {
|
15499
15565
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
15500
|
-
return /* @__PURE__ */
|
15566
|
+
return /* @__PURE__ */ React112.createElement(Popover3.Panel, {
|
15501
15567
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
15502
|
-
}, /* @__PURE__ */
|
15568
|
+
}, /* @__PURE__ */ React112.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React112.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React112.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React112.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React112.createElement(Popover3.Button, __spreadValues({
|
15503
15569
|
kind: "secondary-ghost",
|
15504
15570
|
key: secondaryAction.text,
|
15505
15571
|
dense: true
|
15506
|
-
}, omit18(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
15572
|
+
}, omit18(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React112.createElement(Popover3.Button, __spreadValues({
|
15507
15573
|
kind: "ghost",
|
15508
15574
|
key: primaryAction.text,
|
15509
15575
|
dense: true
|
@@ -15511,15 +15577,15 @@ var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction,
|
|
15511
15577
|
}
|
15512
15578
|
return child;
|
15513
15579
|
};
|
15514
|
-
return /* @__PURE__ */
|
15580
|
+
return /* @__PURE__ */ React112.createElement(Popover3, {
|
15515
15581
|
type: "dialog",
|
15516
15582
|
isOpen: open,
|
15517
15583
|
placement,
|
15518
15584
|
containFocus: true
|
15519
|
-
},
|
15585
|
+
}, React112.Children.map(children, wrapPromptWithBody));
|
15520
15586
|
};
|
15521
15587
|
PopoverDialog2.Trigger = Popover3.Trigger;
|
15522
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
15588
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React112.createElement(PopoverDialog.Body, null, children);
|
15523
15589
|
Prompt.displayName = "PopoverDialog.Prompt";
|
15524
15590
|
PopoverDialog2.Prompt = Prompt;
|
15525
15591
|
|
@@ -15528,14 +15594,14 @@ import { createPortal } from "react-dom";
|
|
15528
15594
|
var Portal = ({ children, to }) => createPortal(children, to);
|
15529
15595
|
|
15530
15596
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
15531
|
-
import
|
15597
|
+
import React114 from "react";
|
15532
15598
|
|
15533
15599
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
15534
|
-
import
|
15600
|
+
import React113 from "react";
|
15535
15601
|
import clamp3 from "lodash/clamp";
|
15536
15602
|
var ProgressBar = (_a) => {
|
15537
15603
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15538
|
-
return /* @__PURE__ */
|
15604
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15539
15605
|
className: classNames(tw("relative flex items-center w-full bg-muted h-2 rounded-full overflow-hidden"), className)
|
15540
15606
|
}), children);
|
15541
15607
|
};
|
@@ -15548,7 +15614,7 @@ var STATUS_COLORS = {
|
|
15548
15614
|
ProgressBar.Indicator = (_a) => {
|
15549
15615
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
15550
15616
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
15551
|
-
return /* @__PURE__ */
|
15617
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15552
15618
|
className: classNames(
|
15553
15619
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
15554
15620
|
STATUS_COLORS[status],
|
@@ -15564,11 +15630,11 @@ ProgressBar.Indicator = (_a) => {
|
|
15564
15630
|
};
|
15565
15631
|
ProgressBar.Labels = (_a) => {
|
15566
15632
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
15567
|
-
return /* @__PURE__ */
|
15633
|
+
return /* @__PURE__ */ React113.createElement("div", {
|
15568
15634
|
className: classNames(tw("flex flex-row"), className)
|
15569
|
-
}, /* @__PURE__ */
|
15635
|
+
}, /* @__PURE__ */ React113.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15570
15636
|
className: tw("grow text-default typography-caption")
|
15571
|
-
}), startLabel), /* @__PURE__ */
|
15637
|
+
}), startLabel), /* @__PURE__ */ React113.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15572
15638
|
className: tw("grow text-default typography-caption text-right")
|
15573
15639
|
}), endLabel));
|
15574
15640
|
};
|
@@ -15586,7 +15652,7 @@ var ProgressBar2 = (props) => {
|
|
15586
15652
|
if (min > max) {
|
15587
15653
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
15588
15654
|
}
|
15589
|
-
const progress = /* @__PURE__ */
|
15655
|
+
const progress = /* @__PURE__ */ React114.createElement(ProgressBar, null, /* @__PURE__ */ React114.createElement(ProgressBar.Indicator, {
|
15590
15656
|
status: value === max ? completedStatus : progresStatus,
|
15591
15657
|
min,
|
15592
15658
|
max,
|
@@ -15596,15 +15662,15 @@ var ProgressBar2 = (props) => {
|
|
15596
15662
|
if (props.dense) {
|
15597
15663
|
return progress;
|
15598
15664
|
}
|
15599
|
-
return /* @__PURE__ */
|
15665
|
+
return /* @__PURE__ */ React114.createElement("div", {
|
15600
15666
|
className: "Aquarium-ProgressBar"
|
15601
|
-
}, progress, /* @__PURE__ */
|
15667
|
+
}, progress, /* @__PURE__ */ React114.createElement(ProgressBar.Labels, {
|
15602
15668
|
className: tw("py-2"),
|
15603
15669
|
startLabel: props.startLabel,
|
15604
15670
|
endLabel: props.endLabel
|
15605
15671
|
}));
|
15606
15672
|
};
|
15607
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
15673
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React114.createElement(Skeleton, {
|
15608
15674
|
height: 4,
|
15609
15675
|
display: "block"
|
15610
15676
|
});
|
@@ -15612,13 +15678,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
15612
15678
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
15613
15679
|
|
15614
15680
|
// src/molecules/RadioButton/RadioButton.tsx
|
15615
|
-
import
|
15616
|
-
var RadioButton2 =
|
15681
|
+
import React115 from "react";
|
15682
|
+
var RadioButton2 = React115.forwardRef(
|
15617
15683
|
(_a, ref) => {
|
15618
15684
|
var _b = _a, { name, id, readOnly = false, disabled = false, caption, children, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "id", "readOnly", "disabled", "caption", "children", "aria-label"]);
|
15619
15685
|
var _a2;
|
15620
15686
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15621
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15687
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React115.createElement(ControlLabel, {
|
15622
15688
|
htmlFor: id,
|
15623
15689
|
label: children,
|
15624
15690
|
"aria-label": ariaLabel,
|
@@ -15627,7 +15693,7 @@ var RadioButton2 = React114.forwardRef(
|
|
15627
15693
|
disabled,
|
15628
15694
|
style: { gap: "0 8px" },
|
15629
15695
|
className: "Aquarium-RadioButton"
|
15630
|
-
}, !readOnly && /* @__PURE__ */
|
15696
|
+
}, !readOnly && /* @__PURE__ */ React115.createElement(RadioButton, __spreadProps(__spreadValues({
|
15631
15697
|
id,
|
15632
15698
|
ref,
|
15633
15699
|
name
|
@@ -15638,12 +15704,12 @@ var RadioButton2 = React114.forwardRef(
|
|
15638
15704
|
}
|
15639
15705
|
);
|
15640
15706
|
RadioButton2.displayName = "RadioButton";
|
15641
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
15707
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React115.createElement("div", {
|
15642
15708
|
className: tw("flex gap-3")
|
15643
|
-
}, /* @__PURE__ */
|
15709
|
+
}, /* @__PURE__ */ React115.createElement(Skeleton, {
|
15644
15710
|
height: 20,
|
15645
15711
|
width: 20
|
15646
|
-
}), /* @__PURE__ */
|
15712
|
+
}), /* @__PURE__ */ React115.createElement(Skeleton, {
|
15647
15713
|
height: 20,
|
15648
15714
|
width: 150
|
15649
15715
|
}));
|
@@ -15651,10 +15717,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
15651
15717
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
15652
15718
|
|
15653
15719
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
15654
|
-
import
|
15655
|
-
import { useId as
|
15720
|
+
import React116 from "react";
|
15721
|
+
import { useId as useId16 } from "@react-aria/utils";
|
15656
15722
|
var isRadioButton = (c) => {
|
15657
|
-
return
|
15723
|
+
return React116.isValidElement(c) && c.type === RadioButton2;
|
15658
15724
|
};
|
15659
15725
|
var RadioButtonGroup = (_a) => {
|
15660
15726
|
var _b = _a, {
|
@@ -15677,8 +15743,8 @@ var RadioButtonGroup = (_a) => {
|
|
15677
15743
|
"children"
|
15678
15744
|
]);
|
15679
15745
|
var _a2;
|
15680
|
-
const [value, setValue] =
|
15681
|
-
const errorMessageId =
|
15746
|
+
const [value, setValue] = React116.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
15747
|
+
const errorMessageId = useId16();
|
15682
15748
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15683
15749
|
const labelControlProps = getLabelControlProps(props);
|
15684
15750
|
if (_value !== void 0 && _value !== value) {
|
@@ -15688,14 +15754,14 @@ var RadioButtonGroup = (_a) => {
|
|
15688
15754
|
setValue(e.target.value);
|
15689
15755
|
onChange == null ? void 0 : onChange(e.target.value);
|
15690
15756
|
};
|
15691
|
-
const content =
|
15757
|
+
const content = React116.Children.map(children, (c) => {
|
15692
15758
|
var _a3, _b2, _c;
|
15693
15759
|
if (!isRadioButton(c)) {
|
15694
15760
|
return null;
|
15695
15761
|
}
|
15696
15762
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
15697
15763
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
15698
|
-
return
|
15764
|
+
return React116.cloneElement(c, {
|
15699
15765
|
name,
|
15700
15766
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
15701
15767
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -15704,13 +15770,13 @@ var RadioButtonGroup = (_a) => {
|
|
15704
15770
|
readOnly
|
15705
15771
|
});
|
15706
15772
|
});
|
15707
|
-
return /* @__PURE__ */
|
15773
|
+
return /* @__PURE__ */ React116.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15708
15774
|
fieldset: true
|
15709
15775
|
}, labelControlProps), errorProps), {
|
15710
15776
|
className: "Aquarium-RadioButtonGroup"
|
15711
|
-
}), cols && /* @__PURE__ */
|
15777
|
+
}), cols && /* @__PURE__ */ React116.createElement(InputGroup, {
|
15712
15778
|
cols
|
15713
|
-
}, content), !cols && /* @__PURE__ */
|
15779
|
+
}, content), !cols && /* @__PURE__ */ React116.createElement(Flexbox, {
|
15714
15780
|
direction,
|
15715
15781
|
alignItems: "flex-start",
|
15716
15782
|
colGap: "8",
|
@@ -15719,12 +15785,12 @@ var RadioButtonGroup = (_a) => {
|
|
15719
15785
|
}, content));
|
15720
15786
|
};
|
15721
15787
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
15722
|
-
return /* @__PURE__ */
|
15788
|
+
return /* @__PURE__ */ React116.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React116.createElement("div", {
|
15723
15789
|
className: tw("flex flex-wrap", {
|
15724
15790
|
"flex-row gap-8": direction === "row",
|
15725
15791
|
"flex-col gap-2": direction === "column"
|
15726
15792
|
})
|
15727
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
15793
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React116.createElement(RadioButton2.Skeleton, {
|
15728
15794
|
key
|
15729
15795
|
}))));
|
15730
15796
|
};
|
@@ -15732,25 +15798,25 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
15732
15798
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
15733
15799
|
|
15734
15800
|
// src/molecules/Section/Section.tsx
|
15735
|
-
import
|
15801
|
+
import React121, { useRef as useRef14 } from "react";
|
15736
15802
|
import { useButton as useButton4 } from "@react-aria/button";
|
15737
|
-
import { useId as
|
15803
|
+
import { useId as useId17 } from "@react-aria/utils";
|
15738
15804
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
15739
15805
|
import castArray7 from "lodash/castArray";
|
15740
15806
|
import isUndefined9 from "lodash/isUndefined";
|
15741
15807
|
|
15742
15808
|
// src/molecules/Switch/Switch.tsx
|
15743
|
-
import
|
15809
|
+
import React118 from "react";
|
15744
15810
|
|
15745
15811
|
// src/atoms/Switch/Switch.tsx
|
15746
|
-
import
|
15812
|
+
import React117 from "react";
|
15747
15813
|
var import_ban2 = __toESM(require_ban());
|
15748
|
-
var Switch =
|
15814
|
+
var Switch = React117.forwardRef(
|
15749
15815
|
(_a, ref) => {
|
15750
15816
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
15751
|
-
return /* @__PURE__ */
|
15817
|
+
return /* @__PURE__ */ React117.createElement("span", {
|
15752
15818
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
15753
|
-
}, /* @__PURE__ */
|
15819
|
+
}, /* @__PURE__ */ React117.createElement("input", __spreadProps(__spreadValues({
|
15754
15820
|
id,
|
15755
15821
|
ref,
|
15756
15822
|
type: "checkbox",
|
@@ -15769,7 +15835,7 @@ var Switch = React116.forwardRef(
|
|
15769
15835
|
),
|
15770
15836
|
readOnly,
|
15771
15837
|
disabled
|
15772
|
-
})), /* @__PURE__ */
|
15838
|
+
})), /* @__PURE__ */ React117.createElement("span", {
|
15773
15839
|
className: tw(
|
15774
15840
|
"pointer-events-none rounded-full absolute inline-flex justify-center items-center transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
15775
15841
|
"bg-white left-2 peer-checked/switch:left-1 text-inactive peer-checked/switch:text-primary-muted",
|
@@ -15777,7 +15843,7 @@ var Switch = React116.forwardRef(
|
|
15777
15843
|
"shadow-4dp": !disabled
|
15778
15844
|
}
|
15779
15845
|
)
|
15780
|
-
}, disabled && /* @__PURE__ */
|
15846
|
+
}, disabled && /* @__PURE__ */ React117.createElement(Icon, {
|
15781
15847
|
icon: import_ban2.default,
|
15782
15848
|
width: "10px",
|
15783
15849
|
height: "10px"
|
@@ -15786,7 +15852,7 @@ var Switch = React116.forwardRef(
|
|
15786
15852
|
);
|
15787
15853
|
|
15788
15854
|
// src/molecules/Switch/Switch.tsx
|
15789
|
-
var Switch2 =
|
15855
|
+
var Switch2 = React118.forwardRef(
|
15790
15856
|
(_a, ref) => {
|
15791
15857
|
var _b = _a, {
|
15792
15858
|
id,
|
@@ -15809,7 +15875,7 @@ var Switch2 = React117.forwardRef(
|
|
15809
15875
|
]);
|
15810
15876
|
var _a2;
|
15811
15877
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15812
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15878
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React118.createElement(ControlLabel, {
|
15813
15879
|
htmlFor: id,
|
15814
15880
|
label: children,
|
15815
15881
|
"aria-label": ariaLabel,
|
@@ -15819,7 +15885,7 @@ var Switch2 = React117.forwardRef(
|
|
15819
15885
|
style: { gap: "0 8px" },
|
15820
15886
|
labelPlacement,
|
15821
15887
|
className: "Aquarium-Switch"
|
15822
|
-
}, !readOnly && /* @__PURE__ */
|
15888
|
+
}, !readOnly && /* @__PURE__ */ React118.createElement(Switch, __spreadProps(__spreadValues({
|
15823
15889
|
id,
|
15824
15890
|
ref,
|
15825
15891
|
name
|
@@ -15830,12 +15896,12 @@ var Switch2 = React117.forwardRef(
|
|
15830
15896
|
}
|
15831
15897
|
);
|
15832
15898
|
Switch2.displayName = "Switch";
|
15833
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
15899
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React118.createElement("div", {
|
15834
15900
|
className: tw("flex gap-3")
|
15835
|
-
}, /* @__PURE__ */
|
15901
|
+
}, /* @__PURE__ */ React118.createElement(Skeleton, {
|
15836
15902
|
height: 20,
|
15837
15903
|
width: 35
|
15838
|
-
}), /* @__PURE__ */
|
15904
|
+
}), /* @__PURE__ */ React118.createElement(Skeleton, {
|
15839
15905
|
height: 20,
|
15840
15906
|
width: 150
|
15841
15907
|
}));
|
@@ -15843,7 +15909,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
15843
15909
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
15844
15910
|
|
15845
15911
|
// src/molecules/TagLabel/TagLabel.tsx
|
15846
|
-
import
|
15912
|
+
import React119 from "react";
|
15847
15913
|
var getVariantClassNames = (variant = "primary") => {
|
15848
15914
|
switch (variant) {
|
15849
15915
|
case "neutral":
|
@@ -15859,7 +15925,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
15859
15925
|
};
|
15860
15926
|
var TagLabel = (_a) => {
|
15861
15927
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
15862
|
-
return /* @__PURE__ */
|
15928
|
+
return /* @__PURE__ */ React119.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15863
15929
|
className: classNames(
|
15864
15930
|
"Aquarium-TagLabel",
|
15865
15931
|
getVariantClassNames(variant),
|
@@ -15873,7 +15939,7 @@ var TagLabel = (_a) => {
|
|
15873
15939
|
};
|
15874
15940
|
|
15875
15941
|
// src/atoms/Section/Section.tsx
|
15876
|
-
import
|
15942
|
+
import React120 from "react";
|
15877
15943
|
var import_caretUp2 = __toESM(require_caretUp());
|
15878
15944
|
var Section3 = (_a) => {
|
15879
15945
|
var _b = _a, {
|
@@ -15883,7 +15949,7 @@ var Section3 = (_a) => {
|
|
15883
15949
|
"children",
|
15884
15950
|
"className"
|
15885
15951
|
]);
|
15886
|
-
return /* @__PURE__ */
|
15952
|
+
return /* @__PURE__ */ React120.createElement(Box, __spreadProps(__spreadValues({
|
15887
15953
|
component: "section"
|
15888
15954
|
}, rest), {
|
15889
15955
|
className: classNames(tw("border border-muted"), className)
|
@@ -15891,7 +15957,7 @@ var Section3 = (_a) => {
|
|
15891
15957
|
};
|
15892
15958
|
Section3.Header = (_a) => {
|
15893
15959
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
15894
|
-
return /* @__PURE__ */
|
15960
|
+
return /* @__PURE__ */ React120.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15895
15961
|
className: classNames(
|
15896
15962
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", {
|
15897
15963
|
"bg-muted": expanded
|
@@ -15900,10 +15966,10 @@ Section3.Header = (_a) => {
|
|
15900
15966
|
)
|
15901
15967
|
}), children);
|
15902
15968
|
};
|
15903
|
-
Section3.TitleContainer =
|
15969
|
+
Section3.TitleContainer = React120.forwardRef(
|
15904
15970
|
(_a, ref) => {
|
15905
15971
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
15906
|
-
return /* @__PURE__ */
|
15972
|
+
return /* @__PURE__ */ React120.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15907
15973
|
ref,
|
15908
15974
|
className: classNames(
|
15909
15975
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", {
|
@@ -15914,14 +15980,14 @@ Section3.TitleContainer = React119.forwardRef(
|
|
15914
15980
|
}), children);
|
15915
15981
|
}
|
15916
15982
|
);
|
15917
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
15983
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React120.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
15918
15984
|
icon: import_caretUp2.default,
|
15919
15985
|
height: 22,
|
15920
15986
|
width: 22
|
15921
15987
|
}));
|
15922
15988
|
Section3.Title = (_a) => {
|
15923
15989
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15924
|
-
return /* @__PURE__ */
|
15990
|
+
return /* @__PURE__ */ React120.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
15925
15991
|
htmlTag: "h2",
|
15926
15992
|
color: "intense",
|
15927
15993
|
className: "flex gap-3 items-center"
|
@@ -15929,21 +15995,21 @@ Section3.Title = (_a) => {
|
|
15929
15995
|
};
|
15930
15996
|
Section3.Subtitle = (_a) => {
|
15931
15997
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15932
|
-
return /* @__PURE__ */
|
15998
|
+
return /* @__PURE__ */ React120.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
15933
15999
|
color: "default"
|
15934
16000
|
}), children);
|
15935
16001
|
};
|
15936
16002
|
Section3.Actions = (_a) => {
|
15937
16003
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15938
|
-
return /* @__PURE__ */
|
16004
|
+
return /* @__PURE__ */ React120.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15939
16005
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
15940
16006
|
}), children);
|
15941
16007
|
};
|
15942
16008
|
Section3.Body = (_a) => {
|
15943
16009
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15944
|
-
return /* @__PURE__ */
|
16010
|
+
return /* @__PURE__ */ React120.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15945
16011
|
className: classNames(tw("p-6"), className)
|
15946
|
-
}), /* @__PURE__ */
|
16012
|
+
}), /* @__PURE__ */ React120.createElement(Typography, {
|
15947
16013
|
htmlTag: "div",
|
15948
16014
|
color: "default"
|
15949
16015
|
}, children));
|
@@ -15957,7 +16023,7 @@ var Section4 = (props) => {
|
|
15957
16023
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
15958
16024
|
const _collapsed = title ? props.collapsed : void 0;
|
15959
16025
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
15960
|
-
const [isCollapsed, setCollapsed] =
|
16026
|
+
const [isCollapsed, setCollapsed] = React121.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
15961
16027
|
const [ref, { height }] = useMeasure();
|
15962
16028
|
const toggleAreaRef = useRef14(null);
|
15963
16029
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
@@ -15988,20 +16054,20 @@ var Section4 = (props) => {
|
|
15988
16054
|
},
|
15989
16055
|
immediate: !_collapsible
|
15990
16056
|
}), { transform } = _f, spring = __objRest(_f, ["transform"]);
|
15991
|
-
const toggleId =
|
15992
|
-
const regionId =
|
15993
|
-
const titleId =
|
16057
|
+
const toggleId = useId17();
|
16058
|
+
const regionId = useId17();
|
16059
|
+
const titleId = useId17();
|
15994
16060
|
const hasTabs = isComponentType(children, Tabs);
|
15995
16061
|
const { buttonProps } = useButton4(
|
15996
16062
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
15997
16063
|
toggleAreaRef
|
15998
16064
|
);
|
15999
|
-
return /* @__PURE__ */
|
16065
|
+
return /* @__PURE__ */ React121.createElement(Section3, {
|
16000
16066
|
"aria-label": title,
|
16001
16067
|
className: _collapsible ? "Aquarium-Collapsible-Section" : "Aquarium-Section"
|
16002
|
-
}, title && /* @__PURE__ */
|
16068
|
+
}, title && /* @__PURE__ */ React121.createElement(React121.Fragment, null, /* @__PURE__ */ React121.createElement(Section3.Header, {
|
16003
16069
|
expanded: _collapsible && !isCollapsed
|
16004
|
-
}, /* @__PURE__ */
|
16070
|
+
}, /* @__PURE__ */ React121.createElement(Section3.TitleContainer, __spreadProps(__spreadValues({}, _collapsible ? __spreadProps(__spreadValues({}, buttonProps), {
|
16005
16071
|
onPointerDown: (e) => {
|
16006
16072
|
e.preventDefault();
|
16007
16073
|
handleTitleClick();
|
@@ -16010,49 +16076,49 @@ var Section4 = (props) => {
|
|
16010
16076
|
ref: _collapsible ? toggleAreaRef : void 0,
|
16011
16077
|
id: toggleId,
|
16012
16078
|
collapsible: _collapsible
|
16013
|
-
}), _collapsible && /* @__PURE__ */
|
16079
|
+
}), _collapsible && /* @__PURE__ */ React121.createElement(animated6.div, {
|
16014
16080
|
style: { transform }
|
16015
|
-
}, /* @__PURE__ */
|
16081
|
+
}, /* @__PURE__ */ React121.createElement(Section3.Toggle, null)), /* @__PURE__ */ React121.createElement(Section3.Title, {
|
16016
16082
|
id: titleId
|
16017
|
-
}, /* @__PURE__ */
|
16083
|
+
}, /* @__PURE__ */ React121.createElement(LineClamp2, {
|
16018
16084
|
lines: 1
|
16019
|
-
}, title), props.tag && /* @__PURE__ */
|
16085
|
+
}, title), props.tag && /* @__PURE__ */ React121.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React121.createElement(Chip2, {
|
16020
16086
|
text: props.badge
|
16021
|
-
}), props.chip && /* @__PURE__ */
|
16087
|
+
}), props.chip && /* @__PURE__ */ React121.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React121.createElement(Section3.Subtitle, {
|
16022
16088
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
16023
|
-
}, /* @__PURE__ */
|
16089
|
+
}, /* @__PURE__ */ React121.createElement(LineClamp2, {
|
16024
16090
|
lines: 1
|
16025
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
16091
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React121.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React121.createElement(Box.Flex, {
|
16026
16092
|
alignItems: "center"
|
16027
|
-
}, /* @__PURE__ */
|
16093
|
+
}, /* @__PURE__ */ React121.createElement(DropdownMenu2, {
|
16028
16094
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
16029
16095
|
onOpenChange: onMenuOpenChange,
|
16030
16096
|
placement: defaultContextualMenuPlacement
|
16031
|
-
}, /* @__PURE__ */
|
16097
|
+
}, /* @__PURE__ */ React121.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React121.createElement(Button.Icon, {
|
16032
16098
|
"aria-label": menuAriaLabel,
|
16033
16099
|
icon: import_more6.default
|
16034
|
-
})), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */
|
16100
|
+
})), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React121.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React121.createElement(SelectBase, __spreadValues({
|
16035
16101
|
"aria-labelledby": titleId
|
16036
|
-
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */
|
16102
|
+
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */ React121.createElement(animated6.div, {
|
16037
16103
|
className: tw(`h-[1px]`),
|
16038
16104
|
style: { backgroundColor: "var(--aquarium-border-color-muted)" }
|
16039
|
-
})), /* @__PURE__ */
|
16105
|
+
})), /* @__PURE__ */ React121.createElement(animated6.div, {
|
16040
16106
|
id: regionId,
|
16041
16107
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
16042
16108
|
style: spring,
|
16043
16109
|
className: tw({ "overflow-hidden": _collapsible })
|
16044
|
-
}, /* @__PURE__ */
|
16110
|
+
}, /* @__PURE__ */ React121.createElement("div", {
|
16045
16111
|
ref
|
16046
|
-
}, hasTabs ? /* @__PURE__ */
|
16112
|
+
}, hasTabs ? /* @__PURE__ */ React121.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
16047
16113
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto", { "mt-4": _collapsible })
|
16048
|
-
})) : /* @__PURE__ */
|
16114
|
+
})) : /* @__PURE__ */ React121.createElement(Section3.Body, null, children))));
|
16049
16115
|
};
|
16050
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
16116
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React121.createElement(Section3.Body, null, children.find(
|
16051
16117
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
16052
16118
|
)));
|
16053
16119
|
|
16054
16120
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
16055
|
-
import
|
16121
|
+
import React122 from "react";
|
16056
16122
|
var SegmentedControl = (_a) => {
|
16057
16123
|
var _b = _a, {
|
16058
16124
|
children,
|
@@ -16069,7 +16135,7 @@ var SegmentedControl = (_a) => {
|
|
16069
16135
|
"selected",
|
16070
16136
|
"className"
|
16071
16137
|
]);
|
16072
|
-
return /* @__PURE__ */
|
16138
|
+
return /* @__PURE__ */ React122.createElement("li", null, /* @__PURE__ */ React122.createElement("button", __spreadProps(__spreadValues({
|
16073
16139
|
type: "button"
|
16074
16140
|
}, rest), {
|
16075
16141
|
className: classNames(getBaseSegmentedControlClassNames(selected), className),
|
@@ -16094,16 +16160,16 @@ var SegmentedControlGroup = (_a) => {
|
|
16094
16160
|
"className",
|
16095
16161
|
"ariaLabel"
|
16096
16162
|
]);
|
16097
|
-
return /* @__PURE__ */
|
16163
|
+
return /* @__PURE__ */ React122.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
16098
16164
|
"aria-label": ariaLabel,
|
16099
16165
|
className: classNames(
|
16100
16166
|
"Aquarium-SegmentedControl",
|
16101
16167
|
"flex border border-default rounded-sm divide-x divide-grey-20",
|
16102
16168
|
className
|
16103
16169
|
)
|
16104
|
-
}),
|
16170
|
+
}), React122.Children.map(
|
16105
16171
|
children,
|
16106
|
-
(child) =>
|
16172
|
+
(child) => React122.cloneElement(child, {
|
16107
16173
|
onClick: () => onChange(child.props.value),
|
16108
16174
|
selected: child.props.value === value
|
16109
16175
|
})
|
@@ -16120,14 +16186,14 @@ var getBaseSegmentedControlClassNames = (selected) => tw(
|
|
16120
16186
|
);
|
16121
16187
|
|
16122
16188
|
// src/molecules/Stepper/Stepper.tsx
|
16123
|
-
import
|
16189
|
+
import React124 from "react";
|
16124
16190
|
|
16125
16191
|
// src/atoms/Stepper/Stepper.tsx
|
16126
|
-
import
|
16192
|
+
import React123 from "react";
|
16127
16193
|
var import_tick6 = __toESM(require_tick());
|
16128
16194
|
var Stepper = (_a) => {
|
16129
16195
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16130
|
-
return /* @__PURE__ */
|
16196
|
+
return /* @__PURE__ */ React123.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16131
16197
|
className: classNames(className)
|
16132
16198
|
}));
|
16133
16199
|
};
|
@@ -16141,7 +16207,7 @@ var ConnectorContainer = (_a) => {
|
|
16141
16207
|
"completed",
|
16142
16208
|
"dense"
|
16143
16209
|
]);
|
16144
|
-
return /* @__PURE__ */
|
16210
|
+
return /* @__PURE__ */ React123.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16145
16211
|
className: classNames(
|
16146
16212
|
tw("absolute w-full -left-1/2", {
|
16147
16213
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -16153,7 +16219,7 @@ var ConnectorContainer = (_a) => {
|
|
16153
16219
|
};
|
16154
16220
|
var Connector = (_a) => {
|
16155
16221
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
16156
|
-
return /* @__PURE__ */
|
16222
|
+
return /* @__PURE__ */ React123.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16157
16223
|
className: classNames(
|
16158
16224
|
tw("w-full", {
|
16159
16225
|
"bg-intense": !completed,
|
@@ -16167,7 +16233,7 @@ var Connector = (_a) => {
|
|
16167
16233
|
};
|
16168
16234
|
var Step = (_a) => {
|
16169
16235
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
16170
|
-
return /* @__PURE__ */
|
16236
|
+
return /* @__PURE__ */ React123.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16171
16237
|
className: classNames(
|
16172
16238
|
tw("flex flex-col items-center relative text-center", {
|
16173
16239
|
"text-intense": state !== "inactive",
|
@@ -16189,13 +16255,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
16189
16255
|
});
|
16190
16256
|
var Indicator = (_a) => {
|
16191
16257
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
16192
|
-
return /* @__PURE__ */
|
16258
|
+
return /* @__PURE__ */ React123.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16193
16259
|
className: classNames(
|
16194
16260
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
16195
16261
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
16196
16262
|
className
|
16197
16263
|
)
|
16198
|
-
}), state === "completed" ? /* @__PURE__ */
|
16264
|
+
}), state === "completed" ? /* @__PURE__ */ React123.createElement(InlineIcon, {
|
16199
16265
|
icon: import_tick6.default
|
16200
16266
|
}) : dense ? null : children);
|
16201
16267
|
};
|
@@ -16206,26 +16272,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
16206
16272
|
|
16207
16273
|
// src/molecules/Stepper/Stepper.tsx
|
16208
16274
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
16209
|
-
const steps =
|
16210
|
-
return /* @__PURE__ */
|
16275
|
+
const steps = React124.Children.count(children);
|
16276
|
+
return /* @__PURE__ */ React124.createElement(Stepper, {
|
16211
16277
|
role: "list",
|
16212
16278
|
className: "Aquarium-Stepper"
|
16213
|
-
}, /* @__PURE__ */
|
16279
|
+
}, /* @__PURE__ */ React124.createElement(Template, {
|
16214
16280
|
columns: steps
|
16215
|
-
},
|
16281
|
+
}, React124.Children.map(children, (child, index) => {
|
16216
16282
|
if (!isComponentType(child, Step2)) {
|
16217
16283
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
16218
16284
|
} else {
|
16219
16285
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
16220
|
-
return /* @__PURE__ */
|
16286
|
+
return /* @__PURE__ */ React124.createElement(Stepper.Step, {
|
16221
16287
|
state,
|
16222
16288
|
"aria-current": state === "active" ? "step" : false,
|
16223
16289
|
role: "listitem"
|
16224
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
16290
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React124.createElement(Stepper.ConnectorContainer, {
|
16225
16291
|
dense
|
16226
|
-
}, /* @__PURE__ */
|
16292
|
+
}, /* @__PURE__ */ React124.createElement(Stepper.ConnectorContainer.Connector, {
|
16227
16293
|
completed: state === "completed" || state === "active"
|
16228
|
-
})), /* @__PURE__ */
|
16294
|
+
})), /* @__PURE__ */ React124.createElement(Stepper.Step.Indicator, {
|
16229
16295
|
state,
|
16230
16296
|
dense
|
16231
16297
|
}, index + 1), child.props.children);
|
@@ -16238,8 +16304,8 @@ Step2.displayName = "Stepper.Step";
|
|
16238
16304
|
Stepper2.Step = Step2;
|
16239
16305
|
|
16240
16306
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
16241
|
-
import
|
16242
|
-
import { useId as
|
16307
|
+
import React125, { useState as useState14 } from "react";
|
16308
|
+
import { useId as useId18 } from "@react-aria/utils";
|
16243
16309
|
var SwitchGroup = (_a) => {
|
16244
16310
|
var _b = _a, {
|
16245
16311
|
value,
|
@@ -16261,7 +16327,7 @@ var SwitchGroup = (_a) => {
|
|
16261
16327
|
if (value !== void 0 && value !== selectedItems) {
|
16262
16328
|
setSelectedItems(value);
|
16263
16329
|
}
|
16264
|
-
const errorMessageId =
|
16330
|
+
const errorMessageId = useId18();
|
16265
16331
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
16266
16332
|
const labelControlProps = getLabelControlProps(props);
|
16267
16333
|
const handleChange = (e) => {
|
@@ -16270,13 +16336,13 @@ var SwitchGroup = (_a) => {
|
|
16270
16336
|
setSelectedItems(updated);
|
16271
16337
|
onChange == null ? void 0 : onChange(updated);
|
16272
16338
|
};
|
16273
|
-
return /* @__PURE__ */
|
16339
|
+
return /* @__PURE__ */ React125.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
16274
16340
|
fieldset: true
|
16275
16341
|
}, labelControlProps), errorProps), {
|
16276
16342
|
className: "Aquarium-SwitchGroup"
|
16277
|
-
}), /* @__PURE__ */
|
16343
|
+
}), /* @__PURE__ */ React125.createElement(InputGroup, {
|
16278
16344
|
cols
|
16279
|
-
},
|
16345
|
+
}, React125.Children.map(children, (c) => {
|
16280
16346
|
var _a3, _b2, _c, _d;
|
16281
16347
|
if (!isComponentType(c, Switch2)) {
|
16282
16348
|
return null;
|
@@ -16284,7 +16350,7 @@ var SwitchGroup = (_a) => {
|
|
16284
16350
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
16285
16351
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
16286
16352
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
16287
|
-
return
|
16353
|
+
return React125.cloneElement(c, {
|
16288
16354
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
16289
16355
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
16290
16356
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -16294,9 +16360,9 @@ var SwitchGroup = (_a) => {
|
|
16294
16360
|
})));
|
16295
16361
|
};
|
16296
16362
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
16297
|
-
return /* @__PURE__ */
|
16363
|
+
return /* @__PURE__ */ React125.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React125.createElement("div", {
|
16298
16364
|
className: tw("flex flex-wrap flex-col gap-2")
|
16299
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
16365
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React125.createElement(Switch2.Skeleton, {
|
16300
16366
|
key
|
16301
16367
|
}))));
|
16302
16368
|
};
|
@@ -16304,14 +16370,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
16304
16370
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
16305
16371
|
|
16306
16372
|
// src/molecules/Textarea/Textarea.tsx
|
16307
|
-
import
|
16308
|
-
import { useId as
|
16373
|
+
import React126, { useState as useState15 } from "react";
|
16374
|
+
import { useId as useId19 } from "@react-aria/utils";
|
16309
16375
|
import omit19 from "lodash/omit";
|
16310
16376
|
import toString2 from "lodash/toString";
|
16311
|
-
var TextareaBase =
|
16377
|
+
var TextareaBase = React126.forwardRef(
|
16312
16378
|
(_a, ref) => {
|
16313
16379
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
16314
|
-
return /* @__PURE__ */
|
16380
|
+
return /* @__PURE__ */ React126.createElement("textarea", __spreadProps(__spreadValues({
|
16315
16381
|
ref
|
16316
16382
|
}, props), {
|
16317
16383
|
readOnly,
|
@@ -16319,26 +16385,26 @@ var TextareaBase = React125.forwardRef(
|
|
16319
16385
|
}));
|
16320
16386
|
}
|
16321
16387
|
);
|
16322
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
16388
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React126.createElement(Skeleton, {
|
16323
16389
|
height: 58
|
16324
16390
|
});
|
16325
|
-
var Textarea =
|
16391
|
+
var Textarea = React126.forwardRef((props, ref) => {
|
16326
16392
|
var _a, _b, _c;
|
16327
16393
|
const [value, setValue] = useState15((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
16328
|
-
const defaultId =
|
16394
|
+
const defaultId = useId19();
|
16329
16395
|
const id = (_c = props.id) != null ? _c : defaultId;
|
16330
|
-
const errorMessageId =
|
16396
|
+
const errorMessageId = useId19();
|
16331
16397
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
16332
16398
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
16333
16399
|
const baseProps = omit19(props, Object.keys(labelControlProps));
|
16334
|
-
return /* @__PURE__ */
|
16400
|
+
return /* @__PURE__ */ React126.createElement(LabelControl, __spreadProps(__spreadValues({
|
16335
16401
|
id: `${id}-label`,
|
16336
16402
|
htmlFor: id,
|
16337
16403
|
messageId: errorMessageId,
|
16338
16404
|
length: value !== void 0 ? toString2(value).length : void 0
|
16339
16405
|
}, labelControlProps), {
|
16340
16406
|
className: "Aquarium-Textarea"
|
16341
|
-
}), /* @__PURE__ */
|
16407
|
+
}), /* @__PURE__ */ React126.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
16342
16408
|
ref
|
16343
16409
|
}, baseProps), errorProps), {
|
16344
16410
|
id,
|
@@ -16355,48 +16421,48 @@ var Textarea = React125.forwardRef((props, ref) => {
|
|
16355
16421
|
})));
|
16356
16422
|
});
|
16357
16423
|
Textarea.displayName = "Textarea";
|
16358
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
16424
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React126.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React126.createElement(TextareaBase.Skeleton, null));
|
16359
16425
|
Textarea.Skeleton = TextAreaSkeleton;
|
16360
16426
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
16361
16427
|
|
16362
16428
|
// src/molecules/Timeline/Timeline.tsx
|
16363
|
-
import
|
16429
|
+
import React128 from "react";
|
16364
16430
|
|
16365
16431
|
// src/atoms/Timeline/Timeline.tsx
|
16366
|
-
import
|
16432
|
+
import React127 from "react";
|
16367
16433
|
var Timeline = (_a) => {
|
16368
16434
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16369
|
-
return /* @__PURE__ */
|
16435
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16370
16436
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
16371
16437
|
}));
|
16372
16438
|
};
|
16373
16439
|
var Content2 = (_a) => {
|
16374
16440
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16375
|
-
return /* @__PURE__ */
|
16441
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16376
16442
|
className: classNames(tw("pb-6"), className)
|
16377
16443
|
}));
|
16378
16444
|
};
|
16379
16445
|
var Separator2 = (_a) => {
|
16380
16446
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16381
|
-
return /* @__PURE__ */
|
16447
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16382
16448
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
16383
16449
|
}));
|
16384
16450
|
};
|
16385
16451
|
var LineContainer = (_a) => {
|
16386
16452
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16387
|
-
return /* @__PURE__ */
|
16453
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16388
16454
|
className: classNames(tw("flex justify-center py-1"), className)
|
16389
16455
|
}));
|
16390
16456
|
};
|
16391
16457
|
var Line = (_a) => {
|
16392
16458
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16393
|
-
return /* @__PURE__ */
|
16459
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16394
16460
|
className: classNames(tw("w-1 bg-default h-full justify-self-center"), className)
|
16395
16461
|
}));
|
16396
16462
|
};
|
16397
16463
|
var Dot = (_a) => {
|
16398
16464
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
16399
|
-
return /* @__PURE__ */
|
16465
|
+
return /* @__PURE__ */ React127.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
16400
16466
|
className: classNames(tw("bg-intense h-[6px] w-[6px] rounded"), className)
|
16401
16467
|
}));
|
16402
16468
|
};
|
@@ -16411,54 +16477,54 @@ var import_error5 = __toESM(require_error());
|
|
16411
16477
|
var import_time2 = __toESM(require_time());
|
16412
16478
|
var import_warningSign5 = __toESM(require_warningSign());
|
16413
16479
|
var TimelineItem = () => null;
|
16414
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
16480
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React128.createElement("div", {
|
16415
16481
|
className: "Aquarium-Timeline"
|
16416
|
-
},
|
16482
|
+
}, React128.Children.map(children, (item) => {
|
16417
16483
|
if (!isComponentType(item, TimelineItem)) {
|
16418
16484
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
16419
16485
|
} else {
|
16420
16486
|
const { props, key } = item;
|
16421
|
-
return /* @__PURE__ */
|
16487
|
+
return /* @__PURE__ */ React128.createElement(Timeline, {
|
16422
16488
|
key: key != null ? key : props.title
|
16423
|
-
}, /* @__PURE__ */
|
16489
|
+
}, /* @__PURE__ */ React128.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React128.createElement(Icon, {
|
16424
16490
|
icon: import_error5.default,
|
16425
16491
|
color: "danger-default"
|
16426
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
16492
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React128.createElement(Icon, {
|
16427
16493
|
icon: import_warningSign5.default,
|
16428
16494
|
color: "warning-default"
|
16429
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
16495
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React128.createElement(Icon, {
|
16430
16496
|
icon: import_time2.default,
|
16431
16497
|
color: "info-default"
|
16432
|
-
}) : /* @__PURE__ */
|
16498
|
+
}) : /* @__PURE__ */ React128.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React128.createElement(Typography2.Caption, {
|
16433
16499
|
color: "muted"
|
16434
|
-
}, props.title), /* @__PURE__ */
|
16500
|
+
}, props.title), /* @__PURE__ */ React128.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React128.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React128.createElement(Timeline.Content, null, /* @__PURE__ */ React128.createElement(Typography2.Small, null, props.children)));
|
16435
16501
|
}
|
16436
16502
|
}));
|
16437
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
16503
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React128.createElement(Timeline, null, /* @__PURE__ */ React128.createElement(Timeline.Separator, null, /* @__PURE__ */ React128.createElement(Skeleton, {
|
16438
16504
|
width: 6,
|
16439
16505
|
height: 6,
|
16440
16506
|
rounded: true
|
16441
|
-
})), /* @__PURE__ */
|
16507
|
+
})), /* @__PURE__ */ React128.createElement(Skeleton, {
|
16442
16508
|
height: 12,
|
16443
16509
|
width: 120
|
16444
|
-
}), /* @__PURE__ */
|
16510
|
+
}), /* @__PURE__ */ React128.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React128.createElement(Skeleton, {
|
16445
16511
|
width: 2,
|
16446
16512
|
height: "100%"
|
16447
|
-
})), /* @__PURE__ */
|
16513
|
+
})), /* @__PURE__ */ React128.createElement(Timeline.Content, null, /* @__PURE__ */ React128.createElement(Box, {
|
16448
16514
|
display: "flex",
|
16449
16515
|
flexDirection: "column",
|
16450
16516
|
gap: "3"
|
16451
|
-
}, /* @__PURE__ */
|
16517
|
+
}, /* @__PURE__ */ React128.createElement(Skeleton, {
|
16452
16518
|
height: 32,
|
16453
16519
|
width: "100%"
|
16454
|
-
}), /* @__PURE__ */
|
16520
|
+
}), /* @__PURE__ */ React128.createElement(Skeleton, {
|
16455
16521
|
height: 32,
|
16456
16522
|
width: "73%"
|
16457
|
-
}), /* @__PURE__ */
|
16523
|
+
}), /* @__PURE__ */ React128.createElement(Skeleton, {
|
16458
16524
|
height: 32,
|
16459
16525
|
width: "80%"
|
16460
16526
|
}))));
|
16461
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
16527
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React128.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React128.createElement(TimelineItemSkeleton, {
|
16462
16528
|
key
|
16463
16529
|
})));
|
16464
16530
|
Timeline2.Item = TimelineItem;
|
@@ -16466,13 +16532,13 @@ Timeline2.Skeleton = TimelineSkeleton;
|
|
16466
16532
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
16467
16533
|
|
16468
16534
|
// src/molecules/TimePicker/TimePicker.tsx
|
16469
|
-
import
|
16470
|
-
var TimePicker = (props) => /* @__PURE__ */
|
16535
|
+
import React129 from "react";
|
16536
|
+
var TimePicker = (props) => /* @__PURE__ */ React129.createElement(TimeField, __spreadValues({}, props));
|
16471
16537
|
|
16472
16538
|
// src/utils/table/useTableSelect.ts
|
16473
|
-
import
|
16539
|
+
import React130 from "react";
|
16474
16540
|
var useTableSelect = (data, { key }) => {
|
16475
|
-
const [selected, setSelected] =
|
16541
|
+
const [selected, setSelected] = React130.useState([]);
|
16476
16542
|
const allSelected = selected.length === data.length;
|
16477
16543
|
const isSelected = (dot) => selected.includes(dot[key]);
|
16478
16544
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|