@aivenio/aquarium 1.34.0 → 1.36.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/atoms.cjs +2 -2
- package/dist/atoms.mjs +2 -2
- package/dist/src/atoms/Chip/Chip.js +2 -2
- package/dist/src/atoms/Section/Section.d.ts +9 -3
- package/dist/src/atoms/Section/Section.js +10 -7
- package/dist/src/icons/loading.js +1 -1
- package/dist/src/molecules/EmptyState/EmptyState.d.ts +37 -6
- package/dist/src/molecules/EmptyState/EmptyState.js +33 -18
- package/dist/src/molecules/Modal/Modal.d.ts +1 -1
- package/dist/src/molecules/Section/Section.d.ts +41 -5
- package/dist/src/molecules/Section/Section.js +72 -14
- package/dist/src/molecules/TagLabel/TagLabel.d.ts +6 -0
- package/dist/src/molecules/TagLabel/TagLabel.js +14 -3
- package/dist/src/utils/useMeasure.d.ts +7 -0
- package/dist/src/utils/useMeasure.js +27 -0
- package/dist/styles.css +23 -6
- package/dist/styles_timescaledb.css +23 -6
- package/dist/system.cjs +282 -171
- package/dist/system.mjs +279 -168
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +2 -2
package/dist/system.mjs
CHANGED
@@ -3561,7 +3561,7 @@ var require_loading = __commonJS({
|
|
3561
3561
|
"src/icons/loading.js"(exports) {
|
3562
3562
|
"use strict";
|
3563
3563
|
var data = {
|
3564
|
-
"body": '<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="
|
3564
|
+
"body": '<g fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="3" transform="translate(1 1)"><circle cx="18" cy="18" r="18" stroke-opacity=".5"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" dur="1s" from="0 18 18" repeatCount="indefinite" to="360 18 18" type="rotate"/></path></g>',
|
3565
3565
|
"left": 0,
|
3566
3566
|
"top": 0,
|
3567
3567
|
"width": 38,
|
@@ -7747,7 +7747,7 @@ var Container = React25.forwardRef(
|
|
7747
7747
|
ref,
|
7748
7748
|
className: classNames(
|
7749
7749
|
tw("inline-flex items-center rounded-sm transition whitespace-nowrap", {
|
7750
|
-
"typography-small py-2 px-3 gap-x-3": !dense,
|
7750
|
+
"typography-small py-2 px-3 gap-x-3 leading-tight": !dense,
|
7751
7751
|
"typography-caption py-1 px-2 gap-x-2": dense
|
7752
7752
|
}),
|
7753
7753
|
className
|
@@ -11036,31 +11036,11 @@ Dropdown.Menu = DropdownMenu3;
|
|
11036
11036
|
Dropdown.Item = DropdownItem;
|
11037
11037
|
|
11038
11038
|
// src/molecules/EmptyState/EmptyState.tsx
|
11039
|
-
import React72 from "react";
|
11040
|
-
import omit10 from "lodash/omit";
|
11041
|
-
|
11042
|
-
// src/molecules/Flexbox/FlexboxItem.tsx
|
11043
11039
|
import React71 from "react";
|
11044
|
-
|
11045
|
-
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
11046
|
-
const hookStyle = useStyle({
|
11047
|
-
display,
|
11048
|
-
flex,
|
11049
|
-
flexGrow: grow,
|
11050
|
-
flexShrink: shrink,
|
11051
|
-
order,
|
11052
|
-
alignSelf
|
11053
|
-
});
|
11054
|
-
const HtmlElement = htmlTag;
|
11055
|
-
return /* @__PURE__ */ React71.createElement(HtmlElement, {
|
11056
|
-
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
11057
|
-
className
|
11058
|
-
}, children);
|
11059
|
-
}
|
11060
|
-
);
|
11061
|
-
|
11062
|
-
// src/molecules/EmptyState/EmptyState.tsx
|
11040
|
+
import omit10 from "lodash/omit";
|
11063
11041
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
11042
|
+
EmptyStateLayout2["Vertical"] = "vertical";
|
11043
|
+
EmptyStateLayout2["Horizontal"] = "horizontal";
|
11064
11044
|
EmptyStateLayout2["CenterVertical"] = "center-vertical";
|
11065
11045
|
EmptyStateLayout2["LeftVertical"] = "left-vertical";
|
11066
11046
|
EmptyStateLayout2["CenterHorizontal"] = "center-horizontal";
|
@@ -11076,6 +11056,7 @@ var layoutStyle = (layout) => {
|
|
11076
11056
|
alignItems: "flex-start"
|
11077
11057
|
};
|
11078
11058
|
case "left-horizontal" /* LeftHorizontal */:
|
11059
|
+
case "horizontal" /* Horizontal */:
|
11079
11060
|
return {
|
11080
11061
|
layout: "row",
|
11081
11062
|
justifyContent: "flex-start",
|
@@ -11088,6 +11069,7 @@ var layoutStyle = (layout) => {
|
|
11088
11069
|
alignItems: "flex-start"
|
11089
11070
|
};
|
11090
11071
|
case "center-vertical" /* CenterVertical */:
|
11072
|
+
case "vertical" /* Vertical */:
|
11091
11073
|
default:
|
11092
11074
|
return {
|
11093
11075
|
layout: "column",
|
@@ -11096,6 +11078,7 @@ var layoutStyle = (layout) => {
|
|
11096
11078
|
};
|
11097
11079
|
}
|
11098
11080
|
};
|
11081
|
+
var isVerticalLayout = (layout) => layout === "vertical" /* Vertical */ || layout === "center-vertical" /* CenterVertical */;
|
11099
11082
|
var EmptyState = ({
|
11100
11083
|
title,
|
11101
11084
|
image,
|
@@ -11106,65 +11089,81 @@ var EmptyState = ({
|
|
11106
11089
|
primaryAction,
|
11107
11090
|
secondaryAction,
|
11108
11091
|
footer,
|
11109
|
-
layout = "
|
11110
|
-
borderStyle = "dashed"
|
11092
|
+
layout = "vertical" /* Vertical */,
|
11093
|
+
borderStyle = "dashed",
|
11094
|
+
fullHeight = isVerticalLayout(layout) ? true : false
|
11111
11095
|
}) => {
|
11112
11096
|
const template = layoutStyle(layout);
|
11113
|
-
return /* @__PURE__ */
|
11097
|
+
return /* @__PURE__ */ React71.createElement(Box, {
|
11114
11098
|
className: classNames(
|
11115
11099
|
"Aquarium-EmptyState",
|
11116
|
-
tw("rounded", {
|
11100
|
+
tw("rounded p-[56px]", {
|
11117
11101
|
"border border-dashed": borderStyle === "dashed",
|
11118
11102
|
"border border-solid": borderStyle === "solid",
|
11119
|
-
"text-left": layout
|
11120
|
-
"text-center": layout
|
11103
|
+
"text-left": !isVerticalLayout(layout),
|
11104
|
+
"text-center": isVerticalLayout(layout),
|
11105
|
+
"h-full": fullHeight
|
11121
11106
|
})
|
11122
11107
|
),
|
11123
11108
|
backgroundColor: "transparent",
|
11124
|
-
borderColor: "grey-10"
|
11125
|
-
|
11126
|
-
|
11127
|
-
|
11109
|
+
borderColor: "grey-10"
|
11110
|
+
}, /* @__PURE__ */ React71.createElement(Box.Flex, {
|
11111
|
+
style: { gap: "56px" },
|
11112
|
+
flexDirection: template.layout,
|
11128
11113
|
justifyContent: template.justifyContent,
|
11129
11114
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
11130
|
-
|
11131
|
-
|
11132
|
-
}, image && /* @__PURE__ */ React72.createElement(FlexboxItem, null, /* @__PURE__ */ React72.createElement("img", {
|
11115
|
+
height: fullHeight ? "full" : void 0
|
11116
|
+
}, image && /* @__PURE__ */ React71.createElement("img", {
|
11133
11117
|
src: image,
|
11134
11118
|
alt: imageAlt,
|
11135
11119
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
11136
|
-
})
|
11137
|
-
|
11138
|
-
direction: "column",
|
11120
|
+
}), /* @__PURE__ */ React71.createElement(Box.Flex, {
|
11121
|
+
flexDirection: "column",
|
11139
11122
|
justifyContent: template.justifyContent,
|
11140
11123
|
alignItems: template.alignItems
|
11141
|
-
}, /* @__PURE__ */
|
11142
|
-
variant: "heading",
|
11124
|
+
}, /* @__PURE__ */ React71.createElement(Typography2.Heading, {
|
11143
11125
|
htmlTag: "h2"
|
11144
|
-
}, title), (description || children) && /* @__PURE__ */
|
11126
|
+
}, title), (description || children) && /* @__PURE__ */ React71.createElement(Box, {
|
11145
11127
|
marginTop: "5"
|
11146
|
-
}, /* @__PURE__ */
|
11147
|
-
variant: "default",
|
11128
|
+
}, /* @__PURE__ */ React71.createElement(Typography2.Default, {
|
11148
11129
|
color: "grey-60"
|
11149
|
-
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */
|
11130
|
+
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React71.createElement(Box.Flex, {
|
11150
11131
|
marginTop: "7",
|
11151
11132
|
gap: "4",
|
11152
11133
|
justifyContent: "center",
|
11153
11134
|
alignItems: "center",
|
11154
11135
|
wrap: "wrap"
|
11155
|
-
}, primaryAction && /* @__PURE__ */
|
11136
|
+
}, primaryAction && /* @__PURE__ */ React71.createElement(React71.Fragment, null, !isLink(primaryAction) && /* @__PURE__ */ React71.createElement(Button.Primary, __spreadValues({}, omit10(primaryAction, "text")), primaryAction.text), isLink(primaryAction) && /* @__PURE__ */ React71.createElement(Button.ExternalLink, __spreadValues({
|
11156
11137
|
kind: "primary"
|
11157
|
-
}, omit10(primaryAction, "text")), primaryAction.text)), secondaryAction && /* @__PURE__ */
|
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({
|
11158
11139
|
kind: "secondary"
|
11159
|
-
}, omit10(secondaryAction, "text")), secondaryAction.text))), footer && /* @__PURE__ */
|
11160
|
-
marginTop: "
|
11161
|
-
}, /* @__PURE__ */
|
11162
|
-
htmlTag: "div",
|
11163
|
-
variant: "small",
|
11140
|
+
}, omit10(secondaryAction, "text")), secondaryAction.text))), footer && /* @__PURE__ */ React71.createElement(Box, {
|
11141
|
+
marginTop: "5"
|
11142
|
+
}, /* @__PURE__ */ React71.createElement(Typography2.Small, {
|
11164
11143
|
color: "grey-60"
|
11165
11144
|
}, footer)))));
|
11166
11145
|
};
|
11167
11146
|
|
11147
|
+
// src/molecules/Flexbox/FlexboxItem.tsx
|
11148
|
+
import React72 from "react";
|
11149
|
+
var FlexboxItem = Tailwindify(
|
11150
|
+
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
11151
|
+
const hookStyle = useStyle({
|
11152
|
+
display,
|
11153
|
+
flex,
|
11154
|
+
flexGrow: grow,
|
11155
|
+
flexShrink: shrink,
|
11156
|
+
order,
|
11157
|
+
alignSelf
|
11158
|
+
});
|
11159
|
+
const HtmlElement = htmlTag;
|
11160
|
+
return /* @__PURE__ */ React72.createElement(HtmlElement, {
|
11161
|
+
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
11162
|
+
className
|
11163
|
+
}, children);
|
11164
|
+
}
|
11165
|
+
);
|
11166
|
+
|
11168
11167
|
// src/molecules/Grid/GridItem.tsx
|
11169
11168
|
import React73 from "react";
|
11170
11169
|
var GridItem = Tailwindify(
|
@@ -12779,73 +12778,200 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
12779
12778
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
12780
12779
|
|
12781
12780
|
// src/molecules/Section/Section.tsx
|
12782
|
-
import
|
12781
|
+
import React97 from "react";
|
12782
|
+
import { useId as useId3 } from "@react-aria/utils";
|
12783
|
+
import { animated as animated3, useSpring as useSpring2 } from "@react-spring/web";
|
12783
12784
|
import castArray4 from "lodash/castArray";
|
12785
|
+
import isUndefined8 from "lodash/isUndefined";
|
12786
|
+
import noop from "lodash/noop";
|
12784
12787
|
import omit17 from "lodash/omit";
|
12785
12788
|
|
12786
|
-
// src/
|
12789
|
+
// src/molecules/TagLabel/TagLabel.tsx
|
12787
12790
|
import React94 from "react";
|
12791
|
+
var getVariantClassNames = (variant = "primary") => {
|
12792
|
+
switch (variant) {
|
12793
|
+
case "danger":
|
12794
|
+
return tw("bg-secondary-90");
|
12795
|
+
case "success":
|
12796
|
+
return tw("bg-success-90");
|
12797
|
+
case "primary":
|
12798
|
+
default:
|
12799
|
+
return tw("bg-primary-90");
|
12800
|
+
}
|
12801
|
+
};
|
12802
|
+
var TagLabel = (_a) => {
|
12803
|
+
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
12804
|
+
return /* @__PURE__ */ React94.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
12805
|
+
className: classNames(
|
12806
|
+
"Aquarium-TagLabel",
|
12807
|
+
getVariantClassNames(variant),
|
12808
|
+
tw("rounded-full text-white", {
|
12809
|
+
"py-2 px-4 typography-caption": !dense,
|
12810
|
+
"py-2 px-3 typography-caption-small": dense
|
12811
|
+
})
|
12812
|
+
)
|
12813
|
+
}), title);
|
12814
|
+
};
|
12815
|
+
|
12816
|
+
// src/atoms/Section/Section.tsx
|
12817
|
+
import React95 from "react";
|
12818
|
+
var import_caretUp2 = __toESM(require_caretUp());
|
12788
12819
|
var Section3 = (_a) => {
|
12789
12820
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12790
|
-
return /* @__PURE__ */
|
12821
|
+
return /* @__PURE__ */ React95.createElement(Box, __spreadValues({
|
12791
12822
|
borderColor: "grey-5",
|
12792
12823
|
borderWidth: "1px"
|
12793
12824
|
}, rest), children);
|
12794
12825
|
};
|
12795
12826
|
Section3.Header = (_a) => {
|
12796
|
-
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12797
|
-
return /* @__PURE__ */
|
12798
|
-
className: classNames(
|
12827
|
+
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
12828
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12829
|
+
className: classNames(
|
12830
|
+
tw("px-6 py-5 flex gap-5 justify-between items-center", { "bg-grey-0": collapsible }),
|
12831
|
+
className
|
12832
|
+
)
|
12799
12833
|
}), children);
|
12800
12834
|
};
|
12801
12835
|
Section3.TitleContainer = (_a) => {
|
12802
|
-
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12803
|
-
return /* @__PURE__ */
|
12804
|
-
className: classNames(
|
12836
|
+
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
12837
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12838
|
+
className: classNames(
|
12839
|
+
tw("grow grid grid-cols-[auto_1fr] gap-y-2 gap-x-3 items-center", { "cursor-pointer": collapsible }),
|
12840
|
+
className
|
12841
|
+
)
|
12805
12842
|
}), children);
|
12806
12843
|
};
|
12844
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React95.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
12845
|
+
icon: import_caretUp2.default,
|
12846
|
+
height: 22,
|
12847
|
+
width: 22
|
12848
|
+
}));
|
12807
12849
|
Section3.Title = (_a) => {
|
12808
12850
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12809
|
-
return /* @__PURE__ */
|
12810
|
-
color: "black"
|
12851
|
+
return /* @__PURE__ */ React95.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
12852
|
+
color: "black",
|
12853
|
+
className: "flex gap-3 items-center"
|
12811
12854
|
}), children);
|
12812
12855
|
};
|
12813
12856
|
Section3.Subtitle = (_a) => {
|
12814
12857
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12815
|
-
return /* @__PURE__ */
|
12858
|
+
return /* @__PURE__ */ React95.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
12816
12859
|
color: "grey-70"
|
12817
12860
|
}), children);
|
12818
12861
|
};
|
12819
12862
|
Section3.Actions = (_a) => {
|
12820
12863
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12821
|
-
return /* @__PURE__ */
|
12864
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12822
12865
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
12823
12866
|
}), children);
|
12824
12867
|
};
|
12825
12868
|
Section3.Body = (_a) => {
|
12826
12869
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12827
|
-
return /* @__PURE__ */
|
12870
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12828
12871
|
className: classNames(tw("p-6"), className)
|
12829
|
-
}), /* @__PURE__ */
|
12872
|
+
}), /* @__PURE__ */ React95.createElement(Typography, {
|
12830
12873
|
htmlTag: "div",
|
12831
12874
|
color: "grey-70"
|
12832
12875
|
}, children));
|
12833
12876
|
};
|
12834
12877
|
|
12878
|
+
// src/utils/useMeasure.ts
|
12879
|
+
import React96 from "react";
|
12880
|
+
function useMeasure() {
|
12881
|
+
const ref = React96.useRef(null);
|
12882
|
+
const [rect, setRect] = React96.useState({
|
12883
|
+
width: null,
|
12884
|
+
height: null
|
12885
|
+
});
|
12886
|
+
React96.useLayoutEffect(() => {
|
12887
|
+
if (!ref.current || !window.ResizeObserver) {
|
12888
|
+
return;
|
12889
|
+
}
|
12890
|
+
const observer = new window.ResizeObserver(([entry]) => {
|
12891
|
+
if (entry == null ? void 0 : entry.contentRect) {
|
12892
|
+
setRect({
|
12893
|
+
width: entry.contentRect.width,
|
12894
|
+
height: entry.contentRect.height
|
12895
|
+
});
|
12896
|
+
}
|
12897
|
+
});
|
12898
|
+
observer.observe(ref.current);
|
12899
|
+
return () => {
|
12900
|
+
observer.disconnect();
|
12901
|
+
};
|
12902
|
+
}, []);
|
12903
|
+
return [ref, rect];
|
12904
|
+
}
|
12905
|
+
|
12835
12906
|
// src/molecules/Section/Section.tsx
|
12836
|
-
var Section4 = (
|
12837
|
-
|
12838
|
-
|
12839
|
-
(
|
12840
|
-
|
12841
|
-
|
12842
|
-
|
12843
|
-
|
12844
|
-
|
12845
|
-
|
12907
|
+
var Section4 = (props) => {
|
12908
|
+
var _a, _b, _c;
|
12909
|
+
const { title, subtitle, actions, children } = props;
|
12910
|
+
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
12911
|
+
const _collapsed = title ? props.collapsed : void 0;
|
12912
|
+
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
12913
|
+
const [isCollapsed, setCollapsed] = React97.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
12914
|
+
const [ref, { height }] = useMeasure();
|
12915
|
+
const _onCollapsedChanged = title && props.collapsible ? (_c = props.onCollapsedChange) != null ? _c : setCollapsed : noop;
|
12916
|
+
if (title && !isUndefined8(props.collapsed) && props.collapsed !== isCollapsed) {
|
12917
|
+
setCollapsed(props.collapsed);
|
12918
|
+
}
|
12919
|
+
const handleTitleClick = () => {
|
12920
|
+
_onCollapsedChanged(!isCollapsed);
|
12921
|
+
};
|
12922
|
+
const targetHeight = isCollapsed ? "0px" : `${height != null ? height : 0}px`;
|
12923
|
+
const _d = useSpring2({
|
12924
|
+
height: height !== null ? targetHeight : void 0,
|
12925
|
+
opacity: isCollapsed ? 0 : 1,
|
12926
|
+
transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
|
12927
|
+
backgroundColor: isCollapsed ? tailwind_theme_default.backgroundColor["grey-0"] : tailwind_theme_default.backgroundColor["grey-5"],
|
12928
|
+
config: {
|
12929
|
+
duration: 150
|
12930
|
+
},
|
12931
|
+
immediate: !_collapsible
|
12932
|
+
}), { transform, backgroundColor } = _d, spring = __objRest(_d, ["transform", "backgroundColor"]);
|
12933
|
+
const toggleId = useId3();
|
12934
|
+
const regionId = useId3();
|
12935
|
+
return /* @__PURE__ */ React97.createElement(Section3, {
|
12936
|
+
className: "Aquarium-Section"
|
12937
|
+
}, title && /* @__PURE__ */ React97.createElement(React97.Fragment, null, /* @__PURE__ */ React97.createElement(Section3.Header, {
|
12938
|
+
collapsible: _collapsible
|
12939
|
+
}, /* @__PURE__ */ React97.createElement(Section3.TitleContainer, {
|
12940
|
+
role: _collapsible ? "button" : void 0,
|
12941
|
+
id: toggleId,
|
12942
|
+
collapsible: _collapsible,
|
12943
|
+
onClick: handleTitleClick,
|
12944
|
+
"aria-expanded": !isCollapsed,
|
12945
|
+
"aria-controls": regionId
|
12946
|
+
}, _collapsible && /* @__PURE__ */ React97.createElement(animated3.div, {
|
12947
|
+
style: { transform }
|
12948
|
+
}, /* @__PURE__ */ React97.createElement(Section3.Toggle, null)), /* @__PURE__ */ React97.createElement(Section3.Title, null, title, props.tag && /* @__PURE__ */ React97.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React97.createElement(Chip2, {
|
12949
|
+
text: props.badge
|
12950
|
+
}), props.chip && /* @__PURE__ */ React97.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React97.createElement(Section3.Subtitle, {
|
12951
|
+
className: tw("row-start-2", { "col-start-2": _collapsible })
|
12952
|
+
}, subtitle)), /* @__PURE__ */ React97.createElement(Section3.Actions, null, actions && castArray4(actions).filter(Boolean).map(
|
12953
|
+
(action) => !isLink(action) ? /* @__PURE__ */ React97.createElement(Button.Secondary, __spreadValues({
|
12954
|
+
key: action.text
|
12955
|
+
}, omit17(action, "text")), action.text) : /* @__PURE__ */ React97.createElement(Button.ExternalLink, __spreadValues({
|
12956
|
+
key: action.text,
|
12957
|
+
kind: "secondary"
|
12958
|
+
}, omit17(action, "text")), action.text)
|
12959
|
+
))), /* @__PURE__ */ React97.createElement(animated3.div, {
|
12960
|
+
className: tw(`h-[1px]`),
|
12961
|
+
style: { backgroundColor }
|
12962
|
+
})), /* @__PURE__ */ React97.createElement(animated3.div, {
|
12963
|
+
id: regionId,
|
12964
|
+
role: "region",
|
12965
|
+
"aria-hidden": isCollapsed ? true : void 0,
|
12966
|
+
style: spring,
|
12967
|
+
className: tw({ "overflow-hidden": _collapsible })
|
12968
|
+
}, /* @__PURE__ */ React97.createElement("div", {
|
12969
|
+
ref
|
12970
|
+
}, /* @__PURE__ */ React97.createElement(Section3.Body, null, children))));
|
12971
|
+
};
|
12846
12972
|
|
12847
12973
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
12848
|
-
import
|
12974
|
+
import React98 from "react";
|
12849
12975
|
var SegmentedControl = (_a) => {
|
12850
12976
|
var _b = _a, {
|
12851
12977
|
children,
|
@@ -12862,7 +12988,7 @@ var SegmentedControl = (_a) => {
|
|
12862
12988
|
"selected",
|
12863
12989
|
"className"
|
12864
12990
|
]);
|
12865
|
-
return /* @__PURE__ */
|
12991
|
+
return /* @__PURE__ */ React98.createElement("li", null, /* @__PURE__ */ React98.createElement("button", __spreadProps(__spreadValues({
|
12866
12992
|
type: "button"
|
12867
12993
|
}, rest), {
|
12868
12994
|
className: classNames(
|
@@ -12896,12 +13022,12 @@ var SegmentedControlGroup = (_a) => {
|
|
12896
13022
|
"border border-grey-20 text-grey-50": variant === "outlined",
|
12897
13023
|
"bg-grey-0": variant === "raised"
|
12898
13024
|
});
|
12899
|
-
return /* @__PURE__ */
|
13025
|
+
return /* @__PURE__ */ React98.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
12900
13026
|
"aria-label": ariaLabel,
|
12901
13027
|
className: classNames("Aquarium-SegmentedControl", classes2, className)
|
12902
|
-
}),
|
13028
|
+
}), React98.Children.map(
|
12903
13029
|
children,
|
12904
|
-
(child) =>
|
13030
|
+
(child) => React98.cloneElement(child, {
|
12905
13031
|
dense,
|
12906
13032
|
variant,
|
12907
13033
|
onClick: () => onChange(child.props.value),
|
@@ -12939,14 +13065,14 @@ var getCommonClassNames = (dense, selected) => tw(
|
|
12939
13065
|
);
|
12940
13066
|
|
12941
13067
|
// src/molecules/Stepper/Stepper.tsx
|
12942
|
-
import
|
13068
|
+
import React100 from "react";
|
12943
13069
|
|
12944
13070
|
// src/atoms/Stepper/Stepper.tsx
|
12945
|
-
import
|
13071
|
+
import React99 from "react";
|
12946
13072
|
var import_tick6 = __toESM(require_tick());
|
12947
13073
|
var Stepper = (_a) => {
|
12948
13074
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12949
|
-
return /* @__PURE__ */
|
13075
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12950
13076
|
className: classNames(className)
|
12951
13077
|
}));
|
12952
13078
|
};
|
@@ -12960,7 +13086,7 @@ var ConnectorContainer = (_a) => {
|
|
12960
13086
|
"completed",
|
12961
13087
|
"dense"
|
12962
13088
|
]);
|
12963
|
-
return /* @__PURE__ */
|
13089
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12964
13090
|
className: classNames(
|
12965
13091
|
tw("absolute w-full -left-1/2", {
|
12966
13092
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -12972,7 +13098,7 @@ var ConnectorContainer = (_a) => {
|
|
12972
13098
|
};
|
12973
13099
|
var Connector = (_a) => {
|
12974
13100
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
12975
|
-
return /* @__PURE__ */
|
13101
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12976
13102
|
className: classNames(
|
12977
13103
|
tw("w-full", {
|
12978
13104
|
"bg-grey-20": !completed,
|
@@ -12986,7 +13112,7 @@ var Connector = (_a) => {
|
|
12986
13112
|
};
|
12987
13113
|
var Step = (_a) => {
|
12988
13114
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
12989
|
-
return /* @__PURE__ */
|
13115
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12990
13116
|
className: classNames(
|
12991
13117
|
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
12992
13118
|
"text-grey-20": state === "inactive"
|
@@ -13007,13 +13133,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
13007
13133
|
});
|
13008
13134
|
var Indicator = (_a) => {
|
13009
13135
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
13010
|
-
return /* @__PURE__ */
|
13136
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13011
13137
|
className: classNames(
|
13012
13138
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
13013
13139
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
13014
13140
|
className
|
13015
13141
|
)
|
13016
|
-
}), state === "completed" ? /* @__PURE__ */
|
13142
|
+
}), state === "completed" ? /* @__PURE__ */ React99.createElement(InlineIcon, {
|
13017
13143
|
icon: import_tick6.default
|
13018
13144
|
}) : dense ? null : children);
|
13019
13145
|
};
|
@@ -13024,26 +13150,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
13024
13150
|
|
13025
13151
|
// src/molecules/Stepper/Stepper.tsx
|
13026
13152
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
13027
|
-
const steps =
|
13028
|
-
return /* @__PURE__ */
|
13153
|
+
const steps = React100.Children.count(children);
|
13154
|
+
return /* @__PURE__ */ React100.createElement(Stepper, {
|
13029
13155
|
role: "list",
|
13030
13156
|
className: "Aquarium-Stepper"
|
13031
|
-
}, /* @__PURE__ */
|
13157
|
+
}, /* @__PURE__ */ React100.createElement(Template, {
|
13032
13158
|
columns: steps
|
13033
|
-
},
|
13159
|
+
}, React100.Children.map(children, (child, index) => {
|
13034
13160
|
if (!isComponentType(child, Step2)) {
|
13035
13161
|
return new Error("<Stepper> can only have <Stepper.Step> components as children");
|
13036
13162
|
} else {
|
13037
13163
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
13038
|
-
return /* @__PURE__ */
|
13164
|
+
return /* @__PURE__ */ React100.createElement(Stepper.Step, {
|
13039
13165
|
state,
|
13040
13166
|
"aria-current": state === "active" ? "step" : false,
|
13041
13167
|
role: "listitem"
|
13042
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
13168
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React100.createElement(Stepper.ConnectorContainer, {
|
13043
13169
|
dense
|
13044
|
-
}, /* @__PURE__ */
|
13170
|
+
}, /* @__PURE__ */ React100.createElement(Stepper.ConnectorContainer.Connector, {
|
13045
13171
|
completed: state === "completed" || state === "active"
|
13046
|
-
})), /* @__PURE__ */
|
13172
|
+
})), /* @__PURE__ */ React100.createElement(Stepper.Step.Indicator, {
|
13047
13173
|
state,
|
13048
13174
|
dense
|
13049
13175
|
}, index + 1), child.props.children);
|
@@ -13056,16 +13182,16 @@ Step2.displayName = "Stepper.Step";
|
|
13056
13182
|
Stepper2.Step = Step2;
|
13057
13183
|
|
13058
13184
|
// src/molecules/Switch/Switch.tsx
|
13059
|
-
import
|
13185
|
+
import React102 from "react";
|
13060
13186
|
|
13061
13187
|
// src/atoms/Switch/Switch.tsx
|
13062
|
-
import
|
13063
|
-
var Switch =
|
13188
|
+
import React101 from "react";
|
13189
|
+
var Switch = React101.forwardRef(
|
13064
13190
|
(_a, ref) => {
|
13065
13191
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
13066
|
-
return /* @__PURE__ */
|
13192
|
+
return /* @__PURE__ */ React101.createElement("span", {
|
13067
13193
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
13068
|
-
}, /* @__PURE__ */
|
13194
|
+
}, /* @__PURE__ */ React101.createElement("input", __spreadProps(__spreadValues({
|
13069
13195
|
id,
|
13070
13196
|
ref,
|
13071
13197
|
type: "checkbox",
|
@@ -13084,7 +13210,7 @@ var Switch = React99.forwardRef(
|
|
13084
13210
|
),
|
13085
13211
|
readOnly,
|
13086
13212
|
disabled
|
13087
|
-
})), /* @__PURE__ */
|
13213
|
+
})), /* @__PURE__ */ React101.createElement("span", {
|
13088
13214
|
className: tw(
|
13089
13215
|
"pointer-events-none rounded-full absolute inline-block transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
13090
13216
|
"bg-white peer-disabled/switch:bg-grey-0 left-2 peer-checked/switch:left-1",
|
@@ -13097,12 +13223,12 @@ var Switch = React99.forwardRef(
|
|
13097
13223
|
);
|
13098
13224
|
|
13099
13225
|
// src/molecules/Switch/Switch.tsx
|
13100
|
-
var Switch2 =
|
13226
|
+
var Switch2 = React102.forwardRef(
|
13101
13227
|
(_a, ref) => {
|
13102
13228
|
var _b = _a, { id, name, caption, readOnly = false, disabled = false, children, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["id", "name", "caption", "readOnly", "disabled", "children", "aria-label"]);
|
13103
13229
|
var _a2;
|
13104
13230
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
13105
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
13231
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React102.createElement(ControlLabel, {
|
13106
13232
|
htmlFor: id,
|
13107
13233
|
label: children,
|
13108
13234
|
"aria-label": ariaLabel,
|
@@ -13111,7 +13237,7 @@ var Switch2 = React100.forwardRef(
|
|
13111
13237
|
disabled,
|
13112
13238
|
style: { gap: "0 8px" },
|
13113
13239
|
className: "Aquarium-Switch"
|
13114
|
-
}, !readOnly && /* @__PURE__ */
|
13240
|
+
}, !readOnly && /* @__PURE__ */ React102.createElement(Switch, __spreadProps(__spreadValues({
|
13115
13241
|
id,
|
13116
13242
|
ref,
|
13117
13243
|
name
|
@@ -13122,12 +13248,12 @@ var Switch2 = React100.forwardRef(
|
|
13122
13248
|
}
|
13123
13249
|
);
|
13124
13250
|
Switch2.displayName = "Switch";
|
13125
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
13251
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React102.createElement("div", {
|
13126
13252
|
className: tw("flex gap-3")
|
13127
|
-
}, /* @__PURE__ */
|
13253
|
+
}, /* @__PURE__ */ React102.createElement(Skeleton, {
|
13128
13254
|
height: 20,
|
13129
13255
|
width: 35
|
13130
|
-
}), /* @__PURE__ */
|
13256
|
+
}), /* @__PURE__ */ React102.createElement(Skeleton, {
|
13131
13257
|
height: 20,
|
13132
13258
|
width: 150
|
13133
13259
|
}));
|
@@ -13135,7 +13261,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
13135
13261
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
13136
13262
|
|
13137
13263
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
13138
|
-
import
|
13264
|
+
import React103, { useState as useState12 } from "react";
|
13139
13265
|
import uniqueId9 from "lodash/uniqueId";
|
13140
13266
|
var SwitchGroup = (_a) => {
|
13141
13267
|
var _b = _a, {
|
@@ -13167,13 +13293,13 @@ var SwitchGroup = (_a) => {
|
|
13167
13293
|
setSelectedItems(updated);
|
13168
13294
|
onChange == null ? void 0 : onChange(updated);
|
13169
13295
|
};
|
13170
|
-
return /* @__PURE__ */
|
13296
|
+
return /* @__PURE__ */ React103.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
13171
13297
|
fieldset: true
|
13172
13298
|
}, labelControlProps), errorProps), {
|
13173
13299
|
className: "Aquarium-SwitchGroup"
|
13174
|
-
}), /* @__PURE__ */
|
13300
|
+
}), /* @__PURE__ */ React103.createElement(InputGroup, {
|
13175
13301
|
cols
|
13176
|
-
},
|
13302
|
+
}, React103.Children.map(children, (c) => {
|
13177
13303
|
var _a3, _b2, _c, _d;
|
13178
13304
|
if (!isComponentType(c, Switch2)) {
|
13179
13305
|
return null;
|
@@ -13181,7 +13307,7 @@ var SwitchGroup = (_a) => {
|
|
13181
13307
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
13182
13308
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
13183
13309
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
13184
|
-
return
|
13310
|
+
return React103.cloneElement(c, {
|
13185
13311
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
13186
13312
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
13187
13313
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -13191,39 +13317,24 @@ var SwitchGroup = (_a) => {
|
|
13191
13317
|
})));
|
13192
13318
|
};
|
13193
13319
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
13194
|
-
return /* @__PURE__ */
|
13320
|
+
return /* @__PURE__ */ React103.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React103.createElement("div", {
|
13195
13321
|
className: tw("flex flex-wrap flex-col gap-2")
|
13196
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
13322
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React103.createElement(Switch2.Skeleton, {
|
13197
13323
|
key
|
13198
13324
|
}))));
|
13199
13325
|
};
|
13200
13326
|
SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
13201
13327
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
13202
13328
|
|
13203
|
-
// src/molecules/TagLabel/TagLabel.tsx
|
13204
|
-
import React102 from "react";
|
13205
|
-
var TagLabel = (_a) => {
|
13206
|
-
var _b = _a, { title, dense = false } = _b, rest = __objRest(_b, ["title", "dense"]);
|
13207
|
-
return /* @__PURE__ */ React102.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13208
|
-
className: classNames(
|
13209
|
-
"Aquarium-TagLabel",
|
13210
|
-
tw("rounded-full text-white bg-primary-70", {
|
13211
|
-
"py-2 px-4 typography-caption": !dense,
|
13212
|
-
"py-2 px-3 typography-caption-small": dense
|
13213
|
-
})
|
13214
|
-
)
|
13215
|
-
}), title);
|
13216
|
-
};
|
13217
|
-
|
13218
13329
|
// src/molecules/Textarea/Textarea.tsx
|
13219
|
-
import
|
13330
|
+
import React104, { useRef as useRef13, useState as useState13 } from "react";
|
13220
13331
|
import omit18 from "lodash/omit";
|
13221
13332
|
import toString2 from "lodash/toString";
|
13222
13333
|
import uniqueId10 from "lodash/uniqueId";
|
13223
|
-
var TextareaBase =
|
13334
|
+
var TextareaBase = React104.forwardRef(
|
13224
13335
|
(_a, ref) => {
|
13225
13336
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
13226
|
-
return /* @__PURE__ */
|
13337
|
+
return /* @__PURE__ */ React104.createElement("textarea", __spreadProps(__spreadValues({
|
13227
13338
|
ref
|
13228
13339
|
}, props), {
|
13229
13340
|
readOnly,
|
@@ -13231,10 +13342,10 @@ var TextareaBase = React103.forwardRef(
|
|
13231
13342
|
}));
|
13232
13343
|
}
|
13233
13344
|
);
|
13234
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
13345
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React104.createElement(Skeleton, {
|
13235
13346
|
height: 58
|
13236
13347
|
});
|
13237
|
-
var Textarea =
|
13348
|
+
var Textarea = React104.forwardRef((props, ref) => {
|
13238
13349
|
var _a, _b, _c;
|
13239
13350
|
const [value, setValue] = useState13((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
13240
13351
|
const id = useRef13((_c = props.id) != null ? _c : `textarea-${uniqueId10()}`);
|
@@ -13242,14 +13353,14 @@ var Textarea = React103.forwardRef((props, ref) => {
|
|
13242
13353
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13243
13354
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
13244
13355
|
const baseProps = omit18(props, Object.keys(labelControlProps));
|
13245
|
-
return /* @__PURE__ */
|
13356
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues({
|
13246
13357
|
id: `${id.current}-label`,
|
13247
13358
|
htmlFor: id.current,
|
13248
13359
|
messageId: errorMessageId,
|
13249
13360
|
length: value !== void 0 ? toString2(value).length : void 0
|
13250
13361
|
}, labelControlProps), {
|
13251
13362
|
className: "Aquarium-Textarea"
|
13252
|
-
}), /* @__PURE__ */
|
13363
|
+
}), /* @__PURE__ */ React104.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
13253
13364
|
ref
|
13254
13365
|
}, baseProps), errorProps), {
|
13255
13366
|
id: id.current,
|
@@ -13266,48 +13377,48 @@ var Textarea = React103.forwardRef((props, ref) => {
|
|
13266
13377
|
})));
|
13267
13378
|
});
|
13268
13379
|
Textarea.displayName = "Textarea";
|
13269
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
13380
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement(TextareaBase.Skeleton, null));
|
13270
13381
|
Textarea.Skeleton = TextAreaSkeleton;
|
13271
13382
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
13272
13383
|
|
13273
13384
|
// src/molecules/Timeline/Timeline.tsx
|
13274
|
-
import
|
13385
|
+
import React106 from "react";
|
13275
13386
|
|
13276
13387
|
// src/atoms/Timeline/Timeline.tsx
|
13277
|
-
import
|
13388
|
+
import React105 from "react";
|
13278
13389
|
var Timeline = (_a) => {
|
13279
13390
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13280
|
-
return /* @__PURE__ */
|
13391
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13281
13392
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
13282
13393
|
}));
|
13283
13394
|
};
|
13284
13395
|
var Content2 = (_a) => {
|
13285
13396
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13286
|
-
return /* @__PURE__ */
|
13397
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13287
13398
|
className: classNames(tw("pb-6"), className)
|
13288
13399
|
}));
|
13289
13400
|
};
|
13290
13401
|
var Separator2 = (_a) => {
|
13291
13402
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13292
|
-
return /* @__PURE__ */
|
13403
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13293
13404
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
13294
13405
|
}));
|
13295
13406
|
};
|
13296
13407
|
var LineContainer = (_a) => {
|
13297
13408
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13298
|
-
return /* @__PURE__ */
|
13409
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13299
13410
|
className: classNames(tw("flex justify-center py-1"), className)
|
13300
13411
|
}));
|
13301
13412
|
};
|
13302
13413
|
var Line = (_a) => {
|
13303
13414
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13304
|
-
return /* @__PURE__ */
|
13415
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13305
13416
|
className: classNames(tw("w-1 bg-grey-5 h-full justify-self-center"), className)
|
13306
13417
|
}));
|
13307
13418
|
};
|
13308
13419
|
var Dot = (_a) => {
|
13309
13420
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13310
|
-
return /* @__PURE__ */
|
13421
|
+
return /* @__PURE__ */ React105.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13311
13422
|
className: classNames(tw("bg-grey-30 h-[6px] w-[6px] rounded"), className)
|
13312
13423
|
}));
|
13313
13424
|
};
|
@@ -13322,54 +13433,54 @@ var import_error5 = __toESM(require_error());
|
|
13322
13433
|
var import_time2 = __toESM(require_time());
|
13323
13434
|
var import_warningSign5 = __toESM(require_warningSign());
|
13324
13435
|
var TimelineItem = () => null;
|
13325
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
13436
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React106.createElement("div", {
|
13326
13437
|
className: "Aquarium-Timeline"
|
13327
|
-
},
|
13438
|
+
}, React106.Children.map(children, (item) => {
|
13328
13439
|
if (!isComponentType(item, TimelineItem)) {
|
13329
13440
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
13330
13441
|
} else {
|
13331
13442
|
const { props, key } = item;
|
13332
|
-
return /* @__PURE__ */
|
13443
|
+
return /* @__PURE__ */ React106.createElement(Timeline, {
|
13333
13444
|
key: key != null ? key : props.title
|
13334
|
-
}, /* @__PURE__ */
|
13445
|
+
}, /* @__PURE__ */ React106.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React106.createElement(Icon, {
|
13335
13446
|
icon: import_error5.default,
|
13336
13447
|
color: "error-30"
|
13337
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
13448
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React106.createElement(Icon, {
|
13338
13449
|
icon: import_warningSign5.default,
|
13339
13450
|
color: "warning-30"
|
13340
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
13451
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React106.createElement(Icon, {
|
13341
13452
|
icon: import_time2.default,
|
13342
13453
|
color: "info-30"
|
13343
|
-
}) : /* @__PURE__ */
|
13454
|
+
}) : /* @__PURE__ */ React106.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React106.createElement(Typography2.Caption, {
|
13344
13455
|
color: "grey-50"
|
13345
|
-
}, props.title), /* @__PURE__ */
|
13456
|
+
}, props.title), /* @__PURE__ */ React106.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React106.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React106.createElement(Timeline.Content, null, /* @__PURE__ */ React106.createElement(Typography2.Small, null, props.children)));
|
13346
13457
|
}
|
13347
13458
|
}));
|
13348
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
13459
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React106.createElement(Timeline, null, /* @__PURE__ */ React106.createElement(Timeline.Separator, null, /* @__PURE__ */ React106.createElement(Skeleton, {
|
13349
13460
|
width: 6,
|
13350
13461
|
height: 6,
|
13351
13462
|
rounded: true
|
13352
|
-
})), /* @__PURE__ */
|
13463
|
+
})), /* @__PURE__ */ React106.createElement(Skeleton, {
|
13353
13464
|
height: 12,
|
13354
13465
|
width: 120
|
13355
|
-
}), /* @__PURE__ */
|
13466
|
+
}), /* @__PURE__ */ React106.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React106.createElement(Skeleton, {
|
13356
13467
|
width: 2,
|
13357
13468
|
height: "100%"
|
13358
|
-
})), /* @__PURE__ */
|
13469
|
+
})), /* @__PURE__ */ React106.createElement(Timeline.Content, null, /* @__PURE__ */ React106.createElement(Box, {
|
13359
13470
|
display: "flex",
|
13360
13471
|
flexDirection: "column",
|
13361
13472
|
gap: "3"
|
13362
|
-
}, /* @__PURE__ */
|
13473
|
+
}, /* @__PURE__ */ React106.createElement(Skeleton, {
|
13363
13474
|
height: 32,
|
13364
13475
|
width: "100%"
|
13365
|
-
}), /* @__PURE__ */
|
13476
|
+
}), /* @__PURE__ */ React106.createElement(Skeleton, {
|
13366
13477
|
height: 32,
|
13367
13478
|
width: "73%"
|
13368
|
-
}), /* @__PURE__ */
|
13479
|
+
}), /* @__PURE__ */ React106.createElement(Skeleton, {
|
13369
13480
|
height: 32,
|
13370
13481
|
width: "80%"
|
13371
13482
|
}))));
|
13372
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
13483
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React106.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React106.createElement(TimelineItemSkeleton, {
|
13373
13484
|
key
|
13374
13485
|
})));
|
13375
13486
|
Timeline2.Item = TimelineItem;
|
@@ -13377,9 +13488,9 @@ Timeline2.Skeleton = TimelineSkeleton;
|
|
13377
13488
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
13378
13489
|
|
13379
13490
|
// src/utils/table/useTableSelect.ts
|
13380
|
-
import
|
13491
|
+
import React107 from "react";
|
13381
13492
|
var useTableSelect = (data, { key }) => {
|
13382
|
-
const [selected, setSelected] =
|
13493
|
+
const [selected, setSelected] = React107.useState([]);
|
13383
13494
|
const allSelected = selected.length === data.length;
|
13384
13495
|
const isSelected = (dot) => selected.includes(dot[key]);
|
13385
13496
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|