@uniformdev/design-system 19.29.0 → 19.29.1-alpha.19
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/esm/index.js +249 -204
- package/dist/index.d.ts +28 -11
- package/dist/index.js +520 -473
- package/package.json +7 -6
package/dist/esm/index.js
CHANGED
|
@@ -12543,7 +12543,8 @@ var Details = ({
|
|
|
12543
12543
|
};
|
|
12544
12544
|
|
|
12545
12545
|
// src/components/Drawer/Drawer.tsx
|
|
12546
|
-
import
|
|
12546
|
+
import React11, { createContext as createContext4, useContext as useContext5, useEffect as useEffect5, useRef as useRef3, useState as useState5 } from "react";
|
|
12547
|
+
import { createPortal } from "react-dom";
|
|
12547
12548
|
import { CgChevronRight } from "react-icons/cg";
|
|
12548
12549
|
|
|
12549
12550
|
// src/components/Drawer/Drawer.styles.ts
|
|
@@ -12654,9 +12655,10 @@ var drawerWrapperOverlayStyles = css39`
|
|
|
12654
12655
|
`;
|
|
12655
12656
|
|
|
12656
12657
|
// src/components/Drawer/DrawerProvider.tsx
|
|
12657
|
-
import { createContext as createContext3, useCallback, useContext as useContext4, useState as useState4 } from "react";
|
|
12658
|
+
import { createContext as createContext3, useCallback, useContext as useContext4, useRef as useRef2, useState as useState4 } from "react";
|
|
12658
12659
|
import { jsx as jsx39 } from "@emotion/react/jsx-runtime";
|
|
12659
12660
|
var DrawerContext = createContext3({
|
|
12661
|
+
providerId: "",
|
|
12660
12662
|
drawersRegistry: [],
|
|
12661
12663
|
registerDrawer: () => {
|
|
12662
12664
|
},
|
|
@@ -12665,6 +12667,7 @@ var DrawerContext = createContext3({
|
|
|
12665
12667
|
});
|
|
12666
12668
|
var DrawerProvider = ({ children }) => {
|
|
12667
12669
|
const [drawersRegistry, setDrawersRegistry] = useState4([]);
|
|
12670
|
+
const providerId = useRef2(crypto.randomUUID());
|
|
12668
12671
|
useShortcut({
|
|
12669
12672
|
handler: () => {
|
|
12670
12673
|
var _a, _b;
|
|
@@ -12675,20 +12678,27 @@ var DrawerProvider = ({ children }) => {
|
|
|
12675
12678
|
const registerDrawer = useCallback(
|
|
12676
12679
|
({ drawer, onFirstRender }) => {
|
|
12677
12680
|
setDrawersRegistry((currentValue) => {
|
|
12678
|
-
var _a;
|
|
12681
|
+
var _a, _b;
|
|
12679
12682
|
const alreadyRegisteredDrawerIndex = currentValue.findIndex((d) => isEqualDrawer(d, drawer));
|
|
12680
12683
|
const alreadyRegisteredDrawer = currentValue[alreadyRegisteredDrawerIndex];
|
|
12681
12684
|
const isFirstRender = !alreadyRegisteredDrawer;
|
|
12682
|
-
if (isFirstRender) {
|
|
12683
|
-
onFirstRender == null ? void 0 : onFirstRender();
|
|
12684
|
-
}
|
|
12685
12685
|
const shouldReplaceCurrent = alreadyRegisteredDrawer !== void 0 && !isEqualDrawerInstance(alreadyRegisteredDrawer, drawer);
|
|
12686
|
+
const newDrawersRegistry = [...currentValue];
|
|
12686
12687
|
if (shouldReplaceCurrent) {
|
|
12687
12688
|
(_a = alreadyRegisteredDrawer.onRequestClose) == null ? void 0 : _a.call(alreadyRegisteredDrawer);
|
|
12689
|
+
newDrawersRegistry.splice(alreadyRegisteredDrawerIndex, 1);
|
|
12688
12690
|
}
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12691
|
+
if (isFirstRender || shouldReplaceCurrent) {
|
|
12692
|
+
onFirstRender == null ? void 0 : onFirstRender();
|
|
12693
|
+
}
|
|
12694
|
+
newDrawersRegistry.push({
|
|
12695
|
+
registeredAt: (_b = alreadyRegisteredDrawer == null ? void 0 : alreadyRegisteredDrawer.registeredAt) != null ? _b : Date.now(),
|
|
12696
|
+
...drawer
|
|
12697
|
+
});
|
|
12698
|
+
newDrawersRegistry.sort((a, b) => {
|
|
12699
|
+
var _a2, _b2;
|
|
12700
|
+
return ((_a2 = a.registeredAt) != null ? _a2 : 0) - ((_b2 = b.registeredAt) != null ? _b2 : 0);
|
|
12701
|
+
});
|
|
12692
12702
|
return newDrawersRegistry;
|
|
12693
12703
|
});
|
|
12694
12704
|
},
|
|
@@ -12704,7 +12714,18 @@ var DrawerProvider = ({ children }) => {
|
|
|
12704
12714
|
},
|
|
12705
12715
|
[setDrawersRegistry]
|
|
12706
12716
|
);
|
|
12707
|
-
return /* @__PURE__ */ jsx39(
|
|
12717
|
+
return /* @__PURE__ */ jsx39(
|
|
12718
|
+
DrawerContext.Provider,
|
|
12719
|
+
{
|
|
12720
|
+
value: {
|
|
12721
|
+
drawersRegistry,
|
|
12722
|
+
registerDrawer,
|
|
12723
|
+
unregisterDrawer,
|
|
12724
|
+
providerId: providerId.current
|
|
12725
|
+
},
|
|
12726
|
+
children
|
|
12727
|
+
}
|
|
12728
|
+
);
|
|
12708
12729
|
};
|
|
12709
12730
|
var useDrawer = () => {
|
|
12710
12731
|
return useContext4(DrawerContext);
|
|
@@ -12723,102 +12744,20 @@ function isEqualDrawerInstance(a, b) {
|
|
|
12723
12744
|
return isEqualDrawer(a, b) && a.instanceKey === b.instanceKey;
|
|
12724
12745
|
}
|
|
12725
12746
|
|
|
12726
|
-
// src/components/Drawer/DrawerRenderer.tsx
|
|
12727
|
-
import { createContext as createContext4, useContext as useContext5 } from "react";
|
|
12728
|
-
import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
12729
|
-
var maxLayeringInPx = 64;
|
|
12730
|
-
var idealDistanceBetweenLayersInPx = 16;
|
|
12731
|
-
var CurrentDrawerRendererContext = createContext4({});
|
|
12732
|
-
var useCurrentDrawerRenderer = () => {
|
|
12733
|
-
return useContext5(CurrentDrawerRendererContext);
|
|
12734
|
-
};
|
|
12735
|
-
var DrawerRenderer = ({
|
|
12736
|
-
stackId,
|
|
12737
|
-
position = "absolute",
|
|
12738
|
-
width = "medium",
|
|
12739
|
-
minWidth = "0",
|
|
12740
|
-
maxWidth = "100%",
|
|
12741
|
-
leftAligned = false,
|
|
12742
|
-
...otherProps
|
|
12743
|
-
}) => {
|
|
12744
|
-
const { drawersRegistry } = useDrawer();
|
|
12745
|
-
const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
|
|
12746
|
-
const drawerWidth = {
|
|
12747
|
-
narrow: "29rem",
|
|
12748
|
-
medium: "43rem",
|
|
12749
|
-
wide: "57rem"
|
|
12750
|
-
};
|
|
12751
|
-
if (drawersToRender.length === 0) {
|
|
12752
|
-
return null;
|
|
12753
|
-
}
|
|
12754
|
-
return /* @__PURE__ */ jsx40(CurrentDrawerRendererContext.Provider, { value: { stackId, leftAligned }, children: /* @__PURE__ */ jsx40(
|
|
12755
|
-
"div",
|
|
12756
|
-
{
|
|
12757
|
-
css: [
|
|
12758
|
-
drawerRendererStyles,
|
|
12759
|
-
{ position },
|
|
12760
|
-
position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
|
|
12761
|
-
],
|
|
12762
|
-
...otherProps,
|
|
12763
|
-
children: drawersToRender.map(({ component, id, stackId: stackId2, onRequestClose }, index) => {
|
|
12764
|
-
var _a;
|
|
12765
|
-
return /* @__PURE__ */ jsx40(
|
|
12766
|
-
DrawerWrapper,
|
|
12767
|
-
{
|
|
12768
|
-
index,
|
|
12769
|
-
totalDrawers: drawersToRender.length,
|
|
12770
|
-
width: (_a = drawerWidth[width]) != null ? _a : width,
|
|
12771
|
-
minWidth,
|
|
12772
|
-
maxWidth,
|
|
12773
|
-
onOverlayClick: onRequestClose,
|
|
12774
|
-
leftAligned,
|
|
12775
|
-
children: component
|
|
12776
|
-
},
|
|
12777
|
-
`${stackId2}-${id}`
|
|
12778
|
-
);
|
|
12779
|
-
})
|
|
12780
|
-
}
|
|
12781
|
-
) });
|
|
12782
|
-
};
|
|
12783
|
-
var DrawerWrapper = ({
|
|
12784
|
-
index,
|
|
12785
|
-
totalDrawers,
|
|
12786
|
-
width,
|
|
12787
|
-
minWidth,
|
|
12788
|
-
maxWidth,
|
|
12789
|
-
leftAligned,
|
|
12790
|
-
onOverlayClick,
|
|
12791
|
-
children
|
|
12792
|
-
}) => {
|
|
12793
|
-
let offsetInPx = idealDistanceBetweenLayersInPx * index;
|
|
12794
|
-
if (totalDrawers * idealDistanceBetweenLayersInPx > maxLayeringInPx) {
|
|
12795
|
-
const relativeLevel = index === 0 ? 0 : index / totalDrawers;
|
|
12796
|
-
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
12797
|
-
}
|
|
12798
|
-
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
12799
|
-
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
12800
|
-
/* @__PURE__ */ jsx40("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
12801
|
-
/* @__PURE__ */ jsx40(
|
|
12802
|
-
"div",
|
|
12803
|
-
{
|
|
12804
|
-
css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
|
|
12805
|
-
style: { width: calculatedWidth, minWidth, maxWidth },
|
|
12806
|
-
children
|
|
12807
|
-
}
|
|
12808
|
-
)
|
|
12809
|
-
] });
|
|
12810
|
-
};
|
|
12811
|
-
|
|
12812
12747
|
// src/components/Drawer/Drawer.tsx
|
|
12813
|
-
import { jsx as
|
|
12748
|
+
import { jsx as jsx40, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
|
|
12814
12749
|
var defaultSackId = "_default";
|
|
12815
|
-
var
|
|
12750
|
+
var CurrentDrawerContext = createContext4({});
|
|
12751
|
+
var useCurrentDrawer = () => {
|
|
12752
|
+
return useContext5(CurrentDrawerContext);
|
|
12753
|
+
};
|
|
12754
|
+
var Drawer = React11.forwardRef(
|
|
12816
12755
|
({ width, minWidth, maxWidth, position, leftAligned, ...drawerProps }, ref) => {
|
|
12817
|
-
const { stackId: inheritedStackId } =
|
|
12756
|
+
const { stackId: inheritedStackId } = useCurrentDrawer();
|
|
12818
12757
|
const drawerRendererProps = { width, minWidth, maxWidth, position, leftAligned };
|
|
12819
|
-
return
|
|
12820
|
-
/* @__PURE__ */
|
|
12821
|
-
/* @__PURE__ */
|
|
12758
|
+
return drawerProps.stackId ? /* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps }) : inheritedStackId ? /* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps, stackId: inheritedStackId }) : /* @__PURE__ */ jsxs22(DrawerProvider, { children: [
|
|
12759
|
+
/* @__PURE__ */ jsx40(DrawerInner, { ref, ...drawerProps }),
|
|
12760
|
+
/* @__PURE__ */ jsx40(DrawerRenderer, { stackId: defaultSackId, ...drawerRendererProps })
|
|
12822
12761
|
] });
|
|
12823
12762
|
}
|
|
12824
12763
|
);
|
|
@@ -12831,13 +12770,40 @@ var DrawerInner = ({
|
|
|
12831
12770
|
header,
|
|
12832
12771
|
instanceKey,
|
|
12833
12772
|
onRequestClose,
|
|
12773
|
+
leftAligned,
|
|
12834
12774
|
testId = "side-dialog"
|
|
12835
12775
|
}) => {
|
|
12836
|
-
const { registerDrawer, unregisterDrawer } = useDrawer();
|
|
12837
|
-
const closeButtonRef =
|
|
12838
|
-
const
|
|
12839
|
-
|
|
12840
|
-
|
|
12776
|
+
const { registerDrawer, unregisterDrawer, providerId } = useDrawer();
|
|
12777
|
+
const closeButtonRef = useRef3(null);
|
|
12778
|
+
const [rendererElement, setRendererElement] = useState5(null);
|
|
12779
|
+
useEffect5(() => {
|
|
12780
|
+
registerDrawer({
|
|
12781
|
+
drawer: {
|
|
12782
|
+
id,
|
|
12783
|
+
stackId,
|
|
12784
|
+
onRequestClose,
|
|
12785
|
+
instanceKey
|
|
12786
|
+
},
|
|
12787
|
+
onFirstRender: () => {
|
|
12788
|
+
setTimeout(() => {
|
|
12789
|
+
var _a, _b;
|
|
12790
|
+
setRendererElement(findDrawerRenderer({ providerId, stackId, id }));
|
|
12791
|
+
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
12792
|
+
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
12793
|
+
}
|
|
12794
|
+
}, 0);
|
|
12795
|
+
}
|
|
12796
|
+
});
|
|
12797
|
+
return () => {
|
|
12798
|
+
unregisterDrawer({ id, stackId, instanceKey });
|
|
12799
|
+
};
|
|
12800
|
+
}, [id, stackId, instanceKey, providerId, registerDrawer, unregisterDrawer]);
|
|
12801
|
+
if (!rendererElement) {
|
|
12802
|
+
return null;
|
|
12803
|
+
}
|
|
12804
|
+
const headerId = `dialog-header-${providerId}-${stackId}-${id}`;
|
|
12805
|
+
return /* @__PURE__ */ jsx40(CurrentDrawerContext.Provider, { value: { id, stackId, leftAligned }, children: createPortal(
|
|
12806
|
+
/* @__PURE__ */ jsxs22(
|
|
12841
12807
|
"div",
|
|
12842
12808
|
{
|
|
12843
12809
|
ref,
|
|
@@ -12848,9 +12814,9 @@ var DrawerInner = ({
|
|
|
12848
12814
|
css: drawerStyles(bgColor),
|
|
12849
12815
|
"data-test-id": testId,
|
|
12850
12816
|
children: [
|
|
12851
|
-
/* @__PURE__ */
|
|
12852
|
-
header ? /* @__PURE__ */
|
|
12853
|
-
/* @__PURE__ */
|
|
12817
|
+
/* @__PURE__ */ jsxs22("div", { css: headerWrapperStyles, children: [
|
|
12818
|
+
header ? /* @__PURE__ */ jsx40("div", { id: headerId, css: drawerHeaderStyles, children: header }) : null,
|
|
12819
|
+
/* @__PURE__ */ jsx40(
|
|
12854
12820
|
Button,
|
|
12855
12821
|
{
|
|
12856
12822
|
ref: closeButtonRef,
|
|
@@ -12859,7 +12825,7 @@ var DrawerInner = ({
|
|
|
12859
12825
|
css: drawerCloseButtonStyles,
|
|
12860
12826
|
title: "Close dialog",
|
|
12861
12827
|
buttonType: "ghost",
|
|
12862
|
-
children: /* @__PURE__ */
|
|
12828
|
+
children: /* @__PURE__ */ jsx40(
|
|
12863
12829
|
Icon,
|
|
12864
12830
|
{
|
|
12865
12831
|
icon: CgChevronRight,
|
|
@@ -12871,34 +12837,17 @@ var DrawerInner = ({
|
|
|
12871
12837
|
}
|
|
12872
12838
|
)
|
|
12873
12839
|
] }),
|
|
12874
|
-
/* @__PURE__ */
|
|
12840
|
+
/* @__PURE__ */ jsx40("div", { css: drawerInnerStyles, children })
|
|
12875
12841
|
]
|
|
12876
12842
|
}
|
|
12877
|
-
)
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
onRequestClose,
|
|
12886
|
-
instanceKey
|
|
12887
|
-
},
|
|
12888
|
-
onFirstRender: () => {
|
|
12889
|
-
setTimeout(() => {
|
|
12890
|
-
var _a, _b;
|
|
12891
|
-
if (ref && "current" in ref && !((_a = ref.current) == null ? void 0 : _a.contains(document.activeElement))) {
|
|
12892
|
-
(_b = closeButtonRef.current) == null ? void 0 : _b.focus({ preventScroll: true });
|
|
12893
|
-
}
|
|
12894
|
-
}, 0);
|
|
12895
|
-
}
|
|
12896
|
-
});
|
|
12897
|
-
}, [component, instanceKey, registerDrawer]);
|
|
12898
|
-
useEffect5(() => {
|
|
12899
|
-
return () => unregisterDrawer({ id, stackId, instanceKey });
|
|
12900
|
-
}, [id, stackId, instanceKey, unregisterDrawer]);
|
|
12901
|
-
return null;
|
|
12843
|
+
),
|
|
12844
|
+
rendererElement
|
|
12845
|
+
) });
|
|
12846
|
+
};
|
|
12847
|
+
var findDrawerRenderer = (params) => {
|
|
12848
|
+
return document.querySelector(
|
|
12849
|
+
Object.entries(getDrawerAttributes(params)).map(([key, value]) => `[${key}="${value}"]`).join("")
|
|
12850
|
+
);
|
|
12902
12851
|
};
|
|
12903
12852
|
|
|
12904
12853
|
// src/components/Drawer/DrawerContent.styles.ts
|
|
@@ -12925,13 +12874,107 @@ var DrawerContentBtnGroup = css40`
|
|
|
12925
12874
|
`;
|
|
12926
12875
|
|
|
12927
12876
|
// src/components/Drawer/DrawerContent.tsx
|
|
12928
|
-
import { jsx as
|
|
12877
|
+
import { jsx as jsx41, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
|
|
12929
12878
|
var DrawerContent2 = ({ children, buttonGroup, ...props }) => {
|
|
12930
|
-
return /* @__PURE__ */
|
|
12931
|
-
/* @__PURE__ */
|
|
12932
|
-
buttonGroup ? /* @__PURE__ */
|
|
12879
|
+
return /* @__PURE__ */ jsxs23("div", { css: DrawerContent, ...props, children: [
|
|
12880
|
+
/* @__PURE__ */ jsx41("div", { css: DrawerContentInner, children }),
|
|
12881
|
+
buttonGroup ? /* @__PURE__ */ jsx41("div", { css: DrawerContentBtnGroup, children: buttonGroup }) : null
|
|
12882
|
+
] });
|
|
12883
|
+
};
|
|
12884
|
+
|
|
12885
|
+
// src/components/Drawer/DrawerRenderer.tsx
|
|
12886
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
|
|
12887
|
+
var maxLayeringInPx = 64;
|
|
12888
|
+
var idealDistanceBetweenLayersInPx = 16;
|
|
12889
|
+
var DrawerRenderer = ({
|
|
12890
|
+
stackId,
|
|
12891
|
+
position = "absolute",
|
|
12892
|
+
width = "medium",
|
|
12893
|
+
minWidth = "0",
|
|
12894
|
+
maxWidth = "100%",
|
|
12895
|
+
leftAligned = false,
|
|
12896
|
+
...otherProps
|
|
12897
|
+
}) => {
|
|
12898
|
+
const { drawersRegistry, providerId } = useDrawer();
|
|
12899
|
+
const drawersToRender = drawersRegistry.filter(({ stackId: sId }) => sId === stackId);
|
|
12900
|
+
const drawerWidth = {
|
|
12901
|
+
narrow: "29rem",
|
|
12902
|
+
medium: "43rem",
|
|
12903
|
+
wide: "57rem"
|
|
12904
|
+
};
|
|
12905
|
+
if (drawersToRender.length === 0) {
|
|
12906
|
+
return null;
|
|
12907
|
+
}
|
|
12908
|
+
return /* @__PURE__ */ jsx42(
|
|
12909
|
+
"div",
|
|
12910
|
+
{
|
|
12911
|
+
css: [
|
|
12912
|
+
drawerRendererStyles,
|
|
12913
|
+
{ position },
|
|
12914
|
+
position === "sticky" ? { height: "100%", marginTop: "-100%" } : void 0
|
|
12915
|
+
],
|
|
12916
|
+
...otherProps,
|
|
12917
|
+
children: drawersToRender.map(({ id, stackId: stackId2, onRequestClose }, index) => {
|
|
12918
|
+
var _a;
|
|
12919
|
+
return /* @__PURE__ */ jsx42(
|
|
12920
|
+
DrawerWrapper,
|
|
12921
|
+
{
|
|
12922
|
+
index,
|
|
12923
|
+
totalDrawers: drawersToRender.length,
|
|
12924
|
+
width: (_a = drawerWidth[width]) != null ? _a : width,
|
|
12925
|
+
minWidth,
|
|
12926
|
+
maxWidth,
|
|
12927
|
+
onOverlayClick: onRequestClose,
|
|
12928
|
+
leftAligned,
|
|
12929
|
+
children: /* @__PURE__ */ jsx42(
|
|
12930
|
+
"div",
|
|
12931
|
+
{
|
|
12932
|
+
...getDrawerAttributes({ providerId, stackId: stackId2, id }),
|
|
12933
|
+
style: { width: "100%", height: "100%" }
|
|
12934
|
+
}
|
|
12935
|
+
)
|
|
12936
|
+
},
|
|
12937
|
+
`${stackId2}-${id}`
|
|
12938
|
+
);
|
|
12939
|
+
})
|
|
12940
|
+
}
|
|
12941
|
+
);
|
|
12942
|
+
};
|
|
12943
|
+
var DrawerWrapper = ({
|
|
12944
|
+
index,
|
|
12945
|
+
totalDrawers,
|
|
12946
|
+
width,
|
|
12947
|
+
minWidth,
|
|
12948
|
+
maxWidth,
|
|
12949
|
+
leftAligned,
|
|
12950
|
+
onOverlayClick,
|
|
12951
|
+
children
|
|
12952
|
+
}) => {
|
|
12953
|
+
let offsetInPx = idealDistanceBetweenLayersInPx * index;
|
|
12954
|
+
if (totalDrawers * idealDistanceBetweenLayersInPx > maxLayeringInPx) {
|
|
12955
|
+
const relativeLevel = index === 0 ? 0 : index / totalDrawers;
|
|
12956
|
+
offsetInPx = Math.round(maxLayeringInPx * relativeLevel);
|
|
12957
|
+
}
|
|
12958
|
+
const calculatedWidth = `calc(${width} - ${offsetInPx}px)`;
|
|
12959
|
+
return /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
12960
|
+
/* @__PURE__ */ jsx42("div", { css: drawerWrapperOverlayStyles, onClick: onOverlayClick }),
|
|
12961
|
+
/* @__PURE__ */ jsx42(
|
|
12962
|
+
"div",
|
|
12963
|
+
{
|
|
12964
|
+
css: [drawerWrapperStyles, leftAligned ? drawerWrapperLeftAlignedStyles : null],
|
|
12965
|
+
style: { width: calculatedWidth, minWidth, maxWidth },
|
|
12966
|
+
children
|
|
12967
|
+
}
|
|
12968
|
+
)
|
|
12933
12969
|
] });
|
|
12934
12970
|
};
|
|
12971
|
+
var getDrawerAttributes = ({
|
|
12972
|
+
providerId,
|
|
12973
|
+
stackId,
|
|
12974
|
+
id
|
|
12975
|
+
}) => {
|
|
12976
|
+
return { "data-drawer-id": `${providerId}-${stackId}-${id}` };
|
|
12977
|
+
};
|
|
12935
12978
|
|
|
12936
12979
|
// src/components/Input/styles/CaptionText.styles.ts
|
|
12937
12980
|
import { css as css41 } from "@emotion/react";
|
|
@@ -13066,7 +13109,7 @@ var ErrorMessage = ({ message, testId, ...otherProps }) => {
|
|
|
13066
13109
|
};
|
|
13067
13110
|
|
|
13068
13111
|
// src/components/Input/Fieldset.tsx
|
|
13069
|
-
import * as
|
|
13112
|
+
import * as React12 from "react";
|
|
13070
13113
|
|
|
13071
13114
|
// src/components/Input/styles/Fieldset.styles.ts
|
|
13072
13115
|
import { css as css44 } from "@emotion/react";
|
|
@@ -13110,7 +13153,7 @@ var fieldsetBody = css44`
|
|
|
13110
13153
|
|
|
13111
13154
|
// src/components/Input/Fieldset.tsx
|
|
13112
13155
|
import { jsx as jsx46, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
|
|
13113
|
-
var Fieldset =
|
|
13156
|
+
var Fieldset = React12.forwardRef(
|
|
13114
13157
|
({ legend, disabled, children, invert, ...props }, ref) => {
|
|
13115
13158
|
return /* @__PURE__ */ jsxs27("fieldset", { css: fieldsetContainer(Boolean(invert)), ref, disabled, ...props, children: [
|
|
13116
13159
|
legend,
|
|
@@ -13147,7 +13190,7 @@ var InfoMessage = ({ message, testId, ...props }) => {
|
|
|
13147
13190
|
};
|
|
13148
13191
|
|
|
13149
13192
|
// src/components/Input/Input.tsx
|
|
13150
|
-
import * as
|
|
13193
|
+
import * as React13 from "react";
|
|
13151
13194
|
|
|
13152
13195
|
// src/components/Input/Label.tsx
|
|
13153
13196
|
import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
|
|
@@ -13190,7 +13233,7 @@ var WarningMessage = ({ message, testId, ...props }) => {
|
|
|
13190
13233
|
|
|
13191
13234
|
// src/components/Input/Input.tsx
|
|
13192
13235
|
import { jsx as jsx50, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
|
|
13193
|
-
var Input =
|
|
13236
|
+
var Input = React13.forwardRef(
|
|
13194
13237
|
({
|
|
13195
13238
|
label,
|
|
13196
13239
|
icon,
|
|
@@ -13387,7 +13430,7 @@ function InputComboBox(props) {
|
|
|
13387
13430
|
|
|
13388
13431
|
// src/components/Input/InputInlineSelect.tsx
|
|
13389
13432
|
import { css as css48 } from "@emotion/react";
|
|
13390
|
-
import { useRef as
|
|
13433
|
+
import { useRef as useRef4, useState as useState6 } from "react";
|
|
13391
13434
|
import { CgChevronDown as CgChevronDown2 } from "react-icons/cg";
|
|
13392
13435
|
|
|
13393
13436
|
// src/components/Input/styles/InputInlineSelect.styles.ts
|
|
@@ -13467,8 +13510,8 @@ var InputInlineSelect = ({
|
|
|
13467
13510
|
...props
|
|
13468
13511
|
}) => {
|
|
13469
13512
|
var _a;
|
|
13470
|
-
const [menuVisible, setMenuVisible] =
|
|
13471
|
-
const divRef =
|
|
13513
|
+
const [menuVisible, setMenuVisible] = useState6(false);
|
|
13514
|
+
const divRef = useRef4(null);
|
|
13472
13515
|
useOutsideClick(divRef, () => setMenuVisible(false));
|
|
13473
13516
|
const selected = options.find((option) => option.value === value);
|
|
13474
13517
|
return /* @__PURE__ */ jsxs31(
|
|
@@ -13628,9 +13671,9 @@ var InputSelect = ({
|
|
|
13628
13671
|
};
|
|
13629
13672
|
|
|
13630
13673
|
// src/components/Input/InputToggle.tsx
|
|
13631
|
-
import * as
|
|
13674
|
+
import * as React14 from "react";
|
|
13632
13675
|
import { jsx as jsx55, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
|
|
13633
|
-
var InputToggle =
|
|
13676
|
+
var InputToggle = React14.forwardRef(
|
|
13634
13677
|
({
|
|
13635
13678
|
label,
|
|
13636
13679
|
type,
|
|
@@ -14135,7 +14178,7 @@ var LoadingIndicator = ({ ...props }) => {
|
|
|
14135
14178
|
};
|
|
14136
14179
|
|
|
14137
14180
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
14138
|
-
import { useCallback as useCallback2, useEffect as useEffect6, useRef as
|
|
14181
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useRef as useRef5 } from "react";
|
|
14139
14182
|
|
|
14140
14183
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
14141
14184
|
import { css as css56 } from "@emotion/react";
|
|
@@ -14181,7 +14224,7 @@ var LoadingOverlay = ({
|
|
|
14181
14224
|
isPaused = false,
|
|
14182
14225
|
children
|
|
14183
14226
|
}) => {
|
|
14184
|
-
const lottieRef =
|
|
14227
|
+
const lottieRef = useRef5(null);
|
|
14185
14228
|
const onLoopComplete = useCallback2(() => {
|
|
14186
14229
|
var _a, _b, _c;
|
|
14187
14230
|
if (isPaused && !((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
@@ -14517,7 +14560,7 @@ var EditTeamIntegrationTile = ({
|
|
|
14517
14560
|
|
|
14518
14561
|
// src/components/Tiles/IntegrationComingSoon.tsx
|
|
14519
14562
|
import { css as css59 } from "@emotion/react";
|
|
14520
|
-
import { useEffect as useEffect7, useState as
|
|
14563
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
14521
14564
|
import { CgHeart } from "react-icons/cg";
|
|
14522
14565
|
import { jsx as jsx71, jsxs as jsxs46 } from "@emotion/react/jsx-runtime";
|
|
14523
14566
|
var IntegrationComingSoon = ({
|
|
@@ -14528,7 +14571,7 @@ var IntegrationComingSoon = ({
|
|
|
14528
14571
|
timing = 1e3,
|
|
14529
14572
|
...props
|
|
14530
14573
|
}) => {
|
|
14531
|
-
const [upVote, setUpVote] =
|
|
14574
|
+
const [upVote, setUpVote] = useState7(false);
|
|
14532
14575
|
const handleUpVoteInteraction = () => {
|
|
14533
14576
|
setUpVote((prev) => !prev);
|
|
14534
14577
|
onUpVoteClick();
|
|
@@ -14898,7 +14941,7 @@ var IntegrationModalHeader = ({ icon, name, menu: menu2, children }) => {
|
|
|
14898
14941
|
};
|
|
14899
14942
|
|
|
14900
14943
|
// src/components/Tooltip/Tooltip.tsx
|
|
14901
|
-
import
|
|
14944
|
+
import React16 from "react";
|
|
14902
14945
|
import {
|
|
14903
14946
|
Tooltip as ReakitTooltip,
|
|
14904
14947
|
TooltipArrow,
|
|
@@ -14928,7 +14971,7 @@ import { Fragment as Fragment10, jsx as jsx79, jsxs as jsxs51 } from "@emotion/r
|
|
|
14928
14971
|
function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
|
|
14929
14972
|
const tooltip = useTooltipState({ placement });
|
|
14930
14973
|
return !title ? children : /* @__PURE__ */ jsxs51(Fragment10, { children: [
|
|
14931
|
-
/* @__PURE__ */ jsx79(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) =>
|
|
14974
|
+
/* @__PURE__ */ jsx79(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => React16.cloneElement(children, referenceProps) }),
|
|
14932
14975
|
/* @__PURE__ */ jsxs51(ReakitTooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
|
|
14933
14976
|
/* @__PURE__ */ jsx79(TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
|
|
14934
14977
|
title
|
|
@@ -15380,7 +15423,7 @@ var ParameterGroup = forwardRef8(
|
|
|
15380
15423
|
);
|
|
15381
15424
|
|
|
15382
15425
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
15383
|
-
import { forwardRef as forwardRef10, useCallback as useCallback3, useDeferredValue, useEffect as useEffect8, useState as
|
|
15426
|
+
import { forwardRef as forwardRef10, useCallback as useCallback3, useDeferredValue, useEffect as useEffect8, useState as useState9 } from "react";
|
|
15384
15427
|
|
|
15385
15428
|
// src/utils/url.ts
|
|
15386
15429
|
var isValidUrl = (url, options = {}) => {
|
|
@@ -15393,7 +15436,7 @@ var isValidUrl = (url, options = {}) => {
|
|
|
15393
15436
|
};
|
|
15394
15437
|
|
|
15395
15438
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
15396
|
-
import { useState as
|
|
15439
|
+
import { useState as useState8 } from "react";
|
|
15397
15440
|
|
|
15398
15441
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
15399
15442
|
import { jsx as jsx84 } from "@emotion/react/jsx-runtime";
|
|
@@ -15512,7 +15555,7 @@ var ParameterShell = ({
|
|
|
15512
15555
|
children,
|
|
15513
15556
|
...props
|
|
15514
15557
|
}) => {
|
|
15515
|
-
const [manualErrorMessage, setManualErrorMessage] =
|
|
15558
|
+
const [manualErrorMessage, setManualErrorMessage] = useState8(void 0);
|
|
15516
15559
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
15517
15560
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
15518
15561
|
return /* @__PURE__ */ jsxs56("div", { css: inputContainer2, ...props, children: [
|
|
@@ -15595,7 +15638,7 @@ var ParameterImageInner = forwardRef10(
|
|
|
15595
15638
|
({ ...props }, ref) => {
|
|
15596
15639
|
const { value } = props;
|
|
15597
15640
|
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = useParameterShell();
|
|
15598
|
-
const [loading, setLoading] =
|
|
15641
|
+
const [loading, setLoading] = useState9(false);
|
|
15599
15642
|
const deferredValue = useDeferredValue(value);
|
|
15600
15643
|
const errorText = "The text you provided is not a valid URL";
|
|
15601
15644
|
const updateImageSrc = useCallback3(() => {
|
|
@@ -15947,7 +15990,7 @@ var getLabelForElement = (type) => {
|
|
|
15947
15990
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
15948
15991
|
import { deepEqual as deepEqual2 } from "fast-equals";
|
|
15949
15992
|
import { ParagraphNode as ParagraphNode2 } from "lexical";
|
|
15950
|
-
import { useEffect as useEffect13, useRef as
|
|
15993
|
+
import { useEffect as useEffect13, useRef as useRef7 } from "react";
|
|
15951
15994
|
|
|
15952
15995
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
15953
15996
|
import { CodeNode } from "@lexical/code";
|
|
@@ -16180,7 +16223,7 @@ import {
|
|
|
16180
16223
|
ElementNode as ElementNode2,
|
|
16181
16224
|
FOCUS_COMMAND
|
|
16182
16225
|
} from "lexical";
|
|
16183
|
-
import { useCallback as useCallback4, useEffect as useEffect10, useRef as
|
|
16226
|
+
import { useCallback as useCallback4, useEffect as useEffect10, useRef as useRef6, useState as useState10 } from "react";
|
|
16184
16227
|
|
|
16185
16228
|
// src/components/Popover/Popover.styles.ts
|
|
16186
16229
|
import { css as css73 } from "@emotion/react";
|
|
@@ -16324,7 +16367,7 @@ function convertAnchorElement(domNode) {
|
|
|
16324
16367
|
}
|
|
16325
16368
|
return { node };
|
|
16326
16369
|
}
|
|
16327
|
-
var LinkNode = class extends ElementNode2 {
|
|
16370
|
+
var LinkNode = class _LinkNode extends ElementNode2 {
|
|
16328
16371
|
constructor(props, key) {
|
|
16329
16372
|
super(key);
|
|
16330
16373
|
this.__link = props;
|
|
@@ -16340,7 +16383,7 @@ var LinkNode = class extends ElementNode2 {
|
|
|
16340
16383
|
writable.__link = link2;
|
|
16341
16384
|
}
|
|
16342
16385
|
static clone(node) {
|
|
16343
|
-
return new
|
|
16386
|
+
return new _LinkNode(node.__link, node.__key);
|
|
16344
16387
|
}
|
|
16345
16388
|
static importJSON(serializedNode) {
|
|
16346
16389
|
const node = $createLinkNode(serializedNode.link);
|
|
@@ -16539,10 +16582,10 @@ var linkPopoverAnchor = css74`
|
|
|
16539
16582
|
`;
|
|
16540
16583
|
function LinkNodePlugin({ onConnectLink }) {
|
|
16541
16584
|
const [editor] = useLexicalComposerContext2();
|
|
16542
|
-
const [linkPopoverState, setLinkPopoverState] =
|
|
16543
|
-
const linkPopoverElRef =
|
|
16544
|
-
const [isEditorFocused, setIsEditorFocused] =
|
|
16545
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] =
|
|
16585
|
+
const [linkPopoverState, setLinkPopoverState] = useState10();
|
|
16586
|
+
const linkPopoverElRef = useRef6(null);
|
|
16587
|
+
const [isEditorFocused, setIsEditorFocused] = useState10(false);
|
|
16588
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState10(false);
|
|
16546
16589
|
useEffect10(() => {
|
|
16547
16590
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
16548
16591
|
setLinkPopoverState(void 0);
|
|
@@ -16797,7 +16840,7 @@ import {
|
|
|
16797
16840
|
FORMAT_TEXT_COMMAND,
|
|
16798
16841
|
SELECTION_CHANGE_COMMAND
|
|
16799
16842
|
} from "lexical";
|
|
16800
|
-
import { useCallback as useCallback5, useEffect as useEffect12, useMemo as
|
|
16843
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useMemo as useMemo2, useState as useState11 } from "react";
|
|
16801
16844
|
import { Fragment as Fragment14, jsx as jsx93, jsxs as jsxs61 } from "@emotion/react/jsx-runtime";
|
|
16802
16845
|
var toolbar = css75`
|
|
16803
16846
|
background: var(--gray-50);
|
|
@@ -17080,26 +17123,26 @@ var RichTextToolbar = ({ config }) => {
|
|
|
17080
17123
|
var RichTextToolbar_default = RichTextToolbar;
|
|
17081
17124
|
var useRichTextToolbarState = ({ config }) => {
|
|
17082
17125
|
var _a;
|
|
17083
|
-
const enabledBuiltInFormats =
|
|
17126
|
+
const enabledBuiltInFormats = useMemo2(() => {
|
|
17084
17127
|
return richTextBuiltInFormats.filter((format) => {
|
|
17085
17128
|
var _a2, _b;
|
|
17086
17129
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
17087
17130
|
});
|
|
17088
17131
|
}, [config]);
|
|
17089
|
-
const enabledBuiltInElements =
|
|
17132
|
+
const enabledBuiltInElements = useMemo2(() => {
|
|
17090
17133
|
return richTextBuiltInElements.filter((element) => {
|
|
17091
17134
|
var _a2, _b;
|
|
17092
17135
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
17093
17136
|
});
|
|
17094
17137
|
}, [config]);
|
|
17095
|
-
const enabledBuiltInFormatsWithIcon =
|
|
17138
|
+
const enabledBuiltInFormatsWithIcon = useMemo2(() => {
|
|
17096
17139
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
17097
17140
|
}, [enabledBuiltInFormats]);
|
|
17098
17141
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
17099
17142
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
17100
17143
|
);
|
|
17101
|
-
const [activeFormats, setActiveFormats] =
|
|
17102
|
-
const visibleFormatsWithIcon =
|
|
17144
|
+
const [activeFormats, setActiveFormats] = useState11([]);
|
|
17145
|
+
const visibleFormatsWithIcon = useMemo2(() => {
|
|
17103
17146
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17104
17147
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17105
17148
|
visibleFormats.add(type);
|
|
@@ -17109,7 +17152,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17109
17152
|
});
|
|
17110
17153
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17111
17154
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
17112
|
-
const visibleFormatsWithoutIcon =
|
|
17155
|
+
const visibleFormatsWithoutIcon = useMemo2(() => {
|
|
17113
17156
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
17114
17157
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
17115
17158
|
visibleFormats.add(type);
|
|
@@ -17119,11 +17162,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17119
17162
|
});
|
|
17120
17163
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
17121
17164
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
17122
|
-
const [activeElement, setActiveElement] =
|
|
17165
|
+
const [activeElement, setActiveElement] = useState11("paragraph");
|
|
17123
17166
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
17124
17167
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
17125
17168
|
);
|
|
17126
|
-
const visibleTextualElements =
|
|
17169
|
+
const visibleTextualElements = useMemo2(() => {
|
|
17127
17170
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
17128
17171
|
return enabledTextualElements;
|
|
17129
17172
|
}
|
|
@@ -17134,24 +17177,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
17134
17177
|
}
|
|
17135
17178
|
);
|
|
17136
17179
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
17137
|
-
const [isLink, setIsLink] =
|
|
17138
|
-
const linkElementVisible =
|
|
17180
|
+
const [isLink, setIsLink] = useState11(false);
|
|
17181
|
+
const linkElementVisible = useMemo2(() => {
|
|
17139
17182
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
17140
17183
|
}, [isLink, enabledBuiltInElements]);
|
|
17141
|
-
const visibleLists =
|
|
17184
|
+
const visibleLists = useMemo2(() => {
|
|
17142
17185
|
return new Set(
|
|
17143
17186
|
["orderedList", "unorderedList"].filter(
|
|
17144
17187
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
17145
17188
|
)
|
|
17146
17189
|
);
|
|
17147
17190
|
}, [activeElement, enabledBuiltInElements]);
|
|
17148
|
-
const quoteElementVisible =
|
|
17191
|
+
const quoteElementVisible = useMemo2(() => {
|
|
17149
17192
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
17150
17193
|
}, [activeElement, enabledBuiltInElements]);
|
|
17151
|
-
const codeElementVisible =
|
|
17194
|
+
const codeElementVisible = useMemo2(() => {
|
|
17152
17195
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
17153
17196
|
}, [activeElement, enabledBuiltInElements]);
|
|
17154
|
-
const visibleElementsWithIcons =
|
|
17197
|
+
const visibleElementsWithIcons = useMemo2(() => {
|
|
17155
17198
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
17156
17199
|
if (linkElementVisible) {
|
|
17157
17200
|
visibleElements.add("link");
|
|
@@ -17367,7 +17410,7 @@ var RichText = ({
|
|
|
17367
17410
|
readOnly,
|
|
17368
17411
|
editorInputClassName
|
|
17369
17412
|
}) => {
|
|
17370
|
-
const editorContainerRef =
|
|
17413
|
+
const editorContainerRef = useRef7(null);
|
|
17371
17414
|
const [editor] = useLexicalComposerContext5();
|
|
17372
17415
|
useEffect13(() => {
|
|
17373
17416
|
if (onRichTextInit) {
|
|
@@ -17507,7 +17550,7 @@ var Popover2 = ({
|
|
|
17507
17550
|
|
|
17508
17551
|
// src/components/ProgressList/ProgressList.tsx
|
|
17509
17552
|
import { css as css78 } from "@emotion/react";
|
|
17510
|
-
import { useMemo as
|
|
17553
|
+
import { useMemo as useMemo3 } from "react";
|
|
17511
17554
|
import { CgCheckO as CgCheckO2, CgRadioCheck, CgRecord } from "react-icons/cg";
|
|
17512
17555
|
|
|
17513
17556
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
@@ -17527,7 +17570,7 @@ var progressListItemStyles = css77`
|
|
|
17527
17570
|
// src/components/ProgressList/ProgressList.tsx
|
|
17528
17571
|
import { jsx as jsx99, jsxs as jsxs66 } from "@emotion/react/jsx-runtime";
|
|
17529
17572
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
17530
|
-
const itemsWithStatus =
|
|
17573
|
+
const itemsWithStatus = useMemo3(() => {
|
|
17531
17574
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
17532
17575
|
return items.map((item, index) => {
|
|
17533
17576
|
let status = "queued";
|
|
@@ -17560,7 +17603,7 @@ var ProgressListItem = ({
|
|
|
17560
17603
|
errorLevel = "danger",
|
|
17561
17604
|
autoEllipsis = false
|
|
17562
17605
|
}) => {
|
|
17563
|
-
const Icon2 =
|
|
17606
|
+
const Icon2 = useMemo3(() => {
|
|
17564
17607
|
if (error) {
|
|
17565
17608
|
return warningIcon;
|
|
17566
17609
|
}
|
|
@@ -17571,7 +17614,7 @@ var ProgressListItem = ({
|
|
|
17571
17614
|
};
|
|
17572
17615
|
return iconPerStatus[status];
|
|
17573
17616
|
}, [status, error]);
|
|
17574
|
-
const statusStyles =
|
|
17617
|
+
const statusStyles = useMemo3(() => {
|
|
17575
17618
|
if (error) {
|
|
17576
17619
|
return errorLevel === "caution" ? css78`
|
|
17577
17620
|
color: rgb(161, 98, 7);
|
|
@@ -17609,7 +17652,7 @@ var ProgressListItem = ({
|
|
|
17609
17652
|
|
|
17610
17653
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
17611
17654
|
import { css as css80 } from "@emotion/react";
|
|
17612
|
-
import { useCallback as useCallback6, useMemo as
|
|
17655
|
+
import { useCallback as useCallback6, useMemo as useMemo4 } from "react";
|
|
17613
17656
|
import { CgCheck as CgCheck4 } from "react-icons/cg";
|
|
17614
17657
|
|
|
17615
17658
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
@@ -17724,7 +17767,7 @@ var SegmentedControl = ({
|
|
|
17724
17767
|
},
|
|
17725
17768
|
[options, onChange]
|
|
17726
17769
|
);
|
|
17727
|
-
const sizeStyles =
|
|
17770
|
+
const sizeStyles = useMemo4(() => {
|
|
17728
17771
|
const map = {
|
|
17729
17772
|
sm: css80({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
17730
17773
|
md: css80({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
@@ -17732,7 +17775,7 @@ var SegmentedControl = ({
|
|
|
17732
17775
|
};
|
|
17733
17776
|
return map[size];
|
|
17734
17777
|
}, [size]);
|
|
17735
|
-
const isIconOnly =
|
|
17778
|
+
const isIconOnly = useMemo4(() => {
|
|
17736
17779
|
return options.every((option) => option.icon && !option.label);
|
|
17737
17780
|
}, [options]);
|
|
17738
17781
|
return /* @__PURE__ */ jsx100(
|
|
@@ -17824,7 +17867,7 @@ var Skeleton = ({
|
|
|
17824
17867
|
);
|
|
17825
17868
|
|
|
17826
17869
|
// src/components/Switch/Switch.tsx
|
|
17827
|
-
import * as
|
|
17870
|
+
import * as React19 from "react";
|
|
17828
17871
|
|
|
17829
17872
|
// src/components/Switch/Switch.styles.ts
|
|
17830
17873
|
import { css as css82 } from "@emotion/react";
|
|
@@ -17913,7 +17956,7 @@ var SwitchText = css82`
|
|
|
17913
17956
|
|
|
17914
17957
|
// src/components/Switch/Switch.tsx
|
|
17915
17958
|
import { Fragment as Fragment17, jsx as jsx102, jsxs as jsxs68 } from "@emotion/react/jsx-runtime";
|
|
17916
|
-
var Switch =
|
|
17959
|
+
var Switch = React19.forwardRef(
|
|
17917
17960
|
({ label, infoText, toggleText, children, ...inputProps }, ref) => {
|
|
17918
17961
|
let additionalText = infoText;
|
|
17919
17962
|
if (infoText && toggleText) {
|
|
@@ -17931,7 +17974,7 @@ var Switch = React20.forwardRef(
|
|
|
17931
17974
|
);
|
|
17932
17975
|
|
|
17933
17976
|
// src/components/Table/Table.tsx
|
|
17934
|
-
import * as
|
|
17977
|
+
import * as React20 from "react";
|
|
17935
17978
|
|
|
17936
17979
|
// src/components/Table/Table.styles.ts
|
|
17937
17980
|
import { css as css83 } from "@emotion/react";
|
|
@@ -17962,44 +18005,44 @@ var tableCellHead = css83`
|
|
|
17962
18005
|
|
|
17963
18006
|
// src/components/Table/Table.tsx
|
|
17964
18007
|
import { jsx as jsx103 } from "@emotion/react/jsx-runtime";
|
|
17965
|
-
var Table =
|
|
18008
|
+
var Table = React20.forwardRef(
|
|
17966
18009
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
17967
18010
|
return /* @__PURE__ */ jsx103("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
17968
18011
|
}
|
|
17969
18012
|
);
|
|
17970
|
-
var TableHead =
|
|
18013
|
+
var TableHead = React20.forwardRef(
|
|
17971
18014
|
({ children, ...otherProps }, ref) => {
|
|
17972
18015
|
return /* @__PURE__ */ jsx103("thead", { ref, css: tableHead, ...otherProps, children });
|
|
17973
18016
|
}
|
|
17974
18017
|
);
|
|
17975
|
-
var TableBody =
|
|
18018
|
+
var TableBody = React20.forwardRef(
|
|
17976
18019
|
({ children, ...otherProps }, ref) => {
|
|
17977
18020
|
return /* @__PURE__ */ jsx103("tbody", { ref, ...otherProps, children });
|
|
17978
18021
|
}
|
|
17979
18022
|
);
|
|
17980
|
-
var TableFoot =
|
|
18023
|
+
var TableFoot = React20.forwardRef(
|
|
17981
18024
|
({ children, ...otherProps }, ref) => {
|
|
17982
18025
|
return /* @__PURE__ */ jsx103("tfoot", { ref, ...otherProps, children });
|
|
17983
18026
|
}
|
|
17984
18027
|
);
|
|
17985
|
-
var TableRow =
|
|
18028
|
+
var TableRow = React20.forwardRef(
|
|
17986
18029
|
({ children, ...otherProps }, ref) => {
|
|
17987
18030
|
return /* @__PURE__ */ jsx103("tr", { ref, css: tableRow, ...otherProps, children });
|
|
17988
18031
|
}
|
|
17989
18032
|
);
|
|
17990
|
-
var TableCellHead =
|
|
18033
|
+
var TableCellHead = React20.forwardRef(
|
|
17991
18034
|
({ children, ...otherProps }, ref) => {
|
|
17992
18035
|
return /* @__PURE__ */ jsx103("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
17993
18036
|
}
|
|
17994
18037
|
);
|
|
17995
|
-
var TableCellData =
|
|
18038
|
+
var TableCellData = React20.forwardRef(
|
|
17996
18039
|
({ children, ...otherProps }, ref) => {
|
|
17997
18040
|
return /* @__PURE__ */ jsx103("td", { ref, ...otherProps, children });
|
|
17998
18041
|
}
|
|
17999
18042
|
);
|
|
18000
18043
|
|
|
18001
18044
|
// src/components/Tabs/Tabs.tsx
|
|
18002
|
-
import { createContext as createContext6, useContext as useContext7, useEffect as useEffect14, useMemo as
|
|
18045
|
+
import { createContext as createContext6, useContext as useContext7, useEffect as useEffect14, useMemo as useMemo5 } from "react";
|
|
18003
18046
|
import {
|
|
18004
18047
|
Tab as ReakitTab,
|
|
18005
18048
|
TabList as ReakitTabList,
|
|
@@ -18043,7 +18086,7 @@ var useCurrentTab = () => {
|
|
|
18043
18086
|
return context;
|
|
18044
18087
|
};
|
|
18045
18088
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
18046
|
-
const selected =
|
|
18089
|
+
const selected = useMemo5(() => {
|
|
18047
18090
|
if (selectedId)
|
|
18048
18091
|
return selectedId;
|
|
18049
18092
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
@@ -18195,6 +18238,7 @@ export {
|
|
|
18195
18238
|
Container2 as Container,
|
|
18196
18239
|
Counter,
|
|
18197
18240
|
CreateTeamIntegrationTile,
|
|
18241
|
+
CurrentDrawerContext,
|
|
18198
18242
|
DashedBox,
|
|
18199
18243
|
Details,
|
|
18200
18244
|
DismissibleChipAction,
|
|
@@ -18332,6 +18376,7 @@ export {
|
|
|
18332
18376
|
fadeInTop,
|
|
18333
18377
|
fadeOutBottom,
|
|
18334
18378
|
fullWidthScreenIcon,
|
|
18379
|
+
getDrawerAttributes,
|
|
18335
18380
|
growSubtle,
|
|
18336
18381
|
imageTextIcon,
|
|
18337
18382
|
infoFilledIcon,
|
|
@@ -18362,7 +18407,7 @@ export {
|
|
|
18362
18407
|
textInput,
|
|
18363
18408
|
useBreakpoint,
|
|
18364
18409
|
useCloseCurrentDrawer,
|
|
18365
|
-
|
|
18410
|
+
useCurrentDrawer,
|
|
18366
18411
|
useCurrentTab,
|
|
18367
18412
|
useDrawer,
|
|
18368
18413
|
useIconContext,
|