@aivenio/aquarium 1.46.0 → 1.48.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/atoms.cjs +149 -14
- package/dist/atoms.mjs +148 -14
- package/dist/src/atoms/Alert/Alert.d.ts +14 -0
- package/dist/src/atoms/Alert/Alert.js +60 -3
- package/dist/src/atoms/Card/Card.d.ts +1 -1
- package/dist/src/atoms/DataList/DataList.js +3 -3
- package/dist/src/atoms/Navigation/Navigation.js +2 -2
- package/dist/src/atoms/Section/Section.d.ts +1 -1
- package/dist/src/atoms/Section/Section.js +3 -3
- package/dist/src/atoms/Select/Select.js +4 -5
- package/dist/src/atoms/Table/Table.d.ts +9 -1
- package/dist/src/atoms/Table/Table.js +4 -2
- package/dist/src/molecules/Accordion/Accordion.d.ts +1 -0
- package/dist/src/molecules/Accordion/Accordion.js +2 -2
- package/dist/src/molecules/Alert/Alert.d.ts +7 -1
- package/dist/src/molecules/Alert/Alert.js +22 -4
- package/dist/src/molecules/Avatar/Avatar.d.ts +5 -0
- package/dist/src/molecules/Avatar/Avatar.js +3 -3
- package/dist/src/molecules/Banner/Banner.js +3 -2
- package/dist/src/molecules/Card/Card.js +2 -2
- package/dist/src/molecules/Card/types.d.ts +2 -1
- package/dist/src/molecules/DataList/DataList.d.ts +9 -2
- package/dist/src/molecules/DataList/DataList.js +20 -12
- package/dist/src/molecules/DataList/DataListSkeleton.js +4 -4
- package/dist/src/molecules/DataTable/DataTable.d.ts +9 -2
- package/dist/src/molecules/DataTable/DataTable.js +8 -3
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +3 -3
- package/dist/src/molecules/ListItem/ListItem.js +2 -2
- package/dist/src/molecules/PageHeader/PageHeader.js +2 -2
- package/dist/src/molecules/Pagination/Pagination.js +3 -3
- package/dist/src/molecules/Popover/Popover.js +4 -3
- package/dist/src/molecules/Section/Section.js +7 -6
- package/dist/src/molecules/Table/Table.d.ts +1 -0
- package/dist/src/molecules/Table/Table.js +2 -1
- package/dist/src/molecules/Template/Template.d.ts +1 -0
- package/dist/src/molecules/Template/Template.js +3 -3
- package/dist/src/molecules/Typography/Typography.d.ts +4 -0
- package/dist/src/molecules/Typography/Typography.js +28 -4
- package/dist/src/utils/setupTests.js +2 -2
- package/dist/src/utils/table/useTableSort.d.ts +3 -1
- package/dist/src/utils/table/useTableSort.js +3 -3
- package/dist/styles.css +62 -6
- package/dist/system.cjs +527 -335
- package/dist/system.mjs +521 -329
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/dist/types/utils.d.ts +3 -0
- package/package.json +2 -2
package/dist/system.mjs
CHANGED
@@ -4622,7 +4622,7 @@ __export(molecules_exports, {
|
|
4622
4622
|
Avatar: () => Avatar,
|
4623
4623
|
AvatarStack: () => AvatarStack,
|
4624
4624
|
Badge: () => Badge,
|
4625
|
-
Banner: () =>
|
4625
|
+
Banner: () => Banner4,
|
4626
4626
|
BorderBox: () => BorderBox,
|
4627
4627
|
Box: () => Box,
|
4628
4628
|
Breadcrumbs: () => Breadcrumbs,
|
@@ -4749,8 +4749,8 @@ import {
|
|
4749
4749
|
|
4750
4750
|
// src/utils/tailwind.ts
|
4751
4751
|
import originalClassNames from "classnames";
|
4752
|
-
function cleanClassNames(
|
4753
|
-
const tokens =
|
4752
|
+
function cleanClassNames(classNames11) {
|
4753
|
+
const tokens = classNames11.split(/\s+/);
|
4754
4754
|
return tokens.filter((item) => item).join(" ");
|
4755
4755
|
}
|
4756
4756
|
function tw(classesOrModifiers1, classesOrModifiers2, classesOrModifiers3, classesOrModifiers4, classesOrModifiers5, classesOrModifiers6, classesOrModifiers7, classesOrModifiers8, classesOrModifiers9, classesOrModifiers10) {
|
@@ -4894,14 +4894,13 @@ var Group = React2.forwardRef((_a, ref) => {
|
|
4894
4894
|
});
|
4895
4895
|
var Item = React2.forwardRef(
|
4896
4896
|
(_a, ref) => {
|
4897
|
-
var _b = _a, { highlighted, selected, className, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "children"]);
|
4897
|
+
var _b = _a, { highlighted, selected, className, disabled, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "disabled", "children"]);
|
4898
4898
|
return /* @__PURE__ */ React2.createElement("li", __spreadValues({
|
4899
4899
|
ref,
|
4900
4900
|
className: classNames(className, "flex items-center gap-x-3 p-3 typography-small", {
|
4901
|
-
"cursor-pointer": !
|
4902
|
-
"
|
4903
|
-
"
|
4904
|
-
"hover:bg-grey-0": !props.disabled
|
4901
|
+
"cursor-pointer hover:bg-grey-0": !disabled,
|
4902
|
+
"cursor-not-allowed opacity-40 grayscale": disabled,
|
4903
|
+
"bg-grey-0": highlighted
|
4905
4904
|
})
|
4906
4905
|
}, props), /* @__PURE__ */ React2.createElement("span", {
|
4907
4906
|
className: tw("grow flex gap-x-3")
|
@@ -4957,8 +4956,8 @@ var Select = {
|
|
4957
4956
|
};
|
4958
4957
|
|
4959
4958
|
// src/molecules/Alert/Alert.tsx
|
4960
|
-
import
|
4961
|
-
import { useId } from "@react-aria/utils";
|
4959
|
+
import React19 from "react";
|
4960
|
+
import { useId as useId2 } from "@react-aria/utils";
|
4962
4961
|
import omit from "lodash/omit";
|
4963
4962
|
|
4964
4963
|
// src/molecules/Button/Button.tsx
|
@@ -6924,8 +6923,9 @@ var SecondaryDropdownButton = React15.forwardRef((props, ref) => /* @__PURE__ */
|
|
6924
6923
|
SecondaryDropdownButton.displayName = "Button.SecondaryDropdown";
|
6925
6924
|
Button.SecondaryDropdown = SecondaryDropdownButton;
|
6926
6925
|
|
6927
|
-
// src/
|
6926
|
+
// src/molecules/Typography/Typography.tsx
|
6928
6927
|
import React17 from "react";
|
6928
|
+
import classNames3 from "classnames";
|
6929
6929
|
|
6930
6930
|
// src/atoms/Typography/Typography.tsx
|
6931
6931
|
var import_resolveTheme = __toESM(require_resolveTheme());
|
@@ -6960,7 +6960,148 @@ var Typography = (_a) => {
|
|
6960
6960
|
}, rest), children);
|
6961
6961
|
};
|
6962
6962
|
|
6963
|
+
// src/molecules/Typography/Typography.tsx
|
6964
|
+
var Typography2 = (props) => /* @__PURE__ */ React17.createElement(Typography, __spreadValues({}, props));
|
6965
|
+
Typography2.displayName = "Typography";
|
6966
|
+
Typography2.LargeHeading = (_a) => {
|
6967
|
+
var _b = _a, { htmlTag = "h1" } = _b, props = __objRest(_b, ["htmlTag"]);
|
6968
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
6969
|
+
htmlTag,
|
6970
|
+
variant: "large-heading"
|
6971
|
+
}));
|
6972
|
+
};
|
6973
|
+
Typography2.LargeHeading.displayName = "Typography.LargeHeading";
|
6974
|
+
Typography2.Heading = (_a) => {
|
6975
|
+
var _b = _a, { htmlTag = "h1", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
6976
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
6977
|
+
htmlTag,
|
6978
|
+
variant: "heading"
|
6979
|
+
}));
|
6980
|
+
};
|
6981
|
+
Typography2.Heading.displayName = "Typography.Heading";
|
6982
|
+
Typography2.Subheading = (_a) => {
|
6983
|
+
var _b = _a, { htmlTag = "h2", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
6984
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
6985
|
+
htmlTag,
|
6986
|
+
variant: "subheading"
|
6987
|
+
}));
|
6988
|
+
};
|
6989
|
+
Typography2.Subheading.displayName = "Typography.Subheading";
|
6990
|
+
Typography2.LargeStrong = (_a) => {
|
6991
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
6992
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
6993
|
+
htmlTag,
|
6994
|
+
variant: "large-strong"
|
6995
|
+
}));
|
6996
|
+
};
|
6997
|
+
Typography2.LargeStrong.displayName = "Typography.LargeStrong";
|
6998
|
+
Typography2.Large = (_a) => {
|
6999
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7000
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7001
|
+
htmlTag,
|
7002
|
+
variant: "large"
|
7003
|
+
}));
|
7004
|
+
};
|
7005
|
+
Typography2.Large.displayName = "Typography.Large";
|
7006
|
+
Typography2.DefaultStrong = (_a) => {
|
7007
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7008
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7009
|
+
htmlTag,
|
7010
|
+
variant: "default-strong"
|
7011
|
+
}));
|
7012
|
+
};
|
7013
|
+
Typography2.DefaultStrong.displayName = "Typography.DefaultStrong";
|
7014
|
+
Typography2.Default = (_a) => {
|
7015
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7016
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7017
|
+
htmlTag,
|
7018
|
+
variant: "default"
|
7019
|
+
}));
|
7020
|
+
};
|
7021
|
+
Typography2.Default.displayName = "Typography.Default";
|
7022
|
+
Typography2.Paragraph = (_a) => {
|
7023
|
+
var _b = _a, { htmlTag = "p", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7024
|
+
return /* @__PURE__ */ React17.createElement(Typography2.Default, __spreadProps(__spreadValues({}, props), {
|
7025
|
+
htmlTag
|
7026
|
+
}));
|
7027
|
+
};
|
7028
|
+
Typography2.P = Typography2.Paragraph;
|
7029
|
+
Typography2.Paragraph.displayName = "Typography.Paragraph";
|
7030
|
+
Typography2.Small = (_a) => {
|
7031
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7032
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7033
|
+
htmlTag,
|
7034
|
+
variant: "small"
|
7035
|
+
}));
|
7036
|
+
};
|
7037
|
+
Typography2.Small.displayName = "Typography.Small";
|
7038
|
+
Typography2.SmallStrong = (_a) => {
|
7039
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7040
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7041
|
+
htmlTag,
|
7042
|
+
variant: "small-strong"
|
7043
|
+
}));
|
7044
|
+
};
|
7045
|
+
Typography2.SmallStrong.displayName = "Typography.SmallStrong";
|
7046
|
+
Typography2.Strong = (_a) => {
|
7047
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
7048
|
+
return /* @__PURE__ */ React17.createElement("strong", __spreadValues({
|
7049
|
+
className: classNames3(tw("font-semibold"), className)
|
7050
|
+
}, props));
|
7051
|
+
};
|
7052
|
+
Typography2.Strong.displayName = "Typography.Strong";
|
7053
|
+
Typography2.Caption = (_a) => {
|
7054
|
+
var _b = _a, { htmlTag = "div", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7055
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7056
|
+
htmlTag,
|
7057
|
+
variant: "caption"
|
7058
|
+
}));
|
7059
|
+
};
|
7060
|
+
Typography2.Caption.displayName = "Typography.Caption";
|
7061
|
+
Typography2.LargeText = (_a) => {
|
7062
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7063
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7064
|
+
htmlTag,
|
7065
|
+
variant: "large-strong"
|
7066
|
+
}));
|
7067
|
+
};
|
7068
|
+
Typography2.LargeText.displayName = "Typography.LargeText";
|
7069
|
+
Typography2.MediumText = (_a) => {
|
7070
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7071
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7072
|
+
htmlTag,
|
7073
|
+
variant: "default-strong"
|
7074
|
+
}));
|
7075
|
+
};
|
7076
|
+
Typography2.MediumText.displayName = "Typography.MediumText";
|
7077
|
+
Typography2.Text = (_a) => {
|
7078
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7079
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7080
|
+
htmlTag,
|
7081
|
+
variant: "default"
|
7082
|
+
}));
|
7083
|
+
};
|
7084
|
+
Typography2.Text.displayName = "Typography.Text";
|
7085
|
+
Typography2.SmallText = (_a) => {
|
7086
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7087
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7088
|
+
htmlTag,
|
7089
|
+
variant: "small"
|
7090
|
+
}));
|
7091
|
+
};
|
7092
|
+
Typography2.SmallText.displayName = "Typography.SmallText";
|
7093
|
+
Typography2.SmallTextBold = (_a) => {
|
7094
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7095
|
+
return /* @__PURE__ */ React17.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7096
|
+
htmlTag,
|
7097
|
+
variant: "small-strong"
|
7098
|
+
}));
|
7099
|
+
};
|
7100
|
+
Typography2.SmallTextBold.displayName = "Typography.SmallTextBold";
|
7101
|
+
|
6963
7102
|
// src/atoms/Alert/Alert.tsx
|
7103
|
+
import React18 from "react";
|
7104
|
+
import { useId } from "@react-aria/utils";
|
6964
7105
|
var import_cross2 = __toESM(require_cross());
|
6965
7106
|
var import_error2 = __toESM(require_error());
|
6966
7107
|
var import_infoSign2 = __toESM(require_infoSign());
|
@@ -6996,7 +7137,7 @@ var Alert = (_a) => {
|
|
6996
7137
|
"type",
|
6997
7138
|
"dense"
|
6998
7139
|
]);
|
6999
|
-
return /* @__PURE__ */
|
7140
|
+
return /* @__PURE__ */ React18.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7000
7141
|
role: type === "error" || type === "warning" ? "alert" : "status",
|
7001
7142
|
className: classNames(
|
7002
7143
|
tw("rounded grid grid-cols-[auto_1fr_auto] items-center gap-x-3 gap-y-2", {
|
@@ -7013,7 +7154,7 @@ var Alert = (_a) => {
|
|
7013
7154
|
};
|
7014
7155
|
Alert.Title = (_a) => {
|
7015
7156
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
7016
|
-
return /* @__PURE__ */
|
7157
|
+
return /* @__PURE__ */ React18.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
7017
7158
|
variant: "default-strong",
|
7018
7159
|
color: "grey-80",
|
7019
7160
|
className: classNames(tw("col-start-2"), className)
|
@@ -7021,7 +7162,7 @@ Alert.Title = (_a) => {
|
|
7021
7162
|
};
|
7022
7163
|
Alert.Description = (_a) => {
|
7023
7164
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
7024
|
-
return /* @__PURE__ */
|
7165
|
+
return /* @__PURE__ */ React18.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
7025
7166
|
variant: "small",
|
7026
7167
|
color: "grey-60",
|
7027
7168
|
className: classNames(tw("col-start-2"), className)
|
@@ -7029,15 +7170,15 @@ Alert.Description = (_a) => {
|
|
7029
7170
|
};
|
7030
7171
|
Alert.Actions = (_a) => {
|
7031
7172
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
7032
|
-
return /* @__PURE__ */
|
7173
|
+
return /* @__PURE__ */ React18.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7033
7174
|
className: classNames(tw("flex gap-4 col-start-2"), className)
|
7034
7175
|
}), children);
|
7035
7176
|
};
|
7036
7177
|
Alert.Icon = (_a) => {
|
7037
7178
|
var _b = _a, { type, dense } = _b, rest = __objRest(_b, ["type", "dense"]);
|
7038
|
-
return /* @__PURE__ */
|
7179
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
7039
7180
|
className: tw("h-[20px] col-start-1 row-start-1", { "self-start": !dense })
|
7040
|
-
}, /* @__PURE__ */
|
7181
|
+
}, /* @__PURE__ */ React18.createElement(Icon, __spreadProps(__spreadValues({}, rest), {
|
7041
7182
|
icon: alertTypes[type].icon,
|
7042
7183
|
color: alertTypes[type].color,
|
7043
7184
|
fontSize: 20
|
@@ -7045,19 +7186,129 @@ Alert.Icon = (_a) => {
|
|
7045
7186
|
};
|
7046
7187
|
Alert.Dismiss = (_a) => {
|
7047
7188
|
var _b = _a, { type } = _b, rest = __objRest(_b, ["type"]);
|
7048
|
-
return /* @__PURE__ */
|
7189
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
7049
7190
|
className: tw("h-[20px] col-start-3 row-start-1")
|
7050
|
-
}, /* @__PURE__ */
|
7191
|
+
}, /* @__PURE__ */ React18.createElement(Button.Icon, __spreadProps(__spreadValues({}, rest), {
|
7192
|
+
UNSAFE_className: tw("-m-2"),
|
7193
|
+
tooltip: "Dismiss",
|
7194
|
+
icon: import_cross2.default
|
7195
|
+
})));
|
7196
|
+
};
|
7197
|
+
var Banner = (_a) => {
|
7198
|
+
var _b = _a, {
|
7199
|
+
children,
|
7200
|
+
className,
|
7201
|
+
type
|
7202
|
+
} = _b, rest = __objRest(_b, [
|
7203
|
+
"children",
|
7204
|
+
"className",
|
7205
|
+
"type"
|
7206
|
+
]);
|
7207
|
+
return /* @__PURE__ */ React18.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7208
|
+
role: type === "error" || type === "warning" ? "alert" : "status",
|
7209
|
+
className: classNames(
|
7210
|
+
tw("relative flex px-[60px] justify-center", {
|
7211
|
+
"bg-error-5": type === "error",
|
7212
|
+
"bg-primary-5": type === "information",
|
7213
|
+
"bg-success-5": type === "success",
|
7214
|
+
"bg-warning-5": type === "warning"
|
7215
|
+
}),
|
7216
|
+
className
|
7217
|
+
)
|
7218
|
+
}), children);
|
7219
|
+
};
|
7220
|
+
Alert.Banner = Banner;
|
7221
|
+
Alert.Banner.displayName = "Alert.Banner";
|
7222
|
+
Banner.Content = (_a) => {
|
7223
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
7224
|
+
return /* @__PURE__ */ React18.createElement("div", __spreadValues({
|
7225
|
+
className: classNames(
|
7226
|
+
tw("flex flex-row flex-wrap gap-x-3 items-center justify-center py-3 text-center z-10"),
|
7227
|
+
className
|
7228
|
+
)
|
7229
|
+
}, props));
|
7230
|
+
};
|
7231
|
+
Banner.Content.displayName = "Alert.Banner.Content";
|
7232
|
+
Banner.Dismiss = (_a) => {
|
7233
|
+
var _b = _a, { type } = _b, rest = __objRest(_b, ["type"]);
|
7234
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
7235
|
+
className: tw("h-[20px] absolute right-4 top-[18px]")
|
7236
|
+
}, /* @__PURE__ */ React18.createElement(Button.Icon, __spreadProps(__spreadValues({}, rest), {
|
7051
7237
|
UNSAFE_className: tw("-m-2"),
|
7052
7238
|
tooltip: "Dismiss",
|
7053
7239
|
icon: import_cross2.default
|
7054
7240
|
})));
|
7055
7241
|
};
|
7242
|
+
Banner.Dismiss.displayName = "Alert.Banner.Dismiss";
|
7243
|
+
var ILLUSTRATION_COLORS = {
|
7244
|
+
information: { stroke: tw("stroke-primary-60"), fill: tw("fill-primary-10") },
|
7245
|
+
success: { stroke: tw("stroke-success-40"), fill: tw("fill-success-10") },
|
7246
|
+
warning: { stroke: tw("stroke-warning-100"), fill: tw("fill-warning-20") },
|
7247
|
+
error: { stroke: tw("stroke-error-100"), fill: tw("fill-error-10") }
|
7248
|
+
};
|
7249
|
+
var IllustrationLeft = (_a) => {
|
7250
|
+
var _b = _a, { type } = _b, props = __objRest(_b, ["type"]);
|
7251
|
+
const clipPathId = useId();
|
7252
|
+
return /* @__PURE__ */ React18.createElement("svg", __spreadValues({
|
7253
|
+
xmlns: "http://www.w3.org/2000/svg",
|
7254
|
+
width: 120,
|
7255
|
+
height: 48,
|
7256
|
+
fill: "none"
|
7257
|
+
}, props), /* @__PURE__ */ React18.createElement("g", {
|
7258
|
+
clipPath: `url(#${clipPathId})`
|
7259
|
+
}, /* @__PURE__ */ React18.createElement("path", {
|
7260
|
+
className: ILLUSTRATION_COLORS[type].fill,
|
7261
|
+
d: "M25.68 105.063c-4.556 17.047 5.533 34.57 22.537 39.138 17.003 4.568 34.48-5.55 39.037-22.597L136.75-63.593c4.555-17.046-5.536-34.57-22.538-39.137-17.003-4.567-34.48 5.55-39.036 22.596L25.68 105.063Z"
|
7262
|
+
}), /* @__PURE__ */ React18.createElement("path", {
|
7263
|
+
className: ILLUSTRATION_COLORS[type].stroke,
|
7264
|
+
strokeWidth: 2,
|
7265
|
+
d: "M-71.39 445.432c-29.483-7.92-46.981-38.306-39.08-67.87l87.385-326.96c7.901-29.562 38.211-47.105 67.693-39.185 29.481 7.92 46.983 38.306 39.082 67.869l-87.385 326.96c-7.901 29.564-38.211 47.107-67.694 39.186Z"
|
7266
|
+
})), /* @__PURE__ */ React18.createElement("defs", null, /* @__PURE__ */ React18.createElement("clipPath", {
|
7267
|
+
id: clipPathId
|
7268
|
+
}, /* @__PURE__ */ React18.createElement("path", {
|
7269
|
+
fill: "#fff",
|
7270
|
+
d: "M-38-23h188v200H-38z"
|
7271
|
+
}))));
|
7272
|
+
};
|
7273
|
+
Banner.IllustrationLeft = IllustrationLeft;
|
7274
|
+
Banner.IllustrationLeft.displayName = "Alert.Banner.IllustrationLeft";
|
7275
|
+
var IllustrationRight = (_a) => {
|
7276
|
+
var _b = _a, { type } = _b, props = __objRest(_b, ["type"]);
|
7277
|
+
const clipPathId = useId();
|
7278
|
+
return /* @__PURE__ */ React18.createElement("svg", __spreadValues({
|
7279
|
+
xmlns: "http://www.w3.org/2000/svg",
|
7280
|
+
width: 120,
|
7281
|
+
height: 48,
|
7282
|
+
fill: "none"
|
7283
|
+
}, props), /* @__PURE__ */ React18.createElement("g", {
|
7284
|
+
clipPath: `url(#${clipPathId})`
|
7285
|
+
}, /* @__PURE__ */ React18.createElement("path", {
|
7286
|
+
className: ILLUSTRATION_COLORS[type].fill,
|
7287
|
+
d: "M114.341 71.088c11.599-20.12 4.741-45.834-15.32-57.433-20.06-11.6-45.727-4.691-57.326 15.43L-84.32 247.67c-11.599 20.119-4.739 45.835 15.321 57.433 20.06 11.599 45.726 4.69 57.325-15.429L114.341 71.088Z"
|
7288
|
+
}), /* @__PURE__ */ React18.createElement("path", {
|
7289
|
+
className: ILLUSTRATION_COLORS[type].stroke,
|
7290
|
+
strokeWidth: 2.632,
|
7291
|
+
d: "M353.696-328.567c34.785 20.113 46.681 64.704 26.564 99.599L157.785 156.939c-20.115 34.892-64.626 46.87-99.409 26.758-34.782-20.112-46.682-64.706-26.566-99.598l222.475-385.907c20.116-34.894 64.626-46.872 99.411-26.759Z"
|
7292
|
+
})), /* @__PURE__ */ React18.createElement("defs", null, /* @__PURE__ */ React18.createElement("clipPath", {
|
7293
|
+
id: clipPathId
|
7294
|
+
}, /* @__PURE__ */ React18.createElement("path", {
|
7295
|
+
fill: "#fff",
|
7296
|
+
d: "m151.148 255.847-239.01-64.043 68.13-254.266L219.278 1.58z"
|
7297
|
+
}))));
|
7298
|
+
};
|
7299
|
+
Banner.IllustrationRight = IllustrationRight;
|
7300
|
+
Banner.IllustrationRight.displayName = "Alert.Banner.IllustrationRight";
|
7056
7301
|
|
7057
7302
|
// src/utils/link.ts
|
7058
7303
|
var isLink = (action) => action.href !== void 0;
|
7059
7304
|
|
7060
7305
|
// src/molecules/Alert/Alert.tsx
|
7306
|
+
var renderActions = (action, dense = false) => action && /* @__PURE__ */ React19.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ React19.createElement(Button.Ghost, __spreadValues({
|
7307
|
+
dense
|
7308
|
+
}, omit(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React19.createElement(Button.ExternalLink, __spreadValues({
|
7309
|
+
dense,
|
7310
|
+
kind: "ghost"
|
7311
|
+
}, omit(action, "text")), action.text));
|
7061
7312
|
var Alert2 = ({
|
7062
7313
|
description,
|
7063
7314
|
type,
|
@@ -7066,36 +7317,51 @@ var Alert2 = ({
|
|
7066
7317
|
children,
|
7067
7318
|
action
|
7068
7319
|
}) => {
|
7069
|
-
const descriptionID =
|
7070
|
-
const titleID =
|
7071
|
-
return /* @__PURE__ */
|
7320
|
+
const descriptionID = useId2();
|
7321
|
+
const titleID = useId2();
|
7322
|
+
return /* @__PURE__ */ React19.createElement(Alert, {
|
7072
7323
|
className: "Aquarium-Alert",
|
7073
7324
|
type,
|
7074
7325
|
dense: Boolean(title),
|
7075
7326
|
"aria-describedby": descriptionID,
|
7076
7327
|
"aria-labelledby": title ? titleID : void 0
|
7077
|
-
}, /* @__PURE__ */
|
7328
|
+
}, /* @__PURE__ */ React19.createElement(Alert.Icon, {
|
7078
7329
|
type,
|
7079
7330
|
dense: Boolean(title)
|
7080
|
-
}), title && /* @__PURE__ */
|
7331
|
+
}), title && /* @__PURE__ */ React19.createElement(Alert.Title, {
|
7081
7332
|
id: titleID
|
7082
|
-
}, title), /* @__PURE__ */
|
7333
|
+
}, title), /* @__PURE__ */ React19.createElement(Alert.Description, {
|
7083
7334
|
id: descriptionID
|
7084
|
-
}, children || description), action
|
7085
|
-
dense: true
|
7086
|
-
}, omit(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React18.createElement(Button.ExternalLink, __spreadValues({
|
7087
|
-
dense: true,
|
7088
|
-
kind: "ghost"
|
7089
|
-
}, omit(action, "text")), action.text)), onDismiss && /* @__PURE__ */ React18.createElement(Alert.Dismiss, {
|
7335
|
+
}, children || description), renderActions(action, true), onDismiss && /* @__PURE__ */ React19.createElement(Alert.Dismiss, {
|
7090
7336
|
onClick: onDismiss
|
7091
7337
|
}));
|
7092
7338
|
};
|
7339
|
+
var Banner2 = ({ type, title, children, action, onDismiss }) => {
|
7340
|
+
const descriptionID = useId2();
|
7341
|
+
const titleID = useId2();
|
7342
|
+
return /* @__PURE__ */ React19.createElement(Alert.Banner, {
|
7343
|
+
className: "Aquarium-Alert.Banner",
|
7344
|
+
type,
|
7345
|
+
"aria-describedby": descriptionID,
|
7346
|
+
"aria-labelledby": title ? titleID : void 0
|
7347
|
+
}, /* @__PURE__ */ React19.createElement(Alert.Banner.Content, null, /* @__PURE__ */ React19.createElement(Typography2.Default, null, /* @__PURE__ */ React19.createElement(Typography2.Strong, null, title), children && " ", children), renderActions(action)), /* @__PURE__ */ React19.createElement(Alert.Banner.IllustrationLeft, {
|
7348
|
+
type,
|
7349
|
+
className: "absolute left-0 top-0 bottom-0 h-full z-0"
|
7350
|
+
}), /* @__PURE__ */ React19.createElement(Alert.Banner.IllustrationRight, {
|
7351
|
+
type,
|
7352
|
+
className: "absolute right-0 top-0 bottom-0 h-full z-0"
|
7353
|
+
}), onDismiss && /* @__PURE__ */ React19.createElement(Alert.Banner.Dismiss, {
|
7354
|
+
onClick: onDismiss
|
7355
|
+
}));
|
7356
|
+
};
|
7357
|
+
Alert2.Banner = Banner2;
|
7358
|
+
Alert2.Banner.displayName = "Alert.Banner";
|
7093
7359
|
|
7094
7360
|
// src/molecules/Avatar/Avatar.tsx
|
7095
|
-
import
|
7361
|
+
import React21 from "react";
|
7096
7362
|
|
7097
7363
|
// src/molecules/Skeleton/Skeleton.tsx
|
7098
|
-
import
|
7364
|
+
import React20 from "react";
|
7099
7365
|
import isNumber from "lodash/isNumber";
|
7100
7366
|
import isUndefined7 from "lodash/isUndefined";
|
7101
7367
|
var Skeleton = (_a) => {
|
@@ -7120,7 +7386,7 @@ var Skeleton = (_a) => {
|
|
7120
7386
|
width: isNumber(width) ? `${width}px` : width,
|
7121
7387
|
height: isNumber(height) ? `${height}px` : height
|
7122
7388
|
};
|
7123
|
-
return /* @__PURE__ */
|
7389
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({
|
7124
7390
|
"aria-label": "Loading..."
|
7125
7391
|
}, rest), {
|
7126
7392
|
style: __spreadValues(__spreadValues({}, styles), style),
|
@@ -7140,22 +7406,24 @@ var Skeleton = (_a) => {
|
|
7140
7406
|
};
|
7141
7407
|
|
7142
7408
|
// src/molecules/Avatar/Avatar.tsx
|
7143
|
-
var AvatarStack = ({ images }) => /* @__PURE__ */
|
7409
|
+
var AvatarStack = ({ images }) => /* @__PURE__ */ React21.createElement(Box, {
|
7144
7410
|
display: "flex",
|
7145
7411
|
className: tw("[&>*:not(:first-child)]:-ml-3")
|
7146
7412
|
}, images.map(
|
7147
|
-
(image, index) => image ? /* @__PURE__ */
|
7413
|
+
(image, index) => image ? /* @__PURE__ */ React21.createElement(Avatar, {
|
7148
7414
|
key: image != null ? image : index,
|
7149
|
-
image
|
7150
|
-
|
7415
|
+
image,
|
7416
|
+
imageAlt: ""
|
7417
|
+
}) : /* @__PURE__ */ React21.createElement(Avatar.Skeleton, {
|
7151
7418
|
key: image != null ? image : index
|
7152
7419
|
})
|
7153
7420
|
));
|
7154
|
-
var Avatar = ({ image }) => /* @__PURE__ */
|
7421
|
+
var Avatar = ({ image, imageAlt = "" }) => /* @__PURE__ */ React21.createElement("img", {
|
7155
7422
|
src: image,
|
7156
|
-
className: classNames(tw("w-[32px] h-[32px]"), "Aquarium-Avatar")
|
7423
|
+
className: classNames(tw("w-[32px] h-[32px]"), "Aquarium-Avatar"),
|
7424
|
+
alt: imageAlt
|
7157
7425
|
});
|
7158
|
-
var AvatarSkeleton = () => /* @__PURE__ */
|
7426
|
+
var AvatarSkeleton = () => /* @__PURE__ */ React21.createElement(Skeleton, {
|
7159
7427
|
height: 32,
|
7160
7428
|
width: 32,
|
7161
7429
|
className: tw("rounded-full")
|
@@ -7164,12 +7432,12 @@ Avatar.Skeleton = AvatarSkeleton;
|
|
7164
7432
|
Avatar.Skeleton.displayName = "Avatar.Skeleton";
|
7165
7433
|
|
7166
7434
|
// src/molecules/Badge/Badge.tsx
|
7167
|
-
import
|
7435
|
+
import React22 from "react";
|
7168
7436
|
var createBadge = (type, displayName) => {
|
7169
7437
|
const Component = (props) => {
|
7170
7438
|
const _a = props, { kind = "filled", value, textClassname, dense = false } = _a, rest = __objRest(_a, ["kind", "value", "textClassname", "dense"]);
|
7171
7439
|
const valueStr = value.toString();
|
7172
|
-
return /* @__PURE__ */
|
7440
|
+
return /* @__PURE__ */ React22.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
7173
7441
|
className: classNames(
|
7174
7442
|
tw("inline-block text-center", {
|
7175
7443
|
"rounded-full": type === "default" || type === "chip",
|
@@ -7184,7 +7452,7 @@ var createBadge = (type, displayName) => {
|
|
7184
7452
|
}),
|
7185
7453
|
"Aquarium-Badge"
|
7186
7454
|
)
|
7187
|
-
}), /* @__PURE__ */
|
7455
|
+
}), /* @__PURE__ */ React22.createElement("span", {
|
7188
7456
|
className: classNames(
|
7189
7457
|
textClassname,
|
7190
7458
|
tw("inline-block", {
|
@@ -7195,7 +7463,7 @@ var createBadge = (type, displayName) => {
|
|
7195
7463
|
}, valueStr));
|
7196
7464
|
};
|
7197
7465
|
Component.displayName = displayName;
|
7198
|
-
Component.Skeleton = () => /* @__PURE__ */
|
7466
|
+
Component.Skeleton = () => /* @__PURE__ */ React22.createElement(Skeleton, {
|
7199
7467
|
height: 16,
|
7200
7468
|
width: 16,
|
7201
7469
|
display: "inline-block",
|
@@ -7205,15 +7473,15 @@ var createBadge = (type, displayName) => {
|
|
7205
7473
|
return Component;
|
7206
7474
|
};
|
7207
7475
|
var NotificationBadge = ({ children, top = "-2px", right = "-2px" }) => {
|
7208
|
-
return /* @__PURE__ */
|
7476
|
+
return /* @__PURE__ */ React22.createElement("div", {
|
7209
7477
|
className: tw("relative inline-flex")
|
7210
|
-
}, children, /* @__PURE__ */
|
7478
|
+
}, children, /* @__PURE__ */ React22.createElement("span", {
|
7211
7479
|
style: { top, right },
|
7212
7480
|
className: tw("absolute rounded-full w-[6px] h-[6px] bg-error-70")
|
7213
7481
|
}));
|
7214
7482
|
};
|
7215
7483
|
var DotBadge = ({ dense = false }) => {
|
7216
|
-
return /* @__PURE__ */
|
7484
|
+
return /* @__PURE__ */ React22.createElement("span", {
|
7217
7485
|
className: tw("rounded-full bg-current", {
|
7218
7486
|
"w-[6px] h-[6px]": dense,
|
7219
7487
|
"w-[9px] h-[9px]": !dense
|
@@ -7229,16 +7497,16 @@ var TabBadge = createBadge("tab", "TabBadge");
|
|
7229
7497
|
var ChipBadge = createBadge("chip", "ChipBadge");
|
7230
7498
|
|
7231
7499
|
// src/molecules/Banner/Banner.tsx
|
7232
|
-
import
|
7500
|
+
import React24 from "react";
|
7233
7501
|
import omit2 from "lodash/omit";
|
7234
7502
|
|
7235
7503
|
// src/atoms/Banner/Banner.tsx
|
7236
|
-
import
|
7504
|
+
import React23 from "react";
|
7237
7505
|
var spacing = {
|
7238
7506
|
spacingAroundBanner: "p-6",
|
7239
7507
|
omitSpacingAroundBanner: "-6"
|
7240
7508
|
};
|
7241
|
-
var
|
7509
|
+
var Banner3 = (_a) => {
|
7242
7510
|
var _b = _a, {
|
7243
7511
|
children,
|
7244
7512
|
className,
|
@@ -7250,7 +7518,7 @@ var Banner = (_a) => {
|
|
7250
7518
|
"layout",
|
7251
7519
|
"variant"
|
7252
7520
|
]);
|
7253
|
-
return /* @__PURE__ */
|
7521
|
+
return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7254
7522
|
className: classNames(
|
7255
7523
|
className,
|
7256
7524
|
tw(`rounded flex justify-between gap-7 flex-nowrap ${spacing.spacingAroundBanner}`, {
|
@@ -7261,9 +7529,9 @@ var Banner = (_a) => {
|
|
7261
7529
|
)
|
7262
7530
|
}), children);
|
7263
7531
|
};
|
7264
|
-
|
7532
|
+
Banner3.Title = (_a) => {
|
7265
7533
|
var _b = _a, { children, className, layout } = _b, rest = __objRest(_b, ["children", "className", "layout"]);
|
7266
|
-
return /* @__PURE__ */
|
7534
|
+
return /* @__PURE__ */ React23.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
7267
7535
|
variant: "subheading",
|
7268
7536
|
color: "grey-100",
|
7269
7537
|
className: classNames(
|
@@ -7274,16 +7542,16 @@ Banner.Title = (_a) => {
|
|
7274
7542
|
)
|
7275
7543
|
}), children);
|
7276
7544
|
};
|
7277
|
-
|
7545
|
+
Banner3.Description = (_a) => {
|
7278
7546
|
var _b = _a, { flexGrow, children, className } = _b, rest = __objRest(_b, ["flexGrow", "children", "className"]);
|
7279
|
-
return /* @__PURE__ */
|
7547
|
+
return /* @__PURE__ */ React23.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
7280
7548
|
variant: "default",
|
7281
7549
|
className: classNames(className, tw({ "flex-grow": flexGrow }))
|
7282
7550
|
}), children);
|
7283
7551
|
};
|
7284
|
-
|
7552
|
+
Banner3.ContentContainer = (_a) => {
|
7285
7553
|
var _b = _a, { layout, children, className } = _b, rest = __objRest(_b, ["layout", "children", "className"]);
|
7286
|
-
return /* @__PURE__ */
|
7554
|
+
return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7287
7555
|
className: classNames(
|
7288
7556
|
className,
|
7289
7557
|
tw("flex w-full", {
|
@@ -7293,24 +7561,24 @@ Banner.ContentContainer = (_a) => {
|
|
7293
7561
|
)
|
7294
7562
|
}), children);
|
7295
7563
|
};
|
7296
|
-
|
7564
|
+
Banner3.ImageContainer = (_a) => {
|
7297
7565
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
7298
|
-
return /* @__PURE__ */
|
7566
|
+
return /* @__PURE__ */ React23.createElement(Box, __spreadProps(__spreadValues({}, rest), {
|
7299
7567
|
display: "inline-flex",
|
7300
7568
|
alignItems: "center",
|
7301
7569
|
margin: spacing.omitSpacingAroundBanner,
|
7302
7570
|
marginLeft: "0"
|
7303
7571
|
}), children);
|
7304
7572
|
};
|
7305
|
-
|
7573
|
+
Banner3.Actions = (_a) => {
|
7306
7574
|
var _b = _a, { children, className, layout } = _b, rest = __objRest(_b, ["children", "className", "layout"]);
|
7307
|
-
return /* @__PURE__ */
|
7575
|
+
return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7308
7576
|
className: classNames(className, tw("flex gap-4", { "mt-5": layout === "vertical" }))
|
7309
7577
|
}), children);
|
7310
7578
|
};
|
7311
|
-
|
7579
|
+
Banner3.DismissContainer = (_a) => {
|
7312
7580
|
var _b = _a, { layout, children, className } = _b, rest = __objRest(_b, ["layout", "children", "className"]);
|
7313
|
-
return /* @__PURE__ */
|
7581
|
+
return /* @__PURE__ */ React23.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
7314
7582
|
className: classNames(
|
7315
7583
|
className,
|
7316
7584
|
tw({ "self-start": layout === "vertical", "self-center": layout === "horizontal" })
|
@@ -7320,40 +7588,41 @@ Banner.DismissContainer = (_a) => {
|
|
7320
7588
|
|
7321
7589
|
// src/molecules/Banner/Banner.tsx
|
7322
7590
|
var import_cross3 = __toESM(require_cross());
|
7323
|
-
var BannerImageSkeleton = () => /* @__PURE__ */
|
7591
|
+
var BannerImageSkeleton = () => /* @__PURE__ */ React24.createElement(Skeleton, {
|
7324
7592
|
width: 225,
|
7325
7593
|
className: tw("h-full")
|
7326
7594
|
});
|
7327
7595
|
var createBanner = (displayName, opts = {}) => {
|
7328
7596
|
const BannerComponent = (props) => {
|
7597
|
+
var _a;
|
7329
7598
|
const { title, description, layout: layoutProp, action, onDismiss, variant = "default", children } = props;
|
7330
7599
|
const layout = opts.isOneLineBanner ? "horizontal" : layoutProp || "vertical";
|
7331
7600
|
const isDismissable = onDismiss !== void 0;
|
7332
|
-
return /* @__PURE__ */
|
7601
|
+
return /* @__PURE__ */ React24.createElement(Banner3, {
|
7333
7602
|
className: "Aquarium-Banner",
|
7334
7603
|
layout,
|
7335
7604
|
variant
|
7336
|
-
}, /* @__PURE__ */
|
7605
|
+
}, /* @__PURE__ */ React24.createElement(Banner3.ContentContainer, {
|
7337
7606
|
layout
|
7338
|
-
}, /* @__PURE__ */
|
7607
|
+
}, /* @__PURE__ */ React24.createElement(Banner3.Title, {
|
7339
7608
|
layout
|
7340
|
-
}, title), /* @__PURE__ */
|
7609
|
+
}, title), /* @__PURE__ */ React24.createElement(Banner3.Description, {
|
7341
7610
|
flexGrow: isDismissable ? false : true
|
7342
|
-
}, children || description), action && /* @__PURE__ */
|
7611
|
+
}, children || description), action && /* @__PURE__ */ React24.createElement(Banner3.Actions, {
|
7343
7612
|
layout
|
7344
|
-
}, !isLink(action) && /* @__PURE__ */
|
7613
|
+
}, !isLink(action) && /* @__PURE__ */ React24.createElement(Button.Ghost, __spreadValues({
|
7345
7614
|
dense: true
|
7346
|
-
}, omit2(action, "text")), action.text), isLink(action) && /* @__PURE__ */
|
7615
|
+
}, omit2(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React24.createElement(Button.ExternalLink, __spreadValues({
|
7347
7616
|
dense: true,
|
7348
7617
|
kind: "ghost"
|
7349
|
-
}, omit2(action, "text")), action.text))), (props.layout === "vertical" || props.layout === void 0) && props.image !== void 0 && /* @__PURE__ */
|
7618
|
+
}, omit2(action, "text")), action.text))), (props.layout === "vertical" || props.layout === void 0) && props.image !== void 0 && /* @__PURE__ */ React24.createElement(Banner3.ImageContainer, null, props.image ? /* @__PURE__ */ React24.createElement("img", {
|
7350
7619
|
src: props.image,
|
7351
|
-
alt: props.imageAlt,
|
7620
|
+
alt: (_a = props.imageAlt) != null ? _a : "",
|
7352
7621
|
className: tw("bg-cover object-cover", { "w-full": !props.imageWidth }),
|
7353
7622
|
style: { width: props.imageWidth, height: props.imageHeight }
|
7354
|
-
}) : /* @__PURE__ */
|
7623
|
+
}) : /* @__PURE__ */ React24.createElement(BannerImageSkeleton, null)), isDismissable && /* @__PURE__ */ React24.createElement(Banner3.DismissContainer, {
|
7355
7624
|
layout
|
7356
|
-
}, /* @__PURE__ */
|
7625
|
+
}, /* @__PURE__ */ React24.createElement(Button.Icon, {
|
7357
7626
|
type: "button",
|
7358
7627
|
tooltip: "Dismiss",
|
7359
7628
|
icon: import_cross3.default,
|
@@ -7363,36 +7632,36 @@ var createBanner = (displayName, opts = {}) => {
|
|
7363
7632
|
BannerComponent.displayName = displayName;
|
7364
7633
|
return BannerComponent;
|
7365
7634
|
};
|
7366
|
-
var
|
7635
|
+
var Banner4 = createBanner("Banner");
|
7367
7636
|
var OneLineBannerBase = createBanner("OneLineBanner", {
|
7368
7637
|
isOneLineBanner: true
|
7369
7638
|
});
|
7370
7639
|
var OneLineBanner = OneLineBannerBase;
|
7371
7640
|
|
7372
7641
|
// src/molecules/Breadcrumbs/Breadcrumbs.tsx
|
7373
|
-
import
|
7374
|
-
import
|
7642
|
+
import React25 from "react";
|
7643
|
+
import classNames4 from "classnames";
|
7375
7644
|
var import_slash2 = __toESM(require_slash());
|
7376
7645
|
var Breadcrumbs = (props) => {
|
7377
7646
|
const { children, className } = props;
|
7378
|
-
const crumbs =
|
7647
|
+
const crumbs = React25.Children.toArray(children).filter(
|
7379
7648
|
(c) => Boolean(c)
|
7380
7649
|
);
|
7381
|
-
return /* @__PURE__ */
|
7382
|
-
className:
|
7650
|
+
return /* @__PURE__ */ React25.createElement("nav", {
|
7651
|
+
className: classNames4("Aquarium-Breadcrumbs", className),
|
7383
7652
|
"aria-label": "Breadcrumbs"
|
7384
|
-
}, /* @__PURE__ */
|
7653
|
+
}, /* @__PURE__ */ React25.createElement("ol", {
|
7385
7654
|
className: tw("flex flex-row flex-nowrap items-center typography-caption")
|
7386
7655
|
}, crumbs.map((crumb, index) => {
|
7387
7656
|
const isLast = index === crumbs.length - 1;
|
7388
|
-
return /* @__PURE__ */
|
7657
|
+
return /* @__PURE__ */ React25.createElement("li", {
|
7389
7658
|
key: index,
|
7390
7659
|
className: tw("flex flex-row items-center")
|
7391
|
-
}, !!index && /* @__PURE__ */
|
7660
|
+
}, !!index && /* @__PURE__ */ React25.createElement(Icon, {
|
7392
7661
|
"aria-hidden": true,
|
7393
7662
|
className: tw("mx-2 text-grey-30"),
|
7394
7663
|
icon: import_slash2.default
|
7395
|
-
}), !isLast && crumb, isLast && /* @__PURE__ */
|
7664
|
+
}), !isLast && crumb, isLast && /* @__PURE__ */ React25.createElement(ActiveCrumb, {
|
7396
7665
|
"aria-disabled": true,
|
7397
7666
|
"aria-current": "page",
|
7398
7667
|
icon: crumb.props.icon
|
@@ -7400,20 +7669,20 @@ var Breadcrumbs = (props) => {
|
|
7400
7669
|
})));
|
7401
7670
|
};
|
7402
7671
|
var asCrumb = (Component, displayName, options = { isActive: false }) => {
|
7403
|
-
const Crumb2 =
|
7672
|
+
const Crumb2 = React25.forwardRef((_a, ref) => {
|
7404
7673
|
var _b = _a, { icon, children } = _b, rest = __objRest(_b, ["icon", "children"]);
|
7405
|
-
return /* @__PURE__ */
|
7674
|
+
return /* @__PURE__ */ React25.createElement(Component, __spreadProps(__spreadValues({
|
7406
7675
|
ref
|
7407
7676
|
}, rest), {
|
7408
7677
|
role: "link"
|
7409
|
-
}), /* @__PURE__ */
|
7410
|
-
className:
|
7678
|
+
}), /* @__PURE__ */ React25.createElement("span", {
|
7679
|
+
className: classNames4(
|
7411
7680
|
tw("flex flex-row flex-nowrap items-center gap-x-3 whitespace-nowrap", {
|
7412
7681
|
"text-primary-80 hover:text-primary-70 no-underline hover:underline": !options.isActive,
|
7413
7682
|
"text-grey-90": options.isActive
|
7414
7683
|
})
|
7415
7684
|
)
|
7416
|
-
}, icon && /* @__PURE__ */
|
7685
|
+
}, icon && /* @__PURE__ */ React25.createElement(Icon, {
|
7417
7686
|
icon
|
7418
7687
|
}), children));
|
7419
7688
|
});
|
@@ -7429,16 +7698,16 @@ import React32, { useRef as useRef3 } from "react";
|
|
7429
7698
|
import { useButton as useButton2 } from "@react-aria/button";
|
7430
7699
|
|
7431
7700
|
// src/molecules/Chip/Chip.tsx
|
7432
|
-
import
|
7433
|
-
import
|
7701
|
+
import React27 from "react";
|
7702
|
+
import classNames5 from "classnames";
|
7434
7703
|
import isNumber2 from "lodash/isNumber";
|
7435
7704
|
|
7436
7705
|
// src/atoms/Chip/Chip.tsx
|
7437
|
-
import
|
7438
|
-
var Container =
|
7706
|
+
import React26 from "react";
|
7707
|
+
var Container = React26.forwardRef(
|
7439
7708
|
(_a, ref) => {
|
7440
7709
|
var _b = _a, { dense = false, className, children } = _b, rest = __objRest(_b, ["dense", "className", "children"]);
|
7441
|
-
return /* @__PURE__ */
|
7710
|
+
return /* @__PURE__ */ React26.createElement("span", __spreadValues({
|
7442
7711
|
ref,
|
7443
7712
|
className: classNames(
|
7444
7713
|
tw("inline-flex items-center rounded-sm transition whitespace-nowrap", {
|
@@ -7492,184 +7761,68 @@ var Chip2 = (_a) => {
|
|
7492
7761
|
"badge",
|
7493
7762
|
"onClose"
|
7494
7763
|
]);
|
7495
|
-
return /* @__PURE__ */
|
7764
|
+
return /* @__PURE__ */ React27.createElement(Chip.Container, __spreadValues({
|
7496
7765
|
dense,
|
7497
|
-
className:
|
7766
|
+
className: classNames5(
|
7498
7767
|
"Aquarium-Chip",
|
7499
7768
|
tw({
|
7500
7769
|
"bg-grey-0 text-grey-70": !locked,
|
7501
7770
|
"bg-grey-5 text-grey-40": locked
|
7502
7771
|
})
|
7503
7772
|
)
|
7504
|
-
}, rest), icon && /* @__PURE__ */
|
7773
|
+
}, rest), icon && /* @__PURE__ */ React27.createElement(InlineIcon, {
|
7505
7774
|
icon
|
7506
|
-
}), text, isNumber2(badge) && /* @__PURE__ */
|
7775
|
+
}), text, isNumber2(badge) && /* @__PURE__ */ React27.createElement(ChipBadge, {
|
7507
7776
|
dense,
|
7508
7777
|
value: badge,
|
7509
7778
|
textClassname: tw("text-grey-50")
|
7510
|
-
}), onClose && /* @__PURE__ */
|
7779
|
+
}), onClose && /* @__PURE__ */ React27.createElement(InlineIcon, {
|
7511
7780
|
role: "button",
|
7512
7781
|
"aria-hidden": false,
|
7513
7782
|
icon: import_cross4.default,
|
7514
7783
|
className: tw({ "cursor-pointer": onClose !== void 0 }),
|
7515
7784
|
onClick: () => onClose == null ? void 0 : onClose()
|
7516
|
-
}), locked && /* @__PURE__ */
|
7785
|
+
}), locked && /* @__PURE__ */ React27.createElement(InlineIcon, {
|
7517
7786
|
icon: import_lock2.default
|
7518
7787
|
}));
|
7519
7788
|
};
|
7520
|
-
var ChipSkeleton = ({ dense = false, width = dense ? 34 : 56 }) => /* @__PURE__ */
|
7789
|
+
var ChipSkeleton = ({ dense = false, width = dense ? 34 : 56 }) => /* @__PURE__ */ React27.createElement(Skeleton, {
|
7521
7790
|
width,
|
7522
7791
|
height: dense ? 20 : 28
|
7523
7792
|
});
|
7524
7793
|
Chip2.Skeleton = ChipSkeleton;
|
7525
7794
|
Chip2.Skeleton.displayName = "Chip.Skeleton";
|
7526
|
-
var StatusChip =
|
7795
|
+
var StatusChip = React27.forwardRef(
|
7527
7796
|
(_a, ref) => {
|
7528
7797
|
var _b = _a, { icon: chipIcon, UNSAFE_icon, text, dense = false, status, badge } = _b, rest = __objRest(_b, ["icon", "UNSAFE_icon", "text", "dense", "status", "badge"]);
|
7529
7798
|
const icon = chipIcon || UNSAFE_icon;
|
7530
|
-
return /* @__PURE__ */
|
7799
|
+
return /* @__PURE__ */ React27.createElement(Chip.Container, __spreadProps(__spreadValues({
|
7531
7800
|
ref,
|
7532
7801
|
role: "status",
|
7533
7802
|
"aria-label": text ? text.toString() : void 0,
|
7534
7803
|
dense
|
7535
7804
|
}, rest), {
|
7536
7805
|
className: getStatusClassNames(status)
|
7537
|
-
}), badge === true && /* @__PURE__ */
|
7806
|
+
}), badge === true && /* @__PURE__ */ React27.createElement(Badge.Dot, {
|
7538
7807
|
dense
|
7539
|
-
}), icon && /* @__PURE__ */
|
7808
|
+
}), icon && /* @__PURE__ */ React27.createElement(InlineIcon, {
|
7540
7809
|
icon
|
7541
|
-
}), text, badge && typeof badge === "number" && /* @__PURE__ */
|
7810
|
+
}), text, badge && typeof badge === "number" && /* @__PURE__ */ React27.createElement(Badge, {
|
7542
7811
|
dense,
|
7543
7812
|
value: badge
|
7544
7813
|
}));
|
7545
7814
|
}
|
7546
7815
|
);
|
7547
|
-
var ChipContainer = ({ dense, children }) => /* @__PURE__ */
|
7816
|
+
var ChipContainer = ({ dense, children }) => /* @__PURE__ */ React27.createElement("div", {
|
7548
7817
|
className: tw("flex items-center", {
|
7549
7818
|
"gap-x-3": !dense,
|
7550
7819
|
"gap-x-2": Boolean(dense)
|
7551
7820
|
})
|
7552
|
-
},
|
7821
|
+
}, React27.Children.map(
|
7553
7822
|
children,
|
7554
|
-
(child) => isComponentType(child, Chip2) || isComponentType(child, StatusChip) || isComponentType(child, ChipSkeleton) ?
|
7823
|
+
(child) => isComponentType(child, Chip2) || isComponentType(child, StatusChip) || isComponentType(child, ChipSkeleton) ? React27.cloneElement(child, { dense }) : void 0
|
7555
7824
|
));
|
7556
7825
|
|
7557
|
-
// src/molecules/Typography/Typography.tsx
|
7558
|
-
import React27 from "react";
|
7559
|
-
var Typography2 = (props) => /* @__PURE__ */ React27.createElement(Typography, __spreadValues({}, props));
|
7560
|
-
Typography2.LargeHeading = (_a) => {
|
7561
|
-
var _b = _a, { htmlTag = "h1" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7562
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7563
|
-
htmlTag,
|
7564
|
-
variant: "large-heading"
|
7565
|
-
}));
|
7566
|
-
};
|
7567
|
-
Typography2.Heading = (_a) => {
|
7568
|
-
var _b = _a, { htmlTag = "h1", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7569
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7570
|
-
htmlTag,
|
7571
|
-
variant: "heading"
|
7572
|
-
}));
|
7573
|
-
};
|
7574
|
-
Typography2.Subheading = (_a) => {
|
7575
|
-
var _b = _a, { htmlTag = "h2", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7576
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7577
|
-
htmlTag,
|
7578
|
-
variant: "subheading"
|
7579
|
-
}));
|
7580
|
-
};
|
7581
|
-
Typography2.LargeStrong = (_a) => {
|
7582
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7583
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7584
|
-
htmlTag,
|
7585
|
-
variant: "large-strong"
|
7586
|
-
}));
|
7587
|
-
};
|
7588
|
-
Typography2.Large = (_a) => {
|
7589
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7590
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7591
|
-
htmlTag,
|
7592
|
-
variant: "large"
|
7593
|
-
}));
|
7594
|
-
};
|
7595
|
-
Typography2.DefaultStrong = (_a) => {
|
7596
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7597
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7598
|
-
htmlTag,
|
7599
|
-
variant: "default-strong"
|
7600
|
-
}));
|
7601
|
-
};
|
7602
|
-
Typography2.Default = (_a) => {
|
7603
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7604
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7605
|
-
htmlTag,
|
7606
|
-
variant: "default"
|
7607
|
-
}));
|
7608
|
-
};
|
7609
|
-
Typography2.Paragraph = (_a) => {
|
7610
|
-
var _b = _a, { htmlTag = "p", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7611
|
-
return /* @__PURE__ */ React27.createElement(Typography2.Default, __spreadProps(__spreadValues({}, props), {
|
7612
|
-
htmlTag
|
7613
|
-
}));
|
7614
|
-
};
|
7615
|
-
Typography2.P = Typography2.Paragraph;
|
7616
|
-
Typography2.SmallStrong = (_a) => {
|
7617
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7618
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7619
|
-
htmlTag,
|
7620
|
-
variant: "small-strong"
|
7621
|
-
}));
|
7622
|
-
};
|
7623
|
-
Typography2.Small = (_a) => {
|
7624
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7625
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7626
|
-
htmlTag,
|
7627
|
-
variant: "small"
|
7628
|
-
}));
|
7629
|
-
};
|
7630
|
-
Typography2.Caption = (_a) => {
|
7631
|
-
var _b = _a, { htmlTag = "div", fontWeight } = _b, props = __objRest(_b, ["htmlTag", "fontWeight"]);
|
7632
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7633
|
-
htmlTag,
|
7634
|
-
variant: "caption"
|
7635
|
-
}));
|
7636
|
-
};
|
7637
|
-
Typography2.LargeText = (_a) => {
|
7638
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7639
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7640
|
-
htmlTag,
|
7641
|
-
variant: "large-strong"
|
7642
|
-
}));
|
7643
|
-
};
|
7644
|
-
Typography2.MediumText = (_a) => {
|
7645
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7646
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7647
|
-
htmlTag,
|
7648
|
-
variant: "default-strong"
|
7649
|
-
}));
|
7650
|
-
};
|
7651
|
-
Typography2.Text = (_a) => {
|
7652
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7653
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7654
|
-
htmlTag,
|
7655
|
-
variant: "default"
|
7656
|
-
}));
|
7657
|
-
};
|
7658
|
-
Typography2.SmallText = (_a) => {
|
7659
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7660
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7661
|
-
htmlTag,
|
7662
|
-
variant: "small"
|
7663
|
-
}));
|
7664
|
-
};
|
7665
|
-
Typography2.SmallTextBold = (_a) => {
|
7666
|
-
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7667
|
-
return /* @__PURE__ */ React27.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7668
|
-
htmlTag,
|
7669
|
-
variant: "small-strong"
|
7670
|
-
}));
|
7671
|
-
};
|
7672
|
-
|
7673
7826
|
// src/atoms/Card/Card.tsx
|
7674
7827
|
import React29 from "react";
|
7675
7828
|
import isNumber3 from "lodash/isNumber";
|
@@ -7891,7 +8044,7 @@ var Card2 = ({
|
|
7891
8044
|
chips = [],
|
7892
8045
|
icons = [],
|
7893
8046
|
image,
|
7894
|
-
imageAlt,
|
8047
|
+
imageAlt = "",
|
7895
8048
|
imageHeight,
|
7896
8049
|
color,
|
7897
8050
|
action,
|
@@ -7997,7 +8150,7 @@ CardImage.Skeleton = CardImageSkeleton;
|
|
7997
8150
|
|
7998
8151
|
// src/molecules/Carousel/Carousel.tsx
|
7999
8152
|
import React33, { useEffect as useEffect4, useLayoutEffect, useRef as useRef4, useState as useState2 } from "react";
|
8000
|
-
import
|
8153
|
+
import classNames6 from "classnames";
|
8001
8154
|
var import_chevronLeft2 = __toESM(require_chevronLeft());
|
8002
8155
|
var import_chevronRight2 = __toESM(require_chevronRight());
|
8003
8156
|
var Carousel = ({
|
@@ -8059,7 +8212,7 @@ var Carousel = ({
|
|
8059
8212
|
}
|
8060
8213
|
};
|
8061
8214
|
return items.length > 0 ? /* @__PURE__ */ React33.createElement("div", {
|
8062
|
-
className:
|
8215
|
+
className: classNames6("Aquarium-Carousel", tw("w-full flex flex-col")),
|
8063
8216
|
ref: containerRef
|
8064
8217
|
}, containerRef !== null && /* @__PURE__ */ React33.createElement("ul", {
|
8065
8218
|
ref: scrollbarContainerRef,
|
@@ -8256,7 +8409,7 @@ Checkbox2.Skeleton.displayName = "Checkbox.Skeleton";
|
|
8256
8409
|
|
8257
8410
|
// src/molecules/CheckboxGroup/CheckboxGroup.tsx
|
8258
8411
|
import React43, { useState as useState3 } from "react";
|
8259
|
-
import { useId as
|
8412
|
+
import { useId as useId3 } from "@react-aria/utils";
|
8260
8413
|
|
8261
8414
|
// src/atoms/InputGroup/InputGroup.tsx
|
8262
8415
|
import React38 from "react";
|
@@ -8417,7 +8570,7 @@ var FormControl = ({ className, inline, children }) => {
|
|
8417
8570
|
|
8418
8571
|
// src/utils/form/HelperText/HelperText.tsx
|
8419
8572
|
import React41 from "react";
|
8420
|
-
import
|
8573
|
+
import classNames7 from "classnames";
|
8421
8574
|
import isNumber4 from "lodash/isNumber";
|
8422
8575
|
|
8423
8576
|
// src/utils/form/CharCounter/CharCounter.tsx
|
@@ -8473,7 +8626,7 @@ var HelperText = ({
|
|
8473
8626
|
})));
|
8474
8627
|
};
|
8475
8628
|
var Skeleton2 = ({ className, children }) => /* @__PURE__ */ React41.createElement("div", {
|
8476
|
-
className:
|
8629
|
+
className: classNames7(className, "h-[25px]")
|
8477
8630
|
}, children);
|
8478
8631
|
HelperText.Skeleton = Skeleton2;
|
8479
8632
|
HelperText.Skeleton.displayName = "HelperText.Skeleton";
|
@@ -8636,7 +8789,7 @@ var CheckboxGroup = (_a) => {
|
|
8636
8789
|
if (value !== void 0 && value !== selectedItems) {
|
8637
8790
|
setSelectedItems(value);
|
8638
8791
|
}
|
8639
|
-
const errorMessageId =
|
8792
|
+
const errorMessageId = useId3();
|
8640
8793
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8641
8794
|
const labelControlProps = getLabelControlProps(props);
|
8642
8795
|
const handleChange = (e) => {
|
@@ -8713,7 +8866,7 @@ var ChoiceChip = (_a) => {
|
|
8713
8866
|
// src/molecules/Combobox/Combobox.tsx
|
8714
8867
|
import React47, { useEffect as useEffect6, useRef as useRef5, useState as useState5 } from "react";
|
8715
8868
|
import { ariaHideOutside } from "@react-aria/overlays";
|
8716
|
-
import { useId as
|
8869
|
+
import { useId as useId4 } from "@react-aria/utils";
|
8717
8870
|
import { useCombobox } from "downshift";
|
8718
8871
|
import omit4 from "lodash/omit";
|
8719
8872
|
import { matchSorter } from "match-sorter";
|
@@ -8979,9 +9132,9 @@ var Combobox = (_a) => {
|
|
8979
9132
|
"emptyState"
|
8980
9133
|
]);
|
8981
9134
|
var _a2;
|
8982
|
-
const defaultId =
|
9135
|
+
const defaultId = useId4();
|
8983
9136
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
8984
|
-
const errorMessageId =
|
9137
|
+
const errorMessageId = useId4();
|
8985
9138
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
8986
9139
|
const labelControlProps = getLabelControlProps(props);
|
8987
9140
|
const baseProps = omit4(props, Object.keys(labelControlProps));
|
@@ -9039,7 +9192,7 @@ import omit6 from "lodash/omit";
|
|
9039
9192
|
|
9040
9193
|
// src/molecules/Input/Input.tsx
|
9041
9194
|
import React50, { forwardRef, useEffect as useEffect7, useImperativeHandle, useState as useState6 } from "react";
|
9042
|
-
import { useId as
|
9195
|
+
import { useId as useId5 } from "@react-aria/utils";
|
9043
9196
|
import omit5 from "lodash/omit";
|
9044
9197
|
import toString from "lodash/toString";
|
9045
9198
|
|
@@ -9160,9 +9313,9 @@ var Input2 = React50.forwardRef((_a, ref) => {
|
|
9160
9313
|
setValue(controlledValue);
|
9161
9314
|
}
|
9162
9315
|
}, [controlledValue]);
|
9163
|
-
const defaultId =
|
9316
|
+
const defaultId = useId5();
|
9164
9317
|
const id = (_c = props.id) != null ? _c : defaultId;
|
9165
|
-
const errorMessageId =
|
9318
|
+
const errorMessageId = useId5();
|
9166
9319
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9167
9320
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
9168
9321
|
const baseProps = omit5(props, Object.keys(labelControlProps));
|
@@ -9333,7 +9486,9 @@ var DropdownMenu2 = (_a) => {
|
|
9333
9486
|
return /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement(PressResponder, __spreadValues({
|
9334
9487
|
ref: triggerRef,
|
9335
9488
|
onPress: () => state.toggle()
|
9336
|
-
}, omit6(menuTriggerProps, "id"
|
9489
|
+
}, omit6(menuTriggerProps, ["id", "aria-expanded"])), /* @__PURE__ */ React52.createElement(TriggerWrapper, {
|
9490
|
+
"aria-expanded": menuTriggerProps["aria-expanded"]
|
9491
|
+
}, trigger.props.children)), state.isOpen && /* @__PURE__ */ React52.createElement(PopoverOverlay, {
|
9337
9492
|
className: "Aquarium-DropdownMenu",
|
9338
9493
|
triggerRef,
|
9339
9494
|
state,
|
@@ -9504,7 +9659,7 @@ import clamp from "lodash/clamp";
|
|
9504
9659
|
|
9505
9660
|
// src/molecules/Select/Select.tsx
|
9506
9661
|
import React53, { useRef as useRef6, useState as useState7 } from "react";
|
9507
|
-
import { useId as
|
9662
|
+
import { useId as useId6 } from "@react-aria/utils";
|
9508
9663
|
import { useSelect } from "downshift";
|
9509
9664
|
import defaults from "lodash/defaults";
|
9510
9665
|
import isArray from "lodash/isArray";
|
@@ -9702,9 +9857,9 @@ var Select2 = (_a) => {
|
|
9702
9857
|
"options"
|
9703
9858
|
]);
|
9704
9859
|
var _a2;
|
9705
|
-
const defaultId =
|
9860
|
+
const defaultId = useId6();
|
9706
9861
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
9707
|
-
const errorMessageId =
|
9862
|
+
const errorMessageId = useId6();
|
9708
9863
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
9709
9864
|
const labelProps = getLabelControlProps(props);
|
9710
9865
|
const baseProps = omit7(props, Object.keys(labelProps));
|
@@ -9772,6 +9927,7 @@ var Pagination = ({
|
|
9772
9927
|
}, "Items per page "), /* @__PURE__ */ React54.createElement("div", {
|
9773
9928
|
className: tw("max-w-[70px]")
|
9774
9929
|
}, /* @__PURE__ */ React54.createElement(SelectBase, {
|
9930
|
+
"aria-label": "Items per page",
|
9775
9931
|
options: pageSizes.map((size) => size.toString()),
|
9776
9932
|
value: pageSize.toString(),
|
9777
9933
|
onChange: (size) => {
|
@@ -9802,6 +9958,7 @@ var Pagination = ({
|
|
9802
9958
|
}, /* @__PURE__ */ React54.createElement(Typography2.Small, {
|
9803
9959
|
color: "grey-60"
|
9804
9960
|
}, "Page")), /* @__PURE__ */ React54.createElement(InputBase, {
|
9961
|
+
"aria-label": "Page",
|
9805
9962
|
className: classNames(tw("text-center max-w-[40px]"), "no-arrows"),
|
9806
9963
|
type: "number",
|
9807
9964
|
min: 1,
|
@@ -9901,7 +10058,8 @@ var Template = ({
|
|
9901
10058
|
columnGap,
|
9902
10059
|
rowGap,
|
9903
10060
|
fullHeight,
|
9904
|
-
className
|
10061
|
+
className,
|
10062
|
+
role
|
9905
10063
|
}) => {
|
9906
10064
|
const gridTemplateColumns = typeof columns === "number" ? "1fr ".repeat(columns) : columns.map((column) => typeof column === "number" ? `${column}px` : column === "auto" ? column : `${column}fr`).join(" ");
|
9907
10065
|
const styles = useStyle({
|
@@ -9917,6 +10075,7 @@ var Template = ({
|
|
9917
10075
|
columnGap
|
9918
10076
|
});
|
9919
10077
|
return /* @__PURE__ */ React56.createElement("div", {
|
10078
|
+
role,
|
9920
10079
|
className,
|
9921
10080
|
style: __spreadValues({}, styles)
|
9922
10081
|
}, children);
|
@@ -10063,11 +10222,14 @@ var TableSortCell = (_a) => {
|
|
10063
10222
|
className: getSortCellIconClassNames(direction === "ascending")
|
10064
10223
|
}))));
|
10065
10224
|
};
|
10225
|
+
var Caption = ({ children }) => /* @__PURE__ */ React58.createElement(Typography2.Caption, {
|
10226
|
+
htmlTag: "caption"
|
10227
|
+
}, children);
|
10066
10228
|
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React58.createElement("div", {
|
10067
10229
|
className: tw("flex gap-4 items-center")
|
10068
10230
|
}, image && /* @__PURE__ */ React58.createElement("img", {
|
10069
10231
|
src: image,
|
10070
|
-
alt: imageAlt,
|
10232
|
+
alt: imageAlt != null ? imageAlt : "",
|
10071
10233
|
style: { width: imageSize, height: imageSize }
|
10072
10234
|
}), /* @__PURE__ */ React58.createElement("div", null, title, caption && /* @__PURE__ */ React58.createElement(Typography2.Caption, null, caption)));
|
10073
10235
|
Table.Head = React58.memo(TableHead);
|
@@ -10076,6 +10238,7 @@ Table.Row = React58.memo(TableRow);
|
|
10076
10238
|
Table.Cell = React58.memo(TableCell);
|
10077
10239
|
Table.SortCell = React58.memo(TableSortCell);
|
10078
10240
|
Table.SelectCell = React58.memo(TableSelectCell);
|
10241
|
+
Table.Caption = Caption;
|
10079
10242
|
|
10080
10243
|
// src/atoms/DataList/DataList.tsx
|
10081
10244
|
var import_chevronDown5 = __toESM(require_chevronDown());
|
@@ -10101,8 +10264,9 @@ var HeadCell = (_a) => {
|
|
10101
10264
|
"align",
|
10102
10265
|
"stickyColumn"
|
10103
10266
|
]);
|
10104
|
-
return /* @__PURE__ */ React59.createElement("div", __spreadProps(__spreadValues({
|
10105
|
-
role: "cell"
|
10267
|
+
return /* @__PURE__ */ React59.createElement("div", __spreadProps(__spreadValues({
|
10268
|
+
role: "cell"
|
10269
|
+
}, rest), {
|
10106
10270
|
className: classNames(
|
10107
10271
|
cellClassNames,
|
10108
10272
|
getHeadCellClassNames(sticky, stickyColumn),
|
@@ -10158,7 +10322,7 @@ var SortCell = (_a) => {
|
|
10158
10322
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
10159
10323
|
return /* @__PURE__ */ React59.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
10160
10324
|
"aria-sort": direction,
|
10161
|
-
role: "
|
10325
|
+
role: "columnheader",
|
10162
10326
|
sticky
|
10163
10327
|
}), /* @__PURE__ */ React59.createElement("span", {
|
10164
10328
|
className: getSortCellButtonClassNames(rest.align),
|
@@ -10208,8 +10372,8 @@ var columnIsFieldColumn = (column) => Boolean(column && column.field);
|
|
10208
10372
|
|
10209
10373
|
// src/utils/table/useTableSort.tsx
|
10210
10374
|
import React60 from "react";
|
10211
|
-
var useTableSort = () => {
|
10212
|
-
const [sort, setSort] = React60.useState();
|
10375
|
+
var useTableSort = (defaultSort) => {
|
10376
|
+
const [sort, setSort] = React60.useState(defaultSort);
|
10213
10377
|
const handleSortClick = (column) => {
|
10214
10378
|
if (sort && sort.column.headerName === column.headerName) {
|
10215
10379
|
if (sort.direction === "ascending") {
|
@@ -10245,7 +10409,7 @@ var import_more2 = __toESM(require_more());
|
|
10245
10409
|
// src/molecules/Accordion/Accordion.tsx
|
10246
10410
|
import React63, { createContext as createContext2, useContext as useContext3, useState as useState9 } from "react";
|
10247
10411
|
import { Icon as Icon2 } from "@iconify/react";
|
10248
|
-
import { useId as
|
10412
|
+
import { useId as useId7 } from "@react-aria/utils";
|
10249
10413
|
import { animated as animated3, useSpring as useSpring2 } from "@react-spring/web";
|
10250
10414
|
import isUndefined8 from "lodash/isUndefined";
|
10251
10415
|
|
@@ -10384,10 +10548,12 @@ var AccordionPanel = (_a) => {
|
|
10384
10548
|
duration: 150
|
10385
10549
|
}
|
10386
10550
|
});
|
10387
|
-
return /* @__PURE__ */ React63.createElement(animated3.div, __spreadProps(__spreadValues({
|
10388
|
-
role: "region"
|
10551
|
+
return /* @__PURE__ */ React63.createElement(animated3.div, __spreadProps(__spreadValues({
|
10552
|
+
role: "region"
|
10553
|
+
}, rest), {
|
10389
10554
|
id: `${id}-content`,
|
10390
10555
|
"aria-labelledby": `${id}-summary`,
|
10556
|
+
"aria-hidden": !isOpen ? "true" : void 0,
|
10391
10557
|
style
|
10392
10558
|
}), /* @__PURE__ */ React63.createElement("div", {
|
10393
10559
|
ref
|
@@ -10412,7 +10578,7 @@ var AccordionSummary = (_a) => {
|
|
10412
10578
|
};
|
10413
10579
|
var AccordionContainer = (_a) => {
|
10414
10580
|
var _b = _a, { children, panelId } = _b, rest = __objRest(_b, ["children", "panelId"]);
|
10415
|
-
const generatedId =
|
10581
|
+
const generatedId = useId7();
|
10416
10582
|
return /* @__PURE__ */ React63.createElement(PanelContext.Provider, {
|
10417
10583
|
value: panelId != null ? panelId : generatedId
|
10418
10584
|
}, /* @__PURE__ */ React63.createElement("div", __spreadValues({}, rest), children, /* @__PURE__ */ React63.createElement(Divider2, null)));
|
@@ -10434,13 +10600,14 @@ import React64 from "react";
|
|
10434
10600
|
var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
10435
10601
|
const columnsAmount = [...Array(typeof columns === "number" ? columns : columns.length).keys()];
|
10436
10602
|
return /* @__PURE__ */ React64.createElement(Template, {
|
10603
|
+
role: "table",
|
10437
10604
|
columns
|
10438
|
-
}, columnsAmount.map((_, index) => /* @__PURE__ */ React64.createElement(DataList.HeadCell, {
|
10605
|
+
}, /* @__PURE__ */ React64.createElement(DataList.Row, null, columnsAmount.map((_, index) => /* @__PURE__ */ React64.createElement(DataList.HeadCell, {
|
10439
10606
|
key: index
|
10440
10607
|
}, /* @__PURE__ */ React64.createElement(Skeleton, {
|
10441
10608
|
width: "100%",
|
10442
10609
|
height: 17.5
|
10443
|
-
}))), /* @__PURE__ */ React64.createElement(List2, {
|
10610
|
+
})))), /* @__PURE__ */ React64.createElement(List2, {
|
10444
10611
|
items: [...Array(rows).keys()],
|
10445
10612
|
renderItem: (item) => /* @__PURE__ */ React64.createElement(DataList.Row, {
|
10446
10613
|
key: item
|
@@ -10474,9 +10641,13 @@ var DataList2 = ({
|
|
10474
10641
|
disabled,
|
10475
10642
|
getGroupRow,
|
10476
10643
|
onGroupToggled,
|
10477
|
-
expandedGroupIds
|
10644
|
+
expandedGroupIds,
|
10645
|
+
defaultSort
|
10478
10646
|
}) => {
|
10479
|
-
|
10647
|
+
var _a;
|
10648
|
+
const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
|
10649
|
+
const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a : "ascending" } : void 0;
|
10650
|
+
const [sort, updateSort] = useTableSort(initialSortState);
|
10480
10651
|
const sortedRows = sortRowsBy(rows, sort);
|
10481
10652
|
const groups = group ? isFunction(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
|
10482
10653
|
const groupKeys = groups ? Object.keys(groups) : void 0;
|
@@ -10485,21 +10656,25 @@ var DataList2 = ({
|
|
10485
10656
|
const templateColumns = compact([
|
10486
10657
|
isCollapsible ? 50 : void 0,
|
10487
10658
|
...columns.map((column) => {
|
10488
|
-
var
|
10489
|
-
return (
|
10659
|
+
var _a2;
|
10660
|
+
return (_a2 = column.width) != null ? _a2 : "auto";
|
10490
10661
|
}),
|
10491
10662
|
menu ? "auto" : void 0
|
10492
10663
|
]);
|
10493
10664
|
const PaginationFooter = React65.useCallback(
|
10494
10665
|
({ children }) => /* @__PURE__ */ React65.createElement("div", {
|
10495
|
-
style: { gridColumn: "1 / -1" }
|
10496
|
-
|
10666
|
+
style: { gridColumn: "1 / -1" },
|
10667
|
+
role: "row"
|
10668
|
+
}, /* @__PURE__ */ React65.createElement("div", {
|
10669
|
+
role: "cell"
|
10670
|
+
}, children)),
|
10497
10671
|
[]
|
10498
10672
|
);
|
10499
10673
|
return /* @__PURE__ */ React65.createElement(Template, {
|
10500
10674
|
className: "Aquarium-DataList",
|
10501
|
-
columns: templateColumns
|
10502
|
-
|
10675
|
+
columns: templateColumns,
|
10676
|
+
role: "table"
|
10677
|
+
}, /* @__PURE__ */ React65.createElement(DataList.Row, null, isCollapsible && /* @__PURE__ */ React65.createElement(DataList.HeadCell, {
|
10503
10678
|
align: "left"
|
10504
10679
|
}), columns.map((column) => {
|
10505
10680
|
const content = column.headerTooltip ? /* @__PURE__ */ React65.createElement(Tooltip, {
|
@@ -10516,7 +10691,7 @@ var DataList2 = ({
|
|
10516
10691
|
}), menu && /* @__PURE__ */ React65.createElement(DataList.HeadCell, {
|
10517
10692
|
align: "right",
|
10518
10693
|
"aria-label": menuAriaLabel
|
10519
|
-
}, menuHeaderName), groups && groupKeys ? /* @__PURE__ */ React65.createElement(List2, {
|
10694
|
+
}, menuHeaderName)), groups && groupKeys ? /* @__PURE__ */ React65.createElement(List2, {
|
10520
10695
|
items: sortGroupKeys(groupKeys),
|
10521
10696
|
renderItem: (key) => {
|
10522
10697
|
const groupContent = /* @__PURE__ */ React65.createElement(List2, {
|
@@ -10581,10 +10756,13 @@ var DataList2 = ({
|
|
10581
10756
|
key: row.id,
|
10582
10757
|
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === row.id) || null : void 0
|
10583
10758
|
}, content, /* @__PURE__ */ React65.createElement(Accordion.Panel, {
|
10759
|
+
role: "row",
|
10584
10760
|
panelId: row.id.toString(),
|
10585
10761
|
className: tw("col-span-full bg-grey-0 border-b border-grey-10"),
|
10586
10762
|
"aria-label": `row ${row.id.toString()} details`
|
10587
|
-
},
|
10763
|
+
}, /* @__PURE__ */ React65.createElement("div", {
|
10764
|
+
role: "cell"
|
10765
|
+
}, details))) : content;
|
10588
10766
|
}
|
10589
10767
|
}));
|
10590
10768
|
};
|
@@ -10698,6 +10876,7 @@ Table2.Row = Table.Row;
|
|
10698
10876
|
Table2.Cell = Table.Cell;
|
10699
10877
|
Table2.SortCell = Table.SortCell;
|
10700
10878
|
Table2.SelectCell = Table.SelectCell;
|
10879
|
+
Table2.Caption = Table.Caption;
|
10701
10880
|
|
10702
10881
|
// src/molecules/DataTable/DataTable.tsx
|
10703
10882
|
var import_more3 = __toESM(require_more());
|
@@ -10715,7 +10894,8 @@ var DataTable = (_a) => {
|
|
10715
10894
|
onAction,
|
10716
10895
|
onMenuOpenChange,
|
10717
10896
|
pagination,
|
10718
|
-
disabled
|
10897
|
+
disabled,
|
10898
|
+
defaultSort
|
10719
10899
|
} = _b, rest = __objRest(_b, [
|
10720
10900
|
"columns",
|
10721
10901
|
"rows",
|
@@ -10729,9 +10909,13 @@ var DataTable = (_a) => {
|
|
10729
10909
|
"onAction",
|
10730
10910
|
"onMenuOpenChange",
|
10731
10911
|
"pagination",
|
10732
|
-
"disabled"
|
10912
|
+
"disabled",
|
10913
|
+
"defaultSort"
|
10733
10914
|
]);
|
10734
|
-
|
10915
|
+
var _a2;
|
10916
|
+
const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
|
10917
|
+
const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a2 = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a2 : "ascending" } : void 0;
|
10918
|
+
const [sort, updateSort] = useTableSort(initialSortState);
|
10735
10919
|
const sortedRows = sortRowsBy(rows, sort);
|
10736
10920
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
10737
10921
|
const PaginationFooter = React68.useCallback(
|
@@ -10778,8 +10962,8 @@ var DataTable = (_a) => {
|
|
10778
10962
|
pagination,
|
10779
10963
|
items: sortedRows,
|
10780
10964
|
renderItem: (row, index) => {
|
10781
|
-
var
|
10782
|
-
const isRowDisabled = (
|
10965
|
+
var _a3;
|
10966
|
+
const isRowDisabled = (_a3 = disabled == null ? void 0 : disabled(row, index, sortedRows)) != null ? _a3 : false;
|
10783
10967
|
return /* @__PURE__ */ React68.createElement(Table2.Row, {
|
10784
10968
|
key: row.id,
|
10785
10969
|
disabled: isRowDisabled
|
@@ -10847,7 +11031,7 @@ DataTable.Skeleton = DataListSkeleton;
|
|
10847
11031
|
import React70 from "react";
|
10848
11032
|
import { useDialog } from "@react-aria/dialog";
|
10849
11033
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
10850
|
-
import { useId as
|
11034
|
+
import { useId as useId8 } from "@react-aria/utils";
|
10851
11035
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
10852
11036
|
import omit8 from "lodash/omit";
|
10853
11037
|
|
@@ -10996,8 +11180,8 @@ var DialogWrapper = ({
|
|
10996
11180
|
secondaryAction
|
10997
11181
|
}) => {
|
10998
11182
|
const ref = React70.useRef(null);
|
10999
|
-
const labelledBy =
|
11000
|
-
const describedBy =
|
11183
|
+
const labelledBy = useId8();
|
11184
|
+
const describedBy = useId8();
|
11001
11185
|
const { dialogProps } = useDialog(
|
11002
11186
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11003
11187
|
ref
|
@@ -11034,7 +11218,8 @@ import { PressResponder as PressResponder2, usePress as usePress2 } from "@react
|
|
11034
11218
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
11035
11219
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
11036
11220
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "@react-stately/overlays";
|
11037
|
-
import
|
11221
|
+
import classNames8 from "classnames";
|
11222
|
+
import omit9 from "lodash/omit";
|
11038
11223
|
|
11039
11224
|
// src/molecules/Popover/Dialog.tsx
|
11040
11225
|
import React71 from "react";
|
@@ -11084,9 +11269,10 @@ var Popover2 = (props) => {
|
|
11084
11269
|
if (isComponentType(child, Popover2.Trigger)) {
|
11085
11270
|
return /* @__PURE__ */ React72.createElement(PressResponder2, __spreadValues({
|
11086
11271
|
ref: triggerRef
|
11087
|
-
}, triggerProps), /* @__PURE__ */ React72.createElement(PopoverTriggerWrapper, {
|
11272
|
+
}, omit9(triggerProps, "aria-expanded")), /* @__PURE__ */ React72.createElement(PopoverTriggerWrapper, {
|
11088
11273
|
"data-testid": props["data-testid"],
|
11089
|
-
"aria-controls": id
|
11274
|
+
"aria-controls": id,
|
11275
|
+
"aria-expanded": triggerProps["aria-expanded"]
|
11090
11276
|
}, child.props.children));
|
11091
11277
|
}
|
11092
11278
|
if (isComponentType(child, Popover2.Panel)) {
|
@@ -11097,7 +11283,7 @@ var Popover2 = (props) => {
|
|
11097
11283
|
isNonModal: !containFocus,
|
11098
11284
|
autoFocus: !containFocus,
|
11099
11285
|
isKeyboardDismissDisabled,
|
11100
|
-
className:
|
11286
|
+
className: classNames8("Aquarium-Popover", child.props.className),
|
11101
11287
|
offset,
|
11102
11288
|
crossOffset,
|
11103
11289
|
shouldFlip
|
@@ -11456,7 +11642,7 @@ var LineClamp2 = ({
|
|
11456
11642
|
|
11457
11643
|
// src/molecules/Link/Link.tsx
|
11458
11644
|
import React79 from "react";
|
11459
|
-
import
|
11645
|
+
import classNames9 from "classnames";
|
11460
11646
|
|
11461
11647
|
// src/atoms/Link/Link.tsx
|
11462
11648
|
import React78 from "react";
|
@@ -11471,7 +11657,7 @@ var Link = (_a) => {
|
|
11471
11657
|
var Link2 = (_a) => {
|
11472
11658
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
11473
11659
|
return /* @__PURE__ */ React79.createElement(Link, __spreadValues({
|
11474
|
-
className:
|
11660
|
+
className: classNames9("Aquarium-Link", className)
|
11475
11661
|
}, props));
|
11476
11662
|
};
|
11477
11663
|
|
@@ -11488,6 +11674,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11488
11674
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
11489
11675
|
}, /* @__PURE__ */ React80.createElement("img", {
|
11490
11676
|
src: icon,
|
11677
|
+
alt: "",
|
11491
11678
|
className: "inline mr-4",
|
11492
11679
|
height: 28,
|
11493
11680
|
width: 28
|
@@ -11498,10 +11685,10 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
11498
11685
|
import React82 from "react";
|
11499
11686
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
11500
11687
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
11501
|
-
import { useId as
|
11688
|
+
import { useId as useId9 } from "@react-aria/utils";
|
11502
11689
|
import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
|
11503
11690
|
import castArray from "lodash/castArray";
|
11504
|
-
import
|
11691
|
+
import omit10 from "lodash/omit";
|
11505
11692
|
|
11506
11693
|
// src/molecules/Tabs/Tabs.tsx
|
11507
11694
|
import React81, { useEffect as useEffect9, useLayoutEffect as useLayoutEffect2, useRef as useRef8, useState as useState10 } from "react";
|
@@ -11828,8 +12015,8 @@ var Modal2 = (_a) => {
|
|
11828
12015
|
var ModalWrapper = React82.forwardRef(
|
11829
12016
|
(_a, ref) => {
|
11830
12017
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
11831
|
-
const labelledBy =
|
11832
|
-
const describedBy =
|
12018
|
+
const labelledBy = useId9();
|
12019
|
+
const describedBy = useId9();
|
11833
12020
|
const { dialogProps } = useDialog3(
|
11834
12021
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11835
12022
|
ref
|
@@ -11859,7 +12046,7 @@ var ModalWrapper = React82.forwardRef(
|
|
11859
12046
|
}, action), text);
|
11860
12047
|
}), primaryAction && /* @__PURE__ */ React82.createElement(Button.Primary, __spreadValues({
|
11861
12048
|
key: primaryAction.text
|
11862
|
-
},
|
12049
|
+
}, omit10(primaryAction, "text")), primaryAction.text))));
|
11863
12050
|
}
|
11864
12051
|
);
|
11865
12052
|
var ModalTabs = createTabsComponent(
|
@@ -11875,10 +12062,10 @@ var ModalTabs = createTabsComponent(
|
|
11875
12062
|
|
11876
12063
|
// src/molecules/MultiInput/MultiInput.tsx
|
11877
12064
|
import React84, { useEffect as useEffect10, useRef as useRef9, useState as useState11 } from "react";
|
11878
|
-
import { useId as
|
12065
|
+
import { useId as useId10 } from "@react-aria/utils";
|
11879
12066
|
import castArray2 from "lodash/castArray";
|
11880
12067
|
import identity from "lodash/identity";
|
11881
|
-
import
|
12068
|
+
import omit11 from "lodash/omit";
|
11882
12069
|
|
11883
12070
|
// src/molecules/MultiInput/InputChip.tsx
|
11884
12071
|
import React83 from "react";
|
@@ -12105,12 +12292,12 @@ var MultiInput = (props) => {
|
|
12105
12292
|
var _a2;
|
12106
12293
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
12107
12294
|
}, [JSON.stringify(props.value)]);
|
12108
|
-
const defaultId =
|
12295
|
+
const defaultId = useId10();
|
12109
12296
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
12110
|
-
const errorMessageId =
|
12297
|
+
const errorMessageId = useId10();
|
12111
12298
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12112
12299
|
const labelControlProps = getLabelControlProps(props);
|
12113
|
-
const baseProps =
|
12300
|
+
const baseProps = omit11(props, Object.keys(labelControlProps));
|
12114
12301
|
return /* @__PURE__ */ React84.createElement(LabelControl, __spreadProps(__spreadValues({
|
12115
12302
|
id: `${id}-label`,
|
12116
12303
|
htmlFor: `${id}-input`,
|
@@ -12138,11 +12325,11 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
12138
12325
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
12139
12326
|
import React85, { useEffect as useEffect11, useRef as useRef10, useState as useState12 } from "react";
|
12140
12327
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
12141
|
-
import { useId as
|
12328
|
+
import { useId as useId11 } from "@react-aria/utils";
|
12142
12329
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
12143
12330
|
import isEqual from "lodash/isEqual";
|
12144
12331
|
import isNil2 from "lodash/isNil";
|
12145
|
-
import
|
12332
|
+
import omit12 from "lodash/omit";
|
12146
12333
|
import omitBy from "lodash/omitBy";
|
12147
12334
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
12148
12335
|
var MultiSelectBase = (_a) => {
|
@@ -12365,12 +12552,12 @@ var MultiSelect = (_a) => {
|
|
12365
12552
|
"emptyState"
|
12366
12553
|
]);
|
12367
12554
|
var _a2;
|
12368
|
-
const defaultId =
|
12555
|
+
const defaultId = useId11();
|
12369
12556
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12370
|
-
const errorMessageId =
|
12557
|
+
const errorMessageId = useId11();
|
12371
12558
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12372
12559
|
const labelControlProps = getLabelControlProps(props);
|
12373
|
-
const baseProps =
|
12560
|
+
const baseProps = omit12(props, Object.keys(labelControlProps));
|
12374
12561
|
return /* @__PURE__ */ React85.createElement(LabelControl, __spreadProps(__spreadValues({
|
12375
12562
|
id: `${id}-label`,
|
12376
12563
|
htmlFor: `${id}-input`,
|
@@ -12391,8 +12578,8 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
12391
12578
|
|
12392
12579
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
12393
12580
|
import React86 from "react";
|
12394
|
-
import { useId as
|
12395
|
-
import
|
12581
|
+
import { useId as useId12 } from "@react-aria/utils";
|
12582
|
+
import omit13 from "lodash/omit";
|
12396
12583
|
import uniqueId from "lodash/uniqueId";
|
12397
12584
|
var import_caretDown2 = __toESM(require_caretDown());
|
12398
12585
|
var NativeSelectBase = React86.forwardRef(
|
@@ -12453,12 +12640,12 @@ var NativeSelect = React86.forwardRef(
|
|
12453
12640
|
(_a, ref) => {
|
12454
12641
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
12455
12642
|
var _a2;
|
12456
|
-
const defaultId =
|
12643
|
+
const defaultId = useId12();
|
12457
12644
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
12458
|
-
const errorMessageId =
|
12645
|
+
const errorMessageId = useId12();
|
12459
12646
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12460
12647
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
12461
|
-
const baseProps =
|
12648
|
+
const baseProps = omit13(props, Object.keys(labelControlProps));
|
12462
12649
|
return /* @__PURE__ */ React86.createElement(LabelControl, __spreadProps(__spreadValues({
|
12463
12650
|
id: `${id}-label`,
|
12464
12651
|
htmlFor: id,
|
@@ -12494,7 +12681,7 @@ NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
|
12494
12681
|
|
12495
12682
|
// src/molecules/Navigation/Navigation.tsx
|
12496
12683
|
import React88 from "react";
|
12497
|
-
import
|
12684
|
+
import classNames10 from "classnames";
|
12498
12685
|
|
12499
12686
|
// src/atoms/Navigation/Navigation.tsx
|
12500
12687
|
import React87 from "react";
|
@@ -12504,7 +12691,7 @@ var Navigation = (_a) => {
|
|
12504
12691
|
className: classNames(tw("bg-grey-0 h-full"))
|
12505
12692
|
}, /* @__PURE__ */ React87.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
12506
12693
|
className: classNames(tw("flex flex-col h-full"), className),
|
12507
|
-
role: "
|
12694
|
+
role: "menubar"
|
12508
12695
|
}), children));
|
12509
12696
|
};
|
12510
12697
|
var Header = (_a) => {
|
@@ -12566,7 +12753,7 @@ Navigation.Divider = Divider3;
|
|
12566
12753
|
var Navigation2 = (_a) => {
|
12567
12754
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
12568
12755
|
return /* @__PURE__ */ React88.createElement(Navigation, __spreadValues({
|
12569
|
-
className:
|
12756
|
+
className: classNames10("Aquarium-Navigation", className)
|
12570
12757
|
}, props));
|
12571
12758
|
};
|
12572
12759
|
var Item6 = (_a) => {
|
@@ -12674,7 +12861,7 @@ var CommonPageHeader = ({
|
|
12674
12861
|
gap: "5"
|
12675
12862
|
}, image && /* @__PURE__ */ React90.createElement("img", {
|
12676
12863
|
src: image,
|
12677
|
-
alt: imageAlt,
|
12864
|
+
alt: imageAlt != null ? imageAlt : "",
|
12678
12865
|
className: tw("w-[56px] h-[56px]")
|
12679
12866
|
}), /* @__PURE__ */ React90.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React90.createElement(PageHeader.Title, {
|
12680
12867
|
isSubHeader
|
@@ -12702,7 +12889,7 @@ PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
|
12702
12889
|
|
12703
12890
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
12704
12891
|
import React92 from "react";
|
12705
|
-
import
|
12892
|
+
import omit14 from "lodash/omit";
|
12706
12893
|
|
12707
12894
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
12708
12895
|
import React91 from "react";
|
@@ -12757,11 +12944,11 @@ var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction,
|
|
12757
12944
|
kind: "secondary-ghost",
|
12758
12945
|
key: secondaryAction.text,
|
12759
12946
|
dense: true
|
12760
|
-
},
|
12947
|
+
}, omit14(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React92.createElement(Popover2.Button, __spreadValues({
|
12761
12948
|
kind: "ghost",
|
12762
12949
|
key: primaryAction.text,
|
12763
12950
|
dense: true
|
12764
|
-
},
|
12951
|
+
}, omit14(primaryAction, "text")), primaryAction.text))));
|
12765
12952
|
}
|
12766
12953
|
return child;
|
12767
12954
|
};
|
@@ -12909,7 +13096,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
12909
13096
|
|
12910
13097
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
12911
13098
|
import React96 from "react";
|
12912
|
-
import { useId as
|
13099
|
+
import { useId as useId13 } from "@react-aria/utils";
|
12913
13100
|
var isRadioButton = (c) => {
|
12914
13101
|
return React96.isValidElement(c) && c.type === RadioButton2;
|
12915
13102
|
};
|
@@ -12935,7 +13122,7 @@ var RadioButtonGroup = (_a) => {
|
|
12935
13122
|
]);
|
12936
13123
|
var _a2;
|
12937
13124
|
const [value, setValue] = React96.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
12938
|
-
const errorMessageId =
|
13125
|
+
const errorMessageId = useId13();
|
12939
13126
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12940
13127
|
const labelControlProps = getLabelControlProps(props);
|
12941
13128
|
if (_value !== void 0 && _value !== value) {
|
@@ -12990,7 +13177,7 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
12990
13177
|
|
12991
13178
|
// src/molecules/Section/Section.tsx
|
12992
13179
|
import React101 from "react";
|
12993
|
-
import { useId as
|
13180
|
+
import { useId as useId14 } from "@react-aria/utils";
|
12994
13181
|
import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
|
12995
13182
|
import castArray4 from "lodash/castArray";
|
12996
13183
|
import isUndefined9 from "lodash/isUndefined";
|
@@ -13137,10 +13324,10 @@ var Section3 = (_a) => {
|
|
13137
13324
|
}, rest), children);
|
13138
13325
|
};
|
13139
13326
|
Section3.Header = (_a) => {
|
13140
|
-
var _b = _a, { children, className,
|
13327
|
+
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
13141
13328
|
return /* @__PURE__ */ React100.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13142
13329
|
className: classNames(
|
13143
|
-
tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-grey-0":
|
13330
|
+
tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-grey-0": expanded }),
|
13144
13331
|
className
|
13145
13332
|
)
|
13146
13333
|
}), children);
|
@@ -13228,23 +13415,26 @@ var Section4 = (props) => {
|
|
13228
13415
|
},
|
13229
13416
|
immediate: !_collapsible
|
13230
13417
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
13231
|
-
const toggleId =
|
13232
|
-
const regionId =
|
13418
|
+
const toggleId = useId14();
|
13419
|
+
const regionId = useId14();
|
13420
|
+
const titleId = useId14();
|
13233
13421
|
return /* @__PURE__ */ React101.createElement(Section3, {
|
13234
13422
|
"aria-label": title,
|
13235
13423
|
className: "Aquarium-Section"
|
13236
13424
|
}, title && /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(Section3.Header, {
|
13237
|
-
|
13425
|
+
expanded: _collapsible && !isCollapsed
|
13238
13426
|
}, /* @__PURE__ */ React101.createElement(Section3.TitleContainer, {
|
13239
13427
|
role: _collapsible ? "button" : void 0,
|
13240
13428
|
id: toggleId,
|
13241
13429
|
collapsible: _collapsible,
|
13242
13430
|
onClick: handleTitleClick,
|
13243
|
-
"aria-expanded": !isCollapsed,
|
13244
|
-
"aria-controls": regionId
|
13431
|
+
"aria-expanded": _collapsible ? !isCollapsed : void 0,
|
13432
|
+
"aria-controls": _collapsible ? regionId : void 0
|
13245
13433
|
}, _collapsible && /* @__PURE__ */ React101.createElement(animated4.div, {
|
13246
13434
|
style: { transform }
|
13247
|
-
}, /* @__PURE__ */ React101.createElement(Section3.Toggle, null)), /* @__PURE__ */ React101.createElement(Section3.Title,
|
13435
|
+
}, /* @__PURE__ */ React101.createElement(Section3.Toggle, null)), /* @__PURE__ */ React101.createElement(Section3.Title, {
|
13436
|
+
id: titleId
|
13437
|
+
}, /* @__PURE__ */ React101.createElement(LineClamp2, {
|
13248
13438
|
lines: 1
|
13249
13439
|
}, title), props.tag && /* @__PURE__ */ React101.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React101.createElement(Chip2, {
|
13250
13440
|
text: props.badge
|
@@ -13260,12 +13450,14 @@ var Section4 = (props) => {
|
|
13260
13450
|
}, /* @__PURE__ */ React101.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React101.createElement(Button.Icon, {
|
13261
13451
|
"aria-label": menuAriaLabel,
|
13262
13452
|
icon: import_more5.default
|
13263
|
-
})), menu)), props.actions && castArray4(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React101.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React101.createElement(SelectBase, __spreadValues({
|
13453
|
+
})), menu)), props.actions && castArray4(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React101.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React101.createElement(SelectBase, __spreadValues({
|
13454
|
+
"aria-labelledby": titleId
|
13455
|
+
}, props.select)))), /* @__PURE__ */ React101.createElement(animated4.div, {
|
13264
13456
|
className: tw(`h-[1px]`),
|
13265
13457
|
style: { backgroundColor }
|
13266
13458
|
})), /* @__PURE__ */ React101.createElement(animated4.div, {
|
13267
13459
|
id: regionId,
|
13268
|
-
"aria-hidden": isCollapsed ? true : void 0,
|
13460
|
+
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
13269
13461
|
style: spring,
|
13270
13462
|
className: tw({ "overflow-hidden": _collapsible })
|
13271
13463
|
}, /* @__PURE__ */ React101.createElement("div", {
|
@@ -13486,7 +13678,7 @@ Stepper2.Step = Step2;
|
|
13486
13678
|
|
13487
13679
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
13488
13680
|
import React105, { useState as useState13 } from "react";
|
13489
|
-
import { useId as
|
13681
|
+
import { useId as useId15 } from "@react-aria/utils";
|
13490
13682
|
var SwitchGroup = (_a) => {
|
13491
13683
|
var _b = _a, {
|
13492
13684
|
value,
|
@@ -13508,7 +13700,7 @@ var SwitchGroup = (_a) => {
|
|
13508
13700
|
if (value !== void 0 && value !== selectedItems) {
|
13509
13701
|
setSelectedItems(value);
|
13510
13702
|
}
|
13511
|
-
const errorMessageId =
|
13703
|
+
const errorMessageId = useId15();
|
13512
13704
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13513
13705
|
const labelControlProps = getLabelControlProps(props);
|
13514
13706
|
const handleChange = (e) => {
|
@@ -13552,8 +13744,8 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
13552
13744
|
|
13553
13745
|
// src/molecules/Textarea/Textarea.tsx
|
13554
13746
|
import React106, { useState as useState14 } from "react";
|
13555
|
-
import { useId as
|
13556
|
-
import
|
13747
|
+
import { useId as useId16 } from "@react-aria/utils";
|
13748
|
+
import omit15 from "lodash/omit";
|
13557
13749
|
import toString2 from "lodash/toString";
|
13558
13750
|
var TextareaBase = React106.forwardRef(
|
13559
13751
|
(_a, ref) => {
|
@@ -13572,12 +13764,12 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ React106.createElement(Skeleton, {
|
|
13572
13764
|
var Textarea = React106.forwardRef((props, ref) => {
|
13573
13765
|
var _a, _b, _c;
|
13574
13766
|
const [value, setValue] = useState14((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
13575
|
-
const defaultId =
|
13767
|
+
const defaultId = useId16();
|
13576
13768
|
const id = (_c = props.id) != null ? _c : defaultId;
|
13577
|
-
const errorMessageId =
|
13769
|
+
const errorMessageId = useId16();
|
13578
13770
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13579
13771
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
13580
|
-
const baseProps =
|
13772
|
+
const baseProps = omit15(props, Object.keys(labelControlProps));
|
13581
13773
|
return /* @__PURE__ */ React106.createElement(LabelControl, __spreadProps(__spreadValues({
|
13582
13774
|
id: `${id}-label`,
|
13583
13775
|
htmlFor: id,
|
@@ -13863,7 +14055,7 @@ export {
|
|
13863
14055
|
Avatar,
|
13864
14056
|
AvatarStack,
|
13865
14057
|
Badge,
|
13866
|
-
|
14058
|
+
Banner4 as Banner,
|
13867
14059
|
BorderBox,
|
13868
14060
|
Box,
|
13869
14061
|
Breadcrumbs,
|