@aivenio/aquarium 1.50.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/_variables.scss +1 -1
  2. package/dist/atoms.cjs +72 -30
  3. package/dist/atoms.mjs +72 -30
  4. package/dist/charts.cjs +182 -138
  5. package/dist/charts.mjs +164 -121
  6. package/dist/src/atoms/DataList/DataList.js +3 -3
  7. package/dist/src/atoms/Modal/Modal.d.ts +6 -3
  8. package/dist/src/atoms/Modal/Modal.js +25 -14
  9. package/dist/src/atoms/Table/Table.js +3 -3
  10. package/dist/src/charts/AreaChart/AreaChart.js +5 -3
  11. package/dist/src/charts/BarChart/BarChart.js +47 -29
  12. package/dist/src/charts/Legend/Legend.d.ts +4 -0
  13. package/dist/src/charts/Legend/Legend.js +15 -0
  14. package/dist/src/charts/LineChart/LineChart.js +5 -3
  15. package/dist/src/charts/PieChart/ChartValue.js +3 -3
  16. package/dist/src/charts/PieChart/DoughnutChart.js +45 -7
  17. package/dist/src/charts/PieChart/renderPieChildren.d.ts +1 -1
  18. package/dist/src/charts/PieChart/renderPieChildren.js +4 -5
  19. package/dist/src/charts/index.d.ts +1 -0
  20. package/dist/src/charts/index.js +2 -1
  21. package/dist/src/charts/lib/utils.d.ts +1 -5
  22. package/dist/src/charts/lib/utils.js +7 -4
  23. package/dist/src/icons/index.d.ts +1 -0
  24. package/dist/src/icons/index.js +2 -1
  25. package/dist/src/icons/performance.d.ts +9 -0
  26. package/dist/src/icons/performance.js +11 -0
  27. package/dist/src/molecules/Badge/Badge.js +7 -6
  28. package/dist/src/molecules/DataList/DataList.d.ts +9 -2
  29. package/dist/src/molecules/DataList/DataList.js +3 -3
  30. package/dist/src/molecules/DataTable/DataTable.d.ts +9 -2
  31. package/dist/src/molecules/DataTable/DataTable.js +3 -3
  32. package/dist/src/molecules/Drawer/Drawer.d.ts +10 -0
  33. package/dist/src/molecules/Drawer/Drawer.js +116 -0
  34. package/dist/src/molecules/Modal/Modal.d.ts +8 -9
  35. package/dist/src/molecules/Modal/Modal.js +1 -1
  36. package/dist/src/molecules/Tabs/Tabs.js +3 -3
  37. package/dist/src/molecules/index.d.ts +1 -0
  38. package/dist/src/molecules/index.js +2 -1
  39. package/dist/src/utils/mocks/mockDynamicIds.d.ts +1 -0
  40. package/dist/src/utils/mocks/mockDynamicIds.js +15 -0
  41. package/dist/src/utils/mocks/mockIntersectionObserver.d.ts +1 -0
  42. package/dist/src/utils/mocks/mockIntersectionObserver.js +12 -0
  43. package/dist/src/utils/mocks/mockRecharts.d.ts +1 -0
  44. package/dist/src/utils/mocks/mockRecharts.js +8 -0
  45. package/dist/src/utils/mocks/mockResizeObservable.d.ts +1 -0
  46. package/dist/src/utils/mocks/mockResizeObservable.js +60 -0
  47. package/dist/src/utils/setupTests.js +9 -22
  48. package/dist/src/utils/table/types.d.ts +2 -0
  49. package/dist/src/utils/table/types.js +4 -1
  50. package/dist/src/utils/table/useTableSort.d.ts +10 -3
  51. package/dist/src/utils/table/useTableSort.js +24 -6
  52. package/dist/styles.css +54 -22
  53. package/dist/system.cjs +1247 -1026
  54. package/dist/system.mjs +1306 -1087
  55. package/dist/tsconfig.module.tsbuildinfo +1 -1
  56. package/dist/types/tailwindGenerated.d.ts +1 -1
  57. package/package.json +2 -2
  58. package/dist/src/charts/PieChart/renderScaledChartValue.d.ts +0 -8
  59. package/dist/src/charts/PieChart/renderScaledChartValue.js +0 -15
package/dist/system.mjs CHANGED
@@ -3588,6 +3588,22 @@ var require_people = __commonJS({
3588
3588
  }
3589
3589
  });
3590
3590
 
3591
+ // src/icons/performance.js
3592
+ var require_performance = __commonJS({
3593
+ "src/icons/performance.js"(exports) {
3594
+ "use strict";
3595
+ var data = {
3596
+ "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.646 2-8.164 9.797c-.32.384-.48.576-.482.738-.002.14.06.275.17.363.126.102.376.102.875.102h6.685l-.917 7.333 8.164-9.797c.32-.384.48-.575.482-.737a.458.458 0 00-.17-.364c-.126-.102-.376-.102-.875-.102H10.73L11.646 2Z"/>',
3597
+ "left": 0,
3598
+ "top": 0,
3599
+ "width": 22,
3600
+ "height": 22
3601
+ };
3602
+ exports.__esModule = true;
3603
+ exports.default = data;
3604
+ }
3605
+ });
3606
+
3591
3607
  // src/icons/person.js
