@aivenio/aquarium 1.62.0 → 1.63.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/src/molecules/Combobox/Combobox.d.ts +2 -1
- package/dist/src/molecules/Combobox/Combobox.js +6 -3
- package/dist/src/molecules/DataList/DataList.d.ts +13 -3
- package/dist/src/molecules/DataList/DataList.js +18 -15
- package/dist/src/molecules/DataList/DataListContext.d.ts +2 -2
- package/dist/src/molecules/DataList/DataListGroup.d.ts +7 -3
- package/dist/src/molecules/DataList/DataListGroup.js +31 -9
- package/dist/src/molecules/DataList/DataListToolbar.js +2 -4
- package/dist/src/molecules/DataList/utils.d.ts +2 -0
- package/dist/src/molecules/DataList/utils.js +3 -0
- package/dist/src/molecules/Dialog/Dialog.d.ts +4 -0
- package/dist/src/molecules/Dialog/Dialog.js +9 -4
- package/dist/system.cjs +141 -76
- package/dist/system.mjs +108 -43
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/system.cjs
CHANGED
@@ -9528,6 +9528,7 @@ var ComboboxBase = (_a) => {
|
|
9528
9528
|
createOption,
|
9529
9529
|
renderOption = (opt) => itemToString(opt),
|
9530
9530
|
isOptionDisabled = isOptionDisabledBuiltin,
|
9531
|
+
getOptionKey,
|
9531
9532
|
defaultValue,
|
9532
9533
|
value,
|
9533
9534
|
onChange,
|
@@ -9549,6 +9550,7 @@ var ComboboxBase = (_a) => {
|
|
9549
9550
|
"createOption",
|
9550
9551
|
"renderOption",
|
9551
9552
|
"isOptionDisabled",
|
9553
|
+
"getOptionKey",
|
9552
9554
|
"defaultValue",
|
9553
9555
|
"value",
|
9554
9556
|
"onChange",
|
@@ -9670,11 +9672,14 @@ var ComboboxBase = (_a) => {
|
|
9670
9672
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
9671
9673
|
}, /* @__PURE__ */ import_react56.default.createElement(Select.Menu, __spreadValues({
|
9672
9674
|
maxHeight
|
9673
|
-
}, menuProps), hasNoResults && /* @__PURE__ */ import_react56.default.createElement(Select.NoResults, null, emptyState), inputItems.map((item, index) =>
|
9674
|
-
|
9675
|
-
|
9676
|
-
|
9677
|
-
|
9675
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ import_react56.default.createElement(Select.NoResults, null, emptyState), inputItems.map((item, index) => {
|
9676
|
+
var _a3;
|
9677
|
+
return /* @__PURE__ */ import_react56.default.createElement(Select.Item, __spreadValues({
|
9678
|
+
key: (_a3 = getOptionKey == null ? void 0 : getOptionKey(item)) != null ? _a3 : itemToString(item),
|
9679
|
+
selected: item === selectedItem,
|
9680
|
+
highlighted: index === highlightedIndex || item === selectedItem
|
9681
|
+
}, getItemProps({ item, index })), renderOption(item));
|
9682
|
+
}))));
|
9678
9683
|
};
|
9679
9684
|
var ComboboxBaseSkeleton = () => /* @__PURE__ */ import_react56.default.createElement(Skeleton, {
|
9680
9685
|
height: 38
|
@@ -9733,7 +9738,8 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react
|
|
9733
9738
|
|
9734
9739
|
// src/molecules/DataList/DataList.tsx
|
9735
9740
|
var import_react79 = __toESM(require("react"));
|
9736
|
-
var
|
9741
|
+
var import_utils15 = require("@react-stately/utils");
|
9742
|
+
var import_castArray2 = __toESM(require("lodash/castArray"));
|
9737
9743
|
var import_compact = __toESM(require("lodash/compact"));
|
9738
9744
|
var import_groupBy2 = __toESM(require("lodash/groupBy"));
|
9739
9745
|
var import_isArray3 = __toESM(require("lodash/isArray"));
|
@@ -11413,9 +11419,16 @@ var useDataListContext = () => {
|
|
11413
11419
|
// src/molecules/DataList/DataListGroup.tsx
|
11414
11420
|
var import_react76 = __toESM(require("react"));
|
11415
11421
|
var import_isFunction2 = __toESM(require("lodash/isFunction"));
|
11422
|
+
|
11423
|
+
// src/molecules/DataList/utils.ts
|
11424
|
+
var flattenRows = (rows) => areRowsGrouped(rows) ? Object.values(rows).flatMap(flattenRows) : rows;
|
11425
|
+
|
11426
|
+
// src/molecules/DataList/DataListGroup.tsx
|
11416
11427
|
var GAP = 8;
|
11417
11428
|
var INDENTATION = 28;
|
11418
11429
|
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
11430
|
+
var getDefaultRowCheckboxLabel = () => "Select row";
|
11431
|
+
var getDefaultGroupCheckboxLabel = (key) => `Select ${key}`;
|
11419
11432
|
var DataListGroup = (_a) => {
|
11420
11433
|
var _b = _a, {
|
11421
11434
|
groups,
|
@@ -11434,7 +11447,12 @@ var DataListGroup = (_a) => {
|
|
11434
11447
|
onAction,
|
11435
11448
|
onGroupToggled,
|
11436
11449
|
onMenuOpenChange,
|
11437
|
-
rows
|
11450
|
+
rows,
|
11451
|
+
selectable,
|
11452
|
+
selectedRows,
|
11453
|
+
onSelectionChange,
|
11454
|
+
getRowCheckboxLabel = getDefaultRowCheckboxLabel,
|
11455
|
+
getGroupCheckboxLabel = getDefaultGroupCheckboxLabel
|
11438
11456
|
} = props;
|
11439
11457
|
const groupKeys = groups ? Object.keys(groups) : void 0;
|
11440
11458
|
const hasCustomRowForGroup = (0, import_isFunction2.default)(getGroupRow);
|
@@ -11442,12 +11460,16 @@ var DataListGroup = (_a) => {
|
|
11442
11460
|
return /* @__PURE__ */ import_react76.default.createElement(List, {
|
11443
11461
|
items: groups,
|
11444
11462
|
renderItem: (row, index) => {
|
11463
|
+
var _a2;
|
11464
|
+
const isChecked = (_a2 = selectedRows == null ? void 0 : selectedRows.includes(row.id)) != null ? _a2 : false;
|
11465
|
+
const isDisabled = disabled == null ? void 0 : disabled(row, index, rows);
|
11445
11466
|
return /* @__PURE__ */ import_react76.default.createElement(DataListRow, {
|
11446
11467
|
key: row.id,
|
11447
11468
|
columns,
|
11448
11469
|
row,
|
11449
11470
|
index,
|
11450
11471
|
rows,
|
11472
|
+
active: selectable && isChecked,
|
11451
11473
|
menu: /* @__PURE__ */ import_react76.default.createElement(DataListRowMenu, {
|
11452
11474
|
row,
|
11453
11475
|
index,
|
@@ -11457,11 +11479,22 @@ var DataListGroup = (_a) => {
|
|
11457
11479
|
menuAriaLabel
|
11458
11480
|
}),
|
11459
11481
|
disabled,
|
11482
|
+
additionalRowProps: () => selectable ? {
|
11483
|
+
"aria-selected": isChecked
|
11484
|
+
} : {},
|
11460
11485
|
additionalColumnProps: (_, columnIndex) => columnIndex === 0 ? {
|
11461
11486
|
style: {
|
11462
11487
|
paddingLeft: `${GAP + level * INDENTATION}px`
|
11463
11488
|
}
|
11464
|
-
} : {}
|
11489
|
+
} : {},
|
11490
|
+
renderFirstColumn: (row2, index2) => {
|
11491
|
+
return /* @__PURE__ */ import_react76.default.createElement(import_react76.default.Fragment, null, selectable && /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react76.default.createElement(Checkbox, {
|
11492
|
+
"aria-label": getRowCheckboxLabel(row2, index2, isChecked, rows),
|
11493
|
+
onChange: onSelectionChange(row2.id),
|
11494
|
+
checked: isChecked,
|
11495
|
+
disabled: isDisabled
|
11496
|
+
})));
|
11497
|
+
}
|
11465
11498
|
});
|
11466
11499
|
}
|
11467
11500
|
});
|
@@ -11471,8 +11504,8 @@ var DataListGroup = (_a) => {
|
|
11471
11504
|
}
|
11472
11505
|
return /* @__PURE__ */ import_react76.default.createElement(List, {
|
11473
11506
|
items: sortGroupKeys(groupKeys),
|
11474
|
-
renderItem: (key) => {
|
11475
|
-
var _a2;
|
11507
|
+
renderItem: (key, index) => {
|
11508
|
+
var _a2, _b2;
|
11476
11509
|
const group = groups[key];
|
11477
11510
|
if (key === "undefined" || key === void 0) {
|
11478
11511
|
return /* @__PURE__ */ import_react76.default.createElement(DataListGroup, __spreadProps(__spreadValues({
|
@@ -11483,12 +11516,21 @@ var DataListGroup = (_a) => {
|
|
11483
11516
|
}));
|
11484
11517
|
}
|
11485
11518
|
const openPanelId = expandedGroupIds ? (_a2 = expandedGroupIds.find((id) => id === key)) != null ? _a2 : null : void 0;
|
11519
|
+
const nestedRowIds = flattenRows(group).map((row) => row.id);
|
11520
|
+
const nestedSelectedIds = (_b2 = selectedRows == null ? void 0 : selectedRows.filter((id) => nestedRowIds.includes(id))) != null ? _b2 : [];
|
11521
|
+
const allSelected = nestedRowIds.length === nestedSelectedIds.length;
|
11522
|
+
const isChecked = nestedSelectedIds.length > 0;
|
11486
11523
|
return /* @__PURE__ */ import_react76.default.createElement(Accordion, {
|
11487
11524
|
key,
|
11488
11525
|
openPanelId
|
11489
11526
|
}, hasCustomRowForGroup && /* @__PURE__ */ import_react76.default.createElement(DataList.Row, {
|
11490
|
-
active: !!openPanelId
|
11491
|
-
}, /* @__PURE__ */ import_react76.default.createElement(
|
11527
|
+
active: !!openPanelId || selectable && isChecked
|
11528
|
+
}, selectable && /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react76.default.createElement(Checkbox, {
|
11529
|
+
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
11530
|
+
checked: isChecked,
|
11531
|
+
indeterminate: isChecked && !allSelected,
|
11532
|
+
onChange: onSelectionChange(nestedRowIds)
|
11533
|
+
})), /* @__PURE__ */ import_react76.default.createElement(List, {
|
11492
11534
|
items: columns,
|
11493
11535
|
renderItem: (column, idx) => /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
11494
11536
|
className: tw("gap-3"),
|
@@ -11510,10 +11552,15 @@ var DataListGroup = (_a) => {
|
|
11510
11552
|
onMenuOpenChange,
|
11511
11553
|
menuAriaLabel
|
11512
11554
|
})), !hasCustomRowForGroup && /* @__PURE__ */ import_react76.default.createElement(DataList.Row, {
|
11513
|
-
active: !!openPanelId
|
11514
|
-
}, /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, {
|
11555
|
+
active: !!openPanelId || selectable && isChecked
|
11556
|
+
}, selectable && /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react76.default.createElement(Checkbox, {
|
11557
|
+
"aria-label": getGroupCheckboxLabel(key, group, index, isChecked, rows),
|
11558
|
+
checked: isChecked,
|
11559
|
+
indeterminate: isChecked && !allSelected,
|
11560
|
+
onChange: onSelectionChange(nestedRowIds)
|
11561
|
+
})), /* @__PURE__ */ import_react76.default.createElement(DataList.Cell, {
|
11515
11562
|
className: tw("gap-3"),
|
11516
|
-
style: { paddingLeft: `${GAP + level * INDENTATION}px`, gridColumn:
|
11563
|
+
style: { paddingLeft: `${GAP + level * INDENTATION}px`, gridColumn: `${selectable ? 2 : 1} / -1` }
|
11517
11564
|
}, /* @__PURE__ */ import_react76.default.createElement(Accordion.Toggle, {
|
11518
11565
|
panelId: key,
|
11519
11566
|
onChange: onGroupToggled
|
@@ -11570,11 +11617,11 @@ var DataListToolbar = ({
|
|
11570
11617
|
sticky = true
|
11571
11618
|
}) => {
|
11572
11619
|
var _a;
|
11573
|
-
const { selectedRows
|
11620
|
+
const { selectedRows } = useDataListContext();
|
11574
11621
|
const actions = (0, import_castArray.default)(_actions).filter(Boolean);
|
11575
11622
|
return /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.Container, {
|
11576
11623
|
sticky
|
11577
|
-
}, /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.SelectionCount, null, (_a = selectedRows == null ? void 0 : selectedRows.length) != null ? _a : 0, "
|
11624
|
+
}, /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.SelectionCount, null, (_a = selectedRows == null ? void 0 : selectedRows.length) != null ? _a : 0, " selected")), actions.length > 0 && /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.Group, null, /* @__PURE__ */ import_react78.default.createElement(DataList.Toolbar.Actions, null, actions.map(
|
11578
11625
|
(action) => renderAction({
|
11579
11626
|
kind: "ghost",
|
11580
11627
|
dense: true,
|
@@ -11591,7 +11638,6 @@ var DataListToolbar = ({
|
|
11591
11638
|
DataListToolbar.displayName = "DataList.Toolbar";
|
11592
11639
|
|
11593
11640
|
// src/molecules/DataList/DataList.tsx
|
11594
|
-
var getDefaultCheckboxLabel = () => "Select row";
|
11595
11641
|
var DataList2 = (_a) => {
|
11596
11642
|
var _b = _a, {
|
11597
11643
|
columns,
|
@@ -11613,7 +11659,8 @@ var DataList2 = (_a) => {
|
|
11613
11659
|
defaultSort,
|
11614
11660
|
onSortChanged,
|
11615
11661
|
selectable,
|
11616
|
-
|
11662
|
+
getRowCheckboxLabel = getDefaultRowCheckboxLabel,
|
11663
|
+
getGroupCheckboxLabel = getDefaultGroupCheckboxLabel,
|
11617
11664
|
selectedRows,
|
11618
11665
|
defaultSelectedRows,
|
11619
11666
|
onSelectionChange,
|
@@ -11638,14 +11685,15 @@ var DataList2 = (_a) => {
|
|
11638
11685
|
"defaultSort",
|
11639
11686
|
"onSortChanged",
|
11640
11687
|
"selectable",
|
11641
|
-
"
|
11688
|
+
"getRowCheckboxLabel",
|
11689
|
+
"getGroupCheckboxLabel",
|
11642
11690
|
"selectedRows",
|
11643
11691
|
"defaultSelectedRows",
|
11644
11692
|
"onSelectionChange",
|
11645
11693
|
"toolbar"
|
11646
11694
|
]);
|
11647
11695
|
var _a2, _b2;
|
11648
|
-
const [selected, setSelected] = (0,
|
11696
|
+
const [selected, setSelected] = (0, import_utils15.useControlledState)(
|
11649
11697
|
selectedRows,
|
11650
11698
|
defaultSelectedRows,
|
11651
11699
|
(value) => onSelectionChange == null ? void 0 : onSelectionChange(value != null ? value : [])
|
@@ -11677,20 +11725,22 @@ var DataList2 = (_a) => {
|
|
11677
11725
|
[]
|
11678
11726
|
);
|
11679
11727
|
const handleSelectionChange = (id) => (e) => {
|
11728
|
+
const ids = (0, import_castArray2.default)(id);
|
11680
11729
|
if (e.target.checked) {
|
11681
|
-
setSelected([...selected != null ? selected : [],
|
11730
|
+
setSelected([...selected != null ? selected : [], ...ids]);
|
11682
11731
|
} else {
|
11683
|
-
setSelected(selected == null ? void 0 : selected.filter((_id) => _id
|
11732
|
+
setSelected(selected == null ? void 0 : selected.filter((_id) => !ids.includes(_id)));
|
11684
11733
|
}
|
11685
11734
|
};
|
11735
|
+
const allRows = flattenRows(rows);
|
11686
11736
|
const totalSelected = (_b2 = selected == null ? void 0 : selected.length) != null ? _b2 : 0;
|
11687
11737
|
const allEnabledRowIds = (0, import_compact.default)(
|
11688
|
-
|
11738
|
+
allRows.map((row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) ? void 0 : row.id)
|
11689
11739
|
);
|
11690
11740
|
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
11691
11741
|
return /* @__PURE__ */ import_react79.default.createElement(DataListContext.Provider, {
|
11692
11742
|
value: {
|
11693
|
-
rows: sortedRows,
|
11743
|
+
rows: (0, import_isArray3.default)(rows) ? sortedRows : rows,
|
11694
11744
|
selectedRows: selected
|
11695
11745
|
}
|
11696
11746
|
}, /* @__PURE__ */ import_react79.default.createElement(Template, {
|
@@ -11704,7 +11754,7 @@ var DataList2 = (_a) => {
|
|
11704
11754
|
sticky
|
11705
11755
|
}, /* @__PURE__ */ import_react79.default.createElement(Checkbox, {
|
11706
11756
|
"aria-label": "Select all rows",
|
11707
|
-
indeterminate: totalSelected > 0 && totalSelected <
|
11757
|
+
indeterminate: totalSelected > 0 && totalSelected < allRows.length,
|
11708
11758
|
checked: totalSelected > 0,
|
11709
11759
|
onChange: () => {
|
11710
11760
|
if (!allRowsSelected) {
|
@@ -11752,6 +11802,11 @@ var DataList2 = (_a) => {
|
|
11752
11802
|
onAction,
|
11753
11803
|
onGroupToggled,
|
11754
11804
|
onMenuOpenChange,
|
11805
|
+
selectable,
|
11806
|
+
selectedRows: selected,
|
11807
|
+
onSelectionChange: handleSelectionChange,
|
11808
|
+
getRowCheckboxLabel,
|
11809
|
+
getGroupCheckboxLabel,
|
11755
11810
|
rows,
|
11756
11811
|
groups,
|
11757
11812
|
level: 0
|
@@ -11759,13 +11814,17 @@ var DataList2 = (_a) => {
|
|
11759
11814
|
paginationContainer: PaginationFooter,
|
11760
11815
|
items: sortedRows,
|
11761
11816
|
renderItem: (row, index) => {
|
11817
|
+
var _a3;
|
11762
11818
|
const details = rowDetails == null ? void 0 : rowDetails(row, index, sortedRows);
|
11819
|
+
const isChecked = (_a3 = selected == null ? void 0 : selected.includes(row.id)) != null ? _a3 : false;
|
11820
|
+
const isDisabled = disabled == null ? void 0 : disabled(row, index, sortedRows);
|
11763
11821
|
const content = /* @__PURE__ */ import_react79.default.createElement(DataListRow, {
|
11764
11822
|
key: row.id,
|
11765
11823
|
columns,
|
11766
11824
|
row,
|
11767
11825
|
index,
|
11768
11826
|
rows: sortedRows,
|
11827
|
+
active: selectable && isChecked,
|
11769
11828
|
menu: /* @__PURE__ */ import_react79.default.createElement(DataListRowMenu, {
|
11770
11829
|
row,
|
11771
11830
|
index,
|
@@ -11776,17 +11835,14 @@ var DataList2 = (_a) => {
|
|
11776
11835
|
}),
|
11777
11836
|
disabled,
|
11778
11837
|
additionalRowProps: (row2) => {
|
11779
|
-
var
|
11838
|
+
var _a4;
|
11780
11839
|
return selectable ? {
|
11781
|
-
"aria-selected": (
|
11840
|
+
"aria-selected": (_a4 = selected == null ? void 0 : selected.includes(row2.id)) != null ? _a4 : false
|
11782
11841
|
} : {};
|
11783
11842
|
},
|
11784
11843
|
renderFirstColumn: (row2, index2) => {
|
11785
|
-
var _a3;
|
11786
|
-
const isChecked = (_a3 = selected == null ? void 0 : selected.includes(row2.id)) != null ? _a3 : false;
|
11787
|
-
const isDisabled = disabled == null ? void 0 : disabled(row2, index2, sortedRows);
|
11788
11844
|
return /* @__PURE__ */ import_react79.default.createElement(import_react79.default.Fragment, null, selectable && /* @__PURE__ */ import_react79.default.createElement(DataList.Cell, null, /* @__PURE__ */ import_react79.default.createElement(Checkbox, {
|
11789
|
-
"aria-label":
|
11845
|
+
"aria-label": getRowCheckboxLabel(row2, index2, isChecked, sortedRows),
|
11790
11846
|
onChange: handleSelectionChange(row2.id),
|
11791
11847
|
checked: isChecked,
|
11792
11848
|
disabled: isDisabled
|
@@ -12039,7 +12095,7 @@ DataTable.Skeleton = DataListSkeleton;
|
|
12039
12095
|
var import_react84 = __toESM(require("react"));
|
12040
12096
|
var import_dialog = require("@react-aria/dialog");
|
12041
12097
|
var import_overlays6 = require("@react-aria/overlays");
|
12042
|
-
var
|
12098
|
+
var import_utils19 = require("@react-aria/utils");
|
12043
12099
|
var import_overlays7 = require("@react-stately/overlays");
|
12044
12100
|
var import_omit8 = __toESM(require("lodash/omit"));
|
12045
12101
|
|
@@ -12188,8 +12244,13 @@ Modal.Actions = (_a) => {
|
|
12188
12244
|
// src/molecules/Dialog/Dialog.tsx
|
12189
12245
|
var Dialog = (props) => {
|
12190
12246
|
const ref = import_react84.default.useRef(null);
|
12191
|
-
const
|
12192
|
-
const
|
12247
|
+
const { open, onClose } = props;
|
12248
|
+
const state = (0, import_overlays7.useOverlayTriggerState)({ isOpen: open, onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()) });
|
12249
|
+
const { modalProps, underlayProps } = (0, import_overlays6.useModalOverlay)(
|
12250
|
+
{ isDismissable: false, isKeyboardDismissDisabled: false },
|
12251
|
+
state,
|
12252
|
+
ref
|
12253
|
+
);
|
12193
12254
|
if (!state.isOpen) {
|
12194
12255
|
return null;
|
12195
12256
|
}
|
@@ -12209,10 +12270,14 @@ var DialogWrapper = ({
|
|
12209
12270
|
secondaryAction
|
12210
12271
|
}) => {
|
12211
12272
|
const ref = import_react84.default.useRef(null);
|
12212
|
-
const labelledBy = (0,
|
12213
|
-
const describedBy = (0,
|
12273
|
+
const labelledBy = (0, import_utils19.useId)();
|
12274
|
+
const describedBy = (0, import_utils19.useId)();
|
12214
12275
|
const { dialogProps } = (0, import_dialog.useDialog)(
|
12215
|
-
{
|
12276
|
+
{
|
12277
|
+
"role": "alertdialog",
|
12278
|
+
"aria-labelledby": labelledBy,
|
12279
|
+
"aria-describedby": describedBy
|
12280
|
+
},
|
12216
12281
|
ref
|
12217
12282
|
);
|
12218
12283
|
return /* @__PURE__ */ import_react84.default.createElement("div", __spreadProps(__spreadValues({
|
@@ -12243,9 +12308,9 @@ var import_react86 = __toESM(require("react"));
|
|
12243
12308
|
var import_react_stately = require("react-stately");
|
12244
12309
|
var import_dialog2 = require("@react-aria/dialog");
|
12245
12310
|
var import_overlays8 = require("@react-aria/overlays");
|
12246
|
-
var
|
12311
|
+
var import_utils20 = require("@react-aria/utils");
|
12247
12312
|
var import_web4 = require("@react-spring/web");
|
12248
|
-
var
|
12313
|
+
var import_castArray3 = __toESM(require("lodash/castArray"));
|
12249
12314
|
var import_omit9 = __toESM(require("lodash/omit"));
|
12250
12315
|
|
12251
12316
|
// src/molecules/Tabs/Tabs.tsx
|
@@ -12632,8 +12697,8 @@ var DrawerWrapper = import_react86.default.forwardRef(
|
|
12632
12697
|
"menuAriaLabel"
|
12633
12698
|
]);
|
12634
12699
|
var _a2;
|
12635
|
-
const labelledBy = (0,
|
12636
|
-
const describedBy = (0,
|
12700
|
+
const labelledBy = (0, import_utils20.useId)();
|
12701
|
+
const describedBy = (0, import_utils20.useId)();
|
12637
12702
|
const { dialogProps } = (0, import_dialog2.useDialog)(
|
12638
12703
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
12639
12704
|
ref
|
@@ -12674,7 +12739,7 @@ var DrawerWrapper = import_react86.default.forwardRef(
|
|
12674
12739
|
}, /* @__PURE__ */ import_react86.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react86.default.createElement(Button.Icon, {
|
12675
12740
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
12676
12741
|
icon: import_more4.default
|
12677
|
-
})), menu)), secondaryActions && (0,
|
12742
|
+
})), menu)), secondaryActions && (0, import_castArray3.default)(secondaryActions).filter(Boolean).map((_b2) => {
|
12678
12743
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
12679
12744
|
return /* @__PURE__ */ import_react86.default.createElement(Button.Secondary, __spreadValues({
|
12680
12745
|
key: text
|
@@ -12697,7 +12762,7 @@ var import_react90 = __toESM(require("react"));
|
|
12697
12762
|
var import_react89 = __toESM(require("react"));
|
12698
12763
|
var import_interactions3 = require("@react-aria/interactions");
|
12699
12764
|
var import_overlays9 = require("@react-aria/overlays");
|
12700
|
-
var
|
12765
|
+
var import_utils22 = require("@react-aria/utils");
|
12701
12766
|
var import_overlays10 = require("@react-stately/overlays");
|
12702
12767
|
var import_classnames8 = __toESM(require("classnames"));
|
12703
12768
|
var import_omit10 = __toESM(require("lodash/omit"));
|
@@ -12804,7 +12869,7 @@ var PopoverTriggerWrapper = (_a) => {
|
|
12804
12869
|
const { pressProps } = (0, import_interactions3.usePress)(__spreadProps(__spreadValues({}, rest), { ref }));
|
12805
12870
|
return import_react89.default.cloneElement(trigger, __spreadProps(__spreadValues({
|
12806
12871
|
"ref": ref
|
12807
|
-
}, (0,
|
12872
|
+
}, (0, import_utils22.mergeProps)(pressProps, trigger.props)), {
|
12808
12873
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
12809
12874
|
}));
|
12810
12875
|
};
|
@@ -13195,9 +13260,9 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
13195
13260
|
var import_react99 = __toESM(require("react"));
|
13196
13261
|
var import_dialog4 = require("@react-aria/dialog");
|
13197
13262
|
var import_overlays11 = require("@react-aria/overlays");
|
13198
|
-
var
|
13263
|
+
var import_utils24 = require("@react-aria/utils");
|
13199
13264
|
var import_overlays12 = require("@react-stately/overlays");
|
13200
|
-
var
|
13265
|
+
var import_castArray4 = __toESM(require("lodash/castArray"));
|
13201
13266
|
var import_omit11 = __toESM(require("lodash/omit"));
|
13202
13267
|
var import_cross7 = __toESM(require_cross());
|
13203
13268
|
var Modal2 = (_a) => {
|
@@ -13226,8 +13291,8 @@ var Modal2 = (_a) => {
|
|
13226
13291
|
var ModalWrapper = import_react99.default.forwardRef(
|
13227
13292
|
(_a, ref) => {
|
13228
13293
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
13229
|
-
const labelledBy = (0,
|
13230
|
-
const describedBy = (0,
|
13294
|
+
const labelledBy = (0, import_utils24.useId)();
|
13295
|
+
const describedBy = (0, import_utils24.useId)();
|
13231
13296
|
const { dialogProps } = (0, import_dialog4.useDialog)(
|
13232
13297
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13233
13298
|
ref
|
@@ -13250,7 +13315,7 @@ var ModalWrapper = import_react99.default.forwardRef(
|
|
13250
13315
|
id: describedBy,
|
13251
13316
|
tabIndex: 0,
|
13252
13317
|
noFooter: !(secondaryActions || primaryAction)
|
13253
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ import_react99.default.createElement(Modal.Footer, null, /* @__PURE__ */ import_react99.default.createElement(Modal.Actions, null, secondaryActions && (0,
|
13318
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ import_react99.default.createElement(Modal.Footer, null, /* @__PURE__ */ import_react99.default.createElement(Modal.Actions, null, secondaryActions && (0, import_castArray4.default)(secondaryActions).filter(Boolean).map((_a2) => {
|
13254
13319
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
13255
13320
|
return /* @__PURE__ */ import_react99.default.createElement(Button.Secondary, __spreadValues({
|
13256
13321
|
key: text
|
@@ -13273,8 +13338,8 @@ var ModalTabs = createTabsComponent(
|
|
13273
13338
|
|
13274
13339
|
// src/molecules/MultiInput/MultiInput.tsx
|
13275
13340
|
var import_react101 = __toESM(require("react"));
|
13276
|
-
var
|
13277
|
-
var
|
13341
|
+
var import_utils26 = require("@react-aria/utils");
|
13342
|
+
var import_castArray5 = __toESM(require("lodash/castArray"));
|
13278
13343
|
var import_identity = __toESM(require("lodash/identity"));
|
13279
13344
|
var import_omit12 = __toESM(require("lodash/omit"));
|
13280
13345
|
|
@@ -13414,7 +13479,7 @@ var MultiInputBase = (_a) => {
|
|
13414
13479
|
inputRef.current.value = "";
|
13415
13480
|
}
|
13416
13481
|
if (value2) {
|
13417
|
-
const newItems = (0,
|
13482
|
+
const newItems = (0, import_castArray5.default)(value2).map(createItem).filter((item) => !items.includes(item));
|
13418
13483
|
if (newItems.length > 0 && items.length + newItems.length <= (maxLength != null ? maxLength : Number.MAX_SAFE_INTEGER)) {
|
13419
13484
|
const updated = (items != null ? items : []).concat(newItems);
|
13420
13485
|
setItems(updated);
|
@@ -13503,9 +13568,9 @@ var MultiInput = (props) => {
|
|
13503
13568
|
var _a2;
|
13504
13569
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
13505
13570
|
}, [JSON.stringify(props.value)]);
|
13506
|
-
const defaultId = (0,
|
13571
|
+
const defaultId = (0, import_utils26.useId)();
|
13507
13572
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
13508
|
-
const errorMessageId = (0,
|
13573
|
+
const errorMessageId = (0, import_utils26.useId)();
|
13509
13574
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13510
13575
|
const labelControlProps = getLabelControlProps(props);
|
13511
13576
|
const baseProps = (0, import_omit12.default)(props, Object.keys(labelControlProps));
|
@@ -13536,7 +13601,7 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
13536
13601
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
13537
13602
|
var import_react102 = __toESM(require("react"));
|
13538
13603
|
var import_overlays13 = require("@react-aria/overlays");
|
13539
|
-
var
|
13604
|
+
var import_utils27 = require("@react-aria/utils");
|
13540
13605
|
var import_downshift3 = require("downshift");
|
13541
13606
|
var import_isArray4 = __toESM(require("lodash/isArray"));
|
13542
13607
|
var import_isEqual = __toESM(require("lodash/isEqual"));
|
@@ -13781,9 +13846,9 @@ var MultiSelect = (_a) => {
|
|
13781
13846
|
"emptyState"
|
13782
13847
|
]);
|
13783
13848
|
var _a2;
|
13784
|
-
const defaultId = (0,
|
13849
|
+
const defaultId = (0, import_utils27.useId)();
|
13785
13850
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
13786
|
-
const errorMessageId = (0,
|
13851
|
+
const errorMessageId = (0, import_utils27.useId)();
|
13787
13852
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13788
13853
|
const labelControlProps = getLabelControlProps(props);
|
13789
13854
|
const baseProps = (0, import_omit13.default)(props, Object.keys(labelControlProps));
|
@@ -13807,7 +13872,7 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
13807
13872
|
|
13808
13873
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
13809
13874
|
var import_react103 = __toESM(require("react"));
|
13810
|
-
var
|
13875
|
+
var import_utils28 = require("@react-aria/utils");
|
13811
13876
|
var import_omit14 = __toESM(require("lodash/omit"));
|
13812
13877
|
var import_uniqueId = __toESM(require("lodash/uniqueId"));
|
13813
13878
|
var import_caretDown2 = __toESM(require_caretDown());
|
@@ -13869,9 +13934,9 @@ var NativeSelect = import_react103.default.forwardRef(
|
|
13869
13934
|
(_a, ref) => {
|
13870
13935
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
13871
13936
|
var _a2;
|
13872
|
-
const defaultId = (0,
|
13937
|
+
const defaultId = (0, import_utils28.useId)();
|
13873
13938
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
13874
|
-
const errorMessageId = (0,
|
13939
|
+
const errorMessageId = (0, import_utils28.useId)();
|
13875
13940
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13876
13941
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
13877
13942
|
const baseProps = (0, import_omit14.default)(props, Object.keys(labelControlProps));
|
@@ -14013,7 +14078,7 @@ Navigation2.Section = Navigation.Section;
|
|
14013
14078
|
|
14014
14079
|
// src/molecules/PageHeader/PageHeader.tsx
|
14015
14080
|
var import_react107 = __toESM(require("react"));
|
14016
|
-
var
|
14081
|
+
var import_castArray6 = __toESM(require("lodash/castArray"));
|
14017
14082
|
|
14018
14083
|
// src/atoms/PageHeader/PageHeader.tsx
|
14019
14084
|
var import_react106 = __toESM(require("react"));
|
@@ -14107,7 +14172,7 @@ var CommonPageHeader = ({
|
|
14107
14172
|
}, /* @__PURE__ */ import_react107.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react107.default.createElement(Button.Icon, {
|
14108
14173
|
"aria-label": menuAriaLabel,
|
14109
14174
|
icon: import_more5.default
|
14110
|
-
})), menu)), secondaryActions && (0,
|
14175
|
+
})), menu)), secondaryActions && (0, import_castArray6.default)(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
14111
14176
|
};
|
14112
14177
|
var PageHeader2 = (props) => /* @__PURE__ */ import_react107.default.createElement(CommonPageHeader, __spreadValues({}, props));
|
14113
14178
|
PageHeader2.displayName = "PageHeader";
|
@@ -14326,7 +14391,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
14326
14391
|
|
14327
14392
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
14328
14393
|
var import_react113 = __toESM(require("react"));
|
14329
|
-
var
|
14394
|
+
var import_utils30 = require("@react-aria/utils");
|
14330
14395
|
var isRadioButton = (c) => {
|
14331
14396
|
return import_react113.default.isValidElement(c) && c.type === RadioButton2;
|
14332
14397
|
};
|
@@ -14352,7 +14417,7 @@ var RadioButtonGroup = (_a) => {
|
|
14352
14417
|
]);
|
14353
14418
|
var _a2;
|
14354
14419
|
const [value, setValue] = import_react113.default.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
14355
|
-
const errorMessageId = (0,
|
14420
|
+
const errorMessageId = (0, import_utils30.useId)();
|
14356
14421
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14357
14422
|
const labelControlProps = getLabelControlProps(props);
|
14358
14423
|
if (_value !== void 0 && _value !== value) {
|
@@ -14407,9 +14472,9 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
14407
14472
|
|
14408
14473
|
// src/molecules/Section/Section.tsx
|
14409
14474
|
var import_react118 = __toESM(require("react"));
|
14410
|
-
var
|
14475
|
+
var import_utils31 = require("@react-aria/utils");
|
14411
14476
|
var import_web5 = require("@react-spring/web");
|
14412
|
-
var
|
14477
|
+
var import_castArray7 = __toESM(require("lodash/castArray"));
|
14413
14478
|
var import_isUndefined9 = __toESM(require("lodash/isUndefined"));
|
14414
14479
|
|
14415
14480
|
// src/molecules/Switch/Switch.tsx
|
@@ -14645,9 +14710,9 @@ var Section4 = (props) => {
|
|
14645
14710
|
},
|
14646
14711
|
immediate: !_collapsible
|
14647
14712
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
14648
|
-
const toggleId = (0,
|
14649
|
-
const regionId = (0,
|
14650
|
-
const titleId = (0,
|
14713
|
+
const toggleId = (0, import_utils31.useId)();
|
14714
|
+
const regionId = (0, import_utils31.useId)();
|
14715
|
+
const titleId = (0, import_utils31.useId)();
|
14651
14716
|
const hasTabs = isComponentType(children, Tabs);
|
14652
14717
|
return /* @__PURE__ */ import_react118.default.createElement(Section3, {
|
14653
14718
|
"aria-label": title,
|
@@ -14682,7 +14747,7 @@ var Section4 = (props) => {
|
|
14682
14747
|
}, /* @__PURE__ */ import_react118.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react118.default.createElement(Button.Icon, {
|
14683
14748
|
"aria-label": menuAriaLabel,
|
14684
14749
|
icon: import_more6.default
|
14685
|
-
})), menu)), props.actions && (0,
|
14750
|
+
})), menu)), props.actions && (0, import_castArray7.default)(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ import_react118.default.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ import_react118.default.createElement(SelectBase, __spreadValues({
|
14686
14751
|
"aria-labelledby": titleId
|
14687
14752
|
}, props.select)))), !hasTabs && /* @__PURE__ */ import_react118.default.createElement(import_web5.animated.div, {
|
14688
14753
|
className: tw(`h-[1px]`),
|
@@ -14915,7 +14980,7 @@ Stepper2.Step = Step2;
|
|
14915
14980
|
|
14916
14981
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
14917
14982
|
var import_react122 = __toESM(require("react"));
|
14918
|
-
var
|
14983
|
+
var import_utils34 = require("@react-aria/utils");
|
14919
14984
|
var SwitchGroup = (_a) => {
|
14920
14985
|
var _b = _a, {
|
14921
14986
|
value,
|
@@ -14937,7 +15002,7 @@ var SwitchGroup = (_a) => {
|
|
14937
15002
|
if (value !== void 0 && value !== selectedItems) {
|
14938
15003
|
setSelectedItems(value);
|
14939
15004
|
}
|
14940
|
-
const errorMessageId = (0,
|
15005
|
+
const errorMessageId = (0, import_utils34.useId)();
|
14941
15006
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14942
15007
|
const labelControlProps = getLabelControlProps(props);
|
14943
15008
|
const handleChange = (e) => {
|
@@ -14981,7 +15046,7 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
14981
15046
|
|
14982
15047
|
// src/molecules/Textarea/Textarea.tsx
|
14983
15048
|
var import_react123 = __toESM(require("react"));
|
14984
|
-
var
|
15049
|
+
var import_utils36 = require("@react-aria/utils");
|
14985
15050
|
var import_omit16 = __toESM(require("lodash/omit"));
|
14986
15051
|
var import_toString2 = __toESM(require("lodash/toString"));
|
14987
15052
|
var TextareaBase = import_react123.default.forwardRef(
|
@@ -15001,9 +15066,9 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ import_react123.default.createElem
|
|
15001
15066
|
var Textarea = import_react123.default.forwardRef((props, ref) => {
|
15002
15067
|
var _a, _b, _c;
|
15003
15068
|
const [value, setValue] = (0, import_react123.useState)((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
15004
|
-
const defaultId = (0,
|
15069
|
+
const defaultId = (0, import_utils36.useId)();
|
15005
15070
|
const id = (_c = props.id) != null ? _c : defaultId;
|
15006
|
-
const errorMessageId = (0,
|
15071
|
+
const errorMessageId = (0, import_utils36.useId)();
|
15007
15072
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15008
15073
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
15009
15074
|
const baseProps = (0, import_omit16.default)(props, Object.keys(labelControlProps));
|