@aivenio/aquarium 1.16.0 → 1.17.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/_variables_timescale.scss +1 -1
- package/dist/atoms.cjs +13 -4
- package/dist/atoms.mjs +13 -4
- package/dist/src/atoms/Navigation/Navigation.d.ts +3 -1
- package/dist/src/atoms/Navigation/Navigation.js +5 -4
- package/dist/src/molecules/Box/Box.d.ts +34 -1
- package/dist/src/molecules/Box/Box.js +2 -1
- package/dist/src/molecules/Breadcrumbs/Breadcrumbs.js +2 -2
- package/dist/src/molecules/DataList/DataList.d.ts +1 -1
- package/dist/src/molecules/DataList/DataList.js +5 -5
- package/dist/src/molecules/DataTable/DataTable.d.ts +1 -1
- package/dist/src/molecules/DataTable/DataTable.js +4 -4
- package/dist/src/molecules/Flexbox/Flexbox.d.ts +3 -0
- package/dist/src/molecules/Flexbox/Flexbox.js +4 -1
- package/dist/src/molecules/Flexbox/FlexboxItem.d.ts +3 -0
- package/dist/src/molecules/Flexbox/FlexboxItem.js +4 -1
- package/dist/src/molecules/Modal/Modal.js +2 -2
- package/dist/src/molecules/MultiInput/InputChip.js +13 -9
- package/dist/src/molecules/Navigation/Navigation.d.ts +3 -1
- package/dist/src/molecules/PageHeader/PageHeader.js +4 -2
- package/dist/src/molecules/Tooltip/Tooltip.js +6 -1
- package/dist/src/utils/table/types.d.ts +4 -0
- package/dist/styles.css +26 -14
- package/dist/styles_timescaledb.css +26 -14
- package/dist/system.cjs +219 -196
- package/dist/system.mjs +214 -191
- 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
@@ -2867,26 +2867,31 @@ var Tooltip = (_a) => {
|
|
2867
2867
|
var _a2, _b2;
|
2868
2868
|
(_a2 = props.onClick) == null ? void 0 : _a2.call(props, e);
|
2869
2869
|
(_b2 = triggerProps.onClick) == null ? void 0 : _b2.call(triggerProps, e);
|
2870
|
+
e.stopPropagation();
|
2870
2871
|
};
|
2871
2872
|
const handleMouseDown = (e) => {
|
2872
2873
|
var _a2, _b2;
|
2873
2874
|
(_a2 = props.onMouseDown) == null ? void 0 : _a2.call(props, e);
|
2874
2875
|
(_b2 = triggerProps.onMouseDown) == null ? void 0 : _b2.call(triggerProps, e);
|
2876
|
+
e.stopPropagation();
|
2875
2877
|
};
|
2876
2878
|
const handleMouseUp = (e) => {
|
2877
2879
|
var _a2, _b2;
|
2878
2880
|
(_a2 = props.onMouseUp) == null ? void 0 : _a2.call(props, e);
|
2879
2881
|
(_b2 = triggerProps.onMouseUp) == null ? void 0 : _b2.call(triggerProps, e);
|
2882
|
+
e.stopPropagation();
|
2880
2883
|
};
|
2881
2884
|
const handlePointerDown = (e) => {
|
2882
2885
|
var _a2, _b2;
|
2883
2886
|
(_a2 = props.onPointerDown) == null ? void 0 : _a2.call(props, e);
|
2884
2887
|
(_b2 = triggerProps.onPointerDown) == null ? void 0 : _b2.call(triggerProps, e);
|
2888
|
+
e.stopPropagation();
|
2885
2889
|
};
|
2886
2890
|
const handlePointerUp = (e) => {
|
2887
2891
|
var _a2, _b2;
|
2888
2892
|
(_a2 = props.onPointerUp) == null ? void 0 : _a2.call(props, e);
|
2889
2893
|
(_b2 = triggerProps.onPointerUp) == null ? void 0 : _b2.call(triggerProps, e);
|
2894
|
+
e.stopPropagation();
|
2890
2895
|
};
|
2891
2896
|
return /* @__PURE__ */ React6.createElement("div", __spreadProps(__spreadValues({
|
2892
2897
|
className: tw(`${inline ? "inline-block" : "block"}`)
|
@@ -3517,6 +3522,7 @@ var Box = (_a) => {
|
|
3517
3522
|
style: __spreadValues(__spreadValues({}, styles), style)
|
3518
3523
|
}, rest));
|
3519
3524
|
};
|
3525
|
+
Box.Flex = createSimpleComponent(Box, { display: "flex" }, "Box.Flex");
|
3520
3526
|
var BorderBox = createSimpleComponent(
|
3521
3527
|
Box,
|
3522
3528
|
{ className: "rounded border", borderColor: "grey-10" },
|
@@ -3803,7 +3809,7 @@ var asCrumb = (Component, displayName, options = { isActive: false }) => {
|
|
3803
3809
|
}), /* @__PURE__ */ React19.createElement("span", {
|
3804
3810
|
className: classNames2(
|
3805
3811
|
tw("flex flex-row flex-nowrap items-center gap-x-3 ", {
|
3806
|
-
"text-primary-80
|
3812
|
+
"text-primary-80 hover:text-primary-70": !options.isActive,
|
3807
3813
|
"text-grey-90": options.isActive
|
3808
3814
|
})
|
3809
3815
|
)
|
@@ -5245,7 +5251,7 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React42.crea
|
|
5245
5251
|
}, children);
|
5246
5252
|
|
5247
5253
|
// src/molecules/DataList/DataList.tsx
|
5248
|
-
import
|
5254
|
+
import React53 from "react";
|
5249
5255
|
import compact from "lodash/compact";
|
5250
5256
|
import isFunction from "lodash/isFunction";
|
5251
5257
|
|
@@ -5696,8 +5702,15 @@ var getDisabledItemKeys = (children) => {
|
|
5696
5702
|
return keys.flat().filter((key) => key !== null);
|
5697
5703
|
};
|
5698
5704
|
|
5699
|
-
// src/molecules/
|
5705
|
+
// src/molecules/List/List.tsx
|
5700
5706
|
import React47 from "react";
|
5707
|
+
var List2 = ({ items, renderItem, container = React47.Fragment }) => {
|
5708
|
+
const Component = container;
|
5709
|
+
return /* @__PURE__ */ React47.createElement(Component, null, items.map(renderItem));
|
5710
|
+
};
|
5711
|
+
|
5712
|
+
// src/molecules/Template/Template.tsx
|
5713
|
+
import React48 from "react";
|
5701
5714
|
var Template = ({
|
5702
5715
|
children,
|
5703
5716
|
columns,
|
@@ -5723,23 +5736,23 @@ var Template = ({
|
|
5723
5736
|
rowGap,
|
5724
5737
|
columnGap
|
5725
5738
|
});
|
5726
|
-
return /* @__PURE__ */
|
5739
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
5727
5740
|
style: __spreadValues({}, styles)
|
5728
5741
|
}, children);
|
5729
5742
|
};
|
5730
5743
|
|
5731
5744
|
// src/atoms/DataList/DataList.tsx
|
5732
|
-
import
|
5745
|
+
import React51 from "react";
|
5733
5746
|
|
5734
5747
|
// src/atoms/Table/Table.tsx
|
5735
|
-
import
|
5748
|
+
import React50 from "react";
|
5736
5749
|
|
5737
5750
|
// src/atoms/RadioButton/RadioButton.tsx
|
5738
|
-
import
|
5739
|
-
var RadioButton =
|
5751
|
+
import React49 from "react";
|
5752
|
+
var RadioButton = React49.forwardRef(
|
5740
5753
|
(_a, ref) => {
|
5741
5754
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
5742
|
-
return /* @__PURE__ */
|
5755
|
+
return /* @__PURE__ */ React49.createElement("input", __spreadProps(__spreadValues({
|
5743
5756
|
id,
|
5744
5757
|
ref,
|
5745
5758
|
type: "radio",
|
@@ -5765,29 +5778,29 @@ var RadioButton = React48.forwardRef(
|
|
5765
5778
|
// src/atoms/Table/Table.tsx
|
5766
5779
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
5767
5780
|
var import_chevronUp2 = __toESM(require_chevronUp());
|
5768
|
-
var HeadContext =
|
5781
|
+
var HeadContext = React50.createContext(null);
|
5769
5782
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
5770
5783
|
var Table = (_a) => {
|
5771
5784
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
5772
|
-
return /* @__PURE__ */
|
5785
|
+
return /* @__PURE__ */ React50.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
5773
5786
|
className: classNames(tableClassNames, className),
|
5774
5787
|
"aria-label": ariaLabel
|
5775
5788
|
}), children);
|
5776
5789
|
};
|
5777
5790
|
var TableHead = (_a) => {
|
5778
5791
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
5779
|
-
return /* @__PURE__ */
|
5792
|
+
return /* @__PURE__ */ React50.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React50.createElement("tr", null, /* @__PURE__ */ React50.createElement(HeadContext.Provider, {
|
5780
5793
|
value: { children, sticky }
|
5781
5794
|
}, children)));
|
5782
5795
|
};
|
5783
5796
|
var TableBody = (_a) => {
|
5784
5797
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
5785
|
-
return /* @__PURE__ */
|
5798
|
+
return /* @__PURE__ */ React50.createElement("tbody", __spreadValues({}, rest), children);
|
5786
5799
|
};
|
5787
5800
|
var rowClassNames = tw("children:border-grey-10 group children:last:border-b-0 hover:bg-grey-0");
|
5788
5801
|
var TableRow = (_a) => {
|
5789
5802
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
5790
|
-
return /* @__PURE__ */
|
5803
|
+
return /* @__PURE__ */ React50.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
5791
5804
|
className: classNames(rowClassNames, className)
|
5792
5805
|
}), children);
|
5793
5806
|
};
|
@@ -5814,15 +5827,15 @@ var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
|
5814
5827
|
};
|
5815
5828
|
var TableCell = (_a) => {
|
5816
5829
|
var _b = _a, { children, className, stickyColumn, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "stickyColumn", "align"]);
|
5817
|
-
const headContext =
|
5818
|
-
return headContext ? /* @__PURE__ */
|
5830
|
+
const headContext = React50.useContext(HeadContext);
|
5831
|
+
return headContext ? /* @__PURE__ */ React50.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
5819
5832
|
className: classNames(
|
5820
5833
|
cellClassNames,
|
5821
5834
|
getHeadCellClassNames(headContext.sticky, stickyColumn),
|
5822
5835
|
getAlignClassNames(align),
|
5823
5836
|
className
|
5824
5837
|
)
|
5825
|
-
}), children) : /* @__PURE__ */
|
5838
|
+
}), children) : /* @__PURE__ */ React50.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
5826
5839
|
className: classNames(
|
5827
5840
|
cellClassNames,
|
5828
5841
|
getBodyCellClassNames(true, stickyColumn),
|
@@ -5833,11 +5846,11 @@ var TableCell = (_a) => {
|
|
5833
5846
|
};
|
5834
5847
|
var TableSelectCell = (_a) => {
|
5835
5848
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
5836
|
-
return /* @__PURE__ */
|
5849
|
+
return /* @__PURE__ */ React50.createElement(Table.Cell, {
|
5837
5850
|
className: tw("leading-[0px]")
|
5838
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
5851
|
+
}, props.type === "radio" ? /* @__PURE__ */ React50.createElement(RadioButton, __spreadValues({
|
5839
5852
|
"aria-label": ariaLabel
|
5840
|
-
}, props)) : /* @__PURE__ */
|
5853
|
+
}, props)) : /* @__PURE__ */ React50.createElement(Checkbox, __spreadValues({
|
5841
5854
|
"aria-label": ariaLabel
|
5842
5855
|
}, props)));
|
5843
5856
|
};
|
@@ -5847,39 +5860,39 @@ var getSortCellIconClassNames = (active) => {
|
|
5847
5860
|
};
|
5848
5861
|
var TableSortCell = (_a) => {
|
5849
5862
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
5850
|
-
return /* @__PURE__ */
|
5863
|
+
return /* @__PURE__ */ React50.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
5851
5864
|
"aria-sort": direction
|
5852
|
-
}), /* @__PURE__ */
|
5865
|
+
}), /* @__PURE__ */ React50.createElement("span", {
|
5853
5866
|
className: getSortCellButtonClassNames(rest.align),
|
5854
5867
|
role: "button",
|
5855
5868
|
tabIndex: -1,
|
5856
5869
|
onClick
|
5857
|
-
}, children, /* @__PURE__ */
|
5870
|
+
}, children, /* @__PURE__ */ React50.createElement("div", {
|
5858
5871
|
"data-sort-icons": true,
|
5859
5872
|
className: tw("flex flex-col", {
|
5860
5873
|
"invisible group-hover:visible": direction === "none"
|
5861
5874
|
})
|
5862
|
-
}, /* @__PURE__ */
|
5875
|
+
}, /* @__PURE__ */ React50.createElement(InlineIcon, {
|
5863
5876
|
icon: import_chevronUp2.default,
|
5864
5877
|
className: getSortCellIconClassNames(direction === "descending")
|
5865
|
-
}), /* @__PURE__ */
|
5878
|
+
}), /* @__PURE__ */ React50.createElement(InlineIcon, {
|
5866
5879
|
icon: import_chevronDown3.default,
|
5867
5880
|
className: getSortCellIconClassNames(direction === "ascending")
|
5868
5881
|
}))));
|
5869
5882
|
};
|
5870
|
-
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
5883
|
+
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React50.createElement("div", {
|
5871
5884
|
className: tw("flex gap-4 items-center")
|
5872
|
-
}, image && /* @__PURE__ */
|
5885
|
+
}, image && /* @__PURE__ */ React50.createElement("img", {
|
5873
5886
|
src: image,
|
5874
5887
|
alt: imageAlt,
|
5875
5888
|
style: { width: imageSize, height: imageSize }
|
5876
|
-
}), /* @__PURE__ */
|
5877
|
-
Table.Head =
|
5878
|
-
Table.Body =
|
5879
|
-
Table.Row =
|
5880
|
-
Table.Cell =
|
5881
|
-
Table.SortCell =
|
5882
|
-
Table.SelectCell =
|
5889
|
+
}), /* @__PURE__ */ React50.createElement("div", null, title, caption && /* @__PURE__ */ React50.createElement(Typography2.Caption, null, caption)));
|
5890
|
+
Table.Head = React50.memo(TableHead);
|
5891
|
+
Table.Body = React50.memo(TableBody);
|
5892
|
+
Table.Row = React50.memo(TableRow);
|
5893
|
+
Table.Cell = React50.memo(TableCell);
|
5894
|
+
Table.SortCell = React50.memo(TableSortCell);
|
5895
|
+
Table.SelectCell = React50.memo(TableSelectCell);
|
5883
5896
|
|
5884
5897
|
// src/atoms/DataList/DataList.tsx
|
5885
5898
|
var import_chevronDown4 = __toESM(require_chevronDown());
|
@@ -5891,7 +5904,7 @@ var getAlignClassNames2 = (align) => tw("flex items-center", {
|
|
5891
5904
|
});
|
5892
5905
|
var DataList = (_a) => {
|
5893
5906
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
5894
|
-
return /* @__PURE__ */
|
5907
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadValues({}, rest));
|
5895
5908
|
};
|
5896
5909
|
var HeadCell = (_a) => {
|
5897
5910
|
var _b = _a, {
|
@@ -5905,7 +5918,7 @@ var HeadCell = (_a) => {
|
|
5905
5918
|
"align",
|
5906
5919
|
"stickyColumn"
|
5907
5920
|
]);
|
5908
|
-
return /* @__PURE__ */
|
5921
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5909
5922
|
role: "cell",
|
5910
5923
|
className: classNames(
|
5911
5924
|
cellClassNames,
|
@@ -5925,7 +5938,7 @@ var Cell = (_a) => {
|
|
5925
5938
|
"align",
|
5926
5939
|
"stickyColumn"
|
5927
5940
|
]);
|
5928
|
-
return /* @__PURE__ */
|
5941
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5929
5942
|
role: "cell",
|
5930
5943
|
className: classNames(
|
5931
5944
|
cellClassNames,
|
@@ -5938,31 +5951,31 @@ var Cell = (_a) => {
|
|
5938
5951
|
};
|
5939
5952
|
var Row = (_a) => {
|
5940
5953
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
5941
|
-
return /* @__PURE__ */
|
5954
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5942
5955
|
className: classNames(tw("contents group"), className),
|
5943
5956
|
role: "row"
|
5944
5957
|
}));
|
5945
5958
|
};
|
5946
5959
|
var SortCell = (_a) => {
|
5947
5960
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
5948
|
-
return /* @__PURE__ */
|
5961
|
+
return /* @__PURE__ */ React51.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
5949
5962
|
"aria-sort": direction,
|
5950
5963
|
role: "cell",
|
5951
5964
|
sticky
|
5952
|
-
}), /* @__PURE__ */
|
5965
|
+
}), /* @__PURE__ */ React51.createElement("span", {
|
5953
5966
|
className: getSortCellButtonClassNames(rest.align),
|
5954
5967
|
role: "button",
|
5955
5968
|
tabIndex: -1,
|
5956
5969
|
onClick
|
5957
|
-
}, children, /* @__PURE__ */
|
5970
|
+
}, children, /* @__PURE__ */ React51.createElement("div", {
|
5958
5971
|
"data-sort-icons": true,
|
5959
5972
|
className: tw("flex flex-col", {
|
5960
5973
|
"invisible group-hover:visible": direction === "none"
|
5961
5974
|
})
|
5962
|
-
}, /* @__PURE__ */
|
5975
|
+
}, /* @__PURE__ */ React51.createElement(InlineIcon, {
|
5963
5976
|
icon: import_chevronUp3.default,
|
5964
5977
|
className: getSortCellIconClassNames(direction === "descending")
|
5965
|
-
}), /* @__PURE__ */
|
5978
|
+
}), /* @__PURE__ */ React51.createElement(InlineIcon, {
|
5966
5979
|
icon: import_chevronDown4.default,
|
5967
5980
|
className: getSortCellIconClassNames(direction === "ascending")
|
5968
5981
|
}))));
|
@@ -5990,9 +6003,9 @@ var cellProps = (column) => ({
|
|
5990
6003
|
var columnIsFieldColumn = (column) => Boolean(column && column.field);
|
5991
6004
|
|
5992
6005
|
// src/utils/table/useTableSort.tsx
|
5993
|
-
import
|
6006
|
+
import React52 from "react";
|
5994
6007
|
var useTableSort = () => {
|
5995
|
-
const [sort, setSort] =
|
6008
|
+
const [sort, setSort] = React52.useState();
|
5996
6009
|
const handleSortClick = (column) => {
|
5997
6010
|
if (sort && sort.column.headerName === column.headerName) {
|
5998
6011
|
if (sort.direction === "ascending") {
|
@@ -6029,6 +6042,7 @@ var DataList2 = ({
|
|
6029
6042
|
rows,
|
6030
6043
|
sticky,
|
6031
6044
|
menu,
|
6045
|
+
menuLabel = "Context menu",
|
6032
6046
|
onAction
|
6033
6047
|
}) => {
|
6034
6048
|
const [sort, updateSort] = useTableSort();
|
@@ -6040,54 +6054,54 @@ var DataList2 = ({
|
|
6040
6054
|
}),
|
6041
6055
|
menu ? "auto" : void 0
|
6042
6056
|
]);
|
6043
|
-
return /* @__PURE__ */
|
6057
|
+
return /* @__PURE__ */ React53.createElement(Template, {
|
6044
6058
|
columns: templateColumns
|
6045
6059
|
}, columns.map(
|
6046
|
-
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
6060
|
+
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React53.createElement(DataList.SortCell, __spreadValues({
|
6047
6061
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
6048
6062
|
onClick: () => updateSort(column),
|
6049
6063
|
sticky
|
6050
|
-
}, cellProps(column)), column.headerName) : /* @__PURE__ */
|
6064
|
+
}, cellProps(column)), column.headerName) : /* @__PURE__ */ React53.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
6051
6065
|
sticky
|
6052
6066
|
}), column.headerName)
|
6053
|
-
), menu && /* @__PURE__ */
|
6067
|
+
), menu && /* @__PURE__ */ React53.createElement(DataList.HeadCell, {
|
6054
6068
|
align: "right",
|
6055
|
-
"aria-label":
|
6056
|
-
}), /* @__PURE__ */
|
6069
|
+
"aria-label": menuLabel
|
6070
|
+
}), /* @__PURE__ */ React53.createElement(List2, {
|
6057
6071
|
items: sortedRows,
|
6058
|
-
renderItem: (row, index) => /* @__PURE__ */
|
6072
|
+
renderItem: (row, index) => /* @__PURE__ */ React53.createElement(DataList.Row, {
|
6059
6073
|
key: row.id
|
6060
|
-
}, /* @__PURE__ */
|
6074
|
+
}, /* @__PURE__ */ React53.createElement(List2, {
|
6061
6075
|
items: columns,
|
6062
|
-
renderItem: (column) => column.type === "status" ? /* @__PURE__ */
|
6076
|
+
renderItem: (column) => column.type === "status" ? /* @__PURE__ */ React53.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React53.createElement(StatusChip, __spreadValues({
|
6063
6077
|
dense: true
|
6064
|
-
}, column.status(row, index, sortedRows)))) : column.type === "action" ? /* @__PURE__ */
|
6078
|
+
}, column.status(row, index, sortedRows)))) : column.type === "action" ? /* @__PURE__ */ React53.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React53.createElement(Button.Secondary, __spreadValues({
|
6065
6079
|
dense: true
|
6066
|
-
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */
|
6067
|
-
}), menu && /* @__PURE__ */
|
6080
|
+
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */ React53.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), column.UNSAFE_render(row, index, sortedRows)) : column.type === "item" ? /* @__PURE__ */ React53.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React53.createElement(Item4, __spreadValues({}, column.item(row, index, sortedRows)))) : /* @__PURE__ */ React53.createElement(DataList.Cell, __spreadValues({}, cellProps(column)), column.formatter ? column.formatter(row[column.field], row, index, sortedRows) : row[column.field])
|
6081
|
+
}), menu && /* @__PURE__ */ React53.createElement(DataList.Cell, {
|
6068
6082
|
align: "right"
|
6069
|
-
}, /* @__PURE__ */
|
6083
|
+
}, /* @__PURE__ */ React53.createElement(DropdownMenu2, {
|
6070
6084
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index)
|
6071
|
-
}, /* @__PURE__ */
|
6072
|
-
"aria-label":
|
6085
|
+
}, /* @__PURE__ */ React53.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React53.createElement(Button.Icon, {
|
6086
|
+
"aria-label": menuLabel,
|
6073
6087
|
icon: import_more.default
|
6074
6088
|
})), isFunction(menu) ? menu(row, index) : menu)))
|
6075
6089
|
}));
|
6076
6090
|
};
|
6077
6091
|
|
6078
6092
|
// src/molecules/DataTable/DataTable.tsx
|
6079
|
-
import
|
6093
|
+
import React56 from "react";
|
6080
6094
|
import compact2 from "lodash/compact";
|
6081
6095
|
import isFunction2 from "lodash/isFunction";
|
6082
6096
|
|
6083
6097
|
// src/molecules/Table/Table.tsx
|
6084
|
-
import
|
6098
|
+
import React55 from "react";
|
6085
6099
|
|
6086
6100
|
// src/utils/table/useScrollTarget.ts
|
6087
|
-
import
|
6101
|
+
import React54 from "react";
|
6088
6102
|
var useScrollTarget = (callback) => {
|
6089
|
-
const targetRef =
|
6090
|
-
|
6103
|
+
const targetRef = React54.useRef(null);
|
6104
|
+
React54.useLayoutEffect(() => {
|
6091
6105
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
6092
6106
|
root: null,
|
6093
6107
|
rootMargin: `0px 0px 200px 0px`
|
@@ -6105,12 +6119,12 @@ var Table2 = (_a) => {
|
|
6105
6119
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
6106
6120
|
const bottomRef = useScrollTarget(onNext);
|
6107
6121
|
const topRef = useScrollTarget(onPrev);
|
6108
|
-
return /* @__PURE__ */
|
6122
|
+
return /* @__PURE__ */ React55.createElement("div", {
|
6109
6123
|
className: "relative w-full"
|
6110
|
-
}, /* @__PURE__ */
|
6124
|
+
}, /* @__PURE__ */ React55.createElement("div", {
|
6111
6125
|
ref: topRef,
|
6112
6126
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
6113
|
-
}), /* @__PURE__ */
|
6127
|
+
}), /* @__PURE__ */ React55.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ React55.createElement("div", {
|
6114
6128
|
ref: bottomRef,
|
6115
6129
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
6116
6130
|
}));
|
@@ -6132,6 +6146,7 @@ var DataTable = (_a) => {
|
|
6132
6146
|
layout = "auto",
|
6133
6147
|
sticky,
|
6134
6148
|
menu,
|
6149
|
+
menuLabel = "Context menu",
|
6135
6150
|
onAction
|
6136
6151
|
} = _b, rest = __objRest(_b, [
|
6137
6152
|
"columns",
|
@@ -6140,59 +6155,60 @@ var DataTable = (_a) => {
|
|
6140
6155
|
"layout",
|
6141
6156
|
"sticky",
|
6142
6157
|
"menu",
|
6158
|
+
"menuLabel",
|
6143
6159
|
"onAction"
|
6144
6160
|
]);
|
6145
6161
|
const [sort, updateSort] = useTableSort();
|
6146
6162
|
const sortedRows = sortRowsBy(rows, sort);
|
6147
|
-
return /* @__PURE__ */
|
6163
|
+
return /* @__PURE__ */ React56.createElement(Table2, __spreadProps(__spreadValues({}, rest), {
|
6148
6164
|
className: tw({
|
6149
6165
|
"whitespace-nowrap": noWrap,
|
6150
6166
|
"table-auto": layout === "auto",
|
6151
6167
|
"table-fixed": layout === "fixed"
|
6152
6168
|
})
|
6153
|
-
}), /* @__PURE__ */
|
6169
|
+
}), /* @__PURE__ */ React56.createElement(Table2.Head, {
|
6154
6170
|
sticky
|
6155
6171
|
}, compact2([
|
6156
6172
|
...columns.map(
|
6157
|
-
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
6173
|
+
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React56.createElement(Table2.SortCell, __spreadValues({
|
6158
6174
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
6159
6175
|
onClick: () => updateSort(column),
|
6160
6176
|
style: { width: column.width },
|
6161
6177
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
6162
|
-
}, cellProps(column)), !column.headerInvisible && column.headerName) : /* @__PURE__ */
|
6178
|
+
}, cellProps(column)), !column.headerInvisible && column.headerName) : /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
6163
6179
|
style: { width: column.width },
|
6164
6180
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
6165
6181
|
}), !column.headerInvisible && column.headerName)
|
6166
6182
|
),
|
6167
|
-
menu ? /* @__PURE__ */
|
6183
|
+
menu ? /* @__PURE__ */ React56.createElement(Table2.Cell, {
|
6168
6184
|
key: "__contextMenu",
|
6169
6185
|
align: "right",
|
6170
|
-
"aria-label":
|
6186
|
+
"aria-label": menuLabel
|
6171
6187
|
}) : null
|
6172
|
-
])), /* @__PURE__ */
|
6188
|
+
])), /* @__PURE__ */ React56.createElement(Table2.Body, null, /* @__PURE__ */ React56.createElement(List2, {
|
6173
6189
|
items: sortedRows,
|
6174
|
-
renderItem: (row, index) => /* @__PURE__ */
|
6190
|
+
renderItem: (row, index) => /* @__PURE__ */ React56.createElement(Table2.Row, {
|
6175
6191
|
key: row.id
|
6176
|
-
}, /* @__PURE__ */
|
6192
|
+
}, /* @__PURE__ */ React56.createElement(List2, {
|
6177
6193
|
items: columns,
|
6178
|
-
renderItem: (column) => column.type === "status" ? /* @__PURE__ */
|
6194
|
+
renderItem: (column) => column.type === "status" ? /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React56.createElement(StatusChip, __spreadValues({
|
6179
6195
|
dense: true
|
6180
|
-
}, column.status(row, index, sortedRows)))) : column.type === "action" ? /* @__PURE__ */
|
6196
|
+
}, column.status(row, index, sortedRows)))) : column.type === "action" ? /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React56.createElement(Button.Secondary, __spreadValues({
|
6181
6197
|
dense: true
|
6182
|
-
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */
|
6183
|
-
}), menu && /* @__PURE__ */
|
6198
|
+
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), column.UNSAFE_render(row, index, sortedRows)) : column.type === "item" ? /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), /* @__PURE__ */ React56.createElement(Item4, __spreadValues({}, column.item(row, index, sortedRows)))) : /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadValues({}, cellProps(column)), column.formatter ? column.formatter(row[column.field], row, index, sortedRows) : row[column.field])
|
6199
|
+
}), menu && /* @__PURE__ */ React56.createElement(Table2.Cell, {
|
6184
6200
|
align: "right"
|
6185
|
-
}, /* @__PURE__ */
|
6201
|
+
}, /* @__PURE__ */ React56.createElement(DropdownMenu2, {
|
6186
6202
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index)
|
6187
|
-
}, /* @__PURE__ */
|
6188
|
-
"aria-label":
|
6203
|
+
}, /* @__PURE__ */ React56.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React56.createElement(Button.Icon, {
|
6204
|
+
"aria-label": menuLabel,
|
6189
6205
|
icon: import_more2.default
|
6190
6206
|
})), isFunction2(menu) ? menu(row, index) : menu)))
|
6191
6207
|
})));
|
6192
6208
|
};
|
6193
6209
|
|
6194
6210
|
// src/molecules/Dialog/Dialog.tsx
|
6195
|
-
import
|
6211
|
+
import React58 from "react";
|
6196
6212
|
import { useDialog } from "@react-aria/dialog";
|
6197
6213
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
6198
6214
|
import { useId } from "@react-aria/utils";
|
@@ -6219,10 +6235,10 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
6219
6235
|
};
|
6220
6236
|
|
6221
6237
|
// src/atoms/Modal/Modal.tsx
|
6222
|
-
import
|
6238
|
+
import React57 from "react";
|
6223
6239
|
var Modal = (_a) => {
|
6224
6240
|
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
6225
|
-
return open ? /* @__PURE__ */
|
6241
|
+
return open ? /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6226
6242
|
className: classNames(
|
6227
6243
|
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
6228
6244
|
className
|
@@ -6231,14 +6247,14 @@ var Modal = (_a) => {
|
|
6231
6247
|
};
|
6232
6248
|
Modal.BackDrop = (_a) => {
|
6233
6249
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
6234
|
-
return /* @__PURE__ */
|
6250
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6235
6251
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
6236
6252
|
}));
|
6237
6253
|
};
|
6238
|
-
Modal.Dialog =
|
6254
|
+
Modal.Dialog = React57.forwardRef(
|
6239
6255
|
(_a, ref) => {
|
6240
6256
|
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
6241
|
-
return /* @__PURE__ */
|
6257
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({
|
6242
6258
|
ref,
|
6243
6259
|
"aria-modal": "true"
|
6244
6260
|
}, rest), {
|
@@ -6256,31 +6272,31 @@ Modal.Dialog = React56.forwardRef(
|
|
6256
6272
|
);
|
6257
6273
|
Modal.Header = (_a) => {
|
6258
6274
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6259
|
-
return /* @__PURE__ */
|
6275
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6260
6276
|
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
6261
6277
|
}), children);
|
6262
6278
|
};
|
6263
6279
|
Modal.HeaderImage = (_a) => {
|
6264
6280
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
6265
6281
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
6266
|
-
return backgroundImage ? /* @__PURE__ */
|
6282
|
+
return backgroundImage ? /* @__PURE__ */ React57.createElement("img", __spreadProps(__spreadValues({
|
6267
6283
|
"aria-hidden": true,
|
6268
6284
|
src: backgroundImage != null ? backgroundImage : void 0
|
6269
6285
|
}, rest), {
|
6270
6286
|
className: classNames(common, tw("object-cover"), className)
|
6271
|
-
})) : /* @__PURE__ */
|
6287
|
+
})) : /* @__PURE__ */ React57.createElement("div", {
|
6272
6288
|
className: classNames(common, tw("bg-grey-5"), className)
|
6273
6289
|
});
|
6274
6290
|
};
|
6275
6291
|
Modal.CloseButtonContainer = (_a) => {
|
6276
6292
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
6277
|
-
return /* @__PURE__ */
|
6293
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6278
6294
|
className: classNames(tw("absolute top-[20px] right-[28px]"), className)
|
6279
6295
|
}));
|
6280
6296
|
};
|
6281
6297
|
Modal.Title = (_a) => {
|
6282
6298
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6283
|
-
return /* @__PURE__ */
|
6299
|
+
return /* @__PURE__ */ React57.createElement(Typography, __spreadValues({
|
6284
6300
|
htmlTag: "h2",
|
6285
6301
|
variant: "subheading",
|
6286
6302
|
color: "grey-90",
|
@@ -6289,51 +6305,51 @@ Modal.Title = (_a) => {
|
|
6289
6305
|
};
|
6290
6306
|
Modal.Subtitle = (_a) => {
|
6291
6307
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6292
|
-
return /* @__PURE__ */
|
6308
|
+
return /* @__PURE__ */ React57.createElement(Typography, __spreadValues({
|
6293
6309
|
variant: "small",
|
6294
6310
|
color: "grey-60"
|
6295
6311
|
}, rest), children);
|
6296
6312
|
};
|
6297
6313
|
Modal.TitleContainer = (_a) => {
|
6298
6314
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6299
|
-
return /* @__PURE__ */
|
6315
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6300
6316
|
className: classNames(tw("flex flex-col grow gap-2"), className)
|
6301
6317
|
}), children);
|
6302
6318
|
};
|
6303
6319
|
Modal.Body = (_a) => {
|
6304
6320
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
6305
|
-
return /* @__PURE__ */
|
6321
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6306
6322
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
6307
6323
|
style: __spreadValues({ maxHeight }, style)
|
6308
6324
|
}), children);
|
6309
6325
|
};
|
6310
6326
|
Modal.Footer = (_a) => {
|
6311
6327
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6312
|
-
return /* @__PURE__ */
|
6328
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6313
6329
|
className: classNames(tw("px-7 py-6"), className)
|
6314
6330
|
}), children);
|
6315
6331
|
};
|
6316
6332
|
Modal.Actions = (_a) => {
|
6317
6333
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6318
|
-
return /* @__PURE__ */
|
6334
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6319
6335
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
6320
6336
|
}), children);
|
6321
6337
|
};
|
6322
6338
|
|
6323
6339
|
// src/molecules/Dialog/Dialog.tsx
|
6324
6340
|
var Dialog = (props) => {
|
6325
|
-
const ref =
|
6341
|
+
const ref = React58.useRef(null);
|
6326
6342
|
const state = useOverlayTriggerState2({ isOpen: props.open });
|
6327
6343
|
const { modalProps, underlayProps } = useModalOverlay({}, state, ref);
|
6328
6344
|
if (!state.isOpen) {
|
6329
6345
|
return null;
|
6330
6346
|
}
|
6331
|
-
return /* @__PURE__ */
|
6347
|
+
return /* @__PURE__ */ React58.createElement(Overlay2, null, /* @__PURE__ */ React58.createElement(Modal, {
|
6332
6348
|
open: true
|
6333
|
-
}, /* @__PURE__ */
|
6349
|
+
}, /* @__PURE__ */ React58.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React58.createElement(Modal.Dialog, __spreadValues({
|
6334
6350
|
ref,
|
6335
6351
|
size: "sm"
|
6336
|
-
}, modalProps), /* @__PURE__ */
|
6352
|
+
}, modalProps), /* @__PURE__ */ React58.createElement(DialogWrapper, __spreadValues({}, props)))));
|
6337
6353
|
};
|
6338
6354
|
var DialogWrapper = ({
|
6339
6355
|
title,
|
@@ -6342,36 +6358,36 @@ var DialogWrapper = ({
|
|
6342
6358
|
primaryAction,
|
6343
6359
|
secondaryAction
|
6344
6360
|
}) => {
|
6345
|
-
const ref =
|
6361
|
+
const ref = React58.useRef(null);
|
6346
6362
|
const labelledBy = useId();
|
6347
6363
|
const describedBy = useId();
|
6348
6364
|
const { dialogProps } = useDialog(
|
6349
6365
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
6350
6366
|
ref
|
6351
6367
|
);
|
6352
|
-
return /* @__PURE__ */
|
6368
|
+
return /* @__PURE__ */ React58.createElement("div", __spreadProps(__spreadValues({
|
6353
6369
|
ref
|
6354
6370
|
}, dialogProps), {
|
6355
6371
|
className: tw("outline-none")
|
6356
|
-
}), /* @__PURE__ */
|
6372
|
+
}), /* @__PURE__ */ React58.createElement(Modal.Header, null, /* @__PURE__ */ React58.createElement(Icon, {
|
6357
6373
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
6358
6374
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
6359
6375
|
fontSize: 20
|
6360
|
-
}), /* @__PURE__ */
|
6376
|
+
}), /* @__PURE__ */ React58.createElement(Modal.Title, {
|
6361
6377
|
id: labelledBy,
|
6362
6378
|
variant: "large-strong",
|
6363
6379
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
6364
|
-
}, title)), /* @__PURE__ */
|
6380
|
+
}, title)), /* @__PURE__ */ React58.createElement(Modal.Body, {
|
6365
6381
|
id: describedBy
|
6366
|
-
}, children), /* @__PURE__ */
|
6382
|
+
}, children), /* @__PURE__ */ React58.createElement(Modal.Footer, null, /* @__PURE__ */ React58.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ React58.createElement(Button.Ghost, __spreadValues({
|
6367
6383
|
key: secondaryAction.text
|
6368
|
-
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
6384
|
+
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React58.createElement(Button.Secondary, __spreadValues({
|
6369
6385
|
key: primaryAction.text
|
6370
6386
|
}, omit8(primaryAction, "text")), primaryAction.text))));
|
6371
6387
|
};
|
6372
6388
|
|
6373
6389
|
// src/molecules/Divider/Divider.tsx
|
6374
|
-
import
|
6390
|
+
import React59 from "react";
|
6375
6391
|
var sizeClasses = {
|
6376
6392
|
horizontal: {
|
6377
6393
|
1: "h-1px",
|
@@ -6393,7 +6409,7 @@ var sizeClasses = {
|
|
6393
6409
|
var Divider2 = (_a) => {
|
6394
6410
|
var _b = _a, { direction = "horizontal", size = 1 } = _b, props = __objRest(_b, ["direction", "size"]);
|
6395
6411
|
const sizeClass = sizeClasses[direction][size];
|
6396
|
-
return /* @__PURE__ */
|
6412
|
+
return /* @__PURE__ */ React59.createElement("div", __spreadProps(__spreadValues({}, props), {
|
6397
6413
|
className: tw(`bg-grey-5 ${sizeClass}`, {
|
6398
6414
|
"block w-full": direction === "horizontal",
|
6399
6415
|
"inline-block h-full": direction === "vertical"
|
@@ -6402,22 +6418,22 @@ var Divider2 = (_a) => {
|
|
6402
6418
|
};
|
6403
6419
|
|
6404
6420
|
// src/molecules/Dropdown/Dropdown.tsx
|
6405
|
-
import
|
6421
|
+
import React62 from "react";
|
6406
6422
|
|
6407
6423
|
// src/molecules/Popover/Popover.tsx
|
6408
|
-
import
|
6424
|
+
import React61, { useRef as useRef7 } from "react";
|
6409
6425
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
6410
6426
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
6411
6427
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
6412
6428
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "@react-stately/overlays";
|
6413
6429
|
|
6414
6430
|
// src/molecules/Popover/Dialog.tsx
|
6415
|
-
import
|
6431
|
+
import React60 from "react";
|
6416
6432
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
6417
6433
|
var Dialog2 = ({ children }) => {
|
6418
|
-
const ref =
|
6434
|
+
const ref = React60.useRef(null);
|
6419
6435
|
const { dialogProps } = useDialog2({}, ref);
|
6420
|
-
return /* @__PURE__ */
|
6436
|
+
return /* @__PURE__ */ React60.createElement("div", __spreadProps(__spreadValues({
|
6421
6437
|
ref
|
6422
6438
|
}, dialogProps), {
|
6423
6439
|
className: tw("outline-none")
|
@@ -6451,21 +6467,21 @@ var Popover2 = (props) => {
|
|
6451
6467
|
const triggerRef = useRef7(null);
|
6452
6468
|
const state = useOverlayTriggerState3(props);
|
6453
6469
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
6454
|
-
return /* @__PURE__ */
|
6470
|
+
return /* @__PURE__ */ React61.createElement(PopoverContext.Provider, {
|
6455
6471
|
value: {
|
6456
6472
|
state
|
6457
6473
|
}
|
6458
|
-
},
|
6474
|
+
}, React61.Children.map(props.children, (child) => {
|
6459
6475
|
if (isComponentType(child, Popover2.Trigger)) {
|
6460
|
-
return /* @__PURE__ */
|
6476
|
+
return /* @__PURE__ */ React61.createElement(PressResponder2, __spreadValues({
|
6461
6477
|
ref: triggerRef
|
6462
|
-
}, triggerProps), /* @__PURE__ */
|
6478
|
+
}, triggerProps), /* @__PURE__ */ React61.createElement(PopoverTriggerWrapper, {
|
6463
6479
|
"data-testid": props["data-testid"],
|
6464
6480
|
"aria-controls": id
|
6465
6481
|
}, child.props.children));
|
6466
6482
|
}
|
6467
6483
|
if (isComponentType(child, Popover2.Panel)) {
|
6468
|
-
return state.isOpen && /* @__PURE__ */
|
6484
|
+
return state.isOpen && /* @__PURE__ */ React61.createElement(PopoverOverlay, __spreadValues({
|
6469
6485
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
6470
6486
|
state,
|
6471
6487
|
placement,
|
@@ -6476,7 +6492,7 @@ var Popover2 = (props) => {
|
|
6476
6492
|
offset,
|
6477
6493
|
crossOffset,
|
6478
6494
|
shouldFlip
|
6479
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
6495
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React61.createElement(Dialog2, null, child.props.children) : child.props.children);
|
6480
6496
|
}
|
6481
6497
|
throw new Error("Invalid children element type");
|
6482
6498
|
}));
|
@@ -6495,7 +6511,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
6495
6511
|
state.close();
|
6496
6512
|
onClick == null ? void 0 : onClick(e);
|
6497
6513
|
};
|
6498
|
-
return /* @__PURE__ */
|
6514
|
+
return /* @__PURE__ */ React61.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
6499
6515
|
onClick: handleClick
|
6500
6516
|
}));
|
6501
6517
|
};
|
@@ -6508,9 +6524,9 @@ var PopoverTriggerWrapper = (_a) => {
|
|
6508
6524
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6509
6525
|
var _a2;
|
6510
6526
|
const ref = useRef7(null);
|
6511
|
-
const trigger =
|
6527
|
+
const trigger = React61.Children.only(children);
|
6512
6528
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
6513
|
-
return
|
6529
|
+
return React61.cloneElement(trigger, __spreadProps(__spreadValues({
|
6514
6530
|
"ref": ref
|
6515
6531
|
}, mergeProps3(pressProps, trigger.props)), {
|
6516
6532
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -6519,10 +6535,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
6519
6535
|
|
6520
6536
|
// src/molecules/Dropdown/Dropdown.tsx
|
6521
6537
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
6522
|
-
return /* @__PURE__ */
|
6538
|
+
return /* @__PURE__ */ React62.createElement(Popover2, {
|
6523
6539
|
type: "menu",
|
6524
6540
|
placement
|
6525
|
-
}, /* @__PURE__ */
|
6541
|
+
}, /* @__PURE__ */ React62.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React62.createElement(Popover2.Panel, null, content));
|
6526
6542
|
};
|
6527
6543
|
var DropdownMenu3 = ({
|
6528
6544
|
title,
|
@@ -6531,26 +6547,26 @@ var DropdownMenu3 = ({
|
|
6531
6547
|
triggerId,
|
6532
6548
|
setClose = () => void 0
|
6533
6549
|
}) => {
|
6534
|
-
const menuRef =
|
6535
|
-
|
6550
|
+
const menuRef = React62.useRef(null);
|
6551
|
+
React62.useEffect(() => {
|
6536
6552
|
const id = setTimeout(() => {
|
6537
6553
|
var _a, _b, _c;
|
6538
6554
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
6539
6555
|
});
|
6540
6556
|
return () => clearTimeout(id);
|
6541
6557
|
}, [menuRef.current]);
|
6542
|
-
return /* @__PURE__ */
|
6558
|
+
return /* @__PURE__ */ React62.createElement("div", {
|
6543
6559
|
style: { minWidth: "250px" },
|
6544
6560
|
className: tw("py-3 bg-white")
|
6545
|
-
}, !!title && /* @__PURE__ */
|
6561
|
+
}, !!title && /* @__PURE__ */ React62.createElement("div", {
|
6546
6562
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
6547
|
-
}, title), /* @__PURE__ */
|
6563
|
+
}, title), /* @__PURE__ */ React62.createElement("ol", {
|
6548
6564
|
role: "menu",
|
6549
6565
|
ref: menuRef,
|
6550
6566
|
id: contentId,
|
6551
6567
|
"aria-labelledby": triggerId
|
6552
|
-
},
|
6553
|
-
return
|
6568
|
+
}, React62.Children.map(children, (child) => {
|
6569
|
+
return React62.cloneElement(child, { setClose });
|
6554
6570
|
})));
|
6555
6571
|
};
|
6556
6572
|
var DropdownItem = (_a) => {
|
@@ -6605,10 +6621,10 @@ var DropdownItem = (_a) => {
|
|
6605
6621
|
handleSelect();
|
6606
6622
|
}
|
6607
6623
|
};
|
6608
|
-
const itemContent = /* @__PURE__ */
|
6624
|
+
const itemContent = /* @__PURE__ */ React62.createElement("div", {
|
6609
6625
|
className: tw("py-3 px-4")
|
6610
6626
|
}, children);
|
6611
|
-
return /* @__PURE__ */
|
6627
|
+
return /* @__PURE__ */ React62.createElement("li", __spreadProps(__spreadValues({
|
6612
6628
|
role: "menuitem",
|
6613
6629
|
tabIndex: -1,
|
6614
6630
|
onClick: handleClick,
|
@@ -6619,11 +6635,11 @@ var DropdownItem = (_a) => {
|
|
6619
6635
|
"text-grey-10 cursor-not-allowed": disabled,
|
6620
6636
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
6621
6637
|
})
|
6622
|
-
}), tooltip ? /* @__PURE__ */
|
6638
|
+
}), tooltip ? /* @__PURE__ */ React62.createElement(Tooltip, {
|
6623
6639
|
content: tooltip,
|
6624
6640
|
placement: tooltipPlacement,
|
6625
6641
|
inline: false
|
6626
|
-
}, /* @__PURE__ */
|
6642
|
+
}, /* @__PURE__ */ React62.createElement("div", {
|
6627
6643
|
tabIndex: 0,
|
6628
6644
|
className: tw("grow")
|
6629
6645
|
}, itemContent)) : itemContent);
|
@@ -6632,11 +6648,11 @@ Dropdown.Menu = DropdownMenu3;
|
|
6632
6648
|
Dropdown.Item = DropdownItem;
|
6633
6649
|
|
6634
6650
|
// src/molecules/EmptyState/EmptyState.tsx
|
6635
|
-
import
|
6651
|
+
import React64 from "react";
|
6636
6652
|
import omit9 from "lodash/omit";
|
6637
6653
|
|
6638
6654
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
6639
|
-
import
|
6655
|
+
import React63 from "react";
|
6640
6656
|
var FlexboxItem = Tailwindify(
|
6641
6657
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
6642
6658
|
const hookStyle = useStyle({
|
@@ -6648,7 +6664,7 @@ var FlexboxItem = Tailwindify(
|
|
6648
6664
|
alignSelf
|
6649
6665
|
});
|
6650
6666
|
const HtmlElement = htmlTag;
|
6651
|
-
return /* @__PURE__ */
|
6667
|
+
return /* @__PURE__ */ React63.createElement(HtmlElement, {
|
6652
6668
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
6653
6669
|
className
|
6654
6670
|
}, children);
|
@@ -6706,7 +6722,7 @@ var EmptyState = ({
|
|
6706
6722
|
borderStyle = "dashed"
|
6707
6723
|
}) => {
|
6708
6724
|
const template = layoutStyle(layout);
|
6709
|
-
return /* @__PURE__ */
|
6725
|
+
return /* @__PURE__ */ React64.createElement(Box, {
|
6710
6726
|
className: classNames(
|
6711
6727
|
tw("rounded", {
|
6712
6728
|
"border border-dashed": borderStyle === "dashed",
|
@@ -6718,38 +6734,38 @@ var EmptyState = ({
|
|
6718
6734
|
backgroundColor: "transparent",
|
6719
6735
|
borderColor: "grey-10",
|
6720
6736
|
padding: "9"
|
6721
|
-
}, /* @__PURE__ */
|
6737
|
+
}, /* @__PURE__ */ React64.createElement(Flexbox, {
|
6722
6738
|
direction: template.layout,
|
6723
6739
|
justifyContent: template.justifyContent,
|
6724
6740
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
6725
6741
|
colGap: "l5",
|
6726
6742
|
rowGap: "8"
|
6727
|
-
}, image && /* @__PURE__ */
|
6743
|
+
}, image && /* @__PURE__ */ React64.createElement(FlexboxItem, null, /* @__PURE__ */ React64.createElement("img", {
|
6728
6744
|
src: image,
|
6729
6745
|
alt: imageAlt,
|
6730
6746
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
6731
|
-
})), /* @__PURE__ */
|
6747
|
+
})), /* @__PURE__ */ React64.createElement(Flexbox, {
|
6732
6748
|
style: { maxWidth: "610px" },
|
6733
6749
|
direction: "column",
|
6734
6750
|
justifyContent: template.justifyContent,
|
6735
6751
|
alignItems: template.alignItems
|
6736
|
-
}, /* @__PURE__ */
|
6752
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6737
6753
|
variant: "heading",
|
6738
6754
|
htmlTag: "h2"
|
6739
|
-
}, title), (description || children) && /* @__PURE__ */
|
6755
|
+
}, title), (description || children) && /* @__PURE__ */ React64.createElement(Box, {
|
6740
6756
|
marginTop: "5"
|
6741
|
-
}, /* @__PURE__ */
|
6757
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6742
6758
|
variant: "default",
|
6743
6759
|
color: "grey-60"
|
6744
|
-
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */
|
6760
|
+
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React64.createElement(Flexbox, {
|
6745
6761
|
marginTop: "7",
|
6746
6762
|
gap: "4",
|
6747
6763
|
justifyContent: "center",
|
6748
6764
|
alignItems: "center",
|
6749
6765
|
wrap: "wrap"
|
6750
|
-
}, primaryAction && /* @__PURE__ */
|
6766
|
+
}, primaryAction && /* @__PURE__ */ React64.createElement(Button.Primary, __spreadValues({}, omit9(primaryAction, "text")), primaryAction.text), secondaryAction && /* @__PURE__ */ React64.createElement(Button.Secondary, __spreadValues({}, omit9(secondaryAction, "text")), secondaryAction.text)), footer && /* @__PURE__ */ React64.createElement(Box, {
|
6751
6767
|
marginTop: "7"
|
6752
|
-
}, /* @__PURE__ */
|
6768
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6753
6769
|
htmlTag: "div",
|
6754
6770
|
variant: "small",
|
6755
6771
|
color: "grey-60"
|
@@ -6757,7 +6773,7 @@ var EmptyState = ({
|
|
6757
6773
|
};
|
6758
6774
|
|
6759
6775
|
// src/molecules/Grid/GridItem.tsx
|
6760
|
-
import
|
6776
|
+
import React65 from "react";
|
6761
6777
|
var GridItem = Tailwindify(
|
6762
6778
|
({
|
6763
6779
|
htmlTag = "div",
|
@@ -6788,7 +6804,7 @@ var GridItem = Tailwindify(
|
|
6788
6804
|
gridRowEnd: rowEnd
|
6789
6805
|
});
|
6790
6806
|
const HtmlElement = htmlTag;
|
6791
|
-
return /* @__PURE__ */
|
6807
|
+
return /* @__PURE__ */ React65.createElement(HtmlElement, {
|
6792
6808
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
6793
6809
|
className
|
6794
6810
|
}, children);
|
@@ -6796,7 +6812,7 @@ var GridItem = Tailwindify(
|
|
6796
6812
|
);
|
6797
6813
|
|
6798
6814
|
// src/molecules/LineClamp/LineClamp.tsx
|
6799
|
-
import
|
6815
|
+
import React66 from "react";
|
6800
6816
|
var LineClamp2 = ({
|
6801
6817
|
lines,
|
6802
6818
|
children,
|
@@ -6805,10 +6821,10 @@ var LineClamp2 = ({
|
|
6805
6821
|
collapseLabel,
|
6806
6822
|
onClampedChange
|
6807
6823
|
}) => {
|
6808
|
-
const ref =
|
6809
|
-
const [clamped, setClamped] =
|
6810
|
-
const [isClampingEnabled, setClampingEnabled] =
|
6811
|
-
|
6824
|
+
const ref = React66.useRef(null);
|
6825
|
+
const [clamped, setClamped] = React66.useState(true);
|
6826
|
+
const [isClampingEnabled, setClampingEnabled] = React66.useState(false);
|
6827
|
+
React66.useEffect(() => {
|
6812
6828
|
var _a, _b;
|
6813
6829
|
const el = ref.current;
|
6814
6830
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -6817,38 +6833,31 @@ var LineClamp2 = ({
|
|
6817
6833
|
setClamped(!clamped);
|
6818
6834
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
6819
6835
|
};
|
6820
|
-
return /* @__PURE__ */
|
6836
|
+
return /* @__PURE__ */ React66.createElement("div", null, /* @__PURE__ */ React66.createElement(LineClamp, {
|
6821
6837
|
ref,
|
6822
6838
|
lines,
|
6823
6839
|
clamped,
|
6824
6840
|
wordBreak
|
6825
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
6841
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React66.createElement(Button.Ghost, {
|
6826
6842
|
dense: true,
|
6827
6843
|
onClick: handleClampedChange
|
6828
6844
|
}, clamped ? expandLabel : collapseLabel));
|
6829
6845
|
};
|
6830
6846
|
|
6831
6847
|
// src/molecules/Link/Link.tsx
|
6832
|
-
import
|
6848
|
+
import React68 from "react";
|
6833
6849
|
|
6834
6850
|
// src/atoms/Link/Link.tsx
|
6835
|
-
import
|
6851
|
+
import React67 from "react";
|
6836
6852
|
var Link = (_a) => {
|
6837
6853
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
6838
|
-
return /* @__PURE__ */
|
6854
|
+
return /* @__PURE__ */ React67.createElement("a", __spreadValues({
|
6839
6855
|
className: classNames(className, linkStyle)
|
6840
6856
|
}, props), children);
|
6841
6857
|
};
|
6842
6858
|
|
6843
6859
|
// src/molecules/Link/Link.tsx
|
6844
|
-
var Link2 = (props) => /* @__PURE__ */
|
6845
|
-
|
6846
|
-
// src/molecules/List/List.tsx
|
6847
|
-
import React68 from "react";
|
6848
|
-
var List2 = ({ items, renderItem, container = React68.Fragment }) => {
|
6849
|
-
const Component = container;
|
6850
|
-
return /* @__PURE__ */ React68.createElement(Component, null, items.map(renderItem));
|
6851
|
-
};
|
6860
|
+
var Link2 = (props) => /* @__PURE__ */ React68.createElement(Link, __spreadValues({}, props));
|
6852
6861
|
|
6853
6862
|
// src/molecules/ListItem/ListItem.tsx
|
6854
6863
|
import React69 from "react";
|
@@ -7176,7 +7185,7 @@ var Modal2 = (_a) => {
|
|
7176
7185
|
const ref = React71.useRef(null);
|
7177
7186
|
const state = useOverlayTriggerState4({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
7178
7187
|
const { modalProps, underlayProps } = useModalOverlay2(
|
7179
|
-
{ isDismissable:
|
7188
|
+
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
7180
7189
|
state,
|
7181
7190
|
ref
|
7182
7191
|
);
|
@@ -7258,22 +7267,31 @@ var InputChip = React72.forwardRef(
|
|
7258
7267
|
_onClick == null ? void 0 : _onClick(e);
|
7259
7268
|
}
|
7260
7269
|
};
|
7261
|
-
return /* @__PURE__ */ React72.createElement("div",
|
7262
|
-
|
7263
|
-
role: "button",
|
7264
|
-
className: classNames(className, "inline-flex align-middle mx-1 px-2 py-1 items-center rounded-sm break-all", {
|
7270
|
+
return /* @__PURE__ */ React72.createElement("div", {
|
7271
|
+
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
7265
7272
|
"bg-error-0 ": invalid,
|
7266
|
-
"bg-grey-0": !invalid && !disabled,
|
7267
|
-
"
|
7268
|
-
|
7269
|
-
|
7270
|
-
|
7271
|
-
},
|
7273
|
+
"bg-grey-0 ": !invalid && !disabled,
|
7274
|
+
"bg-grey-5": disabled
|
7275
|
+
})
|
7276
|
+
}, /* @__PURE__ */ React72.createElement("div", {
|
7277
|
+
className: tw("px-2 py-1")
|
7278
|
+
}, /* @__PURE__ */ React72.createElement(Typography2, {
|
7272
7279
|
variant: "small",
|
7273
7280
|
color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
|
7274
|
-
}, children), !readOnly && /* @__PURE__ */ React72.createElement("div",
|
7281
|
+
}, children)), !readOnly && /* @__PURE__ */ React72.createElement("div", __spreadProps(__spreadValues({
|
7282
|
+
ref
|
7283
|
+
}, props), {
|
7284
|
+
onClick,
|
7285
|
+
className: tw("flex items-center p-1", {
|
7286
|
+
"pointer-events-none": !!disabled,
|
7287
|
+
"hover:bg-error-10 focus:bg-error-20": invalid,
|
7288
|
+
"hover:bg-grey-10 focus:bg-grey-20": !invalid && !disabled
|
7289
|
+
}),
|
7290
|
+
role: "button",
|
7291
|
+
"aria-label": `Remove ${children}`
|
7292
|
+
}), /* @__PURE__ */ React72.createElement(Icon, {
|
7275
7293
|
icon: import_smallCross.default,
|
7276
|
-
className: tw(
|
7294
|
+
className: tw({
|
7277
7295
|
"text-error-70": invalid,
|
7278
7296
|
"text-grey-70": !invalid
|
7279
7297
|
})
|
@@ -7864,12 +7882,15 @@ var Footer = (_a) => {
|
|
7864
7882
|
}));
|
7865
7883
|
};
|
7866
7884
|
var Section2 = (_a) => {
|
7867
|
-
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
7885
|
+
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
7868
7886
|
return /* @__PURE__ */ React76.createElement("li", {
|
7869
|
-
role: "presentation"
|
7870
|
-
|
7887
|
+
role: "presentation",
|
7888
|
+
className: tw("py-5")
|
7889
|
+
}, title && /* @__PURE__ */ React76.createElement("div", {
|
7890
|
+
className: classNames(className, "py-2 px-6 text-grey-40 uppercase cursor-default typography-caption")
|
7891
|
+
}, title), /* @__PURE__ */ React76.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
7871
7892
|
role: "group",
|
7872
|
-
className: classNames(tw("
|
7893
|
+
className: classNames(tw("flex flex-col"), className)
|
7873
7894
|
})));
|
7874
7895
|
};
|
7875
7896
|
var Divider3 = (_a) => {
|
@@ -7976,7 +7997,9 @@ var PageHeader2 = ({
|
|
7976
7997
|
chips = [],
|
7977
7998
|
breadcrumbs
|
7978
7999
|
}) => {
|
7979
|
-
return /* @__PURE__ */ React79.createElement(PageHeader, null, /* @__PURE__ */ React79.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React79.createElement(
|
8000
|
+
return /* @__PURE__ */ React79.createElement(PageHeader, null, /* @__PURE__ */ React79.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React79.createElement(Box, {
|
8001
|
+
marginBottom: image ? "3" : void 0
|
8002
|
+
}, /* @__PURE__ */ React79.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React79.createElement(Flexbox, {
|
7980
8003
|
gap: "5"
|
7981
8004
|
}, image && /* @__PURE__ */ React79.createElement("img", {
|
7982
8005
|
src: image,
|