@aivenio/aquarium 2.5.2 → 2.6.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/atoms.cjs +7 -2
- package/dist/atoms.mjs +7 -2
- package/dist/src/molecules/Combobox/Combobox.js +10 -4
- package/dist/src/molecules/EmptyState/EmptyState.d.ts +1 -1
- package/dist/src/molecules/EmptyState/EmptyState.js +5 -3
- package/dist/src/molecules/Select/Select.js +2 -14
- package/dist/src/molecules/Select/utils.d.ts +1 -0
- package/dist/src/molecules/Select/utils.js +10 -1
- package/dist/styles.css +12 -0
- package/dist/system.cjs +73 -64
- package/dist/system.mjs +37 -28
- package/dist/tailwind.config.js +11 -0
- package/dist/tailwind.theme.json +7 -2
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/system.cjs
CHANGED
@@ -5976,7 +5976,11 @@ var tailwind_theme_default = {
|
|
5976
5976
|
animationTimingFunction: "cubic-bezier(0,0,0.2,1)"
|
5977
5977
|
}
|
5978
5978
|
},
|
5979
|
-
"positioner-fade-in": { from: { opacity: "0" }, to: { opacity: "1" } }
|
5979
|
+
"positioner-fade-in": { from: { opacity: "0" }, to: { opacity: "1" } },
|
5980
|
+
draw: {
|
5981
|
+
from: { "stroke-dasharray": "1000", "stroke-dashoffset": "1000" },
|
5982
|
+
to: { "stroke-dashoffset": "0" }
|
5983
|
+
}
|
5980
5984
|
},
|
5981
5985
|
animation: {
|
5982
5986
|
none: "none",
|
@@ -5984,7 +5988,8 @@ var tailwind_theme_default = {
|
|
5984
5988
|
ping: "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",
|
5985
5989
|
pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
5986
5990
|
bounce: "bounce 1s infinite",
|
5987
|
-
"positioner-fade-in": "positioner-fade-in 300ms ease-in-out"
|
5991
|
+
"positioner-fade-in": "positioner-fade-in 300ms ease-in-out",
|
5992
|
+
draw: "draw 2s cubic-bezier(0.47, 0, 0.745, 0.715) forwards"
|
5988
5993
|
}
|
5989
5994
|
};
|
5990
5995
|
|
@@ -10419,6 +10424,15 @@ var isOptionGroup = (val) => {
|
|
10419
10424
|
var hasOptionGroups = (val) => {
|
10420
10425
|
return val.some(isOptionGroup);
|
10421
10426
|
};
|
10427
|
+
var defaultGetValue = (opt) => {
|
10428
|
+
if (typeof opt === "string") {
|
10429
|
+
return opt;
|
10430
|
+
}
|
10431
|
+
if (typeof opt.value === "string") {
|
10432
|
+
return opt.value;
|
10433
|
+
}
|
10434
|
+
return opt;
|
10435
|
+
};
|
10422
10436
|
|
10423
10437
|
// src/molecules/Combobox/Combobox.tsx
|
10424
10438
|
var import_smallCross2 = __toESM(require_smallCross());
|
@@ -10493,6 +10507,12 @@ var ComboboxBase = (_a) => {
|
|
10493
10507
|
}
|
10494
10508
|
}
|
10495
10509
|
};
|
10510
|
+
const findItemByValue = (val) => {
|
10511
|
+
if (val === null) {
|
10512
|
+
return null;
|
10513
|
+
}
|
10514
|
+
return val === void 0 ? void 0 : inputItems.find((opt) => defaultGetValue(opt) === defaultGetValue(val));
|
10515
|
+
};
|
10496
10516
|
const {
|
10497
10517
|
isOpen,
|
10498
10518
|
openMenu,
|
@@ -10508,8 +10528,8 @@ var ComboboxBase = (_a) => {
|
|
10508
10528
|
selectItem
|
10509
10529
|
} = (0, import_downshift.useCombobox)({
|
10510
10530
|
id,
|
10511
|
-
selectedItem: value,
|
10512
|
-
defaultSelectedItem: defaultValue,
|
10531
|
+
selectedItem: findItemByValue(value),
|
10532
|
+
defaultSelectedItem: findItemByValue(defaultValue),
|
10513
10533
|
isItemDisabled: (item, index) => isOptionDisabled(item, index),
|
10514
10534
|
itemToString,
|
10515
10535
|
items: inputItems,
|
@@ -10679,11 +10699,11 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ import_react
|
|
10679
10699
|
|
10680
10700
|
// src/molecules/DataList/DataList.tsx
|
10681
10701
|
var import_react80 = __toESM(require("react"));
|
10682
|
-
var
|
10702
|
+
var import_utils17 = require("@react-stately/utils");
|
10683
10703
|
var import_castArray2 = __toESM(require("lodash/castArray"));
|
10684
10704
|
var import_compact = __toESM(require("lodash/compact"));
|
10685
10705
|
var import_groupBy2 = __toESM(require("lodash/groupBy"));
|
10686
|
-
var
|
10706
|
+
var import_isArray2 = __toESM(require("lodash/isArray"));
|
10687
10707
|
var import_isFunction3 = __toESM(require("lodash/isFunction"));
|
10688
10708
|
|
10689
10709
|
// src/molecules/List/List.tsx
|
@@ -10893,16 +10913,12 @@ var import_utils11 = require("@react-aria/utils");
|
|
10893
10913
|
var import_downshift2 = require("downshift");
|
10894
10914
|
var import_lodash = require("lodash");
|
10895
10915
|
var import_defaults = __toESM(require("lodash/defaults"));
|
10896
|
-
var import_isArray = __toESM(require("lodash/isArray"));
|
10897
10916
|
var import_isNil = __toESM(require("lodash/isNil"));
|
10898
10917
|
var import_omit6 = __toESM(require("lodash/omit"));
|
10899
10918
|
var hasIconProperty = (val) => {
|
10900
10919
|
var _a;
|
10901
10920
|
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
10902
10921
|
};
|
10903
|
-
var hasOptionGroups2 = (val) => {
|
10904
|
-
return !val.some((opt) => (opt == null ? void 0 : opt.label) === void 0 || !(0, import_isArray.default)(opt == null ? void 0 : opt.options));
|
10905
|
-
};
|
10906
10922
|
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
10907
10923
|
var _a, _b;
|
10908
10924
|
return /* @__PURE__ */ import_react64.default.createElement(Select.Item, __spreadValues({
|
@@ -10912,15 +10928,6 @@ var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getVal
|
|
10912
10928
|
icon: item.icon
|
10913
10929
|
}), optionToString(item));
|
10914
10930
|
};
|
10915
|
-
var defaultGetValue = (opt) => {
|
10916
|
-
if (typeof opt === "string") {
|
10917
|
-
return opt;
|
10918
|
-
}
|
10919
|
-
if (typeof opt.value === "string") {
|
10920
|
-
return opt.value;
|
10921
|
-
}
|
10922
|
-
return "";
|
10923
|
-
};
|
10924
10931
|
var _SelectBase = (props) => {
|
10925
10932
|
var _b;
|
10926
10933
|
const withDefaults = (0, import_defaults.default)({}, props, {
|
@@ -10980,7 +10987,7 @@ var _SelectBase = (props) => {
|
|
10980
10987
|
const [hasFocus, setFocus] = (0, import_react64.useState)(false);
|
10981
10988
|
const targetRef = (0, import_react64.useRef)(null);
|
10982
10989
|
const menuRef = (0, import_react64.useRef)(null);
|
10983
|
-
const items =
|
10990
|
+
const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
|
10984
10991
|
const findItemByValue = (val) => {
|
10985
10992
|
if (val === null) {
|
10986
10993
|
return null;
|
@@ -11061,7 +11068,7 @@ var _SelectBase = (props) => {
|
|
11061
11068
|
style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
|
11062
11069
|
}, /* @__PURE__ */ import_react64.default.createElement(Select.Menu, __spreadValues({
|
11063
11070
|
maxHeight
|
11064
|
-
}, menuProps), options.length === 0 && /* @__PURE__ */ import_react64.default.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !
|
11071
|
+
}, menuProps), options.length === 0 && /* @__PURE__ */ import_react64.default.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !hasOptionGroups(options) && options.map(renderItem), options.length > 0 && hasOptionGroups(options) && options.map(renderGroup), actions.length > 0 && /* @__PURE__ */ import_react64.default.createElement(import_react64.default.Fragment, null, /* @__PURE__ */ import_react64.default.createElement(Select.Divider, {
|
11065
11072
|
onMouseOver: () => setHighlightedIndex(-1)
|
11066
11073
|
}), actions.map((act, index) => /* @__PURE__ */ import_react64.default.createElement(Select.ActionItem, __spreadProps(__spreadValues({
|
11067
11074
|
key: `${index}`
|
@@ -11787,9 +11794,9 @@ function useScrollStyles({
|
|
11787
11794
|
}
|
11788
11795
|
|
11789
11796
|
// src/utils/table/types.ts
|
11790
|
-
var
|
11797
|
+
var import_isArray = __toESM(require("lodash/isArray"));
|
11791
11798
|
var areRowsGrouped = (rows) => {
|
11792
|
-
return !(0,
|
11799
|
+
return !(0, import_isArray.default)(rows);
|
11793
11800
|
};
|
11794
11801
|
var toSortDirection = (direction) => direction === "ascending" ? "asc" : direction === "descending" ? "desc" : false;
|
11795
11802
|
var cellProps = (column) => {
|
@@ -11876,7 +11883,7 @@ var import_i18n2 = require("@react-aria/i18n");
|
|
11876
11883
|
var import_interactions2 = require("@react-aria/interactions");
|
11877
11884
|
var import_menu2 = require("@react-aria/menu");
|
11878
11885
|
var import_separator = require("@react-aria/separator");
|
11879
|
-
var
|
11886
|
+
var import_utils13 = require("@react-aria/utils");
|
11880
11887
|
var import_collections = require("@react-stately/collections");
|
11881
11888
|
var import_menu3 = require("@react-stately/menu");
|
11882
11889
|
var import_tree = require("@react-stately/tree");
|
@@ -12075,7 +12082,7 @@ var TriggerWrapper = (_a) => {
|
|
12075
12082
|
if (!trigger || !import_react74.default.isValidElement(trigger)) {
|
12076
12083
|
throw new Error("<DropdownMenu.Trigger> must have valid child");
|
12077
12084
|
}
|
12078
|
-
return import_react74.default.cloneElement(trigger, __spreadValues({ ref }, (0,
|
12085
|
+
return import_react74.default.cloneElement(trigger, __spreadValues({ ref }, (0, import_utils13.mergeProps)(pressProps, props)));
|
12079
12086
|
};
|
12080
12087
|
var isSectionNode = (item) => item.type === "section";
|
12081
12088
|
var isItemNode = (item) => item.type === "item";
|
@@ -12765,12 +12772,12 @@ var DataList2 = (_a) => {
|
|
12765
12772
|
const containerRef = (0, import_react80.useRef)(null);
|
12766
12773
|
const hasStickyColumns = columns.some((column) => column.sticky);
|
12767
12774
|
const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
|
12768
|
-
const [selected, setSelected] = (0,
|
12775
|
+
const [selected, setSelected] = (0, import_utils17.useControlledState)(
|
12769
12776
|
selectedRows,
|
12770
12777
|
defaultSelectedRows,
|
12771
12778
|
(value) => onSelectionChange == null ? void 0 : onSelectionChange(value != null ? value : [])
|
12772
12779
|
);
|
12773
|
-
const [expandedGroupIds, setExpandedGroupIds] = (0,
|
12780
|
+
const [expandedGroupIds, setExpandedGroupIds] = (0, import_utils17.useControlledState)(_expandedGroupIds, []);
|
12774
12781
|
const onGroupToggled = (id, open) => {
|
12775
12782
|
if (!open) {
|
12776
12783
|
setExpandedGroupIds([...expandedGroupIds, id]);
|
@@ -12782,7 +12789,7 @@ var DataList2 = (_a) => {
|
|
12782
12789
|
const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
|
12783
12790
|
const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a2 = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a2 : "ascending" } : {};
|
12784
12791
|
const [sort, updateSort] = useTableSort(__spreadProps(__spreadValues({}, initialSortState), { onSortChanged }));
|
12785
|
-
const sortedRows = (0,
|
12792
|
+
const sortedRows = (0, import_isArray2.default)(rows) ? sortRowsBy(rows, sort) : [];
|
12786
12793
|
const groups = areRowsGrouped(rows) ? rows : group ? (0, import_isFunction3.default)(group) ? group(sortedRows) : (0, import_groupBy2.default)(sortedRows, group) : void 0;
|
12787
12794
|
const isCollapsible = (0, import_isFunction3.default)(rowDetails);
|
12788
12795
|
const templateColumns = (0, import_compact.default)([
|
@@ -12979,7 +12986,7 @@ var DataList2 = (_a) => {
|
|
12979
12986
|
}, componentContent) : componentContent;
|
12980
12987
|
return /* @__PURE__ */ import_react80.default.createElement(DataListContext.Provider, {
|
12981
12988
|
value: {
|
12982
|
-
rows: (0,
|
12989
|
+
rows: (0, import_isArray2.default)(rows) ? sortedRows : rows,
|
12983
12990
|
selectedRows: selected
|
12984
12991
|
}
|
12985
12992
|
}, wrappedContent);
|
@@ -13231,7 +13238,7 @@ DataTable.Skeleton = DataListSkeleton;
|
|
13231
13238
|
var import_react91 = __toESM(require("react"));
|
13232
13239
|
var import_react_aria_components8 = require("react-aria-components");
|
13233
13240
|
var import_label2 = require("@react-aria/label");
|
13234
|
-
var
|
13241
|
+
var import_utils26 = require("@react-aria/utils");
|
13235
13242
|
var import_omit9 = __toESM(require("lodash/omit"));
|
13236
13243
|
|
13237
13244
|
// src/molecules/DateField/DateInput.tsx
|
@@ -13309,7 +13316,7 @@ var FieldGroup = (props) => {
|
|
13309
13316
|
var import_react86 = __toESM(require("react"));
|
13310
13317
|
var import_react_aria_components3 = require("react-aria-components");
|
13311
13318
|
var import_label = require("@react-aria/label");
|
13312
|
-
var
|
13319
|
+
var import_utils23 = require("@react-aria/utils");
|
13313
13320
|
var import_omit8 = __toESM(require("lodash/omit"));
|
13314
13321
|
function TimeFieldBase(_a) {
|
13315
13322
|
var _b = _a, { disabled, valid } = _b, props = __objRest(_b, ["disabled", "valid"]);
|
@@ -13320,7 +13327,7 @@ function TimeFieldBase(_a) {
|
|
13320
13327
|
}
|
13321
13328
|
function TimeField(props) {
|
13322
13329
|
const { labelProps, fieldProps } = (0, import_label.useLabel)({ label: props.labelText });
|
13323
|
-
const errorMessageId = (0,
|
13330
|
+
const errorMessageId = (0, import_utils23.useId)();
|
13324
13331
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13325
13332
|
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
13326
13333
|
const baseProps = (0, import_omit8.default)(props, Object.keys(labelControlProps));
|
@@ -13495,7 +13502,7 @@ var PickerTimeField = ({ granularity }) => {
|
|
13495
13502
|
var createDatePicker = (variant) => (props) => {
|
13496
13503
|
var _a;
|
13497
13504
|
const { labelProps, fieldProps } = (0, import_label2.useLabel)({ label: props.labelText });
|
13498
|
-
const errorMessageId = (0,
|
13505
|
+
const errorMessageId = (0, import_utils26.useId)();
|
13499
13506
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId, "errorMessage": (_a = props.helperText) != null ? _a : props.error } : {};
|
13500
13507
|
const _b = getLabelControlProps(props), { "data-testid": dataTestId } = _b, labelControlProps = __objRest(_b, ["data-testid"]);
|
13501
13508
|
const baseProps = (0, import_omit9.default)(props, Object.keys(labelControlProps));
|
@@ -13512,7 +13519,7 @@ var DateTimePicker = createDatePicker("datetime");
|
|
13512
13519
|
var import_react93 = __toESM(require("react"));
|
13513
13520
|
var import_react_aria_components10 = require("react-aria-components");
|
13514
13521
|
var import_label3 = require("@react-aria/label");
|
13515
|
-
var
|
13522
|
+
var import_utils28 = require("@react-aria/utils");
|
13516
13523
|
var import_omit10 = __toESM(require("lodash/omit"));
|
13517
13524
|
var import_calendar3 = __toESM(require_calendar());
|
13518
13525
|
|
@@ -13634,7 +13641,7 @@ var DateTimeRangePickerBase = createDateRangePickerBase("datetime");
|
|
13634
13641
|
var createDateRangePicker = (variant) => (props) => {
|
13635
13642
|
var _a;
|
13636
13643
|
const { labelProps, fieldProps } = (0, import_label3.useLabel)({ label: props.labelText });
|
13637
|
-
const errorMessageId = (0,
|
13644
|
+
const errorMessageId = (0, import_utils28.useId)();
|
13638
13645
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId, "errorMessage": (_a = props.helperText) != null ? _a : props.error } : {};
|
13639
13646
|
const _b = getLabelControlProps(props), { "data-testid": dataTestId } = _b, labelControlProps = __objRest(_b, ["data-testid"]);
|
13640
13647
|
const baseProps = (0, import_omit10.default)(props, Object.keys(labelControlProps));
|
@@ -13651,7 +13658,7 @@ var DateTimeRangePicker = createDateRangePicker("datetime");
|
|
13651
13658
|
var import_react95 = __toESM(require("react"));
|
13652
13659
|
var import_dialog = require("@react-aria/dialog");
|
13653
13660
|
var import_overlays6 = require("@react-aria/overlays");
|
13654
|
-
var
|
13661
|
+
var import_utils29 = require("@react-aria/utils");
|
13655
13662
|
var import_overlays7 = require("@react-stately/overlays");
|
13656
13663
|
var import_omit11 = __toESM(require("lodash/omit"));
|
13657
13664
|
|
@@ -13910,8 +13917,8 @@ var DialogWrapper = ({
|
|
13910
13917
|
secondaryAction
|
13911
13918
|
}) => {
|
13912
13919
|
const ref = import_react95.default.useRef(null);
|
13913
|
-
const labelledBy = (0,
|
13914
|
-
const describedBy = (0,
|
13920
|
+
const labelledBy = (0, import_utils29.useId)();
|
13921
|
+
const describedBy = (0, import_utils29.useId)();
|
13915
13922
|
const { dialogProps } = (0, import_dialog.useDialog)(
|
13916
13923
|
{
|
13917
13924
|
"role": "alertdialog",
|
@@ -14371,7 +14378,7 @@ var import_react102 = __toESM(require("react"));
|
|
14371
14378
|
var import_react101 = __toESM(require("react"));
|
14372
14379
|
var import_interactions3 = require("@react-aria/interactions");
|
14373
14380
|
var import_overlays8 = require("@react-aria/overlays");
|
14374
|
-
var
|
14381
|
+
var import_utils31 = require("@react-aria/utils");
|
14375
14382
|
var import_overlays9 = require("@react-stately/overlays");
|
14376
14383
|
var import_classnames10 = __toESM(require("classnames"));
|
14377
14384
|
var import_omit13 = __toESM(require("lodash/omit"));
|
@@ -14484,7 +14491,7 @@ var PopoverTriggerWrapper = (_a) => {
|
|
14484
14491
|
const { pressProps } = (0, import_interactions3.usePress)(__spreadProps(__spreadValues({}, rest), { ref }));
|
14485
14492
|
return import_react101.default.cloneElement(trigger, __spreadProps(__spreadValues({
|
14486
14493
|
"ref": ref
|
14487
|
-
}, (0,
|
14494
|
+
}, (0, import_utils31.mergeProps)(pressProps, trigger.props)), {
|
14488
14495
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
14489
14496
|
}));
|
14490
14497
|
};
|
@@ -14653,7 +14660,7 @@ var layoutStyle = (layout) => {
|
|
14653
14660
|
var isVerticalLayout = (layout) => layout === "vertical" /* Vertical */ || layout === "center-vertical" /* CenterVertical */;
|
14654
14661
|
var EmptyState = ({
|
14655
14662
|
title,
|
14656
|
-
image,
|
14663
|
+
image: Image2,
|
14657
14664
|
imageAlt = "",
|
14658
14665
|
imageWidth,
|
14659
14666
|
description,
|
@@ -14685,11 +14692,13 @@ var EmptyState = ({
|
|
14685
14692
|
justifyContent: template.justifyContent,
|
14686
14693
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
14687
14694
|
height: fullHeight ? "full" : void 0
|
14688
|
-
},
|
14689
|
-
src:
|
14695
|
+
}, Image2 && (typeof Image2 === "string" ? /* @__PURE__ */ import_react103.default.createElement("img", {
|
14696
|
+
src: Image2,
|
14690
14697
|
alt: imageAlt,
|
14691
14698
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
14692
|
-
})
|
14699
|
+
}) : /* @__PURE__ */ import_react103.default.createElement("div", {
|
14700
|
+
className: tw("animate-draw")
|
14701
|
+
}, /* @__PURE__ */ import_react103.default.createElement(Image2, null))), /* @__PURE__ */ import_react103.default.createElement(Box.Flex, {
|
14693
14702
|
flexDirection: "column",
|
14694
14703
|
justifyContent: template.justifyContent,
|
14695
14704
|
alignItems: template.alignItems
|
@@ -14946,7 +14955,7 @@ var ModalTabs = createTabsComponent(
|
|
14946
14955
|
|
14947
14956
|
// src/molecules/MultiInput/MultiInput.tsx
|
14948
14957
|
var import_react113 = __toESM(require("react"));
|
14949
|
-
var
|
14958
|
+
var import_utils34 = require("@react-aria/utils");
|
14950
14959
|
var import_castArray5 = __toESM(require("lodash/castArray"));
|
14951
14960
|
var import_identity = __toESM(require("lodash/identity"));
|
14952
14961
|
var import_omit15 = __toESM(require("lodash/omit"));
|
@@ -15177,9 +15186,9 @@ var MultiInput = (props) => {
|
|
15177
15186
|
var _a2;
|
15178
15187
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
15179
15188
|
}, [JSON.stringify(props.value)]);
|
15180
|
-
const defaultId = (0,
|
15189
|
+
const defaultId = (0, import_utils34.useId)();
|
15181
15190
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
15182
|
-
const errorMessageId = (0,
|
15191
|
+
const errorMessageId = (0, import_utils34.useId)();
|
15183
15192
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15184
15193
|
const labelControlProps = getLabelControlProps(props);
|
15185
15194
|
const baseProps = (0, import_omit15.default)(props, Object.keys(labelControlProps));
|
@@ -15210,7 +15219,7 @@ MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
15210
15219
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
15211
15220
|
var import_react114 = __toESM(require("react"));
|
15212
15221
|
var import_overlays10 = require("@react-aria/overlays");
|
15213
|
-
var
|
15222
|
+
var import_utils35 = require("@react-aria/utils");
|
15214
15223
|
var import_downshift3 = require("downshift");
|
15215
15224
|
var import_isEqual = __toESM(require("lodash/isEqual"));
|
15216
15225
|
var import_isNil2 = __toESM(require("lodash/isNil"));
|
@@ -15448,9 +15457,9 @@ var MultiSelect = (_a) => {
|
|
15448
15457
|
"emptyState"
|
15449
15458
|
]);
|
15450
15459
|
var _a2;
|
15451
|
-
const defaultId = (0,
|
15460
|
+
const defaultId = (0, import_utils35.useId)();
|
15452
15461
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
15453
|
-
const errorMessageId = (0,
|
15462
|
+
const errorMessageId = (0, import_utils35.useId)();
|
15454
15463
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15455
15464
|
const labelControlProps = getLabelControlProps(props);
|
15456
15465
|
const baseProps = (0, import_omit16.default)(props, Object.keys(labelControlProps));
|
@@ -15474,7 +15483,7 @@ MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
|
15474
15483
|
|
15475
15484
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
15476
15485
|
var import_react115 = __toESM(require("react"));
|
15477
|
-
var
|
15486
|
+
var import_utils37 = require("@react-aria/utils");
|
15478
15487
|
var import_omit17 = __toESM(require("lodash/omit"));
|
15479
15488
|
var import_uniqueId = __toESM(require("lodash/uniqueId"));
|
15480
15489
|
var import_caretDown2 = __toESM(require_caretDown());
|
@@ -15536,9 +15545,9 @@ var NativeSelect = import_react115.default.forwardRef(
|
|
15536
15545
|
(_a, ref) => {
|
15537
15546
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
15538
15547
|
var _a2;
|
15539
|
-
const defaultId = (0,
|
15548
|
+
const defaultId = (0, import_utils37.useId)();
|
15540
15549
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
15541
|
-
const errorMessageId = (0,
|
15550
|
+
const errorMessageId = (0, import_utils37.useId)();
|
15542
15551
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15543
15552
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
15544
15553
|
const baseProps = (0, import_omit17.default)(props, Object.keys(labelControlProps));
|
@@ -15997,7 +16006,7 @@ RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
|
15997
16006
|
|
15998
16007
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
15999
16008
|
var import_react125 = __toESM(require("react"));
|
16000
|
-
var
|
16009
|
+
var import_utils39 = require("@react-aria/utils");
|
16001
16010
|
var isRadioButton = (c) => {
|
16002
16011
|
return import_react125.default.isValidElement(c) && c.type === RadioButton2;
|
16003
16012
|
};
|
@@ -16023,7 +16032,7 @@ var RadioButtonGroup = (_a) => {
|
|
16023
16032
|
]);
|
16024
16033
|
var _a2;
|
16025
16034
|
const [value, setValue] = import_react125.default.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
16026
|
-
const errorMessageId = (0,
|
16035
|
+
const errorMessageId = (0, import_utils39.useId)();
|
16027
16036
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
16028
16037
|
const labelControlProps = getLabelControlProps(props);
|
16029
16038
|
if (_value !== void 0 && _value !== value) {
|
@@ -16079,7 +16088,7 @@ RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
16079
16088
|
// src/molecules/Section/Section.tsx
|
16080
16089
|
var import_react130 = __toESM(require("react"));
|
16081
16090
|
var import_button4 = require("@react-aria/button");
|
16082
|
-
var
|
16091
|
+
var import_utils40 = require("@react-aria/utils");
|
16083
16092
|
var import_web6 = require("@react-spring/web");
|
16084
16093
|
var import_castArray7 = __toESM(require("lodash/castArray"));
|
16085
16094
|
var import_isUndefined9 = __toESM(require("lodash/isUndefined"));
|
@@ -16343,9 +16352,9 @@ var Section4 = (props) => {
|
|
16343
16352
|
onStart: () => isMounted.current && setResting(false),
|
16344
16353
|
onRest: () => isMounted.current && setResting(true)
|
16345
16354
|
}), { transform } = _f, spring = __objRest(_f, ["transform"]);
|
16346
|
-
const toggleId = (0,
|
16347
|
-
const regionId = (0,
|
16348
|
-
const titleId = (0,
|
16355
|
+
const toggleId = (0, import_utils40.useId)();
|
16356
|
+
const regionId = (0, import_utils40.useId)();
|
16357
|
+
const titleId = (0, import_utils40.useId)();
|
16349
16358
|
const hasTabs = isComponentType(children, Tabs);
|
16350
16359
|
const { buttonProps } = (0, import_button4.useButton)(
|
16351
16360
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
@@ -16594,7 +16603,7 @@ Stepper2.Step = Step2;
|
|
16594
16603
|
|
16595
16604
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
16596
16605
|
var import_react134 = __toESM(require("react"));
|
16597
|
-
var
|
16606
|
+
var import_utils43 = require("@react-aria/utils");
|
16598
16607
|
var SwitchGroup = (_a) => {
|
16599
16608
|
var _b = _a, {
|
16600
16609
|
value,
|
@@ -16616,7 +16625,7 @@ var SwitchGroup = (_a) => {
|
|
16616
16625
|
if (value !== void 0 && value !== selectedItems) {
|
16617
16626
|
setSelectedItems(value);
|
16618
16627
|
}
|
16619
|
-
const errorMessageId = (0,
|
16628
|
+
const errorMessageId = (0, import_utils43.useId)();
|
16620
16629
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
16621
16630
|
const labelControlProps = getLabelControlProps(props);
|
16622
16631
|
const handleChange = (e) => {
|
@@ -16660,7 +16669,7 @@ SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
|
16660
16669
|
|
16661
16670
|
// src/molecules/Textarea/Textarea.tsx
|
16662
16671
|
var import_react135 = __toESM(require("react"));
|
16663
|
-
var
|
16672
|
+
var import_utils45 = require("@react-aria/utils");
|
16664
16673
|
var import_omit19 = __toESM(require("lodash/omit"));
|
16665
16674
|
var import_toString2 = __toESM(require("lodash/toString"));
|
16666
16675
|
var TextareaBase = import_react135.default.forwardRef(
|
@@ -16680,9 +16689,9 @@ TextareaBase.Skeleton = () => /* @__PURE__ */ import_react135.default.createElem
|
|
16680
16689
|
var Textarea = import_react135.default.forwardRef((props, ref) => {
|
16681
16690
|
var _a, _b, _c;
|
16682
16691
|
const [value, setValue] = (0, import_react135.useState)((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
16683
|
-
const defaultId = (0,
|
16692
|
+
const defaultId = (0, import_utils45.useId)();
|
16684
16693
|
const id = (_c = props.id) != null ? _c : defaultId;
|
16685
|
-
const errorMessageId = (0,
|
16694
|
+
const errorMessageId = (0, import_utils45.useId)();
|
16686
16695
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
16687
16696
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
16688
16697
|
const baseProps = (0, import_omit19.default)(props, Object.keys(labelControlProps));
|
package/dist/system.mjs
CHANGED
@@ -5813,7 +5813,11 @@ var tailwind_theme_default = {
|
|
5813
5813
|
animationTimingFunction: "cubic-bezier(0,0,0.2,1)"
|
5814
5814
|
}
|
5815
5815
|
},
|
5816
|
-
"positioner-fade-in": { from: { opacity: "0" }, to: { opacity: "1" } }
|
5816
|
+
"positioner-fade-in": { from: { opacity: "0" }, to: { opacity: "1" } },
|
5817
|
+
draw: {
|
5818
|
+
from: { "stroke-dasharray": "1000", "stroke-dashoffset": "1000" },
|
5819
|
+
to: { "stroke-dashoffset": "0" }
|
5820
|
+
}
|
5817
5821
|
},
|
5818
5822
|
animation: {
|
5819
5823
|
none: "none",
|
@@ -5821,7 +5825,8 @@ var tailwind_theme_default = {
|
|
5821
5825
|
ping: "ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",
|
5822
5826
|
pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
5823
5827
|
bounce: "bounce 1s infinite",
|
5824
|
-
"positioner-fade-in": "positioner-fade-in 300ms ease-in-out"
|
5828
|
+
"positioner-fade-in": "positioner-fade-in 300ms ease-in-out",
|
5829
|
+
draw: "draw 2s cubic-bezier(0.47, 0, 0.745, 0.715) forwards"
|
5825
5830
|
}
|
5826
5831
|
};
|
5827
5832
|
|
@@ -10256,6 +10261,15 @@ var isOptionGroup = (val) => {
|
|
10256
10261
|
var hasOptionGroups = (val) => {
|
10257
10262
|
return val.some(isOptionGroup);
|
10258
10263
|
};
|
10264
|
+
var defaultGetValue = (opt) => {
|
10265
|
+
if (typeof opt === "string") {
|
10266
|
+
return opt;
|
10267
|
+
}
|
10268
|
+
if (typeof opt.value === "string") {
|
10269
|
+
return opt.value;
|
10270
|
+
}
|
10271
|
+
return opt;
|
10272
|
+
};
|
10259
10273
|
|
10260
10274
|
// src/molecules/Combobox/Combobox.tsx
|
10261
10275
|
var import_smallCross2 = __toESM(require_smallCross());
|
@@ -10330,6 +10344,12 @@ var ComboboxBase = (_a) => {
|
|
10330
10344
|
}
|
10331
10345
|
}
|
10332
10346
|
};
|
10347
|
+
const findItemByValue = (val) => {
|
10348
|
+
if (val === null) {
|
10349
|
+
return null;
|
10350
|
+
}
|
10351
|
+
return val === void 0 ? void 0 : inputItems.find((opt) => defaultGetValue(opt) === defaultGetValue(val));
|
10352
|
+
};
|
10333
10353
|
const {
|
10334
10354
|
isOpen,
|
10335
10355
|
openMenu,
|
@@ -10345,8 +10365,8 @@ var ComboboxBase = (_a) => {
|
|
10345
10365
|
selectItem
|
10346
10366
|
} = useCombobox({
|
10347
10367
|
id,
|
10348
|
-
selectedItem: value,
|
10349
|
-
defaultSelectedItem: defaultValue,
|
10368
|
+
selectedItem: findItemByValue(value),
|
10369
|
+
defaultSelectedItem: findItemByValue(defaultValue),
|
10350
10370
|
isItemDisabled: (item, index) => isOptionDisabled(item, index),
|
10351
10371
|
itemToString,
|
10352
10372
|
items: inputItems,
|
@@ -10520,7 +10540,7 @@ import { useControlledState } from "@react-stately/utils";
|
|
10520
10540
|
import castArray2 from "lodash/castArray";
|
10521
10541
|
import compact from "lodash/compact";
|
10522
10542
|
import groupBy2 from "lodash/groupBy";
|
10523
|
-
import
|
10543
|
+
import isArray2 from "lodash/isArray";
|
10524
10544
|
import isFunction3 from "lodash/isFunction";
|
10525
10545
|
|
10526
10546
|
// src/molecules/List/List.tsx
|
@@ -10730,16 +10750,12 @@ import { useId as useId8 } from "@react-aria/utils";
|
|
10730
10750
|
import { useSelect } from "downshift";
|
10731
10751
|
import { without } from "lodash";
|
10732
10752
|
import defaults from "lodash/defaults";
|
10733
|
-
import isArray from "lodash/isArray";
|
10734
10753
|
import isNil from "lodash/isNil";
|
10735
10754
|
import omit6 from "lodash/omit";
|
10736
10755
|
var hasIconProperty = (val) => {
|
10737
10756
|
var _a;
|
10738
10757
|
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
10739
10758
|
};
|
10740
|
-
var hasOptionGroups2 = (val) => {
|
10741
|
-
return !val.some((opt) => (opt == null ? void 0 : opt.label) === void 0 || !isArray(opt == null ? void 0 : opt.options));
|
10742
|
-
};
|
10743
10759
|
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
10744
10760
|
var _a, _b;
|
10745
10761
|
return /* @__PURE__ */ React58.createElement(Select.Item, __spreadValues({
|
@@ -10749,15 +10765,6 @@ var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getVal
|
|
10749
10765
|
icon: item.icon
|
10750
10766
|
}), optionToString(item));
|
10751
10767
|
};
|
10752
|
-
var defaultGetValue = (opt) => {
|
10753
|
-
if (typeof opt === "string") {
|
10754
|
-
return opt;
|
10755
|
-
}
|
10756
|
-
if (typeof opt.value === "string") {
|
10757
|
-
return opt.value;
|
10758
|
-
}
|
10759
|
-
return "";
|
10760
|
-
};
|
10761
10768
|
var _SelectBase = (props) => {
|
10762
10769
|
var _b;
|
10763
10770
|
const withDefaults = defaults({}, props, {
|
@@ -10817,7 +10824,7 @@ var _SelectBase = (props) => {
|
|
10817
10824
|
const [hasFocus, setFocus] = useState8(false);
|
10818
10825
|
const targetRef = useRef7(null);
|
10819
10826
|
const menuRef = useRef7(null);
|
10820
|
-
const items =
|
10827
|
+
const items = hasOptionGroups(options) ? options.flatMap((g) => g.options) : options;
|
10821
10828
|
const findItemByValue = (val) => {
|
10822
10829
|
if (val === null) {
|
10823
10830
|
return null;
|
@@ -10898,7 +10905,7 @@ var _SelectBase = (props) => {
|
|
10898
10905
|
style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
|
10899
10906
|
}, /* @__PURE__ */ React58.createElement(Select.Menu, __spreadValues({
|
10900
10907
|
maxHeight
|
10901
|
-
}, menuProps), options.length === 0 && /* @__PURE__ */ React58.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !
|
10908
|
+
}, menuProps), options.length === 0 && /* @__PURE__ */ React58.createElement(Select.EmptyStateContainer, null, emptyState), options.length > 0 && !hasOptionGroups(options) && options.map(renderItem), options.length > 0 && hasOptionGroups(options) && options.map(renderGroup), actions.length > 0 && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Select.Divider, {
|
10902
10909
|
onMouseOver: () => setHighlightedIndex(-1)
|
10903
10910
|
}), actions.map((act, index) => /* @__PURE__ */ React58.createElement(Select.ActionItem, __spreadProps(__spreadValues({
|
10904
10911
|
key: `${index}`
|
@@ -11624,9 +11631,9 @@ function useScrollStyles({
|
|
11624
11631
|
}
|
11625
11632
|
|
11626
11633
|
// src/utils/table/types.ts
|
11627
|
-
import
|
11634
|
+
import isArray from "lodash/isArray";
|
11628
11635
|
var areRowsGrouped = (rows) => {
|
11629
|
-
return !
|
11636
|
+
return !isArray(rows);
|
11630
11637
|
};
|
11631
11638
|
var toSortDirection = (direction) => direction === "ascending" ? "asc" : direction === "descending" ? "desc" : false;
|
11632
11639
|
var cellProps = (column) => {
|
@@ -12619,7 +12626,7 @@ var DataList2 = (_a) => {
|
|
12619
12626
|
const defaultSortedColumn = columns.find((c) => c.headerName === (defaultSort == null ? void 0 : defaultSort.headerName));
|
12620
12627
|
const initialSortState = defaultSortedColumn ? { column: defaultSortedColumn, direction: (_a2 = defaultSort == null ? void 0 : defaultSort.direction) != null ? _a2 : "ascending" } : {};
|
12621
12628
|
const [sort, updateSort] = useTableSort(__spreadProps(__spreadValues({}, initialSortState), { onSortChanged }));
|
12622
|
-
const sortedRows =
|
12629
|
+
const sortedRows = isArray2(rows) ? sortRowsBy(rows, sort) : [];
|
12623
12630
|
const groups = areRowsGrouped(rows) ? rows : group ? isFunction3(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
|
12624
12631
|
const isCollapsible = isFunction3(rowDetails);
|
12625
12632
|
const templateColumns = compact([
|
@@ -12816,7 +12823,7 @@ var DataList2 = (_a) => {
|
|
12816
12823
|
}, componentContent) : componentContent;
|
12817
12824
|
return /* @__PURE__ */ React72.createElement(DataListContext.Provider, {
|
12818
12825
|
value: {
|
12819
|
-
rows:
|
12826
|
+
rows: isArray2(rows) ? sortedRows : rows,
|
12820
12827
|
selectedRows: selected
|
12821
12828
|
}
|
12822
12829
|
}, wrappedContent);
|
@@ -14518,7 +14525,7 @@ var layoutStyle = (layout) => {
|
|
14518
14525
|
var isVerticalLayout = (layout) => layout === "vertical" /* Vertical */ || layout === "center-vertical" /* CenterVertical */;
|
14519
14526
|
var EmptyState = ({
|
14520
14527
|
title,
|
14521
|
-
image,
|
14528
|
+
image: Image2,
|
14522
14529
|
imageAlt = "",
|
14523
14530
|
imageWidth,
|
14524
14531
|
description,
|
@@ -14550,11 +14557,13 @@ var EmptyState = ({
|
|
14550
14557
|
justifyContent: template.justifyContent,
|
14551
14558
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
14552
14559
|
height: fullHeight ? "full" : void 0
|
14553
|
-
},
|
14554
|
-
src:
|
14560
|
+
}, Image2 && (typeof Image2 === "string" ? /* @__PURE__ */ React94.createElement("img", {
|
14561
|
+
src: Image2,
|
14555
14562
|
alt: imageAlt,
|
14556
14563
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
14557
|
-
})
|
14564
|
+
}) : /* @__PURE__ */ React94.createElement("div", {
|
14565
|
+
className: tw("animate-draw")
|
14566
|
+
}, /* @__PURE__ */ React94.createElement(Image2, null))), /* @__PURE__ */ React94.createElement(Box.Flex, {
|
14558
14567
|
flexDirection: "column",
|
14559
14568
|
justifyContent: template.justifyContent,
|
14560
14569
|
alignItems: template.alignItems
|
package/dist/tailwind.config.js
CHANGED
@@ -63,12 +63,22 @@ module.exports = {
|
|
63
63
|
},
|
64
64
|
animation: {
|
65
65
|
'positioner-fade-in': 'positioner-fade-in 300ms ease-in-out',
|
66
|
+
'draw': 'draw 2s cubic-bezier(0.47, 0, 0.745, 0.715) forwards',
|
66
67
|
},
|
67
68
|
keyframes: {
|
68
69
|
'positioner-fade-in': {
|
69
70
|
from: { opacity: '0' },
|
70
71
|
to: { opacity: '1' },
|
71
72
|
},
|
73
|
+
'draw': {
|
74
|
+
from: {
|
75
|
+
'stroke-dasharray': '1000',
|
76
|
+
'stroke-dashoffset': '1000',
|
77
|
+
},
|
78
|
+
to: {
|
79
|
+
'stroke-dashoffset': '0',
|
80
|
+
},
|
81
|
+
},
|
72
82
|
},
|
73
83
|
},
|
74
84
|
},
|
@@ -100,6 +110,7 @@ module.exports = {
|
|
100
110
|
'line-clamp-4',
|
101
111
|
'line-clamp-5',
|
102
112
|
'line-clamp-6',
|
113
|
+
'animate-draw',
|
103
114
|
],
|
104
115
|
plugins: [
|
105
116
|
require('tailwindcss-children'),
|