@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.mjs
CHANGED
|
@@ -1813,9 +1813,9 @@ var tokens_default = {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
},
|
|
1815
1815
|
code: {
|
|
1816
|
-
background: "rgba(
|
|
1816
|
+
background: "rgba(255,255,255,1)",
|
|
1817
1817
|
text: "rgba(45,46,48,1)",
|
|
1818
|
-
variable: "rgba(
|
|
1818
|
+
variable: "rgba(91,30,103,1)",
|
|
1819
1819
|
keyword: "rgba(202, 33, 101, 1)",
|
|
1820
1820
|
string: "rgba(0, 127, 115, 1)",
|
|
1821
1821
|
function: "rgba(9, 128, 193, 1)",
|
|
@@ -2281,7 +2281,7 @@ import React6 from "react";
|
|
|
2281
2281
|
import { useFocusWithin } from "@react-aria/interactions";
|
|
2282
2282
|
import { OverlayContainer, useOverlayPosition } from "@react-aria/overlays";
|
|
2283
2283
|
import { useTooltip, useTooltipTrigger } from "@react-aria/tooltip";
|
|
2284
|
-
import { mergeProps } from "@react-aria/utils";
|
|
2284
|
+
import { isFocusable, mergeProps } from "@react-aria/utils";
|
|
2285
2285
|
|
|
2286
2286
|
// src/molecules/Tooltip/useTooltipTriggerState.ts
|
|
2287
2287
|
import { useEffect as useEffect2, useMemo, useRef } from "react";
|
|
@@ -2417,6 +2417,14 @@ var Tooltip = ({ delay = 200, ...props }) => {
|
|
|
2417
2417
|
shouldFlip,
|
|
2418
2418
|
offset: ARROW_OFFSET
|
|
2419
2419
|
});
|
|
2420
|
+
const [containsFocusable, setContainsFocusable] = React6.useState(false);
|
|
2421
|
+
React6.useLayoutEffect(() => {
|
|
2422
|
+
if (triggerRef.current) {
|
|
2423
|
+
const elements = Array.from(triggerRef.current.querySelectorAll("*"));
|
|
2424
|
+
const hasFocusable = elements.some((el) => isFocusable(el));
|
|
2425
|
+
setContainsFocusable(hasFocusable);
|
|
2426
|
+
}
|
|
2427
|
+
});
|
|
2420
2428
|
const { focusWithinProps } = useFocusWithin({
|
|
2421
2429
|
onFocusWithinChange: (isFocusWithin) => isFocusWithin ? state.open() : state.close()
|
|
2422
2430
|
});
|
|
@@ -2445,6 +2453,7 @@ var Tooltip = ({ delay = 200, ...props }) => {
|
|
|
2445
2453
|
{
|
|
2446
2454
|
className: display,
|
|
2447
2455
|
...triggerProps,
|
|
2456
|
+
tabIndex: containsFocusable ? -1 : triggerProps.tabIndex,
|
|
2448
2457
|
onFocus: (e) => {
|
|
2449
2458
|
triggerProps.onFocus?.(e);
|
|
2450
2459
|
focusWithinProps.onFocus?.(e);
|
|
@@ -6081,15 +6090,7 @@ Modal.TitleContainer = ({ children, className, ...rest }) => {
|
|
|
6081
6090
|
const { titleContainer: titleContainer2 } = modalStyles();
|
|
6082
6091
|
return /* @__PURE__ */ React59.createElement("div", { ...rest, className: titleContainer2({ className }) }, children);
|
|
6083
6092
|
};
|
|
6084
|
-
var ModalBody = ({
|
|
6085
|
-
children,
|
|
6086
|
-
className,
|
|
6087
|
-
noFooter = false,
|
|
6088
|
-
maxHeight,
|
|
6089
|
-
style,
|
|
6090
|
-
size,
|
|
6091
|
-
...rest
|
|
6092
|
-
}) => {
|
|
6093
|
+
var ModalBody = ({ children, className, contentClassName, noFooter = false, maxHeight, style, size, ...rest }) => {
|
|
6093
6094
|
const { body, bodyContent } = modalStyles({ size });
|
|
6094
6095
|
const { containerRef, topSentinelRef, bottomSentinelRef, showTopFade, showBottomFade } = useScrollFade();
|
|
6095
6096
|
return /* @__PURE__ */ React59.createElement(
|
|
@@ -6101,7 +6102,7 @@ var ModalBody = ({
|
|
|
6101
6102
|
style: { maxHeight, ...style }
|
|
6102
6103
|
},
|
|
6103
6104
|
/* @__PURE__ */ React59.createElement("div", { ref: topSentinelRef, "aria-hidden": "true", className: "h-1px" }),
|
|
6104
|
-
/* @__PURE__ */ React59.createElement("div", { className: bodyContent({ noFooter }) }, children),
|
|
6105
|
+
/* @__PURE__ */ React59.createElement("div", { className: bodyContent({ noFooter, className: contentClassName }) }, children),
|
|
6105
6106
|
/* @__PURE__ */ React59.createElement("div", { ref: bottomSentinelRef, "aria-hidden": "true", className: "h-1px -mt-1px" })
|
|
6106
6107
|
);
|
|
6107
6108
|
};
|
|
@@ -8076,11 +8077,6 @@ var useDataListContext = () => {
|
|
|
8076
8077
|
// src/molecules/DataList/DataListGroup.tsx
|
|
8077
8078
|
import React80 from "react";
|
|
8078
8079
|
import { isFunction as isFunction2, noop } from "lodash-es";
|
|
8079
|
-
|
|
8080
|
-
// src/molecules/DataList/utils.ts
|
|
8081
|
-
var flattenRows = (rows) => areRowsGrouped(rows) ? Object.values(rows).flatMap(flattenRows) : rows;
|
|
8082
|
-
|
|
8083
|
-
// src/molecules/DataList/DataListGroup.tsx
|
|
8084
8080
|
var GAP = 8;
|
|
8085
8081
|
var INDENTATION = 28;
|
|
8086
8082
|
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
|
@@ -8111,6 +8107,7 @@ var DataListGroup = ({
|
|
|
8111
8107
|
rows,
|
|
8112
8108
|
selectable,
|
|
8113
8109
|
selectedRows,
|
|
8110
|
+
statsByNode,
|
|
8114
8111
|
getOnSelectionChangeForId,
|
|
8115
8112
|
selectionDisabled = () => false,
|
|
8116
8113
|
getRowSelectionLabel = getDefaultRowSelectionLabel,
|
|
@@ -8139,8 +8136,8 @@ var DataListGroup = ({
|
|
|
8139
8136
|
items: groups,
|
|
8140
8137
|
renderItem: (row, index) => {
|
|
8141
8138
|
const isSelected = selectedRows?.includes(row.id) ?? false;
|
|
8142
|
-
const isDisabled = disabled?.(row, index,
|
|
8143
|
-
const isSelectionDisabled = selectionDisabled(row, index,
|
|
8139
|
+
const isDisabled = disabled?.(row, index, groups);
|
|
8140
|
+
const isSelectionDisabled = selectionDisabled(row, index, groups);
|
|
8144
8141
|
const isLastRow = isLastGroup && index === groups.length - 1;
|
|
8145
8142
|
return /* @__PURE__ */ React80.createElement(
|
|
8146
8143
|
DataListRow,
|
|
@@ -8150,7 +8147,7 @@ var DataListGroup = ({
|
|
|
8150
8147
|
row,
|
|
8151
8148
|
index,
|
|
8152
8149
|
isLast: isLastRow,
|
|
8153
|
-
rows,
|
|
8150
|
+
rows: groups,
|
|
8154
8151
|
active: selectable && isSelected,
|
|
8155
8152
|
menu: /* @__PURE__ */ React80.createElement(
|
|
8156
8153
|
DataListRowMenu,
|
|
@@ -8179,7 +8176,7 @@ var DataListGroup = ({
|
|
|
8179
8176
|
RadioButton,
|
|
8180
8177
|
{
|
|
8181
8178
|
value: row2.id.toString(),
|
|
8182
|
-
"aria-label": getRowSelectionLabel(row2, index2, isSelected,
|
|
8179
|
+
"aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
|
|
8183
8180
|
onChange: noop,
|
|
8184
8181
|
checked: isSelected,
|
|
8185
8182
|
disabled: isDisabled || isSelectionDisabled
|
|
@@ -8187,7 +8184,7 @@ var DataListGroup = ({
|
|
|
8187
8184
|
), isMultiSelectionMode && /* @__PURE__ */ React80.createElement(
|
|
8188
8185
|
Checkbox,
|
|
8189
8186
|
{
|
|
8190
|
-
"aria-label": getRowSelectionLabel(row2, index2, isSelected,
|
|
8187
|
+
"aria-label": getRowSelectionLabel(row2, index2, isSelected, groups),
|
|
8191
8188
|
onChange: getOnSelectionChangeForId(row2.id),
|
|
8192
8189
|
checked: isSelected,
|
|
8193
8190
|
disabled: isDisabled || isSelectionDisabled
|
|
@@ -8224,10 +8221,12 @@ var DataListGroup = ({
|
|
|
8224
8221
|
);
|
|
8225
8222
|
}
|
|
8226
8223
|
const openPanelId = expandedGroupIds ? expandedGroupIds.find((id) => id === key) ?? null : void 0;
|
|
8227
|
-
const
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8224
|
+
const { selectableIds, allSelected, isChecked, isDisabled } = statsByNode.get(group) ?? {
|
|
8225
|
+
selectableIds: [],
|
|
8226
|
+
allSelected: false,
|
|
8227
|
+
isChecked: false,
|
|
8228
|
+
isDisabled: true
|
|
8229
|
+
};
|
|
8231
8230
|
const isActiveRow = !!openPanelId || selectable && isChecked;
|
|
8232
8231
|
const isLastRow = isLastGroup && index === groupKeys.length - 1 && !openPanelId;
|
|
8233
8232
|
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(
|
|
@@ -8236,8 +8235,8 @@ var DataListGroup = ({
|
|
|
8236
8235
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
8237
8236
|
checked: isChecked,
|
|
8238
8237
|
indeterminate: isChecked && !allSelected,
|
|
8239
|
-
disabled:
|
|
8240
|
-
onChange: getOnSelectionChangeForId(
|
|
8238
|
+
disabled: isDisabled,
|
|
8239
|
+
onChange: getOnSelectionChangeForId(selectableIds)
|
|
8241
8240
|
}
|
|
8242
8241
|
)), /* @__PURE__ */ React80.createElement(
|
|
8243
8242
|
List,
|
|
@@ -8271,8 +8270,8 @@ var DataListGroup = ({
|
|
|
8271
8270
|
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
|
8272
8271
|
checked: isChecked,
|
|
8273
8272
|
indeterminate: isChecked && !allSelected,
|
|
8274
|
-
disabled:
|
|
8275
|
-
onChange: getOnSelectionChangeForId(
|
|
8273
|
+
disabled: isDisabled,
|
|
8274
|
+
onChange: getOnSelectionChangeForId(selectableIds)
|
|
8276
8275
|
}
|
|
8277
8276
|
)), /* @__PURE__ */ React80.createElement(
|
|
8278
8277
|
DataList.Cell,
|
|
@@ -8410,6 +8409,7 @@ var DataList2 = ({
|
|
|
8410
8409
|
const [sort, updateSort] = useTableSort({ ...initialSortState, onSortChanged });
|
|
8411
8410
|
const sortedRows = isArray2(rows) ? sortRowsBy(rows, sort) : [];
|
|
8412
8411
|
const groups = areRowsGrouped(rows) ? rows : group ? isFunction3(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
|
|
8412
|
+
const rootNode = groups ?? sortedRows;
|
|
8413
8413
|
const isCollapsible = isFunction3(rowDetails);
|
|
8414
8414
|
const templateColumns = compact([
|
|
8415
8415
|
selectable ? "fit-content(28px)" : void 0,
|
|
@@ -8432,26 +8432,37 @@ var DataList2 = ({
|
|
|
8432
8432
|
}
|
|
8433
8433
|
};
|
|
8434
8434
|
const isMultiSelectionMode = selectable === "multiple" || selectable === "multiple-not-all";
|
|
8435
|
-
const
|
|
8436
|
-
const
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
(row,
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8435
|
+
const selectedIds = new Set(selected);
|
|
8436
|
+
const buildSelectionStats = (root) => {
|
|
8437
|
+
const statsByNode2 = /* @__PURE__ */ new Map();
|
|
8438
|
+
const recordStats = (node) => {
|
|
8439
|
+
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);
|
|
8440
|
+
const selectedSelectableCount = selectableIds2.filter((id) => selectedIds.has(id)).length;
|
|
8441
|
+
const stats = {
|
|
8442
|
+
selectableIds: selectableIds2,
|
|
8443
|
+
selectedSelectableCount,
|
|
8444
|
+
allSelected: selectableIds2.length > 0 && selectedSelectableCount === selectableIds2.length,
|
|
8445
|
+
isChecked: selectedSelectableCount > 0,
|
|
8446
|
+
isDisabled: selectableIds2.length === 0
|
|
8447
|
+
};
|
|
8448
|
+
statsByNode2.set(node, stats);
|
|
8449
|
+
return stats;
|
|
8450
|
+
};
|
|
8451
|
+
return { statsByNode: statsByNode2, rootStats: recordStats(root) };
|
|
8452
|
+
};
|
|
8453
|
+
const { statsByNode, rootStats } = buildSelectionStats(rootNode);
|
|
8454
|
+
const { selectableIds, isChecked, allSelected, isDisabled } = rootStats;
|
|
8443
8455
|
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(
|
|
8444
8456
|
Checkbox,
|
|
8445
8457
|
{
|
|
8446
8458
|
"aria-label": "Select all rows",
|
|
8447
|
-
indeterminate:
|
|
8448
|
-
checked:
|
|
8459
|
+
indeterminate: isChecked && !allSelected,
|
|
8460
|
+
checked: isChecked,
|
|
8461
|
+
disabled: isDisabled,
|
|
8449
8462
|
onChange: () => {
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
setSelected([]);
|
|
8454
|
-
}
|
|
8463
|
+
const enabledSet = new Set(selectableIds);
|
|
8464
|
+
const keptSelection = (selected ?? []).filter((id) => !enabledSet.has(id));
|
|
8465
|
+
setSelected(allSelected ? keptSelection : [...keptSelection, ...selectableIds]);
|
|
8455
8466
|
}
|
|
8456
8467
|
}
|
|
8457
8468
|
)), isCollapsible && /* @__PURE__ */ React83.createElement(DataList.HeadCell, { align: "left", sticky }), columns.map((column) => {
|
|
@@ -8496,6 +8507,7 @@ var DataList2 = ({
|
|
|
8496
8507
|
getGroupCheckboxLabel,
|
|
8497
8508
|
rows,
|
|
8498
8509
|
groups,
|
|
8510
|
+
statsByNode,
|
|
8499
8511
|
groupKey: void 0,
|
|
8500
8512
|
level: 0,
|
|
8501
8513
|
isLastGroup: true
|
|
@@ -8510,7 +8522,7 @@ var DataList2 = ({
|
|
|
8510
8522
|
const details = rowDetails?.(row, index, sortedRows);
|
|
8511
8523
|
const isSelected = selected?.includes(row.id) ?? false;
|
|
8512
8524
|
const isSelectionDisabled = selectionDisabled(row, index, sortedRows);
|
|
8513
|
-
const
|
|
8525
|
+
const isDisabled2 = disabled?.(row, index, sortedRows);
|
|
8514
8526
|
const openPanelId = expandedGroupIds.find((id) => id === row.id.toString()) || null;
|
|
8515
8527
|
const isLastRow = index === sortedRows.length - 1;
|
|
8516
8528
|
const content = /* @__PURE__ */ React83.createElement(
|
|
@@ -8533,7 +8545,7 @@ var DataList2 = ({
|
|
|
8533
8545
|
onAction,
|
|
8534
8546
|
onMenuOpenChange,
|
|
8535
8547
|
menuAriaLabel,
|
|
8536
|
-
disabled:
|
|
8548
|
+
disabled: isDisabled2
|
|
8537
8549
|
}
|
|
8538
8550
|
),
|
|
8539
8551
|
disabled,
|
|
@@ -8550,7 +8562,7 @@ var DataList2 = ({
|
|
|
8550
8562
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
|
|
8551
8563
|
onChange: noop2,
|
|
8552
8564
|
checked: isSelected,
|
|
8553
|
-
disabled:
|
|
8565
|
+
disabled: isDisabled2 || isSelectionDisabled
|
|
8554
8566
|
}
|
|
8555
8567
|
), isMultiSelectionMode && /* @__PURE__ */ React83.createElement(
|
|
8556
8568
|
Checkbox,
|
|
@@ -8558,7 +8570,7 @@ var DataList2 = ({
|
|
|
8558
8570
|
"aria-label": getRowSelectionLabel(row2, index2, isSelected, sortedRows),
|
|
8559
8571
|
onChange: getOnSelectionChangeForId(row2.id),
|
|
8560
8572
|
checked: isSelected,
|
|
8561
|
-
disabled:
|
|
8573
|
+
disabled: isDisabled2 || isSelectionDisabled
|
|
8562
8574
|
}
|
|
8563
8575
|
)), rowDetails !== void 0 && /* @__PURE__ */ React83.createElement(DataList.Cell, null, details && /* @__PURE__ */ React83.createElement(Accordion.Toggle, { panelId: row2.id.toString(), onChange: onGroupToggled })));
|
|
8564
8576
|
},
|
|
@@ -11766,7 +11778,7 @@ var Dialog2 = (props) => {
|
|
|
11766
11778
|
if (!state.isOpen) {
|
|
11767
11779
|
return null;
|
|
11768
11780
|
}
|
|
11769
|
-
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 }))));
|
|
11781
|
+
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, className: "sm:max-w-[520px]", ...modalProps }, /* @__PURE__ */ React96.createElement(DialogWrapper, { ...props }))));
|
|
11770
11782
|
};
|
|
11771
11783
|
var DialogWrapper = ({
|
|
11772
11784
|
title,
|
|
@@ -11786,7 +11798,7 @@ var DialogWrapper = ({
|
|
|
11786
11798
|
},
|
|
11787
11799
|
ref
|
|
11788
11800
|
);
|
|
11789
|
-
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:
|
|
11801
|
+
return /* @__PURE__ */ React96.createElement("div", { ref, ...dialogProps, className: "outline-none" }, /* @__PURE__ */ React96.createElement(Modal.Header, { className: "icon-stroke-2 px-6 pr-6" }, /* @__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: "default" }, title)), /* @__PURE__ */ React96.createElement(Modal.Body, { id: describedBy, contentClassName: "px-6" }, /* @__PURE__ */ React96.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React96.createElement(Modal.Footer, { className: "px-6" }, /* @__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))));
|
|
11790
11802
|
};
|
|
11791
11803
|
|
|
11792
11804
|
// src/molecules/Drawer/Drawer.tsx
|
|
@@ -13955,30 +13967,84 @@ import React128 from "react";
|
|
|
13955
13967
|
import { tv as tv34 } from "tailwind-variants";
|
|
13956
13968
|
var connectorStyles = tv34({
|
|
13957
13969
|
slots: {
|
|
13958
|
-
container: "absolute
|
|
13959
|
-
connector: "
|
|
13970
|
+
container: "absolute",
|
|
13971
|
+
connector: ""
|
|
13960
13972
|
},
|
|
13961
13973
|
variants: {
|
|
13962
13974
|
completed: {
|
|
13963
13975
|
true: { connector: "bg-success-graphic" },
|
|
13964
|
-
false: { connector: "bg-
|
|
13976
|
+
false: { connector: "bg-muted" }
|
|
13965
13977
|
},
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
container: "
|
|
13969
|
-
connector: "h-[3px]"
|
|
13978
|
+
direction: {
|
|
13979
|
+
horizontal: {
|
|
13980
|
+
container: "w-full -left-1/2"
|
|
13970
13981
|
},
|
|
13971
|
-
|
|
13972
|
-
container: "
|
|
13973
|
-
connector: "h-[2px]"
|
|
13982
|
+
vertical: {
|
|
13983
|
+
container: "h-full -top-2/3"
|
|
13974
13984
|
}
|
|
13985
|
+
},
|
|
13986
|
+
dense: {
|
|
13987
|
+
true: {},
|
|
13988
|
+
false: {}
|
|
13975
13989
|
}
|
|
13976
|
-
}
|
|
13990
|
+
},
|
|
13991
|
+
compoundSlots: [
|
|
13992
|
+
// Horizontal layout - horizontal connectors between side-by-side steps
|
|
13993
|
+
{
|
|
13994
|
+
slots: ["container"],
|
|
13995
|
+
direction: "horizontal",
|
|
13996
|
+
dense: true,
|
|
13997
|
+
class: "top-[3px] px-[14px]"
|
|
13998
|
+
},
|
|
13999
|
+
{
|
|
14000
|
+
slots: ["container"],
|
|
14001
|
+
direction: "horizontal",
|
|
14002
|
+
dense: false,
|
|
14003
|
+
class: "top-[14px] px-[20px]"
|
|
14004
|
+
},
|
|
14005
|
+
{
|
|
14006
|
+
slots: ["connector"],
|
|
14007
|
+
direction: "horizontal",
|
|
14008
|
+
dense: true,
|
|
14009
|
+
class: "w-full h-[3px]"
|
|
14010
|
+
},
|
|
14011
|
+
{
|
|
14012
|
+
slots: ["connector"],
|
|
14013
|
+
direction: "horizontal",
|
|
14014
|
+
dense: false,
|
|
14015
|
+
class: "w-full h-[2px]"
|
|
14016
|
+
},
|
|
14017
|
+
// Vertical layout - vertical connectors between stacked steps
|
|
14018
|
+
{
|
|
14019
|
+
slots: ["container"],
|
|
14020
|
+
direction: "vertical",
|
|
14021
|
+
dense: true,
|
|
14022
|
+
class: "left-[3px] pt-[4px] pb-[24px]"
|
|
14023
|
+
},
|
|
14024
|
+
{
|
|
14025
|
+
slots: ["container"],
|
|
14026
|
+
direction: "vertical",
|
|
14027
|
+
dense: false,
|
|
14028
|
+
class: "left-[16px] pt-[12px] pb-[30px]"
|
|
14029
|
+
},
|
|
14030
|
+
{
|
|
14031
|
+
slots: ["connector"],
|
|
14032
|
+
direction: "vertical",
|
|
14033
|
+
dense: true,
|
|
14034
|
+
class: "h-full w-[3px]"
|
|
14035
|
+
},
|
|
14036
|
+
{
|
|
14037
|
+
slots: ["connector"],
|
|
14038
|
+
direction: "vertical",
|
|
14039
|
+
dense: false,
|
|
14040
|
+
class: "h-full w-[2px]"
|
|
14041
|
+
}
|
|
14042
|
+
]
|
|
13977
14043
|
});
|
|
13978
14044
|
var stepStyles = tv34({
|
|
13979
14045
|
slots: {
|
|
13980
|
-
step: "flex
|
|
13981
|
-
indicator: "Aquarium-Stepper-Indicator rounded-full flex justify-center items-center
|
|
14046
|
+
step: "flex relative text-center",
|
|
14047
|
+
indicator: "Aquarium-Stepper-Indicator rounded-full flex justify-center items-center"
|
|
13982
14048
|
},
|
|
13983
14049
|
variants: {
|
|
13984
14050
|
state: {
|
|
@@ -13986,6 +14052,16 @@ var stepStyles = tv34({
|
|
|
13986
14052
|
completed: { step: "text-intense" },
|
|
13987
14053
|
inactive: { step: "text-inactive" }
|
|
13988
14054
|
},
|
|
14055
|
+
direction: {
|
|
14056
|
+
vertical: {
|
|
14057
|
+
step: "flex-row items-center pb-8",
|
|
14058
|
+
indicator: "mr-l1"
|
|
14059
|
+
},
|
|
14060
|
+
horizontal: {
|
|
14061
|
+
step: "flex-col items-center",
|
|
14062
|
+
indicator: "mx-2 mb-3"
|
|
14063
|
+
}
|
|
14064
|
+
},
|
|
13989
14065
|
dense: {
|
|
13990
14066
|
true: { indicator: "h-[8px] w-[8px]" },
|
|
13991
14067
|
false: { indicator: "h-[32px] w-[32px]" }
|
|
@@ -14003,7 +14079,7 @@ var stepStyles = tv34({
|
|
|
14003
14079
|
slots: ["indicator"],
|
|
14004
14080
|
dense: false,
|
|
14005
14081
|
state: "inactive",
|
|
14006
|
-
class: "border-2 border-
|
|
14082
|
+
class: "border-2 border-muted"
|
|
14007
14083
|
},
|
|
14008
14084
|
{
|
|
14009
14085
|
slots: ["indicator"],
|
|
@@ -14036,22 +14112,42 @@ var Stepper = ({ className, ...rest }) => /* @__PURE__ */ React128.createElement
|
|
|
14036
14112
|
var ConnectorContainer = ({
|
|
14037
14113
|
className,
|
|
14038
14114
|
dense = false,
|
|
14115
|
+
direction = "horizontal",
|
|
14039
14116
|
...rest
|
|
14040
14117
|
}) => {
|
|
14041
|
-
const { container: container2 } = connectorStyles({ dense });
|
|
14118
|
+
const { container: container2 } = connectorStyles({ dense, direction });
|
|
14042
14119
|
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: container2({ className }) });
|
|
14043
14120
|
};
|
|
14044
|
-
var Connector = ({
|
|
14045
|
-
|
|
14121
|
+
var Connector = ({
|
|
14122
|
+
children,
|
|
14123
|
+
className,
|
|
14124
|
+
completed = false,
|
|
14125
|
+
dense = false,
|
|
14126
|
+
direction = "horizontal",
|
|
14127
|
+
...rest
|
|
14128
|
+
}) => {
|
|
14129
|
+
const { connector } = connectorStyles({ completed, dense, direction });
|
|
14046
14130
|
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: connector({ className }) });
|
|
14047
14131
|
};
|
|
14048
|
-
var Step = ({
|
|
14049
|
-
|
|
14132
|
+
var Step = ({
|
|
14133
|
+
className,
|
|
14134
|
+
state,
|
|
14135
|
+
direction = "horizontal",
|
|
14136
|
+
...rest
|
|
14137
|
+
}) => {
|
|
14138
|
+
const { step } = stepStyles({ state, direction });
|
|
14050
14139
|
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: step({ className }) });
|
|
14051
14140
|
};
|
|
14052
|
-
var Indicator = ({
|
|
14053
|
-
|
|
14054
|
-
|
|
14141
|
+
var Indicator = ({
|
|
14142
|
+
children,
|
|
14143
|
+
className,
|
|
14144
|
+
state,
|
|
14145
|
+
dense = false,
|
|
14146
|
+
direction = "horizontal",
|
|
14147
|
+
...rest
|
|
14148
|
+
}) => {
|
|
14149
|
+
const { indicator } = stepStyles({ state, dense, direction });
|
|
14150
|
+
return /* @__PURE__ */ React128.createElement("div", { ...rest, className: indicator({ className }) }, state === "completed" ? /* @__PURE__ */ React128.createElement(InlineIcon, { icon: tick_default, className: dense ? "scale-125" : void 0 }) : dense ? null : children);
|
|
14055
14151
|
};
|
|
14056
14152
|
Step.Indicator = Indicator;
|
|
14057
14153
|
Stepper.Step = Step;
|
|
@@ -14059,14 +14155,37 @@ ConnectorContainer.Connector = Connector;
|
|
|
14059
14155
|
Stepper.ConnectorContainer = ConnectorContainer;
|
|
14060
14156
|
|
|
14061
14157
|
// src/molecules/Stepper/Stepper.tsx
|
|
14062
|
-
var Stepper2 = ({
|
|
14158
|
+
var Stepper2 = ({
|
|
14159
|
+
children,
|
|
14160
|
+
activeIndex,
|
|
14161
|
+
dense,
|
|
14162
|
+
direction = "horizontal"
|
|
14163
|
+
}) => {
|
|
14063
14164
|
const steps = React129.Children.count(children);
|
|
14064
|
-
return /* @__PURE__ */ React129.createElement(Stepper, { role: "list", className: "Aquarium-Stepper" }, /* @__PURE__ */ React129.createElement(Template, { columns: steps }, React129.Children.map(children, (child, index) => {
|
|
14165
|
+
return /* @__PURE__ */ React129.createElement(Stepper, { role: "list", className: "Aquarium-Stepper" }, /* @__PURE__ */ React129.createElement(Template, { columns: direction === "horizontal" ? steps : 1 }, React129.Children.map(children, (child, index) => {
|
|
14065
14166
|
if (!isComponentType(child, Step2)) {
|
|
14066
14167
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
|
14067
14168
|
} else {
|
|
14068
14169
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
|
14069
|
-
return /* @__PURE__ */ React129.createElement(
|
|
14170
|
+
return /* @__PURE__ */ React129.createElement(
|
|
14171
|
+
Stepper.Step,
|
|
14172
|
+
{
|
|
14173
|
+
state,
|
|
14174
|
+
"aria-current": state === "active" ? "step" : false,
|
|
14175
|
+
direction,
|
|
14176
|
+
role: "listitem"
|
|
14177
|
+
},
|
|
14178
|
+
index > 0 && index <= steps && /* @__PURE__ */ React129.createElement(Stepper.ConnectorContainer, { dense, direction }, /* @__PURE__ */ React129.createElement(
|
|
14179
|
+
Stepper.ConnectorContainer.Connector,
|
|
14180
|
+
{
|
|
14181
|
+
completed: state === "completed" || state === "active",
|
|
14182
|
+
dense,
|
|
14183
|
+
direction
|
|
14184
|
+
}
|
|
14185
|
+
)),
|
|
14186
|
+
/* @__PURE__ */ React129.createElement(Stepper.Step.Indicator, { state, dense, direction }, index + 1),
|
|
14187
|
+
child.props.children
|
|
14188
|
+
);
|
|
14070
14189
|
}
|
|
14071
14190
|
})));
|
|
14072
14191
|
};
|
package/dist/tokens.json
CHANGED
|
@@ -187,9 +187,9 @@
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
"code": {
|
|
190
|
-
"background": "rgba(
|
|
190
|
+
"background": "rgba(255,255,255,1)",
|
|
191
191
|
"text": "rgba(45,46,48,1)",
|
|
192
|
-
"variable": "rgba(
|
|
192
|
+
"variable": "rgba(91,30,103,1)",
|
|
193
193
|
"keyword": "rgba(202, 33, 101, 1)",
|
|
194
194
|
"string": "rgba(0, 127, 115, 1)",
|
|
195
195
|
"function": "rgba(9, 128, 193, 1)",
|