3592
3608
  var require_person = __commonJS({
3593
3609
  "src/icons/person.js"(exports) {
@@ -4644,6 +4660,7 @@ __export(molecules_exports, {
4644
4660
  DesignSystemContext: () => DesignSystemContext,
4645
4661
  Dialog: () => Dialog,
4646
4662
  Divider: () => Divider2,
4663
+ Drawer: () => Drawer,
4647
4664
  Dropdown: () => Dropdown,
4648
4665
  DropdownButton: () => DropdownButton,
4649
4666
  DropdownMenu: () => DropdownMenu2,
@@ -4727,6 +4744,7 @@ __export(molecules_exports, {
4727
4744
  cellProps: () => cellProps,
4728
4745
  columnIsFieldColumn: () => columnIsFieldColumn,
4729
4746
  createTabsComponent: () => createTabsComponent,
4747
+ isOnSortChangedDirection: () => isOnSortChangedDirection,
4730
4748
  toSortDirection: () => toSortDirection,
4731
4749
  usePagination: () => usePagination,
4732
4750
  usePopoverContext: () => usePopoverContext,
@@ -6014,6 +6032,7 @@ var import_package = __toESM(require_package());
6014
6032
  var import_paperclip = __toESM(require_paperclip());
6015
6033
  var import_pause = __toESM(require_pause());
6016
6034
  var import_people = __toESM(require_people());
6035
+ var import_performance = __toESM(require_performance());
6017
6036
  var import_person = __toESM(require_person());
6018
6037
  var import_phone = __toESM(require_phone());
6019
6038
  var import_pieChart = __toESM(require_pieChart());
@@ -7472,21 +7491,25 @@ var createBadge = (type, displayName) => {
7472
7491
  Component.Skeleton.displayName = `${displayName}.Skeleton`;
7473
7492
  return Component;
7474
7493
  };
7475
- var NotificationBadge = ({ children, top = "-2px", right = "-2px" }) => {
7476
- return /* @__PURE__ */ React22.createElement("div", {
7477
- className: tw("relative inline-flex")
7478
- }, children, /* @__PURE__ */ React22.createElement("span", {
7494
+ var NotificationBadge = (_a) => {
7495
+ var _b = _a, { children, top = "-2px", right = "-2px" } = _b, props = __objRest(_b, ["children", "top", "right"]);
7496
+ return /* @__PURE__ */ React22.createElement("div", __spreadValues({
7497
+ className: classNames("Aquarium-Badge.Notification", tw("relative inline-flex"))
7498
+ }, props), children, /* @__PURE__ */ React22.createElement("span", {
7479
7499
  style: { top, right },
7480
7500
  className: tw("absolute rounded-full w-[6px] h-[6px] bg-error-70")
7481
7501
  }));
7482
7502
  };
7483
- var DotBadge = ({ dense = false }) => {
7484
- return /* @__PURE__ */ React22.createElement("span", {
7485
- className: tw("rounded-full bg-current", {
7486
- "w-[6px] h-[6px]": dense,
7487
- "w-[9px] h-[9px]": !dense
7488
- })
7489
- });
7503
+ var DotBadge = ({ dense = false }, ...props) => {
7504
+ return /* @__PURE__ */ React22.createElement("span", __spreadValues({
7505
+ className: classNames(
7506
+ "Aquarium-Badge.Dot",
7507
+ tw("rounded-full bg-current", {
7508
+ "w-[6px] h-[6px]": dense,
7509
+ "w-[9px] h-[9px]": !dense
7510
+ })
7511
+ )
7512
+ }, props));
7490
7513
  };
7491
7514
  var Badge = createBadge("default", "Badge");
7492
7515
  Badge.Notification = NotificationBadge;
@@ -10214,10 +10237,10 @@ var TableSortCell = (_a) => {
10214
10237
  })
10215
10238
  }, /* @__PURE__ */ React58.createElement(InlineIcon, {
10216
10239
  icon: import_chevronUp3.default,
10217
- className: getSortCellIconClassNames(direction === "descending")
10240
+ className: getSortCellIconClassNames(direction === "ascending")
10218
10241
  }), /* @__PURE__ */ React58.createElement(InlineIcon, {
10219
10242
  icon: import_chevronDown4.default,
10220
- className: getSortCellIconClassNames(direction === "ascending")
10243
+ className: getSortCellIconClassNames(direction === "descending")
10221
10244
  }))));
10222
10245
  };
10223
10246
  var Caption = ({ children }) => /* @__PURE__ */ React58.createElement(Typography2.Caption, {
@@ -10334,10 +10357,10 @@ var SortCell = (_a) => {
10334
10357
  })
10335
10358
  }, /* @__PURE__ */ React59.createElement(InlineIcon, {
10336
10359
  icon: import_chevronUp4.default,
10337
- className: getSortCellIconClassNames(direction === "descending")
10360
+ className: getSortCellIconClassNames(direction === "ascending")
10338
10361
  }), /* @__PURE__ */ React59.createElement(InlineIcon, {
10339
10362
  icon: import_chevronDown5.default,
10340
- className: getSortCellIconClassNames(direction === "ascending")
10363
+ className: getSortCellIconClassNames(direction === "descending")
10341
10364
  }))));
10342
10365
  };
10343
10366
  DataList.HeadCell = HeadCell;
@@ -10367,20 +10390,35 @@ var cellProps = (column) => ({
10367
10390
  stickyColumn: column.sticky
10368
10391
  });
10369
10392
  var columnIsFieldColumn = (column) => Boolean(column && column.field);
10393
+ function isOnSortChangedDirection(value) {
10394
+ return value === void 0 || ["ascending", "descending"].includes(value);
10395
+ }
10370
10396
 
10371
10397
  // src/utils/table/useTableSort.tsx
10372
10398
  import React60 from "react";
10373
- var useTableSort = (defaultSort) => {
10374
- const [sort, setSort] = React60.useState(defaultSort);
10399
+ var getDefaultSort = (props) => "defaultSort" in props ? props.defaultSort : "column" in props && "direction" in props && Object.keys(props).length === 2 ? { column: props.column, direction: props.direction } : void 0;
10400
+ var useTableSort = (props) => {
10401
+ const onSortChanged = props && "onSortChanged" in props ? props.onSortChanged : void 0;
10402
+ const [sort, setSort] = React60.useState(props && getDefaultSort(props));
10403
+ const setSortAndEmitOnSortChangedEvent = (sort2) => {
10404
+ setSort(sort2);
10405
+ if (onSortChanged) {
10406
+ if (sort2 && isOnSortChangedDirection(sort2.direction)) {
10407
+ onSortChanged({ key: sort2.column.key, direction: sort2 == null ? void 0 : sort2.direction });
10408
+ } else {
10409
+ onSortChanged(null);
10410
+ }
10411
+ }
10412
+ };
10375
10413
  const handleSortClick = (column) => {
10376
10414
  if (sort && sort.column.headerName === column.headerName) {
10377
10415
  if (sort.direction === "ascending") {
10378
- setSort({ column, direction: "descending" });
10416
+ setSortAndEmitOnSortChangedEvent({ column, direction: "descending" });
10379
10417
  } else {
10380
- setSort(void 0);
10418
+ setSortAndEmitOnSortChangedEvent(void 0);
10381
10419
  }
10382
10420
  } else {
10383
- setSort({ column, direction: "ascending" });
10421
+ setSortAndEmitOnSortChangedEvent({ column, direction: "ascending" });
10384
10422
  }
10385
10423
  };
10386
10424
  return [sort, handleSortClick];
@@ -10640,12 +10678,15 @@ var DataList2 = ({
10640
10678
  getGroupRow,
10641
10679
  onGroupToggled,
10642
10680
  expandedGroupIds,
10643
- defaultSort
10681
+ defaultSort,
10682
+ onSortChanged
10644
10683
  }) => {
10645
10684
  var _a;
10646
10685
  const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
10647
10686
  const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a : "ascending" } : void 0;
10648
- const [sort, updateSort] = useTableSort(initialSortState);
10687
+ const [sort, updateSort] = useTableSort(
10688
+ onSortChanged ? __spreadProps(__spreadValues({}, initialSortState), { onSortChanged }) : initialSortState
10689
+ );
10649
10690
  const sortedRows = sortRowsBy(rows, sort);
10650
10691
  const groups = group ? isFunction(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
10651
10692
  const groupKeys = groups ? Object.keys(groups) : void 0;
@@ -10895,7 +10936,8 @@ var DataTable = (_a) => {
10895
10936
  onMenuOpenChange,
10896
10937
  pagination,
10897
10938
  disabled,
10898
- defaultSort
10939
+ defaultSort,
10940
+ onSortChanged
10899
10941
  } = _b, rest = __objRest(_b, [
10900
10942
  "columns",
10901
10943
  "rows",
@@ -10910,12 +10952,15 @@ var DataTable = (_a) => {
10910
10952
  "onMenuOpenChange",
10911
10953
  "pagination",
10912
10954
  "disabled",
10913
- "defaultSort"
10955
+ "defaultSort",
10956
+ "onSortChanged"
10914
10957
  ]);
10915
10958
  var _a2;
10916
10959
  const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
10917
10960
  const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a2 = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a2 : "ascending" } : void 0;
10918
- const [sort, updateSort] = useTableSort(initialSortState);
10961
+ const [sort, updateSort] = useTableSort(
10962
+ onSortChanged ? __spreadProps(__spreadValues({}, initialSortState), { onSortChanged }) : initialSortState
10963
+ );
10919
10964
  const sortedRows = sortRowsBy(rows, sort);
10920
10965
  const amountOfColumns = columns.length + (menu ? 1 : 0);
10921
10966
  const PaginationFooter = React68.useCallback(
@@ -11057,10 +11102,23 @@ var DIALOG_ICONS_AND_COLORS = {
11057
11102
  // src/atoms/Modal/Modal.tsx
11058
11103
  import React69 from "react";
11059
11104
  var Modal = (_a) => {
11060
- var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
11105
+ var _b = _a, {
11106
+ children,
11107
+ kind = "dialog",
11108
+ className,
11109
+ open
11110
+ } = _b, rest = __objRest(_b, [
11111
+ "children",
11112
+ "kind",
11113
+ "className",
11114
+ "open"
11115
+ ]);
11061
11116
  return open ? /* @__PURE__ */ React69.createElement("div", __spreadProps(__spreadValues({}, rest), {
11062
11117
  className: classNames(
11063
- tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
11118
+ tw("inset-0 overflow-y-auto z-modal fixed"),
11119
+ {
11120
+ "py-7 justify-center flex items-center": kind === "dialog"
11121
+ },
11064
11122
  className
11065
11123
  )
11066
11124
  }), children) : null;
@@ -11073,27 +11131,30 @@ Modal.BackDrop = (_a) => {
11073
11131
  };
11074
11132
  Modal.Dialog = React69.forwardRef(
11075
11133
  (_a, ref) => {
11076
- var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
11134
+ var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
11135
+ const commonClasses = tw("bg-white max-h-full flex flex-col");
11136
+ const dialogClasses = classNames("relative w-full rounded", {
11137
+ "max-w-[600px]": size === "sm",
11138
+ "max-w-[940px]": size === "md",
11139
+ "min-h-full": size === "full"
11140
+ });
11141
+ const drawerClasses = classNames("absolute h-full", {
11142
+ "w-[360px]": size === "sm",
11143
+ "w-[560px]": size === "md",
11144
+ "w-[1080px]": size === "full"
11145
+ });
11077
11146
  return /* @__PURE__ */ React69.createElement("div", __spreadProps(__spreadValues({
11078
11147
  ref,
11079
11148
  "aria-modal": "true"
11080
11149
  }, rest), {
11081
- className: classNames(
11082
- tw("relative bg-white rounded mx-7 w-full max-h-full flex flex-col"),
11083
- {
11084
- "max-w-[600px]": size === "sm",
11085
- "max-w-[940px]": size === "md",
11086
- "min-h-full": size === "full"
11087
- },
11088
- className
11089
- )
11150
+ className: classNames(commonClasses, kind === "dialog" ? dialogClasses : drawerClasses, className)
11090
11151
  }), children);
11091
11152
  }
11092
11153
  );
11093
11154
  Modal.Header = (_a) => {
11094
11155
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
11095
11156
  return /* @__PURE__ */ React69.createElement("div", __spreadProps(__spreadValues({}, rest), {
11096
- className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
11157
+ className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
11097
11158
  }), children);
11098
11159
  };
11099
11160
  Modal.HeaderImage = (_a) => {
@@ -11111,16 +11172,21 @@ Modal.HeaderImage = (_a) => {
11111
11172
  Modal.CloseButtonContainer = (_a) => {
11112
11173
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
11113
11174
  return /* @__PURE__ */ React69.createElement("div", __spreadProps(__spreadValues({}, rest), {
11114
- className: classNames(tw("absolute top-[20px] right-[28px]"), className)
11175
+ className: classNames(tw("absolute top-[24px] right-[28px]"), className)
11115
11176
  }));
11116
11177
  };
11117
11178
  Modal.Title = (_a) => {
11118
- var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
11179
+ var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
11119
11180
  return /* @__PURE__ */ React69.createElement(Typography, __spreadValues({
11120
11181
  htmlTag: "h2",
11121
11182
  variant: "subheading",
11122
11183
  color: "grey-90",
11123
- className: classNames(tw("leading-none"), className)
11184
+ className: classNames(
11185
+ tw({
11186
+ "text-ellipsis overflow-x-hidden whitespace-nowrap": kind === "drawer"
11187
+ }),
11188
+ className
11189
+ )
11124
11190
  }, rest), children);
11125
11191
  };
11126
11192
  Modal.Subtitle = (_a) => {
@@ -11133,7 +11199,7 @@ Modal.Subtitle = (_a) => {
11133
11199
  Modal.TitleContainer = (_a) => {
11134
11200
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
11135
11201
  return /* @__PURE__ */ React69.createElement("div", __spreadProps(__spreadValues({}, rest), {
11136
- className: classNames(tw("flex flex-col grow gap-2"), className)
11202
+ className: classNames(tw("flex flex-col grow"), className)
11137
11203
  }), children);
11138
11204
  };
11139
11205
  Modal.Body = (_a) => {
@@ -11209,792 +11275,943 @@ var DialogWrapper = ({
11209
11275
  }, omit8(primaryAction, "text")), primaryAction.text))));
11210
11276
  };
11211
11277
 
11212
- // src/molecules/Dropdown/Dropdown.tsx
11213
- import React73 from "react";
11214
-
11215
- // src/molecules/Popover/Popover.tsx
11216
- import React72, { useRef as useRef7 } from "react";
11217
- import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
11218
- import { useOverlayTrigger } from "@react-aria/overlays";
11219
- import { mergeProps as mergeProps3 } from "@react-aria/utils";
11220
- import { useOverlayTriggerState as useOverlayTriggerState3 } from "@react-stately/overlays";
11221
- import classNames8 from "classnames";
11278
+ // src/molecules/Drawer/Drawer.tsx
11279
+ import React72, { useEffect as useEffect10 } from "react";
11280
+ import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
11281
+ import { useDialog as useDialog2 } from "@react-aria/dialog";
11282
+ import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
11283
+ import { useId as useId9 } from "@react-aria/utils";
11284
+ import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
11285
+ import castArray from "lodash/castArray";
11222
11286
  import omit9 from "lodash/omit";
11223
11287
 
11224
- // src/molecules/Popover/Dialog.tsx
11225
- import React71 from "react";
11226
- import { useDialog as useDialog2 } from "@react-aria/dialog";
11227
- var Dialog2 = ({ children }) => {
11228
- const ref = React71.useRef(null);
11229
- const { dialogProps } = useDialog2({}, ref);
11230
- return /* @__PURE__ */ React71.createElement("div", __spreadProps(__spreadValues({
11231
- ref
11232
- }, dialogProps), {
11233
- className: tw("outline-none")
11234
- }), children);
11288
+ // src/molecules/Tabs/Tabs.tsx
11289
+ import React71, { useEffect as useEffect9, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useState as useState10 } from "react";
11290
+ import isNumber5 from "lodash/isNumber";
11291
+ import kebabCase from "lodash/kebabCase";
11292
+ var import_chevronLeft4 = __toESM(require_chevronLeft());
11293
+ var import_chevronRight4 = __toESM(require_chevronRight());
11294
+ var import_warningSign4 = __toESM(require_warningSign());
11295
+ var isTabComponent = (c) => {
11296
+ return React71.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
11235
11297
  };
11236
-
11237
- // src/molecules/Popover/PopoverContext.tsx
11238
- import { createContext as createContext3, useContext as useContext4 } from "react";
11239
- var PopoverContext = createContext3(null);
11240
- var usePopoverContext = () => {
11241
- const ctx = useContext4(PopoverContext);
11242
- if (ctx === null) {
11243
- throw new Error("PopoverContext was used outside of provider.");
11298
+ var Tab = React71.forwardRef(
11299
+ ({ className, id, title, children }, ref) => {
11300
+ return /* @__PURE__ */ React71.createElement("div", {
11301
+ ref,
11302
+ id: `${id != null ? id : kebabCase(title)}-panel`,
11303
+ className,
11304
+ role: "tabpanel",
11305
+ tabIndex: 0,
11306
+ "aria-labelledby": `${id != null ? id : kebabCase(title)}-tab`
11307
+ }, children);
11244
11308
  }
11245
- return ctx;
11309
+ );
11310
+ var TabContainer = (_a) => {
11311
+ var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
11312
+ return /* @__PURE__ */ React71.createElement("div", __spreadProps(__spreadValues({}, rest), {
11313
+ className: classNames("py-6 z-0", className)
11314
+ }), children);
11246
11315
  };
11247
-
11248
- // src/molecules/Popover/Popover.tsx
11249
- var Popover2 = (props) => {
11250
- const {
11251
- id,
11252
- type,
11253
- placement = "bottom-left",
11254
- containFocus = true,
11255
- isKeyboardDismissDisabled = false,
11256
- targetRef,
11257
- offset,
11258
- crossOffset,
11259
- shouldFlip
11260
- } = props;
11261
- const triggerRef = useRef7(null);
11262
- const state = useOverlayTriggerState3(props);
11263
- const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
11264
- return /* @__PURE__ */ React72.createElement(PopoverContext.Provider, {
11265
- value: {
11266
- state
11267
- }
11268
- }, React72.Children.map(props.children, (child) => {
11269
- if (isComponentType(child, Popover2.Trigger)) {
11270
- return /* @__PURE__ */ React72.createElement(PressResponder2, __spreadValues({
11271
- ref: triggerRef
11272
- }, omit9(triggerProps, "aria-expanded")), /* @__PURE__ */ React72.createElement(PopoverTriggerWrapper, {
11273
- "data-testid": props["data-testid"],
11274
- "aria-controls": id,
11275
- "aria-expanded": triggerProps["aria-expanded"]
11276
- }, child.props.children));
11277
- }
11278
- if (isComponentType(child, Popover2.Panel)) {
11279
- return state.isOpen && /* @__PURE__ */ React72.createElement(PopoverOverlay, __spreadValues({
11280
- triggerRef: targetRef != null ? targetRef : triggerRef,
11281
- state,
11282
- placement,
11283
- isNonModal: !containFocus,
11284
- autoFocus: !containFocus,
11285
- isKeyboardDismissDisabled,
11286
- className: classNames8("Aquarium-Popover", child.props.className),
11287
- offset,
11288
- crossOffset,
11289
- shouldFlip
11290
- }, overlayProps), containFocus ? /* @__PURE__ */ React72.createElement(Dialog2, null, child.props.children) : child.props.children);
11316
+ var ModalTab = Tab;
11317
+ var ModalTabContainer = TabContainer;
11318
+ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
11319
+ const Tab2 = React71.forwardRef(
11320
+ (_a, ref) => {
11321
+ var _b = _a, {
11322
+ id,
11323
+ value,
11324
+ status = "default",
11325
+ disabled,
11326
+ badge,
11327
+ tooltip,
11328
+ title,
11329
+ index,
11330
+ selected,
11331
+ onSelected,
11332
+ showNotification = false,
11333
+ className
11334
+ } = _b, rest = __objRest(_b, [
11335
+ "id",
11336
+ "value",
11337
+ "status",
11338
+ "disabled",
11339
+ "badge",
11340
+ "tooltip",
11341
+ "title",
11342
+ "index",
11343
+ "selected",
11344
+ "onSelected",
11345
+ "showNotification",
11346
+ "className"
11347
+ ]);
11348
+ const _id = id != null ? id : kebabCase(title);
11349
+ let statusIcon = void 0;
11350
+ if (status === "warning") {
11351
+ statusIcon = /* @__PURE__ */ React71.createElement(InlineIcon, {
11352
+ icon: import_warningSign4.default,
11353
+ color: selected ? void 0 : "warning-80"
11354
+ });
11355
+ } else if (status === "error") {
11356
+ statusIcon = /* @__PURE__ */ React71.createElement(InlineIcon, {
11357
+ icon: import_warningSign4.default,
11358
+ color: selected ? void 0 : "error-50"
11359
+ });
11360
+ }
11361
+ const tab = /* @__PURE__ */ React71.createElement(Component, __spreadValues({
11362
+ ref,
11363
+ id: `${_id}-tab`,
11364
+ onClick: () => !disabled && onSelected(value != null ? value : index),
11365
+ className: classNames(className, "px-5 py-3 z-10 no-underline appearance-none outline-none h-full", {
11366
+ "cursor-default": disabled,
11367
+ "text-grey-80 focus:text-primary-80": !selected,
11368
+ "hover:bg-grey-0 hover:border-grey-20": !selected && !disabled,
11369
+ "border-b-2": !defaultUnderlineHidden || selected,
11370
+ "border-grey-10": !selected,
11371
+ "border-primary-80": selected
11372
+ }),
11373
+ type: "button",
11374
+ role: "tab",
11375
+ "aria-selected": selected,
11376
+ "aria-controls": `${_id}-panel`,
11377
+ tabIndex: disabled ? void 0 : 0
11378
+ }, rest), /* @__PURE__ */ React71.createElement(Typography2, {
11379
+ htmlTag: "div",
11380
+ variant: "small-strong",
11381
+ color: selected ? "primary-80" : disabled ? "grey-20" : "current",
11382
+ className: tw("inline-flex items-center gap-3")
11383
+ }, showNotification ? /* @__PURE__ */ React71.createElement(Badge.Notification, {
11384
+ right: "-4px",
11385
+ top: "3px"
11386
+ }, /* @__PURE__ */ React71.createElement("span", {
11387
+ className: tw("whitespace-nowrap")
11388
+ }, title)) : /* @__PURE__ */ React71.createElement("span", {
11389
+ className: tw("whitespace-nowrap")
11390
+ }, title), isNumber5(badge) && /* @__PURE__ */ React71.createElement(Typography2, {
11391
+ htmlTag: "span",
11392
+ variant: "small",
11393
+ color: selected ? "primary-80" : "grey-5",
11394
+ className: "leading-none"
11395
+ }, /* @__PURE__ */ React71.createElement(TabBadge, {
11396
+ kind: "filled",
11397
+ value: badge,
11398
+ textClassname: classNames({ "text-white": selected, "text-grey-50": !selected })
11399
+ })), statusIcon));
11400
+ return tooltip ? /* @__PURE__ */ React71.createElement(Tooltip, {
11401
+ content: tooltip
11402
+ }, tab) : tab;
11291
11403
  }
11292
- throw new Error("Invalid children element type");
11293
- }));
11294
- };
11295
- var Trigger = () => null;
11296
- Trigger.displayName = "Popover.Trigger";
11297
- Popover2.Trigger = Trigger;
11298
- var Panel = () => null;
11299
- Panel.displayName = "Popover.Panel";
11300
- Popover2.Panel = Panel;
11301
- var asPopoverButton = (Component, displayName) => {
11302
- const PopoverButton2 = (props) => {
11303
- const { onClick } = props;
11304
- const { state } = usePopoverContext();
11305
- const handleClick = (e) => {
11306
- state.close();
11307
- onClick == null ? void 0 : onClick(e);
11308
- };
11309
- return /* @__PURE__ */ React72.createElement(Component, __spreadProps(__spreadValues({}, props), {
11310
- onClick: handleClick
11311
- }));
11312
- };
11313
- PopoverButton2.displayName = displayName;
11314
- return PopoverButton2;
11315
- };
11316
- var PopoverButton = asPopoverButton(Button, "PopoverButton");
11317
- Popover2.Button = PopoverButton;
11318
- var PopoverTriggerWrapper = (_a) => {
11319
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
11320
- var _a2;
11321
- const ref = useRef7(null);
11322
- const trigger = React72.Children.only(children);
11323
- const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
11324
- return React72.cloneElement(trigger, __spreadProps(__spreadValues({
11325
- "ref": ref
11326
- }, mergeProps3(pressProps, trigger.props)), {
11327
- "aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
11328
- }));
11404
+ );
11405
+ Tab2.displayName = displayName;
11406
+ return Tab2;
11329
11407
  };
11330
-
11331
- // src/molecules/Dropdown/Dropdown.tsx
11332
- var Dropdown = ({ children, content, placement = "bottom-left" }) => {
11333
- return /* @__PURE__ */ React73.createElement(Popover2, {
11334
- type: "menu",
11335
- placement
11336
- }, /* @__PURE__ */ React73.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React73.createElement(Popover2.Panel, {
11337
- className: "Aquarium-Dropdown"
11338
- }, content));
11339
- };
11340
- var DropdownMenu3 = ({
11341
- title,
11342
- children,
11343
- contentId,
11344
- triggerId,
11345
- setClose = () => void 0
11346
- }) => {
11347
- const menuRef = React73.useRef(null);
11348
- React73.useEffect(() => {
11349
- const id = setTimeout(() => {
11350
- var _a, _b, _c;
11351
- return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
11408
+ var TabItem = asTabItem("button", "TabItem");
11409
+ var CARET_OFFSET = 24;
11410
+ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderChildren) => {
11411
+ const Tabs2 = (props) => {
11412
+ var _a, _b;
11413
+ const { className, value, defaultValue, onChange, children } = props;
11414
+ const childArr = React71.Children.toArray(children);
11415
+ const firstTab = childArr[0];
11416
+ const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
11417
+ const [selected, setSelected] = useState10((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
11418
+ const [leftCaret, showLeftCaret] = useState10(false);
11419
+ const [rightCaret, showRightCaret] = useState10(false);
11420
+ const parentRef = useRef7(null);
11421
+ const containerRef = useRef7(null);
11422
+ const tabsRef = useRef7(null);
11423
+ const revealSelectedTab = ({ smooth }) => {
11424
+ var _a2, _b2;
11425
+ const container = containerRef.current;
11426
+ const tabs = tabsRef.current;
11427
+ const values = React71.Children.map(
11428
+ children,
11429
+ (tab, i) => {
11430
+ var _a3;
11431
+ return (_a3 = tab == null ? void 0 : tab.props.value) != null ? _a3 : i;
11432
+ }
11433
+ );
11434
+ const idx = (_a2 = values == null ? void 0 : values.findIndex((val) => value === val)) != null ? _a2 : -1;
11435
+ const child = Array.from((_b2 = tabs == null ? void 0 : tabs.childNodes) != null ? _b2 : [])[idx];
11436
+ if (!container || !(child instanceof HTMLElement)) {
11437
+ return;
11438
+ }
11439
+ const { width: containerWidth, x: containerX } = container.getBoundingClientRect();
11440
+ const { x, width } = child.getBoundingClientRect();
11441
+ const isInViewPort = x >= containerX && x + width <= containerX + containerWidth;
11442
+ if (!isInViewPort) {
11443
+ container.scrollTo({
11444
+ left: container.scrollLeft + Math.ceil(x + width + CARET_OFFSET - containerX - containerWidth),
11445
+ behavior: smooth ? "smooth" : void 0
11446
+ });
11447
+ }
11448
+ };
11449
+ const updateCarets = () => {
11450
+ const pEl = parentRef.current;
11451
+ const el = containerRef.current;
11452
+ if (!pEl || !el) {
11453
+ return;
11454
+ }
11455
+ const { width } = pEl.getBoundingClientRect();
11456
+ const hasLeftCaret = el.scrollWidth > width && el.scrollLeft !== 0;
11457
+ const hasRightCaret = el.scrollWidth > width && Math.round(el.scrollLeft + el.getBoundingClientRect().width) !== Math.round(el.scrollWidth);
11458
+ showLeftCaret(hasLeftCaret);
11459
+ showRightCaret(hasRightCaret);
11460
+ };
11461
+ useEffect9(() => {
11462
+ if (value === void 0) {
11463
+ return;
11464
+ }
11465
+ updateCarets();
11466
+ setSelected(value);
11467
+ revealSelectedTab({ smooth: value !== selected });
11468
+ }, [value, React71.Children.count(children)]);
11469
+ useLayoutEffect2(() => {
11470
+ var _a2;
11471
+ updateCarets();
11472
+ (_a2 = containerRef.current) == null ? void 0 : _a2.addEventListener("scroll", updateCarets);
11473
+ window.addEventListener("resize", updateCarets);
11474
+ return () => {
11475
+ var _a3;
11476
+ (_a3 = containerRef.current) == null ? void 0 : _a3.removeEventListener("scroll", updateCarets);
11477
+ window.removeEventListener("resize", updateCarets);
11478
+ };
11479
+ }, [parentRef.current, containerRef.current, children]);
11480
+ const handleScrollToNext = (direction) => {
11481
+ const container = containerRef.current;
11482
+ const tabs = tabsRef.current;
11483
+ if (!container || !tabs) {
11484
+ return;
11485
+ }
11486
+ const { width: containerWidth, x: containerX } = container.getBoundingClientRect();
11487
+ const children2 = Array.from(tabs.childNodes).filter(
11488
+ (c) => c instanceof HTMLElement
11489
+ );
11490
+ if (direction === "right") {
11491
+ const next = children2.find((c) => {
11492
+ const { x, width } = c.getBoundingClientRect();
11493
+ return Math.round(x + width - containerX - containerWidth) > 0;
11494
+ });
11495
+ if (next instanceof HTMLElement) {
11496
+ const { x, width } = next.getBoundingClientRect();
11497
+ container.scrollTo({
11498
+ left: container.scrollLeft + Math.ceil(x + width + CARET_OFFSET - containerX - containerWidth),
11499
+ behavior: "smooth"
11500
+ });
11501
+ }
11502
+ } else {
11503
+ const next = children2.find((c) => {
11504
+ const { x, width } = c.getBoundingClientRect();
11505
+ return Math.round(x + width - containerX) >= 0;
11506
+ });
11507
+ if (next instanceof HTMLElement) {
11508
+ const { x } = next.getBoundingClientRect();
11509
+ container.scrollTo({
11510
+ left: container.scrollLeft - Math.abs(x - containerX - CARET_OFFSET),
11511
+ behavior: "smooth"
11512
+ });
11513
+ }
11514
+ }
11515
+ };
11516
+ const handleKeyDown = (event) => {
11517
+ const target = event.target;
11518
+ const parent = target.parentElement;
11519
+ const first = parent.firstChild;
11520
+ const last = parent.lastChild;
11521
+ const next = target.nextElementSibling;
11522
+ const prev = target.previousElementSibling;
11523
+ if (event.key === "ArrowRight") {
11524
+ (next != null ? next : first).focus();
11525
+ } else if (event.key === "ArrowLeft") {
11526
+ (prev != null ? prev : last).focus();
11527
+ }
11528
+ };
11529
+ const handleSelected = (key) => {
11530
+ (onChange != null ? onChange : setSelected)(key);
11531
+ };
11532
+ React71.Children.forEach(children, (c) => {
11533
+ if (c && !isTabComponent(c)) {
11534
+ throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
11535
+ }
11352
11536
  });
11353
- return () => clearTimeout(id);
11354
- }, [menuRef.current]);
11355
- return /* @__PURE__ */ React73.createElement("div", {
11356
- style: { minWidth: "250px" },
11357
- className: tw("py-3 bg-white")
11358
- }, !!title && /* @__PURE__ */ React73.createElement("div", {
11359
- className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
11360
- }, title), /* @__PURE__ */ React73.createElement("ol", {
11361
- role: "menu",
11362
- ref: menuRef,
11363
- id: contentId,
11364
- "aria-labelledby": triggerId
11365
- }, React73.Children.map(children, (child) => {
11366
- return React73.cloneElement(child, { setClose });
11367
- })));
11368
- };
11369
- var DropdownItem = (_a) => {
11370
- var _b = _a, {
11371
- children,
11372
- disabled = false,
11373
- tooltip,
11374
- tooltipPlacement,
11375
- color = "default",
11376
- onSelect,
11377
- setClose = () => void 0
11378
- } = _b, props = __objRest(_b, [
11379
- "children",
11380
- "disabled",
11381
- "tooltip",
11382
- "tooltipPlacement",
11383
- "color",
11384
- "onSelect",
11385
- "setClose"
11386
- ]);
11387
- const { state } = usePopoverContext();
11388
- const handleSelect = () => {
11389
- onSelect == null ? void 0 : onSelect();
11390
- state.close();
11391
- setClose();
11392
- };
11393
- const handleKeyDown = (event) => {
11394
- const target = event.target;
11395
- const parent = target.parentElement;
11396
- const first = parent.firstChild;
11397
- const last = parent.lastChild;
11398
- const next = target.nextElementSibling;
11399
- const prev = target.previousElementSibling;
11400
- if (event.key === "ArrowUp") {
11401
- prev ? prev.focus() : last.focus();
11402
- } else if (event.key === "ArrowDown") {
11403
- next ? next.focus() : first.focus();
11404
- } else if (event.key === "Tab") {
11405
- event.preventDefault();
11406
- event.stopPropagation();
11407
- } else if (event.key === "Home" || event.key === "PageUp") {
11408
- first.focus();
11409
- } else if (event.key === "End" || event.key === "PageDown") {
11410
- last.focus();
11411
- } else if (event.key === "Enter") {
11412
- !disabled && handleSelect();
11413
- }
11414
- };
11415
- const handleClick = (e) => {
11416
- e.stopPropagation();
11417
- if (!disabled) {
11418
- handleSelect();
11419
- }
11537
+ return /* @__PURE__ */ React71.createElement("div", {
11538
+ ref: parentRef,
11539
+ className: classNames("Aquarium-Tabs", tw("h-full"), className)
11540
+ }, /* @__PURE__ */ React71.createElement("div", {
11541
+ className: tw("relative flex items-center border-b-2 border-grey-10")
11542
+ }, /* @__PURE__ */ React71.createElement("div", {
11543
+ ref: containerRef,
11544
+ className: tw("overflow-y-auto scrollbar-hide h-full mb-[-2px]")
11545
+ }, /* @__PURE__ */ React71.createElement("div", {
11546
+ ref: tabsRef,
11547
+ role: "tablist",
11548
+ "aria-label": "tabs",
11549
+ className: tw("inline-flex items-center cursor-pointer font-normal h-full")
11550
+ }, React71.Children.map(
11551
+ children,
11552
+ (tab, index) => tab ? /* @__PURE__ */ React71.createElement(TabItemComponent, __spreadProps(__spreadValues({
11553
+ key: tab.props.value
11554
+ }, tab.props), {
11555
+ index,
11556
+ selected: tab.props.value !== void 0 ? tab.props.value === selected : index === selected,
11557
+ onKeyDown: handleKeyDown,
11558
+ onSelected: handleSelected
11559
+ })) : void 0
11560
+ ))), leftCaret && /* @__PURE__ */ React71.createElement("div", {
11561
+ className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
11562
+ }, /* @__PURE__ */ React71.createElement("div", {
11563
+ onClick: () => handleScrollToNext("left"),
11564
+ className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
11565
+ }, /* @__PURE__ */ React71.createElement(InlineIcon, {
11566
+ icon: import_chevronLeft4.default
11567
+ }))), rightCaret && /* @__PURE__ */ React71.createElement("div", {
11568
+ onClick: () => handleScrollToNext("right"),
11569
+ className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
11570
+ }, /* @__PURE__ */ React71.createElement("div", {
11571
+ onClick: () => handleScrollToNext("right"),
11572
+ className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
11573
+ }, /* @__PURE__ */ React71.createElement(InlineIcon, {
11574
+ icon: import_chevronRight4.default
11575
+ })))), renderChildren(children, selected, props));
11420
11576
  };
11421
- const itemContent = /* @__PURE__ */ React73.createElement("div", {
11422
- className: tw("py-3 px-4")
11423
- }, children);
11424
- return /* @__PURE__ */ React73.createElement("li", __spreadProps(__spreadValues({
11425
- role: "menuitem",
11426
- tabIndex: -1,
11427
- onClick: handleClick,
11428
- onKeyDown: handleKeyDown
11429
- }, props), {
11430
- className: tw("typography-small flex items-center focus:ring-0", {
11431
- "text-grey-70 cursor-pointer hover:bg-grey-0": !disabled,
11432
- "text-grey-10 cursor-not-allowed": disabled,
11433
- "text-primary-70 hover:text-primary-80": color === "danger" && !disabled
11434
- })
11435
- }), tooltip ? /* @__PURE__ */ React73.createElement(Tooltip, {
11436
- content: tooltip,
11437
- placement: tooltipPlacement,
11438
- inline: false
11439
- }, /* @__PURE__ */ React73.createElement("div", {
11440
- tabIndex: 0,
11441
- className: tw("grow")
11442
- }, itemContent)) : itemContent);
11577
+ Tabs2.displayName = displayName;
11578
+ Tabs2.Tab = TabComponent;
11579
+ return Tabs2;
11443
11580
  };
11444
- Dropdown.Menu = DropdownMenu3;
11445
- Dropdown.Item = DropdownItem;
11581
+ var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React71.createElement(TabContainer, null, children.find(
11582
+ (node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
11583
+ )));
11446
11584
 
11447
- // src/molecules/EmptyState/EmptyState.tsx
11448
- import React74 from "react";
11449
- var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
11450
- EmptyStateLayout2["Vertical"] = "vertical";
11451
- EmptyStateLayout2["Horizontal"] = "horizontal";
11452
- EmptyStateLayout2["CenterVertical"] = "center-vertical";
11453
- EmptyStateLayout2["LeftVertical"] = "left-vertical";
11454
- EmptyStateLayout2["CenterHorizontal"] = "center-horizontal";
11455
- EmptyStateLayout2["LeftHorizontal"] = "left-horizontal";
11456
- return EmptyStateLayout2;
11457
- })(EmptyStateLayout || {});
11458
- var layoutStyle = (layout) => {
11459
- switch (layout) {
11460
- case "left-vertical" /* LeftVertical */:
11461
- return {
11462
- layout: "column",
11463
- justifyContent: "flex-start",
11464
- alignItems: "flex-start"
11465
- };
11466
- case "left-horizontal" /* LeftHorizontal */:
11467
- case "horizontal" /* Horizontal */:
11468
- return {
11469
- layout: "row",
11470
- justifyContent: "flex-start",
11471
- alignItems: "flex-start"
11472
- };
11473
- case "center-horizontal" /* CenterHorizontal */:
11474
- return {
11475
- layout: "row",
11476
- justifyContent: "center",
11477
- alignItems: "flex-start"
11478
- };
11479
- case "center-vertical" /* CenterVertical */:
11480
- case "vertical" /* Vertical */:
11481
- default:
11482
- return {
11483
- layout: "column",
11484
- justifyContent: "center",
11485
- alignItems: "center"
11486
- };
11585
+ // src/molecules/Drawer/Drawer.tsx
11586
+ var import_cross6 = __toESM(require_cross());
11587
+ var import_more4 = __toESM(require_more());
11588
+ var AnimatedBackDrop = animated4(Modal.BackDrop);
11589
+ var AnimatedDialog = animated4(Modal.Dialog);
11590
+ var WIDTHS = {
11591
+ sm: 360,
11592
+ md: 560,
11593
+ lg: 1080
11594
+ };
11595
+ var Drawer = (_a) => {
11596
+ var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
11597
+ const { onClose, size = "sm", portalContainer } = props;
11598
+ const [hidden, setHidden] = React72.useState(!open);
11599
+ const ref = React72.useRef(null);
11600
+ const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
11601
+ useEffect10(() => {
11602
+ if (open && hidden) {
11603
+ setHidden(!open);
11604
+ }
11605
+ }, [open]);
11606
+ const { modalProps, underlayProps } = useModalOverlay2(
11607
+ { isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
11608
+ state,
11609
+ ref
11610
+ );
11611
+ const { opacity, transform } = useSpring3({
11612
+ transform: open ? `translateX(100vw) translateX(-${WIDTHS[size]}px)` : "translateX(100vw) translateX(0px)",
11613
+ opacity: open ? 0.6 : 0,
11614
+ config: {
11615
+ mass: 0.5,
11616
+ tension: 150,
11617
+ friction: 15
11618
+ },
11619
+ onRest: () => {
11620
+ if (!open) {
11621
+ setHidden(true);
11622
+ }
11623
+ }
11624
+ });
11625
+ if (!state.isOpen) {
11626
+ return null;
11487
11627
  }
11628
+ return /* @__PURE__ */ React72.createElement(Overlay3, {
11629
+ portalContainer
11630
+ }, /* @__PURE__ */ React72.createElement(Modal, {
11631
+ kind: "drawer",
11632
+ className: "Aquarium-Drawer overflow-x-hidden",
11633
+ open: true
11634
+ }, /* @__PURE__ */ React72.createElement(AnimatedBackDrop, __spreadValues({
11635
+ style: { opacity }
11636
+ }, underlayProps)), /* @__PURE__ */ React72.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
11637
+ ref
11638
+ }, props), modalProps), {
11639
+ spring: { transform }
11640
+ }))));
11488
11641
  };
11489
- var isVerticalLayout = (layout) => layout === "vertical" /* Vertical */ || layout === "center-vertical" /* CenterVertical */;
11490
- var EmptyState = ({
11491
- title,
11492
- image,
11493
- imageAlt = "",
11494
- imageWidth,
11495
- description,
11496
- children,
11497
- primaryAction,
11498
- secondaryAction,
11499
- footer,
11500
- layout = "vertical" /* Vertical */,
11501
- borderStyle = "dashed",
11502
- fullHeight = isVerticalLayout(layout) ? true : false
11503
- }) => {
11504
- const template = layoutStyle(layout);
11505
- return /* @__PURE__ */ React74.createElement(Box, {
11506
- className: classNames(
11507
- "Aquarium-EmptyState",
11508
- tw("rounded p-[56px]", {
11509
- "border border-dashed": borderStyle === "dashed",
11510
- "border border-solid": borderStyle === "solid",
11511
- "text-left": !isVerticalLayout(layout),
11512
- "text-center": isVerticalLayout(layout),
11513
- "h-full": fullHeight
11514
- })
11515
- ),
11516
- backgroundColor: "transparent",
11517
- borderColor: "grey-10"
11518
- }, /* @__PURE__ */ React74.createElement(Box.Flex, {
11519
- style: { gap: "56px" },
11520
- flexDirection: template.layout,
11521
- justifyContent: template.justifyContent,
11522
- alignItems: template.layout === "row" ? "center" : template.alignItems,
11523
- height: fullHeight ? "full" : void 0
11524
- }, image && /* @__PURE__ */ React74.createElement("img", {
11525
- src: image,
11526
- alt: imageAlt,
11527
- style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
11528
- }), /* @__PURE__ */ React74.createElement(Box.Flex, {
11529
- flexDirection: "column",
11530
- justifyContent: template.justifyContent,
11531
- alignItems: template.alignItems
11532
- }, /* @__PURE__ */ React74.createElement(Typography2.Heading, {
11533
- htmlTag: "h2"
11534
- }, title), (description || children) && /* @__PURE__ */ React74.createElement(Box, {
11535
- marginTop: "5"
11536
- }, /* @__PURE__ */ React74.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React74.createElement(Box.Flex, {
11537
- marginTop: "7",
11538
- gap: "4",
11539
- justifyContent: "center",
11540
- alignItems: "center",
11541
- flexWrap: "wrap"
11542
- }, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React74.createElement(Box, {
11543
- marginTop: "5"
11544
- }, /* @__PURE__ */ React74.createElement(Typography2.Small, {
11545
- color: "grey-60"
11546
- }, footer)))));
11547
- };
11548
-
11549
- // src/molecules/Flexbox/FlexboxItem.tsx
11550
- import React75 from "react";
11551
- var FlexboxItem = Tailwindify(
11552
- ({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
11553
- const hookStyle = useStyle({
11554
- display,
11555
- flex,
11556
- flexGrow: grow,
11557
- flexShrink: shrink,
11558
- order,
11559
- alignSelf
11560
- });
11561
- const HtmlElement = htmlTag;
11562
- return /* @__PURE__ */ React75.createElement(HtmlElement, {
11563
- style: __spreadValues(__spreadValues({}, hookStyle), style),
11564
- className
11565
- }, children);
11566
- }
11567
- );
11568
-
11569
- // src/molecules/Grid/GridItem.tsx
11570
- import React76 from "react";
11571
- var GridItem2 = Tailwindify(
11572
- ({
11573
- htmlTag = "div",
11574
- className,
11575
- style,
11576
- children,
11577
- display,
11578
- justifySelf,
11579
- alignSelf,
11580
- placeSelf,
11581
- colSpan,
11582
- colStart,
11583
- colEnd,
11584
- rowSpan,
11585
- rowStart,
11586
- rowEnd
11587
- }) => {
11588
- const hookStyle = useStyle({
11589
- display,
11590
- justifySelf,
11591
- alignSelf,
11592
- placeSelf,
11593
- gridColumn: colSpan,
11594
- gridColumnStart: colStart,
11595
- gridColumnEnd: colEnd,
11596
- gridRow: rowSpan,
11597
- gridRowStart: rowStart,
11598
- gridRowEnd: rowEnd
11599
- });
11600
- const HtmlElement = htmlTag;
11601
- return /* @__PURE__ */ React76.createElement(HtmlElement, {
11602
- style: __spreadValues(__spreadValues({}, hookStyle), style),
11603
- className
11604
- }, children);
11642
+ var DrawerWrapper = React72.forwardRef(
11643
+ (_a, ref) => {
11644
+ var _b = _a, {
11645
+ title,
11646
+ children,
11647
+ size = "sm",
11648
+ primaryAction,
11649
+ secondaryActions,
11650
+ onClose,
11651
+ spring,
11652
+ onAction,
11653
+ menu,
11654
+ onMenuOpenChange,
11655
+ menuLabel,
11656
+ menuAriaLabel
11657
+ } = _b, props = __objRest(_b, [
11658
+ "title",
11659
+ "children",
11660
+ "size",
11661
+ "primaryAction",
11662
+ "secondaryActions",
11663
+ "onClose",
11664
+ "spring",
11665
+ "onAction",
11666
+ "menu",
11667
+ "onMenuOpenChange",
11668
+ "menuLabel",
11669
+ "menuAriaLabel"
11670
+ ]);
11671
+ var _a2;
11672
+ const labelledBy = useId9();
11673
+ const describedBy = useId9();
11674
+ const { dialogProps } = useDialog2(
11675
+ { "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
11676
+ ref
11677
+ );
11678
+ const dialogSize = size === "lg" ? "full" : size;
11679
+ const hasTabs = isComponentType(children, Tabs);
11680
+ return /* @__PURE__ */ React72.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
11681
+ ref,
11682
+ kind: "drawer",
11683
+ "aria-modal": "true",
11684
+ size: dialogSize
11685
+ }, props), dialogProps), {
11686
+ style: __spreadValues({}, spring)
11687
+ }), /* @__PURE__ */ React72.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React72.createElement(Button.Icon, {
11688
+ "aria-label": "Close",
11689
+ icon: import_cross6.default,
11690
+ onClick: onClose
11691
+ })), /* @__PURE__ */ React72.createElement(Modal.Header, {
11692
+ className: tw({ "pb-3": hasTabs })
11693
+ }, /* @__PURE__ */ React72.createElement(Modal.Title, {
11694
+ id: labelledBy,
11695
+ kind: "drawer"
11696
+ }, title)), hasTabs ? /* @__PURE__ */ React72.createElement(DrawerTabs, __spreadProps(__spreadValues({}, children.props), {
11697
+ className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
11698
+ })) : /* @__PURE__ */ React72.createElement(Modal.Body, {
11699
+ id: describedBy,
11700
+ tabIndex: 0,
11701
+ noFooter: !(secondaryActions || primaryAction)
11702
+ }, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React72.createElement(Modal.Footer, null, /* @__PURE__ */ React72.createElement(Modal.Actions, {
11703
+ className: size === "sm" ? tw("flex-col") : void 0
11704
+ }, size !== "sm" && menu && /* @__PURE__ */ React72.createElement(Box.Flex, {
11705
+ alignItems: "center"
11706
+ }, /* @__PURE__ */ React72.createElement(DropdownMenu2, {
11707
+ onAction: (action) => onAction == null ? void 0 : onAction(action),
11708
+ onOpenChange: onMenuOpenChange
11709
+ }, /* @__PURE__ */ React72.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React72.createElement(Button.Icon, {
11710
+ "aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
11711
+ icon: import_more4.default
11712
+ })), menu)), secondaryActions && castArray(secondaryActions).filter(Boolean).map((_b2) => {
11713
+ var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
11714
+ return /* @__PURE__ */ React72.createElement(Button.Secondary, __spreadValues({
11715
+ key: text
11716
+ }, action), text);
11717
+ }), primaryAction && /* @__PURE__ */ React72.createElement(Button.Primary, __spreadValues({
11718
+ key: primaryAction.text
11719
+ }, omit9(primaryAction, "text")), primaryAction.text))));
11605
11720
  }
11606
11721
  );
11722
+ var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React72.createElement(Modal.Body, {
11723
+ className: tw("h-full")
11724
+ }, /* @__PURE__ */ React72.createElement(ModalTabContainer, null, children.find(
11725
+ (node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
11726
+ ))));
11607
11727
 
11608
- // src/molecules/LineClamp/LineClamp.tsx
11609
- import React77 from "react";
11610
- var LineClamp2 = ({
11611
- lines,
11612
- children,
11613
- wordBreak,
11614
- expandLabel,
11615
- collapseLabel,
11616
- onClampedChange
11617
- }) => {
11618
- const ref = React77.useRef(null);
11619
- const [clamped, setClamped] = React77.useState(true);
11620
- const [isClampingEnabled, setClampingEnabled] = React77.useState(false);
11621
- React77.useEffect(() => {
11622
- var _a, _b;
11623
- const el = ref.current;
11624
- setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
11625
- }, [ref.current]);
11626
- const handleClampedChange = () => {
11627
- setClamped(!clamped);
11628
- onClampedChange == null ? void 0 : onClampedChange(!clamped);
11629
- };
11630
- return /* @__PURE__ */ React77.createElement("div", {
11631
- className: "Aquarium-LineClamp"
11632
- }, /* @__PURE__ */ React77.createElement(LineClamp, {
11633
- ref,
11634
- lines,
11635
- clamped,
11636
- wordBreak
11637
- }, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React77.createElement(Button.Ghost, {
11638
- dense: true,
11639
- onClick: handleClampedChange
11640
- }, clamped ? expandLabel : collapseLabel));
11641
- };
11728
+ // src/molecules/Dropdown/Dropdown.tsx
11729
+ import React75 from "react";
11642
11730
 
11643
- // src/molecules/Link/Link.tsx
11644
- import React79 from "react";
11645
- import classNames9 from "classnames";
11731
+ // src/molecules/Popover/Popover.tsx
11732
+ import React74, { useRef as useRef8 } from "react";
11733
+ import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
11734
+ import { useOverlayTrigger } from "@react-aria/overlays";
11735
+ import { mergeProps as mergeProps3 } from "@react-aria/utils";
11736
+ import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
11737
+ import classNames8 from "classnames";
11738
+ import omit10 from "lodash/omit";
11646
11739
 
11647
- // src/atoms/Link/Link.tsx
11648
- import React78 from "react";
11649
- var Link = (_a) => {
11650
- var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
11651
- return /* @__PURE__ */ React78.createElement("a", __spreadValues({
11652
- className: classNames(className, linkStyle)
11653
- }, props), children);
11740
+ // src/molecules/Popover/Dialog.tsx
11741
+ import React73 from "react";
11742
+ import { useDialog as useDialog3 } from "@react-aria/dialog";
11743
+ var Dialog2 = ({ children }) => {
11744
+ const ref = React73.useRef(null);
11745
+ const { dialogProps } = useDialog3({}, ref);
11746
+ return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({
11747
+ ref
11748
+ }, dialogProps), {
11749
+ className: tw("outline-none")
11750
+ }), children);
11654
11751
  };
11655
11752
 
11656
- // src/molecules/Link/Link.tsx
11657
- var Link2 = (_a) => {
11658
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
11659
- return /* @__PURE__ */ React79.createElement(Link, __spreadValues({
11660
- className: classNames9("Aquarium-Link", className)
11661
- }, props));
11753
+ // src/molecules/Popover/PopoverContext.tsx
11754
+ import { createContext as createContext3, useContext as useContext4 } from "react";
11755
+ var PopoverContext = createContext3(null);
11756
+ var usePopoverContext = () => {
11757
+ const ctx = useContext4(PopoverContext);
11758
+ if (ctx === null) {
11759
+ throw new Error("PopoverContext was used outside of provider.");
11760
+ }
11761
+ return ctx;
11662
11762
  };
11663
11763
 
11664
- // src/molecules/ListItem/ListItem.tsx
11665
- import React80 from "react";
11666
- var ListItem = ({ name, icon, active = false }) => {
11667
- return /* @__PURE__ */ React80.createElement(Box.Flex, {
11668
- className: "Aquarium-ListItem",
11669
- alignItems: "center"
11670
- }, /* @__PURE__ */ React80.createElement(Typography2, {
11671
- variant: active ? "small-strong" : "small",
11672
- color: "grey-70",
11673
- htmlTag: "span",
11674
- className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
11675
- }, /* @__PURE__ */ React80.createElement("img", {
11676
- src: icon,
11677
- alt: "",
11678
- className: "inline mr-4",
11679
- height: 28,
11680
- width: 28
11681
- }), name));
11764
+ // src/molecules/Popover/Popover.tsx
11765
+ var Popover2 = (props) => {
11766
+ const {
11767
+ id,
11768
+ type,
11769
+ placement = "bottom-left",
11770
+ containFocus = true,
11771
+ isKeyboardDismissDisabled = false,
11772
+ targetRef,
11773
+ offset,
11774
+ crossOffset,
11775
+ shouldFlip
11776
+ } = props;
11777
+ const triggerRef = useRef8(null);
11778
+ const state = useOverlayTriggerState4(props);
11779
+ const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
11780
+ return /* @__PURE__ */ React74.createElement(PopoverContext.Provider, {
11781
+ value: {
11782
+ state
11783
+ }
11784
+ }, React74.Children.map(props.children, (child) => {
11785
+ if (isComponentType(child, Popover2.Trigger)) {
11786
+ return /* @__PURE__ */ React74.createElement(PressResponder2, __spreadValues({
11787
+ ref: triggerRef
11788
+ }, omit10(triggerProps, "aria-expanded")), /* @__PURE__ */ React74.createElement(PopoverTriggerWrapper, {
11789
+ "data-testid": props["data-testid"],
11790
+ "aria-controls": id,
11791
+ "aria-expanded": triggerProps["aria-expanded"]
11792
+ }, child.props.children));
11793
+ }
11794
+ if (isComponentType(child, Popover2.Panel)) {
11795
+ return state.isOpen && /* @__PURE__ */ React74.createElement(PopoverOverlay, __spreadValues({
11796
+ triggerRef: targetRef != null ? targetRef : triggerRef,
11797
+ state,
11798
+ placement,
11799
+ isNonModal: !containFocus,
11800
+ autoFocus: !containFocus,
11801
+ isKeyboardDismissDisabled,
11802
+ className: classNames8("Aquarium-Popover", child.props.className),
11803
+ offset,
11804
+ crossOffset,
11805
+ shouldFlip
11806
+ }, overlayProps), containFocus ? /* @__PURE__ */ React74.createElement(Dialog2, null, child.props.children) : child.props.children);
11807
+ }
11808
+ throw new Error("Invalid children element type");
11809
+ }));
11810
+ };
11811
+ var Trigger = () => null;
11812
+ Trigger.displayName = "Popover.Trigger";
11813
+ Popover2.Trigger = Trigger;
11814
+ var Panel = () => null;
11815
+ Panel.displayName = "Popover.Panel";
11816
+ Popover2.Panel = Panel;
11817
+ var asPopoverButton = (Component, displayName) => {
11818
+ const PopoverButton2 = (props) => {
11819
+ const { onClick } = props;
11820
+ const { state } = usePopoverContext();
11821
+ const handleClick = (e) => {
11822
+ state.close();
11823
+ onClick == null ? void 0 : onClick(e);
11824
+ };
11825
+ return /* @__PURE__ */ React74.createElement(Component, __spreadProps(__spreadValues({}, props), {
11826
+ onClick: handleClick
11827
+ }));
11828
+ };
11829
+ PopoverButton2.displayName = displayName;
11830
+ return PopoverButton2;
11831
+ };
11832
+ var PopoverButton = asPopoverButton(Button, "PopoverButton");
11833
+ Popover2.Button = PopoverButton;
11834
+ var PopoverTriggerWrapper = (_a) => {
11835
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
11836
+ var _a2;
11837
+ const ref = useRef8(null);
11838
+ const trigger = React74.Children.only(children);
11839
+ const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
11840
+ return React74.cloneElement(trigger, __spreadProps(__spreadValues({
11841
+ "ref": ref
11842
+ }, mergeProps3(pressProps, trigger.props)), {
11843
+ "aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
11844
+ }));
11682
11845
  };
11683
11846
 
11684
- // src/molecules/Modal/Modal.tsx
11685
- import React82 from "react";
11686
- import { useDialog as useDialog3 } from "@react-aria/dialog";
11687
- import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
11688
- import { useId as useId9 } from "@react-aria/utils";
11689
- import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
11690
- import castArray from "lodash/castArray";
11691
- import omit10 from "lodash/omit";
11692
-
11693
- // src/molecules/Tabs/Tabs.tsx
11694
- import React81, { useEffect as useEffect9, useLayoutEffect as useLayoutEffect2, useRef as useRef8, useState as useState10 } from "react";
11695
- import isNumber5 from "lodash/isNumber";
11696
- import kebabCase from "lodash/kebabCase";
11697
- var import_chevronLeft4 = __toESM(require_chevronLeft());
11698
- var import_chevronRight4 = __toESM(require_chevronRight());
11699
- var import_warningSign4 = __toESM(require_warningSign());
11700
- var isTabComponent = (c) => {
11701
- return React81.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
11847
+ // src/molecules/Dropdown/Dropdown.tsx
11848
+ var Dropdown = ({ children, content, placement = "bottom-left" }) => {
11849
+ return /* @__PURE__ */ React75.createElement(Popover2, {
11850
+ type: "menu",
11851
+ placement
11852
+ }, /* @__PURE__ */ React75.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React75.createElement(Popover2.Panel, {
11853
+ className: "Aquarium-Dropdown"
11854
+ }, content));
11702
11855
  };
11703
- var Tab = React81.forwardRef(
11704
- ({ className, id, title, children }, ref) => {
11705
- return /* @__PURE__ */ React81.createElement("div", {
11706
- ref,
11707
- id: `${id != null ? id : kebabCase(title)}-panel`,
11708
- className,
11709
- role: "tabpanel",
11710
- tabIndex: 0,
11711
- "aria-labelledby": `${id != null ? id : kebabCase(title)}-tab`
11712
- }, children);
11713
- }
11714
- );
11715
- var TabContainer = (_a) => {
11716
- var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
11717
- return /* @__PURE__ */ React81.createElement("div", __spreadProps(__spreadValues({}, rest), {
11718
- className: classNames("py-6 z-0", className)
11719
- }), children);
11856
+ var DropdownMenu3 = ({
11857
+ title,
11858
+ children,
11859
+ contentId,
11860
+ triggerId,
11861
+ setClose = () => void 0
11862
+ }) => {
11863
+ const menuRef = React75.useRef(null);
11864
+ React75.useEffect(() => {
11865
+ const id = setTimeout(() => {
11866
+ var _a, _b, _c;
11867
+ return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
11868
+ });
11869
+ return () => clearTimeout(id);
11870
+ }, [menuRef.current]);
11871
+ return /* @__PURE__ */ React75.createElement("div", {
11872
+ style: { minWidth: "250px" },
11873
+ className: tw("py-3 bg-white")
11874
+ }, !!title && /* @__PURE__ */ React75.createElement("div", {
11875
+ className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
11876
+ }, title), /* @__PURE__ */ React75.createElement("ol", {
11877
+ role: "menu",
11878
+ ref: menuRef,
11879
+ id: contentId,
11880
+ "aria-labelledby": triggerId
11881
+ }, React75.Children.map(children, (child) => {
11882
+ return React75.cloneElement(child, { setClose });
11883
+ })));
11720
11884
  };
11721
- var ModalTab = Tab;
11722
- var ModalTabContainer = TabContainer;
11723
- var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
11724
- const Tab2 = React81.forwardRef(
11725
- (_a, ref) => {
11726
- var _b = _a, {
11727
- id,
11728
- value,
11729
- status = "default",
11730
- disabled,
11731
- badge,
11732
- tooltip,
11733
- title,
11734
- index,
11735
- selected,
11736
- onSelected,
11737
- showNotification = false,
11738
- className
11739
- } = _b, rest = __objRest(_b, [
11740
- "id",
11741
- "value",
11742
- "status",
11743
- "disabled",
11744
- "badge",
11745
- "tooltip",
11746
- "title",
11747
- "index",
11748
- "selected",
11749
- "onSelected",
11750
- "showNotification",
11751
- "className"
11752
- ]);
11753
- const _id = id != null ? id : kebabCase(title);
11754
- let statusIcon = void 0;
11755
- if (status === "warning") {
11756
- statusIcon = /* @__PURE__ */ React81.createElement(InlineIcon, {
11757
- icon: import_warningSign4.default,
11758
- color: selected ? void 0 : "warning-80"
11759
- });
11760
- } else if (status === "error") {
11761
- statusIcon = /* @__PURE__ */ React81.createElement(InlineIcon, {
11762
- icon: import_warningSign4.default,
11763
- color: selected ? void 0 : "error-50"
11764
- });
11765
- }
11766
- const tab = /* @__PURE__ */ React81.createElement(Component, __spreadValues({
11767
- ref,
11768
- id: `${_id}-tab`,
11769
- onClick: () => !disabled && onSelected(value != null ? value : index),
11770
- className: classNames(className, "px-5 py-3 z-10 no-underline appearance-none outline-none h-full", {
11771
- "cursor-default": disabled,
11772
- "text-grey-80 focus:text-primary-80": !selected,
11773
- "hover:bg-grey-0 hover:border-grey-20": !selected && !disabled,
11774
- "border-b-2": !defaultUnderlineHidden || selected,
11775
- "border-grey-10": !selected,
11776
- "border-primary-80": selected
11777
- }),
11778
- type: "button",
11779
- role: "tab",
11780
- "aria-selected": selected,
11781
- "aria-controls": `${_id}-panel`,
11782
- tabIndex: disabled ? void 0 : 0
11783
- }, rest), /* @__PURE__ */ React81.createElement(Typography2, {
11784
- htmlTag: "div",
11785
- variant: "small",
11786
- color: selected ? "primary-80" : disabled ? "grey-20" : "current",
11787
- className: tw("inline-flex items-center gap-3")
11788
- }, showNotification ? /* @__PURE__ */ React81.createElement(Badge.Notification, {
11789
- right: "-4px",
11790
- top: "3px"
11791
- }, /* @__PURE__ */ React81.createElement("span", {
11792
- className: tw("whitespace-nowrap")
11793
- }, title)) : /* @__PURE__ */ React81.createElement("span", {
11794
- className: tw("whitespace-nowrap")
11795
- }, title), isNumber5(badge) && /* @__PURE__ */ React81.createElement(Typography2, {
11796
- htmlTag: "span",
11797
- variant: "small",
11798
- color: selected ? "primary-80" : "grey-5",
11799
- className: "leading-none"
11800
- }, /* @__PURE__ */ React81.createElement(TabBadge, {
11801
- kind: "filled",
11802
- value: badge,
11803
- textClassname: classNames({ "text-white": selected, "text-grey-50": !selected })
11804
- })), statusIcon));
11805
- return tooltip ? /* @__PURE__ */ React81.createElement(Tooltip, {
11806
- content: tooltip
11807
- }, tab) : tab;
11885
+ var DropdownItem = (_a) => {
11886
+ var _b = _a, {
11887
+ children,
11888
+ disabled = false,
11889
+ tooltip,
11890
+ tooltipPlacement,
11891
+ color = "default",
11892
+ onSelect,
11893
+ setClose = () => void 0
11894
+ } = _b, props = __objRest(_b, [
11895
+ "children",
11896
+ "disabled",
11897
+ "tooltip",
11898
+ "tooltipPlacement",
11899
+ "color",
11900
+ "onSelect",
11901
+ "setClose"
11902
+ ]);
11903
+ const { state } = usePopoverContext();
11904
+ const handleSelect = () => {
11905
+ onSelect == null ? void 0 : onSelect();
11906
+ state.close();
11907
+ setClose();
11908
+ };
11909
+ const handleKeyDown = (event) => {
11910
+ const target = event.target;
11911
+ const parent = target.parentElement;
11912
+ const first = parent.firstChild;
11913
+ const last = parent.lastChild;
11914
+ const next = target.nextElementSibling;
11915
+ const prev = target.previousElementSibling;
11916
+ if (event.key === "ArrowUp") {
11917
+ prev ? prev.focus() : last.focus();
11918
+ } else if (event.key === "ArrowDown") {
11919
+ next ? next.focus() : first.focus();
11920
+ } else if (event.key === "Tab") {
11921
+ event.preventDefault();
11922
+ event.stopPropagation();
11923
+ } else if (event.key === "Home" || event.key === "PageUp") {
11924
+ first.focus();
11925
+ } else if (event.key === "End" || event.key === "PageDown") {
11926
+ last.focus();
11927
+ } else if (event.key === "Enter") {
11928
+ !disabled && handleSelect();
11808
11929
  }
11809
- );
11810
- Tab2.displayName = displayName;
11811
- return Tab2;
11930
+ };
11931
+ const handleClick = (e) => {
11932
+ e.stopPropagation();
11933
+ if (!disabled) {
11934
+ handleSelect();
11935
+ }
11936
+ };
11937
+ const itemContent = /* @__PURE__ */ React75.createElement("div", {
11938
+ className: tw("py-3 px-4")
11939
+ }, children);
11940
+ return /* @__PURE__ */ React75.createElement("li", __spreadProps(__spreadValues({
11941
+ role: "menuitem",
11942
+ tabIndex: -1,
11943
+ onClick: handleClick,
11944
+ onKeyDown: handleKeyDown
11945
+ }, props), {
11946
+ className: tw("typography-small flex items-center focus:ring-0", {
11947
+ "text-grey-70 cursor-pointer hover:bg-grey-0": !disabled,
11948
+ "text-grey-10 cursor-not-allowed": disabled,
11949
+ "text-primary-70 hover:text-primary-80": color === "danger" && !disabled
11950
+ })
11951
+ }), tooltip ? /* @__PURE__ */ React75.createElement(Tooltip, {
11952
+ content: tooltip,
11953
+ placement: tooltipPlacement,
11954
+ inline: false
11955
+ }, /* @__PURE__ */ React75.createElement("div", {
11956
+ tabIndex: 0,
11957
+ className: tw("grow")
11958
+ }, itemContent)) : itemContent);
11812
11959
  };
11813
- var TabItem = asTabItem("button", "TabItem");
11814
- var CARET_OFFSET = 24;
11815
- var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderChildren) => {
11816
- const Tabs2 = (props) => {
11817
- var _a, _b;
11818
- const { className, value, defaultValue, onChange, children } = props;
11819
- const childArr = React81.Children.toArray(children);
11820
- const firstTab = childArr[0];
11821
- const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
11822
- const [selected, setSelected] = useState10((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
11823
- const [leftCaret, showLeftCaret] = useState10(false);
11824
- const [rightCaret, showRightCaret] = useState10(false);
11825
- const parentRef = useRef8(null);
11826
- const containerRef = useRef8(null);
11827
- const tabsRef = useRef8(null);
11828
- const revealSelectedTab = ({ smooth }) => {
11829
- var _a2, _b2;
11830
- const container = containerRef.current;
11831
- const tabs = tabsRef.current;
11832
- const values = React81.Children.map(
11833
- children,
11834
- (tab, i) => {
11835
- var _a3;
11836
- return (_a3 = tab == null ? void 0 : tab.props.value) != null ? _a3 : i;
11837
- }
11838
- );
11839
- const idx = (_a2 = values == null ? void 0 : values.findIndex((val) => value === val)) != null ? _a2 : -1;
11840
- const child = Array.from((_b2 = tabs == null ? void 0 : tabs.childNodes) != null ? _b2 : [])[idx];
11841
- if (!container || !(child instanceof HTMLElement)) {
11842
- return;
11843
- }
11844
- const { width: containerWidth, x: containerX } = container.getBoundingClientRect();
11845
- const { x, width } = child.getBoundingClientRect();
11846
- const isInViewPort = x >= containerX && x + width <= containerX + containerWidth;
11847
- if (!isInViewPort) {
11848
- container.scrollTo({
11849
- left: container.scrollLeft + Math.ceil(x + width + CARET_OFFSET - containerX - containerWidth),
11850
- behavior: smooth ? "smooth" : void 0
11851
- });
11852
- }
11853
- };
11854
- const updateCarets = () => {
11855
- const pEl = parentRef.current;
11856
- const el = containerRef.current;
11857
- if (!pEl || !el) {
11858
- return;
11859
- }
11860
- const { width } = pEl.getBoundingClientRect();
11861
- const hasLeftCaret = el.scrollWidth > width && el.scrollLeft !== 0;
11862
- const hasRightCaret = el.scrollWidth > width && Math.round(el.scrollLeft + el.getBoundingClientRect().width) !== Math.round(el.scrollWidth);
11863
- showLeftCaret(hasLeftCaret);
11864
- showRightCaret(hasRightCaret);
11865
- };
11866
- useEffect9(() => {
11867
- if (value === void 0) {
11868
- return;
11869
- }
11870
- updateCarets();
11871
- setSelected(value);
11872
- revealSelectedTab({ smooth: value !== selected });
11873
- }, [value, React81.Children.count(children)]);
11874
- useLayoutEffect2(() => {
11875
- var _a2;
11876
- updateCarets();
11877
- (_a2 = containerRef.current) == null ? void 0 : _a2.addEventListener("scroll", updateCarets);
11878
- window.addEventListener("resize", updateCarets);
11879
- return () => {
11880
- var _a3;
11881
- (_a3 = containerRef.current) == null ? void 0 : _a3.removeEventListener("scroll", updateCarets);
11882
- window.removeEventListener("resize", updateCarets);
11960
+ Dropdown.Menu = DropdownMenu3;
11961
+ Dropdown.Item = DropdownItem;
11962
+
11963
+ // src/molecules/EmptyState/EmptyState.tsx
11964
+ import React76 from "react";
11965
+ var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
11966
+ EmptyStateLayout2["Vertical"] = "vertical";
11967
+ EmptyStateLayout2["Horizontal"] = "horizontal";
11968
+ EmptyStateLayout2["CenterVertical"] = "center-vertical";
11969
+ EmptyStateLayout2["LeftVertical"] = "left-vertical";
11970
+ EmptyStateLayout2["CenterHorizontal"] = "center-horizontal";
11971
+ EmptyStateLayout2["LeftHorizontal"] = "left-horizontal";
11972
+ return EmptyStateLayout2;
11973
+ })(EmptyStateLayout || {});
11974
+ var layoutStyle = (layout) => {
11975
+ switch (layout) {
11976
+ case "left-vertical" /* LeftVertical */:
11977
+ return {
11978
+ layout: "column",
11979
+ justifyContent: "flex-start",
11980
+ alignItems: "flex-start"
11883
11981
  };
11884
- }, [parentRef.current, containerRef.current, children]);
11885
- const handleScrollToNext = (direction) => {
11886
- const container = containerRef.current;
11887
- const tabs = tabsRef.current;
11888
- if (!container || !tabs) {
11889
- return;
11890
- }
11891
- const { width: containerWidth, x: containerX } = container.getBoundingClientRect();
11892
- const children2 = Array.from(tabs.childNodes).filter(
11893
- (c) => c instanceof HTMLElement
11894
- );
11895
- if (direction === "right") {
11896
- const next = children2.find((c) => {
11897
- const { x, width } = c.getBoundingClientRect();
11898
- return Math.round(x + width - containerX - containerWidth) > 0;
11899
- });
11900
- if (next instanceof HTMLElement) {
11901
- const { x, width } = next.getBoundingClientRect();
11902
- container.scrollTo({
11903
- left: container.scrollLeft + Math.ceil(x + width + CARET_OFFSET - containerX - containerWidth),
11904
- behavior: "smooth"
11905
- });
11906
- }
11907
- } else {
11908
- const next = children2.find((c) => {
11909
- const { x, width } = c.getBoundingClientRect();
11910
- return Math.round(x + width - containerX) >= 0;
11911
- });
11912
- if (next instanceof HTMLElement) {
11913
- const { x } = next.getBoundingClientRect();
11914
- container.scrollTo({
11915
- left: container.scrollLeft - Math.abs(x - containerX - CARET_OFFSET),
11916
- behavior: "smooth"
11917
- });
11918
- }
11919
- }
11920
- };
11921
- const handleKeyDown = (event) => {
11922
- const target = event.target;
11923
- const parent = target.parentElement;
11924
- const first = parent.firstChild;
11925
- const last = parent.lastChild;
11926
- const next = target.nextElementSibling;
11927
- const prev = target.previousElementSibling;
11928
- if (event.key === "ArrowRight") {
11929
- (next != null ? next : first).focus();
11930
- } else if (event.key === "ArrowLeft") {
11931
- (prev != null ? prev : last).focus();
11932
- }
11933
- };
11934
- const handleSelected = (key) => {
11935
- (onChange != null ? onChange : setSelected)(key);
11936
- };
11937
- React81.Children.forEach(children, (c) => {
11938
- if (c && !isTabComponent(c)) {
11939
- throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
11940
- }
11982
+ case "left-horizontal" /* LeftHorizontal */:
11983
+ case "horizontal" /* Horizontal */:
11984
+ return {
11985
+ layout: "row",
11986
+ justifyContent: "flex-start",
11987
+ alignItems: "flex-start"
11988
+ };
11989
+ case "center-horizontal" /* CenterHorizontal */:
11990
+ return {
11991
+ layout: "row",
11992
+ justifyContent: "center",
11993
+ alignItems: "flex-start"
11994
+ };
11995
+ case "center-vertical" /* CenterVertical */:
11996
+ case "vertical" /* Vertical */:
11997
+ default:
11998
+ return {
11999
+ layout: "column",
12000
+ justifyContent: "center",
12001
+ alignItems: "center"
12002
+ };
12003
+ }
12004
+ };
12005
+ var isVerticalLayout = (layout) => layout === "vertical" /* Vertical */ || layout === "center-vertical" /* CenterVertical */;
12006
+ var EmptyState = ({
12007
+ title,
12008
+ image,
12009
+ imageAlt = "",
12010
+ imageWidth,
12011
+ description,
12012
+ children,
12013
+ primaryAction,
12014
+ secondaryAction,
12015
+ footer,
12016
+ layout = "vertical" /* Vertical */,
12017
+ borderStyle = "dashed",
12018
+ fullHeight = isVerticalLayout(layout) ? true : false
12019
+ }) => {
12020
+ const template = layoutStyle(layout);
12021
+ return /* @__PURE__ */ React76.createElement(Box, {
12022
+ className: classNames(
12023
+ "Aquarium-EmptyState",
12024
+ tw("rounded p-[56px]", {
12025
+ "border border-dashed": borderStyle === "dashed",
12026
+ "border border-solid": borderStyle === "solid",
12027
+ "text-left": !isVerticalLayout(layout),
12028
+ "text-center": isVerticalLayout(layout),
12029
+ "h-full": fullHeight
12030
+ })
12031
+ ),
12032
+ backgroundColor: "transparent",
12033
+ borderColor: "grey-10"
12034
+ }, /* @__PURE__ */ React76.createElement(Box.Flex, {
12035
+ style: { gap: "56px" },
12036
+ flexDirection: template.layout,
12037
+ justifyContent: template.justifyContent,
12038
+ alignItems: template.layout === "row" ? "center" : template.alignItems,
12039
+ height: fullHeight ? "full" : void 0
12040
+ }, image && /* @__PURE__ */ React76.createElement("img", {
12041
+ src: image,
12042
+ alt: imageAlt,
12043
+ style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
12044
+ }), /* @__PURE__ */ React76.createElement(Box.Flex, {
12045
+ flexDirection: "column",
12046
+ justifyContent: template.justifyContent,
12047
+ alignItems: template.alignItems
12048
+ }, /* @__PURE__ */ React76.createElement(Typography2.Heading, {
12049
+ htmlTag: "h2"
12050
+ }, title), (description || children) && /* @__PURE__ */ React76.createElement(Box, {
12051
+ marginTop: "5"
12052
+ }, /* @__PURE__ */ React76.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React76.createElement(Box.Flex, {
12053
+ marginTop: "7",
12054
+ gap: "4",
12055
+ justifyContent: "center",
12056
+ alignItems: "center",
12057
+ flexWrap: "wrap"
12058
+ }, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React76.createElement(Box, {
12059
+ marginTop: "5"
12060
+ }, /* @__PURE__ */ React76.createElement(Typography2.Small, {
12061
+ color: "grey-60"
12062
+ }, footer)))));
12063
+ };
12064
+
12065
+ // src/molecules/Flexbox/FlexboxItem.tsx
12066
+ import React77 from "react";
12067
+ var FlexboxItem = Tailwindify(
12068
+ ({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
12069
+ const hookStyle = useStyle({
12070
+ display,
12071
+ flex,
12072
+ flexGrow: grow,
12073
+ flexShrink: shrink,
12074
+ order,
12075
+ alignSelf
11941
12076
  });
11942
- return /* @__PURE__ */ React81.createElement("div", {
11943
- ref: parentRef,
11944
- className: classNames("Aquarium-Tabs", tw("h-full"), className)
11945
- }, /* @__PURE__ */ React81.createElement("div", {
11946
- className: tw("relative flex items-center h-full border-b-2 border-grey-10")
11947
- }, /* @__PURE__ */ React81.createElement("div", {
11948
- ref: containerRef,
11949
- className: tw("overflow-y-auto scrollbar-hide h-full mb-[-2px]")
11950
- }, /* @__PURE__ */ React81.createElement("div", {
11951
- ref: tabsRef,
11952
- role: "tablist",
11953
- "aria-label": "tabs",
11954
- className: tw("inline-flex items-center cursor-pointer font-normal h-full")
11955
- }, React81.Children.map(
11956
- children,
11957
- (tab, index) => tab ? /* @__PURE__ */ React81.createElement(TabItemComponent, __spreadProps(__spreadValues({
11958
- key: tab.props.value
11959
- }, tab.props), {
11960
- index,
11961
- selected: tab.props.value !== void 0 ? tab.props.value === selected : index === selected,
11962
- onKeyDown: handleKeyDown,
11963
- onSelected: handleSelected
11964
- })) : void 0
11965
- ))), leftCaret && /* @__PURE__ */ React81.createElement("div", {
11966
- className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
11967
- }, /* @__PURE__ */ React81.createElement("div", {
11968
- onClick: () => handleScrollToNext("left"),
11969
- className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
11970
- }, /* @__PURE__ */ React81.createElement(InlineIcon, {
11971
- icon: import_chevronLeft4.default
11972
- }))), rightCaret && /* @__PURE__ */ React81.createElement("div", {
11973
- onClick: () => handleScrollToNext("right"),
11974
- className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
11975
- }, /* @__PURE__ */ React81.createElement("div", {
11976
- onClick: () => handleScrollToNext("right"),
11977
- className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
11978
- }, /* @__PURE__ */ React81.createElement(InlineIcon, {
11979
- icon: import_chevronRight4.default
11980
- })))), renderChildren(children, selected, props));
12077
+ const HtmlElement = htmlTag;
12078
+ return /* @__PURE__ */ React77.createElement(HtmlElement, {
12079
+ style: __spreadValues(__spreadValues({}, hookStyle), style),
12080
+ className
12081
+ }, children);
12082
+ }
12083
+ );
12084
+
12085
+ // src/molecules/Grid/GridItem.tsx
12086
+ import React78 from "react";
12087
+ var GridItem2 = Tailwindify(
12088
+ ({
12089
+ htmlTag = "div",
12090
+ className,
12091
+ style,
12092
+ children,
12093
+ display,
12094
+ justifySelf,
12095
+ alignSelf,
12096
+ placeSelf,
12097
+ colSpan,
12098
+ colStart,
12099
+ colEnd,
12100
+ rowSpan,
12101
+ rowStart,
12102
+ rowEnd
12103
+ }) => {
12104
+ const hookStyle = useStyle({
12105
+ display,
12106
+ justifySelf,
12107
+ alignSelf,
12108
+ placeSelf,
12109
+ gridColumn: colSpan,
12110
+ gridColumnStart: colStart,
12111
+ gridColumnEnd: colEnd,
12112
+ gridRow: rowSpan,
12113
+ gridRowStart: rowStart,
12114
+ gridRowEnd: rowEnd
12115
+ });
12116
+ const HtmlElement = htmlTag;
12117
+ return /* @__PURE__ */ React78.createElement(HtmlElement, {
12118
+ style: __spreadValues(__spreadValues({}, hookStyle), style),
12119
+ className
12120
+ }, children);
12121
+ }
12122
+ );
12123
+
12124
+ // src/molecules/LineClamp/LineClamp.tsx
12125
+ import React79 from "react";
12126
+ var LineClamp2 = ({
12127
+ lines,
12128
+ children,
12129
+ wordBreak,
12130
+ expandLabel,
12131
+ collapseLabel,
12132
+ onClampedChange
12133
+ }) => {
12134
+ const ref = React79.useRef(null);
12135
+ const [clamped, setClamped] = React79.useState(true);
12136
+ const [isClampingEnabled, setClampingEnabled] = React79.useState(false);
12137
+ React79.useEffect(() => {
12138
+ var _a, _b;
12139
+ const el = ref.current;
12140
+ setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
12141
+ }, [ref.current]);
12142
+ const handleClampedChange = () => {
12143
+ setClamped(!clamped);
12144
+ onClampedChange == null ? void 0 : onClampedChange(!clamped);
11981
12145
  };
11982
- Tabs2.displayName = displayName;
11983
- Tabs2.Tab = TabComponent;
11984
- return Tabs2;
12146
+ return /* @__PURE__ */ React79.createElement("div", {
12147
+ className: "Aquarium-LineClamp"
12148
+ }, /* @__PURE__ */ React79.createElement(LineClamp, {
12149
+ ref,
12150
+ lines,
12151
+ clamped,
12152
+ wordBreak
12153
+ }, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React79.createElement(Button.Ghost, {
12154
+ dense: true,
12155
+ onClick: handleClampedChange
12156
+ }, clamped ? expandLabel : collapseLabel));
12157
+ };
12158
+
12159
+ // src/molecules/Link/Link.tsx
12160
+ import React81 from "react";
12161
+ import classNames9 from "classnames";
12162
+
12163
+ // src/atoms/Link/Link.tsx
12164
+ import React80 from "react";
12165
+ var Link = (_a) => {
12166
+ var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
12167
+ return /* @__PURE__ */ React80.createElement("a", __spreadValues({
12168
+ className: classNames(className, linkStyle)
12169
+ }, props), children);
12170
+ };
12171
+
12172
+ // src/molecules/Link/Link.tsx
12173
+ var Link2 = (_a) => {
12174
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
12175
+ return /* @__PURE__ */ React81.createElement(Link, __spreadValues({
12176
+ className: classNames9("Aquarium-Link", className)
12177
+ }, props));
12178
+ };
12179
+
12180
+ // src/molecules/ListItem/ListItem.tsx
12181
+ import React82 from "react";
12182
+ var ListItem = ({ name, icon, active = false }) => {
12183
+ return /* @__PURE__ */ React82.createElement(Box.Flex, {
12184
+ className: "Aquarium-ListItem",
12185
+ alignItems: "center"
12186
+ }, /* @__PURE__ */ React82.createElement(Typography2, {
12187
+ variant: active ? "small-strong" : "small",
12188
+ color: "grey-70",
12189
+ htmlTag: "span",
12190
+ className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
12191
+ }, /* @__PURE__ */ React82.createElement("img", {
12192
+ src: icon,
12193
+ alt: "",
12194
+ className: "inline mr-4",
12195
+ height: 28,
12196
+ width: 28
12197
+ }), name));
11985
12198
  };
11986
- var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React81.createElement(TabContainer, null, children.find(
11987
- (node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
11988
- )));
11989
12199
 
11990
12200
  // src/molecules/Modal/Modal.tsx
11991
- var import_cross6 = __toESM(require_cross());
12201
+ import React83 from "react";
12202
+ import { useDialog as useDialog4 } from "@react-aria/dialog";
12203
+ import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
12204
+ import { useId as useId10 } from "@react-aria/utils";
12205
+ import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
12206
+ import castArray2 from "lodash/castArray";
12207
+ import omit11 from "lodash/omit";
12208
+ var import_cross7 = __toESM(require_cross());
11992
12209
  var Modal2 = (_a) => {
11993
12210
  var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
11994
12211
  const { open, onClose, size, portalContainer } = props;
11995
- const ref = React82.useRef(null);
11996
- const state = useOverlayTriggerState4({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
11997
- const { modalProps, underlayProps } = useModalOverlay2(
12212
+ const ref = React83.useRef(null);
12213
+ const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
12214
+ const { modalProps, underlayProps } = useModalOverlay3(
11998
12215
  { isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
11999
12216
  state,
12000
12217
  ref
@@ -12002,75 +12219,75 @@ var Modal2 = (_a) => {
12002
12219
  if (!state.isOpen) {
12003
12220
  return null;
12004
12221
  }
12005
- return /* @__PURE__ */ React82.createElement(Overlay3, {
12222
+ return /* @__PURE__ */ React83.createElement(Overlay4, {
12006
12223
  portalContainer
12007
- }, /* @__PURE__ */ React82.createElement(Modal, {
12224
+ }, /* @__PURE__ */ React83.createElement(Modal, {
12008
12225
  className: "Aquarium-Modal",
12009
12226
  open: true
12010
- }, /* @__PURE__ */ React82.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React82.createElement(ModalWrapper, __spreadValues(__spreadValues({
12227
+ }, /* @__PURE__ */ React83.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React83.createElement(ModalWrapper, __spreadValues(__spreadValues({
12011
12228
  ref,
12012
12229
  size
12013
12230
  }, props), modalProps))));
12014
12231
  };
12015
- var ModalWrapper = React82.forwardRef(
12232
+ var ModalWrapper = React83.forwardRef(
12016
12233
  (_a, ref) => {
12017
12234
  var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
12018
- const labelledBy = useId9();
12019
- const describedBy = useId9();
12020
- const { dialogProps } = useDialog3(
12235
+ const labelledBy = useId10();
12236
+ const describedBy = useId10();
12237
+ const { dialogProps } = useDialog4(
12021
12238
  { "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
12022
12239
  ref
12023
12240
  );
12024
- return /* @__PURE__ */ React82.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
12241
+ return /* @__PURE__ */ React83.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
12025
12242
  ref
12026
12243
  }, props), dialogProps), {
12027
12244
  tabIndex: -1
12028
- }), /* @__PURE__ */ React82.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React82.createElement(IconButton, {
12245
+ }), /* @__PURE__ */ React83.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React83.createElement(IconButton, {
12029
12246
  "aria-label": "Close",
12030
- icon: import_cross6.default,
12247
+ icon: import_cross7.default,
12031
12248
  onClick: onClose
12032
- })), headerImage !== void 0 && /* @__PURE__ */ React82.createElement(Modal.HeaderImage, {
12249
+ })), headerImage !== void 0 && /* @__PURE__ */ React83.createElement(Modal.HeaderImage, {
12033
12250
  backgroundImage: headerImage
12034
- }), /* @__PURE__ */ React82.createElement(Modal.Header, {
12251
+ }), /* @__PURE__ */ React83.createElement(Modal.Header, {
12035
12252
  className: tw({ "pb-3": isComponentType(children, ModalTabs) })
12036
- }, /* @__PURE__ */ React82.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React82.createElement(Modal.Title, {
12253
+ }, /* @__PURE__ */ React83.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React83.createElement(Modal.Title, {
12037
12254
  id: labelledBy
12038
- }, title), subtitle && /* @__PURE__ */ React82.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React82.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React82.createElement(Modal.Body, {
12255
+ }, title), subtitle && /* @__PURE__ */ React83.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React83.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React83.createElement(Modal.Body, {
12039
12256
  id: describedBy,
12040
12257
  tabIndex: 0,
12041
12258
  noFooter: !(secondaryActions || primaryAction)
12042
- }, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React82.createElement(Modal.Footer, null, /* @__PURE__ */ React82.createElement(Modal.Actions, null, secondaryActions && castArray(secondaryActions).filter(Boolean).map((_a2) => {
12259
+ }, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React83.createElement(Modal.Footer, null, /* @__PURE__ */ React83.createElement(Modal.Actions, null, secondaryActions && castArray2(secondaryActions).filter(Boolean).map((_a2) => {
12043
12260
  var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
12044
- return /* @__PURE__ */ React82.createElement(Button.Secondary, __spreadValues({
12261
+ return /* @__PURE__ */ React83.createElement(Button.Secondary, __spreadValues({
12045
12262
  key: text
12046
12263
  }, action), text);
12047
- }), primaryAction && /* @__PURE__ */ React82.createElement(Button.Primary, __spreadValues({
12264
+ }), primaryAction && /* @__PURE__ */ React83.createElement(Button.Primary, __spreadValues({
12048
12265
  key: primaryAction.text
12049
- }, omit10(primaryAction, "text")), primaryAction.text))));
12266
+ }, omit11(primaryAction, "text")), primaryAction.text))));
12050
12267
  }
12051
12268
  );
12052
12269
  var ModalTabs = createTabsComponent(
12053
12270
  ModalTab,
12054
12271
  TabItem,
12055
12272
  "ModalTabs",
12056
- (children, selected, props) => /* @__PURE__ */ React82.createElement(Modal.Body, {
12273
+ (children, selected, props) => /* @__PURE__ */ React83.createElement(Modal.Body, {
12057
12274
  maxHeight: props.maxHeight
12058
- }, /* @__PURE__ */ React82.createElement(ModalTabContainer, null, children.find(
12275
+ }, /* @__PURE__ */ React83.createElement(ModalTabContainer, null, children.find(
12059
12276
  (node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
12060
12277
  )))
12061
12278
  );
12062
12279
 
12063
12280
  // src/molecules/MultiInput/MultiInput.tsx
12064
- import React84, { useEffect as useEffect10, useRef as useRef9, useState as useState11 } from "react";
12065
- import { useId as useId10 } from "@react-aria/utils";
12066
- import castArray2 from "lodash/castArray";
12281
+ import React85, { useEffect as useEffect11, useRef as useRef9, useState as useState11 } from "react";
12282
+ import { useId as useId11 } from "@react-aria/utils";
12283
+ import castArray3 from "lodash/castArray";
12067
12284
  import identity from "lodash/identity";
12068
- import omit11 from "lodash/omit";
12285
+ import omit12 from "lodash/omit";
12069
12286
 
12070
12287
  // src/molecules/MultiInput/InputChip.tsx
12071
- import React83 from "react";
12288
+ import React84 from "react";
12072
12289
  var import_smallCross2 = __toESM(require_smallCross());
12073
- var InputChip = React83.forwardRef(
12290
+ var InputChip = React84.forwardRef(
12074
12291
  (_a, ref) => {
12075
12292
  var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
12076
12293
  const onClick = (e) => {
@@ -12078,18 +12295,18 @@ var InputChip = React83.forwardRef(
12078
12295
  _onClick == null ? void 0 : _onClick(e);
12079
12296
  }
12080
12297
  };
12081
- return /* @__PURE__ */ React83.createElement("div", {
12298
+ return /* @__PURE__ */ React84.createElement("div", {
12082
12299
  className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
12083
12300
  "bg-error-0 ": invalid,
12084
12301
  "bg-grey-0 ": !invalid && !disabled,
12085
12302
  "bg-grey-5": disabled
12086
12303
  })
12087
- }, /* @__PURE__ */ React83.createElement("div", {
12304
+ }, /* @__PURE__ */ React84.createElement("div", {
12088
12305
  className: tw("px-2 py-1")
12089
- }, /* @__PURE__ */ React83.createElement(Typography2, {
12306
+ }, /* @__PURE__ */ React84.createElement(Typography2, {
12090
12307
  variant: "small",
12091
12308
  color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
12092
- }, children)), !readOnly && /* @__PURE__ */ React83.createElement("div", __spreadProps(__spreadValues({
12309
+ }, children)), !readOnly && /* @__PURE__ */ React84.createElement("div", __spreadProps(__spreadValues({
12093
12310
  ref
12094
12311
  }, props), {
12095
12312
  onClick,
@@ -12100,7 +12317,7 @@ var InputChip = React83.forwardRef(
12100
12317
  }),
12101
12318
  role: "button",
12102
12319
  "aria-label": `Remove ${String(children)}`
12103
- }), /* @__PURE__ */ React83.createElement(Icon, {
12320
+ }), /* @__PURE__ */ React84.createElement(Icon, {
12104
12321
  icon: import_smallCross2.default,
12105
12322
  className: tw({
12106
12323
  "text-error-70": invalid,
@@ -12162,7 +12379,7 @@ var MultiInputBase = (_a) => {
12162
12379
  const [items, setItems] = useState11((_a2 = value != null ? value : defaultValue) != null ? _a2 : []);
12163
12380
  const [hasFocus, setFocus] = useState11(false);
12164
12381
  const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
12165
- useEffect10(() => {
12382
+ useEffect11(() => {
12166
12383
  const requiresUpdate = value !== void 0 || defaultValue === void 0;
12167
12384
  if (requiresUpdate && JSON.stringify(value) !== JSON.stringify(items)) {
12168
12385
  setItems(value != null ? value : []);
@@ -12203,7 +12420,7 @@ var MultiInputBase = (_a) => {
12203
12420
  inputRef.current.value = "";
12204
12421
  }
12205
12422
  if (value2) {
12206
- const newItems = castArray2(value2).map(createItem).filter((item) => !items.includes(item));
12423
+ const newItems = castArray3(value2).map(createItem).filter((item) => !items.includes(item));
12207
12424
  if (newItems.length > 0 && items.length + newItems.length <= (maxLength != null ? maxLength : Number.MAX_SAFE_INTEGER)) {
12208
12425
  const updated = (items != null ? items : []).concat(newItems);
12209
12426
  setItems(updated);
@@ -12241,7 +12458,7 @@ var MultiInputBase = (_a) => {
12241
12458
  };
12242
12459
  const renderChips = () => items == null ? void 0 : items.map((item, index) => {
12243
12460
  var _a3;
12244
- return /* @__PURE__ */ React84.createElement(InputChip, {
12461
+ return /* @__PURE__ */ React85.createElement(InputChip, {
12245
12462
  key: `${itemToString(item)}.${index}`,
12246
12463
  invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
12247
12464
  readOnly,
@@ -12252,13 +12469,13 @@ var MultiInputBase = (_a) => {
12252
12469
  }
12253
12470
  }, itemToString(item));
12254
12471
  });
12255
- return /* @__PURE__ */ React84.createElement("div", {
12472
+ return /* @__PURE__ */ React85.createElement("div", {
12256
12473
  className: "Aquarium-MultiInputBase"
12257
- }, /* @__PURE__ */ React84.createElement(Select.InputContainer, {
12474
+ }, /* @__PURE__ */ React85.createElement(Select.InputContainer, {
12258
12475
  variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
12259
- }, /* @__PURE__ */ React84.createElement("div", {
12476
+ }, /* @__PURE__ */ React85.createElement("div", {
12260
12477
  className: "grow inline-flex flex-row flex-wrap gap-y-2"
12261
- }, inline && renderChips(), /* @__PURE__ */ React84.createElement(Select.Input, __spreadProps(__spreadValues({
12478
+ }, inline && renderChips(), /* @__PURE__ */ React85.createElement(Select.Input, __spreadProps(__spreadValues({
12262
12479
  ref: inputRef,
12263
12480
  id: id != null ? id : name,
12264
12481
  name,
@@ -12276,11 +12493,11 @@ var MultiInputBase = (_a) => {
12276
12493
  onFocus: handleFocus,
12277
12494
  onBlur: handleBlur,
12278
12495
  autoComplete: "off"
12279
- }))), endAdornment && /* @__PURE__ */ React84.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React84.createElement("div", {
12496
+ }))), endAdornment && /* @__PURE__ */ React85.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React85.createElement("div", {
12280
12497
  className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
12281
12498
  }, renderChips()));
12282
12499
  };
12283
- var BaseMultiInputSkeleton = () => /* @__PURE__ */ React84.createElement(Skeleton, {
12500
+ var BaseMultiInputSkeleton = () => /* @__PURE__ */ React85.createElement(Skeleton, {
12284
12501
  height: 38
12285
12502
  });
12286
12503
  MultiInputBase.Skeleton = BaseMultiInputSkeleton;
@@ -12288,17 +12505,17 @@ var MultiInput = (props) => {
12288
12505
  var _a, _b, _c, _d, _e;
12289
12506
  const maxLength = (_a = props.maxLength) != null ? _a : props.max;
12290
12507
  const [value, setValue] = useState11((_c = (_b = props.value) != null ? _b : props.defaultValue) != null ? _c : []);
12291
- useEffect10(() => {
12508
+ useEffect11(() => {
12292
12509
  var _a2;
12293
12510
  setValue((_a2 = props.value) != null ? _a2 : []);
12294
12511
  }, [JSON.stringify(props.value)]);
12295
- const defaultId = useId10();
12512
+ const defaultId = useId11();
12296
12513
  const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
12297
- const errorMessageId = useId10();
12514
+ const errorMessageId = useId11();
12298
12515
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
12299
12516
  const labelControlProps = getLabelControlProps(props);
12300
- const baseProps = omit11(props, Object.keys(labelControlProps));
12301
- return /* @__PURE__ */ React84.createElement(LabelControl, __spreadProps(__spreadValues({
12517
+ const baseProps = omit12(props, Object.keys(labelControlProps));
12518
+ return /* @__PURE__ */ React85.createElement(LabelControl, __spreadProps(__spreadValues({
12302
12519
  id: `${id}-label`,
12303
12520
  htmlFor: `${id}-input`,
12304
12521
  messageId: errorMessageId
@@ -12306,7 +12523,7 @@ var MultiInput = (props) => {
12306
12523
  length: value.length,
12307
12524
  maxLength,
12308
12525
  className: "Aquarium-MultiInput"
12309
- }), /* @__PURE__ */ React84.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
12526
+ }), /* @__PURE__ */ React85.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
12310
12527
  id: `${id}-input`,
12311
12528
  onChange: (value2) => {
12312
12529
  var _a2;
@@ -12318,20 +12535,20 @@ var MultiInput = (props) => {
12318
12535
  valid: props.valid
12319
12536
  })));
12320
12537
  };
12321
- var MultiInputSkeleton = () => /* @__PURE__ */ React84.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React84.createElement(MultiInputBase.Skeleton, null));
12538
+ var MultiInputSkeleton = () => /* @__PURE__ */ React85.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React85.createElement(MultiInputBase.Skeleton, null));
12322
12539
  MultiInput.Skeleton = MultiInputSkeleton;
12323
12540
  MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
12324
12541
 
12325
12542
  // src/molecules/MultiSelect/MultiSelect.tsx
12326
- import React85, { useEffect as useEffect11, useRef as useRef10, useState as useState12 } from "react";
12543
+ import React86, { useEffect as useEffect12, useRef as useRef10, useState as useState12 } from "react";
12327
12544
  import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
12328
- import { useId as useId11 } from "@react-aria/utils";
12545
+ import { useId as useId12 } from "@react-aria/utils";
12329
12546
  import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
12330
12547
  import isArray2 from "lodash/isArray";
12331
12548
  import isEqual from "lodash/isEqual";
12332
12549
  import isNil2 from "lodash/isNil";
12333
12550
  import isObject2 from "lodash/isObject";
12334
- import omit12 from "lodash/omit";
12551
+ import omit13 from "lodash/omit";
12335
12552
  import omitBy from "lodash/omitBy";
12336
12553
  import { matchSorter as matchSorter2 } from "match-sorter";
12337
12554
  var isOptionGroup = (option) => {
@@ -12478,21 +12695,21 @@ var MultiSelectBase = (_a) => {
12478
12695
  toggle: toggleMenu,
12479
12696
  setOpen: (isOpen2) => isOpen2 ? openMenu() : closeMenu()
12480
12697
  };
12481
- useEffect11(() => {
12698
+ useEffect12(() => {
12482
12699
  if (state.isOpen && inputRef.current && popoverRef.current) {
12483
12700
  return ariaHideOutside2([inputRef.current, popoverRef.current]);
12484
12701
  }
12485
12702
  }, [state.isOpen, inputRef, popoverRef]);
12486
- const renderItem = (item, index) => /* @__PURE__ */ React85.createElement(Select.Item, __spreadValues({
12703
+ const renderItem = (item, index) => /* @__PURE__ */ React86.createElement(Select.Item, __spreadValues({
12487
12704
  key: itemToString(item),
12488
12705
  highlighted: index === highlightedIndex,
12489
12706
  selected: selectedItems.includes(item)
12490
12707
  }, getItemProps({ item, index })), renderOption(item));
12491
- const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React85.createElement(React85.Fragment, {
12708
+ const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React86.createElement(React86.Fragment, {
12492
12709
  key: group.label
12493
- }, /* @__PURE__ */ React85.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
12710
+ }, /* @__PURE__ */ React86.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
12494
12711
  const renderChips = () => {
12495
- return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React85.createElement(InputChip, __spreadProps(__spreadValues({
12712
+ return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React86.createElement(InputChip, __spreadProps(__spreadValues({
12496
12713
  key: `${itemToString(selectedItem)}.chip`,
12497
12714
  className: tw("mx-0"),
12498
12715
  disabled,
@@ -12510,14 +12727,14 @@ var MultiSelectBase = (_a) => {
12510
12727
  getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
12511
12728
  );
12512
12729
  const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
12513
- return /* @__PURE__ */ React85.createElement("div", {
12730
+ return /* @__PURE__ */ React86.createElement("div", {
12514
12731
  className: classNames("Aquarium-MultiSelectBase", tw("relative"))
12515
- }, /* @__PURE__ */ React85.createElement(Select.InputContainer, {
12732
+ }, /* @__PURE__ */ React86.createElement(Select.InputContainer, {
12516
12733
  ref: targetRef,
12517
12734
  variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
12518
- }, /* @__PURE__ */ React85.createElement("div", {
12735
+ }, /* @__PURE__ */ React86.createElement("div", {
12519
12736
  className: "grow inline-flex flex-row flex-wrap gap-2"
12520
- }, !hideChips && inline && renderChips(), /* @__PURE__ */ React85.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
12737
+ }, !hideChips && inline && renderChips(), /* @__PURE__ */ React86.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
12521
12738
  name,
12522
12739
  placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
12523
12740
  }, inputProps), props), {
@@ -12536,12 +12753,12 @@ var MultiSelectBase = (_a) => {
12536
12753
  setFocus(false);
12537
12754
  (_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
12538
12755
  }
12539
- }))), !readOnly && /* @__PURE__ */ React85.createElement(Select.Toggle, __spreadValues({
12756
+ }))), !readOnly && /* @__PURE__ */ React86.createElement(Select.Toggle, __spreadValues({
12540
12757
  hasFocus,
12541
12758
  isOpen
12542
- }, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React85.createElement("div", {
12759
+ }, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React86.createElement("div", {
12543
12760
  className: tw("flex flex-row flex-wrap gap-2 mt-2")
12544
- }, renderChips()), isOpen && /* @__PURE__ */ React85.createElement(PopoverOverlay, {
12761
+ }, renderChips()), isOpen && /* @__PURE__ */ React86.createElement(PopoverOverlay, {
12545
12762
  ref: popoverRef,
12546
12763
  triggerRef: targetRef,
12547
12764
  state,
@@ -12549,13 +12766,13 @@ var MultiSelectBase = (_a) => {
12549
12766
  shouldFlip: true,
12550
12767
  isNonModal: true,
12551
12768
  style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
12552
- }, /* @__PURE__ */ React85.createElement(Select.Menu, __spreadValues({
12769
+ }, /* @__PURE__ */ React86.createElement(Select.Menu, __spreadValues({
12553
12770
  maxHeight
12554
- }, menuProps), hasNoResults && /* @__PURE__ */ React85.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
12771
+ }, menuProps), hasNoResults && /* @__PURE__ */ React86.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
12555
12772
  (option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
12556
12773
  ))));
12557
12774
  };
12558
- var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React85.createElement(Skeleton, {
12775
+ var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React86.createElement(Skeleton, {
12559
12776
  height: 38
12560
12777
  });
12561
12778
  MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
@@ -12570,19 +12787,19 @@ var MultiSelect = (_a) => {
12570
12787
  "emptyState"
12571
12788
  ]);
12572
12789
  var _a2;
12573
- const defaultId = useId11();
12790
+ const defaultId = useId12();
12574
12791
  const id = (_a2 = props.id) != null ? _a2 : defaultId;
12575
- const errorMessageId = useId11();
12792
+ const errorMessageId = useId12();
12576
12793
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
12577
12794
  const labelControlProps = getLabelControlProps(props);
12578
- const baseProps = omit12(props, Object.keys(labelControlProps));
12579
- return /* @__PURE__ */ React85.createElement(LabelControl, __spreadProps(__spreadValues({
12795
+ const baseProps = omit13(props, Object.keys(labelControlProps));
12796
+ return /* @__PURE__ */ React86.createElement(LabelControl, __spreadProps(__spreadValues({
12580
12797
  id: `${id}-label`,
12581
12798
  htmlFor: `${id}-input`,
12582
12799
  messageId: errorMessageId
12583
12800
  }, labelControlProps), {
12584
12801
  className: "Aquarium-MultiSelect"
12585
- }), /* @__PURE__ */ React85.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
12802
+ }), /* @__PURE__ */ React86.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
12586
12803
  id,
12587
12804
  options,
12588
12805
  emptyState,
@@ -12590,17 +12807,17 @@ var MultiSelect = (_a) => {
12590
12807
  valid: props.valid
12591
12808
  })));
12592
12809
  };
12593
- var MultiSelectSkeleton = () => /* @__PURE__ */ React85.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React85.createElement(MultiSelectBase.Skeleton, null));
12810
+ var MultiSelectSkeleton = () => /* @__PURE__ */ React86.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React86.createElement(MultiSelectBase.Skeleton, null));
12594
12811
  MultiSelect.Skeleton = MultiSelectSkeleton;
12595
12812
  MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
12596
12813
 
12597
12814
  // src/molecules/NativeSelect/NativeSelect.tsx
12598
- import React86 from "react";
12599
- import { useId as useId12 } from "@react-aria/utils";
12600
- import omit13 from "lodash/omit";
12815
+ import React87 from "react";
12816
+ import { useId as useId13 } from "@react-aria/utils";
12817
+ import omit14 from "lodash/omit";
12601
12818
  import uniqueId from "lodash/uniqueId";
12602
12819
  var import_caretDown2 = __toESM(require_caretDown());
12603
- var NativeSelectBase = React86.forwardRef(
12820
+ var NativeSelectBase = React87.forwardRef(
12604
12821
  (_a, ref) => {
12605
12822
  var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
12606
12823
  const placeholderValue = uniqueId("default_value_for_placeholder");
@@ -12617,16 +12834,16 @@ var NativeSelectBase = React86.forwardRef(
12617
12834
  (_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
12618
12835
  }
12619
12836
  };
12620
- return /* @__PURE__ */ React86.createElement("span", {
12837
+ return /* @__PURE__ */ React87.createElement("span", {
12621
12838
  className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
12622
- }, !readOnly && /* @__PURE__ */ React86.createElement("span", {
12839
+ }, !readOnly && /* @__PURE__ */ React87.createElement("span", {
12623
12840
  className: tw(
12624
12841
  "absolute right-0 inset-y-0 mr-4 text-grey-40 flex ml-3 pointer-events-none typography-default-strong mt-4"
12625
12842
  )
12626
- }, /* @__PURE__ */ React86.createElement(Icon, {
12843
+ }, /* @__PURE__ */ React87.createElement(Icon, {
12627
12844
  icon: import_caretDown2.default,
12628
12845
  "data-testid": "icon-dropdown"
12629
- })), /* @__PURE__ */ React86.createElement("select", __spreadProps(__spreadValues({
12846
+ })), /* @__PURE__ */ React87.createElement("select", __spreadProps(__spreadValues({
12630
12847
  ref,
12631
12848
  disabled: disabled || readOnly,
12632
12849
  required
@@ -12645,32 +12862,32 @@ var NativeSelectBase = React86.forwardRef(
12645
12862
  ),
12646
12863
  props.className
12647
12864
  )
12648
- }), props.placeholder && /* @__PURE__ */ React86.createElement("option", {
12865
+ }), props.placeholder && /* @__PURE__ */ React87.createElement("option", {
12649
12866
  value: placeholderValue,
12650
12867
  disabled: true
12651
12868
  }, props.placeholder), children));
12652
12869
  }
12653
12870
  );
12654
- NativeSelectBase.Skeleton = () => /* @__PURE__ */ React86.createElement(Skeleton, {
12871
+ NativeSelectBase.Skeleton = () => /* @__PURE__ */ React87.createElement(Skeleton, {
12655
12872
  height: 38
12656
12873
  });
12657
- var NativeSelect = React86.forwardRef(
12874
+ var NativeSelect = React87.forwardRef(
12658
12875
  (_a, ref) => {
12659
12876
  var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
12660
12877
  var _a2;
12661
- const defaultId = useId12();
12878
+ const defaultId = useId13();
12662
12879
  const id = (_a2 = props.id) != null ? _a2 : defaultId;
12663
- const errorMessageId = useId12();
12880
+ const errorMessageId = useId13();
12664
12881
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
12665
12882
  const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
12666
- const baseProps = omit13(props, Object.keys(labelControlProps));
12667
- return /* @__PURE__ */ React86.createElement(LabelControl, __spreadProps(__spreadValues({
12883
+ const baseProps = omit14(props, Object.keys(labelControlProps));
12884
+ return /* @__PURE__ */ React87.createElement(LabelControl, __spreadProps(__spreadValues({
12668
12885
  id: `${id}-label`,
12669
12886
  htmlFor: id,
12670
12887
  messageId: errorMessageId
12671
12888
  }, labelControlProps), {
12672
12889
  className: "Aquarium-NativeSelect"
12673
- }), /* @__PURE__ */ React86.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
12890
+ }), /* @__PURE__ */ React87.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
12674
12891
  ref
12675
12892
  }, baseProps), errorProps), {
12676
12893
  id,
@@ -12684,63 +12901,63 @@ var NativeSelect = React86.forwardRef(
12684
12901
  }
12685
12902
  );
12686
12903
  NativeSelect.displayName = "NativeSelect";
12687
- var Option = React86.forwardRef((_a, ref) => {
12904
+ var Option = React87.forwardRef((_a, ref) => {
12688
12905
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
12689
- return /* @__PURE__ */ React86.createElement("option", __spreadValues({
12906
+ return /* @__PURE__ */ React87.createElement("option", __spreadValues({
12690
12907
  ref
12691
12908
  }, props), children);
12692
12909
  });
12693
12910
  Option.displayName = "Option";
12694
- var NativeSelectSkeleton = () => /* @__PURE__ */ React86.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React86.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React86.createElement("div", {
12911
+ var NativeSelectSkeleton = () => /* @__PURE__ */ React87.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React87.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React87.createElement("div", {
12695
12912
  style: { height: "1px" }
12696
12913
  }));
12697
12914
  NativeSelect.Skeleton = NativeSelectSkeleton;
12698
12915
  NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
12699
12916
 
12700
12917
  // src/molecules/Navigation/Navigation.tsx
12701
- import React88 from "react";
12918
+ import React89 from "react";
12702
12919
  import classNames10 from "classnames";
12703
12920
 
12704
12921
  // src/atoms/Navigation/Navigation.tsx
12705
- import React87 from "react";
12922
+ import React88 from "react";
12706
12923
  var Navigation = (_a) => {
12707
12924
  var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
12708
- return /* @__PURE__ */ React87.createElement("nav", {
12925
+ return /* @__PURE__ */ React88.createElement("nav", {
12709
12926
  className: classNames(tw("bg-grey-0 h-full"))
12710
- }, /* @__PURE__ */ React87.createElement("ul", __spreadProps(__spreadValues({}, rest), {
12927
+ }, /* @__PURE__ */ React88.createElement("ul", __spreadProps(__spreadValues({}, rest), {
12711
12928
  className: classNames(tw("flex flex-col h-full"), className),
12712
12929
  role: "menubar"
12713
12930
  }), children));
12714
12931
  };
12715
12932
  var Header = (_a) => {
12716
12933
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
12717
- return /* @__PURE__ */ React87.createElement("li", __spreadProps(__spreadValues({}, rest), {
12934
+ return /* @__PURE__ */ React88.createElement("li", __spreadProps(__spreadValues({}, rest), {
12718
12935
  role: "presentation",
12719
12936
  className: classNames(tw("px-6 py-5"), className)
12720
12937
  }));
12721
12938
  };
12722
12939
  var Footer = (_a) => {
12723
12940
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
12724
- return /* @__PURE__ */ React87.createElement("li", __spreadProps(__spreadValues({}, rest), {
12941
+ return /* @__PURE__ */ React88.createElement("li", __spreadProps(__spreadValues({}, rest), {
12725
12942
  role: "presentation",
12726
12943
  className: classNames(tw("px-6 py-5 mt-auto"), className)
12727
12944
  }));
12728
12945
  };
12729
12946
  var Section2 = (_a) => {
12730
12947
  var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
12731
- return /* @__PURE__ */ React87.createElement("li", {
12948
+ return /* @__PURE__ */ React88.createElement("li", {
12732
12949
  role: "presentation",
12733
12950
  className: tw("py-5")
12734
- }, title && /* @__PURE__ */ React87.createElement("div", {
12951
+ }, title && /* @__PURE__ */ React88.createElement("div", {
12735
12952
  className: classNames(className, "py-2 px-6 text-grey-40 uppercase cursor-default typography-caption")
12736
- }, title), /* @__PURE__ */ React87.createElement("ul", __spreadProps(__spreadValues({}, rest), {
12953
+ }, title), /* @__PURE__ */ React88.createElement("ul", __spreadProps(__spreadValues({}, rest), {
12737
12954
  role: "group",
12738
12955
  className: classNames(tw("flex flex-col"), className)
12739
12956
  })));
12740
12957
  };
12741
12958
  var Divider3 = (_a) => {
12742
12959
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
12743
- return /* @__PURE__ */ React87.createElement("li", __spreadProps(__spreadValues({
12960
+ return /* @__PURE__ */ React88.createElement("li", __spreadProps(__spreadValues({
12744
12961
  role: "separator"
12745
12962
  }, rest), {
12746
12963
  className: classNames(tw("border-t-2 border-grey-5"), className)
@@ -12748,9 +12965,9 @@ var Divider3 = (_a) => {
12748
12965
  };
12749
12966
  var Item5 = (_a) => {
12750
12967
  var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
12751
- return /* @__PURE__ */ React87.createElement("li", {
12968
+ return /* @__PURE__ */ React88.createElement("li", {
12752
12969
  role: "presentation"
12753
- }, /* @__PURE__ */ React87.createElement("a", __spreadProps(__spreadValues({}, rest), {
12970
+ }, /* @__PURE__ */ React88.createElement("a", __spreadProps(__spreadValues({}, rest), {
12754
12971
  role: "menuitem",
12755
12972
  className: classNames(
12756
12973
  tw("py-3 px-6 hover:bg-grey-5 cursor-pointer flex gap-4 items-center typography-small focusable", {
@@ -12770,7 +12987,7 @@ Navigation.Divider = Divider3;
12770
12987
  // src/molecules/Navigation/Navigation.tsx
12771
12988
  var Navigation2 = (_a) => {
12772
12989
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
12773
- return /* @__PURE__ */ React88.createElement(Navigation, __spreadValues({
12990
+ return /* @__PURE__ */ React89.createElement(Navigation, __spreadValues({
12774
12991
  className: classNames10("Aquarium-Navigation", className)
12775
12992
  }, props));
12776
12993
  };
@@ -12784,11 +13001,11 @@ var Item6 = (_a) => {
12784
13001
  "icon",
12785
13002
  "showNotification"
12786
13003
  ]);
12787
- return /* @__PURE__ */ React88.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React88.createElement(Badge.Notification, null, /* @__PURE__ */ React88.createElement(InlineIcon, {
13004
+ return /* @__PURE__ */ React89.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React89.createElement(Badge.Notification, null, /* @__PURE__ */ React89.createElement(InlineIcon, {
12788
13005
  icon,
12789
13006
  width: "20px",
12790
13007
  height: "20px"
12791
- })), icon && !showNotification && /* @__PURE__ */ React88.createElement(InlineIcon, {
13008
+ })), icon && !showNotification && /* @__PURE__ */ React89.createElement(InlineIcon, {
12792
13009
  icon,
12793
13010
  width: "20px",
12794
13011
  height: "20px"
@@ -12801,32 +13018,32 @@ Navigation2.Header = Navigation.Header;
12801
13018
  Navigation2.Section = Navigation.Section;
12802
13019
 
12803
13020
  // src/molecules/PageHeader/PageHeader.tsx
12804
- import React90 from "react";
12805
- import castArray3 from "lodash/castArray";
13021
+ import React91 from "react";
13022
+ import castArray4 from "lodash/castArray";
12806
13023
 
12807
13024
  // src/atoms/PageHeader/PageHeader.tsx
12808
- import React89 from "react";
13025
+ import React90 from "react";
12809
13026
  var PageHeader = (_a) => {
12810
13027
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12811
- return /* @__PURE__ */ React89.createElement("div", __spreadValues({
13028
+ return /* @__PURE__ */ React90.createElement("div", __spreadValues({
12812
13029
  className: classNames(tw("flex flex-row gap-4 pb-6"), className)
12813
13030
  }, rest), children);
12814
13031
  };
12815
13032
  PageHeader.Container = (_a) => {
12816
13033
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12817
- return /* @__PURE__ */ React89.createElement("div", __spreadValues({
13034
+ return /* @__PURE__ */ React90.createElement("div", __spreadValues({
12818
13035
  className: classNames(tw("flex flex-col grow gap-0"), className)
12819
13036
  }, rest), children);
12820
13037
  };
12821
13038
  PageHeader.TitleContainer = (_a) => {
12822
13039
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12823
- return /* @__PURE__ */ React89.createElement("div", __spreadValues({
13040
+ return /* @__PURE__ */ React90.createElement("div", __spreadValues({
12824
13041
  className: classNames(tw("flex flex-col justify-center gap-2"), className)
12825
13042
  }, rest), children);
12826
13043
  };
12827
13044
  PageHeader.Title = (_a) => {
12828
13045
  var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
12829
- return /* @__PURE__ */ React89.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
13046
+ return /* @__PURE__ */ React90.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
12830
13047
  color: "grey-100",
12831
13048
  variant: isSubHeader ? "subheading" : "heading",
12832
13049
  htmlTag: isSubHeader ? "h2" : "h1"
@@ -12834,25 +13051,25 @@ PageHeader.Title = (_a) => {
12834
13051
  };
12835
13052
  PageHeader.Subtitle = (_a) => {
12836
13053
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
12837
- return /* @__PURE__ */ React89.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
13054
+ return /* @__PURE__ */ React90.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
12838
13055
  color: "grey-70"
12839
13056
  }), children);
12840
13057
  };
12841
13058
  PageHeader.Chips = (_a) => {
12842
13059
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12843
- return /* @__PURE__ */ React89.createElement("div", __spreadValues({
13060
+ return /* @__PURE__ */ React90.createElement("div", __spreadValues({
12844
13061
  className: classNames(tw("flex gap-3"), className)
12845
13062
  }, rest), children);
12846
13063
  };
12847
13064
  PageHeader.Actions = (_a) => {
12848
13065
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12849
- return /* @__PURE__ */ React89.createElement("div", __spreadValues({
13066
+ return /* @__PURE__ */ React90.createElement("div", __spreadValues({
12850
13067
  className: classNames(tw("flex flex-row gap-4 self-start"), className)
12851
13068
  }, rest), children);
12852
13069
  };
12853
13070
 
12854
13071
  // src/molecules/PageHeader/PageHeader.tsx
12855
- var import_more4 = __toESM(require_more());
13072
+ var import_more5 = __toESM(require_more());
12856
13073
  var CommonPageHeader = ({
12857
13074
  title,
12858
13075
  subtitle,
@@ -12870,63 +13087,63 @@ var CommonPageHeader = ({
12870
13087
  onMenuOpenChange,
12871
13088
  isSubHeader = false
12872
13089
  }) => {
12873
- return /* @__PURE__ */ React90.createElement(PageHeader, {
13090
+ return /* @__PURE__ */ React91.createElement(PageHeader, {
12874
13091
  className: "Aquarium-PageHeader"
12875
- }, /* @__PURE__ */ React90.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React90.createElement(Box, {
13092
+ }, /* @__PURE__ */ React91.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React91.createElement(Box, {
12876
13093
  marginBottom: "3"
12877
- }, /* @__PURE__ */ React90.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React90.createElement(Spacing, {
13094
+ }, /* @__PURE__ */ React91.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React91.createElement(Spacing, {
12878
13095
  row: true,
12879
13096
  gap: "5"
12880
- }, image && /* @__PURE__ */ React90.createElement("img", {
13097
+ }, image && /* @__PURE__ */ React91.createElement("img", {
12881
13098
  src: image,
12882
13099
  alt: imageAlt != null ? imageAlt : "",
12883
13100
  className: tw("w-[56px] h-[56px]")
12884
- }), /* @__PURE__ */ React90.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React90.createElement(PageHeader.Title, {
13101
+ }), /* @__PURE__ */ React91.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React91.createElement(PageHeader.Title, {
12885
13102
  isSubHeader
12886
- }, title), chips.length > 0 && /* @__PURE__ */ React90.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React90.createElement(Chip2, {
13103
+ }, title), chips.length > 0 && /* @__PURE__ */ React91.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React91.createElement(Chip2, {
12887
13104
  key: chip,
12888
13105
  dense: true,
12889
13106
  text: chip
12890
- }))), subtitle && /* @__PURE__ */ React90.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React90.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React90.createElement(Box.Flex, {
13107
+ }))), subtitle && /* @__PURE__ */ React91.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React91.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React91.createElement(Box.Flex, {
12891
13108
  alignItems: "center"
12892
- }, /* @__PURE__ */ React90.createElement(DropdownMenu2, {
13109
+ }, /* @__PURE__ */ React91.createElement(DropdownMenu2, {
12893
13110
  onAction: (action) => onAction == null ? void 0 : onAction(action),
12894
13111
  onOpenChange: onMenuOpenChange
12895
- }, /* @__PURE__ */ React90.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React90.createElement(Button.Icon, {
13112
+ }, /* @__PURE__ */ React91.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React91.createElement(Button.Icon, {
12896
13113
  "aria-label": menuAriaLabel,
12897
- icon: import_more4.default
12898
- })), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
13114
+ icon: import_more5.default
13115
+ })), menu)), secondaryActions && castArray4(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
12899
13116
  };
12900
- var PageHeader2 = (props) => /* @__PURE__ */ React90.createElement(CommonPageHeader, __spreadValues({}, props));
13117
+ var PageHeader2 = (props) => /* @__PURE__ */ React91.createElement(CommonPageHeader, __spreadValues({}, props));
12901
13118
  PageHeader2.displayName = "PageHeader";
12902
- var SubHeader = (props) => /* @__PURE__ */ React90.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
13119
+ var SubHeader = (props) => /* @__PURE__ */ React91.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
12903
13120
  isSubHeader: true
12904
13121
  }));
12905
13122
  PageHeader2.SubHeader = SubHeader;
12906
13123
  PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
12907
13124
 
12908
13125
  // src/molecules/PopoverDialog/PopoverDialog.tsx
12909
- import React92 from "react";
12910
- import omit14 from "lodash/omit";
13126
+ import React93 from "react";
13127
+ import omit15 from "lodash/omit";
12911
13128
 
12912
13129
  // src/atoms/PopoverDialog/PopoverDialog.tsx
12913
- import React91 from "react";
13130
+ import React92 from "react";
12914
13131
  var Header2 = (_a) => {
12915
13132
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12916
- return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({}, rest), {
13133
+ return /* @__PURE__ */ React92.createElement("div", __spreadProps(__spreadValues({}, rest), {
12917
13134
  className: classNames(tw("p-5 gap-3 flex items-center"), className)
12918
13135
  }), children);
12919
13136
  };
12920
13137
  var Title2 = (_a) => {
12921
13138
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12922
- return /* @__PURE__ */ React91.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
13139
+ return /* @__PURE__ */ React92.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
12923
13140
  htmlTag: "h1",
12924
13141
  variant: "small-strong"
12925
13142
  }), children);
12926
13143
  };
12927
13144
  var Body = (_a) => {
12928
13145
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12929
- return /* @__PURE__ */ React91.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
13146
+ return /* @__PURE__ */ React92.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
12930
13147
  htmlTag: "div",
12931
13148
  variant: "caption",
12932
13149
  className: classNames(tw("px-5 overflow-y-auto"), className)
@@ -12934,13 +13151,13 @@ var Body = (_a) => {
12934
13151
  };
12935
13152
  var Footer2 = (_a) => {
12936
13153
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12937
- return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({}, rest), {
13154
+ return /* @__PURE__ */ React92.createElement("div", __spreadProps(__spreadValues({}, rest), {
12938
13155
  className: classNames(tw("p-5"), className)
12939
13156
  }), children);
12940
13157
  };
12941
13158
  var Actions2 = (_a) => {
12942
13159
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12943
- return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({}, rest), {
13160
+ return /* @__PURE__ */ React92.createElement("div", __spreadProps(__spreadValues({}, rest), {
12944
13161
  className: classNames(tw("flex gap-4"), className)
12945
13162
  }), children);
12946
13163
  };
@@ -12956,29 +13173,29 @@ var PopoverDialog = {
12956
13173
  var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
12957
13174
  const wrapPromptWithBody = (child) => {
12958
13175
  if (isComponentType(child, PopoverDialog2.Prompt)) {
12959
- return /* @__PURE__ */ React92.createElement(Popover2.Panel, {
13176
+ return /* @__PURE__ */ React93.createElement(Popover2.Panel, {
12960
13177
  className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
12961
- }, /* @__PURE__ */ React92.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React92.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React92.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React92.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React92.createElement(Popover2.Button, __spreadValues({
13178
+ }, /* @__PURE__ */ React93.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React93.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React93.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React93.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React93.createElement(Popover2.Button, __spreadValues({
12962
13179
  kind: "secondary-ghost",
12963
13180
  key: secondaryAction.text,
12964
13181
  dense: true
12965
- }, omit14(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React92.createElement(Popover2.Button, __spreadValues({
13182
+ }, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React93.createElement(Popover2.Button, __spreadValues({
12966
13183
  kind: "ghost",
12967
13184
  key: primaryAction.text,
12968
13185
  dense: true
12969
- }, omit14(primaryAction, "text")), primaryAction.text))));
13186
+ }, omit15(primaryAction, "text")), primaryAction.text))));
12970
13187
  }
12971
13188
  return child;
12972
13189
  };
12973
- return /* @__PURE__ */ React92.createElement(Popover2, {
13190
+ return /* @__PURE__ */ React93.createElement(Popover2, {
12974
13191
  type: "dialog",
12975
13192
  isOpen: open,
12976
13193
  placement,
12977
13194
  containFocus: true
12978
- }, React92.Children.map(children, wrapPromptWithBody));
13195
+ }, React93.Children.map(children, wrapPromptWithBody));
12979
13196
  };
12980
13197
  PopoverDialog2.Trigger = Popover2.Trigger;
12981
- var Prompt = ({ children }) => /* @__PURE__ */ React92.createElement(PopoverDialog.Body, null, children);
13198
+ var Prompt = ({ children }) => /* @__PURE__ */ React93.createElement(PopoverDialog.Body, null, children);
12982
13199
  Prompt.displayName = "PopoverDialog.Prompt";
12983
13200
  PopoverDialog2.Prompt = Prompt;
12984
13201
 
@@ -12987,14 +13204,14 @@ import { createPortal } from "react-dom";
12987
13204
  var Portal = ({ children, to }) => createPortal(children, to);
12988
13205
 
12989
13206
  // src/molecules/ProgressBar/ProgressBar.tsx
12990
- import React94 from "react";
13207
+ import React95 from "react";
12991
13208
 
12992
13209
  // src/atoms/ProgressBar/ProgressBar.tsx
12993
- import React93 from "react";
13210
+ import React94 from "react";
12994
13211
  import clamp3 from "lodash/clamp";
12995
13212
  var ProgressBar = (_a) => {
12996
13213
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
12997
- return /* @__PURE__ */ React93.createElement("div", __spreadProps(__spreadValues({}, rest), {
13214
+ return /* @__PURE__ */ React94.createElement("div", __spreadProps(__spreadValues({}, rest), {
12998
13215
  className: classNames(
12999
13216
  tw("relative flex items-center w-full bg-grey-0 h-2 rounded-full overflow-hidden"),
13000
13217
  className
@@ -13010,7 +13227,7 @@ var STATUS_COLORS = {
13010
13227
  ProgressBar.Indicator = (_a) => {
13011
13228
  var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
13012
13229
  const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
13013
- return /* @__PURE__ */ React93.createElement("div", __spreadProps(__spreadValues({}, rest), {
13230
+ return /* @__PURE__ */ React94.createElement("div", __spreadProps(__spreadValues({}, rest), {
13014
13231
  className: classNames(
13015
13232
  tw("h-2 rounded-full transition-all ease-in-out delay-150"),
13016
13233
  STATUS_COLORS[status],
@@ -13026,11 +13243,11 @@ ProgressBar.Indicator = (_a) => {
13026
13243
  };
13027
13244
  ProgressBar.Labels = (_a) => {
13028
13245
  var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
13029
- return /* @__PURE__ */ React93.createElement("div", {
13246
+ return /* @__PURE__ */ React94.createElement("div", {
13030
13247
  className: classNames(tw("flex flex-row"), className)
13031
- }, /* @__PURE__ */ React93.createElement("span", __spreadProps(__spreadValues({}, rest), {
13248
+ }, /* @__PURE__ */ React94.createElement("span", __spreadProps(__spreadValues({}, rest), {
13032
13249
  className: tw("grow text-grey-70 typography-caption")
13033
- }), startLabel), /* @__PURE__ */ React93.createElement("span", __spreadProps(__spreadValues({}, rest), {
13250
+ }), startLabel), /* @__PURE__ */ React94.createElement("span", __spreadProps(__spreadValues({}, rest), {
13034
13251
  className: tw("grow text-grey-70 typography-caption text-right")
13035
13252
  }), endLabel));
13036
13253
  };
@@ -13048,7 +13265,7 @@ var ProgressBar2 = (props) => {
13048
13265
  if (min > max) {
13049
13266
  throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
13050
13267
  }
13051
- const progress = /* @__PURE__ */ React94.createElement(ProgressBar, null, /* @__PURE__ */ React94.createElement(ProgressBar.Indicator, {
13268
+ const progress = /* @__PURE__ */ React95.createElement(ProgressBar, null, /* @__PURE__ */ React95.createElement(ProgressBar.Indicator, {
13052
13269
  status: value === max ? completedStatus : progresStatus,
13053
13270
  min,
13054
13271
  max,
@@ -13058,15 +13275,15 @@ var ProgressBar2 = (props) => {
13058
13275
  if (props.dense) {
13059
13276
  return progress;
13060
13277
  }
13061
- return /* @__PURE__ */ React94.createElement("div", {
13278
+ return /* @__PURE__ */ React95.createElement("div", {
13062
13279
  className: "Aquarium-ProgressBar"
13063
- }, progress, /* @__PURE__ */ React94.createElement(ProgressBar.Labels, {
13280
+ }, progress, /* @__PURE__ */ React95.createElement(ProgressBar.Labels, {
13064
13281
  className: tw("py-2"),
13065
13282
  startLabel: props.startLabel,
13066
13283
  endLabel: props.endLabel
13067
13284
  }));
13068
13285
  };
13069
- var ProgressBarSkeleton = () => /* @__PURE__ */ React94.createElement(Skeleton, {
13286
+ var ProgressBarSkeleton = () => /* @__PURE__ */ React95.createElement(Skeleton, {
13070
13287
  height: 4,
13071
13288
  display: "block"
13072
13289
  });
@@ -13074,13 +13291,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
13074
13291
  ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
13075
13292
 
13076
13293
  // src/molecules/RadioButton/RadioButton.tsx
13077
- import React95 from "react";
13078
- var RadioButton2 = React95.forwardRef(
13294
+ import React96 from "react";
13295
+ var RadioButton2 = React96.forwardRef(
13079
13296
  (_a, ref) => {
13080
13297
  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"]);
13081
13298
  var _a2;
13082
13299
  const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
13083
- return !readOnly || isChecked ? /* @__PURE__ */ React95.createElement(ControlLabel, {
13300
+ return !readOnly || isChecked ? /* @__PURE__ */ React96.createElement(ControlLabel, {
13084
13301
  htmlFor: id,
13085
13302
  label: children,
13086
13303
  "aria-label": ariaLabel,
@@ -13089,7 +13306,7 @@ var RadioButton2 = React95.forwardRef(
13089
13306
  disabled,
13090
13307
  style: { gap: "0 8px" },
13091
13308
  className: "Aquarium-RadioButton"
13092
- }, !readOnly && /* @__PURE__ */ React95.createElement(RadioButton, __spreadProps(__spreadValues({
13309
+ }, !readOnly && /* @__PURE__ */ React96.createElement(RadioButton, __spreadProps(__spreadValues({
13093
13310
  id,
13094
13311
  ref,
13095
13312
  name
@@ -13100,12 +13317,12 @@ var RadioButton2 = React95.forwardRef(
13100
13317
  }
13101
13318
  );
13102
13319
  RadioButton2.displayName = "RadioButton";
13103
- var RadioButtonSkeleton = () => /* @__PURE__ */ React95.createElement("div", {
13320
+ var RadioButtonSkeleton = () => /* @__PURE__ */ React96.createElement("div", {
13104
13321
  className: tw("flex gap-3")
13105
- }, /* @__PURE__ */ React95.createElement(Skeleton, {
13322
+ }, /* @__PURE__ */ React96.createElement(Skeleton, {
13106
13323
  height: 20,
13107
13324
  width: 20
13108
- }), /* @__PURE__ */ React95.createElement(Skeleton, {
13325
+ }), /* @__PURE__ */ React96.createElement(Skeleton, {
13109
13326
  height: 20,
13110
13327
  width: 150
13111
13328
  }));
@@ -13113,10 +13330,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
13113
13330
  RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
13114
13331
 
13115
13332
  // src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
13116
- import React96 from "react";
13117
- import { useId as useId13 } from "@react-aria/utils";
13333
+ import React97 from "react";
13334
+ import { useId as useId14 } from "@react-aria/utils";
13118
13335
  var isRadioButton = (c) => {
13119
- return React96.isValidElement(c) && c.type === RadioButton2;
13336
+ return React97.isValidElement(c) && c.type === RadioButton2;
13120
13337
  };
13121
13338
  var RadioButtonGroup = (_a) => {
13122
13339
  var _b = _a, {
@@ -13139,8 +13356,8 @@ var RadioButtonGroup = (_a) => {
13139
13356
  "children"
13140
13357
  ]);
13141
13358
  var _a2;
13142
- const [value, setValue] = React96.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
13143
- const errorMessageId = useId13();
13359
+ const [value, setValue] = React97.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
13360
+ const errorMessageId = useId14();
13144
13361
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
13145
13362
  const labelControlProps = getLabelControlProps(props);
13146
13363
  if (_value !== void 0 && _value !== value) {
@@ -13150,14 +13367,14 @@ var RadioButtonGroup = (_a) => {
13150
13367
  setValue(e.target.value);
13151
13368
  onChange == null ? void 0 : onChange(e.target.value);
13152
13369
  };
13153
- const content = React96.Children.map(children, (c) => {
13370
+ const content = React97.Children.map(children, (c) => {
13154
13371
  var _a3, _b2, _c;
13155
13372
  if (!isRadioButton(c)) {
13156
13373
  return null;
13157
13374
  }
13158
13375
  const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
13159
13376
  const checked = value === void 0 ? void 0 : c.props.value === value;
13160
- return React96.cloneElement(c, {
13377
+ return React97.cloneElement(c, {
13161
13378
  name,
13162
13379
  defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
13163
13380
  checked: (_b2 = c.props.checked) != null ? _b2 : checked,
@@ -13166,13 +13383,13 @@ var RadioButtonGroup = (_a) => {
13166
13383
  readOnly
13167
13384
  });
13168
13385
  });
13169
- return /* @__PURE__ */ React96.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
13386
+ return /* @__PURE__ */ React97.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
13170
13387
  fieldset: true
13171
13388
  }, labelControlProps), errorProps), {
13172
13389
  className: "Aquarium-RadioButtonGroup"
13173
- }), cols && /* @__PURE__ */ React96.createElement(InputGroup, {
13390
+ }), cols && /* @__PURE__ */ React97.createElement(InputGroup, {
13174
13391
  cols
13175
- }, content), !cols && /* @__PURE__ */ React96.createElement(Flexbox, {
13392
+ }, content), !cols && /* @__PURE__ */ React97.createElement(Flexbox, {
13176
13393
  direction,
13177
13394
  alignItems: "flex-start",
13178
13395
  colGap: "8",
@@ -13181,12 +13398,12 @@ var RadioButtonGroup = (_a) => {
13181
13398
  }, content));
13182
13399
  };
13183
13400
  var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
13184
- return /* @__PURE__ */ React96.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React96.createElement("div", {
13401
+ return /* @__PURE__ */ React97.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React97.createElement("div", {
13185
13402
  className: tw("flex flex-wrap", {
13186
13403
  "flex-row gap-8": direction === "row",
13187
13404
  "flex-col gap-2": direction === "column"
13188
13405
  })
13189
- }, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React96.createElement(RadioButton2.Skeleton, {
13406
+ }, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React97.createElement(RadioButton2.Skeleton, {
13190
13407
  key
13191
13408
  }))));
13192
13409
  };
@@ -13194,24 +13411,24 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
13194
13411
  RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
13195
13412
 
13196
13413
  // src/molecules/Section/Section.tsx
13197
- import React101 from "react";
13198
- import { useId as useId14 } from "@react-aria/utils";
13199
- import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
13200
- import castArray4 from "lodash/castArray";
13414
+ import React102 from "react";
13415
+ import { useId as useId15 } from "@react-aria/utils";
13416
+ import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
13417
+ import castArray5 from "lodash/castArray";
13201
13418
  import isUndefined9 from "lodash/isUndefined";
13202
13419
 
13203
13420
  // src/molecules/Switch/Switch.tsx
13204
- import React98 from "react";
13421
+ import React99 from "react";
13205
13422
 
13206
13423
  // src/atoms/Switch/Switch.tsx
13207
- import React97 from "react";
13424
+ import React98 from "react";
13208
13425
  var import_ban2 = __toESM(require_ban());
13209
- var Switch = React97.forwardRef(
13426
+ var Switch = React98.forwardRef(
13210
13427
  (_a, ref) => {
13211
13428
  var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
13212
- return /* @__PURE__ */ React97.createElement("span", {
13429
+ return /* @__PURE__ */ React98.createElement("span", {
13213
13430
  className: tw("relative inline-flex justify-center items-center self-center group")
13214
- }, /* @__PURE__ */ React97.createElement("input", __spreadProps(__spreadValues({
13431
+ }, /* @__PURE__ */ React98.createElement("input", __spreadProps(__spreadValues({
13215
13432
  id,
13216
13433
  ref,
13217
13434
  type: "checkbox",
@@ -13230,7 +13447,7 @@ var Switch = React97.forwardRef(
13230
13447
  ),
13231
13448
  readOnly,
13232
13449
  disabled
13233
- })), /* @__PURE__ */ React97.createElement("span", {
13450
+ })), /* @__PURE__ */ React98.createElement("span", {
13234
13451
  className: tw(
13235
13452
  "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",
13236
13453
  "bg-white left-2 peer-checked/switch:left-1 text-grey-30 peer-checked/switch:text-primary-60",
@@ -13238,7 +13455,7 @@ var Switch = React97.forwardRef(
13238
13455
  "shadow-4dp": !disabled
13239
13456
  }
13240
13457
  )
13241
- }, disabled && /* @__PURE__ */ React97.createElement(Icon, {
13458
+ }, disabled && /* @__PURE__ */ React98.createElement(Icon, {
13242
13459
  icon: import_ban2.default,
13243
13460
  width: "10px",
13244
13461
  height: "10px"
@@ -13247,7 +13464,7 @@ var Switch = React97.forwardRef(
13247
13464
  );
13248
13465
 
13249
13466
  // src/molecules/Switch/Switch.tsx
13250
- var Switch2 = React98.forwardRef(
13467
+ var Switch2 = React99.forwardRef(
13251
13468
  (_a, ref) => {
13252
13469
  var _b = _a, {
13253
13470
  id,
@@ -13270,7 +13487,7 @@ var Switch2 = React98.forwardRef(
13270
13487
  ]);
13271
13488
  var _a2;
13272
13489
  const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
13273
- return !readOnly || isChecked ? /* @__PURE__ */ React98.createElement(ControlLabel, {
13490
+ return !readOnly || isChecked ? /* @__PURE__ */ React99.createElement(ControlLabel, {
13274
13491
  htmlFor: id,
13275
13492
  label: children,
13276
13493
  "aria-label": ariaLabel,
@@ -13280,7 +13497,7 @@ var Switch2 = React98.forwardRef(
13280
13497
  style: { gap: "0 8px" },
13281
13498
  labelPlacement,
13282
13499
  className: "Aquarium-Switch"
13283
- }, !readOnly && /* @__PURE__ */ React98.createElement(Switch, __spreadProps(__spreadValues({
13500
+ }, !readOnly && /* @__PURE__ */ React99.createElement(Switch, __spreadProps(__spreadValues({
13284
13501
  id,
13285
13502
  ref,
13286
13503
  name
@@ -13291,12 +13508,12 @@ var Switch2 = React98.forwardRef(
13291
13508
  }
13292
13509
  );
13293
13510
  Switch2.displayName = "Switch";
13294
- var SwitchSkeleton = () => /* @__PURE__ */ React98.createElement("div", {
13511
+ var SwitchSkeleton = () => /* @__PURE__ */ React99.createElement("div", {
13295
13512
  className: tw("flex gap-3")
13296
- }, /* @__PURE__ */ React98.createElement(Skeleton, {
13513
+ }, /* @__PURE__ */ React99.createElement(Skeleton, {
13297
13514
  height: 20,
13298
13515
  width: 35
13299
- }), /* @__PURE__ */ React98.createElement(Skeleton, {
13516
+ }), /* @__PURE__ */ React99.createElement(Skeleton, {
13300
13517
  height: 20,
13301
13518
  width: 150
13302
13519
  }));
@@ -13304,7 +13521,7 @@ Switch2.Skeleton = SwitchSkeleton;
13304
13521
  Switch2.Skeleton.displayName = "Switch.Skeleton ";
13305
13522
 
13306
13523
  // src/molecules/TagLabel/TagLabel.tsx
13307
- import React99 from "react";
13524
+ import React100 from "react";
13308
13525
  var getVariantClassNames = (variant = "primary") => {
13309
13526
  switch (variant) {
13310
13527
  case "danger":
@@ -13318,7 +13535,7 @@ var getVariantClassNames = (variant = "primary") => {
13318
13535
  };
13319
13536
  var TagLabel = (_a) => {
13320
13537
  var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
13321
- return /* @__PURE__ */ React99.createElement("span", __spreadProps(__spreadValues({}, rest), {
13538
+ return /* @__PURE__ */ React100.createElement("span", __spreadProps(__spreadValues({}, rest), {
13322
13539
  className: classNames(
13323
13540
  "Aquarium-TagLabel",
13324
13541
  getVariantClassNames(variant),
@@ -13331,11 +13548,11 @@ var TagLabel = (_a) => {
13331
13548
  };
13332
13549
 
13333
13550
  // src/atoms/Section/Section.tsx
13334
- import React100 from "react";
13551
+ import React101 from "react";
13335
13552
  var import_caretUp2 = __toESM(require_caretUp());
13336
13553
  var Section3 = (_a) => {
13337
13554
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
13338
- return /* @__PURE__ */ React100.createElement(Box, __spreadValues({
13555
+ return /* @__PURE__ */ React101.createElement(Box, __spreadValues({
13339
13556
  component: "section",
13340
13557
  borderColor: "grey-5",
13341
13558
  borderWidth: "1px"
@@ -13343,7 +13560,7 @@ var Section3 = (_a) => {
13343
13560
  };
13344
13561
  Section3.Header = (_a) => {
13345
13562
  var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
13346
- return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
13563
+ return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
13347
13564
  className: classNames(
13348
13565
  tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-grey-0": expanded }),
13349
13566
  className
@@ -13352,21 +13569,21 @@ Section3.Header = (_a) => {
13352
13569
  };
13353
13570
  Section3.TitleContainer = (_a) => {
13354
13571
  var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
13355
- return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
13572
+ return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
13356
13573
  className: classNames(
13357
13574
  tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", { "cursor-pointer": collapsible }),
13358
13575
  className
13359
13576
  )
13360
13577
  }), children);
13361
13578
  };
13362
- Section3.Toggle = (props) => /* @__PURE__ */ React100.createElement(Icon, __spreadProps(__spreadValues({}, props), {
13579
+ Section3.Toggle = (props) => /* @__PURE__ */ React101.createElement(Icon, __spreadProps(__spreadValues({}, props), {
13363
13580
  icon: import_caretUp2.default,
13364
13581
  height: 22,
13365
13582
  width: 22
13366
13583
  }));
13367
13584
  Section3.Title = (_a) => {
13368
13585
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
13369
- return /* @__PURE__ */ React100.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
13586
+ return /* @__PURE__ */ React101.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
13370
13587
  htmlTag: "h2",
13371
13588
  color: "black",
13372
13589
  className: "flex gap-3 items-center"
@@ -13374,35 +13591,35 @@ Section3.Title = (_a) => {
13374
13591
  };
13375
13592
  Section3.Subtitle = (_a) => {
13376
13593
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
13377
- return /* @__PURE__ */ React100.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
13594
+ return /* @__PURE__ */ React101.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
13378
13595
  color: "grey-70"
13379
13596
  }), children);
13380
13597
  };
13381
13598
  Section3.Actions = (_a) => {
13382
13599
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
13383
- return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
13600
+ return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
13384
13601
  className: classNames(tw("flex gap-4 justify-end"), className)
13385
13602
  }), children);
13386
13603
  };
13387
13604
  Section3.Body = (_a) => {
13388
13605
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
13389
- return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
13606
+ return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
13390
13607
  className: classNames(tw("p-6"), className)
13391
- }), /* @__PURE__ */ React100.createElement(Typography, {
13608
+ }), /* @__PURE__ */ React101.createElement(Typography, {
13392
13609
  htmlTag: "div",
13393
13610
  color: "grey-70"
13394
13611
  }, children));
13395
13612
  };
13396
13613
 
13397
13614
  // src/molecules/Section/Section.tsx
13398
- var import_more5 = __toESM(require_more());
13615
+ var import_more6 = __toESM(require_more());
13399
13616
  var Section4 = (props) => {
13400
13617
  var _a, _b, _c, _d, _e;
13401
13618
  const { title, subtitle, children } = props;
13402
13619
  const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
13403
13620
  const _collapsed = title ? props.collapsed : void 0;
13404
13621
  const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
13405
- const [isCollapsed, setCollapsed] = React101.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
13622
+ const [isCollapsed, setCollapsed] = React102.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
13406
13623
  const [ref, { height }] = useMeasure();
13407
13624
  const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
13408
13625
  const menuAriaLabel = title ? (_e = (_d = props.menuAriaLabel) != null ? _d : props.menuLabel) != null ? _e : "Context menu" : void 0;
@@ -13423,7 +13640,7 @@ var Section4 = (props) => {
13423
13640
  }
13424
13641
  };
13425
13642
  const targetHeight = isCollapsed ? "0px" : `${height != null ? height : 0}px`;
13426
- const _f = useSpring3({
13643
+ const _f = useSpring4({
13427
13644
  height: height !== null ? targetHeight : void 0,
13428
13645
  opacity: isCollapsed ? 0 : 1,
13429
13646
  transform: `rotate(${isCollapsed ? 180 : 0}deg)`,
@@ -13433,58 +13650,58 @@ var Section4 = (props) => {
13433
13650
  },
13434
13651
  immediate: !_collapsible
13435
13652
  }), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
13436
- const toggleId = useId14();
13437
- const regionId = useId14();
13438
- const titleId = useId14();
13439
- return /* @__PURE__ */ React101.createElement(Section3, {
13653
+ const toggleId = useId15();
13654
+ const regionId = useId15();
13655
+ const titleId = useId15();
13656
+ return /* @__PURE__ */ React102.createElement(Section3, {
13440
13657
  "aria-label": title,
13441
13658
  className: "Aquarium-Section"
13442
- }, title && /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(Section3.Header, {
13659
+ }, title && /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(Section3.Header, {
13443
13660
  expanded: _collapsible && !isCollapsed
13444
- }, /* @__PURE__ */ React101.createElement(Section3.TitleContainer, {
13661
+ }, /* @__PURE__ */ React102.createElement(Section3.TitleContainer, {
13445
13662
  role: _collapsible ? "button" : void 0,
13446
13663
  id: toggleId,
13447
13664
  collapsible: _collapsible,
13448
13665
  onClick: handleTitleClick,
13449
13666
  "aria-expanded": _collapsible ? !isCollapsed : void 0,
13450
13667
  "aria-controls": _collapsible ? regionId : void 0
13451
- }, _collapsible && /* @__PURE__ */ React101.createElement(animated4.div, {
13668
+ }, _collapsible && /* @__PURE__ */ React102.createElement(animated5.div, {
13452
13669
  style: { transform }
13453
- }, /* @__PURE__ */ React101.createElement(Section3.Toggle, null)), /* @__PURE__ */ React101.createElement(Section3.Title, {
13670
+ }, /* @__PURE__ */ React102.createElement(Section3.Toggle, null)), /* @__PURE__ */ React102.createElement(Section3.Title, {
13454
13671
  id: titleId
13455
- }, /* @__PURE__ */ React101.createElement(LineClamp2, {
13672
+ }, /* @__PURE__ */ React102.createElement(LineClamp2, {
13456
13673
  lines: 1
13457
- }, title), props.tag && /* @__PURE__ */ React101.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React101.createElement(Chip2, {
13674
+ }, title), props.tag && /* @__PURE__ */ React102.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React102.createElement(Chip2, {
13458
13675
  text: props.badge
13459
- }), props.chip && /* @__PURE__ */ React101.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React101.createElement(Section3.Subtitle, {
13676
+ }), props.chip && /* @__PURE__ */ React102.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React102.createElement(Section3.Subtitle, {
13460
13677
  className: tw("row-start-2", { "col-start-2": _collapsible })
13461
- }, /* @__PURE__ */ React101.createElement(LineClamp2, {
13678
+ }, /* @__PURE__ */ React102.createElement(LineClamp2, {
13462
13679
  lines: 1
13463
- }, subtitle))), !isCollapsed && /* @__PURE__ */ React101.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React101.createElement(Box.Flex, {
13680
+ }, subtitle))), !isCollapsed && /* @__PURE__ */ React102.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React102.createElement(Box.Flex, {
13464
13681
  alignItems: "center"
13465
- }, /* @__PURE__ */ React101.createElement(DropdownMenu2, {
13682
+ }, /* @__PURE__ */ React102.createElement(DropdownMenu2, {
13466
13683
  onAction: (action) => onAction == null ? void 0 : onAction(action),
13467
13684
  onOpenChange: onMenuOpenChange
13468
- }, /* @__PURE__ */ React101.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React101.createElement(Button.Icon, {
13685
+ }, /* @__PURE__ */ React102.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React102.createElement(Button.Icon, {
13469
13686
  "aria-label": menuAriaLabel,
13470
- icon: import_more5.default
13471
- })), menu)), props.actions && castArray4(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React101.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React101.createElement(SelectBase, __spreadValues({
13687
+ icon: import_more6.default
13688
+ })), menu)), props.actions && castArray5(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React102.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React102.createElement(SelectBase, __spreadValues({
13472
13689
  "aria-labelledby": titleId
13473
- }, props.select)))), /* @__PURE__ */ React101.createElement(animated4.div, {
13690
+ }, props.select)))), /* @__PURE__ */ React102.createElement(animated5.div, {
13474
13691
  className: tw(`h-[1px]`),
13475
13692
  style: { backgroundColor }
13476
- })), /* @__PURE__ */ React101.createElement(animated4.div, {
13693
+ })), /* @__PURE__ */ React102.createElement(animated5.div, {
13477
13694
  id: regionId,
13478
13695
  "aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
13479
13696
  style: spring,
13480
13697
  className: tw({ "overflow-hidden": _collapsible })
13481
- }, /* @__PURE__ */ React101.createElement("div", {
13698
+ }, /* @__PURE__ */ React102.createElement("div", {
13482
13699
  ref
13483
- }, /* @__PURE__ */ React101.createElement(Section3.Body, null, children))));
13700
+ }, /* @__PURE__ */ React102.createElement(Section3.Body, null, children))));
13484
13701
  };
13485
13702
 
13486
13703
  // src/molecules/SegmentedControl/SegmentedControl.tsx
13487
- import React102 from "react";
13704
+ import React103 from "react";
13488
13705
  var SegmentedControl = (_a) => {
13489
13706
  var _b = _a, {
13490
13707
  children,
@@ -13501,7 +13718,7 @@ var SegmentedControl = (_a) => {
13501
13718
  "selected",
13502
13719
  "className"
13503
13720
  ]);
13504
- return /* @__PURE__ */ React102.createElement("li", null, /* @__PURE__ */ React102.createElement("button", __spreadProps(__spreadValues({
13721
+ return /* @__PURE__ */ React103.createElement("li", null, /* @__PURE__ */ React103.createElement("button", __spreadProps(__spreadValues({
13505
13722
  type: "button"
13506
13723
  }, rest), {
13507
13724
  className: classNames(
@@ -13535,12 +13752,12 @@ var SegmentedControlGroup = (_a) => {
13535
13752
  "border border-grey-20 text-grey-50": variant === "outlined",
13536
13753
  "bg-grey-0": variant === "raised"
13537
13754
  });
13538
- return /* @__PURE__ */ React102.createElement("ul", __spreadProps(__spreadValues({}, rest), {
13755
+ return /* @__PURE__ */ React103.createElement("ul", __spreadProps(__spreadValues({}, rest), {
13539
13756
  "aria-label": ariaLabel,
13540
13757
  className: classNames("Aquarium-SegmentedControl", classes2, className)
13541
- }), React102.Children.map(
13758
+ }), React103.Children.map(
13542
13759
  children,
13543
- (child) => React102.cloneElement(child, {
13760
+ (child) => React103.cloneElement(child, {
13544
13761
  dense,
13545
13762
  variant,
13546
13763
  onClick: () => onChange(child.props.value),
@@ -13578,14 +13795,14 @@ var getCommonClassNames = (dense, selected) => tw(
13578
13795
  );
13579
13796
 
13580
13797
  // src/molecules/Stepper/Stepper.tsx
13581
- import React104 from "react";
13798
+ import React105 from "react";
13582
13799
 
13583
13800
  // src/atoms/Stepper/Stepper.tsx
13584
- import React103 from "react";
13801
+ import React104 from "react";
13585
13802
  var import_tick6 = __toESM(require_tick());
13586
13803
  var Stepper = (_a) => {
13587
13804
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13588
- return /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({}, rest), {
13805
+ return /* @__PURE__ */ React104.createElement("div", __spreadProps(__spreadValues({}, rest), {
13589
13806
  className: classNames(className)
13590
13807
  }));
13591
13808
  };
@@ -13599,7 +13816,7 @@ var ConnectorContainer = (_a) => {
13599
13816
  "completed",
13600
13817
  "dense"
13601
13818
  ]);
13602
- return /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({}, rest), {
13819
+ return /* @__PURE__ */ React104.createElement("div", __spreadProps(__spreadValues({}, rest), {
13603
13820
  className: classNames(
13604
13821
  tw("absolute w-full -left-1/2", {
13605
13822
  "top-[3px] px-[14px]": Boolean(dense),
@@ -13611,7 +13828,7 @@ var ConnectorContainer = (_a) => {
13611
13828
  };
13612
13829
  var Connector = (_a) => {
13613
13830
  var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
13614
- return /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({}, rest), {
13831
+ return /* @__PURE__ */ React104.createElement("div", __spreadProps(__spreadValues({}, rest), {
13615
13832
  className: classNames(
13616
13833
  tw("w-full", {
13617
13834
  "bg-grey-20": !completed,
@@ -13625,7 +13842,7 @@ var Connector = (_a) => {
13625
13842
  };
13626
13843
  var Step = (_a) => {
13627
13844
  var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
13628
- return /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({}, rest), {
13845
+ return /* @__PURE__ */ React104.createElement("div", __spreadProps(__spreadValues({}, rest), {
13629
13846
  className: classNames(
13630
13847
  tw("flex flex-col items-center text-grey-90 relative text-center", {
13631
13848
  "text-grey-20": state === "inactive"
@@ -13646,13 +13863,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
13646
13863
  });
13647
13864
  var Indicator = (_a) => {
13648
13865
  var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
13649
- return /* @__PURE__ */ React103.createElement("div", __spreadProps(__spreadValues({}, rest), {
13866
+ return /* @__PURE__ */ React104.createElement("div", __spreadProps(__spreadValues({}, rest), {
13650
13867
  className: classNames(
13651
13868
  tw("rounded-full flex justify-center items-center mx-2 mb-3"),
13652
13869
  dense ? getDenseClassNames(state) : getClassNames(state),
13653
13870
  className
13654
13871
  )
13655
- }), state === "completed" ? /* @__PURE__ */ React103.createElement(InlineIcon, {
13872
+ }), state === "completed" ? /* @__PURE__ */ React104.createElement(InlineIcon, {
13656
13873
  icon: import_tick6.default
13657
13874
  }) : dense ? null : children);
13658
13875
  };
@@ -13663,26 +13880,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
13663
13880
 
13664
13881
  // src/molecules/Stepper/Stepper.tsx
13665
13882
  var Stepper2 = ({ children, activeIndex, dense }) => {
13666
- const steps = React104.Children.count(children);
13667
- return /* @__PURE__ */ React104.createElement(Stepper, {
13883
+ const steps = React105.Children.count(children);
13884
+ return /* @__PURE__ */ React105.createElement(Stepper, {
13668
13885
  role: "list",
13669
13886
  className: "Aquarium-Stepper"
13670
- }, /* @__PURE__ */ React104.createElement(Template, {
13887
+ }, /* @__PURE__ */ React105.createElement(Template, {
13671
13888
  columns: steps
13672
- }, React104.Children.map(children, (child, index) => {
13889
+ }, React105.Children.map(children, (child, index) => {
13673
13890
  if (!isComponentType(child, Step2)) {
13674
13891
  throw new Error("<Stepper> can only have <Stepper.Step> components as children");
13675
13892
  } else {
13676
13893
  const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
13677
- return /* @__PURE__ */ React104.createElement(Stepper.Step, {
13894
+ return /* @__PURE__ */ React105.createElement(Stepper.Step, {
13678
13895
  state,
13679
13896
  "aria-current": state === "active" ? "step" : false,
13680
13897
  role: "listitem"
13681
- }, index > 0 && index <= steps && /* @__PURE__ */ React104.createElement(Stepper.ConnectorContainer, {
13898
+ }, index > 0 && index <= steps && /* @__PURE__ */ React105.createElement(Stepper.ConnectorContainer, {
13682
13899
  dense
13683
- }, /* @__PURE__ */ React104.createElement(Stepper.ConnectorContainer.Connector, {
13900
+ }, /* @__PURE__ */ React105.createElement(Stepper.ConnectorContainer.Connector, {
13684
13901
  completed: state === "completed" || state === "active"
13685
- })), /* @__PURE__ */ React104.createElement(Stepper.Step.Indicator, {
13902
+ })), /* @__PURE__ */ React105.createElement(Stepper.Step.Indicator, {
13686
13903
  state,
13687
13904
  dense
13688
13905
  }, index + 1), child.props.children);
@@ -13695,8 +13912,8 @@ Step2.displayName = "Stepper.Step";
13695
13912
  Stepper2.Step = Step2;
13696
13913
 
13697
13914
  // src/molecules/SwitchGroup/SwitchGroup.tsx
13698
- import React105, { useState as useState13 } from "react";
13699
- import { useId as useId15 } from "@react-aria/utils";
13915
+ import React106, { useState as useState13 } from "react";
13916
+ import { useId as useId16 } from "@react-aria/utils";
13700
13917
  var SwitchGroup = (_a) => {
13701
13918
  var _b = _a, {
13702
13919
  value,
@@ -13718,7 +13935,7 @@ var SwitchGroup = (_a) => {
13718
13935
  if (value !== void 0 && value !== selectedItems) {
13719
13936
  setSelectedItems(value);
13720
13937
  }
13721
- const errorMessageId = useId15();
13938
+ const errorMessageId = useId16();
13722
13939
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
13723
13940
  const labelControlProps = getLabelControlProps(props);
13724
13941
  const handleChange = (e) => {
@@ -13727,13 +13944,13 @@ var SwitchGroup = (_a) => {
13727
13944
  setSelectedItems(updated);
13728
13945
  onChange == null ? void 0 : onChange(updated);
13729
13946
  };
13730
- return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
13947
+ return /* @__PURE__ */ React106.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
13731
13948
  fieldset: true
13732
13949
  }, labelControlProps), errorProps), {
13733
13950
  className: "Aquarium-SwitchGroup"
13734
- }), /* @__PURE__ */ React105.createElement(InputGroup, {
13951
+ }), /* @__PURE__ */ React106.createElement(InputGroup, {
13735
13952
  cols
13736
- }, React105.Children.map(children, (c) => {
13953
+ }, React106.Children.map(children, (c) => {
13737
13954
  var _a3, _b2, _c, _d;
13738
13955
  if (!isComponentType(c, Switch2)) {
13739
13956
  return null;
@@ -13741,7 +13958,7 @@ var SwitchGroup = (_a) => {
13741
13958
  const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
13742
13959
  const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
13743
13960
  const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
13744
- return React105.cloneElement(c, {
13961
+ return React106.cloneElement(c, {
13745
13962
  defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
13746
13963
  checked: (_c = c.props.checked) != null ? _c : checked,
13747
13964
  onChange: (_d = c.props.onChange) != null ? _d : handleChange,
@@ -13751,9 +13968,9 @@ var SwitchGroup = (_a) => {
13751
13968
  })));
13752
13969
  };
13753
13970
  var SwitchGroupSkeleton = ({ options = 2 }) => {
13754
- return /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement("div", {
13971
+ return /* @__PURE__ */ React106.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React106.createElement("div", {
13755
13972
  className: tw("flex flex-wrap flex-col gap-2")
13756
- }, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React105.createElement(Switch2.Skeleton, {
13973
+ }, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React106.createElement(Switch2.Skeleton, {
13757
13974
  key
13758
13975
  }))));
13759
13976
  };
@@ -13761,14 +13978,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
13761
13978
  SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
13762
13979
 
13763
13980
  // src/molecules/Textarea/Textarea.tsx
13764
- import React106, { useState as useState14 } from "react";
13765
- import { useId as useId16 } from "@react-aria/utils";
13766
- import omit15 from "lodash/omit";
13981
+ import React107, { useState as useState14 } from "react";
13982
+ import { useId as useId17 } from "@react-aria/utils";
13983
+ import omit16 from "lodash/omit";
13767
13984
  import toString2 from "lodash/toString";
13768
- var TextareaBase = React106.forwardRef(
13985
+ var TextareaBase = React107.forwardRef(
13769
13986
  (_a, ref) => {
13770
13987
  var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
13771
- return /* @__PURE__ */ React106.createElement("textarea", __spreadProps(__spreadValues({
13988
+ return /* @__PURE__ */ React107.createElement("textarea", __spreadProps(__spreadValues({
13772
13989
  ref
13773
13990
  }, props), {
13774
13991
  readOnly,
@@ -13776,26 +13993,26 @@ var TextareaBase = React106.forwardRef(
13776
13993
  }));
13777
13994
  }
13778
13995
  );
13779
- TextareaBase.Skeleton = () => /* @__PURE__ */ React106.createElement(Skeleton, {
13996
+ TextareaBase.Skeleton = () => /* @__PURE__ */ React107.createElement(Skeleton, {
13780
13997
  height: 58
13781
13998
  });
13782
- var Textarea = React106.forwardRef((props, ref) => {
13999
+ var Textarea = React107.forwardRef((props, ref) => {
13783
14000
  var _a, _b, _c;
13784
14001
  const [value, setValue] = useState14((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
13785
- const defaultId = useId16();
14002
+ const defaultId = useId17();
13786
14003
  const id = (_c = props.id) != null ? _c : defaultId;
13787
- const errorMessageId = useId16();
14004
+ const errorMessageId = useId17();
13788
14005
  const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
13789
14006
  const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
13790
- const baseProps = omit15(props, Object.keys(labelControlProps));
13791
- return /* @__PURE__ */ React106.createElement(LabelControl, __spreadProps(__spreadValues({
14007
+ const baseProps = omit16(props, Object.keys(labelControlProps));
14008
+ return /* @__PURE__ */ React107.createElement(LabelControl, __spreadProps(__spreadValues({
13792
14009
  id: `${id}-label`,
13793
14010
  htmlFor: id,
13794
14011
  messageId: errorMessageId,
13795
14012
  length: value !== void 0 ? toString2(value).length : void 0
13796
14013
  }, labelControlProps), {
13797
14014
  className: "Aquarium-Textarea"
13798
- }), /* @__PURE__ */ React106.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
14015
+ }), /* @__PURE__ */ React107.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
13799
14016
  ref
13800
14017
  }, baseProps), errorProps), {
13801
14018
  id,
@@ -13812,48 +14029,48 @@ var Textarea = React106.forwardRef((props, ref) => {
13812
14029
  })));
13813
14030
  });
13814
14031
  Textarea.displayName = "Textarea";
13815
- var TextAreaSkeleton = () => /* @__PURE__ */ React106.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React106.createElement(TextareaBase.Skeleton, null));
14032
+ var TextAreaSkeleton = () => /* @__PURE__ */ React107.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React107.createElement(TextareaBase.Skeleton, null));
13816
14033
  Textarea.Skeleton = TextAreaSkeleton;
13817
14034
  Textarea.Skeleton.displayName = "Textarea.Skeleton";
13818
14035
 
13819
14036
  // src/molecules/Timeline/Timeline.tsx
13820
- import React108 from "react";
14037
+ import React109 from "react";
13821
14038
 
13822
14039
  // src/atoms/Timeline/Timeline.tsx
13823
- import React107 from "react";
14040
+ import React108 from "react";
13824
14041
  var Timeline = (_a) => {
13825
14042
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13826
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14043
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13827
14044
  className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
13828
14045
  }));
13829
14046
  };
13830
14047
  var Content2 = (_a) => {
13831
14048
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13832
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14049
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13833
14050
  className: classNames(tw("pb-6"), className)
13834
14051
  }));
13835
14052
  };
13836
14053
  var Separator2 = (_a) => {
13837
14054
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13838
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14055
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13839
14056
  className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
13840
14057
  }));
13841
14058
  };
13842
14059
  var LineContainer = (_a) => {
13843
14060
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13844
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14061
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13845
14062
  className: classNames(tw("flex justify-center py-1"), className)
13846
14063
  }));
13847
14064
  };
13848
14065
  var Line = (_a) => {
13849
14066
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13850
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14067
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13851
14068
  className: classNames(tw("w-1 bg-grey-5 h-full justify-self-center"), className)
13852
14069
  }));
13853
14070
  };
13854
14071
  var Dot = (_a) => {
13855
14072
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
13856
- return /* @__PURE__ */ React107.createElement("div", __spreadProps(__spreadValues({}, rest), {
14073
+ return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
13857
14074
  className: classNames(tw("bg-grey-30 h-[6px] w-[6px] rounded"), className)
13858
14075
  }));
13859
14076
  };
@@ -13868,54 +14085,54 @@ var import_error5 = __toESM(require_error());
13868
14085
  var import_time2 = __toESM(require_time());
13869
14086
  var import_warningSign5 = __toESM(require_warningSign());
13870
14087
  var TimelineItem = () => null;
13871
- var Timeline2 = ({ children }) => /* @__PURE__ */ React108.createElement("div", {
14088
+ var Timeline2 = ({ children }) => /* @__PURE__ */ React109.createElement("div", {
13872
14089
  className: "Aquarium-Timeline"
13873
- }, React108.Children.map(children, (item) => {
14090
+ }, React109.Children.map(children, (item) => {
13874
14091
  if (!isComponentType(item, TimelineItem)) {
13875
14092
  throw new Error("<Timeline> can only have <Timeline.Item> components as children");
13876
14093
  } else {
13877
14094
  const { props, key } = item;
13878
- return /* @__PURE__ */ React108.createElement(Timeline, {
14095
+ return /* @__PURE__ */ React109.createElement(Timeline, {
13879
14096
  key: key != null ? key : props.title
13880
- }, /* @__PURE__ */ React108.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React108.createElement(Icon, {
14097
+ }, /* @__PURE__ */ React109.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React109.createElement(Icon, {
13881
14098
  icon: import_error5.default,
13882
14099
  color: "error-30"
13883
- }) : props.variant === "warning" ? /* @__PURE__ */ React108.createElement(Icon, {
14100
+ }) : props.variant === "warning" ? /* @__PURE__ */ React109.createElement(Icon, {
13884
14101
  icon: import_warningSign5.default,
13885
14102
  color: "warning-30"
13886
- }) : props.variant === "info" ? /* @__PURE__ */ React108.createElement(Icon, {
14103
+ }) : props.variant === "info" ? /* @__PURE__ */ React109.createElement(Icon, {
13887
14104
  icon: import_time2.default,
13888
14105
  color: "info-30"
13889
- }) : /* @__PURE__ */ React108.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React108.createElement(Typography2.Caption, {
14106
+ }) : /* @__PURE__ */ React109.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React109.createElement(Typography2.Caption, {
13890
14107
  color: "grey-50"
13891
- }, props.title), /* @__PURE__ */ React108.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React108.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React108.createElement(Timeline.Content, null, /* @__PURE__ */ React108.createElement(Typography2.Small, null, props.children)));
14108
+ }, props.title), /* @__PURE__ */ React109.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React109.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React109.createElement(Timeline.Content, null, /* @__PURE__ */ React109.createElement(Typography2.Small, null, props.children)));
13892
14109
  }
13893
14110
  }));
13894
- var TimelineItemSkeleton = () => /* @__PURE__ */ React108.createElement(Timeline, null, /* @__PURE__ */ React108.createElement(Timeline.Separator, null, /* @__PURE__ */ React108.createElement(Skeleton, {
14111
+ var TimelineItemSkeleton = () => /* @__PURE__ */ React109.createElement(Timeline, null, /* @__PURE__ */ React109.createElement(Timeline.Separator, null, /* @__PURE__ */ React109.createElement(Skeleton, {
13895
14112
  width: 6,
13896
14113
  height: 6,
13897
14114
  rounded: true
13898
- })), /* @__PURE__ */ React108.createElement(Skeleton, {
14115
+ })), /* @__PURE__ */ React109.createElement(Skeleton, {
13899
14116
  height: 12,
13900
14117
  width: 120
13901
- }), /* @__PURE__ */ React108.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React108.createElement(Skeleton, {
14118
+ }), /* @__PURE__ */ React109.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React109.createElement(Skeleton, {
13902
14119
  width: 2,
13903
14120
  height: "100%"
13904
- })), /* @__PURE__ */ React108.createElement(Timeline.Content, null, /* @__PURE__ */ React108.createElement(Box, {
14121
+ })), /* @__PURE__ */ React109.createElement(Timeline.Content, null, /* @__PURE__ */ React109.createElement(Box, {
13905
14122
  display: "flex",
13906
14123
  flexDirection: "column",
13907
14124
  gap: "3"
13908
- }, /* @__PURE__ */ React108.createElement(Skeleton, {
14125
+ }, /* @__PURE__ */ React109.createElement(Skeleton, {
13909
14126
  height: 32,
13910
14127
  width: "100%"
13911
- }), /* @__PURE__ */ React108.createElement(Skeleton, {
14128
+ }), /* @__PURE__ */ React109.createElement(Skeleton, {
13912
14129
  height: 32,
13913
14130
  width: "73%"
13914
- }), /* @__PURE__ */ React108.createElement(Skeleton, {
14131
+ }), /* @__PURE__ */ React109.createElement(Skeleton, {
13915
14132
  height: 32,
13916
14133
  width: "80%"
13917
14134
  }))));
13918
- var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React108.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React108.createElement(TimelineItemSkeleton, {
14135
+ var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React109.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React109.createElement(TimelineItemSkeleton, {
13919
14136
  key
13920
14137
  })));
13921
14138
  Timeline2.Item = TimelineItem;
@@ -13923,9 +14140,9 @@ Timeline2.Skeleton = TimelineSkeleton;
13923
14140
  Timeline2.Skeleton.displayName = "Timeline.Skeleton";
13924
14141
 
13925
14142
  // src/utils/table/useTableSelect.ts
13926
- import React109 from "react";
14143
+ import React110 from "react";
13927
14144
  var useTableSelect = (data, { key }) => {
13928
- const [selected, setSelected] = React109.useState([]);
14145
+ const [selected, setSelected] = React110.useState([]);
13929
14146
  const allSelected = selected.length === data.length;
13930
14147
  const isSelected = (dot) => selected.includes(dot[key]);
13931
14148
  const selectAll = () => setSelected(data.map((dot) => dot[key]));
@@ -14096,6 +14313,7 @@ export {
14096
14313
  DesignSystemContext,
14097
14314
  Dialog,
14098
14315
  Divider2 as Divider,
14316
+ Drawer,
14099
14317
  Dropdown,
14100
14318
  DropdownButton,
14101
14319
  DropdownMenu2 as DropdownMenu,
@@ -14199,6 +14417,7 @@ export {
14199
14417
  createTabsComponent,
14200
14418
  system_default as default,
14201
14419
  getLabelControlProps,
14420
+ isOnSortChangedDirection,
14202
14421
  isOutOfBounds,
14203
14422
  placementOrder,
14204
14423
  export_theme as theme,