@aivenio/aquarium 1.60.1 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_variables.scss +4 -1
- package/dist/atoms.cjs +548 -292
- package/dist/atoms.mjs +547 -292
- package/dist/charts.cjs +56 -28
- package/dist/charts.mjs +52 -28
- package/dist/src/atoms/Alert/Alert.d.ts +5 -4
- package/dist/src/atoms/Alert/Alert.js +7 -1
- package/dist/src/atoms/Banner/Banner.js +2 -2
- package/dist/src/atoms/Card/Card.js +2 -2
- package/dist/src/atoms/Checkbox/Checkbox.js +6 -6
- package/dist/src/atoms/DataList/DataList.d.ts +14 -0
- package/dist/src/atoms/DataList/DataList.js +31 -3
- package/dist/src/atoms/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/src/atoms/Navigation/Navigation.js +2 -2
- package/dist/src/atoms/Popover/Popover.js +1 -1
- package/dist/src/atoms/RadioButton/RadioButton.js +4 -4
- package/dist/src/atoms/Select/Select.js +6 -6
- package/dist/src/atoms/Stepper/Stepper.js +1 -1
- package/dist/src/atoms/Table/Table.js +2 -2
- package/dist/src/atoms/Typography/Typography.d.ts +1 -1
- package/dist/src/atoms/Typography/Typography.js +1 -1
- package/dist/src/atoms/index.d.ts +1 -0
- package/dist/src/atoms/index.js +2 -1
- package/dist/src/charts/AreaChart/AreaChart.js +5 -10
- package/dist/src/charts/BarChart/BarChart.js +3 -14
- package/dist/src/charts/Label/Label.js +4 -3
- package/dist/src/charts/LineChart/LineChart.js +5 -10
- package/dist/src/charts/lib/utils.d.ts +9 -0
- package/dist/src/charts/lib/utils.js +15 -1
- package/dist/src/icons/faceHappy.d.ts +9 -0
- package/dist/src/icons/faceHappy.js +11 -0
- package/dist/src/icons/faceSad.d.ts +9 -0
- package/dist/src/icons/faceSad.js +11 -0
- package/dist/src/icons/grid.d.ts +9 -0
- package/dist/src/icons/grid.js +11 -0
- package/dist/src/icons/index.d.ts +4 -0
- package/dist/src/icons/index.js +5 -1
- package/dist/src/icons/table.d.ts +9 -0
- package/dist/src/icons/table.js +11 -0
- package/dist/src/molecules/Alert/Alert.d.ts +4 -2
- package/dist/src/molecules/Alert/Alert.js +1 -1
- package/dist/src/molecules/Button/Button.d.ts +12 -0
- package/dist/src/molecules/Button/Button.js +9 -6
- package/dist/src/molecules/ChoiceChip/ChoiceChip.js +1 -1
- package/dist/src/molecules/Combobox/Combobox.d.ts +2 -1
- package/dist/src/molecules/Combobox/Combobox.js +6 -3
- package/dist/src/molecules/DataList/DataList.d.ts +39 -4
- package/dist/src/molecules/DataList/DataList.js +76 -27
- package/dist/src/molecules/DataList/DataListComponents.d.ts +2 -1
- package/dist/src/molecules/DataList/DataListComponents.js +5 -4
- package/dist/src/molecules/DataList/DataListContext.d.ts +8 -0
- package/dist/src/molecules/DataList/DataListContext.js +13 -0
- package/dist/src/molecules/DataList/DataListToolbar.d.ts +25 -0
- package/dist/src/molecules/DataList/DataListToolbar.js +32 -0
- package/dist/src/molecules/DataTable/DataTable.js +3 -2
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/src/molecules/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/src/molecules/MultiSelect/MultiSelect.js +1 -1
- package/dist/src/molecules/NativeSelect/NativeSelect.js +2 -2
- package/dist/src/molecules/PageHeader/PageHeader.js +3 -2
- package/dist/src/molecules/Section/Section.js +3 -2
- package/dist/src/molecules/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/src/molecules/Tabs/Tabs.js +5 -5
- package/dist/src/utils/constants.js +2 -2
- package/dist/src/utils/table/types.d.ts +2 -1
- package/dist/src/utils/table/types.js +1 -1
- package/dist/styles.css +40 -27
- package/dist/system.cjs +846 -595
- package/dist/system.mjs +761 -510
- package/dist/tailwind.config.js +5 -0
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/ContextualMenu.d.ts +2 -0
- package/dist/types/ContextualMenu.js +2 -2
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
@@ -2388,6 +2388,38 @@ var require_eyeOpen = __commonJS({
|
|
2388
2388
|
}
|
2389
2389
|
});
|
2390
2390
|
|
2391
|
+
// src/icons/faceHappy.js
|
2392
|
+
var require_faceHappy = __commonJS({
|
2393
|
+
"src/icons/faceHappy.js"(exports) {
|
2394
|
+
"use strict";
|
2395
|
+
var data = {
|
2396
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.5 13s1.375 1.833 3.667 1.833c2.291 0 3.666-1.833 3.666-1.833m-.916-4.583h.009m-5.51 0h.01m11.907 2.75a9.167 9.167 0 11-18.333 0 9.167 9.167 0 0118.333 0Zm-5.958-2.75a.458.458 0 11-.917 0 .458.458 0 01.917 0Zm-5.5 0a.458.458 0 11-.917 0 .458.458 0 01.917 0Z"/>',
|
2397
|
+
"left": 0,
|
2398
|
+
"top": 0,
|
2399
|
+
"width": 22,
|
2400
|
+
"height": 22
|
2401
|
+
};
|
2402
|
+
exports.__esModule = true;
|
2403
|
+
exports.default = data;
|
2404
|
+
}
|
2405
|
+
});
|
2406
|
+
|
2407
|
+
// src/icons/faceSad.js
|
2408
|
+
var require_faceSad = __commonJS({
|
2409
|
+
"src/icons/faceSad.js"(exports) {
|
2410
|
+
"use strict";
|
2411
|
+
var data = {
|
2412
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.833 14.833S13.458 13 11.167 13C8.875 13 7.5 14.833 7.5 14.833m8.25-6.196c-.362.444-.857.696-1.375.696s-1-.252-1.375-.696m-3.667 0c-.362.444-.857.696-1.375.696s-.999-.252-1.375-.696m13.75 2.53a9.167 9.167 0 11-18.333 0 9.167 9.167 0 0118.333 0Z"/>',
|
2413
|
+
"left": 0,
|
2414
|
+
"top": 0,
|
2415
|
+
"width": 22,
|
2416
|
+
"height": 22
|
2417
|
+
};
|
2418
|
+
exports.__esModule = true;
|
2419
|
+
exports.default = data;
|
2420
|
+
}
|
2421
|
+
});
|
2422
|
+
|
2391
2423
|
// src/icons/filter.js
|
2392
2424
|
var require_filter = __commonJS({
|
2393
2425
|
"src/icons/filter.js"(exports) {
|
@@ -2676,6 +2708,22 @@ var require_googleLogo = __commonJS({
|
|
2676
2708
|
}
|
2677
2709
|
});
|
2678
2710
|
|
2711
|
+
// src/icons/grid.js
|
2712
|
+
var require_grid = __commonJS({
|
2713
|
+
"src/icons/grid.js"(exports) {
|
2714
|
+
"use strict";
|
2715
|
+
var data = {
|
2716
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.7 2.75H4.217c-.514 0-.77 0-.966.1a.917.917 0 00-.401.4c-.1.197-.1.453-.1.967V7.7c0 .513 0 .77.1.966a.917.917 0 00.4.4c.197.1.453.1.967.1H7.7c.513 0 .77 0 .966-.1a.917.917 0 00.4-.4c.1-.196.1-.453.1-.966V4.217c0-.514 0-.77-.1-.966a.917.917 0 00-.4-.401c-.196-.1-.453-.1-.966-.1Zm10.083 0H14.3c-.513 0-.77 0-.966.1a.917.917 0 00-.4.4c-.1.197-.1.453-.1.967V7.7c0 .513 0 .77.1.966a.917.917 0 00.4.4c.196.1.453.1.966.1h3.483c.514 0 .77 0 .966-.1a.917.917 0 00.401-.4c.1-.196.1-.453.1-.966V4.217c0-.514 0-.77-.1-.966a.917.917 0 00-.4-.401c-.197-.1-.453-.1-.967-.1Zm0 10.083H14.3c-.513 0-.77 0-.966.1a.918.918 0 00-.4.4c-.1.197-.1.454-.1.967v3.483c0 .514 0 .77.1.966a.917.917 0 00.4.401c.196.1.453.1.966.1h3.483c.514 0 .77 0 .966-.1a.917.917 0 00.401-.4c.1-.197.1-.453.1-.967V14.3c0-.513 0-.77-.1-.966a.917.917 0 00-.4-.4c-.197-.1-.453-.1-.967-.1Zm-10.083 0H4.217c-.514 0-.77 0-.966.1a.917.917 0 00-.401.4c-.1.197-.1.454-.1.967v3.483c0 .514 0 .77.1.966a.917.917 0 00.4.401c.197.1.453.1.967.1H7.7c.513 0 .77 0 .966-.1a.917.917 0 00.4-.4c.1-.197.1-.453.1-.967V14.3c0-.513 0-.77-.1-.966a.917.917 0 00-.4-.4c-.196-.1-.453-.1-.966-.1Z"/>',
|
2717
|
+
"left": 0,
|
2718
|
+
"top": 0,
|
2719
|
+
"width": 22,
|
2720
|
+
"height": 22
|
2721
|
+
};
|
2722
|
+
exports.__esModule = true;
|
2723
|
+
exports.default = data;
|
2724
|
+
}
|
2725
|
+
});
|
2726
|
+
|
2679
2727
|
// src/icons/groupedBarChart.js
|
2680
2728
|
var require_groupedBarChart = __commonJS({
|
2681
2729
|
"src/icons/groupedBarChart.js"(exports) {
|
@@ -4356,6 +4404,22 @@ var require_swapVertical = __commonJS({
|
|
4356
4404
|
}
|
4357
4405
|
});
|
4358
4406
|
|
4407
|
+
// src/icons/table.js
|
4408
|
+
var require_table = __commonJS({
|
4409
|
+
"src/icons/table.js"(exports) {
|
4410
|
+
"use strict";
|
4411
|
+
var data = {
|
4412
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.75 8.25h16.5m-11-5.5v16.5m-1.1-16.5h7.7c1.54 0 2.31 0 2.899.3a2.75 2.75 0 011.201 1.202c.3.588.3 1.358.3 2.898v7.7c0 1.54 0 2.31-.3 2.899a2.751 2.751 0 01-1.201 1.201c-.589.3-1.359.3-2.899.3h-7.7c-1.54 0-2.31 0-2.898-.3a2.75 2.75 0 01-1.202-1.2c-.3-.589-.3-1.359-.3-2.899v-7.7c0-1.54 0-2.31.3-2.898A2.75 2.75 0 014.252 3.05c.588-.3 1.358-.3 2.898-.3Z"/>',
|
4413
|
+
"left": 0,
|
4414
|
+
"top": 0,
|
4415
|
+
"width": 22,
|
4416
|
+
"height": 22
|
4417
|
+
};
|
4418
|
+
exports.__esModule = true;
|
4419
|
+
exports.default = data;
|
4420
|
+
}
|
4421
|
+
});
|
4422
|
+
|
4359
4423
|
// src/icons/tag.js
|
4360
4424
|
var require_tag = __commonJS({
|
4361
4425
|
"src/icons/tag.js"(exports) {
|
@@ -4874,12 +4938,12 @@ var InputContainer = React2.forwardRef(
|
|
4874
4938
|
{
|
4875
4939
|
"border px-3 py-[6px]": variant !== "readOnly",
|
4876
4940
|
"cursor-default": variant === "readOnly",
|
4877
|
-
"border-
|
4941
|
+
"border-default": variant !== "error" && variant !== "readOnly",
|
4878
4942
|
"border-error-50": variant === "error",
|
4879
|
-
"hover:border-
|
4943
|
+
"hover:border-intense": variant !== "error" && variant !== "disabled" && variant !== "focused",
|
4880
4944
|
"border-info-70": variant === "focused",
|
4881
4945
|
"bg-white": variant !== "disabled",
|
4882
|
-
"cursor-not-allowed border-
|
4946
|
+
"cursor-not-allowed border-default bg-grey-5": variant === "disabled"
|
4883
4947
|
}
|
4884
4948
|
)
|
4885
4949
|
}, props));
|
@@ -4925,11 +4989,11 @@ var EmptyStateContainer = React2.forwardRef((_a, ref) => {
|
|
4925
4989
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
4926
4990
|
return /* @__PURE__ */ React2.createElement("li", __spreadValues({
|
4927
4991
|
ref,
|
4928
|
-
className: tw("border border-dashed border-
|
4992
|
+
className: tw("border border-dashed border-default m-4 p-6")
|
4929
4993
|
}, props), children);
|
4930
4994
|
});
|
4931
4995
|
var Divider = (props) => /* @__PURE__ */ React2.createElement("div", __spreadValues({
|
4932
|
-
className: tw("border-b-[1px] border-
|
4996
|
+
className: tw("border-b-[1px] border-muted mx-3 my-4")
|
4933
4997
|
}, props));
|
4934
4998
|
var Group = React2.forwardRef((_a, ref) => {
|
4935
4999
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
@@ -5994,6 +6058,8 @@ var import_expandAll = __toESM(require_expandAll());
|
|
5994
6058
|
var import_export = __toESM(require_export());
|
5995
6059
|
var import_eyeOff = __toESM(require_eyeOff());
|
5996
6060
|
var import_eyeOpen = __toESM(require_eyeOpen());
|
6061
|
+
var import_faceHappy = __toESM(require_faceHappy());
|
6062
|
+
var import_faceSad = __toESM(require_faceSad());
|
5997
6063
|
var import_filter = __toESM(require_filter());
|
5998
6064
|
var import_flag = __toESM(require_flag());
|
5999
6065
|
var import_floppyDisk = __toESM(require_floppyDisk());
|
@@ -6012,6 +6078,7 @@ var import_githubLogo = __toESM(require_githubLogo());
|
|
6012
6078
|
var import_globeNetwork = __toESM(require_globeNetwork());
|
6013
6079
|
var import_globe = __toESM(require_globe());
|
6014
6080
|
var import_googleLogo = __toESM(require_googleLogo());
|
6081
|
+
var import_grid = __toESM(require_grid());
|
6015
6082
|
var import_groupedBarChart = __toESM(require_groupedBarChart());
|
6016
6083
|
var import_heart = __toESM(require_heart());
|
6017
6084
|
var import_help = __toESM(require_help());
|
@@ -6118,6 +6185,7 @@ var import_stopwatch = __toESM(require_stopwatch());
|
|
6118
6185
|
var import_superadmin = __toESM(require_superadmin());
|
6119
6186
|
var import_swapHorizontal = __toESM(require_swapHorizontal());
|
6120
6187
|
var import_swapVertical = __toESM(require_swapVertical());
|
6188
|
+
var import_table = __toESM(require_table());
|
6121
6189
|
var import_tag = __toESM(require_tag());
|
6122
6190
|
var import_terraform = __toESM(require_terraform());
|
6123
6191
|
var import_thumbsDown = __toESM(require_thumbsDown());
|
@@ -6736,12 +6804,12 @@ var Arrow = (props) => {
|
|
6736
6804
|
|
6737
6805
|
// src/utils/constants.ts
|
6738
6806
|
var getCommonInputStyles = ({ readOnly, valid }) => tw(
|
6739
|
-
"block w-full rounded-sm disabled:cursor-not-allowed disabled:border-
|
6807
|
+
"block w-full rounded-sm disabled:cursor-not-allowed disabled:border-default disabled:bg-grey-5 typography-small text-default disabled:text-muted placeholder:text-muted focus:outline-none",
|
6740
6808
|
{
|
6741
6809
|
"px-3 py-3": !readOnly,
|
6742
6810
|
"border-none resize-none cursor-default": readOnly,
|
6743
6811
|
"border border-error-50": !valid && !readOnly,
|
6744
|
-
"border border-
|
6812
|
+
"border border-default hover:border-intense focus:border-info-70": valid && !readOnly
|
6745
6813
|
}
|
6746
6814
|
);
|
6747
6815
|
var ghostButtonStyle = tw(
|
@@ -6824,8 +6892,8 @@ var asButton = (Component, isDropdownButton) => {
|
|
6824
6892
|
'Please provide an accessible name as a string only for an icon only button via "aria-label" or "tooltip" prop.'
|
6825
6893
|
);
|
6826
6894
|
}
|
6827
|
-
if (!!isDropdownButton &&
|
6828
|
-
throw new Error('Dropdown button is available only for "primary" and "
|
6895
|
+
if (!!isDropdownButton && !["primary", "secondary", "ghost"].includes(kind)) {
|
6896
|
+
throw new Error('Dropdown button is available only for "primary", "secondary" and "ghost" kinds.');
|
6829
6897
|
}
|
6830
6898
|
if (!!isDropdownButton && !!icon) {
|
6831
6899
|
throw new Error("Dropdown button doesn't support any icon prop.");
|
@@ -6834,9 +6902,9 @@ var asButton = (Component, isDropdownButton) => {
|
|
6834
6902
|
throw new Error('Loading button is only supported for "primary" and "secondary" kinds.');
|
6835
6903
|
}
|
6836
6904
|
const buttonContent = () => {
|
6837
|
-
if (!!isDropdownButton && (kind === "primary" || kind === "secondary")) {
|
6905
|
+
if (!!isDropdownButton && (kind === "primary" || kind === "secondary" || kind === "ghost")) {
|
6838
6906
|
return /* @__PURE__ */ React15.createElement(Flexbox, {
|
6839
|
-
gap: "4",
|
6907
|
+
gap: dense ? "2" : "4",
|
6840
6908
|
alignItems: "center",
|
6841
6909
|
justifyContent: "center"
|
6842
6910
|
}, hasChildren && /* @__PURE__ */ React15.createElement("div", null, children), /* @__PURE__ */ React15.createElement(InlineIcon, {
|
@@ -6846,7 +6914,7 @@ var asButton = (Component, isDropdownButton) => {
|
|
6846
6914
|
}));
|
6847
6915
|
} else if (icon) {
|
6848
6916
|
return /* @__PURE__ */ React15.createElement(Flexbox, {
|
6849
|
-
gap: "3",
|
6917
|
+
gap: dense ? "2" : "3",
|
6850
6918
|
alignItems: "center",
|
6851
6919
|
justifyContent: "center",
|
6852
6920
|
direction: iconPlacement === "right" ? "row-reverse" : "row"
|
@@ -6980,6 +7048,13 @@ var SecondaryDropdownButton = React15.forwardRef((props, ref) => /* @__PURE__ */
|
|
6980
7048
|
})));
|
6981
7049
|
SecondaryDropdownButton.displayName = "Button.SecondaryDropdown";
|
6982
7050
|
Button.SecondaryDropdown = SecondaryDropdownButton;
|
7051
|
+
var GhostDropdownButton = React15.forwardRef((props, ref) => /* @__PURE__ */ React15.createElement(DropdownButton, __spreadProps(__spreadValues({
|
7052
|
+
ref
|
7053
|
+
}, props), {
|
7054
|
+
kind: "ghost"
|
7055
|
+
})));
|
7056
|
+
GhostDropdownButton.displayName = "Button.GhostDropdownButton";
|
7057
|
+
Button.GhostDropdown = GhostDropdownButton;
|
6983
7058
|
|
6984
7059
|
// src/molecules/Typography/Typography.tsx
|
6985
7060
|
import React17 from "react";
|
@@ -7010,7 +7085,7 @@ var Typography = (_a) => {
|
|
7010
7085
|
"fontWeight"
|
7011
7086
|
]);
|
7012
7087
|
const HtmlElement = htmlTag;
|
7013
|
-
const resolvedColorName = isUndefined6(color) || color === "current" ? "
|
7088
|
+
const resolvedColorName = isUndefined6(color) || color === "current" ? "default" : color;
|
7014
7089
|
const style = useStyle({ fontWeight });
|
7015
7090
|
return /* @__PURE__ */ React16.createElement(HtmlElement, __spreadValues({
|
7016
7091
|
className: classNames(typographies[variant], `text-${resolvedColorName}`, className),
|
@@ -7160,12 +7235,17 @@ Typography2.SmallTextBold.displayName = "Typography.SmallTextBold";
|
|
7160
7235
|
// src/atoms/Alert/Alert.tsx
|
7161
7236
|
import React18 from "react";
|
7162
7237
|
import { useId } from "@react-aria/utils";
|
7238
|
+
var import_announcement2 = __toESM(require_announcement());
|
7163
7239
|
var import_cross2 = __toESM(require_cross());
|
7164
7240
|
var import_error2 = __toESM(require_error());
|
7165
7241
|
var import_infoSign2 = __toESM(require_infoSign());
|
7166
7242
|
var import_tickCircle2 = __toESM(require_tickCircle());
|
7167
7243
|
var import_warningSign2 = __toESM(require_warningSign());
|
7168
7244
|
var alertTypes = {
|
7245
|
+
announcement: {
|
7246
|
+
icon: import_announcement2.default,
|
7247
|
+
color: "primary-80"
|
7248
|
+
},
|
7169
7249
|
information: {
|
7170
7250
|
icon: import_infoSign2.default,
|
7171
7251
|
color: "info-70"
|
@@ -7203,6 +7283,7 @@ var Alert = (_a) => {
|
|
7203
7283
|
"bg-info-10": type === "information",
|
7204
7284
|
"bg-success-5": type === "success",
|
7205
7285
|
"bg-warning-5": type === "warning",
|
7286
|
+
"bg-primary-10": type === "announcement",
|
7206
7287
|
"p-4": Boolean(dense),
|
7207
7288
|
"p-5": !dense
|
7208
7289
|
}),
|
@@ -7588,7 +7669,7 @@ var Banner3 = (_a) => {
|
|
7588
7669
|
tw(`rounded flex justify-between gap-7 flex-nowrap ${spacing.spacingAroundBanner}`, {
|
7589
7670
|
"items-center": layout === "horizontal",
|
7590
7671
|
"bg-grey-0": variant === "default",
|
7591
|
-
"bg-white border border-
|
7672
|
+
"bg-white border border-muted": variant === "outlined"
|
7592
7673
|
})
|
7593
7674
|
)
|
7594
7675
|
}), children);
|
@@ -7911,7 +7992,7 @@ var getCommonCardStyles = ({
|
|
7911
7992
|
fullWidth = false,
|
7912
7993
|
enableMinWidth = true,
|
7913
7994
|
disabled = false
|
7914
|
-
}) => tw("border-[2px] border-
|
7995
|
+
}) => tw("border-[2px] border-muted rounded-[2px] relative p-5 flex flex-col gap-5 bg-white outline-none transition-all", {
|
7915
7996
|
"w-[280px]": !fullWidth,
|
7916
7997
|
"w-full": fullWidth,
|
7917
7998
|
"min-w-[280px]": fullWidth && enableMinWidth,
|
@@ -8053,8 +8134,8 @@ var Checkbox = React30.forwardRef(
|
|
8053
8134
|
var _b = _a, { id, children, name, disabled = false, readOnly = false, indeterminate = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly", "indeterminate"]);
|
8054
8135
|
return /* @__PURE__ */ React30.createElement("span", {
|
8055
8136
|
className: classNames(tw("inline-flex justify-center items-center self-center relative"), {
|
8056
|
-
"hover:border-
|
8057
|
-
"border-
|
8137
|
+
"hover:border-intense peer-checked:border-primary-80": !disabled,
|
8138
|
+
"border-muted": disabled
|
8058
8139
|
})
|
8059
8140
|
}, /* @__PURE__ */ React30.createElement("input", __spreadProps(__spreadValues({
|
8060
8141
|
id,
|
@@ -8078,11 +8159,11 @@ var Checkbox = React30.forwardRef(
|
|
8078
8159
|
"absolute top-0 right-0",
|
8079
8160
|
"pointer-events-none p-[2px] w-5 h-5",
|
8080
8161
|
"text-transparent [&>path]:stroke-transparent [&>path]:stroke-2",
|
8081
|
-
"rounded-sm border border-
|
8162
|
+
"rounded-sm border border-default peer-focus:border-info-70"
|
8082
8163
|
),
|
8083
8164
|
{
|
8084
|
-
"peer-hover:border-
|
8085
|
-
"border-
|
8165
|
+
"peer-hover:border-intense peer-checked:text-white peer-checked:[&>path]:stroke-white peer-checked:border-primary-80": !disabled,
|
8166
|
+
"border-muted peer-checked:text-primary-10 peer-checked:[&>path]:stroke-primary-10 peer-checked:border-primary-40": disabled
|
8086
8167
|
}
|
8087
8168
|
)
|
8088
8169
|
}));
|
@@ -8103,11 +8184,11 @@ var RadioButton = React31.forwardRef(
|
|
8103
8184
|
className: classNames(
|
8104
8185
|
tw(
|
8105
8186
|
"inline-flex justify-center items-center self-center appearance-none",
|
8106
|
-
"w-5 h-5 p-[3px] rounded-full cursor-pointer border border-
|
8187
|
+
"w-5 h-5 p-[3px] rounded-full cursor-pointer border border-default",
|
8107
8188
|
"outline-none focus:border-info-70 checked:bg-primary-80 checked:shadow-whiteInset",
|
8108
8189
|
{
|
8109
|
-
"hover:border-
|
8110
|
-
"cursor-not-allowed border-
|
8190
|
+
"hover:border-intense checked:border-primary-80": !disabled,
|
8191
|
+
"cursor-not-allowed border-muted bg-grey-0 checked:bg-opacity-40 checked:bg-primary-40 checked:border-primary-40": disabled
|
8111
8192
|
}
|
8112
8193
|
)
|
8113
8194
|
),
|
@@ -9174,7 +9255,7 @@ var ChoiceChip = (_a) => {
|
|
9174
9255
|
className: classNames(
|
9175
9256
|
"Aquarium-ChoiceChip",
|
9176
9257
|
tw("inline-flex items-center border rounded-sm transition whitespace-nowrap cursor-pointer", {
|
9177
|
-
"bg-white border-
|
9258
|
+
"bg-white border-default text-grey-60": !selected,
|
9178
9259
|
"bg-grey-0 border-grey-100 text-grey-100": selected,
|
9179
9260
|
"typography-small py-2 px-3 gap-x-3": !dense,
|
9180
9261
|
"typography-caption py-1 px-2 gap-x-2": Boolean(dense)
|
@@ -9204,7 +9285,7 @@ var PopoverPanel = React49.forwardRef((_a, ref) => {
|
|
9204
9285
|
ref,
|
9205
9286
|
className: classNames(
|
9206
9287
|
className,
|
9207
|
-
tw("rounded-sm shadow-16dp bg-white mt-1 overflow-y-auto flex flex-col border border-
|
9288
|
+
tw("rounded-sm shadow-16dp bg-white mt-1 overflow-y-auto flex flex-col border border-default outline-none")
|
9208
9289
|
)
|
9209
9290
|
}, props), children);
|
9210
9291
|
});
|
@@ -9302,6 +9383,7 @@ var ComboboxBase = (_a) => {
|
|
9302
9383
|
defaultValue,
|
9303
9384
|
value,
|
9304
9385
|
onChange,
|
9386
|
+
onSearchChange,
|
9305
9387
|
children,
|
9306
9388
|
valid = true,
|
9307
9389
|
disabled = false,
|
@@ -9322,6 +9404,7 @@ var ComboboxBase = (_a) => {
|
|
9322
9404
|
"defaultValue",
|
9323
9405
|
"value",
|
9324
9406
|
"onChange",
|
9407
|
+
"onSearchChange",
|
9325
9408
|
"children",
|
9326
9409
|
"valid",
|
9327
9410
|
"disabled",
|
@@ -9377,7 +9460,10 @@ var ComboboxBase = (_a) => {
|
|
9377
9460
|
return changes;
|
9378
9461
|
},
|
9379
9462
|
onSelectedItemChange: (e) => onChange == null ? void 0 : onChange(e.selectedItem),
|
9380
|
-
onInputValueChange: ({ selectedItem: selectedItem2, inputValue: inputValue2 }) =>
|
9463
|
+
onInputValueChange: ({ selectedItem: selectedItem2, inputValue: inputValue2 }) => {
|
9464
|
+
updateInputItems(inputValue2, selectedItem2);
|
9465
|
+
onSearchChange == null ? void 0 : onSearchChange(inputValue2);
|
9466
|
+
}
|
9381
9467
|
});
|
9382
9468
|
const state = {
|
9383
9469
|
isOpen,
|
@@ -9498,7 +9584,8 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React52.crea
|
|
9498
9584
|
}, children);
|
9499
9585
|
|
9500
9586
|
// src/molecules/DataList/DataList.tsx
|
9501
|
-
import
|
9587
|
+
import React71 from "react";
|
9588
|
+
import { useControlledState } from "@react-stately/utils";
|
9502
9589
|
import compact from "lodash/compact";
|
9503
9590
|
import groupBy2 from "lodash/groupBy";
|
9504
9591
|
import isArray3 from "lodash/isArray";
|
@@ -10364,7 +10451,7 @@ var TableBody = (_a) => {
|
|
10364
10451
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10365
10452
|
return /* @__PURE__ */ React62.createElement("tbody", __spreadValues({}, rest), children);
|
10366
10453
|
};
|
10367
|
-
var rowClassNames = tw("children:border-
|
10454
|
+
var rowClassNames = tw("children:border-default group children:last:border-b-0 hover:bg-grey-0");
|
10368
10455
|
var TableRow = (_a) => {
|
10369
10456
|
var _b = _a, { children, className, disabled } = _b, rest = __objRest(_b, ["children", "className", "disabled"]);
|
10370
10457
|
return /* @__PURE__ */ React62.createElement("tr", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
@@ -10383,7 +10470,7 @@ var getBodyCellClassNames = (table = true, stickyColumn) => tw("text-default py-
|
|
10383
10470
|
});
|
10384
10471
|
var getAlignClassNames = (align) => tw({ "text-right": align === "right", "text-center": align === "center" });
|
10385
10472
|
var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
10386
|
-
const common = tw("py-[14px] text-left bg-white border-
|
10473
|
+
const common = tw("py-[14px] text-left bg-white border-intense text-grey-50 font-semibold whitespace-nowrap");
|
10387
10474
|
return sticky ? classNames(
|
10388
10475
|
common,
|
10389
10476
|
tw("sticky top-0", {
|
@@ -10518,7 +10605,7 @@ var Cell = (_a) => {
|
|
10518
10605
|
cellClassNames,
|
10519
10606
|
getBodyCellClassNames(false, stickyColumn),
|
10520
10607
|
getAlignClassNames2(align),
|
10521
|
-
tw("border-
|
10608
|
+
tw("border-default group-last-of-type:border-b-0"),
|
10522
10609
|
className
|
10523
10610
|
)
|
10524
10611
|
}));
|
@@ -10552,7 +10639,7 @@ var SubGroupSpacing = (_a) => {
|
|
10552
10639
|
return /* @__PURE__ */ React63.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
10553
10640
|
"aria-hidden": true,
|
10554
10641
|
className: classNames(
|
10555
|
-
tw("col-span-full h-6 bg-grey-0 border-
|
10642
|
+
tw("col-span-full h-6 bg-grey-0 border-default", { "border-b": Boolean(divider) }),
|
10556
10643
|
className
|
10557
10644
|
)
|
10558
10645
|
}));
|
@@ -10591,6 +10678,49 @@ DataList.SubGroupSpacing = SubGroupSpacing;
|
|
10591
10678
|
DataList.SubGroupSpacing.displayName = "DataList.SubGroupSpacing";
|
10592
10679
|
DataList.Row = Row;
|
10593
10680
|
DataList.Row.displayName = "DataList.Row";
|
10681
|
+
var ToolbarContainer = (_a) => {
|
10682
|
+
var _b = _a, { className, sticky = true } = _b, rest = __objRest(_b, ["className", "sticky"]);
|
10683
|
+
return /* @__PURE__ */ React63.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10684
|
+
role: "row",
|
10685
|
+
className: classNames(
|
10686
|
+
tw("col-span-full flex items-stretch py-4 px-l2 border-b border-default", {
|
10687
|
+
"sticky top-[47px] bg-white z-10": sticky
|
10688
|
+
}),
|
10689
|
+
className
|
10690
|
+
)
|
10691
|
+
}));
|
10692
|
+
};
|
10693
|
+
ToolbarContainer.displayName = "DataList.Toolbar.Container";
|
10694
|
+
var ToolbarGroup = (_a) => {
|
10695
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10696
|
+
return /* @__PURE__ */ React63.createElement("div", __spreadProps(__spreadValues({
|
10697
|
+
role: "cell"
|
10698
|
+
}, rest), {
|
10699
|
+
className: classNames(tw("flex items-center px-l2 border-r-[1px] border-muted last:border-r-0"), className)
|
10700
|
+
}));
|
10701
|
+
};
|
10702
|
+
ToolbarGroup.displayName = "DataList.Toolbar.Group";
|
10703
|
+
var ToolbarSelectionCount = (_a) => {
|
10704
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10705
|
+
return /* @__PURE__ */ React63.createElement(Typography, __spreadValues({
|
10706
|
+
variant: "small",
|
10707
|
+
color: "muted",
|
10708
|
+
className: classNames(tw("whitespace-nowrap"), className)
|
10709
|
+
}, rest));
|
10710
|
+
};
|
10711
|
+
var ToolbarActions = (_a) => {
|
10712
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10713
|
+
return /* @__PURE__ */ React63.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10714
|
+
className: classNames(tw("flex items-center gap-x-5"), className)
|
10715
|
+
}));
|
10716
|
+
};
|
10717
|
+
ToolbarActions.displayName = "DataList.Toolbar.Actions";
|
10718
|
+
DataList.Toolbar = {
|
10719
|
+
Container: ToolbarContainer,
|
10720
|
+
Group: ToolbarGroup,
|
10721
|
+
Actions: ToolbarActions,
|
10722
|
+
SelectionCount: ToolbarSelectionCount
|
10723
|
+
};
|
10594
10724
|
|
10595
10725
|
// src/utils/table/types.ts
|
10596
10726
|
import isArray2 from "lodash/isArray";
|
@@ -10764,7 +10894,7 @@ DropdownMenu.Separator = Separator;
|
|
10764
10894
|
var EmptyStateContainer2 = (_a) => {
|
10765
10895
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
10766
10896
|
return /* @__PURE__ */ React65.createElement("div", __spreadValues({
|
10767
|
-
className: classNames(tw("border border-dashed border-
|
10897
|
+
className: classNames(tw("border border-dashed border-default p-3"), className)
|
10768
10898
|
}, props), children);
|
10769
10899
|
};
|
10770
10900
|
DropdownMenu.EmptyStateContainer = EmptyStateContainer2;
|
@@ -10945,7 +11075,7 @@ var MenuWrapper = (_a) => {
|
|
10945
11075
|
var ItemWrapper = ({ item, state }) => {
|
10946
11076
|
const ref = React66.useRef(null);
|
10947
11077
|
const { menuItemProps, descriptionProps, isSelected, isFocused, isDisabled } = useMenuItem(
|
10948
|
-
{ key: item.key, closeOnSelect: item.props.closeOnSelect },
|
11078
|
+
{ key: item.key, closeOnSelect: item.props.closeOnSelect, ["aria-label"]: item["aria-label"] },
|
10949
11079
|
state,
|
10950
11080
|
ref
|
10951
11081
|
);
|
@@ -11012,6 +11142,9 @@ var renameProperty = (oldProp, newProp, _a) => {
|
|
11012
11142
|
}, rest);
|
11013
11143
|
};
|
11014
11144
|
|
11145
|
+
// types/ContextualMenu.ts
|
11146
|
+
var defaultContextualMenuPlacement = "bottom-right";
|
11147
|
+
|
11015
11148
|
// src/molecules/DataList/DataListComponents.tsx
|
11016
11149
|
var import_more2 = __toESM(require_more());
|
11017
11150
|
var DataListRowMenu = ({
|
@@ -11029,6 +11162,7 @@ var DataListRowMenu = ({
|
|
11029
11162
|
return /* @__PURE__ */ React67.createElement(DataList.Cell, {
|
11030
11163
|
align: "right"
|
11031
11164
|
}, menuContent && /* @__PURE__ */ React67.createElement(DropdownMenu2, {
|
11165
|
+
placement: defaultContextualMenuPlacement,
|
11032
11166
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
11033
11167
|
onOpenChange: onMenuOpenChange
|
11034
11168
|
}, /* @__PURE__ */ React67.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React67.createElement(Button.Icon, {
|
@@ -11045,15 +11179,16 @@ var DataListRow = ({
|
|
11045
11179
|
active,
|
11046
11180
|
disabled,
|
11047
11181
|
renderFirstColumn,
|
11182
|
+
additionalRowProps = () => ({}),
|
11048
11183
|
additionalColumnProps = () => ({})
|
11049
11184
|
}) => {
|
11050
11185
|
var _a;
|
11051
11186
|
const isRowDisabled = (_a = disabled == null ? void 0 : disabled(row, index, rows)) != null ? _a : false;
|
11052
|
-
return /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11187
|
+
return /* @__PURE__ */ React67.createElement(DataList.Row, __spreadValues({
|
11053
11188
|
key: row.id,
|
11054
11189
|
disabled: isRowDisabled,
|
11055
11190
|
active
|
11056
|
-
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React67.createElement(List, {
|
11191
|
+
}, additionalRowProps(row, index, rows)), renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React67.createElement(List, {
|
11057
11192
|
items: columns,
|
11058
11193
|
renderItem: (column, columnIndex) => /* @__PURE__ */ React67.createElement(DataList.Cell, __spreadValues(__spreadValues({}, cellProps(column)), additionalColumnProps(column, columnIndex, columns, row)), /* @__PURE__ */ React67.createElement(DataListCell, {
|
11059
11194
|
column,
|
@@ -11113,6 +11248,20 @@ var DataListCell = ({
|
|
11113
11248
|
return column.tooltip ? /* @__PURE__ */ React67.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : /* @__PURE__ */ React67.createElement(React67.Fragment, null, cellContent);
|
11114
11249
|
};
|
11115
11250
|
|
11251
|
+
// src/molecules/DataList/DataListContext.tsx
|
11252
|
+
import { createContext as createContext3, useContext as useContext6 } from "react";
|
11253
|
+
var DataListContext = createContext3({
|
11254
|
+
rows: [],
|
11255
|
+
selectedRows: void 0
|
11256
|
+
});
|
11257
|
+
var useDataListContext = () => {
|
11258
|
+
const ctx = useContext6(DataListContext);
|
11259
|
+
if (!ctx) {
|
11260
|
+
throw new Error("DataListContext was used outside of provider.");
|
11261
|
+
}
|
11262
|
+
return ctx;
|
11263
|
+
};
|
11264
|
+
|
11116
11265
|
// src/molecules/DataList/DataListGroup.tsx
|
11117
11266
|
import React68 from "react";
|
11118
11267
|
import isFunction2 from "lodash/isFunction";
|
@@ -11261,7 +11410,40 @@ var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
|
11261
11410
|
}));
|
11262
11411
|
};
|
11263
11412
|
|
11413
|
+
// src/molecules/DataList/DataListToolbar.tsx
|
11414
|
+
import React70 from "react";
|
11415
|
+
import castArray from "lodash/castArray";
|
11416
|
+
var DataListToolbar = ({
|
11417
|
+
actions: _actions,
|
11418
|
+
menu,
|
11419
|
+
onAction,
|
11420
|
+
onMenuOpenChange,
|
11421
|
+
menuLabel,
|
11422
|
+
sticky = true
|
11423
|
+
}) => {
|
11424
|
+
var _a;
|
11425
|
+
const { selectedRows, rows } = useDataListContext();
|
11426
|
+
const actions = castArray(_actions).filter(Boolean);
|
11427
|
+
return /* @__PURE__ */ React70.createElement(DataList.Toolbar.Container, {
|
11428
|
+
sticky
|
11429
|
+
}, /* @__PURE__ */ React70.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React70.createElement(DataList.Toolbar.SelectionCount, null, (_a = selectedRows == null ? void 0 : selectedRows.length) != null ? _a : 0, " of ", rows.length, " selected")), actions.length > 0 && /* @__PURE__ */ React70.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React70.createElement(DataList.Toolbar.Actions, null, actions.map(
|
11430
|
+
(action) => renderAction({
|
11431
|
+
kind: "ghost",
|
11432
|
+
dense: true,
|
11433
|
+
action: __spreadProps(__spreadValues({}, action), { onClick: () => action.onClick(selectedRows != null ? selectedRows : []) })
|
11434
|
+
})
|
11435
|
+
))), menu && /* @__PURE__ */ React70.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React70.createElement(DropdownMenu2, {
|
11436
|
+
placement: defaultContextualMenuPlacement,
|
11437
|
+
onAction: (key) => onAction == null ? void 0 : onAction(key, selectedRows != null ? selectedRows : []),
|
11438
|
+
onOpenChange: onMenuOpenChange
|
11439
|
+
}, /* @__PURE__ */ React70.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React70.createElement(Button.GhostDropdown, {
|
11440
|
+
dense: true
|
11441
|
+
}, menuLabel)), menu)));
|
11442
|
+
};
|
11443
|
+
DataListToolbar.displayName = "DataList.Toolbar";
|
11444
|
+
|
11264
11445
|
// src/molecules/DataList/DataList.tsx
|
11446
|
+
var getDefaultCheckboxLabel = () => "Select row";
|
11265
11447
|
var DataList2 = (_a) => {
|
11266
11448
|
var _b = _a, {
|
11267
11449
|
columns,
|
@@ -11281,7 +11463,13 @@ var DataList2 = (_a) => {
|
|
11281
11463
|
onGroupToggled,
|
11282
11464
|
expandedGroupIds,
|
11283
11465
|
defaultSort,
|
11284
|
-
onSortChanged
|
11466
|
+
onSortChanged,
|
11467
|
+
selectable,
|
11468
|
+
getCheckboxLabel = getDefaultCheckboxLabel,
|
11469
|
+
selectedRows,
|
11470
|
+
defaultSelectedRows,
|
11471
|
+
onSelectionChange,
|
11472
|
+
toolbar
|
11285
11473
|
} = _b, rest = __objRest(_b, [
|
11286
11474
|
"columns",
|
11287
11475
|
"rows",
|
@@ -11300,9 +11488,20 @@ var DataList2 = (_a) => {
|
|
11300
11488
|
"onGroupToggled",
|
11301
11489
|
"expandedGroupIds",
|
11302
11490
|
"defaultSort",
|
11303
|
-
"onSortChanged"
|
11491
|
+
"onSortChanged",
|
11492
|
+
"selectable",
|
11493
|
+
"getCheckboxLabel",
|
11494
|
+
"selectedRows",
|
11495
|
+
"defaultSelectedRows",
|
11496
|
+
"onSelectionChange",
|
11497
|
+
"toolbar"
|
11304
11498
|
]);
|
11305
|
-
var _a2;
|
11499
|
+
var _a2, _b2;
|
11500
|
+
const [selected, setSelected] = useControlledState(
|
11501
|
+
selectedRows,
|
11502
|
+
defaultSelectedRows,
|
11503
|
+
(value) => onSelectionChange == null ? void 0 : onSelectionChange(value != null ? value : [])
|
11504
|
+
);
|
11306
11505
|
const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
|
11307
11506
|
const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a2 = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a2 : "ascending" } : void 0;
|
11308
11507
|
const [sort, updateSort] = useTableSort(
|
@@ -11312,6 +11511,7 @@ var DataList2 = (_a) => {
|
|
11312
11511
|
const groups = areRowsGrouped(rows) ? rows : group ? isFunction3(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
|
11313
11512
|
const isCollapsible = isFunction3(rowDetails);
|
11314
11513
|
const templateColumns = compact([
|
11514
|
+
selectable ? "fit-content(28px)" : void 0,
|
11315
11515
|
isCollapsible ? "fit-content(50px)" : void 0,
|
11316
11516
|
...columns.map((column) => {
|
11317
11517
|
var _a3;
|
@@ -11319,51 +11519,82 @@ var DataList2 = (_a) => {
|
|
11319
11519
|
}),
|
11320
11520
|
menu ? "fit-content(28px)" : void 0
|
11321
11521
|
]);
|
11322
|
-
const PaginationFooter =
|
11323
|
-
({ children }) => /* @__PURE__ */
|
11522
|
+
const PaginationFooter = React71.useCallback(
|
11523
|
+
({ children }) => /* @__PURE__ */ React71.createElement("div", {
|
11324
11524
|
style: { gridColumn: "1 / -1" },
|
11325
11525
|
role: "row"
|
11326
|
-
}, /* @__PURE__ */
|
11526
|
+
}, /* @__PURE__ */ React71.createElement("div", {
|
11327
11527
|
role: "cell"
|
11328
11528
|
}, children)),
|
11329
11529
|
[]
|
11330
11530
|
);
|
11331
|
-
|
11531
|
+
const handleSelectionChange = (id) => (e) => {
|
11532
|
+
if (e.target.checked) {
|
11533
|
+
setSelected([...selected != null ? selected : [], id]);
|
11534
|
+
} else {
|
11535
|
+
setSelected(selected == null ? void 0 : selected.filter((_id) => _id !== id));
|
11536
|
+
}
|
11537
|
+
};
|
11538
|
+
const totalSelected = (_b2 = selected == null ? void 0 : selected.length) != null ? _b2 : 0;
|
11539
|
+
const allEnabledRowIds = compact(
|
11540
|
+
sortedRows.map((row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) ? void 0 : row.id)
|
11541
|
+
);
|
11542
|
+
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
11543
|
+
return /* @__PURE__ */ React71.createElement(DataListContext.Provider, {
|
11544
|
+
value: {
|
11545
|
+
rows: sortedRows,
|
11546
|
+
selectedRows: selected
|
11547
|
+
}
|
11548
|
+
}, /* @__PURE__ */ React71.createElement(Template, {
|
11332
11549
|
className: "Aquarium-DataList",
|
11333
11550
|
columns: templateColumns,
|
11334
11551
|
role: "table"
|
11335
|
-
}, !hideHeader && /* @__PURE__ */
|
11552
|
+
}, !hideHeader && /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(DataList.Row, {
|
11336
11553
|
header: true
|
11337
|
-
},
|
11554
|
+
}, selectable && /* @__PURE__ */ React71.createElement(DataList.HeadCell, {
|
11555
|
+
align: "left",
|
11556
|
+
sticky
|
11557
|
+
}, /* @__PURE__ */ React71.createElement(Checkbox, {
|
11558
|
+
"aria-label": "Select all rows",
|
11559
|
+
indeterminate: totalSelected > 0 && totalSelected < sortedRows.length,
|
11560
|
+
checked: totalSelected > 0,
|
11561
|
+
onChange: () => {
|
11562
|
+
if (!allRowsSelected) {
|
11563
|
+
setSelected(allEnabledRowIds);
|
11564
|
+
} else {
|
11565
|
+
setSelected([]);
|
11566
|
+
}
|
11567
|
+
}
|
11568
|
+
})), isCollapsible && /* @__PURE__ */ React71.createElement(DataList.HeadCell, {
|
11338
11569
|
align: "left",
|
11339
11570
|
sticky
|
11340
11571
|
}), columns.map((column) => {
|
11341
|
-
const content = column.headerTooltip ? /* @__PURE__ */
|
11572
|
+
const content = column.headerTooltip ? /* @__PURE__ */ React71.createElement(Tooltip, {
|
11342
11573
|
placement: column.headerTooltip.placement,
|
11343
11574
|
content: column.headerTooltip.content
|
11344
11575
|
}, column.headerName) : column.headerName;
|
11345
|
-
const headerContentAndIcon = column.icon ? /* @__PURE__ */
|
11576
|
+
const headerContentAndIcon = column.icon ? /* @__PURE__ */ React71.createElement(Box.Flex, {
|
11346
11577
|
flexDirection: "row",
|
11347
11578
|
gap: "3",
|
11348
11579
|
alignItems: "center"
|
11349
|
-
}, /* @__PURE__ */
|
11580
|
+
}, /* @__PURE__ */ React71.createElement(InlineIcon, {
|
11350
11581
|
icon: column.icon,
|
11351
11582
|
height: "22",
|
11352
11583
|
color: "grey-70",
|
11353
11584
|
"aria-hidden": true
|
11354
11585
|
}), content) : content;
|
11355
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
11586
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React71.createElement(DataList.SortCell, __spreadValues({
|
11356
11587
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
11357
11588
|
onClick: () => updateSort(column),
|
11358
11589
|
sticky
|
11359
|
-
}, cellProps(column)), headerContentAndIcon) : /* @__PURE__ */
|
11590
|
+
}, cellProps(column)), headerContentAndIcon) : /* @__PURE__ */ React71.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
11360
11591
|
sticky
|
11361
11592
|
}), headerContentAndIcon);
|
11362
|
-
}), menu && /* @__PURE__ */
|
11593
|
+
}), menu && /* @__PURE__ */ React71.createElement(DataList.HeadCell, {
|
11363
11594
|
align: "right",
|
11364
11595
|
"aria-label": menuAriaLabel,
|
11365
11596
|
sticky
|
11366
|
-
}, menuHeaderName)), groups && /* @__PURE__ */
|
11597
|
+
}, menuHeaderName)), toolbar), groups && /* @__PURE__ */ React71.createElement(DataListGroup, {
|
11367
11598
|
columns,
|
11368
11599
|
disabled,
|
11369
11600
|
getGroupRow,
|
@@ -11376,18 +11607,18 @@ var DataList2 = (_a) => {
|
|
11376
11607
|
rows,
|
11377
11608
|
groups,
|
11378
11609
|
level: 0
|
11379
|
-
}), !groups && /* @__PURE__ */
|
11610
|
+
}), !groups && /* @__PURE__ */ React71.createElement(List, __spreadProps(__spreadValues({}, rest), {
|
11380
11611
|
paginationContainer: PaginationFooter,
|
11381
11612
|
items: sortedRows,
|
11382
11613
|
renderItem: (row, index) => {
|
11383
11614
|
const details = rowDetails == null ? void 0 : rowDetails(row, index, sortedRows);
|
11384
|
-
const content = /* @__PURE__ */
|
11615
|
+
const content = /* @__PURE__ */ React71.createElement(DataListRow, {
|
11385
11616
|
key: row.id,
|
11386
11617
|
columns,
|
11387
11618
|
row,
|
11388
11619
|
index,
|
11389
11620
|
rows: sortedRows,
|
11390
|
-
menu: /* @__PURE__ */
|
11621
|
+
menu: /* @__PURE__ */ React71.createElement(DataListRowMenu, {
|
11391
11622
|
row,
|
11392
11623
|
index,
|
11393
11624
|
menu,
|
@@ -11396,43 +11627,60 @@ var DataList2 = (_a) => {
|
|
11396
11627
|
menuAriaLabel
|
11397
11628
|
}),
|
11398
11629
|
disabled,
|
11399
|
-
|
11400
|
-
|
11401
|
-
|
11402
|
-
|
11630
|
+
additionalRowProps: (row2) => {
|
11631
|
+
var _a3;
|
11632
|
+
return selectable ? {
|
11633
|
+
"aria-selected": (_a3 = selected == null ? void 0 : selected.includes(row2.id)) != null ? _a3 : false
|
11634
|
+
} : {};
|
11635
|
+
},
|
11636
|
+
renderFirstColumn: (row2, index2) => {
|
11637
|
+
var _a3;
|
11638
|
+
const isChecked = (_a3 = selected == null ? void 0 : selected.includes(row2.id)) != null ? _a3 : false;
|
11639
|
+
const isDisabled = disabled == null ? void 0 : disabled(row2, index2, sortedRows);
|
11640
|
+
return /* @__PURE__ */ React71.createElement(React71.Fragment, null, selectable && /* @__PURE__ */ React71.createElement(DataList.Cell, null, /* @__PURE__ */ React71.createElement(Checkbox, {
|
11641
|
+
"aria-label": getCheckboxLabel(row2, index2, isChecked, sortedRows),
|
11642
|
+
onChange: handleSelectionChange(row2.id),
|
11643
|
+
checked: isChecked,
|
11644
|
+
disabled: isDisabled
|
11645
|
+
})), rowDetails !== void 0 && /* @__PURE__ */ React71.createElement(DataList.Cell, null, details && /* @__PURE__ */ React71.createElement(Accordion.Toggle, {
|
11646
|
+
panelId: row2.id.toString(),
|
11647
|
+
onChange: onGroupToggled
|
11648
|
+
})));
|
11649
|
+
}
|
11403
11650
|
});
|
11404
11651
|
if (!details) {
|
11405
11652
|
return content;
|
11406
11653
|
}
|
11407
|
-
return /* @__PURE__ */
|
11654
|
+
return /* @__PURE__ */ React71.createElement(Accordion, {
|
11408
11655
|
key: row.id,
|
11409
11656
|
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === row.id) || null : void 0
|
11410
|
-
}, content, /* @__PURE__ */
|
11657
|
+
}, content, /* @__PURE__ */ React71.createElement(Accordion.Panel, {
|
11411
11658
|
role: "row",
|
11412
11659
|
panelId: row.id.toString(),
|
11413
|
-
className: tw("col-span-full bg-grey-0 border-b border-
|
11660
|
+
className: tw("col-span-full bg-grey-0 border-b border-default"),
|
11414
11661
|
"aria-label": `row ${row.id.toString()} details`
|
11415
|
-
}, /* @__PURE__ */
|
11662
|
+
}, /* @__PURE__ */ React71.createElement("div", {
|
11416
11663
|
role: "cell"
|
11417
11664
|
}, details)));
|
11418
11665
|
}
|
11419
|
-
})));
|
11666
|
+
}))));
|
11420
11667
|
};
|
11421
11668
|
DataList2.Skeleton = DataListSkeleton;
|
11669
|
+
DataList2.Toolbar = DataListToolbar;
|
11422
11670
|
|
11423
11671
|
// src/molecules/DataTable/DataTable.tsx
|
11424
|
-
import
|
11672
|
+
import React74 from "react";
|
11425
11673
|
import compact2 from "lodash/compact";
|
11426
11674
|
import isFunction4 from "lodash/isFunction";
|
11427
11675
|
|
11428
11676
|
// src/molecules/Table/Table.tsx
|
11429
|
-
import
|
11677
|
+
import React73 from "react";
|
11430
11678
|
|
11431
11679
|
// src/utils/table/useScrollTarget.ts
|
11432
|
-
import
|
11680
|
+
import React72 from "react";
|
11433
11681
|
var useScrollTarget = (callback) => {
|
11434
|
-
const targetRef =
|
11435
|
-
|
11682
|
+
const targetRef = React72.useRef(null);
|
11683
|
+
React72.useLayoutEffect(() => {
|
11436
11684
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
11437
11685
|
root: null,
|
11438
11686
|
rootMargin: `0px 0px 200px 0px`
|
@@ -11450,12 +11698,12 @@ var Table2 = (_a) => {
|
|
11450
11698
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
11451
11699
|
const bottomRef = useScrollTarget(onNext);
|
11452
11700
|
const topRef = useScrollTarget(onPrev);
|
11453
|
-
return /* @__PURE__ */
|
11701
|
+
return /* @__PURE__ */ React73.createElement("div", {
|
11454
11702
|
className: classNames("Aquarium-Table", tw("relative w-full"))
|
11455
|
-
}, /* @__PURE__ */
|
11703
|
+
}, /* @__PURE__ */ React73.createElement("div", {
|
11456
11704
|
ref: topRef,
|
11457
11705
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
11458
|
-
}), /* @__PURE__ */
|
11706
|
+
}), /* @__PURE__ */ React73.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ React73.createElement("div", {
|
11459
11707
|
ref: bottomRef,
|
11460
11708
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
11461
11709
|
}));
|
@@ -11516,13 +11764,13 @@ var DataTable = (_a) => {
|
|
11516
11764
|
);
|
11517
11765
|
const sortedRows = sortRowsBy(rows, sort);
|
11518
11766
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
11519
|
-
const PaginationFooter =
|
11520
|
-
({ children }) => /* @__PURE__ */
|
11767
|
+
const PaginationFooter = React74.useCallback(
|
11768
|
+
({ children }) => /* @__PURE__ */ React74.createElement("tfoot", null, /* @__PURE__ */ React74.createElement("tr", null, /* @__PURE__ */ React74.createElement("td", {
|
11521
11769
|
colSpan: amountOfColumns
|
11522
11770
|
}, children))),
|
11523
11771
|
[amountOfColumns]
|
11524
11772
|
);
|
11525
|
-
return /* @__PURE__ */
|
11773
|
+
return /* @__PURE__ */ React74.createElement(Table2, {
|
11526
11774
|
ariaLabel,
|
11527
11775
|
onNext,
|
11528
11776
|
onPrev,
|
@@ -11534,40 +11782,40 @@ var DataTable = (_a) => {
|
|
11534
11782
|
"table-fixed": layout === "fixed"
|
11535
11783
|
})
|
11536
11784
|
)
|
11537
|
-
}, /* @__PURE__ */
|
11785
|
+
}, /* @__PURE__ */ React74.createElement(Table2.Head, {
|
11538
11786
|
sticky
|
11539
11787
|
}, compact2([
|
11540
11788
|
...columns.map((column) => {
|
11541
|
-
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */
|
11789
|
+
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */ React74.createElement(Tooltip, {
|
11542
11790
|
placement: column.headerTooltip.placement,
|
11543
11791
|
content: column.headerTooltip.content
|
11544
11792
|
}, column.headerName) : !column.headerInvisible && column.headerName;
|
11545
|
-
const headerContentAndIcon = !column.headerInvisible && column.icon ? /* @__PURE__ */
|
11793
|
+
const headerContentAndIcon = !column.headerInvisible && column.icon ? /* @__PURE__ */ React74.createElement(Box.Flex, {
|
11546
11794
|
flexDirection: "row",
|
11547
11795
|
gap: "3",
|
11548
11796
|
alignItems: "center"
|
11549
|
-
}, /* @__PURE__ */
|
11797
|
+
}, /* @__PURE__ */ React74.createElement(InlineIcon, {
|
11550
11798
|
icon: column.icon,
|
11551
11799
|
height: "22",
|
11552
11800
|
color: "grey-70",
|
11553
11801
|
"aria-hidden": true
|
11554
11802
|
}), content) : content;
|
11555
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
11803
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React74.createElement(Table2.SortCell, __spreadValues({
|
11556
11804
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
11557
11805
|
onClick: () => updateSort(column),
|
11558
11806
|
style: { width: column.width },
|
11559
11807
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
11560
|
-
}, cellProps(column)), headerContentAndIcon) : /* @__PURE__ */
|
11808
|
+
}, cellProps(column)), headerContentAndIcon) : /* @__PURE__ */ React74.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
11561
11809
|
style: { width: column.width },
|
11562
11810
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
11563
11811
|
}), headerContentAndIcon);
|
11564
11812
|
}),
|
11565
|
-
menu ? /* @__PURE__ */
|
11813
|
+
menu ? /* @__PURE__ */ React74.createElement(Table2.Cell, {
|
11566
11814
|
key: "__contextMenu",
|
11567
11815
|
align: "right",
|
11568
11816
|
"aria-label": menuAriaLabel
|
11569
11817
|
}, menuHeaderName) : null
|
11570
|
-
])), /* @__PURE__ */
|
11818
|
+
])), /* @__PURE__ */ React74.createElement(List, __spreadProps(__spreadValues({
|
11571
11819
|
container: Table2.Body,
|
11572
11820
|
paginationContainer: PaginationFooter
|
11573
11821
|
}, rest), {
|
@@ -11575,12 +11823,12 @@ var DataTable = (_a) => {
|
|
11575
11823
|
renderItem: (row, index) => {
|
11576
11824
|
var _a3;
|
11577
11825
|
const isRowDisabled = (_a3 = disabled == null ? void 0 : disabled(row, index, sortedRows)) != null ? _a3 : false;
|
11578
|
-
return /* @__PURE__ */
|
11826
|
+
return /* @__PURE__ */ React74.createElement(Table2.Row, {
|
11579
11827
|
key: row.id,
|
11580
11828
|
disabled: isRowDisabled
|
11581
|
-
}, /* @__PURE__ */
|
11829
|
+
}, /* @__PURE__ */ React74.createElement(List, {
|
11582
11830
|
items: columns,
|
11583
|
-
renderItem: (column) => /* @__PURE__ */
|
11831
|
+
renderItem: (column) => /* @__PURE__ */ React74.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), renderCell(column, row, index, sortedRows))
|
11584
11832
|
}), renderRowMenu(row, index, { menu, menuAriaLabel, onAction, onMenuOpenChange }));
|
11585
11833
|
}
|
11586
11834
|
})));
|
@@ -11593,12 +11841,13 @@ var renderRowMenu = (row, index, {
|
|
11593
11841
|
}) => {
|
11594
11842
|
if (menu) {
|
11595
11843
|
const menuContent = isFunction4(menu) ? menu(row, index) : menu;
|
11596
|
-
return /* @__PURE__ */
|
11844
|
+
return /* @__PURE__ */ React74.createElement(Table2.Cell, {
|
11597
11845
|
align: "right"
|
11598
|
-
}, menuContent && /* @__PURE__ */
|
11846
|
+
}, menuContent && /* @__PURE__ */ React74.createElement(DropdownMenu2, {
|
11847
|
+
placement: defaultContextualMenuPlacement,
|
11599
11848
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
11600
11849
|
onOpenChange: onMenuOpenChange
|
11601
|
-
}, /* @__PURE__ */
|
11850
|
+
}, /* @__PURE__ */ React74.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React74.createElement(Button.Icon, {
|
11602
11851
|
"aria-label": menuAriaLabel,
|
11603
11852
|
icon: import_more3.default
|
11604
11853
|
})), menuContent));
|
@@ -11611,14 +11860,14 @@ var renderCell = (column, row, index, rows) => {
|
|
11611
11860
|
if (column.type === "status") {
|
11612
11861
|
const status = column.status(row, index, rows);
|
11613
11862
|
if (status) {
|
11614
|
-
cellContent = /* @__PURE__ */
|
11863
|
+
cellContent = /* @__PURE__ */ React74.createElement(StatusChip, __spreadValues({
|
11615
11864
|
dense: true
|
11616
11865
|
}, status));
|
11617
11866
|
}
|
11618
11867
|
} else if (column.type === "action") {
|
11619
11868
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
11620
11869
|
if (action) {
|
11621
|
-
cellContent = /* @__PURE__ */
|
11870
|
+
cellContent = /* @__PURE__ */ React74.createElement(Button.Secondary, __spreadValues({
|
11622
11871
|
dense: true
|
11623
11872
|
}, action));
|
11624
11873
|
}
|
@@ -11627,19 +11876,19 @@ var renderCell = (column, row, index, rows) => {
|
|
11627
11876
|
} else if (column.type === "item") {
|
11628
11877
|
const item = column.item(row, index, rows);
|
11629
11878
|
if (item) {
|
11630
|
-
cellContent = /* @__PURE__ */
|
11879
|
+
cellContent = /* @__PURE__ */ React74.createElement(Item2, __spreadValues({}, item));
|
11631
11880
|
}
|
11632
11881
|
} else if (column.formatter) {
|
11633
11882
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
11634
11883
|
} else {
|
11635
11884
|
cellContent = row[column.field];
|
11636
11885
|
}
|
11637
|
-
return column.tooltip ? /* @__PURE__ */
|
11886
|
+
return column.tooltip ? /* @__PURE__ */ React74.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
11638
11887
|
};
|
11639
11888
|
DataTable.Skeleton = DataListSkeleton;
|
11640
11889
|
|
11641
11890
|
// src/molecules/Dialog/Dialog.tsx
|
11642
|
-
import
|
11891
|
+
import React76 from "react";
|
11643
11892
|
import { useDialog } from "@react-aria/dialog";
|
11644
11893
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
11645
11894
|
import { useId as useId9 } from "@react-aria/utils";
|
@@ -11666,7 +11915,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
11666
11915
|
};
|
11667
11916
|
|
11668
11917
|
// src/atoms/Modal/Modal.tsx
|
11669
|
-
import
|
11918
|
+
import React75 from "react";
|
11670
11919
|
var Modal = (_a) => {
|
11671
11920
|
var _b = _a, {
|
11672
11921
|
children,
|
@@ -11679,7 +11928,7 @@ var Modal = (_a) => {
|
|
11679
11928
|
"className",
|
11680
11929
|
"open"
|
11681
11930
|
]);
|
11682
|
-
return open ? /* @__PURE__ */
|
11931
|
+
return open ? /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11683
11932
|
className: classNames(
|
11684
11933
|
tw("inset-0 overflow-y-auto z-modal fixed"),
|
11685
11934
|
{
|
@@ -11691,11 +11940,11 @@ var Modal = (_a) => {
|
|
11691
11940
|
};
|
11692
11941
|
Modal.BackDrop = (_a) => {
|
11693
11942
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
11694
|
-
return /* @__PURE__ */
|
11943
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11695
11944
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-primary-100 opacity-60"), className)
|
11696
11945
|
}));
|
11697
11946
|
};
|
11698
|
-
Modal.Dialog =
|
11947
|
+
Modal.Dialog = React75.forwardRef(
|
11699
11948
|
(_a, ref) => {
|
11700
11949
|
var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
11701
11950
|
const commonClasses = tw("bg-white max-h-full flex flex-col");
|
@@ -11709,7 +11958,7 @@ Modal.Dialog = React74.forwardRef(
|
|
11709
11958
|
"w-[560px]": size === "md",
|
11710
11959
|
"w-[1080px]": size === "full"
|
11711
11960
|
});
|
11712
|
-
return /* @__PURE__ */
|
11961
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({
|
11713
11962
|
ref,
|
11714
11963
|
"aria-modal": "true"
|
11715
11964
|
}, rest), {
|
@@ -11719,31 +11968,31 @@ Modal.Dialog = React74.forwardRef(
|
|
11719
11968
|
);
|
11720
11969
|
Modal.Header = (_a) => {
|
11721
11970
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11722
|
-
return /* @__PURE__ */
|
11971
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11723
11972
|
className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
|
11724
11973
|
}), children);
|
11725
11974
|
};
|
11726
11975
|
Modal.HeaderImage = (_a) => {
|
11727
11976
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
11728
11977
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
11729
|
-
return backgroundImage ? /* @__PURE__ */
|
11978
|
+
return backgroundImage ? /* @__PURE__ */ React75.createElement("img", __spreadProps(__spreadValues({
|
11730
11979
|
"aria-hidden": true,
|
11731
11980
|
src: backgroundImage != null ? backgroundImage : void 0
|
11732
11981
|
}, rest), {
|
11733
11982
|
className: classNames(common, tw("object-cover"), className)
|
11734
|
-
})) : /* @__PURE__ */
|
11983
|
+
})) : /* @__PURE__ */ React75.createElement("div", {
|
11735
11984
|
className: classNames(common, tw("bg-grey-5"), className)
|
11736
11985
|
});
|
11737
11986
|
};
|
11738
11987
|
Modal.CloseButtonContainer = (_a) => {
|
11739
11988
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
11740
|
-
return /* @__PURE__ */
|
11989
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11741
11990
|
className: classNames(tw("absolute top-[24px] right-[28px]"), className)
|
11742
11991
|
}));
|
11743
11992
|
};
|
11744
11993
|
Modal.Title = (_a) => {
|
11745
11994
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
11746
|
-
return /* @__PURE__ */
|
11995
|
+
return /* @__PURE__ */ React75.createElement(Typography, __spreadValues({
|
11747
11996
|
htmlTag: "h2",
|
11748
11997
|
variant: "subheading",
|
11749
11998
|
color: "grey-90",
|
@@ -11757,52 +12006,52 @@ Modal.Title = (_a) => {
|
|
11757
12006
|
};
|
11758
12007
|
Modal.Subtitle = (_a) => {
|
11759
12008
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
11760
|
-
return /* @__PURE__ */
|
12009
|
+
return /* @__PURE__ */ React75.createElement(Typography, __spreadValues({
|
11761
12010
|
variant: "small",
|
11762
12011
|
color: "grey-60"
|
11763
12012
|
}, rest), children);
|
11764
12013
|
};
|
11765
12014
|
Modal.TitleContainer = (_a) => {
|
11766
12015
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11767
|
-
return /* @__PURE__ */
|
12016
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11768
12017
|
className: classNames(tw("flex flex-col grow"), className)
|
11769
12018
|
}), children);
|
11770
12019
|
};
|
11771
12020
|
Modal.Body = (_a) => {
|
11772
12021
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
11773
|
-
return /* @__PURE__ */
|
12022
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11774
12023
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
11775
12024
|
style: __spreadValues({ maxHeight }, style)
|
11776
12025
|
}), children);
|
11777
12026
|
};
|
11778
12027
|
Modal.Footer = (_a) => {
|
11779
12028
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11780
|
-
return /* @__PURE__ */
|
12029
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11781
12030
|
className: classNames(tw("px-7 py-6"), className)
|
11782
12031
|
}), children);
|
11783
12032
|
};
|
11784
12033
|
Modal.Actions = (_a) => {
|
11785
12034
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11786
|
-
return /* @__PURE__ */
|
12035
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11787
12036
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
11788
12037
|
}), children);
|
11789
12038
|
};
|
11790
12039
|
|
11791
12040
|
// src/molecules/Dialog/Dialog.tsx
|
11792
12041
|
var Dialog = (props) => {
|
11793
|
-
const ref =
|
12042
|
+
const ref = React76.useRef(null);
|
11794
12043
|
const state = useOverlayTriggerState2({ isOpen: props.open });
|
11795
12044
|
const { modalProps, underlayProps } = useModalOverlay({}, state, ref);
|
11796
12045
|
if (!state.isOpen) {
|
11797
12046
|
return null;
|
11798
12047
|
}
|
11799
|
-
return /* @__PURE__ */
|
12048
|
+
return /* @__PURE__ */ React76.createElement(Overlay2, null, /* @__PURE__ */ React76.createElement(Modal, {
|
11800
12049
|
className: "Aquarium-Dialog",
|
11801
12050
|
open: true
|
11802
|
-
}, /* @__PURE__ */
|
12051
|
+
}, /* @__PURE__ */ React76.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React76.createElement(Modal.Dialog, __spreadValues({
|
11803
12052
|
ref,
|
11804
12053
|
size: "sm"
|
11805
|
-
}, modalProps), /* @__PURE__ */
|
12054
|
+
}, modalProps), /* @__PURE__ */ React76.createElement(DialogWrapper, __spreadValues({}, props)))));
|
11806
12055
|
};
|
11807
12056
|
var DialogWrapper = ({
|
11808
12057
|
title,
|
@@ -11811,59 +12060,59 @@ var DialogWrapper = ({
|
|
11811
12060
|
primaryAction,
|
11812
12061
|
secondaryAction
|
11813
12062
|
}) => {
|
11814
|
-
const ref =
|
12063
|
+
const ref = React76.useRef(null);
|
11815
12064
|
const labelledBy = useId9();
|
11816
12065
|
const describedBy = useId9();
|
11817
12066
|
const { dialogProps } = useDialog(
|
11818
12067
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11819
12068
|
ref
|
11820
12069
|
);
|
11821
|
-
return /* @__PURE__ */
|
12070
|
+
return /* @__PURE__ */ React76.createElement("div", __spreadProps(__spreadValues({
|
11822
12071
|
ref
|
11823
12072
|
}, dialogProps), {
|
11824
12073
|
className: tw("outline-none")
|
11825
|
-
}), /* @__PURE__ */
|
12074
|
+
}), /* @__PURE__ */ React76.createElement(Modal.Header, {
|
11826
12075
|
className: tw("icon-stroke-2")
|
11827
|
-
}, /* @__PURE__ */
|
12076
|
+
}, /* @__PURE__ */ React76.createElement(Icon, {
|
11828
12077
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
11829
12078
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
11830
12079
|
fontSize: 20
|
11831
|
-
}), /* @__PURE__ */
|
12080
|
+
}), /* @__PURE__ */ React76.createElement(Modal.Title, {
|
11832
12081
|
id: labelledBy,
|
11833
12082
|
variant: "large",
|
11834
12083
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
11835
|
-
}, title)), /* @__PURE__ */
|
12084
|
+
}, title)), /* @__PURE__ */ React76.createElement(Modal.Body, {
|
11836
12085
|
id: describedBy
|
11837
|
-
}, /* @__PURE__ */
|
12086
|
+
}, /* @__PURE__ */ React76.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React76.createElement(Modal.Footer, null, /* @__PURE__ */ React76.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ React76.createElement(Button.Ghost, __spreadValues({
|
11838
12087
|
key: secondaryAction.text
|
11839
|
-
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
12088
|
+
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React76.createElement(Button.Secondary, __spreadValues({
|
11840
12089
|
key: primaryAction.text
|
11841
12090
|
}, omit8(primaryAction, "text")), primaryAction.text))));
|
11842
12091
|
};
|
11843
12092
|
|
11844
12093
|
// src/molecules/Drawer/Drawer.tsx
|
11845
|
-
import
|
12094
|
+
import React78, { useEffect as useEffect10 } from "react";
|
11846
12095
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
|
11847
12096
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
11848
12097
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
11849
12098
|
import { useId as useId10 } from "@react-aria/utils";
|
11850
12099
|
import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
|
11851
|
-
import
|
12100
|
+
import castArray2 from "lodash/castArray";
|
11852
12101
|
import omit9 from "lodash/omit";
|
11853
12102
|
|
11854
12103
|
// src/molecules/Tabs/Tabs.tsx
|
11855
|
-
import
|
12104
|
+
import React77, { useEffect as useEffect9, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useState as useState10 } from "react";
|
11856
12105
|
import isNumber5 from "lodash/isNumber";
|
11857
12106
|
import kebabCase from "lodash/kebabCase";
|
11858
12107
|
var import_chevronLeft4 = __toESM(require_chevronLeft());
|
11859
12108
|
var import_chevronRight4 = __toESM(require_chevronRight());
|
11860
12109
|
var import_warningSign4 = __toESM(require_warningSign());
|
11861
12110
|
var isTabComponent = (c) => {
|
11862
|
-
return
|
12111
|
+
return React77.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
11863
12112
|
};
|
11864
|
-
var Tab =
|
12113
|
+
var Tab = React77.forwardRef(
|
11865
12114
|
({ className, id, title, children }, ref) => {
|
11866
|
-
return /* @__PURE__ */
|
12115
|
+
return /* @__PURE__ */ React77.createElement("div", {
|
11867
12116
|
ref,
|
11868
12117
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
11869
12118
|
className,
|
@@ -11875,14 +12124,14 @@ var Tab = React76.forwardRef(
|
|
11875
12124
|
);
|
11876
12125
|
var TabContainer = (_a) => {
|
11877
12126
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
11878
|
-
return /* @__PURE__ */
|
12127
|
+
return /* @__PURE__ */ React77.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11879
12128
|
className: classNames("py-6 z-0", className)
|
11880
12129
|
}), children);
|
11881
12130
|
};
|
11882
12131
|
var ModalTab = Tab;
|
11883
12132
|
var ModalTabContainer = TabContainer;
|
11884
12133
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
11885
|
-
const Tab2 =
|
12134
|
+
const Tab2 = React77.forwardRef(
|
11886
12135
|
(_a, ref) => {
|
11887
12136
|
var _b = _a, {
|
11888
12137
|
id,
|
@@ -11914,26 +12163,26 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11914
12163
|
const _id = id != null ? id : kebabCase(title);
|
11915
12164
|
let statusIcon = void 0;
|
11916
12165
|
if (status === "warning") {
|
11917
|
-
statusIcon = /* @__PURE__ */
|
12166
|
+
statusIcon = /* @__PURE__ */ React77.createElement(InlineIcon, {
|
11918
12167
|
icon: import_warningSign4.default,
|
11919
12168
|
color: selected ? void 0 : "warning-80"
|
11920
12169
|
});
|
11921
12170
|
} else if (status === "error") {
|
11922
|
-
statusIcon = /* @__PURE__ */
|
12171
|
+
statusIcon = /* @__PURE__ */ React77.createElement(InlineIcon, {
|
11923
12172
|
icon: import_warningSign4.default,
|
11924
12173
|
color: selected ? void 0 : "error-50"
|
11925
12174
|
});
|
11926
12175
|
}
|
11927
|
-
const tab = /* @__PURE__ */
|
12176
|
+
const tab = /* @__PURE__ */ React77.createElement(Component, __spreadValues({
|
11928
12177
|
ref,
|
11929
12178
|
id: `${_id}-tab`,
|
11930
12179
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
11931
12180
|
className: classNames(className, "px-5 py-3 z-10 no-underline appearance-none outline-none h-full", {
|
11932
12181
|
"cursor-default": disabled,
|
11933
12182
|
"text-grey-80 focus:text-primary-80": !selected,
|
11934
|
-
"hover:bg-grey-0
|
12183
|
+
"hover:bg-grey-0": !selected && !disabled,
|
11935
12184
|
"border-b-2": !defaultUnderlineHidden || selected,
|
11936
|
-
"border-
|
12185
|
+
"border-default": !selected,
|
11937
12186
|
"border-primary-80": selected
|
11938
12187
|
}),
|
11939
12188
|
type: "button",
|
@@ -11941,29 +12190,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11941
12190
|
"aria-selected": selected,
|
11942
12191
|
"aria-controls": `${_id}-panel`,
|
11943
12192
|
tabIndex: disabled ? void 0 : 0
|
11944
|
-
}, rest), /* @__PURE__ */
|
12193
|
+
}, rest), /* @__PURE__ */ React77.createElement(Typography2, {
|
11945
12194
|
htmlTag: "div",
|
11946
12195
|
variant: "small-strong",
|
11947
12196
|
color: selected ? "primary-80" : disabled ? "grey-20" : "current",
|
11948
12197
|
className: tw("inline-flex items-center gap-3")
|
11949
|
-
}, showNotification ? /* @__PURE__ */
|
12198
|
+
}, showNotification ? /* @__PURE__ */ React77.createElement(Badge.Notification, {
|
11950
12199
|
right: "-4px",
|
11951
12200
|
top: "3px"
|
11952
|
-
}, /* @__PURE__ */
|
12201
|
+
}, /* @__PURE__ */ React77.createElement("span", {
|
11953
12202
|
className: tw("whitespace-nowrap")
|
11954
|
-
}, title)) : /* @__PURE__ */
|
12203
|
+
}, title)) : /* @__PURE__ */ React77.createElement("span", {
|
11955
12204
|
className: tw("whitespace-nowrap")
|
11956
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
12205
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React77.createElement(Typography2, {
|
11957
12206
|
htmlTag: "span",
|
11958
12207
|
variant: "small",
|
11959
12208
|
color: selected ? "primary-80" : "grey-5",
|
11960
12209
|
className: "leading-none"
|
11961
|
-
}, /* @__PURE__ */
|
12210
|
+
}, /* @__PURE__ */ React77.createElement(TabBadge, {
|
11962
12211
|
kind: "filled",
|
11963
12212
|
value: badge,
|
11964
12213
|
textClassname: classNames({ "text-white": selected, "text-grey-50": !selected })
|
11965
12214
|
})), statusIcon));
|
11966
|
-
return tooltip ? /* @__PURE__ */
|
12215
|
+
return tooltip ? /* @__PURE__ */ React77.createElement(Tooltip, {
|
11967
12216
|
content: tooltip
|
11968
12217
|
}, tab) : tab;
|
11969
12218
|
}
|
@@ -11977,7 +12226,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11977
12226
|
const Tabs2 = (props) => {
|
11978
12227
|
var _a, _b;
|
11979
12228
|
const { className, value, defaultValue, onChange, children } = props;
|
11980
|
-
const childArr =
|
12229
|
+
const childArr = React77.Children.toArray(children);
|
11981
12230
|
const firstTab = childArr[0];
|
11982
12231
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
11983
12232
|
const [selected, setSelected] = useState10((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -11990,7 +12239,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11990
12239
|
var _a2, _b2;
|
11991
12240
|
const container = containerRef.current;
|
11992
12241
|
const tabs = tabsRef.current;
|
11993
|
-
const values =
|
12242
|
+
const values = React77.Children.map(
|
11994
12243
|
children,
|
11995
12244
|
(tab, i) => {
|
11996
12245
|
var _a3;
|
@@ -12031,7 +12280,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
12031
12280
|
updateCarets();
|
12032
12281
|
setSelected(value);
|
12033
12282
|
revealSelectedTab({ smooth: value !== selected });
|
12034
|
-
}, [value,
|
12283
|
+
}, [value, React77.Children.count(children)]);
|
12035
12284
|
useLayoutEffect2(() => {
|
12036
12285
|
var _a2;
|
12037
12286
|
updateCarets();
|
@@ -12095,27 +12344,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
12095
12344
|
const handleSelected = (key) => {
|
12096
12345
|
(onChange != null ? onChange : setSelected)(key);
|
12097
12346
|
};
|
12098
|
-
|
12347
|
+
React77.Children.forEach(children, (c) => {
|
12099
12348
|
if (c && !isTabComponent(c)) {
|
12100
12349
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
12101
12350
|
}
|
12102
12351
|
});
|
12103
|
-
return /* @__PURE__ */
|
12352
|
+
return /* @__PURE__ */ React77.createElement("div", {
|
12104
12353
|
ref: parentRef,
|
12105
12354
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
12106
|
-
}, /* @__PURE__ */
|
12107
|
-
className: tw("relative flex items-center border-b-2 border-
|
12108
|
-
}, /* @__PURE__ */
|
12355
|
+
}, /* @__PURE__ */ React77.createElement("div", {
|
12356
|
+
className: tw("relative flex items-center border-b-2 border-default")
|
12357
|
+
}, /* @__PURE__ */ React77.createElement("div", {
|
12109
12358
|
ref: containerRef,
|
12110
|
-
className: tw("overflow-y-auto scrollbar-hide
|
12111
|
-
}, /* @__PURE__ */
|
12359
|
+
className: tw("overflow-y-auto scrollbar-hide mb-[-2px] h-auto")
|
12360
|
+
}, /* @__PURE__ */ React77.createElement("div", {
|
12112
12361
|
ref: tabsRef,
|
12113
12362
|
role: "tablist",
|
12114
12363
|
"aria-label": "tabs",
|
12115
12364
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
12116
|
-
},
|
12365
|
+
}, React77.Children.map(
|
12117
12366
|
children,
|
12118
|
-
(tab, index) => tab ? /* @__PURE__ */
|
12367
|
+
(tab, index) => tab ? /* @__PURE__ */ React77.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
12119
12368
|
key: tab.props.value
|
12120
12369
|
}, tab.props), {
|
12121
12370
|
index,
|
@@ -12123,20 +12372,20 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
12123
12372
|
onKeyDown: handleKeyDown,
|
12124
12373
|
onSelected: handleSelected
|
12125
12374
|
})) : void 0
|
12126
|
-
))), leftCaret && /* @__PURE__ */
|
12375
|
+
))), leftCaret && /* @__PURE__ */ React77.createElement("div", {
|
12127
12376
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
12128
|
-
}, /* @__PURE__ */
|
12377
|
+
}, /* @__PURE__ */ React77.createElement("div", {
|
12129
12378
|
onClick: () => handleScrollToNext("left"),
|
12130
12379
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
12131
|
-
}, /* @__PURE__ */
|
12380
|
+
}, /* @__PURE__ */ React77.createElement(InlineIcon, {
|
12132
12381
|
icon: import_chevronLeft4.default
|
12133
|
-
}))), rightCaret && /* @__PURE__ */
|
12382
|
+
}))), rightCaret && /* @__PURE__ */ React77.createElement("div", {
|
12134
12383
|
onClick: () => handleScrollToNext("right"),
|
12135
12384
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
12136
|
-
}, /* @__PURE__ */
|
12385
|
+
}, /* @__PURE__ */ React77.createElement("div", {
|
12137
12386
|
onClick: () => handleScrollToNext("right"),
|
12138
12387
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
12139
|
-
}, /* @__PURE__ */
|
12388
|
+
}, /* @__PURE__ */ React77.createElement(InlineIcon, {
|
12140
12389
|
icon: import_chevronRight4.default
|
12141
12390
|
})))), renderChildren(children, selected, props));
|
12142
12391
|
};
|
@@ -12144,7 +12393,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
12144
12393
|
Tabs2.Tab = TabComponent;
|
12145
12394
|
return Tabs2;
|
12146
12395
|
};
|
12147
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
12396
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React77.createElement(TabContainer, null, children.find(
|
12148
12397
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
12149
12398
|
)));
|
12150
12399
|
|
@@ -12161,8 +12410,8 @@ var WIDTHS = {
|
|
12161
12410
|
var Drawer = (_a) => {
|
12162
12411
|
var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
|
12163
12412
|
const { onClose, size = "sm", portalContainer } = props;
|
12164
|
-
const [hidden, setHidden] =
|
12165
|
-
const ref =
|
12413
|
+
const [hidden, setHidden] = React78.useState(!open);
|
12414
|
+
const ref = React78.useRef(null);
|
12166
12415
|
const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
|
12167
12416
|
useEffect10(() => {
|
12168
12417
|
if (open && hidden) {
|
@@ -12191,21 +12440,21 @@ var Drawer = (_a) => {
|
|
12191
12440
|
if (!state.isOpen) {
|
12192
12441
|
return null;
|
12193
12442
|
}
|
12194
|
-
return /* @__PURE__ */
|
12443
|
+
return /* @__PURE__ */ React78.createElement(Overlay3, {
|
12195
12444
|
portalContainer
|
12196
|
-
}, /* @__PURE__ */
|
12445
|
+
}, /* @__PURE__ */ React78.createElement(Modal, {
|
12197
12446
|
kind: "drawer",
|
12198
12447
|
className: "Aquarium-Drawer overflow-x-hidden",
|
12199
12448
|
open: true
|
12200
|
-
}, /* @__PURE__ */
|
12449
|
+
}, /* @__PURE__ */ React78.createElement(AnimatedBackDrop, __spreadValues({
|
12201
12450
|
style: { opacity }
|
12202
|
-
}, underlayProps)), /* @__PURE__ */
|
12451
|
+
}, underlayProps)), /* @__PURE__ */ React78.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
|
12203
12452
|
ref
|
12204
12453
|
}, props), modalProps), {
|
12205
12454
|
spring: { right }
|
12206
12455
|
}))));
|
12207
12456
|
};
|
12208
|
-
var DrawerWrapper =
|
12457
|
+
var DrawerWrapper = React78.forwardRef(
|
12209
12458
|
(_a, ref) => {
|
12210
12459
|
var _b = _a, {
|
12211
12460
|
title,
|
@@ -12242,62 +12491,62 @@ var DrawerWrapper = React77.forwardRef(
|
|
12242
12491
|
ref
|
12243
12492
|
);
|
12244
12493
|
const dialogSize = size === "lg" ? "full" : size;
|
12245
|
-
const childElements =
|
12494
|
+
const childElements = React78.Children.toArray(children).filter(React78.isValidElement);
|
12246
12495
|
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
12247
12496
|
const hasTabs = isComponentType(onlyChild, Tabs);
|
12248
|
-
return /* @__PURE__ */
|
12497
|
+
return /* @__PURE__ */ React78.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
12249
12498
|
ref,
|
12250
12499
|
kind: "drawer",
|
12251
12500
|
"aria-modal": "true",
|
12252
12501
|
size: dialogSize
|
12253
12502
|
}, props), dialogProps), {
|
12254
12503
|
style: { position: "fixed", right: spring.right }
|
12255
|
-
}), /* @__PURE__ */
|
12504
|
+
}), /* @__PURE__ */ React78.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React78.createElement(Button.Icon, {
|
12256
12505
|
"aria-label": "Close",
|
12257
12506
|
icon: import_cross6.default,
|
12258
12507
|
onClick: onClose
|
12259
|
-
})), /* @__PURE__ */
|
12508
|
+
})), /* @__PURE__ */ React78.createElement(Modal.Header, {
|
12260
12509
|
className: tw({ "pb-3": hasTabs })
|
12261
|
-
}, /* @__PURE__ */
|
12510
|
+
}, /* @__PURE__ */ React78.createElement(Modal.Title, {
|
12262
12511
|
id: labelledBy,
|
12263
12512
|
kind: "drawer"
|
12264
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
12513
|
+
}, title)), hasTabs ? /* @__PURE__ */ React78.createElement(DrawerTabs, __spreadProps(__spreadValues({}, onlyChild.props), {
|
12265
12514
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
12266
|
-
})) : /* @__PURE__ */
|
12515
|
+
})) : /* @__PURE__ */ React78.createElement(Modal.Body, {
|
12267
12516
|
id: describedBy,
|
12268
12517
|
tabIndex: 0,
|
12269
12518
|
noFooter: !(secondaryActions || primaryAction)
|
12270
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
12519
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React78.createElement(Modal.Footer, null, /* @__PURE__ */ React78.createElement(Modal.Actions, {
|
12271
12520
|
className: size === "sm" ? tw("flex-col") : void 0
|
12272
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
12521
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React78.createElement(Box.Flex, {
|
12273
12522
|
alignItems: "center"
|
12274
|
-
}, /* @__PURE__ */
|
12523
|
+
}, /* @__PURE__ */ React78.createElement(DropdownMenu2, {
|
12275
12524
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
12276
12525
|
onOpenChange: onMenuOpenChange
|
12277
|
-
}, /* @__PURE__ */
|
12526
|
+
}, /* @__PURE__ */ React78.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React78.createElement(Button.Icon, {
|
12278
12527
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
12279
12528
|
icon: import_more4.default
|
12280
|
-
})), menu)), secondaryActions &&
|
12529
|
+
})), menu)), secondaryActions && castArray2(secondaryActions).filter(Boolean).map((_b2) => {
|
12281
12530
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
12282
|
-
return /* @__PURE__ */
|
12531
|
+
return /* @__PURE__ */ React78.createElement(Button.Secondary, __spreadValues({
|
12283
12532
|
key: text
|
12284
12533
|
}, action), text);
|
12285
|
-
}), primaryAction && /* @__PURE__ */
|
12534
|
+
}), primaryAction && /* @__PURE__ */ React78.createElement(Button.Primary, __spreadValues({
|
12286
12535
|
key: primaryAction.text
|
12287
12536
|
}, omit9(primaryAction, "text")), primaryAction.text))));
|
12288
12537
|
}
|
12289
12538
|
);
|
12290
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
12539
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React78.createElement(Modal.Body, {
|
12291
12540
|
className: tw("h-full")
|
12292
|
-
}, /* @__PURE__ */
|
12541
|
+
}, /* @__PURE__ */ React78.createElement(ModalTabContainer, null, children.find(
|
12293
12542
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
12294
12543
|
))));
|
12295
12544
|
|
12296
12545
|
// src/molecules/Dropdown/Dropdown.tsx
|
12297
|
-
import
|
12546
|
+
import React81 from "react";
|
12298
12547
|
|
12299
12548
|
// src/molecules/Popover/Popover.tsx
|
12300
|
-
import
|
12549
|
+
import React80, { useRef as useRef8 } from "react";
|
12301
12550
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
12302
12551
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
12303
12552
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
@@ -12306,12 +12555,12 @@ import classNames8 from "classnames";
|
|
12306
12555
|
import omit10 from "lodash/omit";
|
12307
12556
|
|
12308
12557
|
// src/molecules/Popover/Dialog.tsx
|
12309
|
-
import
|
12558
|
+
import React79 from "react";
|
12310
12559
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
12311
12560
|
var Dialog2 = ({ children }) => {
|
12312
|
-
const ref =
|
12561
|
+
const ref = React79.useRef(null);
|
12313
12562
|
const { dialogProps } = useDialog3({}, ref);
|
12314
|
-
return /* @__PURE__ */
|
12563
|
+
return /* @__PURE__ */ React79.createElement("div", __spreadProps(__spreadValues({
|
12315
12564
|
ref
|
12316
12565
|
}, dialogProps), {
|
12317
12566
|
className: tw("outline-none")
|
@@ -12319,10 +12568,10 @@ var Dialog2 = ({ children }) => {
|
|
12319
12568
|
};
|
12320
12569
|
|
12321
12570
|
// src/molecules/Popover/PopoverContext.tsx
|
12322
|
-
import { createContext as
|
12323
|
-
var PopoverContext =
|
12571
|
+
import { createContext as createContext4, useContext as useContext7 } from "react";
|
12572
|
+
var PopoverContext = createContext4(null);
|
12324
12573
|
var usePopoverContext = () => {
|
12325
|
-
const ctx =
|
12574
|
+
const ctx = useContext7(PopoverContext);
|
12326
12575
|
if (ctx === null) {
|
12327
12576
|
throw new Error("PopoverContext was used outside of provider.");
|
12328
12577
|
}
|
@@ -12345,22 +12594,22 @@ var Popover2 = (props) => {
|
|
12345
12594
|
const triggerRef = useRef8(null);
|
12346
12595
|
const state = useOverlayTriggerState4(props);
|
12347
12596
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
12348
|
-
return /* @__PURE__ */
|
12597
|
+
return /* @__PURE__ */ React80.createElement(PopoverContext.Provider, {
|
12349
12598
|
value: {
|
12350
12599
|
state
|
12351
12600
|
}
|
12352
|
-
},
|
12601
|
+
}, React80.Children.map(props.children, (child) => {
|
12353
12602
|
if (isComponentType(child, Popover2.Trigger)) {
|
12354
|
-
return /* @__PURE__ */
|
12603
|
+
return /* @__PURE__ */ React80.createElement(PressResponder2, __spreadValues({
|
12355
12604
|
ref: triggerRef
|
12356
|
-
}, omit10(triggerProps, "aria-expanded")), /* @__PURE__ */
|
12605
|
+
}, omit10(triggerProps, "aria-expanded")), /* @__PURE__ */ React80.createElement(PopoverTriggerWrapper, {
|
12357
12606
|
"data-testid": props["data-testid"],
|
12358
12607
|
"aria-controls": id,
|
12359
12608
|
"aria-expanded": triggerProps["aria-expanded"]
|
12360
12609
|
}, child.props.children));
|
12361
12610
|
}
|
12362
12611
|
if (isComponentType(child, Popover2.Panel)) {
|
12363
|
-
return state.isOpen && /* @__PURE__ */
|
12612
|
+
return state.isOpen && /* @__PURE__ */ React80.createElement(PopoverOverlay, __spreadValues({
|
12364
12613
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
12365
12614
|
state,
|
12366
12615
|
placement,
|
@@ -12371,7 +12620,7 @@ var Popover2 = (props) => {
|
|
12371
12620
|
offset,
|
12372
12621
|
crossOffset,
|
12373
12622
|
shouldFlip
|
12374
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
12623
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React80.createElement(Dialog2, null, child.props.children) : child.props.children);
|
12375
12624
|
}
|
12376
12625
|
throw new Error("Invalid children element type");
|
12377
12626
|
}));
|
@@ -12390,7 +12639,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
12390
12639
|
state.close();
|
12391
12640
|
onClick == null ? void 0 : onClick(e);
|
12392
12641
|
};
|
12393
|
-
return /* @__PURE__ */
|
12642
|
+
return /* @__PURE__ */ React80.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
12394
12643
|
onClick: handleClick
|
12395
12644
|
}));
|
12396
12645
|
};
|
@@ -12403,9 +12652,9 @@ var PopoverTriggerWrapper = (_a) => {
|
|
12403
12652
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12404
12653
|
var _a2;
|
12405
12654
|
const ref = useRef8(null);
|
12406
|
-
const trigger =
|
12655
|
+
const trigger = React80.Children.only(children);
|
12407
12656
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
12408
|
-
return
|
12657
|
+
return React80.cloneElement(trigger, __spreadProps(__spreadValues({
|
12409
12658
|
"ref": ref
|
12410
12659
|
}, mergeProps3(pressProps, trigger.props)), {
|
12411
12660
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -12414,10 +12663,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
12414
12663
|
|
12415
12664
|
// src/molecules/Dropdown/Dropdown.tsx
|
12416
12665
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
12417
|
-
return /* @__PURE__ */
|
12666
|
+
return /* @__PURE__ */ React81.createElement(Popover2, {
|
12418
12667
|
type: "menu",
|
12419
12668
|
placement
|
12420
|
-
}, /* @__PURE__ */
|
12669
|
+
}, /* @__PURE__ */ React81.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React81.createElement(Popover2.Panel, {
|
12421
12670
|
className: "Aquarium-Dropdown"
|
12422
12671
|
}, content));
|
12423
12672
|
};
|
@@ -12428,26 +12677,26 @@ var DropdownMenu3 = ({
|
|
12428
12677
|
triggerId,
|
12429
12678
|
setClose = () => void 0
|
12430
12679
|
}) => {
|
12431
|
-
const menuRef =
|
12432
|
-
|
12680
|
+
const menuRef = React81.useRef(null);
|
12681
|
+
React81.useEffect(() => {
|
12433
12682
|
const id = setTimeout(() => {
|
12434
12683
|
var _a, _b, _c;
|
12435
12684
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
12436
12685
|
});
|
12437
12686
|
return () => clearTimeout(id);
|
12438
12687
|
}, [menuRef.current]);
|
12439
|
-
return /* @__PURE__ */
|
12688
|
+
return /* @__PURE__ */ React81.createElement("div", {
|
12440
12689
|
style: { minWidth: "250px" },
|
12441
12690
|
className: tw("py-3 bg-white")
|
12442
|
-
}, !!title && /* @__PURE__ */
|
12691
|
+
}, !!title && /* @__PURE__ */ React81.createElement("div", {
|
12443
12692
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
12444
|
-
}, title), /* @__PURE__ */
|
12693
|
+
}, title), /* @__PURE__ */ React81.createElement("ol", {
|
12445
12694
|
role: "menu",
|
12446
12695
|
ref: menuRef,
|
12447
12696
|
id: contentId,
|
12448
12697
|
"aria-labelledby": triggerId
|
12449
|
-
},
|
12450
|
-
return
|
12698
|
+
}, React81.Children.map(children, (child) => {
|
12699
|
+
return React81.cloneElement(child, { setClose });
|
12451
12700
|
})));
|
12452
12701
|
};
|
12453
12702
|
var DropdownItem = (_a) => {
|
@@ -12502,10 +12751,10 @@ var DropdownItem = (_a) => {
|
|
12502
12751
|
handleSelect();
|
12503
12752
|
}
|
12504
12753
|
};
|
12505
|
-
const itemContent = /* @__PURE__ */
|
12754
|
+
const itemContent = /* @__PURE__ */ React81.createElement("div", {
|
12506
12755
|
className: tw("py-3 px-4")
|
12507
12756
|
}, children);
|
12508
|
-
return /* @__PURE__ */
|
12757
|
+
return /* @__PURE__ */ React81.createElement("li", __spreadProps(__spreadValues({
|
12509
12758
|
role: "menuitem",
|
12510
12759
|
tabIndex: -1,
|
12511
12760
|
onClick: handleClick,
|
@@ -12516,11 +12765,11 @@ var DropdownItem = (_a) => {
|
|
12516
12765
|
"text-muted cursor-not-allowed": disabled,
|
12517
12766
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
12518
12767
|
})
|
12519
|
-
}), tooltip ? /* @__PURE__ */
|
12768
|
+
}), tooltip ? /* @__PURE__ */ React81.createElement(Tooltip, {
|
12520
12769
|
content: tooltip,
|
12521
12770
|
placement: tooltipPlacement,
|
12522
12771
|
inline: false
|
12523
|
-
}, /* @__PURE__ */
|
12772
|
+
}, /* @__PURE__ */ React81.createElement("div", {
|
12524
12773
|
tabIndex: 0,
|
12525
12774
|
className: tw("grow")
|
12526
12775
|
}, itemContent)) : itemContent);
|
@@ -12529,7 +12778,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
12529
12778
|
Dropdown.Item = DropdownItem;
|
12530
12779
|
|
12531
12780
|
// src/molecules/EmptyState/EmptyState.tsx
|
12532
|
-
import
|
12781
|
+
import React82 from "react";
|
12533
12782
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
12534
12783
|
EmptyStateLayout2["Vertical"] = "vertical";
|
12535
12784
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -12586,7 +12835,7 @@ var EmptyState = ({
|
|
12586
12835
|
fullHeight = isVerticalLayout(layout) ? true : false
|
12587
12836
|
}) => {
|
12588
12837
|
const template = layoutStyle(layout);
|
12589
|
-
return /* @__PURE__ */
|
12838
|
+
return /* @__PURE__ */ React82.createElement(Box, {
|
12590
12839
|
className: classNames(
|
12591
12840
|
"Aquarium-EmptyState",
|
12592
12841
|
tw("rounded p-[56px]", {
|
@@ -12599,39 +12848,39 @@ var EmptyState = ({
|
|
12599
12848
|
),
|
12600
12849
|
backgroundColor: "transparent",
|
12601
12850
|
borderColor: "grey-10"
|
12602
|
-
}, /* @__PURE__ */
|
12851
|
+
}, /* @__PURE__ */ React82.createElement(Box.Flex, {
|
12603
12852
|
style: { gap: "56px" },
|
12604
12853
|
flexDirection: template.layout,
|
12605
12854
|
justifyContent: template.justifyContent,
|
12606
12855
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
12607
12856
|
height: fullHeight ? "full" : void 0
|
12608
|
-
}, image && /* @__PURE__ */
|
12857
|
+
}, image && /* @__PURE__ */ React82.createElement("img", {
|
12609
12858
|
src: image,
|
12610
12859
|
alt: imageAlt,
|
12611
12860
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
12612
|
-
}), /* @__PURE__ */
|
12861
|
+
}), /* @__PURE__ */ React82.createElement(Box.Flex, {
|
12613
12862
|
flexDirection: "column",
|
12614
12863
|
justifyContent: template.justifyContent,
|
12615
12864
|
alignItems: template.alignItems
|
12616
|
-
}, /* @__PURE__ */
|
12865
|
+
}, /* @__PURE__ */ React82.createElement(Typography2.Heading, {
|
12617
12866
|
htmlTag: "h2"
|
12618
|
-
}, title), (description || children) && /* @__PURE__ */
|
12867
|
+
}, title), (description || children) && /* @__PURE__ */ React82.createElement(Box, {
|
12619
12868
|
marginTop: "5"
|
12620
|
-
}, /* @__PURE__ */
|
12869
|
+
}, /* @__PURE__ */ React82.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React82.createElement(Box.Flex, {
|
12621
12870
|
marginTop: "7",
|
12622
12871
|
gap: "4",
|
12623
12872
|
justifyContent: "center",
|
12624
12873
|
alignItems: "center",
|
12625
12874
|
flexWrap: "wrap"
|
12626
|
-
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */
|
12875
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React82.createElement(Box, {
|
12627
12876
|
marginTop: "5"
|
12628
|
-
}, /* @__PURE__ */
|
12877
|
+
}, /* @__PURE__ */ React82.createElement(Typography2.Small, {
|
12629
12878
|
color: "grey-60"
|
12630
12879
|
}, footer)))));
|
12631
12880
|
};
|
12632
12881
|
|
12633
12882
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
12634
|
-
import
|
12883
|
+
import React83 from "react";
|
12635
12884
|
var FlexboxItem = Tailwindify(
|
12636
12885
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
12637
12886
|
const hookStyle = useStyle({
|
@@ -12643,7 +12892,7 @@ var FlexboxItem = Tailwindify(
|
|
12643
12892
|
alignSelf
|
12644
12893
|
});
|
12645
12894
|
const HtmlElement = htmlTag;
|
12646
|
-
return /* @__PURE__ */
|
12895
|
+
return /* @__PURE__ */ React83.createElement(HtmlElement, {
|
12647
12896
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
12648
12897
|
className
|
12649
12898
|
}, children);
|
@@ -12651,7 +12900,7 @@ var FlexboxItem = Tailwindify(
|
|
12651
12900
|
);
|
12652
12901
|
|
12653
12902
|
// src/molecules/Grid/GridItem.tsx
|
12654
|
-
import
|
12903
|
+
import React84 from "react";
|
12655
12904
|
var GridItem2 = Tailwindify(
|
12656
12905
|
({
|
12657
12906
|
htmlTag = "div",
|
@@ -12682,7 +12931,7 @@ var GridItem2 = Tailwindify(
|
|
12682
12931
|
gridRowEnd: rowEnd
|
12683
12932
|
});
|
12684
12933
|
const HtmlElement = htmlTag;
|
12685
|
-
return /* @__PURE__ */
|
12934
|
+
return /* @__PURE__ */ React84.createElement(HtmlElement, {
|
12686
12935
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
12687
12936
|
className
|
12688
12937
|
}, children);
|
@@ -12690,7 +12939,7 @@ var GridItem2 = Tailwindify(
|
|
12690
12939
|
);
|
12691
12940
|
|
12692
12941
|
// src/molecules/LineClamp/LineClamp.tsx
|
12693
|
-
import
|
12942
|
+
import React85 from "react";
|
12694
12943
|
var LineClamp2 = ({
|
12695
12944
|
lines,
|
12696
12945
|
children,
|
@@ -12699,10 +12948,10 @@ var LineClamp2 = ({
|
|
12699
12948
|
collapseLabel,
|
12700
12949
|
onClampedChange
|
12701
12950
|
}) => {
|
12702
|
-
const ref =
|
12703
|
-
const [clamped, setClamped] =
|
12704
|
-
const [isClampingEnabled, setClampingEnabled] =
|
12705
|
-
|
12951
|
+
const ref = React85.useRef(null);
|
12952
|
+
const [clamped, setClamped] = React85.useState(true);
|
12953
|
+
const [isClampingEnabled, setClampingEnabled] = React85.useState(false);
|
12954
|
+
React85.useEffect(() => {
|
12706
12955
|
var _a, _b;
|
12707
12956
|
const el = ref.current;
|
12708
12957
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -12711,28 +12960,28 @@ var LineClamp2 = ({
|
|
12711
12960
|
setClamped(!clamped);
|
12712
12961
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
12713
12962
|
};
|
12714
|
-
return /* @__PURE__ */
|
12963
|
+
return /* @__PURE__ */ React85.createElement("div", {
|
12715
12964
|
className: "Aquarium-LineClamp"
|
12716
|
-
}, /* @__PURE__ */
|
12965
|
+
}, /* @__PURE__ */ React85.createElement(LineClamp, {
|
12717
12966
|
ref,
|
12718
12967
|
lines,
|
12719
12968
|
clamped,
|
12720
12969
|
wordBreak
|
12721
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
12970
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React85.createElement(Button.Ghost, {
|
12722
12971
|
dense: true,
|
12723
12972
|
onClick: handleClampedChange
|
12724
12973
|
}, clamped ? expandLabel : collapseLabel));
|
12725
12974
|
};
|
12726
12975
|
|
12727
12976
|
// src/molecules/Link/Link.tsx
|
12728
|
-
import
|
12977
|
+
import React87 from "react";
|
12729
12978
|
import classNames9 from "classnames";
|
12730
12979
|
|
12731
12980
|
// src/atoms/Link/Link.tsx
|
12732
|
-
import
|
12981
|
+
import React86 from "react";
|
12733
12982
|
var Link = (_a) => {
|
12734
12983
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
12735
|
-
return /* @__PURE__ */
|
12984
|
+
return /* @__PURE__ */ React86.createElement("a", __spreadValues({
|
12736
12985
|
className: classNames(className, linkStyle)
|
12737
12986
|
}, props), children);
|
12738
12987
|
};
|
@@ -12740,27 +12989,27 @@ var Link = (_a) => {
|
|
12740
12989
|
// src/molecules/Link/Link.tsx
|
12741
12990
|
var Link2 = (_a) => {
|
12742
12991
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
12743
|
-
return /* @__PURE__ */
|
12992
|
+
return /* @__PURE__ */ React87.createElement(Link, __spreadValues({
|
12744
12993
|
className: classNames9("Aquarium-Link", className)
|
12745
12994
|
}, props));
|
12746
12995
|
};
|
12747
12996
|
|
12748
12997
|
// src/molecules/List/useStaticInfiniteList.ts
|
12749
|
-
import
|
12998
|
+
import React88 from "react";
|
12750
12999
|
var useStaticInfiniteList = ({
|
12751
13000
|
items,
|
12752
13001
|
pageSize,
|
12753
13002
|
autoReset = true
|
12754
13003
|
}) => {
|
12755
|
-
const [currentPage, setCurrentPage] =
|
13004
|
+
const [currentPage, setCurrentPage] = React88.useState(1);
|
12756
13005
|
const numberOfVisible = currentPage * pageSize;
|
12757
|
-
const next =
|
13006
|
+
const next = React88.useCallback(() => {
|
12758
13007
|
setCurrentPage((page) => page + 1);
|
12759
13008
|
}, [setCurrentPage]);
|
12760
|
-
const reset =
|
13009
|
+
const reset = React88.useCallback(() => {
|
12761
13010
|
setCurrentPage(1);
|
12762
13011
|
}, [setCurrentPage]);
|
12763
|
-
|
13012
|
+
React88.useEffect(() => {
|
12764
13013
|
if (autoReset) {
|
12765
13014
|
setCurrentPage(1);
|
12766
13015
|
}
|
@@ -12775,17 +13024,17 @@ var useStaticInfiniteList = ({
|
|
12775
13024
|
};
|
12776
13025
|
|
12777
13026
|
// src/molecules/ListItem/ListItem.tsx
|
12778
|
-
import
|
13027
|
+
import React89 from "react";
|
12779
13028
|
var ListItem = ({ name, icon, active = false }) => {
|
12780
|
-
return /* @__PURE__ */
|
13029
|
+
return /* @__PURE__ */ React89.createElement(Box.Flex, {
|
12781
13030
|
className: "Aquarium-ListItem",
|
12782
13031
|
alignItems: "center"
|
12783
|
-
}, /* @__PURE__ */
|
13032
|
+
}, /* @__PURE__ */ React89.createElement(Typography2, {
|
12784
13033
|
variant: active ? "small-strong" : "small",
|
12785
13034
|
color: "grey-70",
|
12786
13035
|
htmlTag: "span",
|
12787
13036
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
12788
|
-
}, /* @__PURE__ */
|
13037
|
+
}, /* @__PURE__ */ React89.createElement("img", {
|
12789
13038
|
src: icon,
|
12790
13039
|
alt: "",
|
12791
13040
|
className: "inline mr-4",
|
@@ -12795,18 +13044,18 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
12795
13044
|
};
|
12796
13045
|
|
12797
13046
|
// src/molecules/Modal/Modal.tsx
|
12798
|
-
import
|
13047
|
+
import React90 from "react";
|
12799
13048
|
import { useDialog as useDialog4 } from "@react-aria/dialog";
|
12800
13049
|
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
12801
13050
|
import { useId as useId11 } from "@react-aria/utils";
|
12802
13051
|
import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
|
12803
|
-
import
|
13052
|
+
import castArray3 from "lodash/castArray";
|
12804
13053
|
import omit11 from "lodash/omit";
|
12805
13054
|
var import_cross7 = __toESM(require_cross());
|
12806
13055
|
var Modal2 = (_a) => {
|
12807
13056
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
12808
13057
|
const { open, onClose, size, portalContainer } = props;
|
12809
|
-
const ref =
|
13058
|
+
const ref = React90.useRef(null);
|
12810
13059
|
const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
12811
13060
|
const { modalProps, underlayProps } = useModalOverlay3(
|
12812
13061
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -12816,17 +13065,17 @@ var Modal2 = (_a) => {
|
|
12816
13065
|
if (!state.isOpen) {
|
12817
13066
|
return null;
|
12818
13067
|
}
|
12819
|
-
return /* @__PURE__ */
|
13068
|
+
return /* @__PURE__ */ React90.createElement(Overlay4, {
|
12820
13069
|
portalContainer
|
12821
|
-
}, /* @__PURE__ */
|
13070
|
+
}, /* @__PURE__ */ React90.createElement(Modal, {
|
12822
13071
|
className: "Aquarium-Modal",
|
12823
13072
|
open: true
|
12824
|
-
}, /* @__PURE__ */
|
13073
|
+
}, /* @__PURE__ */ React90.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React90.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
12825
13074
|
ref,
|
12826
13075
|
size
|
12827
13076
|
}, props), modalProps))));
|
12828
13077
|
};
|
12829
|
-
var ModalWrapper =
|
13078
|
+
var ModalWrapper = React90.forwardRef(
|
12830
13079
|
(_a, ref) => {
|
12831
13080
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
12832
13081
|
const labelledBy = useId11();
|
@@ -12835,30 +13084,30 @@ var ModalWrapper = React89.forwardRef(
|
|
12835
13084
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
12836
13085
|
ref
|
12837
13086
|
);
|
12838
|
-
return /* @__PURE__ */
|
13087
|
+
return /* @__PURE__ */ React90.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
12839
13088
|
ref
|
12840
13089
|
}, props), dialogProps), {
|
12841
13090
|
tabIndex: -1
|
12842
|
-
}), /* @__PURE__ */
|
13091
|
+
}), /* @__PURE__ */ React90.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React90.createElement(IconButton, {
|
12843
13092
|
"aria-label": "Close",
|
12844
13093
|
icon: import_cross7.default,
|
12845
13094
|
onClick: onClose
|
12846
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
13095
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React90.createElement(Modal.HeaderImage, {
|
12847
13096
|
backgroundImage: headerImage
|
12848
|
-
}), /* @__PURE__ */
|
13097
|
+
}), /* @__PURE__ */ React90.createElement(Modal.Header, {
|
12849
13098
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
12850
|
-
}, /* @__PURE__ */
|
13099
|
+
}, /* @__PURE__ */ React90.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React90.createElement(Modal.Title, {
|
12851
13100
|
id: labelledBy
|
12852
|
-
}, title), subtitle && /* @__PURE__ */
|
13101
|
+
}, title), subtitle && /* @__PURE__ */ React90.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React90.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React90.createElement(Modal.Body, {
|
12853
13102
|
id: describedBy,
|
12854
13103
|
tabIndex: 0,
|
12855
13104
|
noFooter: !(secondaryActions || primaryAction)
|
12856
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
13105
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React90.createElement(Modal.Footer, null, /* @__PURE__ */ React90.createElement(Modal.Actions, null, secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_a2) => {
|
12857
13106
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
12858
|
-
return /* @__PURE__ */
|
13107
|
+
return /* @__PURE__ */ React90.createElement(Button.Secondary, __spreadValues({
|
12859
13108
|
key: text
|
12860
13109
|
}, action), text);
|
12861
|
-
}), primaryAction && /* @__PURE__ */
|
13110
|
+
}), primaryAction && /* @__PURE__ */ React90.createElement(Button.Primary, __spreadValues({
|
12862
13111
|
key: primaryAction.text
|
12863
13112
|
}, omit11(primaryAction, "text")), primaryAction.text))));
|
12864
13113
|
}
|
@@ -12867,24 +13116,24 @@ var ModalTabs = createTabsComponent(
|
|
12867
13116
|
ModalTab,
|
12868
13117
|
TabItem,
|
12869
13118
|
"ModalTabs",
|
12870
|
-
(children, selected, props) => /* @__PURE__ */
|
13119
|
+
(children, selected, props) => /* @__PURE__ */ React90.createElement(Modal.Body, {
|
12871
13120
|
maxHeight: props.maxHeight
|
12872
|
-
}, /* @__PURE__ */
|
13121
|
+
}, /* @__PURE__ */ React90.createElement(ModalTabContainer, null, children.find(
|
12873
13122
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
12874
13123
|
)))
|
12875
13124
|
);
|
12876
13125
|
|
12877
13126
|
// src/molecules/MultiInput/MultiInput.tsx
|
12878
|
-
import
|
13127
|
+
import React92, { useEffect as useEffect11, useRef as useRef9, useState as useState11 } from "react";
|
12879
13128
|
import { useId as useId12 } from "@react-aria/utils";
|
12880
|
-
import
|
13129
|
+
import castArray4 from "lodash/castArray";
|
12881
13130
|
import identity from "lodash/identity";
|
12882
13131
|
import omit12 from "lodash/omit";
|
12883
13132
|
|
12884
13133
|
// src/molecules/MultiInput/InputChip.tsx
|
12885
|
-
import
|
13134
|
+
import React91 from "react";
|
12886
13135
|
var import_smallCross2 = __toESM(require_smallCross());
|
12887
|
-
var InputChip =
|
13136
|
+
var InputChip = React91.forwardRef(
|
12888
13137
|
(_a, ref) => {
|
12889
13138
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
12890
13139
|
const onClick = (e) => {
|
@@ -12892,18 +13141,18 @@ var InputChip = React90.forwardRef(
|
|
12892
13141
|
_onClick == null ? void 0 : _onClick(e);
|
12893
13142
|
}
|
12894
13143
|
};
|
12895
|
-
return /* @__PURE__ */
|
13144
|
+
return /* @__PURE__ */ React91.createElement("div", {
|
12896
13145
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
12897
13146
|
"bg-error-0 ": invalid,
|
12898
13147
|
"bg-grey-0 ": !invalid && !disabled,
|
12899
13148
|
"bg-grey-5": disabled
|
12900
13149
|
})
|
12901
|
-
}, /* @__PURE__ */
|
13150
|
+
}, /* @__PURE__ */ React91.createElement("div", {
|
12902
13151
|
className: tw("px-2 py-1")
|
12903
|
-
}, /* @__PURE__ */
|
13152
|
+
}, /* @__PURE__ */ React91.createElement(Typography2, {
|
12904
13153
|
variant: "small",
|
12905
13154
|
color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
|
12906
|
-
}, children)), !readOnly && /* @__PURE__ */
|
13155
|
+
}, children)), !readOnly && /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({
|
12907
13156
|
ref
|
12908
13157
|
}, props), {
|
12909
13158
|
onClick,
|
@@ -12914,7 +13163,7 @@ var InputChip = React90.forwardRef(
|
|
12914
13163
|
}),
|
12915
13164
|
role: "button",
|
12916
13165
|
"aria-label": `Remove ${String(children)}`
|
12917
|
-
}), /* @__PURE__ */
|
13166
|
+
}), /* @__PURE__ */ React91.createElement(Icon, {
|
12918
13167
|
icon: import_smallCross2.default,
|
12919
13168
|
className: tw({
|
12920
13169
|
"text-error-70": invalid,
|
@@ -13017,7 +13266,7 @@ var MultiInputBase = (_a) => {
|
|
13017
13266
|
inputRef.current.value = "";
|
13018
13267
|
}
|
13019
13268
|
if (value2) {
|
13020
|
-
const newItems =
|
13269
|
+
const newItems = castArray4(value2).map(createItem).filter((item) => !items.includes(item));
|
13021
13270
|
if (newItems.length > 0 && items.length + newItems.length <= (maxLength != null ? maxLength : Number.MAX_SAFE_INTEGER)) {
|
13022
13271
|
const updated = (items != null ? items : []).concat(newItems);
|
13023
13272
|
setItems(updated);
|
@@ -13055,7 +13304,7 @@ var MultiInputBase = (_a) => {
|
|
13055
13304
|
};
|
13056
13305
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
13057
13306
|
var _a3;
|
13058
|
-
return /* @__PURE__ */
|
13307
|
+
return /* @__PURE__ */ React92.createElement(InputChip, {
|
13059
13308
|
key: `${itemToString(item)}.${index}`,
|
13060
13309
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
13061
13310
|
readOnly,
|
@@ -13066,13 +13315,13 @@ var MultiInputBase = (_a) => {
|
|
13066
13315
|
}
|
13067
13316
|
}, itemToString(item));
|
13068
13317
|
});
|
13069
|
-
return /* @__PURE__ */
|
13318
|
+
return /* @__PURE__ */ React92.createElement("div", {
|
13070
13319
|
className: "Aquarium-MultiInputBase"
|
13071
|
-
}, /* @__PURE__ */
|
13320
|
+
}, /* @__PURE__ */ React92.createElement(Select.InputContainer, {
|
13072
13321
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
13073
|
-
}, /* @__PURE__ */
|
13322
|
+
}, /* @__PURE__ */ React92.createElement("div", {
|
13074
13323
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
13075
|
-
}, inline && renderChips(), /* @__PURE__ */
|
13324
|
+
}, inline && renderChips(), /* @__PURE__ */ React92.createElement(Select.Input, __spreadProps(__spreadValues({
|
13076
13325
|
ref: inputRef,
|
13077
13326
|
id: id != null ? id : name,
|
13078
13327
|
name,
|
@@ -13090,11 +13339,11 @@ var MultiInputBase = (_a) => {
|
|
13090
13339
|
onFocus: handleFocus,
|
13091
13340
|
onBlur: handleBlur,
|
13092
13341
|
autoComplete: "off"
|
13093
|
-
}))), endAdornment && /* @__PURE__ */
|
13342
|
+
}))), endAdornment && /* @__PURE__ */ React92.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React92.createElement("div", {
|
13094
13343
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
13095
13344
|
}, renderChips()));
|
13096
13345
|
};
|
13097
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
13346
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React92.createElement(Skeleton, {
|
13098
13347
|
height: 38
|
13099
13348
|
});
|
13100
13349
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -13112,7 +13361,7 @@ var MultiInput = (props) => {
|
|
13112
13361
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13113
13362
|
const labelControlProps = getLabelControlProps(props);
|
13114
13363
|
const baseProps = omit12(props, Object.keys(labelControlProps));
|
13115
|
-
return /* @__PURE__ */
|
13364
|
+
return /* @__PURE__ */ React92.createElement(LabelControl, __spreadProps(__spreadValues({
|
13116
13365
|
id: `${id}-label`,
|
13117
13366
|
htmlFor: `${id}-input`,
|
13118
13367
|
messageId: errorMessageId
|
@@ -13120,7 +13369,7 @@ var MultiInput = (props) => {
|
|
13120
13369
|
length: value.length,
|
13121
13370
|
maxLength,
|
13122
13371
|
className: "Aquarium-MultiInput"
|
13123
|
-
}), /* @__PURE__ */
|
13372
|
+
}), /* @__PURE__ */ React92.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
13124
13373
|
id: `${id}-input`,
|
13125
13374
|
onChange: (value2) => {
|
13126
13375
|
var _a2;
|
@@ -13132,12 +13381,12 @@ var MultiInput = (props) => {
|
|
13132
13381
|
valid: props.valid
|
13133
13382
|
})));
|
13134
13383
|
};
|
13135
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
13384
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React92.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React92.createElement(MultiInputBase.Skeleton, null));
|
13136
13385
|
MultiInput.Skeleton = MultiInputSkeleton;
|
13137
13386
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
13138
13387
|
|
13139
13388
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
13140
|
-
import
|
13389
|
+
import React93, { useEffect as useEffect12, useRef as useRef10, useState as useState12 } from "react";
|
13141
13390
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
13142
13391
|
import { useId as useId13 } from "@react-aria/utils";
|
13143
13392
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
@@ -13297,16 +13546,16 @@ var MultiSelectBase = (_a) => {
|
|
13297
13546
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
13298
13547
|
}
|
13299
13548
|
}, [state.isOpen, inputRef, popoverRef]);
|
13300
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
13549
|
+
const renderItem = (item, index) => /* @__PURE__ */ React93.createElement(Select.Item, __spreadValues({
|
13301
13550
|
key: itemToString(item),
|
13302
13551
|
highlighted: index === highlightedIndex,
|
13303
13552
|
selected: selectedItems.includes(item)
|
13304
13553
|
}, getItemProps({ item, index })), renderOption(item));
|
13305
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
13554
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React93.createElement(React93.Fragment, {
|
13306
13555
|
key: group.label
|
13307
|
-
}, /* @__PURE__ */
|
13556
|
+
}, /* @__PURE__ */ React93.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
13308
13557
|
const renderChips = () => {
|
13309
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
13558
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React93.createElement(InputChip, __spreadProps(__spreadValues({
|
13310
13559
|
key: `${itemToString(selectedItem)}.chip`,
|
13311
13560
|
className: tw("mx-0"),
|
13312
13561
|
disabled,
|
@@ -13324,14 +13573,14 @@ var MultiSelectBase = (_a) => {
|
|
13324
13573
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
13325
13574
|
);
|
13326
13575
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
13327
|
-
return /* @__PURE__ */
|
13576
|
+
return /* @__PURE__ */ React93.createElement("div", {
|
13328
13577
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
13329
|
-
}, /* @__PURE__ */
|
13578
|
+
}, /* @__PURE__ */ React93.createElement(Select.InputContainer, {
|
13330
13579
|
ref: targetRef,
|
13331
13580
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
13332
|
-
}, /* @__PURE__ */
|
13581
|
+
}, /* @__PURE__ */ React93.createElement("div", {
|
13333
13582
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
13334
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
13583
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React93.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
13335
13584
|
name,
|
13336
13585
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
13337
13586
|
}, inputProps), props), {
|
@@ -13350,12 +13599,12 @@ var MultiSelectBase = (_a) => {
|
|
13350
13599
|
setFocus(false);
|
13351
13600
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
13352
13601
|
}
|
13353
|
-
}))), !readOnly && /* @__PURE__ */
|
13602
|
+
}))), !readOnly && /* @__PURE__ */ React93.createElement(Select.Toggle, __spreadValues({
|
13354
13603
|
hasFocus,
|
13355
13604
|
isOpen
|
13356
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
13605
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React93.createElement("div", {
|
13357
13606
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
13358
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
13607
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React93.createElement(PopoverOverlay, {
|
13359
13608
|
ref: popoverRef,
|
13360
13609
|
triggerRef: targetRef,
|
13361
13610
|
state,
|
@@ -13363,13 +13612,13 @@ var MultiSelectBase = (_a) => {
|
|
13363
13612
|
shouldFlip: true,
|
13364
13613
|
isNonModal: true,
|
13365
13614
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
13366
|
-
}, /* @__PURE__ */
|
13615
|
+
}, /* @__PURE__ */ React93.createElement(Select.Menu, __spreadValues({
|
13367
13616
|
maxHeight
|
13368
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
13617
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React93.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
13369
13618
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
13370
13619
|
))));
|
13371
13620
|
};
|
13372
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
13621
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React93.createElement(Skeleton, {
|
13373
13622
|
height: 38
|
13374
13623
|
});
|
13375
13624
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -13390,13 +13639,13 @@ var MultiSelect = (_a) => {
|
|
13390
13639
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13391
13640
|
const labelControlProps = getLabelControlProps(props);
|
13392
13641
|
const baseProps = omit13(props, Object.keys(labelControlProps));
|
13393
|
-
return /* @__PURE__ */
|
13642
|
+
return /* @__PURE__ */ React93.createElement(LabelControl, __spreadProps(__spreadValues({
|
13394
13643
|
id: `${id}-label`,
|
13395
13644
|
htmlFor: `${id}-input`,
|
13396
13645
|
messageId: errorMessageId
|
13397
13646
|
}, labelControlProps), {
|
13398
13647
|
className: "Aquarium-MultiSelect"
|
13399
|
-
}), /* @__PURE__ */
|
13648
|
+
}), /* @__PURE__ */ React93.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
13400
13649
|
id,
|
13401
13650
|
options,
|
13402
13651
|
emptyState,
|
@@ -13404,17 +13653,17 @@ var MultiSelect = (_a) => {
|
|
13404
13653
|
valid: props.valid
|
13405
13654
|
})));
|
13406
13655
|
};
|
13407
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
13656
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React93.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React93.createElement(MultiSelectBase.Skeleton, null));
|
13408
13657
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
13409
13658
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
13410
13659
|
|
13411
13660
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
13412
|
-
import
|
13661
|
+
import React94 from "react";
|
13413
13662
|
import { useId as useId14 } from "@react-aria/utils";
|
13414
13663
|
import omit14 from "lodash/omit";
|
13415
13664
|
import uniqueId from "lodash/uniqueId";
|
13416
13665
|
var import_caretDown2 = __toESM(require_caretDown());
|
13417
|
-
var NativeSelectBase =
|
13666
|
+
var NativeSelectBase = React94.forwardRef(
|
13418
13667
|
(_a, ref) => {
|
13419
13668
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
13420
13669
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -13431,16 +13680,16 @@ var NativeSelectBase = React93.forwardRef(
|
|
13431
13680
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
13432
13681
|
}
|
13433
13682
|
};
|
13434
|
-
return /* @__PURE__ */
|
13683
|
+
return /* @__PURE__ */ React94.createElement("span", {
|
13435
13684
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
13436
|
-
}, !readOnly && /* @__PURE__ */
|
13685
|
+
}, !readOnly && /* @__PURE__ */ React94.createElement("span", {
|
13437
13686
|
className: tw(
|
13438
13687
|
"absolute right-0 inset-y-0 mr-4 text-muted flex ml-3 pointer-events-none typography-default-strong mt-4"
|
13439
13688
|
)
|
13440
|
-
}, /* @__PURE__ */
|
13689
|
+
}, /* @__PURE__ */ React94.createElement(Icon, {
|
13441
13690
|
icon: import_caretDown2.default,
|
13442
13691
|
"data-testid": "icon-dropdown"
|
13443
|
-
})), /* @__PURE__ */
|
13692
|
+
})), /* @__PURE__ */ React94.createElement("select", __spreadProps(__spreadValues({
|
13444
13693
|
ref,
|
13445
13694
|
disabled: disabled || readOnly,
|
13446
13695
|
required
|
@@ -13451,24 +13700,24 @@ var NativeSelectBase = React93.forwardRef(
|
|
13451
13700
|
tw(
|
13452
13701
|
"block w-full rounded-sm appearance-none disabled:cursor-not-allowed typography-small text-default placeholder:text-muted focus:outline-none",
|
13453
13702
|
{
|
13454
|
-
"px-3 py-3 disabled:border-
|
13703
|
+
"px-3 py-3 disabled:border-default disabled:bg-grey-5 disabled:text-muted": !readOnly,
|
13455
13704
|
"px-0 py-3 border-none": readOnly,
|
13456
13705
|
"border border-error-50": !valid && !readOnly,
|
13457
|
-
"border border-
|
13706
|
+
"border border-default hover:border-intense focus:border-info-70": valid && !readOnly
|
13458
13707
|
}
|
13459
13708
|
),
|
13460
13709
|
props.className
|
13461
13710
|
)
|
13462
|
-
}), props.placeholder && /* @__PURE__ */
|
13711
|
+
}), props.placeholder && /* @__PURE__ */ React94.createElement("option", {
|
13463
13712
|
value: placeholderValue,
|
13464
13713
|
disabled: true
|
13465
13714
|
}, props.placeholder), children));
|
13466
13715
|
}
|
13467
13716
|
);
|
13468
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
13717
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React94.createElement(Skeleton, {
|
13469
13718
|
height: 38
|
13470
13719
|
});
|
13471
|
-
var NativeSelect =
|
13720
|
+
var NativeSelect = React94.forwardRef(
|
13472
13721
|
(_a, ref) => {
|
13473
13722
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
13474
13723
|
var _a2;
|
@@ -13478,13 +13727,13 @@ var NativeSelect = React93.forwardRef(
|
|
13478
13727
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13479
13728
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
13480
13729
|
const baseProps = omit14(props, Object.keys(labelControlProps));
|
13481
|
-
return /* @__PURE__ */
|
13730
|
+
return /* @__PURE__ */ React94.createElement(LabelControl, __spreadProps(__spreadValues({
|
13482
13731
|
id: `${id}-label`,
|
13483
13732
|
htmlFor: id,
|
13484
13733
|
messageId: errorMessageId
|
13485
13734
|
}, labelControlProps), {
|
13486
13735
|
className: "Aquarium-NativeSelect"
|
13487
|
-
}), /* @__PURE__ */
|
13736
|
+
}), /* @__PURE__ */ React94.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
13488
13737
|
ref
|
13489
13738
|
}, baseProps), errorProps), {
|
13490
13739
|
id,
|
@@ -13498,73 +13747,73 @@ var NativeSelect = React93.forwardRef(
|
|
13498
13747
|
}
|
13499
13748
|
);
|
13500
13749
|
NativeSelect.displayName = "NativeSelect";
|
13501
|
-
var Option =
|
13750
|
+
var Option = React94.forwardRef((_a, ref) => {
|
13502
13751
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
13503
|
-
return /* @__PURE__ */
|
13752
|
+
return /* @__PURE__ */ React94.createElement("option", __spreadValues({
|
13504
13753
|
ref
|
13505
13754
|
}, props), children);
|
13506
13755
|
});
|
13507
13756
|
Option.displayName = "Option";
|
13508
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
13757
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React94.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React94.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React94.createElement("div", {
|
13509
13758
|
style: { height: "1px" }
|
13510
13759
|
}));
|
13511
13760
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
13512
13761
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
13513
13762
|
|
13514
13763
|
// src/molecules/Navigation/Navigation.tsx
|
13515
|
-
import
|
13764
|
+
import React96 from "react";
|
13516
13765
|
import classNames10 from "classnames";
|
13517
13766
|
|
13518
13767
|
// src/atoms/Navigation/Navigation.tsx
|
13519
|
-
import
|
13768
|
+
import React95 from "react";
|
13520
13769
|
var Navigation = (_a) => {
|
13521
13770
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
13522
|
-
return /* @__PURE__ */
|
13771
|
+
return /* @__PURE__ */ React95.createElement("nav", {
|
13523
13772
|
className: classNames(tw("bg-grey-0 h-full"))
|
13524
|
-
}, /* @__PURE__ */
|
13773
|
+
}, /* @__PURE__ */ React95.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
13525
13774
|
className: classNames(tw("flex flex-col h-full"), className),
|
13526
13775
|
role: "menubar"
|
13527
13776
|
}), children));
|
13528
13777
|
};
|
13529
13778
|
var Header = (_a) => {
|
13530
13779
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13531
|
-
return /* @__PURE__ */
|
13780
|
+
return /* @__PURE__ */ React95.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
13532
13781
|
role: "presentation",
|
13533
13782
|
className: classNames(tw("px-6 py-5"), className)
|
13534
13783
|
}));
|
13535
13784
|
};
|
13536
13785
|
var Footer = (_a) => {
|
13537
13786
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13538
|
-
return /* @__PURE__ */
|
13787
|
+
return /* @__PURE__ */ React95.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
13539
13788
|
role: "presentation",
|
13540
13789
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
13541
13790
|
}));
|
13542
13791
|
};
|
13543
13792
|
var Section2 = (_a) => {
|
13544
13793
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
13545
|
-
return /* @__PURE__ */
|
13794
|
+
return /* @__PURE__ */ React95.createElement("li", {
|
13546
13795
|
role: "presentation",
|
13547
13796
|
className: tw("py-5")
|
13548
|
-
}, title && /* @__PURE__ */
|
13797
|
+
}, title && /* @__PURE__ */ React95.createElement("div", {
|
13549
13798
|
className: classNames(className, "py-2 px-6 text-muted uppercase cursor-default typography-caption")
|
13550
|
-
}, title), /* @__PURE__ */
|
13799
|
+
}, title), /* @__PURE__ */ React95.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
13551
13800
|
role: "group",
|
13552
13801
|
className: classNames(tw("flex flex-col"), className)
|
13553
13802
|
})));
|
13554
13803
|
};
|
13555
13804
|
var Divider3 = (_a) => {
|
13556
13805
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13557
|
-
return /* @__PURE__ */
|
13806
|
+
return /* @__PURE__ */ React95.createElement("li", __spreadProps(__spreadValues({
|
13558
13807
|
role: "separator"
|
13559
13808
|
}, rest), {
|
13560
|
-
className: classNames(tw("border-t-2 border-
|
13809
|
+
className: classNames(tw("border-t-2 border-muted"), className)
|
13561
13810
|
}));
|
13562
13811
|
};
|
13563
13812
|
var Item5 = (_a) => {
|
13564
13813
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
13565
|
-
return /* @__PURE__ */
|
13814
|
+
return /* @__PURE__ */ React95.createElement("li", {
|
13566
13815
|
role: "presentation"
|
13567
|
-
}, /* @__PURE__ */
|
13816
|
+
}, /* @__PURE__ */ React95.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
13568
13817
|
role: "menuitem",
|
13569
13818
|
className: classNames(
|
13570
13819
|
tw("py-3 px-6 hover:bg-grey-5 cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -13584,7 +13833,7 @@ Navigation.Divider = Divider3;
|
|
13584
13833
|
// src/molecules/Navigation/Navigation.tsx
|
13585
13834
|
var Navigation2 = (_a) => {
|
13586
13835
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
13587
|
-
return /* @__PURE__ */
|
13836
|
+
return /* @__PURE__ */ React96.createElement(Navigation, __spreadValues({
|
13588
13837
|
className: classNames10("Aquarium-Navigation", className)
|
13589
13838
|
}, props));
|
13590
13839
|
};
|
@@ -13598,11 +13847,11 @@ var Item6 = (_a) => {
|
|
13598
13847
|
"icon",
|
13599
13848
|
"showNotification"
|
13600
13849
|
]);
|
13601
|
-
return /* @__PURE__ */
|
13850
|
+
return /* @__PURE__ */ React96.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React96.createElement(Badge.Notification, null, /* @__PURE__ */ React96.createElement(InlineIcon, {
|
13602
13851
|
icon,
|
13603
13852
|
width: "20px",
|
13604
13853
|
height: "20px"
|
13605
|
-
})), icon && !showNotification && /* @__PURE__ */
|
13854
|
+
})), icon && !showNotification && /* @__PURE__ */ React96.createElement(InlineIcon, {
|
13606
13855
|
icon,
|
13607
13856
|
width: "20px",
|
13608
13857
|
height: "20px"
|
@@ -13615,32 +13864,32 @@ Navigation2.Header = Navigation.Header;
|
|
13615
13864
|
Navigation2.Section = Navigation.Section;
|
13616
13865
|
|
13617
13866
|
// src/molecules/PageHeader/PageHeader.tsx
|
13618
|
-
import
|
13619
|
-
import
|
13867
|
+
import React98 from "react";
|
13868
|
+
import castArray5 from "lodash/castArray";
|
13620
13869
|
|
13621
13870
|
// src/atoms/PageHeader/PageHeader.tsx
|
13622
|
-
import
|
13871
|
+
import React97 from "react";
|
13623
13872
|
var PageHeader = (_a) => {
|
13624
13873
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13625
|
-
return /* @__PURE__ */
|
13874
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadValues({
|
13626
13875
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
13627
13876
|
}, rest), children);
|
13628
13877
|
};
|
13629
13878
|
PageHeader.Container = (_a) => {
|
13630
13879
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13631
|
-
return /* @__PURE__ */
|
13880
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadValues({
|
13632
13881
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
13633
13882
|
}, rest), children);
|
13634
13883
|
};
|
13635
13884
|
PageHeader.TitleContainer = (_a) => {
|
13636
13885
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13637
|
-
return /* @__PURE__ */
|
13886
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadValues({
|
13638
13887
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
13639
13888
|
}, rest), children);
|
13640
13889
|
};
|
13641
13890
|
PageHeader.Title = (_a) => {
|
13642
13891
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
13643
|
-
return /* @__PURE__ */
|
13892
|
+
return /* @__PURE__ */ React97.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
13644
13893
|
color: "grey-100",
|
13645
13894
|
variant: isSubHeader ? "subheading" : "heading",
|
13646
13895
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -13648,19 +13897,19 @@ PageHeader.Title = (_a) => {
|
|
13648
13897
|
};
|
13649
13898
|
PageHeader.Subtitle = (_a) => {
|
13650
13899
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13651
|
-
return /* @__PURE__ */
|
13900
|
+
return /* @__PURE__ */ React97.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
13652
13901
|
color: "grey-70"
|
13653
13902
|
}), children);
|
13654
13903
|
};
|
13655
13904
|
PageHeader.Chips = (_a) => {
|
13656
13905
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13657
|
-
return /* @__PURE__ */
|
13906
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadValues({
|
13658
13907
|
className: classNames(tw("flex gap-3"), className)
|
13659
13908
|
}, rest), children);
|
13660
13909
|
};
|
13661
13910
|
PageHeader.Actions = (_a) => {
|
13662
13911
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13663
|
-
return /* @__PURE__ */
|
13912
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadValues({
|
13664
13913
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
13665
13914
|
}, rest), children);
|
13666
13915
|
};
|
@@ -13684,63 +13933,64 @@ var CommonPageHeader = ({
|
|
13684
13933
|
onMenuOpenChange,
|
13685
13934
|
isSubHeader = false
|
13686
13935
|
}) => {
|
13687
|
-
return /* @__PURE__ */
|
13936
|
+
return /* @__PURE__ */ React98.createElement(PageHeader, {
|
13688
13937
|
className: "Aquarium-PageHeader"
|
13689
|
-
}, /* @__PURE__ */
|
13938
|
+
}, /* @__PURE__ */ React98.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React98.createElement(Box, {
|
13690
13939
|
marginBottom: "3"
|
13691
|
-
}, /* @__PURE__ */
|
13940
|
+
}, /* @__PURE__ */ React98.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React98.createElement(Spacing, {
|
13692
13941
|
row: true,
|
13693
13942
|
gap: "5"
|
13694
|
-
}, image && /* @__PURE__ */
|
13943
|
+
}, image && /* @__PURE__ */ React98.createElement("img", {
|
13695
13944
|
src: image,
|
13696
13945
|
alt: imageAlt != null ? imageAlt : "",
|
13697
13946
|
className: tw("w-[56px] h-[56px]")
|
13698
|
-
}), /* @__PURE__ */
|
13947
|
+
}), /* @__PURE__ */ React98.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React98.createElement(PageHeader.Title, {
|
13699
13948
|
isSubHeader
|
13700
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
13949
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React98.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React98.createElement(Chip2, {
|
13701
13950
|
key: chip,
|
13702
13951
|
dense: true,
|
13703
13952
|
text: chip
|
13704
|
-
}))), subtitle && /* @__PURE__ */
|
13953
|
+
}))), subtitle && /* @__PURE__ */ React98.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React98.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React98.createElement(Box.Flex, {
|
13705
13954
|
alignItems: "center"
|
13706
|
-
}, /* @__PURE__ */
|
13955
|
+
}, /* @__PURE__ */ React98.createElement(DropdownMenu2, {
|
13956
|
+
placement: defaultContextualMenuPlacement,
|
13707
13957
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13708
13958
|
onOpenChange: onMenuOpenChange
|
13709
|
-
}, /* @__PURE__ */
|
13959
|
+
}, /* @__PURE__ */ React98.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React98.createElement(Button.Icon, {
|
13710
13960
|
"aria-label": menuAriaLabel,
|
13711
13961
|
icon: import_more5.default
|
13712
|
-
})), menu)), secondaryActions &&
|
13962
|
+
})), menu)), secondaryActions && castArray5(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
13713
13963
|
};
|
13714
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
13964
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React98.createElement(CommonPageHeader, __spreadValues({}, props));
|
13715
13965
|
PageHeader2.displayName = "PageHeader";
|
13716
|
-
var SubHeader = (props) => /* @__PURE__ */
|
13966
|
+
var SubHeader = (props) => /* @__PURE__ */ React98.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
13717
13967
|
isSubHeader: true
|
13718
13968
|
}));
|
13719
13969
|
PageHeader2.SubHeader = SubHeader;
|
13720
13970
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
13721
13971
|
|
13722
13972
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
13723
|
-
import
|
13973
|
+
import React100 from "react";
|
13724
13974
|
import omit15 from "lodash/omit";
|
13725
13975
|
|
13726
13976
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
13727
|
-
import
|
13977
|
+
import React99 from "react";
|
13728
13978
|
var Header2 = (_a) => {
|
13729
13979
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13730
|
-
return /* @__PURE__ */
|
13980
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13731
13981
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
13732
13982
|
}), children);
|
13733
13983
|
};
|
13734
13984
|
var Title2 = (_a) => {
|
13735
13985
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13736
|
-
return /* @__PURE__ */
|
13986
|
+
return /* @__PURE__ */ React99.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
13737
13987
|
htmlTag: "h1",
|
13738
13988
|
variant: "small-strong"
|
13739
13989
|
}), children);
|
13740
13990
|
};
|
13741
13991
|
var Body = (_a) => {
|
13742
13992
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13743
|
-
return /* @__PURE__ */
|
13993
|
+
return /* @__PURE__ */ React99.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
13744
13994
|
htmlTag: "div",
|
13745
13995
|
variant: "caption",
|
13746
13996
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -13748,13 +13998,13 @@ var Body = (_a) => {
|
|
13748
13998
|
};
|
13749
13999
|
var Footer2 = (_a) => {
|
13750
14000
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13751
|
-
return /* @__PURE__ */
|
14001
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13752
14002
|
className: classNames(tw("p-5"), className)
|
13753
14003
|
}), children);
|
13754
14004
|
};
|
13755
14005
|
var Actions2 = (_a) => {
|
13756
14006
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13757
|
-
return /* @__PURE__ */
|
14007
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13758
14008
|
className: classNames(tw("flex gap-4"), className)
|
13759
14009
|
}), children);
|
13760
14010
|
};
|
@@ -13770,13 +14020,13 @@ var PopoverDialog = {
|
|
13770
14020
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
13771
14021
|
const wrapPromptWithBody = (child) => {
|
13772
14022
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
13773
|
-
return /* @__PURE__ */
|
14023
|
+
return /* @__PURE__ */ React100.createElement(Popover2.Panel, {
|
13774
14024
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
13775
|
-
}, /* @__PURE__ */
|
14025
|
+
}, /* @__PURE__ */ React100.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React100.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React100.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React100.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React100.createElement(Popover2.Button, __spreadValues({
|
13776
14026
|
kind: "secondary-ghost",
|
13777
14027
|
key: secondaryAction.text,
|
13778
14028
|
dense: true
|
13779
|
-
}, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
14029
|
+
}, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React100.createElement(Popover2.Button, __spreadValues({
|
13780
14030
|
kind: "ghost",
|
13781
14031
|
key: primaryAction.text,
|
13782
14032
|
dense: true
|
@@ -13784,15 +14034,15 @@ var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction,
|
|
13784
14034
|
}
|
13785
14035
|
return child;
|
13786
14036
|
};
|
13787
|
-
return /* @__PURE__ */
|
14037
|
+
return /* @__PURE__ */ React100.createElement(Popover2, {
|
13788
14038
|
type: "dialog",
|
13789
14039
|
isOpen: open,
|
13790
14040
|
placement,
|
13791
14041
|
containFocus: true
|
13792
|
-
},
|
14042
|
+
}, React100.Children.map(children, wrapPromptWithBody));
|
13793
14043
|
};
|
13794
14044
|
PopoverDialog2.Trigger = Popover2.Trigger;
|
13795
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
14045
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React100.createElement(PopoverDialog.Body, null, children);
|
13796
14046
|
Prompt.displayName = "PopoverDialog.Prompt";
|
13797
14047
|
PopoverDialog2.Prompt = Prompt;
|
13798
14048
|
|
@@ -13801,14 +14051,14 @@ import { createPortal } from "react-dom";
|
|
13801
14051
|
var Portal = ({ children, to }) => createPortal(children, to);
|
13802
14052
|
|
13803
14053
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
13804
|
-
import
|
14054
|
+
import React102 from "react";
|
13805
14055
|
|
13806
14056
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
13807
|
-
import
|
14057
|
+
import React101 from "react";
|
13808
14058
|
import clamp3 from "lodash/clamp";
|
13809
14059
|
var ProgressBar = (_a) => {
|
13810
14060
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13811
|
-
return /* @__PURE__ */
|
14061
|
+
return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13812
14062
|
className: classNames(
|
13813
14063
|
tw("relative flex items-center w-full bg-grey-0 h-2 rounded-full overflow-hidden"),
|
13814
14064
|
className
|
@@ -13824,7 +14074,7 @@ var STATUS_COLORS = {
|
|
13824
14074
|
ProgressBar.Indicator = (_a) => {
|
13825
14075
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
13826
14076
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
13827
|
-
return /* @__PURE__ */
|
14077
|
+
return /* @__PURE__ */ React101.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13828
14078
|
className: classNames(
|
13829
14079
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
13830
14080
|
STATUS_COLORS[status],
|
@@ -13840,11 +14090,11 @@ ProgressBar.Indicator = (_a) => {
|
|
13840
14090
|
};
|
13841
14091
|
ProgressBar.Labels = (_a) => {
|
13842
14092
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
13843
|
-
return /* @__PURE__ */
|
14093
|
+
return /* @__PURE__ */ React101.createElement("div", {
|
13844
14094
|
className: classNames(tw("flex flex-row"), className)
|
13845
|
-
}, /* @__PURE__ */
|
14095
|
+
}, /* @__PURE__ */ React101.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13846
14096
|
className: tw("grow text-default typography-caption")
|
13847
|
-
}), startLabel), /* @__PURE__ */
|
14097
|
+
}), startLabel), /* @__PURE__ */ React101.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13848
14098
|
className: tw("grow text-default typography-caption text-right")
|
13849
14099
|
}), endLabel));
|
13850
14100
|
};
|
@@ -13862,7 +14112,7 @@ var ProgressBar2 = (props) => {
|
|
13862
14112
|
if (min > max) {
|
13863
14113
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
13864
14114
|
}
|
13865
|
-
const progress = /* @__PURE__ */
|
14115
|
+
const progress = /* @__PURE__ */ React102.createElement(ProgressBar, null, /* @__PURE__ */ React102.createElement(ProgressBar.Indicator, {
|
13866
14116
|
status: value === max ? completedStatus : progresStatus,
|
13867
14117
|
min,
|
13868
14118
|
max,
|
@@ -13872,15 +14122,15 @@ var ProgressBar2 = (props) => {
|
|
13872
14122
|
if (props.dense) {
|
13873
14123
|
return progress;
|
13874
14124
|
}
|
13875
|
-
return /* @__PURE__ */
|
14125
|
+
return /* @__PURE__ */ React102.createElement("div", {
|
13876
14126
|
className: "Aquarium-ProgressBar"
|
13877
|
-
}, progress, /* @__PURE__ */
|
14127
|
+
}, progress, /* @__PURE__ */ React102.createElement(ProgressBar.Labels, {
|
13878
14128
|
className: tw("py-2"),
|
13879
14129
|
startLabel: props.startLabel,
|
13880
14130
|
endLabel: props.endLabel
|
13881
14131
|
}));
|
13882
14132
|
};
|
13883
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
14133
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React102.createElement(Skeleton, {
|
13884
14134
|
height: 4,
|
13885
14135
|
display: "block"
|
13886
14136
|
});
|
@@ -13888,13 +14138,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
13888
14138
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
13889
14139
|
|
13890
14140
|
// src/molecules/RadioButton/RadioButton.tsx
|
13891
|
-
import
|
13892
|
-
var RadioButton2 =
|
14141
|
+
import React103 from "react";
|
14142
|
+
var RadioButton2 = React103.forwardRef(
|
13893
14143
|
(_a, ref) => {
|
13894
14144
|
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"]);
|
13895
14145
|
var _a2;
|
13896
14146
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
13897
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
14147
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React103.createElement(ControlLabel, {
|
13898
14148
|
htmlFor: id,
|
13899
14149
|
label: children,
|
13900
14150
|
"aria-label": ariaLabel,
|
@@ -13903,7 +14153,7 @@ var RadioButton2 = React102.forwardRef(
|
|
13903
14153
|
disabled,
|
13904
14154
|
style: { gap: "0 8px" },
|
13905
14155
|
className: "Aquarium-RadioButton"
|
13906
|
-
}, !readOnly && /* @__PURE__ */
|
14156
|
+
}, !readOnly && /* @__PURE__ */ React103.createElement(RadioButton, __spreadProps(__spreadValues({
|
13907
14157
|
id,
|
13908
14158
|
ref,
|
13909
14159
|
name
|
@@ -13914,12 +14164,12 @@ var RadioButton2 = React102.forwardRef(
|
|
13914
14164
|
}
|
13915
14165
|
);
|
13916
14166
|
RadioButton2.displayName = "RadioButton";
|
13917
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
14167
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React103.createElement("div", {
|
13918
14168
|
className: tw("flex gap-3")
|
13919
|
-
}, /* @__PURE__ */
|
14169
|
+
}, /* @__PURE__ */ React103.createElement(Skeleton, {
|
13920
14170
|
height: 20,
|
13921
14171
|
width: 20
|
13922
|
-
}), /* @__PURE__ */
|
14172
|
+
}), /* @__PURE__ */ React103.createElement(Skeleton, {
|
13923
14173
|
height: 20,
|
13924
14174
|
width: 150
|
13925
14175
|
}));
|
@@ -13927,10 +14177,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
13927
14177
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
13928
14178
|
|
13929
14179
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
13930
|
-
import
|
14180
|
+
import React104 from "react";
|
13931
14181
|
import { useId as useId15 } from "@react-aria/utils";
|
13932
14182
|
var isRadioButton = (c) => {
|
13933
|
-
return
|
14183
|
+
return React104.isValidElement(c) && c.type === RadioButton2;
|
13934
14184
|
};
|
13935
14185
|
var RadioButtonGroup = (_a) => {
|
13936
14186
|
var _b = _a, {
|
@@ -13953,7 +14203,7 @@ var RadioButtonGroup = (_a) => {
|
|
13953
14203
|
"children"
|
13954
14204
|
]);
|
13955
14205
|
var _a2;
|
13956
|
-
const [value, setValue] =
|
14206
|
+
const [value, setValue] = React104.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
13957
14207
|
const errorMessageId = useId15();
|
13958
14208
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13959
14209
|
const labelControlProps = getLabelControlProps(props);
|
@@ -13964,14 +14214,14 @@ var RadioButtonGroup = (_a) => {
|
|
13964
14214
|
setValue(e.target.value);
|
13965
14215
|
onChange == null ? void 0 : onChange(e.target.value);
|
13966
14216
|
};
|
13967
|
-
const content =
|
14217
|
+
const content = React104.Children.map(children, (c) => {
|
13968
14218
|
var _a3, _b2, _c;
|
13969
14219
|
if (!isRadioButton(c)) {
|
13970
14220
|
return null;
|
13971
14221
|
}
|
13972
14222
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
13973
14223
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
13974
|
-
return
|
14224
|
+
return React104.cloneElement(c, {
|
13975
14225
|
name,
|
13976
14226
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
13977
14227
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -13980,13 +14230,13 @@ var RadioButtonGroup = (_a) => {
|
|
13980
14230
|
readOnly
|
13981
14231
|
});
|
13982
14232
|
});
|
13983
|
-
return /* @__PURE__ */
|
14233
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
13984
14234
|
fieldset: true
|
13985
14235
|
}, labelControlProps), errorProps), {
|
13986
14236
|
className: "Aquarium-RadioButtonGroup"
|
13987
|
-
}), cols && /* @__PURE__ */
|
14237
|
+
}), cols && /* @__PURE__ */ React104.createElement(InputGroup, {
|
13988
14238
|
cols
|
13989
|
-
}, content), !cols && /* @__PURE__ */
|
14239
|
+
}, content), !cols && /* @__PURE__ */ React104.createElement(Flexbox, {
|
13990
14240
|
direction,
|
13991
14241
|
alignItems: "flex-start",
|
13992
14242
|
colGap: "8",
|
@@ -13995,12 +14245,12 @@ var RadioButtonGroup = (_a) => {
|
|
13995
14245
|
}, content));
|
13996
14246
|
};
|
13997
14247
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
13998
|
-
return /* @__PURE__ */
|
14248
|
+
return /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement("div", {
|
13999
14249
|
className: tw("flex flex-wrap", {
|
14000
14250
|
"flex-row gap-8": direction === "row",
|
14001
14251
|
"flex-col gap-2": direction === "column"
|
14002
14252
|
})
|
14003
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
14253
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React104.createElement(RadioButton2.Skeleton, {
|
14004
14254
|
key
|
14005
14255
|
}))));
|
14006
14256
|
};
|
@@ -14008,24 +14258,24 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
14008
14258
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
14009
14259
|
|
14010
14260
|
// src/molecules/Section/Section.tsx
|
14011
|
-
import
|
14261
|
+
import React109 from "react";
|
14012
14262
|
import { useId as useId16 } from "@react-aria/utils";
|
14013
14263
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
14014
|
-
import
|
14264
|
+
import castArray6 from "lodash/castArray";
|
14015
14265
|
import isUndefined9 from "lodash/isUndefined";
|
14016
14266
|
|
14017
14267
|
// src/molecules/Switch/Switch.tsx
|
14018
|
-
import
|
14268
|
+
import React106 from "react";
|
14019
14269
|
|
14020
14270
|
// src/atoms/Switch/Switch.tsx
|
14021
|
-
import
|
14271
|
+
import React105 from "react";
|
14022
14272
|
var import_ban2 = __toESM(require_ban());
|
14023
|
-
var Switch =
|
14273
|
+
var Switch = React105.forwardRef(
|
14024
14274
|
(_a, ref) => {
|
14025
14275
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
14026
|
-
return /* @__PURE__ */
|
14276
|
+
return /* @__PURE__ */ React105.createElement("span", {
|
14027
14277
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
14028
|
-
}, /* @__PURE__ */
|
14278
|
+
}, /* @__PURE__ */ React105.createElement("input", __spreadProps(__spreadValues({
|
14029
14279
|
id,
|
14030
14280
|
ref,
|
14031
14281
|
type: "checkbox",
|
@@ -14044,7 +14294,7 @@ var Switch = React104.forwardRef(
|
|
14044
14294
|
),
|
14045
14295
|
readOnly,
|
14046
14296
|
disabled
|
14047
|
-
})), /* @__PURE__ */
|
14297
|
+
})), /* @__PURE__ */ React105.createElement("span", {
|
14048
14298
|
className: tw(
|
14049
14299
|
"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",
|
14050
14300
|
"bg-white left-2 peer-checked/switch:left-1 text-grey-30 peer-checked/switch:text-primary-60",
|
@@ -14052,7 +14302,7 @@ var Switch = React104.forwardRef(
|
|
14052
14302
|
"shadow-4dp": !disabled
|
14053
14303
|
}
|
14054
14304
|
)
|
14055
|
-
}, disabled && /* @__PURE__ */
|
14305
|
+
}, disabled && /* @__PURE__ */ React105.createElement(Icon, {
|
14056
14306
|
icon: import_ban2.default,
|
14057
14307
|
width: "10px",
|
14058
14308
|
height: "10px"
|
@@ -14061,7 +14311,7 @@ var Switch = React104.forwardRef(
|
|
14061
14311
|
);
|
14062
14312
|
|
14063
14313
|
// src/molecules/Switch/Switch.tsx
|
14064
|
-
var Switch2 =
|
14314
|
+
var Switch2 = React106.forwardRef(
|
14065
14315
|
(_a, ref) => {
|
14066
14316
|
var _b = _a, {
|
14067
14317
|
id,
|
@@ -14084,7 +14334,7 @@ var Switch2 = React105.forwardRef(
|
|
14084
14334
|
]);
|
14085
14335
|
var _a2;
|
14086
14336
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
14087
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
14337
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React106.createElement(ControlLabel, {
|
14088
14338
|
htmlFor: id,
|
14089
14339
|
label: children,
|
14090
14340
|
"aria-label": ariaLabel,
|
@@ -14094,7 +14344,7 @@ var Switch2 = React105.forwardRef(
|
|
14094
14344
|
style: { gap: "0 8px" },
|
14095
14345
|
labelPlacement,
|
14096
14346
|
className: "Aquarium-Switch"
|
14097
|
-
}, !readOnly && /* @__PURE__ */
|
14347
|
+
}, !readOnly && /* @__PURE__ */ React106.createElement(Switch, __spreadProps(__spreadValues({
|
14098
14348
|
id,
|
14099
14349
|
ref,
|
14100
14350
|
name
|
@@ -14105,12 +14355,12 @@ var Switch2 = React105.forwardRef(
|
|
14105
14355
|
}
|
14106
14356
|
);
|
14107
14357
|
Switch2.displayName = "Switch";
|
14108
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
14358
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React106.createElement("div", {
|
14109
14359
|
className: tw("flex gap-3")
|
14110
|
-
}, /* @__PURE__ */
|
14360
|
+
}, /* @__PURE__ */ React106.createElement(Skeleton, {
|
14111
14361
|
height: 20,
|
14112
14362
|
width: 35
|
14113
|
-
}), /* @__PURE__ */
|
14363
|
+
}), /* @__PURE__ */ React106.createElement(Skeleton, {
|
14114
14364
|
height: 20,
|
14115
14365
|
width: 150
|
14116
14366
|
}));
|
@@ -14118,7 +14368,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
14118
14368
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
14119
14369
|
|
14120
14370
|
// src/molecules/TagLabel/TagLabel.tsx
|
14121
|
-
import
|
14371
|
+
import React107 from "react";
|
14122
14372
|
var getVariantClassNames = (variant = "primary") => {
|
14123
14373
|
switch (variant) {
|
14124
14374
|
case "danger":
|
@@ -14132,7 +14382,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
14132
14382
|
};
|
14133
14383
|
var TagLabel = (_a) => {
|
14134
14384
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
14135
|
-
return /* @__PURE__ */
|
14385
|
+
return /* @__PURE__ */ React107.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14136
14386
|
className: classNames(
|
14137
14387
|
"Aquarium-TagLabel",
|
14138
14388
|
getVariantClassNames(variant),
|
@@ -14145,11 +14395,11 @@ var TagLabel = (_a) => {
|
|
14145
14395
|
};
|
14146
14396
|
|
14147
14397
|
// src/atoms/Section/Section.tsx
|
14148
|
-
import
|
14398
|
+
import React108 from "react";
|
14149
14399
|
var import_caretUp2 = __toESM(require_caretUp());
|
14150
14400
|
var Section3 = (_a) => {
|
14151
14401
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14152
|
-
return /* @__PURE__ */
|
14402
|
+
return /* @__PURE__ */ React108.createElement(Box, __spreadValues({
|
14153
14403
|
component: "section",
|
14154
14404
|
borderColor: "grey-5",
|
14155
14405
|
borderWidth: "1px"
|
@@ -14157,7 +14407,7 @@ var Section3 = (_a) => {
|
|
14157
14407
|
};
|
14158
14408
|
Section3.Header = (_a) => {
|
14159
14409
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
14160
|
-
return /* @__PURE__ */
|
14410
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14161
14411
|
className: classNames(
|
14162
14412
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-grey-0": expanded }),
|
14163
14413
|
className
|
@@ -14166,21 +14416,21 @@ Section3.Header = (_a) => {
|
|
14166
14416
|
};
|
14167
14417
|
Section3.TitleContainer = (_a) => {
|
14168
14418
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
14169
|
-
return /* @__PURE__ */
|
14419
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14170
14420
|
className: classNames(
|
14171
14421
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", { "cursor-pointer": collapsible }),
|
14172
14422
|
className
|
14173
14423
|
)
|
14174
14424
|
}), children);
|
14175
14425
|
};
|
14176
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
14426
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React108.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
14177
14427
|
icon: import_caretUp2.default,
|
14178
14428
|
height: 22,
|
14179
14429
|
width: 22
|
14180
14430
|
}));
|
14181
14431
|
Section3.Title = (_a) => {
|
14182
14432
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14183
|
-
return /* @__PURE__ */
|
14433
|
+
return /* @__PURE__ */ React108.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
14184
14434
|
htmlTag: "h2",
|
14185
14435
|
color: "black",
|
14186
14436
|
className: "flex gap-3 items-center"
|
@@ -14188,21 +14438,21 @@ Section3.Title = (_a) => {
|
|
14188
14438
|
};
|
14189
14439
|
Section3.Subtitle = (_a) => {
|
14190
14440
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14191
|
-
return /* @__PURE__ */
|
14441
|
+
return /* @__PURE__ */ React108.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
14192
14442
|
color: "grey-70"
|
14193
14443
|
}), children);
|
14194
14444
|
};
|
14195
14445
|
Section3.Actions = (_a) => {
|
14196
14446
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14197
|
-
return /* @__PURE__ */
|
14447
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14198
14448
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
14199
14449
|
}), children);
|
14200
14450
|
};
|
14201
14451
|
Section3.Body = (_a) => {
|
14202
14452
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14203
|
-
return /* @__PURE__ */
|
14453
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14204
14454
|
className: classNames(tw("p-6"), className)
|
14205
|
-
}), /* @__PURE__ */
|
14455
|
+
}), /* @__PURE__ */ React108.createElement(Typography, {
|
14206
14456
|
htmlTag: "div",
|
14207
14457
|
color: "grey-70"
|
14208
14458
|
}, children));
|
@@ -14216,7 +14466,7 @@ var Section4 = (props) => {
|
|
14216
14466
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
14217
14467
|
const _collapsed = title ? props.collapsed : void 0;
|
14218
14468
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
14219
|
-
const [isCollapsed, setCollapsed] =
|
14469
|
+
const [isCollapsed, setCollapsed] = React109.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
14220
14470
|
const [ref, { height }] = useMeasure();
|
14221
14471
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
14222
14472
|
const menuAriaLabel = title ? (_e = (_d = props.menuAriaLabel) != null ? _d : props.menuLabel) != null ? _e : "Context menu" : void 0;
|
@@ -14251,60 +14501,61 @@ var Section4 = (props) => {
|
|
14251
14501
|
const regionId = useId16();
|
14252
14502
|
const titleId = useId16();
|
14253
14503
|
const hasTabs = isComponentType(children, Tabs);
|
14254
|
-
return /* @__PURE__ */
|
14504
|
+
return /* @__PURE__ */ React109.createElement(Section3, {
|
14255
14505
|
"aria-label": title,
|
14256
14506
|
className: "Aquarium-Section"
|
14257
|
-
}, title && /* @__PURE__ */
|
14507
|
+
}, title && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Section3.Header, {
|
14258
14508
|
expanded: _collapsible && !isCollapsed
|
14259
|
-
}, /* @__PURE__ */
|
14509
|
+
}, /* @__PURE__ */ React109.createElement(Section3.TitleContainer, {
|
14260
14510
|
role: _collapsible ? "button" : void 0,
|
14261
14511
|
id: toggleId,
|
14262
14512
|
collapsible: _collapsible,
|
14263
14513
|
onClick: handleTitleClick,
|
14264
14514
|
"aria-expanded": _collapsible ? !isCollapsed : void 0,
|
14265
14515
|
"aria-controls": _collapsible ? regionId : void 0
|
14266
|
-
}, _collapsible && /* @__PURE__ */
|
14516
|
+
}, _collapsible && /* @__PURE__ */ React109.createElement(animated5.div, {
|
14267
14517
|
style: { transform }
|
14268
|
-
}, /* @__PURE__ */
|
14518
|
+
}, /* @__PURE__ */ React109.createElement(Section3.Toggle, null)), /* @__PURE__ */ React109.createElement(Section3.Title, {
|
14269
14519
|
id: titleId
|
14270
|
-
}, /* @__PURE__ */
|
14520
|
+
}, /* @__PURE__ */ React109.createElement(LineClamp2, {
|
14271
14521
|
lines: 1
|
14272
|
-
}, title), props.tag && /* @__PURE__ */
|
14522
|
+
}, title), props.tag && /* @__PURE__ */ React109.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React109.createElement(Chip2, {
|
14273
14523
|
text: props.badge
|
14274
|
-
}), props.chip && /* @__PURE__ */
|
14524
|
+
}), props.chip && /* @__PURE__ */ React109.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React109.createElement(Section3.Subtitle, {
|
14275
14525
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
14276
|
-
}, /* @__PURE__ */
|
14526
|
+
}, /* @__PURE__ */ React109.createElement(LineClamp2, {
|
14277
14527
|
lines: 1
|
14278
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
14528
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React109.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React109.createElement(Box.Flex, {
|
14279
14529
|
alignItems: "center"
|
14280
|
-
}, /* @__PURE__ */
|
14530
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2, {
|
14281
14531
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
14282
|
-
onOpenChange: onMenuOpenChange
|
14283
|
-
|
14532
|
+
onOpenChange: onMenuOpenChange,
|
14533
|
+
placement: defaultContextualMenuPlacement
|
14534
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React109.createElement(Button.Icon, {
|
14284
14535
|
"aria-label": menuAriaLabel,
|
14285
14536
|
icon: import_more6.default
|
14286
|
-
})), menu)), props.actions &&
|
14537
|
+
})), menu)), props.actions && castArray6(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React109.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React109.createElement(SelectBase, __spreadValues({
|
14287
14538
|
"aria-labelledby": titleId
|
14288
|
-
}, props.select)))), !hasTabs && /* @__PURE__ */
|
14539
|
+
}, props.select)))), !hasTabs && /* @__PURE__ */ React109.createElement(animated5.div, {
|
14289
14540
|
className: tw(`h-[1px]`),
|
14290
14541
|
style: { backgroundColor }
|
14291
|
-
})), /* @__PURE__ */
|
14542
|
+
})), /* @__PURE__ */ React109.createElement(animated5.div, {
|
14292
14543
|
id: regionId,
|
14293
14544
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
14294
14545
|
style: spring,
|
14295
14546
|
className: tw({ "overflow-hidden": _collapsible })
|
14296
|
-
}, /* @__PURE__ */
|
14547
|
+
}, /* @__PURE__ */ React109.createElement("div", {
|
14297
14548
|
ref
|
14298
|
-
}, hasTabs ? /* @__PURE__ */
|
14549
|
+
}, hasTabs ? /* @__PURE__ */ React109.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
14299
14550
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto", { "mt-4": _collapsible })
|
14300
|
-
})) : /* @__PURE__ */
|
14551
|
+
})) : /* @__PURE__ */ React109.createElement(Section3.Body, null, children))));
|
14301
14552
|
};
|
14302
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
14553
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React109.createElement(Section3.Body, null, children.find(
|
14303
14554
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
14304
14555
|
)));
|
14305
14556
|
|
14306
14557
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
14307
|
-
import
|
14558
|
+
import React110 from "react";
|
14308
14559
|
var SegmentedControl = (_a) => {
|
14309
14560
|
var _b = _a, {
|
14310
14561
|
children,
|
@@ -14321,7 +14572,7 @@ var SegmentedControl = (_a) => {
|
|
14321
14572
|
"selected",
|
14322
14573
|
"className"
|
14323
14574
|
]);
|
14324
|
-
return /* @__PURE__ */
|
14575
|
+
return /* @__PURE__ */ React110.createElement("li", null, /* @__PURE__ */ React110.createElement("button", __spreadProps(__spreadValues({
|
14325
14576
|
type: "button"
|
14326
14577
|
}, rest), {
|
14327
14578
|
className: classNames(
|
@@ -14352,15 +14603,15 @@ var SegmentedControlGroup = (_a) => {
|
|
14352
14603
|
"ariaLabel"
|
14353
14604
|
]);
|
14354
14605
|
const classes2 = tw("rounded flex", {
|
14355
|
-
"border border-
|
14606
|
+
"border border-default text-grey-50": variant === "outlined",
|
14356
14607
|
"bg-grey-0": variant === "raised"
|
14357
14608
|
});
|
14358
|
-
return /* @__PURE__ */
|
14609
|
+
return /* @__PURE__ */ React110.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14359
14610
|
"aria-label": ariaLabel,
|
14360
14611
|
className: classNames("Aquarium-SegmentedControl", classes2, className)
|
14361
|
-
}),
|
14612
|
+
}), React110.Children.map(
|
14362
14613
|
children,
|
14363
|
-
(child) =>
|
14614
|
+
(child) => React110.cloneElement(child, {
|
14364
14615
|
dense,
|
14365
14616
|
variant,
|
14366
14617
|
onClick: () => onChange(child.props.value),
|
@@ -14398,14 +14649,14 @@ var getCommonClassNames = (dense, selected) => tw(
|
|
14398
14649
|
);
|
14399
14650
|
|
14400
14651
|
// src/molecules/Stepper/Stepper.tsx
|
14401
|
-
import
|
14652
|
+
import React112 from "react";
|
14402
14653
|
|
14403
14654
|
// src/atoms/Stepper/Stepper.tsx
|
14404
|
-
import
|
14655
|
+
import React111 from "react";
|
14405
14656
|
var import_tick6 = __toESM(require_tick());
|
14406
14657
|
var Stepper = (_a) => {
|
14407
14658
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14408
|
-
return /* @__PURE__ */
|
14659
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14409
14660
|
className: classNames(className)
|
14410
14661
|
}));
|
14411
14662
|
};
|
@@ -14419,7 +14670,7 @@ var ConnectorContainer = (_a) => {
|
|
14419
14670
|
"completed",
|
14420
14671
|
"dense"
|
14421
14672
|
]);
|
14422
|
-
return /* @__PURE__ */
|
14673
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14423
14674
|
className: classNames(
|
14424
14675
|
tw("absolute w-full -left-1/2", {
|
14425
14676
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -14431,7 +14682,7 @@ var ConnectorContainer = (_a) => {
|
|
14431
14682
|
};
|
14432
14683
|
var Connector = (_a) => {
|
14433
14684
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
14434
|
-
return /* @__PURE__ */
|
14685
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14435
14686
|
className: classNames(
|
14436
14687
|
tw("w-full", {
|
14437
14688
|
"bg-grey-20": !completed,
|
@@ -14445,7 +14696,7 @@ var Connector = (_a) => {
|
|
14445
14696
|
};
|
14446
14697
|
var Step = (_a) => {
|
14447
14698
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
14448
|
-
return /* @__PURE__ */
|
14699
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14449
14700
|
className: classNames(
|
14450
14701
|
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
14451
14702
|
"text-grey-20": state === "inactive"
|
@@ -14456,7 +14707,7 @@ var Step = (_a) => {
|
|
14456
14707
|
};
|
14457
14708
|
var getClassNames = (state) => tw("h-[32px] w-[32px] border-2", {
|
14458
14709
|
"border-grey-90 bg-white": state === "active",
|
14459
|
-
"border-
|
14710
|
+
"border-default bg-white": state === "inactive",
|
14460
14711
|
"text-white bg-success-70 border-success-70": state === "completed"
|
14461
14712
|
});
|
14462
14713
|
var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
@@ -14466,13 +14717,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
14466
14717
|
});
|
14467
14718
|
var Indicator = (_a) => {
|
14468
14719
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
14469
|
-
return /* @__PURE__ */
|
14720
|
+
return /* @__PURE__ */ React111.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14470
14721
|
className: classNames(
|
14471
14722
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
14472
14723
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
14473
14724
|
className
|
14474
14725
|
)
|
14475
|
-
}), state === "completed" ? /* @__PURE__ */
|
14726
|
+
}), state === "completed" ? /* @__PURE__ */ React111.createElement(InlineIcon, {
|
14476
14727
|
icon: import_tick6.default
|
14477
14728
|
}) : dense ? null : children);
|
14478
14729
|
};
|
@@ -14483,26 +14734,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
14483
14734
|
|
14484
14735
|
// src/molecules/Stepper/Stepper.tsx
|
14485
14736
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
14486
|
-
const steps =
|
14487
|
-
return /* @__PURE__ */
|
14737
|
+
const steps = React112.Children.count(children);
|
14738
|
+
return /* @__PURE__ */ React112.createElement(Stepper, {
|
14488
14739
|
role: "list",
|
14489
14740
|
className: "Aquarium-Stepper"
|
14490
|
-
}, /* @__PURE__ */
|
14741
|
+
}, /* @__PURE__ */ React112.createElement(Template, {
|
14491
14742
|
columns: steps
|
14492
|
-
},
|
14743
|
+
}, React112.Children.map(children, (child, index) => {
|
14493
14744
|
if (!isComponentType(child, Step2)) {
|
14494
14745
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
14495
14746
|
} else {
|
14496
14747
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
14497
|
-
return /* @__PURE__ */
|
14748
|
+
return /* @__PURE__ */ React112.createElement(Stepper.Step, {
|
14498
14749
|
state,
|
14499
14750
|
"aria-current": state === "active" ? "step" : false,
|
14500
14751
|
role: "listitem"
|
14501
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
14752
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React112.createElement(Stepper.ConnectorContainer, {
|
14502
14753
|
dense
|
14503
|
-
}, /* @__PURE__ */
|
14754
|
+
}, /* @__PURE__ */ React112.createElement(Stepper.ConnectorContainer.Connector, {
|
14504
14755
|
completed: state === "completed" || state === "active"
|
14505
|
-
})), /* @__PURE__ */
|
14756
|
+
})), /* @__PURE__ */ React112.createElement(Stepper.Step.Indicator, {
|
14506
14757
|
state,
|
14507
14758
|
dense
|
14508
14759
|
}, index + 1), child.props.children);
|
@@ -14515,7 +14766,7 @@ Step2.displayName = "Stepper.Step";
|
|
14515
14766
|
Stepper2.Step = Step2;
|
14516
14767
|
|
14517
14768
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
14518
|
-
import
|
14769
|
+
import React113, { useState as useState13 } from "react";
|
14519
14770
|
import { useId as useId17 } from "@react-aria/utils";
|
14520
14771
|
var SwitchGroup = (_a) => {
|
14521
14772
|
var _b = _a, {
|
@@ -14547,13 +14798,13 @@ var SwitchGroup = (_a) => {
|
|
14547
14798
|
setSelectedItems(updated);
|
14548
14799
|
onChange == null ? void 0 : onChange(updated);
|
14549
14800
|
};
|
14550
|
-
return /* @__PURE__ */
|
14801
|
+
return /* @__PURE__ */ React113.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
14551
14802
|
fieldset: true
|
14552
14803
|
}, labelControlProps), errorProps), {
|
14553
14804
|
className: "Aquarium-SwitchGroup"
|
14554
|
-
}), /* @__PURE__ */
|
14805
|
+
}), /* @__PURE__ */ React113.createElement(InputGroup, {
|
14555
14806
|
cols
|
14556
|
-
},
|
14807
|
+
}, React113.Children.map(children, (c) => {
|
14557
14808
|
var _a3, _b2, _c, _d;
|
14558
14809
|
if (!isComponentType(c, Switch2)) {
|
14559
14810
|
return null;
|
@@ -14561,7 +14812,7 @@ var SwitchGroup = (_a) => {
|
|
14561
14812
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
14562
14813
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
14563
14814
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
14564
|
-
return
|
14815
|
+
return React113.cloneElement(c, {
|
14565
14816
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
14566
14817
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
14567
14818
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -14571,9 +14822,9 @@ var SwitchGroup = (_a) => {
|
|
14571
14822
|
})));
|
14572
14823
|
};
|
14573
14824
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
14574
|
-
return /* @__PURE__ */
|
14825
|
+
return /* @__PURE__ */ React113.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React113.createElement("div", {
|
14575
14826
|
className: tw("flex flex-wrap flex-col gap-2")
|
14576
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
14827
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React113.createElement(Switch2.Skeleton, {
|
14577
14828
|
key
|
14578
14829
|
}))));
|
14579
14830
|
};
|
@@ -14581,14 +14832,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
14581
14832
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
14582
14833
|
|
14583
14834
|
// src/molecules/Textarea/Textarea.tsx
|
14584
|
-
import
|
14835
|
+
import React114, { useState as useState14 } from "react";
|
14585
14836
|
import { useId as useId18 } from "@react-aria/utils";
|
14586
14837
|
import omit16 from "lodash/omit";
|
14587
14838
|
import toString2 from "lodash/toString";
|
14588
|
-
var TextareaBase =
|
14839
|
+
var TextareaBase = React114.forwardRef(
|
14589
14840
|
(_a, ref) => {
|
14590
14841
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
14591
|
-
return /* @__PURE__ */
|
14842
|
+
return /* @__PURE__ */ React114.createElement("textarea", __spreadProps(__spreadValues({
|
14592
14843
|
ref
|
14593
14844
|
}, props), {
|
14594
14845
|
readOnly,
|
@@ -14596,10 +14847,10 @@ var TextareaBase = React113.forwardRef(
|
|
14596
14847
|
}));
|
14597
14848
|
}
|
14598
14849
|
);
|
14599
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
14850
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React114.createElement(Skeleton, {
|
14600
14851
|
height: 58
|
14601
14852
|
});
|
14602
|
-
var Textarea =
|
14853
|
+
var Textarea = React114.forwardRef((props, ref) => {
|
14603
14854
|
var _a, _b, _c;
|
14604
14855
|
const [value, setValue] = useState14((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
14605
14856
|
const defaultId = useId18();
|
@@ -14608,14 +14859,14 @@ var Textarea = React113.forwardRef((props, ref) => {
|
|
14608
14859
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14609
14860
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
14610
14861
|
const baseProps = omit16(props, Object.keys(labelControlProps));
|
14611
|
-
return /* @__PURE__ */
|
14862
|
+
return /* @__PURE__ */ React114.createElement(LabelControl, __spreadProps(__spreadValues({
|
14612
14863
|
id: `${id}-label`,
|
14613
14864
|
htmlFor: id,
|
14614
14865
|
messageId: errorMessageId,
|
14615
14866
|
length: value !== void 0 ? toString2(value).length : void 0
|
14616
14867
|
}, labelControlProps), {
|
14617
14868
|
className: "Aquarium-Textarea"
|
14618
|
-
}), /* @__PURE__ */
|
14869
|
+
}), /* @__PURE__ */ React114.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
14619
14870
|
ref
|
14620
14871
|
}, baseProps), errorProps), {
|
14621
14872
|
id,
|
@@ -14632,48 +14883,48 @@ var Textarea = React113.forwardRef((props, ref) => {
|
|
14632
14883
|
})));
|
14633
14884
|
});
|
14634
14885
|
Textarea.displayName = "Textarea";
|
14635
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
14886
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React114.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React114.createElement(TextareaBase.Skeleton, null));
|
14636
14887
|
Textarea.Skeleton = TextAreaSkeleton;
|
14637
14888
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
14638
14889
|
|
14639
14890
|
// src/molecules/Timeline/Timeline.tsx
|
14640
|
-
import
|
14891
|
+
import React116 from "react";
|
14641
14892
|
|
14642
14893
|
// src/atoms/Timeline/Timeline.tsx
|
14643
|
-
import
|
14894
|
+
import React115 from "react";
|
14644
14895
|
var Timeline = (_a) => {
|
14645
14896
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14646
|
-
return /* @__PURE__ */
|
14897
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14647
14898
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
14648
14899
|
}));
|
14649
14900
|
};
|
14650
14901
|
var Content2 = (_a) => {
|
14651
14902
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14652
|
-
return /* @__PURE__ */
|
14903
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14653
14904
|
className: classNames(tw("pb-6"), className)
|
14654
14905
|
}));
|
14655
14906
|
};
|
14656
14907
|
var Separator2 = (_a) => {
|
14657
14908
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14658
|
-
return /* @__PURE__ */
|
14909
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14659
14910
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
14660
14911
|
}));
|
14661
14912
|
};
|
14662
14913
|
var LineContainer = (_a) => {
|
14663
14914
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14664
|
-
return /* @__PURE__ */
|
14915
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14665
14916
|
className: classNames(tw("flex justify-center py-1"), className)
|
14666
14917
|
}));
|
14667
14918
|
};
|
14668
14919
|
var Line = (_a) => {
|
14669
14920
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14670
|
-
return /* @__PURE__ */
|
14921
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14671
14922
|
className: classNames(tw("w-1 bg-grey-5 h-full justify-self-center"), className)
|
14672
14923
|
}));
|
14673
14924
|
};
|
14674
14925
|
var Dot = (_a) => {
|
14675
14926
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14676
|
-
return /* @__PURE__ */
|
14927
|
+
return /* @__PURE__ */ React115.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14677
14928
|
className: classNames(tw("bg-grey-30 h-[6px] w-[6px] rounded"), className)
|
14678
14929
|
}));
|
14679
14930
|
};
|
@@ -14688,54 +14939,54 @@ var import_error5 = __toESM(require_error());
|
|
14688
14939
|
var import_time2 = __toESM(require_time());
|
14689
14940
|
var import_warningSign5 = __toESM(require_warningSign());
|
14690
14941
|
var TimelineItem = () => null;
|
14691
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
14942
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React116.createElement("div", {
|
14692
14943
|
className: "Aquarium-Timeline"
|
14693
|
-
},
|
14944
|
+
}, React116.Children.map(children, (item) => {
|
14694
14945
|
if (!isComponentType(item, TimelineItem)) {
|
14695
14946
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
14696
14947
|
} else {
|
14697
14948
|
const { props, key } = item;
|
14698
|
-
return /* @__PURE__ */
|
14949
|
+
return /* @__PURE__ */ React116.createElement(Timeline, {
|
14699
14950
|
key: key != null ? key : props.title
|
14700
|
-
}, /* @__PURE__ */
|
14951
|
+
}, /* @__PURE__ */ React116.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React116.createElement(Icon, {
|
14701
14952
|
icon: import_error5.default,
|
14702
14953
|
color: "error-30"
|
14703
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
14954
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React116.createElement(Icon, {
|
14704
14955
|
icon: import_warningSign5.default,
|
14705
14956
|
color: "warning-30"
|
14706
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
14957
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React116.createElement(Icon, {
|
14707
14958
|
icon: import_time2.default,
|
14708
14959
|
color: "info-30"
|
14709
|
-
}) : /* @__PURE__ */
|
14960
|
+
}) : /* @__PURE__ */ React116.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React116.createElement(Typography2.Caption, {
|
14710
14961
|
color: "grey-50"
|
14711
|
-
}, props.title), /* @__PURE__ */
|
14962
|
+
}, props.title), /* @__PURE__ */ React116.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React116.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React116.createElement(Timeline.Content, null, /* @__PURE__ */ React116.createElement(Typography2.Small, null, props.children)));
|
14712
14963
|
}
|
14713
14964
|
}));
|
14714
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
14965
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React116.createElement(Timeline, null, /* @__PURE__ */ React116.createElement(Timeline.Separator, null, /* @__PURE__ */ React116.createElement(Skeleton, {
|
14715
14966
|
width: 6,
|
14716
14967
|
height: 6,
|
14717
14968
|
rounded: true
|
14718
|
-
})), /* @__PURE__ */
|
14969
|
+
})), /* @__PURE__ */ React116.createElement(Skeleton, {
|
14719
14970
|
height: 12,
|
14720
14971
|
width: 120
|
14721
|
-
}), /* @__PURE__ */
|
14972
|
+
}), /* @__PURE__ */ React116.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React116.createElement(Skeleton, {
|
14722
14973
|
width: 2,
|
14723
14974
|
height: "100%"
|
14724
|
-
})), /* @__PURE__ */
|
14975
|
+
})), /* @__PURE__ */ React116.createElement(Timeline.Content, null, /* @__PURE__ */ React116.createElement(Box, {
|
14725
14976
|
display: "flex",
|
14726
14977
|
flexDirection: "column",
|
14727
14978
|
gap: "3"
|
14728
|
-
}, /* @__PURE__ */
|
14979
|
+
}, /* @__PURE__ */ React116.createElement(Skeleton, {
|
14729
14980
|
height: 32,
|
14730
14981
|
width: "100%"
|
14731
|
-
}), /* @__PURE__ */
|
14982
|
+
}), /* @__PURE__ */ React116.createElement(Skeleton, {
|
14732
14983
|
height: 32,
|
14733
14984
|
width: "73%"
|
14734
|
-
}), /* @__PURE__ */
|
14985
|
+
}), /* @__PURE__ */ React116.createElement(Skeleton, {
|
14735
14986
|
height: 32,
|
14736
14987
|
width: "80%"
|
14737
14988
|
}))));
|
14738
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
14989
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React116.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React116.createElement(TimelineItemSkeleton, {
|
14739
14990
|
key
|
14740
14991
|
})));
|
14741
14992
|
Timeline2.Item = TimelineItem;
|
@@ -14743,9 +14994,9 @@ Timeline2.Skeleton = TimelineSkeleton;
|
|
14743
14994
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
14744
14995
|
|
14745
14996
|
// src/utils/table/useTableSelect.ts
|
14746
|
-
import
|
14997
|
+
import React117 from "react";
|
14747
14998
|
var useTableSelect = (data, { key }) => {
|
14748
|
-
const [selected, setSelected] =
|
14999
|
+
const [selected, setSelected] = React117.useState([]);
|
14749
15000
|
const allSelected = selected.length === data.length;
|
14750
15001
|
const isSelected = (dot) => selected.includes(dot[key]);
|
14751
15002
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|