@aivenio/aquarium 1.15.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 +35 -13
- package/dist/atoms.mjs +35 -13
- package/dist/src/atoms/Navigation/Navigation.d.ts +3 -1
- package/dist/src/atoms/Navigation/Navigation.js +5 -4
- package/dist/src/molecules/Alert/Alert.js +4 -5
- package/dist/src/molecules/Banner/Banner.js +4 -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/Button/Button.d.ts +63 -46
- package/dist/src/molecules/Button/Button.js +56 -10
- package/dist/src/molecules/Card/Card.js +4 -4
- package/dist/src/molecules/Card/Compact.js +4 -4
- package/dist/src/molecules/DataList/DataList.d.ts +1 -1
- package/dist/src/molecules/DataList/DataList.js +7 -7
- package/dist/src/molecules/DataTable/DataTable.d.ts +1 -1
- package/dist/src/molecules/DataTable/DataTable.js +6 -6
- package/dist/src/molecules/Dialog/Dialog.js +4 -4
- package/dist/src/molecules/EmptyState/EmptyState.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/LineClamp/LineClamp.js +3 -3
- package/dist/src/molecules/Modal/Modal.js +5 -5
- 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 +7 -5
- package/dist/src/molecules/Section/Section.js +3 -3
- 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 +254 -218
- package/dist/system.mjs +249 -213
- 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"}`)
|
@@ -3133,31 +3138,36 @@ var PrimaryButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.cre
|
|
3133
3138
|
}, props), {
|
3134
3139
|
kind: "primary"
|
3135
3140
|
})));
|
3136
|
-
PrimaryButton.displayName = "
|
3141
|
+
PrimaryButton.displayName = "Button.Primary";
|
3142
|
+
Button.Primary = PrimaryButton;
|
3137
3143
|
var SecondaryButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(Button, __spreadProps(__spreadValues({
|
3138
3144
|
ref
|
3139
3145
|
}, props), {
|
3140
3146
|
kind: "secondary"
|
3141
3147
|
})));
|
3142
|
-
SecondaryButton.displayName = "
|
3148
|
+
SecondaryButton.displayName = "Button.Secondary";
|
3149
|
+
Button.Secondary = SecondaryButton;
|
3143
3150
|
var GhostButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(Button, __spreadProps(__spreadValues({
|
3144
3151
|
ref
|
3145
3152
|
}, props), {
|
3146
3153
|
kind: "ghost"
|
3147
3154
|
})));
|
3148
|
-
GhostButton.displayName = "
|
3155
|
+
GhostButton.displayName = "Button.Ghost";
|
3156
|
+
Button.Ghost = GhostButton;
|
3149
3157
|
var SecondaryGhostButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(Button, __spreadProps(__spreadValues({
|
3150
3158
|
ref
|
3151
3159
|
}, props), {
|
3152
3160
|
kind: "secondary-ghost"
|
3153
3161
|
})));
|
3154
|
-
SecondaryGhostButton.displayName = "
|
3162
|
+
SecondaryGhostButton.displayName = "Button.SecondaryGhost";
|
3163
|
+
Button.SecondaryGhost = SecondaryGhostButton;
|
3155
3164
|
var TextButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(Button, __spreadProps(__spreadValues({
|
3156
3165
|
ref
|
3157
3166
|
}, props), {
|
3158
3167
|
kind: "text"
|
3159
3168
|
})));
|
3160
|
-
TextButton.displayName = "
|
3169
|
+
TextButton.displayName = "Button.Text";
|
3170
|
+
Button.Text = TextButton;
|
3161
3171
|
var IconButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(Button, __spreadProps(__spreadValues({
|
3162
3172
|
ref
|
3163
3173
|
}, props), {
|
@@ -3165,8 +3175,11 @@ var IconButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.create
|
|
3165
3175
|
loading: false,
|
3166
3176
|
fullWidth: false
|
3167
3177
|
})));
|
3168
|
-
IconButton.displayName = "
|
3178
|
+
IconButton.displayName = "Button.Icon";
|
3179
|
+
Button.Icon = IconButton;
|
3169
3180
|
var ExternalLinkButton = asButton("a");
|
3181
|
+
ExternalLinkButton.displayName = "Button.ExternalLink";
|
3182
|
+
Button.ExternalLink = ExternalLinkButton;
|
3170
3183
|
var IconExternalLinkButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(ExternalLinkButton, __spreadProps(__spreadValues({
|
3171
3184
|
ref
|
3172
3185
|
}, props), {
|
@@ -3174,20 +3187,25 @@ var IconExternalLinkButton = React7.forwardRef((props, ref) => /* @__PURE__ */ R
|
|
3174
3187
|
loading: false,
|
3175
3188
|
fullWidth: false
|
3176
3189
|
})));
|
3177
|
-
IconExternalLinkButton.displayName = "IconExternalLink";
|
3190
|
+
IconExternalLinkButton.displayName = "Button.IconExternalLink";
|
3191
|
+
Button.IconExternalLink = IconExternalLinkButton;
|
3178
3192
|
var DropdownButton = asButton("button", true);
|
3193
|
+
DropdownButton.displayName = "Button.Dropdown";
|
3194
|
+
Button.Dropdown = DropdownButton;
|
3179
3195
|
var PrimaryDropdownButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(DropdownButton, __spreadProps(__spreadValues({
|
3180
3196
|
ref
|
3181
3197
|
}, props), {
|
3182
3198
|
kind: "primary"
|
3183
3199
|
})));
|
3184
|
-
PrimaryDropdownButton.displayName = "
|
3200
|
+
PrimaryDropdownButton.displayName = "Button.PrimaryDropdown";
|
3201
|
+
Button.PrimaryDropdown = PrimaryDropdownButton;
|
3185
3202
|
var SecondaryDropdownButton = React7.forwardRef((props, ref) => /* @__PURE__ */ React7.createElement(DropdownButton, __spreadProps(__spreadValues({
|
3186
3203
|
ref
|
3187
3204
|
}, props), {
|
3188
3205
|
kind: "secondary"
|
3189
3206
|
})));
|
3190
|
-
SecondaryDropdownButton.displayName = "
|
3207
|
+
SecondaryDropdownButton.displayName = "Button.SecondaryDropdown";
|
3208
|
+
Button.SecondaryDropdown = SecondaryDropdownButton;
|
3191
3209
|
|
3192
3210
|
// src/atoms/Alert/Alert.tsx
|
3193
3211
|
import React9 from "react";
|
@@ -3326,9 +3344,9 @@ var Alert2 = ({ description, type, title, onDismiss, children, action }) => /* @
|
|
3326
3344
|
}, /* @__PURE__ */ React10.createElement(Alert.Icon, {
|
3327
3345
|
type,
|
3328
3346
|
dense: Boolean(title)
|
3329
|
-
}), title && /* @__PURE__ */ React10.createElement(Alert.Title, null, title), /* @__PURE__ */ React10.createElement(Alert.Description, null, children || description), action && /* @__PURE__ */ React10.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ React10.createElement(
|
3347
|
+
}), title && /* @__PURE__ */ React10.createElement(Alert.Title, null, title), /* @__PURE__ */ React10.createElement(Alert.Description, null, children || description), action && /* @__PURE__ */ React10.createElement(Alert.Actions, null, !isLink(action) && /* @__PURE__ */ React10.createElement(Button.Ghost, __spreadValues({
|
3330
3348
|
dense: true
|
3331
|
-
}, omit(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React10.createElement(
|
3349
|
+
}, omit(action, "text")), action.text), isLink(action) && /* @__PURE__ */ React10.createElement(Button.ExternalLink, __spreadValues({
|
3332
3350
|
dense: true,
|
3333
3351
|
kind: "ghost"
|
3334
3352
|
}, omit(action, "text")), action.text)), onDismiss && /* @__PURE__ */ React10.createElement(Alert.Dismiss, {
|
@@ -3504,6 +3522,7 @@ var Box = (_a) => {
|
|
3504
3522
|
style: __spreadValues(__spreadValues({}, styles), style)
|
3505
3523
|
}, rest));
|
3506
3524
|
};
|
3525
|
+
Box.Flex = createSimpleComponent(Box, { display: "flex" }, "Box.Flex");
|
3507
3526
|
var BorderBox = createSimpleComponent(
|
3508
3527
|
Box,
|
3509
3528
|
{ className: "rounded border", borderColor: "grey-10" },
|
@@ -3725,7 +3744,7 @@ var createBanner = (displayName, opts = {}) => {
|
|
3725
3744
|
flexGrow: isDismissable ? false : true
|
3726
3745
|
}, children || description), action && /* @__PURE__ */ React18.createElement(Banner.Actions, {
|
3727
3746
|
layout
|
3728
|
-
}, /* @__PURE__ */ React18.createElement(
|
3747
|
+
}, /* @__PURE__ */ React18.createElement(Button.Ghost, __spreadValues({
|
3729
3748
|
dense: true
|
3730
3749
|
}, omit3(action, "text")), action.text))), (props.layout === "vertical" || props.layout === void 0) && props.image !== void 0 && /* @__PURE__ */ React18.createElement(Banner.ImageContainer, null, props.image ? /* @__PURE__ */ React18.createElement("img", {
|
3731
3750
|
src: props.image,
|
@@ -3734,7 +3753,7 @@ var createBanner = (displayName, opts = {}) => {
|
|
3734
3753
|
style: { width: props.imageWidth, height: props.imageHeight }
|
3735
3754
|
}) : /* @__PURE__ */ React18.createElement(BannerImageSkeleton, null)), isDismissable && /* @__PURE__ */ React18.createElement(Banner.DismissContainer, {
|
3736
3755
|
layout
|
3737
|
-
}, /* @__PURE__ */ React18.createElement(
|
3756
|
+
}, /* @__PURE__ */ React18.createElement(Button.Icon, {
|
3738
3757
|
type: "button",
|
3739
3758
|
tooltip: "Dismiss",
|
3740
3759
|
icon: import_cross2.default,
|
@@ -3790,7 +3809,7 @@ var asCrumb = (Component, displayName, options = { isActive: false }) => {
|
|
3790
3809
|
}), /* @__PURE__ */ React19.createElement("span", {
|
3791
3810
|
className: classNames2(
|
3792
3811
|
tw("flex flex-row flex-nowrap items-center gap-x-3 ", {
|
3793
|
-
"text-primary-80
|
3812
|
+
"text-primary-80 hover:text-primary-70": !options.isActive,
|
3794
3813
|
"text-grey-90": options.isActive
|
3795
3814
|
})
|
3796
3815
|
)
|
@@ -4172,9 +4191,9 @@ var CompactCard = ({
|
|
4172
4191
|
color: "grey-70"
|
4173
4192
|
}, children))), (action || link) && /* @__PURE__ */ React25.createElement(Card.Actions, {
|
4174
4193
|
dense: true
|
4175
|
-
}, action && /* @__PURE__ */ React25.createElement(
|
4194
|
+
}, action && /* @__PURE__ */ React25.createElement(Button.Secondary, __spreadValues({
|
4176
4195
|
dense: true
|
4177
|
-
}, omit4(action, "text")), action.text), link && /* @__PURE__ */ React25.createElement(
|
4196
|
+
}, omit4(action, "text")), action.text), link && /* @__PURE__ */ React25.createElement(Button.ExternalLink, __spreadValues({
|
4178
4197
|
dense: true,
|
4179
4198
|
kind: "ghost"
|
4180
4199
|
}, omit4(link, "text")), link.text)));
|
@@ -4266,9 +4285,9 @@ var Card2 = ({
|
|
4266
4285
|
wordBreak: "break-all"
|
4267
4286
|
}, titleContent) : titleContent, /* @__PURE__ */ React26.createElement(Typography2.Caption, {
|
4268
4287
|
color: "grey-70"
|
4269
|
-
}, children || description)), (action || link) && /* @__PURE__ */ React26.createElement(Card.Actions, null, action && /* @__PURE__ */ React26.createElement(
|
4288
|
+
}, children || description)), (action || link) && /* @__PURE__ */ React26.createElement(Card.Actions, null, action && /* @__PURE__ */ React26.createElement(Button.Secondary, __spreadValues({
|
4270
4289
|
dense: true
|
4271
|
-
}, omit5(action, "text")), action.text), link && /* @__PURE__ */ React26.createElement(
|
4290
|
+
}, omit5(action, "text")), action.text), link && /* @__PURE__ */ React26.createElement(Button.ExternalLink, __spreadValues({
|
4272
4291
|
dense: true,
|
4273
4292
|
kind: "ghost"
|
4274
4293
|
}, omit5(link, "text")), link.text)));
|
@@ -5232,7 +5251,7 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React42.crea
|
|
5232
5251
|
}, children);
|
5233
5252
|
|
5234
5253
|
// src/molecules/DataList/DataList.tsx
|
5235
|
-
import
|
5254
|
+
import React53 from "react";
|
5236
5255
|
import compact from "lodash/compact";
|
5237
5256
|
import isFunction from "lodash/isFunction";
|
5238
5257
|
|
@@ -5683,8 +5702,15 @@ var getDisabledItemKeys = (children) => {
|
|
5683
5702
|
return keys.flat().filter((key) => key !== null);
|
5684
5703
|
};
|
5685
5704
|
|
5686
|
-
// src/molecules/
|
5705
|
+
// src/molecules/List/List.tsx
|
5687
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";
|
5688
5714
|
var Template = ({
|
5689
5715
|
children,
|
5690
5716
|
columns,
|
@@ -5710,23 +5736,23 @@ var Template = ({
|
|
5710
5736
|
rowGap,
|
5711
5737
|
columnGap
|
5712
5738
|
});
|
5713
|
-
return /* @__PURE__ */
|
5739
|
+
return /* @__PURE__ */ React48.createElement("div", {
|
5714
5740
|
style: __spreadValues({}, styles)
|
5715
5741
|
}, children);
|
5716
5742
|
};
|
5717
5743
|
|
5718
5744
|
// src/atoms/DataList/DataList.tsx
|
5719
|
-
import
|
5745
|
+
import React51 from "react";
|
5720
5746
|
|
5721
5747
|
// src/atoms/Table/Table.tsx
|
5722
|
-
import
|
5748
|
+
import React50 from "react";
|
5723
5749
|
|
5724
5750
|
// src/atoms/RadioButton/RadioButton.tsx
|
5725
|
-
import
|
5726
|
-
var RadioButton =
|
5751
|
+
import React49 from "react";
|
5752
|
+
var RadioButton = React49.forwardRef(
|
5727
5753
|
(_a, ref) => {
|
5728
5754
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
5729
|
-
return /* @__PURE__ */
|
5755
|
+
return /* @__PURE__ */ React49.createElement("input", __spreadProps(__spreadValues({
|
5730
5756
|
id,
|
5731
5757
|
ref,
|
5732
5758
|
type: "radio",
|
@@ -5752,29 +5778,29 @@ var RadioButton = React48.forwardRef(
|
|
5752
5778
|
// src/atoms/Table/Table.tsx
|
5753
5779
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
5754
5780
|
var import_chevronUp2 = __toESM(require_chevronUp());
|
5755
|
-
var HeadContext =
|
5781
|
+
var HeadContext = React50.createContext(null);
|
5756
5782
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
5757
5783
|
var Table = (_a) => {
|
5758
5784
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
5759
|
-
return /* @__PURE__ */
|
5785
|
+
return /* @__PURE__ */ React50.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
5760
5786
|
className: classNames(tableClassNames, className),
|
5761
5787
|
"aria-label": ariaLabel
|
5762
5788
|
}), children);
|
5763
5789
|
};
|
5764
5790
|
var TableHead = (_a) => {
|
5765
5791
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
5766
|
-
return /* @__PURE__ */
|
5792
|
+
return /* @__PURE__ */ React50.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React50.createElement("tr", null, /* @__PURE__ */ React50.createElement(HeadContext.Provider, {
|
5767
5793
|
value: { children, sticky }
|
5768
5794
|
}, children)));
|
5769
5795
|
};
|
5770
5796
|
var TableBody = (_a) => {
|
5771
5797
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
5772
|
-
return /* @__PURE__ */
|
5798
|
+
return /* @__PURE__ */ React50.createElement("tbody", __spreadValues({}, rest), children);
|
5773
5799
|
};
|
5774
5800
|
var rowClassNames = tw("children:border-grey-10 group children:last:border-b-0 hover:bg-grey-0");
|
5775
5801
|
var TableRow = (_a) => {
|
5776
5802
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
5777
|
-
return /* @__PURE__ */
|
5803
|
+
return /* @__PURE__ */ React50.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
5778
5804
|
className: classNames(rowClassNames, className)
|
5779
5805
|
}), children);
|
5780
5806
|
};
|
@@ -5801,15 +5827,15 @@ var getHeadCellClassNames = (sticky = true, stickyColumn) => {
|
|
5801
5827
|
};
|
5802
5828
|
var TableCell = (_a) => {
|
5803
5829
|
var _b = _a, { children, className, stickyColumn, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "stickyColumn", "align"]);
|
5804
|
-
const headContext =
|
5805
|
-
return headContext ? /* @__PURE__ */
|
5830
|
+
const headContext = React50.useContext(HeadContext);
|
5831
|
+
return headContext ? /* @__PURE__ */ React50.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
5806
5832
|
className: classNames(
|
5807
5833
|
cellClassNames,
|
5808
5834
|
getHeadCellClassNames(headContext.sticky, stickyColumn),
|
5809
5835
|
getAlignClassNames(align),
|
5810
5836
|
className
|
5811
5837
|
)
|
5812
|
-
}), children) : /* @__PURE__ */
|
5838
|
+
}), children) : /* @__PURE__ */ React50.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
5813
5839
|
className: classNames(
|
5814
5840
|
cellClassNames,
|
5815
5841
|
getBodyCellClassNames(true, stickyColumn),
|
@@ -5820,11 +5846,11 @@ var TableCell = (_a) => {
|
|
5820
5846
|
};
|
5821
5847
|
var TableSelectCell = (_a) => {
|
5822
5848
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
5823
|
-
return /* @__PURE__ */
|
5849
|
+
return /* @__PURE__ */ React50.createElement(Table.Cell, {
|
5824
5850
|
className: tw("leading-[0px]")
|
5825
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
5851
|
+
}, props.type === "radio" ? /* @__PURE__ */ React50.createElement(RadioButton, __spreadValues({
|
5826
5852
|
"aria-label": ariaLabel
|
5827
|
-
}, props)) : /* @__PURE__ */
|
5853
|
+
}, props)) : /* @__PURE__ */ React50.createElement(Checkbox, __spreadValues({
|
5828
5854
|
"aria-label": ariaLabel
|
5829
5855
|
}, props)));
|
5830
5856
|
};
|
@@ -5834,39 +5860,39 @@ var getSortCellIconClassNames = (active) => {
|
|
5834
5860
|
};
|
5835
5861
|
var TableSortCell = (_a) => {
|
5836
5862
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
5837
|
-
return /* @__PURE__ */
|
5863
|
+
return /* @__PURE__ */ React50.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
5838
5864
|
"aria-sort": direction
|
5839
|
-
}), /* @__PURE__ */
|
5865
|
+
}), /* @__PURE__ */ React50.createElement("span", {
|
5840
5866
|
className: getSortCellButtonClassNames(rest.align),
|
5841
5867
|
role: "button",
|
5842
5868
|
tabIndex: -1,
|
5843
5869
|
onClick
|
5844
|
-
}, children, /* @__PURE__ */
|
5870
|
+
}, children, /* @__PURE__ */ React50.createElement("div", {
|
5845
5871
|
"data-sort-icons": true,
|
5846
5872
|
className: tw("flex flex-col", {
|
5847
5873
|
"invisible group-hover:visible": direction === "none"
|
5848
5874
|
})
|
5849
|
-
}, /* @__PURE__ */
|
5875
|
+
}, /* @__PURE__ */ React50.createElement(InlineIcon, {
|
5850
5876
|
icon: import_chevronUp2.default,
|
5851
5877
|
className: getSortCellIconClassNames(direction === "descending")
|
5852
|
-
}), /* @__PURE__ */
|
5878
|
+
}), /* @__PURE__ */ React50.createElement(InlineIcon, {
|
5853
5879
|
icon: import_chevronDown3.default,
|
5854
5880
|
className: getSortCellIconClassNames(direction === "ascending")
|
5855
5881
|
}))));
|
5856
5882
|
};
|
5857
|
-
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
5883
|
+
var Item4 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React50.createElement("div", {
|
5858
5884
|
className: tw("flex gap-4 items-center")
|
5859
|
-
}, image && /* @__PURE__ */
|
5885
|
+
}, image && /* @__PURE__ */ React50.createElement("img", {
|
5860
5886
|
src: image,
|
5861
5887
|
alt: imageAlt,
|
5862
5888
|
style: { width: imageSize, height: imageSize }
|
5863
|
-
}), /* @__PURE__ */
|
5864
|
-
Table.Head =
|
5865
|
-
Table.Body =
|
5866
|
-
Table.Row =
|
5867
|
-
Table.Cell =
|
5868
|
-
Table.SortCell =
|
5869
|
-
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);
|
5870
5896
|
|
5871
5897
|
// src/atoms/DataList/DataList.tsx
|
5872
5898
|
var import_chevronDown4 = __toESM(require_chevronDown());
|
@@ -5878,7 +5904,7 @@ var getAlignClassNames2 = (align) => tw("flex items-center", {
|
|
5878
5904
|
});
|
5879
5905
|
var DataList = (_a) => {
|
5880
5906
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
5881
|
-
return /* @__PURE__ */
|
5907
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadValues({}, rest));
|
5882
5908
|
};
|
5883
5909
|
var HeadCell = (_a) => {
|
5884
5910
|
var _b = _a, {
|
@@ -5892,7 +5918,7 @@ var HeadCell = (_a) => {
|
|
5892
5918
|
"align",
|
5893
5919
|
"stickyColumn"
|
5894
5920
|
]);
|
5895
|
-
return /* @__PURE__ */
|
5921
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5896
5922
|
role: "cell",
|
5897
5923
|
className: classNames(
|
5898
5924
|
cellClassNames,
|
@@ -5912,7 +5938,7 @@ var Cell = (_a) => {
|
|
5912
5938
|
"align",
|
5913
5939
|
"stickyColumn"
|
5914
5940
|
]);
|
5915
|
-
return /* @__PURE__ */
|
5941
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5916
5942
|
role: "cell",
|
5917
5943
|
className: classNames(
|
5918
5944
|
cellClassNames,
|
@@ -5925,31 +5951,31 @@ var Cell = (_a) => {
|
|
5925
5951
|
};
|
5926
5952
|
var Row = (_a) => {
|
5927
5953
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
5928
|
-
return /* @__PURE__ */
|
5954
|
+
return /* @__PURE__ */ React51.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5929
5955
|
className: classNames(tw("contents group"), className),
|
5930
5956
|
role: "row"
|
5931
5957
|
}));
|
5932
5958
|
};
|
5933
5959
|
var SortCell = (_a) => {
|
5934
5960
|
var _b = _a, { children, direction = "none", onClick, sticky } = _b, rest = __objRest(_b, ["children", "direction", "onClick", "sticky"]);
|
5935
|
-
return /* @__PURE__ */
|
5961
|
+
return /* @__PURE__ */ React51.createElement(HeadCell, __spreadProps(__spreadValues({}, rest), {
|
5936
5962
|
"aria-sort": direction,
|
5937
5963
|
role: "cell",
|
5938
5964
|
sticky
|
5939
|
-
}), /* @__PURE__ */
|
5965
|
+
}), /* @__PURE__ */ React51.createElement("span", {
|
5940
5966
|
className: getSortCellButtonClassNames(rest.align),
|
5941
5967
|
role: "button",
|
5942
5968
|
tabIndex: -1,
|
5943
5969
|
onClick
|
5944
|
-
}, children, /* @__PURE__ */
|
5970
|
+
}, children, /* @__PURE__ */ React51.createElement("div", {
|
5945
5971
|
"data-sort-icons": true,
|
5946
5972
|
className: tw("flex flex-col", {
|
5947
5973
|
"invisible group-hover:visible": direction === "none"
|
5948
5974
|
})
|
5949
|
-
}, /* @__PURE__ */
|
5975
|
+
}, /* @__PURE__ */ React51.createElement(InlineIcon, {
|
5950
5976
|
icon: import_chevronUp3.default,
|
5951
5977
|
className: getSortCellIconClassNames(direction === "descending")
|
5952
|
-
}), /* @__PURE__ */
|
5978
|
+
}), /* @__PURE__ */ React51.createElement(InlineIcon, {
|
5953
5979
|
icon: import_chevronDown4.default,
|
5954
5980
|
className: getSortCellIconClassNames(direction === "ascending")
|
5955
5981
|
}))));
|
@@ -5977,9 +6003,9 @@ var cellProps = (column) => ({
|
|
5977
6003
|
var columnIsFieldColumn = (column) => Boolean(column && column.field);
|
5978
6004
|
|
5979
6005
|
// src/utils/table/useTableSort.tsx
|
5980
|
-
import
|
6006
|
+
import React52 from "react";
|
5981
6007
|
var useTableSort = () => {
|
5982
|
-
const [sort, setSort] =
|
6008
|
+
const [sort, setSort] = React52.useState();
|
5983
6009
|
const handleSortClick = (column) => {
|
5984
6010
|
if (sort && sort.column.headerName === column.headerName) {
|
5985
6011
|
if (sort.direction === "ascending") {
|
@@ -6016,6 +6042,7 @@ var DataList2 = ({
|
|
6016
6042
|
rows,
|
6017
6043
|
sticky,
|
6018
6044
|
menu,
|
6045
|
+
menuLabel = "Context menu",
|
6019
6046
|
onAction
|
6020
6047
|
}) => {
|
6021
6048
|
const [sort, updateSort] = useTableSort();
|
@@ -6027,54 +6054,54 @@ var DataList2 = ({
|
|
6027
6054
|
}),
|
6028
6055
|
menu ? "auto" : void 0
|
6029
6056
|
]);
|
6030
|
-
return /* @__PURE__ */
|
6057
|
+
return /* @__PURE__ */ React53.createElement(Template, {
|
6031
6058
|
columns: templateColumns
|
6032
6059
|
}, columns.map(
|
6033
|
-
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
6060
|
+
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React53.createElement(DataList.SortCell, __spreadValues({
|
6034
6061
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
6035
6062
|
onClick: () => updateSort(column),
|
6036
6063
|
sticky
|
6037
|
-
}, cellProps(column)), column.headerName) : /* @__PURE__ */
|
6064
|
+
}, cellProps(column)), column.headerName) : /* @__PURE__ */ React53.createElement(DataList.HeadCell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
6038
6065
|
sticky
|
6039
6066
|
}), column.headerName)
|
6040
|
-
), menu && /* @__PURE__ */
|
6067
|
+
), menu && /* @__PURE__ */ React53.createElement(DataList.HeadCell, {
|
6041
6068
|
align: "right",
|
6042
|
-
"aria-label":
|
6043
|
-
}), /* @__PURE__ */
|
6069
|
+
"aria-label": menuLabel
|
6070
|
+
}), /* @__PURE__ */ React53.createElement(List2, {
|
6044
6071
|
items: sortedRows,
|
6045
|
-
renderItem: (row, index) => /* @__PURE__ */
|
6072
|
+
renderItem: (row, index) => /* @__PURE__ */ React53.createElement(DataList.Row, {
|
6046
6073
|
key: row.id
|
6047
|
-
}, /* @__PURE__ */
|
6074
|
+
}, /* @__PURE__ */ React53.createElement(List2, {
|
6048
6075
|
items: columns,
|
6049
|
-
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({
|
6050
6077
|
dense: true
|
6051
|
-
}, 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({
|
6052
6079
|
dense: true
|
6053
|
-
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */
|
6054
|
-
}), 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, {
|
6055
6082
|
align: "right"
|
6056
|
-
}, /* @__PURE__ */
|
6083
|
+
}, /* @__PURE__ */ React53.createElement(DropdownMenu2, {
|
6057
6084
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index)
|
6058
|
-
}, /* @__PURE__ */
|
6059
|
-
"aria-label":
|
6085
|
+
}, /* @__PURE__ */ React53.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React53.createElement(Button.Icon, {
|
6086
|
+
"aria-label": menuLabel,
|
6060
6087
|
icon: import_more.default
|
6061
6088
|
})), isFunction(menu) ? menu(row, index) : menu)))
|
6062
6089
|
}));
|
6063
6090
|
};
|
6064
6091
|
|
6065
6092
|
// src/molecules/DataTable/DataTable.tsx
|
6066
|
-
import
|
6093
|
+
import React56 from "react";
|
6067
6094
|
import compact2 from "lodash/compact";
|
6068
6095
|
import isFunction2 from "lodash/isFunction";
|
6069
6096
|
|
6070
6097
|
// src/molecules/Table/Table.tsx
|
6071
|
-
import
|
6098
|
+
import React55 from "react";
|
6072
6099
|
|
6073
6100
|
// src/utils/table/useScrollTarget.ts
|
6074
|
-
import
|
6101
|
+
import React54 from "react";
|
6075
6102
|
var useScrollTarget = (callback) => {
|
6076
|
-
const targetRef =
|
6077
|
-
|
6103
|
+
const targetRef = React54.useRef(null);
|
6104
|
+
React54.useLayoutEffect(() => {
|
6078
6105
|
const observer = new IntersectionObserver((entries) => entries[0].isIntersecting && callback && callback(), {
|
6079
6106
|
root: null,
|
6080
6107
|
rootMargin: `0px 0px 200px 0px`
|
@@ -6092,12 +6119,12 @@ var Table2 = (_a) => {
|
|
6092
6119
|
var _b = _a, { children, onPrev, onNext } = _b, rest = __objRest(_b, ["children", "onPrev", "onNext"]);
|
6093
6120
|
const bottomRef = useScrollTarget(onNext);
|
6094
6121
|
const topRef = useScrollTarget(onPrev);
|
6095
|
-
return /* @__PURE__ */
|
6122
|
+
return /* @__PURE__ */ React55.createElement("div", {
|
6096
6123
|
className: "relative w-full"
|
6097
|
-
}, /* @__PURE__ */
|
6124
|
+
}, /* @__PURE__ */ React55.createElement("div", {
|
6098
6125
|
ref: topRef,
|
6099
6126
|
className: tw("absolute top-0 h-1 w-full left-0 bg-transparent")
|
6100
|
-
}), /* @__PURE__ */
|
6127
|
+
}), /* @__PURE__ */ React55.createElement(Table, __spreadValues({}, rest), children), /* @__PURE__ */ React55.createElement("div", {
|
6101
6128
|
ref: bottomRef,
|
6102
6129
|
className: tw("absolute bottom-0 h-1 w-full left-0 bg-transparent")
|
6103
6130
|
}));
|
@@ -6119,6 +6146,7 @@ var DataTable = (_a) => {
|
|
6119
6146
|
layout = "auto",
|
6120
6147
|
sticky,
|
6121
6148
|
menu,
|
6149
|
+
menuLabel = "Context menu",
|
6122
6150
|
onAction
|
6123
6151
|
} = _b, rest = __objRest(_b, [
|
6124
6152
|
"columns",
|
@@ -6127,59 +6155,60 @@ var DataTable = (_a) => {
|
|
6127
6155
|
"layout",
|
6128
6156
|
"sticky",
|
6129
6157
|
"menu",
|
6158
|
+
"menuLabel",
|
6130
6159
|
"onAction"
|
6131
6160
|
]);
|
6132
6161
|
const [sort, updateSort] = useTableSort();
|
6133
6162
|
const sortedRows = sortRowsBy(rows, sort);
|
6134
|
-
return /* @__PURE__ */
|
6163
|
+
return /* @__PURE__ */ React56.createElement(Table2, __spreadProps(__spreadValues({}, rest), {
|
6135
6164
|
className: tw({
|
6136
6165
|
"whitespace-nowrap": noWrap,
|
6137
6166
|
"table-auto": layout === "auto",
|
6138
6167
|
"table-fixed": layout === "fixed"
|
6139
6168
|
})
|
6140
|
-
}), /* @__PURE__ */
|
6169
|
+
}), /* @__PURE__ */ React56.createElement(Table2.Head, {
|
6141
6170
|
sticky
|
6142
6171
|
}, compact2([
|
6143
6172
|
...columns.map(
|
6144
|
-
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */
|
6173
|
+
(column) => columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React56.createElement(Table2.SortCell, __spreadValues({
|
6145
6174
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
6146
6175
|
onClick: () => updateSort(column),
|
6147
6176
|
style: { width: column.width },
|
6148
6177
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
6149
|
-
}, cellProps(column)), !column.headerInvisible && column.headerName) : /* @__PURE__ */
|
6178
|
+
}, cellProps(column)), !column.headerInvisible && column.headerName) : /* @__PURE__ */ React56.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
6150
6179
|
style: { width: column.width },
|
6151
6180
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
6152
6181
|
}), !column.headerInvisible && column.headerName)
|
6153
6182
|
),
|
6154
|
-
menu ? /* @__PURE__ */
|
6183
|
+
menu ? /* @__PURE__ */ React56.createElement(Table2.Cell, {
|
6155
6184
|
key: "__contextMenu",
|
6156
6185
|
align: "right",
|
6157
|
-
"aria-label":
|
6186
|
+
"aria-label": menuLabel
|
6158
6187
|
}) : null
|
6159
|
-
])), /* @__PURE__ */
|
6188
|
+
])), /* @__PURE__ */ React56.createElement(Table2.Body, null, /* @__PURE__ */ React56.createElement(List2, {
|
6160
6189
|
items: sortedRows,
|
6161
|
-
renderItem: (row, index) => /* @__PURE__ */
|
6190
|
+
renderItem: (row, index) => /* @__PURE__ */ React56.createElement(Table2.Row, {
|
6162
6191
|
key: row.id
|
6163
|
-
}, /* @__PURE__ */
|
6192
|
+
}, /* @__PURE__ */ React56.createElement(List2, {
|
6164
6193
|
items: columns,
|
6165
|
-
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({
|
6166
6195
|
dense: true
|
6167
|
-
}, 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({
|
6168
6197
|
dense: true
|
6169
|
-
}, renameProperty("text", "children", column.action(row, index, sortedRows))))) : column.type === "custom" ? /* @__PURE__ */
|
6170
|
-
}), 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, {
|
6171
6200
|
align: "right"
|
6172
|
-
}, /* @__PURE__ */
|
6201
|
+
}, /* @__PURE__ */ React56.createElement(DropdownMenu2, {
|
6173
6202
|
onAction: (action) => onAction == null ? void 0 : onAction(action, row, index)
|
6174
|
-
}, /* @__PURE__ */
|
6175
|
-
"aria-label":
|
6203
|
+
}, /* @__PURE__ */ React56.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React56.createElement(Button.Icon, {
|
6204
|
+
"aria-label": menuLabel,
|
6176
6205
|
icon: import_more2.default
|
6177
6206
|
})), isFunction2(menu) ? menu(row, index) : menu)))
|
6178
6207
|
})));
|
6179
6208
|
};
|
6180
6209
|
|
6181
6210
|
// src/molecules/Dialog/Dialog.tsx
|
6182
|
-
import
|
6211
|
+
import React58 from "react";
|
6183
6212
|
import { useDialog } from "@react-aria/dialog";
|
6184
6213
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
6185
6214
|
import { useId } from "@react-aria/utils";
|
@@ -6206,10 +6235,10 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
6206
6235
|
};
|
6207
6236
|
|
6208
6237
|
// src/atoms/Modal/Modal.tsx
|
6209
|
-
import
|
6238
|
+
import React57 from "react";
|
6210
6239
|
var Modal = (_a) => {
|
6211
6240
|
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
6212
|
-
return open ? /* @__PURE__ */
|
6241
|
+
return open ? /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6213
6242
|
className: classNames(
|
6214
6243
|
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
6215
6244
|
className
|
@@ -6218,14 +6247,14 @@ var Modal = (_a) => {
|
|
6218
6247
|
};
|
6219
6248
|
Modal.BackDrop = (_a) => {
|
6220
6249
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
6221
|
-
return /* @__PURE__ */
|
6250
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6222
6251
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
6223
6252
|
}));
|
6224
6253
|
};
|
6225
|
-
Modal.Dialog =
|
6254
|
+
Modal.Dialog = React57.forwardRef(
|
6226
6255
|
(_a, ref) => {
|
6227
6256
|
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
6228
|
-
return /* @__PURE__ */
|
6257
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({
|
6229
6258
|
ref,
|
6230
6259
|
"aria-modal": "true"
|
6231
6260
|
}, rest), {
|
@@ -6243,31 +6272,31 @@ Modal.Dialog = React56.forwardRef(
|
|
6243
6272
|
);
|
6244
6273
|
Modal.Header = (_a) => {
|
6245
6274
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6246
|
-
return /* @__PURE__ */
|
6275
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6247
6276
|
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
6248
6277
|
}), children);
|
6249
6278
|
};
|
6250
6279
|
Modal.HeaderImage = (_a) => {
|
6251
6280
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
6252
6281
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
6253
|
-
return backgroundImage ? /* @__PURE__ */
|
6282
|
+
return backgroundImage ? /* @__PURE__ */ React57.createElement("img", __spreadProps(__spreadValues({
|
6254
6283
|
"aria-hidden": true,
|
6255
6284
|
src: backgroundImage != null ? backgroundImage : void 0
|
6256
6285
|
}, rest), {
|
6257
6286
|
className: classNames(common, tw("object-cover"), className)
|
6258
|
-
})) : /* @__PURE__ */
|
6287
|
+
})) : /* @__PURE__ */ React57.createElement("div", {
|
6259
6288
|
className: classNames(common, tw("bg-grey-5"), className)
|
6260
6289
|
});
|
6261
6290
|
};
|
6262
6291
|
Modal.CloseButtonContainer = (_a) => {
|
6263
6292
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
6264
|
-
return /* @__PURE__ */
|
6293
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6265
6294
|
className: classNames(tw("absolute top-[20px] right-[28px]"), className)
|
6266
6295
|
}));
|
6267
6296
|
};
|
6268
6297
|
Modal.Title = (_a) => {
|
6269
6298
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6270
|
-
return /* @__PURE__ */
|
6299
|
+
return /* @__PURE__ */ React57.createElement(Typography, __spreadValues({
|
6271
6300
|
htmlTag: "h2",
|
6272
6301
|
variant: "subheading",
|
6273
6302
|
color: "grey-90",
|
@@ -6276,51 +6305,51 @@ Modal.Title = (_a) => {
|
|
6276
6305
|
};
|
6277
6306
|
Modal.Subtitle = (_a) => {
|
6278
6307
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6279
|
-
return /* @__PURE__ */
|
6308
|
+
return /* @__PURE__ */ React57.createElement(Typography, __spreadValues({
|
6280
6309
|
variant: "small",
|
6281
6310
|
color: "grey-60"
|
6282
6311
|
}, rest), children);
|
6283
6312
|
};
|
6284
6313
|
Modal.TitleContainer = (_a) => {
|
6285
6314
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6286
|
-
return /* @__PURE__ */
|
6315
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6287
6316
|
className: classNames(tw("flex flex-col grow gap-2"), className)
|
6288
6317
|
}), children);
|
6289
6318
|
};
|
6290
6319
|
Modal.Body = (_a) => {
|
6291
6320
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
6292
|
-
return /* @__PURE__ */
|
6321
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6293
6322
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
6294
6323
|
style: __spreadValues({ maxHeight }, style)
|
6295
6324
|
}), children);
|
6296
6325
|
};
|
6297
6326
|
Modal.Footer = (_a) => {
|
6298
6327
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6299
|
-
return /* @__PURE__ */
|
6328
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6300
6329
|
className: classNames(tw("px-7 py-6"), className)
|
6301
6330
|
}), children);
|
6302
6331
|
};
|
6303
6332
|
Modal.Actions = (_a) => {
|
6304
6333
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
6305
|
-
return /* @__PURE__ */
|
6334
|
+
return /* @__PURE__ */ React57.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
6306
6335
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
6307
6336
|
}), children);
|
6308
6337
|
};
|
6309
6338
|
|
6310
6339
|
// src/molecules/Dialog/Dialog.tsx
|
6311
6340
|
var Dialog = (props) => {
|
6312
|
-
const ref =
|
6341
|
+
const ref = React58.useRef(null);
|
6313
6342
|
const state = useOverlayTriggerState2({ isOpen: props.open });
|
6314
6343
|
const { modalProps, underlayProps } = useModalOverlay({}, state, ref);
|
6315
6344
|
if (!state.isOpen) {
|
6316
6345
|
return null;
|
6317
6346
|
}
|
6318
|
-
return /* @__PURE__ */
|
6347
|
+
return /* @__PURE__ */ React58.createElement(Overlay2, null, /* @__PURE__ */ React58.createElement(Modal, {
|
6319
6348
|
open: true
|
6320
|
-
}, /* @__PURE__ */
|
6349
|
+
}, /* @__PURE__ */ React58.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React58.createElement(Modal.Dialog, __spreadValues({
|
6321
6350
|
ref,
|
6322
6351
|
size: "sm"
|
6323
|
-
}, modalProps), /* @__PURE__ */
|
6352
|
+
}, modalProps), /* @__PURE__ */ React58.createElement(DialogWrapper, __spreadValues({}, props)))));
|
6324
6353
|
};
|
6325
6354
|
var DialogWrapper = ({
|
6326
6355
|
title,
|
@@ -6329,36 +6358,36 @@ var DialogWrapper = ({
|
|
6329
6358
|
primaryAction,
|
6330
6359
|
secondaryAction
|
6331
6360
|
}) => {
|
6332
|
-
const ref =
|
6361
|
+
const ref = React58.useRef(null);
|
6333
6362
|
const labelledBy = useId();
|
6334
6363
|
const describedBy = useId();
|
6335
6364
|
const { dialogProps } = useDialog(
|
6336
6365
|
{ "role": "alertdialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
6337
6366
|
ref
|
6338
6367
|
);
|
6339
|
-
return /* @__PURE__ */
|
6368
|
+
return /* @__PURE__ */ React58.createElement("div", __spreadProps(__spreadValues({
|
6340
6369
|
ref
|
6341
6370
|
}, dialogProps), {
|
6342
6371
|
className: tw("outline-none")
|
6343
|
-
}), /* @__PURE__ */
|
6372
|
+
}), /* @__PURE__ */ React58.createElement(Modal.Header, null, /* @__PURE__ */ React58.createElement(Icon, {
|
6344
6373
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
6345
6374
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
6346
6375
|
fontSize: 20
|
6347
|
-
}), /* @__PURE__ */
|
6376
|
+
}), /* @__PURE__ */ React58.createElement(Modal.Title, {
|
6348
6377
|
id: labelledBy,
|
6349
6378
|
variant: "large-strong",
|
6350
6379
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
6351
|
-
}, title)), /* @__PURE__ */
|
6380
|
+
}, title)), /* @__PURE__ */ React58.createElement(Modal.Body, {
|
6352
6381
|
id: describedBy
|
6353
|
-
}, children), /* @__PURE__ */
|
6382
|
+
}, children), /* @__PURE__ */ React58.createElement(Modal.Footer, null, /* @__PURE__ */ React58.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ React58.createElement(Button.Ghost, __spreadValues({
|
6354
6383
|
key: secondaryAction.text
|
6355
|
-
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */
|
6384
|
+
}, omit8(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React58.createElement(Button.Secondary, __spreadValues({
|
6356
6385
|
key: primaryAction.text
|
6357
6386
|
}, omit8(primaryAction, "text")), primaryAction.text))));
|
6358
6387
|
};
|
6359
6388
|
|
6360
6389
|
// src/molecules/Divider/Divider.tsx
|
6361
|
-
import
|
6390
|
+
import React59 from "react";
|
6362
6391
|
var sizeClasses = {
|
6363
6392
|
horizontal: {
|
6364
6393
|
1: "h-1px",
|
@@ -6380,7 +6409,7 @@ var sizeClasses = {
|
|
6380
6409
|
var Divider2 = (_a) => {
|
6381
6410
|
var _b = _a, { direction = "horizontal", size = 1 } = _b, props = __objRest(_b, ["direction", "size"]);
|
6382
6411
|
const sizeClass = sizeClasses[direction][size];
|
6383
|
-
return /* @__PURE__ */
|
6412
|
+
return /* @__PURE__ */ React59.createElement("div", __spreadProps(__spreadValues({}, props), {
|
6384
6413
|
className: tw(`bg-grey-5 ${sizeClass}`, {
|
6385
6414
|
"block w-full": direction === "horizontal",
|
6386
6415
|
"inline-block h-full": direction === "vertical"
|
@@ -6389,22 +6418,22 @@ var Divider2 = (_a) => {
|
|
6389
6418
|
};
|
6390
6419
|
|
6391
6420
|
// src/molecules/Dropdown/Dropdown.tsx
|
6392
|
-
import
|
6421
|
+
import React62 from "react";
|
6393
6422
|
|
6394
6423
|
// src/molecules/Popover/Popover.tsx
|
6395
|
-
import
|
6424
|
+
import React61, { useRef as useRef7 } from "react";
|
6396
6425
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
6397
6426
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
6398
6427
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
6399
6428
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "@react-stately/overlays";
|
6400
6429
|
|
6401
6430
|
// src/molecules/Popover/Dialog.tsx
|
6402
|
-
import
|
6431
|
+
import React60 from "react";
|
6403
6432
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
6404
6433
|
var Dialog2 = ({ children }) => {
|
6405
|
-
const ref =
|
6434
|
+
const ref = React60.useRef(null);
|
6406
6435
|
const { dialogProps } = useDialog2({}, ref);
|
6407
|
-
return /* @__PURE__ */
|
6436
|
+
return /* @__PURE__ */ React60.createElement("div", __spreadProps(__spreadValues({
|
6408
6437
|
ref
|
6409
6438
|
}, dialogProps), {
|
6410
6439
|
className: tw("outline-none")
|
@@ -6438,21 +6467,21 @@ var Popover2 = (props) => {
|
|
6438
6467
|
const triggerRef = useRef7(null);
|
6439
6468
|
const state = useOverlayTriggerState3(props);
|
6440
6469
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
6441
|
-
return /* @__PURE__ */
|
6470
|
+
return /* @__PURE__ */ React61.createElement(PopoverContext.Provider, {
|
6442
6471
|
value: {
|
6443
6472
|
state
|
6444
6473
|
}
|
6445
|
-
},
|
6474
|
+
}, React61.Children.map(props.children, (child) => {
|
6446
6475
|
if (isComponentType(child, Popover2.Trigger)) {
|
6447
|
-
return /* @__PURE__ */
|
6476
|
+
return /* @__PURE__ */ React61.createElement(PressResponder2, __spreadValues({
|
6448
6477
|
ref: triggerRef
|
6449
|
-
}, triggerProps), /* @__PURE__ */
|
6478
|
+
}, triggerProps), /* @__PURE__ */ React61.createElement(PopoverTriggerWrapper, {
|
6450
6479
|
"data-testid": props["data-testid"],
|
6451
6480
|
"aria-controls": id
|
6452
6481
|
}, child.props.children));
|
6453
6482
|
}
|
6454
6483
|
if (isComponentType(child, Popover2.Panel)) {
|
6455
|
-
return state.isOpen && /* @__PURE__ */
|
6484
|
+
return state.isOpen && /* @__PURE__ */ React61.createElement(PopoverOverlay, __spreadValues({
|
6456
6485
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
6457
6486
|
state,
|
6458
6487
|
placement,
|
@@ -6463,7 +6492,7 @@ var Popover2 = (props) => {
|
|
6463
6492
|
offset,
|
6464
6493
|
crossOffset,
|
6465
6494
|
shouldFlip
|
6466
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
6495
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React61.createElement(Dialog2, null, child.props.children) : child.props.children);
|
6467
6496
|
}
|
6468
6497
|
throw new Error("Invalid children element type");
|
6469
6498
|
}));
|
@@ -6482,7 +6511,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
6482
6511
|
state.close();
|
6483
6512
|
onClick == null ? void 0 : onClick(e);
|
6484
6513
|
};
|
6485
|
-
return /* @__PURE__ */
|
6514
|
+
return /* @__PURE__ */ React61.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
6486
6515
|
onClick: handleClick
|
6487
6516
|
}));
|
6488
6517
|
};
|
@@ -6495,9 +6524,9 @@ var PopoverTriggerWrapper = (_a) => {
|
|
6495
6524
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
6496
6525
|
var _a2;
|
6497
6526
|
const ref = useRef7(null);
|
6498
|
-
const trigger =
|
6527
|
+
const trigger = React61.Children.only(children);
|
6499
6528
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
6500
|
-
return
|
6529
|
+
return React61.cloneElement(trigger, __spreadProps(__spreadValues({
|
6501
6530
|
"ref": ref
|
6502
6531
|
}, mergeProps3(pressProps, trigger.props)), {
|
6503
6532
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -6506,10 +6535,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
6506
6535
|
|
6507
6536
|
// src/molecules/Dropdown/Dropdown.tsx
|
6508
6537
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
6509
|
-
return /* @__PURE__ */
|
6538
|
+
return /* @__PURE__ */ React62.createElement(Popover2, {
|
6510
6539
|
type: "menu",
|
6511
6540
|
placement
|
6512
|
-
}, /* @__PURE__ */
|
6541
|
+
}, /* @__PURE__ */ React62.createElement(Popover2.Trigger, null, children), /* @__PURE__ */ React62.createElement(Popover2.Panel, null, content));
|
6513
6542
|
};
|
6514
6543
|
var DropdownMenu3 = ({
|
6515
6544
|
title,
|
@@ -6518,26 +6547,26 @@ var DropdownMenu3 = ({
|
|
6518
6547
|
triggerId,
|
6519
6548
|
setClose = () => void 0
|
6520
6549
|
}) => {
|
6521
|
-
const menuRef =
|
6522
|
-
|
6550
|
+
const menuRef = React62.useRef(null);
|
6551
|
+
React62.useEffect(() => {
|
6523
6552
|
const id = setTimeout(() => {
|
6524
6553
|
var _a, _b, _c;
|
6525
6554
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
6526
6555
|
});
|
6527
6556
|
return () => clearTimeout(id);
|
6528
6557
|
}, [menuRef.current]);
|
6529
|
-
return /* @__PURE__ */
|
6558
|
+
return /* @__PURE__ */ React62.createElement("div", {
|
6530
6559
|
style: { minWidth: "250px" },
|
6531
6560
|
className: tw("py-3 bg-white")
|
6532
|
-
}, !!title && /* @__PURE__ */
|
6561
|
+
}, !!title && /* @__PURE__ */ React62.createElement("div", {
|
6533
6562
|
className: tw("px-4 py-4 text-left text-grey-100 typography-default-strong")
|
6534
|
-
}, title), /* @__PURE__ */
|
6563
|
+
}, title), /* @__PURE__ */ React62.createElement("ol", {
|
6535
6564
|
role: "menu",
|
6536
6565
|
ref: menuRef,
|
6537
6566
|
id: contentId,
|
6538
6567
|
"aria-labelledby": triggerId
|
6539
|
-
},
|
6540
|
-
return
|
6568
|
+
}, React62.Children.map(children, (child) => {
|
6569
|
+
return React62.cloneElement(child, { setClose });
|
6541
6570
|
})));
|
6542
6571
|
};
|
6543
6572
|
var DropdownItem = (_a) => {
|
@@ -6592,10 +6621,10 @@ var DropdownItem = (_a) => {
|
|
6592
6621
|
handleSelect();
|
6593
6622
|
}
|
6594
6623
|
};
|
6595
|
-
const itemContent = /* @__PURE__ */
|
6624
|
+
const itemContent = /* @__PURE__ */ React62.createElement("div", {
|
6596
6625
|
className: tw("py-3 px-4")
|
6597
6626
|
}, children);
|
6598
|
-
return /* @__PURE__ */
|
6627
|
+
return /* @__PURE__ */ React62.createElement("li", __spreadProps(__spreadValues({
|
6599
6628
|
role: "menuitem",
|
6600
6629
|
tabIndex: -1,
|
6601
6630
|
onClick: handleClick,
|
@@ -6606,11 +6635,11 @@ var DropdownItem = (_a) => {
|
|
6606
6635
|
"text-grey-10 cursor-not-allowed": disabled,
|
6607
6636
|
"text-primary-70 hover:text-primary-80": color === "danger" && !disabled
|
6608
6637
|
})
|
6609
|
-
}), tooltip ? /* @__PURE__ */
|
6638
|
+
}), tooltip ? /* @__PURE__ */ React62.createElement(Tooltip, {
|
6610
6639
|
content: tooltip,
|
6611
6640
|
placement: tooltipPlacement,
|
6612
6641
|
inline: false
|
6613
|
-
}, /* @__PURE__ */
|
6642
|
+
}, /* @__PURE__ */ React62.createElement("div", {
|
6614
6643
|
tabIndex: 0,
|
6615
6644
|
className: tw("grow")
|
6616
6645
|
}, itemContent)) : itemContent);
|
@@ -6619,11 +6648,11 @@ Dropdown.Menu = DropdownMenu3;
|
|
6619
6648
|
Dropdown.Item = DropdownItem;
|
6620
6649
|
|
6621
6650
|
// src/molecules/EmptyState/EmptyState.tsx
|
6622
|
-
import
|
6651
|
+
import React64 from "react";
|
6623
6652
|
import omit9 from "lodash/omit";
|
6624
6653
|
|
6625
6654
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
6626
|
-
import
|
6655
|
+
import React63 from "react";
|
6627
6656
|
var FlexboxItem = Tailwindify(
|
6628
6657
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
6629
6658
|
const hookStyle = useStyle({
|
@@ -6635,7 +6664,7 @@ var FlexboxItem = Tailwindify(
|
|
6635
6664
|
alignSelf
|
6636
6665
|
});
|
6637
6666
|
const HtmlElement = htmlTag;
|
6638
|
-
return /* @__PURE__ */
|
6667
|
+
return /* @__PURE__ */ React63.createElement(HtmlElement, {
|
6639
6668
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
6640
6669
|
className
|
6641
6670
|
}, children);
|
@@ -6693,7 +6722,7 @@ var EmptyState = ({
|
|
6693
6722
|
borderStyle = "dashed"
|
6694
6723
|
}) => {
|
6695
6724
|
const template = layoutStyle(layout);
|
6696
|
-
return /* @__PURE__ */
|
6725
|
+
return /* @__PURE__ */ React64.createElement(Box, {
|
6697
6726
|
className: classNames(
|
6698
6727
|
tw("rounded", {
|
6699
6728
|
"border border-dashed": borderStyle === "dashed",
|
@@ -6705,38 +6734,38 @@ var EmptyState = ({
|
|
6705
6734
|
backgroundColor: "transparent",
|
6706
6735
|
borderColor: "grey-10",
|
6707
6736
|
padding: "9"
|
6708
|
-
}, /* @__PURE__ */
|
6737
|
+
}, /* @__PURE__ */ React64.createElement(Flexbox, {
|
6709
6738
|
direction: template.layout,
|
6710
6739
|
justifyContent: template.justifyContent,
|
6711
6740
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
6712
6741
|
colGap: "l5",
|
6713
6742
|
rowGap: "8"
|
6714
|
-
}, image && /* @__PURE__ */
|
6743
|
+
}, image && /* @__PURE__ */ React64.createElement(FlexboxItem, null, /* @__PURE__ */ React64.createElement("img", {
|
6715
6744
|
src: image,
|
6716
6745
|
alt: imageAlt,
|
6717
6746
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
6718
|
-
})), /* @__PURE__ */
|
6747
|
+
})), /* @__PURE__ */ React64.createElement(Flexbox, {
|
6719
6748
|
style: { maxWidth: "610px" },
|
6720
6749
|
direction: "column",
|
6721
6750
|
justifyContent: template.justifyContent,
|
6722
6751
|
alignItems: template.alignItems
|
6723
|
-
}, /* @__PURE__ */
|
6752
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6724
6753
|
variant: "heading",
|
6725
6754
|
htmlTag: "h2"
|
6726
|
-
}, title), (description || children) && /* @__PURE__ */
|
6755
|
+
}, title), (description || children) && /* @__PURE__ */ React64.createElement(Box, {
|
6727
6756
|
marginTop: "5"
|
6728
|
-
}, /* @__PURE__ */
|
6757
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6729
6758
|
variant: "default",
|
6730
6759
|
color: "grey-60"
|
6731
|
-
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */
|
6760
|
+
}, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React64.createElement(Flexbox, {
|
6732
6761
|
marginTop: "7",
|
6733
6762
|
gap: "4",
|
6734
6763
|
justifyContent: "center",
|
6735
6764
|
alignItems: "center",
|
6736
6765
|
wrap: "wrap"
|
6737
|
-
}, 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, {
|
6738
6767
|
marginTop: "7"
|
6739
|
-
}, /* @__PURE__ */
|
6768
|
+
}, /* @__PURE__ */ React64.createElement(Typography2, {
|
6740
6769
|
htmlTag: "div",
|
6741
6770
|
variant: "small",
|
6742
6771
|
color: "grey-60"
|
@@ -6744,7 +6773,7 @@ var EmptyState = ({
|
|
6744
6773
|
};
|
6745
6774
|
|
6746
6775
|
// src/molecules/Grid/GridItem.tsx
|
6747
|
-
import
|
6776
|
+
import React65 from "react";
|
6748
6777
|
var GridItem = Tailwindify(
|
6749
6778
|
({
|
6750
6779
|
htmlTag = "div",
|
@@ -6775,7 +6804,7 @@ var GridItem = Tailwindify(
|
|
6775
6804
|
gridRowEnd: rowEnd
|
6776
6805
|
});
|
6777
6806
|
const HtmlElement = htmlTag;
|
6778
|
-
return /* @__PURE__ */
|
6807
|
+
return /* @__PURE__ */ React65.createElement(HtmlElement, {
|
6779
6808
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
6780
6809
|
className
|
6781
6810
|
}, children);
|
@@ -6783,7 +6812,7 @@ var GridItem = Tailwindify(
|
|
6783
6812
|
);
|
6784
6813
|
|
6785
6814
|
// src/molecules/LineClamp/LineClamp.tsx
|
6786
|
-
import
|
6815
|
+
import React66 from "react";
|
6787
6816
|
var LineClamp2 = ({
|
6788
6817
|
lines,
|
6789
6818
|
children,
|
@@ -6792,10 +6821,10 @@ var LineClamp2 = ({
|
|
6792
6821
|
collapseLabel,
|
6793
6822
|
onClampedChange
|
6794
6823
|
}) => {
|
6795
|
-
const ref =
|
6796
|
-
const [clamped, setClamped] =
|
6797
|
-
const [isClampingEnabled, setClampingEnabled] =
|
6798
|
-
|
6824
|
+
const ref = React66.useRef(null);
|
6825
|
+
const [clamped, setClamped] = React66.useState(true);
|
6826
|
+
const [isClampingEnabled, setClampingEnabled] = React66.useState(false);
|
6827
|
+
React66.useEffect(() => {
|
6799
6828
|
var _a, _b;
|
6800
6829
|
const el = ref.current;
|
6801
6830
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -6804,38 +6833,31 @@ var LineClamp2 = ({
|
|
6804
6833
|
setClamped(!clamped);
|
6805
6834
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
6806
6835
|
};
|
6807
|
-
return /* @__PURE__ */
|
6836
|
+
return /* @__PURE__ */ React66.createElement("div", null, /* @__PURE__ */ React66.createElement(LineClamp, {
|
6808
6837
|
ref,
|
6809
6838
|
lines,
|
6810
6839
|
clamped,
|
6811
6840
|
wordBreak
|
6812
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
6841
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React66.createElement(Button.Ghost, {
|
6813
6842
|
dense: true,
|
6814
6843
|
onClick: handleClampedChange
|
6815
6844
|
}, clamped ? expandLabel : collapseLabel));
|
6816
6845
|
};
|
6817
6846
|
|
6818
6847
|
// src/molecules/Link/Link.tsx
|
6819
|
-
import
|
6848
|
+
import React68 from "react";
|
6820
6849
|
|
6821
6850
|
// src/atoms/Link/Link.tsx
|
6822
|
-
import
|
6851
|
+
import React67 from "react";
|
6823
6852
|
var Link = (_a) => {
|
6824
6853
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
6825
|
-
return /* @__PURE__ */
|
6854
|
+
return /* @__PURE__ */ React67.createElement("a", __spreadValues({
|
6826
6855
|
className: classNames(className, linkStyle)
|
6827
6856
|
}, props), children);
|
6828
6857
|
};
|
6829
6858
|
|
6830
6859
|
// src/molecules/Link/Link.tsx
|
6831
|
-
var Link2 = (props) => /* @__PURE__ */
|
6832
|
-
|
6833
|
-
// src/molecules/List/List.tsx
|
6834
|
-
import React68 from "react";
|
6835
|
-
var List2 = ({ items, renderItem, container = React68.Fragment }) => {
|
6836
|
-
const Component = container;
|
6837
|
-
return /* @__PURE__ */ React68.createElement(Component, null, items.map(renderItem));
|
6838
|
-
};
|
6860
|
+
var Link2 = (props) => /* @__PURE__ */ React68.createElement(Link, __spreadValues({}, props));
|
6839
6861
|
|
6840
6862
|
// src/molecules/ListItem/ListItem.tsx
|
6841
6863
|
import React69 from "react";
|
@@ -7163,7 +7185,7 @@ var Modal2 = (_a) => {
|
|
7163
7185
|
const ref = React71.useRef(null);
|
7164
7186
|
const state = useOverlayTriggerState4({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
7165
7187
|
const { modalProps, underlayProps } = useModalOverlay2(
|
7166
|
-
{ isDismissable:
|
7188
|
+
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
7167
7189
|
state,
|
7168
7190
|
ref
|
7169
7191
|
);
|
@@ -7208,10 +7230,10 @@ var ModalWrapper = React71.forwardRef(
|
|
7208
7230
|
noFooter: !(secondaryActions || primaryAction)
|
7209
7231
|
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React71.createElement(Modal.Footer, null, /* @__PURE__ */ React71.createElement(Modal.Actions, null, secondaryActions && castArray(secondaryActions).filter(Boolean).map((_a2) => {
|
7210
7232
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
7211
|
-
return /* @__PURE__ */ React71.createElement(
|
7233
|
+
return /* @__PURE__ */ React71.createElement(Button.Secondary, __spreadValues({
|
7212
7234
|
key: text
|
7213
7235
|
}, action), text);
|
7214
|
-
}), primaryAction && /* @__PURE__ */ React71.createElement(
|
7236
|
+
}), primaryAction && /* @__PURE__ */ React71.createElement(Button.Primary, __spreadValues({
|
7215
7237
|
key: primaryAction.text
|
7216
7238
|
}, omit10(primaryAction, "text")), primaryAction.text))));
|
7217
7239
|
}
|
@@ -7245,22 +7267,31 @@ var InputChip = React72.forwardRef(
|
|
7245
7267
|
_onClick == null ? void 0 : _onClick(e);
|
7246
7268
|
}
|
7247
7269
|
};
|
7248
|
-
return /* @__PURE__ */ React72.createElement("div",
|
7249
|
-
|
7250
|
-
role: "button",
|
7251
|
-
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", {
|
7252
7272
|
"bg-error-0 ": invalid,
|
7253
|
-
"bg-grey-0": !invalid && !disabled,
|
7254
|
-
"
|
7255
|
-
|
7256
|
-
|
7257
|
-
|
7258
|
-
},
|
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, {
|
7259
7279
|
variant: "small",
|
7260
7280
|
color: invalid ? "error-80" : disabled ? "grey-40" : "grey-70"
|
7261
|
-
}, 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, {
|
7262
7293
|
icon: import_smallCross.default,
|
7263
|
-
className: tw(
|
7294
|
+
className: tw({
|
7264
7295
|
"text-error-70": invalid,
|
7265
7296
|
"text-grey-70": !invalid
|
7266
7297
|
})
|
@@ -7851,12 +7882,15 @@ var Footer = (_a) => {
|
|
7851
7882
|
}));
|
7852
7883
|
};
|
7853
7884
|
var Section2 = (_a) => {
|
7854
|
-
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
7885
|
+
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
7855
7886
|
return /* @__PURE__ */ React76.createElement("li", {
|
7856
|
-
role: "presentation"
|
7857
|
-
|
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), {
|
7858
7892
|
role: "group",
|
7859
|
-
className: classNames(tw("
|
7893
|
+
className: classNames(tw("flex flex-col"), className)
|
7860
7894
|
})));
|
7861
7895
|
};
|
7862
7896
|
var Divider3 = (_a) => {
|
@@ -7963,7 +7997,9 @@ var PageHeader2 = ({
|
|
7963
7997
|
chips = [],
|
7964
7998
|
breadcrumbs
|
7965
7999
|
}) => {
|
7966
|
-
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, {
|
7967
8003
|
gap: "5"
|
7968
8004
|
}, image && /* @__PURE__ */ React79.createElement("img", {
|
7969
8005
|
src: image,
|
@@ -7975,10 +8011,10 @@ var PageHeader2 = ({
|
|
7975
8011
|
text: chip
|
7976
8012
|
}))), subtitle && /* @__PURE__ */ React79.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction) && /* @__PURE__ */ React79.createElement(PageHeader.Actions, null, secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_a) => {
|
7977
8013
|
var _b = _a, { text } = _b, action = __objRest(_b, ["text"]);
|
7978
|
-
return /* @__PURE__ */ React79.createElement(
|
8014
|
+
return /* @__PURE__ */ React79.createElement(Button.Secondary, __spreadValues({
|
7979
8015
|
key: text
|
7980
8016
|
}, action), text);
|
7981
|
-
}), primaryAction && /* @__PURE__ */ React79.createElement(
|
8017
|
+
}), primaryAction && /* @__PURE__ */ React79.createElement(Button.Primary, __spreadValues({
|
7982
8018
|
key: primaryAction.text
|
7983
8019
|
}, omit14(primaryAction, "text")), primaryAction.text)));
|
7984
8020
|
};
|
@@ -8653,7 +8689,7 @@ Section3.Body = (_a) => {
|
|
8653
8689
|
// src/molecules/Section/Section.tsx
|
8654
8690
|
var Section4 = ({ title, subtitle, actions, children }) => /* @__PURE__ */ React89.createElement(Section3, null, title && /* @__PURE__ */ React89.createElement(React89.Fragment, null, /* @__PURE__ */ React89.createElement(Section3.Header, null, /* @__PURE__ */ React89.createElement(Section3.TitleContainer, null, /* @__PURE__ */ React89.createElement(Section3.Title, null, title), subtitle && /* @__PURE__ */ React89.createElement(Section3.Subtitle, null, subtitle)), /* @__PURE__ */ React89.createElement(Section3.Actions, null, actions && castArray4(actions).filter(Boolean).map((_a) => {
|
8655
8691
|
var _b = _a, { text } = _b, action = __objRest(_b, ["text"]);
|
8656
|
-
return /* @__PURE__ */ React89.createElement(
|
8692
|
+
return /* @__PURE__ */ React89.createElement(Button.Secondary, __spreadValues({
|
8657
8693
|
key: text
|
8658
8694
|
}, action), text);
|
8659
8695
|
}))), /* @__PURE__ */ React89.createElement(Divider2, null)), /* @__PURE__ */ React89.createElement(Section3.Body, null, children));
|