@aivenio/aquarium 5.0.0 → 5.0.1
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 +5 -6
- package/dist/atoms.mjs +12 -13
- package/dist/src/atoms/Popover/Popover.d.ts +1 -1
- package/dist/src/atoms/Popover/Popover.js +3 -2
- package/dist/src/molecules/Drawer/Drawer.js +4 -12
- package/dist/src/molecules/Modal/Modal.js +4 -12
- package/dist/styles.css +3 -0
- package/dist/system.cjs +20 -33
- package/dist/system.mjs +30 -43
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/system.mjs
CHANGED
|
@@ -9648,7 +9648,8 @@ import {
|
|
|
9648
9648
|
} from "react-aria-components";
|
|
9649
9649
|
import { tv as tv14 } from "tailwind-variants";
|
|
9650
9650
|
var popoverStyles = tv14({
|
|
9651
|
-
|
|
9651
|
+
// z-[101] ensures popover appears above modal (z-modal: 100)
|
|
9652
|
+
base: "rounded-sm shadow-16dp bg-popover-content mt-1 overflow-y-auto flex flex-col border border-default outline-none z-[101]"
|
|
9652
9653
|
});
|
|
9653
9654
|
var Popover = React55.forwardRef(
|
|
9654
9655
|
({ children, offset = 0, className, placement: _placement = "bottom-left", ...props }, ref) => {
|
|
@@ -15470,9 +15471,8 @@ var DialogWrapper = ({
|
|
|
15470
15471
|
};
|
|
15471
15472
|
|
|
15472
15473
|
// src/molecules/Drawer/Drawer.tsx
|
|
15473
|
-
import React94
|
|
15474
|
+
import React94 from "react";
|
|
15474
15475
|
import { Dialog as AriaDialog2, Modal as AriaModal, ModalOverlay as AriaModalOverlay } from "react-aria-components";
|
|
15475
|
-
import { UNSTABLE_PortalProvider } from "@react-aria/overlays";
|
|
15476
15476
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
|
15477
15477
|
import { clsx as clsx31 } from "clsx";
|
|
15478
15478
|
import { castArray as castArray4, omit as omit11 } from "lodash-es";
|
|
@@ -15792,7 +15792,6 @@ var Drawer = ({
|
|
|
15792
15792
|
secondaryActions,
|
|
15793
15793
|
closeOnEsc = true
|
|
15794
15794
|
}) => {
|
|
15795
|
-
const portalContainerRef = useRef12(null);
|
|
15796
15795
|
const [hidden, setHidden] = React94.useState(!open);
|
|
15797
15796
|
if (open && hidden) {
|
|
15798
15797
|
setHidden(!open);
|
|
@@ -15829,18 +15828,13 @@ var Drawer = ({
|
|
|
15829
15828
|
className: styles.overlay({ className: "Aquarium-Drawer" })
|
|
15830
15829
|
},
|
|
15831
15830
|
/* @__PURE__ */ React94.createElement(AnimatedBackDrop, { style: { opacity } }),
|
|
15832
|
-
/* @__PURE__ */ React94.createElement(AriaModal, null, /* @__PURE__ */ React94.createElement(AnimatedDialog, { kind: "drawer", "aria-modal": "true", size: dialogSize, style: { position: "fixed", right } }, /* @__PURE__ */ React94.createElement(AriaDialog2, { className: "flex flex-col grow overflow-y-auto" }, ({ close }) => (
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
...onlyChild.props,
|
|
15840
|
-
className: "[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto"
|
|
15841
|
-
}
|
|
15842
|
-
) : /* @__PURE__ */ React94.createElement(Modal.Body, { tabIndex: 0, noFooter: !(secondaryActions ?? primaryAction) }, children, /* @__PURE__ */ React94.createElement("div", { ref: portalContainerRef, className: "relative" })), (secondaryActions ?? primaryAction) && /* @__PURE__ */ React94.createElement(Modal.Footer, null, /* @__PURE__ */ React94.createElement(Modal.Actions, { className: size === "sm" ? "flex-col" : void 0 }, size !== "sm" && menu && /* @__PURE__ */ React94.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React94.createElement(DropdownMenu2, { onAction: (action) => onAction(action), onOpenChange: onMenuOpenChange }, /* @__PURE__ */ React94.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React94.createElement(Button2.Icon, { "aria-label": menuAriaLabel ?? "Context menu", icon: import_more4.default })), menu)), secondaryActions && castArray4(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React94.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React94.createElement(Button2.Primary, { key: primaryAction.text, ...omit11(primaryAction, "text") }, primaryAction.text))))
|
|
15843
|
-
))))
|
|
15831
|
+
/* @__PURE__ */ React94.createElement(AriaModal, null, /* @__PURE__ */ React94.createElement(AnimatedDialog, { kind: "drawer", "aria-modal": "true", size: dialogSize, style: { position: "fixed", right } }, /* @__PURE__ */ React94.createElement(AriaDialog2, { className: "flex flex-col grow overflow-y-auto" }, ({ close }) => /* @__PURE__ */ React94.createElement(React94.Fragment, null, /* @__PURE__ */ React94.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React94.createElement(Button2.Icon, { "aria-label": "Close", icon: import_cross6.default, onClick: close })), /* @__PURE__ */ React94.createElement(Modal.Header, { className: clsx31({ "pb-3": hasTabs }) }, /* @__PURE__ */ React94.createElement(ModalTitle, { kind: "drawer" }, title)), hasTabs ? /* @__PURE__ */ React94.createElement(
|
|
15832
|
+
DrawerTabs,
|
|
15833
|
+
{
|
|
15834
|
+
...onlyChild.props,
|
|
15835
|
+
className: "[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto"
|
|
15836
|
+
}
|
|
15837
|
+
) : /* @__PURE__ */ React94.createElement(Modal.Body, { tabIndex: 0, noFooter: !(secondaryActions ?? primaryAction) }, children), (secondaryActions ?? primaryAction) && /* @__PURE__ */ React94.createElement(Modal.Footer, null, /* @__PURE__ */ React94.createElement(Modal.Actions, { className: size === "sm" ? "flex-col" : void 0 }, size !== "sm" && menu && /* @__PURE__ */ React94.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React94.createElement(DropdownMenu2, { onAction: (action) => onAction(action), onOpenChange: onMenuOpenChange }, /* @__PURE__ */ React94.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React94.createElement(Button2.Icon, { "aria-label": menuAriaLabel ?? "Context menu", icon: import_more4.default })), menu)), secondaryActions && castArray4(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React94.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React94.createElement(Button2.Primary, { key: primaryAction.text, ...omit11(primaryAction, "text") }, primaryAction.text)))))))
|
|
15844
15838
|
);
|
|
15845
15839
|
};
|
|
15846
15840
|
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React94.createElement(Modal.Body, { className: "h-full" }, /* @__PURE__ */ React94.createElement(TabContainer, { className: "!py-4" }, children.find(
|
|
@@ -16247,9 +16241,8 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
|
16247
16241
|
};
|
|
16248
16242
|
|
|
16249
16243
|
// src/molecules/Modal/Modal.tsx
|
|
16250
|
-
import React102
|
|
16244
|
+
import React102 from "react";
|
|
16251
16245
|
import { Dialog as AriaDialog3, Modal as AriaModal2, ModalOverlay as AriaModalOverlay2 } from "react-aria-components";
|
|
16252
|
-
import { UNSTABLE_PortalProvider as UNSTABLE_PortalProvider2 } from "@react-aria/overlays";
|
|
16253
16246
|
import { clsx as clsx35 } from "clsx";
|
|
16254
16247
|
import { castArray as castArray5, isEmpty as isEmpty2, omit as omit12 } from "lodash-es";
|
|
16255
16248
|
var import_cross8 = __toESM(require_cross());
|
|
@@ -16265,7 +16258,6 @@ var Modal2 = ({
|
|
|
16265
16258
|
primaryAction,
|
|
16266
16259
|
secondaryActions
|
|
16267
16260
|
}) => {
|
|
16268
|
-
const portalContainerRef = useRef13(null);
|
|
16269
16261
|
if (!open) {
|
|
16270
16262
|
return null;
|
|
16271
16263
|
}
|
|
@@ -16282,20 +16274,15 @@ var Modal2 = ({
|
|
|
16282
16274
|
className: styles.overlay({ className: "Aquarium-Modal" })
|
|
16283
16275
|
},
|
|
16284
16276
|
size !== "screen" && /* @__PURE__ */ React102.createElement(Modal.BackDrop, { className: styles.backdrop() }),
|
|
16285
|
-
/* @__PURE__ */ React102.createElement(AriaModal2, { className: styles.dialog() }, /* @__PURE__ */ React102.createElement(AriaDialog3, { className: "flex flex-col grow overflow-y-auto" }, ({ close }) => (
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
|
|
16289
|
-
|
|
16290
|
-
|
|
16291
|
-
|
|
16292
|
-
|
|
16293
|
-
|
|
16294
|
-
className: clsx35({ "pb-3": isComponentType(children, ModalTabs) })
|
|
16295
|
-
},
|
|
16296
|
-
/* @__PURE__ */ React102.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React102.createElement(ModalTitle, { kind: "dialog" }, title), subtitle && /* @__PURE__ */ React102.createElement(Modal.Subtitle, null, subtitle))
|
|
16297
|
-
), hasTabs ? React102.cloneElement(children, { className: "[&>div:first-child]:px-5 grow" }) : /* @__PURE__ */ React102.createElement(Modal.Body, { tabIndex: 0, noFooter: !hasActions, size }, children, /* @__PURE__ */ React102.createElement("div", { ref: portalContainerRef, className: "relative" })), hasActions && /* @__PURE__ */ React102.createElement(Modal.Footer, null, /* @__PURE__ */ React102.createElement(Modal.Actions, null, secondaryActions && castArray5(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React102.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React102.createElement(Button2.Primary, { key: primaryAction.text, ...omit12(primaryAction, "text") }, primaryAction.text))))
|
|
16298
|
-
)))
|
|
16277
|
+
/* @__PURE__ */ React102.createElement(AriaModal2, { className: styles.dialog() }, /* @__PURE__ */ React102.createElement(AriaDialog3, { className: "flex flex-col grow overflow-y-auto" }, ({ close }) => /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React102.createElement(Button2.Icon, { "aria-label": "Close", icon: import_cross8.default, onClick: close })), headerImage !== void 0 && /* @__PURE__ */ React102.createElement(Modal.HeaderImage, { backgroundImage: headerImage }), /* @__PURE__ */ React102.createElement(
|
|
16278
|
+
Modal.Header,
|
|
16279
|
+
{
|
|
16280
|
+
kind: "dialog",
|
|
16281
|
+
size,
|
|
16282
|
+
className: clsx35({ "pb-3": isComponentType(children, ModalTabs) })
|
|
16283
|
+
},
|
|
16284
|
+
/* @__PURE__ */ React102.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React102.createElement(ModalTitle, { kind: "dialog" }, title), subtitle && /* @__PURE__ */ React102.createElement(Modal.Subtitle, null, subtitle))
|
|
16285
|
+
), hasTabs ? React102.cloneElement(children, { className: "[&>div:first-child]:px-5 grow" }) : /* @__PURE__ */ React102.createElement(Modal.Body, { tabIndex: 0, noFooter: !hasActions, size }, children), hasActions && /* @__PURE__ */ React102.createElement(Modal.Footer, null, /* @__PURE__ */ React102.createElement(Modal.Actions, null, secondaryActions && castArray5(secondaryActions).filter(Boolean).map(({ text, ...action }) => /* @__PURE__ */ React102.createElement(Button2.Secondary, { key: text, ...action }, text)), primaryAction && /* @__PURE__ */ React102.createElement(Button2.Primary, { key: primaryAction.text, ...omit12(primaryAction, "text") }, primaryAction.text))))))
|
|
16299
16286
|
);
|
|
16300
16287
|
};
|
|
16301
16288
|
var ModalTabs = createTabsComponent(
|
|
@@ -16308,7 +16295,7 @@ var ModalTabs = createTabsComponent(
|
|
|
16308
16295
|
);
|
|
16309
16296
|
|
|
16310
16297
|
// src/molecules/MultiInput/MultiInput.tsx
|
|
16311
|
-
import React104, { useEffect as useEffect9, useRef as
|
|
16298
|
+
import React104, { useEffect as useEffect9, useRef as useRef12, useState as useState11 } from "react";
|
|
16312
16299
|
import { useId as useId13 } from "@react-aria/utils";
|
|
16313
16300
|
import { castArray as castArray6, identity, omit as omit13 } from "lodash-es";
|
|
16314
16301
|
|
|
@@ -16390,7 +16377,7 @@ var MultiInputBase = ({
|
|
|
16390
16377
|
valid = true,
|
|
16391
16378
|
...props
|
|
16392
16379
|
}) => {
|
|
16393
|
-
const inputRef =
|
|
16380
|
+
const inputRef = useRef12(null);
|
|
16394
16381
|
const [items, setItems] = useState11(value ?? defaultValue ?? []);
|
|
16395
16382
|
const [hasFocus, setFocus] = useState11(false);
|
|
16396
16383
|
const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
|
|
@@ -16559,7 +16546,7 @@ MultiInput.Skeleton = MultiInputSkeleton;
|
|
|
16559
16546
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
|
16560
16547
|
|
|
16561
16548
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
|
16562
|
-
import React105, { useEffect as useEffect10, useRef as
|
|
16549
|
+
import React105, { useEffect as useEffect10, useRef as useRef13, useState as useState12 } from "react";
|
|
16563
16550
|
import { ariaHideOutside as ariaHideOutside3 } from "@react-aria/overlays";
|
|
16564
16551
|
import { useId as useId14 } from "@react-aria/utils";
|
|
16565
16552
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
|
@@ -16589,10 +16576,10 @@ var MultiSelectBase = ({
|
|
|
16589
16576
|
children,
|
|
16590
16577
|
...props
|
|
16591
16578
|
}) => {
|
|
16592
|
-
const popoverRef =
|
|
16593
|
-
const targetRef =
|
|
16594
|
-
const menuRef =
|
|
16595
|
-
const inputRef =
|
|
16579
|
+
const popoverRef = useRef13(null);
|
|
16580
|
+
const targetRef = useRef13(null);
|
|
16581
|
+
const menuRef = useRef13(null);
|
|
16582
|
+
const inputRef = useRef13(null);
|
|
16596
16583
|
const [inputValue, setInputValue] = useState12("");
|
|
16597
16584
|
const [hasFocus, setFocus] = useState12(false);
|
|
16598
16585
|
const { selectedItems, addSelectedItem, removeSelectedItem, getDropdownProps, getSelectedItemProps } = useMultipleSelection(
|
|
@@ -17309,7 +17296,7 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
|
17309
17296
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
|
17310
17297
|
|
|
17311
17298
|
// src/molecules/Section/Section.tsx
|
|
17312
|
-
import React121, { useRef as
|
|
17299
|
+
import React121, { useRef as useRef14 } from "react";
|
|
17313
17300
|
import { useButton as useButton4 } from "@react-aria/button";
|
|
17314
17301
|
import { useId as useId17 } from "@react-aria/utils";
|
|
17315
17302
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
|
@@ -17491,8 +17478,8 @@ var Section3 = (props) => {
|
|
|
17491
17478
|
const [isCollapsed, setCollapsed] = React121.useState(_collapsed ?? _defaultCollapsed);
|
|
17492
17479
|
const [isResting, setResting] = React121.useState(true);
|
|
17493
17480
|
const [ref, { height }] = useMeasure();
|
|
17494
|
-
const toggleAreaRef =
|
|
17495
|
-
const isMounted =
|
|
17481
|
+
const toggleAreaRef = useRef14(null);
|
|
17482
|
+
const isMounted = useRef14(true);
|
|
17496
17483
|
React121.useEffect(
|
|
17497
17484
|
() => () => {
|
|
17498
17485
|
isMounted.current = false;
|