@aivenio/aquarium 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms.cjs +32 -9
- package/dist/atoms.mjs +32 -9
- package/dist/src/atoms/Filter/Filter.d.ts +5 -0
- package/dist/src/atoms/Filter/Filter.js +7 -6
- package/dist/src/atoms/Modal/Modal.d.ts +19 -8
- package/dist/src/atoms/Modal/Modal.js +10 -7
- package/dist/src/icons/camera.d.ts +9 -0
- package/dist/src/icons/camera.js +11 -0
- package/dist/src/icons/index.d.ts +1 -0
- package/dist/src/icons/index.js +2 -1
- package/dist/src/molecules/Modal/Modal.js +5 -4
- package/dist/styles.css +3 -3
- package/dist/system.cjs +34 -10
- package/dist/system.mjs +35 -11
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
11
11
|
};
|
12
12
|
import React from 'react';
|
13
13
|
import { Dialog as AriaDialog, Modal as AriaModal, ModalOverlay as AriaModalOverlay } from 'react-aria-components';
|
14
|
-
import { castArray, omit } from 'lodash-es';
|
14
|
+
import { castArray, isEmpty, omit } from 'lodash-es';
|
15
15
|
import { Button } from '../../../src/molecules/Button/Button';
|
16
16
|
import { createTabsComponent, ModalTab, TabContainer as ModalTabContainer, TabItem, } from '../../../src/molecules/Tabs/Tabs';
|
17
17
|
import { Modal as BaseModal, modalStyles } from '../../../src/atoms/Modal/Modal';
|
@@ -25,6 +25,7 @@ export const Modal = ({ open, onClose, closeOnEsc = true, size = 'md', headerIma
|
|
25
25
|
}
|
26
26
|
const styles = modalStyles({ kind: 'dialog', size });
|
27
27
|
const hasTabs = isComponentType(children, ModalTabs);
|
28
|
+
const hasActions = (secondaryActions && !isEmpty(secondaryActions)) || primaryAction;
|
28
29
|
return (React.createElement(AriaModalOverlay, { isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose(), isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc, className: styles.overlay({ className: 'Aquarium-Modal' }) },
|
29
30
|
size !== 'screen' && React.createElement(BaseModal.BackDrop, { className: styles.backdrop() }),
|
30
31
|
React.createElement(AriaModal, { className: styles.dialog() },
|
@@ -36,8 +37,8 @@ export const Modal = ({ open, onClose, closeOnEsc = true, size = 'md', headerIma
|
|
36
37
|
React.createElement(BaseModal.TitleContainer, null,
|
37
38
|
React.createElement(ModalTitle, { kind: "dialog" }, title),
|
38
39
|
subtitle && React.createElement(BaseModal.Subtitle, null, subtitle))),
|
39
|
-
hasTabs ? (React.cloneElement(children, { className: tw('[&>div:first-child]:px-5 grow') })) : (React.createElement(BaseModal.Body, { tabIndex: 0, noFooter: !
|
40
|
-
|
40
|
+
hasTabs ? (React.cloneElement(children, { className: tw('[&>div:first-child]:px-5 grow') })) : (React.createElement(BaseModal.Body, { tabIndex: 0, noFooter: !hasActions, size: size }, children)),
|
41
|
+
hasActions && (React.createElement(BaseModal.Footer, null,
|
41
42
|
React.createElement(BaseModal.Actions, null,
|
42
43
|
secondaryActions &&
|
43
44
|
castArray(secondaryActions)
|
@@ -50,4 +51,4 @@ export const Modal = ({ open, onClose, closeOnEsc = true, size = 'md', headerIma
|
|
50
51
|
};
|
51
52
|
export const ModalTabs = createTabsComponent(ModalTab, TabItem, 'ModalTabs', (children, selected, props) => (React.createElement(BaseModal.Body, { maxHeight: props.maxHeight },
|
52
53
|
React.createElement(ModalTabContainer, null, children.find((node, index) => (node === null || node === void 0 ? void 0 : node.props.value) === selected || index === selected)))));
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTW9kYWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbW9sZWN1bGVzL01vZGFsL01vZGFsLnRzeCJdLCJuYW1lc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 @@ input[type='number'].no-arrows {
|
|
1130
1130
|
.mb-5{
|
1131
1131
|
margin-bottom: 16px;
|
1132
1132
|
}
|
1133
|
-
.mb-6{
|
1134
|
-
margin-bottom: 24px;
|
1135
|
-
}
|
1136
1133
|
.mb-\[-20px\]{
|
1137
1134
|
margin-bottom: -20px;
|
1138
1135
|
}
|
@@ -2969,6 +2966,9 @@ input[type='number'].no-arrows {
|
|
2969
2966
|
.pt-3{
|
2970
2967
|
padding-top: 8px;
|
2971
2968
|
}
|
2969
|
+
.pt-6{
|
2970
|
+
padding-top: 24px;
|
2971
|
+
}
|
2972
2972
|
.text-left{
|
2973
2973
|
text-align: left;
|
2974
2974
|
}
|
package/dist/system.cjs
CHANGED
@@ -718,6 +718,22 @@ var require_calendar = __commonJS({
|
|
718
718
|
}
|
719
719
|
});
|
720
720
|
|
721
|
+
// src/icons/camera.js
|
722
|
+
var require_camera = __commonJS({
|
723
|
+
"src/icons/camera.js"(exports2) {
|
724
|
+
"use strict";
|
725
|
+
var data = {
|
726
|
+
"body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M1.333 5.584c0-.233 0-.35.01-.448a2 2 0 011.793-1.793c.098-.01.221-.01.467-.01.095 0 .143 0 .183-.002a1.333 1.333 0 001.156-.834c.015-.037.03-.08.058-.164.028-.084.042-.127.057-.164a1.333 1.333 0 011.156-.834c.04-.002.085-.002.174-.002h3.225c.09 0 .134 0 .174.002.514.032.964.356 1.156.834.015.037.03.08.058.164.028.084.042.127.057.164.192.478.642.802 1.156.834.04.002.088.002.183.002.246 0 .37 0 .467.01a2 2 0 011.794 1.793c.01.098.01.215.01.448V10.8c0 1.12 0 1.68-.219 2.108a2 2 0 01-.874.874c-.428.218-.988.218-2.108.218H4.533c-1.12 0-1.68 0-2.108-.218a2 2 0 01-.874-.874c-.218-.428-.218-.988-.218-2.108V5.584Z"/><path d="M8 11a2.667 2.667 0 100-5.334A2.667 2.667 0 008 11Z"/></g>',
|
727
|
+
"left": 0,
|
728
|
+
"top": 0,
|
729
|
+
"width": 16,
|
730
|
+
"height": 16
|
731
|
+
};
|
732
|
+
exports2.__esModule = true;
|
733
|
+
exports2.default = data;
|
734
|
+
}
|
735
|
+
});
|
736
|
+
|
721
737
|
// src/icons/capslock.js
|
722
738
|
var require_capslock = __commonJS({
|
723
739
|
"src/icons/capslock.js"(exports2) {
|
@@ -4805,6 +4821,7 @@ var import_bookmark = __toESM(require_bookmark());
|
|
4805
4821
|
var import_box = __toESM(require_box());
|
4806
4822
|
var import_briefcase = __toESM(require_briefcase());
|
4807
4823
|
var import_calendar = __toESM(require_calendar());
|
4824
|
+
var import_camera = __toESM(require_camera());
|
4808
4825
|
var import_capslock = __toESM(require_capslock());
|
4809
4826
|
var import_caretDownFilled = __toESM(require_caretDownFilled());
|
4810
4827
|
var import_caretDown = __toESM(require_caretDown());
|
@@ -15204,7 +15221,8 @@ var modalStyles = (0, import_tailwind_variants13.tv)({
|
|
15204
15221
|
titleContainer: "flex flex-col grow",
|
15205
15222
|
title: "",
|
15206
15223
|
closeButtonContainer: "absolute top-[24px] right-[28px]",
|
15207
|
-
body: "
|
15224
|
+
body: "grow overflow-y-auto text-default",
|
15225
|
+
bodyContent: "px-7",
|
15208
15226
|
footer: "px-7 py-6",
|
15209
15227
|
actions: "flex gap-4 justify-end"
|
15210
15228
|
},
|
@@ -15227,12 +15245,13 @@ var modalStyles = (0, import_tailwind_variants13.tv)({
|
|
15227
15245
|
screen: {
|
15228
15246
|
overlay: "py-0",
|
15229
15247
|
dialog: "w-dvw h-dvh mx-0 rounded-none",
|
15230
|
-
header: "border-b-1 border-muted
|
15248
|
+
header: "border-b-1 border-muted",
|
15249
|
+
bodyContent: "pt-6"
|
15231
15250
|
}
|
15232
15251
|
},
|
15233
15252
|
noFooter: {
|
15234
15253
|
true: {
|
15235
|
-
|
15254
|
+
bodyContent: "pb-6"
|
15236
15255
|
}
|
15237
15256
|
},
|
15238
15257
|
backgroundImage: {
|
@@ -15330,9 +15349,9 @@ Modal.TitleContainer = ({ children, className, ...rest }) => {
|
|
15330
15349
|
const { titleContainer } = modalStyles();
|
15331
15350
|
return /* @__PURE__ */ import_react98.default.createElement("div", { ...rest, className: titleContainer({ className }) }, children);
|
15332
15351
|
};
|
15333
|
-
Modal.Body = ({ children, className, noFooter = false, maxHeight, style, ...rest }) => {
|
15334
|
-
const { body } = modalStyles();
|
15335
|
-
return /* @__PURE__ */ import_react98.default.createElement("div", { ...rest, className: body({
|
15352
|
+
Modal.Body = ({ children, className, noFooter = false, maxHeight, style, size, ...rest }) => {
|
15353
|
+
const { body, bodyContent } = modalStyles({ size });
|
15354
|
+
return /* @__PURE__ */ import_react98.default.createElement("div", { ...rest, className: body({ className }), style: { maxHeight, ...style } }, /* @__PURE__ */ import_react98.default.createElement("div", { className: bodyContent({ noFooter }) }, children));
|
15336
15355
|
};
|
15337
15356
|
Modal.Footer = ({ children, className, ...rest }) => {
|
15338
15357
|
const { footer } = modalStyles();
|
@@ -15983,8 +16002,8 @@ var FilterTrigger = ({
|
|
15983
16002
|
onClear,
|
15984
16003
|
onClick,
|
15985
16004
|
value,
|
15986
|
-
// children,
|
15987
16005
|
error: error2 = false,
|
16006
|
+
clearSelectionEnabled = true,
|
15988
16007
|
...props
|
15989
16008
|
}) => {
|
15990
16009
|
const ariaDatePickerState = import_react106.default.useContext(import_react_aria_components18.DatePickerStateContext);
|
@@ -15999,7 +16018,7 @@ var FilterTrigger = ({
|
|
15999
16018
|
}
|
16000
16019
|
};
|
16001
16020
|
const hasValue = !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker;
|
16002
|
-
const showClearButton = !!onClear && !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker;
|
16021
|
+
const showClearButton = clearSelectionEnabled && (!!onClear && !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker);
|
16003
16022
|
return /* @__PURE__ */ import_react106.default.createElement(
|
16004
16023
|
import_react_aria_components18.Group,
|
16005
16024
|
{
|
@@ -16022,7 +16041,11 @@ var FilterTrigger = ({
|
|
16022
16041
|
/* @__PURE__ */ import_react106.default.createElement("div", { className: tw("flex items-center gap-3 divide-x divide-grey-20") }, /* @__PURE__ */ import_react106.default.createElement("div", { className: tw("flex items-center gap-3") }, /* @__PURE__ */ import_react106.default.createElement("div", { className: tw("flex items-center gap-2") }, /* @__PURE__ */ import_react106.default.createElement(InlineIcon, { icon }), /* @__PURE__ */ import_react106.default.createElement(Typography2.Small, null, labelText)), badge && /* @__PURE__ */ import_react106.default.createElement(Typography2, { color: "primary-active", className: tw("flex items-center") }, /* @__PURE__ */ import_react106.default.createElement(Badge, { dense: true, value: badge }))), hasValue && /* @__PURE__ */ import_react106.default.createElement("div", { className: "pl-3" }, /* @__PURE__ */ import_react106.default.createElement(
|
16023
16042
|
Typography2.Small,
|
16024
16043
|
{
|
16025
|
-
className: tw("truncate
|
16044
|
+
className: tw("truncate", {
|
16045
|
+
"max-w-[320px]": isUsedInsideDateRangePicker,
|
16046
|
+
"max-w-[233px]": !isUsedInsideDateRangePicker
|
16047
|
+
// Set to 233px to keep the total width of the filter pill within approximately 360px.
|
16048
|
+
}),
|
16026
16049
|
color: error2 ? "danger-intense" : "primary-active"
|
16027
16050
|
},
|
16028
16051
|
value,
|
@@ -16166,6 +16189,7 @@ var Modal2 = ({
|
|
16166
16189
|
}
|
16167
16190
|
const styles = modalStyles({ kind: "dialog", size });
|
16168
16191
|
const hasTabs = isComponentType(children, ModalTabs);
|
16192
|
+
const hasActions = secondaryActions && !(0, import_lodash_es38.isEmpty)(secondaryActions) || primaryAction;
|
16169
16193
|
return /* @__PURE__ */ import_react110.default.createElement(
|
16170
16194
|
import_react_aria_components19.ModalOverlay,
|
16171
16195
|
{
|
@@ -16184,7 +16208,7 @@ var Modal2 = ({
|
|
16184
16208
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
16185
16209
|
},
|
16186
16210
|
/* @__PURE__ */ import_react110.default.createElement(Modal.TitleContainer, null, /* @__PURE__ */ import_react110.default.createElement(ModalTitle, { kind: "dialog" }, title), subtitle && /* @__PURE__ */ import_react110.default.createElement(Modal.Subtitle, null, subtitle))
|
16187
|
-
), hasTabs ? import_react110.default.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ import_react110.default.createElement(Modal.Body, { tabIndex: 0, noFooter: !
|
16211
|
+
), hasTabs ? import_react110.default.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ import_react110.default.createElement(Modal.Body, { tabIndex: 0, noFooter: !hasActions, size }, children), hasActions && /* @__PURE__ */ import_react110.default.createElement(Modal.Footer, null, /* @__PURE__ */ import_react110.default.createElement(Modal.Actions, null, secondaryActions && (0, import_lodash_es38.castArray)(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ import_react110.default.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ import_react110.default.createElement(Button2.Primary, { key: primaryAction.text, ...(0, import_lodash_es38.omit)(primaryAction, "text") }, primaryAction.text))))))
|
16188
16212
|
);
|
16189
16213
|
};
|
16190
16214
|
var ModalTabs = createTabsComponent(
|
package/dist/system.mjs
CHANGED
@@ -716,6 +716,22 @@ var require_calendar = __commonJS({
|
|
716
716
|
}
|
717
717
|
});
|
718
718
|
|
719
|
+
// src/icons/camera.js
|
720
|
+
var require_camera = __commonJS({
|
721
|
+
"src/icons/camera.js"(exports) {
|
722
|
+
"use strict";
|
723
|
+
var data = {
|
724
|
+
"body": '<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M1.333 5.584c0-.233 0-.35.01-.448a2 2 0 011.793-1.793c.098-.01.221-.01.467-.01.095 0 .143 0 .183-.002a1.333 1.333 0 001.156-.834c.015-.037.03-.08.058-.164.028-.084.042-.127.057-.164a1.333 1.333 0 011.156-.834c.04-.002.085-.002.174-.002h3.225c.09 0 .134 0 .174.002.514.032.964.356 1.156.834.015.037.03.08.058.164.028.084.042.127.057.164.192.478.642.802 1.156.834.04.002.088.002.183.002.246 0 .37 0 .467.01a2 2 0 011.794 1.793c.01.098.01.215.01.448V10.8c0 1.12 0 1.68-.219 2.108a2 2 0 01-.874.874c-.428.218-.988.218-2.108.218H4.533c-1.12 0-1.68 0-2.108-.218a2 2 0 01-.874-.874c-.218-.428-.218-.988-.218-2.108V5.584Z"/><path d="M8 11a2.667 2.667 0 100-5.334A2.667 2.667 0 008 11Z"/></g>',
|
725
|
+
"left": 0,
|
726
|
+
"top": 0,
|
727
|
+
"width": 16,
|
728
|
+
"height": 16
|
729
|
+
};
|
730
|
+
exports.__esModule = true;
|
731
|
+
exports.default = data;
|
732
|
+
}
|
733
|
+
});
|
734
|
+
|
719
735
|
// src/icons/capslock.js
|
720
736
|
var require_capslock = __commonJS({
|
721
737
|
"src/icons/capslock.js"(exports) {
|
@@ -4657,6 +4673,7 @@ var import_bookmark = __toESM(require_bookmark());
|
|
4657
4673
|
var import_box = __toESM(require_box());
|
4658
4674
|
var import_briefcase = __toESM(require_briefcase());
|
4659
4675
|
var import_calendar = __toESM(require_calendar());
|
4676
|
+
var import_camera = __toESM(require_camera());
|
4660
4677
|
var import_capslock = __toESM(require_capslock());
|
4661
4678
|
var import_caretDownFilled = __toESM(require_caretDownFilled());
|
4662
4679
|
var import_caretDown = __toESM(require_caretDown());
|
@@ -15105,7 +15122,8 @@ var modalStyles = tv13({
|
|
15105
15122
|
titleContainer: "flex flex-col grow",
|
15106
15123
|
title: "",
|
15107
15124
|
closeButtonContainer: "absolute top-[24px] right-[28px]",
|
15108
|
-
body: "
|
15125
|
+
body: "grow overflow-y-auto text-default",
|
15126
|
+
bodyContent: "px-7",
|
15109
15127
|
footer: "px-7 py-6",
|
15110
15128
|
actions: "flex gap-4 justify-end"
|
15111
15129
|
},
|
@@ -15128,12 +15146,13 @@ var modalStyles = tv13({
|
|
15128
15146
|
screen: {
|
15129
15147
|
overlay: "py-0",
|
15130
15148
|
dialog: "w-dvw h-dvh mx-0 rounded-none",
|
15131
|
-
header: "border-b-1 border-muted
|
15149
|
+
header: "border-b-1 border-muted",
|
15150
|
+
bodyContent: "pt-6"
|
15132
15151
|
}
|
15133
15152
|
},
|
15134
15153
|
noFooter: {
|
15135
15154
|
true: {
|
15136
|
-
|
15155
|
+
bodyContent: "pb-6"
|
15137
15156
|
}
|
15138
15157
|
},
|
15139
15158
|
backgroundImage: {
|
@@ -15231,9 +15250,9 @@ Modal.TitleContainer = ({ children, className, ...rest }) => {
|
|
15231
15250
|
const { titleContainer } = modalStyles();
|
15232
15251
|
return /* @__PURE__ */ React89.createElement("div", { ...rest, className: titleContainer({ className }) }, children);
|
15233
15252
|
};
|
15234
|
-
Modal.Body = ({ children, className, noFooter = false, maxHeight, style, ...rest }) => {
|
15235
|
-
const { body } = modalStyles();
|
15236
|
-
return /* @__PURE__ */ React89.createElement("div", { ...rest, className: body({
|
15253
|
+
Modal.Body = ({ children, className, noFooter = false, maxHeight, style, size, ...rest }) => {
|
15254
|
+
const { body, bodyContent } = modalStyles({ size });
|
15255
|
+
return /* @__PURE__ */ React89.createElement("div", { ...rest, className: body({ className }), style: { maxHeight, ...style } }, /* @__PURE__ */ React89.createElement("div", { className: bodyContent({ noFooter }) }, children));
|
15237
15256
|
};
|
15238
15257
|
Modal.Footer = ({ children, className, ...rest }) => {
|
15239
15258
|
const { footer } = modalStyles();
|
@@ -15889,8 +15908,8 @@ var FilterTrigger = ({
|
|
15889
15908
|
onClear,
|
15890
15909
|
onClick,
|
15891
15910
|
value,
|
15892
|
-
// children,
|
15893
15911
|
error: error2 = false,
|
15912
|
+
clearSelectionEnabled = true,
|
15894
15913
|
...props
|
15895
15914
|
}) => {
|
15896
15915
|
const ariaDatePickerState = React97.useContext(AriaDatePickerStateContext2);
|
@@ -15905,7 +15924,7 @@ var FilterTrigger = ({
|
|
15905
15924
|
}
|
15906
15925
|
};
|
15907
15926
|
const hasValue = !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker;
|
15908
|
-
const showClearButton = !!onClear && !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker;
|
15927
|
+
const showClearButton = clearSelectionEnabled && (!!onClear && !!value || isUsedInsideDatePicker || isUsedInsideDateRangePicker);
|
15909
15928
|
return /* @__PURE__ */ React97.createElement(
|
15910
15929
|
AriaGroup,
|
15911
15930
|
{
|
@@ -15928,7 +15947,11 @@ var FilterTrigger = ({
|
|
15928
15947
|
/* @__PURE__ */ React97.createElement("div", { className: tw("flex items-center gap-3 divide-x divide-grey-20") }, /* @__PURE__ */ React97.createElement("div", { className: tw("flex items-center gap-3") }, /* @__PURE__ */ React97.createElement("div", { className: tw("flex items-center gap-2") }, /* @__PURE__ */ React97.createElement(InlineIcon, { icon }), /* @__PURE__ */ React97.createElement(Typography2.Small, null, labelText)), badge && /* @__PURE__ */ React97.createElement(Typography2, { color: "primary-active", className: tw("flex items-center") }, /* @__PURE__ */ React97.createElement(Badge, { dense: true, value: badge }))), hasValue && /* @__PURE__ */ React97.createElement("div", { className: "pl-3" }, /* @__PURE__ */ React97.createElement(
|
15929
15948
|
Typography2.Small,
|
15930
15949
|
{
|
15931
|
-
className: tw("truncate
|
15950
|
+
className: tw("truncate", {
|
15951
|
+
"max-w-[320px]": isUsedInsideDateRangePicker,
|
15952
|
+
"max-w-[233px]": !isUsedInsideDateRangePicker
|
15953
|
+
// Set to 233px to keep the total width of the filter pill within approximately 360px.
|
15954
|
+
}),
|
15932
15955
|
color: error2 ? "danger-intense" : "primary-active"
|
15933
15956
|
},
|
15934
15957
|
value,
|
@@ -16053,7 +16076,7 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
16053
16076
|
// src/molecules/Modal/Modal.tsx
|
16054
16077
|
import React101 from "react";
|
16055
16078
|
import { Dialog as AriaDialog3, Modal as AriaModal2, ModalOverlay as AriaModalOverlay2 } from "react-aria-components";
|
16056
|
-
import { castArray as castArray4, omit as omit12 } from "lodash-es";
|
16079
|
+
import { castArray as castArray4, isEmpty as isEmpty2, omit as omit12 } from "lodash-es";
|
16057
16080
|
var import_cross8 = __toESM(require_cross());
|
16058
16081
|
var Modal2 = ({
|
16059
16082
|
open,
|
@@ -16072,6 +16095,7 @@ var Modal2 = ({
|
|
16072
16095
|
}
|
16073
16096
|
const styles = modalStyles({ kind: "dialog", size });
|
16074
16097
|
const hasTabs = isComponentType(children, ModalTabs);
|
16098
|
+
const hasActions = secondaryActions && !isEmpty2(secondaryActions) || primaryAction;
|
16075
16099
|
return /* @__PURE__ */ React101.createElement(
|
16076
16100
|
AriaModalOverlay2,
|
16077
16101
|
{
|
@@ -16090,7 +16114,7 @@ var Modal2 = ({
|
|
16090
16114
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
16091
16115
|
},
|
16092
16116
|
/* @__PURE__ */ React101.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React101.createElement(ModalTitle, { kind: "dialog" }, title), subtitle && /* @__PURE__ */ React101.createElement(Modal.Subtitle, null, subtitle))
|
16093
|
-
), hasTabs ? React101.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React101.createElement(Modal.Body, { tabIndex: 0, noFooter: !
|
16117
|
+
), hasTabs ? React101.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React101.createElement(Modal.Body, { tabIndex: 0, noFooter: !hasActions, size }, children), hasActions && /* @__PURE__ */ React101.createElement(Modal.Footer, null, /* @__PURE__ */ React101.createElement(Modal.Actions, null, secondaryActions && castArray4(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React101.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React101.createElement(Button2.Primary, { key: primaryAction.text, ...omit12(primaryAction, "text") }, primaryAction.text))))))
|
16094
16118
|
);
|
16095
16119
|
};
|
16096
16120
|
var ModalTabs = createTabsComponent(
|