@aivenio/aquarium 6.3.0 → 6.5.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 +2 -2
- package/dist/atoms.cjs +119 -34
- package/dist/atoms.mjs +120 -35
- package/dist/charts.cjs +2 -2
- package/dist/charts.mjs +2 -2
- package/dist/src/atoms/Modal/Modal.d.ts +1 -0
- package/dist/src/atoms/Modal/Modal.js +3 -3
- package/dist/src/atoms/Stepper/Stepper.d.ts +4 -0
- package/dist/src/atoms/Stepper/Stepper.js +87 -23
- package/dist/src/icons/healthHipaa.d.ts +8 -0
- package/dist/src/icons/healthHipaa.js +9 -0
- package/dist/src/icons/index.d.ts +2 -0
- package/dist/src/icons/index.js +3 -1
- package/dist/src/icons/pciDss.d.ts +8 -0
- package/dist/src/icons/pciDss.js +9 -0
- package/dist/src/molecules/DataList/DataList.js +32 -15
- package/dist/src/molecules/DataList/DataListGroup.d.ts +2 -1
- package/dist/src/molecules/DataList/DataListGroup.js +15 -14
- package/dist/src/molecules/Dialog/Dialog.d.ts +1 -1
- package/dist/src/molecules/Dialog/Dialog.js +6 -6
- package/dist/src/molecules/Stepper/Stepper.d.ts +4 -0
- package/dist/src/molecules/Stepper/Stepper.js +7 -7
- package/dist/src/molecules/Tooltip/Tooltip.js +22 -4
- package/dist/src/tokens/tokens.json +2 -2
- package/dist/src/utils/table/types.d.ts +7 -0
- package/dist/src/utils/table/types.js +1 -1
- package/dist/styles.css +49 -3
- package/dist/system.cjs +231 -112
- package/dist/system.mjs +196 -77
- package/dist/tokens.json +2 -2
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/molecules/DataList/utils.d.ts +0 -2
- package/dist/src/molecules/DataList/utils.js +0 -3
package/dist/system.cjs
CHANGED
|
@@ -1987,9 +1987,9 @@ var tokens_default = {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
},
|
|
1989
1989
|
code: {
|
|
1990
|
-
background: "rgba(
|
|
1990
|
+
background: "rgba(255,255,255,1)",
|
|
1991
1991
|
text: "rgba(45,46,48,1)",
|
|
1992
|
-
variable: "rgba(
|
|
1992
|
+
variable: "rgba(91,30,103,1)",
|
|
1993
1993
|
keyword: "rgba(202, 33, 101, 1)",
|
|
1994
1994
|
string: "rgba(0, 127, 115, 1)",
|
|
1995
1995
|
function: "rgba(9, 128, 193, 1)",
|
|
@@ -2591,6 +2591,14 @@ var Tooltip = ({ delay = 200, ...props }) => {
|
|
|
2591
2591
|
shouldFlip,
|
|
2592
2592
|
offset: ARROW_OFFSET
|
|
2593
2593
|
});
|
|
2594
|
+
const [containsFocusable, setContainsFocusable] = import_react9.default.useState(false);
|
|
2595
|
+
import_react9.default.useLayoutEffect(() => {
|
|
2596
|
+
if (triggerRef.current) {
|
|
2597
|
+
const elements = Array.from(triggerRef.current.querySelectorAll("*"));
|
|
2598
|
+
const hasFocusable = elements.some((el) => (0, import_utils.isFocusable)(el));
|
|
2599
|
+
setContainsFocusable(hasFocusable);
|
|
2600
|
+
}
|
|
2601
|
+
});
|
|
2594
2602
|
const { focusWithinProps } = (0, import_interactions.useFocusWithin)({
|
|
2595
2603
|
onFocusWithinChange: (isFocusWithin) => isFocusWithin ? state.open() : state.close()
|
|
2596
2604
|
});
|
|
@@ -2619,6 +2627,7 @@ var Tooltip = ({ delay = 200, ...props }) => {
|
|
|
2619
2627
|
{
|
|
2620
2628
|
className: display,
|
|
2621
2629
|
...triggerProps,
|
|
2630
|
+
tabIndex: containsFocusable ? -1 : triggerProps.tabIndex,
|
|
2622
2631
|
onFocus: (e) => {
|
|
2623
2632
|
triggerProps.onFocus?.(e);
|
|
2624
2633
|
focusWithinProps.onFocus?.(e);
|
|
@@ -6220,15 +6229,7 @@ Modal.TitleContainer = ({ children, className, ...rest }) => {
|
|
|
6220
6229
|
const { titleContainer: titleContainer2 } = modalStyles();
|
|
6221
6230
|
return /* @__PURE__ */ import_react67.default.createElement("div", { ...rest, className: titleContainer2({ className }) }, children);
|
|
6222
6231
|
};
|
|
6223
|
-
var ModalBody = ({
|
|
6224
|
-
children,
|
|
6225
|
-
className,
|
|
6226
|
-
noFooter = false,
|
|
6227
|
-
maxHeight,
|
|
6228
|
-
style,
|
|
6229
|
-
size,
|
|
6230
|
-
...rest
|
|
6231
|
-
}) => {
|
|
6232
|
+
var ModalBody = ({ children, className, contentClassName, noFooter = false, maxHeight, style, size, ...rest }) => {
|
|
6232
6233
|
const { body, bodyContent } = modalStyles({ size });
|
|
6233
6234
|
const { containerRef, topSentinelRef, bottomSentinelRef, showTopFade, showBottomFade } = useScrollFade();
|
|
6234
6235
|
return /* @__PURE__ */ import_react67.default.createElement(
|
|
@@ -6240,7 +6241,7 @@ var ModalBody = ({
|
|
|
6240
6241
|
style: { maxHeight, ...style }
|
|
6241
6242
|
},
|
|
6242
6243
|
/* @__PURE__ */ import_react67.default.createElement("div", { ref: topSentinelRef, "aria-hidden": "true", className: "h-1px" }),
|
|
6243
|
-
/* @__PURE__ */ import_react67.default.createElement("div", { className: bodyContent({ noFooter }) }, children),
|
|
6244
|
+
/* @__PURE__ */ import_react67.default.createElement("div", { className: bodyContent({ noFooter, className: contentClassName }) }, children),
|
|
6244
6245
|
/* @__PURE__ */ import_react67.default.createElement("div", { ref: bottomSentinelRef, "aria-hidden": "true", className: "h-1px -mt-1px" })
|
|
6245
6246
|
);
|
|
6246
6247
|
};
|
|
@@ -6709,7 +6710,7 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react
|
|
|
6709
6710
|
|
|
6710
6711
|
// src/molecules/DataList/DataList.tsx
|
|
6711
6712
|
var import_react93 = __toESM(require("react"));
|
|
6712
|
-
var
|
|
6713
|
+
var import_utils19 = require("@react-stately/utils");
|
|
6713
6714
|
var import_clsx26 = require("clsx");
|
|
6714
6715
|
var import_lodash_es30 = require("lodash-es");
|
|
6715
6716
|
|
|
@@ -8207,11 +8208,6 @@ var useDataListContext = () => {
|
|
|
8207
8208
|
// src/molecules/DataList/DataListGroup.tsx
|
|
8208
8209
|
var import_react90 = __toESM(require("react"));
|
|
8209
8210
|
var import_lodash_es28 = require("lodash-es");
|
|
8210
|
-
|
|
8211
|
-
// src/molecules/DataList/utils.ts
|
|
8212
|
-
var flattenRows = (rows) => areRowsGrouped(rows) ? Object.values(rows).flatMap(flattenRows) : rows;
|
|
8213
|
-
|
|
8214
|
-
// src/molecules/DataList/DataListGroup.tsx
|
|
8215
8211
|
var GAP = 8;
|
|
8216
8212
|
var INDENTATION = 28;
|
|
8217
8213
|
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
|
@@ -8242,6 +8238,7 @@ var DataListGroup = ({
|
|
|
8242
8238
|
rows,
|
|
8243
8239
|
selectable,
|
|
8244
8240
|
selectedRows,
|
|
8241
|
+
statsByNode,
|
|
8245
8242
|
getOnSelectionChangeForId,
|
|
8246
8243
|
selectionDisabled = () => false,
|
|
8247
8244
|
getRowSelectionLabel = getDefaultRowSelectionLabel,
|
|
@@ -8270,8 +8267,8 @@ var DataListGroup = ({
|
|
|
8270
8267
|
items: groups,
|
|
8271
8268
|
renderItem: (row, index) => {
|
|
8272
8269
|
const isSelected = selectedRows?.includes(row.id) ?? false;
|
|
8273
|
-
const isDisabled = disabled?.(row, index,
|
|
8274
|
-
const isSelectionDisabled = selectionDisabled(row, index,
|
|
8270
|
+
const isDisabled = disabled?.(row, index, groups);
|
|
8271
|
+
const isSelectionDisabled = selectionDisabled(row, index, groups);
|
|
8275
8272
|
const isLastRow = isLastGroup && index === groups.length - 1;
|
|
8276
8273
|
return /* @__PURE__ */ import_react90.default.createElement(
|
|
8277
8274
|
DataListRow,
|
|
@@ -8281,7 +8278,7 @@ var DataListGroup = ({
|
|
|
8281
8278
|
row,
|
|
8282
8279
|
index,
|
|
8283
8280
|
isLast: isLastRow,
|
|
8284
|
-
rows,
|
|
8281
|
+
rows: groups,
|
|
8285
8282
|
active: selectable && isSelected,
|
|
8286
8283
|
menu: /* @__PURE__ */ import_react90.default.createElement(
|
|
8287
8284
|
DataListRowMenu,
|
|
@@ -8310,7 +8307,7 @@ var DataListGroup = ({
|
|
|
8310
8307
|
RadioButton,
|
|
8311
8308
|
{
|
|
8312
8309
|
value: row2.id.toString(),
|
|
8313
|
-
"aria-label": getRowSelectionLabel(row2, index2, isSelected,
|
|
8310
|
+
"aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
|
|
8314
8311
|
onChange: import_lodash_es28.noop,
|
|
8315
8312
|
checked: isSelected,
|
|
8316
8313
|
disabled: isDisabled || isSelectionDisabled
|
|
@@ -8318,7 +8315,7 @@ var DataListGroup = ({
|
|
|
8318
8315
|
), isMultiSelectionMode && /* @__PURE__ */ import_react90.default.createElement(
|
|
8319
8316
|
Checkbox,
|
|
8320
8317
|
{
|
|
8321
|
-
"aria-label": getRowSelectionLabel(row2, index2, isSelected,
|
|
8318
|
+
"aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
|
|
8322
8319
|
onChange: getOnSelectionChangeForId(row2.id),
|
|
8323
8320
|
checked: isSelected,
|
|
8324
8321
|
disabled: isDisabled || isSelectionDisabled
|
|
@@ -8355,10 +8352,12 @@ var DataListGroup = ({
|
|
|
8355
8352
|
);
|
|
8356
8353
|
}
|
|
8357
8354
|
const openPanelId = expandedGroupIds ? expandedGroupIds.find((id) => id === key) ?? null : void 0;
|
|
8358
|
-
const
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8355
|
+
const { selectableIds, allSelected, isChecked, isDisabled } = statsByNode.get(group) ?? {
|
|
8356
|
+
selectableIds: [],
|
|
8357
|
+
allSelected: false,
|
|
8358
|
+
isChecked: false,
|
|
8359
|
+
isDisabled: true
|
|
8360
|
+
};
|
|
8362
8361
|
const isActiveRow = !!openPanelId || selectable && isChecked;
|
|
8363
8362
|
const isLastRow = isLastGroup && index === groupKeys.length - 1 && !openPanelId;
|
|
8364
8363
|
return /* @__PURE__ */ import_react90.default.createElement(Accordion, { key, openPanelId }, hasCustomRowForGroup && /* @__PURE__ */ import_react90.default.createElement(DataList.Row, { active: isActiveRow, noDivider: isLastRow }, selectable && /* @__PURE__ */ import_react90.default.createElement(DataList.Cell, null, isMultiSelectionMode && /* @__PURE__ */ import_react90.default.createElement(
|
|
@@ -8367,8 +8366,8 @@ var DataListGroup = ({
|
|
|
8367
8366
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
8368
8367
|
checked: isChecked,
|
|
8369
8368
|
indeterminate: isChecked && !allSelected,
|
|
8370
|
-
disabled:
|
|
8371
|
-
onChange: getOnSelectionChangeForId(
|
|
8369
|
+
disabled: isDisabled,
|
|
8370
|
+
onChange: getOnSelectionChangeForId(selectableIds)
|
|
8372
8371
|
}
|
|
8373
8372
|
)), /* @__PURE__ */ import_react90.default.createElement(
|
|
8374
8373
|
List,
|
|
@@ -8402,8 +8401,8 @@ var DataListGroup = ({
|
|
|
8402
8401
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
8403
8402
|
checked: isChecked,
|
|
8404
8403
|
indeterminate: isChecked && !allSelected,
|
|
8405
|
-
disabled:
|
|
8406
|
-
onChange: getOnSelectionChangeForId(
|
|
8404
|
+
disabled: isDisabled,
|
|
8405
|
+
onChange: getOnSelectionChangeForId(selectableIds)
|
|
8407
8406
|
}
|
|
8408
8407
|
)), /* @__PURE__ */ import_react90.default.createElement(
|
|
8409
8408
|
DataList.Cell,
|
|
@@ -8522,12 +8521,12 @@ var DataList2 = ({
|
|
|
8522
8521
|
const containerRef = (0, import_react93.useRef)(null);
|
|
8523
8522
|
const hasStickyColumns = columns.some((column) => column.sticky);
|
|
8524
8523
|
const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
|
|
8525
|
-
const [selected, setSelected] = (0,
|
|
8524
|
+
const [selected, setSelected] = (0, import_utils19.useControlledState)(
|
|
8526
8525
|
selectedRows,
|
|
8527
8526
|
defaultSelectedRows,
|
|
8528
8527
|
(value) => onSelectionChange?.(value ?? [])
|
|
8529
8528
|
);
|
|
8530
|
-
const [expandedGroupIds, setExpandedGroupIds] = (0,
|
|
8529
|
+
const [expandedGroupIds, setExpandedGroupIds] = (0, import_utils19.useControlledState)(_expandedGroupIds, []);
|
|
8531
8530
|
const onGroupToggled = (id, open) => {
|
|
8532
8531
|
if (!open) {
|
|
8533
8532
|
setExpandedGroupIds([...expandedGroupIds, id]);
|
|
@@ -8541,6 +8540,7 @@ var DataList2 = ({
|
|
|
8541
8540
|
const [sort, updateSort] = useTableSort({ ...initialSortState, onSortChanged });
|
|
8542
8541
|
const sortedRows = (0, import_lodash_es30.isArray)(rows) ? sortRowsBy(rows, sort) : [];
|
|
8543
8542
|
const groups = areRowsGrouped(rows) ? rows : group ? (0, import_lodash_es30.isFunction)(group) ? group(sortedRows) : (0, import_lodash_es30.groupBy)(sortedRows, group) : void 0;
|
|
8543
|
+
const rootNode = groups ?? sortedRows;
|
|
8544
8544
|
const isCollapsible = (0, import_lodash_es30.isFunction)(rowDetails);
|
|
8545
8545
|
const templateColumns = (0, import_lodash_es30.compact)([
|
|
8546
8546
|
selectable ? "fit-content(28px)" : void 0,
|
|
@@ -8563,26 +8563,37 @@ var DataList2 = ({
|
|
|
8563
8563
|
}
|
|
8564
8564
|
};
|
|
8565
8565
|
const isMultiSelectionMode = selectable === "multiple" || selectable === "multiple-not-all";
|
|
8566
|
-
const
|
|
8567
|
-
const
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
(row,
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8566
|
+
const selectedIds = new Set(selected);
|
|
8567
|
+
const buildSelectionStats = (root) => {
|
|
8568
|
+
const statsByNode2 = /* @__PURE__ */ new Map();
|
|
8569
|
+
const recordStats = (node) => {
|
|
8570
|
+
const selectableIds2 = areRowsGrouped(node) ? Object.values(node).flatMap((child) => recordStats(child).selectableIds) : node.filter((row, i) => !disabled?.(row, i, node) && !selectionDisabled(row, i, node)).map((row) => row.id);
|
|
8571
|
+
const selectedSelectableCount = selectableIds2.filter((id) => selectedIds.has(id)).length;
|
|
8572
|
+
const stats = {
|
|
8573
|
+
selectableIds: selectableIds2,
|
|
8574
|
+
selectedSelectableCount,
|
|
8575
|
+
allSelected: selectableIds2.length > 0 && selectedSelectableCount === selectableIds2.length,
|
|
8576
|
+
isChecked: selectedSelectableCount > 0,
|
|
8577
|
+
isDisabled: selectableIds2.length === 0
|
|
8578
|
+
};
|
|
8579
|
+
statsByNode2.set(node, stats);
|
|
8580
|
+
return stats;
|
|
8581
|
+
};
|
|
8582
|
+
return { statsByNode: statsByNode2, rootStats: recordStats(root) };
|
|
8583
|
+
};
|
|
8584
|
+
const { statsByNode, rootStats } = buildSelectionStats(rootNode);
|
|
8585
|
+
const { selectableIds, isChecked, allSelected, isDisabled } = rootStats;
|
|
8574
8586
|
const componentContent = /* @__PURE__ */ import_react93.default.createElement(Template, { className: "Aquarium-DataList", columns: templateColumns, role: "table", "aria-label": ariaLabel }, !hideHeader && /* @__PURE__ */ import_react93.default.createElement(import_react93.default.Fragment, null, /* @__PURE__ */ import_react93.default.createElement(DataList.Row, { header: true }, selectable && /* @__PURE__ */ import_react93.default.createElement(DataList.HeadCell, { align: "left", sticky }, selectable === "multiple" && /* @__PURE__ */ import_react93.default.createElement(
|
|
8575
8587
|
Checkbox,
|
|
8576
8588
|
{
|
|
8577
8589
|
"aria-label": "Select all rows",
|
|
8578
|
-
indeterminate:
|
|
8579
|
-
checked:
|
|
8590
|
+
indeterminate: isChecked && !allSelected,
|
|
8591
|
+
checked: isChecked,
|
|
8592
|
+
disabled: isDisabled,
|
|
8580
8593
|
onChange: () => {
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
setSelected([]);
|
|
8585
|
-
}
|
|
8594
|
+
const enabledSet = new Set(selectableIds);
|
|
8595
|
+
const keptSelection = (selected ?? []).filter((id) => !enabledSet.has(id));
|
|
8596
|
+
setSelected(allSelected ? keptSelection : [...keptSelection, ...selectableIds]);
|
|
8586
8597
|
}
|
|
8587
8598
|
}
|
|
8588
8599
|
)), isCollapsible && /* @__PURE__ */ import_react93.default.createElement(DataList.HeadCell, { align: "left", sticky }), columns.map((column) => {
|
|
@@ -8627,6 +8638,7 @@ var DataList2 = ({
|
|
|
8627
8638
|
getGroupCheckboxLabel,
|
|
8628
8639
|
rows,
|
|
8629
8640
|
groups,
|
|
8641
|
+
statsByNode,
|
|
8630
8642
|
groupKey: void 0,
|
|
8631
8643
|
level: 0,
|
|
8632
8644
|
isLastGroup: true
|
|
@@ -8641,7 +8653,7 @@ var DataList2 = ({
|
|
|
8641
8653
|
const details = rowDetails?.(row, index, sortedRows);
|
|
8642
8654
|
const isSelected = selected?.includes(row.id) ?? false;
|
|
8643
8655
|
const isSelectionDisabled = selectionDisabled(row, index, sortedRows);
|
|
8644
|
-
const
|
|
8656
|
+
const isDisabled2 = disabled?.(row, index, sortedRows);
|
|
8645
8657
|
const openPanelId = expandedGroupIds.find((id) => id === row.id.toString()) || null;
|
|
8646
8658
|
const isLastRow = index === sortedRows.length - 1;
|
|
8647
8659
|
const content = /* @__PURE__ */ import_react93.default.createElement(
|
|
@@ -8664,7 +8676,7 @@ var DataList2 = ({
|
|
|
8664
8676
|
onAction,
|
|
8665
8677
|
onMenuOpenChange,
|
|
8666
8678
|
menuAriaLabel,
|
|
8667
|
-
disabled:
|
|
8679
|
+
disabled: isDisabled2
|
|
8668
8680
|
}
|
|
8669
8681
|
),
|
|
8670
8682
|
disabled,
|
|
@@ -8681,7 +8693,7 @@ var DataList2 = ({
|
|
|
8681
8693
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
|
|
8682
8694
|
onChange: import_lodash_es30.noop,
|
|
8683
8695
|
checked: isSelected,
|
|
8684
|
-
disabled:
|
|
8696
|
+
disabled: isDisabled2 || isSelectionDisabled
|
|
8685
8697
|
}
|
|
8686
8698
|
), isMultiSelectionMode && /* @__PURE__ */ import_react93.default.createElement(
|
|
8687
8699
|
Checkbox,
|
|
@@ -8689,7 +8701,7 @@ var DataList2 = ({
|
|
|
8689
8701
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
|
|
8690
8702
|
onChange: getOnSelectionChangeForId(row2.id),
|
|
8691
8703
|
checked: isSelected,
|
|
8692
|
-
disabled:
|
|
8704
|
+
disabled: isDisabled2 || isSelectionDisabled
|
|
8693
8705
|
}
|
|
8694
8706
|
)), rowDetails !== void 0 && /* @__PURE__ */ import_react93.default.createElement(DataList.Cell, null, details && /* @__PURE__ */ import_react93.default.createElement(Accordion.Toggle, { panelId: row2.id.toString(), onChange: onGroupToggled })));
|
|
8695
8707
|
},
|
|
@@ -8938,13 +8950,13 @@ DataTable.Skeleton = DataListSkeleton;
|
|
|
8938
8950
|
var import_react103 = __toESM(require("react"));
|
|
8939
8951
|
var import_react_aria_components13 = require("react-aria-components");
|
|
8940
8952
|
var import_label2 = require("@react-aria/label");
|
|
8941
|
-
var
|
|
8953
|
+
var import_utils25 = require("@react-aria/utils");
|
|
8942
8954
|
var import_lodash_es33 = require("lodash-es");
|
|
8943
8955
|
|
|
8944
8956
|
// src/molecules/TimeField/TimeField.tsx
|
|
8945
8957
|
var import_react98 = __toESM(require("react"));
|
|
8946
8958
|
var import_label = require("@react-aria/label");
|
|
8947
|
-
var
|
|
8959
|
+
var import_utils23 = require("@react-aria/utils");
|
|
8948
8960
|
var import_lodash_es32 = require("lodash-es");
|
|
8949
8961
|
|
|
8950
8962
|
// src/atoms/DateField/DateField.tsx
|
|
@@ -8975,7 +8987,7 @@ var TimeField = ({ disabled, valid, ...props }) => {
|
|
|
8975
8987
|
// src/molecules/TimeField/TimeField.tsx
|
|
8976
8988
|
function TimeField2(props) {
|
|
8977
8989
|
const { labelProps, fieldProps } = (0, import_label.useLabel)({ label: props.labelText });
|
|
8978
|
-
const errorMessageId = (0,
|
|
8990
|
+
const errorMessageId = (0, import_utils23.useId)();
|
|
8979
8991
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
8980
8992
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
8981
8993
|
const baseProps = (0, import_lodash_es32.omit)(props, Object.keys(labelControlProps));
|
|
@@ -11649,7 +11661,7 @@ var CalendarTimeField = ({ granularity, labelText = "Time", ...props }) => {
|
|
|
11649
11661
|
var DatePickerCalendarPropsContext = import_react103.default.createContext(null);
|
|
11650
11662
|
var DatePickerCalendar = (props) => {
|
|
11651
11663
|
const ctx = import_react103.default.useContext(DatePickerCalendarPropsContext);
|
|
11652
|
-
const { variant, granularity, errorMessage, presets = [] } = (0,
|
|
11664
|
+
const { variant, granularity, errorMessage, presets = [] } = (0, import_utils25.mergeProps)(ctx, props);
|
|
11653
11665
|
const { dialog, calendar, errorMessage: errorMessageStyle } = datePickerCalendarStyles();
|
|
11654
11666
|
return /* @__PURE__ */ import_react103.default.createElement(Popover, { offset: 0 }, /* @__PURE__ */ import_react103.default.createElement(Dialog, { className: dialog() }, presets.length > 0 && /* @__PURE__ */ import_react103.default.createElement(Presets, null, presets.map((props2) => /* @__PURE__ */ import_react103.default.createElement(Preset, { key: props2.value.toString(), ...props2 }))), /* @__PURE__ */ import_react103.default.createElement(Spacing, { gap: "3", className: "p-5" }, /* @__PURE__ */ import_react103.default.createElement(Calendar, { className: calendar() }), variant === "datetime" && /* @__PURE__ */ import_react103.default.createElement(CalendarTimeField, { granularity }), errorMessage && /* @__PURE__ */ import_react103.default.createElement(import_react_aria_components13.Text, { slot: "errorMessage", className: errorMessageStyle() }, errorMessage))));
|
|
11655
11667
|
};
|
|
@@ -11688,7 +11700,7 @@ var DateTimePickerBase = createDatePickerBase("datetime");
|
|
|
11688
11700
|
var createDatePicker = (variant) => {
|
|
11689
11701
|
const datePicker = (props) => {
|
|
11690
11702
|
const { labelProps, fieldProps } = (0, import_label2.useLabel)({ "label": props.labelText, "aria-label": props["aria-label"] });
|
|
11691
|
-
const errorMessageId = (0,
|
|
11703
|
+
const errorMessageId = (0, import_utils25.useId)();
|
|
11692
11704
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId, "errorMessage": props.helperText ?? props.error } : {};
|
|
11693
11705
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
11694
11706
|
const baseProps = (0, import_lodash_es33.omit)(props, Object.keys(labelControlProps));
|
|
@@ -11707,7 +11719,7 @@ var DateTimePicker = createDatePicker("datetime");
|
|
|
11707
11719
|
var import_react105 = __toESM(require("react"));
|
|
11708
11720
|
var import_react_aria_components15 = require("react-aria-components");
|
|
11709
11721
|
var import_label3 = require("@react-aria/label");
|
|
11710
|
-
var
|
|
11722
|
+
var import_utils27 = require("@react-aria/utils");
|
|
11711
11723
|
var import_lodash_es34 = require("lodash-es");
|
|
11712
11724
|
|
|
11713
11725
|
// src/atoms/DatePicker/RangeCalendar.tsx
|
|
@@ -11794,7 +11806,7 @@ var RangeCalendarTimeField = ({ granularity, part, ...props }) => {
|
|
|
11794
11806
|
var DateRangePickerCalendarPropsContext = import_react105.default.createContext(null);
|
|
11795
11807
|
var DateRangePickerCalendar = (props) => {
|
|
11796
11808
|
const ctx = import_react105.default.useContext(DateRangePickerCalendarPropsContext);
|
|
11797
|
-
const { variant, granularity, errorMessage, presets = [] } = (0,
|
|
11809
|
+
const { variant, granularity, errorMessage, presets = [] } = (0, import_utils27.mergeProps)(ctx, props);
|
|
11798
11810
|
const { dialog, calendar, errorMessage: errorMessageStyle } = datePickerCalendarStyles();
|
|
11799
11811
|
return /* @__PURE__ */ import_react105.default.createElement(Popover, { offset: 0 }, /* @__PURE__ */ import_react105.default.createElement(Dialog, { className: dialog() }, presets.length > 0 && /* @__PURE__ */ import_react105.default.createElement(Presets, null, presets.map((props2) => /* @__PURE__ */ import_react105.default.createElement(RangePreset, { key: `${props2.value.start.toString()}-${props2.value.end.toString()}`, ...props2 }))), /* @__PURE__ */ import_react105.default.createElement(Spacing, { gap: "3", className: "p-5" }, /* @__PURE__ */ import_react105.default.createElement(RangeCalendar, { className: calendar() }), variant === "datetime" && /* @__PURE__ */ import_react105.default.createElement(Box.Flex, { gap: "6" }, /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react105.default.createElement(RangeCalendarTimeField, { granularity, part: "start" })), /* @__PURE__ */ import_react105.default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ import_react105.default.createElement(RangeCalendarTimeField, { granularity, part: "end" }))), errorMessage && /* @__PURE__ */ import_react105.default.createElement(import_react_aria_components15.Text, { slot: "errorMessage", className: errorMessageStyle() }, errorMessage))));
|
|
11800
11812
|
};
|
|
@@ -11833,7 +11845,7 @@ var DateTimeRangePickerBase = createDateRangePickerBase("datetime");
|
|
|
11833
11845
|
var createDateRangePicker = (variant) => {
|
|
11834
11846
|
const dateRangePicker = (props) => {
|
|
11835
11847
|
const { labelProps, fieldProps } = (0, import_label3.useLabel)({ "label": props.labelText, "aria-label": props["aria-label"] });
|
|
11836
|
-
const errorMessageId = (0,
|
|
11848
|
+
const errorMessageId = (0, import_utils27.useId)();
|
|
11837
11849
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId, "errorMessage": props.helperText ?? props.error } : {};
|
|
11838
11850
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
11839
11851
|
const baseProps = (0, import_lodash_es34.omit)(props, Object.keys(labelControlProps));
|
|
@@ -11852,7 +11864,7 @@ var DateTimeRangePicker = createDateRangePicker("datetime");
|
|
|
11852
11864
|
var import_react106 = __toESM(require("react"));
|
|
11853
11865
|
var import_dialog = require("@react-aria/dialog");
|
|
11854
11866
|
var import_overlays6 = require("@react-aria/overlays");
|
|
11855
|
-
var
|
|
11867
|
+
var import_utils28 = require("@react-aria/utils");
|
|
11856
11868
|
var import_overlays7 = require("@react-stately/overlays");
|
|
11857
11869
|
var import_lodash_es35 = require("lodash-es");
|
|
11858
11870
|
var Dialog2 = (props) => {
|
|
@@ -11867,7 +11879,7 @@ var Dialog2 = (props) => {
|
|
|
11867
11879
|
if (!state.isOpen) {
|
|
11868
11880
|
return null;
|
|
11869
11881
|
}
|
|
11870
|
-
return /* @__PURE__ */ import_react106.default.createElement(import_overlays6.Overlay, null, /* @__PURE__ */ import_react106.default.createElement(Modal, { className: "Aquarium-Dialog", open: true }, /* @__PURE__ */ import_react106.default.createElement(Modal.BackDrop, { ...underlayProps }), /* @__PURE__ */ import_react106.default.createElement(Modal.Dialog, { ref, size: "sm", isResponsive: false, ...modalProps }, /* @__PURE__ */ import_react106.default.createElement(DialogWrapper, { ...props }))));
|
|
11882
|
+
return /* @__PURE__ */ import_react106.default.createElement(import_overlays6.Overlay, null, /* @__PURE__ */ import_react106.default.createElement(Modal, { className: "Aquarium-Dialog", open: true }, /* @__PURE__ */ import_react106.default.createElement(Modal.BackDrop, { ...underlayProps }), /* @__PURE__ */ import_react106.default.createElement(Modal.Dialog, { ref, size: "sm", isResponsive: false, className: "sm:max-w-[520px]", ...modalProps }, /* @__PURE__ */ import_react106.default.createElement(DialogWrapper, { ...props }))));
|
|
11871
11883
|
};
|
|
11872
11884
|
var DialogWrapper = ({
|
|
11873
11885
|
title,
|
|
@@ -11877,8 +11889,8 @@ var DialogWrapper = ({
|
|
|
11877
11889
|
secondaryAction
|
|
11878
11890
|
}) => {
|
|
11879
11891
|
const ref = import_react106.default.useRef(null);
|
|
11880
|
-
const labelledBy = (0,
|
|
11881
|
-
const describedBy = (0,
|
|
11892
|
+
const labelledBy = (0, import_utils28.useId)();
|
|
11893
|
+
const describedBy = (0, import_utils28.useId)();
|
|
11882
11894
|
const { dialogProps } = (0, import_dialog.useDialog)(
|
|
11883
11895
|
{
|
|
11884
11896
|
"role": "alertdialog",
|
|
@@ -11887,7 +11899,7 @@ var DialogWrapper = ({
|
|
|
11887
11899
|
},
|
|
11888
11900
|
ref
|
|
11889
11901
|
);
|
|
11890
|
-
return /* @__PURE__ */ import_react106.default.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ import_react106.default.createElement(Modal.Header, { className: "icon-stroke-2" }, /* @__PURE__ */ import_react106.default.createElement(Icon, { icon: DIALOG_ICONS_AND_COLORS[type].icon, color: DIALOG_ICONS_AND_COLORS[type].color, fontSize: 20 }), /* @__PURE__ */ import_react106.default.createElement(Modal.Title, { id: labelledBy, variant: "large", color:
|
|
11902
|
+
return /* @__PURE__ */ import_react106.default.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ import_react106.default.createElement(Modal.Header, { className: "icon-stroke-2 px-6 pr-6" }, /* @__PURE__ */ import_react106.default.createElement(Icon, { icon: DIALOG_ICONS_AND_COLORS[type].icon, color: DIALOG_ICONS_AND_COLORS[type].color, fontSize: 20 }), /* @__PURE__ */ import_react106.default.createElement(Modal.Title, { id: labelledBy, variant: "large", color: "default" }, title)), /* @__PURE__ */ import_react106.default.createElement(Modal.Body, { id: describedBy, contentClassName: "px-6" }, /* @__PURE__ */ import_react106.default.createElement(Typography2.Default, null, children)), /* @__PURE__ */ import_react106.default.createElement(Modal.Footer, { className: "px-6" }, /* @__PURE__ */ import_react106.default.createElement(Modal.Actions, { className: "gap-4" }, secondaryAction && /* @__PURE__ */ import_react106.default.createElement(Button2.Ghost, { key: secondaryAction.text, ...(0, import_lodash_es35.omit)(secondaryAction, "text") }, secondaryAction.text), /* @__PURE__ */ import_react106.default.createElement(Button2.Secondary, { key: primaryAction.text, ...(0, import_lodash_es35.omit)(primaryAction, "text") }, primaryAction.text))));
|
|
11891
11903
|
};
|
|
11892
11904
|
|
|
11893
11905
|
// src/molecules/Drawer/Drawer.tsx
|
|
@@ -12260,7 +12272,7 @@ var import_clsx30 = require("clsx");
|
|
|
12260
12272
|
// src/molecules/Popover/Popover.tsx
|
|
12261
12273
|
var import_react110 = __toESM(require("react"));
|
|
12262
12274
|
var import_react_aria_components18 = require("react-aria-components");
|
|
12263
|
-
var
|
|
12275
|
+
var import_utils30 = require("@react-aria/utils");
|
|
12264
12276
|
var PopoverPropsContext = (0, import_react110.createContext)({});
|
|
12265
12277
|
var Popover2 = ({ children, onOpenChange: _onOpenChange, onClose, onOpen, ...props }) => {
|
|
12266
12278
|
const onOpenChange = (isOpen) => {
|
|
@@ -12285,7 +12297,7 @@ var CloseToggle = ({ children }) => {
|
|
|
12285
12297
|
const ctx = import_react110.default.useContext(import_react_aria_components18.OverlayTriggerStateContext);
|
|
12286
12298
|
const onClick = ctx?.close;
|
|
12287
12299
|
const child = import_react110.default.Children.only(children);
|
|
12288
|
-
return import_react110.default.cloneElement(child, { ...(0,
|
|
12300
|
+
return import_react110.default.cloneElement(child, { ...(0, import_utils30.mergeProps)(child.props, { onClick }) });
|
|
12289
12301
|
};
|
|
12290
12302
|
CloseToggle.displayName = "Popover.CloseToggle";
|
|
12291
12303
|
Popover2.CloseToggle = CloseToggle;
|
|
@@ -12711,7 +12723,7 @@ var ModalTabs = createTabsComponent(
|
|
|
12711
12723
|
|
|
12712
12724
|
// src/molecules/MultiInput/MultiInput.tsx
|
|
12713
12725
|
var import_react119 = __toESM(require("react"));
|
|
12714
|
-
var
|
|
12726
|
+
var import_utils32 = require("@react-aria/utils");
|
|
12715
12727
|
var import_lodash_es39 = require("lodash-es");
|
|
12716
12728
|
|
|
12717
12729
|
// src/molecules/MultiInput/InputChip.tsx
|
|
@@ -12921,9 +12933,9 @@ var MultiInput = (props) => {
|
|
|
12921
12933
|
(0, import_react119.useEffect)(() => {
|
|
12922
12934
|
setValue(props.value ?? []);
|
|
12923
12935
|
}, [JSON.stringify(props.value)]);
|
|
12924
|
-
const defaultId = (0,
|
|
12936
|
+
const defaultId = (0, import_utils32.useId)();
|
|
12925
12937
|
const id = props.id ?? props.name ?? defaultId;
|
|
12926
|
-
const errorMessageId = (0,
|
|
12938
|
+
const errorMessageId = (0, import_utils32.useId)();
|
|
12927
12939
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
12928
12940
|
const labelControlProps = getLabelControlProps(props);
|
|
12929
12941
|
const baseProps = (0, import_lodash_es39.omit)(props, Object.keys(labelControlProps));
|
|
@@ -12962,7 +12974,7 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
|
12962
12974
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
|
12963
12975
|
var import_react120 = __toESM(require("react"));
|
|
12964
12976
|
var import_overlays8 = require("@react-aria/overlays");
|
|
12965
|
-
var
|
|
12977
|
+
var import_utils33 = require("@react-aria/utils");
|
|
12966
12978
|
var import_downshift3 = require("downshift");
|
|
12967
12979
|
var import_lodash_es40 = require("lodash-es");
|
|
12968
12980
|
var import_match_sorter3 = require("match-sorter");
|
|
@@ -13163,9 +13175,9 @@ var MultiSelect = ({
|
|
|
13163
13175
|
emptyState,
|
|
13164
13176
|
...props
|
|
13165
13177
|
}) => {
|
|
13166
|
-
const defaultId = (0,
|
|
13178
|
+
const defaultId = (0, import_utils33.useId)();
|
|
13167
13179
|
const id = props.id ?? defaultId;
|
|
13168
|
-
const errorMessageId = (0,
|
|
13180
|
+
const errorMessageId = (0, import_utils33.useId)();
|
|
13169
13181
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
13170
13182
|
const labelControlProps = getLabelControlProps(props);
|
|
13171
13183
|
const baseProps = (0, import_lodash_es40.omit)(props, Object.keys(labelControlProps));
|
|
@@ -13198,7 +13210,7 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
|
13198
13210
|
|
|
13199
13211
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
|
13200
13212
|
var import_react121 = __toESM(require("react"));
|
|
13201
|
-
var
|
|
13213
|
+
var import_utils35 = require("@react-aria/utils");
|
|
13202
13214
|
var import_clsx34 = require("clsx");
|
|
13203
13215
|
var import_lodash_es41 = require("lodash-es");
|
|
13204
13216
|
var NativeSelectBase = import_react121.default.forwardRef(
|
|
@@ -13246,9 +13258,9 @@ var NativeSelectBase = import_react121.default.forwardRef(
|
|
|
13246
13258
|
NativeSelectBase.Skeleton = () => /* @__PURE__ */ import_react121.default.createElement(Skeleton, { height: 38 });
|
|
13247
13259
|
var NativeSelect = import_react121.default.forwardRef(
|
|
13248
13260
|
({ readOnly, ...props }, ref) => {
|
|
13249
|
-
const defaultId = (0,
|
|
13261
|
+
const defaultId = (0, import_utils35.useId)();
|
|
13250
13262
|
const id = props.id ?? defaultId;
|
|
13251
|
-
const errorMessageId = (0,
|
|
13263
|
+
const errorMessageId = (0, import_utils35.useId)();
|
|
13252
13264
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
13253
13265
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
13254
13266
|
const baseProps = (0, import_lodash_es41.omit)(props, Object.keys(labelControlProps));
|
|
@@ -13648,7 +13660,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
|
13648
13660
|
|
|
13649
13661
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
|
13650
13662
|
var import_react132 = __toESM(require("react"));
|
|
13651
|
-
var
|
|
13663
|
+
var import_utils36 = require("@react-aria/utils");
|
|
13652
13664
|
var import_clsx37 = require("clsx");
|
|
13653
13665
|
var isRadioButton = (c) => {
|
|
13654
13666
|
return import_react132.default.isValidElement(c) && c.type === RadioButton2;
|
|
@@ -13664,7 +13676,7 @@ var RadioButtonGroup = ({
|
|
|
13664
13676
|
...props
|
|
13665
13677
|
}) => {
|
|
13666
13678
|
const [value, setValue] = import_react132.default.useState(_value ?? defaultValue ?? "");
|
|
13667
|
-
const errorMessageId = (0,
|
|
13679
|
+
const errorMessageId = (0, import_utils36.useId)();
|
|
13668
13680
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
13669
13681
|
const labelControlProps = getLabelControlProps(props);
|
|
13670
13682
|
if (_value !== void 0 && _value !== value) {
|
|
@@ -13710,7 +13722,7 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
|
13710
13722
|
// src/molecules/Section/Section.tsx
|
|
13711
13723
|
var import_react137 = __toESM(require("react"));
|
|
13712
13724
|
var import_button4 = require("@react-aria/button");
|
|
13713
|
-
var
|
|
13725
|
+
var import_utils37 = require("@react-aria/utils");
|
|
13714
13726
|
var import_web6 = require("@react-spring/web");
|
|
13715
13727
|
var import_clsx38 = require("clsx");
|
|
13716
13728
|
var import_lodash_es46 = require("lodash-es");
|
|
@@ -13909,9 +13921,9 @@ var Section4 = (props) => {
|
|
|
13909
13921
|
onStart: () => isMounted.current && setResting(false),
|
|
13910
13922
|
onRest: () => isMounted.current && setResting(true)
|
|
13911
13923
|
});
|
|
13912
|
-
const toggleId = (0,
|
|
13913
|
-
const regionId = (0,
|
|
13914
|
-
const titleId = (0,
|
|
13924
|
+
const toggleId = (0, import_utils37.useId)();
|
|
13925
|
+
const regionId = (0, import_utils37.useId)();
|
|
13926
|
+
const titleId = (0, import_utils37.useId)();
|
|
13915
13927
|
const hasTabs = isComponentType(children, Tabs);
|
|
13916
13928
|
const { buttonProps } = (0, import_button4.useButton)(
|
|
13917
13929
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
|
@@ -14051,30 +14063,84 @@ var import_react139 = __toESM(require("react"));
|
|
|
14051
14063
|
var import_tailwind_variants34 = require("tailwind-variants");
|
|
14052
14064
|
var connectorStyles = (0, import_tailwind_variants34.tv)({
|
|
14053
14065
|
slots: {
|
|
14054
|
-
container: "absolute
|
|
14055
|
-
connector: "
|
|
14066
|
+
container: "absolute",
|
|
14067
|
+
connector: ""
|
|
14056
14068
|
},
|
|
14057
14069
|
variants: {
|
|
14058
14070
|
completed: {
|
|
14059
14071
|
true: { connector: "bg-success-graphic" },
|
|
14060
|
-
false: { connector: "bg-
|
|
14072
|
+
false: { connector: "bg-muted" }
|
|
14061
14073
|
},
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
container: "
|
|
14065
|
-
connector: "h-[3px]"
|
|
14074
|
+
direction: {
|
|
14075
|
+
horizontal: {
|
|
14076
|
+
container: "w-full -left-1/2"
|
|
14066
14077
|
},
|
|
14067
|
-
|
|
14068
|
-
container: "
|
|
14069
|
-
connector: "h-[2px]"
|
|
14078
|
+
vertical: {
|
|
14079
|
+
container: "h-full -top-2/3"
|
|
14070
14080
|
}
|
|
14081
|
+
},
|
|
14082
|
+
dense: {
|
|
14083
|
+
true: {},
|
|
14084
|
+
false: {}
|
|
14071
14085
|
}
|
|
14072
|
-
}
|
|
14086
|
+
},
|
|
14087
|
+
compoundSlots: [
|
|
14088
|
+
// Horizontal layout - horizontal connectors between side-by-side steps
|
|
14089
|
+
{
|
|
14090
|
+
slots: ["container"],
|
|
14091
|
+
direction: "horizontal",
|
|
14092
|
+
dense: true,
|
|
14093
|
+
class: "top-[3px] px-[14px]"
|
|
14094
|
+
},
|
|
14095
|
+
{
|
|
14096
|
+
slots: ["container"],
|
|
14097
|
+
direction: "horizontal",
|
|
14098
|
+
dense: false,
|
|
14099
|
+
class: "top-[14px] px-[20px]"
|
|
14100
|
+
},
|
|
14101
|
+
{
|
|
14102
|
+
slots: ["connector"],
|
|
14103
|
+
direction: "horizontal",
|
|
14104
|
+
dense: true,
|
|
14105
|
+
class: "w-full h-[3px]"
|
|
14106
|
+
},
|
|
14107
|
+
{
|
|
14108
|
+
slots: ["connector"],
|
|
14109
|
+
direction: "horizontal",
|
|
14110
|
+
dense: false,
|
|
14111
|
+
class: "w-full h-[2px]"
|
|
14112
|
+
},
|
|
14113
|
+
// Vertical layout - vertical connectors between stacked steps
|
|
14114
|
+
{
|
|
14115
|
+
slots: ["container"],
|
|
14116
|
+
direction: "vertical",
|
|
14117
|
+
dense: true,
|
|
14118
|
+
class: "left-[3px] pt-[4px] pb-[24px]"
|
|
14119
|
+
},
|
|
14120
|
+
{
|
|
14121
|
+
slots: ["container"],
|
|
14122
|
+
direction: "vertical",
|
|
14123
|
+
dense: false,
|
|
14124
|
+
class: "left-[16px] pt-[12px] pb-[30px]"
|
|
14125
|
+
},
|
|
14126
|
+
{
|
|
14127
|
+
slots: ["connector"],
|
|
14128
|
+
direction: "vertical",
|
|
14129
|
+
dense: true,
|
|
14130
|
+
class: "h-full w-[3px]"
|
|
14131
|
+
},
|
|
14132
|
+
{
|
|
14133
|
+
slots: ["connector"],
|
|
14134
|
+
direction: "vertical",
|
|
14135
|
+
dense: false,
|
|
14136
|
+
class: "h-full w-[2px]"
|
|
14137
|
+
}
|
|
14138
|
+
]
|
|
14073
14139
|
});
|
|
14074
14140
|
var stepStyles = (0, import_tailwind_variants34.tv)({
|
|
14075
14141
|
slots: {
|
|
14076
|
-
step: "flex
|
|
14077
|
-
indicator: "Aquarium-Stepper-Indicator rounded-full flex justify-center items-center
|
|
14142
|
+
step: "flex relative text-center",
|
|
14143
|
+
indicator: "Aquarium-Stepper-Indicator rounded-full flex justify-center items-center"
|
|
14078
14144
|
},
|
|
14079
14145
|
variants: {
|
|
14080
14146
|
state: {
|
|
@@ -14082,6 +14148,16 @@ var stepStyles = (0, import_tailwind_variants34.tv)({
|
|
|
14082
14148
|
completed: { step: "text-intense" },
|
|
14083
14149
|
inactive: { step: "text-inactive" }
|
|
14084
14150
|
},
|
|
14151
|
+
direction: {
|
|
14152
|
+
vertical: {
|
|
14153
|
+
step: "flex-row items-center pb-8",
|
|
14154
|
+
indicator: "mr-l1"
|
|
14155
|
+
},
|
|
14156
|
+
horizontal: {
|
|
14157
|
+
step: "flex-col items-center",
|
|
14158
|
+
indicator: "mx-2 mb-3"
|
|
14159
|
+
}
|
|
14160
|
+
},
|
|
14085
14161
|
dense: {
|
|
14086
14162
|
true: { indicator: "h-[8px] w-[8px]" },
|
|
14087
14163
|
false: { indicator: "h-[32px] w-[32px]" }
|
|
@@ -14099,7 +14175,7 @@ var stepStyles = (0, import_tailwind_variants34.tv)({
|
|
|
14099
14175
|
slots: ["indicator"],
|
|
14100
14176
|
dense: false,
|
|
14101
14177
|
state: "inactive",
|
|
14102
|
-
class: "border-2 border-
|
|
14178
|
+
class: "border-2 border-muted"
|
|
14103
14179
|
},
|
|
14104
14180
|
{
|
|
14105
14181
|
slots: ["indicator"],
|
|
@@ -14132,22 +14208,42 @@ var Stepper = ({ className, ...rest }) => /* @__PURE__ */ import_react139.defaul
|
|
|
14132
14208
|
var ConnectorContainer = ({
|
|
14133
14209
|
className,
|
|
14134
14210
|
dense = false,
|
|
14211
|
+
direction = "horizontal",
|
|
14135
14212
|
...rest
|
|
14136
14213
|
}) => {
|
|
14137
|
-
const { container: container2 } = connectorStyles({ dense });
|
|
14214
|
+
const { container: container2 } = connectorStyles({ dense, direction });
|
|
14138
14215
|
return /* @__PURE__ */ import_react139.default.createElement("div", { ...rest, className: container2({ className }) });
|
|
14139
14216
|
};
|
|
14140
|
-
var Connector = ({
|
|
14141
|
-
|
|
14217
|
+
var Connector = ({
|
|
14218
|
+
children,
|
|
14219
|
+
className,
|
|
14220
|
+
completed = false,
|
|
14221
|
+
dense = false,
|
|
14222
|
+
direction = "horizontal",
|
|
14223
|
+
...rest
|
|
14224
|
+
}) => {
|
|
14225
|
+
const { connector } = connectorStyles({ completed, dense, direction });
|
|
14142
14226
|
return /* @__PURE__ */ import_react139.default.createElement("div", { ...rest, className: connector({ className }) });
|
|
14143
14227
|
};
|
|
14144
|
-
var Step = ({
|
|
14145
|
-
|
|
14228
|
+
var Step = ({
|
|
14229
|
+
className,
|
|
14230
|
+
state,
|
|
14231
|
+
direction = "horizontal",
|
|
14232
|
+
...rest
|
|
14233
|
+
}) => {
|
|
14234
|
+
const { step } = stepStyles({ state, direction });
|
|
14146
14235
|
return /* @__PURE__ */ import_react139.default.createElement("div", { ...rest, className: step({ className }) });
|
|
14147
14236
|
};
|
|
14148
|
-
var Indicator = ({
|
|
14149
|
-
|
|
14150
|
-
|
|
14237
|
+
var Indicator = ({
|
|
14238
|
+
children,
|
|
14239
|
+
className,
|
|
14240
|
+
state,
|
|
14241
|
+
dense = false,
|
|
14242
|
+
direction = "horizontal",
|
|
14243
|
+
...rest
|
|
14244
|
+
}) => {
|
|
14245
|
+
const { indicator } = stepStyles({ state, dense, direction });
|
|
14246
|
+
return /* @__PURE__ */ import_react139.default.createElement("div", { ...rest, className: indicator({ className }) }, state === "completed" ? /* @__PURE__ */ import_react139.default.createElement(InlineIcon, { icon: tick_default, className: dense ? "scale-125" : void 0 }) : dense ? null : children);
|
|
14151
14247
|
};
|
|
14152
14248
|
Step.Indicator = Indicator;
|
|
14153
14249
|
Stepper.Step = Step;
|
|
@@ -14155,14 +14251,37 @@ ConnectorContainer.Connector = Connector;
|
|
|
14155
14251
|
Stepper.ConnectorContainer = ConnectorContainer;
|
|
14156
14252
|
|
|
14157
14253
|
// src/molecules/Stepper/Stepper.tsx
|
|
14158
|
-
var Stepper2 = ({
|
|
14254
|
+
var Stepper2 = ({
|
|
14255
|
+
children,
|
|
14256
|
+
activeIndex,
|
|
14257
|
+
dense,
|
|
14258
|
+
direction = "horizontal"
|
|
14259
|
+
}) => {
|
|
14159
14260
|
const steps = import_react140.default.Children.count(children);
|
|
14160
|
-
return /* @__PURE__ */ import_react140.default.createElement(Stepper, { role: "list", className: "Aquarium-Stepper" }, /* @__PURE__ */ import_react140.default.createElement(Template, { columns: steps }, import_react140.default.Children.map(children, (child, index) => {
|
|
14261
|
+
return /* @__PURE__ */ import_react140.default.createElement(Stepper, { role: "list", className: "Aquarium-Stepper" }, /* @__PURE__ */ import_react140.default.createElement(Template, { columns: direction === "horizontal" ? steps : 1 }, import_react140.default.Children.map(children, (child, index) => {
|
|
14161
14262
|
if (!isComponentType(child, Step2)) {
|
|
14162
14263
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
|
14163
14264
|
} else {
|
|
14164
14265
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
|
14165
|
-
return /* @__PURE__ */ import_react140.default.createElement(
|
|
14266
|
+
return /* @__PURE__ */ import_react140.default.createElement(
|
|
14267
|
+
Stepper.Step,
|
|
14268
|
+
{
|
|
14269
|
+
state,
|
|
14270
|
+
"aria-current": state === "active" ? "step" : false,
|
|
14271
|
+
direction,
|
|
14272
|
+
role: "listitem"
|
|
14273
|
+
},
|
|
14274
|
+
index > 0 && index <= steps && /* @__PURE__ */ import_react140.default.createElement(Stepper.ConnectorContainer, { dense, direction }, /* @__PURE__ */ import_react140.default.createElement(
|
|
14275
|
+
Stepper.ConnectorContainer.Connector,
|
|
14276
|
+
{
|
|
14277
|
+
completed: state === "completed" || state === "active",
|
|
14278
|
+
dense,
|
|
14279
|
+
direction
|
|
14280
|
+
}
|
|
14281
|
+
)),
|
|
14282
|
+
/* @__PURE__ */ import_react140.default.createElement(Stepper.Step.Indicator, { state, dense, direction }, index + 1),
|
|
14283
|
+
child.props.children
|
|
14284
|
+
);
|
|
14166
14285
|
}
|
|
14167
14286
|
})));
|
|
14168
14287
|
};
|
|
@@ -14173,7 +14292,7 @@ Stepper2.Step = Step2;
|
|
|
14173
14292
|
|
|
14174
14293
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
|
14175
14294
|
var import_react141 = __toESM(require("react"));
|
|
14176
|
-
var
|
|
14295
|
+
var import_utils40 = require("@react-aria/utils");
|
|
14177
14296
|
var SwitchGroup = ({
|
|
14178
14297
|
value,
|
|
14179
14298
|
defaultValue,
|
|
@@ -14187,7 +14306,7 @@ var SwitchGroup = ({
|
|
|
14187
14306
|
if (value !== void 0 && value !== selectedItems) {
|
|
14188
14307
|
setSelectedItems(value);
|
|
14189
14308
|
}
|
|
14190
|
-
const errorMessageId = (0,
|
|
14309
|
+
const errorMessageId = (0, import_utils40.useId)();
|
|
14191
14310
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
14192
14311
|
const labelControlProps = getLabelControlProps(props);
|
|
14193
14312
|
const handleChange = (e) => {
|
|
@@ -14220,7 +14339,7 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
|
14220
14339
|
|
|
14221
14340
|
// src/molecules/Textarea/Textarea.tsx
|
|
14222
14341
|
var import_react142 = __toESM(require("react"));
|
|
14223
|
-
var
|
|
14342
|
+
var import_utils42 = require("@react-aria/utils");
|
|
14224
14343
|
var import_clsx39 = require("clsx");
|
|
14225
14344
|
var import_lodash_es47 = require("lodash-es");
|
|
14226
14345
|
var TextareaBase = import_react142.default.forwardRef(
|
|
@@ -14237,9 +14356,9 @@ var TextareaBase = import_react142.default.forwardRef(
|
|
|
14237
14356
|
TextareaBase.Skeleton = () => /* @__PURE__ */ import_react142.default.createElement(Skeleton, { height: 58 });
|
|
14238
14357
|
var Textarea = import_react142.default.forwardRef((props, ref) => {
|
|
14239
14358
|
const [value, setValue] = (0, import_react142.useState)(props.value ?? props.defaultValue ?? "");
|
|
14240
|
-
const defaultId = (0,
|
|
14359
|
+
const defaultId = (0, import_utils42.useId)();
|
|
14241
14360
|
const id = props.id ?? defaultId;
|
|
14242
|
-
const errorMessageId = (0,
|
|
14361
|
+
const errorMessageId = (0, import_utils42.useId)();
|
|
14243
14362
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
|
14244
14363
|
const { "data-testid": dataTestId, ...labelControlProps } = getLabelControlProps(props);
|
|
14245
14364
|
const baseProps = (0, import_lodash_es47.omit)(props, Object.keys(labelControlProps));
|