@aivenio/aquarium 6.1.1 → 6.2.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 +8 -6
- package/dist/atoms.mjs +8 -6
- package/dist/charts.cjs +3 -3
- package/dist/charts.mjs +3 -3
- package/dist/src/atoms/ChoiceChip/ChoiceChip.js +3 -3
- package/dist/src/atoms/CommandPalette/CommandPalette.d.ts +16 -0
- package/dist/src/atoms/CommandPalette/CommandPalette.js +3 -1
- package/dist/src/molecules/CommandPalette/CommandPalette.d.ts +12 -4
- package/dist/src/molecules/CommandPalette/CommandPalette.js +17 -5
- package/dist/src/molecules/CommandPalette/CommandPaletteProvider.js +86 -22
- package/dist/src/molecules/CommandPalette/findSubCommands.d.ts +13 -0
- package/dist/src/molecules/CommandPalette/findSubCommands.js +65 -0
- package/dist/src/molecules/CommandPalette/types.d.ts +31 -1
- package/dist/src/molecules/CommandPalette/types.js +10 -1
- package/dist/src/molecules/Popover/Popover.d.ts +3 -0
- package/dist/src/molecules/Popover/Popover.js +1 -1
- package/dist/src/molecules/Section/Section.d.ts +9 -0
- package/dist/src/molecules/Section/Section.js +13 -6
- package/dist/src/molecules/SegmentedControl/SegmentedControl.js +3 -3
- package/dist/src/molecules/Table/Table.d.ts +3 -0
- package/dist/src/molecules/Table/Table.js +4 -1
- package/dist/src/molecules/TagLabel/TagLabel.d.ts +1 -1
- package/dist/src/molecules/TagLabel/TagLabel.js +1 -1
- package/dist/src/molecules/Typography/Typography.d.ts +3 -0
- package/dist/src/molecules/Typography/Typography.js +1 -1
- package/dist/src/tokens/tokens.json +3 -3
- package/dist/styles.css +40 -28
- package/dist/system.cjs +820 -671
- package/dist/system.mjs +773 -622
- package/dist/tokens.json +3 -3
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
|
@@ -1652,8 +1652,8 @@ var tokens_default = {
|
|
|
1652
1652
|
medium: "rgba(235,235,235,1)",
|
|
1653
1653
|
intense: "rgba(181,181,183,1)",
|
|
1654
1654
|
primary: {
|
|
1655
|
-
muted: "rgba(
|
|
1656
|
-
default: "rgba(
|
|
1655
|
+
muted: "rgba(217,249,248,1)",
|
|
1656
|
+
default: "rgba(217,249,248,1)",
|
|
1657
1657
|
graphic: "rgba(46,208,205,1)",
|
|
1658
1658
|
intense: "rgba(0,128,124,1)",
|
|
1659
1659
|
inverse: "rgba(0,128,124,1)",
|
|
@@ -1697,7 +1697,7 @@ var tokens_default = {
|
|
|
1697
1697
|
inverse: "rgba(198,42,42,1)"
|
|
1698
1698
|
},
|
|
1699
1699
|
status: {
|
|
1700
|
-
announcement: "rgba(
|
|
1700
|
+
announcement: "rgba(217,249,248,1)",
|
|
1701
1701
|
info: "rgba(233,249,253,1)",
|
|
1702
1702
|
warning: "rgba(255,249,230,1)",
|
|
1703
1703
|
danger: "rgba(255,241,241,1)",
|
|
@@ -5279,7 +5279,7 @@ var choiceChipClasses = tv13({
|
|
|
5279
5279
|
label: "Aquarium-ChoiceChip inline-flex cursor-pointer",
|
|
5280
5280
|
input: "peer appearance-none",
|
|
5281
5281
|
chip: [
|
|
5282
|
-
"inline-flex items-center border rounded-full transition whitespace-nowrap hover:bg-primary-
|
|
5282
|
+
"inline-flex items-center border rounded-full transition whitespace-nowrap hover:bg-primary-active",
|
|
5283
5283
|
"peer-focus-visible:ring-2 peer-focus-visible:ring-info-default peer-focus-visible:ring-offset-1",
|
|
5284
5284
|
"peer-disabled:cursor-not-allowed peer-disabled:text-inactive peer-disabled:bg-muted peer-disabled:hover:bg-muted"
|
|
5285
5285
|
]
|
|
@@ -5291,7 +5291,7 @@ var choiceChipClasses = tv13({
|
|
|
5291
5291
|
},
|
|
5292
5292
|
dense: {
|
|
5293
5293
|
true: { chip: "typography-small py-2 px-3 gap-x-2" },
|
|
5294
|
-
false: { chip: "typography-
|
|
5294
|
+
false: { chip: "typography-default py-3 px-5 gap-x-3" }
|
|
5295
5295
|
}
|
|
5296
5296
|
},
|
|
5297
5297
|
defaultVariants: {
|
|
@@ -5690,13 +5690,13 @@ Combobox.Skeleton = ComboboxSkeleton;
|
|
|
5690
5690
|
Combobox.Skeleton.displayName = "Combobox.Skeleton";
|
|
5691
5691
|
|
|
5692
5692
|
// src/molecules/CommandPalette/CommandPalette.tsx
|
|
5693
|
-
import
|
|
5693
|
+
import React64, { useEffect as useEffect7 } from "react";
|
|
5694
5694
|
import {
|
|
5695
5695
|
Collection as AriaCollection2,
|
|
5696
5696
|
composeRenderProps as composeRenderProps3,
|
|
5697
5697
|
Header as AriaHeader2,
|
|
5698
|
-
MenuItem as
|
|
5699
|
-
MenuSection as
|
|
5698
|
+
MenuItem as AriaMenuItem3,
|
|
5699
|
+
MenuSection as AriaMenuSection3
|
|
5700
5700
|
} from "react-aria-components";
|
|
5701
5701
|
import { useId as useId6 } from "@react-aria/utils";
|
|
5702
5702
|
|
|
@@ -5710,7 +5710,9 @@ var commandPaletteStyles = tv15({
|
|
|
5710
5710
|
searchContainer: "flex items-center gap-x-3 p-5 border-b border-muted",
|
|
5711
5711
|
searchInput: "outline-none grow bg-transparent [&::-webkit-search-cancel-button]:hidden",
|
|
5712
5712
|
itemIcon: "text-muted group-data-[focused]:text-default",
|
|
5713
|
-
emptyState: "p-6 text-center text-muted typography-default"
|
|
5713
|
+
emptyState: "p-6 text-center text-muted typography-default",
|
|
5714
|
+
breadcrumbHeader: "typography-small font-semibold",
|
|
5715
|
+
breadcrumbBackButton: "text-muted"
|
|
5714
5716
|
}
|
|
5715
5717
|
});
|
|
5716
5718
|
var EmptyState = ({ className, children, ...rest }) => {
|
|
@@ -5807,20 +5809,22 @@ var EmptyStateContainer2 = ({ className, children, ...props }) => /* @__PURE__ *
|
|
|
5807
5809
|
DropdownMenu.EmptyStateContainer = EmptyStateContainer2;
|
|
5808
5810
|
|
|
5809
5811
|
// src/molecules/CommandPalette/CommandPaletteProvider.tsx
|
|
5810
|
-
import
|
|
5812
|
+
import React63, {
|
|
5811
5813
|
createContext as createContext3,
|
|
5812
5814
|
useCallback,
|
|
5813
5815
|
useContext as useContext6,
|
|
5814
5816
|
useEffect as useEffect6,
|
|
5817
|
+
useMemo as useMemo3,
|
|
5815
5818
|
useReducer as useReducer2,
|
|
5816
|
-
useRef as useRef7
|
|
5817
|
-
useState as useState6
|
|
5819
|
+
useRef as useRef7
|
|
5818
5820
|
} from "react";
|
|
5819
5821
|
import {
|
|
5820
5822
|
Autocomplete as AriaAutocomplete,
|
|
5821
5823
|
Dialog as AriaDialog,
|
|
5822
5824
|
Input as AriaInput,
|
|
5823
5825
|
Menu as AriaMenu2,
|
|
5826
|
+
MenuItem as AriaMenuItem2,
|
|
5827
|
+
MenuSection as AriaMenuSection2,
|
|
5824
5828
|
Modal as AriaModal,
|
|
5825
5829
|
ModalOverlay as AriaModalOverlay,
|
|
5826
5830
|
SearchField as AriaSearchField
|
|
@@ -6073,18 +6077,74 @@ var SearchIcon = ({ onClick }) => /* @__PURE__ */ React60.createElement(Icon, {
|
|
|
6073
6077
|
var UploadIcon = ({ onClick }) => /* @__PURE__ */ React60.createElement(Icon, { icon: upload_default, color: "primary-intense", "data-testid": "icon-upload", onClick });
|
|
6074
6078
|
var ResetIcon = ({ onClick }) => /* @__PURE__ */ React60.createElement(Icon, { className: "hover:cursor-pointer", icon: cross_default, color: "inactive", "data-testid": "icon-reset", onClick });
|
|
6075
6079
|
|
|
6076
|
-
// src/molecules/CommandPalette/
|
|
6080
|
+
// src/molecules/CommandPalette/findSubCommands.ts
|
|
6077
6081
|
import React61 from "react";
|
|
6082
|
+
var isCommand = (el) => typeof el.type !== "string" && el.type.displayName === "CommandPalette.Command";
|
|
6083
|
+
var findCommandById = (node, id) => {
|
|
6084
|
+
for (const child of React61.Children.toArray(node)) {
|
|
6085
|
+
if (!React61.isValidElement(child)) {
|
|
6086
|
+
continue;
|
|
6087
|
+
}
|
|
6088
|
+
if (isCommand(child) && child.props.id === id) {
|
|
6089
|
+
return child;
|
|
6090
|
+
}
|
|
6091
|
+
const nested = findCommandById(child.props.children, id);
|
|
6092
|
+
if (nested !== null) {
|
|
6093
|
+
return nested;
|
|
6094
|
+
}
|
|
6095
|
+
}
|
|
6096
|
+
return null;
|
|
6097
|
+
};
|
|
6098
|
+
var findSubCommands = (registrations, parentId) => {
|
|
6099
|
+
const match = findCommandInRegistrations(registrations, parentId);
|
|
6100
|
+
if (match === null) {
|
|
6101
|
+
return null;
|
|
6102
|
+
}
|
|
6103
|
+
return match.props.children ?? null;
|
|
6104
|
+
};
|
|
6105
|
+
var findCommandInRegistrations = (registrations, id) => {
|
|
6106
|
+
for (const reg of registrations) {
|
|
6107
|
+
const match = findCommandById(reg.children, id);
|
|
6108
|
+
if (match !== null) {
|
|
6109
|
+
return match;
|
|
6110
|
+
}
|
|
6111
|
+
}
|
|
6112
|
+
return null;
|
|
6113
|
+
};
|
|
6114
|
+
var containsCommand = (children) => findFirstCommand(children) !== null;
|
|
6115
|
+
var findFirstCommand = (node) => {
|
|
6116
|
+
for (const child of React61.Children.toArray(node)) {
|
|
6117
|
+
if (!React61.isValidElement(child)) {
|
|
6118
|
+
continue;
|
|
6119
|
+
}
|
|
6120
|
+
if (isCommand(child)) {
|
|
6121
|
+
return child;
|
|
6122
|
+
}
|
|
6123
|
+
const nested = findFirstCommand(child.props.children);
|
|
6124
|
+
if (nested !== null) {
|
|
6125
|
+
return nested;
|
|
6126
|
+
}
|
|
6127
|
+
}
|
|
6128
|
+
return null;
|
|
6129
|
+
};
|
|
6130
|
+
|
|
6131
|
+
// src/molecules/CommandPalette/rankCommands.ts
|
|
6132
|
+
import React62 from "react";
|
|
6078
6133
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
|
6079
6134
|
|
|
6080
6135
|
// src/molecules/CommandPalette/types.ts
|
|
6081
6136
|
var STATIC_ITEM_MARKER = "\u200B";
|
|
6082
6137
|
var FIELD_SEPARATOR = "";
|
|
6138
|
+
var ROOT_LEVEL = {
|
|
6139
|
+
parentId: null,
|
|
6140
|
+
parentLabel: null,
|
|
6141
|
+
query: ""
|
|
6142
|
+
};
|
|
6083
6143
|
|
|
6084
6144
|
// src/molecules/CommandPalette/rankCommands.ts
|
|
6085
|
-
var isCommandElement = (node, CommandType) =>
|
|
6145
|
+
var isCommandElement = (node, CommandType) => React62.isValidElement(node) && node.type === CommandType;
|
|
6086
6146
|
var rankChildren = (children, query, CommandType) => {
|
|
6087
|
-
const flat =
|
|
6147
|
+
const flat = React62.Children.toArray(children);
|
|
6088
6148
|
if (!query) {
|
|
6089
6149
|
return flat;
|
|
6090
6150
|
}
|
|
@@ -6138,7 +6198,34 @@ var reducer2 = (state, action) => {
|
|
|
6138
6198
|
case 3 /* Open */:
|
|
6139
6199
|
return { ...state, isOpen: true };
|
|
6140
6200
|
case 4 /* Close */:
|
|
6141
|
-
return { ...state, isOpen: false };
|
|
6201
|
+
return { ...state, isOpen: false, levelStack: [ROOT_LEVEL] };
|
|
6202
|
+
case 5 /* PushLevel */:
|
|
6203
|
+
return {
|
|
6204
|
+
...state,
|
|
6205
|
+
levelStack: [
|
|
6206
|
+
...state.levelStack,
|
|
6207
|
+
{
|
|
6208
|
+
parentId: action.parentId,
|
|
6209
|
+
parentLabel: action.parentLabel,
|
|
6210
|
+
placeholder: action.placeholder,
|
|
6211
|
+
query: ""
|
|
6212
|
+
}
|
|
6213
|
+
]
|
|
6214
|
+
};
|
|
6215
|
+
case 6 /* PopLevel */:
|
|
6216
|
+
return state.levelStack.length > 1 ? { ...state, levelStack: state.levelStack.slice(0, -1) } : state;
|
|
6217
|
+
case 7 /* PopToIndex */:
|
|
6218
|
+
if (action.index < 0 || action.index >= state.levelStack.length - 1) {
|
|
6219
|
+
return state;
|
|
6220
|
+
}
|
|
6221
|
+
return { ...state, levelStack: state.levelStack.slice(0, action.index + 1) };
|
|
6222
|
+
case 8 /* SetQuery */: {
|
|
6223
|
+
const top = state.levelStack.length - 1;
|
|
6224
|
+
return {
|
|
6225
|
+
...state,
|
|
6226
|
+
levelStack: state.levelStack.map((lvl, i) => i === top ? { ...lvl, query: action.query } : lvl)
|
|
6227
|
+
};
|
|
6228
|
+
}
|
|
6142
6229
|
default:
|
|
6143
6230
|
throw new Error("Unsupported action type.");
|
|
6144
6231
|
}
|
|
@@ -6174,7 +6261,7 @@ var CommandPaletteProvider = ({
|
|
|
6174
6261
|
onOpenChange,
|
|
6175
6262
|
onInputChange
|
|
6176
6263
|
}) => {
|
|
6177
|
-
const [state, dispatch] = useReducer2(reducer2, { registrations: [], isOpen: false });
|
|
6264
|
+
const [state, dispatch] = useReducer2(reducer2, { registrations: [], isOpen: false, levelStack: [ROOT_LEVEL] });
|
|
6178
6265
|
const guardedDispatch = useCallback(
|
|
6179
6266
|
(action) => {
|
|
6180
6267
|
if (isDisabled && action.type === 3 /* Open */) {
|
|
@@ -6210,7 +6297,7 @@ var CommandPaletteProvider = ({
|
|
|
6210
6297
|
}
|
|
6211
6298
|
onOpenChange?.(state.isOpen);
|
|
6212
6299
|
}, [state.isOpen]);
|
|
6213
|
-
return /* @__PURE__ */
|
|
6300
|
+
return /* @__PURE__ */ React63.createElement(CommandPaletteContext.Provider, { value: [state, guardedDispatch] }, children, !isDisabled && /* @__PURE__ */ React63.createElement(
|
|
6214
6301
|
CommandPaletteOverlay,
|
|
6215
6302
|
{
|
|
6216
6303
|
marginTop,
|
|
@@ -6220,6 +6307,23 @@ var CommandPaletteProvider = ({
|
|
|
6220
6307
|
}
|
|
6221
6308
|
));
|
|
6222
6309
|
};
|
|
6310
|
+
var BackMenuItem = ({ label, onBack }) => {
|
|
6311
|
+
const styles = commandPaletteStyles();
|
|
6312
|
+
return /* @__PURE__ */ React63.createElement(
|
|
6313
|
+
AriaMenuItem2,
|
|
6314
|
+
{
|
|
6315
|
+
id: "__command-palette-back",
|
|
6316
|
+
textValue: `${STATIC_ITEM_MARKER}Back`,
|
|
6317
|
+
className: (values) => dropdownMenuItemStyles({
|
|
6318
|
+
...values,
|
|
6319
|
+
className: styles.breadcrumbHeader()
|
|
6320
|
+
}),
|
|
6321
|
+
onAction: onBack
|
|
6322
|
+
},
|
|
6323
|
+
/* @__PURE__ */ React63.createElement(InlineIcon, { icon: chevronLeft_default, className: styles.breadcrumbBackButton() }),
|
|
6324
|
+
/* @__PURE__ */ React63.createElement("span", null, label)
|
|
6325
|
+
);
|
|
6326
|
+
};
|
|
6223
6327
|
var CommandPaletteOverlay = ({
|
|
6224
6328
|
marginTop,
|
|
6225
6329
|
placeholder,
|
|
@@ -6227,28 +6331,49 @@ var CommandPaletteOverlay = ({
|
|
|
6227
6331
|
onInputChange
|
|
6228
6332
|
}) => {
|
|
6229
6333
|
const [state, dispatch] = useCommandPaletteRootContext();
|
|
6230
|
-
const [query, setQuery] = useState6("");
|
|
6231
6334
|
const styles = commandPaletteStyles();
|
|
6232
6335
|
const { overlay, dialog } = modalStyles({ kind: "dialog" });
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6336
|
+
const depth = state.levelStack.length - 1;
|
|
6337
|
+
const currentLevel = state.levelStack[depth];
|
|
6338
|
+
const levelPlaceholder = currentLevel.placeholder ?? placeholder;
|
|
6339
|
+
const menuChildren = useMemo3(() => {
|
|
6340
|
+
if (currentLevel.parentId === null) {
|
|
6341
|
+
return state.registrations.map((registration) => /* @__PURE__ */ React63.createElement(React63.Fragment, { key: registration.id }, registration.children));
|
|
6342
|
+
}
|
|
6343
|
+
return findSubCommands(state.registrations, currentLevel.parentId);
|
|
6344
|
+
}, [state.registrations, currentLevel.parentId]);
|
|
6238
6345
|
const handleOpenChange = (isOpen) => {
|
|
6346
|
+
if (!isOpen && depth > 0) {
|
|
6347
|
+
dispatch({ type: 6 /* PopLevel */ });
|
|
6348
|
+
return;
|
|
6349
|
+
}
|
|
6239
6350
|
dispatch(isOpen ? { type: 3 /* Open */ } : { type: 4 /* Close */ });
|
|
6240
6351
|
};
|
|
6241
|
-
const
|
|
6352
|
+
const handleMenuAction = (key) => {
|
|
6353
|
+
if (key === "__command-palette-back") {
|
|
6354
|
+
return;
|
|
6355
|
+
}
|
|
6356
|
+
const element = findCommandInRegistrations(state.registrations, String(key));
|
|
6357
|
+
if (element !== null && containsCommand(element.props.children)) {
|
|
6358
|
+
const props = element.props;
|
|
6359
|
+
dispatch({
|
|
6360
|
+
type: 5 /* PushLevel */,
|
|
6361
|
+
parentId: String(key),
|
|
6362
|
+
parentLabel: props.label,
|
|
6363
|
+
placeholder: props.subPlaceholder
|
|
6364
|
+
});
|
|
6365
|
+
return;
|
|
6366
|
+
}
|
|
6242
6367
|
dispatch({ type: 4 /* Close */ });
|
|
6243
6368
|
};
|
|
6244
6369
|
const handleSearchChange = (value) => {
|
|
6245
|
-
|
|
6370
|
+
dispatch({ type: 8 /* SetQuery */, query: value });
|
|
6246
6371
|
onInputChange?.(value);
|
|
6247
6372
|
};
|
|
6248
6373
|
if (!state.isOpen) {
|
|
6249
6374
|
return null;
|
|
6250
6375
|
}
|
|
6251
|
-
return /* @__PURE__ */
|
|
6376
|
+
return /* @__PURE__ */ React63.createElement(CommandPaletteQueryContext.Provider, { value: currentLevel.query }, /* @__PURE__ */ React63.createElement(
|
|
6252
6377
|
AriaModalOverlay,
|
|
6253
6378
|
{
|
|
6254
6379
|
isOpen: state.isOpen,
|
|
@@ -6256,28 +6381,35 @@ var CommandPaletteOverlay = ({
|
|
|
6256
6381
|
isDismissable: true,
|
|
6257
6382
|
className: overlay({ className: "Aquarium-CommandPalette items-start" })
|
|
6258
6383
|
},
|
|
6259
|
-
/* @__PURE__ */
|
|
6260
|
-
/* @__PURE__ */
|
|
6261
|
-
|
|
6262
|
-
{
|
|
6263
|
-
autoFocus: true,
|
|
6264
|
-
"aria-label": "Search commands",
|
|
6265
|
-
className: styles.searchContainer(),
|
|
6266
|
-
onChange: handleSearchChange
|
|
6267
|
-
},
|
|
6268
|
-
/* @__PURE__ */ React62.createElement(SearchIcon, { "aria-hidden": true }),
|
|
6269
|
-
/* @__PURE__ */ React62.createElement(AriaInput, { placeholder, className: styles.searchInput() })
|
|
6270
|
-
), /* @__PURE__ */ React62.createElement(
|
|
6271
|
-
AriaMenu2,
|
|
6384
|
+
/* @__PURE__ */ React63.createElement(Modal.BackDrop, null),
|
|
6385
|
+
/* @__PURE__ */ React63.createElement(AriaModal, { className: styles.modal(), style: marginTop ? { marginTop } : void 0 }, /* @__PURE__ */ React63.createElement(AriaDialog, { "aria-label": "Command palette", className: dialog({ className: styles.dialog() }) }, /* @__PURE__ */ React63.createElement(
|
|
6386
|
+
AriaAutocomplete,
|
|
6272
6387
|
{
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
renderEmptyState: () => /* @__PURE__ */ React62.createElement(CommandPalette.EmptyState, null, emptyState)
|
|
6388
|
+
key: depth,
|
|
6389
|
+
filter: autocompleteFilter,
|
|
6390
|
+
defaultInputValue: currentLevel.query,
|
|
6391
|
+
onInputChange: handleSearchChange
|
|
6278
6392
|
},
|
|
6279
|
-
|
|
6280
|
-
|
|
6393
|
+
/* @__PURE__ */ React63.createElement(AriaSearchField, { autoFocus: true, "aria-label": "Search commands", className: styles.searchContainer() }, /* @__PURE__ */ React63.createElement(SearchIcon, { "aria-hidden": true }), /* @__PURE__ */ React63.createElement(AriaInput, { placeholder: levelPlaceholder, className: styles.searchInput() })),
|
|
6394
|
+
/* @__PURE__ */ React63.createElement(
|
|
6395
|
+
AriaMenu2,
|
|
6396
|
+
{
|
|
6397
|
+
onAction: handleMenuAction,
|
|
6398
|
+
className: dropdownMenuStyles({
|
|
6399
|
+
className: "Aquarium-CommandPalette.List flex-1 min-h-0 p-3 overflow-y-auto"
|
|
6400
|
+
}),
|
|
6401
|
+
renderEmptyState: () => /* @__PURE__ */ React63.createElement(CommandPalette.EmptyState, null, emptyState)
|
|
6402
|
+
},
|
|
6403
|
+
depth > 0 && currentLevel.parentLabel && /* @__PURE__ */ React63.createElement(AriaMenuSection2, null, /* @__PURE__ */ React63.createElement(
|
|
6404
|
+
BackMenuItem,
|
|
6405
|
+
{
|
|
6406
|
+
label: currentLevel.parentLabel,
|
|
6407
|
+
onBack: () => dispatch({ type: 6 /* PopLevel */ })
|
|
6408
|
+
}
|
|
6409
|
+
)),
|
|
6410
|
+
menuChildren
|
|
6411
|
+
)
|
|
6412
|
+
)))
|
|
6281
6413
|
));
|
|
6282
6414
|
};
|
|
6283
6415
|
|
|
@@ -6300,35 +6432,47 @@ Commands.displayName = "CommandPalette.Commands";
|
|
|
6300
6432
|
var Section = ({ title, items, children, ...props }) => {
|
|
6301
6433
|
const groupStyles = dropdownMenuGroupStyles();
|
|
6302
6434
|
const query = useCommandPaletteQuery();
|
|
6303
|
-
const renderShell = (content) => /* @__PURE__ */
|
|
6435
|
+
const renderShell = (content) => /* @__PURE__ */ React64.createElement(AriaMenuSection3, { className: groupStyles.base({ className: "Aquarium-CommandPalette.Section" }), ...props }, title && /* @__PURE__ */ React64.createElement(AriaHeader2, { className: groupStyles.title() }, title), content);
|
|
6304
6436
|
if (items || typeof children === "function") {
|
|
6305
6437
|
return renderShell(
|
|
6306
|
-
items ? /* @__PURE__ */
|
|
6438
|
+
items ? /* @__PURE__ */ React64.createElement(AriaCollection2, { items }, children) : /* @__PURE__ */ React64.createElement(AriaCollection2, null, children)
|
|
6307
6439
|
);
|
|
6308
6440
|
}
|
|
6309
6441
|
if (!query) {
|
|
6310
|
-
return renderShell(/* @__PURE__ */
|
|
6442
|
+
return renderShell(/* @__PURE__ */ React64.createElement(AriaCollection2, null, children));
|
|
6311
6443
|
}
|
|
6312
6444
|
const ranked = rankChildren(children, query, Command);
|
|
6313
6445
|
if (ranked.length === 0) {
|
|
6314
6446
|
return null;
|
|
6315
6447
|
}
|
|
6316
|
-
return renderShell(/* @__PURE__ */
|
|
6448
|
+
return renderShell(/* @__PURE__ */ React64.createElement(AriaCollection2, null, ranked));
|
|
6317
6449
|
};
|
|
6318
6450
|
Section.displayName = "CommandPalette.Section";
|
|
6319
|
-
var Command = ({
|
|
6451
|
+
var Command = ({
|
|
6452
|
+
className,
|
|
6453
|
+
icon,
|
|
6454
|
+
label,
|
|
6455
|
+
keywords,
|
|
6456
|
+
disabled,
|
|
6457
|
+
static: isStatic,
|
|
6458
|
+
subPlaceholder: _subPlaceholder,
|
|
6459
|
+
...props
|
|
6460
|
+
}) => {
|
|
6320
6461
|
const styles = commandPaletteStyles();
|
|
6321
|
-
const
|
|
6462
|
+
const isParent = typeof props.children !== "function" && containsCommand(props.children);
|
|
6463
|
+
const textValue = props.textValue || label;
|
|
6322
6464
|
const resolvedTextValue = [textValue, ...keywords ?? []].filter(Boolean).join(FIELD_SEPARATOR);
|
|
6323
|
-
|
|
6324
|
-
|
|
6465
|
+
const { children: _children, onAction: consumerOnAction, ...restProps } = props;
|
|
6466
|
+
const ariaProps = isParent ? restProps : { ...restProps, onAction: consumerOnAction };
|
|
6467
|
+
return /* @__PURE__ */ React64.createElement(
|
|
6468
|
+
AriaMenuItem3,
|
|
6325
6469
|
{
|
|
6326
6470
|
className: (values) => dropdownMenuItemStyles({ ...values, className: ["Aquarium-CommandPalette.Item", className] }),
|
|
6327
6471
|
textValue: isStatic ? `${STATIC_ITEM_MARKER}${resolvedTextValue}` : resolvedTextValue,
|
|
6328
6472
|
isDisabled: disabled,
|
|
6329
|
-
...
|
|
6473
|
+
...ariaProps
|
|
6330
6474
|
},
|
|
6331
|
-
composeRenderProps3(props.children, (children) => /* @__PURE__ */
|
|
6475
|
+
composeRenderProps3(isParent ? void 0 : props.children, (children) => /* @__PURE__ */ React64.createElement(React64.Fragment, null, icon && /* @__PURE__ */ React64.createElement(InlineIcon, { icon, className: styles.itemIcon() }), /* @__PURE__ */ React64.createElement("span", { className: "grow" }, label || children), isParent && /* @__PURE__ */ React64.createElement(InlineIcon, { icon: chevronRight_default, className: styles.itemIcon() })))
|
|
6332
6476
|
);
|
|
6333
6477
|
};
|
|
6334
6478
|
Command.displayName = "CommandPalette.Command";
|
|
@@ -6340,9 +6484,9 @@ var CommandPalette2 = {
|
|
|
6340
6484
|
};
|
|
6341
6485
|
|
|
6342
6486
|
// src/molecules/Container/Container.tsx
|
|
6343
|
-
import
|
|
6487
|
+
import React65 from "react";
|
|
6344
6488
|
import { clsx as clsx20 } from "clsx";
|
|
6345
|
-
var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */
|
|
6489
|
+
var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React65.createElement(
|
|
6346
6490
|
Box,
|
|
6347
6491
|
{
|
|
6348
6492
|
marginLeft: "auto",
|
|
@@ -6361,23 +6505,23 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React64.crea
|
|
|
6361
6505
|
);
|
|
6362
6506
|
|
|
6363
6507
|
// src/molecules/DataList/DataList.tsx
|
|
6364
|
-
import
|
|
6508
|
+
import React83, { useRef as useRef10 } from "react";
|
|
6365
6509
|
import { useControlledState as useControlledState3 } from "@react-stately/utils";
|
|
6366
6510
|
import { clsx as clsx26 } from "clsx";
|
|
6367
6511
|
import { castArray as castArray3, compact, groupBy as groupBy2, isArray as isArray2, isFunction as isFunction3, noop as noop2 } from "lodash-es";
|
|
6368
6512
|
|
|
6369
6513
|
// src/molecules/List/List.tsx
|
|
6370
|
-
import
|
|
6514
|
+
import React70 from "react";
|
|
6371
6515
|
import { clsx as clsx23 } from "clsx";
|
|
6372
6516
|
import { isObject, isString as isString2 } from "lodash-es";
|
|
6373
6517
|
|
|
6374
6518
|
// src/molecules/Pagination/Pagination.tsx
|
|
6375
|
-
import
|
|
6519
|
+
import React68 from "react";
|
|
6376
6520
|
import { clsx as clsx22 } from "clsx";
|
|
6377
6521
|
import { clamp } from "lodash-es";
|
|
6378
6522
|
|
|
6379
6523
|
// src/molecules/Input/Input.tsx
|
|
6380
|
-
import
|
|
6524
|
+
import React66, { forwardRef, useCallback as useCallback2, useImperativeHandle, useState as useState6 } from "react";
|
|
6381
6525
|
import { useId as useId7 } from "@react-aria/utils";
|
|
6382
6526
|
import { clsx as clsx21 } from "clsx";
|
|
6383
6527
|
import { omit as omit5, toString } from "lodash-es";
|
|
@@ -6394,7 +6538,7 @@ var createInput = (displayName, opts = {}) => {
|
|
|
6394
6538
|
...props
|
|
6395
6539
|
}, ref) => {
|
|
6396
6540
|
const inputType = opts.isSearch ? "search" : opts.isFile ? "file" : type;
|
|
6397
|
-
const inputRef =
|
|
6541
|
+
const inputRef = React66.useRef(null);
|
|
6398
6542
|
useImperativeHandle(ref, () => inputRef.current);
|
|
6399
6543
|
const handleReset = (e) => {
|
|
6400
6544
|
if (opts.isFile) {
|
|
@@ -6409,7 +6553,7 @@ var createInput = (displayName, opts = {}) => {
|
|
|
6409
6553
|
el.focus();
|
|
6410
6554
|
}
|
|
6411
6555
|
};
|
|
6412
|
-
return /* @__PURE__ */
|
|
6556
|
+
return /* @__PURE__ */ React66.createElement("span", { className: "Aquarium-InputBase relative block" }, opts.adornment && /* @__PURE__ */ React66.createElement(InputAdornment, { placement: "left", className: opts.isFile ? "icon-stroke-2" : void 0 }, opts.adornment), /* @__PURE__ */ React66.createElement(
|
|
6413
6557
|
"input",
|
|
6414
6558
|
{
|
|
6415
6559
|
ref: inputRef,
|
|
@@ -6430,30 +6574,30 @@ var createInput = (displayName, opts = {}) => {
|
|
|
6430
6574
|
})
|
|
6431
6575
|
})
|
|
6432
6576
|
}
|
|
6433
|
-
), opts.canReset && (props.value ?? inputRef.current?.value) && /* @__PURE__ */
|
|
6577
|
+
), opts.canReset && (props.value ?? inputRef.current?.value) && /* @__PURE__ */ React66.createElement(InputAdornment, null, /* @__PURE__ */ React66.createElement("button", { "aria-label": "reset search", onClick: handleReset }, /* @__PURE__ */ React66.createElement(ResetIcon, null))), !opts.canReset && endAdornment && /* @__PURE__ */ React66.createElement(InputAdornment, null, endAdornment));
|
|
6434
6578
|
}
|
|
6435
6579
|
);
|
|
6436
6580
|
InputComponent.displayName = displayName;
|
|
6437
|
-
InputComponent.Skeleton = () => /* @__PURE__ */
|
|
6581
|
+
InputComponent.Skeleton = () => /* @__PURE__ */ React66.createElement(Skeleton, { height: 38 });
|
|
6438
6582
|
return InputComponent;
|
|
6439
6583
|
};
|
|
6440
6584
|
var InputBase = createInput("InputBase");
|
|
6441
6585
|
var FileInputBase = createInput("FileInputBase", {
|
|
6442
|
-
adornment: /* @__PURE__ */
|
|
6586
|
+
adornment: /* @__PURE__ */ React66.createElement(UploadIcon, null),
|
|
6443
6587
|
canReset: true,
|
|
6444
6588
|
isFile: true
|
|
6445
6589
|
});
|
|
6446
6590
|
var SearchInput = createInput("SearchInput", {
|
|
6447
|
-
adornment: /* @__PURE__ */
|
|
6591
|
+
adornment: /* @__PURE__ */ React66.createElement(SearchIcon, null),
|
|
6448
6592
|
canReset: true,
|
|
6449
6593
|
isSearch: true
|
|
6450
6594
|
});
|
|
6451
6595
|
var createInputComponent = (displayName, options = {}) => {
|
|
6452
6596
|
const InputComponentBase = options.input ?? InputBase;
|
|
6453
|
-
const InputComponent =
|
|
6597
|
+
const InputComponent = React66.forwardRef((inputProps, ref) => {
|
|
6454
6598
|
const { readOnly = false, value: valueProp, onChange: onChangeProp, ...props } = inputProps;
|
|
6455
6599
|
const isControlled = typeof valueProp !== "undefined";
|
|
6456
|
-
const [valueState, setValueState] =
|
|
6600
|
+
const [valueState, setValueState] = useState6(props.defaultValue ?? "");
|
|
6457
6601
|
const value = isControlled ? valueProp : valueState;
|
|
6458
6602
|
const handleChange = useCallback2(
|
|
6459
6603
|
(e) => {
|
|
@@ -6474,7 +6618,7 @@ var createInputComponent = (displayName, options = {}) => {
|
|
|
6474
6618
|
inputProps,
|
|
6475
6619
|
Object.keys(labelControlProps).concat(isControlled ? ["defaultValue"] : ["value"])
|
|
6476
6620
|
);
|
|
6477
|
-
return /* @__PURE__ */
|
|
6621
|
+
return /* @__PURE__ */ React66.createElement(
|
|
6478
6622
|
LabelControl,
|
|
6479
6623
|
{
|
|
6480
6624
|
id: `${id}-label`,
|
|
@@ -6484,7 +6628,7 @@ var createInputComponent = (displayName, options = {}) => {
|
|
|
6484
6628
|
...labelControlProps,
|
|
6485
6629
|
className: "Aquarium-Input"
|
|
6486
6630
|
},
|
|
6487
|
-
/* @__PURE__ */
|
|
6631
|
+
/* @__PURE__ */ React66.createElement(
|
|
6488
6632
|
InputComponentBase,
|
|
6489
6633
|
{
|
|
6490
6634
|
ref,
|
|
@@ -6507,11 +6651,11 @@ var createInputComponent = (displayName, options = {}) => {
|
|
|
6507
6651
|
};
|
|
6508
6652
|
var FileInput = createInputComponent("FileInput", { input: FileInputBase });
|
|
6509
6653
|
var Input2 = createInputComponent("Input", { input: InputBase });
|
|
6510
|
-
Input2.Skeleton = () => /* @__PURE__ */
|
|
6654
|
+
Input2.Skeleton = () => /* @__PURE__ */ React66.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React66.createElement(InputBase.Skeleton, null));
|
|
6511
6655
|
Input2.Skeleton.displayName = "Input.Skeleton";
|
|
6512
6656
|
|
|
6513
6657
|
// src/molecules/Select/Select.tsx
|
|
6514
|
-
import
|
|
6658
|
+
import React67, { useEffect as useEffect8, useRef as useRef8, useState as useState7 } from "react";
|
|
6515
6659
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
|
6516
6660
|
import { useId as useId8 } from "@react-aria/utils";
|
|
6517
6661
|
import { useSelect } from "downshift";
|
|
@@ -6519,14 +6663,14 @@ import { defaults, isNil as isNil2, omit as omit6, without } from "lodash-es";
|
|
|
6519
6663
|
var hasIconProperty = (val) => {
|
|
6520
6664
|
return typeof val === "string" || val?.icon?.body !== void 0;
|
|
6521
6665
|
};
|
|
6522
|
-
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => /* @__PURE__ */
|
|
6666
|
+
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => /* @__PURE__ */ React67.createElement(
|
|
6523
6667
|
Select.Item,
|
|
6524
6668
|
{
|
|
6525
6669
|
key: getOptionKey?.(item) ?? getValue?.(item) ?? optionToString(item),
|
|
6526
6670
|
selected: item === selectedItem,
|
|
6527
6671
|
...props
|
|
6528
6672
|
},
|
|
6529
|
-
hasIconProperty(item) && /* @__PURE__ */
|
|
6673
|
+
hasIconProperty(item) && /* @__PURE__ */ React67.createElement(InlineIcon, { icon: item.icon }),
|
|
6530
6674
|
optionToString(item)
|
|
6531
6675
|
);
|
|
6532
6676
|
var _SelectBase = (props) => {
|
|
@@ -6563,7 +6707,7 @@ var _SelectBase = (props) => {
|
|
|
6563
6707
|
children,
|
|
6564
6708
|
...rest
|
|
6565
6709
|
} = withDefaults;
|
|
6566
|
-
const [hasFocus, setFocus] =
|
|
6710
|
+
const [hasFocus, setFocus] = useState7(false);
|
|
6567
6711
|
const inputRef = useRef8(null);
|
|
6568
6712
|
const popoverRef = useRef8(null);
|
|
6569
6713
|
const targetRef = useRef8(null);
|
|
@@ -6616,15 +6760,15 @@ var _SelectBase = (props) => {
|
|
|
6616
6760
|
},
|
|
6617
6761
|
withDefaults
|
|
6618
6762
|
);
|
|
6619
|
-
const renderGroup = (group) => /* @__PURE__ */
|
|
6620
|
-
const input = /* @__PURE__ */
|
|
6763
|
+
const renderGroup = (group) => /* @__PURE__ */ React67.createElement(React67.Fragment, { key: group.label }, /* @__PURE__ */ React67.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, items.indexOf(opt))));
|
|
6764
|
+
const input = /* @__PURE__ */ React67.createElement(
|
|
6621
6765
|
Select.InputContainer,
|
|
6622
6766
|
{
|
|
6623
6767
|
...getToggleButtonProps({ disabled: disabled || readOnly, ref: targetRef }),
|
|
6624
6768
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default",
|
|
6625
6769
|
tabIndex: 0
|
|
6626
6770
|
},
|
|
6627
|
-
/* @__PURE__ */
|
|
6771
|
+
/* @__PURE__ */ React67.createElement(
|
|
6628
6772
|
Select.Input,
|
|
6629
6773
|
{
|
|
6630
6774
|
id,
|
|
@@ -6641,10 +6785,10 @@ var _SelectBase = (props) => {
|
|
|
6641
6785
|
onBlur: () => setFocus(false)
|
|
6642
6786
|
}
|
|
6643
6787
|
),
|
|
6644
|
-
!readOnly && /* @__PURE__ */
|
|
6788
|
+
!readOnly && /* @__PURE__ */ React67.createElement(Select.Toggle, { disabled, isOpen, tabIndex: -1 })
|
|
6645
6789
|
);
|
|
6646
6790
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
|
6647
|
-
return /* @__PURE__ */
|
|
6791
|
+
return /* @__PURE__ */ React67.createElement("div", { className: "Aquarium-SelectBase relative" }, input, /* @__PURE__ */ React67.createElement(
|
|
6648
6792
|
Popover,
|
|
6649
6793
|
{
|
|
6650
6794
|
ref: popoverRef,
|
|
@@ -6655,7 +6799,7 @@ var _SelectBase = (props) => {
|
|
|
6655
6799
|
isNonModal: true,
|
|
6656
6800
|
style: { width: targetRef.current?.offsetWidth }
|
|
6657
6801
|
},
|
|
6658
|
-
/* @__PURE__ */
|
|
6802
|
+
/* @__PURE__ */ React67.createElement(Select.Menu, { maxHeight, ...menuProps }, options.length === 0 && /* @__PURE__ */ React67.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !hasOptionGroups(options) && options.map(renderItem), options.length > 0 && hasOptionGroups(options) && options.map(renderGroup), actions2.length > 0 && /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(Select.Divider, { onMouseOver: () => setHighlightedIndex(-1) }), actions2.map((act, index) => /* @__PURE__ */ React67.createElement(
|
|
6659
6803
|
Select.ActionItem,
|
|
6660
6804
|
{
|
|
6661
6805
|
key: `${index}`,
|
|
@@ -6670,8 +6814,8 @@ var _SelectBase = (props) => {
|
|
|
6670
6814
|
))))
|
|
6671
6815
|
));
|
|
6672
6816
|
};
|
|
6673
|
-
var SelectBase = (props) => /* @__PURE__ */
|
|
6674
|
-
var SelectBaseSkeleton = () => /* @__PURE__ */
|
|
6817
|
+
var SelectBase = (props) => /* @__PURE__ */ React67.createElement(_SelectBase, { ...props });
|
|
6818
|
+
var SelectBaseSkeleton = () => /* @__PURE__ */ React67.createElement(Skeleton, { height: 38 });
|
|
6675
6819
|
SelectBase.Skeleton = SelectBaseSkeleton;
|
|
6676
6820
|
var Select2 = ({
|
|
6677
6821
|
options,
|
|
@@ -6683,7 +6827,7 @@ var Select2 = ({
|
|
|
6683
6827
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
6684
6828
|
const labelProps = getLabelControlProps(props);
|
|
6685
6829
|
const baseProps = omit6(props, without(Object.keys(labelProps), "required"));
|
|
6686
|
-
return /* @__PURE__ */
|
|
6830
|
+
return /* @__PURE__ */ React67.createElement(
|
|
6687
6831
|
LabelControl,
|
|
6688
6832
|
{
|
|
6689
6833
|
id: `${id}-label`,
|
|
@@ -6692,7 +6836,7 @@ var Select2 = ({
|
|
|
6692
6836
|
...labelProps,
|
|
6693
6837
|
className: "Aquarium-Select"
|
|
6694
6838
|
},
|
|
6695
|
-
/* @__PURE__ */
|
|
6839
|
+
/* @__PURE__ */ React67.createElement(
|
|
6696
6840
|
_SelectBase,
|
|
6697
6841
|
{
|
|
6698
6842
|
...baseProps,
|
|
@@ -6705,7 +6849,7 @@ var Select2 = ({
|
|
|
6705
6849
|
)
|
|
6706
6850
|
);
|
|
6707
6851
|
};
|
|
6708
|
-
var SelectSkeleton = () => /* @__PURE__ */
|
|
6852
|
+
var SelectSkeleton = () => /* @__PURE__ */ React67.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React67.createElement(SelectBase.Skeleton, null));
|
|
6709
6853
|
Select2.Skeleton = SelectSkeleton;
|
|
6710
6854
|
Select2.Skeleton.displayName = "Select.Skeleton";
|
|
6711
6855
|
|
|
@@ -6720,11 +6864,11 @@ var Pagination = ({
|
|
|
6720
6864
|
pageSizes,
|
|
6721
6865
|
onPageSizeChange
|
|
6722
6866
|
}) => {
|
|
6723
|
-
const [value, setValue] =
|
|
6724
|
-
|
|
6867
|
+
const [value, setValue] = React68.useState(currentPage);
|
|
6868
|
+
React68.useEffect(() => {
|
|
6725
6869
|
setValue(currentPage);
|
|
6726
6870
|
}, [currentPage]);
|
|
6727
|
-
return /* @__PURE__ */
|
|
6871
|
+
return /* @__PURE__ */ React68.createElement(
|
|
6728
6872
|
Box,
|
|
6729
6873
|
{
|
|
6730
6874
|
className: clsx22("Aquarium-Pagination", {
|
|
@@ -6734,7 +6878,7 @@ var Pagination = ({
|
|
|
6734
6878
|
backgroundColor: "muted",
|
|
6735
6879
|
padding: "4"
|
|
6736
6880
|
},
|
|
6737
|
-
pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */
|
|
6881
|
+
pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */ React68.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React68.createElement(Typography2.Default, { color: "muted" }, "Items per page "), /* @__PURE__ */ React68.createElement("div", { className: "max-w-[70px]" }, /* @__PURE__ */ React68.createElement(
|
|
6738
6882
|
SelectBase,
|
|
6739
6883
|
{
|
|
6740
6884
|
"aria-label": "Items per page",
|
|
@@ -6749,8 +6893,8 @@ var Pagination = ({
|
|
|
6749
6893
|
}
|
|
6750
6894
|
}
|
|
6751
6895
|
}
|
|
6752
|
-
))) : /* @__PURE__ */
|
|
6753
|
-
/* @__PURE__ */
|
|
6896
|
+
))) : /* @__PURE__ */ React68.createElement("div", null),
|
|
6897
|
+
/* @__PURE__ */ React68.createElement(Box, { display: "flex", justifyContent: "center", alignItems: "center", className: "grow" }, /* @__PURE__ */ React68.createElement(
|
|
6754
6898
|
Button2.Icon,
|
|
6755
6899
|
{
|
|
6756
6900
|
"aria-label": "First",
|
|
@@ -6758,7 +6902,7 @@ var Pagination = ({
|
|
|
6758
6902
|
icon: chevronBackward_default,
|
|
6759
6903
|
disabled: !hasPreviousPage
|
|
6760
6904
|
}
|
|
6761
|
-
), /* @__PURE__ */
|
|
6905
|
+
), /* @__PURE__ */ React68.createElement(
|
|
6762
6906
|
Button2.Icon,
|
|
6763
6907
|
{
|
|
6764
6908
|
"aria-label": "Previous",
|
|
@@ -6766,7 +6910,7 @@ var Pagination = ({
|
|
|
6766
6910
|
icon: chevronLeft_default,
|
|
6767
6911
|
disabled: !hasPreviousPage
|
|
6768
6912
|
}
|
|
6769
|
-
), /* @__PURE__ */
|
|
6913
|
+
), /* @__PURE__ */ React68.createElement(Box, { paddingX: "4" }, /* @__PURE__ */ React68.createElement(Typography2.Default, { color: "default" }, "Page")), /* @__PURE__ */ React68.createElement(
|
|
6770
6914
|
InputBase,
|
|
6771
6915
|
{
|
|
6772
6916
|
"aria-label": "Page",
|
|
@@ -6787,7 +6931,7 @@ var Pagination = ({
|
|
|
6787
6931
|
onPageChange(newPage);
|
|
6788
6932
|
}
|
|
6789
6933
|
}
|
|
6790
|
-
), /* @__PURE__ */
|
|
6934
|
+
), /* @__PURE__ */ React68.createElement(Box, { paddingX: "4" }, /* @__PURE__ */ React68.createElement(Typography2.Default, { color: "default" }, "of ", totalPages)), /* @__PURE__ */ React68.createElement(
|
|
6791
6935
|
Button2.Icon,
|
|
6792
6936
|
{
|
|
6793
6937
|
"aria-label": "Next",
|
|
@@ -6795,7 +6939,7 @@ var Pagination = ({
|
|
|
6795
6939
|
icon: chevronRight_default,
|
|
6796
6940
|
disabled: !hasNextPage
|
|
6797
6941
|
}
|
|
6798
|
-
), /* @__PURE__ */
|
|
6942
|
+
), /* @__PURE__ */ React68.createElement(
|
|
6799
6943
|
Button2.Icon,
|
|
6800
6944
|
{
|
|
6801
6945
|
"aria-label": "Last",
|
|
@@ -6804,12 +6948,12 @@ var Pagination = ({
|
|
|
6804
6948
|
disabled: !hasNextPage
|
|
6805
6949
|
}
|
|
6806
6950
|
)),
|
|
6807
|
-
pageSizes && /* @__PURE__ */
|
|
6951
|
+
pageSizes && /* @__PURE__ */ React68.createElement("div", null)
|
|
6808
6952
|
);
|
|
6809
6953
|
};
|
|
6810
6954
|
|
|
6811
6955
|
// src/molecules/Pagination/usePagination.tsx
|
|
6812
|
-
import { useEffect as useEffect9, useState as
|
|
6956
|
+
import { useEffect as useEffect9, useState as useState8 } from "react";
|
|
6813
6957
|
import { clamp as clamp2 } from "lodash-es";
|
|
6814
6958
|
var initialState = {
|
|
6815
6959
|
currentPage: 1,
|
|
@@ -6817,8 +6961,8 @@ var initialState = {
|
|
|
6817
6961
|
};
|
|
6818
6962
|
var getPageIndex = (currentPage, pageSize) => currentPage === 0 ? 0 : (currentPage - 1) * pageSize;
|
|
6819
6963
|
var usePagination = (items, options) => {
|
|
6820
|
-
const [currentPage, setCurrentPage] =
|
|
6821
|
-
const [pageSize, setPageSize] =
|
|
6964
|
+
const [currentPage, setCurrentPage] = useState8(options?.initialPage ?? initialState.currentPage);
|
|
6965
|
+
const [pageSize, setPageSize] = useState8(options?.initialPageSize ?? initialState.pageSize);
|
|
6822
6966
|
const totalPages = items.length > 0 ? Math.ceil(items.length / pageSize) : 1;
|
|
6823
6967
|
const hasPreviousPage = currentPage > 1;
|
|
6824
6968
|
const hasNextPage = currentPage < totalPages;
|
|
@@ -6846,7 +6990,7 @@ var usePagination = (items, options) => {
|
|
|
6846
6990
|
};
|
|
6847
6991
|
|
|
6848
6992
|
// src/utils/useInView.ts
|
|
6849
|
-
import
|
|
6993
|
+
import React69 from "react";
|
|
6850
6994
|
var useInView = ({
|
|
6851
6995
|
onChange,
|
|
6852
6996
|
skip,
|
|
@@ -6854,12 +6998,12 @@ var useInView = ({
|
|
|
6854
6998
|
rootMargin,
|
|
6855
6999
|
threshold = 0
|
|
6856
7000
|
}) => {
|
|
6857
|
-
const ref =
|
|
6858
|
-
const [state, setState] =
|
|
7001
|
+
const ref = React69.useRef(null);
|
|
7002
|
+
const [state, setState] = React69.useState({
|
|
6859
7003
|
inView: false,
|
|
6860
7004
|
entry: void 0
|
|
6861
7005
|
});
|
|
6862
|
-
|
|
7006
|
+
React69.useEffect(() => {
|
|
6863
7007
|
const target = ref.current;
|
|
6864
7008
|
if (skip || !target) {
|
|
6865
7009
|
return;
|
|
@@ -6891,8 +7035,8 @@ var useInView = ({
|
|
|
6891
7035
|
var List = ({
|
|
6892
7036
|
items,
|
|
6893
7037
|
renderItem,
|
|
6894
|
-
container: container2 =
|
|
6895
|
-
paginationContainer =
|
|
7038
|
+
container: container2 = React70.Fragment,
|
|
7039
|
+
paginationContainer = React70.Fragment,
|
|
6896
7040
|
pagination,
|
|
6897
7041
|
loadingIndicator = "Loading more items",
|
|
6898
7042
|
hasMore,
|
|
@@ -6903,7 +7047,7 @@ var List = ({
|
|
|
6903
7047
|
const Component = container2;
|
|
6904
7048
|
const PaginationComponent = paginationContainer;
|
|
6905
7049
|
const paginationProps = isObject(pagination) ? pagination : void 0;
|
|
6906
|
-
const onChange =
|
|
7050
|
+
const onChange = React70.useCallback(
|
|
6907
7051
|
(inView) => {
|
|
6908
7052
|
if (inView && hasMore && !isLoading) {
|
|
6909
7053
|
next();
|
|
@@ -6922,7 +7066,7 @@ var List = ({
|
|
|
6922
7066
|
const listItems = pagination ? paginatedItems : items;
|
|
6923
7067
|
const showLoader = isInfinite && hasMore;
|
|
6924
7068
|
const showPagination = pagination || showLoader;
|
|
6925
|
-
return /* @__PURE__ */
|
|
7069
|
+
return /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(Component, null, listItems.map(renderItem)), showPagination && /* @__PURE__ */ React70.createElement(PaginationComponent, null, showLoader && /* @__PURE__ */ React70.createElement(
|
|
6926
7070
|
"div",
|
|
6927
7071
|
{
|
|
6928
7072
|
ref,
|
|
@@ -6934,21 +7078,21 @@ var List = ({
|
|
|
6934
7078
|
isLoading ? "opacity-100" : "opacity-0"
|
|
6935
7079
|
)
|
|
6936
7080
|
},
|
|
6937
|
-
/* @__PURE__ */
|
|
6938
|
-
/* @__PURE__ */
|
|
6939
|
-
), pagination && /* @__PURE__ */
|
|
7081
|
+
/* @__PURE__ */ React70.createElement(Icon, { width: 22, icon: loading_default, className: "text-muted" }),
|
|
7082
|
+
/* @__PURE__ */ React70.createElement(Typography2.Default, { color: "default" }, loadingIndicator)
|
|
7083
|
+
), pagination && /* @__PURE__ */ React70.createElement(Pagination, { ...paginationState, ...paginationProps })));
|
|
6940
7084
|
};
|
|
6941
7085
|
|
|
6942
7086
|
// src/atoms/DataList/DataList.tsx
|
|
6943
|
-
import
|
|
7087
|
+
import React72 from "react";
|
|
6944
7088
|
import { clsx as clsx25 } from "clsx";
|
|
6945
7089
|
import { tv as tv19 } from "tailwind-variants";
|
|
6946
7090
|
|
|
6947
7091
|
// src/atoms/Table/Table.tsx
|
|
6948
|
-
import
|
|
7092
|
+
import React71 from "react";
|
|
6949
7093
|
import { clsx as clsx24 } from "clsx";
|
|
6950
7094
|
import { tv as tv18 } from "tailwind-variants";
|
|
6951
|
-
var HeadContext =
|
|
7095
|
+
var HeadContext = React71.createContext(null);
|
|
6952
7096
|
var tableClasses = tv18({
|
|
6953
7097
|
base: "w-full relative typography-default border-spacing-0 border-separate"
|
|
6954
7098
|
});
|
|
@@ -7059,11 +7203,11 @@ var sortCellIconsContainerClasses = tv18({
|
|
|
7059
7203
|
}
|
|
7060
7204
|
});
|
|
7061
7205
|
var Table = ({ children, ariaLabel, className, ...rest }) => {
|
|
7062
|
-
return /* @__PURE__ */
|
|
7206
|
+
return /* @__PURE__ */ React71.createElement("table", { ...rest, className: tableClasses({ className }), "aria-label": ariaLabel }, children);
|
|
7063
7207
|
};
|
|
7064
|
-
var TableHead = ({ children, sticky, ...rest }) => /* @__PURE__ */
|
|
7065
|
-
var TableBody = ({ children, ...rest }) => /* @__PURE__ */
|
|
7066
|
-
var TableRow = ({ children, className, disabled = false, ...rest }) => /* @__PURE__ */
|
|
7208
|
+
var TableHead = ({ children, sticky, ...rest }) => /* @__PURE__ */ React71.createElement("thead", { ...rest }, /* @__PURE__ */ React71.createElement("tr", null, /* @__PURE__ */ React71.createElement(HeadContext.Provider, { value: { children, sticky } }, children)));
|
|
7209
|
+
var TableBody = ({ children, ...rest }) => /* @__PURE__ */ React71.createElement("tbody", { ...rest }, children);
|
|
7210
|
+
var TableRow = ({ children, className, disabled = false, ...rest }) => /* @__PURE__ */ React71.createElement(
|
|
7067
7211
|
"tr",
|
|
7068
7212
|
{
|
|
7069
7213
|
...rest,
|
|
@@ -7075,10 +7219,10 @@ var TableRow = ({ children, className, disabled = false, ...rest }) => /* @__PUR
|
|
|
7075
7219
|
var getBodyCellClassNames = (table = true, stickyColumn) => bodyCellClasses({ table, stickyColumn });
|
|
7076
7220
|
var getAlignClassNames = (align) => alignClasses({ align });
|
|
7077
7221
|
var getHeadCellClassNames = (sticky = true, stickyColumn) => headCellClasses({ sticky, stickyColumn });
|
|
7078
|
-
var TableCell =
|
|
7222
|
+
var TableCell = React71.forwardRef(
|
|
7079
7223
|
({ children, className, stickyColumn, align = "left", ...rest }, ref) => {
|
|
7080
|
-
const headContext =
|
|
7081
|
-
return headContext ? /* @__PURE__ */
|
|
7224
|
+
const headContext = React71.useContext(HeadContext);
|
|
7225
|
+
return headContext ? /* @__PURE__ */ React71.createElement(
|
|
7082
7226
|
"th",
|
|
7083
7227
|
{
|
|
7084
7228
|
...rest,
|
|
@@ -7091,7 +7235,7 @@ var TableCell = React70.forwardRef(
|
|
|
7091
7235
|
)
|
|
7092
7236
|
},
|
|
7093
7237
|
children
|
|
7094
|
-
) : /* @__PURE__ */
|
|
7238
|
+
) : /* @__PURE__ */ React71.createElement(
|
|
7095
7239
|
"td",
|
|
7096
7240
|
{
|
|
7097
7241
|
...rest,
|
|
@@ -7108,21 +7252,21 @@ var TableCell = React70.forwardRef(
|
|
|
7108
7252
|
}
|
|
7109
7253
|
);
|
|
7110
7254
|
var TableSelectCell = ({ ariaLabel, ...props }) => {
|
|
7111
|
-
return /* @__PURE__ */
|
|
7255
|
+
return /* @__PURE__ */ React71.createElement(Table.Cell, { className: "leading-[0px]" }, props.type === "radio" ? /* @__PURE__ */ React71.createElement(RadioButton, { "aria-label": ariaLabel, ...props }) : /* @__PURE__ */ React71.createElement(Checkbox, { "aria-label": ariaLabel, ...props }));
|
|
7112
7256
|
};
|
|
7113
7257
|
var getSortCellButtonClassNames = (align) => sortCellButtonClasses({ align });
|
|
7114
7258
|
var getSortCellIconClassNames = (active) => sortCellIconClasses({ active });
|
|
7115
|
-
var TableSortCell =
|
|
7116
|
-
({ children, direction = "none", onClick, ...rest }, ref) => /* @__PURE__ */
|
|
7259
|
+
var TableSortCell = React71.forwardRef(
|
|
7260
|
+
({ children, direction = "none", onClick, ...rest }, ref) => /* @__PURE__ */ React71.createElement(Table.Cell, { ...rest, "aria-sort": direction, ref }, /* @__PURE__ */ React71.createElement("span", { className: getSortCellButtonClassNames(rest.align), role: "button", tabIndex: -1, onClick }, children, /* @__PURE__ */ React71.createElement("div", { "data-sort-icons": true, className: sortCellIconsContainerClasses({ direction }) }, /* @__PURE__ */ React71.createElement(InlineIcon, { icon: chevronUp_default, className: getSortCellIconClassNames(direction === "ascending") }), /* @__PURE__ */ React71.createElement(InlineIcon, { icon: chevronDown_default, className: getSortCellIconClassNames(direction === "descending") }))))
|
|
7117
7261
|
);
|
|
7118
|
-
var Caption = ({ children }) => /* @__PURE__ */
|
|
7119
|
-
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
|
7120
|
-
Table.Head =
|
|
7121
|
-
Table.Body =
|
|
7122
|
-
Table.Row =
|
|
7123
|
-
Table.Cell =
|
|
7124
|
-
Table.SortCell =
|
|
7125
|
-
Table.SelectCell =
|
|
7262
|
+
var Caption = ({ children }) => /* @__PURE__ */ React71.createElement(Typography2.Small, { htmlTag: "caption" }, children);
|
|
7263
|
+
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React71.createElement("div", { className: "flex gap-4 items-center" }, image && /* @__PURE__ */ React71.createElement("img", { src: image, alt: imageAlt ?? "", style: { width: imageSize, height: imageSize } }), /* @__PURE__ */ React71.createElement("div", null, title, caption && /* @__PURE__ */ React71.createElement(Typography2.Small, null, caption)));
|
|
7264
|
+
Table.Head = React71.memo(TableHead);
|
|
7265
|
+
Table.Body = React71.memo(TableBody);
|
|
7266
|
+
Table.Row = React71.memo(TableRow);
|
|
7267
|
+
Table.Cell = React71.memo(TableCell);
|
|
7268
|
+
Table.SortCell = React71.memo(TableSortCell);
|
|
7269
|
+
Table.SelectCell = React71.memo(TableSelectCell);
|
|
7126
7270
|
Table.Caption = Caption;
|
|
7127
7271
|
|
|
7128
7272
|
// src/atoms/DataList/DataList.tsx
|
|
@@ -7222,15 +7366,15 @@ var toolbarSelectionCountClasses = tv19({
|
|
|
7222
7366
|
var emptyGroupClasses = tv19({
|
|
7223
7367
|
base: "flex gap-3 items-center"
|
|
7224
7368
|
});
|
|
7225
|
-
var DataList = ({ className, ...rest }) => /* @__PURE__ */
|
|
7226
|
-
var TreeLine = ({ className, style, isLast = false, ...rest }) => /* @__PURE__ */
|
|
7369
|
+
var DataList = ({ className, ...rest }) => /* @__PURE__ */ React72.createElement("div", { ...rest });
|
|
7370
|
+
var TreeLine = ({ className, style, isLast = false, ...rest }) => /* @__PURE__ */ React72.createElement("div", { ...rest, className: clsx25(treeLineClasses(), className) }, /* @__PURE__ */ React72.createElement("div", { className: treeLineInnerClasses({ isLast }) }), /* @__PURE__ */ React72.createElement("div", { className: "border-t border-default border-dashed self-center w-[18px]" }));
|
|
7227
7371
|
var HeadCell = ({
|
|
7228
7372
|
className,
|
|
7229
7373
|
sticky,
|
|
7230
7374
|
align,
|
|
7231
7375
|
stickyColumn,
|
|
7232
7376
|
...rest
|
|
7233
|
-
}) => /* @__PURE__ */
|
|
7377
|
+
}) => /* @__PURE__ */ React72.createElement(
|
|
7234
7378
|
"div",
|
|
7235
7379
|
{
|
|
7236
7380
|
role: "columnheader",
|
|
@@ -7243,7 +7387,7 @@ var Cell = ({
|
|
|
7243
7387
|
align,
|
|
7244
7388
|
stickyColumn,
|
|
7245
7389
|
...rest
|
|
7246
|
-
}) => /* @__PURE__ */
|
|
7390
|
+
}) => /* @__PURE__ */ React72.createElement(
|
|
7247
7391
|
"div",
|
|
7248
7392
|
{
|
|
7249
7393
|
...rest,
|
|
@@ -7266,7 +7410,7 @@ var Row = ({
|
|
|
7266
7410
|
noDivider = false,
|
|
7267
7411
|
...rest
|
|
7268
7412
|
}) => {
|
|
7269
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ React72.createElement(
|
|
7270
7414
|
"div",
|
|
7271
7415
|
{
|
|
7272
7416
|
...rest,
|
|
@@ -7284,9 +7428,9 @@ var Row = ({
|
|
|
7284
7428
|
}
|
|
7285
7429
|
);
|
|
7286
7430
|
};
|
|
7287
|
-
var SubGroupSpacing = ({ className, divider = false, ...rest }) => /* @__PURE__ */
|
|
7288
|
-
var SortCell = ({ children, direction = "none", onClick, sticky, ...rest }) => /* @__PURE__ */
|
|
7289
|
-
var EmptyGroup = ({ icon, children }) => /* @__PURE__ */
|
|
7431
|
+
var SubGroupSpacing = ({ className, divider = false, ...rest }) => /* @__PURE__ */ React72.createElement("span", { ...rest, "aria-hidden": true, className: clsx25(subGroupSpacingClasses({ divider }), className) });
|
|
7432
|
+
var SortCell = ({ children, direction = "none", onClick, sticky, ...rest }) => /* @__PURE__ */ React72.createElement(HeadCell, { ...rest, "aria-sort": direction, role: "columnheader", sticky }, /* @__PURE__ */ React72.createElement("span", { className: getSortCellButtonClassNames(rest.align), role: "button", tabIndex: -1, onClick }, children, /* @__PURE__ */ React72.createElement("div", { "data-sort-icons": true, className: sortCellIconsClasses({ direction }) }, /* @__PURE__ */ React72.createElement(InlineIcon, { icon: chevronUp_default, className: getSortCellIconClassNames(direction === "ascending") }), /* @__PURE__ */ React72.createElement(InlineIcon, { icon: chevronDown_default, className: getSortCellIconClassNames(direction === "descending") }))));
|
|
7433
|
+
var EmptyGroup = ({ icon, children }) => /* @__PURE__ */ React72.createElement("div", { className: emptyGroupClasses() }, icon && /* @__PURE__ */ React72.createElement(Icon, { icon, width: 18 }), children);
|
|
7290
7434
|
DataList.EmptyGroup = EmptyGroup;
|
|
7291
7435
|
DataList.EmptyGroup.displayName = "DataList.EmptyGroup";
|
|
7292
7436
|
DataList.HeadCell = HeadCell;
|
|
@@ -7301,12 +7445,12 @@ DataList.Row = Row;
|
|
|
7301
7445
|
DataList.Row.displayName = "DataList.Row";
|
|
7302
7446
|
DataList.TreeLine = TreeLine;
|
|
7303
7447
|
DataList.TreeLine.displayName = "DataList.TreeLine";
|
|
7304
|
-
var ToolbarContainer = ({ className, sticky = true, ...rest }) => /* @__PURE__ */
|
|
7448
|
+
var ToolbarContainer = ({ className, sticky = true, ...rest }) => /* @__PURE__ */ React72.createElement("div", { ...rest, role: "row", className: clsx25(toolbarContainerClasses({ sticky }), className) });
|
|
7305
7449
|
ToolbarContainer.displayName = "DataList.Toolbar.Container";
|
|
7306
|
-
var ToolbarGroup = ({ className, ...rest }) => /* @__PURE__ */
|
|
7450
|
+
var ToolbarGroup = ({ className, ...rest }) => /* @__PURE__ */ React72.createElement("div", { role: "cell", ...rest, className: clsx25(toolbarGroupClasses(), className) });
|
|
7307
7451
|
ToolbarGroup.displayName = "DataList.Toolbar.Group";
|
|
7308
|
-
var ToolbarSelectionCount = ({ className, ...rest }) => /* @__PURE__ */
|
|
7309
|
-
var ToolbarActions = ({ className, ...rest }) => /* @__PURE__ */
|
|
7452
|
+
var ToolbarSelectionCount = ({ className, ...rest }) => /* @__PURE__ */ React72.createElement(Typography, { variant: "default", color: "muted", className: clsx25(toolbarSelectionCountClasses(), className), ...rest });
|
|
7453
|
+
var ToolbarActions = ({ className, ...rest }) => /* @__PURE__ */ React72.createElement("div", { ...rest, className: clsx25(toolbarActionsClasses(), className) });
|
|
7310
7454
|
ToolbarActions.displayName = "DataList.Toolbar.Actions";
|
|
7311
7455
|
DataList.Toolbar = {
|
|
7312
7456
|
Container: ToolbarContainer,
|
|
@@ -7316,11 +7460,11 @@ DataList.Toolbar = {
|
|
|
7316
7460
|
};
|
|
7317
7461
|
|
|
7318
7462
|
// src/utils/stickyStyles.tsx
|
|
7319
|
-
import
|
|
7463
|
+
import React73, { useCallback as useCallback3, useLayoutEffect as useLayoutEffect2, useMemo as useMemo4, useRef as useRef9, useState as useState9 } from "react";
|
|
7320
7464
|
import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
|
|
7321
7465
|
import { throttle } from "lodash-es";
|
|
7322
7466
|
function useStickyStyles(scrollProgress, axis, { borderColor, boxShadowColor }) {
|
|
7323
|
-
const { startValue, endValue } =
|
|
7467
|
+
const { startValue, endValue } = useMemo4(() => {
|
|
7324
7468
|
if (scrollProgress === null) {
|
|
7325
7469
|
return { startValue: 0, endValue: 0 };
|
|
7326
7470
|
}
|
|
@@ -7367,9 +7511,9 @@ function useScrollProgress({
|
|
|
7367
7511
|
skip,
|
|
7368
7512
|
throttleMs = 50
|
|
7369
7513
|
}) {
|
|
7370
|
-
const [scrollState, setScrollState] =
|
|
7514
|
+
const [scrollState, setScrollState] = useState9(null);
|
|
7371
7515
|
const currentStateRef = useRef9(null);
|
|
7372
|
-
const throttledSetScrollState =
|
|
7516
|
+
const throttledSetScrollState = useMemo4(
|
|
7373
7517
|
() => throttle((value) => {
|
|
7374
7518
|
const currentState = currentStateRef.current;
|
|
7375
7519
|
if (currentState?.scrollX === value.scrollX && currentState.scrollXProgress === value.scrollXProgress) {
|
|
@@ -7423,7 +7567,7 @@ function createAnimatedCell({
|
|
|
7423
7567
|
return cellElement;
|
|
7424
7568
|
}
|
|
7425
7569
|
const AnimatedCell = animated4(cellElement.type);
|
|
7426
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ React73.createElement(
|
|
7427
7571
|
AnimatedCell,
|
|
7428
7572
|
{
|
|
7429
7573
|
...cellElement.props,
|
|
@@ -7481,10 +7625,10 @@ function isOnSortChangedDirection(value) {
|
|
|
7481
7625
|
}
|
|
7482
7626
|
|
|
7483
7627
|
// src/utils/table/useTableSort.tsx
|
|
7484
|
-
import
|
|
7628
|
+
import React74 from "react";
|
|
7485
7629
|
var useTableSort = ({ column, direction, onSortChanged } = {}) => {
|
|
7486
7630
|
const defaultSort = column ? { column, direction } : void 0;
|
|
7487
|
-
const [sort, setSort] =
|
|
7631
|
+
const [sort, setSort] = React74.useState(defaultSort);
|
|
7488
7632
|
const setSortAndEmitOnSortChangedEvent = (sort2) => {
|
|
7489
7633
|
setSort(sort2);
|
|
7490
7634
|
if (onSortChanged) {
|
|
@@ -7525,11 +7669,11 @@ var sortRowsBy = (rows, sort) => {
|
|
|
7525
7669
|
};
|
|
7526
7670
|
|
|
7527
7671
|
// src/molecules/DataList/DataListComponents.tsx
|
|
7528
|
-
import
|
|
7672
|
+
import React79 from "react";
|
|
7529
7673
|
import { isFunction } from "lodash-es";
|
|
7530
7674
|
|
|
7531
7675
|
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
|
7532
|
-
import
|
|
7676
|
+
import React78, { createContext as createContext4, useContext as useContext7 } from "react";
|
|
7533
7677
|
import {
|
|
7534
7678
|
Autocomplete as AriaAutocomplete2,
|
|
7535
7679
|
MenuTrigger as AriaMenuTrigger,
|
|
@@ -7537,14 +7681,14 @@ import {
|
|
|
7537
7681
|
} from "react-aria-components";
|
|
7538
7682
|
|
|
7539
7683
|
// src/atoms/Pressable/Pressable.tsx
|
|
7540
|
-
import
|
|
7684
|
+
import React75 from "react";
|
|
7541
7685
|
import { usePress } from "@react-aria/interactions";
|
|
7542
7686
|
import { mergeProps as mergeProps2, useObjectRef } from "@react-aria/utils";
|
|
7543
|
-
var Pressable =
|
|
7687
|
+
var Pressable = React75.forwardRef(({ children, ...props }, ref) => {
|
|
7544
7688
|
ref = useObjectRef(ref);
|
|
7545
7689
|
const { pressProps } = usePress({ ...props, ref });
|
|
7546
|
-
const child =
|
|
7547
|
-
return
|
|
7690
|
+
const child = React75.Children.only(children);
|
|
7691
|
+
return React75.cloneElement(
|
|
7548
7692
|
child,
|
|
7549
7693
|
// @ts-expect-error: Not sure if it's possible to type ref correctly in this case.
|
|
7550
7694
|
{ ref, ...mergeProps2(child.props, pressProps) }
|
|
@@ -7552,7 +7696,7 @@ var Pressable = React74.forwardRef(({ children, ...props }, ref) => {
|
|
|
7552
7696
|
});
|
|
7553
7697
|
|
|
7554
7698
|
// src/molecules/DropdownMenu/SearchField.tsx
|
|
7555
|
-
import
|
|
7699
|
+
import React77 from "react";
|
|
7556
7700
|
import {
|
|
7557
7701
|
Button as AriaButton,
|
|
7558
7702
|
Input as AriaInput2,
|
|
@@ -7560,7 +7704,7 @@ import {
|
|
|
7560
7704
|
} from "react-aria-components";
|
|
7561
7705
|
|
|
7562
7706
|
// src/atoms/Field/Field.tsx
|
|
7563
|
-
import
|
|
7707
|
+
import React76 from "react";
|
|
7564
7708
|
import { Group as Group3 } from "react-aria-components";
|
|
7565
7709
|
|
|
7566
7710
|
// src/atoms/utils/index.ts
|
|
@@ -7598,23 +7742,23 @@ var fieldGroup = tv20({
|
|
|
7598
7742
|
|
|
7599
7743
|
// src/atoms/Field/Field.tsx
|
|
7600
7744
|
var FieldGroup = (props) => {
|
|
7601
|
-
return /* @__PURE__ */
|
|
7745
|
+
return /* @__PURE__ */ React76.createElement(Group3, { ...props, className: (renderProps) => fieldGroup(renderProps) });
|
|
7602
7746
|
};
|
|
7603
7747
|
|
|
7604
7748
|
// src/molecules/DropdownMenu/SearchField.tsx
|
|
7605
7749
|
var SearchField = (props) => {
|
|
7606
|
-
return /* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ React77.createElement(AriaSearchField2, { ...props }, /* @__PURE__ */ React77.createElement(FieldGroup, null, /* @__PURE__ */ React77.createElement(SearchIcon, { "aria-hidden": true }), /* @__PURE__ */ React77.createElement(AriaInput2, { className: "outline-none grow bg-transparent [&::-webkit-search-cancel-button]:hidden" }), /* @__PURE__ */ React77.createElement(AriaButton, { "aria-label": "Clear", className: "group-empty:invisible" }, /* @__PURE__ */ React77.createElement(ResetIcon, { "aria-hidden": true }))));
|
|
7607
7751
|
};
|
|
7608
7752
|
|
|
7609
7753
|
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
|
7610
7754
|
var MenuPropsContext = createContext4({});
|
|
7611
7755
|
var DropdownMenu2 = (props) => {
|
|
7612
|
-
return /* @__PURE__ */
|
|
7756
|
+
return /* @__PURE__ */ React78.createElement(MenuPropsContext.Provider, { value: props }, /* @__PURE__ */ React78.createElement(AriaMenuTrigger, { defaultOpen: props.defaultOpen, isOpen: props.isOpen, onOpenChange: props.onOpenChange }, props.children));
|
|
7613
7757
|
};
|
|
7614
7758
|
DropdownMenu2.displayName = "DropdownMenu";
|
|
7615
7759
|
var MenuTrigger = ({ children }) => {
|
|
7616
7760
|
const props = useContext7(MenuPropsContext);
|
|
7617
|
-
return /* @__PURE__ */
|
|
7761
|
+
return /* @__PURE__ */ React78.createElement(Pressable, { "aria-haspopup": "true", isDisabled: props.disabled }, children);
|
|
7618
7762
|
};
|
|
7619
7763
|
DropdownMenu2.Trigger = MenuTrigger;
|
|
7620
7764
|
DropdownMenu2.Trigger.displayName = "DropdownMenu.Trigger";
|
|
@@ -7622,18 +7766,18 @@ var MenuItems = ({ children }) => {
|
|
|
7622
7766
|
const props = useContext7(MenuPropsContext);
|
|
7623
7767
|
const { contains } = useFilter({ sensitivity: "base" });
|
|
7624
7768
|
const childrenWithIds = mapKeyToId(children);
|
|
7625
|
-
const baseContent = /* @__PURE__ */
|
|
7769
|
+
const baseContent = /* @__PURE__ */ React78.createElement(
|
|
7626
7770
|
DropdownMenu,
|
|
7627
7771
|
{
|
|
7628
7772
|
onAction: props.onAction,
|
|
7629
7773
|
onSelectionChange: props.onSelectionChange,
|
|
7630
7774
|
selectedKeys: props.selection,
|
|
7631
7775
|
selectionMode: props.selectionMode,
|
|
7632
|
-
renderEmptyState: () => /* @__PURE__ */
|
|
7776
|
+
renderEmptyState: () => /* @__PURE__ */ React78.createElement(DropdownMenu.EmptyStateContainer, null, props.emptyState)
|
|
7633
7777
|
},
|
|
7634
7778
|
childrenWithIds
|
|
7635
7779
|
);
|
|
7636
|
-
return /* @__PURE__ */
|
|
7780
|
+
return /* @__PURE__ */ React78.createElement(Popover, { placement: props.placement }, /* @__PURE__ */ React78.createElement(
|
|
7637
7781
|
DropdownMenu.MenuContainer,
|
|
7638
7782
|
{
|
|
7639
7783
|
minHeight: props.minHeight,
|
|
@@ -7642,7 +7786,7 @@ var MenuItems = ({ children }) => {
|
|
|
7642
7786
|
maxWidth: props.maxWidth
|
|
7643
7787
|
},
|
|
7644
7788
|
props.header,
|
|
7645
|
-
/* @__PURE__ */
|
|
7789
|
+
/* @__PURE__ */ React78.createElement(DropdownMenu.ScrollableContentContainer, null, props.searchable && /* @__PURE__ */ React78.createElement(AriaAutocomplete2, { filter: contains }, /* @__PURE__ */ React78.createElement(SearchField, { "aria-label": "Search menu items", className: "mb-5" }), baseContent), !props.searchable && baseContent),
|
|
7646
7790
|
props.footer
|
|
7647
7791
|
));
|
|
7648
7792
|
};
|
|
@@ -7650,26 +7794,26 @@ DropdownMenu2.Items = MenuItems;
|
|
|
7650
7794
|
DropdownMenu2.Items.displayName = "DropdownMenu.Items";
|
|
7651
7795
|
var MenuItem = (props) => {
|
|
7652
7796
|
const textValue = props.textValue || (typeof props.children === "string" ? props.children : void 0);
|
|
7653
|
-
return /* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ React78.createElement(DropdownMenu.Item, { textValue, ...props });
|
|
7654
7798
|
};
|
|
7655
7799
|
DropdownMenu2.Item = MenuItem;
|
|
7656
7800
|
DropdownMenu2.Item.displayName = "DropdownMenu.Item";
|
|
7657
7801
|
var MenuSection = ({ children, ...props }) => {
|
|
7658
7802
|
const childrenWithIds = mapKeyToId(children);
|
|
7659
|
-
return /* @__PURE__ */
|
|
7803
|
+
return /* @__PURE__ */ React78.createElement(DropdownMenu.Group, { ...props }, childrenWithIds);
|
|
7660
7804
|
};
|
|
7661
7805
|
DropdownMenu2.Section = MenuSection;
|
|
7662
7806
|
DropdownMenu2.Section.displayName = "DropdownMenu.Section";
|
|
7663
7807
|
var mapKeyToId = (children) => {
|
|
7664
|
-
return
|
|
7808
|
+
return React78.Children.map(children, (child) => {
|
|
7665
7809
|
if (typeof child === "boolean" || child === null || child === void 0) {
|
|
7666
7810
|
return child;
|
|
7667
7811
|
}
|
|
7668
|
-
if (
|
|
7812
|
+
if (React78.isValidElement(child) && child.type === React78.Fragment) {
|
|
7669
7813
|
return mapKeyToId(child.props.children);
|
|
7670
7814
|
}
|
|
7671
7815
|
if (isComponentType(child, MenuItem)) {
|
|
7672
|
-
return
|
|
7816
|
+
return React78.cloneElement(child, { id: child.props.id ?? child.key ?? void 0 });
|
|
7673
7817
|
}
|
|
7674
7818
|
return child;
|
|
7675
7819
|
});
|
|
@@ -7698,14 +7842,14 @@ var DataListRowMenu = ({
|
|
|
7698
7842
|
return null;
|
|
7699
7843
|
}
|
|
7700
7844
|
const menuContent = isFunction(menu) ? menu(row, index) : menu;
|
|
7701
|
-
return /* @__PURE__ */
|
|
7845
|
+
return /* @__PURE__ */ React79.createElement(DataList.Cell, { align: "right" }, menuContent && /* @__PURE__ */ React79.createElement(
|
|
7702
7846
|
DropdownMenu2,
|
|
7703
7847
|
{
|
|
7704
7848
|
placement: defaultContextualMenuPlacement,
|
|
7705
7849
|
onAction: (action) => onAction?.(action, row, index),
|
|
7706
7850
|
onOpenChange: onMenuOpenChange
|
|
7707
7851
|
},
|
|
7708
|
-
/* @__PURE__ */
|
|
7852
|
+
/* @__PURE__ */ React79.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React79.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: more_default, disabled })),
|
|
7709
7853
|
menuContent
|
|
7710
7854
|
));
|
|
7711
7855
|
};
|
|
@@ -7734,7 +7878,7 @@ var DataListRow = ({
|
|
|
7734
7878
|
...resolvedAdditionalRowProps.style ?? {},
|
|
7735
7879
|
cursor: isRowClickable ? "pointer" : void 0
|
|
7736
7880
|
};
|
|
7737
|
-
return /* @__PURE__ */
|
|
7881
|
+
return /* @__PURE__ */ React79.createElement(
|
|
7738
7882
|
DataList.Row,
|
|
7739
7883
|
{
|
|
7740
7884
|
key: row.id,
|
|
@@ -7746,12 +7890,12 @@ var DataListRow = ({
|
|
|
7746
7890
|
onClick: isRowClickable ? onClick : void 0
|
|
7747
7891
|
},
|
|
7748
7892
|
renderFirstColumn?.(row, index, rows),
|
|
7749
|
-
/* @__PURE__ */
|
|
7893
|
+
/* @__PURE__ */ React79.createElement(
|
|
7750
7894
|
List,
|
|
7751
7895
|
{
|
|
7752
7896
|
items: columns,
|
|
7753
7897
|
renderItem: (column, columnIndex) => {
|
|
7754
|
-
const cell2 = /* @__PURE__ */
|
|
7898
|
+
const cell2 = /* @__PURE__ */ React79.createElement(
|
|
7755
7899
|
DataList.Cell,
|
|
7756
7900
|
{
|
|
7757
7901
|
key: column.key ?? column.headerName,
|
|
@@ -7759,7 +7903,7 @@ var DataListRow = ({
|
|
|
7759
7903
|
...additionalColumnProps(column, columnIndex, columns, row),
|
|
7760
7904
|
className: rowClassName?.(row, index, rows)
|
|
7761
7905
|
},
|
|
7762
|
-
/* @__PURE__ */
|
|
7906
|
+
/* @__PURE__ */ React79.createElement(DataListCell, { column, row, index, rows, disabled: isRowDisabled })
|
|
7763
7907
|
);
|
|
7764
7908
|
return createAnimatedCell({
|
|
7765
7909
|
cellElement: cell2,
|
|
@@ -7786,7 +7930,7 @@ var DataListCell = ({
|
|
|
7786
7930
|
case "status": {
|
|
7787
7931
|
const status = column.status(row, index, rows);
|
|
7788
7932
|
if (status) {
|
|
7789
|
-
cellContent = /* @__PURE__ */
|
|
7933
|
+
cellContent = /* @__PURE__ */ React79.createElement(StatusChip, { dense: true, ...status });
|
|
7790
7934
|
}
|
|
7791
7935
|
break;
|
|
7792
7936
|
}
|
|
@@ -7794,7 +7938,7 @@ var DataListCell = ({
|
|
|
7794
7938
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
|
7795
7939
|
if (action) {
|
|
7796
7940
|
const isActionDisabled = disabled || action.disabled;
|
|
7797
|
-
cellContent = /* @__PURE__ */
|
|
7941
|
+
cellContent = /* @__PURE__ */ React79.createElement(
|
|
7798
7942
|
Button2.Secondary,
|
|
7799
7943
|
{
|
|
7800
7944
|
dense: true,
|
|
@@ -7818,7 +7962,7 @@ var DataListCell = ({
|
|
|
7818
7962
|
case "item": {
|
|
7819
7963
|
const item = column.item(row, index, rows);
|
|
7820
7964
|
if (item) {
|
|
7821
|
-
cellContent = /* @__PURE__ */
|
|
7965
|
+
cellContent = /* @__PURE__ */ React79.createElement(Item3, { ...item });
|
|
7822
7966
|
}
|
|
7823
7967
|
break;
|
|
7824
7968
|
}
|
|
@@ -7827,13 +7971,13 @@ var DataListCell = ({
|
|
|
7827
7971
|
if (!menuContent) {
|
|
7828
7972
|
cellContent = null;
|
|
7829
7973
|
} else {
|
|
7830
|
-
cellContent = /* @__PURE__ */
|
|
7974
|
+
cellContent = /* @__PURE__ */ React79.createElement(
|
|
7831
7975
|
DropdownMenu2,
|
|
7832
7976
|
{
|
|
7833
7977
|
placement: defaultContextualMenuPlacement,
|
|
7834
7978
|
onAction: (action) => column.onAction(action, row, index)
|
|
7835
7979
|
},
|
|
7836
|
-
/* @__PURE__ */
|
|
7980
|
+
/* @__PURE__ */ React79.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React79.createElement(Button2.Icon, { "aria-label": "action", icon: more_default })),
|
|
7837
7981
|
menuContent
|
|
7838
7982
|
);
|
|
7839
7983
|
}
|
|
@@ -7847,7 +7991,7 @@ var DataListCell = ({
|
|
|
7847
7991
|
}
|
|
7848
7992
|
break;
|
|
7849
7993
|
}
|
|
7850
|
-
return column.tooltip ? /* @__PURE__ */
|
|
7994
|
+
return column.tooltip ? /* @__PURE__ */ React79.createElement(Tooltip, { ...column.tooltip(row, index, rows) }, cellContent) : /* @__PURE__ */ React79.createElement(React79.Fragment, null, cellContent);
|
|
7851
7995
|
};
|
|
7852
7996
|
|
|
7853
7997
|
// src/molecules/DataList/DataListContext.tsx
|
|
@@ -7866,7 +8010,7 @@ var useDataListContext = () => {
|
|
|
7866
8010
|
};
|
|
7867
8011
|
|
|
7868
8012
|
// src/molecules/DataList/DataListGroup.tsx
|
|
7869
|
-
import
|
|
8013
|
+
import React80 from "react";
|
|
7870
8014
|
import { isFunction as isFunction2, noop } from "lodash-es";
|
|
7871
8015
|
|
|
7872
8016
|
// src/molecules/DataList/utils.ts
|
|
@@ -7878,8 +8022,8 @@ var INDENTATION = 28;
|
|
|
7878
8022
|
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
|
7879
8023
|
var getDefaultRowSelectionLabel = () => "Select row";
|
|
7880
8024
|
var getDefaultGroupCheckboxLabel = (key) => `Select ${key}`;
|
|
7881
|
-
var renderDefaultGroupName = (key) => /* @__PURE__ */
|
|
7882
|
-
var renderDefaultEmptyGroup = () => /* @__PURE__ */
|
|
8025
|
+
var renderDefaultGroupName = (key) => /* @__PURE__ */ React80.createElement(React80.Fragment, null, "Group: ", /* @__PURE__ */ React80.createElement("b", null, key));
|
|
8026
|
+
var renderDefaultEmptyGroup = () => /* @__PURE__ */ React80.createElement(DataList.EmptyGroup, { icon: infoSign_default }, "This group is empty");
|
|
7883
8027
|
var DataListGroup = ({
|
|
7884
8028
|
groups,
|
|
7885
8029
|
groupKey,
|
|
@@ -7917,15 +8061,15 @@ var DataListGroup = ({
|
|
|
7917
8061
|
if (!emptyGroupContent) {
|
|
7918
8062
|
return null;
|
|
7919
8063
|
}
|
|
7920
|
-
return /* @__PURE__ */
|
|
8064
|
+
return /* @__PURE__ */ React80.createElement(DataList.Row, { noDivider: isLastGroup }, selectable && /* @__PURE__ */ React80.createElement(DataList.Cell, null), /* @__PURE__ */ React80.createElement(
|
|
7921
8065
|
DataList.Cell,
|
|
7922
8066
|
{
|
|
7923
8067
|
style: { paddingLeft: `${2 + GAP + level * INDENTATION}px`, gridColumn: `${selectable ? 2 : 1} / -1` }
|
|
7924
8068
|
},
|
|
7925
|
-
/* @__PURE__ */
|
|
8069
|
+
/* @__PURE__ */ React80.createElement(Typography, { variant: "default", color: "muted" }, emptyGroupContent)
|
|
7926
8070
|
));
|
|
7927
8071
|
}
|
|
7928
|
-
return /* @__PURE__ */
|
|
8072
|
+
return /* @__PURE__ */ React80.createElement(
|
|
7929
8073
|
List,
|
|
7930
8074
|
{
|
|
7931
8075
|
items: groups,
|
|
@@ -7934,7 +8078,7 @@ var DataListGroup = ({
|
|
|
7934
8078
|
const isDisabled = disabled?.(row, index, rows);
|
|
7935
8079
|
const isSelectionDisabled = selectionDisabled(row, index, rows);
|
|
7936
8080
|
const isLastRow = isLastGroup && index === groups.length - 1;
|
|
7937
|
-
return /* @__PURE__ */
|
|
8081
|
+
return /* @__PURE__ */ React80.createElement(
|
|
7938
8082
|
DataListRow,
|
|
7939
8083
|
{
|
|
7940
8084
|
key: row.id,
|
|
@@ -7944,7 +8088,7 @@ var DataListGroup = ({
|
|
|
7944
8088
|
isLast: isLastRow,
|
|
7945
8089
|
rows,
|
|
7946
8090
|
active: selectable && isSelected,
|
|
7947
|
-
menu: /* @__PURE__ */
|
|
8091
|
+
menu: /* @__PURE__ */ React80.createElement(
|
|
7948
8092
|
DataListRowMenu,
|
|
7949
8093
|
{
|
|
7950
8094
|
row,
|
|
@@ -7967,7 +8111,7 @@ var DataListGroup = ({
|
|
|
7967
8111
|
}
|
|
7968
8112
|
} : {},
|
|
7969
8113
|
renderFirstColumn: (row2, index2) => {
|
|
7970
|
-
return /* @__PURE__ */
|
|
8114
|
+
return /* @__PURE__ */ React80.createElement(React80.Fragment, null, selectable && /* @__PURE__ */ React80.createElement(DataList.Cell, null, selectable === "single" && /* @__PURE__ */ React80.createElement(
|
|
7971
8115
|
RadioButton,
|
|
7972
8116
|
{
|
|
7973
8117
|
value: row2.id.toString(),
|
|
@@ -7976,7 +8120,7 @@ var DataListGroup = ({
|
|
|
7976
8120
|
checked: isSelected,
|
|
7977
8121
|
disabled: isDisabled || isSelectionDisabled
|
|
7978
8122
|
}
|
|
7979
|
-
), isMultiSelectionMode && /* @__PURE__ */
|
|
8123
|
+
), isMultiSelectionMode && /* @__PURE__ */ React80.createElement(
|
|
7980
8124
|
Checkbox,
|
|
7981
8125
|
{
|
|
7982
8126
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, rows),
|
|
@@ -7996,14 +8140,14 @@ var DataListGroup = ({
|
|
|
7996
8140
|
if (!groupKeys) {
|
|
7997
8141
|
return null;
|
|
7998
8142
|
}
|
|
7999
|
-
return /* @__PURE__ */
|
|
8143
|
+
return /* @__PURE__ */ React80.createElement(
|
|
8000
8144
|
List,
|
|
8001
8145
|
{
|
|
8002
8146
|
items: sortGroupKeys(groupKeys),
|
|
8003
8147
|
renderItem: (key, index) => {
|
|
8004
8148
|
const group = groups[key];
|
|
8005
8149
|
if (key === "undefined" || key === void 0) {
|
|
8006
|
-
return /* @__PURE__ */
|
|
8150
|
+
return /* @__PURE__ */ React80.createElement(
|
|
8007
8151
|
DataListGroup,
|
|
8008
8152
|
{
|
|
8009
8153
|
key: "undefined",
|
|
@@ -8022,7 +8166,7 @@ var DataListGroup = ({
|
|
|
8022
8166
|
const isChecked = nestedSelectedIds.length > 0;
|
|
8023
8167
|
const isActiveRow = !!openPanelId || selectable && isChecked;
|
|
8024
8168
|
const isLastRow = isLastGroup && index === groupKeys.length - 1 && !openPanelId;
|
|
8025
|
-
return /* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ React80.createElement(Accordion, { key, openPanelId }, hasCustomRowForGroup && /* @__PURE__ */ React80.createElement(DataList.Row, { active: isActiveRow, noDivider: isLastRow }, selectable && /* @__PURE__ */ React80.createElement(DataList.Cell, null, isMultiSelectionMode && /* @__PURE__ */ React80.createElement(
|
|
8026
8170
|
Checkbox,
|
|
8027
8171
|
{
|
|
8028
8172
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
@@ -8031,11 +8175,11 @@ var DataListGroup = ({
|
|
|
8031
8175
|
disabled: group.length === 0,
|
|
8032
8176
|
onChange: getOnSelectionChangeForId(nestedRowIds)
|
|
8033
8177
|
}
|
|
8034
|
-
)), /* @__PURE__ */
|
|
8178
|
+
)), /* @__PURE__ */ React80.createElement(
|
|
8035
8179
|
List,
|
|
8036
8180
|
{
|
|
8037
8181
|
items: columns,
|
|
8038
|
-
renderItem: (column, idx) => /* @__PURE__ */
|
|
8182
|
+
renderItem: (column, idx) => /* @__PURE__ */ React80.createElement(
|
|
8039
8183
|
DataList.Cell,
|
|
8040
8184
|
{
|
|
8041
8185
|
key: column.key ?? column.headerName,
|
|
@@ -8043,11 +8187,11 @@ var DataListGroup = ({
|
|
|
8043
8187
|
className: "gap-3",
|
|
8044
8188
|
style: idx === 0 ? { paddingLeft: `${GAP + level * INDENTATION}px` } : void 0
|
|
8045
8189
|
},
|
|
8046
|
-
idx === 0 && /* @__PURE__ */
|
|
8047
|
-
/* @__PURE__ */
|
|
8190
|
+
idx === 0 && /* @__PURE__ */ React80.createElement(Accordion.Toggle, { panelId: key, onChange: onGroupToggled }),
|
|
8191
|
+
/* @__PURE__ */ React80.createElement(DataListCell, { column, row: getGroupRow(key, group), index: -1, rows: [] })
|
|
8048
8192
|
)
|
|
8049
8193
|
}
|
|
8050
|
-
), /* @__PURE__ */
|
|
8194
|
+
), /* @__PURE__ */ React80.createElement(
|
|
8051
8195
|
DataListRowMenu,
|
|
8052
8196
|
{
|
|
8053
8197
|
row: getGroupRow(key, group),
|
|
@@ -8057,7 +8201,7 @@ var DataListGroup = ({
|
|
|
8057
8201
|
onMenuOpenChange,
|
|
8058
8202
|
menuAriaLabel
|
|
8059
8203
|
}
|
|
8060
|
-
)), !hasCustomRowForGroup && /* @__PURE__ */
|
|
8204
|
+
)), !hasCustomRowForGroup && /* @__PURE__ */ React80.createElement(DataList.Row, { active: isActiveRow, noDivider: isLastRow }, isMultiSelectionMode && /* @__PURE__ */ React80.createElement(DataList.Cell, null, /* @__PURE__ */ React80.createElement(
|
|
8061
8205
|
Checkbox,
|
|
8062
8206
|
{
|
|
8063
8207
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
@@ -8066,15 +8210,15 @@ var DataListGroup = ({
|
|
|
8066
8210
|
disabled: group.length === 0,
|
|
8067
8211
|
onChange: getOnSelectionChangeForId(nestedRowIds)
|
|
8068
8212
|
}
|
|
8069
|
-
)), /* @__PURE__ */
|
|
8213
|
+
)), /* @__PURE__ */ React80.createElement(
|
|
8070
8214
|
DataList.Cell,
|
|
8071
8215
|
{
|
|
8072
8216
|
className: "gap-2",
|
|
8073
8217
|
style: { paddingLeft: `${GAP + level * INDENTATION}px`, gridColumn: `${selectable ? 2 : 1} / -1` }
|
|
8074
8218
|
},
|
|
8075
|
-
/* @__PURE__ */
|
|
8219
|
+
/* @__PURE__ */ React80.createElement(Accordion.Toggle, { panelId: key, onChange: onGroupToggled }),
|
|
8076
8220
|
renderGroupName(key, group)
|
|
8077
|
-
)), /* @__PURE__ */
|
|
8221
|
+
)), /* @__PURE__ */ React80.createElement(Accordion.UnanimatedPanel, { panelId: key }, /* @__PURE__ */ React80.createElement(DataList.Row, { isGroup: true }, /* @__PURE__ */ React80.createElement(
|
|
8078
8222
|
DataListGroup,
|
|
8079
8223
|
{
|
|
8080
8224
|
key,
|
|
@@ -8091,18 +8235,18 @@ var DataListGroup = ({
|
|
|
8091
8235
|
};
|
|
8092
8236
|
|
|
8093
8237
|
// src/molecules/DataList/DataListSkeleton.tsx
|
|
8094
|
-
import
|
|
8238
|
+
import React81 from "react";
|
|
8095
8239
|
var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
|
8096
8240
|
const columnsAmount = [...Array(typeof columns === "number" ? columns : columns.length).keys()];
|
|
8097
|
-
return /* @__PURE__ */
|
|
8241
|
+
return /* @__PURE__ */ React81.createElement(Template, { role: "table", columns }, /* @__PURE__ */ React81.createElement(DataList.Row, null, columnsAmount.map((_, index) => /* @__PURE__ */ React81.createElement(DataList.HeadCell, { key: index }, /* @__PURE__ */ React81.createElement(Skeleton, { width: "100%", height: 17.5 })))), /* @__PURE__ */ React81.createElement(
|
|
8098
8242
|
List,
|
|
8099
8243
|
{
|
|
8100
8244
|
items: [...Array(rows).keys()],
|
|
8101
|
-
renderItem: (item, index) => /* @__PURE__ */
|
|
8245
|
+
renderItem: (item, index) => /* @__PURE__ */ React81.createElement(DataList.Row, { key: item, noDivider: index === rows - 1 }, /* @__PURE__ */ React81.createElement(
|
|
8102
8246
|
List,
|
|
8103
8247
|
{
|
|
8104
8248
|
items: columnsAmount,
|
|
8105
|
-
renderItem: (key) => /* @__PURE__ */
|
|
8249
|
+
renderItem: (key) => /* @__PURE__ */ React81.createElement(DataList.Cell, { key }, /* @__PURE__ */ React81.createElement(Skeleton, { width: "100%", height: 17.5 }))
|
|
8106
8250
|
}
|
|
8107
8251
|
))
|
|
8108
8252
|
}
|
|
@@ -8110,7 +8254,7 @@ var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
|
|
8110
8254
|
};
|
|
8111
8255
|
|
|
8112
8256
|
// src/molecules/DataList/DataListToolbar.tsx
|
|
8113
|
-
import
|
|
8257
|
+
import React82 from "react";
|
|
8114
8258
|
import { castArray as castArray2 } from "lodash-es";
|
|
8115
8259
|
var DataListToolbar = ({
|
|
8116
8260
|
actions: _actions,
|
|
@@ -8124,7 +8268,7 @@ var DataListToolbar = ({
|
|
|
8124
8268
|
const actions2 = castArray2(_actions).filter(Boolean);
|
|
8125
8269
|
const noRowsSelected = (selectedRows?.length ?? 0) === 0;
|
|
8126
8270
|
const disableToolbarActions = selectable && noRowsSelected;
|
|
8127
|
-
return /* @__PURE__ */
|
|
8271
|
+
return /* @__PURE__ */ React82.createElement(DataList.Toolbar.Container, { sticky }, /* @__PURE__ */ React82.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React82.createElement(DataList.Toolbar.SelectionCount, null, selectedRows?.length ?? 0, " selected")), actions2.length > 0 && /* @__PURE__ */ React82.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React82.createElement(DataList.Toolbar.Actions, null, actions2.map(
|
|
8128
8272
|
(action) => renderAction({
|
|
8129
8273
|
kind: "ghost",
|
|
8130
8274
|
dense: true,
|
|
@@ -8134,14 +8278,14 @@ var DataListToolbar = ({
|
|
|
8134
8278
|
onClick: () => action.onClick(selectedRows ?? [])
|
|
8135
8279
|
}
|
|
8136
8280
|
})
|
|
8137
|
-
))), menu && /* @__PURE__ */
|
|
8281
|
+
))), menu && /* @__PURE__ */ React82.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ React82.createElement(
|
|
8138
8282
|
DropdownMenu2,
|
|
8139
8283
|
{
|
|
8140
8284
|
placement: defaultContextualMenuPlacement,
|
|
8141
8285
|
onAction: (key) => onAction(key, selectedRows ?? []),
|
|
8142
8286
|
onOpenChange: onMenuOpenChange
|
|
8143
8287
|
},
|
|
8144
|
-
/* @__PURE__ */
|
|
8288
|
+
/* @__PURE__ */ React82.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React82.createElement(Button2.Dropdown, { kind: "ghost", dense: true, disabled: disableToolbarActions }, menuLabel)),
|
|
8145
8289
|
menu
|
|
8146
8290
|
)));
|
|
8147
8291
|
};
|
|
@@ -8209,8 +8353,8 @@ var DataList2 = ({
|
|
|
8209
8353
|
...columns.map((column) => column.width ?? "auto"),
|
|
8210
8354
|
menu ? "fit-content(28px)" : void 0
|
|
8211
8355
|
]);
|
|
8212
|
-
const PaginationFooter =
|
|
8213
|
-
({ children }) => /* @__PURE__ */
|
|
8356
|
+
const PaginationFooter = React83.useCallback(
|
|
8357
|
+
({ children }) => /* @__PURE__ */ React83.createElement("div", { style: { gridColumn: "1 / -1" }, role: "row" }, /* @__PURE__ */ React83.createElement("div", { role: "cell" }, children)),
|
|
8214
8358
|
[]
|
|
8215
8359
|
);
|
|
8216
8360
|
const getOnSelectionChangeForId = (id) => (e) => {
|
|
@@ -8232,7 +8376,7 @@ var DataList2 = ({
|
|
|
8232
8376
|
)
|
|
8233
8377
|
);
|
|
8234
8378
|
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
|
8235
|
-
const componentContent = /* @__PURE__ */
|
|
8379
|
+
const componentContent = /* @__PURE__ */ React83.createElement(Template, { className: "Aquarium-DataList", columns: templateColumns, role: "table", "aria-label": ariaLabel }, !hideHeader && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(DataList.Row, { header: true }, selectable && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "left", sticky }, selectable === "multiple" && /* @__PURE__ */ React83.createElement(
|
|
8236
8380
|
Checkbox,
|
|
8237
8381
|
{
|
|
8238
8382
|
"aria-label": "Select all rows",
|
|
@@ -8246,10 +8390,10 @@ var DataList2 = ({
|
|
|
8246
8390
|
}
|
|
8247
8391
|
}
|
|
8248
8392
|
}
|
|
8249
|
-
)), isCollapsible && /* @__PURE__ */
|
|
8250
|
-
const content = column.headerTooltip ? /* @__PURE__ */
|
|
8251
|
-
const headerContentAndIcon = column.icon ? /* @__PURE__ */
|
|
8252
|
-
const cell2 = columnHasSort(column) ? /* @__PURE__ */
|
|
8393
|
+
)), isCollapsible && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "left", sticky }), columns.map((column) => {
|
|
8394
|
+
const content = column.headerTooltip ? /* @__PURE__ */ React83.createElement(Tooltip, { placement: column.headerTooltip.placement, content: column.headerTooltip.content }, column.headerName) : column.headerName;
|
|
8395
|
+
const headerContentAndIcon = column.icon ? /* @__PURE__ */ React83.createElement(Box.Flex, { flexDirection: "row", gap: "2", alignItems: "center" }, /* @__PURE__ */ React83.createElement(InlineIcon, { icon: column.icon, width: 18, height: 18, color: "muted", "aria-hidden": true }), content) : content;
|
|
8396
|
+
const cell2 = columnHasSort(column) ? /* @__PURE__ */ React83.createElement(
|
|
8253
8397
|
DataList.SortCell,
|
|
8254
8398
|
{
|
|
8255
8399
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
|
@@ -8259,13 +8403,13 @@ var DataList2 = ({
|
|
|
8259
8403
|
...cellProps(column)
|
|
8260
8404
|
},
|
|
8261
8405
|
headerContentAndIcon
|
|
8262
|
-
) : /* @__PURE__ */
|
|
8406
|
+
) : /* @__PURE__ */ React83.createElement(DataList.HeadCell, { key: column.key ?? column.headerName, ...cellProps(column), sticky }, headerContentAndIcon);
|
|
8263
8407
|
return createAnimatedCell({
|
|
8264
8408
|
cellElement: cell2,
|
|
8265
8409
|
stickyStyles,
|
|
8266
8410
|
stickyColumn: cellProps(column).stickyColumn
|
|
8267
8411
|
});
|
|
8268
|
-
}), menu && /* @__PURE__ */
|
|
8412
|
+
}), menu && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "right", "aria-label": menuAriaLabel, sticky }, menuHeaderName)), toolbar), groups && /* @__PURE__ */ React83.createElement(
|
|
8269
8413
|
DataListGroup,
|
|
8270
8414
|
{
|
|
8271
8415
|
columns,
|
|
@@ -8292,7 +8436,7 @@ var DataList2 = ({
|
|
|
8292
8436
|
level: 0,
|
|
8293
8437
|
isLastGroup: true
|
|
8294
8438
|
}
|
|
8295
|
-
), !groups && /* @__PURE__ */
|
|
8439
|
+
), !groups && /* @__PURE__ */ React83.createElement(
|
|
8296
8440
|
List,
|
|
8297
8441
|
{
|
|
8298
8442
|
...rest,
|
|
@@ -8305,7 +8449,7 @@ var DataList2 = ({
|
|
|
8305
8449
|
const isDisabled = disabled?.(row, index, sortedRows);
|
|
8306
8450
|
const openPanelId = expandedGroupIds.find((id) => id === row.id.toString()) || null;
|
|
8307
8451
|
const isLastRow = index === sortedRows.length - 1;
|
|
8308
|
-
const content = /* @__PURE__ */
|
|
8452
|
+
const content = /* @__PURE__ */ React83.createElement(
|
|
8309
8453
|
DataListRow,
|
|
8310
8454
|
{
|
|
8311
8455
|
key: row.id,
|
|
@@ -8316,7 +8460,7 @@ var DataList2 = ({
|
|
|
8316
8460
|
active: !!openPanelId || selectable && isSelected,
|
|
8317
8461
|
isLast: isLastRow && !openPanelId,
|
|
8318
8462
|
stickyStyles,
|
|
8319
|
-
menu: /* @__PURE__ */
|
|
8463
|
+
menu: /* @__PURE__ */ React83.createElement(
|
|
8320
8464
|
DataListRowMenu,
|
|
8321
8465
|
{
|
|
8322
8466
|
row,
|
|
@@ -8335,7 +8479,7 @@ var DataList2 = ({
|
|
|
8335
8479
|
"aria-selected": selected?.includes(row2.id) ?? false
|
|
8336
8480
|
} : {},
|
|
8337
8481
|
renderFirstColumn: (row2, index2) => {
|
|
8338
|
-
return /* @__PURE__ */
|
|
8482
|
+
return /* @__PURE__ */ React83.createElement(React83.Fragment, null, selectable && /* @__PURE__ */ React83.createElement(DataList.Cell, null, selectable === "single" && /* @__PURE__ */ React83.createElement(
|
|
8339
8483
|
RadioButton,
|
|
8340
8484
|
{
|
|
8341
8485
|
value: row2.id.toString(),
|
|
@@ -8344,7 +8488,7 @@ var DataList2 = ({
|
|
|
8344
8488
|
checked: isSelected,
|
|
8345
8489
|
disabled: isDisabled || isSelectionDisabled
|
|
8346
8490
|
}
|
|
8347
|
-
), isMultiSelectionMode && /* @__PURE__ */
|
|
8491
|
+
), isMultiSelectionMode && /* @__PURE__ */ React83.createElement(
|
|
8348
8492
|
Checkbox,
|
|
8349
8493
|
{
|
|
8350
8494
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
|
|
@@ -8352,7 +8496,7 @@ var DataList2 = ({
|
|
|
8352
8496
|
checked: isSelected,
|
|
8353
8497
|
disabled: isDisabled || isSelectionDisabled
|
|
8354
8498
|
}
|
|
8355
|
-
)), rowDetails !== void 0 && /* @__PURE__ */
|
|
8499
|
+
)), rowDetails !== void 0 && /* @__PURE__ */ React83.createElement(DataList.Cell, null, details && /* @__PURE__ */ React83.createElement(Accordion.Toggle, { panelId: row2.id.toString(), onChange: onGroupToggled })));
|
|
8356
8500
|
},
|
|
8357
8501
|
onClick: selectable === "single" ? getOnSelectionChangeForId(row.id) : void 0
|
|
8358
8502
|
}
|
|
@@ -8360,7 +8504,7 @@ var DataList2 = ({
|
|
|
8360
8504
|
if (!details) {
|
|
8361
8505
|
return content;
|
|
8362
8506
|
}
|
|
8363
|
-
return /* @__PURE__ */
|
|
8507
|
+
return /* @__PURE__ */ React83.createElement(Accordion, { key: row.id, openPanelId }, content, /* @__PURE__ */ React83.createElement(
|
|
8364
8508
|
Accordion.Panel,
|
|
8365
8509
|
{
|
|
8366
8510
|
role: "row",
|
|
@@ -8371,13 +8515,13 @@ var DataList2 = ({
|
|
|
8371
8515
|
}),
|
|
8372
8516
|
"aria-label": `row ${row.id.toString()} details`
|
|
8373
8517
|
},
|
|
8374
|
-
/* @__PURE__ */
|
|
8518
|
+
/* @__PURE__ */ React83.createElement("div", { role: "cell" }, details)
|
|
8375
8519
|
));
|
|
8376
8520
|
}
|
|
8377
8521
|
}
|
|
8378
8522
|
));
|
|
8379
|
-
const wrappedContent = hasStickyColumns ? /* @__PURE__ */
|
|
8380
|
-
return /* @__PURE__ */
|
|
8523
|
+
const wrappedContent = hasStickyColumns ? /* @__PURE__ */ React83.createElement("div", { className: "relative w-full h-full overflow-auto", ref: containerRef }, componentContent) : componentContent;
|
|
8524
|
+
return /* @__PURE__ */ React83.createElement(
|
|
8381
8525
|
DataListContext.Provider,
|
|
8382
8526
|
{
|
|
8383
8527
|
value: {
|
|
@@ -8393,18 +8537,18 @@ DataList2.Skeleton = DataListSkeleton;
|
|
|
8393
8537
|
DataList2.Toolbar = DataListToolbar;
|
|
8394
8538
|
|
|
8395
8539
|
// src/molecules/DataTable/DataTable.tsx
|
|
8396
|
-
import
|
|
8540
|
+
import React86, { useRef as useRef11 } from "react";
|
|
8397
8541
|
import { clsx as clsx27 } from "clsx";
|
|
8398
8542
|
import { compact as compact2, isFunction as isFunction4 } from "lodash-es";
|
|
8399
8543
|
|
|
8400
8544
|
// src/molecules/Table/Table.tsx
|
|
8401
|
-
import
|
|
8545
|
+
import React85 from "react";
|
|
8402
8546
|
|
|
8403
8547
|
// src/utils/table/useScrollTarget.ts
|
|
8404
|
-
import
|
|
8548
|
+
import React84 from "react";
|
|
8405
8549
|
var useScrollTarget = (callback) => {
|
|
8406
|
-
const targetRef =
|
|
8407
|
-
|
|
8550
|
+
const targetRef = React84.useRef(null);
|
|
8551
|
+
React84.useLayoutEffect(() => {
|
|
8408
8552
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
|
8409
8553
|
root: null,
|
|
8410
8554
|
rootMargin: `0px 0px 200px 0px`
|
|
@@ -8421,7 +8565,7 @@ var useScrollTarget = (callback) => {
|
|
|
8421
8565
|
var Table2 = ({ children, onPrev, onNext, ...rest }) => {
|
|
8422
8566
|
const bottomRef = useScrollTarget(onNext);
|
|
8423
8567
|
const topRef = useScrollTarget(onPrev);
|
|
8424
|
-
return /* @__PURE__ */
|
|
8568
|
+
return /* @__PURE__ */ React85.createElement("div", { className: "Aquarium-Table relative w-full" }, /* @__PURE__ */ React85.createElement("div", { ref: topRef, className: "absolute top-0 h-1 w-full left-0 bg-transparent" }), /* @__PURE__ */ React85.createElement(Table, { ...rest }, children), /* @__PURE__ */ React85.createElement("div", { ref: bottomRef, className: "absolute bottom-0 h-1 w-full left-0 bg-transparent" }));
|
|
8425
8569
|
};
|
|
8426
8570
|
Table2.Head = Table.Head;
|
|
8427
8571
|
Table2.Body = Table.Body;
|
|
@@ -8460,11 +8604,11 @@ var DataTable = ({
|
|
|
8460
8604
|
const [sort, updateSort] = useTableSort({ ...initialSortState, onSortChanged });
|
|
8461
8605
|
const sortedRows = sortRowsBy(rows, sort);
|
|
8462
8606
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
|
8463
|
-
const PaginationFooter =
|
|
8464
|
-
({ children }) => /* @__PURE__ */
|
|
8607
|
+
const PaginationFooter = React86.useCallback(
|
|
8608
|
+
({ children }) => /* @__PURE__ */ React86.createElement("tfoot", null, /* @__PURE__ */ React86.createElement("tr", null, /* @__PURE__ */ React86.createElement("td", { colSpan: amountOfColumns }, children))),
|
|
8465
8609
|
[amountOfColumns]
|
|
8466
8610
|
);
|
|
8467
|
-
const compponentContent = /* @__PURE__ */
|
|
8611
|
+
const compponentContent = /* @__PURE__ */ React86.createElement(
|
|
8468
8612
|
Table2,
|
|
8469
8613
|
{
|
|
8470
8614
|
ariaLabel,
|
|
@@ -8476,11 +8620,11 @@ var DataTable = ({
|
|
|
8476
8620
|
"table-fixed": layout === "fixed"
|
|
8477
8621
|
})
|
|
8478
8622
|
},
|
|
8479
|
-
/* @__PURE__ */
|
|
8623
|
+
/* @__PURE__ */ React86.createElement(Table2.Head, { sticky }, compact2([
|
|
8480
8624
|
...columns.map((column) => {
|
|
8481
|
-
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */
|
|
8482
|
-
const headerContentAndIcon = !column.headerInvisible && column.icon ? /* @__PURE__ */
|
|
8483
|
-
const cell2 = columnHasSort(column) ? /* @__PURE__ */
|
|
8625
|
+
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */ React86.createElement(Tooltip, { placement: column.headerTooltip.placement, content: column.headerTooltip.content }, column.headerName) : !column.headerInvisible && column.headerName;
|
|
8626
|
+
const headerContentAndIcon = !column.headerInvisible && column.icon ? /* @__PURE__ */ React86.createElement(Box.Flex, { flexDirection: "row", gap: "3", alignItems: "center" }, /* @__PURE__ */ React86.createElement(InlineIcon, { icon: column.icon, height: "22", color: "default", "aria-hidden": true }), content) : content;
|
|
8627
|
+
const cell2 = columnHasSort(column) ? /* @__PURE__ */ React86.createElement(
|
|
8484
8628
|
Table2.SortCell,
|
|
8485
8629
|
{
|
|
8486
8630
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
|
@@ -8491,7 +8635,7 @@ var DataTable = ({
|
|
|
8491
8635
|
...cellProps(column)
|
|
8492
8636
|
},
|
|
8493
8637
|
headerContentAndIcon
|
|
8494
|
-
) : /* @__PURE__ */
|
|
8638
|
+
) : /* @__PURE__ */ React86.createElement(
|
|
8495
8639
|
Table2.Cell,
|
|
8496
8640
|
{
|
|
8497
8641
|
key: column.key ?? column.headerName,
|
|
@@ -8507,9 +8651,9 @@ var DataTable = ({
|
|
|
8507
8651
|
stickyColumn: cellProps(column).stickyColumn
|
|
8508
8652
|
});
|
|
8509
8653
|
}),
|
|
8510
|
-
menu ? /* @__PURE__ */
|
|
8654
|
+
menu ? /* @__PURE__ */ React86.createElement(Table2.Cell, { key: "__contextMenu", align: "right", "aria-label": menuAriaLabel }, menuHeaderName) : null
|
|
8511
8655
|
])),
|
|
8512
|
-
/* @__PURE__ */
|
|
8656
|
+
/* @__PURE__ */ React86.createElement(
|
|
8513
8657
|
List,
|
|
8514
8658
|
{
|
|
8515
8659
|
container: Table2.Body,
|
|
@@ -8518,13 +8662,13 @@ var DataTable = ({
|
|
|
8518
8662
|
items: sortedRows,
|
|
8519
8663
|
renderItem: (row, index) => {
|
|
8520
8664
|
const isRowDisabled = disabled?.(row, index, sortedRows) ?? false;
|
|
8521
|
-
return /* @__PURE__ */
|
|
8665
|
+
return /* @__PURE__ */ React86.createElement(Table2.Row, { key: row.id, disabled: isRowDisabled }, /* @__PURE__ */ React86.createElement(
|
|
8522
8666
|
List,
|
|
8523
8667
|
{
|
|
8524
8668
|
items: columns,
|
|
8525
8669
|
renderItem: (column) => {
|
|
8526
8670
|
return createAnimatedCell({
|
|
8527
|
-
cellElement: /* @__PURE__ */
|
|
8671
|
+
cellElement: /* @__PURE__ */ React86.createElement(
|
|
8528
8672
|
Table2.Cell,
|
|
8529
8673
|
{
|
|
8530
8674
|
key: column.key ?? column.headerName,
|
|
@@ -8543,7 +8687,7 @@ var DataTable = ({
|
|
|
8543
8687
|
}
|
|
8544
8688
|
)
|
|
8545
8689
|
);
|
|
8546
|
-
return hasStickyColumns ? /* @__PURE__ */
|
|
8690
|
+
return hasStickyColumns ? /* @__PURE__ */ React86.createElement("div", { className: "relative w-full overflow-x-auto", ref: containerRef }, compponentContent) : compponentContent;
|
|
8547
8691
|
};
|
|
8548
8692
|
var renderRowMenu = (row, index, {
|
|
8549
8693
|
menu,
|
|
@@ -8553,14 +8697,14 @@ var renderRowMenu = (row, index, {
|
|
|
8553
8697
|
}) => {
|
|
8554
8698
|
if (menu) {
|
|
8555
8699
|
const menuContent = isFunction4(menu) ? menu(row, index) : menu;
|
|
8556
|
-
return /* @__PURE__ */
|
|
8700
|
+
return /* @__PURE__ */ React86.createElement(Table2.Cell, { align: "right" }, menuContent && /* @__PURE__ */ React86.createElement(
|
|
8557
8701
|
DropdownMenu2,
|
|
8558
8702
|
{
|
|
8559
8703
|
placement: defaultContextualMenuPlacement,
|
|
8560
8704
|
onAction: (action) => onAction?.(action, row, index),
|
|
8561
8705
|
onOpenChange: onMenuOpenChange
|
|
8562
8706
|
},
|
|
8563
|
-
/* @__PURE__ */
|
|
8707
|
+
/* @__PURE__ */ React86.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React86.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: more_default })),
|
|
8564
8708
|
menuContent
|
|
8565
8709
|
));
|
|
8566
8710
|
}
|
|
@@ -8572,31 +8716,31 @@ var renderCell = (column, row, index, rows) => {
|
|
|
8572
8716
|
if (column.type === "status") {
|
|
8573
8717
|
const status = column.status(row, index, rows);
|
|
8574
8718
|
if (status) {
|
|
8575
|
-
cellContent = /* @__PURE__ */
|
|
8719
|
+
cellContent = /* @__PURE__ */ React86.createElement(StatusChip, { dense: true, ...status });
|
|
8576
8720
|
}
|
|
8577
8721
|
} else if (column.type === "action") {
|
|
8578
8722
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
|
8579
8723
|
if (action) {
|
|
8580
|
-
cellContent = /* @__PURE__ */
|
|
8724
|
+
cellContent = /* @__PURE__ */ React86.createElement(Button2.Secondary, { dense: true, ...action });
|
|
8581
8725
|
}
|
|
8582
8726
|
} else if (column.type === "custom") {
|
|
8583
8727
|
cellContent = column.UNSAFE_render(row, index, rows);
|
|
8584
8728
|
} else if (column.type === "item") {
|
|
8585
8729
|
const item = column.item(row, index, rows);
|
|
8586
8730
|
if (item) {
|
|
8587
|
-
cellContent = /* @__PURE__ */
|
|
8731
|
+
cellContent = /* @__PURE__ */ React86.createElement(Item3, { ...item });
|
|
8588
8732
|
}
|
|
8589
8733
|
} else if (column.formatter) {
|
|
8590
8734
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
|
8591
8735
|
} else {
|
|
8592
8736
|
cellContent = row[column.field];
|
|
8593
8737
|
}
|
|
8594
|
-
return column.tooltip ? /* @__PURE__ */
|
|
8738
|
+
return column.tooltip ? /* @__PURE__ */ React86.createElement(Tooltip, { ...column.tooltip(row, index, rows) }, cellContent) : /* @__PURE__ */ React86.createElement(React86.Fragment, null, cellContent);
|
|
8595
8739
|
};
|
|
8596
8740
|
DataTable.Skeleton = DataListSkeleton;
|
|
8597
8741
|
|
|
8598
8742
|
// src/molecules/DatePicker/DatePicker.tsx
|
|
8599
|
-
import
|
|
8743
|
+
import React93 from "react";
|
|
8600
8744
|
import {
|
|
8601
8745
|
DatePickerStateContext,
|
|
8602
8746
|
Text
|
|
@@ -8606,13 +8750,13 @@ import { mergeProps as mergeProps3, useId as useId10 } from "@react-aria/utils";
|
|
|
8606
8750
|
import { omit as omit8 } from "lodash-es";
|
|
8607
8751
|
|
|
8608
8752
|
// src/molecules/TimeField/TimeField.tsx
|
|
8609
|
-
import
|
|
8753
|
+
import React88 from "react";
|
|
8610
8754
|
import { useLabel } from "@react-aria/label";
|
|
8611
8755
|
import { useId as useId9 } from "@react-aria/utils";
|
|
8612
8756
|
import { omit as omit7 } from "lodash-es";
|
|
8613
8757
|
|
|
8614
8758
|
// src/atoms/DateField/DateField.tsx
|
|
8615
|
-
import
|
|
8759
|
+
import React87 from "react";
|
|
8616
8760
|
import {
|
|
8617
8761
|
DateField as AriaDateField,
|
|
8618
8762
|
DateInput as AriaDateInput,
|
|
@@ -8635,10 +8779,10 @@ var segmentStyles = tv21({
|
|
|
8635
8779
|
}
|
|
8636
8780
|
});
|
|
8637
8781
|
var DateInput = (props) => {
|
|
8638
|
-
return /* @__PURE__ */
|
|
8782
|
+
return /* @__PURE__ */ React87.createElement(AriaDateInput, { className: (renderProps) => fieldGroup({ ...renderProps, class: "block" }), ...props }, (segment) => /* @__PURE__ */ React87.createElement(AriaDateSegment, { segment, className: segmentStyles }));
|
|
8639
8783
|
};
|
|
8640
8784
|
var TimeField = ({ disabled, valid, ...props }) => {
|
|
8641
|
-
return /* @__PURE__ */
|
|
8785
|
+
return /* @__PURE__ */ React87.createElement(AriaTimeField, { ...props, isInvalid: valid === false, isDisabled: disabled }, /* @__PURE__ */ React87.createElement(DateInput, null));
|
|
8642
8786
|
};
|
|
8643
8787
|
|
|
8644
8788
|
// src/molecules/TimeField/TimeField.tsx
|
|
@@ -8648,11 +8792,11 @@ function TimeField2(props) {
|
|
|
8648
8792
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
8649
8793
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
8650
8794
|
const baseProps = omit7(props, Object.keys(labelControlProps));
|
|
8651
|
-
return /* @__PURE__ */
|
|
8795
|
+
return /* @__PURE__ */ React88.createElement(LabelControl, { ...labelProps, ...labelControlProps, messageId: errorMessageId, className: "Aquarium-TimeField" }, /* @__PURE__ */ React88.createElement(TimeField, { ...baseProps, ...fieldProps, ...errorProps, disabled: props.disabled, valid: props.valid }));
|
|
8652
8796
|
}
|
|
8653
8797
|
|
|
8654
8798
|
// src/atoms/DatePicker/Calendar.tsx
|
|
8655
|
-
import
|
|
8799
|
+
import React90 from "react";
|
|
8656
8800
|
import {
|
|
8657
8801
|
Calendar as AriaCalendar,
|
|
8658
8802
|
CalendarCell,
|
|
@@ -8665,7 +8809,7 @@ import {
|
|
|
8665
8809
|
import { tv as tv23 } from "tailwind-variants";
|
|
8666
8810
|
|
|
8667
8811
|
// src/atoms/DatePicker/DatePickerButton.tsx
|
|
8668
|
-
import
|
|
8812
|
+
import React89 from "react";
|
|
8669
8813
|
import { Button as AriaButton2, composeRenderProps as composeRenderProps4 } from "react-aria-components";
|
|
8670
8814
|
import { tv as tv22 } from "tailwind-variants";
|
|
8671
8815
|
var datePickerButton = tv22({
|
|
@@ -8681,7 +8825,7 @@ var DatePickerButton = ({
|
|
|
8681
8825
|
hideWhenParentIsNotHoveredOrFocused = false,
|
|
8682
8826
|
...props
|
|
8683
8827
|
}) => {
|
|
8684
|
-
return /* @__PURE__ */
|
|
8828
|
+
return /* @__PURE__ */ React89.createElement(
|
|
8685
8829
|
AriaButton2,
|
|
8686
8830
|
{
|
|
8687
8831
|
...props,
|
|
@@ -8698,10 +8842,10 @@ var DatePickerButton = ({
|
|
|
8698
8842
|
);
|
|
8699
8843
|
};
|
|
8700
8844
|
var ClearInputButton = (props) => {
|
|
8701
|
-
return /* @__PURE__ */
|
|
8845
|
+
return /* @__PURE__ */ React89.createElement(DatePickerButton, { ...props, "aria-label": "Clear", slot: null, hideWhenParentIsNotHoveredOrFocused: true }, /* @__PURE__ */ React89.createElement(Icon2, { icon: smallCross_default, dense: true }));
|
|
8702
8846
|
};
|
|
8703
8847
|
var CalendarButton = (props) => {
|
|
8704
|
-
return /* @__PURE__ */
|
|
8848
|
+
return /* @__PURE__ */ React89.createElement(DatePickerButton, { ...props, "aria-label": "Calendar" }, /* @__PURE__ */ React89.createElement(Icon2, { icon: calendar_default, dense: true }));
|
|
8705
8849
|
};
|
|
8706
8850
|
|
|
8707
8851
|
// src/atoms/DatePicker/Calendar.tsx
|
|
@@ -8722,17 +8866,17 @@ var cellStyles = tv23({
|
|
|
8722
8866
|
}
|
|
8723
8867
|
});
|
|
8724
8868
|
var Calendar = (props) => {
|
|
8725
|
-
return /* @__PURE__ */
|
|
8869
|
+
return /* @__PURE__ */ React90.createElement(AriaCalendar, { ...props }, /* @__PURE__ */ React90.createElement(CalendarHeader, null), /* @__PURE__ */ React90.createElement(CalendarGrid, null, /* @__PURE__ */ React90.createElement(CalendarGridHeader, null), /* @__PURE__ */ React90.createElement(CalendarGridBody, null, (date) => /* @__PURE__ */ React90.createElement(CalendarCell, { date, className: cellStyles }))));
|
|
8726
8870
|
};
|
|
8727
8871
|
var CalendarHeader = () => {
|
|
8728
|
-
return /* @__PURE__ */
|
|
8872
|
+
return /* @__PURE__ */ React90.createElement("header", { className: "flex items-center gap-1 pb-5 w-full" }, /* @__PURE__ */ React90.createElement(DatePickerButton, { slot: "previous", className: "p-3" }, /* @__PURE__ */ React90.createElement(Icon, { icon: chevronLeft_default })), /* @__PURE__ */ React90.createElement(Heading, { className: "flex-1 typography-default-strong text-center" }), /* @__PURE__ */ React90.createElement(DatePickerButton, { slot: "next", className: "p-3" }, /* @__PURE__ */ React90.createElement(Icon, { icon: chevronRight_default })));
|
|
8729
8873
|
};
|
|
8730
8874
|
var CalendarGridHeader = () => {
|
|
8731
|
-
return /* @__PURE__ */
|
|
8875
|
+
return /* @__PURE__ */ React90.createElement(AriaCalendarGridHeader, null, (day) => /* @__PURE__ */ React90.createElement(CalendarHeaderCell, { className: "text-xs text-inactive typography-small" }, day));
|
|
8732
8876
|
};
|
|
8733
8877
|
|
|
8734
8878
|
// src/atoms/DatePicker/DatePicker.tsx
|
|
8735
|
-
import
|
|
8879
|
+
import React91 from "react";
|
|
8736
8880
|
import {
|
|
8737
8881
|
Button as AriaButton3,
|
|
8738
8882
|
DatePicker as AriaDatePicker,
|
|
@@ -8762,7 +8906,7 @@ var datePickerCalendarStyles = tv24({
|
|
|
8762
8906
|
});
|
|
8763
8907
|
var DatePicker = ({ variant, ...props }) => {
|
|
8764
8908
|
const hasSomeValue = props.value ?? props.defaultValue ?? props.placeholderValue;
|
|
8765
|
-
return /* @__PURE__ */
|
|
8909
|
+
return /* @__PURE__ */ React91.createElement(
|
|
8766
8910
|
AriaDatePicker,
|
|
8767
8911
|
{
|
|
8768
8912
|
...props,
|
|
@@ -8773,7 +8917,7 @@ var DatePicker = ({ variant, ...props }) => {
|
|
|
8773
8917
|
};
|
|
8774
8918
|
var DateRangePicker = ({ variant, ...props }) => {
|
|
8775
8919
|
const hasSomeValue = props.value ?? props.defaultValue ?? props.placeholderValue;
|
|
8776
|
-
return /* @__PURE__ */
|
|
8920
|
+
return /* @__PURE__ */ React91.createElement(
|
|
8777
8921
|
AriaDateRangePicker,
|
|
8778
8922
|
{
|
|
8779
8923
|
...props,
|
|
@@ -8784,31 +8928,31 @@ var DateRangePicker = ({ variant, ...props }) => {
|
|
|
8784
8928
|
};
|
|
8785
8929
|
var Presets = ({ children }) => {
|
|
8786
8930
|
const { presets } = datePickerCalendarStyles();
|
|
8787
|
-
return /* @__PURE__ */
|
|
8931
|
+
return /* @__PURE__ */ React91.createElement("div", { className: presets() }, children);
|
|
8788
8932
|
};
|
|
8789
8933
|
var Preset = ({ value, label }) => {
|
|
8790
8934
|
const { preset } = datePickerCalendarStyles();
|
|
8791
|
-
const context2 =
|
|
8935
|
+
const context2 = React91.useContext(AriaDatePickerStateContext);
|
|
8792
8936
|
const handlePress = () => {
|
|
8793
8937
|
context2?.setValue(value);
|
|
8794
8938
|
context2?.close();
|
|
8795
8939
|
};
|
|
8796
8940
|
const isActive = context2?.value !== void 0 && context2.value?.toString() === value.toString();
|
|
8797
|
-
return /* @__PURE__ */
|
|
8941
|
+
return /* @__PURE__ */ React91.createElement(AriaButton3, { onPress: handlePress, className: preset({ isPresetActive: isActive }) }, label);
|
|
8798
8942
|
};
|
|
8799
8943
|
var RangePreset = ({ value, label }) => {
|
|
8800
8944
|
const { preset } = datePickerCalendarStyles();
|
|
8801
|
-
const context2 =
|
|
8945
|
+
const context2 = React91.useContext(AriaDateRangePickerStateContext);
|
|
8802
8946
|
const handlePress = () => {
|
|
8803
8947
|
context2?.setValue(value);
|
|
8804
8948
|
context2?.close();
|
|
8805
8949
|
};
|
|
8806
8950
|
const isActive = context2?.value !== void 0 && context2.value.start?.toString() === value.start.toString() && context2.value.end?.toString() === value.end.toString();
|
|
8807
|
-
return /* @__PURE__ */
|
|
8951
|
+
return /* @__PURE__ */ React91.createElement(AriaButton3, { onPress: handlePress, className: preset({ isPresetActive: isActive }) }, label);
|
|
8808
8952
|
};
|
|
8809
8953
|
|
|
8810
8954
|
// src/atoms/Dialog/Dialog.tsx
|
|
8811
|
-
import
|
|
8955
|
+
import React92 from "react";
|
|
8812
8956
|
import { Dialog as AriaDialog2 } from "react-aria-components";
|
|
8813
8957
|
|
|
8814
8958
|
// node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
@@ -11287,7 +11431,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
|
11287
11431
|
}
|
|
11288
11432
|
};
|
|
11289
11433
|
var Dialog = (props) => {
|
|
11290
|
-
return /* @__PURE__ */
|
|
11434
|
+
return /* @__PURE__ */ React92.createElement(
|
|
11291
11435
|
AriaDialog2,
|
|
11292
11436
|
{
|
|
11293
11437
|
...props,
|
|
@@ -11298,14 +11442,14 @@ var Dialog = (props) => {
|
|
|
11298
11442
|
|
|
11299
11443
|
// src/molecules/DatePicker/DatePicker.tsx
|
|
11300
11444
|
var DatePickerClearButton = () => {
|
|
11301
|
-
const state =
|
|
11445
|
+
const state = React93.useContext(DatePickerStateContext);
|
|
11302
11446
|
if (!state) {
|
|
11303
11447
|
throw new Error("DatePickerStateContext is missing a provider");
|
|
11304
11448
|
}
|
|
11305
11449
|
if (!state.value) {
|
|
11306
11450
|
return null;
|
|
11307
11451
|
}
|
|
11308
|
-
return /* @__PURE__ */
|
|
11452
|
+
return /* @__PURE__ */ React93.createElement(
|
|
11309
11453
|
ClearInputButton,
|
|
11310
11454
|
{
|
|
11311
11455
|
onPress: () => {
|
|
@@ -11316,8 +11460,8 @@ var DatePickerClearButton = () => {
|
|
|
11316
11460
|
};
|
|
11317
11461
|
DatePickerClearButton.displayName = "DatePicker.ClearButton";
|
|
11318
11462
|
var CalendarTimeField = ({ granularity, labelText = "Time", ...props }) => {
|
|
11319
|
-
const ctx =
|
|
11320
|
-
return /* @__PURE__ */
|
|
11463
|
+
const ctx = React93.useContext(DatePickerStateContext);
|
|
11464
|
+
return /* @__PURE__ */ React93.createElement(
|
|
11321
11465
|
TimeField2,
|
|
11322
11466
|
{
|
|
11323
11467
|
...props,
|
|
@@ -11329,16 +11473,16 @@ var CalendarTimeField = ({ granularity, labelText = "Time", ...props }) => {
|
|
|
11329
11473
|
}
|
|
11330
11474
|
);
|
|
11331
11475
|
};
|
|
11332
|
-
var DatePickerCalendarPropsContext =
|
|
11476
|
+
var DatePickerCalendarPropsContext = React93.createContext(null);
|
|
11333
11477
|
var DatePickerCalendar = (props) => {
|
|
11334
|
-
const ctx =
|
|
11478
|
+
const ctx = React93.useContext(DatePickerCalendarPropsContext);
|
|
11335
11479
|
const { variant, granularity, errorMessage, presets = [] } = mergeProps3(ctx, props);
|
|
11336
11480
|
const { dialog, calendar, errorMessage: errorMessageStyle } = datePickerCalendarStyles();
|
|
11337
|
-
return /* @__PURE__ */
|
|
11481
|
+
return /* @__PURE__ */ React93.createElement(Popover, { offset: 0 }, /* @__PURE__ */ React93.createElement(Dialog, { className: dialog() }, presets.length > 0 && /* @__PURE__ */ React93.createElement(Presets, null, presets.map((props2) => /* @__PURE__ */ React93.createElement(Preset, { key: props2.value.toString(), ...props2 }))), /* @__PURE__ */ React93.createElement(Spacing, { gap: "3", className: "p-5" }, /* @__PURE__ */ React93.createElement(Calendar, { className: calendar() }), variant === "datetime" && /* @__PURE__ */ React93.createElement(CalendarTimeField, { granularity }), errorMessage && /* @__PURE__ */ React93.createElement(Text, { slot: "errorMessage", className: errorMessageStyle() }, errorMessage))));
|
|
11338
11482
|
};
|
|
11339
11483
|
DatePickerCalendar.displayName = "DatePicker.Calendar";
|
|
11340
11484
|
var DatePickerField = ({ clearSelectionEnabled = true, disabled = false }) => {
|
|
11341
|
-
return /* @__PURE__ */
|
|
11485
|
+
return /* @__PURE__ */ React93.createElement(FieldGroup, { className: "min-w-[210px] w-auto" }, /* @__PURE__ */ React93.createElement(DateInput, { className: "flex-1" }), /* @__PURE__ */ React93.createElement(Box.Flex, { alignItems: "center", gap: "2" }, clearSelectionEnabled && !disabled && /* @__PURE__ */ React93.createElement(DatePickerClearButton, null), /* @__PURE__ */ React93.createElement(CalendarButton, null)));
|
|
11342
11486
|
};
|
|
11343
11487
|
DatePickerField.displayName = "DatePicker.Field";
|
|
11344
11488
|
var createDatePickerBase = (variant) => {
|
|
@@ -11352,13 +11496,13 @@ var createDatePickerBase = (variant) => {
|
|
|
11352
11496
|
children,
|
|
11353
11497
|
...props
|
|
11354
11498
|
}) => {
|
|
11355
|
-
const content = children ?? /* @__PURE__ */
|
|
11356
|
-
return /* @__PURE__ */
|
|
11499
|
+
const content = children ?? /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DatePickerField, { clearSelectionEnabled, disabled }), /* @__PURE__ */ React93.createElement(DatePickerCalendar, null));
|
|
11500
|
+
return /* @__PURE__ */ React93.createElement(
|
|
11357
11501
|
DatePickerCalendarPropsContext.Provider,
|
|
11358
11502
|
{
|
|
11359
11503
|
value: { variant, granularity: props.granularity, errorMessage, presets }
|
|
11360
11504
|
},
|
|
11361
|
-
/* @__PURE__ */
|
|
11505
|
+
/* @__PURE__ */ React93.createElement(DatePicker, { ...props, variant, isDisabled: disabled, isInvalid: valid === false }, content)
|
|
11362
11506
|
);
|
|
11363
11507
|
};
|
|
11364
11508
|
datePicker.Calendar = DatePickerCalendar;
|
|
@@ -11376,7 +11520,7 @@ var createDatePicker = (variant) => {
|
|
|
11376
11520
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
11377
11521
|
const baseProps = omit8(props, Object.keys(labelControlProps));
|
|
11378
11522
|
const allProps = { ...baseProps, ...fieldProps, ...errorProps, disabled: props.disabled, valid: props.valid };
|
|
11379
|
-
return /* @__PURE__ */
|
|
11523
|
+
return /* @__PURE__ */ React93.createElement(LabelControl, { ...labelProps, ...labelControlProps, messageId: errorMessageId, className: "Aquarium-DatePicker" }, variant === "date" ? /* @__PURE__ */ React93.createElement(DatePickerBase, { ...allProps }) : /* @__PURE__ */ React93.createElement(DateTimePickerBase, { ...allProps }));
|
|
11380
11524
|
};
|
|
11381
11525
|
datePicker.Calendar = DatePickerCalendar;
|
|
11382
11526
|
datePicker.Field = DatePickerField;
|
|
@@ -11387,7 +11531,7 @@ var DatePicker2 = createDatePicker("date");
|
|
|
11387
11531
|
var DateTimePicker = createDatePicker("datetime");
|
|
11388
11532
|
|
|
11389
11533
|
// src/molecules/DatePicker/DateRangePicker.tsx
|
|
11390
|
-
import
|
|
11534
|
+
import React95 from "react";
|
|
11391
11535
|
import {
|
|
11392
11536
|
DateRangePickerStateContext,
|
|
11393
11537
|
Text as Text2
|
|
@@ -11397,7 +11541,7 @@ import { mergeProps as mergeProps4, useId as useId11 } from "@react-aria/utils";
|
|
|
11397
11541
|
import { omit as omit9 } from "lodash-es";
|
|
11398
11542
|
|
|
11399
11543
|
// src/atoms/DatePicker/RangeCalendar.tsx
|
|
11400
|
-
import
|
|
11544
|
+
import React94 from "react";
|
|
11401
11545
|
import {
|
|
11402
11546
|
CalendarCell as CalendarCell2,
|
|
11403
11547
|
CalendarGrid as CalendarGrid2,
|
|
@@ -11437,7 +11581,7 @@ var cell = tv25({
|
|
|
11437
11581
|
}
|
|
11438
11582
|
});
|
|
11439
11583
|
function RangeCalendar(props) {
|
|
11440
|
-
return /* @__PURE__ */
|
|
11584
|
+
return /* @__PURE__ */ React94.createElement(AriaRangeCalendar, { ...props }, /* @__PURE__ */ React94.createElement(CalendarHeader, null), /* @__PURE__ */ React94.createElement(CalendarGrid2, { className: "[&_td]:px-0" }, /* @__PURE__ */ React94.createElement(CalendarGridHeader, null), /* @__PURE__ */ React94.createElement(CalendarGridBody2, null, (date) => /* @__PURE__ */ React94.createElement(CalendarCell2, { date, className: cellContainer() }, ({ formattedDate, isSelected, isSelectionStart, isSelectionEnd, ...rest }) => /* @__PURE__ */ React94.createElement(
|
|
11441
11585
|
"span",
|
|
11442
11586
|
{
|
|
11443
11587
|
className: cell({
|
|
@@ -11451,14 +11595,14 @@ function RangeCalendar(props) {
|
|
|
11451
11595
|
|
|
11452
11596
|
// src/molecules/DatePicker/DateRangePicker.tsx
|
|
11453
11597
|
function DateRangePickerClearButton() {
|
|
11454
|
-
const state =
|
|
11598
|
+
const state = React95.useContext(DateRangePickerStateContext);
|
|
11455
11599
|
if (!state) {
|
|
11456
11600
|
throw new Error("DateRangePickerStateContext is missing a provider");
|
|
11457
11601
|
}
|
|
11458
11602
|
if (!state.value.start && !state.value.end) {
|
|
11459
11603
|
return null;
|
|
11460
11604
|
}
|
|
11461
|
-
return /* @__PURE__ */
|
|
11605
|
+
return /* @__PURE__ */ React95.createElement(
|
|
11462
11606
|
ClearInputButton,
|
|
11463
11607
|
{
|
|
11464
11608
|
onPress: () => {
|
|
@@ -11468,9 +11612,9 @@ function DateRangePickerClearButton() {
|
|
|
11468
11612
|
);
|
|
11469
11613
|
}
|
|
11470
11614
|
var RangeCalendarTimeField = ({ granularity, part, ...props }) => {
|
|
11471
|
-
const ctx =
|
|
11615
|
+
const ctx = React95.useContext(DateRangePickerStateContext);
|
|
11472
11616
|
const labelText = props.labelText ?? (part === "start" ? "Start time" : "End time");
|
|
11473
|
-
return /* @__PURE__ */
|
|
11617
|
+
return /* @__PURE__ */ React95.createElement(
|
|
11474
11618
|
TimeField2,
|
|
11475
11619
|
{
|
|
11476
11620
|
...props,
|
|
@@ -11482,16 +11626,16 @@ var RangeCalendarTimeField = ({ granularity, part, ...props }) => {
|
|
|
11482
11626
|
}
|
|
11483
11627
|
);
|
|
11484
11628
|
};
|
|
11485
|
-
var DateRangePickerCalendarPropsContext =
|
|
11629
|
+
var DateRangePickerCalendarPropsContext = React95.createContext(null);
|
|
11486
11630
|
var DateRangePickerCalendar = (props) => {
|
|
11487
|
-
const ctx =
|
|
11631
|
+
const ctx = React95.useContext(DateRangePickerCalendarPropsContext);
|
|
11488
11632
|
const { variant, granularity, errorMessage, presets = [] } = mergeProps4(ctx, props);
|
|
11489
11633
|
const { dialog, calendar, errorMessage: errorMessageStyle } = datePickerCalendarStyles();
|
|
11490
|
-
return /* @__PURE__ */
|
|
11634
|
+
return /* @__PURE__ */ React95.createElement(Popover, { offset: 0 }, /* @__PURE__ */ React95.createElement(Dialog, { className: dialog() }, presets.length > 0 && /* @__PURE__ */ React95.createElement(Presets, null, presets.map((props2) => /* @__PURE__ */ React95.createElement(RangePreset, { key: `${props2.value.start.toString()}-${props2.value.end.toString()}`, ...props2 }))), /* @__PURE__ */ React95.createElement(Spacing, { gap: "3", className: "p-5" }, /* @__PURE__ */ React95.createElement(RangeCalendar, { className: calendar() }), variant === "datetime" && /* @__PURE__ */ React95.createElement(Box.Flex, { gap: "6" }, /* @__PURE__ */ React95.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React95.createElement(RangeCalendarTimeField, { granularity, part: "start" })), /* @__PURE__ */ React95.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React95.createElement(RangeCalendarTimeField, { granularity, part: "end" }))), errorMessage && /* @__PURE__ */ React95.createElement(Text2, { slot: "errorMessage", className: errorMessageStyle() }, errorMessage))));
|
|
11491
11635
|
};
|
|
11492
11636
|
DateRangePickerCalendar.displayName = "DateRangePicker.Calendar";
|
|
11493
11637
|
var DateRangePickerField = ({ clearSelectionEnabled = true, disabled = false }) => {
|
|
11494
|
-
return /* @__PURE__ */
|
|
11638
|
+
return /* @__PURE__ */ React95.createElement(FieldGroup, { className: "min-w-[200px] w-auto gap-2" }, /* @__PURE__ */ React95.createElement(DateInput, { slot: "start", className: "px-2 py-1" }), /* @__PURE__ */ React95.createElement("span", { "aria-hidden": true, className: "text-muted" }, "-"), /* @__PURE__ */ React95.createElement(DateInput, { slot: "end", className: "flex-1 px-2 py-1" }), /* @__PURE__ */ React95.createElement(Box.Flex, { alignItems: "center", gap: "2" }, clearSelectionEnabled && !disabled && /* @__PURE__ */ React95.createElement(DateRangePickerClearButton, null), /* @__PURE__ */ React95.createElement(CalendarButton, null)));
|
|
11495
11639
|
};
|
|
11496
11640
|
DateRangePickerField.displayName = "DateRangePicker.Field";
|
|
11497
11641
|
var createDateRangePickerBase = (variant) => {
|
|
@@ -11505,13 +11649,13 @@ var createDateRangePickerBase = (variant) => {
|
|
|
11505
11649
|
children,
|
|
11506
11650
|
...props
|
|
11507
11651
|
}) => {
|
|
11508
|
-
const content = children ?? /* @__PURE__ */
|
|
11509
|
-
return /* @__PURE__ */
|
|
11652
|
+
const content = children ?? /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(DateRangePickerField, { clearSelectionEnabled, disabled }), /* @__PURE__ */ React95.createElement(DateRangePickerCalendar, { variant, granularity: props.granularity, errorMessage }));
|
|
11653
|
+
return /* @__PURE__ */ React95.createElement(
|
|
11510
11654
|
DateRangePickerCalendarPropsContext.Provider,
|
|
11511
11655
|
{
|
|
11512
11656
|
value: { variant, granularity: props.granularity, errorMessage, presets }
|
|
11513
11657
|
},
|
|
11514
|
-
/* @__PURE__ */
|
|
11658
|
+
/* @__PURE__ */ React95.createElement(DateRangePicker, { ...props, variant, isDisabled: disabled, isInvalid: valid === false }, content)
|
|
11515
11659
|
);
|
|
11516
11660
|
};
|
|
11517
11661
|
dateRangePicker.Calendar = DateRangePickerCalendar;
|
|
@@ -11529,7 +11673,7 @@ var createDateRangePicker = (variant) => {
|
|
|
11529
11673
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
11530
11674
|
const baseProps = omit9(props, Object.keys(labelControlProps));
|
|
11531
11675
|
const allProps = { ...baseProps, ...fieldProps, ...errorProps, disabled: props.disabled, valid: props.valid };
|
|
11532
|
-
return /* @__PURE__ */
|
|
11676
|
+
return /* @__PURE__ */ React95.createElement(LabelControl, { ...labelProps, ...labelControlProps, messageId: errorMessageId, className: "Aquarium-DatePicker" }, variant === "date" ? /* @__PURE__ */ React95.createElement(DateRangePickerBase, { ...allProps }) : /* @__PURE__ */ React95.createElement(DateTimeRangePickerBase, { ...allProps }));
|
|
11533
11677
|
};
|
|
11534
11678
|
dateRangePicker.Calendar = DateRangePickerCalendar;
|
|
11535
11679
|
dateRangePicker.Field = DateRangePickerField;
|
|
@@ -11540,14 +11684,14 @@ var DateRangePicker2 = createDateRangePicker("date");
|
|
|
11540
11684
|
var DateTimeRangePicker = createDateRangePicker("datetime");
|
|
11541
11685
|
|
|
11542
11686
|
// src/molecules/Dialog/Dialog.tsx
|
|
11543
|
-
import
|
|
11687
|
+
import React96 from "react";
|
|
11544
11688
|
import { useDialog } from "@react-aria/dialog";
|
|
11545
11689
|
import { Overlay, useModalOverlay } from "@react-aria/overlays";
|
|
11546
11690
|
import { useId as useId12 } from "@react-aria/utils";
|
|
11547
11691
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
|
11548
11692
|
import { omit as omit10 } from "lodash-es";
|
|
11549
11693
|
var Dialog2 = (props) => {
|
|
11550
|
-
const ref =
|
|
11694
|
+
const ref = React96.useRef(null);
|
|
11551
11695
|
const { open, onClose } = props;
|
|
11552
11696
|
const state = useOverlayTriggerState2({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose?.() });
|
|
11553
11697
|
const { modalProps, underlayProps } = useModalOverlay(
|
|
@@ -11558,7 +11702,7 @@ var Dialog2 = (props) => {
|
|
|
11558
11702
|
if (!state.isOpen) {
|
|
11559
11703
|
return null;
|
|
11560
11704
|
}
|
|
11561
|
-
return /* @__PURE__ */
|
|
11705
|
+
return /* @__PURE__ */ React96.createElement(Overlay, null, /* @__PURE__ */ React96.createElement(Modal, { className: "Aquarium-Dialog", open: true }, /* @__PURE__ */ React96.createElement(Modal.BackDrop, { ...underlayProps }), /* @__PURE__ */ React96.createElement(Modal.Dialog, { ref, size: "sm", isResponsive: false, ...modalProps }, /* @__PURE__ */ React96.createElement(DialogWrapper, { ...props }))));
|
|
11562
11706
|
};
|
|
11563
11707
|
var DialogWrapper = ({
|
|
11564
11708
|
title,
|
|
@@ -11567,7 +11711,7 @@ var DialogWrapper = ({
|
|
|
11567
11711
|
primaryAction,
|
|
11568
11712
|
secondaryAction
|
|
11569
11713
|
}) => {
|
|
11570
|
-
const ref =
|
|
11714
|
+
const ref = React96.useRef(null);
|
|
11571
11715
|
const labelledBy = useId12();
|
|
11572
11716
|
const describedBy = useId12();
|
|
11573
11717
|
const { dialogProps } = useDialog(
|
|
@@ -11578,34 +11722,34 @@ var DialogWrapper = ({
|
|
|
11578
11722
|
},
|
|
11579
11723
|
ref
|
|
11580
11724
|
);
|
|
11581
|
-
return /* @__PURE__ */
|
|
11725
|
+
return /* @__PURE__ */ React96.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ React96.createElement(Modal.Header, { className: "icon-stroke-2" }, /* @__PURE__ */ React96.createElement(Icon, { icon: DIALOG_ICONS_AND_COLORS[type].icon, color: DIALOG_ICONS_AND_COLORS[type].color, fontSize: 20 }), /* @__PURE__ */ React96.createElement(Modal.Title, { id: labelledBy, variant: "large", color: DIALOG_ICONS_AND_COLORS[type].color }, title)), /* @__PURE__ */ React96.createElement(Modal.Body, { id: describedBy }, /* @__PURE__ */ React96.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React96.createElement(Modal.Footer, null, /* @__PURE__ */ React96.createElement(Modal.Actions, { className: "gap-4" }, secondaryAction && /* @__PURE__ */ React96.createElement(Button2.Ghost, { key: secondaryAction.text, ...omit10(secondaryAction, "text") }, secondaryAction.text), /* @__PURE__ */ React96.createElement(Button2.Secondary, { key: primaryAction.text, ...omit10(primaryAction, "text") }, primaryAction.text))));
|
|
11582
11726
|
};
|
|
11583
11727
|
|
|
11584
11728
|
// src/molecules/Drawer/Drawer.tsx
|
|
11585
|
-
import
|
|
11729
|
+
import React99 from "react";
|
|
11586
11730
|
import { Dialog as AriaDialog3, Modal as AriaModal2, ModalOverlay as AriaModalOverlay2 } from "react-aria-components";
|
|
11587
11731
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
|
11588
11732
|
import { clsx as clsx29 } from "clsx";
|
|
11589
11733
|
import { castArray as castArray4, omit as omit11 } from "lodash-es";
|
|
11590
11734
|
|
|
11591
11735
|
// src/molecules/Modal/ModalTitle.tsx
|
|
11592
|
-
import
|
|
11736
|
+
import React97 from "react";
|
|
11593
11737
|
import { HeadingContext, useContextProps } from "react-aria-components";
|
|
11594
11738
|
var ModalTitle = ({ children, ...props }) => {
|
|
11595
11739
|
const [ctxProps] = useContextProps({ ...props, slot: "title" }, null, HeadingContext);
|
|
11596
|
-
return /* @__PURE__ */
|
|
11740
|
+
return /* @__PURE__ */ React97.createElement(Modal.Title, { id: ctxProps.id, ...props }, children);
|
|
11597
11741
|
};
|
|
11598
11742
|
|
|
11599
11743
|
// src/molecules/Tabs/Tabs.tsx
|
|
11600
|
-
import
|
|
11744
|
+
import React98, { useEffect as useEffect10, useLayoutEffect as useLayoutEffect3, useRef as useRef12, useState as useState10 } from "react";
|
|
11601
11745
|
import { clsx as clsx28 } from "clsx";
|
|
11602
11746
|
import { isNumber as isNumber6, kebabCase } from "lodash-es";
|
|
11603
11747
|
var isTabComponent = (c) => {
|
|
11604
|
-
return
|
|
11748
|
+
return React98.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
|
11605
11749
|
};
|
|
11606
|
-
var Tab =
|
|
11750
|
+
var Tab = React98.forwardRef(
|
|
11607
11751
|
({ className, id, title, children }, ref) => {
|
|
11608
|
-
return /* @__PURE__ */
|
|
11752
|
+
return /* @__PURE__ */ React98.createElement(
|
|
11609
11753
|
"div",
|
|
11610
11754
|
{
|
|
11611
11755
|
ref,
|
|
@@ -11619,10 +11763,10 @@ var Tab = React97.forwardRef(
|
|
|
11619
11763
|
);
|
|
11620
11764
|
}
|
|
11621
11765
|
);
|
|
11622
|
-
var TabContainer = ({ className, children, ...rest }) => /* @__PURE__ */
|
|
11766
|
+
var TabContainer = ({ className, children, ...rest }) => /* @__PURE__ */ React98.createElement("div", { ...rest, className: clsx28("py-6 z-0", className) }, children);
|
|
11623
11767
|
var ModalTab = Tab;
|
|
11624
11768
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11625
|
-
const Tab2 =
|
|
11769
|
+
const Tab2 = React98.forwardRef(
|
|
11626
11770
|
({
|
|
11627
11771
|
id,
|
|
11628
11772
|
value,
|
|
@@ -11641,11 +11785,11 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
|
11641
11785
|
const _id = id ?? kebabCase(title);
|
|
11642
11786
|
let statusIcon = void 0;
|
|
11643
11787
|
if (status === "warning") {
|
|
11644
|
-
statusIcon = /* @__PURE__ */
|
|
11788
|
+
statusIcon = /* @__PURE__ */ React98.createElement(InlineIcon, { icon: warningSign_default, color: "warning-graphic" });
|
|
11645
11789
|
} else if (status === "error") {
|
|
11646
|
-
statusIcon = /* @__PURE__ */
|
|
11790
|
+
statusIcon = /* @__PURE__ */ React98.createElement(InlineIcon, { icon: warningSign_default, color: "danger-graphic" });
|
|
11647
11791
|
}
|
|
11648
|
-
const tab = /* @__PURE__ */
|
|
11792
|
+
const tab = /* @__PURE__ */ React98.createElement(
|
|
11649
11793
|
Component,
|
|
11650
11794
|
{
|
|
11651
11795
|
ref,
|
|
@@ -11667,7 +11811,7 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
|
11667
11811
|
tabIndex: disabled ? void 0 : 0,
|
|
11668
11812
|
...rest
|
|
11669
11813
|
},
|
|
11670
|
-
/* @__PURE__ */
|
|
11814
|
+
/* @__PURE__ */ React98.createElement(
|
|
11671
11815
|
Typography2,
|
|
11672
11816
|
{
|
|
11673
11817
|
htmlTag: "div",
|
|
@@ -11678,20 +11822,20 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
|
11678
11822
|
!selected && !disabled && "group-hover:text-intense group-focus-visible:text-intense"
|
|
11679
11823
|
)
|
|
11680
11824
|
},
|
|
11681
|
-
showNotification ? /* @__PURE__ */
|
|
11825
|
+
showNotification ? /* @__PURE__ */ React98.createElement(
|
|
11682
11826
|
Badge.Notification,
|
|
11683
11827
|
{
|
|
11684
11828
|
right: "-4px",
|
|
11685
11829
|
top: "3px",
|
|
11686
11830
|
className: selected && !disabled ? void 0 : "[color:inherit]"
|
|
11687
11831
|
},
|
|
11688
|
-
/* @__PURE__ */
|
|
11689
|
-
) : /* @__PURE__ */
|
|
11690
|
-
isNumber6(badge) && /* @__PURE__ */
|
|
11832
|
+
/* @__PURE__ */ React98.createElement("span", { className: "whitespace-nowrap" }, title)
|
|
11833
|
+
) : /* @__PURE__ */ React98.createElement("span", { className: "whitespace-nowrap" }, title),
|
|
11834
|
+
isNumber6(badge) && /* @__PURE__ */ React98.createElement(Typography2, { htmlTag: "span", variant: "default", color: "intense", className: "leading-none" }, /* @__PURE__ */ React98.createElement(Badge, { kind: !selected ? "outlined" : "filled", value: badge })),
|
|
11691
11835
|
statusIcon
|
|
11692
11836
|
)
|
|
11693
11837
|
);
|
|
11694
|
-
return tooltip ? /* @__PURE__ */
|
|
11838
|
+
return tooltip ? /* @__PURE__ */ React98.createElement(Tooltip, { content: tooltip }, tab) : tab;
|
|
11695
11839
|
}
|
|
11696
11840
|
);
|
|
11697
11841
|
Tab2.displayName = displayName;
|
|
@@ -11702,19 +11846,19 @@ var CARET_OFFSET = 24;
|
|
|
11702
11846
|
var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderChildren) => {
|
|
11703
11847
|
const Tabs2 = (props) => {
|
|
11704
11848
|
const { className, value, defaultValue, onChange, ["aria-label"]: ariaLabel, children } = props;
|
|
11705
|
-
const childArr =
|
|
11849
|
+
const childArr = React98.Children.toArray(children);
|
|
11706
11850
|
const firstTab = childArr[0];
|
|
11707
11851
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
|
11708
|
-
const [selected, setSelected] =
|
|
11709
|
-
const [leftCaret, showLeftCaret] =
|
|
11710
|
-
const [rightCaret, showRightCaret] =
|
|
11852
|
+
const [selected, setSelected] = useState10(value ?? defaultValue ?? firstTabValue ?? 0);
|
|
11853
|
+
const [leftCaret, showLeftCaret] = useState10(false);
|
|
11854
|
+
const [rightCaret, showRightCaret] = useState10(false);
|
|
11711
11855
|
const parentRef = useRef12(null);
|
|
11712
11856
|
const containerRef = useRef12(null);
|
|
11713
11857
|
const tabsRef = useRef12(null);
|
|
11714
11858
|
const revealSelectedTab = ({ smooth }) => {
|
|
11715
11859
|
const container2 = containerRef.current;
|
|
11716
11860
|
const tabs = tabsRef.current;
|
|
11717
|
-
const values =
|
|
11861
|
+
const values = React98.Children.map(
|
|
11718
11862
|
children,
|
|
11719
11863
|
(tab, i) => tab?.props.value ?? i
|
|
11720
11864
|
);
|
|
@@ -11752,7 +11896,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
|
11752
11896
|
updateCarets();
|
|
11753
11897
|
setSelected(value);
|
|
11754
11898
|
revealSelectedTab({ smooth: value !== selected });
|
|
11755
|
-
}, [value,
|
|
11899
|
+
}, [value, React98.Children.count(children)]);
|
|
11756
11900
|
useLayoutEffect3(() => {
|
|
11757
11901
|
updateCarets();
|
|
11758
11902
|
containerRef.current?.addEventListener("scroll", updateCarets);
|
|
@@ -11814,12 +11958,12 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
|
11814
11958
|
const handleSelected = (key) => {
|
|
11815
11959
|
(onChange ?? setSelected)(key);
|
|
11816
11960
|
};
|
|
11817
|
-
|
|
11961
|
+
React98.Children.forEach(children, (c) => {
|
|
11818
11962
|
if (c && !isTabComponent(c)) {
|
|
11819
11963
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
|
11820
11964
|
}
|
|
11821
11965
|
});
|
|
11822
|
-
return /* @__PURE__ */
|
|
11966
|
+
return /* @__PURE__ */ React98.createElement("div", { ref: parentRef, className: clsx28("Aquarium-Tabs h-full", className) }, /* @__PURE__ */ React98.createElement("div", { className: "relative flex items-center border-b border-muted" }, /* @__PURE__ */ React98.createElement("div", { ref: containerRef, className: "overflow-y-auto scrollbar-hide mb-[-1px] h-auto" }, /* @__PURE__ */ React98.createElement(
|
|
11823
11967
|
"div",
|
|
11824
11968
|
{
|
|
11825
11969
|
ref: tabsRef,
|
|
@@ -11827,9 +11971,9 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
|
11827
11971
|
"aria-label": ariaLabel ? ariaLabel : "tabs",
|
|
11828
11972
|
className: "inline-flex items-center cursor-pointer font-normal h-full"
|
|
11829
11973
|
},
|
|
11830
|
-
|
|
11974
|
+
React98.Children.map(
|
|
11831
11975
|
children,
|
|
11832
|
-
(tab, index) => tab ? /* @__PURE__ */
|
|
11976
|
+
(tab, index) => tab ? /* @__PURE__ */ React98.createElement(
|
|
11833
11977
|
TabItemComponent,
|
|
11834
11978
|
{
|
|
11835
11979
|
key: tab.props.value,
|
|
@@ -11841,26 +11985,26 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
|
11841
11985
|
}
|
|
11842
11986
|
) : void 0
|
|
11843
11987
|
)
|
|
11844
|
-
)), leftCaret && /* @__PURE__ */
|
|
11988
|
+
)), leftCaret && /* @__PURE__ */ React98.createElement("div", { className: "absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4" }, /* @__PURE__ */ React98.createElement(
|
|
11845
11989
|
"div",
|
|
11846
11990
|
{
|
|
11847
11991
|
onClick: () => handleScrollToNext("left"),
|
|
11848
11992
|
className: "hover:bg-muted p-2 leading-none cursor-pointer"
|
|
11849
11993
|
},
|
|
11850
|
-
/* @__PURE__ */
|
|
11851
|
-
)), rightCaret && /* @__PURE__ */
|
|
11994
|
+
/* @__PURE__ */ React98.createElement(InlineIcon, { icon: chevronLeft_default })
|
|
11995
|
+
)), rightCaret && /* @__PURE__ */ React98.createElement(
|
|
11852
11996
|
"div",
|
|
11853
11997
|
{
|
|
11854
11998
|
onClick: () => handleScrollToNext("right"),
|
|
11855
11999
|
className: "absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4"
|
|
11856
12000
|
},
|
|
11857
|
-
/* @__PURE__ */
|
|
12001
|
+
/* @__PURE__ */ React98.createElement(
|
|
11858
12002
|
"div",
|
|
11859
12003
|
{
|
|
11860
12004
|
onClick: () => handleScrollToNext("right"),
|
|
11861
12005
|
className: "hover:bg-muted p-2 leading-none cursor-pointer"
|
|
11862
12006
|
},
|
|
11863
|
-
/* @__PURE__ */
|
|
12007
|
+
/* @__PURE__ */ React98.createElement(InlineIcon, { icon: chevronRight_default })
|
|
11864
12008
|
)
|
|
11865
12009
|
)), renderChildren(children, selected, props));
|
|
11866
12010
|
};
|
|
@@ -11868,7 +12012,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
|
11868
12012
|
Tabs2.Tab = TabComponent;
|
|
11869
12013
|
return Tabs2;
|
|
11870
12014
|
};
|
|
11871
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
|
12015
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React98.createElement(TabContainer, null, children.find(
|
|
11872
12016
|
(node, index) => node?.props.value === selected || index === selected
|
|
11873
12017
|
)));
|
|
11874
12018
|
|
|
@@ -11894,7 +12038,7 @@ var Drawer = ({
|
|
|
11894
12038
|
secondaryActions,
|
|
11895
12039
|
closeOnEsc = true
|
|
11896
12040
|
}) => {
|
|
11897
|
-
const [hidden, setHidden] =
|
|
12041
|
+
const [hidden, setHidden] = React99.useState(!open);
|
|
11898
12042
|
if (open && hidden) {
|
|
11899
12043
|
setHidden(!open);
|
|
11900
12044
|
}
|
|
@@ -11917,10 +12061,10 @@ var Drawer = ({
|
|
|
11917
12061
|
}
|
|
11918
12062
|
const dialogSize = size === "lg" ? "full" : size;
|
|
11919
12063
|
const styles = modalStyles({ kind: "drawer", size: dialogSize });
|
|
11920
|
-
const childElements =
|
|
12064
|
+
const childElements = React99.Children.toArray(children).filter(React99.isValidElement);
|
|
11921
12065
|
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
|
11922
12066
|
const hasTabs = isComponentType(onlyChild, Tabs);
|
|
11923
|
-
return /* @__PURE__ */
|
|
12067
|
+
return /* @__PURE__ */ React99.createElement(
|
|
11924
12068
|
AriaModalOverlay2,
|
|
11925
12069
|
{
|
|
11926
12070
|
isOpen: !hidden,
|
|
@@ -11929,27 +12073,27 @@ var Drawer = ({
|
|
|
11929
12073
|
isKeyboardDismissDisabled: !closeOnEsc,
|
|
11930
12074
|
className: styles.overlay({ className: "Aquarium-Drawer" })
|
|
11931
12075
|
},
|
|
11932
|
-
/* @__PURE__ */
|
|
11933
|
-
/* @__PURE__ */
|
|
12076
|
+
/* @__PURE__ */ React99.createElement(AnimatedBackDrop, { style: { opacity } }),
|
|
12077
|
+
/* @__PURE__ */ React99.createElement(AriaModal2, null, /* @__PURE__ */ React99.createElement(AnimatedDialog, { kind: "drawer", "aria-modal": "true", size: dialogSize, style: { position: "fixed", right } }, /* @__PURE__ */ React99.createElement(AriaDialog3, { className: "flex flex-col grow overflow-y-auto" }, ({ close }) => /* @__PURE__ */ React99.createElement(React99.Fragment, null, /* @__PURE__ */ React99.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React99.createElement(Button2.Icon, { "aria-label": "Close", icon: cross_default, onClick: close })), /* @__PURE__ */ React99.createElement(Modal.Header, { className: clsx29({ "pb-3": hasTabs }) }, /* @__PURE__ */ React99.createElement(ModalTitle, { kind: "drawer" }, title)), hasTabs ? /* @__PURE__ */ React99.createElement(
|
|
11934
12078
|
DrawerTabs,
|
|
11935
12079
|
{
|
|
11936
12080
|
...onlyChild.props,
|
|
11937
12081
|
className: "[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto"
|
|
11938
12082
|
}
|
|
11939
|
-
) : /* @__PURE__ */
|
|
12083
|
+
) : /* @__PURE__ */ React99.createElement(Modal.Body, { tabIndex: 0, noFooter: !(secondaryActions ?? primaryAction) }, children), (secondaryActions ?? primaryAction) && /* @__PURE__ */ React99.createElement(Modal.Footer, null, /* @__PURE__ */ React99.createElement(Modal.Actions, { className: size === "sm" ? "flex-col" : void 0 }, size !== "sm" && menu && /* @__PURE__ */ React99.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React99.createElement(DropdownMenu2, { onAction: (action) => onAction(action), onOpenChange: onMenuOpenChange }, /* @__PURE__ */ React99.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React99.createElement(Button2.Icon, { "aria-label": menuAriaLabel ?? "Context menu", icon: more_default })), menu)), secondaryActions && castArray4(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React99.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React99.createElement(Button2.Primary, { key: primaryAction.text, ...omit11(primaryAction, "text") }, primaryAction.text)))))))
|
|
11940
12084
|
);
|
|
11941
12085
|
};
|
|
11942
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
|
12086
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React99.createElement(Modal.Body, { className: "h-full" }, /* @__PURE__ */ React99.createElement(TabContainer, { className: "!py-4" }, children.find(
|
|
11943
12087
|
(node, index) => node?.props.value === selected || index === selected
|
|
11944
12088
|
))));
|
|
11945
12089
|
|
|
11946
12090
|
// src/molecules/Dropdown/Dropdown.tsx
|
|
11947
|
-
import
|
|
12091
|
+
import React101 from "react";
|
|
11948
12092
|
import { OverlayTriggerStateContext as OverlayTriggerStateContext2 } from "react-aria-components";
|
|
11949
12093
|
import { clsx as clsx30 } from "clsx";
|
|
11950
12094
|
|
|
11951
12095
|
// src/molecules/Popover/Popover.tsx
|
|
11952
|
-
import
|
|
12096
|
+
import React100, { createContext as createContext6 } from "react";
|
|
11953
12097
|
import { DialogTrigger, OverlayTriggerStateContext } from "react-aria-components";
|
|
11954
12098
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
11955
12099
|
var PopoverPropsContext = createContext6({});
|
|
@@ -11958,32 +12102,32 @@ var Popover2 = ({ children, onOpenChange: _onOpenChange, onClose, onOpen, ...pro
|
|
|
11958
12102
|
_onOpenChange?.(isOpen);
|
|
11959
12103
|
isOpen ? onOpen?.() : onClose?.();
|
|
11960
12104
|
};
|
|
11961
|
-
return /* @__PURE__ */
|
|
12105
|
+
return /* @__PURE__ */ React100.createElement(PopoverPropsContext.Provider, { value: props }, /* @__PURE__ */ React100.createElement(DialogTrigger, { ...props, onOpenChange }, children));
|
|
11962
12106
|
};
|
|
11963
12107
|
Popover2.displayName = "Popover";
|
|
11964
12108
|
var Trigger = ({ children }) => {
|
|
11965
|
-
return /* @__PURE__ */
|
|
12109
|
+
return /* @__PURE__ */ React100.createElement(Pressable, { "aria-haspopup": "true" }, children);
|
|
11966
12110
|
};
|
|
11967
12111
|
Trigger.displayName = "Popover.Trigger";
|
|
11968
12112
|
Popover2.Trigger = Trigger;
|
|
11969
12113
|
var Panel = ({ className, children }) => {
|
|
11970
|
-
const { offset = 0, onOpenChange, ...props } =
|
|
11971
|
-
return /* @__PURE__ */
|
|
12114
|
+
const { offset = 0, onOpenChange, ...props } = React100.useContext(PopoverPropsContext);
|
|
12115
|
+
return /* @__PURE__ */ React100.createElement(Popover, { ...props, className, offset }, /* @__PURE__ */ React100.createElement(Dialog, null, children));
|
|
11972
12116
|
};
|
|
11973
12117
|
Panel.displayName = "Popover.Panel";
|
|
11974
12118
|
Popover2.Panel = Panel;
|
|
11975
12119
|
var CloseToggle = ({ children }) => {
|
|
11976
|
-
const ctx =
|
|
12120
|
+
const ctx = React100.useContext(OverlayTriggerStateContext);
|
|
11977
12121
|
const onClick = ctx?.close;
|
|
11978
|
-
const child =
|
|
11979
|
-
return
|
|
12122
|
+
const child = React100.Children.only(children);
|
|
12123
|
+
return React100.cloneElement(child, { ...mergeProps5(child.props, { onClick }) });
|
|
11980
12124
|
};
|
|
11981
12125
|
CloseToggle.displayName = "Popover.CloseToggle";
|
|
11982
12126
|
Popover2.CloseToggle = CloseToggle;
|
|
11983
12127
|
|
|
11984
12128
|
// src/molecules/Dropdown/Dropdown.tsx
|
|
11985
12129
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
|
11986
|
-
return /* @__PURE__ */
|
|
12130
|
+
return /* @__PURE__ */ React101.createElement(Popover2, { placement }, /* @__PURE__ */ React101.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React101.createElement(Popover2.Panel, { className: "Aquarium-Dropdown" }, content));
|
|
11987
12131
|
};
|
|
11988
12132
|
var DropdownMenu3 = ({
|
|
11989
12133
|
title,
|
|
@@ -11992,13 +12136,13 @@ var DropdownMenu3 = ({
|
|
|
11992
12136
|
triggerId,
|
|
11993
12137
|
setClose = () => void 0
|
|
11994
12138
|
}) => {
|
|
11995
|
-
const menuRef =
|
|
11996
|
-
|
|
12139
|
+
const menuRef = React101.useRef(null);
|
|
12140
|
+
React101.useEffect(() => {
|
|
11997
12141
|
const id = setTimeout(() => (menuRef.current?.children[0]).focus());
|
|
11998
12142
|
return () => clearTimeout(id);
|
|
11999
12143
|
}, [menuRef.current]);
|
|
12000
|
-
return /* @__PURE__ */
|
|
12001
|
-
return
|
|
12144
|
+
return /* @__PURE__ */ React101.createElement("div", { style: { minWidth: "250px" }, className: "py-3 bg-overlay" }, !!title && /* @__PURE__ */ React101.createElement("div", { className: "px-4 py-4 text-left text-intense typography-default-strong" }, title), /* @__PURE__ */ React101.createElement("ol", { role: "menu", ref: menuRef, id: contentId, "aria-labelledby": triggerId }, React101.Children.map(children, (child) => {
|
|
12145
|
+
return React101.cloneElement(child, { setClose });
|
|
12002
12146
|
})));
|
|
12003
12147
|
};
|
|
12004
12148
|
var DropdownItem = ({
|
|
@@ -12011,7 +12155,7 @@ var DropdownItem = ({
|
|
|
12011
12155
|
setClose = () => void 0,
|
|
12012
12156
|
...props
|
|
12013
12157
|
}) => {
|
|
12014
|
-
const ctx =
|
|
12158
|
+
const ctx = React101.useContext(OverlayTriggerStateContext2);
|
|
12015
12159
|
const handleSelect = () => {
|
|
12016
12160
|
onSelect?.();
|
|
12017
12161
|
ctx?.close();
|
|
@@ -12045,8 +12189,8 @@ var DropdownItem = ({
|
|
|
12045
12189
|
handleSelect();
|
|
12046
12190
|
}
|
|
12047
12191
|
};
|
|
12048
|
-
const itemContent = /* @__PURE__ */
|
|
12049
|
-
return /* @__PURE__ */
|
|
12192
|
+
const itemContent = /* @__PURE__ */ React101.createElement("div", { className: "py-3 px-4" }, children);
|
|
12193
|
+
return /* @__PURE__ */ React101.createElement(
|
|
12050
12194
|
"li",
|
|
12051
12195
|
{
|
|
12052
12196
|
role: "menuitem",
|
|
@@ -12060,14 +12204,14 @@ var DropdownItem = ({
|
|
|
12060
12204
|
"text-danger-default": color === "danger" && !disabled
|
|
12061
12205
|
})
|
|
12062
12206
|
},
|
|
12063
|
-
tooltip ? /* @__PURE__ */
|
|
12207
|
+
tooltip ? /* @__PURE__ */ React101.createElement(Tooltip, { content: tooltip, placement: tooltipPlacement, display: "block" }, /* @__PURE__ */ React101.createElement("div", { tabIndex: 0, className: "grow" }, itemContent)) : itemContent
|
|
12064
12208
|
);
|
|
12065
12209
|
};
|
|
12066
12210
|
Dropdown.Menu = DropdownMenu3;
|
|
12067
12211
|
Dropdown.Item = DropdownItem;
|
|
12068
12212
|
|
|
12069
12213
|
// src/molecules/EmptyState/EmptyState.tsx
|
|
12070
|
-
import
|
|
12214
|
+
import React102 from "react";
|
|
12071
12215
|
import { tv as tv26 } from "tailwind-variants";
|
|
12072
12216
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
|
12073
12217
|
EmptyStateLayout2["Vertical"] = "vertical";
|
|
@@ -12121,7 +12265,7 @@ var EmptyState2 = ({
|
|
|
12121
12265
|
borderStyle = "dashed",
|
|
12122
12266
|
fullHeight = isVerticalLayout(layout) ? true : false
|
|
12123
12267
|
}) => {
|
|
12124
|
-
return /* @__PURE__ */
|
|
12268
|
+
return /* @__PURE__ */ React102.createElement(
|
|
12125
12269
|
Box.Flex,
|
|
12126
12270
|
{
|
|
12127
12271
|
className: emptyStateClasses({
|
|
@@ -12130,30 +12274,30 @@ var EmptyState2 = ({
|
|
|
12130
12274
|
fullHeight
|
|
12131
12275
|
})
|
|
12132
12276
|
},
|
|
12133
|
-
Image2 && (typeof Image2 === "string" ? /* @__PURE__ */
|
|
12277
|
+
Image2 && (typeof Image2 === "string" ? /* @__PURE__ */ React102.createElement(
|
|
12134
12278
|
"img",
|
|
12135
12279
|
{
|
|
12136
12280
|
src: Image2,
|
|
12137
12281
|
alt: imageAlt,
|
|
12138
12282
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
|
12139
12283
|
}
|
|
12140
|
-
) : /* @__PURE__ */
|
|
12141
|
-
/* @__PURE__ */
|
|
12284
|
+
) : /* @__PURE__ */ React102.createElement("div", { className: "animate-draw" }, /* @__PURE__ */ React102.createElement(Image2, null))),
|
|
12285
|
+
/* @__PURE__ */ React102.createElement(
|
|
12142
12286
|
Box.Flex,
|
|
12143
12287
|
{
|
|
12144
12288
|
className: emptyStateContentClasses({
|
|
12145
12289
|
layout: isVerticalLayout(layout) ? "vertical" : "horizontal"
|
|
12146
12290
|
})
|
|
12147
12291
|
},
|
|
12148
|
-
/* @__PURE__ */
|
|
12149
|
-
(secondaryAction ?? primaryAction) && /* @__PURE__ */
|
|
12150
|
-
footer && /* @__PURE__ */
|
|
12292
|
+
/* @__PURE__ */ React102.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React102.createElement(Typography2.Subheading, { htmlTag: "h2" }, title), children && /* @__PURE__ */ React102.createElement(Box, { width: isVerticalLayout(layout) ? "3/4" : "full", marginX: "auto" }, /* @__PURE__ */ React102.createElement(Typography2.Default, null, children))),
|
|
12293
|
+
(secondaryAction ?? primaryAction) && /* @__PURE__ */ React102.createElement(Box.Flex, { gap: "4", justifyContent: "center", alignItems: "center", flexWrap: "wrap" }, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })),
|
|
12294
|
+
footer && /* @__PURE__ */ React102.createElement(Box, null, /* @__PURE__ */ React102.createElement(Typography2.Small, { color: "default" }, footer))
|
|
12151
12295
|
)
|
|
12152
12296
|
);
|
|
12153
12297
|
};
|
|
12154
12298
|
|
|
12155
12299
|
// src/atoms/Filter/Filter.tsx
|
|
12156
|
-
import
|
|
12300
|
+
import React103 from "react";
|
|
12157
12301
|
import {
|
|
12158
12302
|
Button as AriaButton4,
|
|
12159
12303
|
DatePickerStateContext as AriaDatePickerStateContext2,
|
|
@@ -12194,8 +12338,8 @@ var FilterTrigger = ({
|
|
|
12194
12338
|
clearSelectionEnabled = true,
|
|
12195
12339
|
...props
|
|
12196
12340
|
}) => {
|
|
12197
|
-
const ariaDatePickerState =
|
|
12198
|
-
const ariaDateRangePickerState =
|
|
12341
|
+
const ariaDatePickerState = React103.useContext(AriaDatePickerStateContext2);
|
|
12342
|
+
const ariaDateRangePickerState = React103.useContext(AriaDateRangePickerStateContext2);
|
|
12199
12343
|
const isUsedInsideDatePicker = !!ariaDatePickerState?.value;
|
|
12200
12344
|
const isUsedInsideDateRangePicker = !!ariaDateRangePickerState?.value.start && !!ariaDateRangePickerState.value.end;
|
|
12201
12345
|
const onClearDatePickerRelated = () => {
|
|
@@ -12207,14 +12351,14 @@ var FilterTrigger = ({
|
|
|
12207
12351
|
};
|
|
12208
12352
|
const hasValue = !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker;
|
|
12209
12353
|
const showClearButton = clearSelectionEnabled && (!!onClear && !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker);
|
|
12210
|
-
return /* @__PURE__ */
|
|
12354
|
+
return /* @__PURE__ */ React103.createElement(
|
|
12211
12355
|
AriaGroup,
|
|
12212
12356
|
{
|
|
12213
12357
|
...props,
|
|
12214
12358
|
isInvalid: error,
|
|
12215
12359
|
className: (renderProps) => filterWrapper({ ...renderProps, hasValue: hasValue || !!badge })
|
|
12216
12360
|
},
|
|
12217
|
-
/* @__PURE__ */
|
|
12361
|
+
/* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(
|
|
12218
12362
|
AriaButton4,
|
|
12219
12363
|
{
|
|
12220
12364
|
onPress: () => {
|
|
@@ -12226,7 +12370,7 @@ var FilterTrigger = ({
|
|
|
12226
12370
|
"px-4": !showClearButton
|
|
12227
12371
|
})
|
|
12228
12372
|
},
|
|
12229
|
-
/* @__PURE__ */
|
|
12373
|
+
/* @__PURE__ */ React103.createElement("div", { className: "flex items-center gap-3 divide-x divide-grey-20" }, /* @__PURE__ */ React103.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ React103.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React103.createElement(InlineIcon, { icon }), /* @__PURE__ */ React103.createElement(Typography2.Default, null, labelText)), badge && /* @__PURE__ */ React103.createElement(Typography2, { color: "primary-default", className: "flex items-center" }, /* @__PURE__ */ React103.createElement(Badge, { dense: true, value: badge }))), hasValue && /* @__PURE__ */ React103.createElement("div", { className: "pl-3" }, /* @__PURE__ */ React103.createElement(
|
|
12230
12374
|
Typography2.Default,
|
|
12231
12375
|
{
|
|
12232
12376
|
className: clsx31("truncate", {
|
|
@@ -12237,10 +12381,10 @@ var FilterTrigger = ({
|
|
|
12237
12381
|
color: error ? "danger-default" : "primary-default"
|
|
12238
12382
|
},
|
|
12239
12383
|
value,
|
|
12240
|
-
isUsedInsideDatePicker && /* @__PURE__ */
|
|
12241
|
-
isUsedInsideDateRangePicker && /* @__PURE__ */
|
|
12384
|
+
isUsedInsideDatePicker && /* @__PURE__ */ React103.createElement(DateDisplay, { state: ariaDatePickerState }),
|
|
12385
|
+
isUsedInsideDateRangePicker && /* @__PURE__ */ React103.createElement(DateDisplay, { state: ariaDateRangePickerState })
|
|
12242
12386
|
)))
|
|
12243
|
-
), showClearButton && /* @__PURE__ */
|
|
12387
|
+
), showClearButton && /* @__PURE__ */ React103.createElement(
|
|
12244
12388
|
FilterClearButton,
|
|
12245
12389
|
{
|
|
12246
12390
|
onClear: () => {
|
|
@@ -12257,11 +12401,11 @@ var isDateRangePickerState = (state) => {
|
|
|
12257
12401
|
var DateDisplay = ({ state }) => {
|
|
12258
12402
|
const primary = isDateRangePickerState(state) ? state.formatValue(DATE_FORMAT_OPTIONS.locale, DATE_FORMAT_OPTIONS.options)?.start : state.formatValue(DATE_FORMAT_OPTIONS.locale, DATE_FORMAT_OPTIONS.options);
|
|
12259
12403
|
const secondary = isDateRangePickerState(state) ? state.formatValue(DATE_FORMAT_OPTIONS.locale, DATE_FORMAT_OPTIONS.options)?.end : void 0;
|
|
12260
|
-
return /* @__PURE__ */
|
|
12404
|
+
return /* @__PURE__ */ React103.createElement(Box.Flex, { gap: "2" }, /* @__PURE__ */ React103.createElement("span", null, primary), secondary && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement("span", { "aria-hidden": true, className: "text-muted" }, "-"), /* @__PURE__ */ React103.createElement("span", null, secondary)));
|
|
12261
12405
|
};
|
|
12262
12406
|
var FilterClearButton = ({ onClear }) => (
|
|
12263
12407
|
// using a native HTML <button> here instead of <Button slot={null} /> from react-aria because react-aria <DialogTrigger> doesn't support it as a child. If we used <Button slot={null}>, the popover would open simultaneously with the clear callback, which is unintended behavior. Interestingly, this issue doesn't occur in react-aria's <DatePicker>, but for consistency and to avoid conflicts here, we're sticking with a plain button.
|
|
12264
|
-
/* @__PURE__ */
|
|
12408
|
+
/* @__PURE__ */ React103.createElement(
|
|
12265
12409
|
"button",
|
|
12266
12410
|
{
|
|
12267
12411
|
"aria-label": "Clear filter",
|
|
@@ -12276,7 +12420,7 @@ var FilterClearButton = ({ onClear }) => (
|
|
|
12276
12420
|
},
|
|
12277
12421
|
className: "py-[10px] pl-[6px] pr-4 inline-flex items-center hover:bg-medium focus:bg-medium outline-0 outline-none rounded-r-full"
|
|
12278
12422
|
},
|
|
12279
|
-
/* @__PURE__ */
|
|
12423
|
+
/* @__PURE__ */ React103.createElement(InlineIcon, { icon: cross_default })
|
|
12280
12424
|
)
|
|
12281
12425
|
);
|
|
12282
12426
|
var Filter = () => null;
|
|
@@ -12284,7 +12428,7 @@ FilterTrigger.displayName = "Filter.Trigger";
|
|
|
12284
12428
|
Filter.Trigger = FilterTrigger;
|
|
12285
12429
|
|
|
12286
12430
|
// src/molecules/LineClamp/LineClamp.tsx
|
|
12287
|
-
import
|
|
12431
|
+
import React104 from "react";
|
|
12288
12432
|
var LineClamp2 = ({
|
|
12289
12433
|
lines,
|
|
12290
12434
|
children,
|
|
@@ -12293,10 +12437,10 @@ var LineClamp2 = ({
|
|
|
12293
12437
|
collapseLabel,
|
|
12294
12438
|
onClampedChange
|
|
12295
12439
|
}) => {
|
|
12296
|
-
const ref =
|
|
12297
|
-
const [clamped, setClamped] =
|
|
12298
|
-
const [isClampingEnabled, setClampingEnabled] =
|
|
12299
|
-
|
|
12440
|
+
const ref = React104.useRef(null);
|
|
12441
|
+
const [clamped, setClamped] = React104.useState(true);
|
|
12442
|
+
const [isClampingEnabled, setClampingEnabled] = React104.useState(false);
|
|
12443
|
+
React104.useEffect(() => {
|
|
12300
12444
|
const el = ref.current;
|
|
12301
12445
|
setClampingEnabled((el?.scrollHeight ?? 0) > (el?.clientHeight ?? 0));
|
|
12302
12446
|
}, [ref.current]);
|
|
@@ -12304,25 +12448,25 @@ var LineClamp2 = ({
|
|
|
12304
12448
|
setClamped(!clamped);
|
|
12305
12449
|
onClampedChange?.(!clamped);
|
|
12306
12450
|
};
|
|
12307
|
-
return /* @__PURE__ */
|
|
12451
|
+
return /* @__PURE__ */ React104.createElement("div", { className: "Aquarium-LineClamp" }, /* @__PURE__ */ React104.createElement(LineClamp, { ref, lines, clamped, wordBreak }, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React104.createElement(Button2.Ghost, { dense: true, onClick: handleClampedChange }, clamped ? expandLabel : collapseLabel));
|
|
12308
12452
|
};
|
|
12309
12453
|
|
|
12310
12454
|
// src/molecules/List/useStaticInfiniteList.ts
|
|
12311
|
-
import
|
|
12455
|
+
import React105 from "react";
|
|
12312
12456
|
var useStaticInfiniteList = ({
|
|
12313
12457
|
items,
|
|
12314
12458
|
pageSize,
|
|
12315
12459
|
autoReset = true
|
|
12316
12460
|
}) => {
|
|
12317
|
-
const [currentPage, setCurrentPage] =
|
|
12461
|
+
const [currentPage, setCurrentPage] = React105.useState(1);
|
|
12318
12462
|
const numberOfVisible = currentPage * pageSize;
|
|
12319
|
-
const next =
|
|
12463
|
+
const next = React105.useCallback(() => {
|
|
12320
12464
|
setCurrentPage((page) => page + 1);
|
|
12321
12465
|
}, [setCurrentPage]);
|
|
12322
|
-
const reset =
|
|
12466
|
+
const reset = React105.useCallback(() => {
|
|
12323
12467
|
setCurrentPage(1);
|
|
12324
12468
|
}, [setCurrentPage]);
|
|
12325
|
-
|
|
12469
|
+
React105.useEffect(() => {
|
|
12326
12470
|
if (autoReset) {
|
|
12327
12471
|
setCurrentPage(1);
|
|
12328
12472
|
}
|
|
@@ -12337,9 +12481,9 @@ var useStaticInfiniteList = ({
|
|
|
12337
12481
|
};
|
|
12338
12482
|
|
|
12339
12483
|
// src/molecules/ListItem/ListItem.tsx
|
|
12340
|
-
import
|
|
12484
|
+
import React106 from "react";
|
|
12341
12485
|
var ListItem = ({ name, icon, active = false }) => {
|
|
12342
|
-
return /* @__PURE__ */
|
|
12486
|
+
return /* @__PURE__ */ React106.createElement(Box.Flex, { className: "Aquarium-ListItem", alignItems: "center" }, /* @__PURE__ */ React106.createElement(
|
|
12343
12487
|
Typography2,
|
|
12344
12488
|
{
|
|
12345
12489
|
variant: active ? "default-strong" : "default",
|
|
@@ -12347,13 +12491,13 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
|
12347
12491
|
htmlTag: "span",
|
|
12348
12492
|
className: `px-4 py-2 rounded-full ${active ? "bg-medium" : "hover:bg-muted"}`
|
|
12349
12493
|
},
|
|
12350
|
-
/* @__PURE__ */
|
|
12494
|
+
/* @__PURE__ */ React106.createElement("img", { src: icon, alt: "", className: "inline mr-4", height: 28, width: 28 }),
|
|
12351
12495
|
name
|
|
12352
12496
|
));
|
|
12353
12497
|
};
|
|
12354
12498
|
|
|
12355
12499
|
// src/molecules/Modal/Modal.tsx
|
|
12356
|
-
import
|
|
12500
|
+
import React107 from "react";
|
|
12357
12501
|
import { Dialog as AriaDialog4, Modal as AriaModal3, ModalOverlay as AriaModalOverlay3 } from "react-aria-components";
|
|
12358
12502
|
import { clsx as clsx32 } from "clsx";
|
|
12359
12503
|
import { castArray as castArray5, isEmpty as isEmpty2, omit as omit12 } from "lodash-es";
|
|
@@ -12375,7 +12519,7 @@ var Modal2 = ({
|
|
|
12375
12519
|
const styles = modalStyles({ kind: "dialog", size });
|
|
12376
12520
|
const hasTabs = isComponentType(children, ModalTabs);
|
|
12377
12521
|
const hasActions = secondaryActions && !isEmpty2(secondaryActions) || primaryAction;
|
|
12378
|
-
return /* @__PURE__ */
|
|
12522
|
+
return /* @__PURE__ */ React107.createElement(
|
|
12379
12523
|
AriaModalOverlay3,
|
|
12380
12524
|
{
|
|
12381
12525
|
isOpen: open,
|
|
@@ -12384,43 +12528,43 @@ var Modal2 = ({
|
|
|
12384
12528
|
isKeyboardDismissDisabled: !closeOnEsc,
|
|
12385
12529
|
className: styles.overlay({ className: "Aquarium-Modal" })
|
|
12386
12530
|
},
|
|
12387
|
-
size !== "screen" && /* @__PURE__ */
|
|
12388
|
-
/* @__PURE__ */
|
|
12531
|
+
size !== "screen" && /* @__PURE__ */ React107.createElement(Modal.BackDrop, { className: styles.backdrop() }),
|
|
12532
|
+
/* @__PURE__ */ React107.createElement(AriaModal3, { className: styles.dialog() }, /* @__PURE__ */ React107.createElement(AriaDialog4, { className: "flex flex-col grow overflow-y-auto outline-none" }, ({ close }) => /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React107.createElement(Button2.Icon, { "aria-label": "Close", icon: cross_default, onClick: close })), headerImage !== void 0 && /* @__PURE__ */ React107.createElement(Modal.HeaderImage, { backgroundImage: headerImage }), /* @__PURE__ */ React107.createElement(
|
|
12389
12533
|
Modal.Header,
|
|
12390
12534
|
{
|
|
12391
12535
|
kind: "dialog",
|
|
12392
12536
|
size,
|
|
12393
12537
|
className: clsx32({ "pb-3": isComponentType(children, ModalTabs) })
|
|
12394
12538
|
},
|
|
12395
|
-
/* @__PURE__ */
|
|
12396
|
-
), hasTabs ?
|
|
12539
|
+
/* @__PURE__ */ React107.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React107.createElement(ModalTitle, { kind: "dialog" }, title), subtitle && /* @__PURE__ */ React107.createElement(Modal.Subtitle, null, subtitle))
|
|
12540
|
+
), hasTabs ? React107.cloneElement(children, { className: "[&>div:first-child]:px-5 grow" }) : /* @__PURE__ */ React107.createElement(Modal.Body, { tabIndex: 0, noFooter: !hasActions, size }, children), hasActions && /* @__PURE__ */ React107.createElement(Modal.Footer, null, /* @__PURE__ */ React107.createElement(Modal.Actions, null, secondaryActions && castArray5(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React107.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React107.createElement(Button2.Primary, { key: primaryAction.text, ...omit12(primaryAction, "text") }, primaryAction.text))))))
|
|
12397
12541
|
);
|
|
12398
12542
|
};
|
|
12399
12543
|
var ModalTabs = createTabsComponent(
|
|
12400
12544
|
ModalTab,
|
|
12401
12545
|
TabItem,
|
|
12402
12546
|
"ModalTabs",
|
|
12403
|
-
(children, selected, props) => /* @__PURE__ */
|
|
12547
|
+
(children, selected, props) => /* @__PURE__ */ React107.createElement(Modal.Body, { maxHeight: props.maxHeight }, /* @__PURE__ */ React107.createElement(TabContainer, { className: "!py-4" }, children.find(
|
|
12404
12548
|
(node, index) => node?.props.value === selected || index === selected
|
|
12405
12549
|
)))
|
|
12406
12550
|
);
|
|
12407
12551
|
|
|
12408
12552
|
// src/molecules/MultiInput/MultiInput.tsx
|
|
12409
|
-
import
|
|
12553
|
+
import React109, { useEffect as useEffect11, useRef as useRef13, useState as useState11 } from "react";
|
|
12410
12554
|
import { useId as useId13 } from "@react-aria/utils";
|
|
12411
12555
|
import { castArray as castArray6, identity, omit as omit13 } from "lodash-es";
|
|
12412
12556
|
|
|
12413
12557
|
// src/molecules/MultiInput/InputChip.tsx
|
|
12414
|
-
import
|
|
12558
|
+
import React108 from "react";
|
|
12415
12559
|
import { clsx as clsx33 } from "clsx";
|
|
12416
|
-
var InputChip =
|
|
12560
|
+
var InputChip = React108.forwardRef(
|
|
12417
12561
|
({ invalid = false, disabled, readOnly, className, onClick: _onClick, children, ...props }, ref) => {
|
|
12418
12562
|
const onClick = (e) => {
|
|
12419
12563
|
if (!disabled && !readOnly) {
|
|
12420
12564
|
_onClick?.(e);
|
|
12421
12565
|
}
|
|
12422
12566
|
};
|
|
12423
|
-
return /* @__PURE__ */
|
|
12567
|
+
return /* @__PURE__ */ React108.createElement(
|
|
12424
12568
|
"div",
|
|
12425
12569
|
{
|
|
12426
12570
|
className: clsx33(
|
|
@@ -12433,8 +12577,8 @@ var InputChip = React107.forwardRef(
|
|
|
12433
12577
|
}
|
|
12434
12578
|
)
|
|
12435
12579
|
},
|
|
12436
|
-
/* @__PURE__ */
|
|
12437
|
-
!readOnly && /* @__PURE__ */
|
|
12580
|
+
/* @__PURE__ */ React108.createElement("div", { className: "px-2 py-1" }, /* @__PURE__ */ React108.createElement(Typography2, { variant: "default", color: invalid ? "danger-default" : disabled ? "inactive" : "default" }, children)),
|
|
12581
|
+
!readOnly && /* @__PURE__ */ React108.createElement(
|
|
12438
12582
|
"div",
|
|
12439
12583
|
{
|
|
12440
12584
|
ref,
|
|
@@ -12448,7 +12592,7 @@ var InputChip = React107.forwardRef(
|
|
|
12448
12592
|
role: "button",
|
|
12449
12593
|
"aria-label": `Remove ${String(children)}`
|
|
12450
12594
|
},
|
|
12451
|
-
!disabled && /* @__PURE__ */
|
|
12595
|
+
!disabled && /* @__PURE__ */ React108.createElement(
|
|
12452
12596
|
Icon,
|
|
12453
12597
|
{
|
|
12454
12598
|
icon: smallCross_default,
|
|
@@ -12488,8 +12632,8 @@ var MultiInputBase = ({
|
|
|
12488
12632
|
...props
|
|
12489
12633
|
}) => {
|
|
12490
12634
|
const inputRef = useRef13(null);
|
|
12491
|
-
const [items, setItems] =
|
|
12492
|
-
const [hasFocus, setFocus] =
|
|
12635
|
+
const [items, setItems] = useState11(value ?? defaultValue ?? []);
|
|
12636
|
+
const [hasFocus, setFocus] = useState11(false);
|
|
12493
12637
|
const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
|
|
12494
12638
|
useEffect11(() => {
|
|
12495
12639
|
const requiresUpdate = value !== void 0 || defaultValue === void 0;
|
|
@@ -12566,7 +12710,7 @@ var MultiInputBase = ({
|
|
|
12566
12710
|
}
|
|
12567
12711
|
onBlur?.();
|
|
12568
12712
|
};
|
|
12569
|
-
const renderChips = () => items.map((item, index) => /* @__PURE__ */
|
|
12713
|
+
const renderChips = () => items.map((item, index) => /* @__PURE__ */ React109.createElement(
|
|
12570
12714
|
InputChip,
|
|
12571
12715
|
{
|
|
12572
12716
|
key: `${itemToString(item)}.${index}`,
|
|
@@ -12580,12 +12724,12 @@ var MultiInputBase = ({
|
|
|
12580
12724
|
},
|
|
12581
12725
|
itemToString(item)
|
|
12582
12726
|
));
|
|
12583
|
-
return /* @__PURE__ */
|
|
12727
|
+
return /* @__PURE__ */ React109.createElement("div", { className: "Aquarium-MultiInputBase" }, /* @__PURE__ */ React109.createElement(
|
|
12584
12728
|
Select.InputContainer,
|
|
12585
12729
|
{
|
|
12586
12730
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
|
12587
12731
|
},
|
|
12588
|
-
/* @__PURE__ */
|
|
12732
|
+
/* @__PURE__ */ React109.createElement("div", { className: "grow inline-flex flex-row flex-wrap gap-y-2" }, inline && renderChips(), /* @__PURE__ */ React109.createElement(
|
|
12589
12733
|
Select.Input,
|
|
12590
12734
|
{
|
|
12591
12735
|
ref: inputRef,
|
|
@@ -12607,13 +12751,13 @@ var MultiInputBase = ({
|
|
|
12607
12751
|
autoComplete: "off"
|
|
12608
12752
|
}
|
|
12609
12753
|
)),
|
|
12610
|
-
endAdornment && /* @__PURE__ */
|
|
12611
|
-
), !inline && /* @__PURE__ */
|
|
12754
|
+
endAdornment && /* @__PURE__ */ React109.createElement(InputAdornment, null, endAdornment)
|
|
12755
|
+
), !inline && /* @__PURE__ */ React109.createElement("div", { className: "flex flex-row flex-wrap gap-y-2 mt-2" }, renderChips()));
|
|
12612
12756
|
};
|
|
12613
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
|
12757
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React109.createElement(Skeleton, { height: 38 });
|
|
12614
12758
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
|
12615
12759
|
var MultiInput = (props) => {
|
|
12616
|
-
const [value, setValue] =
|
|
12760
|
+
const [value, setValue] = useState11(props.value ?? props.defaultValue ?? []);
|
|
12617
12761
|
useEffect11(() => {
|
|
12618
12762
|
setValue(props.value ?? []);
|
|
12619
12763
|
}, [JSON.stringify(props.value)]);
|
|
@@ -12623,7 +12767,7 @@ var MultiInput = (props) => {
|
|
|
12623
12767
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
12624
12768
|
const labelControlProps = getLabelControlProps(props);
|
|
12625
12769
|
const baseProps = omit13(props, Object.keys(labelControlProps));
|
|
12626
|
-
return /* @__PURE__ */
|
|
12770
|
+
return /* @__PURE__ */ React109.createElement(
|
|
12627
12771
|
LabelControl,
|
|
12628
12772
|
{
|
|
12629
12773
|
id: `${id}-label`,
|
|
@@ -12634,7 +12778,7 @@ var MultiInput = (props) => {
|
|
|
12634
12778
|
maxLength: props.maxLength,
|
|
12635
12779
|
className: "Aquarium-MultiInput"
|
|
12636
12780
|
},
|
|
12637
|
-
/* @__PURE__ */
|
|
12781
|
+
/* @__PURE__ */ React109.createElement(
|
|
12638
12782
|
MultiInputBase,
|
|
12639
12783
|
{
|
|
12640
12784
|
...baseProps,
|
|
@@ -12651,12 +12795,12 @@ var MultiInput = (props) => {
|
|
|
12651
12795
|
)
|
|
12652
12796
|
);
|
|
12653
12797
|
};
|
|
12654
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
|
12798
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React109.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React109.createElement(MultiInputBase.Skeleton, null));
|
|
12655
12799
|
MultiInput.Skeleton = MultiInputSkeleton;
|
|
12656
12800
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
12657
12801
|
|
|
12658
12802
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
|
12659
|
-
import
|
|
12803
|
+
import React110, { useEffect as useEffect12, useRef as useRef14, useState as useState12 } from "react";
|
|
12660
12804
|
import { ariaHideOutside as ariaHideOutside3 } from "@react-aria/overlays";
|
|
12661
12805
|
import { useId as useId14 } from "@react-aria/utils";
|
|
12662
12806
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
|
@@ -12690,8 +12834,8 @@ var MultiSelectBase = ({
|
|
|
12690
12834
|
const targetRef = useRef14(null);
|
|
12691
12835
|
const menuRef = useRef14(null);
|
|
12692
12836
|
const inputRef = useRef14(null);
|
|
12693
|
-
const [inputValue, setInputValue] =
|
|
12694
|
-
const [hasFocus, setFocus] =
|
|
12837
|
+
const [inputValue, setInputValue] = useState12("");
|
|
12838
|
+
const [hasFocus, setFocus] = useState12(false);
|
|
12695
12839
|
const { selectedItems, addSelectedItem, removeSelectedItem, getDropdownProps, getSelectedItemProps } = useMultipleSelection(
|
|
12696
12840
|
/*
|
|
12697
12841
|
* For some reason useMultipleSelection does not accept
|
|
@@ -12774,7 +12918,7 @@ var MultiSelectBase = ({
|
|
|
12774
12918
|
return ariaHideOutside3([inputRef.current, popoverRef.current]);
|
|
12775
12919
|
}
|
|
12776
12920
|
}, [isOpen, inputRef, popoverRef]);
|
|
12777
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
|
12921
|
+
const renderItem = (item, index) => /* @__PURE__ */ React110.createElement(
|
|
12778
12922
|
Select.Item,
|
|
12779
12923
|
{
|
|
12780
12924
|
key: itemToString(item),
|
|
@@ -12784,9 +12928,9 @@ var MultiSelectBase = ({
|
|
|
12784
12928
|
},
|
|
12785
12929
|
renderOption(item)
|
|
12786
12930
|
);
|
|
12787
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
|
12931
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React110.createElement(React110.Fragment, { key: group.label }, /* @__PURE__ */ React110.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
|
12788
12932
|
const renderChips = () => {
|
|
12789
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
|
12933
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React110.createElement(
|
|
12790
12934
|
InputChip,
|
|
12791
12935
|
{
|
|
12792
12936
|
key: `${itemToString(selectedItem)}.chip`,
|
|
@@ -12808,13 +12952,13 @@ var MultiSelectBase = ({
|
|
|
12808
12952
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
|
12809
12953
|
);
|
|
12810
12954
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
|
12811
|
-
return /* @__PURE__ */
|
|
12955
|
+
return /* @__PURE__ */ React110.createElement("div", { className: "Aquarium-MultiSelectBase relative" }, /* @__PURE__ */ React110.createElement(
|
|
12812
12956
|
Select.InputContainer,
|
|
12813
12957
|
{
|
|
12814
12958
|
ref: targetRef,
|
|
12815
12959
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
|
12816
12960
|
},
|
|
12817
|
-
/* @__PURE__ */
|
|
12961
|
+
/* @__PURE__ */ React110.createElement("div", { className: "grow inline-flex flex-row flex-wrap gap-2" }, !hideChips && inline && renderChips(), /* @__PURE__ */ React110.createElement(
|
|
12818
12962
|
Select.Input,
|
|
12819
12963
|
{
|
|
12820
12964
|
name,
|
|
@@ -12836,8 +12980,8 @@ var MultiSelectBase = ({
|
|
|
12836
12980
|
}
|
|
12837
12981
|
}
|
|
12838
12982
|
)),
|
|
12839
|
-
!readOnly && /* @__PURE__ */
|
|
12840
|
-
), !hideChips && !inline && /* @__PURE__ */
|
|
12983
|
+
!readOnly && /* @__PURE__ */ React110.createElement(Select.Toggle, { hasFocus, isOpen, ...getToggleButtonProps({ disabled }) })
|
|
12984
|
+
), !hideChips && !inline && /* @__PURE__ */ React110.createElement("div", { className: "flex flex-row flex-wrap gap-2 mt-2" }, renderChips()), /* @__PURE__ */ React110.createElement(
|
|
12841
12985
|
Popover,
|
|
12842
12986
|
{
|
|
12843
12987
|
ref: popoverRef,
|
|
@@ -12847,12 +12991,12 @@ var MultiSelectBase = ({
|
|
|
12847
12991
|
isNonModal: true,
|
|
12848
12992
|
style: { width: targetRef.current?.offsetWidth }
|
|
12849
12993
|
},
|
|
12850
|
-
/* @__PURE__ */
|
|
12994
|
+
/* @__PURE__ */ React110.createElement(Select.Menu, { maxHeight, ...menuProps }, hasNoResults && /* @__PURE__ */ React110.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
|
12851
12995
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
|
12852
12996
|
))
|
|
12853
12997
|
));
|
|
12854
12998
|
};
|
|
12855
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
|
12999
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React110.createElement(Skeleton, { height: 38 });
|
|
12856
13000
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
|
12857
13001
|
var MultiSelect = ({
|
|
12858
13002
|
options,
|
|
@@ -12865,7 +13009,7 @@ var MultiSelect = ({
|
|
|
12865
13009
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
12866
13010
|
const labelControlProps = getLabelControlProps(props);
|
|
12867
13011
|
const baseProps = omit14(props, Object.keys(labelControlProps));
|
|
12868
|
-
return /* @__PURE__ */
|
|
13012
|
+
return /* @__PURE__ */ React110.createElement(
|
|
12869
13013
|
LabelControl,
|
|
12870
13014
|
{
|
|
12871
13015
|
id: `${id}-label`,
|
|
@@ -12874,7 +13018,7 @@ var MultiSelect = ({
|
|
|
12874
13018
|
...labelControlProps,
|
|
12875
13019
|
className: "Aquarium-MultiSelect"
|
|
12876
13020
|
},
|
|
12877
|
-
/* @__PURE__ */
|
|
13021
|
+
/* @__PURE__ */ React110.createElement(
|
|
12878
13022
|
MultiSelectBase,
|
|
12879
13023
|
{
|
|
12880
13024
|
...baseProps,
|
|
@@ -12888,16 +13032,16 @@ var MultiSelect = ({
|
|
|
12888
13032
|
)
|
|
12889
13033
|
);
|
|
12890
13034
|
};
|
|
12891
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
|
13035
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React110.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React110.createElement(MultiSelectBase.Skeleton, null));
|
|
12892
13036
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
|
12893
13037
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
12894
13038
|
|
|
12895
13039
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
|
12896
|
-
import
|
|
13040
|
+
import React111 from "react";
|
|
12897
13041
|
import { useId as useId15 } from "@react-aria/utils";
|
|
12898
13042
|
import { clsx as clsx34 } from "clsx";
|
|
12899
13043
|
import { omit as omit15, uniqueId } from "lodash-es";
|
|
12900
|
-
var NativeSelectBase =
|
|
13044
|
+
var NativeSelectBase = React111.forwardRef(
|
|
12901
13045
|
({ children, disabled = false, required = false, valid = true, readOnly = false, ...props }, ref) => {
|
|
12902
13046
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
|
12903
13047
|
const defaultValue = props.defaultValue ? props.defaultValue : props.placeholder ? placeholderValue : void 0;
|
|
@@ -12914,7 +13058,7 @@ var NativeSelectBase = React110.forwardRef(
|
|
|
12914
13058
|
props.onBlur?.(event);
|
|
12915
13059
|
}
|
|
12916
13060
|
};
|
|
12917
|
-
return /* @__PURE__ */
|
|
13061
|
+
return /* @__PURE__ */ React111.createElement("span", { className: "Aquarium-NativeSelectBase relative block" }, !readOnly && /* @__PURE__ */ React111.createElement("span", { className: "absolute right-0 inset-y-0 mr-4 text-inactive flex ml-3 pointer-events-none typography-default-strong mt-4" }, /* @__PURE__ */ React111.createElement(Icon, { icon: caretDown_default, "data-testid": "icon-dropdown" })), /* @__PURE__ */ React111.createElement(
|
|
12918
13062
|
"select",
|
|
12919
13063
|
{
|
|
12920
13064
|
ref,
|
|
@@ -12934,13 +13078,13 @@ var NativeSelectBase = React110.forwardRef(
|
|
|
12934
13078
|
props.className
|
|
12935
13079
|
)
|
|
12936
13080
|
},
|
|
12937
|
-
props.placeholder && /* @__PURE__ */
|
|
13081
|
+
props.placeholder && /* @__PURE__ */ React111.createElement("option", { value: placeholderValue, disabled: true }, props.placeholder),
|
|
12938
13082
|
children
|
|
12939
13083
|
));
|
|
12940
13084
|
}
|
|
12941
13085
|
);
|
|
12942
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
|
12943
|
-
var NativeSelect =
|
|
13086
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React111.createElement(Skeleton, { height: 38 });
|
|
13087
|
+
var NativeSelect = React111.forwardRef(
|
|
12944
13088
|
({ readOnly, ...props }, ref) => {
|
|
12945
13089
|
const defaultId = useId15();
|
|
12946
13090
|
const id = props.id ?? defaultId;
|
|
@@ -12948,7 +13092,7 @@ var NativeSelect = React110.forwardRef(
|
|
|
12948
13092
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
12949
13093
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
12950
13094
|
const baseProps = omit15(props, Object.keys(labelControlProps));
|
|
12951
|
-
return /* @__PURE__ */
|
|
13095
|
+
return /* @__PURE__ */ React111.createElement(
|
|
12952
13096
|
LabelControl,
|
|
12953
13097
|
{
|
|
12954
13098
|
id: `${id}-label`,
|
|
@@ -12957,7 +13101,7 @@ var NativeSelect = React110.forwardRef(
|
|
|
12957
13101
|
...labelControlProps,
|
|
12958
13102
|
className: "Aquarium-NativeSelect"
|
|
12959
13103
|
},
|
|
12960
|
-
/* @__PURE__ */
|
|
13104
|
+
/* @__PURE__ */ React111.createElement(
|
|
12961
13105
|
NativeSelectBase,
|
|
12962
13106
|
{
|
|
12963
13107
|
ref,
|
|
@@ -12976,21 +13120,21 @@ var NativeSelect = React110.forwardRef(
|
|
|
12976
13120
|
}
|
|
12977
13121
|
);
|
|
12978
13122
|
NativeSelect.displayName = "NativeSelect";
|
|
12979
|
-
var Option =
|
|
12980
|
-
return /* @__PURE__ */
|
|
13123
|
+
var Option = React111.forwardRef(({ children, ...props }, ref) => {
|
|
13124
|
+
return /* @__PURE__ */ React111.createElement("option", { ref, ...props }, children);
|
|
12981
13125
|
});
|
|
12982
13126
|
Option.displayName = "Option";
|
|
12983
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
|
13127
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React111.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React111.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React111.createElement("div", { style: { height: "1px" } }));
|
|
12984
13128
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
|
12985
13129
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
|
12986
13130
|
|
|
12987
13131
|
// src/molecules/Navigation/Navigation.tsx
|
|
12988
|
-
import
|
|
13132
|
+
import React113 from "react";
|
|
12989
13133
|
import { clsx as clsx35 } from "clsx";
|
|
12990
13134
|
import { uniqueId as uniqueId2 } from "lodash-es";
|
|
12991
13135
|
|
|
12992
13136
|
// src/atoms/Navigation/Navigation.tsx
|
|
12993
|
-
import
|
|
13137
|
+
import React112 from "react";
|
|
12994
13138
|
import { tv as tv28 } from "tailwind-variants";
|
|
12995
13139
|
var navigationClasses = tv28({
|
|
12996
13140
|
slots: {
|
|
@@ -13029,35 +13173,35 @@ var Navigation = ({
|
|
|
13029
13173
|
...rest
|
|
13030
13174
|
}) => {
|
|
13031
13175
|
const { nav, list } = navigationClasses();
|
|
13032
|
-
return /* @__PURE__ */
|
|
13176
|
+
return /* @__PURE__ */ React112.createElement("nav", { className: nav(), "aria-label": ariaLabel }, /* @__PURE__ */ React112.createElement("ul", { ...rest, className: list({ className }), role: "menubar" }, children));
|
|
13033
13177
|
};
|
|
13034
13178
|
var Header = ({ className, ...rest }) => {
|
|
13035
13179
|
const { header } = navigationClasses();
|
|
13036
|
-
return /* @__PURE__ */
|
|
13180
|
+
return /* @__PURE__ */ React112.createElement("li", { ...rest, role: "presentation", className: header({ className }) });
|
|
13037
13181
|
};
|
|
13038
13182
|
var Title2 = ({ className, ...props }) => {
|
|
13039
13183
|
const { headerTitle } = navigationClasses();
|
|
13040
|
-
return /* @__PURE__ */
|
|
13184
|
+
return /* @__PURE__ */ React112.createElement(Typography, { variant: "small", className: headerTitle({ className }), ...props });
|
|
13041
13185
|
};
|
|
13042
13186
|
var Subtitle = ({ className, ...props }) => {
|
|
13043
13187
|
const { headerSubtitle } = navigationClasses();
|
|
13044
|
-
return /* @__PURE__ */
|
|
13188
|
+
return /* @__PURE__ */ React112.createElement(Typography, { variant: "default-strong", className: headerSubtitle({ className }), ...props });
|
|
13045
13189
|
};
|
|
13046
13190
|
var Footer = ({ className, ...rest }) => {
|
|
13047
13191
|
const { footer } = navigationClasses();
|
|
13048
|
-
return /* @__PURE__ */
|
|
13192
|
+
return /* @__PURE__ */ React112.createElement("li", { ...rest, role: "presentation", className: footer({ className }) });
|
|
13049
13193
|
};
|
|
13050
13194
|
var Section2 = ({ title, className, ...rest }) => {
|
|
13051
13195
|
const { sectionContainer, sectionTitle, sectionList } = navigationClasses();
|
|
13052
|
-
return /* @__PURE__ */
|
|
13196
|
+
return /* @__PURE__ */ React112.createElement("li", { role: "presentation", className: sectionContainer() }, title && /* @__PURE__ */ React112.createElement("div", { className: sectionTitle({ className }) }, title), /* @__PURE__ */ React112.createElement("ul", { ...rest, role: "group", className: sectionList({ className }) }));
|
|
13053
13197
|
};
|
|
13054
13198
|
var Divider3 = ({ className, ...rest }) => {
|
|
13055
13199
|
const { divider } = navigationClasses();
|
|
13056
|
-
return /* @__PURE__ */
|
|
13200
|
+
return /* @__PURE__ */ React112.createElement("li", { "aria-hidden": true, ...rest, className: divider({ className }) });
|
|
13057
13201
|
};
|
|
13058
13202
|
var Item4 = ({ className, active = false, ...rest }) => {
|
|
13059
13203
|
const { itemContainer, itemAnchor } = navigationClasses({ active });
|
|
13060
|
-
return /* @__PURE__ */
|
|
13204
|
+
return /* @__PURE__ */ React112.createElement("li", { role: "presentation", className: itemContainer() }, /* @__PURE__ */ React112.createElement("a", { ...rest, role: "menuitem", className: itemAnchor({ className }) }));
|
|
13061
13205
|
};
|
|
13062
13206
|
var Submenu = ({
|
|
13063
13207
|
children,
|
|
@@ -13067,11 +13211,11 @@ var Submenu = ({
|
|
|
13067
13211
|
...rest
|
|
13068
13212
|
}) => {
|
|
13069
13213
|
const { submenuContainer, submenuAnchor, submenuList } = navigationClasses();
|
|
13070
|
-
return /* @__PURE__ */
|
|
13214
|
+
return /* @__PURE__ */ React112.createElement("li", { role: "presentation", className: submenuContainer() }, /* @__PURE__ */ React112.createElement("a", { role: "menuitem", "aria-haspopup": "true", href: "#", id, className: submenuAnchor({ className }), ...rest }, title), /* @__PURE__ */ React112.createElement("ul", { role: "menu", className: submenuList(), "aria-labelledby": id }, children));
|
|
13071
13215
|
};
|
|
13072
13216
|
var SubmenuItem = ({ className, active, ...rest }) => {
|
|
13073
13217
|
const { submenuItem } = navigationClasses();
|
|
13074
|
-
return /* @__PURE__ */
|
|
13218
|
+
return /* @__PURE__ */ React112.createElement(Navigation.Item, { ...rest, active, className: submenuItem({ className }) });
|
|
13075
13219
|
};
|
|
13076
13220
|
Header.Title = Title2;
|
|
13077
13221
|
Header.Subtitle = Subtitle;
|
|
@@ -13084,20 +13228,20 @@ Navigation.Submenu = Submenu;
|
|
|
13084
13228
|
Navigation.Divider = Divider3;
|
|
13085
13229
|
|
|
13086
13230
|
// src/molecules/Navigation/Navigation.tsx
|
|
13087
|
-
var Navigation2 = ({ className, ...props }) => /* @__PURE__ */
|
|
13231
|
+
var Navigation2 = ({ className, ...props }) => /* @__PURE__ */ React113.createElement(Navigation, { className: clsx35("Aquarium-Navigation", className), ...props });
|
|
13088
13232
|
var Item5 = ({
|
|
13089
13233
|
children,
|
|
13090
13234
|
icon,
|
|
13091
13235
|
showNotification = false,
|
|
13092
13236
|
...rest
|
|
13093
|
-
}) => /* @__PURE__ */
|
|
13237
|
+
}) => /* @__PURE__ */ React113.createElement(Navigation.Item, { ...rest }, icon && showNotification && /* @__PURE__ */ React113.createElement(Badge.Notification, null, /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" })), icon && !showNotification && /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" }), children);
|
|
13094
13238
|
var Submenu2 = ({ children, title, icon, defaultOpen = false }) => {
|
|
13095
|
-
const [open, setOpen] =
|
|
13239
|
+
const [open, setOpen] = React113.useState(defaultOpen);
|
|
13096
13240
|
const id = uniqueId2();
|
|
13097
|
-
return /* @__PURE__ */
|
|
13241
|
+
return /* @__PURE__ */ React113.createElement(
|
|
13098
13242
|
Navigation.Submenu,
|
|
13099
13243
|
{
|
|
13100
|
-
title: /* @__PURE__ */
|
|
13244
|
+
title: /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(InlineIcon, { icon: open ? caretUpFilled_default : caretDownFilled_default, width: "12px", height: "12px", className: "mr-1" }), /* @__PURE__ */ React113.createElement(Box.Flex, { paddingX: "1", gap: "4" }, icon && /* @__PURE__ */ React113.createElement(InlineIcon, { icon, width: "20px", height: "20px" }), title)),
|
|
13101
13245
|
"aria-expanded": open,
|
|
13102
13246
|
id,
|
|
13103
13247
|
onClick: (e) => {
|
|
@@ -13105,7 +13249,7 @@ var Submenu2 = ({ children, title, icon, defaultOpen = false }) => {
|
|
|
13105
13249
|
setOpen(!open);
|
|
13106
13250
|
}
|
|
13107
13251
|
},
|
|
13108
|
-
open && /* @__PURE__ */
|
|
13252
|
+
open && /* @__PURE__ */ React113.createElement("ul", { role: "menu", className: "flex flex-col", "aria-labelledby": id }, children)
|
|
13109
13253
|
);
|
|
13110
13254
|
};
|
|
13111
13255
|
Submenu2.Item = Navigation.Submenu.Item;
|
|
@@ -13117,11 +13261,11 @@ Navigation2.Section = Navigation.Section;
|
|
|
13117
13261
|
Navigation2.Submenu = Submenu2;
|
|
13118
13262
|
|
|
13119
13263
|
// src/molecules/PageHeader/PageHeader.tsx
|
|
13120
|
-
import
|
|
13264
|
+
import React115 from "react";
|
|
13121
13265
|
import { castArray as castArray7 } from "lodash-es";
|
|
13122
13266
|
|
|
13123
13267
|
// src/atoms/PageHeader/PageHeader.tsx
|
|
13124
|
-
import
|
|
13268
|
+
import React114 from "react";
|
|
13125
13269
|
import { tv as tv29 } from "tailwind-variants";
|
|
13126
13270
|
var pageHeaderStyles = tv29({
|
|
13127
13271
|
slots: {
|
|
@@ -13133,10 +13277,10 @@ var pageHeaderStyles = tv29({
|
|
|
13133
13277
|
}
|
|
13134
13278
|
});
|
|
13135
13279
|
var { base, container, titleContainer, chips, actions } = pageHeaderStyles();
|
|
13136
|
-
var PageHeader = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13137
|
-
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13138
|
-
PageHeader.TitleContainer = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13139
|
-
PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__ */
|
|
13280
|
+
var PageHeader = ({ children, className, ...rest }) => /* @__PURE__ */ React114.createElement("div", { className: base({ className }), ...rest }, children);
|
|
13281
|
+
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */ React114.createElement("div", { className: container({ className }), ...rest }, children);
|
|
13282
|
+
PageHeader.TitleContainer = ({ children, className, ...rest }) => /* @__PURE__ */ React114.createElement("div", { className: titleContainer({ className }), ...rest }, children);
|
|
13283
|
+
PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__ */ React114.createElement(
|
|
13140
13284
|
Typography2,
|
|
13141
13285
|
{
|
|
13142
13286
|
...rest,
|
|
@@ -13146,9 +13290,9 @@ PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__
|
|
|
13146
13290
|
},
|
|
13147
13291
|
children
|
|
13148
13292
|
);
|
|
13149
|
-
PageHeader.Subtitle = ({ children, ...rest }) => /* @__PURE__ */
|
|
13150
|
-
PageHeader.Chips = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13151
|
-
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13293
|
+
PageHeader.Subtitle = ({ children, ...rest }) => /* @__PURE__ */ React114.createElement(Typography2.Default, { ...rest, color: "default" }, children);
|
|
13294
|
+
PageHeader.Chips = ({ children, className, ...rest }) => /* @__PURE__ */ React114.createElement("div", { className: chips({ className }), ...rest }, children);
|
|
13295
|
+
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */ React114.createElement("div", { className: actions({ className }), ...rest }, children);
|
|
13152
13296
|
|
|
13153
13297
|
// src/molecules/PageHeader/PageHeader.tsx
|
|
13154
13298
|
var CommonPageHeader = ({
|
|
@@ -13173,20 +13317,20 @@ var CommonPageHeader = ({
|
|
|
13173
13317
|
"Limit the combined `primaryAction` and `secondaryActions` to 2 actions. Use the `menu` prop for additional actions."
|
|
13174
13318
|
);
|
|
13175
13319
|
}
|
|
13176
|
-
return /* @__PURE__ */
|
|
13320
|
+
return /* @__PURE__ */ React115.createElement(PageHeader, { className: "Aquarium-PageHeader" }, /* @__PURE__ */ React115.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React115.createElement(Breadcrumbs, null, breadcrumbs), /* @__PURE__ */ React115.createElement(Spacing, { row: true, gap: "4" }, image && /* @__PURE__ */ React115.createElement("img", { src: image, alt: imageAlt ?? "", className: "size-[48px]" }), /* @__PURE__ */ React115.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React115.createElement(PageHeader.Title, { isSubHeader }, title), chips2.length > 0 && /* @__PURE__ */ React115.createElement(PageHeader.Chips, null, chips2.map((chip) => /* @__PURE__ */ React115.createElement(Chip2, { key: chip, dense: true, text: chip }))), subtitle && /* @__PURE__ */ React115.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions ?? primaryAction ?? secondaryAction ?? menu) && /* @__PURE__ */ React115.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React115.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React115.createElement(
|
|
13177
13321
|
DropdownMenu2,
|
|
13178
13322
|
{
|
|
13179
13323
|
placement: defaultContextualMenuPlacement,
|
|
13180
13324
|
onAction: (action) => onAction(action),
|
|
13181
13325
|
onOpenChange: onMenuOpenChange
|
|
13182
13326
|
},
|
|
13183
|
-
/* @__PURE__ */
|
|
13327
|
+
/* @__PURE__ */ React115.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React115.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: more_default })),
|
|
13184
13328
|
menu
|
|
13185
13329
|
)), secondaryActions && castArray7(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
|
13186
13330
|
};
|
|
13187
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
|
13331
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React115.createElement(CommonPageHeader, { ...props });
|
|
13188
13332
|
PageHeader2.displayName = "PageHeader";
|
|
13189
|
-
var SubHeader = (props) => /* @__PURE__ */
|
|
13333
|
+
var SubHeader = (props) => /* @__PURE__ */ React115.createElement(CommonPageHeader, { ...props, isSubHeader: true });
|
|
13190
13334
|
PageHeader2.SubHeader = SubHeader;
|
|
13191
13335
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
|
13192
13336
|
|
|
@@ -13202,17 +13346,17 @@ var usePopoverContext = () => {
|
|
|
13202
13346
|
};
|
|
13203
13347
|
|
|
13204
13348
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
|
13205
|
-
import
|
|
13349
|
+
import React117, { createContext as createContext8 } from "react";
|
|
13206
13350
|
import { noop as noop3, omit as omit16 } from "lodash-es";
|
|
13207
13351
|
|
|
13208
13352
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
|
13209
|
-
import
|
|
13353
|
+
import React116 from "react";
|
|
13210
13354
|
import { clsx as clsx36 } from "clsx";
|
|
13211
|
-
var Header2 = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13212
|
-
var Title3 = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13213
|
-
var Body = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13214
|
-
var Footer2 = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13215
|
-
var Actions3 = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13355
|
+
var Header2 = ({ children, className, ...rest }) => /* @__PURE__ */ React116.createElement("div", { ...rest, className: clsx36("p-5 gap-3 flex items-center", className) }, children);
|
|
13356
|
+
var Title3 = ({ children, className, ...rest }) => /* @__PURE__ */ React116.createElement(Typography, { ...rest, htmlTag: "h1", variant: "default-strong" }, children);
|
|
13357
|
+
var Body = ({ children, className, ...rest }) => /* @__PURE__ */ React116.createElement(Typography, { ...rest, htmlTag: "div", variant: "small", className: clsx36("px-5 overflow-y-auto", className) }, children);
|
|
13358
|
+
var Footer2 = ({ children, className, ...rest }) => /* @__PURE__ */ React116.createElement("div", { ...rest, className: clsx36("p-5", className) }, children);
|
|
13359
|
+
var Actions3 = ({ children, className, ...rest }) => /* @__PURE__ */ React116.createElement("div", { ...rest, className: clsx36("flex gap-4", className) }, children);
|
|
13216
13360
|
var PopoverDialog = {
|
|
13217
13361
|
Header: Header2,
|
|
13218
13362
|
Title: Title3,
|
|
@@ -13227,12 +13371,12 @@ var PopoverDialogPropsContext = createContext8({
|
|
|
13227
13371
|
primaryAction: { text: "", onClick: noop3 }
|
|
13228
13372
|
});
|
|
13229
13373
|
var PopoverDialog2 = ({ placement, open, children, ...props }) => {
|
|
13230
|
-
return /* @__PURE__ */
|
|
13374
|
+
return /* @__PURE__ */ React117.createElement(Popover2, { placement }, /* @__PURE__ */ React117.createElement(PopoverDialogPropsContext.Provider, { value: props }, children));
|
|
13231
13375
|
};
|
|
13232
13376
|
PopoverDialog2.Trigger = Popover2.Trigger;
|
|
13233
13377
|
var Prompt = ({ children }) => {
|
|
13234
|
-
const { title, primaryAction, secondaryAction } =
|
|
13235
|
-
return /* @__PURE__ */
|
|
13378
|
+
const { title, primaryAction, secondaryAction } = React117.useContext(PopoverDialogPropsContext);
|
|
13379
|
+
return /* @__PURE__ */ React117.createElement(Popover2.Panel, { className: "Aquarium-PopoverDialog max-w-[300px]" }, /* @__PURE__ */ React117.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React117.createElement(PopoverDialog.Title, null, title)), /* @__PURE__ */ React117.createElement(PopoverDialog.Body, null, children), /* @__PURE__ */ React117.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React117.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React117.createElement(Popover2.CloseToggle, null, /* @__PURE__ */ React117.createElement(Button2, { key: secondaryAction.text, kind: "secondary", dense: true, ...omit16(secondaryAction, "text") }, secondaryAction.text)), /* @__PURE__ */ React117.createElement(Popover2.CloseToggle, null, /* @__PURE__ */ React117.createElement(Button2, { key: primaryAction.text, kind: "ghost", dense: true, ...omit16(primaryAction, "text") }, primaryAction.text)))));
|
|
13236
13380
|
};
|
|
13237
13381
|
Prompt.displayName = "PopoverDialog.Prompt";
|
|
13238
13382
|
PopoverDialog2.Prompt = Prompt;
|
|
@@ -13242,10 +13386,10 @@ import { createPortal } from "react-dom";
|
|
|
13242
13386
|
var Portal = ({ children, to }) => createPortal(children, to);
|
|
13243
13387
|
|
|
13244
13388
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
|
13245
|
-
import
|
|
13389
|
+
import React119 from "react";
|
|
13246
13390
|
|
|
13247
13391
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
|
13248
|
-
import
|
|
13392
|
+
import React118 from "react";
|
|
13249
13393
|
import { clamp as clamp3 } from "lodash-es";
|
|
13250
13394
|
import { tv as tv30 } from "tailwind-variants";
|
|
13251
13395
|
var progressBarClasses = tv30({
|
|
@@ -13265,10 +13409,10 @@ var progressBarIndicatorClasses = tv30({
|
|
|
13265
13409
|
var progressBarLabelsClasses = tv30({
|
|
13266
13410
|
base: "flex flex-row"
|
|
13267
13411
|
});
|
|
13268
|
-
var ProgressBar = ({ children, className, ...rest }) => /* @__PURE__ */
|
|
13412
|
+
var ProgressBar = ({ children, className, ...rest }) => /* @__PURE__ */ React118.createElement("div", { ...rest, className: progressBarClasses({ className }) }, children);
|
|
13269
13413
|
ProgressBar.Indicator = ({ min, max, value, "aria-label": ariaLabel, status, className, ...rest }) => {
|
|
13270
13414
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
|
13271
|
-
return /* @__PURE__ */
|
|
13415
|
+
return /* @__PURE__ */ React118.createElement(
|
|
13272
13416
|
"div",
|
|
13273
13417
|
{
|
|
13274
13418
|
...rest,
|
|
@@ -13282,7 +13426,7 @@ ProgressBar.Indicator = ({ min, max, value, "aria-label": ariaLabel, status, cla
|
|
|
13282
13426
|
}
|
|
13283
13427
|
);
|
|
13284
13428
|
};
|
|
13285
|
-
ProgressBar.Labels = ({ children, startLabel, endLabel, className, ...rest }) => /* @__PURE__ */
|
|
13429
|
+
ProgressBar.Labels = ({ children, startLabel, endLabel, className, ...rest }) => /* @__PURE__ */ React118.createElement("div", { className: progressBarLabelsClasses({ className }) }, /* @__PURE__ */ React118.createElement("span", { ...rest, className: "grow text-default typography-small" }, startLabel), /* @__PURE__ */ React118.createElement("span", { ...rest, className: "grow text-default typography-small text-right" }, endLabel));
|
|
13286
13430
|
|
|
13287
13431
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
|
13288
13432
|
var ProgressBar2 = (props) => {
|
|
@@ -13297,7 +13441,7 @@ var ProgressBar2 = (props) => {
|
|
|
13297
13441
|
if (min > max) {
|
|
13298
13442
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
|
13299
13443
|
}
|
|
13300
|
-
const progress = /* @__PURE__ */
|
|
13444
|
+
const progress = /* @__PURE__ */ React119.createElement(ProgressBar, null, /* @__PURE__ */ React119.createElement(
|
|
13301
13445
|
ProgressBar.Indicator,
|
|
13302
13446
|
{
|
|
13303
13447
|
status: value === max ? completedStatus : progresStatus,
|
|
@@ -13310,18 +13454,18 @@ var ProgressBar2 = (props) => {
|
|
|
13310
13454
|
if (props.dense) {
|
|
13311
13455
|
return progress;
|
|
13312
13456
|
}
|
|
13313
|
-
return /* @__PURE__ */
|
|
13457
|
+
return /* @__PURE__ */ React119.createElement("div", { className: "Aquarium-ProgressBar" }, progress, /* @__PURE__ */ React119.createElement(ProgressBar.Labels, { className: "py-2", startLabel: props.startLabel, endLabel: props.endLabel }));
|
|
13314
13458
|
};
|
|
13315
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
|
13459
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React119.createElement(Skeleton, { height: 4, display: "block" });
|
|
13316
13460
|
ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
13317
13461
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
|
13318
13462
|
|
|
13319
13463
|
// src/molecules/RadioButton/RadioButton.tsx
|
|
13320
|
-
import
|
|
13321
|
-
var RadioButton2 =
|
|
13464
|
+
import React120 from "react";
|
|
13465
|
+
var RadioButton2 = React120.forwardRef(
|
|
13322
13466
|
({ name, id, readOnly = false, disabled = false, caption, children, "aria-label": ariaLabel, ...props }, ref) => {
|
|
13323
13467
|
const isChecked = props.checked ?? props.defaultChecked;
|
|
13324
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
|
13468
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React120.createElement(
|
|
13325
13469
|
ControlLabel,
|
|
13326
13470
|
{
|
|
13327
13471
|
htmlFor: id,
|
|
@@ -13333,21 +13477,21 @@ var RadioButton2 = React119.forwardRef(
|
|
|
13333
13477
|
style: { gap: "0 8px" },
|
|
13334
13478
|
className: "Aquarium-RadioButton"
|
|
13335
13479
|
},
|
|
13336
|
-
!readOnly && /* @__PURE__ */
|
|
13480
|
+
!readOnly && /* @__PURE__ */ React120.createElement(RadioButton, { id, ref, name, ...props, readOnly, disabled })
|
|
13337
13481
|
) : null;
|
|
13338
13482
|
}
|
|
13339
13483
|
);
|
|
13340
13484
|
RadioButton2.displayName = "RadioButton";
|
|
13341
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
|
13485
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React120.createElement("div", { className: "flex gap-3" }, /* @__PURE__ */ React120.createElement(Skeleton, { height: 20, width: 20 }), /* @__PURE__ */ React120.createElement(Skeleton, { height: 20, width: 150 }));
|
|
13342
13486
|
RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
13343
13487
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
13344
13488
|
|
|
13345
13489
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
|
13346
|
-
import
|
|
13490
|
+
import React121 from "react";
|
|
13347
13491
|
import { useId as useId16 } from "@react-aria/utils";
|
|
13348
13492
|
import { clsx as clsx37 } from "clsx";
|
|
13349
13493
|
var isRadioButton = (c) => {
|
|
13350
|
-
return
|
|
13494
|
+
return React121.isValidElement(c) && c.type === RadioButton2;
|
|
13351
13495
|
};
|
|
13352
13496
|
var RadioButtonGroup = ({
|
|
13353
13497
|
name,
|
|
@@ -13359,7 +13503,7 @@ var RadioButtonGroup = ({
|
|
|
13359
13503
|
children,
|
|
13360
13504
|
...props
|
|
13361
13505
|
}) => {
|
|
13362
|
-
const [value, setValue] =
|
|
13506
|
+
const [value, setValue] = React121.useState(_value ?? defaultValue ?? "");
|
|
13363
13507
|
const errorMessageId = useId16();
|
|
13364
13508
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
13365
13509
|
const labelControlProps = getLabelControlProps(props);
|
|
@@ -13370,13 +13514,13 @@ var RadioButtonGroup = ({
|
|
|
13370
13514
|
setValue(e.target.value);
|
|
13371
13515
|
onChange?.(e.target.value);
|
|
13372
13516
|
};
|
|
13373
|
-
const content =
|
|
13517
|
+
const content = React121.Children.map(children, (c) => {
|
|
13374
13518
|
if (!isRadioButton(c)) {
|
|
13375
13519
|
return null;
|
|
13376
13520
|
}
|
|
13377
13521
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
|
13378
13522
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
|
13379
|
-
return
|
|
13523
|
+
return React121.cloneElement(c, {
|
|
13380
13524
|
name,
|
|
13381
13525
|
defaultChecked: c.props.defaultChecked ?? defaultChecked,
|
|
13382
13526
|
checked: c.props.checked ?? checked,
|
|
@@ -13385,11 +13529,11 @@ var RadioButtonGroup = ({
|
|
|
13385
13529
|
readOnly
|
|
13386
13530
|
});
|
|
13387
13531
|
});
|
|
13388
|
-
return /* @__PURE__ */
|
|
13532
|
+
return /* @__PURE__ */ React121.createElement(LabelControl, { fieldset: true, ...labelControlProps, ...errorProps, className: "Aquarium-RadioButtonGroup" }, cols && /* @__PURE__ */ React121.createElement(InputGroup, { cols }, content), !cols && /* @__PURE__ */ React121.createElement(Box.Flex, { flexDirection: "row", alignItems: "flex-start", colGap: "8", rowGap: "3", flexWrap: "wrap" }, content));
|
|
13389
13533
|
};
|
|
13390
13534
|
var RadioButtonGroupSkeleton = ({ cols, options = 2 }) => {
|
|
13391
13535
|
const isRow = !cols || parseInt(cols, 10) > 1;
|
|
13392
|
-
return /* @__PURE__ */
|
|
13536
|
+
return /* @__PURE__ */ React121.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React121.createElement(
|
|
13393
13537
|
"div",
|
|
13394
13538
|
{
|
|
13395
13539
|
className: clsx37("flex flex-wrap", {
|
|
@@ -13397,14 +13541,14 @@ var RadioButtonGroupSkeleton = ({ cols, options = 2 }) => {
|
|
|
13397
13541
|
"flex-col gap-2": !isRow
|
|
13398
13542
|
})
|
|
13399
13543
|
},
|
|
13400
|
-
Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
|
13544
|
+
Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React121.createElement(RadioButton2.Skeleton, { key }))
|
|
13401
13545
|
));
|
|
13402
13546
|
};
|
|
13403
13547
|
RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
13404
13548
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
13405
13549
|
|
|
13406
13550
|
// src/molecules/Section/Section.tsx
|
|
13407
|
-
import
|
|
13551
|
+
import React126, { useRef as useRef15 } from "react";
|
|
13408
13552
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
13409
13553
|
import { useId as useId17 } from "@react-aria/utils";
|
|
13410
13554
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
|
@@ -13412,10 +13556,10 @@ import { clsx as clsx38 } from "clsx";
|
|
|
13412
13556
|
import { castArray as castArray8, isUndefined as isUndefined8 } from "lodash-es";
|
|
13413
13557
|
|
|
13414
13558
|
// src/molecules/Switch/Switch.tsx
|
|
13415
|
-
import
|
|
13559
|
+
import React123 from "react";
|
|
13416
13560
|
|
|
13417
13561
|
// src/atoms/Switch/Switch.tsx
|
|
13418
|
-
import
|
|
13562
|
+
import React122 from "react";
|
|
13419
13563
|
import { tv as tv31 } from "tailwind-variants";
|
|
13420
13564
|
var switchStyles = tv31({
|
|
13421
13565
|
slots: {
|
|
@@ -13436,10 +13580,10 @@ var switchStyles = tv31({
|
|
|
13436
13580
|
}
|
|
13437
13581
|
}
|
|
13438
13582
|
});
|
|
13439
|
-
var Switch =
|
|
13583
|
+
var Switch = React122.forwardRef(
|
|
13440
13584
|
({ id, children, name, disabled = false, readOnly = false, ...props }, ref) => {
|
|
13441
13585
|
const { wrapper, input, thumb } = switchStyles({ disabled });
|
|
13442
|
-
return /* @__PURE__ */
|
|
13586
|
+
return /* @__PURE__ */ React122.createElement("span", { className: wrapper() }, /* @__PURE__ */ React122.createElement(
|
|
13443
13587
|
"input",
|
|
13444
13588
|
{
|
|
13445
13589
|
id,
|
|
@@ -13451,12 +13595,12 @@ var Switch = React121.forwardRef(
|
|
|
13451
13595
|
readOnly,
|
|
13452
13596
|
disabled
|
|
13453
13597
|
}
|
|
13454
|
-
), /* @__PURE__ */
|
|
13598
|
+
), /* @__PURE__ */ React122.createElement("span", { className: thumb() }, disabled && /* @__PURE__ */ React122.createElement(Icon, { icon: ban_default, width: "10px", height: "10px" })));
|
|
13455
13599
|
}
|
|
13456
13600
|
);
|
|
13457
13601
|
|
|
13458
13602
|
// src/molecules/Switch/Switch.tsx
|
|
13459
|
-
var Switch2 =
|
|
13603
|
+
var Switch2 = React123.forwardRef(
|
|
13460
13604
|
({
|
|
13461
13605
|
id,
|
|
13462
13606
|
name,
|
|
@@ -13469,7 +13613,7 @@ var Switch2 = React122.forwardRef(
|
|
|
13469
13613
|
...props
|
|
13470
13614
|
}, ref) => {
|
|
13471
13615
|
const isChecked = props.checked ?? props.defaultChecked;
|
|
13472
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
|
13616
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React123.createElement(
|
|
13473
13617
|
ControlLabel,
|
|
13474
13618
|
{
|
|
13475
13619
|
htmlFor: id,
|
|
@@ -13482,21 +13626,21 @@ var Switch2 = React122.forwardRef(
|
|
|
13482
13626
|
labelPlacement,
|
|
13483
13627
|
className: "Aquarium-Switch"
|
|
13484
13628
|
},
|
|
13485
|
-
!readOnly && /* @__PURE__ */
|
|
13629
|
+
!readOnly && /* @__PURE__ */ React123.createElement(Switch, { id, ref, name, ...props, readOnly, disabled })
|
|
13486
13630
|
) : null;
|
|
13487
13631
|
}
|
|
13488
13632
|
);
|
|
13489
13633
|
Switch2.displayName = "Switch";
|
|
13490
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
|
13634
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React123.createElement("div", { className: "flex gap-3" }, /* @__PURE__ */ React123.createElement(Skeleton, { height: 20, width: 35 }), /* @__PURE__ */ React123.createElement(Skeleton, { height: 20, width: 150 }));
|
|
13491
13635
|
Switch2.Skeleton = SwitchSkeleton;
|
|
13492
13636
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
|
13493
13637
|
|
|
13494
13638
|
// src/molecules/TagLabel/TagLabel.tsx
|
|
13495
|
-
import
|
|
13496
|
-
var TagLabel = ({ title, dense = false, variant, ...rest }) => /* @__PURE__ */
|
|
13639
|
+
import React124 from "react";
|
|
13640
|
+
var TagLabel = ({ title, dense = false, variant, ...rest }) => /* @__PURE__ */ React124.createElement(InverseChip, { text: title, dense, status: variant || "primary", ...rest });
|
|
13497
13641
|
|
|
13498
13642
|
// src/atoms/Section/Section.tsx
|
|
13499
|
-
import
|
|
13643
|
+
import React125 from "react";
|
|
13500
13644
|
import { tv as tv32 } from "tailwind-variants";
|
|
13501
13645
|
var sectionStyles = tv32({
|
|
13502
13646
|
slots: {
|
|
@@ -13522,19 +13666,19 @@ var Section3 = ({
|
|
|
13522
13666
|
...rest
|
|
13523
13667
|
}) => {
|
|
13524
13668
|
const { base: base2 } = sectionStyles();
|
|
13525
|
-
return /* @__PURE__ */
|
|
13669
|
+
return /* @__PURE__ */ React125.createElement(Box, { component: "section", ...rest, className: base2({ className }) }, children);
|
|
13526
13670
|
};
|
|
13527
13671
|
Section3.Header = ({ children, className, expanded, collapsible, ...rest }) => {
|
|
13528
13672
|
const { header } = sectionStyles({ expanded, collapsible });
|
|
13529
|
-
return /* @__PURE__ */
|
|
13673
|
+
return /* @__PURE__ */ React125.createElement("div", { ...rest, className: header({ className }) }, children);
|
|
13530
13674
|
};
|
|
13531
|
-
Section3.TitleContainer =
|
|
13675
|
+
Section3.TitleContainer = React125.forwardRef(
|
|
13532
13676
|
({ children, className, collapsible, ...rest }, ref) => {
|
|
13533
13677
|
const { titleContainer: titleContainer2 } = sectionStyles({ collapsible });
|
|
13534
|
-
return /* @__PURE__ */
|
|
13678
|
+
return /* @__PURE__ */ React125.createElement("div", { ...rest, ref, className: titleContainer2({ className }) }, children);
|
|
13535
13679
|
}
|
|
13536
13680
|
);
|
|
13537
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
|
13681
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React125.createElement(
|
|
13538
13682
|
Icon,
|
|
13539
13683
|
{
|
|
13540
13684
|
...props,
|
|
@@ -13547,15 +13691,15 @@ Section3.Toggle = (props) => /* @__PURE__ */ React124.createElement(
|
|
|
13547
13691
|
})
|
|
13548
13692
|
}
|
|
13549
13693
|
);
|
|
13550
|
-
Section3.Title = ({ children, ...rest }) => /* @__PURE__ */
|
|
13551
|
-
Section3.Subtitle = ({ children, ...rest }) => /* @__PURE__ */
|
|
13694
|
+
Section3.Title = ({ children, ...rest }) => /* @__PURE__ */ React125.createElement(Typography2.Large, { ...rest, htmlTag: "h2", color: "intense", className: "flex gap-3 items-center" }, children);
|
|
13695
|
+
Section3.Subtitle = ({ children, ...rest }) => /* @__PURE__ */ React125.createElement(Typography2.Small, { ...rest, color: "muted" }, children);
|
|
13552
13696
|
Section3.Actions = ({ children, className, ...rest }) => {
|
|
13553
13697
|
const { actions: actions2 } = sectionStyles();
|
|
13554
|
-
return /* @__PURE__ */
|
|
13698
|
+
return /* @__PURE__ */ React125.createElement("div", { ...rest, className: actions2({ className }) }, children);
|
|
13555
13699
|
};
|
|
13556
13700
|
Section3.Body = ({ children, className, ...rest }) => {
|
|
13557
13701
|
const { body } = sectionStyles();
|
|
13558
|
-
return /* @__PURE__ */
|
|
13702
|
+
return /* @__PURE__ */ React125.createElement("div", { ...rest, className: body({ className }) }, /* @__PURE__ */ React125.createElement(Typography, { htmlTag: "div", color: "default" }, children));
|
|
13559
13703
|
};
|
|
13560
13704
|
|
|
13561
13705
|
// src/molecules/Section/Section.tsx
|
|
@@ -13564,12 +13708,12 @@ var Section4 = (props) => {
|
|
|
13564
13708
|
const _collapsible = title ? props.collapsible ?? false : false;
|
|
13565
13709
|
const _collapsed = title ? props.collapsed : void 0;
|
|
13566
13710
|
const _defaultCollapsed = title ? props.defaultCollapsed ?? false : false;
|
|
13567
|
-
const [isCollapsed, setCollapsed] =
|
|
13568
|
-
const [isResting, setResting] =
|
|
13711
|
+
const [isCollapsed, setCollapsed] = React126.useState(_collapsed ?? _defaultCollapsed);
|
|
13712
|
+
const [isResting, setResting] = React126.useState(true);
|
|
13569
13713
|
const [ref, { height }] = useMeasure();
|
|
13570
13714
|
const toggleAreaRef = useRef15(null);
|
|
13571
13715
|
const isMounted = useRef15(true);
|
|
13572
|
-
|
|
13716
|
+
React126.useEffect(
|
|
13573
13717
|
() => () => {
|
|
13574
13718
|
isMounted.current = false;
|
|
13575
13719
|
},
|
|
@@ -13613,7 +13757,10 @@ var Section4 = (props) => {
|
|
|
13613
13757
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
|
13614
13758
|
toggleAreaRef
|
|
13615
13759
|
);
|
|
13616
|
-
|
|
13760
|
+
if ((props.tag || props.chip) && props.chips) {
|
|
13761
|
+
throw new Error("When chips prop is defined, tag and chip prop must be undefined.");
|
|
13762
|
+
}
|
|
13763
|
+
return /* @__PURE__ */ React126.createElement(
|
|
13617
13764
|
Section3,
|
|
13618
13765
|
{
|
|
13619
13766
|
"aria-label": title,
|
|
@@ -13622,7 +13769,7 @@ var Section4 = (props) => {
|
|
|
13622
13769
|
"Aquarium-Section": !_collapsible
|
|
13623
13770
|
})
|
|
13624
13771
|
},
|
|
13625
|
-
title && /* @__PURE__ */
|
|
13772
|
+
title && /* @__PURE__ */ React126.createElement(Section3.Header, { expanded: _collapsible && !isCollapsed, collapsible: _collapsible }, /* @__PURE__ */ React126.createElement(
|
|
13626
13773
|
Section3.TitleContainer,
|
|
13627
13774
|
{
|
|
13628
13775
|
..._collapsible ? {
|
|
@@ -13636,20 +13783,24 @@ var Section4 = (props) => {
|
|
|
13636
13783
|
id: toggleId,
|
|
13637
13784
|
collapsible: _collapsible
|
|
13638
13785
|
},
|
|
13639
|
-
_collapsible && /* @__PURE__ */
|
|
13640
|
-
/* @__PURE__ */
|
|
13641
|
-
|
|
13642
|
-
|
|
13786
|
+
_collapsible && /* @__PURE__ */ React126.createElement(animated6.div, { style: { transform } }, /* @__PURE__ */ React126.createElement(Section3.Toggle, null)),
|
|
13787
|
+
/* @__PURE__ */ React126.createElement(Section3.Title, { id: titleId }, /* @__PURE__ */ React126.createElement(LineClamp2, { lines: 1 }, title), props.tag && /* @__PURE__ */ React126.createElement(TagLabel, { ...props.tag }), props.badge && /* @__PURE__ */ React126.createElement(Chip2, { text: props.badge }), props.chip && /* @__PURE__ */ React126.createElement(StatusChip, { ...props.chip }), props.chips?.map(({ type: chipType, status, text }, index) => {
|
|
13788
|
+
const Component = chipType === "inverse" ? InverseChip : StatusChip;
|
|
13789
|
+
const key = `${status}-${text}-${index}`;
|
|
13790
|
+
return /* @__PURE__ */ React126.createElement(Component, { key, text, status });
|
|
13791
|
+
}) ?? null),
|
|
13792
|
+
subtitle && /* @__PURE__ */ React126.createElement(Section3.Subtitle, { className: clsx38("row-start-2", { "col-start-2": _collapsible }) }, /* @__PURE__ */ React126.createElement(LineClamp2, { lines: 1 }, subtitle))
|
|
13793
|
+
), !isCollapsed && /* @__PURE__ */ React126.createElement(Section3.Actions, null, props.switch && /* @__PURE__ */ React126.createElement(Switch2, { ...props.switch }), menu && /* @__PURE__ */ React126.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React126.createElement(
|
|
13643
13794
|
DropdownMenu2,
|
|
13644
13795
|
{
|
|
13645
13796
|
onAction: (action) => onAction?.(action),
|
|
13646
13797
|
onOpenChange: onMenuOpenChange,
|
|
13647
13798
|
placement: defaultContextualMenuPlacement
|
|
13648
13799
|
},
|
|
13649
|
-
/* @__PURE__ */
|
|
13800
|
+
/* @__PURE__ */ React126.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React126.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: more_default })),
|
|
13650
13801
|
menu
|
|
13651
|
-
)), props.actions && castArray8(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */
|
|
13652
|
-
/* @__PURE__ */
|
|
13802
|
+
)), props.actions && castArray8(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */ React126.createElement(SelectBase, { "aria-labelledby": titleId, ...props.select }))),
|
|
13803
|
+
/* @__PURE__ */ React126.createElement(
|
|
13653
13804
|
animated6.div,
|
|
13654
13805
|
{
|
|
13655
13806
|
id: regionId,
|
|
@@ -13657,7 +13808,7 @@ var Section4 = (props) => {
|
|
|
13657
13808
|
style: spring,
|
|
13658
13809
|
className: clsx38({ "overflow-hidden": _collapsible && (isCollapsed || !isResting) })
|
|
13659
13810
|
},
|
|
13660
|
-
/* @__PURE__ */
|
|
13811
|
+
/* @__PURE__ */ React126.createElement("div", { ref }, hasTabs ? /* @__PURE__ */ React126.createElement(
|
|
13661
13812
|
SectionTabs,
|
|
13662
13813
|
{
|
|
13663
13814
|
...children.props,
|
|
@@ -13665,22 +13816,22 @@ var Section4 = (props) => {
|
|
|
13665
13816
|
"mt-4": _collapsible
|
|
13666
13817
|
})
|
|
13667
13818
|
}
|
|
13668
|
-
) : /* @__PURE__ */
|
|
13819
|
+
) : /* @__PURE__ */ React126.createElement(Section3.Body, null, children))
|
|
13669
13820
|
)
|
|
13670
13821
|
);
|
|
13671
13822
|
};
|
|
13672
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
|
13823
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React126.createElement(Section3.Body, null, children.find(
|
|
13673
13824
|
(node, index) => node?.props.value === selected || index === selected
|
|
13674
13825
|
)));
|
|
13675
13826
|
|
|
13676
13827
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
|
13677
|
-
import
|
|
13828
|
+
import React127 from "react";
|
|
13678
13829
|
import { tv as tv33 } from "tailwind-variants";
|
|
13679
13830
|
var segmentedControlStyles = tv33({
|
|
13680
13831
|
slots: {
|
|
13681
13832
|
wrapper: [
|
|
13682
|
-
"transition border-l border-
|
|
13683
|
-
"first:border-l-0 first:rounded-l last:rounded-r",
|
|
13833
|
+
"transition border-l border-muted overflow-hidden hover:bg-primary-hover",
|
|
13834
|
+
"first:border-l-0 first:rounded-l-[var(--aquarium-segmented-control-inner-radius)] last:rounded-r-[var(--aquarium-segmented-control-inner-radius)]",
|
|
13684
13835
|
"focus-within:border-l-transparent focus-within:relative focus-within:z-50 focus-within:ring-1 focus-within:ring-offset-0 focus-within:ring-primary-default"
|
|
13685
13836
|
],
|
|
13686
13837
|
button: [
|
|
@@ -13710,7 +13861,7 @@ var SegmentedControl = ({
|
|
|
13710
13861
|
...rest
|
|
13711
13862
|
}) => {
|
|
13712
13863
|
const { wrapper, button } = segmentedControlStyles({ selected });
|
|
13713
|
-
return /* @__PURE__ */
|
|
13864
|
+
return /* @__PURE__ */ React127.createElement("li", { className: wrapper() }, /* @__PURE__ */ React127.createElement("button", { type: "button", ...rest, className: button({ className }), "aria-pressed": selected }, children));
|
|
13714
13865
|
};
|
|
13715
13866
|
var segmentedControlGroupStyles = tv33({
|
|
13716
13867
|
base: "Aquarium-SegmentedControl flex border border-default rounded"
|
|
@@ -13723,9 +13874,9 @@ var SegmentedControlGroup = ({
|
|
|
13723
13874
|
ariaLabel,
|
|
13724
13875
|
...rest
|
|
13725
13876
|
}) => {
|
|
13726
|
-
return /* @__PURE__ */
|
|
13877
|
+
return /* @__PURE__ */ React127.createElement("ul", { ...rest, "aria-label": ariaLabel, className: segmentedControlGroupStyles({ className }) }, React127.Children.map(
|
|
13727
13878
|
children,
|
|
13728
|
-
(child) =>
|
|
13879
|
+
(child) => React127.cloneElement(child, {
|
|
13729
13880
|
onClick: () => onChange(child.props.value),
|
|
13730
13881
|
selected: child.props.value === value
|
|
13731
13882
|
})
|
|
@@ -13733,10 +13884,10 @@ var SegmentedControlGroup = ({
|
|
|
13733
13884
|
};
|
|
13734
13885
|
|
|
13735
13886
|
// src/molecules/Stepper/Stepper.tsx
|
|
13736
|
-
import
|
|
13887
|
+
import React129 from "react";
|
|
13737
13888
|
|
|
13738
13889
|
// src/atoms/Stepper/Stepper.tsx
|
|
13739
|
-
import
|
|
13890
|
+
import React128 from "react";
|
|
13740
13891
|
import { tv as tv34 } from "tailwind-variants";
|
|
13741
13892
|
var connectorStyles = tv34({
|
|
13742
13893
|
slots: {
|
|
@@ -13817,26 +13968,26 @@ var stepStyles = tv34({
|
|
|
13817
13968
|
}
|
|
13818
13969
|
]
|
|
13819
13970
|
});
|
|
13820
|
-
var Stepper = ({ className, ...rest }) => /* @__PURE__ */
|
|
13971
|
+
var Stepper = ({ className, ...rest }) => /* @__PURE__ */ React128.createElement("div", { ...rest, className });
|
|
13821
13972
|
var ConnectorContainer = ({
|
|
13822
13973
|
className,
|
|
13823
13974
|
dense = false,
|
|
13824
13975
|
...rest
|
|
13825
13976
|
}) => {
|
|
13826
13977
|
const { container: container2 } = connectorStyles({ dense });
|
|
13827
|
-
return /* @__PURE__ */
|
|
13978
|
+
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: container2({ className }) });
|
|
13828
13979
|
};
|
|
13829
13980
|
var Connector = ({ children, className, completed = false, dense = false, ...rest }) => {
|
|
13830
13981
|
const { connector } = connectorStyles({ completed, dense });
|
|
13831
|
-
return /* @__PURE__ */
|
|
13982
|
+
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: connector({ className }) });
|
|
13832
13983
|
};
|
|
13833
13984
|
var Step = ({ className, state, ...rest }) => {
|
|
13834
13985
|
const { step } = stepStyles({ state });
|
|
13835
|
-
return /* @__PURE__ */
|
|
13986
|
+
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: step({ className }) });
|
|
13836
13987
|
};
|
|
13837
13988
|
var Indicator = ({ children, className, state, dense = false, ...rest }) => {
|
|
13838
13989
|
const { indicator } = stepStyles({ state, dense });
|
|
13839
|
-
return /* @__PURE__ */
|
|
13990
|
+
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: indicator({ className }) }, state === "completed" ? /* @__PURE__ */ React128.createElement(InlineIcon, { icon: tick_default }) : dense ? null : children);
|
|
13840
13991
|
};
|
|
13841
13992
|
Step.Indicator = Indicator;
|
|
13842
13993
|
Stepper.Step = Step;
|
|
@@ -13845,13 +13996,13 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
|
13845
13996
|
|
|
13846
13997
|
// src/molecules/Stepper/Stepper.tsx
|
|
13847
13998
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
|
13848
|
-
const steps =
|
|
13849
|
-
return /* @__PURE__ */
|
|
13999
|
+
const steps = React129.Children.count(children);
|
|
14000
|
+
return /* @__PURE__ */ React129.createElement(Stepper, { role: "list", className: "Aquarium-Stepper" }, /* @__PURE__ */ React129.createElement(Template, { columns: steps }, React129.Children.map(children, (child, index) => {
|
|
13850
14001
|
if (!isComponentType(child, Step2)) {
|
|
13851
14002
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
|
13852
14003
|
} else {
|
|
13853
14004
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
|
13854
|
-
return /* @__PURE__ */
|
|
14005
|
+
return /* @__PURE__ */ React129.createElement(Stepper.Step, { state, "aria-current": state === "active" ? "step" : false, role: "listitem" }, index > 0 && index <= steps && /* @__PURE__ */ React129.createElement(Stepper.ConnectorContainer, { dense }, /* @__PURE__ */ React129.createElement(Stepper.ConnectorContainer.Connector, { completed: state === "completed" || state === "active" })), /* @__PURE__ */ React129.createElement(Stepper.Step.Indicator, { state, dense }, index + 1), child.props.children);
|
|
13855
14006
|
}
|
|
13856
14007
|
})));
|
|
13857
14008
|
};
|
|
@@ -13861,7 +14012,7 @@ Step2.displayName = "Stepper.Step";
|
|
|
13861
14012
|
Stepper2.Step = Step2;
|
|
13862
14013
|
|
|
13863
14014
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
|
13864
|
-
import
|
|
14015
|
+
import React130, { useState as useState13 } from "react";
|
|
13865
14016
|
import { useId as useId18 } from "@react-aria/utils";
|
|
13866
14017
|
var SwitchGroup = ({
|
|
13867
14018
|
value,
|
|
@@ -13872,7 +14023,7 @@ var SwitchGroup = ({
|
|
|
13872
14023
|
children,
|
|
13873
14024
|
...props
|
|
13874
14025
|
}) => {
|
|
13875
|
-
const [selectedItems, setSelectedItems] =
|
|
14026
|
+
const [selectedItems, setSelectedItems] = useState13(value ?? defaultValue ?? []);
|
|
13876
14027
|
if (value !== void 0 && value !== selectedItems) {
|
|
13877
14028
|
setSelectedItems(value);
|
|
13878
14029
|
}
|
|
@@ -13885,14 +14036,14 @@ var SwitchGroup = ({
|
|
|
13885
14036
|
setSelectedItems(updated);
|
|
13886
14037
|
onChange?.(updated);
|
|
13887
14038
|
};
|
|
13888
|
-
return /* @__PURE__ */
|
|
14039
|
+
return /* @__PURE__ */ React130.createElement(LabelControl, { fieldset: true, ...labelControlProps, ...errorProps, className: "Aquarium-SwitchGroup" }, /* @__PURE__ */ React130.createElement(InputGroup, { cols }, React130.Children.map(children, (c) => {
|
|
13889
14040
|
if (!isComponentType(c, Switch2)) {
|
|
13890
14041
|
return null;
|
|
13891
14042
|
}
|
|
13892
14043
|
const str = c.props.value?.toString();
|
|
13893
14044
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
|
13894
14045
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
|
13895
|
-
return
|
|
14046
|
+
return React130.cloneElement(c, {
|
|
13896
14047
|
defaultChecked: c.props.defaultChecked ?? defaultChecked,
|
|
13897
14048
|
checked: c.props.checked ?? checked,
|
|
13898
14049
|
onChange: c.props.onChange ?? handleChange,
|
|
@@ -13902,18 +14053,18 @@ var SwitchGroup = ({
|
|
|
13902
14053
|
})));
|
|
13903
14054
|
};
|
|
13904
14055
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
|
13905
|
-
return /* @__PURE__ */
|
|
14056
|
+
return /* @__PURE__ */ React130.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React130.createElement("div", { className: "flex flex-wrap flex-col gap-2" }, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React130.createElement(Switch2.Skeleton, { key }))));
|
|
13906
14057
|
};
|
|
13907
14058
|
SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
13908
14059
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
13909
14060
|
|
|
13910
14061
|
// src/molecules/Textarea/Textarea.tsx
|
|
13911
|
-
import
|
|
14062
|
+
import React131, { useState as useState14 } from "react";
|
|
13912
14063
|
import { useId as useId19 } from "@react-aria/utils";
|
|
13913
14064
|
import { clsx as clsx39 } from "clsx";
|
|
13914
14065
|
import { omit as omit17, toString as toString2 } from "lodash-es";
|
|
13915
|
-
var TextareaBase =
|
|
13916
|
-
({ readOnly = false, valid = true, ...props }, ref) => /* @__PURE__ */
|
|
14066
|
+
var TextareaBase = React131.forwardRef(
|
|
14067
|
+
({ readOnly = false, valid = true, ...props }, ref) => /* @__PURE__ */ React131.createElement(
|
|
13917
14068
|
"textarea",
|
|
13918
14069
|
{
|
|
13919
14070
|
ref,
|
|
@@ -13923,16 +14074,16 @@ var TextareaBase = React130.forwardRef(
|
|
|
13923
14074
|
}
|
|
13924
14075
|
)
|
|
13925
14076
|
);
|
|
13926
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
|
13927
|
-
var Textarea =
|
|
13928
|
-
const [value, setValue] =
|
|
14077
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React131.createElement(Skeleton, { height: 58 });
|
|
14078
|
+
var Textarea = React131.forwardRef((props, ref) => {
|
|
14079
|
+
const [value, setValue] = useState14(props.value ?? props.defaultValue ?? "");
|
|
13929
14080
|
const defaultId = useId19();
|
|
13930
14081
|
const id = props.id ?? defaultId;
|
|
13931
14082
|
const errorMessageId = useId19();
|
|
13932
14083
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
13933
14084
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
13934
14085
|
const baseProps = omit17(props, Object.keys(labelControlProps));
|
|
13935
|
-
return /* @__PURE__ */
|
|
14086
|
+
return /* @__PURE__ */ React131.createElement(
|
|
13936
14087
|
LabelControl,
|
|
13937
14088
|
{
|
|
13938
14089
|
id: `${id}-label`,
|
|
@@ -13942,7 +14093,7 @@ var Textarea = React130.forwardRef((props, ref) => {
|
|
|
13942
14093
|
...labelControlProps,
|
|
13943
14094
|
className: "Aquarium-Textarea"
|
|
13944
14095
|
},
|
|
13945
|
-
/* @__PURE__ */
|
|
14096
|
+
/* @__PURE__ */ React131.createElement(
|
|
13946
14097
|
TextareaBase,
|
|
13947
14098
|
{
|
|
13948
14099
|
ref,
|
|
@@ -13963,22 +14114,22 @@ var Textarea = React130.forwardRef((props, ref) => {
|
|
|
13963
14114
|
);
|
|
13964
14115
|
});
|
|
13965
14116
|
Textarea.displayName = "Textarea";
|
|
13966
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
|
14117
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React131.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React131.createElement(TextareaBase.Skeleton, null));
|
|
13967
14118
|
Textarea.Skeleton = TextAreaSkeleton;
|
|
13968
14119
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
|
13969
14120
|
|
|
13970
14121
|
// src/molecules/Timeline/Timeline.tsx
|
|
13971
|
-
import
|
|
14122
|
+
import React133 from "react";
|
|
13972
14123
|
|
|
13973
14124
|
// src/atoms/Timeline/Timeline.tsx
|
|
13974
|
-
import
|
|
14125
|
+
import React132 from "react";
|
|
13975
14126
|
import { clsx as clsx40 } from "clsx";
|
|
13976
|
-
var Timeline = ({ className, ...rest }) => /* @__PURE__ */
|
|
13977
|
-
var Content2 = ({ className, ...rest }) => /* @__PURE__ */
|
|
13978
|
-
var Separator = ({ className, ...rest }) => /* @__PURE__ */
|
|
13979
|
-
var LineContainer = ({ className, ...rest }) => /* @__PURE__ */
|
|
13980
|
-
var Line = ({ className, ...rest }) => /* @__PURE__ */
|
|
13981
|
-
var Dot = ({ className, ...rest }) => /* @__PURE__ */
|
|
14127
|
+
var Timeline = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("grid grid-cols-[16px_1fr] gap-x-4", className) });
|
|
14128
|
+
var Content2 = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("pb-6", className) });
|
|
14129
|
+
var Separator = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("flex items-center justify-center h-5 w-5", className) });
|
|
14130
|
+
var LineContainer = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("flex justify-center py-1", className) });
|
|
14131
|
+
var Line = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("w-1 bg-medium h-full justify-self-center", className) });
|
|
14132
|
+
var Dot = ({ className, ...rest }) => /* @__PURE__ */ React132.createElement("div", { ...rest, className: clsx40("bg-intense h-[6px] w-[6px] rounded", className) });
|
|
13982
14133
|
Separator.Dot = Dot;
|
|
13983
14134
|
LineContainer.Line = Line;
|
|
13984
14135
|
Timeline.Separator = Separator;
|
|
@@ -13987,23 +14138,23 @@ Timeline.Content = Content2;
|
|
|
13987
14138
|
|
|
13988
14139
|
// src/molecules/Timeline/Timeline.tsx
|
|
13989
14140
|
var TimelineItem = () => null;
|
|
13990
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
|
14141
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React133.createElement("div", { className: "Aquarium-Timeline" }, React133.Children.map(children, (item) => {
|
|
13991
14142
|
if (!isComponentType(item, TimelineItem)) {
|
|
13992
14143
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
|
13993
14144
|
} else {
|
|
13994
14145
|
const { props, key } = item;
|
|
13995
|
-
return /* @__PURE__ */
|
|
14146
|
+
return /* @__PURE__ */ React133.createElement(Timeline, { key: key ?? props.title }, /* @__PURE__ */ React133.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React133.createElement(Icon, { icon: error_default, color: "danger-default" }) : props.variant === "warning" ? /* @__PURE__ */ React133.createElement(Icon, { icon: warningSign_default, color: "warning-default" }) : props.variant === "info" ? /* @__PURE__ */ React133.createElement(Icon, { icon: time_default, color: "info-default" }) : props.variant === "success" ? /* @__PURE__ */ React133.createElement(Icon, { icon: tickCircle_default, color: "success-default" }) : props.variant === "loading" ? /* @__PURE__ */ React133.createElement(Icon, { icon: loading_default, color: "default" }) : /* @__PURE__ */ React133.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React133.createElement(Typography2.Small, { color: "muted" }, props.title), /* @__PURE__ */ React133.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React133.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React133.createElement(Timeline.Content, null, /* @__PURE__ */ React133.createElement(Typography2.Default, null, props.children)));
|
|
13996
14147
|
}
|
|
13997
14148
|
}));
|
|
13998
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
|
13999
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
|
14149
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React133.createElement(Timeline, null, /* @__PURE__ */ React133.createElement(Timeline.Separator, null, /* @__PURE__ */ React133.createElement(Skeleton, { width: 6, height: 6, rounded: true })), /* @__PURE__ */ React133.createElement(Skeleton, { height: 12, width: 120 }), /* @__PURE__ */ React133.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React133.createElement(Skeleton, { width: 2, height: "100%" })), /* @__PURE__ */ React133.createElement(Timeline.Content, null, /* @__PURE__ */ React133.createElement(Box, { display: "flex", flexDirection: "column", gap: "3" }, /* @__PURE__ */ React133.createElement(Skeleton, { height: 32, width: "100%" }), /* @__PURE__ */ React133.createElement(Skeleton, { height: 32, width: "73%" }), /* @__PURE__ */ React133.createElement(Skeleton, { height: 32, width: "80%" }))));
|
|
14150
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React133.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React133.createElement(TimelineItemSkeleton, { key })));
|
|
14000
14151
|
Timeline2.Item = TimelineItem;
|
|
14001
14152
|
Timeline2.Skeleton = TimelineSkeleton;
|
|
14002
14153
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
|
14003
14154
|
|
|
14004
14155
|
// src/molecules/TimePicker/TimePicker.tsx
|
|
14005
|
-
import
|
|
14006
|
-
var TimePicker = (props) => /* @__PURE__ */
|
|
14156
|
+
import React134 from "react";
|
|
14157
|
+
var TimePicker = (props) => /* @__PURE__ */ React134.createElement(TimeField2, { ...props });
|
|
14007
14158
|
|
|
14008
14159
|
// src/utils/table/sortByColumn.ts
|
|
14009
14160
|
var sortByColumn = (items, column, sortState) => {
|
|
@@ -14025,13 +14176,13 @@ var sortByColumn = (items, column, sortState) => {
|
|
|
14025
14176
|
};
|
|
14026
14177
|
|
|
14027
14178
|
// src/utils/table/useSortState.ts
|
|
14028
|
-
import
|
|
14029
|
-
var useSortState = (initialSortState) =>
|
|
14179
|
+
import React135 from "react";
|
|
14180
|
+
var useSortState = (initialSortState) => React135.useState(initialSortState);
|
|
14030
14181
|
|
|
14031
14182
|
// src/utils/table/useTableSelect.ts
|
|
14032
|
-
import
|
|
14183
|
+
import React136 from "react";
|
|
14033
14184
|
var useTableSelect = (data31, { key }) => {
|
|
14034
|
-
const [selected, setSelected] =
|
|
14185
|
+
const [selected, setSelected] = React136.useState([]);
|
|
14035
14186
|
const allSelected = selected.length === data31.length;
|
|
14036
14187
|
const isSelected = (dot) => selected.includes(dot[key]);
|
|
14037
14188
|
const selectAll = () => setSelected(data31.map((dot) => dot[key]));
|
|
@@ -14056,7 +14207,7 @@ var useTableSelect = (data31, { key }) => {
|
|
|
14056
14207
|
};
|
|
14057
14208
|
|
|
14058
14209
|
// src/molecules/ItemList/ItemList.tsx
|
|
14059
|
-
import
|
|
14210
|
+
import React137 from "react";
|
|
14060
14211
|
var ItemList = ({
|
|
14061
14212
|
columns,
|
|
14062
14213
|
items,
|
|
@@ -14068,9 +14219,9 @@ var ItemList = ({
|
|
|
14068
14219
|
const templateColumns = columns.map((column) => column.width ?? "auto");
|
|
14069
14220
|
const [sortState, setSortState] = useSortState(defaultSort);
|
|
14070
14221
|
const sortedItems = onSortChanged ? items : sortByColumn(items, columns, sortState);
|
|
14071
|
-
return /* @__PURE__ */
|
|
14222
|
+
return /* @__PURE__ */ React137.createElement(Template, { className: "Aquarium-ItemList", columns: templateColumns, role: "table" }, /* @__PURE__ */ React137.createElement(DataList.Row, { header: true }, columns.map((column) => {
|
|
14072
14223
|
if (columnHasSort(column)) {
|
|
14073
|
-
return /* @__PURE__ */
|
|
14224
|
+
return /* @__PURE__ */ React137.createElement(
|
|
14074
14225
|
DataList.SortCell,
|
|
14075
14226
|
{
|
|
14076
14227
|
sticky,
|
|
@@ -14098,11 +14249,11 @@ var ItemList = ({
|
|
|
14098
14249
|
column.headerName
|
|
14099
14250
|
);
|
|
14100
14251
|
}
|
|
14101
|
-
return /* @__PURE__ */
|
|
14102
|
-
})), /* @__PURE__ */
|
|
14252
|
+
return /* @__PURE__ */ React137.createElement(DataList.HeadCell, { key: column.key ?? column.headerName, ...cellProps(column), sticky }, column.headerName);
|
|
14253
|
+
})), /* @__PURE__ */ React137.createElement(Rows, { columns, items: sortedItems, level: 0, ...infiniteProps }));
|
|
14103
14254
|
};
|
|
14104
14255
|
var Rows = ({ columns, items, level, isLastGroup, ...infiniteProps }) => {
|
|
14105
|
-
return /* @__PURE__ */
|
|
14256
|
+
return /* @__PURE__ */ React137.createElement(
|
|
14106
14257
|
List,
|
|
14107
14258
|
{
|
|
14108
14259
|
...level === 0 ? infiniteProps : {},
|
|
@@ -14111,22 +14262,22 @@ var Rows = ({ columns, items, level, isLastGroup, ...infiniteProps }) => {
|
|
|
14111
14262
|
const hasSubItems = item.items && item.items.length > 0;
|
|
14112
14263
|
const isLastItem = itemIndex === items.length - 1;
|
|
14113
14264
|
const noDivider = level === 0 && isLastItem || level > 0 && (isLastGroup || !isLastItem) || hasSubItems;
|
|
14114
|
-
return /* @__PURE__ */
|
|
14265
|
+
return /* @__PURE__ */ React137.createElement(React137.Fragment, { key: item.id }, /* @__PURE__ */ React137.createElement(DataList.Row, { noDivider }, /* @__PURE__ */ React137.createElement(
|
|
14115
14266
|
List,
|
|
14116
14267
|
{
|
|
14117
14268
|
items: columns,
|
|
14118
|
-
renderItem: (column, columnIndex) => /* @__PURE__ */
|
|
14269
|
+
renderItem: (column, columnIndex) => /* @__PURE__ */ React137.createElement(
|
|
14119
14270
|
DataList.Cell,
|
|
14120
14271
|
{
|
|
14121
14272
|
key: column.key ?? column.headerName,
|
|
14122
14273
|
...cellProps(column),
|
|
14123
14274
|
style: level > 1 && columnIndex === 0 ? { paddingLeft: (level - 1) * 60 } : void 0
|
|
14124
14275
|
},
|
|
14125
|
-
level > 0 && columnIndex === 0 && /* @__PURE__ */
|
|
14126
|
-
/* @__PURE__ */
|
|
14276
|
+
level > 0 && columnIndex === 0 && /* @__PURE__ */ React137.createElement(DataList.TreeLine, { isLast: itemIndex === items.length - 1 }),
|
|
14277
|
+
/* @__PURE__ */ React137.createElement(DataListCell, { column, row: item, index: columnIndex, rows: items })
|
|
14127
14278
|
)
|
|
14128
14279
|
}
|
|
14129
|
-
)), item.items && /* @__PURE__ */
|
|
14280
|
+
)), item.items && /* @__PURE__ */ React137.createElement(WithGroup, { level }, /* @__PURE__ */ React137.createElement(
|
|
14130
14281
|
Rows,
|
|
14131
14282
|
{
|
|
14132
14283
|
columns,
|
|
@@ -14139,7 +14290,7 @@ var Rows = ({ columns, items, level, isLastGroup, ...infiniteProps }) => {
|
|
|
14139
14290
|
}
|
|
14140
14291
|
);
|
|
14141
14292
|
};
|
|
14142
|
-
var WithGroup = ({ level, children }) => level === 0 ? /* @__PURE__ */
|
|
14293
|
+
var WithGroup = ({ level, children }) => level === 0 ? /* @__PURE__ */ React137.createElement(DataList.Row, { isGroup: true }, children) : /* @__PURE__ */ React137.createElement(React137.Fragment, null, children);
|
|
14143
14294
|
|
|
14144
14295
|
// src/molecules/index.ts
|
|
14145
14296
|
var SelectItem = Select.Item;
|