@aivenio/aquarium 4.5.0 → 4.5.2
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 +4 -4
- package/dist/atoms.mjs +4 -4
- package/dist/src/atoms/Modal/Modal.js +3 -3
- package/dist/src/atoms/PageHeader/PageHeader.js +3 -3
- package/dist/src/molecules/Accordion/Accordion.js +3 -7
- package/dist/src/molecules/Section/Section.js +3 -7
- package/dist/src/molecules/Transition/Transition.js +2 -4
- package/dist/src/utils/stickyStyles.js +48 -18
- package/dist/styles.css +9 -4
- package/dist/system.cjs +87 -71
- package/dist/system.mjs +108 -92
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +2 -6
package/dist/system.cjs
CHANGED
@@ -7356,18 +7356,15 @@ var Transition = ({ children }) => {
|
|
7356
7356
|
keys: (item) => item.key || "",
|
7357
7357
|
config: { tension: 125, friction: 20, precision: 0.1 }
|
7358
7358
|
});
|
7359
|
-
return /* @__PURE__ */ import_react14.default.createElement(import_react14.default.Fragment, null, transitions((style, item) => (
|
7360
|
-
|
7361
|
-
|
7362
|
-
|
7363
|
-
|
7364
|
-
|
7365
|
-
|
7366
|
-
|
7367
|
-
|
7368
|
-
item
|
7369
|
-
))
|
7370
|
-
)));
|
7359
|
+
return /* @__PURE__ */ import_react14.default.createElement(import_react14.default.Fragment, null, transitions((style, item) => /* @__PURE__ */ import_react14.default.createElement(import_web.animated.div, { style }, /* @__PURE__ */ import_react14.default.createElement(
|
7360
|
+
"div",
|
7361
|
+
{
|
7362
|
+
ref: (ref) => {
|
7363
|
+
ref && refMap.set(item, ref);
|
7364
|
+
}
|
7365
|
+
},
|
7366
|
+
item
|
7367
|
+
))));
|
7371
7368
|
};
|
7372
7369
|
|
7373
7370
|
// src/atoms/Toast/Toast.tsx
|
@@ -7846,28 +7843,25 @@ var AccordionToggle = ({ panelId, onChange, ...rest }) => {
|
|
7846
7843
|
}
|
7847
7844
|
});
|
7848
7845
|
const { buttonProps } = (0, import_button.useButton)({ elementType: "div", onPress: handleClick }, ref);
|
7849
|
-
return (
|
7850
|
-
|
7851
|
-
|
7852
|
-
|
7853
|
-
{
|
7854
|
-
...
|
7855
|
-
|
7856
|
-
|
7857
|
-
|
7858
|
-
|
7859
|
-
handleClick();
|
7860
|
-
}
|
7861
|
-
},
|
7862
|
-
ref,
|
7863
|
-
"aria-label": "accordion toggle",
|
7864
|
-
"aria-expanded": openPanelId === id,
|
7865
|
-
"aria-controls": `${id}-content`,
|
7866
|
-
style: { transform },
|
7867
|
-
className: tw("text-default focus:outline-none focusable")
|
7846
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
7847
|
+
import_web3.animated.div,
|
7848
|
+
{
|
7849
|
+
...rest,
|
7850
|
+
...{
|
7851
|
+
...buttonProps,
|
7852
|
+
onPointerDown: (e) => {
|
7853
|
+
e.preventDefault();
|
7854
|
+
handleClick();
|
7855
|
+
}
|
7868
7856
|
},
|
7869
|
-
|
7870
|
-
|
7857
|
+
ref,
|
7858
|
+
"aria-label": "accordion toggle",
|
7859
|
+
"aria-expanded": openPanelId === id,
|
7860
|
+
"aria-controls": `${id}-content`,
|
7861
|
+
style: { transform },
|
7862
|
+
className: tw("text-default focus:outline-none focusable")
|
7863
|
+
},
|
7864
|
+
/* @__PURE__ */ import_react24.default.createElement(import_react25.Icon, { icon: import_caretUp.default, height: 22, width: 22 })
|
7871
7865
|
);
|
7872
7866
|
};
|
7873
7867
|
var AccordionPanel = ({ children, panelId, ...rest }) => {
|
@@ -7883,20 +7877,17 @@ var AccordionPanel = ({ children, panelId, ...rest }) => {
|
|
7883
7877
|
duration: 150
|
7884
7878
|
}
|
7885
7879
|
});
|
7886
|
-
return (
|
7887
|
-
|
7888
|
-
|
7889
|
-
|
7890
|
-
|
7891
|
-
|
7892
|
-
|
7893
|
-
|
7894
|
-
|
7895
|
-
|
7896
|
-
|
7897
|
-
},
|
7898
|
-
/* @__PURE__ */ import_react24.default.createElement("div", { ref }, children)
|
7899
|
-
)
|
7880
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
7881
|
+
import_web3.animated.div,
|
7882
|
+
{
|
7883
|
+
role: "region",
|
7884
|
+
...rest,
|
7885
|
+
id: `${id}-content`,
|
7886
|
+
"aria-labelledby": `${id}-summary`,
|
7887
|
+
"aria-hidden": !isOpen ? "true" : void 0,
|
7888
|
+
style
|
7889
|
+
},
|
7890
|
+
/* @__PURE__ */ import_react24.default.createElement("div", { ref }, children)
|
7900
7891
|
);
|
7901
7892
|
};
|
7902
7893
|
var AccordionUnanimatedPanel = ({ children, panelId }) => {
|
@@ -11011,24 +11002,51 @@ function useStickyStyles(scrollProgress, axis, { borderColor, boxShadowColor })
|
|
11011
11002
|
}
|
11012
11003
|
function useScrollProgress({
|
11013
11004
|
containerRef,
|
11014
|
-
skip
|
11005
|
+
skip,
|
11006
|
+
throttleMs = 50
|
11015
11007
|
}) {
|
11016
11008
|
const [scrollState, setScrollState] = (0, import_react73.useState)(null);
|
11017
|
-
const
|
11018
|
-
|
11019
|
-
|
11020
|
-
|
11021
|
-
|
11022
|
-
|
11023
|
-
|
11024
|
-
|
11025
|
-
|
11026
|
-
|
11027
|
-
|
11028
|
-
|
11029
|
-
|
11030
|
-
|
11031
|
-
|
11009
|
+
const currentStateRef = (0, import_react73.useRef)(null);
|
11010
|
+
const throttledSetScrollState = (0, import_react73.useMemo)(
|
11011
|
+
() => (0, import_lodash_es24.throttle)((value) => {
|
11012
|
+
const currentState = currentStateRef.current;
|
11013
|
+
if (currentState?.scrollX === value.scrollX && currentState.scrollXProgress === value.scrollXProgress) {
|
11014
|
+
return;
|
11015
|
+
}
|
11016
|
+
currentStateRef.current = value;
|
11017
|
+
setScrollState(value);
|
11018
|
+
}, throttleMs),
|
11019
|
+
[throttleMs]
|
11020
|
+
);
|
11021
|
+
const handleScroll = (0, import_react73.useCallback)(() => {
|
11022
|
+
const element = containerRef.current;
|
11023
|
+
if (!element) {
|
11024
|
+
return;
|
11025
|
+
}
|
11026
|
+
const scrollX = element.scrollLeft;
|
11027
|
+
const maxScrollX = element.scrollWidth - element.clientWidth;
|
11028
|
+
const scrollXProgress = maxScrollX > 0 ? scrollX / maxScrollX : 1;
|
11029
|
+
throttledSetScrollState({ scrollX, scrollXProgress });
|
11030
|
+
}, [containerRef, throttledSetScrollState]);
|
11031
|
+
(0, import_react73.useLayoutEffect)(() => {
|
11032
|
+
if (skip) {
|
11033
|
+
return;
|
11034
|
+
}
|
11035
|
+
const element = containerRef.current;
|
11036
|
+
if (!element) {
|
11037
|
+
return;
|
11038
|
+
}
|
11039
|
+
element.addEventListener("scroll", handleScroll, { passive: true });
|
11040
|
+
const resizeObserver = new ResizeObserver(handleScroll);
|
11041
|
+
resizeObserver.observe(element);
|
11042
|
+
handleScroll();
|
11043
|
+
return () => {
|
11044
|
+
element.removeEventListener("scroll", handleScroll);
|
11045
|
+
resizeObserver.disconnect();
|
11046
|
+
throttledSetScrollState.cancel();
|
11047
|
+
};
|
11048
|
+
}, [containerRef, handleScroll, throttledSetScrollState, skip]);
|
11049
|
+
const isContainerUnscrollable = scrollState?.scrollX === 0 && scrollState.scrollXProgress === 1;
|
11032
11050
|
if (!scrollState || isContainerUnscrollable) {
|
11033
11051
|
return null;
|
11034
11052
|
}
|
@@ -15221,8 +15239,8 @@ var modalStyles = (0, import_tailwind_variants13.tv)({
|
|
15221
15239
|
titleContainer: "flex flex-col grow",
|
15222
15240
|
title: "",
|
15223
15241
|
closeButtonContainer: "absolute top-[24px] right-[28px]",
|
15224
|
-
body: "grow overflow-y-auto text-default",
|
15225
|
-
bodyContent: "px-7",
|
15242
|
+
body: "grow overflow-y-auto text-default flex flex-col",
|
15243
|
+
bodyContent: "px-7 grow",
|
15226
15244
|
footer: "px-7 py-6",
|
15227
15245
|
actions: "flex gap-4 justify-end"
|
15228
15246
|
},
|
@@ -16914,7 +16932,7 @@ var import_lodash_es43 = require("lodash-es");
|
|
16914
16932
|
// src/atoms/PageHeader/PageHeader.tsx
|
16915
16933
|
var import_react117 = __toESM(require("react"));
|
16916
16934
|
var PageHeader = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-row flex-wrap gap-4 pb-6"), className), ...rest }, children);
|
16917
|
-
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-col
|
16935
|
+
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-col flex-1 basis-[--aquarium-screens-xs]"), className), ...rest }, children);
|
16918
16936
|
PageHeader.TitleContainer = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-col justify-center gap-2"), className), ...rest }, children);
|
16919
16937
|
PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__ */ import_react117.default.createElement(
|
16920
16938
|
Typography2,
|
@@ -16928,7 +16946,7 @@ PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__
|
|
16928
16946
|
);
|
16929
16947
|
PageHeader.Subtitle = ({ children, ...rest }) => /* @__PURE__ */ import_react117.default.createElement(Typography2.Small, { ...rest, color: "default" }, children);
|
16930
16948
|
PageHeader.Chips = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex gap-3"), className), ...rest }, children);
|
16931
|
-
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-row gap-4 self-start"), className), ...rest }, children);
|
16949
|
+
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */ import_react117.default.createElement("div", { className: classNames(tw("flex flex-row-reverse sm:flex-row gap-4 self-start"), className), ...rest }, children);
|
16932
16950
|
|
16933
16951
|
// src/molecules/PageHeader/PageHeader.tsx
|
16934
16952
|
var import_more5 = __toESM(require_more());
|
@@ -17413,8 +17431,7 @@ var Section3 = (props) => {
|
|
17413
17431
|
id: toggleId,
|
17414
17432
|
collapsible: _collapsible
|
17415
17433
|
},
|
17416
|
-
_collapsible &&
|
17417
|
-
/* @__PURE__ */ import_react130.default.createElement(import_web6.animated.div, { style: { transform } }, /* @__PURE__ */ import_react130.default.createElement(Section2.Toggle, null)),
|
17434
|
+
_collapsible && /* @__PURE__ */ import_react130.default.createElement(import_web6.animated.div, { style: { transform } }, /* @__PURE__ */ import_react130.default.createElement(Section2.Toggle, null)),
|
17418
17435
|
/* @__PURE__ */ import_react130.default.createElement(Section2.Title, { id: titleId }, /* @__PURE__ */ import_react130.default.createElement(LineClamp2, { lines: 1 }, title), props.tag && /* @__PURE__ */ import_react130.default.createElement(TagLabel, { ...props.tag }), props.badge && /* @__PURE__ */ import_react130.default.createElement(Chip2, { text: props.badge }), props.chip && /* @__PURE__ */ import_react130.default.createElement(StatusChip, { ...props.chip })),
|
17419
17436
|
subtitle && /* @__PURE__ */ import_react130.default.createElement(Section2.Subtitle, { className: tw("row-start-2", { "col-start-2": _collapsible }) }, /* @__PURE__ */ import_react130.default.createElement(LineClamp2, { lines: 1 }, subtitle))
|
17420
17437
|
), !isCollapsed && /* @__PURE__ */ import_react130.default.createElement(Section2.Actions, null, props.switch && /* @__PURE__ */ import_react130.default.createElement(Switch2, { ...props.switch }), menu && /* @__PURE__ */ import_react130.default.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ import_react130.default.createElement(
|
@@ -17426,8 +17443,7 @@ var Section3 = (props) => {
|
|
17426
17443
|
},
|
17427
17444
|
/* @__PURE__ */ import_react130.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react130.default.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: import_more6.default })),
|
17428
17445
|
menu
|
17429
|
-
)), props.actions && (0, import_lodash_es46.castArray)(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */ import_react130.default.createElement(SelectBase, { "aria-labelledby": titleId, ...props.select }))), !hasTabs && !isCollapsed &&
|
17430
|
-
/* @__PURE__ */ import_react130.default.createElement(import_web6.animated.div, { className: tw(`h-[1px]`), style: { backgroundColor: "var(--aquarium-border-color-muted)" } })), /* @__PURE__ */ import_react130.default.createElement(
|
17446
|
+
)), props.actions && (0, import_lodash_es46.castArray)(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */ import_react130.default.createElement(SelectBase, { "aria-labelledby": titleId, ...props.select }))), !hasTabs && !isCollapsed && /* @__PURE__ */ import_react130.default.createElement(import_web6.animated.div, { className: tw(`h-[1px]`), style: { backgroundColor: "var(--aquarium-border-color-muted)" } })), /* @__PURE__ */ import_react130.default.createElement(
|
17431
17447
|
import_web6.animated.div,
|
17432
17448
|
{
|
17433
17449
|
id: regionId,
|
package/dist/system.mjs
CHANGED
@@ -7208,18 +7208,15 @@ var Transition = ({ children }) => {
|
|
7208
7208
|
keys: (item) => item.key || "",
|
7209
7209
|
config: { tension: 125, friction: 20, precision: 0.1 }
|
7210
7210
|
});
|
7211
|
-
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, transitions((style, item) => (
|
7212
|
-
|
7213
|
-
|
7214
|
-
|
7215
|
-
|
7216
|
-
|
7217
|
-
|
7218
|
-
|
7219
|
-
|
7220
|
-
item
|
7221
|
-
))
|
7222
|
-
)));
|
7211
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, transitions((style, item) => /* @__PURE__ */ React10.createElement(animated.div, { style }, /* @__PURE__ */ React10.createElement(
|
7212
|
+
"div",
|
7213
|
+
{
|
7214
|
+
ref: (ref) => {
|
7215
|
+
ref && refMap.set(item, ref);
|
7216
|
+
}
|
7217
|
+
},
|
7218
|
+
item
|
7219
|
+
))));
|
7223
7220
|
};
|
7224
7221
|
|
7225
7222
|
// src/atoms/Toast/Toast.tsx
|
@@ -7698,28 +7695,25 @@ var AccordionToggle = ({ panelId, onChange, ...rest }) => {
|
|
7698
7695
|
}
|
7699
7696
|
});
|
7700
7697
|
const { buttonProps } = useButton({ elementType: "div", onPress: handleClick }, ref);
|
7701
|
-
return (
|
7702
|
-
|
7703
|
-
|
7704
|
-
|
7705
|
-
{
|
7706
|
-
...
|
7707
|
-
|
7708
|
-
|
7709
|
-
|
7710
|
-
|
7711
|
-
handleClick();
|
7712
|
-
}
|
7713
|
-
},
|
7714
|
-
ref,
|
7715
|
-
"aria-label": "accordion toggle",
|
7716
|
-
"aria-expanded": openPanelId === id,
|
7717
|
-
"aria-controls": `${id}-content`,
|
7718
|
-
style: { transform },
|
7719
|
-
className: tw("text-default focus:outline-none focusable")
|
7698
|
+
return /* @__PURE__ */ React19.createElement(
|
7699
|
+
animated3.div,
|
7700
|
+
{
|
7701
|
+
...rest,
|
7702
|
+
...{
|
7703
|
+
...buttonProps,
|
7704
|
+
onPointerDown: (e) => {
|
7705
|
+
e.preventDefault();
|
7706
|
+
handleClick();
|
7707
|
+
}
|
7720
7708
|
},
|
7721
|
-
|
7722
|
-
|
7709
|
+
ref,
|
7710
|
+
"aria-label": "accordion toggle",
|
7711
|
+
"aria-expanded": openPanelId === id,
|
7712
|
+
"aria-controls": `${id}-content`,
|
7713
|
+
style: { transform },
|
7714
|
+
className: tw("text-default focus:outline-none focusable")
|
7715
|
+
},
|
7716
|
+
/* @__PURE__ */ React19.createElement(Icon3, { icon: import_caretUp.default, height: 22, width: 22 })
|
7723
7717
|
);
|
7724
7718
|
};
|
7725
7719
|
var AccordionPanel = ({ children, panelId, ...rest }) => {
|
@@ -7735,20 +7729,17 @@ var AccordionPanel = ({ children, panelId, ...rest }) => {
|
|
7735
7729
|
duration: 150
|
7736
7730
|
}
|
7737
7731
|
});
|
7738
|
-
return (
|
7739
|
-
|
7740
|
-
|
7741
|
-
|
7742
|
-
|
7743
|
-
|
7744
|
-
|
7745
|
-
|
7746
|
-
|
7747
|
-
|
7748
|
-
|
7749
|
-
},
|
7750
|
-
/* @__PURE__ */ React19.createElement("div", { ref }, children)
|
7751
|
-
)
|
7732
|
+
return /* @__PURE__ */ React19.createElement(
|
7733
|
+
animated3.div,
|
7734
|
+
{
|
7735
|
+
role: "region",
|
7736
|
+
...rest,
|
7737
|
+
id: `${id}-content`,
|
7738
|
+
"aria-labelledby": `${id}-summary`,
|
7739
|
+
"aria-hidden": !isOpen ? "true" : void 0,
|
7740
|
+
style
|
7741
|
+
},
|
7742
|
+
/* @__PURE__ */ React19.createElement("div", { ref }, children)
|
7752
7743
|
);
|
7753
7744
|
};
|
7754
7745
|
var AccordionUnanimatedPanel = ({ children, panelId }) => {
|
@@ -9951,7 +9942,7 @@ var Container2 = ({ maxWidth = "xl", children }) => /* @__PURE__ */ React56.crea
|
|
9951
9942
|
);
|
9952
9943
|
|
9953
9944
|
// src/molecules/DataList/DataList.tsx
|
9954
|
-
import React76, { useRef as
|
9945
|
+
import React76, { useRef as useRef9 } from "react";
|
9955
9946
|
import { useControlledState } from "@react-stately/utils";
|
9956
9947
|
import { castArray as castArray2, compact, groupBy as groupBy2, isArray as isArray2, isFunction as isFunction3, noop as noop2 } from "lodash-es";
|
9957
9948
|
|
@@ -10819,8 +10810,8 @@ DataList.Toolbar = {
|
|
10819
10810
|
};
|
10820
10811
|
|
10821
10812
|
// src/utils/stickyStyles.tsx
|
10822
|
-
import React65, { useMemo as useMemo3, useState as useState10 } from "react";
|
10823
|
-
import { animated as animated4,
|
10813
|
+
import React65, { useCallback as useCallback2, useLayoutEffect as useLayoutEffect2, useMemo as useMemo3, useRef as useRef8, useState as useState10 } from "react";
|
10814
|
+
import { animated as animated4, useSpring as useSpring3 } from "@react-spring/web";
|
10824
10815
|
import { throttle } from "lodash-es";
|
10825
10816
|
function useStickyStyles(scrollProgress, axis, { borderColor, boxShadowColor }) {
|
10826
10817
|
const { startValue, endValue } = useMemo3(() => {
|
@@ -10867,24 +10858,51 @@ function useStickyStyles(scrollProgress, axis, { borderColor, boxShadowColor })
|
|
10867
10858
|
}
|
10868
10859
|
function useScrollProgress({
|
10869
10860
|
containerRef,
|
10870
|
-
skip
|
10861
|
+
skip,
|
10862
|
+
throttleMs = 50
|
10871
10863
|
}) {
|
10872
10864
|
const [scrollState, setScrollState] = useState10(null);
|
10873
|
-
const
|
10874
|
-
|
10875
|
-
|
10876
|
-
|
10877
|
-
|
10878
|
-
|
10879
|
-
|
10880
|
-
|
10881
|
-
|
10882
|
-
|
10883
|
-
|
10884
|
-
|
10885
|
-
|
10886
|
-
|
10887
|
-
|
10865
|
+
const currentStateRef = useRef8(null);
|
10866
|
+
const throttledSetScrollState = useMemo3(
|
10867
|
+
() => throttle((value) => {
|
10868
|
+
const currentState = currentStateRef.current;
|
10869
|
+
if (currentState?.scrollX === value.scrollX && currentState.scrollXProgress === value.scrollXProgress) {
|
10870
|
+
return;
|
10871
|
+
}
|
10872
|
+
currentStateRef.current = value;
|
10873
|
+
setScrollState(value);
|
10874
|
+
}, throttleMs),
|
10875
|
+
[throttleMs]
|
10876
|
+
);
|
10877
|
+
const handleScroll = useCallback2(() => {
|
10878
|
+
const element = containerRef.current;
|
10879
|
+
if (!element) {
|
10880
|
+
return;
|
10881
|
+
}
|
10882
|
+
const scrollX = element.scrollLeft;
|
10883
|
+
const maxScrollX = element.scrollWidth - element.clientWidth;
|
10884
|
+
const scrollXProgress = maxScrollX > 0 ? scrollX / maxScrollX : 1;
|
10885
|
+
throttledSetScrollState({ scrollX, scrollXProgress });
|
10886
|
+
}, [containerRef, throttledSetScrollState]);
|
10887
|
+
useLayoutEffect2(() => {
|
10888
|
+
if (skip) {
|
10889
|
+
return;
|
10890
|
+
}
|
10891
|
+
const element = containerRef.current;
|
10892
|
+
if (!element) {
|
10893
|
+
return;
|
10894
|
+
}
|
10895
|
+
element.addEventListener("scroll", handleScroll, { passive: true });
|
10896
|
+
const resizeObserver = new ResizeObserver(handleScroll);
|
10897
|
+
resizeObserver.observe(element);
|
10898
|
+
handleScroll();
|
10899
|
+
return () => {
|
10900
|
+
element.removeEventListener("scroll", handleScroll);
|
10901
|
+
resizeObserver.disconnect();
|
10902
|
+
throttledSetScrollState.cancel();
|
10903
|
+
};
|
10904
|
+
}, [containerRef, handleScroll, throttledSetScrollState, skip]);
|
10905
|
+
const isContainerUnscrollable = scrollState?.scrollX === 0 && scrollState.scrollXProgress === 1;
|
10888
10906
|
if (!scrollState || isContainerUnscrollable) {
|
10889
10907
|
return null;
|
10890
10908
|
}
|
@@ -11729,7 +11747,7 @@ var DataList2 = ({
|
|
11729
11747
|
toolbar,
|
11730
11748
|
...rest
|
11731
11749
|
}) => {
|
11732
|
-
const containerRef =
|
11750
|
+
const containerRef = useRef9(null);
|
11733
11751
|
const hasStickyColumns = columns.some((column) => column.sticky);
|
11734
11752
|
const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
|
11735
11753
|
const [selected, setSelected] = useControlledState(
|
@@ -11940,7 +11958,7 @@ DataList2.Skeleton = DataListSkeleton;
|
|
11940
11958
|
DataList2.Toolbar = DataListToolbar;
|
11941
11959
|
|
11942
11960
|
// src/molecules/DataTable/DataTable.tsx
|
11943
|
-
import React79, { useRef as
|
11961
|
+
import React79, { useRef as useRef10 } from "react";
|
11944
11962
|
import classNames10 from "classnames";
|
11945
11963
|
import { compact as compact2, isFunction as isFunction4 } from "lodash-es";
|
11946
11964
|
|
@@ -12000,7 +12018,7 @@ var DataTable = ({
|
|
12000
12018
|
onPrev,
|
12001
12019
|
...rest
|
12002
12020
|
}) => {
|
12003
|
-
const containerRef =
|
12021
|
+
const containerRef = useRef10(null);
|
12004
12022
|
const hasStickyColumns = columns.some((column) => column.sticky);
|
12005
12023
|
const stickyStyles = useScrollStyles({ containerRef, skip: !hasStickyColumns });
|
12006
12024
|
const defaultSortedColumn = columns.find((c) => c.headerName === defaultSort?.headerName);
|
@@ -15122,8 +15140,8 @@ var modalStyles = tv13({
|
|
15122
15140
|
titleContainer: "flex flex-col grow",
|
15123
15141
|
title: "",
|
15124
15142
|
closeButtonContainer: "absolute top-[24px] right-[28px]",
|
15125
|
-
body: "grow overflow-y-auto text-default",
|
15126
|
-
bodyContent: "px-7",
|
15143
|
+
body: "grow overflow-y-auto text-default flex flex-col",
|
15144
|
+
bodyContent: "px-7 grow",
|
15127
15145
|
footer: "px-7 py-6",
|
15128
15146
|
actions: "flex gap-4 justify-end"
|
15129
15147
|
},
|
@@ -15314,7 +15332,7 @@ var ModalTitle = ({ children, ...props }) => {
|
|
15314
15332
|
};
|
15315
15333
|
|
15316
15334
|
// src/molecules/Tabs/Tabs.tsx
|
15317
|
-
import React92, { useEffect as useEffect8, useLayoutEffect as
|
15335
|
+
import React92, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect3, useRef as useRef11, useState as useState11 } from "react";
|
15318
15336
|
import { isNumber as isNumber6, kebabCase } from "lodash-es";
|
15319
15337
|
var import_chevronLeft5 = __toESM(require_chevronLeft());
|
15320
15338
|
var import_chevronRight5 = __toESM(require_chevronRight());
|
@@ -15431,9 +15449,9 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
15431
15449
|
const [selected, setSelected] = useState11(value ?? defaultValue ?? firstTabValue ?? 0);
|
15432
15450
|
const [leftCaret, showLeftCaret] = useState11(false);
|
15433
15451
|
const [rightCaret, showRightCaret] = useState11(false);
|
15434
|
-
const parentRef =
|
15435
|
-
const containerRef =
|
15436
|
-
const tabsRef =
|
15452
|
+
const parentRef = useRef11(null);
|
15453
|
+
const containerRef = useRef11(null);
|
15454
|
+
const tabsRef = useRef11(null);
|
15437
15455
|
const revealSelectedTab = ({ smooth }) => {
|
15438
15456
|
const container = containerRef.current;
|
15439
15457
|
const tabs = tabsRef.current;
|
@@ -15476,7 +15494,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
15476
15494
|
setSelected(value);
|
15477
15495
|
revealSelectedTab({ smooth: value !== selected });
|
15478
15496
|
}, [value, React92.Children.count(children)]);
|
15479
|
-
|
15497
|
+
useLayoutEffect3(() => {
|
15480
15498
|
updateCarets();
|
15481
15499
|
containerRef.current?.addEventListener("scroll", updateCarets);
|
15482
15500
|
window.addEventListener("resize", updateCarets);
|
@@ -16127,7 +16145,7 @@ var ModalTabs = createTabsComponent(
|
|
16127
16145
|
);
|
16128
16146
|
|
16129
16147
|
// src/molecules/MultiInput/MultiInput.tsx
|
16130
|
-
import React103, { useEffect as useEffect9, useRef as
|
16148
|
+
import React103, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
|
16131
16149
|
import { useId as useId13 } from "@react-aria/utils";
|
16132
16150
|
import { castArray as castArray5, identity, omit as omit13 } from "lodash-es";
|
16133
16151
|
|
@@ -16208,7 +16226,7 @@ var MultiInputBase = ({
|
|
16208
16226
|
valid = true,
|
16209
16227
|
...props
|
16210
16228
|
}) => {
|
16211
|
-
const inputRef =
|
16229
|
+
const inputRef = useRef12(null);
|
16212
16230
|
const [items, setItems] = useState12(value ?? defaultValue ?? []);
|
16213
16231
|
const [hasFocus, setFocus] = useState12(false);
|
16214
16232
|
const keyCodes = [delimiter !== "enter" ? " " : null, delimiter !== "space" ? "Enter" : null].filter(identity);
|
@@ -16377,7 +16395,7 @@ MultiInput.Skeleton = MultiInputSkeleton;
|
|
16377
16395
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
16378
16396
|
|
16379
16397
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
16380
|
-
import React104, { useEffect as useEffect10, useRef as
|
16398
|
+
import React104, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
|
16381
16399
|
import { ariaHideOutside as ariaHideOutside3 } from "@react-aria/overlays";
|
16382
16400
|
import { useId as useId14 } from "@react-aria/utils";
|
16383
16401
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
@@ -16407,10 +16425,10 @@ var MultiSelectBase = ({
|
|
16407
16425
|
children,
|
16408
16426
|
...props
|
16409
16427
|
}) => {
|
16410
|
-
const popoverRef =
|
16411
|
-
const targetRef =
|
16412
|
-
const menuRef =
|
16413
|
-
const inputRef =
|
16428
|
+
const popoverRef = useRef13(null);
|
16429
|
+
const targetRef = useRef13(null);
|
16430
|
+
const menuRef = useRef13(null);
|
16431
|
+
const inputRef = useRef13(null);
|
16414
16432
|
const [inputValue, setInputValue] = useState13("");
|
16415
16433
|
const [hasFocus, setFocus] = useState13(false);
|
16416
16434
|
const { selectedItems, addSelectedItem, removeSelectedItem, getDropdownProps, getSelectedItemProps } = useMultipleSelection(
|
@@ -16820,7 +16838,7 @@ import { castArray as castArray6 } from "lodash-es";
|
|
16820
16838
|
// src/atoms/PageHeader/PageHeader.tsx
|
16821
16839
|
import React108 from "react";
|
16822
16840
|
var PageHeader = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-row flex-wrap gap-4 pb-6"), className), ...rest }, children);
|
16823
|
-
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-col
|
16841
|
+
PageHeader.Container = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-col flex-1 basis-[--aquarium-screens-xs]"), className), ...rest }, children);
|
16824
16842
|
PageHeader.TitleContainer = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-col justify-center gap-2"), className), ...rest }, children);
|
16825
16843
|
PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__ */ React108.createElement(
|
16826
16844
|
Typography2,
|
@@ -16834,7 +16852,7 @@ PageHeader.Title = ({ isSubHeader = false, children, ...rest }) => /* @__PURE__
|
|
16834
16852
|
);
|
16835
16853
|
PageHeader.Subtitle = ({ children, ...rest }) => /* @__PURE__ */ React108.createElement(Typography2.Small, { ...rest, color: "default" }, children);
|
16836
16854
|
PageHeader.Chips = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex gap-3"), className), ...rest }, children);
|
16837
|
-
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-row gap-4 self-start"), className), ...rest }, children);
|
16855
|
+
PageHeader.Actions = ({ children, className, ...rest }) => /* @__PURE__ */ React108.createElement("div", { className: classNames(tw("flex flex-row-reverse sm:flex-row gap-4 self-start"), className), ...rest }, children);
|
16838
16856
|
|
16839
16857
|
// src/molecules/PageHeader/PageHeader.tsx
|
16840
16858
|
var import_more5 = __toESM(require_more());
|
@@ -17088,7 +17106,7 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
17088
17106
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
17089
17107
|
|
17090
17108
|
// src/molecules/Section/Section.tsx
|
17091
|
-
import React120, { useRef as
|
17109
|
+
import React120, { useRef as useRef14 } from "react";
|
17092
17110
|
import { useButton as useButton4 } from "@react-aria/button";
|
17093
17111
|
import { useId as useId17 } from "@react-aria/utils";
|
17094
17112
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
@@ -17259,8 +17277,8 @@ var Section3 = (props) => {
|
|
17259
17277
|
const [isCollapsed, setCollapsed] = React120.useState(_collapsed ?? _defaultCollapsed);
|
17260
17278
|
const [isResting, setResting] = React120.useState(true);
|
17261
17279
|
const [ref, { height }] = useMeasure();
|
17262
|
-
const toggleAreaRef =
|
17263
|
-
const isMounted =
|
17280
|
+
const toggleAreaRef = useRef14(null);
|
17281
|
+
const isMounted = useRef14(true);
|
17264
17282
|
React120.useEffect(
|
17265
17283
|
() => () => {
|
17266
17284
|
isMounted.current = false;
|
@@ -17319,8 +17337,7 @@ var Section3 = (props) => {
|
|
17319
17337
|
id: toggleId,
|
17320
17338
|
collapsible: _collapsible
|
17321
17339
|
},
|
17322
|
-
_collapsible &&
|
17323
|
-
/* @__PURE__ */ React120.createElement(animated6.div, { style: { transform } }, /* @__PURE__ */ React120.createElement(Section2.Toggle, null)),
|
17340
|
+
_collapsible && /* @__PURE__ */ React120.createElement(animated6.div, { style: { transform } }, /* @__PURE__ */ React120.createElement(Section2.Toggle, null)),
|
17324
17341
|
/* @__PURE__ */ React120.createElement(Section2.Title, { id: titleId }, /* @__PURE__ */ React120.createElement(LineClamp2, { lines: 1 }, title), props.tag && /* @__PURE__ */ React120.createElement(TagLabel, { ...props.tag }), props.badge && /* @__PURE__ */ React120.createElement(Chip2, { text: props.badge }), props.chip && /* @__PURE__ */ React120.createElement(StatusChip, { ...props.chip })),
|
17325
17342
|
subtitle && /* @__PURE__ */ React120.createElement(Section2.Subtitle, { className: tw("row-start-2", { "col-start-2": _collapsible }) }, /* @__PURE__ */ React120.createElement(LineClamp2, { lines: 1 }, subtitle))
|
17326
17343
|
), !isCollapsed && /* @__PURE__ */ React120.createElement(Section2.Actions, null, props.switch && /* @__PURE__ */ React120.createElement(Switch2, { ...props.switch }), menu && /* @__PURE__ */ React120.createElement(Box.Flex, { alignItems: "center" }, /* @__PURE__ */ React120.createElement(
|
@@ -17332,8 +17349,7 @@ var Section3 = (props) => {
|
|
17332
17349
|
},
|
17333
17350
|
/* @__PURE__ */ React120.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React120.createElement(Button2.Icon, { "aria-label": menuAriaLabel, icon: import_more6.default })),
|
17334
17351
|
menu
|
17335
|
-
)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */ React120.createElement(SelectBase, { "aria-labelledby": titleId, ...props.select }))), !hasTabs && !isCollapsed &&
|
17336
|
-
/* @__PURE__ */ React120.createElement(animated6.div, { className: tw(`h-[1px]`), style: { backgroundColor: "var(--aquarium-border-color-muted)" } })), /* @__PURE__ */ React120.createElement(
|
17352
|
+
)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.select && /* @__PURE__ */ React120.createElement(SelectBase, { "aria-labelledby": titleId, ...props.select }))), !hasTabs && !isCollapsed && /* @__PURE__ */ React120.createElement(animated6.div, { className: tw(`h-[1px]`), style: { backgroundColor: "var(--aquarium-border-color-muted)" } })), /* @__PURE__ */ React120.createElement(
|
17337
17353
|
animated6.div,
|
17338
17354
|
{
|
17339
17355
|
id: regionId,
|