@aivenio/aquarium 1.53.0 → 1.54.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/atoms/DataList/DataList.d.ts +2 -0
- package/dist/src/atoms/DataList/DataList.js +8 -9
- package/dist/src/molecules/DataList/DataList.d.ts +12 -7
- package/dist/src/molecules/DataList/DataList.js +28 -96
- package/dist/src/molecules/DataList/DataListComponents.d.ts +27 -0
- package/dist/src/molecules/DataList/DataListComponents.js +73 -0
- package/dist/src/molecules/DataList/DataListGroup.d.ts +9 -0
- package/dist/src/molecules/DataList/DataListGroup.js +74 -0
- package/dist/src/molecules/DataTable/DataTable.d.ts +1 -1
- package/dist/src/molecules/Template/Template.d.ts +1 -1
- package/dist/src/molecules/Template/Template.js +13 -2
- package/dist/src/utils/table/types.d.ts +10 -6
- package/dist/src/utils/table/types.js +7 -2
- package/dist/styles.css +5 -10
- package/dist/system.cjs +1332 -1158
- package/dist/system.mjs +1298 -1125
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
@@ -4681,7 +4681,7 @@ __export(molecules_exports, {
|
|
4681
4681
|
InputBase: () => InputBase,
|
4682
4682
|
LineClamp: () => LineClamp2,
|
4683
4683
|
Link: () => Link2,
|
4684
|
-
List: () =>
|
4684
|
+
List: () => List,
|
4685
4685
|
ListItem: () => ListItem,
|
4686
4686
|
Modal: () => Modal2,
|
4687
4687
|
ModalTab: () => ModalTab,
|
@@ -4737,6 +4737,7 @@ __export(molecules_exports, {
|
|
4737
4737
|
ToastProvider: () => ToastProvider,
|
4738
4738
|
Tooltip: () => Tooltip,
|
4739
4739
|
Typography: () => Typography2,
|
4740
|
+
areRowsGrouped: () => areRowsGrouped,
|
4740
4741
|
asButton: () => asButton,
|
4741
4742
|
asCrumb: () => asCrumb,
|
4742
4743
|
asPopoverButton: () => asPopoverButton,
|
@@ -9307,10 +9308,11 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React49.crea
|
|
9307
9308
|
}, children);
|
9308
9309
|
|
9309
9310
|
// src/molecules/DataList/DataList.tsx
|
9310
|
-
import
|
9311
|
+
import React69 from "react";
|
9311
9312
|
import compact from "lodash/compact";
|
9312
9313
|
import groupBy2 from "lodash/groupBy";
|
9313
|
-
import
|
9314
|
+
import isArray3 from "lodash/isArray";
|
9315
|
+
import isFunction3 from "lodash/isFunction";
|
9314
9316
|
|
9315
9317
|
// src/molecules/Accordion/Accordion.tsx
|
9316
9318
|
import React52, { createContext as createContext2, useContext as useContext5, useState as useState6 } from "react";
|
@@ -9501,17 +9503,14 @@ Accordion.Panel.displayName = "Accordion.Panel";
|
|
9501
9503
|
Accordion.UnanimatedPanel = AccordionUnanimatedPanel;
|
9502
9504
|
Accordion.UnanimatedPanel.displayName = "Accordion.UnanimatedPanel";
|
9503
9505
|
|
9504
|
-
// src/molecules/
|
9506
|
+
// src/molecules/List/List.tsx
|
9507
|
+
import React58 from "react";
|
9508
|
+
import isObject from "lodash/isObject";
|
9509
|
+
import isString from "lodash/isString";
|
9510
|
+
|
9511
|
+
// src/molecules/Pagination/Pagination.tsx
|
9505
9512
|
import React56 from "react";
|
9506
|
-
import
|
9507
|
-
import { PressResponder, usePress } from "@react-aria/interactions";
|
9508
|
-
import { useMenu, useMenuItem, useMenuSection, useMenuTrigger } from "@react-aria/menu";
|
9509
|
-
import { useSeparator } from "@react-aria/separator";
|
9510
|
-
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
9511
|
-
import { Item as Item3, Section } from "@react-stately/collections";
|
9512
|
-
import { useMenuTriggerState } from "@react-stately/menu";
|
9513
|
-
import { useTreeState } from "@react-stately/tree";
|
9514
|
-
import omit6 from "lodash/omit";
|
9513
|
+
import clamp from "lodash/clamp";
|
9515
9514
|
|
9516
9515
|
// src/molecules/Input/Input.tsx
|
9517
9516
|
import React54, { forwardRef, useEffect as useEffect7, useImperativeHandle, useState as useState7 } from "react";
|
@@ -9670,419 +9669,96 @@ Input2.displayName = "Input";
|
|
9670
9669
|
Input2.Skeleton = () => /* @__PURE__ */ React54.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React54.createElement(InputBase.Skeleton, null));
|
9671
9670
|
Input2.Skeleton.displayName = "Input.Skeleton";
|
9672
9671
|
|
9673
|
-
// src/
|
9674
|
-
import React55 from "react";
|
9675
|
-
|
9676
|
-
|
9677
|
-
|
9678
|
-
|
9679
|
-
|
9680
|
-
|
9681
|
-
|
9682
|
-
|
9683
|
-
|
9684
|
-
}
|
9685
|
-
);
|
9686
|
-
var ContentContainer = ({ children }) => /* @__PURE__ */ React55.createElement("div", {
|
9687
|
-
className: tw("p-3 overflow-y-auto overflow-x-hidden")
|
9688
|
-
}, children);
|
9689
|
-
DropdownMenu.ContentContainer = ContentContainer;
|
9690
|
-
var List = React55.forwardRef(
|
9691
|
-
(_a, ref) => {
|
9692
|
-
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
9693
|
-
return /* @__PURE__ */ React55.createElement("ul", __spreadValues({
|
9694
|
-
ref,
|
9695
|
-
className: classNames(className, "outline-none ring-0")
|
9696
|
-
}, props), children);
|
9697
|
-
}
|
9698
|
-
);
|
9699
|
-
DropdownMenu.List = List;
|
9700
|
-
var Group2 = React55.forwardRef(
|
9701
|
-
(_a, ref) => {
|
9702
|
-
var _b = _a, { className, title, titleProps, children } = _b, props = __objRest(_b, ["className", "title", "titleProps", "children"]);
|
9703
|
-
return /* @__PURE__ */ React55.createElement("li", __spreadValues({
|
9704
|
-
ref
|
9705
|
-
}, props), title && /* @__PURE__ */ React55.createElement("div", __spreadValues({
|
9706
|
-
className: classNames(className, "p-3 text-grey-40 uppercase cursor-default typography-caption", {
|
9707
|
-
"text-grey-20": props.disabled
|
9708
|
-
})
|
9709
|
-
}, titleProps), title), children);
|
9710
|
-
}
|
9711
|
-
);
|
9712
|
-
DropdownMenu.Group = Group2;
|
9713
|
-
var Item2 = React55.forwardRef(
|
9714
|
-
(_a, ref) => {
|
9715
|
-
var _b = _a, { kind, highlighted, selected, className, icon, showNotification = false, children } = _b, props = __objRest(_b, ["kind", "highlighted", "selected", "className", "icon", "showNotification", "children"]);
|
9716
|
-
return /* @__PURE__ */ React55.createElement("li", __spreadValues({
|
9717
|
-
ref,
|
9718
|
-
className: classNames(className, "flex items-center gap-x-3 p-3 outline-none", {
|
9719
|
-
"cursor-pointer hover:bg-grey-0": !props.disabled,
|
9720
|
-
"bg-grey-0": highlighted,
|
9721
|
-
"text-primary-80": kind === "action",
|
9722
|
-
"text-grey-20 cursor-not-allowed": props.disabled
|
9723
|
-
})
|
9724
|
-
}, props), icon && showNotification && /* @__PURE__ */ React55.createElement(Badge.Notification, null, /* @__PURE__ */ React55.createElement(InlineIcon, {
|
9725
|
-
icon
|
9726
|
-
})), icon && !showNotification && /* @__PURE__ */ React55.createElement(InlineIcon, {
|
9727
|
-
icon
|
9728
|
-
}), /* @__PURE__ */ React55.createElement("span", {
|
9729
|
-
className: tw("grow")
|
9730
|
-
}, children), selected && /* @__PURE__ */ React55.createElement(InlineIcon, {
|
9731
|
-
icon: import_tick5.default
|
9732
|
-
}));
|
9733
|
-
}
|
9734
|
-
);
|
9735
|
-
DropdownMenu.Item = Item2;
|
9736
|
-
var Description = ({ disabled, children }) => /* @__PURE__ */ React55.createElement(Typography2.Caption, {
|
9737
|
-
color: disabled ? "grey-20" : "grey-40"
|
9738
|
-
}, children);
|
9739
|
-
DropdownMenu.Description = Description;
|
9740
|
-
var Separator = (_a) => {
|
9741
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
9742
|
-
return /* @__PURE__ */ React55.createElement("li", __spreadProps(__spreadValues({}, props), {
|
9743
|
-
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
9744
|
-
}));
|
9672
|
+
// src/molecules/Select/Select.tsx
|
9673
|
+
import React55, { useRef as useRef6, useState as useState8 } from "react";
|
9674
|
+
import { useId as useId7 } from "@react-aria/utils";
|
9675
|
+
import { useSelect } from "downshift";
|
9676
|
+
import defaults from "lodash/defaults";
|
9677
|
+
import isArray from "lodash/isArray";
|
9678
|
+
import isNil from "lodash/isNil";
|
9679
|
+
import omit6 from "lodash/omit";
|
9680
|
+
var hasIconProperty = (val) => {
|
9681
|
+
var _a;
|
9682
|
+
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
9745
9683
|
};
|
9746
|
-
|
9747
|
-
|
9748
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
9749
|
-
return /* @__PURE__ */ React55.createElement("div", __spreadValues({
|
9750
|
-
className: classNames(tw("border border-dashed border-grey-10 p-3"), className)
|
9751
|
-
}, props), children);
|
9684
|
+
var hasOptionGroups = (val) => {
|
9685
|
+
return !val.some((opt) => (opt == null ? void 0 : opt.label) === void 0 || !isArray(opt == null ? void 0 : opt.options));
|
9752
9686
|
};
|
9753
|
-
|
9754
|
-
|
9755
|
-
|
9756
|
-
|
9757
|
-
|
9758
|
-
|
9687
|
+
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
9688
|
+
var _a, _b;
|
9689
|
+
return /* @__PURE__ */ React55.createElement(Select.Item, __spreadValues({
|
9690
|
+
key: (_b = (_a = getOptionKey == null ? void 0 : getOptionKey(item)) != null ? _a : getValue == null ? void 0 : getValue(item)) != null ? _b : optionToString(item),
|
9691
|
+
selected: item === selectedItem
|
9692
|
+
}, props), hasIconProperty(item) && /* @__PURE__ */ React55.createElement(InlineIcon, {
|
9693
|
+
icon: item.icon
|
9694
|
+
}), optionToString(item));
|
9759
9695
|
};
|
9760
|
-
var
|
9761
|
-
|
9762
|
-
|
9763
|
-
const description = Object.hasOwn(node.props, "description") && typeof node.props.description === "string" ? node.props.description : void 0;
|
9764
|
-
if (node.type === "section" && node.hasChildNodes) {
|
9765
|
-
const filtered = filterNodes(node.childNodes, inputValue, filter);
|
9766
|
-
if ([...filtered].length > 0) {
|
9767
|
-
filteredNode.push(__spreadProps(__spreadValues({}, node), { childNodes: filtered }));
|
9768
|
-
}
|
9769
|
-
} else if (node.type !== "section" && (filter(node.textValue, inputValue) || description && filter(description, inputValue))) {
|
9770
|
-
filteredNode.push(__spreadValues({}, node));
|
9771
|
-
}
|
9696
|
+
var defaultGetValue = (opt) => {
|
9697
|
+
if (typeof opt === "string") {
|
9698
|
+
return opt;
|
9772
9699
|
}
|
9773
|
-
|
9700
|
+
if (typeof opt.value === "string") {
|
9701
|
+
return opt.value;
|
9702
|
+
}
|
9703
|
+
return "";
|
9774
9704
|
};
|
9775
|
-
|
9776
|
-
|
9777
|
-
|
9778
|
-
|
9779
|
-
|
9780
|
-
|
9781
|
-
|
9782
|
-
|
9783
|
-
|
9784
|
-
|
9785
|
-
|
9786
|
-
|
9705
|
+
var _SelectBase = (props) => {
|
9706
|
+
var _b;
|
9707
|
+
const withDefaults = defaults({}, props, {
|
9708
|
+
disabled: false,
|
9709
|
+
valid: true,
|
9710
|
+
readOnly: false,
|
9711
|
+
required: false,
|
9712
|
+
optionToString: getOptionLabelBuiltin,
|
9713
|
+
getValue: defaultGetValue,
|
9714
|
+
UNSAFE_renderOption: defaultRenderOption,
|
9715
|
+
isOptionDisabled: isOptionDisabledBuiltin,
|
9716
|
+
actions: []
|
9717
|
+
});
|
9718
|
+
const _a = withDefaults, {
|
9719
|
+
id,
|
9720
|
+
name,
|
9721
|
+
placeholder,
|
9722
|
+
disabled,
|
9723
|
+
readOnly,
|
9787
9724
|
maxHeight,
|
9788
|
-
|
9725
|
+
options,
|
9726
|
+
optionToString: itemToString,
|
9727
|
+
getValue,
|
9728
|
+
getOptionKey,
|
9729
|
+
UNSAFE_renderOption,
|
9730
|
+
isOptionDisabled,
|
9731
|
+
defaultValue,
|
9732
|
+
value,
|
9733
|
+
onChange,
|
9734
|
+
valid,
|
9789
9735
|
emptyState,
|
9790
|
-
|
9791
|
-
|
9792
|
-
children
|
9793
|
-
|
9794
|
-
|
9795
|
-
"
|
9796
|
-
"
|
9797
|
-
"
|
9798
|
-
"
|
9799
|
-
"
|
9800
|
-
"maxWidth",
|
9801
|
-
"minHeight",
|
9736
|
+
actions,
|
9737
|
+
required,
|
9738
|
+
children,
|
9739
|
+
labelWrapper
|
9740
|
+
} = _a, rest = __objRest(_a, [
|
9741
|
+
"id",
|
9742
|
+
"name",
|
9743
|
+
"placeholder",
|
9744
|
+
"disabled",
|
9745
|
+
"readOnly",
|
9802
9746
|
"maxHeight",
|
9803
|
-
"
|
9747
|
+
"options",
|
9748
|
+
"optionToString",
|
9749
|
+
"getValue",
|
9750
|
+
"getOptionKey",
|
9751
|
+
"UNSAFE_renderOption",
|
9752
|
+
"isOptionDisabled",
|
9753
|
+
"defaultValue",
|
9754
|
+
"value",
|
9755
|
+
"onChange",
|
9756
|
+
"valid",
|
9804
9757
|
"emptyState",
|
9805
|
-
"
|
9806
|
-
"
|
9807
|
-
"children"
|
9808
|
-
|
9809
|
-
const triggerRef = React56.useRef(null);
|
9810
|
-
const [trigger, items] = extractTriggerAndItems(children);
|
9811
|
-
const state = useMenuTriggerState(props);
|
9812
|
-
const { menuTriggerProps, menuProps } = useMenuTrigger({}, state, triggerRef);
|
9813
|
-
return /* @__PURE__ */ React56.createElement("div", null, /* @__PURE__ */ React56.createElement(PressResponder, __spreadValues({
|
9814
|
-
ref: triggerRef,
|
9815
|
-
onPress: () => state.toggle()
|
9816
|
-
}, omit6(menuTriggerProps, ["id", "aria-expanded"])), /* @__PURE__ */ React56.createElement(TriggerWrapper, {
|
9817
|
-
"aria-expanded": menuTriggerProps["aria-expanded"]
|
9818
|
-
}, trigger.props.children)), state.isOpen && /* @__PURE__ */ React56.createElement(PopoverOverlay, {
|
9819
|
-
className: "Aquarium-DropdownMenu",
|
9820
|
-
triggerRef,
|
9821
|
-
state,
|
9822
|
-
placement,
|
9823
|
-
focusable: false
|
9824
|
-
}, /* @__PURE__ */ React56.createElement(MenuWrapper, __spreadValues({
|
9825
|
-
onAction,
|
9826
|
-
selectionMode,
|
9827
|
-
selection,
|
9828
|
-
onSelectionChange,
|
9829
|
-
searchable,
|
9830
|
-
emptyState,
|
9831
|
-
minWidth,
|
9832
|
-
maxWidth,
|
9833
|
-
maxHeight,
|
9834
|
-
minHeight,
|
9835
|
-
header,
|
9836
|
-
footer
|
9837
|
-
}, menuProps), items.props.children)));
|
9838
|
-
};
|
9839
|
-
DropdownMenu2.displayName = "DropdownMenu";
|
9840
|
-
var MenuTrigger = () => null;
|
9841
|
-
var MenuItems = () => null;
|
9842
|
-
DropdownMenu2.Trigger = MenuTrigger;
|
9843
|
-
DropdownMenu2.Trigger.displayName = "DropdownMenu.Trigger";
|
9844
|
-
DropdownMenu2.Items = MenuItems;
|
9845
|
-
DropdownMenu2.Items.displayName = "DropdownMenu.Items";
|
9846
|
-
DropdownMenu2.Item = Item3;
|
9847
|
-
DropdownMenu2.Item.displayName = "DropdownMenu.Item";
|
9848
|
-
DropdownMenu2.Section = Section;
|
9849
|
-
DropdownMenu2.Section.displayName = "DropdownMenu.Section";
|
9850
|
-
var TriggerWrapper = (_a) => {
|
9851
|
-
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
9852
|
-
const ref = React56.useRef(null);
|
9853
|
-
const { pressProps } = usePress(__spreadProps(__spreadValues({}, props), { ref }));
|
9854
|
-
const trigger = React56.Children.only(children);
|
9855
|
-
if (!trigger || !React56.isValidElement(trigger)) {
|
9856
|
-
throw new Error("<DropdownMenu.Trigger> must have valid child");
|
9857
|
-
}
|
9858
|
-
return React56.cloneElement(trigger, __spreadValues({ ref }, mergeProps2(pressProps, props)));
|
9859
|
-
};
|
9860
|
-
var isSectionNode = (item) => item.type === "section";
|
9861
|
-
var isItemNode = (item) => item.type === "item";
|
9862
|
-
var MenuWrapper = (_a) => {
|
9863
|
-
var _b = _a, {
|
9864
|
-
selection: selectedKeys,
|
9865
|
-
minWidth,
|
9866
|
-
maxWidth,
|
9867
|
-
minHeight,
|
9868
|
-
maxHeight,
|
9869
|
-
searchable,
|
9870
|
-
emptyState,
|
9871
|
-
header,
|
9872
|
-
footer
|
9873
|
-
} = _b, props = __objRest(_b, [
|
9874
|
-
"selection",
|
9875
|
-
"minWidth",
|
9876
|
-
"maxWidth",
|
9877
|
-
"minHeight",
|
9878
|
-
"maxHeight",
|
9879
|
-
"searchable",
|
9880
|
-
"emptyState",
|
9881
|
-
"header",
|
9882
|
-
"footer"
|
9883
|
-
]);
|
9884
|
-
const ref = React56.useRef(null);
|
9885
|
-
const disabledKeys = getDisabledItemKeys(props.children);
|
9886
|
-
const state = useTreeState(__spreadValues({
|
9887
|
-
disabledKeys,
|
9888
|
-
selectedKeys
|
9889
|
-
}, props));
|
9890
|
-
const { menuProps } = useMenu(props, state, ref);
|
9891
|
-
const { contains } = useFilter({ sensitivity: "base" });
|
9892
|
-
const [search, setSearch] = React56.useState("");
|
9893
|
-
const filteredCollection = React56.useMemo(
|
9894
|
-
() => searchable ? filterCollection(state.collection, search, contains) : state.collection,
|
9895
|
-
[searchable, state.collection, search, contains]
|
9896
|
-
);
|
9897
|
-
return /* @__PURE__ */ React56.createElement(DropdownMenu, {
|
9898
|
-
minWidth,
|
9899
|
-
maxWidth,
|
9900
|
-
minHeight,
|
9901
|
-
maxHeight
|
9902
|
-
}, header, /* @__PURE__ */ React56.createElement(DropdownMenu.ContentContainer, null, searchable && /* @__PURE__ */ React56.createElement(SearchInput, {
|
9903
|
-
"aria-label": "search",
|
9904
|
-
value: search,
|
9905
|
-
onChange: (e) => setSearch(e.target.value),
|
9906
|
-
className: tw("mb-5")
|
9907
|
-
}), filteredCollection.size === 0 && emptyState && /* @__PURE__ */ React56.createElement(DropdownMenu.EmptyStateContainer, null, emptyState), /* @__PURE__ */ React56.createElement(DropdownMenu.List, __spreadValues({
|
9908
|
-
ref
|
9909
|
-
}, menuProps), Array.from(filteredCollection).map((item) => {
|
9910
|
-
if (isSectionNode(item)) {
|
9911
|
-
return /* @__PURE__ */ React56.createElement(SectionWrapper, {
|
9912
|
-
key: item.key,
|
9913
|
-
section: item,
|
9914
|
-
state
|
9915
|
-
});
|
9916
|
-
} else if (isItemNode(item)) {
|
9917
|
-
return /* @__PURE__ */ React56.createElement(ItemWrapper, {
|
9918
|
-
key: item.key,
|
9919
|
-
item,
|
9920
|
-
state
|
9921
|
-
});
|
9922
|
-
}
|
9923
|
-
}))), footer);
|
9924
|
-
};
|
9925
|
-
var ItemWrapper = ({ item, state }) => {
|
9926
|
-
const ref = React56.useRef(null);
|
9927
|
-
const { menuItemProps, descriptionProps, isSelected, isFocused, isDisabled } = useMenuItem(
|
9928
|
-
{ key: item.key, closeOnSelect: item.props.closeOnSelect },
|
9929
|
-
state,
|
9930
|
-
ref
|
9931
|
-
);
|
9932
|
-
const { icon, description, kind = "default", showNotification = false } = item.props;
|
9933
|
-
return /* @__PURE__ */ React56.createElement(DropdownMenu.Item, __spreadProps(__spreadValues({
|
9934
|
-
ref
|
9935
|
-
}, menuItemProps), {
|
9936
|
-
kind,
|
9937
|
-
selected: isSelected,
|
9938
|
-
highlighted: isFocused,
|
9939
|
-
disabled: isDisabled,
|
9940
|
-
icon,
|
9941
|
-
showNotification
|
9942
|
-
}), item.rendered, description && /* @__PURE__ */ React56.createElement(DropdownMenu.Description, __spreadValues({
|
9943
|
-
disabled: isDisabled
|
9944
|
-
}, descriptionProps), description));
|
9945
|
-
};
|
9946
|
-
var SectionWrapper = ({ section, state }) => {
|
9947
|
-
const { itemProps, headingProps, groupProps } = useMenuSection({
|
9948
|
-
"heading": section.rendered,
|
9949
|
-
"aria-label": section["aria-label"]
|
9950
|
-
});
|
9951
|
-
const { separatorProps } = useSeparator({
|
9952
|
-
elementType: "li"
|
9953
|
-
});
|
9954
|
-
return /* @__PURE__ */ React56.createElement(React56.Fragment, null, section.key !== state.collection.getFirstKey() && /* @__PURE__ */ React56.createElement(DropdownMenu.Separator, __spreadValues({}, separatorProps)), /* @__PURE__ */ React56.createElement(DropdownMenu.Group, __spreadValues({
|
9955
|
-
title: section.rendered,
|
9956
|
-
titleProps: headingProps
|
9957
|
-
}, itemProps), /* @__PURE__ */ React56.createElement("ul", __spreadValues({}, groupProps), Array.from(section.childNodes).map((node) => /* @__PURE__ */ React56.createElement(ItemWrapper, {
|
9958
|
-
key: node.key,
|
9959
|
-
item: node,
|
9960
|
-
state
|
9961
|
-
})))));
|
9962
|
-
};
|
9963
|
-
var extractTriggerAndItems = (children) => {
|
9964
|
-
const [trigger, items] = React56.Children.toArray(children);
|
9965
|
-
if (!isComponentType(trigger, MenuTrigger) || !isComponentType(items, MenuItems)) {
|
9966
|
-
throw new Error("<DropdownMenu> must have <DropdownMenu.Trigger> and <DropdownMenu.Items> defined");
|
9967
|
-
}
|
9968
|
-
return [trigger, items];
|
9969
|
-
};
|
9970
|
-
var getDisabledItemKeys = (children) => {
|
9971
|
-
const keys = React56.Children.map(children, (child) => {
|
9972
|
-
var _a, _b;
|
9973
|
-
if (!child || typeof child === "function") {
|
9974
|
-
return null;
|
9975
|
-
}
|
9976
|
-
if (isComponentType(child, Item3) && child.props.disabled) {
|
9977
|
-
return (_b = (_a = child.key) == null ? void 0 : _a.toString()) != null ? _b : null;
|
9978
|
-
}
|
9979
|
-
if (isComponentType(child, Section)) {
|
9980
|
-
return getDisabledItemKeys(child.props.children);
|
9981
|
-
}
|
9982
|
-
return null;
|
9983
|
-
});
|
9984
|
-
return keys.flat().filter((key) => key !== null);
|
9985
|
-
};
|
9986
|
-
|
9987
|
-
// src/molecules/List/List.tsx
|
9988
|
-
import React60 from "react";
|
9989
|
-
import isObject from "lodash/isObject";
|
9990
|
-
import isString from "lodash/isString";
|
9991
|
-
|
9992
|
-
// src/molecules/Pagination/Pagination.tsx
|
9993
|
-
import React58 from "react";
|
9994
|
-
import clamp from "lodash/clamp";
|
9995
|
-
|
9996
|
-
// src/molecules/Select/Select.tsx
|
9997
|
-
import React57, { useRef as useRef6, useState as useState8 } from "react";
|
9998
|
-
import { useId as useId7 } from "@react-aria/utils";
|
9999
|
-
import { useSelect } from "downshift";
|
10000
|
-
import defaults from "lodash/defaults";
|
10001
|
-
import isArray from "lodash/isArray";
|
10002
|
-
import isNil from "lodash/isNil";
|
10003
|
-
import omit7 from "lodash/omit";
|
10004
|
-
var hasIconProperty = (val) => {
|
10005
|
-
var _a;
|
10006
|
-
return typeof val === "string" || ((_a = val == null ? void 0 : val.icon) == null ? void 0 : _a.body) !== void 0;
|
10007
|
-
};
|
10008
|
-
var hasOptionGroups = (val) => {
|
10009
|
-
return !val.some((opt) => (opt == null ? void 0 : opt.label) === void 0 || !isArray(opt == null ? void 0 : opt.options));
|
10010
|
-
};
|
10011
|
-
var defaultRenderOption = (item, props, { selectedItem }, { getOptionKey, getValue, optionToString = getOptionLabelBuiltin }) => {
|
10012
|
-
var _a, _b;
|
10013
|
-
return /* @__PURE__ */ React57.createElement(Select.Item, __spreadValues({
|
10014
|
-
key: (_b = (_a = getOptionKey == null ? void 0 : getOptionKey(item)) != null ? _a : getValue == null ? void 0 : getValue(item)) != null ? _b : optionToString(item),
|
10015
|
-
selected: item === selectedItem
|
10016
|
-
}, props), hasIconProperty(item) && /* @__PURE__ */ React57.createElement(InlineIcon, {
|
10017
|
-
icon: item.icon
|
10018
|
-
}), optionToString(item));
|
10019
|
-
};
|
10020
|
-
var defaultGetValue = (opt) => {
|
10021
|
-
if (typeof opt === "string") {
|
10022
|
-
return opt;
|
10023
|
-
}
|
10024
|
-
if (typeof opt.value === "string") {
|
10025
|
-
return opt.value;
|
10026
|
-
}
|
10027
|
-
return "";
|
10028
|
-
};
|
10029
|
-
var _SelectBase = (props) => {
|
10030
|
-
var _b;
|
10031
|
-
const withDefaults = defaults({}, props, {
|
10032
|
-
disabled: false,
|
10033
|
-
valid: true,
|
10034
|
-
readOnly: false,
|
10035
|
-
required: false,
|
10036
|
-
optionToString: getOptionLabelBuiltin,
|
10037
|
-
getValue: defaultGetValue,
|
10038
|
-
UNSAFE_renderOption: defaultRenderOption,
|
10039
|
-
isOptionDisabled: isOptionDisabledBuiltin,
|
10040
|
-
actions: []
|
10041
|
-
});
|
10042
|
-
const _a = withDefaults, {
|
10043
|
-
id,
|
10044
|
-
name,
|
10045
|
-
placeholder,
|
10046
|
-
disabled,
|
10047
|
-
readOnly,
|
10048
|
-
maxHeight,
|
10049
|
-
options,
|
10050
|
-
optionToString: itemToString,
|
10051
|
-
getValue,
|
10052
|
-
getOptionKey,
|
10053
|
-
UNSAFE_renderOption,
|
10054
|
-
isOptionDisabled,
|
10055
|
-
defaultValue,
|
10056
|
-
value,
|
10057
|
-
onChange,
|
10058
|
-
valid,
|
10059
|
-
emptyState,
|
10060
|
-
actions,
|
10061
|
-
required,
|
10062
|
-
children,
|
10063
|
-
labelWrapper
|
10064
|
-
} = _a, rest = __objRest(_a, [
|
10065
|
-
"id",
|
10066
|
-
"name",
|
10067
|
-
"placeholder",
|
10068
|
-
"disabled",
|
10069
|
-
"readOnly",
|
10070
|
-
"maxHeight",
|
10071
|
-
"options",
|
10072
|
-
"optionToString",
|
10073
|
-
"getValue",
|
10074
|
-
"getOptionKey",
|
10075
|
-
"UNSAFE_renderOption",
|
10076
|
-
"isOptionDisabled",
|
10077
|
-
"defaultValue",
|
10078
|
-
"value",
|
10079
|
-
"onChange",
|
10080
|
-
"valid",
|
10081
|
-
"emptyState",
|
10082
|
-
"actions",
|
10083
|
-
"required",
|
10084
|
-
"children",
|
10085
|
-
"labelWrapper"
|
9758
|
+
"actions",
|
9759
|
+
"required",
|
9760
|
+
"children",
|
9761
|
+
"labelWrapper"
|
10086
9762
|
]);
|
10087
9763
|
const [hasFocus, setFocus] = useState8(false);
|
10088
9764
|
const targetRef = useRef6(null);
|
@@ -10133,13 +9809,13 @@ var _SelectBase = (props) => {
|
|
10133
9809
|
},
|
10134
9810
|
withDefaults
|
10135
9811
|
);
|
10136
|
-
const renderGroup = (group) => /* @__PURE__ */
|
9812
|
+
const renderGroup = (group) => /* @__PURE__ */ React55.createElement(React55.Fragment, {
|
10137
9813
|
key: group.label
|
10138
|
-
}, /* @__PURE__ */
|
10139
|
-
const input = /* @__PURE__ */
|
9814
|
+
}, /* @__PURE__ */ React55.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, items.indexOf(opt))));
|
9815
|
+
const input = /* @__PURE__ */ React55.createElement(Select.InputContainer, __spreadProps(__spreadValues({}, getToggleButtonProps({ disabled: disabled || readOnly, ref: targetRef })), {
|
10140
9816
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default",
|
10141
9817
|
tabIndex: 0
|
10142
|
-
}), /* @__PURE__ */
|
9818
|
+
}), /* @__PURE__ */ React55.createElement(Select.Input, __spreadProps(__spreadValues({
|
10143
9819
|
id,
|
10144
9820
|
name
|
10145
9821
|
}, rest), {
|
@@ -10151,25 +9827,25 @@ var _SelectBase = (props) => {
|
|
10151
9827
|
tabIndex: -1,
|
10152
9828
|
onFocus: () => setFocus(true),
|
10153
9829
|
onBlur: () => setFocus(false)
|
10154
|
-
})), !readOnly && /* @__PURE__ */
|
9830
|
+
})), !readOnly && /* @__PURE__ */ React55.createElement(Select.Toggle, {
|
10155
9831
|
disabled,
|
10156
9832
|
isOpen,
|
10157
9833
|
tabIndex: -1
|
10158
9834
|
}));
|
10159
9835
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
10160
|
-
return /* @__PURE__ */
|
9836
|
+
return /* @__PURE__ */ React55.createElement("div", {
|
10161
9837
|
className: classNames("Aquarium-SelectBase", tw("relative"))
|
10162
|
-
}, labelWrapper ?
|
9838
|
+
}, labelWrapper ? React55.cloneElement(labelWrapper, { children: input }) : input, isOpen && /* @__PURE__ */ React55.createElement(PopoverOverlay, {
|
10163
9839
|
state,
|
10164
9840
|
triggerRef: targetRef,
|
10165
9841
|
placement: "bottom-left",
|
10166
9842
|
shouldFlip: true,
|
10167
9843
|
style: { width: (_b = targetRef.current) == null ? void 0 : _b.offsetWidth }
|
10168
|
-
}, /* @__PURE__ */
|
9844
|
+
}, /* @__PURE__ */ React55.createElement(Select.Menu, __spreadValues({
|
10169
9845
|
maxHeight
|
10170
|
-
}, menuProps), options.length === 0 && /* @__PURE__ */
|
9846
|
+
}, menuProps), options.length === 0 && /* @__PURE__ */ React55.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__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(Select.Divider, {
|
10171
9847
|
onMouseOver: () => setHighlightedIndex(-1)
|
10172
|
-
}), actions.map((act, index) => /* @__PURE__ */
|
9848
|
+
}), actions.map((act, index) => /* @__PURE__ */ React55.createElement(Select.ActionItem, __spreadProps(__spreadValues({
|
10173
9849
|
key: `${index}`
|
10174
9850
|
}, act), {
|
10175
9851
|
onMouseOver: () => setHighlightedIndex(-1),
|
@@ -10179,10 +9855,10 @@ var _SelectBase = (props) => {
|
|
10179
9855
|
}
|
10180
9856
|
}), act.label))))));
|
10181
9857
|
};
|
10182
|
-
var SelectBase = (props) => /* @__PURE__ */
|
9858
|
+
var SelectBase = (props) => /* @__PURE__ */ React55.createElement(_SelectBase, __spreadProps(__spreadValues({}, props), {
|
10183
9859
|
labelWrapper: void 0
|
10184
9860
|
}));
|
10185
|
-
var SelectBaseSkeleton = () => /* @__PURE__ */
|
9861
|
+
var SelectBaseSkeleton = () => /* @__PURE__ */ React55.createElement(Skeleton, {
|
10186
9862
|
height: 38
|
10187
9863
|
});
|
10188
9864
|
SelectBase.Skeleton = SelectBaseSkeleton;
|
@@ -10198,24 +9874,24 @@ var Select2 = (_a) => {
|
|
10198
9874
|
const errorMessageId = useId7();
|
10199
9875
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
10200
9876
|
const labelProps = getLabelControlProps(props);
|
10201
|
-
const baseProps =
|
9877
|
+
const baseProps = omit6(props, Object.keys(labelProps));
|
10202
9878
|
const legacyError = labelProps.error !== void 0 && labelProps.valid === false;
|
10203
9879
|
const variant = !labelProps.valid || legacyError ? "error" : labelProps.disabled ? "disabled" : "default";
|
10204
|
-
const label = /* @__PURE__ */
|
9880
|
+
const label = /* @__PURE__ */ React55.createElement(Label, __spreadValues({
|
10205
9881
|
id: `${id}-label`,
|
10206
9882
|
htmlFor: `${id}-input`,
|
10207
9883
|
variant,
|
10208
9884
|
messageId: errorMessageId
|
10209
9885
|
}, labelProps));
|
10210
|
-
return /* @__PURE__ */
|
9886
|
+
return /* @__PURE__ */ React55.createElement(FormControl, {
|
10211
9887
|
className: "Aquarium-Select"
|
10212
|
-
}, /* @__PURE__ */
|
9888
|
+
}, /* @__PURE__ */ React55.createElement(_SelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
10213
9889
|
id: `${id}-input`,
|
10214
9890
|
options,
|
10215
9891
|
disabled: props.disabled,
|
10216
9892
|
valid: props.valid,
|
10217
9893
|
labelWrapper: label
|
10218
|
-
})), /* @__PURE__ */
|
9894
|
+
})), /* @__PURE__ */ React55.createElement(HelperText, {
|
10219
9895
|
messageId: errorMessageId,
|
10220
9896
|
error: !labelProps.valid,
|
10221
9897
|
helperText: labelProps.helperText,
|
@@ -10224,7 +9900,7 @@ var Select2 = (_a) => {
|
|
10224
9900
|
reserveSpaceForError: labelProps.reserveSpaceForError
|
10225
9901
|
}));
|
10226
9902
|
};
|
10227
|
-
var SelectSkeleton = () => /* @__PURE__ */
|
9903
|
+
var SelectSkeleton = () => /* @__PURE__ */ React55.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React55.createElement(SelectBase.Skeleton, null));
|
10228
9904
|
Select2.Skeleton = SelectSkeleton;
|
10229
9905
|
Select2.Skeleton.displayName = "Select.Skeleton";
|
10230
9906
|
|
@@ -10243,26 +9919,26 @@ var Pagination = ({
|
|
10243
9919
|
pageSizes,
|
10244
9920
|
onPageSizeChange
|
10245
9921
|
}) => {
|
10246
|
-
const [value, setValue] =
|
10247
|
-
|
9922
|
+
const [value, setValue] = React56.useState(currentPage);
|
9923
|
+
React56.useEffect(() => {
|
10248
9924
|
setValue(currentPage);
|
10249
9925
|
}, [currentPage]);
|
10250
|
-
return /* @__PURE__ */
|
9926
|
+
return /* @__PURE__ */ React56.createElement(Box, {
|
10251
9927
|
className: classNames(
|
10252
9928
|
"Aquarium-Pagination",
|
10253
9929
|
tw({ "grid grid-cols-[200px_1fr_200px]": !!pageSizes, "flex flex-nowrap justify-center": !pageSizes })
|
10254
9930
|
),
|
10255
9931
|
backgroundColor: "grey-0",
|
10256
9932
|
padding: "4"
|
10257
|
-
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */
|
9933
|
+
}, pageSizes && onPageSizeChange && typeof pageSize === "number" ? /* @__PURE__ */ React56.createElement(Box, {
|
10258
9934
|
display: "flex",
|
10259
9935
|
alignItems: "center",
|
10260
9936
|
gap: "4"
|
10261
|
-
}, /* @__PURE__ */
|
9937
|
+
}, /* @__PURE__ */ React56.createElement(Typography2.Small, {
|
10262
9938
|
color: "grey-50"
|
10263
|
-
}, "Items per page "), /* @__PURE__ */
|
9939
|
+
}, "Items per page "), /* @__PURE__ */ React56.createElement("div", {
|
10264
9940
|
className: tw("max-w-[70px]")
|
10265
|
-
}, /* @__PURE__ */
|
9941
|
+
}, /* @__PURE__ */ React56.createElement(SelectBase, {
|
10266
9942
|
"aria-label": "Items per page",
|
10267
9943
|
options: pageSizes.map((size) => size.toString()),
|
10268
9944
|
value: pageSize.toString(),
|
@@ -10274,26 +9950,26 @@ var Pagination = ({
|
|
10274
9950
|
}
|
10275
9951
|
}
|
10276
9952
|
}
|
10277
|
-
}))) : /* @__PURE__ */
|
9953
|
+
}))) : /* @__PURE__ */ React56.createElement("div", null), /* @__PURE__ */ React56.createElement(Box, {
|
10278
9954
|
display: "flex",
|
10279
9955
|
justifyContent: "center",
|
10280
9956
|
alignItems: "center",
|
10281
9957
|
className: tw("grow")
|
10282
|
-
}, /* @__PURE__ */
|
9958
|
+
}, /* @__PURE__ */ React56.createElement(Button.Icon, {
|
10283
9959
|
"aria-label": "First",
|
10284
9960
|
onClick: () => onPageChange(1),
|
10285
9961
|
icon: import_chevronBackward2.default,
|
10286
9962
|
disabled: !hasPreviousPage
|
10287
|
-
}), /* @__PURE__ */
|
9963
|
+
}), /* @__PURE__ */ React56.createElement(Button.Icon, {
|
10288
9964
|
"aria-label": "Previous",
|
10289
9965
|
onClick: () => onPageChange(currentPage - 1),
|
10290
9966
|
icon: import_chevronLeft3.default,
|
10291
9967
|
disabled: !hasPreviousPage
|
10292
|
-
}), /* @__PURE__ */
|
9968
|
+
}), /* @__PURE__ */ React56.createElement(Box, {
|
10293
9969
|
paddingX: "4"
|
10294
|
-
}, /* @__PURE__ */
|
9970
|
+
}, /* @__PURE__ */ React56.createElement(Typography2.Small, {
|
10295
9971
|
color: "grey-60"
|
10296
|
-
}, "Page")), /* @__PURE__ */
|
9972
|
+
}, "Page")), /* @__PURE__ */ React56.createElement(InputBase, {
|
10297
9973
|
"aria-label": "Page",
|
10298
9974
|
className: classNames(tw("text-center max-w-[40px]"), "no-arrows"),
|
10299
9975
|
type: "number",
|
@@ -10311,21 +9987,21 @@ var Pagination = ({
|
|
10311
9987
|
const newPage = !isNaN(numberValue) ? clamp(numberValue, 1, totalPages) : 1;
|
10312
9988
|
onPageChange(newPage);
|
10313
9989
|
}
|
10314
|
-
}), /* @__PURE__ */
|
9990
|
+
}), /* @__PURE__ */ React56.createElement(Box, {
|
10315
9991
|
paddingX: "4"
|
10316
|
-
}, /* @__PURE__ */
|
9992
|
+
}, /* @__PURE__ */ React56.createElement(Typography2.Small, {
|
10317
9993
|
color: "grey-60"
|
10318
|
-
}, "of ", totalPages)), /* @__PURE__ */
|
9994
|
+
}, "of ", totalPages)), /* @__PURE__ */ React56.createElement(Button.Icon, {
|
10319
9995
|
"aria-label": "Next",
|
10320
9996
|
onClick: () => onPageChange(currentPage + 1),
|
10321
9997
|
icon: import_chevronRight3.default,
|
10322
9998
|
disabled: !hasNextPage
|
10323
|
-
}), /* @__PURE__ */
|
9999
|
+
}), /* @__PURE__ */ React56.createElement(Button.Icon, {
|
10324
10000
|
"aria-label": "Last",
|
10325
10001
|
onClick: () => onPageChange(totalPages),
|
10326
10002
|
icon: import_chevronForward2.default,
|
10327
10003
|
disabled: !hasNextPage
|
10328
|
-
})), pageSizes && /* @__PURE__ */
|
10004
|
+
})), pageSizes && /* @__PURE__ */ React56.createElement("div", null));
|
10329
10005
|
};
|
10330
10006
|
|
10331
10007
|
// src/molecules/Pagination/usePagination.tsx
|
@@ -10366,7 +10042,7 @@ var usePagination = (items, options) => {
|
|
10366
10042
|
};
|
10367
10043
|
|
10368
10044
|
// src/utils/useInView.ts
|
10369
|
-
import
|
10045
|
+
import React57 from "react";
|
10370
10046
|
var useInView = ({
|
10371
10047
|
onChange,
|
10372
10048
|
skip,
|
@@ -10374,12 +10050,12 @@ var useInView = ({
|
|
10374
10050
|
rootMargin,
|
10375
10051
|
threshold = 0
|
10376
10052
|
}) => {
|
10377
|
-
const ref =
|
10378
|
-
const [state, setState] =
|
10053
|
+
const ref = React57.useRef(null);
|
10054
|
+
const [state, setState] = React57.useState({
|
10379
10055
|
inView: false,
|
10380
10056
|
entry: void 0
|
10381
10057
|
});
|
10382
|
-
|
10058
|
+
React57.useEffect(() => {
|
10383
10059
|
const target = ref.current;
|
10384
10060
|
if (skip || !target) {
|
10385
10061
|
return;
|
@@ -10411,12 +10087,12 @@ var useInView = ({
|
|
10411
10087
|
|
10412
10088
|
// src/molecules/List/List.tsx
|
10413
10089
|
var import_loading3 = __toESM(require_loading());
|
10414
|
-
var
|
10090
|
+
var List = (_a) => {
|
10415
10091
|
var _b = _a, {
|
10416
10092
|
items,
|
10417
10093
|
renderItem,
|
10418
|
-
container =
|
10419
|
-
paginationContainer =
|
10094
|
+
container = React58.Fragment,
|
10095
|
+
paginationContainer = React58.Fragment,
|
10420
10096
|
pagination,
|
10421
10097
|
loadingIndicator = "Loading more items",
|
10422
10098
|
hasMore,
|
@@ -10436,7 +10112,7 @@ var List2 = (_a) => {
|
|
10436
10112
|
const Component = container;
|
10437
10113
|
const PaginationComponent = paginationContainer;
|
10438
10114
|
const paginationProps = isObject(pagination) ? pagination : void 0;
|
10439
|
-
const onChange =
|
10115
|
+
const onChange = React58.useCallback(
|
10440
10116
|
(inView) => {
|
10441
10117
|
if (inView && hasMore && !isLoading) {
|
10442
10118
|
next();
|
@@ -10454,7 +10130,7 @@ var List2 = (_a) => {
|
|
10454
10130
|
const listItems = pagination ? paginatedItems : items;
|
10455
10131
|
const showLoader = isInfinite && hasMore;
|
10456
10132
|
const showPagination = pagination || showLoader;
|
10457
|
-
return /* @__PURE__ */
|
10133
|
+
return /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Component, null, listItems.map(renderItem)), showPagination && /* @__PURE__ */ React58.createElement(PaginationComponent, null, showLoader && /* @__PURE__ */ React58.createElement("div", {
|
10458
10134
|
ref,
|
10459
10135
|
"aria-hidden": !isLoading,
|
10460
10136
|
"aria-busy": isLoading,
|
@@ -10463,17 +10139,17 @@ var List2 = (_a) => {
|
|
10463
10139
|
"flex gap-4 py-3 justify-center items-center transition-opacity duration-200",
|
10464
10140
|
isLoading ? "opacity-100" : "opacity-0"
|
10465
10141
|
)
|
10466
|
-
}, /* @__PURE__ */
|
10142
|
+
}, /* @__PURE__ */ React58.createElement(Icon, {
|
10467
10143
|
width: 22,
|
10468
10144
|
icon: import_loading3.default,
|
10469
10145
|
className: tw("text-grey-50")
|
10470
|
-
}), /* @__PURE__ */
|
10146
|
+
}), /* @__PURE__ */ React58.createElement(Typography2.Small, {
|
10471
10147
|
color: "grey-70"
|
10472
|
-
}, loadingIndicator)), pagination && /* @__PURE__ */
|
10148
|
+
}, loadingIndicator)), pagination && /* @__PURE__ */ React58.createElement(Pagination, __spreadValues(__spreadValues({}, paginationState), paginationProps))));
|
10473
10149
|
};
|
10474
10150
|
|
10475
10151
|
// src/molecules/Template/Template.tsx
|
10476
|
-
import
|
10152
|
+
import React59 from "react";
|
10477
10153
|
var Template = (_a) => {
|
10478
10154
|
var _b = _a, {
|
10479
10155
|
columns,
|
@@ -10488,31 +10164,42 @@ var Template = (_a) => {
|
|
10488
10164
|
"fullHeight",
|
10489
10165
|
"style"
|
10490
10166
|
]);
|
10491
|
-
const gridTemplateColumns = typeof columns === "number" ? "1fr ".repeat(columns) : columns.map((column) =>
|
10167
|
+
const gridTemplateColumns = typeof columns === "number" ? "1fr ".repeat(columns) : columns.map((column) => {
|
10168
|
+
if (typeof column === "number") {
|
10169
|
+
return `${column}px`;
|
10170
|
+
}
|
10171
|
+
if (column === "auto") {
|
10172
|
+
return column;
|
10173
|
+
}
|
10174
|
+
if (column.startsWith("fit-content")) {
|
10175
|
+
return column;
|
10176
|
+
}
|
10177
|
+
return `${column}fr`;
|
10178
|
+
}).join(" ");
|
10492
10179
|
const styles = useStyle({
|
10493
10180
|
height: fullHeight ? "100%" : void 0,
|
10494
10181
|
gridTemplateColumns,
|
10495
10182
|
rowGap,
|
10496
10183
|
columnGap
|
10497
10184
|
});
|
10498
|
-
return /* @__PURE__ */
|
10185
|
+
return /* @__PURE__ */ React59.createElement(Box, __spreadProps(__spreadValues({}, props), {
|
10499
10186
|
display: "grid",
|
10500
10187
|
style: __spreadValues(__spreadValues({}, styles), style)
|
10501
10188
|
}));
|
10502
10189
|
};
|
10503
10190
|
|
10504
10191
|
// src/atoms/DataList/DataList.tsx
|
10505
|
-
import
|
10192
|
+
import React62 from "react";
|
10506
10193
|
|
10507
10194
|
// src/atoms/Table/Table.tsx
|
10508
|
-
import
|
10195
|
+
import React61 from "react";
|
10509
10196
|
|
10510
10197
|
// src/atoms/RadioButton/RadioButton.tsx
|
10511
|
-
import
|
10512
|
-
var RadioButton =
|
10198
|
+
import React60 from "react";
|
10199
|
+
var RadioButton = React60.forwardRef(
|
10513
10200
|
(_a, ref) => {
|
10514
10201
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
10515
|
-
return /* @__PURE__ */
|
10202
|
+
return /* @__PURE__ */ React60.createElement("input", __spreadProps(__spreadValues({
|
10516
10203
|
id,
|
10517
10204
|
ref,
|
10518
10205
|
type: "radio",
|
@@ -10538,29 +10225,29 @@ var RadioButton = React62.forwardRef(
|
|
10538
10225
|
// src/atoms/Table/Table.tsx
|
10539
10226
|
var import_chevronDown4 = __toESM(require_chevronDown());
|
10540
10227
|
var import_chevronUp3 = __toESM(require_chevronUp());
|
10541
|
-
var HeadContext =
|
10228
|
+
var HeadContext = React61.createContext(null);
|
10542
10229
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
10543
10230
|
var Table = (_a) => {
|
10544
10231
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
10545
|
-
return /* @__PURE__ */
|
10232
|
+
return /* @__PURE__ */ React61.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
10546
10233
|
className: classNames(tableClassNames, className),
|
10547
10234
|
"aria-label": ariaLabel
|
10548
10235
|
}), children);
|
10549
10236
|
};
|
10550
10237
|
var TableHead = (_a) => {
|
10551
10238
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
10552
|
-
return /* @__PURE__ */
|
10239
|
+
return /* @__PURE__ */ React61.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React61.createElement("tr", null, /* @__PURE__ */ React61.createElement(HeadContext.Provider, {
|
10553
10240
|
value: { children, sticky }
|
10554
10241
|
}, children)));
|
10555
10242
|
};
|
10556
10243
|
var TableBody = (_a) => {
|
10557
10244
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
10558
|
-
return /* @__PURE__ */
|
10245
|
+
return /* @__PURE__ */ React61.createElement("tbody", __spreadValues({}, rest), children);
|
10559
10246
|
};
|
10560
10247
|
var rowClassNames = tw("children:border-grey-10 group children:last:border-b-0 hover:bg-grey-0");
|
10561
10248
|
var TableRow = (_a) => {
|
10562
10249
|
var _b = _a, { children, className, disabled } = _b, rest = __objRest(_b, ["children", "className", "disabled"]);
|
10563
|
-
return /* @__PURE__ */
|
10250
|
+
return /* @__PURE__ */ React61.createElement("tr", __spreadProps(__spreadValues(__spreadValues({}, rest), { inert: disabled ? "" : void 0 }), {
|
10564
10251
|
className: classNames(rowClassNames, className, {
|
10565
10252
|
"opacity-70": disabled
|
10566
10253
|
})
|
@@ -10589,15 +10276,15 @@ var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
|
10589
10276
|
};
|
10590
10277
|
var TableCell = (_a) => {
|
10591
10278
|
var _b = _a, { children, className, stickyColumn, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "stickyColumn", "align"]);
|
10592
|
-
const headContext =
|
10593
|
-
return headContext ? /* @__PURE__ */
|
10279
|
+
const headContext = React61.useContext(HeadContext);
|
10280
|
+
return headContext ? /* @__PURE__ */ React61.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
10594
10281
|
className: classNames(
|
10595
10282
|
cellClassNames,
|
10596
10283
|
getHeadCellClassNames(headContext.sticky, stickyColumn),
|
10597
10284
|
getAlignClassNames(align),
|
10598
10285
|
className
|
10599
10286
|
)
|
10600
|
-
}), children) : /* @__PURE__ */
|
10287
|
+
}), children) : /* @__PURE__ */ React61.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
10601
10288
|
className: classNames(
|
10602
10289
|
cellClassNames,
|
10603
10290
|
getBodyCellClassNames(true, stickyColumn),
|
@@ -10608,11 +10295,11 @@ var TableCell = (_a) => {
|
|
10608
10295
|
};
|
10609
10296
|
var TableSelectCell = (_a) => {
|
10610
10297
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
10611
|
-
return /* @__PURE__ */
|
10298
|
+
return /* @__PURE__ */ React61.createElement(Table.Cell, {
|
10612
10299
|
className: tw("leading-[0px]")
|
10613
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
10300
|
+
}, props.type === "radio" ? /* @__PURE__ */ React61.createElement(RadioButton, __spreadValues({
|
10614
10301
|
"aria-label": ariaLabel
|
10615
|
-
}, props)) : /* @__PURE__ */
|
10302
|
+
}, props)) : /* @__PURE__ */ React61.createElement(Checkbox, __spreadValues({
|
10616
10303
|
"aria-label": ariaLabel
|
10617
10304
|
}, props)));
|
10618
10305
|
};
|
@@ -10622,42 +10309,42 @@ var getSortCellIconClassNames = (active) => {
|
|
10622
10309
|
};
|
10623
10310
|
var TableSortCell = (_a) => {
|
10624
10311
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
10625
|
-
return /* @__PURE__ */
|
10312
|
+
return /* @__PURE__ */ React61.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
10626
10313
|
"aria-sort": direction
|
10627
|
-
}), /* @__PURE__ */
|
10314
|
+
}), /* @__PURE__ */ React61.createElement("span", {
|
10628
10315
|
className: getSortCellButtonClassNames(rest.align),
|
10629
10316
|
role: "button",
|
10630
10317
|
tabIndex: -1,
|
10631
10318
|
onClick
|
10632
|
-
}, children, /* @__PURE__ */
|
10319
|
+
}, children, /* @__PURE__ */ React61.createElement("div", {
|
10633
10320
|
"data-sort-icons": true,
|
10634
10321
|
className: tw("flex flex-col", {
|
10635
10322
|
"invisible group-hover:visible": direction === "none"
|
10636
10323
|
})
|
10637
|
-
}, /* @__PURE__ */
|
10324
|
+
}, /* @__PURE__ */ React61.createElement(InlineIcon, {
|
10638
10325
|
icon: import_chevronUp3.default,
|
10639
10326
|
className: getSortCellIconClassNames(direction === "ascending")
|
10640
|
-
}), /* @__PURE__ */
|
10327
|
+
}), /* @__PURE__ */ React61.createElement(InlineIcon, {
|
10641
10328
|
icon: import_chevronDown4.default,
|
10642
10329
|
className: getSortCellIconClassNames(direction === "descending")
|
10643
10330
|
}))));
|
10644
10331
|
};
|
10645
|
-
var Caption = ({ children }) => /* @__PURE__ */
|
10332
|
+
var Caption = ({ children }) => /* @__PURE__ */ React61.createElement(Typography2.Caption, {
|
10646
10333
|
htmlTag: "caption"
|
10647
10334
|
}, children);
|
10648
|
-
var
|
10335
|
+
var Item2 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React61.createElement("div", {
|
10649
10336
|
className: tw("flex gap-4 items-center")
|
10650
|
-
}, image && /* @__PURE__ */
|
10337
|
+
}, image && /* @__PURE__ */ React61.createElement("img", {
|
10651
10338
|
src: image,
|
10652
10339
|
alt: imageAlt != null ? imageAlt : "",
|
10653
10340
|
style: { width: imageSize, height: imageSize }
|
10654
|
-
}), /* @__PURE__ */
|
10655
|
-
Table.Head =
|
10656
|
-
Table.Body =
|
10657
|
-
Table.Row =
|
10658
|
-
Table.Cell =
|
10659
|
-
Table.SortCell =
|
10660
|
-
Table.SelectCell =
|
10341
|
+
}), /* @__PURE__ */ React61.createElement("div", null, title, caption && /* @__PURE__ */ React61.createElement(Typography2.Caption, null, caption)));
|
10342
|
+
Table.Head = React61.memo(TableHead);
|
10343
|
+
Table.Body = React61.memo(TableBody);
|
10344
|
+
Table.Row = React61.memo(TableRow);
|
10345
|
+
Table.Cell = React61.memo(TableCell);
|
10346
|
+
Table.SortCell = React61.memo(TableSortCell);
|
10347
|
+
Table.SelectCell = React61.memo(TableSelectCell);
|
10661
10348
|
Table.Caption = Caption;
|
10662
10349
|
|
10663
10350
|
// src/atoms/DataList/DataList.tsx
|
@@ -10670,7 +10357,7 @@ var getAlignClassNames2 = (align) => tw("flex items-center", {
|
|
10670
10357
|
});
|
10671
10358
|
var DataList = (_a) => {
|
10672
10359
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
10673
|
-
return /* @__PURE__ */
|
10360
|
+
return /* @__PURE__ */ React62.createElement("div", __spreadValues({}, rest));
|
10674
10361
|
};
|
10675
10362
|
var HeadCell = (_a) => {
|
10676
10363
|
var _b = _a, {
|
@@ -10684,8 +10371,8 @@ var HeadCell = (_a) => {
|
|
10684
10371
|
"align",
|
10685
10372
|
"stickyColumn"
|
10686
10373
|
]);
|
10687
|
-
return /* @__PURE__ */
|
10688
|
-
role: "
|
10374
|
+
return /* @__PURE__ */ React62.createElement("div", __spreadProps(__spreadValues({
|
10375
|
+
role: "columnheader"
|
10689
10376
|
}, rest), {
|
10690
10377
|
className: classNames(
|
10691
10378
|
cellClassNames,
|
@@ -10705,32 +10392,44 @@ var Cell = (_a) => {
|
|
10705
10392
|
"align",
|
10706
10393
|
"stickyColumn"
|
10707
10394
|
]);
|
10708
|
-
return /* @__PURE__ */
|
10395
|
+
return /* @__PURE__ */ React62.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
10709
10396
|
role: "cell",
|
10710
10397
|
className: classNames(
|
10711
10398
|
cellClassNames,
|
10712
10399
|
getBodyCellClassNames(false, stickyColumn),
|
10713
10400
|
getAlignClassNames2(align),
|
10714
|
-
tw("border-grey-10 group-
|
10401
|
+
tw("border-grey-10 group-last-of-type:border-b-0"),
|
10715
10402
|
className
|
10716
10403
|
)
|
10717
10404
|
}));
|
10718
10405
|
};
|
10719
10406
|
var Row = (_a) => {
|
10720
|
-
var _b = _a, {
|
10721
|
-
|
10722
|
-
|
10407
|
+
var _b = _a, {
|
10408
|
+
className,
|
10409
|
+
disabled,
|
10410
|
+
header,
|
10411
|
+
subgroup,
|
10412
|
+
active
|
10413
|
+
} = _b, rest = __objRest(_b, [
|
10414
|
+
"className",
|
10415
|
+
"disabled",
|
10416
|
+
"header",
|
10417
|
+
"subgroup",
|
10418
|
+
"active"
|
10419
|
+
]);
|
10420
|
+
return /* @__PURE__ */ React62.createElement("div", __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, rest), {
|
10421
|
+
role: subgroup ? "rowgroup" : "row"
|
10422
|
+
}), { inert: disabled ? "" : void 0 }), {
|
10723
10423
|
className: classNames(tw("contents"), className, {
|
10724
10424
|
"children:opacity-70": disabled,
|
10725
|
-
"[
|
10726
|
-
"
|
10727
|
-
})
|
10728
|
-
role: !subgroup ? "row" : void 0
|
10425
|
+
"[&>*]:bg-primary-5": active,
|
10426
|
+
"[&>*]:hover:bg-grey-0": !disabled && !header
|
10427
|
+
})
|
10729
10428
|
}));
|
10730
10429
|
};
|
10731
10430
|
var SubGroupSpacing = (_a) => {
|
10732
10431
|
var _b = _a, { className, divider } = _b, rest = __objRest(_b, ["className", "divider"]);
|
10733
|
-
return /* @__PURE__ */
|
10432
|
+
return /* @__PURE__ */ React62.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
10734
10433
|
"aria-hidden": true,
|
10735
10434
|
className: classNames(
|
10736
10435
|
tw("col-span-full h-6 bg-grey-0 border-grey-10", { "border-b": Boolean(divider) }),
|
@@ -10740,24 +10439,24 @@ var SubGroupSpacing = (_a) => {
|
|
10740
10439
|
};
|
10741
10440
|
var SortCell = (_a) => {
|
10742
10441
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
10743
|
-
return /* @__PURE__ */
|
10442
|
+
return /* @__PURE__ */ React62.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
10744
10443
|
"aria-sort": direction,
|
10745
10444
|
role: "columnheader",
|
10746
10445
|
sticky
|
10747
|
-
}), /* @__PURE__ */
|
10446
|
+
}), /* @__PURE__ */ React62.createElement("span", {
|
10748
10447
|
className: getSortCellButtonClassNames(rest.align),
|
10749
10448
|
role: "button",
|
10750
10449
|
tabIndex: -1,
|
10751
10450
|
onClick
|
10752
|
-
}, children, /* @__PURE__ */
|
10451
|
+
}, children, /* @__PURE__ */ React62.createElement("div", {
|
10753
10452
|
"data-sort-icons": true,
|
10754
10453
|
className: tw("flex flex-col", {
|
10755
10454
|
"invisible group-hover:visible": direction === "none"
|
10756
10455
|
})
|
10757
|
-
}, /* @__PURE__ */
|
10456
|
+
}, /* @__PURE__ */ React62.createElement(InlineIcon, {
|
10758
10457
|
icon: import_chevronUp4.default,
|
10759
10458
|
className: getSortCellIconClassNames(direction === "ascending")
|
10760
|
-
}), /* @__PURE__ */
|
10459
|
+
}), /* @__PURE__ */ React62.createElement(InlineIcon, {
|
10761
10460
|
icon: import_chevronDown5.default,
|
10762
10461
|
className: getSortCellIconClassNames(direction === "descending")
|
10763
10462
|
}))));
|
@@ -10773,17 +10472,14 @@ DataList.SubGroupSpacing.displayName = "DataList.SubGroupSpacing";
|
|
10773
10472
|
DataList.Row = Row;
|
10774
10473
|
DataList.Row.displayName = "DataList.Row";
|
10775
10474
|
|
10776
|
-
// src/utils/object.ts
|
10777
|
-
var renameProperty = (oldProp, newProp, _a) => {
|
10778
|
-
var _b = _a, { [oldProp]: oldValue } = _b, rest = __objRest(_b, [__restKey(oldProp)]);
|
10779
|
-
return __spreadValues({
|
10780
|
-
[newProp]: oldValue
|
10781
|
-
}, rest);
|
10782
|
-
};
|
10783
|
-
|
10784
10475
|
// src/utils/table/types.ts
|
10476
|
+
import isArray2 from "lodash/isArray";
|
10477
|
+
var areRowsGrouped = (rows) => {
|
10478
|
+
return !isArray2(rows);
|
10479
|
+
};
|
10785
10480
|
var toSortDirection = (direction) => direction === "ascending" ? "asc" : direction === "descending" ? "desc" : false;
|
10786
10481
|
var cellProps = (column) => {
|
10482
|
+
var _a;
|
10787
10483
|
let align;
|
10788
10484
|
switch (column.type) {
|
10789
10485
|
case "action":
|
@@ -10800,7 +10496,7 @@ var cellProps = (column) => {
|
|
10800
10496
|
}
|
10801
10497
|
}
|
10802
10498
|
return {
|
10803
|
-
key: column.key
|
10499
|
+
key: (_a = column.key) != null ? _a : column.headerName,
|
10804
10500
|
align,
|
10805
10501
|
stickyColumn: column.sticky
|
10806
10502
|
};
|
@@ -10811,11 +10507,11 @@ function isOnSortChangedDirection(value) {
|
|
10811
10507
|
}
|
10812
10508
|
|
10813
10509
|
// src/utils/table/useTableSort.tsx
|
10814
|
-
import
|
10510
|
+
import React63 from "react";
|
10815
10511
|
var getDefaultSort = (props) => "defaultSort" in props ? props.defaultSort : "column" in props && "direction" in props && Object.keys(props).length === 2 ? { column: props.column, direction: props.direction } : void 0;
|
10816
10512
|
var useTableSort = (props) => {
|
10817
10513
|
const onSortChanged = props && "onSortChanged" in props ? props.onSortChanged : void 0;
|
10818
|
-
const [sort, setSort] =
|
10514
|
+
const [sort, setSort] = React63.useState(props && getDefaultSort(props));
|
10819
10515
|
const setSortAndEmitOnSortChangedEvent = (sort2) => {
|
10820
10516
|
setSort(sort2);
|
10821
10517
|
if (onSortChanged) {
|
@@ -10825,60 +10521,616 @@ var useTableSort = (props) => {
|
|
10825
10521
|
onSortChanged(null);
|
10826
10522
|
}
|
10827
10523
|
}
|
10828
|
-
};
|
10829
|
-
const handleSortClick = (column) => {
|
10830
|
-
if (sort && sort.column.headerName === column.headerName) {
|
10831
|
-
if (sort.direction === "ascending") {
|
10832
|
-
setSortAndEmitOnSortChangedEvent({ column, direction: "descending" });
|
10524
|
+
};
|
10525
|
+
const handleSortClick = (column) => {
|
10526
|
+
if (sort && sort.column.headerName === column.headerName) {
|
10527
|
+
if (sort.direction === "ascending") {
|
10528
|
+
setSortAndEmitOnSortChangedEvent({ column, direction: "descending" });
|
10529
|
+
} else {
|
10530
|
+
setSortAndEmitOnSortChangedEvent(void 0);
|
10531
|
+
}
|
10532
|
+
} else {
|
10533
|
+
setSortAndEmitOnSortChangedEvent({ column, direction: "ascending" });
|
10534
|
+
}
|
10535
|
+
};
|
10536
|
+
return [sort, handleSortClick];
|
10537
|
+
};
|
10538
|
+
|
10539
|
+
// src/utils/table/utils.ts
|
10540
|
+
import orderBy2 from "lodash/orderBy";
|
10541
|
+
var sortRowsBy = (rows, sort) => {
|
10542
|
+
if (!sort) {
|
10543
|
+
return rows;
|
10544
|
+
}
|
10545
|
+
const sortFunction = sort.column.sort;
|
10546
|
+
if (sortFunction) {
|
10547
|
+
return [...rows].sort((a, b) => sortFunction(a, b, sort.direction));
|
10548
|
+
} else if (columnIsFieldColumn(sort.column)) {
|
10549
|
+
return orderBy2(rows, [sort.column.field], [toSortDirection(sort.direction)]);
|
10550
|
+
}
|
10551
|
+
return rows;
|
10552
|
+
};
|
10553
|
+
|
10554
|
+
// src/molecules/DataList/DataListComponents.tsx
|
10555
|
+
import React66 from "react";
|
10556
|
+
import isFunction from "lodash/isFunction";
|
10557
|
+
|
10558
|
+
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
10559
|
+
import React65 from "react";
|
10560
|
+
import { useFilter } from "@react-aria/i18n";
|
10561
|
+
import { PressResponder, usePress } from "@react-aria/interactions";
|
10562
|
+
import { useMenu, useMenuItem, useMenuSection, useMenuTrigger } from "@react-aria/menu";
|
10563
|
+
import { useSeparator } from "@react-aria/separator";
|
10564
|
+
import { mergeProps as mergeProps2 } from "@react-aria/utils";
|
10565
|
+
import { Item as Item4, Section } from "@react-stately/collections";
|
10566
|
+
import { useMenuTriggerState } from "@react-stately/menu";
|
10567
|
+
import { useTreeState } from "@react-stately/tree";
|
10568
|
+
import omit7 from "lodash/omit";
|
10569
|
+
|
10570
|
+
// src/atoms/DropdownMenu/DropdownMenu.tsx
|
10571
|
+
import React64 from "react";
|
10572
|
+
var import_tick5 = __toESM(require_tick());
|
10573
|
+
var DropdownMenu = React64.forwardRef(
|
10574
|
+
(_a, ref) => {
|
10575
|
+
var _b = _a, { minHeight, maxHeight = "100%", minWidth = "125px", maxWidth, className, children } = _b, props = __objRest(_b, ["minHeight", "maxHeight", "minWidth", "maxWidth", "className", "children"]);
|
10576
|
+
return /* @__PURE__ */ React64.createElement("div", __spreadValues({
|
10577
|
+
ref,
|
10578
|
+
style: { minHeight, maxHeight, minWidth, maxWidth },
|
10579
|
+
className: classNames(className, "bg-white w-full flex flex-col overflow-x-hidden typography-small text-grey-70")
|
10580
|
+
}, props), children);
|
10581
|
+
}
|
10582
|
+
);
|
10583
|
+
var ContentContainer = ({ children }) => /* @__PURE__ */ React64.createElement("div", {
|
10584
|
+
className: tw("p-3 overflow-y-auto overflow-x-hidden")
|
10585
|
+
}, children);
|
10586
|
+
DropdownMenu.ContentContainer = ContentContainer;
|
10587
|
+
var List2 = React64.forwardRef(
|
10588
|
+
(_a, ref) => {
|
10589
|
+
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
10590
|
+
return /* @__PURE__ */ React64.createElement("ul", __spreadValues({
|
10591
|
+
ref,
|
10592
|
+
className: classNames(className, "outline-none ring-0")
|
10593
|
+
}, props), children);
|
10594
|
+
}
|
10595
|
+
);
|
10596
|
+
DropdownMenu.List = List2;
|
10597
|
+
var Group2 = React64.forwardRef(
|
10598
|
+
(_a, ref) => {
|
10599
|
+
var _b = _a, { className, title, titleProps, children } = _b, props = __objRest(_b, ["className", "title", "titleProps", "children"]);
|
10600
|
+
return /* @__PURE__ */ React64.createElement("li", __spreadValues({
|
10601
|
+
ref
|
10602
|
+
}, props), title && /* @__PURE__ */ React64.createElement("div", __spreadValues({
|
10603
|
+
className: classNames(className, "p-3 text-grey-40 uppercase cursor-default typography-caption", {
|
10604
|
+
"text-grey-20": props.disabled
|
10605
|
+
})
|
10606
|
+
}, titleProps), title), children);
|
10607
|
+
}
|
10608
|
+
);
|
10609
|
+
DropdownMenu.Group = Group2;
|
10610
|
+
var Item3 = React64.forwardRef(
|
10611
|
+
(_a, ref) => {
|
10612
|
+
var _b = _a, { kind, highlighted, selected, className, icon, showNotification = false, children } = _b, props = __objRest(_b, ["kind", "highlighted", "selected", "className", "icon", "showNotification", "children"]);
|
10613
|
+
return /* @__PURE__ */ React64.createElement("li", __spreadValues({
|
10614
|
+
ref,
|
10615
|
+
className: classNames(className, "flex items-center gap-x-3 p-3 outline-none", {
|
10616
|
+
"cursor-pointer hover:bg-grey-0": !props.disabled,
|
10617
|
+
"bg-grey-0": highlighted,
|
10618
|
+
"text-primary-80": kind === "action",
|
10619
|
+
"text-grey-20 cursor-not-allowed": props.disabled
|
10620
|
+
})
|
10621
|
+
}, props), icon && showNotification && /* @__PURE__ */ React64.createElement(Badge.Notification, null, /* @__PURE__ */ React64.createElement(InlineIcon, {
|
10622
|
+
icon
|
10623
|
+
})), icon && !showNotification && /* @__PURE__ */ React64.createElement(InlineIcon, {
|
10624
|
+
icon
|
10625
|
+
}), /* @__PURE__ */ React64.createElement("span", {
|
10626
|
+
className: tw("grow")
|
10627
|
+
}, children), selected && /* @__PURE__ */ React64.createElement(InlineIcon, {
|
10628
|
+
icon: import_tick5.default
|
10629
|
+
}));
|
10630
|
+
}
|
10631
|
+
);
|
10632
|
+
DropdownMenu.Item = Item3;
|
10633
|
+
var Description = ({ disabled, children }) => /* @__PURE__ */ React64.createElement(Typography2.Caption, {
|
10634
|
+
color: disabled ? "grey-20" : "grey-40"
|
10635
|
+
}, children);
|
10636
|
+
DropdownMenu.Description = Description;
|
10637
|
+
var Separator = (_a) => {
|
10638
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
10639
|
+
return /* @__PURE__ */ React64.createElement("li", __spreadProps(__spreadValues({}, props), {
|
10640
|
+
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
10641
|
+
}));
|
10642
|
+
};
|
10643
|
+
DropdownMenu.Separator = Separator;
|
10644
|
+
var EmptyStateContainer2 = (_a) => {
|
10645
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
10646
|
+
return /* @__PURE__ */ React64.createElement("div", __spreadValues({
|
10647
|
+
className: classNames(tw("border border-dashed border-grey-10 p-3"), className)
|
10648
|
+
}, props), children);
|
10649
|
+
};
|
10650
|
+
DropdownMenu.EmptyStateContainer = EmptyStateContainer2;
|
10651
|
+
|
10652
|
+
// src/molecules/DropdownMenu/utils.ts
|
10653
|
+
import { ListCollection } from "@react-stately/list";
|
10654
|
+
var filterCollection = (collection, inputValue, filter) => {
|
10655
|
+
return new ListCollection(filterNodes(collection, inputValue, filter));
|
10656
|
+
};
|
10657
|
+
var filterNodes = (nodes, inputValue, filter) => {
|
10658
|
+
const filteredNode = [];
|
10659
|
+
for (const node of nodes) {
|
10660
|
+
const description = Object.hasOwn(node.props, "description") && typeof node.props.description === "string" ? node.props.description : void 0;
|
10661
|
+
if (node.type === "section" && node.hasChildNodes) {
|
10662
|
+
const filtered = filterNodes(node.childNodes, inputValue, filter);
|
10663
|
+
if ([...filtered].length > 0) {
|
10664
|
+
filteredNode.push(__spreadProps(__spreadValues({}, node), { childNodes: filtered }));
|
10665
|
+
}
|
10666
|
+
} else if (node.type !== "section" && (filter(node.textValue, inputValue) || description && filter(description, inputValue))) {
|
10667
|
+
filteredNode.push(__spreadValues({}, node));
|
10668
|
+
}
|
10669
|
+
}
|
10670
|
+
return filteredNode;
|
10671
|
+
};
|
10672
|
+
|
10673
|
+
// src/molecules/DropdownMenu/DropdownMenu.tsx
|
10674
|
+
var DropdownMenu2 = (_a) => {
|
10675
|
+
var _b = _a, {
|
10676
|
+
onAction,
|
10677
|
+
selectionMode,
|
10678
|
+
selection,
|
10679
|
+
onSelectionChange,
|
10680
|
+
placement = "bottom-left",
|
10681
|
+
minWidth,
|
10682
|
+
maxWidth,
|
10683
|
+
minHeight,
|
10684
|
+
maxHeight,
|
10685
|
+
searchable = false,
|
10686
|
+
emptyState,
|
10687
|
+
header,
|
10688
|
+
footer,
|
10689
|
+
children
|
10690
|
+
} = _b, props = __objRest(_b, [
|
10691
|
+
"onAction",
|
10692
|
+
"selectionMode",
|
10693
|
+
"selection",
|
10694
|
+
"onSelectionChange",
|
10695
|
+
"placement",
|
10696
|
+
"minWidth",
|
10697
|
+
"maxWidth",
|
10698
|
+
"minHeight",
|
10699
|
+
"maxHeight",
|
10700
|
+
"searchable",
|
10701
|
+
"emptyState",
|
10702
|
+
"header",
|
10703
|
+
"footer",
|
10704
|
+
"children"
|
10705
|
+
]);
|
10706
|
+
const triggerRef = React65.useRef(null);
|
10707
|
+
const [trigger, items] = extractTriggerAndItems(children);
|
10708
|
+
const state = useMenuTriggerState(props);
|
10709
|
+
const { menuTriggerProps, menuProps } = useMenuTrigger({}, state, triggerRef);
|
10710
|
+
return /* @__PURE__ */ React65.createElement("div", null, /* @__PURE__ */ React65.createElement(PressResponder, __spreadValues({
|
10711
|
+
ref: triggerRef,
|
10712
|
+
onPress: () => state.toggle()
|
10713
|
+
}, omit7(menuTriggerProps, ["id", "aria-expanded"])), /* @__PURE__ */ React65.createElement(TriggerWrapper, {
|
10714
|
+
"aria-expanded": menuTriggerProps["aria-expanded"]
|
10715
|
+
}, trigger.props.children)), state.isOpen && /* @__PURE__ */ React65.createElement(PopoverOverlay, {
|
10716
|
+
className: "Aquarium-DropdownMenu",
|
10717
|
+
triggerRef,
|
10718
|
+
state,
|
10719
|
+
placement,
|
10720
|
+
focusable: false
|
10721
|
+
}, /* @__PURE__ */ React65.createElement(MenuWrapper, __spreadValues({
|
10722
|
+
onAction,
|
10723
|
+
selectionMode,
|
10724
|
+
selection,
|
10725
|
+
onSelectionChange,
|
10726
|
+
searchable,
|
10727
|
+
emptyState,
|
10728
|
+
minWidth,
|
10729
|
+
maxWidth,
|
10730
|
+
maxHeight,
|
10731
|
+
minHeight,
|
10732
|
+
header,
|
10733
|
+
footer
|
10734
|
+
}, menuProps), items.props.children)));
|
10735
|
+
};
|
10736
|
+
DropdownMenu2.displayName = "DropdownMenu";
|
10737
|
+
var MenuTrigger = () => null;
|
10738
|
+
var MenuItems = () => null;
|
10739
|
+
DropdownMenu2.Trigger = MenuTrigger;
|
10740
|
+
DropdownMenu2.Trigger.displayName = "DropdownMenu.Trigger";
|
10741
|
+
DropdownMenu2.Items = MenuItems;
|
10742
|
+
DropdownMenu2.Items.displayName = "DropdownMenu.Items";
|
10743
|
+
DropdownMenu2.Item = Item4;
|
10744
|
+
DropdownMenu2.Item.displayName = "DropdownMenu.Item";
|
10745
|
+
DropdownMenu2.Section = Section;
|
10746
|
+
DropdownMenu2.Section.displayName = "DropdownMenu.Section";
|
10747
|
+
var TriggerWrapper = (_a) => {
|
10748
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
10749
|
+
const ref = React65.useRef(null);
|
10750
|
+
const { pressProps } = usePress(__spreadProps(__spreadValues({}, props), { ref }));
|
10751
|
+
const trigger = React65.Children.only(children);
|
10752
|
+
if (!trigger || !React65.isValidElement(trigger)) {
|
10753
|
+
throw new Error("<DropdownMenu.Trigger> must have valid child");
|
10754
|
+
}
|
10755
|
+
return React65.cloneElement(trigger, __spreadValues({ ref }, mergeProps2(pressProps, props)));
|
10756
|
+
};
|
10757
|
+
var isSectionNode = (item) => item.type === "section";
|
10758
|
+
var isItemNode = (item) => item.type === "item";
|
10759
|
+
var MenuWrapper = (_a) => {
|
10760
|
+
var _b = _a, {
|
10761
|
+
selection: selectedKeys,
|
10762
|
+
minWidth,
|
10763
|
+
maxWidth,
|
10764
|
+
minHeight,
|
10765
|
+
maxHeight,
|
10766
|
+
searchable,
|
10767
|
+
emptyState,
|
10768
|
+
header,
|
10769
|
+
footer
|
10770
|
+
} = _b, props = __objRest(_b, [
|
10771
|
+
"selection",
|
10772
|
+
"minWidth",
|
10773
|
+
"maxWidth",
|
10774
|
+
"minHeight",
|
10775
|
+
"maxHeight",
|
10776
|
+
"searchable",
|
10777
|
+
"emptyState",
|
10778
|
+
"header",
|
10779
|
+
"footer"
|
10780
|
+
]);
|
10781
|
+
const ref = React65.useRef(null);
|
10782
|
+
const disabledKeys = getDisabledItemKeys(props.children);
|
10783
|
+
const state = useTreeState(__spreadValues({
|
10784
|
+
disabledKeys,
|
10785
|
+
selectedKeys
|
10786
|
+
}, props));
|
10787
|
+
const { menuProps } = useMenu(props, state, ref);
|
10788
|
+
const { contains } = useFilter({ sensitivity: "base" });
|
10789
|
+
const [search, setSearch] = React65.useState("");
|
10790
|
+
const filteredCollection = React65.useMemo(
|
10791
|
+
() => searchable ? filterCollection(state.collection, search, contains) : state.collection,
|
10792
|
+
[searchable, state.collection, search, contains]
|
10793
|
+
);
|
10794
|
+
return /* @__PURE__ */ React65.createElement(DropdownMenu, {
|
10795
|
+
minWidth,
|
10796
|
+
maxWidth,
|
10797
|
+
minHeight,
|
10798
|
+
maxHeight
|
10799
|
+
}, header, /* @__PURE__ */ React65.createElement(DropdownMenu.ContentContainer, null, searchable && /* @__PURE__ */ React65.createElement(SearchInput, {
|
10800
|
+
"aria-label": "search",
|
10801
|
+
value: search,
|
10802
|
+
onChange: (e) => setSearch(e.target.value),
|
10803
|
+
className: tw("mb-5")
|
10804
|
+
}), filteredCollection.size === 0 && emptyState && /* @__PURE__ */ React65.createElement(DropdownMenu.EmptyStateContainer, null, emptyState), /* @__PURE__ */ React65.createElement(DropdownMenu.List, __spreadValues({
|
10805
|
+
ref
|
10806
|
+
}, menuProps), Array.from(filteredCollection).map((item) => {
|
10807
|
+
if (isSectionNode(item)) {
|
10808
|
+
return /* @__PURE__ */ React65.createElement(SectionWrapper, {
|
10809
|
+
key: item.key,
|
10810
|
+
section: item,
|
10811
|
+
state
|
10812
|
+
});
|
10813
|
+
} else if (isItemNode(item)) {
|
10814
|
+
return /* @__PURE__ */ React65.createElement(ItemWrapper, {
|
10815
|
+
key: item.key,
|
10816
|
+
item,
|
10817
|
+
state
|
10818
|
+
});
|
10819
|
+
}
|
10820
|
+
}))), footer);
|
10821
|
+
};
|
10822
|
+
var ItemWrapper = ({ item, state }) => {
|
10823
|
+
const ref = React65.useRef(null);
|
10824
|
+
const { menuItemProps, descriptionProps, isSelected, isFocused, isDisabled } = useMenuItem(
|
10825
|
+
{ key: item.key, closeOnSelect: item.props.closeOnSelect },
|
10826
|
+
state,
|
10827
|
+
ref
|
10828
|
+
);
|
10829
|
+
const { icon, description, kind = "default", showNotification = false } = item.props;
|
10830
|
+
return /* @__PURE__ */ React65.createElement(DropdownMenu.Item, __spreadProps(__spreadValues({
|
10831
|
+
ref
|
10832
|
+
}, menuItemProps), {
|
10833
|
+
kind,
|
10834
|
+
selected: isSelected,
|
10835
|
+
highlighted: isFocused,
|
10836
|
+
disabled: isDisabled,
|
10837
|
+
icon,
|
10838
|
+
showNotification
|
10839
|
+
}), item.rendered, description && /* @__PURE__ */ React65.createElement(DropdownMenu.Description, __spreadValues({
|
10840
|
+
disabled: isDisabled
|
10841
|
+
}, descriptionProps), description));
|
10842
|
+
};
|
10843
|
+
var SectionWrapper = ({ section, state }) => {
|
10844
|
+
const { itemProps, headingProps, groupProps } = useMenuSection({
|
10845
|
+
"heading": section.rendered,
|
10846
|
+
"aria-label": section["aria-label"]
|
10847
|
+
});
|
10848
|
+
const { separatorProps } = useSeparator({
|
10849
|
+
elementType: "li"
|
10850
|
+
});
|
10851
|
+
return /* @__PURE__ */ React65.createElement(React65.Fragment, null, section.key !== state.collection.getFirstKey() && /* @__PURE__ */ React65.createElement(DropdownMenu.Separator, __spreadValues({}, separatorProps)), /* @__PURE__ */ React65.createElement(DropdownMenu.Group, __spreadValues({
|
10852
|
+
title: section.rendered,
|
10853
|
+
titleProps: headingProps
|
10854
|
+
}, itemProps), /* @__PURE__ */ React65.createElement("ul", __spreadValues({}, groupProps), Array.from(section.childNodes).map((node) => /* @__PURE__ */ React65.createElement(ItemWrapper, {
|
10855
|
+
key: node.key,
|
10856
|
+
item: node,
|
10857
|
+
state
|
10858
|
+
})))));
|
10859
|
+
};
|
10860
|
+
var extractTriggerAndItems = (children) => {
|
10861
|
+
const [trigger, items] = React65.Children.toArray(children);
|
10862
|
+
if (!isComponentType(trigger, MenuTrigger) || !isComponentType(items, MenuItems)) {
|
10863
|
+
throw new Error("<DropdownMenu> must have <DropdownMenu.Trigger> and <DropdownMenu.Items> defined");
|
10864
|
+
}
|
10865
|
+
return [trigger, items];
|
10866
|
+
};
|
10867
|
+
var getDisabledItemKeys = (children) => {
|
10868
|
+
const keys = React65.Children.map(children, (child) => {
|
10869
|
+
var _a, _b;
|
10870
|
+
if (!child || typeof child === "function") {
|
10871
|
+
return null;
|
10872
|
+
}
|
10873
|
+
if (isComponentType(child, Item4) && child.props.disabled) {
|
10874
|
+
return (_b = (_a = child.key) == null ? void 0 : _a.toString()) != null ? _b : null;
|
10875
|
+
}
|
10876
|
+
if (isComponentType(child, Section)) {
|
10877
|
+
return getDisabledItemKeys(child.props.children);
|
10878
|
+
}
|
10879
|
+
return null;
|
10880
|
+
});
|
10881
|
+
return keys.flat().filter((key) => key !== null);
|
10882
|
+
};
|
10883
|
+
|
10884
|
+
// src/utils/object.ts
|
10885
|
+
var renameProperty = (oldProp, newProp, _a) => {
|
10886
|
+
var _b = _a, { [oldProp]: oldValue } = _b, rest = __objRest(_b, [__restKey(oldProp)]);
|
10887
|
+
return __spreadValues({
|
10888
|
+
[newProp]: oldValue
|
10889
|
+
}, rest);
|
10890
|
+
};
|
10891
|
+
|
10892
|
+
// src/molecules/DataList/DataListComponents.tsx
|
10893
|
+
var import_more2 = __toESM(require_more());
|
10894
|
+
var DataListRowMenu = ({
|
10895
|
+
row,
|
10896
|
+
index,
|
10897
|
+
menu,
|
10898
|
+
onAction,
|
10899
|
+
onMenuOpenChange,
|
10900
|
+
menuAriaLabel
|
10901
|
+
}) => {
|
10902
|
+
if (!menu) {
|
10903
|
+
return null;
|
10904
|
+
}
|
10905
|
+
const menuContent = isFunction(menu) ? menu(row, index) : menu;
|
10906
|
+
return /* @__PURE__ */ React66.createElement(DataList.Cell, {
|
10907
|
+
align: "right"
|
10908
|
+
}, menuContent && /* @__PURE__ */ React66.createElement(DropdownMenu2, {
|
10909
|
+
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
10910
|
+
onOpenChange: onMenuOpenChange
|
10911
|
+
}, /* @__PURE__ */ React66.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React66.createElement(Button.Icon, {
|
10912
|
+
"aria-label": menuAriaLabel,
|
10913
|
+
icon: import_more2.default
|
10914
|
+
})), menuContent));
|
10915
|
+
};
|
10916
|
+
var DataListRow = ({
|
10917
|
+
columns,
|
10918
|
+
row,
|
10919
|
+
index,
|
10920
|
+
rows,
|
10921
|
+
menu,
|
10922
|
+
active,
|
10923
|
+
disabled,
|
10924
|
+
renderFirstColumn,
|
10925
|
+
additionalColumnProps = () => ({})
|
10926
|
+
}) => {
|
10927
|
+
var _a;
|
10928
|
+
const isRowDisabled = (_a = disabled == null ? void 0 : disabled(row, index, rows)) != null ? _a : false;
|
10929
|
+
return /* @__PURE__ */ React66.createElement(DataList.Row, {
|
10930
|
+
key: row.id,
|
10931
|
+
disabled: isRowDisabled,
|
10932
|
+
active
|
10933
|
+
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React66.createElement(List, {
|
10934
|
+
items: columns,
|
10935
|
+
renderItem: (column, columnIndex) => /* @__PURE__ */ React66.createElement(DataList.Cell, __spreadValues(__spreadValues({}, cellProps(column)), additionalColumnProps(column, columnIndex, columns, row)), /* @__PURE__ */ React66.createElement(DataListCell, {
|
10936
|
+
column,
|
10937
|
+
row,
|
10938
|
+
index,
|
10939
|
+
rows
|
10940
|
+
}))
|
10941
|
+
}), menu);
|
10942
|
+
};
|
10943
|
+
var DEFAULT_CONTENT = "";
|
10944
|
+
var DataListCell = ({
|
10945
|
+
column,
|
10946
|
+
row,
|
10947
|
+
index,
|
10948
|
+
rows: _rows
|
10949
|
+
}) => {
|
10950
|
+
let cellContent = DEFAULT_CONTENT;
|
10951
|
+
const rows = areRowsGrouped(_rows) ? void 0 : _rows;
|
10952
|
+
switch (column.type) {
|
10953
|
+
case "status": {
|
10954
|
+
const status = column.status(row, index, rows);
|
10955
|
+
if (status) {
|
10956
|
+
cellContent = /* @__PURE__ */ React66.createElement(StatusChip, __spreadValues({
|
10957
|
+
dense: true
|
10958
|
+
}, status));
|
10959
|
+
}
|
10960
|
+
break;
|
10961
|
+
}
|
10962
|
+
case "action": {
|
10963
|
+
const action = renameProperty("text", "children", column.action(row, index, rows));
|
10964
|
+
if (action) {
|
10965
|
+
cellContent = /* @__PURE__ */ React66.createElement(Button.Secondary, __spreadValues({
|
10966
|
+
dense: true
|
10967
|
+
}, action));
|
10968
|
+
}
|
10969
|
+
break;
|
10970
|
+
}
|
10971
|
+
case "custom": {
|
10972
|
+
cellContent = column.UNSAFE_render(row, index, rows);
|
10973
|
+
break;
|
10974
|
+
}
|
10975
|
+
case "item": {
|
10976
|
+
const item = column.item(row, index, rows);
|
10977
|
+
if (item) {
|
10978
|
+
cellContent = /* @__PURE__ */ React66.createElement(Item2, __spreadValues({}, item));
|
10979
|
+
}
|
10980
|
+
break;
|
10981
|
+
}
|
10982
|
+
default:
|
10983
|
+
if (column.formatter) {
|
10984
|
+
cellContent = column.formatter(row[column.field], row, index, rows);
|
10833
10985
|
} else {
|
10834
|
-
|
10986
|
+
cellContent = row[column.field];
|
10835
10987
|
}
|
10836
|
-
|
10837
|
-
|
10838
|
-
|
10839
|
-
};
|
10840
|
-
return [sort, handleSortClick];
|
10988
|
+
break;
|
10989
|
+
}
|
10990
|
+
return column.tooltip ? /* @__PURE__ */ React66.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : /* @__PURE__ */ React66.createElement(React66.Fragment, null, cellContent);
|
10841
10991
|
};
|
10842
10992
|
|
10843
|
-
// src/
|
10844
|
-
import
|
10845
|
-
|
10846
|
-
|
10847
|
-
|
10993
|
+
// src/molecules/DataList/DataListGroup.tsx
|
10994
|
+
import React67 from "react";
|
10995
|
+
import isFunction2 from "lodash/isFunction";
|
10996
|
+
var GAP = 8;
|
10997
|
+
var INDENTATION = 28;
|
10998
|
+
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
10999
|
+
var DataListGroup = (_a) => {
|
11000
|
+
var _b = _a, {
|
11001
|
+
groups,
|
11002
|
+
level = 0
|
11003
|
+
} = _b, props = __objRest(_b, [
|
11004
|
+
"groups",
|
11005
|
+
"level"
|
11006
|
+
]);
|
11007
|
+
const {
|
11008
|
+
columns,
|
11009
|
+
disabled,
|
11010
|
+
expandedGroupIds,
|
11011
|
+
getGroupRow,
|
11012
|
+
menu,
|
11013
|
+
menuAriaLabel,
|
11014
|
+
onAction,
|
11015
|
+
onGroupToggled,
|
11016
|
+
onMenuOpenChange,
|
11017
|
+
rows
|
11018
|
+
} = props;
|
11019
|
+
const groupKeys = groups ? Object.keys(groups) : void 0;
|
11020
|
+
const hasCustomRowForGroup = isFunction2(getGroupRow);
|
11021
|
+
if (!areRowsGrouped(groups)) {
|
11022
|
+
return /* @__PURE__ */ React67.createElement(List, {
|
11023
|
+
items: groups,
|
11024
|
+
renderItem: (row, index) => {
|
11025
|
+
return /* @__PURE__ */ React67.createElement(DataListRow, {
|
11026
|
+
key: row.id,
|
11027
|
+
columns,
|
11028
|
+
row,
|
11029
|
+
index,
|
11030
|
+
rows,
|
11031
|
+
menu: /* @__PURE__ */ React67.createElement(DataListRowMenu, {
|
11032
|
+
row,
|
11033
|
+
index,
|
11034
|
+
menu,
|
11035
|
+
onAction,
|
11036
|
+
onMenuOpenChange,
|
11037
|
+
menuAriaLabel
|
11038
|
+
}),
|
11039
|
+
disabled,
|
11040
|
+
additionalColumnProps: (_, columnIndex) => columnIndex === 0 ? {
|
11041
|
+
style: {
|
11042
|
+
paddingLeft: `${GAP + level * INDENTATION}px`
|
11043
|
+
}
|
11044
|
+
} : {}
|
11045
|
+
});
|
11046
|
+
}
|
11047
|
+
});
|
10848
11048
|
}
|
10849
|
-
|
10850
|
-
|
10851
|
-
return [...rows].sort((a, b) => sortFunction(a, b, sort.direction));
|
10852
|
-
} else if (columnIsFieldColumn(sort.column)) {
|
10853
|
-
return orderBy2(rows, [sort.column.field], [toSortDirection(sort.direction)]);
|
11049
|
+
if (!groupKeys) {
|
11050
|
+
return null;
|
10854
11051
|
}
|
10855
|
-
return
|
11052
|
+
return /* @__PURE__ */ React67.createElement(List, {
|
11053
|
+
items: sortGroupKeys(groupKeys),
|
11054
|
+
renderItem: (key) => {
|
11055
|
+
var _a2;
|
11056
|
+
const group = groups[key];
|
11057
|
+
if (key === "undefined" || key === void 0) {
|
11058
|
+
return /* @__PURE__ */ React67.createElement(DataListGroup, __spreadProps(__spreadValues({
|
11059
|
+
key: "undefined",
|
11060
|
+
level
|
11061
|
+
}, props), {
|
11062
|
+
groups: group
|
11063
|
+
}));
|
11064
|
+
}
|
11065
|
+
const openPanelId = expandedGroupIds ? (_a2 = expandedGroupIds.find((id) => id === key)) != null ? _a2 : null : void 0;
|
11066
|
+
return /* @__PURE__ */ React67.createElement(Accordion, {
|
11067
|
+
key,
|
11068
|
+
openPanelId
|
11069
|
+
}, hasCustomRowForGroup && /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11070
|
+
active: !!openPanelId
|
11071
|
+
}, /* @__PURE__ */ React67.createElement(List, {
|
11072
|
+
items: columns,
|
11073
|
+
renderItem: (column, idx) => /* @__PURE__ */ React67.createElement(DataList.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
11074
|
+
className: tw("gap-3"),
|
11075
|
+
style: idx === 0 ? { paddingLeft: `${GAP + level * INDENTATION}px` } : void 0
|
11076
|
+
}), idx === 0 && /* @__PURE__ */ React67.createElement(Accordion.Toggle, {
|
11077
|
+
panelId: key,
|
11078
|
+
onChange: onGroupToggled
|
11079
|
+
}), /* @__PURE__ */ React67.createElement(DataListCell, {
|
11080
|
+
column,
|
11081
|
+
row: getGroupRow(key, group),
|
11082
|
+
index: -1,
|
11083
|
+
rows: []
|
11084
|
+
}))
|
11085
|
+
}), /* @__PURE__ */ React67.createElement(DataListRowMenu, {
|
11086
|
+
row: getGroupRow(key, group),
|
11087
|
+
index: -1,
|
11088
|
+
menu,
|
11089
|
+
onAction,
|
11090
|
+
onMenuOpenChange,
|
11091
|
+
menuAriaLabel
|
11092
|
+
})), !hasCustomRowForGroup && /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11093
|
+
active: !!openPanelId
|
11094
|
+
}, /* @__PURE__ */ React67.createElement(DataList.Cell, {
|
11095
|
+
className: tw("gap-3"),
|
11096
|
+
style: { paddingLeft: `${GAP + level * INDENTATION}px`, gridColumn: "1 / -1" }
|
11097
|
+
}, /* @__PURE__ */ React67.createElement(Accordion.Toggle, {
|
11098
|
+
panelId: key,
|
11099
|
+
onChange: onGroupToggled
|
11100
|
+
}), "Group: ", /* @__PURE__ */ React67.createElement("b", null, key))), /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11101
|
+
subgroup: true
|
11102
|
+
}, /* @__PURE__ */ React67.createElement(Accordion.UnanimatedPanel, {
|
11103
|
+
panelId: key
|
11104
|
+
}, /* @__PURE__ */ React67.createElement(DataListGroup, __spreadProps(__spreadValues({
|
11105
|
+
level: level + 1
|
11106
|
+
}, props), {
|
11107
|
+
groups: group
|
11108
|
+
})))));
|
11109
|
+
}
|
11110
|
+
});
|
10856
11111
|
};
|
10857
11112
|
|
10858
|
-
// src/molecules/DataList/DataList.tsx
|
10859
|
-
var import_more2 = __toESM(require_more());
|
10860
|
-
|
10861
11113
|
// src/molecules/DataList/DataListSkeleton.tsx
|
10862
|
-
import
|
11114
|
+
import React68 from "react";
|
10863
11115
|
var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
10864
11116
|
const columnsAmount = [...Array(typeof columns === "number" ? columns : columns.length).keys()];
|
10865
|
-
return /* @__PURE__ */
|
11117
|
+
return /* @__PURE__ */ React68.createElement(Template, {
|
10866
11118
|
role: "table",
|
10867
11119
|
columns
|
10868
|
-
}, /* @__PURE__ */
|
11120
|
+
}, /* @__PURE__ */ React68.createElement(DataList.Row, null, columnsAmount.map((_, index) => /* @__PURE__ */ React68.createElement(DataList.HeadCell, {
|
10869
11121
|
key: index
|
10870
|
-
}, /* @__PURE__ */
|
11122
|
+
}, /* @__PURE__ */ React68.createElement(Skeleton, {
|
10871
11123
|
width: "100%",
|
10872
11124
|
height: 17.5
|
10873
|
-
})))), /* @__PURE__ */
|
11125
|
+
})))), /* @__PURE__ */ React68.createElement(List, {
|
10874
11126
|
items: [...Array(rows).keys()],
|
10875
|
-
renderItem: (item) => /* @__PURE__ */
|
11127
|
+
renderItem: (item) => /* @__PURE__ */ React68.createElement(DataList.Row, {
|
10876
11128
|
key: item
|
10877
|
-
}, /* @__PURE__ */
|
11129
|
+
}, /* @__PURE__ */ React68.createElement(List, {
|
10878
11130
|
items: columnsAmount,
|
10879
|
-
renderItem: (key) => /* @__PURE__ */
|
11131
|
+
renderItem: (key) => /* @__PURE__ */ React68.createElement(DataList.Cell, {
|
10880
11132
|
key
|
10881
|
-
}, /* @__PURE__ */
|
11133
|
+
}, /* @__PURE__ */ React68.createElement(Skeleton, {
|
10882
11134
|
width: "100%",
|
10883
11135
|
height: 17.5
|
10884
11136
|
}))
|
@@ -10887,11 +11139,11 @@ var DataListSkeleton = ({ columns = ["1", "2", "2", 52], rows = 5 }) => {
|
|
10887
11139
|
};
|
10888
11140
|
|
10889
11141
|
// src/molecules/DataList/DataList.tsx
|
10890
|
-
var sortGroupKeys = (groupKeys) => [...groupKeys].sort((a) => a === "undefined" ? -1 : 1);
|
10891
11142
|
var DataList2 = (_a) => {
|
10892
11143
|
var _b = _a, {
|
10893
11144
|
columns,
|
10894
11145
|
rows,
|
11146
|
+
hideHeader = false,
|
10895
11147
|
sticky,
|
10896
11148
|
menu,
|
10897
11149
|
menuLabel,
|
@@ -10910,6 +11162,7 @@ var DataList2 = (_a) => {
|
|
10910
11162
|
} = _b, rest = __objRest(_b, [
|
10911
11163
|
"columns",
|
10912
11164
|
"rows",
|
11165
|
+
"hideHeader",
|
10913
11166
|
"sticky",
|
10914
11167
|
"menu",
|
10915
11168
|
"menuLabel",
|
@@ -10932,202 +11185,121 @@ var DataList2 = (_a) => {
|
|
10932
11185
|
const [sort, updateSort] = useTableSort(
|
10933
11186
|
onSortChanged ? __spreadProps(__spreadValues({}, initialSortState), { onSortChanged }) : initialSortState
|
10934
11187
|
);
|
10935
|
-
const sortedRows = sortRowsBy(rows, sort);
|
10936
|
-
const groups = group ?
|
10937
|
-
const
|
10938
|
-
const hasCustomRenderForGroupRow = isFunction(getGroupRow);
|
10939
|
-
const isCollapsible = isFunction(rowDetails) || group;
|
11188
|
+
const sortedRows = isArray3(rows) ? sortRowsBy(rows, sort) : [];
|
11189
|
+
const groups = areRowsGrouped(rows) ? rows : group ? isFunction3(group) ? group(sortedRows) : groupBy2(sortedRows, group) : void 0;
|
11190
|
+
const isCollapsible = isFunction3(rowDetails);
|
10940
11191
|
const templateColumns = compact([
|
10941
|
-
isCollapsible ?
|
11192
|
+
isCollapsible ? "fit-content(50px)" : void 0,
|
10942
11193
|
...columns.map((column) => {
|
10943
11194
|
var _a3;
|
10944
11195
|
return (_a3 = column.width) != null ? _a3 : "auto";
|
10945
11196
|
}),
|
10946
|
-
menu ? "
|
11197
|
+
menu ? "fit-content(28px)" : void 0
|
10947
11198
|
]);
|
10948
|
-
const PaginationFooter =
|
10949
|
-
({ children }) => /* @__PURE__ */
|
11199
|
+
const PaginationFooter = React69.useCallback(
|
11200
|
+
({ children }) => /* @__PURE__ */ React69.createElement("div", {
|
10950
11201
|
style: { gridColumn: "1 / -1" },
|
10951
11202
|
role: "row"
|
10952
|
-
}, /* @__PURE__ */
|
11203
|
+
}, /* @__PURE__ */ React69.createElement("div", {
|
10953
11204
|
role: "cell"
|
10954
11205
|
}, children)),
|
10955
11206
|
[]
|
10956
11207
|
);
|
10957
|
-
return /* @__PURE__ */
|
11208
|
+
return /* @__PURE__ */ React69.createElement(Template, {
|
10958
11209
|
className: "Aquarium-DataList",
|
10959
11210
|
columns: templateColumns,
|
10960
11211
|
role: "table"
|
10961
|
-
},
|
11212
|
+
}, !hideHeader && /* @__PURE__ */ React69.createElement(DataList.Row, {
|
11213
|
+
header: true
|
11214
|
+
}, isCollapsible && /* @__PURE__ */ React69.createElement(DataList.HeadCell, {
|
10962
11215
|
align: "left",
|
10963
11216
|
sticky
|
10964
11217
|
}), columns.map((column) => {
|
10965
|
-
const content = column.headerTooltip ? /* @__PURE__ */
|
11218
|
+
const content = column.headerTooltip ? /* @__PURE__ */ React69.createElement(Tooltip, {
|
10966
11219
|
placement: column.headerTooltip.placement,
|
10967
11220
|
content: column.headerTooltip.content
|
10968
11221
|
}, column.headerName) : column.headerName;
|
10969
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
11222
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React69.createElement(DataList.SortCell, __spreadValues({
|
10970
11223
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
10971
11224
|
onClick: () => updateSort(column),
|
10972
11225
|
sticky
|
10973
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
11226
|
+
}, cellProps(column)), content) : /* @__PURE__ */ React69.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
10974
11227
|
sticky
|
10975
11228
|
}), content);
|
10976
|
-
}), menu && /* @__PURE__ */
|
11229
|
+
}), menu && /* @__PURE__ */ React69.createElement(DataList.HeadCell, {
|
10977
11230
|
align: "right",
|
10978
11231
|
"aria-label": menuAriaLabel,
|
10979
11232
|
sticky
|
10980
|
-
}, menuHeaderName)), groups &&
|
10981
|
-
|
10982
|
-
|
10983
|
-
|
10984
|
-
|
10985
|
-
|
10986
|
-
|
10987
|
-
|
10988
|
-
|
10989
|
-
|
10990
|
-
|
10991
|
-
|
10992
|
-
|
10993
|
-
|
10994
|
-
)
|
10995
|
-
});
|
10996
|
-
return key === "undefined" ? groupContent : /* @__PURE__ */ React67.createElement(Accordion, {
|
10997
|
-
key,
|
10998
|
-
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === key) || null : void 0
|
10999
|
-
}, hasCustomRenderForGroupRow ? /* @__PURE__ */ React67.createElement(DataList.Row, null, /* @__PURE__ */ React67.createElement(DataList.Cell, null, /* @__PURE__ */ React67.createElement(Accordion.Toggle, {
|
11000
|
-
panelId: key,
|
11001
|
-
onChange: onGroupToggled
|
11002
|
-
})), /* @__PURE__ */ React67.createElement(List2, {
|
11003
|
-
items: columns,
|
11004
|
-
renderItem: (column) => /* @__PURE__ */ React67.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, getGroupRow(key, groups[key]), -1, []))
|
11005
|
-
}), renderRowMenu(getGroupRow(key, groups[key]), -1, {
|
11006
|
-
menu,
|
11007
|
-
onAction,
|
11008
|
-
onMenuOpenChange,
|
11009
|
-
menuAriaLabel
|
11010
|
-
})) : /* @__PURE__ */ React67.createElement(DataList.Row, null, /* @__PURE__ */ React67.createElement(DataList.Cell, null, /* @__PURE__ */ React67.createElement(Accordion.Toggle, {
|
11011
|
-
panelId: key,
|
11012
|
-
onChange: onGroupToggled
|
11013
|
-
})), /* @__PURE__ */ React67.createElement(DataList.Cell, {
|
11014
|
-
style: { gridColumn: "2 / -1", gap: 4 }
|
11015
|
-
}, "Group: ", /* @__PURE__ */ React67.createElement("b", null, key))), /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11016
|
-
subgroup: true
|
11017
|
-
}, /* @__PURE__ */ React67.createElement(Accordion.UnanimatedPanel, {
|
11018
|
-
panelId: key
|
11019
|
-
}, /* @__PURE__ */ React67.createElement(DataList.SubGroupSpacing, null), groupContent, /* @__PURE__ */ React67.createElement(DataList.SubGroupSpacing, {
|
11020
|
-
divider: true
|
11021
|
-
}))));
|
11022
|
-
}
|
11023
|
-
}) : /* @__PURE__ */ React67.createElement(List2, __spreadProps(__spreadValues({}, rest), {
|
11233
|
+
}, menuHeaderName)), groups && /* @__PURE__ */ React69.createElement(DataListGroup, {
|
11234
|
+
columns,
|
11235
|
+
disabled,
|
11236
|
+
getGroupRow,
|
11237
|
+
expandedGroupIds,
|
11238
|
+
menu,
|
11239
|
+
menuAriaLabel,
|
11240
|
+
onAction,
|
11241
|
+
onGroupToggled,
|
11242
|
+
onMenuOpenChange,
|
11243
|
+
rows,
|
11244
|
+
groups,
|
11245
|
+
level: 0
|
11246
|
+
}), !groups && /* @__PURE__ */ React69.createElement(List, __spreadProps(__spreadValues({}, rest), {
|
11024
11247
|
paginationContainer: PaginationFooter,
|
11025
11248
|
items: sortedRows,
|
11026
11249
|
renderItem: (row, index) => {
|
11027
11250
|
const details = rowDetails == null ? void 0 : rowDetails(row, index, sortedRows);
|
11028
|
-
const content =
|
11251
|
+
const content = /* @__PURE__ */ React69.createElement(DataListRow, {
|
11252
|
+
key: row.id,
|
11029
11253
|
columns,
|
11030
11254
|
row,
|
11031
11255
|
index,
|
11032
|
-
sortedRows,
|
11033
|
-
|
11256
|
+
rows: sortedRows,
|
11257
|
+
menu: /* @__PURE__ */ React69.createElement(DataListRowMenu, {
|
11258
|
+
row,
|
11259
|
+
index,
|
11260
|
+
menu,
|
11261
|
+
onAction,
|
11262
|
+
onMenuOpenChange,
|
11263
|
+
menuAriaLabel
|
11264
|
+
}),
|
11034
11265
|
disabled,
|
11035
|
-
() => rowDetails !== void 0 && /* @__PURE__ */
|
11266
|
+
renderFirstColumn: () => rowDetails !== void 0 && /* @__PURE__ */ React69.createElement(DataList.Cell, null, details && /* @__PURE__ */ React69.createElement(Accordion.Toggle, {
|
11036
11267
|
panelId: row.id.toString(),
|
11037
11268
|
onChange: onGroupToggled
|
11038
11269
|
}))
|
11039
|
-
);
|
11040
|
-
|
11270
|
+
});
|
11271
|
+
if (!details) {
|
11272
|
+
return content;
|
11273
|
+
}
|
11274
|
+
return /* @__PURE__ */ React69.createElement(Accordion, {
|
11041
11275
|
key: row.id,
|
11042
11276
|
openPanelId: expandedGroupIds ? expandedGroupIds.find((id) => id === row.id) || null : void 0
|
11043
|
-
}, content, /* @__PURE__ */
|
11277
|
+
}, content, /* @__PURE__ */ React69.createElement(Accordion.Panel, {
|
11044
11278
|
role: "row",
|
11045
11279
|
panelId: row.id.toString(),
|
11046
11280
|
className: tw("col-span-full bg-grey-0 border-b border-grey-10"),
|
11047
11281
|
"aria-label": `row ${row.id.toString()} details`
|
11048
|
-
}, /* @__PURE__ */
|
11282
|
+
}, /* @__PURE__ */ React69.createElement("div", {
|
11049
11283
|
role: "cell"
|
11050
|
-
}, details)))
|
11284
|
+
}, details)));
|
11051
11285
|
}
|
11052
11286
|
})));
|
11053
11287
|
};
|
11054
|
-
var renderRowMenu = (row, index, {
|
11055
|
-
menu,
|
11056
|
-
onAction,
|
11057
|
-
onMenuOpenChange,
|
11058
|
-
menuAriaLabel
|
11059
|
-
}) => {
|
11060
|
-
if (menu) {
|
11061
|
-
const menuContent = isFunction(menu) ? menu(row, index) : menu;
|
11062
|
-
return /* @__PURE__ */ React67.createElement(DataList.Cell, {
|
11063
|
-
align: "right"
|
11064
|
-
}, menuContent && /* @__PURE__ */ React67.createElement(DropdownMenu2, {
|
11065
|
-
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
11066
|
-
onOpenChange: onMenuOpenChange
|
11067
|
-
}, /* @__PURE__ */ React67.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React67.createElement(Button.Icon, {
|
11068
|
-
"aria-label": menuAriaLabel,
|
11069
|
-
icon: import_more2.default
|
11070
|
-
})), menuContent));
|
11071
|
-
}
|
11072
|
-
return void 0;
|
11073
|
-
};
|
11074
|
-
var renderRow = (columns, row, index, rows, menu, disabled, renderFirstColumn) => {
|
11075
|
-
var _a;
|
11076
|
-
const isRowDisabled = (_a = disabled == null ? void 0 : disabled(row, index, rows)) != null ? _a : false;
|
11077
|
-
return /* @__PURE__ */ React67.createElement(DataList.Row, {
|
11078
|
-
key: row.id,
|
11079
|
-
disabled: isRowDisabled
|
11080
|
-
}, renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React67.createElement(List2, {
|
11081
|
-
items: columns,
|
11082
|
-
renderItem: (column) => /* @__PURE__ */ React67.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), renderCell(column, row, index, rows))
|
11083
|
-
}), menu);
|
11084
|
-
};
|
11085
|
-
var DEFAULT_CONTENT = "";
|
11086
|
-
var renderCell = (column, row, index, rows) => {
|
11087
|
-
let cellContent = DEFAULT_CONTENT;
|
11088
|
-
if (column.type === "status") {
|
11089
|
-
const status = column.status(row, index, rows);
|
11090
|
-
if (status) {
|
11091
|
-
cellContent = /* @__PURE__ */ React67.createElement(StatusChip, __spreadValues({
|
11092
|
-
dense: true
|
11093
|
-
}, status));
|
11094
|
-
}
|
11095
|
-
} else if (column.type === "action") {
|
11096
|
-
const action = renameProperty("text", "children", column.action(row, index, rows));
|
11097
|
-
if (action) {
|
11098
|
-
cellContent = /* @__PURE__ */ React67.createElement(Button.Secondary, __spreadValues({
|
11099
|
-
dense: true
|
11100
|
-
}, action));
|
11101
|
-
}
|
11102
|
-
} else if (column.type === "custom") {
|
11103
|
-
cellContent = column.UNSAFE_render(row, index, rows);
|
11104
|
-
} else if (column.type === "item") {
|
11105
|
-
const item = column.item(row, index, rows);
|
11106
|
-
if (item) {
|
11107
|
-
cellContent = /* @__PURE__ */ React67.createElement(Item4, __spreadValues({}, item));
|
11108
|
-
}
|
11109
|
-
} else if (column.formatter) {
|
11110
|
-
cellContent = column.formatter(row[column.field], row, index, rows);
|
11111
|
-
} else {
|
11112
|
-
cellContent = row[column.field];
|
11113
|
-
}
|
11114
|
-
return column.tooltip ? /* @__PURE__ */ React67.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
11115
|
-
};
|
11116
11288
|
DataList2.Skeleton = DataListSkeleton;
|
11117
11289
|
|
11118
11290
|
// src/molecules/DataTable/DataTable.tsx
|
11119
|
-
import
|
11291
|
+
import React72 from "react";
|
11120
11292
|
import compact2 from "lodash/compact";
|
11121
|
-
import
|
11293
|
+
import isFunction4 from "lodash/isFunction";
|
11122
11294
|
|
11123
11295
|
// src/molecules/Table/Table.tsx
|
11124
|
-
import
|
11296
|
+
import React71 from "react";
|
11125
11297
|
|
11126
11298
|
// src/utils/table/useScrollTarget.ts
|
11127
|
-
import
|
11299
|
+
import React70 from "react";
|
11128
11300
|
var useScrollTarget = (callback) => {
|
11129
|
-
const targetRef =
|
11130
|
-
|
11301
|
+
const targetRef = React70.useRef(null);
|
11302
|
+
React70.useLayoutEffect(() => {
|
11131
11303
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
11132
11304
|
root: null,
|
11133
11305
|
rootMargin: `0px 0px 200px 0px`
|
@@ -11145,12 +11317,12 @@ var Table2 = (_a) => {
|
|
11145
11317
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
11146
11318
|
const bottomRef = useScrollTarget(onNext);
|
11147
11319
|
const topRef = useScrollTarget(onPrev);
|
11148
|
-
return /* @__PURE__ */
|
11320
|
+
return /* @__PURE__ */ React71.createElement("div", {
|
11149
11321
|
className: classNames("Aquarium-Table", tw("relative w-full"))
|
11150
|
-
}, /* @__PURE__ */
|
11322
|
+
}, /* @__PURE__ */ React71.createElement("div", {
|
11151
11323
|
ref: topRef,
|
11152
11324
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
11153
|
-
}), /* @__PURE__ */
|
11325
|
+
}), /* @__PURE__ */ React71.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ React71.createElement("div", {
|
11154
11326
|
ref: bottomRef,
|
11155
11327
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
11156
11328
|
}));
|
@@ -11211,13 +11383,13 @@ var DataTable = (_a) => {
|
|
11211
11383
|
);
|
11212
11384
|
const sortedRows = sortRowsBy(rows, sort);
|
11213
11385
|
const amountOfColumns = columns.length + (menu ? 1 : 0);
|
11214
|
-
const PaginationFooter =
|
11215
|
-
({ children }) => /* @__PURE__ */
|
11386
|
+
const PaginationFooter = React72.useCallback(
|
11387
|
+
({ children }) => /* @__PURE__ */ React72.createElement("tfoot", null, /* @__PURE__ */ React72.createElement("tr", null, /* @__PURE__ */ React72.createElement("td", {
|
11216
11388
|
colSpan: amountOfColumns
|
11217
11389
|
}, children))),
|
11218
11390
|
[amountOfColumns]
|
11219
11391
|
);
|
11220
|
-
return /* @__PURE__ */
|
11392
|
+
return /* @__PURE__ */ React72.createElement(Table2, {
|
11221
11393
|
ariaLabel,
|
11222
11394
|
onNext,
|
11223
11395
|
onPrev,
|
@@ -11229,30 +11401,30 @@ var DataTable = (_a) => {
|
|
11229
11401
|
"table-fixed": layout === "fixed"
|
11230
11402
|
})
|
11231
11403
|
)
|
11232
|
-
}, /* @__PURE__ */
|
11404
|
+
}, /* @__PURE__ */ React72.createElement(Table2.Head, {
|
11233
11405
|
sticky
|
11234
11406
|
}, compact2([
|
11235
11407
|
...columns.map((column) => {
|
11236
|
-
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */
|
11408
|
+
const content = column.headerTooltip && !column.headerInvisible ? /* @__PURE__ */ React72.createElement(Tooltip, {
|
11237
11409
|
placement: column.headerTooltip.placement,
|
11238
11410
|
content: column.headerTooltip.content
|
11239
11411
|
}, column.headerName) : !column.headerInvisible && column.headerName;
|
11240
|
-
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
11412
|
+
return columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React72.createElement(Table2.SortCell, __spreadValues({
|
11241
11413
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
11242
11414
|
onClick: () => updateSort(column),
|
11243
11415
|
style: { width: column.width },
|
11244
11416
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
11245
|
-
}, cellProps(column)), content) : /* @__PURE__ */
|
11417
|
+
}, cellProps(column)), content) : /* @__PURE__ */ React72.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
11246
11418
|
style: { width: column.width },
|
11247
11419
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
11248
11420
|
}), content);
|
11249
11421
|
}),
|
11250
|
-
menu ? /* @__PURE__ */
|
11422
|
+
menu ? /* @__PURE__ */ React72.createElement(Table2.Cell, {
|
11251
11423
|
key: "__contextMenu",
|
11252
11424
|
align: "right",
|
11253
11425
|
"aria-label": menuAriaLabel
|
11254
11426
|
}, menuHeaderName) : null
|
11255
|
-
])), /* @__PURE__ */
|
11427
|
+
])), /* @__PURE__ */ React72.createElement(List, __spreadProps(__spreadValues({
|
11256
11428
|
container: Table2.Body,
|
11257
11429
|
paginationContainer: PaginationFooter
|
11258
11430
|
}, rest), {
|
@@ -11260,30 +11432,30 @@ var DataTable = (_a) => {
|
|
11260
11432
|
renderItem: (row, index) => {
|
11261
11433
|
var _a3;
|
11262
11434
|
const isRowDisabled = (_a3 = disabled == null ? void 0 : disabled(row, index, sortedRows)) != null ? _a3 : false;
|
11263
|
-
return /* @__PURE__ */
|
11435
|
+
return /* @__PURE__ */ React72.createElement(Table2.Row, {
|
11264
11436
|
key: row.id,
|
11265
11437
|
disabled: isRowDisabled
|
11266
|
-
}, /* @__PURE__ */
|
11438
|
+
}, /* @__PURE__ */ React72.createElement(List, {
|
11267
11439
|
items: columns,
|
11268
|
-
renderItem: (column) => /* @__PURE__ */
|
11269
|
-
}),
|
11440
|
+
renderItem: (column) => /* @__PURE__ */ React72.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), renderCell(column, row, index, sortedRows))
|
11441
|
+
}), renderRowMenu(row, index, { menu, menuAriaLabel, onAction, onMenuOpenChange }));
|
11270
11442
|
}
|
11271
11443
|
})));
|
11272
11444
|
};
|
11273
|
-
var
|
11445
|
+
var renderRowMenu = (row, index, {
|
11274
11446
|
menu,
|
11275
11447
|
onAction,
|
11276
11448
|
onMenuOpenChange,
|
11277
11449
|
menuAriaLabel
|
11278
11450
|
}) => {
|
11279
11451
|
if (menu) {
|
11280
|
-
const menuContent =
|
11281
|
-
return /* @__PURE__ */
|
11452
|
+
const menuContent = isFunction4(menu) ? menu(row, index) : menu;
|
11453
|
+
return /* @__PURE__ */ React72.createElement(Table2.Cell, {
|
11282
11454
|
align: "right"
|
11283
|
-
}, menuContent && /* @__PURE__ */
|
11455
|
+
}, menuContent && /* @__PURE__ */ React72.createElement(DropdownMenu2, {
|
11284
11456
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index),
|
11285
11457
|
onOpenChange: onMenuOpenChange
|
11286
|
-
}, /* @__PURE__ */
|
11458
|
+
}, /* @__PURE__ */ React72.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React72.createElement(Button.Icon, {
|
11287
11459
|
"aria-label": menuAriaLabel,
|
11288
11460
|
icon: import_more3.default
|
11289
11461
|
})), menuContent));
|
@@ -11291,19 +11463,19 @@ var renderRowMenu2 = (row, index, {
|
|
11291
11463
|
return void 0;
|
11292
11464
|
};
|
11293
11465
|
var DEFAULT_CONTENT2 = "";
|
11294
|
-
var
|
11466
|
+
var renderCell = (column, row, index, rows) => {
|
11295
11467
|
let cellContent = DEFAULT_CONTENT2;
|
11296
11468
|
if (column.type === "status") {
|
11297
11469
|
const status = column.status(row, index, rows);
|
11298
11470
|
if (status) {
|
11299
|
-
cellContent = /* @__PURE__ */
|
11471
|
+
cellContent = /* @__PURE__ */ React72.createElement(StatusChip, __spreadValues({
|
11300
11472
|
dense: true
|
11301
11473
|
}, status));
|
11302
11474
|
}
|
11303
11475
|
} else if (column.type === "action") {
|
11304
11476
|
const action = renameProperty("text", "children", column.action(row, index, rows));
|
11305
11477
|
if (action) {
|
11306
|
-
cellContent = /* @__PURE__ */
|
11478
|
+
cellContent = /* @__PURE__ */ React72.createElement(Button.Secondary, __spreadValues({
|
11307
11479
|
dense: true
|
11308
11480
|
}, action));
|
11309
11481
|
}
|
@@ -11312,19 +11484,19 @@ var renderCell2 = (column, row, index, rows) => {
|
|
11312
11484
|
} else if (column.type === "item") {
|
11313
11485
|
const item = column.item(row, index, rows);
|
11314
11486
|
if (item) {
|
11315
|
-
cellContent = /* @__PURE__ */
|
11487
|
+
cellContent = /* @__PURE__ */ React72.createElement(Item2, __spreadValues({}, item));
|
11316
11488
|
}
|
11317
11489
|
} else if (column.formatter) {
|
11318
11490
|
cellContent = column.formatter(row[column.field], row, index, rows);
|
11319
11491
|
} else {
|
11320
11492
|
cellContent = row[column.field];
|
11321
11493
|
}
|
11322
|
-
return column.tooltip ? /* @__PURE__ */
|
11494
|
+
return column.tooltip ? /* @__PURE__ */ React72.createElement(Tooltip, __spreadValues({}, column.tooltip(row, index, rows)), cellContent) : cellContent;
|
11323
11495
|
};
|
11324
11496
|
DataTable.Skeleton = DataListSkeleton;
|
11325
11497
|
|
11326
11498
|
// src/molecules/Dialog/Dialog.tsx
|
11327
|
-
import
|
11499
|
+
import React74 from "react";
|
11328
11500
|
import { useDialog } from "@react-aria/dialog";
|
11329
11501
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
11330
11502
|
import { useId as useId8 } from "@react-aria/utils";
|
@@ -11351,7 +11523,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
11351
11523
|
};
|
11352
11524
|
|
11353
11525
|
// src/atoms/Modal/Modal.tsx
|
11354
|
-
import
|
11526
|
+
import React73 from "react";
|
11355
11527
|
var Modal = (_a) => {
|
11356
11528
|
var _b = _a, {
|
11357
11529
|
children,
|
@@ -11364,7 +11536,7 @@ var Modal = (_a) => {
|
|
11364
11536
|
"className",
|
11365
11537
|
"open"
|
11366
11538
|
]);
|
11367
|
-
return open ? /* @__PURE__ */
|
11539
|
+
return open ? /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11368
11540
|
className: classNames(
|
11369
11541
|
tw("inset-0 overflow-y-auto z-modal fixed"),
|
11370
11542
|
{
|
@@ -11376,11 +11548,11 @@ var Modal = (_a) => {
|
|
11376
11548
|
};
|
11377
11549
|
Modal.BackDrop = (_a) => {
|
11378
11550
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
11379
|
-
return /* @__PURE__ */
|
11551
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11380
11552
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-primary-100 opacity-60"), className)
|
11381
11553
|
}));
|
11382
11554
|
};
|
11383
|
-
Modal.Dialog =
|
11555
|
+
Modal.Dialog = React73.forwardRef(
|
11384
11556
|
(_a, ref) => {
|
11385
11557
|
var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
11386
11558
|
const commonClasses = tw("bg-white max-h-full flex flex-col");
|
@@ -11394,7 +11566,7 @@ Modal.Dialog = React71.forwardRef(
|
|
11394
11566
|
"w-[560px]": size === "md",
|
11395
11567
|
"w-[1080px]": size === "full"
|
11396
11568
|
});
|
11397
|
-
return /* @__PURE__ */
|
11569
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({
|
11398
11570
|
ref,
|
11399
11571
|
"aria-modal": "true"
|
11400
11572
|
}, rest), {
|
@@ -11404,31 +11576,31 @@ Modal.Dialog = React71.forwardRef(
|
|
11404
11576
|
);
|
11405
11577
|
Modal.Header = (_a) => {
|
11406
11578
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11407
|
-
return /* @__PURE__ */
|
11579
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11408
11580
|
className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
|
11409
11581
|
}), children);
|
11410
11582
|
};
|
11411
11583
|
Modal.HeaderImage = (_a) => {
|
11412
11584
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
11413
11585
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
11414
|
-
return backgroundImage ? /* @__PURE__ */
|
11586
|
+
return backgroundImage ? /* @__PURE__ */ React73.createElement("img", __spreadProps(__spreadValues({
|
11415
11587
|
"aria-hidden": true,
|
11416
11588
|
src: backgroundImage != null ? backgroundImage : void 0
|
11417
11589
|
}, rest), {
|
11418
11590
|
className: classNames(common, tw("object-cover"), className)
|
11419
|
-
})) : /* @__PURE__ */
|
11591
|
+
})) : /* @__PURE__ */ React73.createElement("div", {
|
11420
11592
|
className: classNames(common, tw("bg-grey-5"), className)
|
11421
11593
|
});
|
11422
11594
|
};
|
11423
11595
|
Modal.CloseButtonContainer = (_a) => {
|
11424
11596
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
11425
|
-
return /* @__PURE__ */
|
11597
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11426
11598
|
className: classNames(tw("absolute top-[24px] right-[28px]"), className)
|
11427
11599
|
}));
|
11428
11600
|
};
|
11429
11601
|
Modal.Title = (_a) => {
|
11430
11602
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
11431
|
-
return /* @__PURE__ */
|
11603
|
+
return /* @__PURE__ */ React73.createElement(Typography, __spreadValues({
|
11432
11604
|
htmlTag: "h2",
|
11433
11605
|
variant: "subheading",
|
11434
11606
|
color: "grey-90",
|
@@ -11442,52 +11614,52 @@ Modal.Title = (_a) => {
|
|
11442
11614
|
};
|
11443
11615
|
Modal.Subtitle = (_a) => {
|
11444
11616
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
11445
|
-
return /* @__PURE__ */
|
11617
|
+
return /* @__PURE__ */ React73.createElement(Typography, __spreadValues({
|
11446
11618
|
variant: "small",
|
11447
11619
|
color: "grey-60"
|
11448
11620
|
}, rest), children);
|
11449
11621
|
};
|
11450
11622
|
Modal.TitleContainer = (_a) => {
|
11451
11623
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11452
|
-
return /* @__PURE__ */
|
11624
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11453
11625
|
className: classNames(tw("flex flex-col grow"), className)
|
11454
11626
|
}), children);
|
11455
11627
|
};
|
11456
11628
|
Modal.Body = (_a) => {
|
11457
11629
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
11458
|
-
return /* @__PURE__ */
|
11630
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11459
11631
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
11460
11632
|
style: __spreadValues({ maxHeight }, style)
|
11461
11633
|
}), children);
|
11462
11634
|
};
|
11463
11635
|
Modal.Footer = (_a) => {
|
11464
11636
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11465
|
-
return /* @__PURE__ */
|
11637
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11466
11638
|
className: classNames(tw("px-7 py-6"), className)
|
11467
11639
|
}), children);
|
11468
11640
|
};
|
11469
11641
|
Modal.Actions = (_a) => {
|
11470
11642
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
11471
|
-
return /* @__PURE__ */
|
11643
|
+
return /* @__PURE__ */ React73.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11472
11644
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
11473
11645
|
}), children);
|
11474
11646
|
};
|
11475
11647
|
|
11476
11648
|
// src/molecules/Dialog/Dialog.tsx
|
11477
11649
|
var Dialog = (props) => {
|
11478
|
-
const ref =
|
11650
|
+
const ref = React74.useRef(null);
|
11479
11651
|
const state = useOverlayTriggerState2({ isOpen: props.open });
|
11480
11652
|
const { modalProps, underlayProps } = useModalOverlay({}, state, ref);
|
11481
11653
|
if (!state.isOpen) {
|
11482
11654
|
return null;
|
11483
11655
|
}
|
11484
|
-
return /* @__PURE__ */
|
11656
|
+
return /* @__PURE__ */ React74.createElement(Overlay2, null, /* @__PURE__ */ React74.createElement(Modal, {
|
11485
11657
|
className: "Aquarium-Dialog",
|
11486
11658
|
open: true
|
11487
|
-
}, /* @__PURE__ */
|
11659
|
+
}, /* @__PURE__ */ React74.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React74.createElement(Modal.Dialog, __spreadValues({
|
11488
11660
|
ref,
|
11489
11661
|
size: "sm"
|
11490
|
-
}, modalProps), /* @__PURE__ */
|
11662
|
+
}, modalProps), /* @__PURE__ */ React74.createElement(DialogWrapper, __spreadValues({}, props)))));
|
11491
11663
|
};
|
11492
11664
|
var DialogWrapper = ({
|
11493
11665
|
title,
|
@@ -11496,38 +11668,38 @@ var DialogWrapper = ({
|
|
11496
11668
|
primaryAction,
|
11497
11669
|
secondaryAction
|
11498
11670
|
}) => {
|
11499
|
-
const ref =
|
11671
|
+
const ref = React74.useRef(null);
|
11500
11672
|
const labelledBy = useId8();
|
11501
11673
|
const describedBy = useId8();
|
11502
11674
|
const { dialogProps } = useDialog(
|
11503
11675
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
11504
11676
|
ref
|
11505
11677
|
);
|
11506
|
-
return /* @__PURE__ */
|
11678
|
+
return /* @__PURE__ */ React74.createElement("div", __spreadProps(__spreadValues({
|
11507
11679
|
ref
|
11508
11680
|
}, dialogProps), {
|
11509
11681
|
className: tw("outline-none")
|
11510
|
-
}), /* @__PURE__ */
|
11682
|
+
}), /* @__PURE__ */ React74.createElement(Modal.Header, {
|
11511
11683
|
className: tw("icon-stroke-2")
|
11512
|
-
}, /* @__PURE__ */
|
11684
|
+
}, /* @__PURE__ */ React74.createElement(Icon, {
|
11513
11685
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
11514
11686
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
11515
11687
|
fontSize: 20
|
11516
|
-
}), /* @__PURE__ */
|
11688
|
+
}), /* @__PURE__ */ React74.createElement(Modal.Title, {
|
11517
11689
|
id: labelledBy,
|
11518
11690
|
variant: "large",
|
11519
11691
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
11520
|
-
}, title)), /* @__PURE__ */
|
11692
|
+
}, title)), /* @__PURE__ */ React74.createElement(Modal.Body, {
|
11521
11693
|
id: describedBy
|
11522
|
-
}, /* @__PURE__ */
|
11694
|
+
}, /* @__PURE__ */ React74.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React74.createElement(Modal.Footer, null, /* @__PURE__ */ React74.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ React74.createElement(Button.Ghost, __spreadValues({
|
11523
11695
|
key: secondaryAction.text
|
11524
|
-
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
11696
|
+
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React74.createElement(Button.Secondary, __spreadValues({
|
11525
11697
|
key: primaryAction.text
|
11526
11698
|
}, omit8(primaryAction, "text")), primaryAction.text))));
|
11527
11699
|
};
|
11528
11700
|
|
11529
11701
|
// src/molecules/Drawer/Drawer.tsx
|
11530
|
-
import
|
11702
|
+
import React76, { useEffect as useEffect10 } from "react";
|
11531
11703
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
|
11532
11704
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
11533
11705
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
@@ -11537,18 +11709,18 @@ import castArray from "lodash/castArray";
|
|
11537
11709
|
import omit9 from "lodash/omit";
|
11538
11710
|
|
11539
11711
|
// src/molecules/Tabs/Tabs.tsx
|
11540
|
-
import
|
11712
|
+
import React75, { useEffect as useEffect9, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useState as useState10 } from "react";
|
11541
11713
|
import isNumber5 from "lodash/isNumber";
|
11542
11714
|
import kebabCase from "lodash/kebabCase";
|
11543
11715
|
var import_chevronLeft4 = __toESM(require_chevronLeft());
|
11544
11716
|
var import_chevronRight4 = __toESM(require_chevronRight());
|
11545
11717
|
var import_warningSign4 = __toESM(require_warningSign());
|
11546
11718
|
var isTabComponent = (c) => {
|
11547
|
-
return
|
11719
|
+
return React75.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
11548
11720
|
};
|
11549
|
-
var Tab =
|
11721
|
+
var Tab = React75.forwardRef(
|
11550
11722
|
({ className, id, title, children }, ref) => {
|
11551
|
-
return /* @__PURE__ */
|
11723
|
+
return /* @__PURE__ */ React75.createElement("div", {
|
11552
11724
|
ref,
|
11553
11725
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
11554
11726
|
className,
|
@@ -11560,14 +11732,14 @@ var Tab = React73.forwardRef(
|
|
11560
11732
|
);
|
11561
11733
|
var TabContainer = (_a) => {
|
11562
11734
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
11563
|
-
return /* @__PURE__ */
|
11735
|
+
return /* @__PURE__ */ React75.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
11564
11736
|
className: classNames("py-6 z-0", className)
|
11565
11737
|
}), children);
|
11566
11738
|
};
|
11567
11739
|
var ModalTab = Tab;
|
11568
11740
|
var ModalTabContainer = TabContainer;
|
11569
11741
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
11570
|
-
const Tab2 =
|
11742
|
+
const Tab2 = React75.forwardRef(
|
11571
11743
|
(_a, ref) => {
|
11572
11744
|
var _b = _a, {
|
11573
11745
|
id,
|
@@ -11599,17 +11771,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11599
11771
|
const _id = id != null ? id : kebabCase(title);
|
11600
11772
|
let statusIcon = void 0;
|
11601
11773
|
if (status === "warning") {
|
11602
|
-
statusIcon = /* @__PURE__ */
|
11774
|
+
statusIcon = /* @__PURE__ */ React75.createElement(InlineIcon, {
|
11603
11775
|
icon: import_warningSign4.default,
|
11604
11776
|
color: selected ? void 0 : "warning-80"
|
11605
11777
|
});
|
11606
11778
|
} else if (status === "error") {
|
11607
|
-
statusIcon = /* @__PURE__ */
|
11779
|
+
statusIcon = /* @__PURE__ */ React75.createElement(InlineIcon, {
|
11608
11780
|
icon: import_warningSign4.default,
|
11609
11781
|
color: selected ? void 0 : "error-50"
|
11610
11782
|
});
|
11611
11783
|
}
|
11612
|
-
const tab = /* @__PURE__ */
|
11784
|
+
const tab = /* @__PURE__ */ React75.createElement(Component, __spreadValues({
|
11613
11785
|
ref,
|
11614
11786
|
id: `${_id}-tab`,
|
11615
11787
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -11626,29 +11798,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11626
11798
|
"aria-selected": selected,
|
11627
11799
|
"aria-controls": `${_id}-panel`,
|
11628
11800
|
tabIndex: disabled ? void 0 : 0
|
11629
|
-
}, rest), /* @__PURE__ */
|
11801
|
+
}, rest), /* @__PURE__ */ React75.createElement(Typography2, {
|
11630
11802
|
htmlTag: "div",
|
11631
11803
|
variant: "small-strong",
|
11632
11804
|
color: selected ? "primary-80" : disabled ? "grey-20" : "current",
|
11633
11805
|
className: tw("inline-flex items-center gap-3")
|
11634
|
-
}, showNotification ? /* @__PURE__ */
|
11806
|
+
}, showNotification ? /* @__PURE__ */ React75.createElement(Badge.Notification, {
|
11635
11807
|
right: "-4px",
|
11636
11808
|
top: "3px"
|
11637
|
-
}, /* @__PURE__ */
|
11809
|
+
}, /* @__PURE__ */ React75.createElement("span", {
|
11638
11810
|
className: tw("whitespace-nowrap")
|
11639
|
-
}, title)) : /* @__PURE__ */
|
11811
|
+
}, title)) : /* @__PURE__ */ React75.createElement("span", {
|
11640
11812
|
className: tw("whitespace-nowrap")
|
11641
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
11813
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React75.createElement(Typography2, {
|
11642
11814
|
htmlTag: "span",
|
11643
11815
|
variant: "small",
|
11644
11816
|
color: selected ? "primary-80" : "grey-5",
|
11645
11817
|
className: "leading-none"
|
11646
|
-
}, /* @__PURE__ */
|
11818
|
+
}, /* @__PURE__ */ React75.createElement(TabBadge, {
|
11647
11819
|
kind: "filled",
|
11648
11820
|
value: badge,
|
11649
11821
|
textClassname: classNames({ "text-white": selected, "text-grey-50": !selected })
|
11650
11822
|
})), statusIcon));
|
11651
|
-
return tooltip ? /* @__PURE__ */
|
11823
|
+
return tooltip ? /* @__PURE__ */ React75.createElement(Tooltip, {
|
11652
11824
|
content: tooltip
|
11653
11825
|
}, tab) : tab;
|
11654
11826
|
}
|
@@ -11662,7 +11834,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11662
11834
|
const Tabs2 = (props) => {
|
11663
11835
|
var _a, _b;
|
11664
11836
|
const { className, value, defaultValue, onChange, children } = props;
|
11665
|
-
const childArr =
|
11837
|
+
const childArr = React75.Children.toArray(children);
|
11666
11838
|
const firstTab = childArr[0];
|
11667
11839
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
11668
11840
|
const [selected, setSelected] = useState10((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -11675,7 +11847,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11675
11847
|
var _a2, _b2;
|
11676
11848
|
const container = containerRef.current;
|
11677
11849
|
const tabs = tabsRef.current;
|
11678
|
-
const values =
|
11850
|
+
const values = React75.Children.map(
|
11679
11851
|
children,
|
11680
11852
|
(tab, i) => {
|
11681
11853
|
var _a3;
|
@@ -11716,7 +11888,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11716
11888
|
updateCarets();
|
11717
11889
|
setSelected(value);
|
11718
11890
|
revealSelectedTab({ smooth: value !== selected });
|
11719
|
-
}, [value,
|
11891
|
+
}, [value, React75.Children.count(children)]);
|
11720
11892
|
useLayoutEffect2(() => {
|
11721
11893
|
var _a2;
|
11722
11894
|
updateCarets();
|
@@ -11780,27 +11952,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11780
11952
|
const handleSelected = (key) => {
|
11781
11953
|
(onChange != null ? onChange : setSelected)(key);
|
11782
11954
|
};
|
11783
|
-
|
11955
|
+
React75.Children.forEach(children, (c) => {
|
11784
11956
|
if (c && !isTabComponent(c)) {
|
11785
11957
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
11786
11958
|
}
|
11787
11959
|
});
|
11788
|
-
return /* @__PURE__ */
|
11960
|
+
return /* @__PURE__ */ React75.createElement("div", {
|
11789
11961
|
ref: parentRef,
|
11790
11962
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
11791
|
-
}, /* @__PURE__ */
|
11963
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
11792
11964
|
className: tw("relative flex items-center border-b-2 border-grey-10")
|
11793
|
-
}, /* @__PURE__ */
|
11965
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
11794
11966
|
ref: containerRef,
|
11795
11967
|
className: tw("overflow-y-auto scrollbar-hide h-full mb-[-2px]")
|
11796
|
-
}, /* @__PURE__ */
|
11968
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
11797
11969
|
ref: tabsRef,
|
11798
11970
|
role: "tablist",
|
11799
11971
|
"aria-label": "tabs",
|
11800
11972
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
11801
|
-
},
|
11973
|
+
}, React75.Children.map(
|
11802
11974
|
children,
|
11803
|
-
(tab, index) => tab ? /* @__PURE__ */
|
11975
|
+
(tab, index) => tab ? /* @__PURE__ */ React75.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
11804
11976
|
key: tab.props.value
|
11805
11977
|
}, tab.props), {
|
11806
11978
|
index,
|
@@ -11808,20 +11980,20 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11808
11980
|
onKeyDown: handleKeyDown,
|
11809
11981
|
onSelected: handleSelected
|
11810
11982
|
})) : void 0
|
11811
|
-
))), leftCaret && /* @__PURE__ */
|
11983
|
+
))), leftCaret && /* @__PURE__ */ React75.createElement("div", {
|
11812
11984
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
11813
|
-
}, /* @__PURE__ */
|
11985
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
11814
11986
|
onClick: () => handleScrollToNext("left"),
|
11815
11987
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
11816
|
-
}, /* @__PURE__ */
|
11988
|
+
}, /* @__PURE__ */ React75.createElement(InlineIcon, {
|
11817
11989
|
icon: import_chevronLeft4.default
|
11818
|
-
}))), rightCaret && /* @__PURE__ */
|
11990
|
+
}))), rightCaret && /* @__PURE__ */ React75.createElement("div", {
|
11819
11991
|
onClick: () => handleScrollToNext("right"),
|
11820
11992
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
11821
|
-
}, /* @__PURE__ */
|
11993
|
+
}, /* @__PURE__ */ React75.createElement("div", {
|
11822
11994
|
onClick: () => handleScrollToNext("right"),
|
11823
11995
|
className: tw("hover:bg-grey-0 p-2 leading-none cursor-pointer")
|
11824
|
-
}, /* @__PURE__ */
|
11996
|
+
}, /* @__PURE__ */ React75.createElement(InlineIcon, {
|
11825
11997
|
icon: import_chevronRight4.default
|
11826
11998
|
})))), renderChildren(children, selected, props));
|
11827
11999
|
};
|
@@ -11829,7 +12001,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
11829
12001
|
Tabs2.Tab = TabComponent;
|
11830
12002
|
return Tabs2;
|
11831
12003
|
};
|
11832
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
12004
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React75.createElement(TabContainer, null, children.find(
|
11833
12005
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
11834
12006
|
)));
|
11835
12007
|
|
@@ -11846,8 +12018,8 @@ var WIDTHS = {
|
|
11846
12018
|
var Drawer = (_a) => {
|
11847
12019
|
var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
|
11848
12020
|
const { onClose, size = "sm", portalContainer } = props;
|
11849
|
-
const [hidden, setHidden] =
|
11850
|
-
const ref =
|
12021
|
+
const [hidden, setHidden] = React76.useState(!open);
|
12022
|
+
const ref = React76.useRef(null);
|
11851
12023
|
const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
|
11852
12024
|
useEffect10(() => {
|
11853
12025
|
if (open && hidden) {
|
@@ -11876,21 +12048,21 @@ var Drawer = (_a) => {
|
|
11876
12048
|
if (!state.isOpen) {
|
11877
12049
|
return null;
|
11878
12050
|
}
|
11879
|
-
return /* @__PURE__ */
|
12051
|
+
return /* @__PURE__ */ React76.createElement(Overlay3, {
|
11880
12052
|
portalContainer
|
11881
|
-
}, /* @__PURE__ */
|
12053
|
+
}, /* @__PURE__ */ React76.createElement(Modal, {
|
11882
12054
|
kind: "drawer",
|
11883
12055
|
className: "Aquarium-Drawer overflow-x-hidden",
|
11884
12056
|
open: true
|
11885
|
-
}, /* @__PURE__ */
|
12057
|
+
}, /* @__PURE__ */ React76.createElement(AnimatedBackDrop, __spreadValues({
|
11886
12058
|
style: { opacity }
|
11887
|
-
}, underlayProps)), /* @__PURE__ */
|
12059
|
+
}, underlayProps)), /* @__PURE__ */ React76.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
|
11888
12060
|
ref
|
11889
12061
|
}, props), modalProps), {
|
11890
12062
|
spring: { transform }
|
11891
12063
|
}))));
|
11892
12064
|
};
|
11893
|
-
var DrawerWrapper =
|
12065
|
+
var DrawerWrapper = React76.forwardRef(
|
11894
12066
|
(_a, ref) => {
|
11895
12067
|
var _b = _a, {
|
11896
12068
|
title,
|
@@ -11928,59 +12100,59 @@ var DrawerWrapper = React74.forwardRef(
|
|
11928
12100
|
);
|
11929
12101
|
const dialogSize = size === "lg" ? "full" : size;
|
11930
12102
|
const hasTabs = isComponentType(children, Tabs);
|
11931
|
-
return /* @__PURE__ */
|
12103
|
+
return /* @__PURE__ */ React76.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
11932
12104
|
ref,
|
11933
12105
|
kind: "drawer",
|
11934
12106
|
"aria-modal": "true",
|
11935
12107
|
size: dialogSize
|
11936
12108
|
}, props), dialogProps), {
|
11937
12109
|
style: __spreadValues({}, spring)
|
11938
|
-
}), /* @__PURE__ */
|
12110
|
+
}), /* @__PURE__ */ React76.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React76.createElement(Button.Icon, {
|
11939
12111
|
"aria-label": "Close",
|
11940
12112
|
icon: import_cross6.default,
|
11941
12113
|
onClick: onClose
|
11942
|
-
})), /* @__PURE__ */
|
12114
|
+
})), /* @__PURE__ */ React76.createElement(Modal.Header, {
|
11943
12115
|
className: tw({ "pb-3": hasTabs })
|
11944
|
-
}, /* @__PURE__ */
|
12116
|
+
}, /* @__PURE__ */ React76.createElement(Modal.Title, {
|
11945
12117
|
id: labelledBy,
|
11946
12118
|
kind: "drawer"
|
11947
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
12119
|
+
}, title)), hasTabs ? /* @__PURE__ */ React76.createElement(DrawerTabs, __spreadProps(__spreadValues({}, children.props), {
|
11948
12120
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
11949
|
-
})) : /* @__PURE__ */
|
12121
|
+
})) : /* @__PURE__ */ React76.createElement(Modal.Body, {
|
11950
12122
|
id: describedBy,
|
11951
12123
|
tabIndex: 0,
|
11952
12124
|
noFooter: !(secondaryActions || primaryAction)
|
11953
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
12125
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React76.createElement(Modal.Footer, null, /* @__PURE__ */ React76.createElement(Modal.Actions, {
|
11954
12126
|
className: size === "sm" ? tw("flex-col") : void 0
|
11955
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
12127
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React76.createElement(Box.Flex, {
|
11956
12128
|
alignItems: "center"
|
11957
|
-
}, /* @__PURE__ */
|
12129
|
+
}, /* @__PURE__ */ React76.createElement(DropdownMenu2, {
|
11958
12130
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
11959
12131
|
onOpenChange: onMenuOpenChange
|
11960
|
-
}, /* @__PURE__ */
|
12132
|
+
}, /* @__PURE__ */ React76.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React76.createElement(Button.Icon, {
|
11961
12133
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
11962
12134
|
icon: import_more4.default
|
11963
12135
|
})), menu)), secondaryActions && castArray(secondaryActions).filter(Boolean).map((_b2) => {
|
11964
12136
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
11965
|
-
return /* @__PURE__ */
|
12137
|
+
return /* @__PURE__ */ React76.createElement(Button.Secondary, __spreadValues({
|
11966
12138
|
key: text
|
11967
12139
|
}, action), text);
|
11968
|
-
}), primaryAction && /* @__PURE__ */
|
12140
|
+
}), primaryAction && /* @__PURE__ */ React76.createElement(Button.Primary, __spreadValues({
|
11969
12141
|
key: primaryAction.text
|
11970
12142
|
}, omit9(primaryAction, "text")), primaryAction.text))));
|
11971
12143
|
}
|
11972
12144
|
);
|
11973
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
12145
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React76.createElement(Modal.Body, {
|
11974
12146
|
className: tw("h-full")
|
11975
|
-
}, /* @__PURE__ */
|
12147
|
+
}, /* @__PURE__ */ React76.createElement(ModalTabContainer, null, children.find(
|
11976
12148
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
11977
12149
|
))));
|
11978
12150
|
|
11979
12151
|
// src/molecules/Dropdown/Dropdown.tsx
|
11980
|
-
import
|
12152
|
+
import React79 from "react";
|
11981
12153
|
|
11982
12154
|
// src/molecules/Popover/Popover.tsx
|
11983
|
-
import
|
12155
|
+
import React78, { useRef as useRef8 } from "react";
|
11984
12156
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
11985
12157
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
11986
12158
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
@@ -11989,12 +12161,12 @@ import classNames8 from "classnames";
|
|
11989
12161
|
import omit10 from "lodash/omit";
|
11990
12162
|
|
11991
12163
|
// src/molecules/Popover/Dialog.tsx
|
11992
|
-
import
|
12164
|
+
import React77 from "react";
|
11993
12165
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
11994
12166
|
var Dialog2 = ({ children }) => {
|
11995
|
-
const ref =
|
12167
|
+
const ref = React77.useRef(null);
|
11996
12168
|
const { dialogProps } = useDialog3({}, ref);
|
11997
|
-
return /* @__PURE__ */
|
12169
|
+
return /* @__PURE__ */ React77.createElement("div", __spreadProps(__spreadValues({
|
11998
12170
|
ref
|
11999
12171
|
}, dialogProps), {
|
12000
12172
|
className: tw("outline-none")
|
@@ -12028,22 +12200,22 @@ var Popover2 = (props) => {
|
|
12028
12200
|
const triggerRef = useRef8(null);
|
12029
12201
|
const state = useOverlayTriggerState4(props);
|
12030
12202
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
12031
|
-
return /* @__PURE__ */
|
12203
|
+
return /* @__PURE__ */ React78.createElement(PopoverContext.Provider, {
|
12032
12204
|
value: {
|
12033
12205
|
state
|
12034
12206
|
}
|
12035
|
-
},
|
12207
|
+
}, React78.Children.map(props.children, (child) => {
|
12036
12208
|
if (isComponentType(child, Popover2.Trigger)) {
|
12037
|
-
return /* @__PURE__ */
|
12209
|
+
return /* @__PURE__ */ React78.createElement(PressResponder2, __spreadValues({
|
12038
12210
|
ref: triggerRef
|
12039
|
-
}, omit10(triggerProps, "aria-expanded")), /* @__PURE__ */
|
12211
|
+
}, omit10(triggerProps, "aria-expanded")), /* @__PURE__ */ React78.createElement(PopoverTriggerWrapper, {
|
12040
12212
|
"data-testid": props["data-testid"],
|
12041
12213
|
"aria-controls": id,
|
12042
12214
|
"aria-expanded": triggerProps["aria-expanded"]
|
12043
12215
|
}, child.props.children));
|
12044
12216
|
}
|
12045
12217
|
if (isComponentType(child, Popover2.Panel)) {
|
12046
|
-
return state.isOpen && /* @__PURE__ */
|
12218
|
+
return state.isOpen && /* @__PURE__ */ React78.createElement(PopoverOverlay, __spreadValues({
|
12047
12219
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
12048
12220
|
state,
|
12049
12221
|
placement,
|
@@ -12054,7 +12226,7 @@ var Popover2 = (props) => {
|
|
12054
12226
|
offset,
|
12055
12227
|
crossOffset,
|
12056
12228
|
shouldFlip
|
12057
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
12229
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React78.createElement(Dialog2, null, child.props.children) : child.props.children);
|
12058
12230
|
}
|
12059
12231
|
throw new Error("Invalid children element type");
|
12060
12232
|
}));
|
@@ -12073,7 +12245,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
12073
12245
|
state.close();
|
12074
12246
|
onClick == null ? void 0 : onClick(e);
|
12075
12247
|
};
|
12076
|
-
return /* @__PURE__ */
|
12248
|
+
return /* @__PURE__ */ React78.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
12077
12249
|
onClick: handleClick
|
12078
12250
|
}));
|
12079
12251
|
};
|
@@ -12086,9 +12258,9 @@ var PopoverTriggerWrapper = (_a) => {
|
|
12086
12258
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12087
12259
|
var _a2;
|
12088
12260
|
const ref = useRef8(null);
|
12089
|
-
const trigger =
|
12261
|
+
const trigger = React78.Children.only(children);
|
12090
12262
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
12091
|
-
return
|
12263
|
+
return React78.cloneElement(trigger, __spreadProps(__spreadValues({
|
12092
12264
|
"ref": ref
|
12093
12265
|
}, mergeProps3(pressProps, trigger.props)), {
|
12094
12266
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -12097,10 +12269,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
12097
12269
|
|
12098
12270
|
// src/molecules/Dropdown/Dropdown.tsx
|
12099
12271
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
12100
|
-
return /* @__PURE__ */
|
12272
|
+
return /* @__PURE__ */ React79.createElement(Popover2, {
|
12101
12273
|
type: "menu",
|
12102
12274
|
placement
|
12103
|
-
}, /* @__PURE__ */
|
12275
|
+
}, /* @__PURE__ */ React79.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React79.createElement(Popover2.Panel, {
|
12104
12276
|
className: "Aquarium-Dropdown"
|
12105
12277
|
}, content));
|
12106
12278
|
};
|
@@ -12111,26 +12283,26 @@ var DropdownMenu3 = ({
|
|
12111
12283
|
triggerId,
|
12112
12284
|
setClose = () => void 0
|
12113
12285
|
}) => {
|
12114
|
-
const menuRef =
|
12115
|
-
|
12286
|
+
const menuRef = React79.useRef(null);
|
12287
|
+
React79.useEffect(() => {
|
12116
12288
|
const id = setTimeout(() => {
|
12117
12289
|
var _a, _b, _c;
|
12118
12290
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
12119
12291
|
});
|
12120
12292
|
return () => clearTimeout(id);
|
12121
12293
|
}, [menuRef.current]);
|
12122
|
-
return /* @__PURE__ */
|
12294
|
+
return /* @__PURE__ */ React79.createElement("div", {
|
12123
12295
|
style: { minWidth: "250px" },
|
12124
12296
|
className: tw("py-3 bg-white")
|
12125
|
-
}, !!title && /* @__PURE__ */
|
12297
|
+
}, !!title && /* @__PURE__ */ React79.createElement("div", {
|
12126
12298
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
12127
|
-
}, title), /* @__PURE__ */
|
12299
|
+
}, title), /* @__PURE__ */ React79.createElement("ol", {
|
12128
12300
|
role: "menu",
|
12129
12301
|
ref: menuRef,
|
12130
12302
|
id: contentId,
|
12131
12303
|
"aria-labelledby": triggerId
|
12132
|
-
},
|
12133
|
-
return
|
12304
|
+
}, React79.Children.map(children, (child) => {
|
12305
|
+
return React79.cloneElement(child, { setClose });
|
12134
12306
|
})));
|
12135
12307
|
};
|
12136
12308
|
var DropdownItem = (_a) => {
|
@@ -12185,10 +12357,10 @@ var DropdownItem = (_a) => {
|
|
12185
12357
|
handleSelect();
|
12186
12358
|
}
|
12187
12359
|
};
|
12188
|
-
const itemContent = /* @__PURE__ */
|
12360
|
+
const itemContent = /* @__PURE__ */ React79.createElement("div", {
|
12189
12361
|
className: tw("py-3 px-4")
|
12190
12362
|
}, children);
|
12191
|
-
return /* @__PURE__ */
|
12363
|
+
return /* @__PURE__ */ React79.createElement("li", __spreadProps(__spreadValues({
|
12192
12364
|
role: "menuitem",
|
12193
12365
|
tabIndex: -1,
|
12194
12366
|
onClick: handleClick,
|
@@ -12199,11 +12371,11 @@ var DropdownItem = (_a) => {
|
|
12199
12371
|
"text-grey-10 cursor-not-allowed": disabled,
|
12200
12372
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
12201
12373
|
})
|
12202
|
-
}), tooltip ? /* @__PURE__ */
|
12374
|
+
}), tooltip ? /* @__PURE__ */ React79.createElement(Tooltip, {
|
12203
12375
|
content: tooltip,
|
12204
12376
|
placement: tooltipPlacement,
|
12205
12377
|
inline: false
|
12206
|
-
}, /* @__PURE__ */
|
12378
|
+
}, /* @__PURE__ */ React79.createElement("div", {
|
12207
12379
|
tabIndex: 0,
|
12208
12380
|
className: tw("grow")
|
12209
12381
|
}, itemContent)) : itemContent);
|
@@ -12212,7 +12384,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
12212
12384
|
Dropdown.Item = DropdownItem;
|
12213
12385
|
|
12214
12386
|
// src/molecules/EmptyState/EmptyState.tsx
|
12215
|
-
import
|
12387
|
+
import React80 from "react";
|
12216
12388
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
12217
12389
|
EmptyStateLayout2["Vertical"] = "vertical";
|
12218
12390
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -12269,7 +12441,7 @@ var EmptyState = ({
|
|
12269
12441
|
fullHeight = isVerticalLayout(layout) ? true : false
|
12270
12442
|
}) => {
|
12271
12443
|
const template = layoutStyle(layout);
|
12272
|
-
return /* @__PURE__ */
|
12444
|
+
return /* @__PURE__ */ React80.createElement(Box, {
|
12273
12445
|
className: classNames(
|
12274
12446
|
"Aquarium-EmptyState",
|
12275
12447
|
tw("rounded p-[56px]", {
|
@@ -12282,39 +12454,39 @@ var EmptyState = ({
|
|
12282
12454
|
),
|
12283
12455
|
backgroundColor: "transparent",
|
12284
12456
|
borderColor: "grey-10"
|
12285
|
-
}, /* @__PURE__ */
|
12457
|
+
}, /* @__PURE__ */ React80.createElement(Box.Flex, {
|
12286
12458
|
style: { gap: "56px" },
|
12287
12459
|
flexDirection: template.layout,
|
12288
12460
|
justifyContent: template.justifyContent,
|
12289
12461
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
12290
12462
|
height: fullHeight ? "full" : void 0
|
12291
|
-
}, image && /* @__PURE__ */
|
12463
|
+
}, image && /* @__PURE__ */ React80.createElement("img", {
|
12292
12464
|
src: image,
|
12293
12465
|
alt: imageAlt,
|
12294
12466
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
12295
|
-
}), /* @__PURE__ */
|
12467
|
+
}), /* @__PURE__ */ React80.createElement(Box.Flex, {
|
12296
12468
|
flexDirection: "column",
|
12297
12469
|
justifyContent: template.justifyContent,
|
12298
12470
|
alignItems: template.alignItems
|
12299
|
-
}, /* @__PURE__ */
|
12471
|
+
}, /* @__PURE__ */ React80.createElement(Typography2.Heading, {
|
12300
12472
|
htmlTag: "h2"
|
12301
|
-
}, title), (description || children) && /* @__PURE__ */
|
12473
|
+
}, title), (description || children) && /* @__PURE__ */ React80.createElement(Box, {
|
12302
12474
|
marginTop: "5"
|
12303
|
-
}, /* @__PURE__ */
|
12475
|
+
}, /* @__PURE__ */ React80.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React80.createElement(Box.Flex, {
|
12304
12476
|
marginTop: "7",
|
12305
12477
|
gap: "4",
|
12306
12478
|
justifyContent: "center",
|
12307
12479
|
alignItems: "center",
|
12308
12480
|
flexWrap: "wrap"
|
12309
|
-
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */
|
12481
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React80.createElement(Box, {
|
12310
12482
|
marginTop: "5"
|
12311
|
-
}, /* @__PURE__ */
|
12483
|
+
}, /* @__PURE__ */ React80.createElement(Typography2.Small, {
|
12312
12484
|
color: "grey-60"
|
12313
12485
|
}, footer)))));
|
12314
12486
|
};
|
12315
12487
|
|
12316
12488
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
12317
|
-
import
|
12489
|
+
import React81 from "react";
|
12318
12490
|
var FlexboxItem = Tailwindify(
|
12319
12491
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
12320
12492
|
const hookStyle = useStyle({
|
@@ -12326,7 +12498,7 @@ var FlexboxItem = Tailwindify(
|
|
12326
12498
|
alignSelf
|
12327
12499
|
});
|
12328
12500
|
const HtmlElement = htmlTag;
|
12329
|
-
return /* @__PURE__ */
|
12501
|
+
return /* @__PURE__ */ React81.createElement(HtmlElement, {
|
12330
12502
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
12331
12503
|
className
|
12332
12504
|
}, children);
|
@@ -12334,7 +12506,7 @@ var FlexboxItem = Tailwindify(
|
|
12334
12506
|
);
|
12335
12507
|
|
12336
12508
|
// src/molecules/Grid/GridItem.tsx
|
12337
|
-
import
|
12509
|
+
import React82 from "react";
|
12338
12510
|
var GridItem2 = Tailwindify(
|
12339
12511
|
({
|
12340
12512
|
htmlTag = "div",
|
@@ -12365,7 +12537,7 @@ var GridItem2 = Tailwindify(
|
|
12365
12537
|
gridRowEnd: rowEnd
|
12366
12538
|
});
|
12367
12539
|
const HtmlElement = htmlTag;
|
12368
|
-
return /* @__PURE__ */
|
12540
|
+
return /* @__PURE__ */ React82.createElement(HtmlElement, {
|
12369
12541
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
12370
12542
|
className
|
12371
12543
|
}, children);
|
@@ -12373,7 +12545,7 @@ var GridItem2 = Tailwindify(
|
|
12373
12545
|
);
|
12374
12546
|
|
12375
12547
|
// src/molecules/LineClamp/LineClamp.tsx
|
12376
|
-
import
|
12548
|
+
import React83 from "react";
|
12377
12549
|
var LineClamp2 = ({
|
12378
12550
|
lines,
|
12379
12551
|
children,
|
@@ -12382,10 +12554,10 @@ var LineClamp2 = ({
|
|
12382
12554
|
collapseLabel,
|
12383
12555
|
onClampedChange
|
12384
12556
|
}) => {
|
12385
|
-
const ref =
|
12386
|
-
const [clamped, setClamped] =
|
12387
|
-
const [isClampingEnabled, setClampingEnabled] =
|
12388
|
-
|
12557
|
+
const ref = React83.useRef(null);
|
12558
|
+
const [clamped, setClamped] = React83.useState(true);
|
12559
|
+
const [isClampingEnabled, setClampingEnabled] = React83.useState(false);
|
12560
|
+
React83.useEffect(() => {
|
12389
12561
|
var _a, _b;
|
12390
12562
|
const el = ref.current;
|
12391
12563
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -12394,28 +12566,28 @@ var LineClamp2 = ({
|
|
12394
12566
|
setClamped(!clamped);
|
12395
12567
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
12396
12568
|
};
|
12397
|
-
return /* @__PURE__ */
|
12569
|
+
return /* @__PURE__ */ React83.createElement("div", {
|
12398
12570
|
className: "Aquarium-LineClamp"
|
12399
|
-
}, /* @__PURE__ */
|
12571
|
+
}, /* @__PURE__ */ React83.createElement(LineClamp, {
|
12400
12572
|
ref,
|
12401
12573
|
lines,
|
12402
12574
|
clamped,
|
12403
12575
|
wordBreak
|
12404
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
12576
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React83.createElement(Button.Ghost, {
|
12405
12577
|
dense: true,
|
12406
12578
|
onClick: handleClampedChange
|
12407
12579
|
}, clamped ? expandLabel : collapseLabel));
|
12408
12580
|
};
|
12409
12581
|
|
12410
12582
|
// src/molecules/Link/Link.tsx
|
12411
|
-
import
|
12583
|
+
import React85 from "react";
|
12412
12584
|
import classNames9 from "classnames";
|
12413
12585
|
|
12414
12586
|
// src/atoms/Link/Link.tsx
|
12415
|
-
import
|
12587
|
+
import React84 from "react";
|
12416
12588
|
var Link = (_a) => {
|
12417
12589
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
12418
|
-
return /* @__PURE__ */
|
12590
|
+
return /* @__PURE__ */ React84.createElement("a", __spreadValues({
|
12419
12591
|
className: classNames(className, linkStyle)
|
12420
12592
|
}, props), children);
|
12421
12593
|
};
|
@@ -12423,27 +12595,27 @@ var Link = (_a) => {
|
|
12423
12595
|
// src/molecules/Link/Link.tsx
|
12424
12596
|
var Link2 = (_a) => {
|
12425
12597
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
12426
|
-
return /* @__PURE__ */
|
12598
|
+
return /* @__PURE__ */ React85.createElement(Link, __spreadValues({
|
12427
12599
|
className: classNames9("Aquarium-Link", className)
|
12428
12600
|
}, props));
|
12429
12601
|
};
|
12430
12602
|
|
12431
12603
|
// src/molecules/List/useStaticInfiniteList.ts
|
12432
|
-
import
|
12604
|
+
import React86 from "react";
|
12433
12605
|
var useStaticInfiniteList = ({
|
12434
12606
|
items,
|
12435
12607
|
pageSize,
|
12436
12608
|
autoReset = true
|
12437
12609
|
}) => {
|
12438
|
-
const [currentPage, setCurrentPage] =
|
12610
|
+
const [currentPage, setCurrentPage] = React86.useState(1);
|
12439
12611
|
const numberOfVisible = currentPage * pageSize;
|
12440
|
-
const next =
|
12612
|
+
const next = React86.useCallback(() => {
|
12441
12613
|
setCurrentPage((page) => page + 1);
|
12442
12614
|
}, [setCurrentPage]);
|
12443
|
-
const reset =
|
12615
|
+
const reset = React86.useCallback(() => {
|
12444
12616
|
setCurrentPage(1);
|
12445
12617
|
}, [setCurrentPage]);
|
12446
|
-
|
12618
|
+
React86.useEffect(() => {
|
12447
12619
|
if (autoReset) {
|
12448
12620
|
setCurrentPage(1);
|
12449
12621
|
}
|
@@ -12458,17 +12630,17 @@ var useStaticInfiniteList = ({
|
|
12458
12630
|
};
|
12459
12631
|
|
12460
12632
|
// src/molecules/ListItem/ListItem.tsx
|
12461
|
-
import
|
12633
|
+
import React87 from "react";
|
12462
12634
|
var ListItem = ({ name, icon, active = false }) => {
|
12463
|
-
return /* @__PURE__ */
|
12635
|
+
return /* @__PURE__ */ React87.createElement(Box.Flex, {
|
12464
12636
|
className: "Aquarium-ListItem",
|
12465
12637
|
alignItems: "center"
|
12466
|
-
}, /* @__PURE__ */
|
12638
|
+
}, /* @__PURE__ */ React87.createElement(Typography2, {
|
12467
12639
|
variant: active ? "small-strong" : "small",
|
12468
12640
|
color: "grey-70",
|
12469
12641
|
htmlTag: "span",
|
12470
12642
|
className: `px-4 py-2 rounded-full ${active ? "bg-grey-5" : "hover:bg-grey-0"}`
|
12471
|
-
}, /* @__PURE__ */
|
12643
|
+
}, /* @__PURE__ */ React87.createElement("img", {
|
12472
12644
|
src: icon,
|
12473
12645
|
alt: "",
|
12474
12646
|
className: "inline mr-4",
|
@@ -12478,7 +12650,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
12478
12650
|
};
|
12479
12651
|
|
12480
12652
|
// src/molecules/Modal/Modal.tsx
|
12481
|
-
import
|
12653
|
+
import React88 from "react";
|
12482
12654
|
import { useDialog as useDialog4 } from "@react-aria/dialog";
|
12483
12655
|
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
12484
12656
|
import { useId as useId10 } from "@react-aria/utils";
|
@@ -12489,7 +12661,7 @@ var import_cross7 = __toESM(require_cross());
|
|
12489
12661
|
var Modal2 = (_a) => {
|
12490
12662
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
12491
12663
|
const { open, onClose, size, portalContainer } = props;
|
12492
|
-
const ref =
|
12664
|
+
const ref = React88.useRef(null);
|
12493
12665
|
const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
12494
12666
|
const { modalProps, underlayProps } = useModalOverlay3(
|
12495
12667
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -12499,17 +12671,17 @@ var Modal2 = (_a) => {
|
|
12499
12671
|
if (!state.isOpen) {
|
12500
12672
|
return null;
|
12501
12673
|
}
|
12502
|
-
return /* @__PURE__ */
|
12674
|
+
return /* @__PURE__ */ React88.createElement(Overlay4, {
|
12503
12675
|
portalContainer
|
12504
|
-
}, /* @__PURE__ */
|
12676
|
+
}, /* @__PURE__ */ React88.createElement(Modal, {
|
12505
12677
|
className: "Aquarium-Modal",
|
12506
12678
|
open: true
|
12507
|
-
}, /* @__PURE__ */
|
12679
|
+
}, /* @__PURE__ */ React88.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React88.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
12508
12680
|
ref,
|
12509
12681
|
size
|
12510
12682
|
}, props), modalProps))));
|
12511
12683
|
};
|
12512
|
-
var ModalWrapper =
|
12684
|
+
var ModalWrapper = React88.forwardRef(
|
12513
12685
|
(_a, ref) => {
|
12514
12686
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
12515
12687
|
const labelledBy = useId10();
|
@@ -12518,30 +12690,30 @@ var ModalWrapper = React86.forwardRef(
|
|
12518
12690
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
12519
12691
|
ref
|
12520
12692
|
);
|
12521
|
-
return /* @__PURE__ */
|
12693
|
+
return /* @__PURE__ */ React88.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
12522
12694
|
ref
|
12523
12695
|
}, props), dialogProps), {
|
12524
12696
|
tabIndex: -1
|
12525
|
-
}), /* @__PURE__ */
|
12697
|
+
}), /* @__PURE__ */ React88.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React88.createElement(IconButton, {
|
12526
12698
|
"aria-label": "Close",
|
12527
12699
|
icon: import_cross7.default,
|
12528
12700
|
onClick: onClose
|
12529
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
12701
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React88.createElement(Modal.HeaderImage, {
|
12530
12702
|
backgroundImage: headerImage
|
12531
|
-
}), /* @__PURE__ */
|
12703
|
+
}), /* @__PURE__ */ React88.createElement(Modal.Header, {
|
12532
12704
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
12533
|
-
}, /* @__PURE__ */
|
12705
|
+
}, /* @__PURE__ */ React88.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React88.createElement(Modal.Title, {
|
12534
12706
|
id: labelledBy
|
12535
|
-
}, title), subtitle && /* @__PURE__ */
|
12707
|
+
}, title), subtitle && /* @__PURE__ */ React88.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React88.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React88.createElement(Modal.Body, {
|
12536
12708
|
id: describedBy,
|
12537
12709
|
tabIndex: 0,
|
12538
12710
|
noFooter: !(secondaryActions || primaryAction)
|
12539
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
12711
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React88.createElement(Modal.Footer, null, /* @__PURE__ */ React88.createElement(Modal.Actions, null, secondaryActions && castArray2(secondaryActions).filter(Boolean).map((_a2) => {
|
12540
12712
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
12541
|
-
return /* @__PURE__ */
|
12713
|
+
return /* @__PURE__ */ React88.createElement(Button.Secondary, __spreadValues({
|
12542
12714
|
key: text
|
12543
12715
|
}, action), text);
|
12544
|
-
}), primaryAction && /* @__PURE__ */
|
12716
|
+
}), primaryAction && /* @__PURE__ */ React88.createElement(Button.Primary, __spreadValues({
|
12545
12717
|
key: primaryAction.text
|
12546
12718
|
}, omit11(primaryAction, "text")), primaryAction.text))));
|
12547
12719
|
}
|
@@ -12550,24 +12722,24 @@ var ModalTabs = createTabsComponent(
|
|
12550
12722
|
ModalTab,
|
12551
12723
|
TabItem,
|
12552
12724
|
"ModalTabs",
|
12553
|
-
(children, selected, props) => /* @__PURE__ */
|
12725
|
+
(children, selected, props) => /* @__PURE__ */ React88.createElement(Modal.Body, {
|
12554
12726
|
maxHeight: props.maxHeight
|
12555
|
-
}, /* @__PURE__ */
|
12727
|
+
}, /* @__PURE__ */ React88.createElement(ModalTabContainer, null, children.find(
|
12556
12728
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
12557
12729
|
)))
|
12558
12730
|
);
|
12559
12731
|
|
12560
12732
|
// src/molecules/MultiInput/MultiInput.tsx
|
12561
|
-
import
|
12733
|
+
import React90, { useEffect as useEffect11, useRef as useRef9, useState as useState11 } from "react";
|
12562
12734
|
import { useId as useId11 } from "@react-aria/utils";
|
12563
12735
|
import castArray3 from "lodash/castArray";
|
12564
12736
|
import identity from "lodash/identity";
|
12565
12737
|
import omit12 from "lodash/omit";
|
12566
12738
|
|
12567
12739
|
// src/molecules/MultiInput/InputChip.tsx
|
12568
|
-
import
|
12740
|
+
import React89 from "react";
|
12569
12741
|
var import_smallCross2 = __toESM(require_smallCross());
|
12570
|
-
var InputChip =
|
12742
|
+
var InputChip = React89.forwardRef(
|
12571
12743
|
(_a, ref) => {
|
12572
12744
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
12573
12745
|
const onClick = (e) => {
|
@@ -12575,18 +12747,18 @@ var InputChip = React87.forwardRef(
|
|
12575
12747
|
_onClick == null ? void 0 : _onClick(e);
|
12576
12748
|
}
|
12577
12749
|
};
|
12578
|
-
return /* @__PURE__ */
|
12750
|
+
return /* @__PURE__ */ React89.createElement("div", {
|
12579
12751
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
12580
12752
|
"bg-error-0 ": invalid,
|
12581
12753
|
"bg-grey-0 ": !invalid && !disabled,
|
12582
12754
|
"bg-grey-5": disabled
|
12583
12755
|
})
|
12584
|
-
}, /* @__PURE__ */
|
12756
|
+
}, /* @__PURE__ */ React89.createElement("div", {
|
12585
12757
|
className: tw("px-2 py-1")
|
12586
|
-
}, /* @__PURE__ */
|
12758
|
+
}, /* @__PURE__ */ React89.createElement(Typography2, {
|
12587
12759
|
variant: "small",
|
12588
12760
|
color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
|
12589
|
-
}, children)), !readOnly && /* @__PURE__ */
|
12761
|
+
}, children)), !readOnly && /* @__PURE__ */ React89.createElement("div", __spreadProps(__spreadValues({
|
12590
12762
|
ref
|
12591
12763
|
}, props), {
|
12592
12764
|
onClick,
|
@@ -12597,7 +12769,7 @@ var InputChip = React87.forwardRef(
|
|
12597
12769
|
}),
|
12598
12770
|
role: "button",
|
12599
12771
|
"aria-label": `Remove ${String(children)}`
|
12600
|
-
}), /* @__PURE__ */
|
12772
|
+
}), /* @__PURE__ */ React89.createElement(Icon, {
|
12601
12773
|
icon: import_smallCross2.default,
|
12602
12774
|
className: tw({
|
12603
12775
|
"text-error-70": invalid,
|
@@ -12738,7 +12910,7 @@ var MultiInputBase = (_a) => {
|
|
12738
12910
|
};
|
12739
12911
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
12740
12912
|
var _a3;
|
12741
|
-
return /* @__PURE__ */
|
12913
|
+
return /* @__PURE__ */ React90.createElement(InputChip, {
|
12742
12914
|
key: `${itemToString(item)}.${index}`,
|
12743
12915
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
12744
12916
|
readOnly,
|
@@ -12749,13 +12921,13 @@ var MultiInputBase = (_a) => {
|
|
12749
12921
|
}
|
12750
12922
|
}, itemToString(item));
|
12751
12923
|
});
|
12752
|
-
return /* @__PURE__ */
|
12924
|
+
return /* @__PURE__ */ React90.createElement("div", {
|
12753
12925
|
className: "Aquarium-MultiInputBase"
|
12754
|
-
}, /* @__PURE__ */
|
12926
|
+
}, /* @__PURE__ */ React90.createElement(Select.InputContainer, {
|
12755
12927
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
12756
|
-
}, /* @__PURE__ */
|
12928
|
+
}, /* @__PURE__ */ React90.createElement("div", {
|
12757
12929
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
12758
|
-
}, inline && renderChips(), /* @__PURE__ */
|
12930
|
+
}, inline && renderChips(), /* @__PURE__ */ React90.createElement(Select.Input, __spreadProps(__spreadValues({
|
12759
12931
|
ref: inputRef,
|
12760
12932
|
id: id != null ? id : name,
|
12761
12933
|
name,
|
@@ -12773,11 +12945,11 @@ var MultiInputBase = (_a) => {
|
|
12773
12945
|
onFocus: handleFocus,
|
12774
12946
|
onBlur: handleBlur,
|
12775
12947
|
autoComplete: "off"
|
12776
|
-
}))), endAdornment && /* @__PURE__ */
|
12948
|
+
}))), endAdornment && /* @__PURE__ */ React90.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React90.createElement("div", {
|
12777
12949
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
12778
12950
|
}, renderChips()));
|
12779
12951
|
};
|
12780
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
12952
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React90.createElement(Skeleton, {
|
12781
12953
|
height: 38
|
12782
12954
|
});
|
12783
12955
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -12795,7 +12967,7 @@ var MultiInput = (props) => {
|
|
12795
12967
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12796
12968
|
const labelControlProps = getLabelControlProps(props);
|
12797
12969
|
const baseProps = omit12(props, Object.keys(labelControlProps));
|
12798
|
-
return /* @__PURE__ */
|
12970
|
+
return /* @__PURE__ */ React90.createElement(LabelControl, __spreadProps(__spreadValues({
|
12799
12971
|
id: `${id}-label`,
|
12800
12972
|
htmlFor: `${id}-input`,
|
12801
12973
|
messageId: errorMessageId
|
@@ -12803,7 +12975,7 @@ var MultiInput = (props) => {
|
|
12803
12975
|
length: value.length,
|
12804
12976
|
maxLength,
|
12805
12977
|
className: "Aquarium-MultiInput"
|
12806
|
-
}), /* @__PURE__ */
|
12978
|
+
}), /* @__PURE__ */ React90.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
12807
12979
|
id: `${id}-input`,
|
12808
12980
|
onChange: (value2) => {
|
12809
12981
|
var _a2;
|
@@ -12815,16 +12987,16 @@ var MultiInput = (props) => {
|
|
12815
12987
|
valid: props.valid
|
12816
12988
|
})));
|
12817
12989
|
};
|
12818
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
12990
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React90.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React90.createElement(MultiInputBase.Skeleton, null));
|
12819
12991
|
MultiInput.Skeleton = MultiInputSkeleton;
|
12820
12992
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
12821
12993
|
|
12822
12994
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
12823
|
-
import
|
12995
|
+
import React91, { useEffect as useEffect12, useRef as useRef10, useState as useState12 } from "react";
|
12824
12996
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
12825
12997
|
import { useId as useId12 } from "@react-aria/utils";
|
12826
12998
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
12827
|
-
import
|
12999
|
+
import isArray4 from "lodash/isArray";
|
12828
13000
|
import isEqual from "lodash/isEqual";
|
12829
13001
|
import isNil2 from "lodash/isNil";
|
12830
13002
|
import isObject2 from "lodash/isObject";
|
@@ -12832,7 +13004,7 @@ import omit13 from "lodash/omit";
|
|
12832
13004
|
import omitBy from "lodash/omitBy";
|
12833
13005
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
12834
13006
|
var isOptionGroup = (option) => {
|
12835
|
-
return isObject2(option) && "options" in option &&
|
13007
|
+
return isObject2(option) && "options" in option && isArray4(option.options);
|
12836
13008
|
};
|
12837
13009
|
var hasOptionGroups2 = (options) => {
|
12838
13010
|
return options.some(isOptionGroup);
|
@@ -12980,16 +13152,16 @@ var MultiSelectBase = (_a) => {
|
|
12980
13152
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
12981
13153
|
}
|
12982
13154
|
}, [state.isOpen, inputRef, popoverRef]);
|
12983
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
13155
|
+
const renderItem = (item, index) => /* @__PURE__ */ React91.createElement(Select.Item, __spreadValues({
|
12984
13156
|
key: itemToString(item),
|
12985
13157
|
highlighted: index === highlightedIndex,
|
12986
13158
|
selected: selectedItems.includes(item)
|
12987
13159
|
}, getItemProps({ item, index })), renderOption(item));
|
12988
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
13160
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React91.createElement(React91.Fragment, {
|
12989
13161
|
key: group.label
|
12990
|
-
}, /* @__PURE__ */
|
13162
|
+
}, /* @__PURE__ */ React91.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
12991
13163
|
const renderChips = () => {
|
12992
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
13164
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React91.createElement(InputChip, __spreadProps(__spreadValues({
|
12993
13165
|
key: `${itemToString(selectedItem)}.chip`,
|
12994
13166
|
className: tw("mx-0"),
|
12995
13167
|
disabled,
|
@@ -13007,14 +13179,14 @@ var MultiSelectBase = (_a) => {
|
|
13007
13179
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
13008
13180
|
);
|
13009
13181
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
13010
|
-
return /* @__PURE__ */
|
13182
|
+
return /* @__PURE__ */ React91.createElement("div", {
|
13011
13183
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
13012
|
-
}, /* @__PURE__ */
|
13184
|
+
}, /* @__PURE__ */ React91.createElement(Select.InputContainer, {
|
13013
13185
|
ref: targetRef,
|
13014
13186
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
13015
|
-
}, /* @__PURE__ */
|
13187
|
+
}, /* @__PURE__ */ React91.createElement("div", {
|
13016
13188
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
13017
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
13189
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React91.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
13018
13190
|
name,
|
13019
13191
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
13020
13192
|
}, inputProps), props), {
|
@@ -13033,12 +13205,12 @@ var MultiSelectBase = (_a) => {
|
|
13033
13205
|
setFocus(false);
|
13034
13206
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
13035
13207
|
}
|
13036
|
-
}))), !readOnly && /* @__PURE__ */
|
13208
|
+
}))), !readOnly && /* @__PURE__ */ React91.createElement(Select.Toggle, __spreadValues({
|
13037
13209
|
hasFocus,
|
13038
13210
|
isOpen
|
13039
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
13211
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React91.createElement("div", {
|
13040
13212
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
13041
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
13213
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React91.createElement(PopoverOverlay, {
|
13042
13214
|
ref: popoverRef,
|
13043
13215
|
triggerRef: targetRef,
|
13044
13216
|
state,
|
@@ -13046,13 +13218,13 @@ var MultiSelectBase = (_a) => {
|
|
13046
13218
|
shouldFlip: true,
|
13047
13219
|
isNonModal: true,
|
13048
13220
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
13049
|
-
}, /* @__PURE__ */
|
13221
|
+
}, /* @__PURE__ */ React91.createElement(Select.Menu, __spreadValues({
|
13050
13222
|
maxHeight
|
13051
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
13223
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React91.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
13052
13224
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
13053
13225
|
))));
|
13054
13226
|
};
|
13055
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
13227
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React91.createElement(Skeleton, {
|
13056
13228
|
height: 38
|
13057
13229
|
});
|
13058
13230
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -13073,13 +13245,13 @@ var MultiSelect = (_a) => {
|
|
13073
13245
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13074
13246
|
const labelControlProps = getLabelControlProps(props);
|
13075
13247
|
const baseProps = omit13(props, Object.keys(labelControlProps));
|
13076
|
-
return /* @__PURE__ */
|
13248
|
+
return /* @__PURE__ */ React91.createElement(LabelControl, __spreadProps(__spreadValues({
|
13077
13249
|
id: `${id}-label`,
|
13078
13250
|
htmlFor: `${id}-input`,
|
13079
13251
|
messageId: errorMessageId
|
13080
13252
|
}, labelControlProps), {
|
13081
13253
|
className: "Aquarium-MultiSelect"
|
13082
|
-
}), /* @__PURE__ */
|
13254
|
+
}), /* @__PURE__ */ React91.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
13083
13255
|
id,
|
13084
13256
|
options,
|
13085
13257
|
emptyState,
|
@@ -13087,17 +13259,17 @@ var MultiSelect = (_a) => {
|
|
13087
13259
|
valid: props.valid
|
13088
13260
|
})));
|
13089
13261
|
};
|
13090
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
13262
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React91.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React91.createElement(MultiSelectBase.Skeleton, null));
|
13091
13263
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
13092
13264
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
13093
13265
|
|
13094
13266
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
13095
|
-
import
|
13267
|
+
import React92 from "react";
|
13096
13268
|
import { useId as useId13 } from "@react-aria/utils";
|
13097
13269
|
import omit14 from "lodash/omit";
|
13098
13270
|
import uniqueId from "lodash/uniqueId";
|
13099
13271
|
var import_caretDown2 = __toESM(require_caretDown());
|
13100
|
-
var NativeSelectBase =
|
13272
|
+
var NativeSelectBase = React92.forwardRef(
|
13101
13273
|
(_a, ref) => {
|
13102
13274
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
13103
13275
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -13114,16 +13286,16 @@ var NativeSelectBase = React90.forwardRef(
|
|
13114
13286
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
13115
13287
|
}
|
13116
13288
|
};
|
13117
|
-
return /* @__PURE__ */
|
13289
|
+
return /* @__PURE__ */ React92.createElement("span", {
|
13118
13290
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
13119
|
-
}, !readOnly && /* @__PURE__ */
|
13291
|
+
}, !readOnly && /* @__PURE__ */ React92.createElement("span", {
|
13120
13292
|
className: tw(
|
13121
13293
|
"absolute right-0 inset-y-0 mr-4 text-grey-40 flex ml-3 pointer-events-none typography-default-strong mt-4"
|
13122
13294
|
)
|
13123
|
-
}, /* @__PURE__ */
|
13295
|
+
}, /* @__PURE__ */ React92.createElement(Icon, {
|
13124
13296
|
icon: import_caretDown2.default,
|
13125
13297
|
"data-testid": "icon-dropdown"
|
13126
|
-
})), /* @__PURE__ */
|
13298
|
+
})), /* @__PURE__ */ React92.createElement("select", __spreadProps(__spreadValues({
|
13127
13299
|
ref,
|
13128
13300
|
disabled: disabled || readOnly,
|
13129
13301
|
required
|
@@ -13142,16 +13314,16 @@ var NativeSelectBase = React90.forwardRef(
|
|
13142
13314
|
),
|
13143
13315
|
props.className
|
13144
13316
|
)
|
13145
|
-
}), props.placeholder && /* @__PURE__ */
|
13317
|
+
}), props.placeholder && /* @__PURE__ */ React92.createElement("option", {
|
13146
13318
|
value: placeholderValue,
|
13147
13319
|
disabled: true
|
13148
13320
|
}, props.placeholder), children));
|
13149
13321
|
}
|
13150
13322
|
);
|
13151
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
13323
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React92.createElement(Skeleton, {
|
13152
13324
|
height: 38
|
13153
13325
|
});
|
13154
|
-
var NativeSelect =
|
13326
|
+
var NativeSelect = React92.forwardRef(
|
13155
13327
|
(_a, ref) => {
|
13156
13328
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
13157
13329
|
var _a2;
|
@@ -13161,13 +13333,13 @@ var NativeSelect = React90.forwardRef(
|
|
13161
13333
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13162
13334
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
13163
13335
|
const baseProps = omit14(props, Object.keys(labelControlProps));
|
13164
|
-
return /* @__PURE__ */
|
13336
|
+
return /* @__PURE__ */ React92.createElement(LabelControl, __spreadProps(__spreadValues({
|
13165
13337
|
id: `${id}-label`,
|
13166
13338
|
htmlFor: id,
|
13167
13339
|
messageId: errorMessageId
|
13168
13340
|
}, labelControlProps), {
|
13169
13341
|
className: "Aquarium-NativeSelect"
|
13170
|
-
}), /* @__PURE__ */
|
13342
|
+
}), /* @__PURE__ */ React92.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
13171
13343
|
ref
|
13172
13344
|
}, baseProps), errorProps), {
|
13173
13345
|
id,
|
@@ -13181,63 +13353,63 @@ var NativeSelect = React90.forwardRef(
|
|
13181
13353
|
}
|
13182
13354
|
);
|
13183
13355
|
NativeSelect.displayName = "NativeSelect";
|
13184
|
-
var Option =
|
13356
|
+
var Option = React92.forwardRef((_a, ref) => {
|
13185
13357
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
13186
|
-
return /* @__PURE__ */
|
13358
|
+
return /* @__PURE__ */ React92.createElement("option", __spreadValues({
|
13187
13359
|
ref
|
13188
13360
|
}, props), children);
|
13189
13361
|
});
|
13190
13362
|
Option.displayName = "Option";
|
13191
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
13363
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React92.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React92.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React92.createElement("div", {
|
13192
13364
|
style: { height: "1px" }
|
13193
13365
|
}));
|
13194
13366
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
13195
13367
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
13196
13368
|
|
13197
13369
|
// src/molecules/Navigation/Navigation.tsx
|
13198
|
-
import
|
13370
|
+
import React94 from "react";
|
13199
13371
|
import classNames10 from "classnames";
|
13200
13372
|
|
13201
13373
|
// src/atoms/Navigation/Navigation.tsx
|
13202
|
-
import
|
13374
|
+
import React93 from "react";
|
13203
13375
|
var Navigation = (_a) => {
|
13204
13376
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
13205
|
-
return /* @__PURE__ */
|
13377
|
+
return /* @__PURE__ */ React93.createElement("nav", {
|
13206
13378
|
className: classNames(tw("bg-grey-0 h-full"))
|
13207
|
-
}, /* @__PURE__ */
|
13379
|
+
}, /* @__PURE__ */ React93.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
13208
13380
|
className: classNames(tw("flex flex-col h-full"), className),
|
13209
13381
|
role: "menubar"
|
13210
13382
|
}), children));
|
13211
13383
|
};
|
13212
13384
|
var Header = (_a) => {
|
13213
13385
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13214
|
-
return /* @__PURE__ */
|
13386
|
+
return /* @__PURE__ */ React93.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
13215
13387
|
role: "presentation",
|
13216
13388
|
className: classNames(tw("px-6 py-5"), className)
|
13217
13389
|
}));
|
13218
13390
|
};
|
13219
13391
|
var Footer = (_a) => {
|
13220
13392
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13221
|
-
return /* @__PURE__ */
|
13393
|
+
return /* @__PURE__ */ React93.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
13222
13394
|
role: "presentation",
|
13223
13395
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
13224
13396
|
}));
|
13225
13397
|
};
|
13226
13398
|
var Section2 = (_a) => {
|
13227
13399
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
13228
|
-
return /* @__PURE__ */
|
13400
|
+
return /* @__PURE__ */ React93.createElement("li", {
|
13229
13401
|
role: "presentation",
|
13230
13402
|
className: tw("py-5")
|
13231
|
-
}, title && /* @__PURE__ */
|
13403
|
+
}, title && /* @__PURE__ */ React93.createElement("div", {
|
13232
13404
|
className: classNames(className, "py-2 px-6 text-grey-40 uppercase cursor-default typography-caption")
|
13233
|
-
}, title), /* @__PURE__ */
|
13405
|
+
}, title), /* @__PURE__ */ React93.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
13234
13406
|
role: "group",
|
13235
13407
|
className: classNames(tw("flex flex-col"), className)
|
13236
13408
|
})));
|
13237
13409
|
};
|
13238
13410
|
var Divider3 = (_a) => {
|
13239
13411
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
13240
|
-
return /* @__PURE__ */
|
13412
|
+
return /* @__PURE__ */ React93.createElement("li", __spreadProps(__spreadValues({
|
13241
13413
|
role: "separator"
|
13242
13414
|
}, rest), {
|
13243
13415
|
className: classNames(tw("border-t-2 border-grey-5"), className)
|
@@ -13245,9 +13417,9 @@ var Divider3 = (_a) => {
|
|
13245
13417
|
};
|
13246
13418
|
var Item5 = (_a) => {
|
13247
13419
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
13248
|
-
return /* @__PURE__ */
|
13420
|
+
return /* @__PURE__ */ React93.createElement("li", {
|
13249
13421
|
role: "presentation"
|
13250
|
-
}, /* @__PURE__ */
|
13422
|
+
}, /* @__PURE__ */ React93.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
13251
13423
|
role: "menuitem",
|
13252
13424
|
className: classNames(
|
13253
13425
|
tw("py-3 px-6 hover:bg-grey-5 cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -13267,7 +13439,7 @@ Navigation.Divider = Divider3;
|
|
13267
13439
|
// src/molecules/Navigation/Navigation.tsx
|
13268
13440
|
var Navigation2 = (_a) => {
|
13269
13441
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
13270
|
-
return /* @__PURE__ */
|
13442
|
+
return /* @__PURE__ */ React94.createElement(Navigation, __spreadValues({
|
13271
13443
|
className: classNames10("Aquarium-Navigation", className)
|
13272
13444
|
}, props));
|
13273
13445
|
};
|
@@ -13281,11 +13453,11 @@ var Item6 = (_a) => {
|
|
13281
13453
|
"icon",
|
13282
13454
|
"showNotification"
|
13283
13455
|
]);
|
13284
|
-
return /* @__PURE__ */
|
13456
|
+
return /* @__PURE__ */ React94.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React94.createElement(Badge.Notification, null, /* @__PURE__ */ React94.createElement(InlineIcon, {
|
13285
13457
|
icon,
|
13286
13458
|
width: "20px",
|
13287
13459
|
height: "20px"
|
13288
|
-
})), icon && !showNotification && /* @__PURE__ */
|
13460
|
+
})), icon && !showNotification && /* @__PURE__ */ React94.createElement(InlineIcon, {
|
13289
13461
|
icon,
|
13290
13462
|
width: "20px",
|
13291
13463
|
height: "20px"
|
@@ -13298,32 +13470,32 @@ Navigation2.Header = Navigation.Header;
|
|
13298
13470
|
Navigation2.Section = Navigation.Section;
|
13299
13471
|
|
13300
13472
|
// src/molecules/PageHeader/PageHeader.tsx
|
13301
|
-
import
|
13473
|
+
import React96 from "react";
|
13302
13474
|
import castArray4 from "lodash/castArray";
|
13303
13475
|
|
13304
13476
|
// src/atoms/PageHeader/PageHeader.tsx
|
13305
|
-
import
|
13477
|
+
import React95 from "react";
|
13306
13478
|
var PageHeader = (_a) => {
|
13307
13479
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13308
|
-
return /* @__PURE__ */
|
13480
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadValues({
|
13309
13481
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
13310
13482
|
}, rest), children);
|
13311
13483
|
};
|
13312
13484
|
PageHeader.Container = (_a) => {
|
13313
13485
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13314
|
-
return /* @__PURE__ */
|
13486
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadValues({
|
13315
13487
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
13316
13488
|
}, rest), children);
|
13317
13489
|
};
|
13318
13490
|
PageHeader.TitleContainer = (_a) => {
|
13319
13491
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13320
|
-
return /* @__PURE__ */
|
13492
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadValues({
|
13321
13493
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
13322
13494
|
}, rest), children);
|
13323
13495
|
};
|
13324
13496
|
PageHeader.Title = (_a) => {
|
13325
13497
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
13326
|
-
return /* @__PURE__ */
|
13498
|
+
return /* @__PURE__ */ React95.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
13327
13499
|
color: "grey-100",
|
13328
13500
|
variant: isSubHeader ? "subheading" : "heading",
|
13329
13501
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -13331,19 +13503,19 @@ PageHeader.Title = (_a) => {
|
|
13331
13503
|
};
|
13332
13504
|
PageHeader.Subtitle = (_a) => {
|
13333
13505
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13334
|
-
return /* @__PURE__ */
|
13506
|
+
return /* @__PURE__ */ React95.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
13335
13507
|
color: "grey-70"
|
13336
13508
|
}), children);
|
13337
13509
|
};
|
13338
13510
|
PageHeader.Chips = (_a) => {
|
13339
13511
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13340
|
-
return /* @__PURE__ */
|
13512
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadValues({
|
13341
13513
|
className: classNames(tw("flex gap-3"), className)
|
13342
13514
|
}, rest), children);
|
13343
13515
|
};
|
13344
13516
|
PageHeader.Actions = (_a) => {
|
13345
13517
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13346
|
-
return /* @__PURE__ */
|
13518
|
+
return /* @__PURE__ */ React95.createElement("div", __spreadValues({
|
13347
13519
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
13348
13520
|
}, rest), children);
|
13349
13521
|
};
|
@@ -13367,63 +13539,63 @@ var CommonPageHeader = ({
|
|
13367
13539
|
onMenuOpenChange,
|
13368
13540
|
isSubHeader = false
|
13369
13541
|
}) => {
|
13370
|
-
return /* @__PURE__ */
|
13542
|
+
return /* @__PURE__ */ React96.createElement(PageHeader, {
|
13371
13543
|
className: "Aquarium-PageHeader"
|
13372
|
-
}, /* @__PURE__ */
|
13544
|
+
}, /* @__PURE__ */ React96.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React96.createElement(Box, {
|
13373
13545
|
marginBottom: "3"
|
13374
|
-
}, /* @__PURE__ */
|
13546
|
+
}, /* @__PURE__ */ React96.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React96.createElement(Spacing, {
|
13375
13547
|
row: true,
|
13376
13548
|
gap: "5"
|
13377
|
-
}, image && /* @__PURE__ */
|
13549
|
+
}, image && /* @__PURE__ */ React96.createElement("img", {
|
13378
13550
|
src: image,
|
13379
13551
|
alt: imageAlt != null ? imageAlt : "",
|
13380
13552
|
className: tw("w-[56px] h-[56px]")
|
13381
|
-
}), /* @__PURE__ */
|
13553
|
+
}), /* @__PURE__ */ React96.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React96.createElement(PageHeader.Title, {
|
13382
13554
|
isSubHeader
|
13383
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
13555
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React96.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React96.createElement(Chip2, {
|
13384
13556
|
key: chip,
|
13385
13557
|
dense: true,
|
13386
13558
|
text: chip
|
13387
|
-
}))), subtitle && /* @__PURE__ */
|
13559
|
+
}))), subtitle && /* @__PURE__ */ React96.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React96.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React96.createElement(Box.Flex, {
|
13388
13560
|
alignItems: "center"
|
13389
|
-
}, /* @__PURE__ */
|
13561
|
+
}, /* @__PURE__ */ React96.createElement(DropdownMenu2, {
|
13390
13562
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13391
13563
|
onOpenChange: onMenuOpenChange
|
13392
|
-
}, /* @__PURE__ */
|
13564
|
+
}, /* @__PURE__ */ React96.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React96.createElement(Button.Icon, {
|
13393
13565
|
"aria-label": menuAriaLabel,
|
13394
13566
|
icon: import_more5.default
|
13395
13567
|
})), menu)), secondaryActions && castArray4(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
13396
13568
|
};
|
13397
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
13569
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React96.createElement(CommonPageHeader, __spreadValues({}, props));
|
13398
13570
|
PageHeader2.displayName = "PageHeader";
|
13399
|
-
var SubHeader = (props) => /* @__PURE__ */
|
13571
|
+
var SubHeader = (props) => /* @__PURE__ */ React96.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
13400
13572
|
isSubHeader: true
|
13401
13573
|
}));
|
13402
13574
|
PageHeader2.SubHeader = SubHeader;
|
13403
13575
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
13404
13576
|
|
13405
13577
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
13406
|
-
import
|
13578
|
+
import React98 from "react";
|
13407
13579
|
import omit15 from "lodash/omit";
|
13408
13580
|
|
13409
13581
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
13410
|
-
import
|
13582
|
+
import React97 from "react";
|
13411
13583
|
var Header2 = (_a) => {
|
13412
13584
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13413
|
-
return /* @__PURE__ */
|
13585
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13414
13586
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
13415
13587
|
}), children);
|
13416
13588
|
};
|
13417
13589
|
var Title2 = (_a) => {
|
13418
13590
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13419
|
-
return /* @__PURE__ */
|
13591
|
+
return /* @__PURE__ */ React97.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
13420
13592
|
htmlTag: "h1",
|
13421
13593
|
variant: "small-strong"
|
13422
13594
|
}), children);
|
13423
13595
|
};
|
13424
13596
|
var Body = (_a) => {
|
13425
13597
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13426
|
-
return /* @__PURE__ */
|
13598
|
+
return /* @__PURE__ */ React97.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
13427
13599
|
htmlTag: "div",
|
13428
13600
|
variant: "caption",
|
13429
13601
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -13431,13 +13603,13 @@ var Body = (_a) => {
|
|
13431
13603
|
};
|
13432
13604
|
var Footer2 = (_a) => {
|
13433
13605
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13434
|
-
return /* @__PURE__ */
|
13606
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13435
13607
|
className: classNames(tw("p-5"), className)
|
13436
13608
|
}), children);
|
13437
13609
|
};
|
13438
13610
|
var Actions2 = (_a) => {
|
13439
13611
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13440
|
-
return /* @__PURE__ */
|
13612
|
+
return /* @__PURE__ */ React97.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13441
13613
|
className: classNames(tw("flex gap-4"), className)
|
13442
13614
|
}), children);
|
13443
13615
|
};
|
@@ -13453,13 +13625,13 @@ var PopoverDialog = {
|
|
13453
13625
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
13454
13626
|
const wrapPromptWithBody = (child) => {
|
13455
13627
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
13456
|
-
return /* @__PURE__ */
|
13628
|
+
return /* @__PURE__ */ React98.createElement(Popover2.Panel, {
|
13457
13629
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
13458
|
-
}, /* @__PURE__ */
|
13630
|
+
}, /* @__PURE__ */ React98.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React98.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React98.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React98.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React98.createElement(Popover2.Button, __spreadValues({
|
13459
13631
|
kind: "secondary-ghost",
|
13460
13632
|
key: secondaryAction.text,
|
13461
13633
|
dense: true
|
13462
|
-
}, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
13634
|
+
}, omit15(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React98.createElement(Popover2.Button, __spreadValues({
|
13463
13635
|
kind: "ghost",
|
13464
13636
|
key: primaryAction.text,
|
13465
13637
|
dense: true
|
@@ -13467,15 +13639,15 @@ var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction,
|
|
13467
13639
|
}
|
13468
13640
|
return child;
|
13469
13641
|
};
|
13470
|
-
return /* @__PURE__ */
|
13642
|
+
return /* @__PURE__ */ React98.createElement(Popover2, {
|
13471
13643
|
type: "dialog",
|
13472
13644
|
isOpen: open,
|
13473
13645
|
placement,
|
13474
13646
|
containFocus: true
|
13475
|
-
},
|
13647
|
+
}, React98.Children.map(children, wrapPromptWithBody));
|
13476
13648
|
};
|
13477
13649
|
PopoverDialog2.Trigger = Popover2.Trigger;
|
13478
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
13650
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React98.createElement(PopoverDialog.Body, null, children);
|
13479
13651
|
Prompt.displayName = "PopoverDialog.Prompt";
|
13480
13652
|
PopoverDialog2.Prompt = Prompt;
|
13481
13653
|
|
@@ -13484,14 +13656,14 @@ import { createPortal } from "react-dom";
|
|
13484
13656
|
var Portal = ({ children, to }) => createPortal(children, to);
|
13485
13657
|
|
13486
13658
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
13487
|
-
import
|
13659
|
+
import React100 from "react";
|
13488
13660
|
|
13489
13661
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
13490
|
-
import
|
13662
|
+
import React99 from "react";
|
13491
13663
|
import clamp3 from "lodash/clamp";
|
13492
13664
|
var ProgressBar = (_a) => {
|
13493
13665
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13494
|
-
return /* @__PURE__ */
|
13666
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13495
13667
|
className: classNames(
|
13496
13668
|
tw("relative flex items-center w-full bg-grey-0 h-2 rounded-full overflow-hidden"),
|
13497
13669
|
className
|
@@ -13507,7 +13679,7 @@ var STATUS_COLORS = {
|
|
13507
13679
|
ProgressBar.Indicator = (_a) => {
|
13508
13680
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
13509
13681
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
13510
|
-
return /* @__PURE__ */
|
13682
|
+
return /* @__PURE__ */ React99.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13511
13683
|
className: classNames(
|
13512
13684
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
13513
13685
|
STATUS_COLORS[status],
|
@@ -13523,11 +13695,11 @@ ProgressBar.Indicator = (_a) => {
|
|
13523
13695
|
};
|
13524
13696
|
ProgressBar.Labels = (_a) => {
|
13525
13697
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
13526
|
-
return /* @__PURE__ */
|
13698
|
+
return /* @__PURE__ */ React99.createElement("div", {
|
13527
13699
|
className: classNames(tw("flex flex-row"), className)
|
13528
|
-
}, /* @__PURE__ */
|
13700
|
+
}, /* @__PURE__ */ React99.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13529
13701
|
className: tw("grow text-grey-70 typography-caption")
|
13530
|
-
}), startLabel), /* @__PURE__ */
|
13702
|
+
}), startLabel), /* @__PURE__ */ React99.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13531
13703
|
className: tw("grow text-grey-70 typography-caption text-right")
|
13532
13704
|
}), endLabel));
|
13533
13705
|
};
|
@@ -13545,7 +13717,7 @@ var ProgressBar2 = (props) => {
|
|
13545
13717
|
if (min > max) {
|
13546
13718
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
13547
13719
|
}
|
13548
|
-
const progress = /* @__PURE__ */
|
13720
|
+
const progress = /* @__PURE__ */ React100.createElement(ProgressBar, null, /* @__PURE__ */ React100.createElement(ProgressBar.Indicator, {
|
13549
13721
|
status: value === max ? completedStatus : progresStatus,
|
13550
13722
|
min,
|
13551
13723
|
max,
|
@@ -13555,15 +13727,15 @@ var ProgressBar2 = (props) => {
|
|
13555
13727
|
if (props.dense) {
|
13556
13728
|
return progress;
|
13557
13729
|
}
|
13558
|
-
return /* @__PURE__ */
|
13730
|
+
return /* @__PURE__ */ React100.createElement("div", {
|
13559
13731
|
className: "Aquarium-ProgressBar"
|
13560
|
-
}, progress, /* @__PURE__ */
|
13732
|
+
}, progress, /* @__PURE__ */ React100.createElement(ProgressBar.Labels, {
|
13561
13733
|
className: tw("py-2"),
|
13562
13734
|
startLabel: props.startLabel,
|
13563
13735
|
endLabel: props.endLabel
|
13564
13736
|
}));
|
13565
13737
|
};
|
13566
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
13738
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React100.createElement(Skeleton, {
|
13567
13739
|
height: 4,
|
13568
13740
|
display: "block"
|
13569
13741
|
});
|
@@ -13571,13 +13743,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
13571
13743
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
13572
13744
|
|
13573
13745
|
// src/molecules/RadioButton/RadioButton.tsx
|
13574
|
-
import
|
13575
|
-
var RadioButton2 =
|
13746
|
+
import React101 from "react";
|
13747
|
+
var RadioButton2 = React101.forwardRef(
|
13576
13748
|
(_a, ref) => {
|
13577
13749
|
var _b = _a, { name, id, readOnly = false, disabled = false, caption, children, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "id", "readOnly", "disabled", "caption", "children", "aria-label"]);
|
13578
13750
|
var _a2;
|
13579
13751
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
13580
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
13752
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React101.createElement(ControlLabel, {
|
13581
13753
|
htmlFor: id,
|
13582
13754
|
label: children,
|
13583
13755
|
"aria-label": ariaLabel,
|
@@ -13586,7 +13758,7 @@ var RadioButton2 = React99.forwardRef(
|
|
13586
13758
|
disabled,
|
13587
13759
|
style: { gap: "0 8px" },
|
13588
13760
|
className: "Aquarium-RadioButton"
|
13589
|
-
}, !readOnly && /* @__PURE__ */
|
13761
|
+
}, !readOnly && /* @__PURE__ */ React101.createElement(RadioButton, __spreadProps(__spreadValues({
|
13590
13762
|
id,
|
13591
13763
|
ref,
|
13592
13764
|
name
|
@@ -13597,12 +13769,12 @@ var RadioButton2 = React99.forwardRef(
|
|
13597
13769
|
}
|
13598
13770
|
);
|
13599
13771
|
RadioButton2.displayName = "RadioButton";
|
13600
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
13772
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React101.createElement("div", {
|
13601
13773
|
className: tw("flex gap-3")
|
13602
|
-
}, /* @__PURE__ */
|
13774
|
+
}, /* @__PURE__ */ React101.createElement(Skeleton, {
|
13603
13775
|
height: 20,
|
13604
13776
|
width: 20
|
13605
|
-
}), /* @__PURE__ */
|
13777
|
+
}), /* @__PURE__ */ React101.createElement(Skeleton, {
|
13606
13778
|
height: 20,
|
13607
13779
|
width: 150
|
13608
13780
|
}));
|
@@ -13610,10 +13782,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
13610
13782
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
13611
13783
|
|
13612
13784
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
13613
|
-
import
|
13785
|
+
import React102 from "react";
|
13614
13786
|
import { useId as useId14 } from "@react-aria/utils";
|
13615
13787
|
var isRadioButton = (c) => {
|
13616
|
-
return
|
13788
|
+
return React102.isValidElement(c) && c.type === RadioButton2;
|
13617
13789
|
};
|
13618
13790
|
var RadioButtonGroup = (_a) => {
|
13619
13791
|
var _b = _a, {
|
@@ -13636,7 +13808,7 @@ var RadioButtonGroup = (_a) => {
|
|
13636
13808
|
"children"
|
13637
13809
|
]);
|
13638
13810
|
var _a2;
|
13639
|
-
const [value, setValue] =
|
13811
|
+
const [value, setValue] = React102.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
13640
13812
|
const errorMessageId = useId14();
|
13641
13813
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13642
13814
|
const labelControlProps = getLabelControlProps(props);
|
@@ -13647,14 +13819,14 @@ var RadioButtonGroup = (_a) => {
|
|
13647
13819
|
setValue(e.target.value);
|
13648
13820
|
onChange == null ? void 0 : onChange(e.target.value);
|
13649
13821
|
};
|
13650
|
-
const content =
|
13822
|
+
const content = React102.Children.map(children, (c) => {
|
13651
13823
|
var _a3, _b2, _c;
|
13652
13824
|
if (!isRadioButton(c)) {
|
13653
13825
|
return null;
|
13654
13826
|
}
|
13655
13827
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
13656
13828
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
13657
|
-
return
|
13829
|
+
return React102.cloneElement(c, {
|
13658
13830
|
name,
|
13659
13831
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
13660
13832
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -13663,13 +13835,13 @@ var RadioButtonGroup = (_a) => {
|
|
13663
13835
|
readOnly
|
13664
13836
|
});
|
13665
13837
|
});
|
13666
|
-
return /* @__PURE__ */
|
13838
|
+
return /* @__PURE__ */ React102.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
13667
13839
|
fieldset: true
|
13668
13840
|
}, labelControlProps), errorProps), {
|
13669
13841
|
className: "Aquarium-RadioButtonGroup"
|
13670
|
-
}), cols && /* @__PURE__ */
|
13842
|
+
}), cols && /* @__PURE__ */ React102.createElement(InputGroup, {
|
13671
13843
|
cols
|
13672
|
-
}, content), !cols && /* @__PURE__ */
|
13844
|
+
}, content), !cols && /* @__PURE__ */ React102.createElement(Flexbox, {
|
13673
13845
|
direction,
|
13674
13846
|
alignItems: "flex-start",
|
13675
13847
|
colGap: "8",
|
@@ -13678,12 +13850,12 @@ var RadioButtonGroup = (_a) => {
|
|
13678
13850
|
}, content));
|
13679
13851
|
};
|
13680
13852
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
13681
|
-
return /* @__PURE__ */
|
13853
|
+
return /* @__PURE__ */ React102.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React102.createElement("div", {
|
13682
13854
|
className: tw("flex flex-wrap", {
|
13683
13855
|
"flex-row gap-8": direction === "row",
|
13684
13856
|
"flex-col gap-2": direction === "column"
|
13685
13857
|
})
|
13686
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
13858
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React102.createElement(RadioButton2.Skeleton, {
|
13687
13859
|
key
|
13688
13860
|
}))));
|
13689
13861
|
};
|
@@ -13691,24 +13863,24 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
13691
13863
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
13692
13864
|
|
13693
13865
|
// src/molecules/Section/Section.tsx
|
13694
|
-
import
|
13866
|
+
import React107 from "react";
|
13695
13867
|
import { useId as useId15 } from "@react-aria/utils";
|
13696
13868
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
13697
13869
|
import castArray5 from "lodash/castArray";
|
13698
13870
|
import isUndefined9 from "lodash/isUndefined";
|
13699
13871
|
|
13700
13872
|
// src/molecules/Switch/Switch.tsx
|
13701
|
-
import
|
13873
|
+
import React104 from "react";
|
13702
13874
|
|
13703
13875
|
// src/atoms/Switch/Switch.tsx
|
13704
|
-
import
|
13876
|
+
import React103 from "react";
|
13705
13877
|
var import_ban2 = __toESM(require_ban());
|
13706
|
-
var Switch =
|
13878
|
+
var Switch = React103.forwardRef(
|
13707
13879
|
(_a, ref) => {
|
13708
13880
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
13709
|
-
return /* @__PURE__ */
|
13881
|
+
return /* @__PURE__ */ React103.createElement("span", {
|
13710
13882
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
13711
|
-
}, /* @__PURE__ */
|
13883
|
+
}, /* @__PURE__ */ React103.createElement("input", __spreadProps(__spreadValues({
|
13712
13884
|
id,
|
13713
13885
|
ref,
|
13714
13886
|
type: "checkbox",
|
@@ -13727,7 +13899,7 @@ var Switch = React101.forwardRef(
|
|
13727
13899
|
),
|
13728
13900
|
readOnly,
|
13729
13901
|
disabled
|
13730
|
-
})), /* @__PURE__ */
|
13902
|
+
})), /* @__PURE__ */ React103.createElement("span", {
|
13731
13903
|
className: tw(
|
13732
13904
|
"pointer-events-none rounded-full absolute inline-flex justify-center items-center transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
13733
13905
|
"bg-white left-2 peer-checked/switch:left-1 text-grey-30 peer-checked/switch:text-primary-60",
|
@@ -13735,7 +13907,7 @@ var Switch = React101.forwardRef(
|
|
13735
13907
|
"shadow-4dp": !disabled
|
13736
13908
|
}
|
13737
13909
|
)
|
13738
|
-
}, disabled && /* @__PURE__ */
|
13910
|
+
}, disabled && /* @__PURE__ */ React103.createElement(Icon, {
|
13739
13911
|
icon: import_ban2.default,
|
13740
13912
|
width: "10px",
|
13741
13913
|
height: "10px"
|
@@ -13744,7 +13916,7 @@ var Switch = React101.forwardRef(
|
|
13744
13916
|
);
|
13745
13917
|
|
13746
13918
|
// src/molecules/Switch/Switch.tsx
|
13747
|
-
var Switch2 =
|
13919
|
+
var Switch2 = React104.forwardRef(
|
13748
13920
|
(_a, ref) => {
|
13749
13921
|
var _b = _a, {
|
13750
13922
|
id,
|
@@ -13767,7 +13939,7 @@ var Switch2 = React102.forwardRef(
|
|
13767
13939
|
]);
|
13768
13940
|
var _a2;
|
13769
13941
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
13770
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
13942
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React104.createElement(ControlLabel, {
|
13771
13943
|
htmlFor: id,
|
13772
13944
|
label: children,
|
13773
13945
|
"aria-label": ariaLabel,
|
@@ -13777,7 +13949,7 @@ var Switch2 = React102.forwardRef(
|
|
13777
13949
|
style: { gap: "0 8px" },
|
13778
13950
|
labelPlacement,
|
13779
13951
|
className: "Aquarium-Switch"
|
13780
|
-
}, !readOnly && /* @__PURE__ */
|
13952
|
+
}, !readOnly && /* @__PURE__ */ React104.createElement(Switch, __spreadProps(__spreadValues({
|
13781
13953
|
id,
|
13782
13954
|
ref,
|
13783
13955
|
name
|
@@ -13788,12 +13960,12 @@ var Switch2 = React102.forwardRef(
|
|
13788
13960
|
}
|
13789
13961
|
);
|
13790
13962
|
Switch2.displayName = "Switch";
|
13791
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
13963
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React104.createElement("div", {
|
13792
13964
|
className: tw("flex gap-3")
|
13793
|
-
}, /* @__PURE__ */
|
13965
|
+
}, /* @__PURE__ */ React104.createElement(Skeleton, {
|
13794
13966
|
height: 20,
|
13795
13967
|
width: 35
|
13796
|
-
}), /* @__PURE__ */
|
13968
|
+
}), /* @__PURE__ */ React104.createElement(Skeleton, {
|
13797
13969
|
height: 20,
|
13798
13970
|
width: 150
|
13799
13971
|
}));
|
@@ -13801,7 +13973,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
13801
13973
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
13802
13974
|
|
13803
13975
|
// src/molecules/TagLabel/TagLabel.tsx
|
13804
|
-
import
|
13976
|
+
import React105 from "react";
|
13805
13977
|
var getVariantClassNames = (variant = "primary") => {
|
13806
13978
|
switch (variant) {
|
13807
13979
|
case "danger":
|
@@ -13815,7 +13987,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
13815
13987
|
};
|
13816
13988
|
var TagLabel = (_a) => {
|
13817
13989
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
13818
|
-
return /* @__PURE__ */
|
13990
|
+
return /* @__PURE__ */ React105.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
13819
13991
|
className: classNames(
|
13820
13992
|
"Aquarium-TagLabel",
|
13821
13993
|
getVariantClassNames(variant),
|
@@ -13828,11 +14000,11 @@ var TagLabel = (_a) => {
|
|
13828
14000
|
};
|
13829
14001
|
|
13830
14002
|
// src/atoms/Section/Section.tsx
|
13831
|
-
import
|
14003
|
+
import React106 from "react";
|
13832
14004
|
var import_caretUp2 = __toESM(require_caretUp());
|
13833
14005
|
var Section3 = (_a) => {
|
13834
14006
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13835
|
-
return /* @__PURE__ */
|
14007
|
+
return /* @__PURE__ */ React106.createElement(Box, __spreadValues({
|
13836
14008
|
component: "section",
|
13837
14009
|
borderColor: "grey-5",
|
13838
14010
|
borderWidth: "1px"
|
@@ -13840,7 +14012,7 @@ var Section3 = (_a) => {
|
|
13840
14012
|
};
|
13841
14013
|
Section3.Header = (_a) => {
|
13842
14014
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
13843
|
-
return /* @__PURE__ */
|
14015
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13844
14016
|
className: classNames(
|
13845
14017
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", { "bg-grey-0": expanded }),
|
13846
14018
|
className
|
@@ -13849,21 +14021,21 @@ Section3.Header = (_a) => {
|
|
13849
14021
|
};
|
13850
14022
|
Section3.TitleContainer = (_a) => {
|
13851
14023
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
13852
|
-
return /* @__PURE__ */
|
14024
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13853
14025
|
className: classNames(
|
13854
14026
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", { "cursor-pointer": collapsible }),
|
13855
14027
|
className
|
13856
14028
|
)
|
13857
14029
|
}), children);
|
13858
14030
|
};
|
13859
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
14031
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React106.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
13860
14032
|
icon: import_caretUp2.default,
|
13861
14033
|
height: 22,
|
13862
14034
|
width: 22
|
13863
14035
|
}));
|
13864
14036
|
Section3.Title = (_a) => {
|
13865
14037
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13866
|
-
return /* @__PURE__ */
|
14038
|
+
return /* @__PURE__ */ React106.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
13867
14039
|
htmlTag: "h2",
|
13868
14040
|
color: "black",
|
13869
14041
|
className: "flex gap-3 items-center"
|
@@ -13871,21 +14043,21 @@ Section3.Title = (_a) => {
|
|
13871
14043
|
};
|
13872
14044
|
Section3.Subtitle = (_a) => {
|
13873
14045
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13874
|
-
return /* @__PURE__ */
|
14046
|
+
return /* @__PURE__ */ React106.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
13875
14047
|
color: "grey-70"
|
13876
14048
|
}), children);
|
13877
14049
|
};
|
13878
14050
|
Section3.Actions = (_a) => {
|
13879
14051
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13880
|
-
return /* @__PURE__ */
|
14052
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13881
14053
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
13882
14054
|
}), children);
|
13883
14055
|
};
|
13884
14056
|
Section3.Body = (_a) => {
|
13885
14057
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
13886
|
-
return /* @__PURE__ */
|
14058
|
+
return /* @__PURE__ */ React106.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
13887
14059
|
className: classNames(tw("p-6"), className)
|
13888
|
-
}), /* @__PURE__ */
|
14060
|
+
}), /* @__PURE__ */ React106.createElement(Typography, {
|
13889
14061
|
htmlTag: "div",
|
13890
14062
|
color: "grey-70"
|
13891
14063
|
}, children));
|
@@ -13899,7 +14071,7 @@ var Section4 = (props) => {
|
|
13899
14071
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
13900
14072
|
const _collapsed = title ? props.collapsed : void 0;
|
13901
14073
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
13902
|
-
const [isCollapsed, setCollapsed] =
|
14074
|
+
const [isCollapsed, setCollapsed] = React107.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
13903
14075
|
const [ref, { height }] = useMeasure();
|
13904
14076
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
13905
14077
|
const menuAriaLabel = title ? (_e = (_d = props.menuAriaLabel) != null ? _d : props.menuLabel) != null ? _e : "Context menu" : void 0;
|
@@ -13934,60 +14106,60 @@ var Section4 = (props) => {
|
|
13934
14106
|
const regionId = useId15();
|
13935
14107
|
const titleId = useId15();
|
13936
14108
|
const hasTabs = isComponentType(children, Tabs);
|
13937
|
-
return /* @__PURE__ */
|
14109
|
+
return /* @__PURE__ */ React107.createElement(Section3, {
|
13938
14110
|
"aria-label": title,
|
13939
14111
|
className: "Aquarium-Section"
|
13940
|
-
}, title && /* @__PURE__ */
|
14112
|
+
}, title && /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(Section3.Header, {
|
13941
14113
|
expanded: _collapsible && !isCollapsed
|
13942
|
-
}, /* @__PURE__ */
|
14114
|
+
}, /* @__PURE__ */ React107.createElement(Section3.TitleContainer, {
|
13943
14115
|
role: _collapsible ? "button" : void 0,
|
13944
14116
|
id: toggleId,
|
13945
14117
|
collapsible: _collapsible,
|
13946
14118
|
onClick: handleTitleClick,
|
13947
14119
|
"aria-expanded": _collapsible ? !isCollapsed : void 0,
|
13948
14120
|
"aria-controls": _collapsible ? regionId : void 0
|
13949
|
-
}, _collapsible && /* @__PURE__ */
|
14121
|
+
}, _collapsible && /* @__PURE__ */ React107.createElement(animated5.div, {
|
13950
14122
|
style: { transform }
|
13951
|
-
}, /* @__PURE__ */
|
14123
|
+
}, /* @__PURE__ */ React107.createElement(Section3.Toggle, null)), /* @__PURE__ */ React107.createElement(Section3.Title, {
|
13952
14124
|
id: titleId
|
13953
|
-
}, /* @__PURE__ */
|
14125
|
+
}, /* @__PURE__ */ React107.createElement(LineClamp2, {
|
13954
14126
|
lines: 1
|
13955
|
-
}, title), props.tag && /* @__PURE__ */
|
14127
|
+
}, title), props.tag && /* @__PURE__ */ React107.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React107.createElement(Chip2, {
|
13956
14128
|
text: props.badge
|
13957
|
-
}), props.chip && /* @__PURE__ */
|
14129
|
+
}), props.chip && /* @__PURE__ */ React107.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React107.createElement(Section3.Subtitle, {
|
13958
14130
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
13959
|
-
}, /* @__PURE__ */
|
14131
|
+
}, /* @__PURE__ */ React107.createElement(LineClamp2, {
|
13960
14132
|
lines: 1
|
13961
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
14133
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React107.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React107.createElement(Box.Flex, {
|
13962
14134
|
alignItems: "center"
|
13963
|
-
}, /* @__PURE__ */
|
14135
|
+
}, /* @__PURE__ */ React107.createElement(DropdownMenu2, {
|
13964
14136
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13965
14137
|
onOpenChange: onMenuOpenChange
|
13966
|
-
}, /* @__PURE__ */
|
14138
|
+
}, /* @__PURE__ */ React107.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React107.createElement(Button.Icon, {
|
13967
14139
|
"aria-label": menuAriaLabel,
|
13968
14140
|
icon: import_more6.default
|
13969
|
-
})), menu)), props.actions && castArray5(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */
|
14141
|
+
})), menu)), props.actions && castArray5(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React107.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React107.createElement(SelectBase, __spreadValues({
|
13970
14142
|
"aria-labelledby": titleId
|
13971
|
-
}, props.select)))), !hasTabs && /* @__PURE__ */
|
14143
|
+
}, props.select)))), !hasTabs && /* @__PURE__ */ React107.createElement(animated5.div, {
|
13972
14144
|
className: tw(`h-[1px]`),
|
13973
14145
|
style: { backgroundColor }
|
13974
|
-
})), /* @__PURE__ */
|
14146
|
+
})), /* @__PURE__ */ React107.createElement(animated5.div, {
|
13975
14147
|
id: regionId,
|
13976
14148
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
13977
14149
|
style: spring,
|
13978
14150
|
className: tw({ "overflow-hidden": _collapsible })
|
13979
|
-
}, /* @__PURE__ */
|
14151
|
+
}, /* @__PURE__ */ React107.createElement("div", {
|
13980
14152
|
ref
|
13981
|
-
}, hasTabs ? /* @__PURE__ */
|
14153
|
+
}, hasTabs ? /* @__PURE__ */ React107.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
13982
14154
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto")
|
13983
|
-
})) : /* @__PURE__ */
|
14155
|
+
})) : /* @__PURE__ */ React107.createElement(Section3.Body, null, children))));
|
13984
14156
|
};
|
13985
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
14157
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React107.createElement(Section3.Body, null, children.find(
|
13986
14158
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13987
14159
|
)));
|
13988
14160
|
|
13989
14161
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
13990
|
-
import
|
14162
|
+
import React108 from "react";
|
13991
14163
|
var SegmentedControl = (_a) => {
|
13992
14164
|
var _b = _a, {
|
13993
14165
|
children,
|
@@ -14004,7 +14176,7 @@ var SegmentedControl = (_a) => {
|
|
14004
14176
|
"selected",
|
14005
14177
|
"className"
|
14006
14178
|
]);
|
14007
|
-
return /* @__PURE__ */
|
14179
|
+
return /* @__PURE__ */ React108.createElement("li", null, /* @__PURE__ */ React108.createElement("button", __spreadProps(__spreadValues({
|
14008
14180
|
type: "button"
|
14009
14181
|
}, rest), {
|
14010
14182
|
className: classNames(
|
@@ -14038,12 +14210,12 @@ var SegmentedControlGroup = (_a) => {
|
|
14038
14210
|
"border border-grey-20 text-grey-50": variant === "outlined",
|
14039
14211
|
"bg-grey-0": variant === "raised"
|
14040
14212
|
});
|
14041
|
-
return /* @__PURE__ */
|
14213
|
+
return /* @__PURE__ */ React108.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14042
14214
|
"aria-label": ariaLabel,
|
14043
14215
|
className: classNames("Aquarium-SegmentedControl", classes2, className)
|
14044
|
-
}),
|
14216
|
+
}), React108.Children.map(
|
14045
14217
|
children,
|
14046
|
-
(child) =>
|
14218
|
+
(child) => React108.cloneElement(child, {
|
14047
14219
|
dense,
|
14048
14220
|
variant,
|
14049
14221
|
onClick: () => onChange(child.props.value),
|
@@ -14081,14 +14253,14 @@ var getCommonClassNames = (dense, selected) => tw(
|
|
14081
14253
|
);
|
14082
14254
|
|
14083
14255
|
// src/molecules/Stepper/Stepper.tsx
|
14084
|
-
import
|
14256
|
+
import React110 from "react";
|
14085
14257
|
|
14086
14258
|
// src/atoms/Stepper/Stepper.tsx
|
14087
|
-
import
|
14259
|
+
import React109 from "react";
|
14088
14260
|
var import_tick6 = __toESM(require_tick());
|
14089
14261
|
var Stepper = (_a) => {
|
14090
14262
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14091
|
-
return /* @__PURE__ */
|
14263
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14092
14264
|
className: classNames(className)
|
14093
14265
|
}));
|
14094
14266
|
};
|
@@ -14102,7 +14274,7 @@ var ConnectorContainer = (_a) => {
|
|
14102
14274
|
"completed",
|
14103
14275
|
"dense"
|
14104
14276
|
]);
|
14105
|
-
return /* @__PURE__ */
|
14277
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14106
14278
|
className: classNames(
|
14107
14279
|
tw("absolute w-full -left-1/2", {
|
14108
14280
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -14114,7 +14286,7 @@ var ConnectorContainer = (_a) => {
|
|
14114
14286
|
};
|
14115
14287
|
var Connector = (_a) => {
|
14116
14288
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
14117
|
-
return /* @__PURE__ */
|
14289
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14118
14290
|
className: classNames(
|
14119
14291
|
tw("w-full", {
|
14120
14292
|
"bg-grey-20": !completed,
|
@@ -14128,7 +14300,7 @@ var Connector = (_a) => {
|
|
14128
14300
|
};
|
14129
14301
|
var Step = (_a) => {
|
14130
14302
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
14131
|
-
return /* @__PURE__ */
|
14303
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14132
14304
|
className: classNames(
|
14133
14305
|
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
14134
14306
|
"text-grey-20": state === "inactive"
|
@@ -14149,13 +14321,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
14149
14321
|
});
|
14150
14322
|
var Indicator = (_a) => {
|
14151
14323
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
14152
|
-
return /* @__PURE__ */
|
14324
|
+
return /* @__PURE__ */ React109.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14153
14325
|
className: classNames(
|
14154
14326
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
14155
14327
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
14156
14328
|
className
|
14157
14329
|
)
|
14158
|
-
}), state === "completed" ? /* @__PURE__ */
|
14330
|
+
}), state === "completed" ? /* @__PURE__ */ React109.createElement(InlineIcon, {
|
14159
14331
|
icon: import_tick6.default
|
14160
14332
|
}) : dense ? null : children);
|
14161
14333
|
};
|
@@ -14166,26 +14338,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
14166
14338
|
|
14167
14339
|
// src/molecules/Stepper/Stepper.tsx
|
14168
14340
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
14169
|
-
const steps =
|
14170
|
-
return /* @__PURE__ */
|
14341
|
+
const steps = React110.Children.count(children);
|
14342
|
+
return /* @__PURE__ */ React110.createElement(Stepper, {
|
14171
14343
|
role: "list",
|
14172
14344
|
className: "Aquarium-Stepper"
|
14173
|
-
}, /* @__PURE__ */
|
14345
|
+
}, /* @__PURE__ */ React110.createElement(Template, {
|
14174
14346
|
columns: steps
|
14175
|
-
},
|
14347
|
+
}, React110.Children.map(children, (child, index) => {
|
14176
14348
|
if (!isComponentType(child, Step2)) {
|
14177
14349
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
14178
14350
|
} else {
|
14179
14351
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
14180
|
-
return /* @__PURE__ */
|
14352
|
+
return /* @__PURE__ */ React110.createElement(Stepper.Step, {
|
14181
14353
|
state,
|
14182
14354
|
"aria-current": state === "active" ? "step" : false,
|
14183
14355
|
role: "listitem"
|
14184
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
14356
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React110.createElement(Stepper.ConnectorContainer, {
|
14185
14357
|
dense
|
14186
|
-
}, /* @__PURE__ */
|
14358
|
+
}, /* @__PURE__ */ React110.createElement(Stepper.ConnectorContainer.Connector, {
|
14187
14359
|
completed: state === "completed" || state === "active"
|
14188
|
-
})), /* @__PURE__ */
|
14360
|
+
})), /* @__PURE__ */ React110.createElement(Stepper.Step.Indicator, {
|
14189
14361
|
state,
|
14190
14362
|
dense
|
14191
14363
|
}, index + 1), child.props.children);
|
@@ -14198,7 +14370,7 @@ Step2.displayName = "Stepper.Step";
|
|
14198
14370
|
Stepper2.Step = Step2;
|
14199
14371
|
|
14200
14372
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
14201
|
-
import
|
14373
|
+
import React111, { useState as useState13 } from "react";
|
14202
14374
|
import { useId as useId16 } from "@react-aria/utils";
|
14203
14375
|
var SwitchGroup = (_a) => {
|
14204
14376
|
var _b = _a, {
|
@@ -14230,13 +14402,13 @@ var SwitchGroup = (_a) => {
|
|
14230
14402
|
setSelectedItems(updated);
|
14231
14403
|
onChange == null ? void 0 : onChange(updated);
|
14232
14404
|
};
|
14233
|
-
return /* @__PURE__ */
|
14405
|
+
return /* @__PURE__ */ React111.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
14234
14406
|
fieldset: true
|
14235
14407
|
}, labelControlProps), errorProps), {
|
14236
14408
|
className: "Aquarium-SwitchGroup"
|
14237
|
-
}), /* @__PURE__ */
|
14409
|
+
}), /* @__PURE__ */ React111.createElement(InputGroup, {
|
14238
14410
|
cols
|
14239
|
-
},
|
14411
|
+
}, React111.Children.map(children, (c) => {
|
14240
14412
|
var _a3, _b2, _c, _d;
|
14241
14413
|
if (!isComponentType(c, Switch2)) {
|
14242
14414
|
return null;
|
@@ -14244,7 +14416,7 @@ var SwitchGroup = (_a) => {
|
|
14244
14416
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
14245
14417
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
14246
14418
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
14247
|
-
return
|
14419
|
+
return React111.cloneElement(c, {
|
14248
14420
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
14249
14421
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
14250
14422
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -14254,9 +14426,9 @@ var SwitchGroup = (_a) => {
|
|
14254
14426
|
})));
|
14255
14427
|
};
|
14256
14428
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
14257
|
-
return /* @__PURE__ */
|
14429
|
+
return /* @__PURE__ */ React111.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React111.createElement("div", {
|
14258
14430
|
className: tw("flex flex-wrap flex-col gap-2")
|
14259
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
14431
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React111.createElement(Switch2.Skeleton, {
|
14260
14432
|
key
|
14261
14433
|
}))));
|
14262
14434
|
};
|
@@ -14264,14 +14436,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
14264
14436
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
14265
14437
|
|
14266
14438
|
// src/molecules/Textarea/Textarea.tsx
|
14267
|
-
import
|
14439
|
+
import React112, { useState as useState14 } from "react";
|
14268
14440
|
import { useId as useId17 } from "@react-aria/utils";
|
14269
14441
|
import omit16 from "lodash/omit";
|
14270
14442
|
import toString2 from "lodash/toString";
|
14271
|
-
var TextareaBase =
|
14443
|
+
var TextareaBase = React112.forwardRef(
|
14272
14444
|
(_a, ref) => {
|
14273
14445
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
14274
|
-
return /* @__PURE__ */
|
14446
|
+
return /* @__PURE__ */ React112.createElement("textarea", __spreadProps(__spreadValues({
|
14275
14447
|
ref
|
14276
14448
|
}, props), {
|
14277
14449
|
readOnly,
|
@@ -14279,10 +14451,10 @@ var TextareaBase = React110.forwardRef(
|
|
14279
14451
|
}));
|
14280
14452
|
}
|
14281
14453
|
);
|
14282
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
14454
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React112.createElement(Skeleton, {
|
14283
14455
|
height: 58
|
14284
14456
|
});
|
14285
|
-
var Textarea =
|
14457
|
+
var Textarea = React112.forwardRef((props, ref) => {
|
14286
14458
|
var _a, _b, _c;
|
14287
14459
|
const [value, setValue] = useState14((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
14288
14460
|
const defaultId = useId17();
|
@@ -14291,14 +14463,14 @@ var Textarea = React110.forwardRef((props, ref) => {
|
|
14291
14463
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14292
14464
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
14293
14465
|
const baseProps = omit16(props, Object.keys(labelControlProps));
|
14294
|
-
return /* @__PURE__ */
|
14466
|
+
return /* @__PURE__ */ React112.createElement(LabelControl, __spreadProps(__spreadValues({
|
14295
14467
|
id: `${id}-label`,
|
14296
14468
|
htmlFor: id,
|
14297
14469
|
messageId: errorMessageId,
|
14298
14470
|
length: value !== void 0 ? toString2(value).length : void 0
|
14299
14471
|
}, labelControlProps), {
|
14300
14472
|
className: "Aquarium-Textarea"
|
14301
|
-
}), /* @__PURE__ */
|
14473
|
+
}), /* @__PURE__ */ React112.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
14302
14474
|
ref
|
14303
14475
|
}, baseProps), errorProps), {
|
14304
14476
|
id,
|
@@ -14315,48 +14487,48 @@ var Textarea = React110.forwardRef((props, ref) => {
|
|
14315
14487
|
})));
|
14316
14488
|
});
|
14317
14489
|
Textarea.displayName = "Textarea";
|
14318
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
14490
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React112.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React112.createElement(TextareaBase.Skeleton, null));
|
14319
14491
|
Textarea.Skeleton = TextAreaSkeleton;
|
14320
14492
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
14321
14493
|
|
14322
14494
|
// src/molecules/Timeline/Timeline.tsx
|
14323
|
-
import
|
14495
|
+
import React114 from "react";
|
14324
14496
|
|
14325
14497
|
// src/atoms/Timeline/Timeline.tsx
|
14326
|
-
import
|
14498
|
+
import React113 from "react";
|
14327
14499
|
var Timeline = (_a) => {
|
14328
14500
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14329
|
-
return /* @__PURE__ */
|
14501
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14330
14502
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
14331
14503
|
}));
|
14332
14504
|
};
|
14333
14505
|
var Content2 = (_a) => {
|
14334
14506
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14335
|
-
return /* @__PURE__ */
|
14507
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14336
14508
|
className: classNames(tw("pb-6"), className)
|
14337
14509
|
}));
|
14338
14510
|
};
|
14339
14511
|
var Separator2 = (_a) => {
|
14340
14512
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14341
|
-
return /* @__PURE__ */
|
14513
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14342
14514
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
14343
14515
|
}));
|
14344
14516
|
};
|
14345
14517
|
var LineContainer = (_a) => {
|
14346
14518
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14347
|
-
return /* @__PURE__ */
|
14519
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14348
14520
|
className: classNames(tw("flex justify-center py-1"), className)
|
14349
14521
|
}));
|
14350
14522
|
};
|
14351
14523
|
var Line = (_a) => {
|
14352
14524
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14353
|
-
return /* @__PURE__ */
|
14525
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14354
14526
|
className: classNames(tw("w-1 bg-grey-5 h-full justify-self-center"), className)
|
14355
14527
|
}));
|
14356
14528
|
};
|
14357
14529
|
var Dot = (_a) => {
|
14358
14530
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14359
|
-
return /* @__PURE__ */
|
14531
|
+
return /* @__PURE__ */ React113.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14360
14532
|
className: classNames(tw("bg-grey-30 h-[6px] w-[6px] rounded"), className)
|
14361
14533
|
}));
|
14362
14534
|
};
|
@@ -14371,54 +14543,54 @@ var import_error5 = __toESM(require_error());
|
|
14371
14543
|
var import_time2 = __toESM(require_time());
|
14372
14544
|
var import_warningSign5 = __toESM(require_warningSign());
|
14373
14545
|
var TimelineItem = () => null;
|
14374
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
14546
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React114.createElement("div", {
|
14375
14547
|
className: "Aquarium-Timeline"
|
14376
|
-
},
|
14548
|
+
}, React114.Children.map(children, (item) => {
|
14377
14549
|
if (!isComponentType(item, TimelineItem)) {
|
14378
14550
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
14379
14551
|
} else {
|
14380
14552
|
const { props, key } = item;
|
14381
|
-
return /* @__PURE__ */
|
14553
|
+
return /* @__PURE__ */ React114.createElement(Timeline, {
|
14382
14554
|
key: key != null ? key : props.title
|
14383
|
-
}, /* @__PURE__ */
|
14555
|
+
}, /* @__PURE__ */ React114.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React114.createElement(Icon, {
|
14384
14556
|
icon: import_error5.default,
|
14385
14557
|
color: "error-30"
|
14386
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
14558
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React114.createElement(Icon, {
|
14387
14559
|
icon: import_warningSign5.default,
|
14388
14560
|
color: "warning-30"
|
14389
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
14561
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React114.createElement(Icon, {
|
14390
14562
|
icon: import_time2.default,
|
14391
14563
|
color: "info-30"
|
14392
|
-
}) : /* @__PURE__ */
|
14564
|
+
}) : /* @__PURE__ */ React114.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React114.createElement(Typography2.Caption, {
|
14393
14565
|
color: "grey-50"
|
14394
|
-
}, props.title), /* @__PURE__ */
|
14566
|
+
}, props.title), /* @__PURE__ */ React114.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React114.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React114.createElement(Timeline.Content, null, /* @__PURE__ */ React114.createElement(Typography2.Small, null, props.children)));
|
14395
14567
|
}
|
14396
14568
|
}));
|
14397
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
14569
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React114.createElement(Timeline, null, /* @__PURE__ */ React114.createElement(Timeline.Separator, null, /* @__PURE__ */ React114.createElement(Skeleton, {
|
14398
14570
|
width: 6,
|
14399
14571
|
height: 6,
|
14400
14572
|
rounded: true
|
14401
|
-
})), /* @__PURE__ */
|
14573
|
+
})), /* @__PURE__ */ React114.createElement(Skeleton, {
|
14402
14574
|
height: 12,
|
14403
14575
|
width: 120
|
14404
|
-
}), /* @__PURE__ */
|
14576
|
+
}), /* @__PURE__ */ React114.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React114.createElement(Skeleton, {
|
14405
14577
|
width: 2,
|
14406
14578
|
height: "100%"
|
14407
|
-
})), /* @__PURE__ */
|
14579
|
+
})), /* @__PURE__ */ React114.createElement(Timeline.Content, null, /* @__PURE__ */ React114.createElement(Box, {
|
14408
14580
|
display: "flex",
|
14409
14581
|
flexDirection: "column",
|
14410
14582
|
gap: "3"
|
14411
|
-
}, /* @__PURE__ */
|
14583
|
+
}, /* @__PURE__ */ React114.createElement(Skeleton, {
|
14412
14584
|
height: 32,
|
14413
14585
|
width: "100%"
|
14414
|
-
}), /* @__PURE__ */
|
14586
|
+
}), /* @__PURE__ */ React114.createElement(Skeleton, {
|
14415
14587
|
height: 32,
|
14416
14588
|
width: "73%"
|
14417
|
-
}), /* @__PURE__ */
|
14589
|
+
}), /* @__PURE__ */ React114.createElement(Skeleton, {
|
14418
14590
|
height: 32,
|
14419
14591
|
width: "80%"
|
14420
14592
|
}))));
|
14421
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
14593
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React114.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React114.createElement(TimelineItemSkeleton, {
|
14422
14594
|
key
|
14423
14595
|
})));
|
14424
14596
|
Timeline2.Item = TimelineItem;
|
@@ -14426,9 +14598,9 @@ Timeline2.Skeleton = TimelineSkeleton;
|
|
14426
14598
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
14427
14599
|
|
14428
14600
|
// src/utils/table/useTableSelect.ts
|
14429
|
-
import
|
14601
|
+
import React115 from "react";
|
14430
14602
|
var useTableSelect = (data, { key }) => {
|
14431
|
-
const [selected, setSelected] =
|
14603
|
+
const [selected, setSelected] = React115.useState([]);
|
14432
14604
|
const allSelected = selected.length === data.length;
|
14433
14605
|
const isSelected = (dot) => selected.includes(dot[key]);
|
14434
14606
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|
@@ -14624,7 +14796,7 @@ export {
|
|
14624
14796
|
LabelControl,
|
14625
14797
|
LineClamp2 as LineClamp,
|
14626
14798
|
Link2 as Link,
|
14627
|
-
|
14799
|
+
List,
|
14628
14800
|
ListItem,
|
14629
14801
|
Modal2 as Modal,
|
14630
14802
|
ModalTab,
|
@@ -14681,6 +14853,7 @@ export {
|
|
14681
14853
|
ToastProvider,
|
14682
14854
|
Tooltip,
|
14683
14855
|
Typography2 as Typography,
|
14856
|
+
areRowsGrouped,
|
14684
14857
|
asButton,
|
14685
14858
|
asCrumb,
|
14686
14859
|
asPopoverButton,
|