@aivenio/aquarium 1.36.1 → 1.37.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 +1 -1
- package/dist/_variables_timescale.scss +1 -1
- package/dist/src/molecules/Checkbox/Checkbox.d.ts +2 -0
- package/dist/src/molecules/Checkbox/Checkbox.js +3 -3
- package/dist/src/molecules/Chip/Chip.js +2 -2
- package/dist/src/molecules/ControlLabel/ControlLabel.d.ts +1 -1
- package/dist/src/molecules/ControlLabel/ControlLabel.js +10 -6
- package/dist/src/molecules/EmptyState/EmptyState.js +4 -10
- package/dist/src/molecules/PageHeader/PageHeader.d.ts +2 -21
- package/dist/src/molecules/PageHeader/PageHeader.js +6 -9
- package/dist/src/molecules/Section/Section.d.ts +3 -1
- package/dist/src/molecules/Section/Section.js +24 -11
- package/dist/src/molecules/Switch/Switch.d.ts +2 -0
- package/dist/src/molecules/Switch/Switch.js +3 -3
- package/dist/src/utils/actions.d.ts +3 -0
- package/dist/src/utils/actions.js +8 -0
- package/dist/src/utils/table/types.d.ts +2 -14
- package/dist/src/utils/table/types.js +1 -1
- package/dist/system.cjs +424 -375
- package/dist/system.mjs +397 -348
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/ContextualMenu.d.ts +26 -0
- package/dist/types/ContextualMenu.js +2 -0
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
@@ -7833,6 +7833,8 @@ var StatusChip = React26.forwardRef(
|
|
7833
7833
|
var _b = _a, { UNSAFE_icon: icon, text, dense = false, status } = _b, rest = __objRest(_b, ["UNSAFE_icon", "text", "dense", "status"]);
|
7834
7834
|
return /* @__PURE__ */ React26.createElement(Chip.Container, __spreadProps(__spreadValues({
|
7835
7835
|
ref,
|
7836
|
+
role: "status",
|
7837
|
+
"aria-label": text ? text.toString() : void 0,
|
7836
7838
|
dense
|
7837
7839
|
}, rest), {
|
7838
7840
|
className: getStatusClassNames(status)
|
@@ -8370,6 +8372,7 @@ import React33 from "react";
|
|
8370
8372
|
var ControlLabel = (_a) => {
|
8371
8373
|
var _b = _a, {
|
8372
8374
|
label,
|
8375
|
+
labelPlacement = "right",
|
8373
8376
|
caption,
|
8374
8377
|
disabled = false,
|
8375
8378
|
readOnly = false,
|
@@ -8378,6 +8381,7 @@ var ControlLabel = (_a) => {
|
|
8378
8381
|
className
|
8379
8382
|
} = _b, rest = __objRest(_b, [
|
8380
8383
|
"label",
|
8384
|
+
"labelPlacement",
|
8381
8385
|
"caption",
|
8382
8386
|
"disabled",
|
8383
8387
|
"readOnly",
|
@@ -8386,12 +8390,18 @@ var ControlLabel = (_a) => {
|
|
8386
8390
|
"className"
|
8387
8391
|
]);
|
8388
8392
|
const textClass = disabled ? "text-grey-40" : "text-grey-100";
|
8393
|
+
const rtl = labelPlacement === "left";
|
8394
|
+
const labelEl = label && /* @__PURE__ */ React33.createElement("span", {
|
8395
|
+
className: tw("typography-small self-center", { "text-right": rtl })
|
8396
|
+
}, label);
|
8389
8397
|
return /* @__PURE__ */ React33.createElement("label", __spreadValues({
|
8390
8398
|
className: classNames(
|
8391
8399
|
className,
|
8392
8400
|
tw(
|
8393
|
-
"inline-grid
|
8401
|
+
"inline-grid",
|
8394
8402
|
{
|
8403
|
+
"grid-cols-[auto_1fr]": !rtl,
|
8404
|
+
"grid-cols-[1fr_auto]": rtl,
|
8395
8405
|
"cursor-pointer": !disabled && !readOnly,
|
8396
8406
|
"cursor-not-allowed": disabled
|
8397
8407
|
},
|
@@ -8399,10 +8409,8 @@ var ControlLabel = (_a) => {
|
|
8399
8409
|
)
|
8400
8410
|
),
|
8401
8411
|
style: __spreadValues({}, style)
|
8402
|
-
}, rest), children,
|
8403
|
-
className: tw("
|
8404
|
-
}, label), caption && /* @__PURE__ */ React33.createElement(Typography2, {
|
8405
|
-
className: tw("col-start-2"),
|
8412
|
+
}, rest), rtl ? labelEl : children, rtl ? children : labelEl, caption && /* @__PURE__ */ React33.createElement(Typography2, {
|
8413
|
+
className: tw({ "col-start-2": !rtl }),
|
8406
8414
|
variant: "caption",
|
8407
8415
|
color: disabled ? "grey-40" : "grey-50"
|
8408
8416
|
}, caption));
|
@@ -8456,12 +8464,31 @@ var Checkbox = React34.forwardRef(
|
|
8456
8464
|
// src/molecules/Checkbox/Checkbox.tsx
|
8457
8465
|
var Checkbox2 = React35.forwardRef(
|
8458
8466
|
(_a, ref) => {
|
8459
|
-
var _b = _a, {
|
8467
|
+
var _b = _a, {
|
8468
|
+
id,
|
8469
|
+
name,
|
8470
|
+
caption,
|
8471
|
+
readOnly = false,
|
8472
|
+
disabled = false,
|
8473
|
+
children,
|
8474
|
+
"aria-label": ariaLabel,
|
8475
|
+
labelPlacement
|
8476
|
+
} = _b, props = __objRest(_b, [
|
8477
|
+
"id",
|
8478
|
+
"name",
|
8479
|
+
"caption",
|
8480
|
+
"readOnly",
|
8481
|
+
"disabled",
|
8482
|
+
"children",
|
8483
|
+
"aria-label",
|
8484
|
+
"labelPlacement"
|
8485
|
+
]);
|
8460
8486
|
var _a2;
|
8461
8487
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
8462
8488
|
return !readOnly || isChecked ? /* @__PURE__ */ React35.createElement(ControlLabel, {
|
8463
8489
|
htmlFor: id,
|
8464
8490
|
label: children,
|
8491
|
+
labelPlacement,
|
8465
8492
|
"aria-label": ariaLabel,
|
8466
8493
|
caption,
|
8467
8494
|
readOnly,
|
@@ -11036,8 +11063,22 @@ Dropdown.Menu = DropdownMenu3;
|
|
11036
11063
|
Dropdown.Item = DropdownItem;
|
11037
11064
|
|
11038
11065
|
// src/molecules/EmptyState/EmptyState.tsx
|
11066
|
+
import React72 from "react";
|
11067
|
+
|
11068
|
+
// src/utils/actions.tsx
|
11039
11069
|
import React71 from "react";
|
11040
11070
|
import omit10 from "lodash/omit";
|
11071
|
+
var renderAction = (kind = "primary", action) => {
|
11072
|
+
return isLink(action) ? /* @__PURE__ */ React71.createElement(Button.ExternalLink, __spreadValues({
|
11073
|
+
key: action.text,
|
11074
|
+
kind
|
11075
|
+
}, omit10(action, "text")), action.text) : /* @__PURE__ */ React71.createElement(Button, __spreadValues({
|
11076
|
+
key: action.text,
|
11077
|
+
kind
|
11078
|
+
}, omit10(action, "text")), action.text);
|
11079
|
+
};
|
11080
|
+
|
11081
|
+
// src/molecules/EmptyState/EmptyState.tsx
|
11041
11082
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
11042
11083
|
EmptyStateLayout2["Vertical"] = "vertical";
|
11043
11084
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -11094,7 +11135,7 @@ var EmptyState = ({
|
|
11094
11135
|
fullHeight = isVerticalLayout(layout) ? true : false
|
11095
11136
|
}) => {
|
11096
11137
|
const template = layoutStyle(layout);
|
11097
|
-
return /* @__PURE__ */
|
11138
|
+
return /* @__PURE__ */ React72.createElement(Box, {
|
11098
11139
|
className: classNames(
|
11099
11140
|
"Aquarium-EmptyState",
|
11100
11141
|
tw("rounded p-[56px]", {
|
@@ -11107,45 +11148,41 @@ var EmptyState = ({
|
|
11107
11148
|
),
|
11108
11149
|
backgroundColor: "transparent",
|
11109
11150
|
borderColor: "grey-10"
|
11110
|
-
}, /* @__PURE__ */
|
11151
|
+
}, /* @__PURE__ */ React72.createElement(Box.Flex, {
|
11111
11152
|
style: { gap: "56px" },
|
11112
11153
|
flexDirection: template.layout,
|
11113
11154
|
justifyContent: template.justifyContent,
|
11114
11155
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
11115
11156
|
height: fullHeight ? "full" : void 0
|
11116
|
-
}, image && /* @__PURE__ */
|
11157
|
+
}, image && /* @__PURE__ */ React72.createElement("img", {
|
11117
11158
|
src: image,
|
11118
11159
|
alt: imageAlt,
|
11119
11160
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
11120
|
-
}), /* @__PURE__ */
|
11161
|
+
}), /* @__PURE__ */ React72.createElement(Box.Flex, {
|
11121
11162
|
flexDirection: "column",
|
11122
11163
|
justifyContent: template.justifyContent,
|
11123
11164
|
alignItems: template.alignItems
|
11124
|
-
}, /* @__PURE__ */
|
11165
|
+
}, /* @__PURE__ */ React72.createElement(Typography2.Heading, {
|
11125
11166
|
htmlTag: "h2"
|
11126
|
-
}, title), (description || children) && /* @__PURE__ */
|
11167
|
+
}, title), (description || children) && /* @__PURE__ */ React72.createElement(Box, {
|
11127
11168
|
marginTop: "5"
|
11128
|
-
}, /* @__PURE__ */
|
11169
|
+
}, /* @__PURE__ */ React72.createElement(Typography2.Default, {
|
11129
11170
|
color: "grey-60"
|
11130
|
-
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */
|
11171
|
+
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React72.createElement(Box.Flex, {
|
11131
11172
|
marginTop: "7",
|
11132
11173
|
gap: "4",
|
11133
11174
|
justifyContent: "center",
|
11134
11175
|
alignItems: "center",
|
11135
11176
|
wrap: "wrap"
|
11136
|
-
}, primaryAction &&
|
11137
|
-
kind: "primary"
|
11138
|
-
}, omit10(primaryAction, "text")), primaryAction.text)), secondaryAction && /* @__PURE__ */ React71.createElement(React71.Fragment, null, !isLink(secondaryAction) && /* @__PURE__ */ React71.createElement(Button.Secondary, __spreadValues({}, omit10(secondaryAction, "text")), secondaryAction.text), isLink(secondaryAction) && /* @__PURE__ */ React71.createElement(Button.ExternalLink, __spreadValues({
|
11139
|
-
kind: "secondary"
|
11140
|
-
}, omit10(secondaryAction, "text")), secondaryAction.text))), footer && /* @__PURE__ */ React71.createElement(Box, {
|
11177
|
+
}, primaryAction && renderAction("primary", primaryAction), secondaryAction && renderAction("secondary", secondaryAction)), footer && /* @__PURE__ */ React72.createElement(Box, {
|
11141
11178
|
marginTop: "5"
|
11142
|
-
}, /* @__PURE__ */
|
11179
|
+
}, /* @__PURE__ */ React72.createElement(Typography2.Small, {
|
11143
11180
|
color: "grey-60"
|
11144
11181
|
}, footer)))));
|
11145
11182
|
};
|
11146
11183
|
|
11147
11184
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
11148
|
-
import
|
11185
|
+
import React73 from "react";
|
11149
11186
|
var FlexboxItem = Tailwindify(
|
11150
11187
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
11151
11188
|
const hookStyle = useStyle({
|
@@ -11157,7 +11194,7 @@ var FlexboxItem = Tailwindify(
|
|
11157
11194
|
alignSelf
|
11158
11195
|
});
|
11159
11196
|
const HtmlElement = htmlTag;
|
11160
|
-
return /* @__PURE__ */
|
11197
|
+
return /* @__PURE__ */ React73.createElement(HtmlElement, {
|
11161
11198
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
11162
11199
|
className
|
11163
11200
|
}, children);
|
@@ -11165,7 +11202,7 @@ var FlexboxItem = Tailwindify(
|
|
11165
11202
|
);
|
11166
11203
|
|
11167
11204
|
// src/molecules/Grid/GridItem.tsx
|
11168
|
-
import
|
11205
|
+
import React74 from "react";
|
11169
11206
|
var GridItem = Tailwindify(
|
11170
11207
|
({
|
11171
11208
|
htmlTag = "div",
|
@@ -11196,7 +11233,7 @@ var GridItem = Tailwindify(
|
|
11196
11233
|
gridRowEnd: rowEnd
|
11197
11234
|
});
|
11198
11235
|
const HtmlElement = htmlTag;
|
11199
|
-
return /* @__PURE__ */
|
11236
|
+
return /* @__PURE__ */ React74.createElement(HtmlElement, {
|
11200
11237
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
11201
11238
|
className
|
11202
11239
|
}, children);
|
@@ -11204,7 +11241,7 @@ var GridItem = Tailwindify(
|
|
11204
11241
|
);
|
11205
11242
|
|
11206
11243
|
// src/molecules/LineClamp/LineClamp.tsx
|
11207
|
-
import
|
11244
|
+
import React75 from "react";
|
11208
11245
|
var LineClamp2 = ({
|
11209
11246
|
lines,
|
11210
11247
|
children,
|
@@ -11213,10 +11250,10 @@ var LineClamp2 = ({
|
|
11213
11250
|
collapseLabel,
|
11214
11251
|
onClampedChange
|
11215
11252
|
}) => {
|
11216
|
-
const ref =
|
11217
|
-
const [clamped, setClamped] =
|
11218
|
-
const [isClampingEnabled, setClampingEnabled] =
|
11219
|
-
|
11253
|
+
const ref = React75.useRef(null);
|
11254
|
+
const [clamped, setClamped] = React75.useState(true);
|
11255
|
+
const [isClampingEnabled, setClampingEnabled] = React75.useState(false);
|
11256
|
+
React75.useEffect(() => {
|
11220
11257
|
var _a, _b;
|
11221
11258
|
const el = ref.current;
|
11222
11259
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -11225,28 +11262,28 @@ var LineClamp2 = ({
|
|
11225
11262
|
setClamped(!clamped);
|
11226
11263
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
11227
11264
|
};
|
11228
|
-
return /* @__PURE__ */
|
11265
|
+
return /* @__PURE__ */ React75.createElement("div", {
|
11229
11266
|
className: "Aquarium-LineClamp"
|
11230
|
-
}, /* @__PURE__ */
|
11267
|
+
}, /* @__PURE__ */ React75.createElement(LineClamp, {
|
11231
11268
|
ref,
|
11232
11269
|
lines,
|
11233
11270
|
clamped,
|
11234
11271
|
wordBreak
|
11235
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
11272
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React75.createElement(Button.Ghost, {
|
11236
11273
|
dense: true,
|
11237
11274
|
onClick: handleClampedChange
|
11238
11275
|
}, clamped ? expandLabel : collapseLabel));
|
11239
11276
|
};
|
11240
11277
|
|
11241
11278
|
// src/molecules/Link/Link.tsx
|
11242
|
-
import
|
11279
|
+
import React77 from "react";
|
11243
11280
|
import classNames8 from "classnames";
|
11244
11281
|
|
11245
11282
|
// src/atoms/Link/Link.tsx
|
11246
|
-
import
|
11283
|
+
import React76 from "react";
|
11247
11284
|
var Link = (_a) => {
|
11248
11285
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
11249
|
-
return /* @__PURE__ */
|
11286
|
+
return /* @__PURE__ */ React76.createElement("a", __spreadValues({
|
11250
11287
|
className: classNames(className, linkStyle)
|
11251
11288
|
}, props), children);
|
11252
11289
|
};
|
@@ -11254,23 +11291,23 @@ var Link = (_a) => {
|
|
11254
11291
|
// src/molecules/Link/Link.tsx
|
11255
11292
|
var Link2 = (_a) => {
|
11256
11293
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
11257
|
-
return /* @__PURE__ */
|
11294
|
+
return /* @__PURE__ */ React77.createElement(Link, __spreadValues({
|
11258
11295
|
className: classNames8("Aquarium-Link", className)
|
11259
11296
|
}, props));
|
11260
11297
|
};
|
11261
11298
|
|
11262
11299
|
// src/molecules/ListItem/ListItem.tsx
|
11263
|
-
import
|
11300
|
+
import React78 from "react";
|
11264
11301
|
var ListItem = ({ name, icon, active = false }) => {
|
11265
|
-
return /* @__PURE__ */
|
11302
|
+
return /* @__PURE__ */ React78.createElement(Box.Flex, {
|
11266
11303
|
className: "Aquarium-ListItem",
|
11267
11304
|
alignItems: "center"
|
11268
|
-
}, /* @__PURE__ */
|
11305
|
+
}, /* @__PURE__ */ React78.createElement(Typography2, {
|
11269
11306
|
variant: active ? "small-strong" : "small",
|
11270
11307
|
color: "grey-70",
|
11271
11308
|
htmlTag: "span",
|
11272
11309
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
11273
|
-
}, /* @__PURE__ */
|
11310
|
+
}, /* @__PURE__ */ React78.createElement("img", {
|
11274
11311
|
src: icon,
|
11275
11312
|
alt: name,
|
11276
11313
|
className: "inline mr-4",
|
@@ -11280,7 +11317,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11280
11317
|
};
|
11281
11318
|
|
11282
11319
|
// src/molecules/Modal/Modal.tsx
|
11283
|
-
import
|
11320
|
+
import React80 from "react";
|
11284
11321
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
11285
11322
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
11286
11323
|
import { useId as useId2 } from "@react-aria/utils";
|
@@ -11289,18 +11326,18 @@ import castArray from "lodash/castArray";
|
|
11289
11326
|
import omit11 from "lodash/omit";
|
11290
11327
|
|
11291
11328
|
// src/molecules/Tabs/Tabs.tsx
|
11292
|
-
import
|
11329
|
+
import React79, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef9, useState as useState9 } from "react";
|
11293
11330
|
import isNumber5 from "lodash/isNumber";
|
11294
11331
|
import kebabCase from "lodash/kebabCase";
|
11295
11332
|
var import_chevronLeft4 = __toESM(require_chevronLeft());
|
11296
11333
|
var import_chevronRight4 = __toESM(require_chevronRight());
|
11297
11334
|
var import_warningSign4 = __toESM(require_warningSign());
|
11298
11335
|
var isTabComponent = (c) => {
|
11299
|
-
return
|
11336
|
+
return React79.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
11300
11337
|
};
|
11301
|
-
var Tab =
|
11338
|
+
var Tab = React79.forwardRef(
|
11302
11339
|
({ className, id, title, children }, ref) => {
|
11303
|
-
return /* @__PURE__ */
|
11340
|
+
return /* @__PURE__ */ React79.createElement("div", {
|
11304
11341
|
ref,
|
11305
11342
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
11306
11343
|
className,
|
@@ -11312,14 +11349,14 @@ var Tab = React78.forwardRef(
|
|
11312
11349
|
);
|
11313
11350
|
var TabContainer = (_a) => {
|
11314
11351
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
11315
|
-
return /* @__PURE__ */
|
11352
|
+
return /* @__PURE__ */ React79.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11316
11353
|
className: classNames("py-6 z-0", className)
|
11317
11354
|
}), children);
|
11318
11355
|
};
|
11319
11356
|
var ModalTab = Tab;
|
11320
11357
|
var ModalTabContainer = TabContainer;
|
11321
11358
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
11322
|
-
const Tab2 =
|
11359
|
+
const Tab2 = React79.forwardRef(
|
11323
11360
|
(_a, ref) => {
|
11324
11361
|
var _b = _a, {
|
11325
11362
|
id,
|
@@ -11351,17 +11388,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11351
11388
|
const _id = id != null ? id : kebabCase(title);
|
11352
11389
|
let statusIcon = void 0;
|
11353
11390
|
if (status === "warning") {
|
11354
|
-
statusIcon = /* @__PURE__ */
|
11391
|
+
statusIcon = /* @__PURE__ */ React79.createElement(InlineIcon, {
|
11355
11392
|
icon: import_warningSign4.default,
|
11356
11393
|
color: selected ? void 0 : "warning-80"
|
11357
11394
|
});
|
11358
11395
|
} else if (status === "error") {
|
11359
|
-
statusIcon = /* @__PURE__ */
|
11396
|
+
statusIcon = /* @__PURE__ */ React79.createElement(InlineIcon, {
|
11360
11397
|
icon: import_warningSign4.default,
|
11361
11398
|
color: selected ? void 0 : "error-50"
|
11362
11399
|
});
|
11363
11400
|
}
|
11364
|
-
const tab = /* @__PURE__ */
|
11401
|
+
const tab = /* @__PURE__ */ React79.createElement(Component, __spreadValues({
|
11365
11402
|
ref,
|
11366
11403
|
id: `${_id}-tab`,
|
11367
11404
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -11378,29 +11415,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11378
11415
|
"aria-selected": selected,
|
11379
11416
|
"aria-controls": `${_id}-panel`,
|
11380
11417
|
tabIndex: disabled ? void 0 : 0
|
11381
|
-
}, rest), /* @__PURE__ */
|
11418
|
+
}, rest), /* @__PURE__ */ React79.createElement(Typography2, {
|
11382
11419
|
htmlTag: "div",
|
11383
11420
|
variant: "small",
|
11384
11421
|
color: selected ? "primary-80" : disabled ? "grey-20" : "current",
|
11385
11422
|
className: tw("inline-flex items-center gap-3")
|
11386
|
-
}, showNotification ? /* @__PURE__ */
|
11423
|
+
}, showNotification ? /* @__PURE__ */ React79.createElement(Badge.Notification, {
|
11387
11424
|
right: "-4px",
|
11388
11425
|
top: "3px"
|
11389
|
-
}, /* @__PURE__ */
|
11426
|
+
}, /* @__PURE__ */ React79.createElement("span", {
|
11390
11427
|
className: tw("whitespace-nowrap")
|
11391
|
-
}, title)) : /* @__PURE__ */
|
11428
|
+
}, title)) : /* @__PURE__ */ React79.createElement("span", {
|
11392
11429
|
className: tw("whitespace-nowrap")
|
11393
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
11430
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React79.createElement(Typography2, {
|
11394
11431
|
htmlTag: "span",
|
11395
11432
|
variant: "small",
|
11396
11433
|
color: selected ? "primary-80" : "grey-5",
|
11397
11434
|
className: "leading-none"
|
11398
|
-
}, /* @__PURE__ */
|
11435
|
+
}, /* @__PURE__ */ React79.createElement(TabBadge, {
|
11399
11436
|
kind: "filled",
|
11400
11437
|
value: badge,
|
11401
11438
|
textClassname: classNames({ "text-white": selected, "text-grey-50": !selected })
|
11402
11439
|
})), statusIcon));
|
11403
|
-
return tooltip ? /* @__PURE__ */
|
11440
|
+
return tooltip ? /* @__PURE__ */ React79.createElement(Tooltip, {
|
11404
11441
|
content: tooltip
|
11405
11442
|
}, tab) : tab;
|
11406
11443
|
}
|
@@ -11414,7 +11451,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11414
11451
|
const Tabs2 = (props) => {
|
11415
11452
|
var _a, _b;
|
11416
11453
|
const { className, value, defaultValue, onChange, children } = props;
|
11417
|
-
const childArr =
|
11454
|
+
const childArr = React79.Children.toArray(children);
|
11418
11455
|
const firstTab = childArr[0];
|
11419
11456
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
11420
11457
|
const [selected, setSelected] = useState9((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -11427,7 +11464,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11427
11464
|
var _a2, _b2;
|
11428
11465
|
const container = containerRef.current;
|
11429
11466
|
const tabs = tabsRef.current;
|
11430
|
-
const values =
|
11467
|
+
const values = React79.Children.map(
|
11431
11468
|
children,
|
11432
11469
|
(tab, i) => {
|
11433
11470
|
var _a3;
|
@@ -11468,7 +11505,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11468
11505
|
updateCarets();
|
11469
11506
|
setSelected(value);
|
11470
11507
|
revealSelectedTab({ smooth: value !== selected });
|
11471
|
-
}, [value,
|
11508
|
+
}, [value, React79.Children.count(children)]);
|
11472
11509
|
useLayoutEffect2(() => {
|
11473
11510
|
var _a2;
|
11474
11511
|
updateCarets();
|
@@ -11532,27 +11569,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11532
11569
|
const handleSelected = (key) => {
|
11533
11570
|
(onChange != null ? onChange : setSelected)(key);
|
11534
11571
|
};
|
11535
|
-
|
11572
|
+
React79.Children.forEach(children, (c) => {
|
11536
11573
|
if (c && !isTabComponent(c)) {
|
11537
11574
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
11538
11575
|
}
|
11539
11576
|
});
|
11540
|
-
return /* @__PURE__ */
|
11577
|
+
return /* @__PURE__ */ React79.createElement("div", {
|
11541
11578
|
ref: parentRef,
|
11542
11579
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
11543
|
-
}, /* @__PURE__ */
|
11580
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
11544
11581
|
className: tw("relative flex items-center h-full border-b-2 border-grey-10")
|
11545
|
-
}, /* @__PURE__ */
|
11582
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
11546
11583
|
ref: containerRef,
|
11547
11584
|
className: tw("overflow-y-auto scrollbar-hide h-full mb-[-2px]")
|
11548
|
-
}, /* @__PURE__ */
|
11585
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
11549
11586
|
ref: tabsRef,
|
11550
11587
|
role: "tablist",
|
11551
11588
|
"aria-label": "tabs",
|
11552
11589
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
11553
|
-
},
|
11590
|
+
}, React79.Children.map(
|
11554
11591
|
children,
|
11555
|
-
(tab, index) => tab ? /* @__PURE__ */
|
11592
|
+
(tab, index) => tab ? /* @__PURE__ */ React79.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
11556
11593
|
key: tab.props.value
|
11557
11594
|
}, tab.props), {
|
11558
11595
|
index,
|
@@ -11560,20 +11597,20 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11560
11597
|
onKeyDown: handleKeyDown,
|
11561
11598
|
onSelected: handleSelected
|
11562
11599
|
})) : void 0
|
11563
|
-
))), leftCaret && /* @__PURE__ */
|
11600
|
+
))), leftCaret && /* @__PURE__ */ React79.createElement("div", {
|
11564
11601
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
11565
|
-
}, /* @__PURE__ */
|
11602
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
11566
11603
|
onClick: () => handleScrollToNext("left"),
|
11567
11604
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
11568
|
-
}, /* @__PURE__ */
|
11605
|
+
}, /* @__PURE__ */ React79.createElement(InlineIcon, {
|
11569
11606
|
icon: import_chevronLeft4.default
|
11570
|
-
}))), rightCaret && /* @__PURE__ */
|
11607
|
+
}))), rightCaret && /* @__PURE__ */ React79.createElement("div", {
|
11571
11608
|
onClick: () => handleScrollToNext("right"),
|
11572
11609
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
11573
|
-
}, /* @__PURE__ */
|
11610
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
11574
11611
|
onClick: () => handleScrollToNext("right"),
|
11575
11612
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
11576
|
-
}, /* @__PURE__ */
|
11613
|
+
}, /* @__PURE__ */ React79.createElement(InlineIcon, {
|
11577
11614
|
icon: import_chevronRight4.default
|
11578
11615
|
})))), renderChildren(children, selected, props));
|
11579
11616
|
};
|
@@ -11581,7 +11618,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11581
11618
|
Tabs2.Tab = TabComponent;
|
11582
11619
|
return Tabs2;
|
11583
11620
|
};
|
11584
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
11621
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React79.createElement(TabContainer, null, children.find(
|
11585
11622
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
11586
11623
|
)));
|
11587
11624
|
|
@@ -11590,7 +11627,7 @@ var import_cross6 = __toESM(require_cross());
|
|
11590
11627
|
var Modal2 = (_a) => {
|
11591
11628
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
11592
11629
|
const { open, onClose, size, portalContainer } = props;
|
11593
|
-
const ref =
|
11630
|
+
const ref = React80.useRef(null);
|
11594
11631
|
const state = useOverlayTriggerState4({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
11595
11632
|
const { modalProps, underlayProps } = useModalOverlay2(
|
11596
11633
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -11600,17 +11637,17 @@ var Modal2 = (_a) => {
|
|
11600
11637
|
if (!state.isOpen) {
|
11601
11638
|
return null;
|
11602
11639
|
}
|
11603
|
-
return /* @__PURE__ */
|
11640
|
+
return /* @__PURE__ */ React80.createElement(Overlay3, {
|
11604
11641
|
portalContainer
|
11605
|
-
}, /* @__PURE__ */
|
11642
|
+
}, /* @__PURE__ */ React80.createElement(Modal, {
|
11606
11643
|
className: "Aquarium-Modal",
|
11607
11644
|
open: true
|
11608
|
-
}, /* @__PURE__ */
|
11645
|
+
}, /* @__PURE__ */ React80.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React80.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
11609
11646
|
ref,
|
11610
11647
|
size
|
11611
11648
|
}, props), modalProps))));
|
11612
11649
|
};
|
11613
|
-
var ModalWrapper =
|
11650
|
+
var ModalWrapper = React80.forwardRef(
|
11614
11651
|
(_a, ref) => {
|
11615
11652
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
11616
11653
|
const labelledBy = useId2();
|
@@ -11619,30 +11656,30 @@ var ModalWrapper = React79.forwardRef(
|
|
11619
11656
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11620
11657
|
ref
|
11621
11658
|
);
|
11622
|
-
return /* @__PURE__ */
|
11659
|
+
return /* @__PURE__ */ React80.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
11623
11660
|
ref
|
11624
11661
|
}, props), dialogProps), {
|
11625
11662
|
tabIndex: -1
|
11626
|
-
}), /* @__PURE__ */
|
11663
|
+
}), /* @__PURE__ */ React80.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React80.createElement(IconButton, {
|
11627
11664
|
"aria-label": "Close",
|
11628
11665
|
icon: import_cross6.default,
|
11629
11666
|
onClick: onClose
|
11630
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
11667
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React80.createElement(Modal.HeaderImage, {
|
11631
11668
|
backgroundImage: headerImage
|
11632
|
-
}), /* @__PURE__ */
|
11669
|
+
}), /* @__PURE__ */ React80.createElement(Modal.Header, {
|
11633
11670
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
11634
|
-
}, /* @__PURE__ */
|
11671
|
+
}, /* @__PURE__ */ React80.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React80.createElement(Modal.Title, {
|
11635
11672
|
id: labelledBy
|
11636
|
-
}, title), subtitle && /* @__PURE__ */
|
11673
|
+
}, title), subtitle && /* @__PURE__ */ React80.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React80.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React80.createElement(Modal.Body, {
|
11637
11674
|
id: describedBy,
|
11638
11675
|
tabIndex: 0,
|
11639
11676
|
noFooter: !(secondaryActions || primaryAction)
|
11640
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
11677
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React80.createElement(Modal.Footer, null, /* @__PURE__ */ React80.createElement(Modal.Actions, null, secondaryActions && castArray(secondaryActions).filter(Boolean).map((_a2) => {
|
11641
11678
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
11642
|
-
return /* @__PURE__ */
|
11679
|
+
return /* @__PURE__ */ React80.createElement(Button.Secondary, __spreadValues({
|
11643
11680
|
key: text
|
11644
11681
|
}, action), text);
|
11645
|
-
}), primaryAction && /* @__PURE__ */
|
11682
|
+
}), primaryAction && /* @__PURE__ */ React80.createElement(Button.Primary, __spreadValues({
|
11646
11683
|
key: primaryAction.text
|
11647
11684
|
}, omit11(primaryAction, "text")), primaryAction.text))));
|
11648
11685
|
}
|
@@ -11651,24 +11688,24 @@ var ModalTabs = createTabsComponent(
|
|
11651
11688
|
ModalTab,
|
11652
11689
|
TabItem,
|
11653
11690
|
"ModalTabs",
|
11654
|
-
(children, selected, props) => /* @__PURE__ */
|
11691
|
+
(children, selected, props) => /* @__PURE__ */ React80.createElement(Modal.Body, {
|
11655
11692
|
maxHeight: props.maxHeight
|
11656
|
-
}, /* @__PURE__ */
|
11693
|
+
}, /* @__PURE__ */ React80.createElement(ModalTabContainer, null, children.find(
|
11657
11694
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
11658
11695
|
)))
|
11659
11696
|
);
|
11660
11697
|
|
11661
11698
|
// src/molecules/MultiInput/MultiInput.tsx
|
11662
|
-
import
|
11699
|
+
import React82, { useEffect as useEffect9, useRef as useRef10, useState as useState10 } from "react";
|
11663
11700
|
import castArray2 from "lodash/castArray";
|
11664
11701
|
import identity from "lodash/identity";
|
11665
11702
|
import omit12 from "lodash/omit";
|
11666
11703
|
import uniqueId5 from "lodash/uniqueId";
|
11667
11704
|
|
11668
11705
|
// src/molecules/MultiInput/InputChip.tsx
|
11669
|
-
import
|
11706
|
+
import React81 from "react";
|
11670
11707
|
var import_smallCross2 = __toESM(require_smallCross());
|
11671
|
-
var InputChip =
|
11708
|
+
var InputChip = React81.forwardRef(
|
11672
11709
|
(_a, ref) => {
|
11673
11710
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
11674
11711
|
const onClick = (e) => {
|
@@ -11676,18 +11713,18 @@ var InputChip = React80.forwardRef(
|
|
11676
11713
|
_onClick == null ? void 0 : _onClick(e);
|
11677
11714
|
}
|
11678
11715
|
};
|
11679
|
-
return /* @__PURE__ */
|
11716
|
+
return /* @__PURE__ */ React81.createElement("div", {
|
11680
11717
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
11681
11718
|
"bg-error-0 ": invalid,
|
11682
11719
|
"bg-grey-0 ": !invalid && !disabled,
|
11683
11720
|
"bg-grey-5": disabled
|
11684
11721
|
})
|
11685
|
-
}, /* @__PURE__ */
|
11722
|
+
}, /* @__PURE__ */ React81.createElement("div", {
|
11686
11723
|
className: tw("px-2 py-1")
|
11687
|
-
}, /* @__PURE__ */
|
11724
|
+
}, /* @__PURE__ */ React81.createElement(Typography2, {
|
11688
11725
|
variant: "small",
|
11689
11726
|
color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
|
11690
|
-
}, children)), !readOnly && /* @__PURE__ */
|
11727
|
+
}, children)), !readOnly && /* @__PURE__ */ React81.createElement("div", __spreadProps(__spreadValues({
|
11691
11728
|
ref
|
11692
11729
|
}, props), {
|
11693
11730
|
onClick,
|
@@ -11698,7 +11735,7 @@ var InputChip = React80.forwardRef(
|
|
11698
11735
|
}),
|
11699
11736
|
role: "button",
|
11700
11737
|
"aria-label": `Remove ${String(children)}`
|
11701
|
-
}), /* @__PURE__ */
|
11738
|
+
}), /* @__PURE__ */ React81.createElement(Icon, {
|
11702
11739
|
icon: import_smallCross2.default,
|
11703
11740
|
className: tw({
|
11704
11741
|
"text-error-70": invalid,
|
@@ -11839,7 +11876,7 @@ var MultiInputBase = (_a) => {
|
|
11839
11876
|
};
|
11840
11877
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
11841
11878
|
var _a3;
|
11842
|
-
return /* @__PURE__ */
|
11879
|
+
return /* @__PURE__ */ React82.createElement(InputChip, {
|
11843
11880
|
key: `${itemToString(item)}.${index}`,
|
11844
11881
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
11845
11882
|
readOnly,
|
@@ -11850,13 +11887,13 @@ var MultiInputBase = (_a) => {
|
|
11850
11887
|
}
|
11851
11888
|
}, itemToString(item));
|
11852
11889
|
});
|
11853
|
-
return /* @__PURE__ */
|
11890
|
+
return /* @__PURE__ */ React82.createElement("div", {
|
11854
11891
|
className: "Aquarium-MultiInputBase"
|
11855
|
-
}, /* @__PURE__ */
|
11892
|
+
}, /* @__PURE__ */ React82.createElement(Select.InputContainer, {
|
11856
11893
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
11857
|
-
}, /* @__PURE__ */
|
11894
|
+
}, /* @__PURE__ */ React82.createElement("div", {
|
11858
11895
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
11859
|
-
}, inline && renderChips(), /* @__PURE__ */
|
11896
|
+
}, inline && renderChips(), /* @__PURE__ */ React82.createElement(Select.Input, __spreadProps(__spreadValues({
|
11860
11897
|
ref: inputRef,
|
11861
11898
|
id: id != null ? id : name,
|
11862
11899
|
name,
|
@@ -11874,11 +11911,11 @@ var MultiInputBase = (_a) => {
|
|
11874
11911
|
onFocus: handleFocus,
|
11875
11912
|
onBlur: handleBlur,
|
11876
11913
|
autoComplete: "off"
|
11877
|
-
}))), endAdornment && /* @__PURE__ */
|
11914
|
+
}))), endAdornment && /* @__PURE__ */ React82.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React82.createElement("div", {
|
11878
11915
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
11879
11916
|
}, renderChips()));
|
11880
11917
|
};
|
11881
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
11918
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React82.createElement(Skeleton, {
|
11882
11919
|
height: 38
|
11883
11920
|
});
|
11884
11921
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -11895,7 +11932,7 @@ var MultiInput = (props) => {
|
|
11895
11932
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
11896
11933
|
const labelControlProps = getLabelControlProps(props);
|
11897
11934
|
const baseProps = omit12(props, Object.keys(labelControlProps));
|
11898
|
-
return /* @__PURE__ */
|
11935
|
+
return /* @__PURE__ */ React82.createElement(LabelControl, __spreadProps(__spreadValues({
|
11899
11936
|
id: `${id.current}-label`,
|
11900
11937
|
htmlFor: `${id.current}-input`,
|
11901
11938
|
messageId: errorMessageId
|
@@ -11903,7 +11940,7 @@ var MultiInput = (props) => {
|
|
11903
11940
|
length: value.length,
|
11904
11941
|
maxLength,
|
11905
11942
|
className: "Aquarium-MultiInput"
|
11906
|
-
}), /* @__PURE__ */
|
11943
|
+
}), /* @__PURE__ */ React82.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
11907
11944
|
id: `${id.current}-input`,
|
11908
11945
|
onChange: (value2) => {
|
11909
11946
|
var _a2;
|
@@ -11915,12 +11952,12 @@ var MultiInput = (props) => {
|
|
11915
11952
|
valid: props.valid
|
11916
11953
|
})));
|
11917
11954
|
};
|
11918
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
11955
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React82.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React82.createElement(MultiInputBase.Skeleton, null));
|
11919
11956
|
MultiInput.Skeleton = MultiInputSkeleton;
|
11920
11957
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
11921
11958
|
|
11922
11959
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
11923
|
-
import
|
11960
|
+
import React83, { useEffect as useEffect10, useRef as useRef11, useState as useState11 } from "react";
|
11924
11961
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
11925
11962
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
11926
11963
|
import isEqual from "lodash/isEqual";
|
@@ -12065,7 +12102,7 @@ var MultiSelectBase = (_a) => {
|
|
12065
12102
|
}
|
12066
12103
|
}, [state.isOpen, inputRef, popoverRef]);
|
12067
12104
|
const renderChips = () => {
|
12068
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
12105
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React83.createElement(InputChip, __spreadProps(__spreadValues({
|
12069
12106
|
key: `${itemToString(selectedItem)}.chip`,
|
12070
12107
|
className: tw("mx-0"),
|
12071
12108
|
disabled,
|
@@ -12081,14 +12118,14 @@ var MultiSelectBase = (_a) => {
|
|
12081
12118
|
const hasNoResults = options.length === 0 || filteredOptions.length === 0;
|
12082
12119
|
const inputProps = getInputProps(getDropdownProps({ ref: inputRef, disabled: disabled || readOnly }));
|
12083
12120
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
12084
|
-
return /* @__PURE__ */
|
12121
|
+
return /* @__PURE__ */ React83.createElement("div", {
|
12085
12122
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
12086
|
-
}, /* @__PURE__ */
|
12123
|
+
}, /* @__PURE__ */ React83.createElement(Select.InputContainer, {
|
12087
12124
|
ref: targetRef,
|
12088
12125
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
12089
|
-
}, /* @__PURE__ */
|
12126
|
+
}, /* @__PURE__ */ React83.createElement("div", {
|
12090
12127
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
12091
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
12128
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React83.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
12092
12129
|
id,
|
12093
12130
|
ref: inputRef,
|
12094
12131
|
name,
|
@@ -12110,12 +12147,12 @@ var MultiSelectBase = (_a) => {
|
|
12110
12147
|
setFocus(false);
|
12111
12148
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
12112
12149
|
}
|
12113
|
-
}))), !readOnly && /* @__PURE__ */
|
12150
|
+
}))), !readOnly && /* @__PURE__ */ React83.createElement(Select.Toggle, __spreadValues({
|
12114
12151
|
hasFocus,
|
12115
12152
|
isOpen
|
12116
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
12153
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React83.createElement("div", {
|
12117
12154
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
12118
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
12155
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React83.createElement(PopoverOverlay, {
|
12119
12156
|
ref: popoverRef,
|
12120
12157
|
triggerRef: targetRef,
|
12121
12158
|
state,
|
@@ -12123,16 +12160,16 @@ var MultiSelectBase = (_a) => {
|
|
12123
12160
|
shouldFlip: true,
|
12124
12161
|
isNonModal: true,
|
12125
12162
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
12126
|
-
}, /* @__PURE__ */
|
12163
|
+
}, /* @__PURE__ */ React83.createElement(Select.Menu, __spreadValues({
|
12127
12164
|
ref: menuRef,
|
12128
12165
|
maxHeight
|
12129
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
12166
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React83.createElement(Select.NoResults, null, noResults), filteredOptions.map((item, index) => /* @__PURE__ */ React83.createElement(Select.Item, __spreadValues({
|
12130
12167
|
key: itemToString(item),
|
12131
12168
|
highlighted: index === highlightedIndex,
|
12132
12169
|
selected: selectedItems.includes(item)
|
12133
12170
|
}, getItemProps({ item, index, disabled: isOptionDisabled(item, index) })), renderOption(item))))));
|
12134
12171
|
};
|
12135
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
12172
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React83.createElement(Skeleton, {
|
12136
12173
|
height: 38
|
12137
12174
|
});
|
12138
12175
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -12150,13 +12187,13 @@ var MultiSelect = (_a) => {
|
|
12150
12187
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12151
12188
|
const labelControlProps = getLabelControlProps(props);
|
12152
12189
|
const baseProps = omit13(props, Object.keys(labelControlProps));
|
12153
|
-
return /* @__PURE__ */
|
12190
|
+
return /* @__PURE__ */ React83.createElement(LabelControl, __spreadProps(__spreadValues({
|
12154
12191
|
id: `${id.current}-label`,
|
12155
12192
|
htmlFor: `${id.current}-input`,
|
12156
12193
|
messageId: errorMessageId
|
12157
12194
|
}, labelControlProps), {
|
12158
12195
|
className: "Aquarium-MultiSelect"
|
12159
|
-
}), /* @__PURE__ */
|
12196
|
+
}), /* @__PURE__ */ React83.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
12160
12197
|
id: id.current,
|
12161
12198
|
options,
|
12162
12199
|
noResults,
|
@@ -12164,16 +12201,16 @@ var MultiSelect = (_a) => {
|
|
12164
12201
|
valid: props.valid
|
12165
12202
|
})));
|
12166
12203
|
};
|
12167
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
12204
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React83.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React83.createElement(MultiSelectBase.Skeleton, null));
|
12168
12205
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
12169
12206
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
12170
12207
|
|
12171
12208
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
12172
|
-
import
|
12209
|
+
import React84, { useRef as useRef12 } from "react";
|
12173
12210
|
import omit14 from "lodash/omit";
|
12174
12211
|
import uniqueId7 from "lodash/uniqueId";
|
12175
12212
|
var import_caretDown2 = __toESM(require_caretDown());
|
12176
|
-
var NativeSelectBase =
|
12213
|
+
var NativeSelectBase = React84.forwardRef(
|
12177
12214
|
(_a, ref) => {
|
12178
12215
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
12179
12216
|
const placeholderValue = uniqueId7("default_value_for_placeholder");
|
@@ -12190,16 +12227,16 @@ var NativeSelectBase = React83.forwardRef(
|
|
12190
12227
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
12191
12228
|
}
|
12192
12229
|
};
|
12193
|
-
return /* @__PURE__ */
|
12230
|
+
return /* @__PURE__ */ React84.createElement("span", {
|
12194
12231
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
12195
|
-
}, !readOnly && /* @__PURE__ */
|
12232
|
+
}, !readOnly && /* @__PURE__ */ React84.createElement("span", {
|
12196
12233
|
className: tw(
|
12197
12234
|
"absolute right-0 inset-y-0 mr-4 text-grey-40 flex ml-3 pointer-events-none typography-default-strong mt-4"
|
12198
12235
|
)
|
12199
|
-
}, /* @__PURE__ */
|
12236
|
+
}, /* @__PURE__ */ React84.createElement(Icon, {
|
12200
12237
|
icon: import_caretDown2.default,
|
12201
12238
|
"data-testid": "icon-dropdown"
|
12202
|
-
})), /* @__PURE__ */
|
12239
|
+
})), /* @__PURE__ */ React84.createElement("select", __spreadProps(__spreadValues({
|
12203
12240
|
ref,
|
12204
12241
|
disabled: disabled || readOnly,
|
12205
12242
|
required
|
@@ -12218,16 +12255,16 @@ var NativeSelectBase = React83.forwardRef(
|
|
12218
12255
|
),
|
12219
12256
|
props.className
|
12220
12257
|
)
|
12221
|
-
}), props.placeholder && /* @__PURE__ */
|
12258
|
+
}), props.placeholder && /* @__PURE__ */ React84.createElement("option", {
|
12222
12259
|
value: placeholderValue,
|
12223
12260
|
disabled: true
|
12224
12261
|
}, props.placeholder), children));
|
12225
12262
|
}
|
12226
12263
|
);
|
12227
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
12264
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React84.createElement(Skeleton, {
|
12228
12265
|
height: 38
|
12229
12266
|
});
|
12230
|
-
var NativeSelect =
|
12267
|
+
var NativeSelect = React84.forwardRef(
|
12231
12268
|
(_a, ref) => {
|
12232
12269
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
12233
12270
|
var _a2;
|
@@ -12236,13 +12273,13 @@ var NativeSelect = React83.forwardRef(
|
|
12236
12273
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12237
12274
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
12238
12275
|
const baseProps = omit14(props, Object.keys(labelControlProps));
|
12239
|
-
return /* @__PURE__ */
|
12276
|
+
return /* @__PURE__ */ React84.createElement(LabelControl, __spreadProps(__spreadValues({
|
12240
12277
|
id: `${id.current}-label`,
|
12241
12278
|
htmlFor: id.current,
|
12242
12279
|
messageId: errorMessageId
|
12243
12280
|
}, labelControlProps), {
|
12244
12281
|
className: "Aquarium-NativeSelect"
|
12245
|
-
}), /* @__PURE__ */
|
12282
|
+
}), /* @__PURE__ */ React84.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
12246
12283
|
ref
|
12247
12284
|
}, baseProps), errorProps), {
|
12248
12285
|
id: id.current,
|
@@ -12256,63 +12293,63 @@ var NativeSelect = React83.forwardRef(
|
|
12256
12293
|
}
|
12257
12294
|
);
|
12258
12295
|
NativeSelect.displayName = "NativeSelect";
|
12259
|
-
var Option =
|
12296
|
+
var Option = React84.forwardRef((_a, ref) => {
|
12260
12297
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
12261
|
-
return /* @__PURE__ */
|
12298
|
+
return /* @__PURE__ */ React84.createElement("option", __spreadValues({
|
12262
12299
|
ref
|
12263
12300
|
}, props), children);
|
12264
12301
|
});
|
12265
12302
|
Option.displayName = "Option";
|
12266
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
12303
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React84.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React84.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React84.createElement("div", {
|
12267
12304
|
style: { height: "1px" }
|
12268
12305
|
}));
|
12269
12306
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
12270
12307
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
12271
12308
|
|
12272
12309
|
// src/molecules/Navigation/Navigation.tsx
|
12273
|
-
import
|
12310
|
+
import React86 from "react";
|
12274
12311
|
import classNames9 from "classnames";
|
12275
12312
|
|
12276
12313
|
// src/atoms/Navigation/Navigation.tsx
|
12277
|
-
import
|
12314
|
+
import React85 from "react";
|
12278
12315
|
var Navigation = (_a) => {
|
12279
12316
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
12280
|
-
return /* @__PURE__ */
|
12317
|
+
return /* @__PURE__ */ React85.createElement("nav", {
|
12281
12318
|
className: classNames(tw("bg-grey-0 h-full"))
|
12282
|
-
}, /* @__PURE__ */
|
12319
|
+
}, /* @__PURE__ */ React85.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
12283
12320
|
className: classNames(tw("flex flex-col h-full"), className),
|
12284
12321
|
role: "menu"
|
12285
12322
|
}), children));
|
12286
12323
|
};
|
12287
12324
|
var Header = (_a) => {
|
12288
12325
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12289
|
-
return /* @__PURE__ */
|
12326
|
+
return /* @__PURE__ */ React85.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
12290
12327
|
role: "presentation",
|
12291
12328
|
className: classNames(tw("px-6 py-5"), className)
|
12292
12329
|
}));
|
12293
12330
|
};
|
12294
12331
|
var Footer = (_a) => {
|
12295
12332
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12296
|
-
return /* @__PURE__ */
|
12333
|
+
return /* @__PURE__ */ React85.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
12297
12334
|
role: "presentation",
|
12298
12335
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
12299
12336
|
}));
|
12300
12337
|
};
|
12301
12338
|
var Section2 = (_a) => {
|
12302
12339
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
12303
|
-
return /* @__PURE__ */
|
12340
|
+
return /* @__PURE__ */ React85.createElement("li", {
|
12304
12341
|
role: "presentation",
|
12305
12342
|
className: tw("py-5")
|
12306
|
-
}, title && /* @__PURE__ */
|
12343
|
+
}, title && /* @__PURE__ */ React85.createElement("div", {
|
12307
12344
|
className: classNames(className, "py-2 px-6 text-grey-40 uppercase cursor-default typography-caption")
|
12308
|
-
}, title), /* @__PURE__ */
|
12345
|
+
}, title), /* @__PURE__ */ React85.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
12309
12346
|
role: "group",
|
12310
12347
|
className: classNames(tw("flex flex-col"), className)
|
12311
12348
|
})));
|
12312
12349
|
};
|
12313
12350
|
var Divider3 = (_a) => {
|
12314
12351
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12315
|
-
return /* @__PURE__ */
|
12352
|
+
return /* @__PURE__ */ React85.createElement("li", __spreadProps(__spreadValues({
|
12316
12353
|
role: "separator"
|
12317
12354
|
}, rest), {
|
12318
12355
|
className: classNames(tw("border-t-2 border-grey-5"), className)
|
@@ -12320,9 +12357,9 @@ var Divider3 = (_a) => {
|
|
12320
12357
|
};
|
12321
12358
|
var Item5 = (_a) => {
|
12322
12359
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
12323
|
-
return /* @__PURE__ */
|
12360
|
+
return /* @__PURE__ */ React85.createElement("li", {
|
12324
12361
|
role: "presentation"
|
12325
|
-
}, /* @__PURE__ */
|
12362
|
+
}, /* @__PURE__ */ React85.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
12326
12363
|
role: "menuitem",
|
12327
12364
|
className: classNames(
|
12328
12365
|
tw("py-3 px-6 hover:bg-grey-5 cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -12342,7 +12379,7 @@ Navigation.Divider = Divider3;
|
|
12342
12379
|
// src/molecules/Navigation/Navigation.tsx
|
12343
12380
|
var Navigation2 = (_a) => {
|
12344
12381
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
12345
|
-
return /* @__PURE__ */
|
12382
|
+
return /* @__PURE__ */ React86.createElement(Navigation, __spreadValues({
|
12346
12383
|
className: classNames9("Aquarium-Navigation", className)
|
12347
12384
|
}, props));
|
12348
12385
|
};
|
@@ -12356,11 +12393,11 @@ var Item6 = (_a) => {
|
|
12356
12393
|
"icon",
|
12357
12394
|
"showNotification"
|
12358
12395
|
]);
|
12359
|
-
return /* @__PURE__ */
|
12396
|
+
return /* @__PURE__ */ React86.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React86.createElement(Badge.Notification, null, /* @__PURE__ */ React86.createElement(InlineIcon, {
|
12360
12397
|
icon,
|
12361
12398
|
width: "20px",
|
12362
12399
|
height: "20px"
|
12363
|
-
})), icon && !showNotification && /* @__PURE__ */
|
12400
|
+
})), icon && !showNotification && /* @__PURE__ */ React86.createElement(InlineIcon, {
|
12364
12401
|
icon,
|
12365
12402
|
width: "20px",
|
12366
12403
|
height: "20px"
|
@@ -12373,33 +12410,32 @@ Navigation2.Header = Navigation.Header;
|
|
12373
12410
|
Navigation2.Section = Navigation.Section;
|
12374
12411
|
|
12375
12412
|
// src/molecules/PageHeader/PageHeader.tsx
|
12376
|
-
import
|
12413
|
+
import React88 from "react";
|
12377
12414
|
import castArray3 from "lodash/castArray";
|
12378
|
-
import omit15 from "lodash/omit";
|
12379
12415
|
|
12380
12416
|
// src/atoms/PageHeader/PageHeader.tsx
|
12381
|
-
import
|
12417
|
+
import React87 from "react";
|
12382
12418
|
var PageHeader = (_a) => {
|
12383
12419
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12384
|
-
return /* @__PURE__ */
|
12420
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadValues({
|
12385
12421
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
12386
12422
|
}, rest), children);
|
12387
12423
|
};
|
12388
12424
|
PageHeader.Container = (_a) => {
|
12389
12425
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12390
|
-
return /* @__PURE__ */
|
12426
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadValues({
|
12391
12427
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
12392
12428
|
}, rest), children);
|
12393
12429
|
};
|
12394
12430
|
PageHeader.TitleContainer = (_a) => {
|
12395
12431
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12396
|
-
return /* @__PURE__ */
|
12432
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadValues({
|
12397
12433
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
12398
12434
|
}, rest), children);
|
12399
12435
|
};
|
12400
12436
|
PageHeader.Title = (_a) => {
|
12401
12437
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
12402
|
-
return /* @__PURE__ */
|
12438
|
+
return /* @__PURE__ */ React87.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
12403
12439
|
color: "grey-100",
|
12404
12440
|
variant: isSubHeader ? "subheading" : "heading",
|
12405
12441
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -12407,19 +12443,19 @@ PageHeader.Title = (_a) => {
|
|
12407
12443
|
};
|
12408
12444
|
PageHeader.Subtitle = (_a) => {
|
12409
12445
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12410
|
-
return /* @__PURE__ */
|
12446
|
+
return /* @__PURE__ */ React87.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
12411
12447
|
color: "grey-70"
|
12412
12448
|
}), children);
|
12413
12449
|
};
|
12414
12450
|
PageHeader.Chips = (_a) => {
|
12415
12451
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12416
|
-
return /* @__PURE__ */
|
12452
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadValues({
|
12417
12453
|
className: classNames(tw("flex gap-3"), className)
|
12418
12454
|
}, rest), children);
|
12419
12455
|
};
|
12420
12456
|
PageHeader.Actions = (_a) => {
|
12421
12457
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12422
|
-
return /* @__PURE__ */
|
12458
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadValues({
|
12423
12459
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
12424
12460
|
}, rest), children);
|
12425
12461
|
};
|
@@ -12437,80 +12473,69 @@ var CommonPageHeader = ({
|
|
12437
12473
|
chips = [],
|
12438
12474
|
breadcrumbs,
|
12439
12475
|
menu,
|
12440
|
-
menuLabel
|
12476
|
+
menuLabel,
|
12477
|
+
menuAriaLabel = menuLabel != null ? menuLabel : "Context menu",
|
12441
12478
|
onAction,
|
12442
12479
|
onMenuOpenChange,
|
12443
12480
|
isSubHeader = false
|
12444
12481
|
}) => {
|
12445
|
-
return /* @__PURE__ */
|
12482
|
+
return /* @__PURE__ */ React88.createElement(PageHeader, {
|
12446
12483
|
className: "Aquarium-PageHeader"
|
12447
|
-
}, /* @__PURE__ */
|
12484
|
+
}, /* @__PURE__ */ React88.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React88.createElement(Box, {
|
12448
12485
|
marginBottom: "3"
|
12449
|
-
}, /* @__PURE__ */
|
12486
|
+
}, /* @__PURE__ */ React88.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React88.createElement(Spacing, {
|
12450
12487
|
row: true,
|
12451
12488
|
gap: "5"
|
12452
|
-
}, image && /* @__PURE__ */
|
12489
|
+
}, image && /* @__PURE__ */ React88.createElement("img", {
|
12453
12490
|
src: image,
|
12454
12491
|
alt: imageAlt,
|
12455
12492
|
className: tw("w-[56px] h-[56px]")
|
12456
|
-
}), /* @__PURE__ */
|
12493
|
+
}), /* @__PURE__ */ React88.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React88.createElement(PageHeader.Title, {
|
12457
12494
|
isSubHeader
|
12458
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
12495
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React88.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React88.createElement(Chip2, {
|
12459
12496
|
key: chip,
|
12460
12497
|
dense: true,
|
12461
12498
|
text: chip
|
12462
|
-
}))), subtitle && /* @__PURE__ */
|
12499
|
+
}))), subtitle && /* @__PURE__ */ React88.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React88.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React88.createElement(Box.Flex, {
|
12463
12500
|
alignItems: "center"
|
12464
|
-
}, /* @__PURE__ */
|
12501
|
+
}, /* @__PURE__ */ React88.createElement(DropdownMenu2, {
|
12465
12502
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
12466
12503
|
onOpenChange: onMenuOpenChange
|
12467
|
-
}, /* @__PURE__ */
|
12468
|
-
"aria-label":
|
12504
|
+
}, /* @__PURE__ */ React88.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React88.createElement(Button.Icon, {
|
12505
|
+
"aria-label": menuAriaLabel,
|
12469
12506
|
icon: import_more4.default
|
12470
|
-
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map(
|
12471
|
-
(action) => !isLink(action) ? /* @__PURE__ */ React87.createElement(Button.Secondary, __spreadValues({
|
12472
|
-
key: action.text
|
12473
|
-
}, omit15(action, "text")), action.text) : /* @__PURE__ */ React87.createElement(Button.ExternalLink, __spreadValues({
|
12474
|
-
key: action.text,
|
12475
|
-
kind: "secondary"
|
12476
|
-
}, omit15(action, "text")), action.text)
|
12477
|
-
), primaryAction && /* @__PURE__ */ React87.createElement(React87.Fragment, null, !isLink(primaryAction) && /* @__PURE__ */ React87.createElement(Button.Primary, __spreadValues({
|
12478
|
-
key: primaryAction.text
|
12479
|
-
}, omit15(primaryAction, "text")), primaryAction.text), isLink(primaryAction) && /* @__PURE__ */ React87.createElement(Button.ExternalLink, __spreadValues({
|
12480
|
-
key: primaryAction.text,
|
12481
|
-
kind: "primary"
|
12482
|
-
}, omit15(primaryAction, "text")), primaryAction.text))));
|
12507
|
+
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction("secondary", secondaryAction2)), primaryAction && renderAction("primary", primaryAction)));
|
12483
12508
|
};
|
12484
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
12509
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React88.createElement(CommonPageHeader, __spreadValues({}, props));
|
12485
12510
|
PageHeader2.displayName = "PageHeader";
|
12486
|
-
var SubHeader = (props) => /* @__PURE__ */
|
12511
|
+
var SubHeader = (props) => /* @__PURE__ */ React88.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
12487
12512
|
isSubHeader: true
|
12488
12513
|
}));
|
12489
12514
|
PageHeader2.SubHeader = SubHeader;
|
12490
12515
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
12491
12516
|
|
12492
12517
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
12493
|
-
import
|
12494
|
-
import
|
12518
|
+
import React90 from "react";
|
12519
|
+
import omit15 from "lodash/omit";
|
12495
12520
|
|
12496
12521
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
12497
|
-
import
|
12522
|
+
import React89 from "react";
|
12498
12523
|
var Header2 = (_a) => {
|
12499
12524
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12500
|
-
return /* @__PURE__ */
|
12525
|
+
return /* @__PURE__ */ React89.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12501
12526
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
12502
12527
|
}), children);
|
12503
12528
|
};
|
12504
12529
|
var Title = (_a) => {
|
12505
12530
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12506
|
-
return /* @__PURE__ */
|
12531
|
+
return /* @__PURE__ */ React89.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
12507
12532
|
htmlTag: "h1",
|
12508
12533
|
variant: "small-strong"
|
12509
12534
|
}), children);
|
12510
12535
|
};
|
12511
12536
|
var Body = (_a) => {
|
12512
12537
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12513
|
-
return /* @__PURE__ */
|
12538
|
+
return /* @__PURE__ */ React89.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
12514
12539
|
htmlTag: "div",
|
12515
12540
|
variant: "caption",
|
12516
12541
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -12518,13 +12543,13 @@ var Body = (_a) => {
|
|
12518
12543
|
};
|
12519
12544
|
var Footer2 = (_a) => {
|
12520
12545
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12521
|
-
return /* @__PURE__ */
|
12546
|
+
return /* @__PURE__ */ React89.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12522
12547
|
className: classNames(tw("p-5"), className)
|
12523
12548
|
}), children);
|
12524
12549
|
};
|
12525
12550
|
var Actions2 = (_a) => {
|
12526
12551
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12527
|
-
return /* @__PURE__ */
|
12552
|
+
return /* @__PURE__ */ React89.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12528
12553
|
className: classNames(tw("flex gap-4"), className)
|
12529
12554
|
}), children);
|
12530
12555
|
};
|
@@ -12540,29 +12565,29 @@ var PopoverDialog = {
|
|
12540
12565
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
12541
12566
|
const wrapPromptWithBody = (child) => {
|
12542
12567
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
12543
|
-
return /* @__PURE__ */
|
12568
|
+
return /* @__PURE__ */ React90.createElement(Popover2.Panel, {
|
12544
12569
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
12545
|
-
}, /* @__PURE__ */
|
12570
|
+
}, /* @__PURE__ */ React90.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React90.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React90.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React90.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React90.createElement(Popover2.Button, __spreadValues({
|
12546
12571
|
kind: "secondary-ghost",
|
12547
12572
|
key: secondaryAction.text,
|
12548
12573
|
dense: true
|
12549
|
-
},
|
12574
|
+
}, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React90.createElement(Popover2.Button, __spreadValues({
|
12550
12575
|
kind: "ghost",
|
12551
12576
|
key: primaryAction.text,
|
12552
12577
|
dense: true
|
12553
|
-
},
|
12578
|
+
}, omit15(primaryAction, "text")), primaryAction.text))));
|
12554
12579
|
}
|
12555
12580
|
return child;
|
12556
12581
|
};
|
12557
|
-
return /* @__PURE__ */
|
12582
|
+
return /* @__PURE__ */ React90.createElement(Popover2, {
|
12558
12583
|
type: "dialog",
|
12559
12584
|
isOpen: open,
|
12560
12585
|
placement,
|
12561
12586
|
containFocus: true
|
12562
|
-
},
|
12587
|
+
}, React90.Children.map(children, wrapPromptWithBody));
|
12563
12588
|
};
|
12564
12589
|
PopoverDialog2.Trigger = Popover2.Trigger;
|
12565
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
12590
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React90.createElement(PopoverDialog.Body, null, children);
|
12566
12591
|
Prompt.displayName = "PopoverDialog.Prompt";
|
12567
12592
|
PopoverDialog2.Prompt = Prompt;
|
12568
12593
|
|
@@ -12571,14 +12596,14 @@ import { createPortal } from "react-dom";
|
|
12571
12596
|
var Portal = ({ children, to }) => createPortal(children, to);
|
12572
12597
|
|
12573
12598
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
12574
|
-
import
|
12599
|
+
import React92 from "react";
|
12575
12600
|
|
12576
12601
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
12577
|
-
import
|
12602
|
+
import React91 from "react";
|
12578
12603
|
import clamp3 from "lodash/clamp";
|
12579
12604
|
var ProgressBar = (_a) => {
|
12580
12605
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12581
|
-
return /* @__PURE__ */
|
12606
|
+
return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12582
12607
|
className: classNames(
|
12583
12608
|
tw("relative flex items-center w-full bg-grey-0 h-2 rounded-full overflow-hidden"),
|
12584
12609
|
className
|
@@ -12594,7 +12619,7 @@ var STATUS_COLORS = {
|
|
12594
12619
|
ProgressBar.Indicator = (_a) => {
|
12595
12620
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
12596
12621
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
12597
|
-
return /* @__PURE__ */
|
12622
|
+
return /* @__PURE__ */ React91.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12598
12623
|
className: classNames(
|
12599
12624
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
12600
12625
|
STATUS_COLORS[status],
|
@@ -12610,11 +12635,11 @@ ProgressBar.Indicator = (_a) => {
|
|
12610
12635
|
};
|
12611
12636
|
ProgressBar.Labels = (_a) => {
|
12612
12637
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
12613
|
-
return /* @__PURE__ */
|
12638
|
+
return /* @__PURE__ */ React91.createElement("div", {
|
12614
12639
|
className: classNames(tw("flex flex-row"), className)
|
12615
|
-
}, /* @__PURE__ */
|
12640
|
+
}, /* @__PURE__ */ React91.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
12616
12641
|
className: tw("grow text-grey-70 typography-caption")
|
12617
|
-
}), startLabel), /* @__PURE__ */
|
12642
|
+
}), startLabel), /* @__PURE__ */ React91.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
12618
12643
|
className: tw("grow text-grey-70 typography-caption text-right")
|
12619
12644
|
}), endLabel));
|
12620
12645
|
};
|
@@ -12632,7 +12657,7 @@ var ProgressBar2 = (props) => {
|
|
12632
12657
|
if (min > max) {
|
12633
12658
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
12634
12659
|
}
|
12635
|
-
const progress = /* @__PURE__ */
|
12660
|
+
const progress = /* @__PURE__ */ React92.createElement(ProgressBar, null, /* @__PURE__ */ React92.createElement(ProgressBar.Indicator, {
|
12636
12661
|
status: value === max ? completedStatus : progresStatus,
|
12637
12662
|
min,
|
12638
12663
|
max,
|
@@ -12642,15 +12667,15 @@ var ProgressBar2 = (props) => {
|
|
12642
12667
|
if (props.dense) {
|
12643
12668
|
return progress;
|
12644
12669
|
}
|
12645
|
-
return /* @__PURE__ */
|
12670
|
+
return /* @__PURE__ */ React92.createElement("div", {
|
12646
12671
|
className: "Aquarium-ProgressBar"
|
12647
|
-
}, progress, /* @__PURE__ */
|
12672
|
+
}, progress, /* @__PURE__ */ React92.createElement(ProgressBar.Labels, {
|
12648
12673
|
className: tw("py-2"),
|
12649
12674
|
startLabel: props.startLabel,
|
12650
12675
|
endLabel: props.endLabel
|
12651
12676
|
}));
|
12652
12677
|
};
|
12653
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
12678
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React92.createElement(Skeleton, {
|
12654
12679
|
height: 4,
|
12655
12680
|
display: "block"
|
12656
12681
|
});
|
@@ -12658,13 +12683,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
12658
12683
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
12659
12684
|
|
12660
12685
|
// src/molecules/RadioButton/RadioButton.tsx
|
12661
|
-
import
|
12662
|
-
var RadioButton2 =
|
12686
|
+
import React93 from "react";
|
12687
|
+
var RadioButton2 = React93.forwardRef(
|
12663
12688
|
(_a, ref) => {
|
12664
12689
|
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"]);
|
12665
12690
|
var _a2;
|
12666
12691
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
12667
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
12692
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React93.createElement(ControlLabel, {
|
12668
12693
|
htmlFor: id,
|
12669
12694
|
label: children,
|
12670
12695
|
"aria-label": ariaLabel,
|
@@ -12673,7 +12698,7 @@ var RadioButton2 = React92.forwardRef(
|
|
12673
12698
|
disabled,
|
12674
12699
|
style: { gap: "0 8px" },
|
12675
12700
|
className: "Aquarium-RadioButton"
|
12676
|
-
}, !readOnly && /* @__PURE__ */
|
12701
|
+
}, !readOnly && /* @__PURE__ */ React93.createElement(RadioButton, __spreadProps(__spreadValues({
|
12677
12702
|
id,
|
12678
12703
|
ref,
|
12679
12704
|
name
|
@@ -12684,12 +12709,12 @@ var RadioButton2 = React92.forwardRef(
|
|
12684
12709
|
}
|
12685
12710
|
);
|
12686
12711
|
RadioButton2.displayName = "RadioButton";
|
12687
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
12712
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React93.createElement("div", {
|
12688
12713
|
className: tw("flex gap-3")
|
12689
|
-
}, /* @__PURE__ */
|
12714
|
+
}, /* @__PURE__ */ React93.createElement(Skeleton, {
|
12690
12715
|
height: 20,
|
12691
12716
|
width: 20
|
12692
|
-
}), /* @__PURE__ */
|
12717
|
+
}), /* @__PURE__ */ React93.createElement(Skeleton, {
|
12693
12718
|
height: 20,
|
12694
12719
|
width: 150
|
12695
12720
|
}));
|
@@ -12697,10 +12722,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
12697
12722
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
12698
12723
|
|
12699
12724
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
12700
|
-
import
|
12725
|
+
import React94 from "react";
|
12701
12726
|
import uniqueId8 from "lodash/uniqueId";
|
12702
12727
|
var isRadioButton = (c) => {
|
12703
|
-
return
|
12728
|
+
return React94.isValidElement(c) && c.type === RadioButton2;
|
12704
12729
|
};
|
12705
12730
|
var RadioButtonGroup = (_a) => {
|
12706
12731
|
var _b = _a, {
|
@@ -12723,7 +12748,7 @@ var RadioButtonGroup = (_a) => {
|
|
12723
12748
|
"children"
|
12724
12749
|
]);
|
12725
12750
|
var _a2;
|
12726
|
-
const [value, setValue] =
|
12751
|
+
const [value, setValue] = React94.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
12727
12752
|
const errorMessageId = uniqueId8();
|
12728
12753
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12729
12754
|
const labelControlProps = getLabelControlProps(props);
|
@@ -12734,14 +12759,14 @@ var RadioButtonGroup = (_a) => {
|
|
12734
12759
|
setValue(e.target.value);
|
12735
12760
|
onChange == null ? void 0 : onChange(e.target.value);
|
12736
12761
|
};
|
12737
|
-
const content =
|
12762
|
+
const content = React94.Children.map(children, (c) => {
|
12738
12763
|
var _a3, _b2, _c;
|
12739
12764
|
if (!isRadioButton(c)) {
|
12740
12765
|
return null;
|
12741
12766
|
}
|
12742
12767
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
12743
12768
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
12744
|
-
return
|
12769
|
+
return React94.cloneElement(c, {
|
12745
12770
|
name,
|
12746
12771
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
12747
12772
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -12750,13 +12775,13 @@ var RadioButtonGroup = (_a) => {
|
|
12750
12775
|
readOnly
|
12751
12776
|
});
|
12752
12777
|
});
|
12753
|
-
return /* @__PURE__ */
|
12778
|
+
return /* @__PURE__ */ React94.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
12754
12779
|
fieldset: true
|
12755
12780
|
}, labelControlProps), errorProps), {
|
12756
12781
|
className: "Aquarium-RadioButtonGroup"
|
12757
|
-
}), cols && /* @__PURE__ */
|
12782
|
+
}), cols && /* @__PURE__ */ React94.createElement(InputGroup, {
|
12758
12783
|
cols
|
12759
|
-
}, content), !cols && /* @__PURE__ */
|
12784
|
+
}, content), !cols && /* @__PURE__ */ React94.createElement(Flexbox, {
|
12760
12785
|
direction,
|
12761
12786
|
alignItems: "flex-start",
|
12762
12787
|
colGap: "8",
|
@@ -12765,12 +12790,12 @@ var RadioButtonGroup = (_a) => {
|
|
12765
12790
|
}, content));
|
12766
12791
|
};
|
12767
12792
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
12768
|
-
return /* @__PURE__ */
|
12793
|
+
return /* @__PURE__ */ React94.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React94.createElement("div", {
|
12769
12794
|
className: tw("flex flex-wrap", {
|
12770
12795
|
"flex-row gap-8": direction === "row",
|
12771
12796
|
"flex-col gap-2": direction === "column"
|
12772
12797
|
})
|
12773
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
12798
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React94.createElement(RadioButton2.Skeleton, {
|
12774
12799
|
key
|
12775
12800
|
}))));
|
12776
12801
|
};
|
@@ -12778,16 +12803,15 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
12778
12803
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
12779
12804
|
|
12780
12805
|
// src/molecules/Section/Section.tsx
|
12781
|
-
import
|
12806
|
+
import React98 from "react";
|
12782
12807
|
import { useId as useId3 } from "@react-aria/utils";
|
12783
12808
|
import { animated as animated3, useSpring as useSpring2 } from "@react-spring/web";
|
12784
12809
|
import castArray4 from "lodash/castArray";
|
12785
12810
|
import isUndefined8 from "lodash/isUndefined";
|
12786
12811
|
import noop from "lodash/noop";
|
12787
|
-
import omit17 from "lodash/omit";
|
12788
12812
|
|
12789
12813
|
// src/molecules/TagLabel/TagLabel.tsx
|
12790
|
-
import
|
12814
|
+
import React95 from "react";
|
12791
12815
|
var getVariantClassNames = (variant = "primary") => {
|
12792
12816
|
switch (variant) {
|
12793
12817
|
case "danger":
|
@@ -12801,7 +12825,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
12801
12825
|
};
|
12802
12826
|
var TagLabel = (_a) => {
|
12803
12827
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
12804
|
-
return /* @__PURE__ */
|
12828
|
+
return /* @__PURE__ */ React95.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
12805
12829
|
className: classNames(
|
12806
12830
|
"Aquarium-TagLabel",
|
12807
12831
|
getVariantClassNames(variant),
|
@@ -12814,18 +12838,18 @@ var TagLabel = (_a) => {
|
|
12814
12838
|
};
|
12815
12839
|
|
12816
12840
|
// src/atoms/Section/Section.tsx
|
12817
|
-
import
|
12841
|
+
import React96 from "react";
|
12818
12842
|
var import_caretUp2 = __toESM(require_caretUp());
|
12819
12843
|
var Section3 = (_a) => {
|
12820
12844
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12821
|
-
return /* @__PURE__ */
|
12845
|
+
return /* @__PURE__ */ React96.createElement(Box, __spreadValues({
|
12822
12846
|
borderColor: "grey-5",
|
12823
12847
|
borderWidth: "1px"
|
12824
12848
|
}, rest), children);
|
12825
12849
|
};
|
12826
12850
|
Section3.Header = (_a) => {
|
12827
12851
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
12828
|
-
return /* @__PURE__ */
|
12852
|
+
return /* @__PURE__ */ React96.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12829
12853
|
className: classNames(
|
12830
12854
|
tw("px-6 py-5 flex gap-5 justify-between items-center", { "bg-grey-0": collapsible }),
|
12831
12855
|
className
|
@@ -12834,21 +12858,21 @@ Section3.Header = (_a) => {
|
|
12834
12858
|
};
|
12835
12859
|
Section3.TitleContainer = (_a) => {
|
12836
12860
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
12837
|
-
return /* @__PURE__ */
|
12861
|
+
return /* @__PURE__ */ React96.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12838
12862
|
className: classNames(
|
12839
12863
|
tw("grow grid grid-cols-[auto_1fr] gap-y-2 gap-x-3 items-center", { "cursor-pointer": collapsible }),
|
12840
12864
|
className
|
12841
12865
|
)
|
12842
12866
|
}), children);
|
12843
12867
|
};
|
12844
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
12868
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React96.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
12845
12869
|
icon: import_caretUp2.default,
|
12846
12870
|
height: 22,
|
12847
12871
|
width: 22
|
12848
12872
|
}));
|
12849
12873
|
Section3.Title = (_a) => {
|
12850
12874
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12851
|
-
return /* @__PURE__ */
|
12875
|
+
return /* @__PURE__ */ React96.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
12852
12876
|
htmlTag: "h2",
|
12853
12877
|
color: "black",
|
12854
12878
|
className: "flex gap-3 items-center"
|
@@ -12856,35 +12880,35 @@ Section3.Title = (_a) => {
|
|
12856
12880
|
};
|
12857
12881
|
Section3.Subtitle = (_a) => {
|
12858
12882
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12859
|
-
return /* @__PURE__ */
|
12883
|
+
return /* @__PURE__ */ React96.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
12860
12884
|
color: "grey-70"
|
12861
12885
|
}), children);
|
12862
12886
|
};
|
12863
12887
|
Section3.Actions = (_a) => {
|
12864
12888
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12865
|
-
return /* @__PURE__ */
|
12889
|
+
return /* @__PURE__ */ React96.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12866
12890
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
12867
12891
|
}), children);
|
12868
12892
|
};
|
12869
12893
|
Section3.Body = (_a) => {
|
12870
12894
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12871
|
-
return /* @__PURE__ */
|
12895
|
+
return /* @__PURE__ */ React96.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12872
12896
|
className: classNames(tw("p-6"), className)
|
12873
|
-
}), /* @__PURE__ */
|
12897
|
+
}), /* @__PURE__ */ React96.createElement(Typography, {
|
12874
12898
|
htmlTag: "div",
|
12875
12899
|
color: "grey-70"
|
12876
12900
|
}, children));
|
12877
12901
|
};
|
12878
12902
|
|
12879
12903
|
// src/utils/useMeasure.ts
|
12880
|
-
import
|
12904
|
+
import React97 from "react";
|
12881
12905
|
function useMeasure() {
|
12882
|
-
const ref =
|
12883
|
-
const [rect, setRect] =
|
12906
|
+
const ref = React97.useRef(null);
|
12907
|
+
const [rect, setRect] = React97.useState({
|
12884
12908
|
width: null,
|
12885
12909
|
height: null
|
12886
12910
|
});
|
12887
|
-
|
12911
|
+
React97.useLayoutEffect(() => {
|
12888
12912
|
if (!ref.current || !window.ResizeObserver) {
|
12889
12913
|
return;
|
12890
12914
|
}
|
@@ -12905,15 +12929,20 @@ function useMeasure() {
|
|
12905
12929
|
}
|
12906
12930
|
|
12907
12931
|
// src/molecules/Section/Section.tsx
|
12932
|
+
var import_more5 = __toESM(require_more());
|
12908
12933
|
var Section4 = (props) => {
|
12909
|
-
var _a, _b, _c;
|
12934
|
+
var _a, _b, _c, _d, _e, _f;
|
12910
12935
|
const { title, subtitle, actions, children } = props;
|
12911
12936
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
12912
12937
|
const _collapsed = title ? props.collapsed : void 0;
|
12913
12938
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
12914
|
-
const [isCollapsed, setCollapsed] =
|
12939
|
+
const [isCollapsed, setCollapsed] = React98.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
12915
12940
|
const [ref, { height }] = useMeasure();
|
12916
|
-
const
|
12941
|
+
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
12942
|
+
const menuAriaLabel = title ? (_e = (_d = props.menuAriaLabel) != null ? _d : props.menuLabel) != null ? _e : "Context menu" : void 0;
|
12943
|
+
const onAction = title ? props.onAction : void 0;
|
12944
|
+
const onMenuOpenChange = title ? props.onMenuOpenChange : void 0;
|
12945
|
+
const _onCollapsedChanged = title && props.collapsible ? (_f = props.onCollapsedChange) != null ? _f : setCollapsed : noop;
|
12917
12946
|
if (title && !isUndefined8(props.collapsed) && props.collapsed !== isCollapsed) {
|
12918
12947
|
setCollapsed(props.collapsed);
|
12919
12948
|
}
|
@@ -12921,7 +12950,7 @@ var Section4 = (props) => {
|
|
12921
12950
|
_onCollapsedChanged(!isCollapsed);
|
12922
12951
|
};
|
12923
12952
|
const targetHeight = isCollapsed ? "0px" : `${height != null ? height : 0}px`;
|
12924
|
-
const
|
12953
|
+
const _g = useSpring2({
|
12925
12954
|
height: height !== null ? targetHeight : void 0,
|
12926
12955
|
opacity: isCollapsed ? 0 : 1,
|
12927
12956
|
transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
|
@@ -12930,49 +12959,50 @@ var Section4 = (props) => {
|
|
12930
12959
|
duration: 150
|
12931
12960
|
},
|
12932
12961
|
immediate: !_collapsible
|
12933
|
-
}), { transform, backgroundColor } =
|
12962
|
+
}), { transform, backgroundColor } = _g, spring = __objRest(_g, ["transform", "backgroundColor"]);
|
12934
12963
|
const toggleId = useId3();
|
12935
12964
|
const regionId = useId3();
|
12936
|
-
return /* @__PURE__ */
|
12965
|
+
return /* @__PURE__ */ React98.createElement(Section3, {
|
12937
12966
|
className: "Aquarium-Section"
|
12938
|
-
}, title && /* @__PURE__ */
|
12967
|
+
}, title && /* @__PURE__ */ React98.createElement(React98.Fragment, null, /* @__PURE__ */ React98.createElement(Section3.Header, {
|
12939
12968
|
collapsible: _collapsible
|
12940
|
-
}, /* @__PURE__ */
|
12969
|
+
}, /* @__PURE__ */ React98.createElement(Section3.TitleContainer, {
|
12941
12970
|
role: _collapsible ? "button" : void 0,
|
12942
12971
|
id: toggleId,
|
12943
12972
|
collapsible: _collapsible,
|
12944
12973
|
onClick: handleTitleClick,
|
12945
12974
|
"aria-expanded": !isCollapsed,
|
12946
12975
|
"aria-controls": regionId
|
12947
|
-
}, _collapsible && /* @__PURE__ */
|
12976
|
+
}, _collapsible && /* @__PURE__ */ React98.createElement(animated3.div, {
|
12948
12977
|
style: { transform }
|
12949
|
-
}, /* @__PURE__ */
|
12978
|
+
}, /* @__PURE__ */ React98.createElement(Section3.Toggle, null)), /* @__PURE__ */ React98.createElement(Section3.Title, null, title, props.tag && /* @__PURE__ */ React98.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React98.createElement(Chip2, {
|
12950
12979
|
text: props.badge
|
12951
|
-
}), props.chip && /* @__PURE__ */
|
12980
|
+
}), props.chip && /* @__PURE__ */ React98.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React98.createElement(Section3.Subtitle, {
|
12952
12981
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
12953
|
-
}, subtitle)), /* @__PURE__ */
|
12954
|
-
|
12955
|
-
|
12956
|
-
|
12957
|
-
|
12958
|
-
|
12959
|
-
|
12960
|
-
|
12982
|
+
}, subtitle)), !isCollapsed && /* @__PURE__ */ React98.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React98.createElement(Box.Flex, {
|
12983
|
+
alignItems: "center"
|
12984
|
+
}, /* @__PURE__ */ React98.createElement(DropdownMenu2, {
|
12985
|
+
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
12986
|
+
onOpenChange: onMenuOpenChange
|
12987
|
+
}, /* @__PURE__ */ React98.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React98.createElement(Button.Icon, {
|
12988
|
+
"aria-label": menuAriaLabel,
|
12989
|
+
icon: import_more5.default
|
12990
|
+
})), menu)), actions && castArray4(actions).filter(Boolean).map((action) => renderAction("secondary", action)))), /* @__PURE__ */ React98.createElement(animated3.div, {
|
12961
12991
|
className: tw(`h-[1px]`),
|
12962
12992
|
style: { backgroundColor }
|
12963
|
-
})), /* @__PURE__ */
|
12993
|
+
})), /* @__PURE__ */ React98.createElement(animated3.div, {
|
12964
12994
|
id: regionId,
|
12965
12995
|
role: "region",
|
12966
12996
|
"aria-hidden": isCollapsed ? true : void 0,
|
12967
12997
|
style: spring,
|
12968
12998
|
className: tw({ "overflow-hidden": _collapsible })
|
12969
|
-
}, /* @__PURE__ */
|
12999
|
+
}, /* @__PURE__ */ React98.createElement("div", {
|
12970
13000
|
ref
|
12971
|
-
}, /* @__PURE__ */
|
13001
|
+
}, /* @__PURE__ */ React98.createElement(Section3.Body, null, children))));
|
12972
13002
|
};
|
12973
13003
|
|
12974
13004
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
12975
|
-
import
|
13005
|
+
import React99 from "react";
|
12976
13006
|
var SegmentedControl = (_a) => {
|
12977
13007
|
var _b = _a, {
|
12978
13008
|
children,
|
@@ -12989,7 +13019,7 @@ var SegmentedControl = (_a) => {
|
|
12989
13019
|
"selected",
|
12990
13020
|
"className"
|
12991
13021
|
]);
|
12992
|
-
return /* @__PURE__ */
|
13022
|
+
return /* @__PURE__ */ React99.createElement("li", null, /* @__PURE__ */ React99.createElement("button", __spreadProps(__spreadValues({
|
12993
13023
|
type: "button"
|
12994
13024
|
}, rest), {
|
12995
13025
|
className: classNames(
|
@@ -13023,12 +13053,12 @@ var SegmentedControlGroup = (_a) => {
|
|
13023
13053
|
"border border-grey-20 text-grey-50": variant === "outlined",
|
13024
13054
|
"bg-grey-0": variant === "raised"
|
13025
13055
|
});
|
13026
|
-
return /* @__PURE__ */
|
13056
|
+
return /* @__PURE__ */ React99.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
13027
13057
|
"aria-label": ariaLabel,
|
13028
13058
|
className: classNames("Aquarium-SegmentedControl", classes2, className)
|
13029
|
-
}),
|
13059
|
+
}), React99.Children.map(
|
13030
13060
|
children,
|
13031
|
-
(child) =>
|
13061
|
+
(child) => React99.cloneElement(child, {
|
13032
13062
|
dense,
|
13033
13063
|
variant,
|
13034
13064
|
onClick: () => onChange(child.props.value),
|
@@ -13066,14 +13096,14 @@ var getCommonClassNames = (dense, selected) => tw(
|
|
13066
13096
|
);
|
13067
13097
|
|
13068
13098
|
// src/molecules/Stepper/Stepper.tsx
|
13069
|
-
import
|
13099
|
+
import React101 from "react";
|
13070
13100
|
|
13071
13101
|
// src/atoms/Stepper/Stepper.tsx
|
13072
|
-
import
|
13102
|
+
import React100 from "react";
|
13073
13103
|
var import_tick6 = __toESM(require_tick());
|
13074
13104
|
var Stepper = (_a) => {
|
13075
13105
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13076
|
-
return /* @__PURE__ */
|
13106
|
+
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13077
13107
|
className: classNames(className)
|
13078
13108
|
}));
|
13079
13109
|
};
|
@@ -13087,7 +13117,7 @@ var ConnectorContainer = (_a) => {
|
|
13087
13117
|
"completed",
|
13088
13118
|
"dense"
|
13089
13119
|
]);
|
13090
|
-
return /* @__PURE__ */
|
13120
|
+
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13091
13121
|
className: classNames(
|
13092
13122
|
tw("absolute w-full -left-1/2", {
|
13093
13123
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -13099,7 +13129,7 @@ var ConnectorContainer = (_a) => {
|
|
13099
13129
|
};
|
13100
13130
|
var Connector = (_a) => {
|
13101
13131
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
13102
|
-
return /* @__PURE__ */
|
13132
|
+
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13103
13133
|
className: classNames(
|
13104
13134
|
tw("w-full", {
|
13105
13135
|
"bg-grey-20": !completed,
|
@@ -13113,7 +13143,7 @@ var Connector = (_a) => {
|
|
13113
13143
|
};
|
13114
13144
|
var Step = (_a) => {
|
13115
13145
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
13116
|
-
return /* @__PURE__ */
|
13146
|
+
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13117
13147
|
className: classNames(
|
13118
13148
|
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
13119
13149
|
"text-grey-20": state === "inactive"
|
@@ -13134,13 +13164,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
13134
13164
|
});
|
13135
13165
|
var Indicator = (_a) => {
|
13136
13166
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
13137
|
-
return /* @__PURE__ */
|
13167
|
+
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13138
13168
|
className: classNames(
|
13139
13169
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
13140
13170
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
13141
13171
|
className
|
13142
13172
|
)
|
13143
|
-
}), state === "completed" ? /* @__PURE__ */
|
13173
|
+
}), state === "completed" ? /* @__PURE__ */ React100.createElement(InlineIcon, {
|
13144
13174
|
icon: import_tick6.default
|
13145
13175
|
}) : dense ? null : children);
|
13146
13176
|
};
|
@@ -13151,26 +13181,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
13151
13181
|
|
13152
13182
|
// src/molecules/Stepper/Stepper.tsx
|
13153
13183
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
13154
|
-
const steps =
|
13155
|
-
return /* @__PURE__ */
|
13184
|
+
const steps = React101.Children.count(children);
|
13185
|
+
return /* @__PURE__ */ React101.createElement(Stepper, {
|
13156
13186
|
role: "list",
|
13157
13187
|
className: "Aquarium-Stepper"
|
13158
|
-
}, /* @__PURE__ */
|
13188
|
+
}, /* @__PURE__ */ React101.createElement(Template, {
|
13159
13189
|
columns: steps
|
13160
|
-
},
|
13190
|
+
}, React101.Children.map(children, (child, index) => {
|
13161
13191
|
if (!isComponentType(child, Step2)) {
|
13162
13192
|
return new Error("<Stepper> can only have <Stepper.Step> components as children");
|
13163
13193
|
} else {
|
13164
13194
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
13165
|
-
return /* @__PURE__ */
|
13195
|
+
return /* @__PURE__ */ React101.createElement(Stepper.Step, {
|
13166
13196
|
state,
|
13167
13197
|
"aria-current": state === "active" ? "step" : false,
|
13168
13198
|
role: "listitem"
|
13169
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
13199
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React101.createElement(Stepper.ConnectorContainer, {
|
13170
13200
|
dense
|
13171
|
-
}, /* @__PURE__ */
|
13201
|
+
}, /* @__PURE__ */ React101.createElement(Stepper.ConnectorContainer.Connector, {
|
13172
13202
|
completed: state === "completed" || state === "active"
|
13173
|
-
})), /* @__PURE__ */
|
13203
|
+
})), /* @__PURE__ */ React101.createElement(Stepper.Step.Indicator, {
|
13174
13204
|
state,
|
13175
13205
|
dense
|
13176
13206
|
}, index + 1), child.props.children);
|
@@ -13183,16 +13213,16 @@ Step2.displayName = "Stepper.Step";
|
|
13183
13213
|
Stepper2.Step = Step2;
|
13184
13214
|
|
13185
13215
|
// src/molecules/Switch/Switch.tsx
|
13186
|
-
import
|
13216
|
+
import React103 from "react";
|
13187
13217
|
|
13188
13218
|
// src/atoms/Switch/Switch.tsx
|
13189
|
-
import
|
13190
|
-
var Switch =
|
13219
|
+
import React102 from "react";
|
13220
|
+
var Switch = React102.forwardRef(
|
13191
13221
|
(_a, ref) => {
|
13192
13222
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
13193
|
-
return /* @__PURE__ */
|
13223
|
+
return /* @__PURE__ */ React102.createElement("span", {
|
13194
13224
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
13195
|
-
}, /* @__PURE__ */
|
13225
|
+
}, /* @__PURE__ */ React102.createElement("input", __spreadProps(__spreadValues({
|
13196
13226
|
id,
|
13197
13227
|
ref,
|
13198
13228
|
type: "checkbox",
|
@@ -13211,7 +13241,7 @@ var Switch = React101.forwardRef(
|
|
13211
13241
|
),
|
13212
13242
|
readOnly,
|
13213
13243
|
disabled
|
13214
|
-
})), /* @__PURE__ */
|
13244
|
+
})), /* @__PURE__ */ React102.createElement("span", {
|
13215
13245
|
className: tw(
|
13216
13246
|
"pointer-events-none rounded-full absolute inline-block transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
13217
13247
|
"bg-white peer-disabled/switch:bg-grey-0 left-2 peer-checked/switch:left-1",
|
@@ -13224,12 +13254,30 @@ var Switch = React101.forwardRef(
|
|
13224
13254
|
);
|
13225
13255
|
|
13226
13256
|
// src/molecules/Switch/Switch.tsx
|
13227
|
-
var Switch2 =
|
13257
|
+
var Switch2 = React103.forwardRef(
|
13228
13258
|
(_a, ref) => {
|
13229
|
-
var _b = _a, {
|
13259
|
+
var _b = _a, {
|
13260
|
+
id,
|
13261
|
+
name,
|
13262
|
+
caption,
|
13263
|
+
readOnly = false,
|
13264
|
+
disabled = false,
|
13265
|
+
children,
|
13266
|
+
"aria-label": ariaLabel,
|
13267
|
+
labelPlacement
|
13268
|
+
} = _b, props = __objRest(_b, [
|
13269
|
+
"id",
|
13270
|
+
"name",
|
13271
|
+
"caption",
|
13272
|
+
"readOnly",
|
13273
|
+
"disabled",
|
13274
|
+
"children",
|
13275
|
+
"aria-label",
|
13276
|
+
"labelPlacement"
|
13277
|
+
]);
|
13230
13278
|
var _a2;
|
13231
13279
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
13232
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
13280
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React103.createElement(ControlLabel, {
|
13233
13281
|
htmlFor: id,
|
13234
13282
|
label: children,
|
13235
13283
|
"aria-label": ariaLabel,
|
@@ -13237,8 +13285,9 @@ var Switch2 = React102.forwardRef(
|
|
13237
13285
|
readOnly,
|
13238
13286
|
disabled,
|
13239
13287
|
style: { gap: "0 8px" },
|
13288
|
+
labelPlacement,
|
13240
13289
|
className: "Aquarium-Switch"
|
13241
|
-
}, !readOnly && /* @__PURE__ */
|
13290
|
+
}, !readOnly && /* @__PURE__ */ React103.createElement(Switch, __spreadProps(__spreadValues({
|
13242
13291
|
id,
|
13243
13292
|
ref,
|
13244
13293
|
name
|
@@ -13249,12 +13298,12 @@ var Switch2 = React102.forwardRef(
|
|
13249
13298
|
}
|
13250
13299
|
);
|
13251
13300
|
Switch2.displayName = "Switch";
|
13252
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
13301
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React103.createElement("div", {
|
13253
13302
|
className: tw("flex gap-3")
|
13254
|
-
}, /* @__PURE__ */
|
13303
|
+
}, /* @__PURE__ */ React103.createElement(Skeleton, {
|
13255
13304
|
height: 20,
|
13256
13305
|
width: 35
|
13257
|
-
}), /* @__PURE__ */
|
13306
|
+
}), /* @__PURE__ */ React103.createElement(Skeleton, {
|
13258
13307
|
height: 20,
|
13259
13308
|
width: 150
|
13260
13309
|
}));
|
@@ -13262,7 +13311,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
13262
13311
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
13263
13312
|
|
13264
13313
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
13265
|
-
import
|
13314
|
+
import React104, { useState as useState12 } from "react";
|
13266
13315
|
import uniqueId9 from "lodash/uniqueId";
|
13267
13316
|
var SwitchGroup = (_a) => {
|
13268
13317
|
var _b = _a, {
|
@@ -13294,13 +13343,13 @@ var SwitchGroup = (_a) => {
|
|
13294
13343
|
setSelectedItems(updated);
|
13295
13344
|
onChange == null ? void 0 : onChange(updated);
|
13296
13345
|
};
|
13297
|
-
return /* @__PURE__ */
|
13346
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
13298
13347
|
fieldset: true
|
13299
13348
|
}, labelControlProps), errorProps), {
|
13300
13349
|
className: "Aquarium-SwitchGroup"
|
13301
|
-
}), /* @__PURE__ */
|
13350
|
+
}), /* @__PURE__ */ React104.createElement(InputGroup, {
|
13302
13351
|
cols
|
13303
|
-
},
|
13352
|
+
}, React104.Children.map(children, (c) => {
|
13304
13353
|
var _a3, _b2, _c, _d;
|
13305
13354
|
if (!isComponentType(c, Switch2)) {
|
13306
13355
|
return null;
|
@@ -13308,7 +13357,7 @@ var SwitchGroup = (_a) => {
|
|
13308
13357
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
13309
13358
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
13310
13359
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
13311
|
-
return
|
13360
|
+
return React104.cloneElement(c, {
|
13312
13361
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
13313
13362
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
13314
13363
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -13318,9 +13367,9 @@ var SwitchGroup = (_a) => {
|
|
13318
13367
|
})));
|
13319
13368
|
};
|
13320
13369
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
13321
|
-
return /* @__PURE__ */
|
13370
|
+
return /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement("div", {
|
13322
13371
|
className: tw("flex flex-wrap flex-col gap-2")
|
13323
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
13372
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React104.createElement(Switch2.Skeleton, {
|
13324
13373
|
key
|
13325
13374
|
}))));
|
13326
13375
|
};
|
@@ -13328,14 +13377,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
13328
13377
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
13329
13378
|
|
13330
13379
|
// src/molecules/Textarea/Textarea.tsx
|
13331
|
-
import
|
13332
|
-
import
|
13380
|
+
import React105, { useRef as useRef13, useState as useState13 } from "react";
|
13381
|
+
import omit16 from "lodash/omit";
|
13333
13382
|
import toString2 from "lodash/toString";
|
13334
13383
|
import uniqueId10 from "lodash/uniqueId";
|
13335
|
-
var TextareaBase =
|
13384
|
+
var TextareaBase = React105.forwardRef(
|
13336
13385
|
(_a, ref) => {
|
13337
13386
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
13338
|
-
return /* @__PURE__ */
|
13387
|
+
return /* @__PURE__ */ React105.createElement("textarea", __spreadProps(__spreadValues({
|
13339
13388
|
ref
|
13340
13389
|
}, props), {
|
13341
13390
|
readOnly,
|
@@ -13343,25 +13392,25 @@ var TextareaBase = React104.forwardRef(
|
|
13343
13392
|
}));
|
13344
13393
|
}
|
13345
13394
|
);
|
13346
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
13395
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React105.createElement(Skeleton, {
|
13347
13396
|
height: 58
|
13348
13397
|
});
|
13349
|
-
var Textarea =
|
13398
|
+
var Textarea = React105.forwardRef((props, ref) => {
|
13350
13399
|
var _a, _b, _c;
|
13351
13400
|
const [value, setValue] = useState13((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
13352
13401
|
const id = useRef13((_c = props.id) != null ? _c : `textarea-${uniqueId10()}`);
|
13353
13402
|
const errorMessageId = uniqueId10();
|
13354
13403
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13355
13404
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
13356
|
-
const baseProps =
|
13357
|
-
return /* @__PURE__ */
|
13405
|
+
const baseProps = omit16(props, Object.keys(labelControlProps));
|
13406
|
+
return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues({
|
13358
13407
|
id: `${id.current}-label`,
|
13359
13408
|
htmlFor: id.current,
|
13360
13409
|
messageId: errorMessageId,
|
13361
13410
|
length: value !== void 0 ? toString2(value).length : void 0
|
13362
13411
|
}, labelControlProps), {
|
13363
13412
|
className: "Aquarium-Textarea"
|
13364
|
-
}), /* @__PURE__ */
|
13413
|
+
}), /* @__PURE__ */ React105.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
13365
13414
|
ref
|
13366
13415
|
}, baseProps), errorProps), {
|
13367
13416
|
id: id.current,
|
@@ -13378,48 +13427,48 @@ var Textarea = React104.forwardRef((props, ref) => {
|
|
13378
13427
|
})));
|
13379
13428
|
});
|
13380
13429
|
Textarea.displayName = "Textarea";
|
13381
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
13430
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement(TextareaBase.Skeleton, null));
|
13382
13431
|
Textarea.Skeleton = TextAreaSkeleton;
|
13383
13432
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
13384
13433
|
|
13385
13434
|
// src/molecules/Timeline/Timeline.tsx
|
13386
|
-
import
|
13435
|
+
import React107 from "react";
|
13387
13436
|
|
13388
13437
|
// src/atoms/Timeline/Timeline.tsx
|
13389
|
-
import
|
13438
|
+
import React106 from "react";
|
13390
13439
|
var Timeline = (_a) => {
|
13391
13440
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13392
|
-
return /* @__PURE__ */
|
13441
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13393
13442
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
13394
13443
|
}));
|
13395
13444
|
};
|
13396
13445
|
var Content2 = (_a) => {
|
13397
13446
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13398
|
-
return /* @__PURE__ */
|
13447
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13399
13448
|
className: classNames(tw("pb-6"), className)
|
13400
13449
|
}));
|
13401
13450
|
};
|
13402
13451
|
var Separator2 = (_a) => {
|
13403
13452
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13404
|
-
return /* @__PURE__ */
|
13453
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13405
13454
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
13406
13455
|
}));
|
13407
13456
|
};
|
13408
13457
|
var LineContainer = (_a) => {
|
13409
13458
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13410
|
-
return /* @__PURE__ */
|
13459
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13411
13460
|
className: classNames(tw("flex justify-center py-1"), className)
|
13412
13461
|
}));
|
13413
13462
|
};
|
13414
13463
|
var Line = (_a) => {
|
13415
13464
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13416
|
-
return /* @__PURE__ */
|
13465
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13417
13466
|
className: classNames(tw("w-1 bg-grey-5 h-full justify-self-center"), className)
|
13418
13467
|
}));
|
13419
13468
|
};
|
13420
13469
|
var Dot = (_a) => {
|
13421
13470
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13422
|
-
return /* @__PURE__ */
|
13471
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13423
13472
|
className: classNames(tw("bg-grey-30 h-[6px] w-[6px] rounded"), className)
|
13424
13473
|
}));
|
13425
13474
|
};
|
@@ -13434,54 +13483,54 @@ var import_error5 = __toESM(require_error());
|
|
13434
13483
|
var import_time2 = __toESM(require_time());
|
13435
13484
|
var import_warningSign5 = __toESM(require_warningSign());
|
13436
13485
|
var TimelineItem = () => null;
|
13437
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
13486
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React107.createElement("div", {
|
13438
13487
|
className: "Aquarium-Timeline"
|
13439
|
-
},
|
13488
|
+
}, React107.Children.map(children, (item) => {
|
13440
13489
|
if (!isComponentType(item, TimelineItem)) {
|
13441
13490
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
13442
13491
|
} else {
|
13443
13492
|
const { props, key } = item;
|
13444
|
-
return /* @__PURE__ */
|
13493
|
+
return /* @__PURE__ */ React107.createElement(Timeline, {
|
13445
13494
|
key: key != null ? key : props.title
|
13446
|
-
}, /* @__PURE__ */
|
13495
|
+
}, /* @__PURE__ */ React107.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React107.createElement(Icon, {
|
13447
13496
|
icon: import_error5.default,
|
13448
13497
|
color: "error-30"
|
13449
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
13498
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React107.createElement(Icon, {
|
13450
13499
|
icon: import_warningSign5.default,
|
13451
13500
|
color: "warning-30"
|
13452
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
13501
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React107.createElement(Icon, {
|
13453
13502
|
icon: import_time2.default,
|
13454
13503
|
color: "info-30"
|
13455
|
-
}) : /* @__PURE__ */
|
13504
|
+
}) : /* @__PURE__ */ React107.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React107.createElement(Typography2.Caption, {
|
13456
13505
|
color: "grey-50"
|
13457
|
-
}, props.title), /* @__PURE__ */
|
13506
|
+
}, props.title), /* @__PURE__ */ React107.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React107.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React107.createElement(Timeline.Content, null, /* @__PURE__ */ React107.createElement(Typography2.Small, null, props.children)));
|
13458
13507
|
}
|
13459
13508
|
}));
|
13460
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
13509
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React107.createElement(Timeline, null, /* @__PURE__ */ React107.createElement(Timeline.Separator, null, /* @__PURE__ */ React107.createElement(Skeleton, {
|
13461
13510
|
width: 6,
|
13462
13511
|
height: 6,
|
13463
13512
|
rounded: true
|
13464
|
-
})), /* @__PURE__ */
|
13513
|
+
})), /* @__PURE__ */ React107.createElement(Skeleton, {
|
13465
13514
|
height: 12,
|
13466
13515
|
width: 120
|
13467
|
-
}), /* @__PURE__ */
|
13516
|
+
}), /* @__PURE__ */ React107.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React107.createElement(Skeleton, {
|
13468
13517
|
width: 2,
|
13469
13518
|
height: "100%"
|
13470
|
-
})), /* @__PURE__ */
|
13519
|
+
})), /* @__PURE__ */ React107.createElement(Timeline.Content, null, /* @__PURE__ */ React107.createElement(Box, {
|
13471
13520
|
display: "flex",
|
13472
13521
|
flexDirection: "column",
|
13473
13522
|
gap: "3"
|
13474
|
-
}, /* @__PURE__ */
|
13523
|
+
}, /* @__PURE__ */ React107.createElement(Skeleton, {
|
13475
13524
|
height: 32,
|
13476
13525
|
width: "100%"
|
13477
|
-
}), /* @__PURE__ */
|
13526
|
+
}), /* @__PURE__ */ React107.createElement(Skeleton, {
|
13478
13527
|
height: 32,
|
13479
13528
|
width: "73%"
|
13480
|
-
}), /* @__PURE__ */
|
13529
|
+
}), /* @__PURE__ */ React107.createElement(Skeleton, {
|
13481
13530
|
height: 32,
|
13482
13531
|
width: "80%"
|
13483
13532
|
}))));
|
13484
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
13533
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React107.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React107.createElement(TimelineItemSkeleton, {
|
13485
13534
|
key
|
13486
13535
|
})));
|
13487
13536
|
Timeline2.Item = TimelineItem;
|
@@ -13489,9 +13538,9 @@ Timeline2.Skeleton = TimelineSkeleton;
|
|
13489
13538
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
13490
13539
|
|
13491
13540
|
// src/utils/table/useTableSelect.ts
|
13492
|
-
import
|
13541
|
+
import React108 from "react";
|
13493
13542
|
var useTableSelect = (data, { key }) => {
|
13494
|
-
const [selected, setSelected] =
|
13543
|
+
const [selected, setSelected] = React108.useState([]);
|
13495
13544
|
const allSelected = selected.length === data.length;
|
13496
13545
|
const isSelected = (dot) => selected.includes(dot[key]);
|
13497
13546
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|