@uniformdev/design-system 19.202.0 → 19.202.1-alpha.9
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 +286 -146
- package/dist/index.d.mts +138 -101
- package/dist/index.d.ts +138 -101
- package/dist/index.js +531 -395
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -3216,11 +3216,12 @@ function Tooltip({
|
|
|
3216
3216
|
children,
|
|
3217
3217
|
title: title2,
|
|
3218
3218
|
placement = "bottom",
|
|
3219
|
+
gutter,
|
|
3219
3220
|
visible,
|
|
3220
3221
|
withoutPortal = false,
|
|
3221
3222
|
...props
|
|
3222
3223
|
}) {
|
|
3223
|
-
const tooltip = (0, import_Tooltip.useTooltipState)({ placement });
|
|
3224
|
+
const tooltip = (0, import_Tooltip.useTooltipState)({ placement, gutter });
|
|
3224
3225
|
return !title2 ? children : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3225
3226
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Tooltip.TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => import_react16.default.cloneElement(children, referenceProps) }),
|
|
3226
3227
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
@@ -13485,6 +13486,7 @@ var AnimationFile = ({
|
|
|
13485
13486
|
|
|
13486
13487
|
// src/components/Avatar/Avatar.tsx
|
|
13487
13488
|
init_emotion_jsx_shim();
|
|
13489
|
+
var import_CgProfile2 = require("@react-icons/all-files/cg/CgProfile");
|
|
13488
13490
|
|
|
13489
13491
|
// src/components/Avatar/Avatar.styles.ts
|
|
13490
13492
|
init_emotion_jsx_shim();
|
|
@@ -13543,10 +13545,11 @@ var avatarSizeStylesMap = {
|
|
|
13543
13545
|
};
|
|
13544
13546
|
var Avatar = ({ src, label = "", children, size = "md", as = "div", ...props }) => {
|
|
13545
13547
|
const Element = as;
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Element, { css: [avatarStyles, avatarSizeStylesMap[size]], ...props, children: [
|
|
13549
|
+
src ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("img", { role: "presentation", src, css: avatarImageStyles }) : children ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_CgProfile2.CgProfile, { css: avatarImageStyles }),
|
|
13548
13550
|
children
|
|
13549
13551
|
] }) });
|
|
13552
|
+
return src || children ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Tooltip, { title: label, children: body }) : body;
|
|
13550
13553
|
};
|
|
13551
13554
|
|
|
13552
13555
|
// src/components/Avatar/AvatarGroup.tsx
|
|
@@ -13584,10 +13587,13 @@ var AvatarGroup = ({
|
|
|
13584
13587
|
getTruncatedLabel = defaultGetTruncatedLabel,
|
|
13585
13588
|
...props
|
|
13586
13589
|
}) => {
|
|
13590
|
+
if (max < 2) {
|
|
13591
|
+
throw new Error("max must be 2 or more");
|
|
13592
|
+
}
|
|
13587
13593
|
const numberOfChildren = children.length;
|
|
13588
|
-
const
|
|
13589
|
-
const
|
|
13590
|
-
const
|
|
13594
|
+
const numberOfTruncatedItems = numberOfChildren <= max ? 0 : numberOfChildren - max + 1;
|
|
13595
|
+
const numberOfItemsToRender = numberOfTruncatedItems ? Math.min(numberOfChildren, max - 1) : void 0;
|
|
13596
|
+
const childrenToRender = children.slice(0, numberOfItemsToRender);
|
|
13591
13597
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
13592
13598
|
"div",
|
|
13593
13599
|
{
|
|
@@ -13597,7 +13603,7 @@ var AvatarGroup = ({
|
|
|
13597
13603
|
],
|
|
13598
13604
|
...props,
|
|
13599
13605
|
children: [
|
|
13600
|
-
|
|
13606
|
+
childrenToRender,
|
|
13601
13607
|
!numberOfTruncatedItems ? null : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Avatar, { label: getTruncatedLabel(numberOfTruncatedItems), style: { display: "flex" }, children: [
|
|
13602
13608
|
"+",
|
|
13603
13609
|
numberOfTruncatedItems
|
|
@@ -14216,7 +14222,7 @@ var menuTriggerStyles = import_react35.css`
|
|
|
14216
14222
|
border: none;
|
|
14217
14223
|
background: transparent;
|
|
14218
14224
|
padding: var(--spacing-xs);
|
|
14219
|
-
color: var(--gray-
|
|
14225
|
+
color: var(--gray-600);
|
|
14220
14226
|
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
14221
14227
|
|
|
14222
14228
|
&:focus,
|
|
@@ -15203,7 +15209,11 @@ var InputKeywordSearch = (0, import_react50.forwardRef)(
|
|
|
15203
15209
|
}
|
|
15204
15210
|
};
|
|
15205
15211
|
const handleClear = () => {
|
|
15206
|
-
|
|
15212
|
+
if (onClear) {
|
|
15213
|
+
onClear();
|
|
15214
|
+
} else {
|
|
15215
|
+
onSearchTextChanged("");
|
|
15216
|
+
}
|
|
15207
15217
|
};
|
|
15208
15218
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
15209
15219
|
Input,
|
|
@@ -17233,7 +17243,7 @@ var PopoverDefaulterTriggerBtn = import_react73.css`
|
|
|
17233
17243
|
var Popover = (maxWidth = "220px") => import_react73.css`
|
|
17234
17244
|
border-left: var(--spacing-xs) solid var(--brand-secondary-3);
|
|
17235
17245
|
border-radius: var(--rounded-base);
|
|
17236
|
-
box-shadow: var(--
|
|
17246
|
+
box-shadow: var(--elevation-400);
|
|
17237
17247
|
background: var(--white);
|
|
17238
17248
|
display: grid;
|
|
17239
17249
|
gap: var(--spacing-sm);
|
|
@@ -20663,6 +20673,7 @@ ModalDialog.displayName = "ModalDialog";
|
|
|
20663
20673
|
|
|
20664
20674
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
20665
20675
|
init_emotion_jsx_shim();
|
|
20676
|
+
var import_react122 = require("react");
|
|
20666
20677
|
|
|
20667
20678
|
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
20668
20679
|
init_emotion_jsx_shim();
|
|
@@ -20675,17 +20686,28 @@ var ObjectGridContainer = (gridCount) => import_react121.css`
|
|
|
20675
20686
|
|
|
20676
20687
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
20677
20688
|
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
20678
|
-
var ObjectGridContainer2 = (
|
|
20679
|
-
|
|
20680
|
-
|
|
20689
|
+
var ObjectGridContainer2 = (0, import_react122.forwardRef)(
|
|
20690
|
+
({ gridCount = 3, children, ...props }, ref) => {
|
|
20691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20692
|
+
"div",
|
|
20693
|
+
{
|
|
20694
|
+
ref,
|
|
20695
|
+
"data-testid": "object-grid-container",
|
|
20696
|
+
css: ObjectGridContainer(gridCount),
|
|
20697
|
+
...props,
|
|
20698
|
+
children
|
|
20699
|
+
}
|
|
20700
|
+
);
|
|
20701
|
+
}
|
|
20702
|
+
);
|
|
20681
20703
|
|
|
20682
20704
|
// src/components/Objects/ObjectGridItem.tsx
|
|
20683
20705
|
init_emotion_jsx_shim();
|
|
20684
20706
|
|
|
20685
20707
|
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
20686
20708
|
init_emotion_jsx_shim();
|
|
20687
|
-
var
|
|
20688
|
-
var ObjectGridItem =
|
|
20709
|
+
var import_react123 = require("@emotion/react");
|
|
20710
|
+
var ObjectGridItem = import_react123.css`
|
|
20689
20711
|
border: 1px solid var(--gray-300);
|
|
20690
20712
|
border-radius: var(--rounded-base);
|
|
20691
20713
|
background: var(--white);
|
|
@@ -20695,6 +20717,7 @@ var ObjectGridItem = import_react122.css`
|
|
|
20695
20717
|
|
|
20696
20718
|
&[aria-selected='true'] {
|
|
20697
20719
|
border: 1px solid var(--accent-dark);
|
|
20720
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
20698
20721
|
}
|
|
20699
20722
|
|
|
20700
20723
|
&[aria-selected='false'] {
|
|
@@ -20703,20 +20726,54 @@ var ObjectGridItem = import_react122.css`
|
|
|
20703
20726
|
}
|
|
20704
20727
|
}
|
|
20705
20728
|
`;
|
|
20706
|
-
var
|
|
20729
|
+
var ObjectGridWithOnClick = import_react123.css`
|
|
20730
|
+
cursor: pointer;
|
|
20731
|
+
&:hover,
|
|
20732
|
+
&:focus {
|
|
20733
|
+
border: 1px solid var(--accent-dark);
|
|
20734
|
+
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
20735
|
+
}
|
|
20736
|
+
`;
|
|
20737
|
+
var ObjectGridItemMediaWrapper = import_react123.css`
|
|
20707
20738
|
display: flex;
|
|
20708
20739
|
flex: 1 1 0;
|
|
20709
20740
|
position: relative;
|
|
20710
20741
|
`;
|
|
20711
|
-
var
|
|
20712
|
-
|
|
20742
|
+
var ObjectGridItemMediaInner = import_react123.css`
|
|
20743
|
+
background: var(--gray-50);
|
|
20744
|
+
border-radius: var(--rounded-base) var(--rounded-base) 0 0;
|
|
20745
|
+
position: relative;
|
|
20746
|
+
display: flex;
|
|
20747
|
+
align-items: center;
|
|
20748
|
+
justify-content: center;
|
|
20749
|
+
flex: 1;
|
|
20750
|
+
overflow: hidden;
|
|
20751
|
+
height: 100%;
|
|
20752
|
+
`;
|
|
20753
|
+
var ObjectGridItemContentWrapper = import_react123.css`
|
|
20754
|
+
display: grid;
|
|
20755
|
+
grid-template-columns: 1fr auto;
|
|
20756
|
+
padding: var(--spacing-sm);
|
|
20757
|
+
gap: var(--spacing-sm);
|
|
20713
20758
|
min-height: 52px;
|
|
20759
|
+
width: 100%;
|
|
20714
20760
|
`;
|
|
20715
|
-
var
|
|
20761
|
+
var ObjectGridItemInnerWrapper = import_react123.css`
|
|
20762
|
+
min-width: 0;
|
|
20763
|
+
`;
|
|
20764
|
+
var ObjectGridItemImage = import_react123.css`
|
|
20716
20765
|
object-fit: cover;
|
|
20717
20766
|
width: 100%;
|
|
20718
20767
|
height: auto;
|
|
20719
20768
|
`;
|
|
20769
|
+
var ObjectGridItemSubtitle = import_react123.css`
|
|
20770
|
+
color: var(--gray-500);
|
|
20771
|
+
font-size: var(--fs-sm);
|
|
20772
|
+
white-space: nowrap;
|
|
20773
|
+
overflow: hidden;
|
|
20774
|
+
text-overflow: ellipsis;
|
|
20775
|
+
max-width: 100%;
|
|
20776
|
+
`;
|
|
20720
20777
|
|
|
20721
20778
|
// src/components/Objects/ObjectGridItem.tsx
|
|
20722
20779
|
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
@@ -20726,28 +20783,51 @@ var ObjectGridItem2 = ({
|
|
|
20726
20783
|
rightSlot,
|
|
20727
20784
|
menuItems,
|
|
20728
20785
|
isSelected,
|
|
20729
|
-
children
|
|
20786
|
+
children,
|
|
20787
|
+
menuTestId,
|
|
20788
|
+
...props
|
|
20730
20789
|
}) => {
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
children:
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20790
|
+
const hasOnClick = props.onClick;
|
|
20791
|
+
const onStopPropagation = (e) => {
|
|
20792
|
+
e.stopPropagation();
|
|
20793
|
+
};
|
|
20794
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
20795
|
+
"div",
|
|
20796
|
+
{
|
|
20797
|
+
css: [ObjectGridItem, props.onClick ? ObjectGridWithOnClick : void 0],
|
|
20798
|
+
"aria-selected": isSelected,
|
|
20799
|
+
...props,
|
|
20800
|
+
children: [
|
|
20801
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { css: ObjectGridItemMediaWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { css: ObjectGridItemMediaInner, children: cover }) }),
|
|
20802
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { css: ObjectGridItemContentWrapper, children: [
|
|
20803
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(VerticalRhythm, { gap: "0", css: ObjectGridItemInnerWrapper, children: [
|
|
20804
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
20805
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { css: ObjectGridItemSubtitle, children })
|
|
20806
|
+
] }),
|
|
20807
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
20808
|
+
HorizontalRhythm,
|
|
20809
|
+
{
|
|
20810
|
+
gap: "xs",
|
|
20811
|
+
align: "flex-start",
|
|
20812
|
+
css: { cursor: "default" },
|
|
20813
|
+
onClick: hasOnClick ? onStopPropagation : void 0,
|
|
20814
|
+
children: [
|
|
20815
|
+
rightSlot,
|
|
20816
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20817
|
+
Menu,
|
|
20818
|
+
{
|
|
20819
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(MenuThreeDots, { "data-testid": menuTestId != null ? menuTestId : "object-grid-item-menu-btn" }),
|
|
20820
|
+
placement: "bottom-end",
|
|
20821
|
+
children: menuItems
|
|
20822
|
+
}
|
|
20823
|
+
) : null
|
|
20824
|
+
]
|
|
20825
|
+
}
|
|
20826
|
+
)
|
|
20827
|
+
] })
|
|
20828
|
+
]
|
|
20829
|
+
}
|
|
20830
|
+
);
|
|
20751
20831
|
};
|
|
20752
20832
|
|
|
20753
20833
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
@@ -20755,23 +20835,30 @@ init_emotion_jsx_shim();
|
|
|
20755
20835
|
|
|
20756
20836
|
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
20757
20837
|
init_emotion_jsx_shim();
|
|
20758
|
-
var
|
|
20759
|
-
var CoverImage =
|
|
20838
|
+
var import_react124 = require("@emotion/react");
|
|
20839
|
+
var CoverImage = import_react124.css`
|
|
20760
20840
|
aspect-ratio: 16/9;
|
|
20761
20841
|
max-width: 100%;
|
|
20762
20842
|
max-height: 100%;
|
|
20763
|
-
height:
|
|
20843
|
+
height: inherit;
|
|
20844
|
+
width: inherit;
|
|
20764
20845
|
padding: var(--spacing-sm);
|
|
20846
|
+
object-fit: contain;
|
|
20765
20847
|
`;
|
|
20766
|
-
var
|
|
20848
|
+
var CoverContainer = import_react124.css`
|
|
20849
|
+
aspect-ratio: 16/9;
|
|
20850
|
+
width: 100%;
|
|
20851
|
+
height: 100%;
|
|
20852
|
+
`;
|
|
20853
|
+
var CoverIconWrapper = import_react124.css`
|
|
20767
20854
|
position: relative;
|
|
20768
20855
|
display: flex;
|
|
20769
20856
|
align-items: center;
|
|
20770
20857
|
justify-content: center;
|
|
20771
20858
|
flex: 1;
|
|
20772
|
-
|
|
20859
|
+
height: 100%;
|
|
20773
20860
|
`;
|
|
20774
|
-
var CoverIconGhost =
|
|
20861
|
+
var CoverIconGhost = import_react124.css`
|
|
20775
20862
|
position: absolute;
|
|
20776
20863
|
width: 60%;
|
|
20777
20864
|
height: auto;
|
|
@@ -20779,9 +20866,9 @@ var CoverIconGhost = import_react123.css`
|
|
|
20779
20866
|
opacity: 0.05;
|
|
20780
20867
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
20781
20868
|
`;
|
|
20782
|
-
var CoverSlot =
|
|
20869
|
+
var CoverSlot = import_react124.css`
|
|
20783
20870
|
align-items: center;
|
|
20784
|
-
background: var(--
|
|
20871
|
+
background: var(--gray-50);
|
|
20785
20872
|
display: flex;
|
|
20786
20873
|
justify-content: center;
|
|
20787
20874
|
position: absolute;
|
|
@@ -20790,15 +20877,15 @@ var CoverSlot = import_react123.css`
|
|
|
20790
20877
|
width: 24px;
|
|
20791
20878
|
height: 24px;
|
|
20792
20879
|
`;
|
|
20793
|
-
var CoverSlotLeft =
|
|
20880
|
+
var CoverSlotLeft = import_react124.css`
|
|
20794
20881
|
border-bottom-right-radius: var(--rounded-base);
|
|
20795
20882
|
left: var(--spacing-sm);
|
|
20796
20883
|
`;
|
|
20797
|
-
var CoverSlotRight =
|
|
20884
|
+
var CoverSlotRight = import_react124.css`
|
|
20798
20885
|
border-bottom-left-radius: var(--rounded-base);
|
|
20799
20886
|
right: var(--spacing-sm);
|
|
20800
20887
|
`;
|
|
20801
|
-
var CoverButton =
|
|
20888
|
+
var CoverButton = import_react124.css`
|
|
20802
20889
|
align-items: stretch;
|
|
20803
20890
|
border: none;
|
|
20804
20891
|
background: none;
|
|
@@ -20811,82 +20898,108 @@ var CoverButton = import_react123.css`
|
|
|
20811
20898
|
outline: none;
|
|
20812
20899
|
}
|
|
20813
20900
|
`;
|
|
20814
|
-
var
|
|
20815
|
-
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
20816
|
-
opacity: 0;
|
|
20901
|
+
var CoverSlotBottom = import_react124.css`
|
|
20817
20902
|
position: absolute;
|
|
20818
20903
|
bottom: var(--spacing-base);
|
|
20904
|
+
`;
|
|
20905
|
+
var CoverSlotBottomLeft = import_react124.css`
|
|
20906
|
+
left: var(--spacing-base);
|
|
20907
|
+
`;
|
|
20908
|
+
var CoverSlotBottomRight = import_react124.css`
|
|
20819
20909
|
right: var(--spacing-base);
|
|
20820
20910
|
`;
|
|
20911
|
+
var CoverSelectedChip = import_react124.css`
|
|
20912
|
+
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
20913
|
+
opacity: 0;
|
|
20914
|
+
`;
|
|
20821
20915
|
|
|
20822
20916
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
20823
20917
|
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20824
20918
|
var ObjectGridItemCardCover = (props) => {
|
|
20825
20919
|
if ("imageUrl" in props && props.imageUrl) {
|
|
20826
|
-
const { imageUrl } = props;
|
|
20827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20920
|
+
const { imageUrl, srcSet } = props;
|
|
20921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20828
20922
|
"img",
|
|
20829
20923
|
{
|
|
20830
20924
|
src: imageUrl,
|
|
20925
|
+
srcSet,
|
|
20926
|
+
alt: props.alt,
|
|
20831
20927
|
css: CoverImage,
|
|
20832
20928
|
loading: "lazy",
|
|
20833
20929
|
role: "presentation",
|
|
20834
|
-
"data-testid": "object-grid-item-thumbnail"
|
|
20930
|
+
"data-testid": "object-grid-item-thumbnail",
|
|
20931
|
+
...props
|
|
20835
20932
|
}
|
|
20836
|
-
);
|
|
20933
|
+
) });
|
|
20837
20934
|
}
|
|
20838
20935
|
if ("icon" in props && props.icon) {
|
|
20839
|
-
const { icon } = props;
|
|
20840
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
20841
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
20842
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
20843
|
-
] });
|
|
20936
|
+
const { icon, iconColor } = props;
|
|
20937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", ...props, children: [
|
|
20938
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", css: CoverIconGhost }),
|
|
20939
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", size: 48 })
|
|
20940
|
+
] }) });
|
|
20844
20941
|
}
|
|
20845
20942
|
};
|
|
20846
20943
|
var ObjectGridItemCover = ({
|
|
20847
20944
|
coverSlotLeft,
|
|
20848
20945
|
coverSlotRight,
|
|
20946
|
+
coverSlotBottomLeft,
|
|
20947
|
+
coverSlotBottomRight,
|
|
20849
20948
|
...props
|
|
20850
20949
|
}) => {
|
|
20851
20950
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
|
|
20852
20951
|
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20853
20952
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20854
|
-
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
20953
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
20954
|
+
coverSlotBottomLeft ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: [CoverSlotBottom, CoverSlotBottomLeft], children: coverSlotBottomLeft }) : null,
|
|
20955
|
+
coverSlotBottomRight ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: [CoverSlotBottom, CoverSlotBottomRight], children: coverSlotBottomRight }) : null
|
|
20855
20956
|
] });
|
|
20856
20957
|
};
|
|
20857
20958
|
var ObjectGridItemCoverButton = ({
|
|
20858
20959
|
id,
|
|
20859
20960
|
isSelected,
|
|
20860
20961
|
onSelection,
|
|
20861
|
-
coverSlotLeft,
|
|
20862
|
-
coverSlotRight,
|
|
20863
20962
|
selectedText = "selected",
|
|
20864
20963
|
...props
|
|
20865
20964
|
}) => {
|
|
20866
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20966
|
+
"button",
|
|
20967
|
+
{
|
|
20968
|
+
type: "button",
|
|
20969
|
+
css: CoverButton,
|
|
20970
|
+
onClick: (e) => {
|
|
20971
|
+
e.stopPropagation();
|
|
20972
|
+
onSelection(id);
|
|
20973
|
+
},
|
|
20974
|
+
"aria-selected": isSelected,
|
|
20975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20976
|
+
ObjectGridItemCover,
|
|
20977
|
+
{
|
|
20978
|
+
...props,
|
|
20979
|
+
coverSlotBottomRight: isSelected ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
20980
|
+
}
|
|
20981
|
+
)
|
|
20982
|
+
}
|
|
20983
|
+
);
|
|
20872
20984
|
};
|
|
20873
20985
|
|
|
20874
20986
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20875
20987
|
init_emotion_jsx_shim();
|
|
20876
|
-
var
|
|
20988
|
+
var import_react126 = require("react");
|
|
20877
20989
|
|
|
20878
20990
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
20879
20991
|
init_emotion_jsx_shim();
|
|
20880
|
-
var
|
|
20881
|
-
var ObjectGridItemHeading =
|
|
20992
|
+
var import_react125 = require("@emotion/react");
|
|
20993
|
+
var ObjectGridItemHeading = import_react125.css`
|
|
20994
|
+
color: var(--gray-500);
|
|
20882
20995
|
overflow: hidden;
|
|
20883
20996
|
text-overflow: ellipsis;
|
|
20884
|
-
white-space:
|
|
20885
|
-
|
|
20886
|
-
-
|
|
20887
|
-
-
|
|
20997
|
+
white-space: nowrap;
|
|
20998
|
+
min-width: 0;
|
|
20999
|
+
max-width: 100%;
|
|
21000
|
+
font-size: var(--fs-sm);
|
|
20888
21001
|
`;
|
|
20889
|
-
var PopoverContent =
|
|
21002
|
+
var PopoverContent = import_react125.css`
|
|
20890
21003
|
min-width: 50px;
|
|
20891
21004
|
`;
|
|
20892
21005
|
|
|
@@ -20895,11 +21008,16 @@ var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
|
20895
21008
|
var ObjectGridItemHeading2 = ({
|
|
20896
21009
|
heading,
|
|
20897
21010
|
beforeHeadingSlot,
|
|
20898
|
-
afterHeadingSlot
|
|
21011
|
+
afterHeadingSlot,
|
|
21012
|
+
tooltip,
|
|
21013
|
+
...props
|
|
20899
21014
|
}) => {
|
|
20900
|
-
const [hasTruncation, setHasTruncation] = (0,
|
|
20901
|
-
const headingRef = (0,
|
|
20902
|
-
|
|
21015
|
+
const [hasTruncation, setHasTruncation] = (0, import_react126.useState)(false);
|
|
21016
|
+
const headingRef = (0, import_react126.useRef)(null);
|
|
21017
|
+
const onStopPropagation = (e) => {
|
|
21018
|
+
e.stopPropagation();
|
|
21019
|
+
};
|
|
21020
|
+
(0, import_react126.useEffect)(() => {
|
|
20903
21021
|
const currentHeading = headingRef.current;
|
|
20904
21022
|
const observer = new ResizeObserver((entries) => {
|
|
20905
21023
|
for (const entry of entries) {
|
|
@@ -20916,10 +21034,10 @@ var ObjectGridItemHeading2 = ({
|
|
|
20916
21034
|
}
|
|
20917
21035
|
};
|
|
20918
21036
|
}, []);
|
|
20919
|
-
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
20920
|
-
beforeHeadingSlot,
|
|
20921
|
-
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: hasTruncation ?
|
|
20922
|
-
afterHeadingSlot
|
|
21037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", css: { minWidth: 0 }, children: [
|
|
21038
|
+
beforeHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(HorizontalRhythm, { gap: "xs", align: "center", onClick: onStopPropagation, children: beforeHeadingSlot }) : null,
|
|
21039
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: hasTruncation && tooltip ? tooltip : "", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, ...props, children: heading }) }),
|
|
21040
|
+
afterHeadingSlot ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(HorizontalRhythm, { gap: "xs", align: "center", onClick: onStopPropagation, children: afterHeadingSlot }) : null
|
|
20923
21041
|
] });
|
|
20924
21042
|
};
|
|
20925
21043
|
|
|
@@ -20930,9 +21048,10 @@ var ObjectGridItemIconWithTooltip = ({
|
|
|
20930
21048
|
tooltipTitle,
|
|
20931
21049
|
placement = "bottom-start",
|
|
20932
21050
|
icon,
|
|
20933
|
-
iconColor = "accent-dark"
|
|
21051
|
+
iconColor = "accent-dark",
|
|
21052
|
+
...props
|
|
20934
21053
|
}) => {
|
|
20935
|
-
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
21054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Tooltip, { title: tooltipTitle, placement, ...props, css: { minWidth: "max-content" }, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { css: { whiteSpace: "nowrap" }, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
20936
21055
|
};
|
|
20937
21056
|
|
|
20938
21057
|
// src/components/Objects/ObjectGridItemLoadingSkeleton.tsx
|
|
@@ -20940,15 +21059,15 @@ init_emotion_jsx_shim();
|
|
|
20940
21059
|
|
|
20941
21060
|
// src/components/Objects/styles/ObjectGridItemLoadingSkeleton.styles.ts
|
|
20942
21061
|
init_emotion_jsx_shim();
|
|
20943
|
-
var
|
|
20944
|
-
var ObjectGridItemLoadingSkeleton =
|
|
21062
|
+
var import_react127 = require("@emotion/react");
|
|
21063
|
+
var ObjectGridItemLoadingSkeleton = import_react127.css`
|
|
20945
21064
|
border-radius: var(--rounded-base);
|
|
20946
21065
|
display: flex;
|
|
20947
21066
|
flex-direction: column;
|
|
20948
21067
|
gap: var(--spacing-sm);
|
|
20949
21068
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
20950
21069
|
`;
|
|
20951
|
-
var ObjectGridItemLoadingText = (textLength) =>
|
|
21070
|
+
var ObjectGridItemLoadingText = (textLength) => import_react127.css`
|
|
20952
21071
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20953
21072
|
border-radius: var(--rounded-base);
|
|
20954
21073
|
background: var(--gray-300);
|
|
@@ -20956,7 +21075,7 @@ var ObjectGridItemLoadingText = (textLength) => import_react126.css`
|
|
|
20956
21075
|
width: clamp(24px, 100%, ${textLength});
|
|
20957
21076
|
height: var(--fs-base);
|
|
20958
21077
|
`;
|
|
20959
|
-
var ObjectGridItemLoadingImageWrapper =
|
|
21078
|
+
var ObjectGridItemLoadingImageWrapper = import_react127.css`
|
|
20960
21079
|
aspect-ratio: 16/9;
|
|
20961
21080
|
max-width: 100%;
|
|
20962
21081
|
max-height: 100%;
|
|
@@ -20964,7 +21083,7 @@ var ObjectGridItemLoadingImageWrapper = import_react126.css`
|
|
|
20964
21083
|
padding: var(--spacing-sm);
|
|
20965
21084
|
overflow: hidden;
|
|
20966
21085
|
`;
|
|
20967
|
-
var ObjectGridItemLoadingImage =
|
|
21086
|
+
var ObjectGridItemLoadingImage = import_react127.css`
|
|
20968
21087
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
20969
21088
|
border-radius: var(--rounded-base);
|
|
20970
21089
|
background: var(--gray-300);
|
|
@@ -20973,11 +21092,11 @@ var ObjectGridItemLoadingImage = import_react126.css`
|
|
|
20973
21092
|
height: auto;
|
|
20974
21093
|
aspect-ratio: 1;
|
|
20975
21094
|
`;
|
|
20976
|
-
var ObjectGridItemLoadingContentWrapper =
|
|
21095
|
+
var ObjectGridItemLoadingContentWrapper = import_react127.css`
|
|
20977
21096
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
20978
21097
|
min-height: 52px;
|
|
20979
21098
|
`;
|
|
20980
|
-
var ObjectGridItemLoadingContentContainer =
|
|
21099
|
+
var ObjectGridItemLoadingContentContainer = import_react127.css`
|
|
20981
21100
|
flex-grow: 1;
|
|
20982
21101
|
gap: var(--spacing-xs);
|
|
20983
21102
|
`;
|
|
@@ -21014,8 +21133,8 @@ init_emotion_jsx_shim();
|
|
|
21014
21133
|
|
|
21015
21134
|
// src/components/Objects/styles/ObjectListItem.styles.ts
|
|
21016
21135
|
init_emotion_jsx_shim();
|
|
21017
|
-
var
|
|
21018
|
-
var ObjectListItem =
|
|
21136
|
+
var import_react128 = require("@emotion/react");
|
|
21137
|
+
var ObjectListItem = import_react128.css`
|
|
21019
21138
|
background: var(--white);
|
|
21020
21139
|
display: grid;
|
|
21021
21140
|
gap: var(--spacing-sm);
|
|
@@ -21028,10 +21147,10 @@ var ObjectListItem = import_react127.css`
|
|
|
21028
21147
|
background: var(--gray-50);
|
|
21029
21148
|
}
|
|
21030
21149
|
`;
|
|
21031
|
-
var ObjectListItemSingle =
|
|
21150
|
+
var ObjectListItemSingle = import_react128.css`
|
|
21032
21151
|
align-items: center;
|
|
21033
21152
|
`;
|
|
21034
|
-
var ObjectListItemContentWrapper =
|
|
21153
|
+
var ObjectListItemContentWrapper = import_react128.css`
|
|
21035
21154
|
display: grid;
|
|
21036
21155
|
gap: var(--spacing-sm);
|
|
21037
21156
|
justify-content: space-between;
|
|
@@ -21041,16 +21160,16 @@ var ObjectListItemContentWrapper = import_react127.css`
|
|
|
21041
21160
|
grid-template-columns: auto 1fr auto;
|
|
21042
21161
|
}
|
|
21043
21162
|
`;
|
|
21044
|
-
var ObjectListItemRightSlot =
|
|
21163
|
+
var ObjectListItemRightSlot = import_react128.css`
|
|
21045
21164
|
display: flex;
|
|
21046
21165
|
gap: var(--spacing-sm);
|
|
21047
21166
|
`;
|
|
21048
|
-
var ObjectListItemContainer =
|
|
21167
|
+
var ObjectListItemContainer = import_react128.css`
|
|
21049
21168
|
> [role='listitem'] {
|
|
21050
21169
|
border-top: 1px solid var(--gray-200);
|
|
21051
21170
|
}
|
|
21052
21171
|
`;
|
|
21053
|
-
var ObjectListItemCover =
|
|
21172
|
+
var ObjectListItemCover = import_react128.css`
|
|
21054
21173
|
align-items: center;
|
|
21055
21174
|
background: var(--gray-100);
|
|
21056
21175
|
color: var(--gray-500);
|
|
@@ -21060,12 +21179,12 @@ var ObjectListItemCover = import_react127.css`
|
|
|
21060
21179
|
text-align: center;
|
|
21061
21180
|
font-size: var(--fs-xs);
|
|
21062
21181
|
`;
|
|
21063
|
-
var ObjectListItemImage =
|
|
21182
|
+
var ObjectListItemImage = import_react128.css`
|
|
21064
21183
|
object-fit: cover;
|
|
21065
21184
|
width: 100%;
|
|
21066
21185
|
height: 100%;
|
|
21067
21186
|
`;
|
|
21068
|
-
var ObjectListItemLoading =
|
|
21187
|
+
var ObjectListItemLoading = import_react128.css`
|
|
21069
21188
|
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
21070
21189
|
background: var(--white);
|
|
21071
21190
|
display: flex;
|
|
@@ -21073,10 +21192,10 @@ var ObjectListItemLoading = import_react127.css`
|
|
|
21073
21192
|
flex-grow: 1;
|
|
21074
21193
|
padding: var(--spacing-sm);
|
|
21075
21194
|
`;
|
|
21076
|
-
var ObjectListItemLoadingInner =
|
|
21195
|
+
var ObjectListItemLoadingInner = import_react128.css`
|
|
21077
21196
|
flex-grow: 1;
|
|
21078
21197
|
`;
|
|
21079
|
-
var ObjectListItemLoadingText = (textLength) =>
|
|
21198
|
+
var ObjectListItemLoadingText = (textLength) => import_react128.css`
|
|
21080
21199
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
21081
21200
|
border-radius: var(--rounded-base);
|
|
21082
21201
|
background: var(--gray-300);
|
|
@@ -21084,7 +21203,7 @@ var ObjectListItemLoadingText = (textLength) => import_react127.css`
|
|
|
21084
21203
|
width: clamp(10ch, 100%, ${textLength});
|
|
21085
21204
|
height: var(--fs-base);
|
|
21086
21205
|
`;
|
|
21087
|
-
var ObjectListItemLoadingImage =
|
|
21206
|
+
var ObjectListItemLoadingImage = import_react128.css`
|
|
21088
21207
|
animation: ${fadeIn} 1s linear infinite alternate;
|
|
21089
21208
|
border-radius: var(--rounded-base);
|
|
21090
21209
|
background: var(--gray-300);
|
|
@@ -21092,7 +21211,7 @@ var ObjectListItemLoadingImage = import_react127.css`
|
|
|
21092
21211
|
width: 80px;
|
|
21093
21212
|
height: 55px;
|
|
21094
21213
|
`;
|
|
21095
|
-
var ObjectListItemHeadingWrapper =
|
|
21214
|
+
var ObjectListItemHeadingWrapper = import_react128.css`
|
|
21096
21215
|
display: flex;
|
|
21097
21216
|
gap: var(--spacing-xs);
|
|
21098
21217
|
`;
|
|
@@ -21194,8 +21313,8 @@ init_emotion_jsx_shim();
|
|
|
21194
21313
|
|
|
21195
21314
|
// src/components/Objects/styles/ObjectListItemHeading.styles.ts
|
|
21196
21315
|
init_emotion_jsx_shim();
|
|
21197
|
-
var
|
|
21198
|
-
var ObjectListItemHeading =
|
|
21316
|
+
var import_react129 = require("@emotion/react");
|
|
21317
|
+
var ObjectListItemHeading = import_react129.css`
|
|
21199
21318
|
display: flex;
|
|
21200
21319
|
flex-direction: column;
|
|
21201
21320
|
gap: var(--spacing-xs);
|
|
@@ -21205,7 +21324,7 @@ var ObjectListItemHeading = import_react128.css`
|
|
|
21205
21324
|
flex-direction: row;
|
|
21206
21325
|
}
|
|
21207
21326
|
`;
|
|
21208
|
-
var ObjectListItemHeadingAfterWrapper =
|
|
21327
|
+
var ObjectListItemHeadingAfterWrapper = import_react129.css`
|
|
21209
21328
|
line-height: 1.25;
|
|
21210
21329
|
`;
|
|
21211
21330
|
|
|
@@ -21300,8 +21419,8 @@ function Pagination({
|
|
|
21300
21419
|
|
|
21301
21420
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
21302
21421
|
init_emotion_jsx_shim();
|
|
21303
|
-
var
|
|
21304
|
-
var ParameterShellContext = (0,
|
|
21422
|
+
var import_react130 = require("react");
|
|
21423
|
+
var ParameterShellContext = (0, import_react130.createContext)({
|
|
21305
21424
|
id: "",
|
|
21306
21425
|
label: "",
|
|
21307
21426
|
hiddenLabel: void 0,
|
|
@@ -21310,7 +21429,7 @@ var ParameterShellContext = (0, import_react129.createContext)({
|
|
|
21310
21429
|
}
|
|
21311
21430
|
});
|
|
21312
21431
|
var useParameterShell = () => {
|
|
21313
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
21432
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react130.useContext)(ParameterShellContext);
|
|
21314
21433
|
return {
|
|
21315
21434
|
id,
|
|
21316
21435
|
label,
|
|
@@ -21325,8 +21444,8 @@ init_emotion_jsx_shim();
|
|
|
21325
21444
|
|
|
21326
21445
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
21327
21446
|
init_emotion_jsx_shim();
|
|
21328
|
-
var
|
|
21329
|
-
var inputIconBtn =
|
|
21447
|
+
var import_react131 = require("@emotion/react");
|
|
21448
|
+
var inputIconBtn = import_react131.css`
|
|
21330
21449
|
align-items: center;
|
|
21331
21450
|
border: none;
|
|
21332
21451
|
border-radius: var(--rounded-base);
|
|
@@ -21395,8 +21514,8 @@ init_emotion_jsx_shim();
|
|
|
21395
21514
|
|
|
21396
21515
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
21397
21516
|
init_emotion_jsx_shim();
|
|
21398
|
-
var
|
|
21399
|
-
var inputContainer2 =
|
|
21517
|
+
var import_react132 = require("@emotion/react");
|
|
21518
|
+
var inputContainer2 = import_react132.css`
|
|
21400
21519
|
position: relative;
|
|
21401
21520
|
scroll-margin: var(--spacing-2xl);
|
|
21402
21521
|
|
|
@@ -21409,14 +21528,14 @@ var inputContainer2 = import_react131.css`
|
|
|
21409
21528
|
}
|
|
21410
21529
|
}
|
|
21411
21530
|
`;
|
|
21412
|
-
var labelText2 =
|
|
21531
|
+
var labelText2 = import_react132.css`
|
|
21413
21532
|
align-items: center;
|
|
21414
21533
|
display: flex;
|
|
21415
21534
|
gap: var(--spacing-xs);
|
|
21416
21535
|
font-weight: var(--fw-regular);
|
|
21417
21536
|
margin: 0 0 var(--spacing-xs);
|
|
21418
21537
|
`;
|
|
21419
|
-
var input3 =
|
|
21538
|
+
var input3 = import_react132.css`
|
|
21420
21539
|
display: block;
|
|
21421
21540
|
appearance: none;
|
|
21422
21541
|
box-sizing: border-box;
|
|
@@ -21464,18 +21583,18 @@ var input3 = import_react131.css`
|
|
|
21464
21583
|
color: var(--gray-400);
|
|
21465
21584
|
}
|
|
21466
21585
|
`;
|
|
21467
|
-
var selectInput =
|
|
21586
|
+
var selectInput = import_react132.css`
|
|
21468
21587
|
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath d='M6.34317 7.75732L4.92896 9.17154L12 16.2426L19.0711 9.17157L17.6569 7.75735L12 13.4142L6.34317 7.75732Z' fill='currentColor' /%3E%3C/svg%3E");
|
|
21469
21588
|
background-position: right var(--spacing-sm) center;
|
|
21470
21589
|
background-repeat: no-repeat;
|
|
21471
21590
|
background-size: 1rem;
|
|
21472
21591
|
padding-right: var(--spacing-xl);
|
|
21473
21592
|
`;
|
|
21474
|
-
var inputWrapper =
|
|
21593
|
+
var inputWrapper = import_react132.css`
|
|
21475
21594
|
display: flex; // used to correct overflow with chrome textarea
|
|
21476
21595
|
position: relative;
|
|
21477
21596
|
`;
|
|
21478
|
-
var inputIcon2 =
|
|
21597
|
+
var inputIcon2 = import_react132.css`
|
|
21479
21598
|
align-items: center;
|
|
21480
21599
|
background: var(--white);
|
|
21481
21600
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -21491,7 +21610,7 @@ var inputIcon2 = import_react131.css`
|
|
|
21491
21610
|
width: var(--spacing-lg);
|
|
21492
21611
|
z-index: var(--z-10);
|
|
21493
21612
|
`;
|
|
21494
|
-
var inputToggleLabel2 =
|
|
21613
|
+
var inputToggleLabel2 = import_react132.css`
|
|
21495
21614
|
--inline-label-color: var(--typography-base);
|
|
21496
21615
|
align-items: center;
|
|
21497
21616
|
cursor: pointer;
|
|
@@ -21506,7 +21625,7 @@ var inputToggleLabel2 = import_react131.css`
|
|
|
21506
21625
|
--inline-label-color: var(--gray-400);
|
|
21507
21626
|
}
|
|
21508
21627
|
`;
|
|
21509
|
-
var toggleInput2 =
|
|
21628
|
+
var toggleInput2 = import_react132.css`
|
|
21510
21629
|
appearance: none;
|
|
21511
21630
|
border: 1px solid var(--gray-200);
|
|
21512
21631
|
background: var(--white);
|
|
@@ -21560,7 +21679,7 @@ var toggleInput2 = import_react131.css`
|
|
|
21560
21679
|
border-color: var(--gray-300);
|
|
21561
21680
|
}
|
|
21562
21681
|
`;
|
|
21563
|
-
var inlineLabel2 =
|
|
21682
|
+
var inlineLabel2 = import_react132.css`
|
|
21564
21683
|
color: var(--inline-label-color);
|
|
21565
21684
|
padding-left: var(--spacing-md);
|
|
21566
21685
|
font-size: var(--fs-sm);
|
|
@@ -21577,7 +21696,7 @@ var inlineLabel2 = import_react131.css`
|
|
|
21577
21696
|
}
|
|
21578
21697
|
}
|
|
21579
21698
|
`;
|
|
21580
|
-
var inputMenu =
|
|
21699
|
+
var inputMenu = import_react132.css`
|
|
21581
21700
|
background: none;
|
|
21582
21701
|
border: none;
|
|
21583
21702
|
padding: var(--spacing-2xs);
|
|
@@ -21585,10 +21704,10 @@ var inputMenu = import_react131.css`
|
|
|
21585
21704
|
top: calc(var(--spacing-md) * -1.2);
|
|
21586
21705
|
right: 0;
|
|
21587
21706
|
`;
|
|
21588
|
-
var inputActionItems =
|
|
21707
|
+
var inputActionItems = import_react132.css`
|
|
21589
21708
|
display: flex;
|
|
21590
21709
|
`;
|
|
21591
|
-
var inputMenuHover =
|
|
21710
|
+
var inputMenuHover = import_react132.css`
|
|
21592
21711
|
opacity: var(--opacity-50);
|
|
21593
21712
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
21594
21713
|
|
|
@@ -21598,11 +21717,11 @@ var inputMenuHover = import_react131.css`
|
|
|
21598
21717
|
background-color: var(--gray-200);
|
|
21599
21718
|
}
|
|
21600
21719
|
`;
|
|
21601
|
-
var textarea2 =
|
|
21720
|
+
var textarea2 = import_react132.css`
|
|
21602
21721
|
resize: vertical;
|
|
21603
21722
|
min-height: 2rem;
|
|
21604
21723
|
`;
|
|
21605
|
-
var dataConnectButton =
|
|
21724
|
+
var dataConnectButton = import_react132.css`
|
|
21606
21725
|
align-items: center;
|
|
21607
21726
|
appearance: none;
|
|
21608
21727
|
box-sizing: border-box;
|
|
@@ -21638,7 +21757,7 @@ var dataConnectButton = import_react131.css`
|
|
|
21638
21757
|
pointer-events: none;
|
|
21639
21758
|
}
|
|
21640
21759
|
`;
|
|
21641
|
-
var linkParameterBtn =
|
|
21760
|
+
var linkParameterBtn = import_react132.css`
|
|
21642
21761
|
border-radius: var(--rounded-base);
|
|
21643
21762
|
background: transparent;
|
|
21644
21763
|
border: none;
|
|
@@ -21647,7 +21766,7 @@ var linkParameterBtn = import_react131.css`
|
|
|
21647
21766
|
font-size: var(--fs-sm);
|
|
21648
21767
|
line-height: 1;
|
|
21649
21768
|
`;
|
|
21650
|
-
var linkParameterControls =
|
|
21769
|
+
var linkParameterControls = import_react132.css`
|
|
21651
21770
|
position: absolute;
|
|
21652
21771
|
inset: 0 0 0 auto;
|
|
21653
21772
|
padding: 0 var(--spacing-base);
|
|
@@ -21656,7 +21775,7 @@ var linkParameterControls = import_react131.css`
|
|
|
21656
21775
|
justify-content: center;
|
|
21657
21776
|
gap: var(--spacing-base);
|
|
21658
21777
|
`;
|
|
21659
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
21778
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react132.css`
|
|
21660
21779
|
padding-right: calc(
|
|
21661
21780
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
21662
21781
|
var(--spacing-base)
|
|
@@ -21669,7 +21788,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react131.css`
|
|
|
21669
21788
|
}
|
|
21670
21789
|
}
|
|
21671
21790
|
`;
|
|
21672
|
-
var linkParameterIcon =
|
|
21791
|
+
var linkParameterIcon = import_react132.css`
|
|
21673
21792
|
align-items: center;
|
|
21674
21793
|
color: var(--brand-secondary-3);
|
|
21675
21794
|
display: flex;
|
|
@@ -21722,20 +21841,20 @@ init_emotion_jsx_shim();
|
|
|
21722
21841
|
|
|
21723
21842
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
21724
21843
|
init_emotion_jsx_shim();
|
|
21725
|
-
var
|
|
21726
|
-
var ParameterDrawerHeaderContainer =
|
|
21844
|
+
var import_react133 = require("@emotion/react");
|
|
21845
|
+
var ParameterDrawerHeaderContainer = import_react133.css`
|
|
21727
21846
|
align-items: center;
|
|
21728
21847
|
display: flex;
|
|
21729
21848
|
gap: var(--spacing-base);
|
|
21730
21849
|
justify-content: space-between;
|
|
21731
21850
|
margin-bottom: var(--spacing-sm);
|
|
21732
21851
|
`;
|
|
21733
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
21852
|
+
var ParameterDrawerHeaderTitleGroup = import_react133.css`
|
|
21734
21853
|
align-items: center;
|
|
21735
21854
|
display: flex;
|
|
21736
21855
|
gap: var(--spacing-sm);
|
|
21737
21856
|
`;
|
|
21738
|
-
var ParameterDrawerHeaderTitle =
|
|
21857
|
+
var ParameterDrawerHeaderTitle = import_react133.css`
|
|
21739
21858
|
text-overflow: ellipsis;
|
|
21740
21859
|
white-space: nowrap;
|
|
21741
21860
|
overflow: hidden;
|
|
@@ -21756,12 +21875,12 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
21756
21875
|
|
|
21757
21876
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
21758
21877
|
init_emotion_jsx_shim();
|
|
21759
|
-
var
|
|
21878
|
+
var import_react135 = require("react");
|
|
21760
21879
|
|
|
21761
21880
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
21762
21881
|
init_emotion_jsx_shim();
|
|
21763
|
-
var
|
|
21764
|
-
var fieldsetStyles =
|
|
21882
|
+
var import_react134 = require("@emotion/react");
|
|
21883
|
+
var fieldsetStyles = import_react134.css`
|
|
21765
21884
|
&:disabled,
|
|
21766
21885
|
[readonly] {
|
|
21767
21886
|
pointer-events: none;
|
|
@@ -21772,7 +21891,7 @@ var fieldsetStyles = import_react133.css`
|
|
|
21772
21891
|
}
|
|
21773
21892
|
}
|
|
21774
21893
|
`;
|
|
21775
|
-
var fieldsetLegend2 =
|
|
21894
|
+
var fieldsetLegend2 = import_react134.css`
|
|
21776
21895
|
display: block;
|
|
21777
21896
|
font-weight: var(--fw-medium);
|
|
21778
21897
|
margin-bottom: var(--spacing-sm);
|
|
@@ -21781,7 +21900,7 @@ var fieldsetLegend2 = import_react133.css`
|
|
|
21781
21900
|
|
|
21782
21901
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
21783
21902
|
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
21784
|
-
var ParameterGroup = (0,
|
|
21903
|
+
var ParameterGroup = (0, import_react135.forwardRef)(
|
|
21785
21904
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
21786
21905
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
21787
21906
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
@@ -21792,24 +21911,24 @@ var ParameterGroup = (0, import_react134.forwardRef)(
|
|
|
21792
21911
|
|
|
21793
21912
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
21794
21913
|
init_emotion_jsx_shim();
|
|
21795
|
-
var
|
|
21914
|
+
var import_react142 = require("react");
|
|
21796
21915
|
|
|
21797
21916
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
21798
21917
|
init_emotion_jsx_shim();
|
|
21799
|
-
var
|
|
21918
|
+
var import_react137 = require("react");
|
|
21800
21919
|
var import_react_dom2 = require("react-dom");
|
|
21801
21920
|
|
|
21802
21921
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
21803
21922
|
init_emotion_jsx_shim();
|
|
21804
|
-
var
|
|
21805
|
-
var previewWrapper =
|
|
21923
|
+
var import_react136 = require("@emotion/react");
|
|
21924
|
+
var previewWrapper = import_react136.css`
|
|
21806
21925
|
margin-top: var(--spacing-xs);
|
|
21807
21926
|
background: var(--gray-50);
|
|
21808
21927
|
padding: var(--spacing-sm);
|
|
21809
21928
|
border: solid 1px var(--gray-300);
|
|
21810
21929
|
border-radius: var(--rounded-sm);
|
|
21811
21930
|
`;
|
|
21812
|
-
var previewLink =
|
|
21931
|
+
var previewLink = import_react136.css`
|
|
21813
21932
|
display: block;
|
|
21814
21933
|
width: 100%;
|
|
21815
21934
|
|
|
@@ -21817,7 +21936,7 @@ var previewLink = import_react135.css`
|
|
|
21817
21936
|
max-height: 9rem;
|
|
21818
21937
|
}
|
|
21819
21938
|
`;
|
|
21820
|
-
var previewModalWrapper =
|
|
21939
|
+
var previewModalWrapper = import_react136.css`
|
|
21821
21940
|
background: var(--gray-50);
|
|
21822
21941
|
display: flex;
|
|
21823
21942
|
height: 100%;
|
|
@@ -21826,7 +21945,7 @@ var previewModalWrapper = import_react135.css`
|
|
|
21826
21945
|
border: solid 1px var(--gray-300);
|
|
21827
21946
|
border-radius: var(--rounded-sm);
|
|
21828
21947
|
`;
|
|
21829
|
-
var previewModalImage =
|
|
21948
|
+
var previewModalImage = import_react136.css`
|
|
21830
21949
|
display: flex;
|
|
21831
21950
|
height: 100%;
|
|
21832
21951
|
width: 100%;
|
|
@@ -21840,7 +21959,7 @@ var previewModalImage = import_react135.css`
|
|
|
21840
21959
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
21841
21960
|
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
21842
21961
|
function ParameterImagePreview({ imageSrc }) {
|
|
21843
|
-
const [showModal, setShowModal] = (0,
|
|
21962
|
+
const [showModal, setShowModal] = (0, import_react137.useState)(false);
|
|
21844
21963
|
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: previewWrapper, children: [
|
|
21845
21964
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
21846
21965
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
@@ -21872,8 +21991,8 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
21872
21991
|
|
|
21873
21992
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
21874
21993
|
init_emotion_jsx_shim();
|
|
21875
|
-
var
|
|
21876
|
-
var
|
|
21994
|
+
var import_react140 = require("@emotion/react");
|
|
21995
|
+
var import_react141 = require("react");
|
|
21877
21996
|
|
|
21878
21997
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
21879
21998
|
init_emotion_jsx_shim();
|
|
@@ -21884,9 +22003,9 @@ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
|
|
|
21884
22003
|
|
|
21885
22004
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
21886
22005
|
init_emotion_jsx_shim();
|
|
21887
|
-
var
|
|
22006
|
+
var import_react138 = require("react");
|
|
21888
22007
|
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
21889
|
-
var ParameterMenuButton = (0,
|
|
22008
|
+
var ParameterMenuButton = (0, import_react138.forwardRef)(
|
|
21890
22009
|
({ label, children }, ref) => {
|
|
21891
22010
|
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
21892
22011
|
Menu,
|
|
@@ -21911,14 +22030,14 @@ var ParameterMenuButton = (0, import_react137.forwardRef)(
|
|
|
21911
22030
|
|
|
21912
22031
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
21913
22032
|
init_emotion_jsx_shim();
|
|
21914
|
-
var
|
|
21915
|
-
var emptyParameterShell =
|
|
22033
|
+
var import_react139 = require("@emotion/react");
|
|
22034
|
+
var emptyParameterShell = import_react139.css`
|
|
21916
22035
|
border-radius: var(--rounded-sm);
|
|
21917
22036
|
flex-grow: 1;
|
|
21918
22037
|
position: relative;
|
|
21919
22038
|
max-width: 100%;
|
|
21920
22039
|
`;
|
|
21921
|
-
var emptyParameterShellText =
|
|
22040
|
+
var emptyParameterShellText = import_react139.css`
|
|
21922
22041
|
background: var(--brand-secondary-6);
|
|
21923
22042
|
border-radius: var(--rounded-sm);
|
|
21924
22043
|
padding: var(--spacing-sm);
|
|
@@ -21926,7 +22045,7 @@ var emptyParameterShellText = import_react138.css`
|
|
|
21926
22045
|
font-size: var(--fs-sm);
|
|
21927
22046
|
margin: 0;
|
|
21928
22047
|
`;
|
|
21929
|
-
var overrideMarker =
|
|
22048
|
+
var overrideMarker = import_react139.css`
|
|
21930
22049
|
border-radius: var(--rounded-sm);
|
|
21931
22050
|
border: 10px solid var(--gray-300);
|
|
21932
22051
|
border-left-color: transparent;
|
|
@@ -21997,7 +22116,7 @@ var ParameterShell = ({
|
|
|
21997
22116
|
isParameterGroup = false,
|
|
21998
22117
|
...props
|
|
21999
22118
|
}) => {
|
|
22000
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
22119
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react141.useState)(void 0);
|
|
22001
22120
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
22002
22121
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
22003
22122
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
@@ -22018,7 +22137,7 @@ var ParameterShell = ({
|
|
|
22018
22137
|
css: [
|
|
22019
22138
|
inputMenu,
|
|
22020
22139
|
inputActionItems,
|
|
22021
|
-
menuItems ?
|
|
22140
|
+
menuItems ? import_react140.css`
|
|
22022
22141
|
right: var(--spacing-md);
|
|
22023
22142
|
` : void 0
|
|
22024
22143
|
],
|
|
@@ -22063,7 +22182,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime1
|
|
|
22063
22182
|
|
|
22064
22183
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
22065
22184
|
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
22066
|
-
var ParameterImage = (0,
|
|
22185
|
+
var ParameterImage = (0, import_react142.forwardRef)(
|
|
22067
22186
|
({ children, ...props }, ref) => {
|
|
22068
22187
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22069
22188
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -22072,10 +22191,10 @@ var ParameterImage = (0, import_react141.forwardRef)(
|
|
|
22072
22191
|
] });
|
|
22073
22192
|
}
|
|
22074
22193
|
);
|
|
22075
|
-
var ParameterImageInner = (0,
|
|
22194
|
+
var ParameterImageInner = (0, import_react142.forwardRef)((props, ref) => {
|
|
22076
22195
|
const { value } = props;
|
|
22077
22196
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
22078
|
-
const deferredValue = (0,
|
|
22197
|
+
const deferredValue = (0, import_react142.useDeferredValue)(value);
|
|
22079
22198
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
22080
22199
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22081
22200
|
"input",
|
|
@@ -22095,13 +22214,13 @@ var ParameterImageInner = (0, import_react141.forwardRef)((props, ref) => {
|
|
|
22095
22214
|
|
|
22096
22215
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
22097
22216
|
init_emotion_jsx_shim();
|
|
22098
|
-
var
|
|
22217
|
+
var import_react143 = require("react");
|
|
22099
22218
|
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
22100
|
-
var ParameterInput = (0,
|
|
22219
|
+
var ParameterInput = (0, import_react143.forwardRef)((props, ref) => {
|
|
22101
22220
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22102
22221
|
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
22103
22222
|
});
|
|
22104
|
-
var ParameterInputInner = (0,
|
|
22223
|
+
var ParameterInputInner = (0, import_react143.forwardRef)(
|
|
22105
22224
|
({ ...props }, ref) => {
|
|
22106
22225
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
22107
22226
|
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
@@ -22121,9 +22240,9 @@ var ParameterInputInner = (0, import_react142.forwardRef)(
|
|
|
22121
22240
|
|
|
22122
22241
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
22123
22242
|
init_emotion_jsx_shim();
|
|
22124
|
-
var
|
|
22243
|
+
var import_react144 = require("react");
|
|
22125
22244
|
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
22126
|
-
var ParameterLink = (0,
|
|
22245
|
+
var ParameterLink = (0, import_react144.forwardRef)(
|
|
22127
22246
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
22128
22247
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22129
22248
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
@@ -22146,7 +22265,7 @@ var ParameterLink = (0, import_react143.forwardRef)(
|
|
|
22146
22265
|
);
|
|
22147
22266
|
}
|
|
22148
22267
|
);
|
|
22149
|
-
var ParameterLinkInner = (0,
|
|
22268
|
+
var ParameterLinkInner = (0, import_react144.forwardRef)(
|
|
22150
22269
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
22151
22270
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
22152
22271
|
if (!props.value)
|
|
@@ -22173,6 +22292,7 @@ var ParameterLinkInner = (0, import_react143.forwardRef)(
|
|
|
22173
22292
|
disabled: disabled2,
|
|
22174
22293
|
onClick: onConnectLink,
|
|
22175
22294
|
title: "edit current selection",
|
|
22295
|
+
"data-testid": "edit-current-selection",
|
|
22176
22296
|
children: "edit"
|
|
22177
22297
|
}
|
|
22178
22298
|
),
|
|
@@ -22331,7 +22451,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
22331
22451
|
|
|
22332
22452
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22333
22453
|
init_emotion_jsx_shim();
|
|
22334
|
-
var
|
|
22454
|
+
var import_react158 = require("@emotion/react");
|
|
22335
22455
|
var import_list3 = require("@lexical/list");
|
|
22336
22456
|
var import_markdown = require("@lexical/markdown");
|
|
22337
22457
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -22454,7 +22574,7 @@ var getLabelForElement = (type) => {
|
|
|
22454
22574
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22455
22575
|
var import_fast_equals2 = require("fast-equals");
|
|
22456
22576
|
var import_lexical10 = require("lexical");
|
|
22457
|
-
var
|
|
22577
|
+
var import_react159 = require("react");
|
|
22458
22578
|
|
|
22459
22579
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
22460
22580
|
init_emotion_jsx_shim();
|
|
@@ -22477,10 +22597,10 @@ init_emotion_jsx_shim();
|
|
|
22477
22597
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
22478
22598
|
var import_utils5 = require("@lexical/utils");
|
|
22479
22599
|
var import_lexical = require("lexical");
|
|
22480
|
-
var
|
|
22600
|
+
var import_react145 = require("react");
|
|
22481
22601
|
function DisableStylesPlugin() {
|
|
22482
22602
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
22483
|
-
(0,
|
|
22603
|
+
(0, import_react145.useEffect)(() => {
|
|
22484
22604
|
return (0, import_utils5.mergeRegister)(
|
|
22485
22605
|
// Disable text alignment on paragraph nodes
|
|
22486
22606
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -22741,10 +22861,10 @@ init_emotion_jsx_shim();
|
|
|
22741
22861
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
22742
22862
|
var import_utils6 = require("@lexical/utils");
|
|
22743
22863
|
var import_lexical2 = require("lexical");
|
|
22744
|
-
var
|
|
22864
|
+
var import_react146 = require("react");
|
|
22745
22865
|
var ImprovedAssetSelectionPlugin = () => {
|
|
22746
22866
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
22747
|
-
(0,
|
|
22867
|
+
(0, import_react146.useEffect)(() => {
|
|
22748
22868
|
editor.getRootElement();
|
|
22749
22869
|
const onRootClick = (event) => {
|
|
22750
22870
|
if (event.target !== editor.getRootElement()) {
|
|
@@ -22793,13 +22913,13 @@ var ImprovedAssetSelectionPlugin_default = ImprovedAssetSelectionPlugin;
|
|
|
22793
22913
|
|
|
22794
22914
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
22795
22915
|
init_emotion_jsx_shim();
|
|
22796
|
-
var
|
|
22916
|
+
var import_react147 = require("@emotion/react");
|
|
22797
22917
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
22798
22918
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
22799
22919
|
var import_utils7 = require("@lexical/utils");
|
|
22800
22920
|
var import_fast_equals = require("fast-equals");
|
|
22801
22921
|
var import_lexical4 = require("lexical");
|
|
22802
|
-
var
|
|
22922
|
+
var import_react148 = require("react");
|
|
22803
22923
|
|
|
22804
22924
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
22805
22925
|
init_emotion_jsx_shim();
|
|
@@ -23126,16 +23246,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical4.createCommand)(
|
|
|
23126
23246
|
);
|
|
23127
23247
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
23128
23248
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
23129
|
-
var linkPopover =
|
|
23249
|
+
var linkPopover = import_react147.css`
|
|
23130
23250
|
position: absolute;
|
|
23131
23251
|
z-index: 11;
|
|
23132
23252
|
`;
|
|
23133
|
-
var linkPopoverContainer =
|
|
23253
|
+
var linkPopoverContainer = import_react147.css`
|
|
23134
23254
|
${Popover()};
|
|
23135
23255
|
align-items: center;
|
|
23136
23256
|
display: flex;
|
|
23137
23257
|
`;
|
|
23138
|
-
var linkPopoverAnchor =
|
|
23258
|
+
var linkPopoverAnchor = import_react147.css`
|
|
23139
23259
|
${link}
|
|
23140
23260
|
${linkColorDefault}
|
|
23141
23261
|
`;
|
|
@@ -23148,17 +23268,17 @@ function LinkNodePlugin({
|
|
|
23148
23268
|
return path;
|
|
23149
23269
|
};
|
|
23150
23270
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
23151
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
23152
|
-
const linkPopoverElRef = (0,
|
|
23153
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
23154
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
23155
|
-
(0,
|
|
23271
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react148.useState)();
|
|
23272
|
+
const linkPopoverElRef = (0, import_react148.useRef)(null);
|
|
23273
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react148.useState)(false);
|
|
23274
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react148.useState)(false);
|
|
23275
|
+
(0, import_react148.useEffect)(() => {
|
|
23156
23276
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
23157
23277
|
setLinkPopoverState(void 0);
|
|
23158
23278
|
return;
|
|
23159
23279
|
}
|
|
23160
23280
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
23161
|
-
(0,
|
|
23281
|
+
(0, import_react148.useEffect)(() => {
|
|
23162
23282
|
if (!editor.hasNodes([LinkNode])) {
|
|
23163
23283
|
throw new Error("LinkNode not registered on editor");
|
|
23164
23284
|
}
|
|
@@ -23262,7 +23382,7 @@ function LinkNodePlugin({
|
|
|
23262
23382
|
)
|
|
23263
23383
|
);
|
|
23264
23384
|
}, [editor, onConnectLink]);
|
|
23265
|
-
const maybeShowLinkToolbar = (0,
|
|
23385
|
+
const maybeShowLinkToolbar = (0, import_react148.useCallback)(() => {
|
|
23266
23386
|
if (!editor.isEditable()) {
|
|
23267
23387
|
return;
|
|
23268
23388
|
}
|
|
@@ -23296,7 +23416,7 @@ function LinkNodePlugin({
|
|
|
23296
23416
|
}
|
|
23297
23417
|
});
|
|
23298
23418
|
}, [editor, positioningAnchorEl]);
|
|
23299
|
-
(0,
|
|
23419
|
+
(0, import_react148.useEffect)(() => {
|
|
23300
23420
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
23301
23421
|
requestAnimationFrame(() => {
|
|
23302
23422
|
editorState.read(() => {
|
|
@@ -23384,7 +23504,7 @@ var import_list = require("@lexical/list");
|
|
|
23384
23504
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
23385
23505
|
var import_utils10 = require("@lexical/utils");
|
|
23386
23506
|
var import_lexical5 = require("lexical");
|
|
23387
|
-
var
|
|
23507
|
+
var import_react149 = require("react");
|
|
23388
23508
|
function isIndentPermitted(maxDepth) {
|
|
23389
23509
|
const selection = (0, import_lexical5.$getSelection)();
|
|
23390
23510
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
@@ -23439,8 +23559,8 @@ function $indentOverTab(selection) {
|
|
|
23439
23559
|
}
|
|
23440
23560
|
function ListIndentPlugin({ maxDepth }) {
|
|
23441
23561
|
const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
|
|
23442
|
-
const isInListItemNode = (0,
|
|
23443
|
-
(0,
|
|
23562
|
+
const isInListItemNode = (0, import_react149.useRef)(false);
|
|
23563
|
+
(0, import_react149.useEffect)(() => {
|
|
23444
23564
|
return editor.registerCommand(
|
|
23445
23565
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
23446
23566
|
() => {
|
|
@@ -23457,7 +23577,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
23457
23577
|
import_lexical5.COMMAND_PRIORITY_NORMAL
|
|
23458
23578
|
);
|
|
23459
23579
|
}, [editor]);
|
|
23460
|
-
(0,
|
|
23580
|
+
(0, import_react149.useEffect)(() => {
|
|
23461
23581
|
return (0, import_utils10.mergeRegister)(
|
|
23462
23582
|
editor.registerCommand(
|
|
23463
23583
|
import_lexical5.INDENT_CONTENT_COMMAND,
|
|
@@ -23487,12 +23607,12 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
23487
23607
|
|
|
23488
23608
|
// src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
|
|
23489
23609
|
init_emotion_jsx_shim();
|
|
23490
|
-
var
|
|
23610
|
+
var import_react150 = require("@emotion/react");
|
|
23491
23611
|
var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
|
|
23492
23612
|
var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
|
|
23493
23613
|
var import_table = require("@lexical/table");
|
|
23494
23614
|
var import_lexical6 = require("lexical");
|
|
23495
|
-
var
|
|
23615
|
+
var import_react151 = require("react");
|
|
23496
23616
|
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23497
23617
|
function computeSelectionCount(selection) {
|
|
23498
23618
|
const selectionShape = selection.getShape();
|
|
@@ -23501,14 +23621,14 @@ function computeSelectionCount(selection) {
|
|
|
23501
23621
|
rows: selectionShape.toY - selectionShape.fromY + 1
|
|
23502
23622
|
};
|
|
23503
23623
|
}
|
|
23504
|
-
var tableActionMenuTrigger =
|
|
23624
|
+
var tableActionMenuTrigger = import_react150.css`
|
|
23505
23625
|
position: absolute;
|
|
23506
23626
|
transform: translate(calc(-100% - 1px), 1px);
|
|
23507
23627
|
`;
|
|
23508
|
-
var TableActionMenuTrigger = (0,
|
|
23628
|
+
var TableActionMenuTrigger = (0, import_react151.forwardRef)((props, ref) => {
|
|
23509
23629
|
const { tableCellEl, positioningAnchorEl, ...rest } = props;
|
|
23510
|
-
const [coordinates, setCoordinates] = (0,
|
|
23511
|
-
(0,
|
|
23630
|
+
const [coordinates, setCoordinates] = (0, import_react151.useState)({ x: 0, y: 0 });
|
|
23631
|
+
(0, import_react151.useLayoutEffect)(() => {
|
|
23512
23632
|
const rect = tableCellEl.getBoundingClientRect();
|
|
23513
23633
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
23514
23634
|
const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
|
|
@@ -23541,16 +23661,16 @@ function TableActionMenu({
|
|
|
23541
23661
|
positioningAnchorEl
|
|
23542
23662
|
}) {
|
|
23543
23663
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
23544
|
-
const [tableCellNode, updateTableCellNode] = (0,
|
|
23545
|
-
const [selectionCounts, updateSelectionCounts] = (0,
|
|
23664
|
+
const [tableCellNode, updateTableCellNode] = (0, import_react151.useState)(_tableCellNode);
|
|
23665
|
+
const [selectionCounts, updateSelectionCounts] = (0, import_react151.useState)({
|
|
23546
23666
|
columns: 1,
|
|
23547
23667
|
rows: 1
|
|
23548
23668
|
});
|
|
23549
|
-
const [menuTriggerKey, setMenuTriggerKey] = (0,
|
|
23669
|
+
const [menuTriggerKey, setMenuTriggerKey] = (0, import_react151.useState)(0);
|
|
23550
23670
|
const incrementMenuTriggerKey = () => {
|
|
23551
23671
|
setMenuTriggerKey((key) => key += 1);
|
|
23552
23672
|
};
|
|
23553
|
-
(0,
|
|
23673
|
+
(0, import_react151.useEffect)(() => {
|
|
23554
23674
|
return editor.registerMutationListener(
|
|
23555
23675
|
import_table.TableCellNode,
|
|
23556
23676
|
(nodeMutations) => {
|
|
@@ -23564,7 +23684,7 @@ function TableActionMenu({
|
|
|
23564
23684
|
{ skipInitialization: true }
|
|
23565
23685
|
);
|
|
23566
23686
|
}, [editor, tableCellNode]);
|
|
23567
|
-
(0,
|
|
23687
|
+
(0, import_react151.useEffect)(() => {
|
|
23568
23688
|
editor.getEditorState().read(() => {
|
|
23569
23689
|
const selection = (0, import_lexical6.$getSelection)();
|
|
23570
23690
|
if ((0, import_table.$isTableSelection)(selection)) {
|
|
@@ -23572,7 +23692,7 @@ function TableActionMenu({
|
|
|
23572
23692
|
}
|
|
23573
23693
|
});
|
|
23574
23694
|
}, [editor]);
|
|
23575
|
-
const clearTableSelection = (0,
|
|
23695
|
+
const clearTableSelection = (0, import_react151.useCallback)(() => {
|
|
23576
23696
|
editor.update(() => {
|
|
23577
23697
|
if (tableCellNode.isAttached()) {
|
|
23578
23698
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
@@ -23593,7 +23713,7 @@ function TableActionMenu({
|
|
|
23593
23713
|
rootNode.selectStart();
|
|
23594
23714
|
});
|
|
23595
23715
|
}, [editor, tableCellNode]);
|
|
23596
|
-
const insertTableRowAtSelection = (0,
|
|
23716
|
+
const insertTableRowAtSelection = (0, import_react151.useCallback)(
|
|
23597
23717
|
(shouldInsertAfter) => {
|
|
23598
23718
|
editor.update(() => {
|
|
23599
23719
|
(0, import_table.$insertTableRow__EXPERIMENTAL)(shouldInsertAfter);
|
|
@@ -23602,7 +23722,7 @@ function TableActionMenu({
|
|
|
23602
23722
|
},
|
|
23603
23723
|
[editor]
|
|
23604
23724
|
);
|
|
23605
|
-
const insertTableColumnAtSelection = (0,
|
|
23725
|
+
const insertTableColumnAtSelection = (0, import_react151.useCallback)(
|
|
23606
23726
|
(shouldInsertAfter) => {
|
|
23607
23727
|
editor.update(() => {
|
|
23608
23728
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
@@ -23613,26 +23733,26 @@ function TableActionMenu({
|
|
|
23613
23733
|
},
|
|
23614
23734
|
[editor, selectionCounts.columns]
|
|
23615
23735
|
);
|
|
23616
|
-
const deleteTableRowAtSelection = (0,
|
|
23736
|
+
const deleteTableRowAtSelection = (0, import_react151.useCallback)(() => {
|
|
23617
23737
|
editor.update(() => {
|
|
23618
23738
|
(0, import_table.$deleteTableRow__EXPERIMENTAL)();
|
|
23619
23739
|
});
|
|
23620
23740
|
incrementMenuTriggerKey();
|
|
23621
23741
|
}, [editor]);
|
|
23622
|
-
const deleteTableAtSelection = (0,
|
|
23742
|
+
const deleteTableAtSelection = (0, import_react151.useCallback)(() => {
|
|
23623
23743
|
editor.update(() => {
|
|
23624
23744
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
23625
23745
|
tableNode.remove();
|
|
23626
23746
|
clearTableSelection();
|
|
23627
23747
|
});
|
|
23628
23748
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
23629
|
-
const deleteTableColumnAtSelection = (0,
|
|
23749
|
+
const deleteTableColumnAtSelection = (0, import_react151.useCallback)(() => {
|
|
23630
23750
|
editor.update(() => {
|
|
23631
23751
|
(0, import_table.$deleteTableColumn__EXPERIMENTAL)();
|
|
23632
23752
|
});
|
|
23633
23753
|
incrementMenuTriggerKey();
|
|
23634
23754
|
}, [editor]);
|
|
23635
|
-
const toggleTableRowIsHeader = (0,
|
|
23755
|
+
const toggleTableRowIsHeader = (0, import_react151.useCallback)(() => {
|
|
23636
23756
|
editor.update(() => {
|
|
23637
23757
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
23638
23758
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
@@ -23653,7 +23773,7 @@ function TableActionMenu({
|
|
|
23653
23773
|
clearTableSelection();
|
|
23654
23774
|
});
|
|
23655
23775
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
23656
|
-
const toggleTableColumnIsHeader = (0,
|
|
23776
|
+
const toggleTableColumnIsHeader = (0, import_react151.useCallback)(() => {
|
|
23657
23777
|
editor.update(() => {
|
|
23658
23778
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
23659
23779
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
@@ -23680,7 +23800,7 @@ function TableActionMenu({
|
|
|
23680
23800
|
clearTableSelection();
|
|
23681
23801
|
});
|
|
23682
23802
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
23683
|
-
const menuItemCss = (0,
|
|
23803
|
+
const menuItemCss = (0, import_react150.css)({
|
|
23684
23804
|
fontSize: "var(--fs-sm)"
|
|
23685
23805
|
});
|
|
23686
23806
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
@@ -23751,10 +23871,10 @@ function TableCellActionMenuContainer({
|
|
|
23751
23871
|
positioningAnchorEl
|
|
23752
23872
|
}) {
|
|
23753
23873
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
23754
|
-
const [tableCellNode, setTableMenuCellNode] = (0,
|
|
23755
|
-
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0,
|
|
23756
|
-
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0,
|
|
23757
|
-
(0,
|
|
23874
|
+
const [tableCellNode, setTableMenuCellNode] = (0, import_react151.useState)(null);
|
|
23875
|
+
const [tableCellNodeEl, _setTableMenuCellNodeEl] = (0, import_react151.useState)(null);
|
|
23876
|
+
const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = (0, import_react151.useState)(null);
|
|
23877
|
+
(0, import_react151.useEffect)(() => {
|
|
23758
23878
|
const newPortalEl = document.createElement("div");
|
|
23759
23879
|
setTableMenuCellMenuPortalEl(newPortalEl);
|
|
23760
23880
|
menuPortalEl.appendChild(newPortalEl);
|
|
@@ -23762,14 +23882,14 @@ function TableCellActionMenuContainer({
|
|
|
23762
23882
|
newPortalEl.remove();
|
|
23763
23883
|
};
|
|
23764
23884
|
}, [menuPortalEl]);
|
|
23765
|
-
const setTableMenuCellNodeElem = (0,
|
|
23885
|
+
const setTableMenuCellNodeElem = (0, import_react151.useCallback)((elem) => {
|
|
23766
23886
|
if (elem) {
|
|
23767
23887
|
_setTableMenuCellNodeEl(elem);
|
|
23768
23888
|
} else {
|
|
23769
23889
|
_setTableMenuCellNodeEl(null);
|
|
23770
23890
|
}
|
|
23771
23891
|
}, []);
|
|
23772
|
-
const $moveMenu = (0,
|
|
23892
|
+
const $moveMenu = (0, import_react151.useCallback)(() => {
|
|
23773
23893
|
const selection = (0, import_lexical6.$getSelection)();
|
|
23774
23894
|
const nativeSelection = window.getSelection();
|
|
23775
23895
|
const activeElement = document.activeElement;
|
|
@@ -23798,7 +23918,7 @@ function TableCellActionMenuContainer({
|
|
|
23798
23918
|
setTableMenuCellNodeElem(null);
|
|
23799
23919
|
}
|
|
23800
23920
|
}, [editor, setTableMenuCellNodeElem]);
|
|
23801
|
-
(0,
|
|
23921
|
+
(0, import_react151.useEffect)(() => {
|
|
23802
23922
|
return editor.registerUpdateListener(() => {
|
|
23803
23923
|
editor.getEditorState().read(() => {
|
|
23804
23924
|
$moveMenu();
|
|
@@ -23826,18 +23946,18 @@ function TableActionMenuPlugin({
|
|
|
23826
23946
|
|
|
23827
23947
|
// src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
|
|
23828
23948
|
init_emotion_jsx_shim();
|
|
23829
|
-
var
|
|
23949
|
+
var import_react152 = require("@emotion/react");
|
|
23830
23950
|
var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
|
|
23831
23951
|
var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
|
|
23832
23952
|
var import_table2 = require("@lexical/table");
|
|
23833
23953
|
var import_utils12 = require("@lexical/utils");
|
|
23834
23954
|
var import_lexical7 = require("lexical");
|
|
23835
|
-
var
|
|
23955
|
+
var import_react153 = require("react");
|
|
23836
23956
|
var import_react_dom3 = require("react-dom");
|
|
23837
23957
|
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23838
23958
|
var MIN_ROW_HEIGHT = 33;
|
|
23839
23959
|
var MIN_COLUMN_WIDTH = 50;
|
|
23840
|
-
var tableResizer =
|
|
23960
|
+
var tableResizer = import_react152.css`
|
|
23841
23961
|
position: absolute;
|
|
23842
23962
|
z-index: var(--z-10);
|
|
23843
23963
|
`;
|
|
@@ -23859,15 +23979,15 @@ var fixedGetDOMCellFromTarget = (node) => {
|
|
|
23859
23979
|
return null;
|
|
23860
23980
|
};
|
|
23861
23981
|
function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
23862
|
-
const targetRef = (0,
|
|
23863
|
-
const resizerRef = (0,
|
|
23864
|
-
const tableRectRef = (0,
|
|
23865
|
-
const mouseStartPosRef = (0,
|
|
23866
|
-
const [mouseCurrentPos, updateMouseCurrentPos] = (0,
|
|
23867
|
-
const [activeCell, updateActiveCell] = (0,
|
|
23868
|
-
const [isMouseDown, updateIsMouseDown] = (0,
|
|
23869
|
-
const [draggingDirection, updateDraggingDirection] = (0,
|
|
23870
|
-
const resetState = (0,
|
|
23982
|
+
const targetRef = (0, import_react153.useRef)(null);
|
|
23983
|
+
const resizerRef = (0, import_react153.useRef)(null);
|
|
23984
|
+
const tableRectRef = (0, import_react153.useRef)(null);
|
|
23985
|
+
const mouseStartPosRef = (0, import_react153.useRef)(null);
|
|
23986
|
+
const [mouseCurrentPos, updateMouseCurrentPos] = (0, import_react153.useState)(null);
|
|
23987
|
+
const [activeCell, updateActiveCell] = (0, import_react153.useState)(null);
|
|
23988
|
+
const [isMouseDown, updateIsMouseDown] = (0, import_react153.useState)(false);
|
|
23989
|
+
const [draggingDirection, updateDraggingDirection] = (0, import_react153.useState)(null);
|
|
23990
|
+
const resetState = (0, import_react153.useCallback)(() => {
|
|
23871
23991
|
updateActiveCell(null);
|
|
23872
23992
|
targetRef.current = null;
|
|
23873
23993
|
updateDraggingDirection(null);
|
|
@@ -23877,7 +23997,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
23877
23997
|
const isMouseDownOnEvent = (event) => {
|
|
23878
23998
|
return (event.buttons & 1) === 1;
|
|
23879
23999
|
};
|
|
23880
|
-
(0,
|
|
24000
|
+
(0, import_react153.useEffect)(() => {
|
|
23881
24001
|
const onMouseMove = (event) => {
|
|
23882
24002
|
setTimeout(() => {
|
|
23883
24003
|
const target = event.target;
|
|
@@ -23944,7 +24064,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
23944
24064
|
}
|
|
23945
24065
|
return false;
|
|
23946
24066
|
};
|
|
23947
|
-
const updateRowHeight = (0,
|
|
24067
|
+
const updateRowHeight = (0, import_react153.useCallback)(
|
|
23948
24068
|
(heightChange) => {
|
|
23949
24069
|
if (!activeCell) {
|
|
23950
24070
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -24006,7 +24126,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
24006
24126
|
}
|
|
24007
24127
|
}
|
|
24008
24128
|
};
|
|
24009
|
-
const updateColumnWidth = (0,
|
|
24129
|
+
const updateColumnWidth = (0, import_react153.useCallback)(
|
|
24010
24130
|
(widthChange) => {
|
|
24011
24131
|
if (!activeCell) {
|
|
24012
24132
|
throw new Error("TableCellResizer: Expected active cell.");
|
|
@@ -24040,7 +24160,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
24040
24160
|
},
|
|
24041
24161
|
[activeCell, editor]
|
|
24042
24162
|
);
|
|
24043
|
-
const mouseUpHandler = (0,
|
|
24163
|
+
const mouseUpHandler = (0, import_react153.useCallback)(
|
|
24044
24164
|
(direction) => {
|
|
24045
24165
|
const handler = (event) => {
|
|
24046
24166
|
event.preventDefault();
|
|
@@ -24069,7 +24189,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
24069
24189
|
},
|
|
24070
24190
|
[activeCell, resetState, updateColumnWidth, updateRowHeight]
|
|
24071
24191
|
);
|
|
24072
|
-
const toggleResize = (0,
|
|
24192
|
+
const toggleResize = (0, import_react153.useCallback)(
|
|
24073
24193
|
(direction) => (event) => {
|
|
24074
24194
|
event.preventDefault();
|
|
24075
24195
|
event.stopPropagation();
|
|
@@ -24086,7 +24206,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
24086
24206
|
},
|
|
24087
24207
|
[activeCell, mouseUpHandler]
|
|
24088
24208
|
);
|
|
24089
|
-
const getResizers = (0,
|
|
24209
|
+
const getResizers = (0, import_react153.useCallback)(() => {
|
|
24090
24210
|
if (activeCell) {
|
|
24091
24211
|
const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
|
|
24092
24212
|
const parentRect = positioningAnchorEl.getBoundingClientRect();
|
|
@@ -24157,7 +24277,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
24157
24277
|
function TableCellResizerPlugin({ positioningAnchorEl }) {
|
|
24158
24278
|
const [editor] = (0, import_LexicalComposerContext6.useLexicalComposerContext)();
|
|
24159
24279
|
const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
|
|
24160
|
-
return (0,
|
|
24280
|
+
return (0, import_react153.useMemo)(
|
|
24161
24281
|
() => isEditable ? (0, import_react_dom3.createPortal)(
|
|
24162
24282
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
|
|
24163
24283
|
positioningAnchorEl
|
|
@@ -24171,11 +24291,11 @@ init_emotion_jsx_shim();
|
|
|
24171
24291
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
24172
24292
|
var import_table3 = require("@lexical/table");
|
|
24173
24293
|
var import_lexical8 = require("lexical");
|
|
24174
|
-
var
|
|
24294
|
+
var import_react154 = require("react");
|
|
24175
24295
|
var TableSelectionPlugin = () => {
|
|
24176
24296
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
24177
|
-
const [closestTableCellNode, setClosestTableCellNode] = (0,
|
|
24178
|
-
(0,
|
|
24297
|
+
const [closestTableCellNode, setClosestTableCellNode] = (0, import_react154.useState)(null);
|
|
24298
|
+
(0, import_react154.useEffect)(() => {
|
|
24179
24299
|
return editor.registerCommand(
|
|
24180
24300
|
import_lexical8.SELECTION_CHANGE_COMMAND,
|
|
24181
24301
|
() => {
|
|
@@ -24197,7 +24317,7 @@ var TableSelectionPlugin = () => {
|
|
|
24197
24317
|
import_lexical8.COMMAND_PRIORITY_NORMAL
|
|
24198
24318
|
);
|
|
24199
24319
|
}, [editor]);
|
|
24200
|
-
(0,
|
|
24320
|
+
(0, import_react154.useEffect)(() => {
|
|
24201
24321
|
const onControlA = (event) => {
|
|
24202
24322
|
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
|
24203
24323
|
if (!closestTableCellNode) {
|
|
@@ -24221,7 +24341,7 @@ var TableSelectionPlugin_default = TableSelectionPlugin;
|
|
|
24221
24341
|
|
|
24222
24342
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
24223
24343
|
init_emotion_jsx_shim();
|
|
24224
|
-
var
|
|
24344
|
+
var import_react156 = require("@emotion/react");
|
|
24225
24345
|
var import_code2 = require("@lexical/code");
|
|
24226
24346
|
var import_list2 = require("@lexical/list");
|
|
24227
24347
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -24230,7 +24350,7 @@ var import_selection2 = require("@lexical/selection");
|
|
|
24230
24350
|
var import_table4 = require("@lexical/table");
|
|
24231
24351
|
var import_utils13 = require("@lexical/utils");
|
|
24232
24352
|
var import_lexical9 = require("lexical");
|
|
24233
|
-
var
|
|
24353
|
+
var import_react157 = require("react");
|
|
24234
24354
|
|
|
24235
24355
|
// src/components/ParameterInputs/rich-text/toolbar/constants.ts
|
|
24236
24356
|
init_emotion_jsx_shim();
|
|
@@ -24248,29 +24368,29 @@ var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
|
|
|
24248
24368
|
|
|
24249
24369
|
// src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
|
|
24250
24370
|
init_emotion_jsx_shim();
|
|
24251
|
-
var
|
|
24371
|
+
var import_react155 = require("react");
|
|
24252
24372
|
var useRichTextToolbarState = ({ config }) => {
|
|
24253
24373
|
var _a;
|
|
24254
|
-
const enabledBuiltInFormats = (0,
|
|
24374
|
+
const enabledBuiltInFormats = (0, import_react155.useMemo)(() => {
|
|
24255
24375
|
return richTextBuiltInFormats.filter((format) => {
|
|
24256
24376
|
var _a2, _b;
|
|
24257
24377
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
24258
24378
|
});
|
|
24259
24379
|
}, [config]);
|
|
24260
|
-
const enabledBuiltInElements = (0,
|
|
24380
|
+
const enabledBuiltInElements = (0, import_react155.useMemo)(() => {
|
|
24261
24381
|
return richTextBuiltInElements.filter((element) => {
|
|
24262
24382
|
var _a2, _b;
|
|
24263
24383
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
24264
24384
|
});
|
|
24265
24385
|
}, [config]);
|
|
24266
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
24386
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react155.useMemo)(() => {
|
|
24267
24387
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
24268
24388
|
}, [enabledBuiltInFormats]);
|
|
24269
24389
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
24270
24390
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
24271
24391
|
);
|
|
24272
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
24273
|
-
const visibleFormatsWithIcon = (0,
|
|
24392
|
+
const [activeFormats, setActiveFormats] = (0, import_react155.useState)([]);
|
|
24393
|
+
const visibleFormatsWithIcon = (0, import_react155.useMemo)(() => {
|
|
24274
24394
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
24275
24395
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
24276
24396
|
visibleFormats.add(type);
|
|
@@ -24280,7 +24400,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
24280
24400
|
});
|
|
24281
24401
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
24282
24402
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
24283
|
-
const visibleFormatsWithoutIcon = (0,
|
|
24403
|
+
const visibleFormatsWithoutIcon = (0, import_react155.useMemo)(() => {
|
|
24284
24404
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
24285
24405
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
24286
24406
|
visibleFormats.add(type);
|
|
@@ -24290,11 +24410,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
24290
24410
|
});
|
|
24291
24411
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
24292
24412
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
24293
|
-
const [activeElement, setActiveElement] = (0,
|
|
24413
|
+
const [activeElement, setActiveElement] = (0, import_react155.useState)("paragraph");
|
|
24294
24414
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
24295
24415
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
24296
24416
|
);
|
|
24297
|
-
const visibleTextualElements = (0,
|
|
24417
|
+
const visibleTextualElements = (0, import_react155.useMemo)(() => {
|
|
24298
24418
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
24299
24419
|
return enabledTextualElements;
|
|
24300
24420
|
}
|
|
@@ -24305,30 +24425,30 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
24305
24425
|
}
|
|
24306
24426
|
);
|
|
24307
24427
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
24308
|
-
const [isLink, setIsLink] = (0,
|
|
24309
|
-
const linkElementVisible = (0,
|
|
24428
|
+
const [isLink, setIsLink] = (0, import_react155.useState)(false);
|
|
24429
|
+
const linkElementVisible = (0, import_react155.useMemo)(() => {
|
|
24310
24430
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
24311
24431
|
}, [isLink, enabledBuiltInElements]);
|
|
24312
|
-
const visibleLists = (0,
|
|
24432
|
+
const visibleLists = (0, import_react155.useMemo)(() => {
|
|
24313
24433
|
return new Set(
|
|
24314
24434
|
["orderedList", "unorderedList"].filter(
|
|
24315
24435
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
24316
24436
|
)
|
|
24317
24437
|
);
|
|
24318
24438
|
}, [activeElement, enabledBuiltInElements]);
|
|
24319
|
-
const quoteElementVisible = (0,
|
|
24439
|
+
const quoteElementVisible = (0, import_react155.useMemo)(() => {
|
|
24320
24440
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
24321
24441
|
}, [activeElement, enabledBuiltInElements]);
|
|
24322
|
-
const codeElementVisible = (0,
|
|
24442
|
+
const codeElementVisible = (0, import_react155.useMemo)(() => {
|
|
24323
24443
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
24324
24444
|
}, [activeElement, enabledBuiltInElements]);
|
|
24325
|
-
const tableElementVisible = (0,
|
|
24445
|
+
const tableElementVisible = (0, import_react155.useMemo)(() => {
|
|
24326
24446
|
return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
|
|
24327
24447
|
}, [activeElement, enabledBuiltInElements]);
|
|
24328
|
-
const assetElementVisible = (0,
|
|
24448
|
+
const assetElementVisible = (0, import_react155.useMemo)(() => {
|
|
24329
24449
|
return enabledBuiltInElements.some((element) => element.type === "asset") || activeElement === "asset";
|
|
24330
24450
|
}, [activeElement, enabledBuiltInElements]);
|
|
24331
|
-
const visibleElementsWithIcons = (0,
|
|
24451
|
+
const visibleElementsWithIcons = (0, import_react155.useMemo)(() => {
|
|
24332
24452
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
24333
24453
|
if (linkElementVisible) {
|
|
24334
24454
|
visibleElements.add("link");
|
|
@@ -24340,7 +24460,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
24340
24460
|
}
|
|
24341
24461
|
return visibleElements;
|
|
24342
24462
|
}, [linkElementVisible, visibleLists]);
|
|
24343
|
-
const visibleInsertElementsWithIcons = (0,
|
|
24463
|
+
const visibleInsertElementsWithIcons = (0, import_react155.useMemo)(() => {
|
|
24344
24464
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
24345
24465
|
if (quoteElementVisible) {
|
|
24346
24466
|
visibleElements.add("quote");
|
|
@@ -24379,7 +24499,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
24379
24499
|
|
|
24380
24500
|
// src/components/ParameterInputs/rich-text/toolbar/RichTextToolbar.tsx
|
|
24381
24501
|
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
24382
|
-
var toolbar =
|
|
24502
|
+
var toolbar = import_react156.css`
|
|
24383
24503
|
${scrollbarStyles}
|
|
24384
24504
|
background: var(--gray-50);
|
|
24385
24505
|
border-radius: var(--rounded-base);
|
|
@@ -24393,7 +24513,7 @@ var toolbar = import_react155.css`
|
|
|
24393
24513
|
top: calc(var(--spacing-sm) * -2);
|
|
24394
24514
|
z-index: 10;
|
|
24395
24515
|
`;
|
|
24396
|
-
var toolbarGroup =
|
|
24516
|
+
var toolbarGroup = import_react156.css`
|
|
24397
24517
|
display: flex;
|
|
24398
24518
|
flex-shrink: 0;
|
|
24399
24519
|
gap: var(--spacing-xs);
|
|
@@ -24410,7 +24530,7 @@ var toolbarGroup = import_react155.css`
|
|
|
24410
24530
|
width: 1px;
|
|
24411
24531
|
}
|
|
24412
24532
|
`;
|
|
24413
|
-
var richTextToolbarButton =
|
|
24533
|
+
var richTextToolbarButton = import_react156.css`
|
|
24414
24534
|
align-items: center;
|
|
24415
24535
|
appearance: none;
|
|
24416
24536
|
border: 0;
|
|
@@ -24424,17 +24544,17 @@ var richTextToolbarButton = import_react155.css`
|
|
|
24424
24544
|
min-width: 32px;
|
|
24425
24545
|
padding: 0 var(--spacing-sm);
|
|
24426
24546
|
`;
|
|
24427
|
-
var richTextToolbarButtonActive =
|
|
24547
|
+
var richTextToolbarButtonActive = import_react156.css`
|
|
24428
24548
|
background: var(--gray-200);
|
|
24429
24549
|
`;
|
|
24430
|
-
var textStyleButton =
|
|
24550
|
+
var textStyleButton = import_react156.css`
|
|
24431
24551
|
justify-content: space-between;
|
|
24432
24552
|
min-width: 7rem;
|
|
24433
24553
|
`;
|
|
24434
|
-
var toolbarIcon =
|
|
24554
|
+
var toolbarIcon = import_react156.css`
|
|
24435
24555
|
color: inherit;
|
|
24436
24556
|
`;
|
|
24437
|
-
var toolbarChevron =
|
|
24557
|
+
var toolbarChevron = import_react156.css`
|
|
24438
24558
|
margin-left: var(--spacing-xs);
|
|
24439
24559
|
`;
|
|
24440
24560
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -24494,7 +24614,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24494
24614
|
});
|
|
24495
24615
|
});
|
|
24496
24616
|
};
|
|
24497
|
-
const updateToolbar = (0,
|
|
24617
|
+
const updateToolbar = (0, import_react157.useCallback)(() => {
|
|
24498
24618
|
const selection = (0, import_lexical9.$getSelection)();
|
|
24499
24619
|
if (!(0, import_lexical9.$isRangeSelection)(selection)) {
|
|
24500
24620
|
return;
|
|
@@ -24533,7 +24653,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24533
24653
|
setIsLink(false);
|
|
24534
24654
|
}
|
|
24535
24655
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
24536
|
-
(0,
|
|
24656
|
+
(0, import_react157.useEffect)(() => {
|
|
24537
24657
|
return editor.registerCommand(
|
|
24538
24658
|
import_lexical9.SELECTION_CHANGE_COMMAND,
|
|
24539
24659
|
(_payload) => {
|
|
@@ -24543,7 +24663,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24543
24663
|
import_lexical9.COMMAND_PRIORITY_CRITICAL
|
|
24544
24664
|
);
|
|
24545
24665
|
}, [editor, updateToolbar]);
|
|
24546
|
-
(0,
|
|
24666
|
+
(0, import_react157.useEffect)(() => {
|
|
24547
24667
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
24548
24668
|
requestAnimationFrame(() => {
|
|
24549
24669
|
editorState.read(() => {
|
|
@@ -24621,7 +24741,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24621
24741
|
"button",
|
|
24622
24742
|
{
|
|
24623
24743
|
onClick: () => {
|
|
24624
|
-
|
|
24744
|
+
if (isLink) {
|
|
24745
|
+
editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {});
|
|
24746
|
+
} else {
|
|
24747
|
+
editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
24748
|
+
}
|
|
24625
24749
|
},
|
|
24626
24750
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
24627
24751
|
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
@@ -24632,7 +24756,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24632
24756
|
"button",
|
|
24633
24757
|
{
|
|
24634
24758
|
onClick: () => {
|
|
24635
|
-
activeElement === "unorderedList"
|
|
24759
|
+
if (activeElement === "unorderedList") {
|
|
24760
|
+
editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
|
|
24761
|
+
} else {
|
|
24762
|
+
editor.dispatchCommand(import_list2.INSERT_UNORDERED_LIST_COMMAND, void 0);
|
|
24763
|
+
}
|
|
24636
24764
|
},
|
|
24637
24765
|
css: [
|
|
24638
24766
|
richTextToolbarButton,
|
|
@@ -24645,7 +24773,11 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
24645
24773
|
"button",
|
|
24646
24774
|
{
|
|
24647
24775
|
onClick: () => {
|
|
24648
|
-
activeElement === "orderedList"
|
|
24776
|
+
if (activeElement === "orderedList") {
|
|
24777
|
+
editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
|
|
24778
|
+
} else {
|
|
24779
|
+
editor.dispatchCommand(import_list2.INSERT_ORDERED_LIST_COMMAND, void 0);
|
|
24780
|
+
}
|
|
24649
24781
|
},
|
|
24650
24782
|
css: [
|
|
24651
24783
|
richTextToolbarButton,
|
|
@@ -24784,7 +24916,7 @@ var ParameterRichText = ({
|
|
|
24784
24916
|
}
|
|
24785
24917
|
);
|
|
24786
24918
|
};
|
|
24787
|
-
var editorContainerWrapper =
|
|
24919
|
+
var editorContainerWrapper = import_react158.css`
|
|
24788
24920
|
position: relative;
|
|
24789
24921
|
|
|
24790
24922
|
&::before {
|
|
@@ -24800,12 +24932,12 @@ var editorContainerWrapper = import_react157.css`
|
|
|
24800
24932
|
z-index: 2;
|
|
24801
24933
|
}
|
|
24802
24934
|
`;
|
|
24803
|
-
var editorWrapper =
|
|
24935
|
+
var editorWrapper = import_react158.css`
|
|
24804
24936
|
display: flex;
|
|
24805
24937
|
flex-flow: column;
|
|
24806
24938
|
flex-grow: 1;
|
|
24807
24939
|
`;
|
|
24808
|
-
var editorContainer =
|
|
24940
|
+
var editorContainer = import_react158.css`
|
|
24809
24941
|
${scrollbarStyles}
|
|
24810
24942
|
background: var(--white);
|
|
24811
24943
|
border-radius: var(--rounded-sm);
|
|
@@ -24837,7 +24969,7 @@ var editorContainer = import_react157.css`
|
|
|
24837
24969
|
max-height: unset;
|
|
24838
24970
|
}
|
|
24839
24971
|
`;
|
|
24840
|
-
var editorContainerOverflowWrapper =
|
|
24972
|
+
var editorContainerOverflowWrapper = import_react158.css`
|
|
24841
24973
|
overflow: hidden;
|
|
24842
24974
|
pointer-events: none;
|
|
24843
24975
|
|
|
@@ -24845,7 +24977,7 @@ var editorContainerOverflowWrapper = import_react157.css`
|
|
|
24845
24977
|
pointer-events: auto;
|
|
24846
24978
|
}
|
|
24847
24979
|
`;
|
|
24848
|
-
var editorPlaceholder =
|
|
24980
|
+
var editorPlaceholder = import_react158.css`
|
|
24849
24981
|
color: var(--gray-500);
|
|
24850
24982
|
font-style: italic;
|
|
24851
24983
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -24856,7 +24988,7 @@ var editorPlaceholder = import_react157.css`
|
|
|
24856
24988
|
top: calc(1rem + var(--spacing-sm));
|
|
24857
24989
|
user-select: none;
|
|
24858
24990
|
`;
|
|
24859
|
-
var editorInput =
|
|
24991
|
+
var editorInput = import_react158.css`
|
|
24860
24992
|
min-height: 100%;
|
|
24861
24993
|
flex-grow: 1;
|
|
24862
24994
|
|
|
@@ -24987,12 +25119,12 @@ var RichText = ({
|
|
|
24987
25119
|
minimalInteractivity
|
|
24988
25120
|
}) => {
|
|
24989
25121
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
24990
|
-
(0,
|
|
25122
|
+
(0, import_react159.useEffect)(() => {
|
|
24991
25123
|
if (onRichTextInit) {
|
|
24992
25124
|
onRichTextInit(editor);
|
|
24993
25125
|
}
|
|
24994
25126
|
}, [editor, onRichTextInit]);
|
|
24995
|
-
(0,
|
|
25127
|
+
(0, import_react159.useEffect)(() => {
|
|
24996
25128
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
|
|
24997
25129
|
requestAnimationFrame(() => {
|
|
24998
25130
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -25004,16 +25136,16 @@ var RichText = ({
|
|
|
25004
25136
|
removeUpdateListener();
|
|
25005
25137
|
};
|
|
25006
25138
|
}, [editor, onChange]);
|
|
25007
|
-
(0,
|
|
25139
|
+
(0, import_react159.useEffect)(() => {
|
|
25008
25140
|
editor.setEditable(!readOnly);
|
|
25009
25141
|
}, [editor, readOnly]);
|
|
25010
|
-
const [editorContainerRef, setEditorContainerRef] = (0,
|
|
25142
|
+
const [editorContainerRef, setEditorContainerRef] = (0, import_react159.useState)(null);
|
|
25011
25143
|
const onEditorContainerRef = (_editorContainerRef) => {
|
|
25012
25144
|
if (_editorContainerRef !== null) {
|
|
25013
25145
|
setEditorContainerRef(_editorContainerRef);
|
|
25014
25146
|
}
|
|
25015
25147
|
};
|
|
25016
|
-
const [portalContainerRef, setPortalContainerRef] = (0,
|
|
25148
|
+
const [portalContainerRef, setPortalContainerRef] = (0, import_react159.useState)(null);
|
|
25017
25149
|
const onPortalContainerRef = (_portalContainerRef) => {
|
|
25018
25150
|
if (_portalContainerRef !== null) {
|
|
25019
25151
|
setPortalContainerRef(_portalContainerRef);
|
|
@@ -25083,15 +25215,15 @@ var RichText = ({
|
|
|
25083
25215
|
|
|
25084
25216
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
25085
25217
|
init_emotion_jsx_shim();
|
|
25086
|
-
var
|
|
25218
|
+
var import_react160 = require("react");
|
|
25087
25219
|
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
25088
|
-
var ParameterSelect = (0,
|
|
25220
|
+
var ParameterSelect = (0, import_react160.forwardRef)(
|
|
25089
25221
|
({ defaultOption, options, ...props }, ref) => {
|
|
25090
25222
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
25091
25223
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
25092
25224
|
}
|
|
25093
25225
|
);
|
|
25094
|
-
var ParameterSelectInner = (0,
|
|
25226
|
+
var ParameterSelectInner = (0, import_react160.forwardRef)(
|
|
25095
25227
|
({ defaultOption, options, ...props }, ref) => {
|
|
25096
25228
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
25097
25229
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
@@ -25116,13 +25248,13 @@ var ParameterSelectInner = (0, import_react159.forwardRef)(
|
|
|
25116
25248
|
|
|
25117
25249
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
25118
25250
|
init_emotion_jsx_shim();
|
|
25119
|
-
var
|
|
25251
|
+
var import_react161 = require("react");
|
|
25120
25252
|
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
25121
|
-
var ParameterTextarea = (0,
|
|
25253
|
+
var ParameterTextarea = (0, import_react161.forwardRef)((props, ref) => {
|
|
25122
25254
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
25123
25255
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
25124
25256
|
});
|
|
25125
|
-
var ParameterTextareaInner = (0,
|
|
25257
|
+
var ParameterTextareaInner = (0, import_react161.forwardRef)(({ ...props }, ref) => {
|
|
25126
25258
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
25127
25259
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
25128
25260
|
"textarea",
|
|
@@ -25138,13 +25270,13 @@ var ParameterTextareaInner = (0, import_react160.forwardRef)(({ ...props }, ref)
|
|
|
25138
25270
|
|
|
25139
25271
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
25140
25272
|
init_emotion_jsx_shim();
|
|
25141
|
-
var
|
|
25273
|
+
var import_react162 = require("react");
|
|
25142
25274
|
var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
|
|
25143
|
-
var ParameterToggle = (0,
|
|
25275
|
+
var ParameterToggle = (0, import_react162.forwardRef)((props, ref) => {
|
|
25144
25276
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
25145
25277
|
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
25146
25278
|
});
|
|
25147
|
-
var ParameterToggleInner = (0,
|
|
25279
|
+
var ParameterToggleInner = (0, import_react162.forwardRef)(
|
|
25148
25280
|
({ children, ...props }, ref) => {
|
|
25149
25281
|
const { id, label } = useParameterShell();
|
|
25150
25282
|
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
@@ -25160,8 +25292,8 @@ init_emotion_jsx_shim();
|
|
|
25160
25292
|
|
|
25161
25293
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
25162
25294
|
init_emotion_jsx_shim();
|
|
25163
|
-
var
|
|
25164
|
-
var container3 =
|
|
25295
|
+
var import_react163 = require("@emotion/react");
|
|
25296
|
+
var container3 = import_react163.css`
|
|
25165
25297
|
background: var(--gray-50);
|
|
25166
25298
|
margin-block: var(--spacing-sm);
|
|
25167
25299
|
position: relative;
|
|
@@ -25171,17 +25303,17 @@ var container3 = import_react162.css`
|
|
|
25171
25303
|
border: solid 1px var(--gray-300);
|
|
25172
25304
|
`;
|
|
25173
25305
|
var themeMap = {
|
|
25174
|
-
primary:
|
|
25306
|
+
primary: import_react163.css`
|
|
25175
25307
|
--progress-color: var(--accent-light);
|
|
25176
25308
|
`,
|
|
25177
|
-
secondary:
|
|
25309
|
+
secondary: import_react163.css`
|
|
25178
25310
|
--progress-color: var(--accent-alt-light);
|
|
25179
25311
|
`,
|
|
25180
|
-
destructive:
|
|
25312
|
+
destructive: import_react163.css`
|
|
25181
25313
|
--progress-color: var(--brand-secondary-5);
|
|
25182
25314
|
`
|
|
25183
25315
|
};
|
|
25184
|
-
var slidingBackgroundPosition =
|
|
25316
|
+
var slidingBackgroundPosition = import_react163.keyframes`
|
|
25185
25317
|
from {
|
|
25186
25318
|
background-position: 0 0;
|
|
25187
25319
|
}
|
|
@@ -25189,10 +25321,10 @@ var slidingBackgroundPosition = import_react162.keyframes`
|
|
|
25189
25321
|
background-position: 64px 0;
|
|
25190
25322
|
}
|
|
25191
25323
|
`;
|
|
25192
|
-
var determinate =
|
|
25324
|
+
var determinate = import_react163.css`
|
|
25193
25325
|
background-color: var(--progress-color);
|
|
25194
25326
|
`;
|
|
25195
|
-
var indeterminate =
|
|
25327
|
+
var indeterminate = import_react163.css`
|
|
25196
25328
|
background-image: linear-gradient(
|
|
25197
25329
|
45deg,
|
|
25198
25330
|
var(--progress-color) 25%,
|
|
@@ -25206,7 +25338,7 @@ var indeterminate = import_react162.css`
|
|
|
25206
25338
|
background-size: 64px 64px;
|
|
25207
25339
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
25208
25340
|
`;
|
|
25209
|
-
var bar =
|
|
25341
|
+
var bar = import_react163.css`
|
|
25210
25342
|
position: absolute;
|
|
25211
25343
|
inset: 0;
|
|
25212
25344
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -25255,22 +25387,22 @@ function ProgressBar({
|
|
|
25255
25387
|
|
|
25256
25388
|
// src/components/ProgressList/ProgressList.tsx
|
|
25257
25389
|
init_emotion_jsx_shim();
|
|
25258
|
-
var
|
|
25390
|
+
var import_react165 = require("@emotion/react");
|
|
25259
25391
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
25260
25392
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
25261
25393
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
25262
|
-
var
|
|
25394
|
+
var import_react166 = require("react");
|
|
25263
25395
|
|
|
25264
25396
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
25265
25397
|
init_emotion_jsx_shim();
|
|
25266
|
-
var
|
|
25267
|
-
var progressListStyles =
|
|
25398
|
+
var import_react164 = require("@emotion/react");
|
|
25399
|
+
var progressListStyles = import_react164.css`
|
|
25268
25400
|
display: flex;
|
|
25269
25401
|
flex-direction: column;
|
|
25270
25402
|
gap: var(--spacing-sm);
|
|
25271
25403
|
list-style-type: none;
|
|
25272
25404
|
`;
|
|
25273
|
-
var progressListItemStyles =
|
|
25405
|
+
var progressListItemStyles = import_react164.css`
|
|
25274
25406
|
display: flex;
|
|
25275
25407
|
gap: var(--spacing-base);
|
|
25276
25408
|
align-items: center;
|
|
@@ -25279,7 +25411,7 @@ var progressListItemStyles = import_react163.css`
|
|
|
25279
25411
|
// src/components/ProgressList/ProgressList.tsx
|
|
25280
25412
|
var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
|
|
25281
25413
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
25282
|
-
const itemsWithStatus = (0,
|
|
25414
|
+
const itemsWithStatus = (0, import_react166.useMemo)(() => {
|
|
25283
25415
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
25284
25416
|
return items.map((item, index) => {
|
|
25285
25417
|
let status = "queued";
|
|
@@ -25312,7 +25444,7 @@ var ProgressListItem = ({
|
|
|
25312
25444
|
errorLevel = "danger",
|
|
25313
25445
|
autoEllipsis = false
|
|
25314
25446
|
}) => {
|
|
25315
|
-
const icon = (0,
|
|
25447
|
+
const icon = (0, import_react166.useMemo)(() => {
|
|
25316
25448
|
if (error) {
|
|
25317
25449
|
return warningIcon;
|
|
25318
25450
|
}
|
|
@@ -25323,14 +25455,14 @@ var ProgressListItem = ({
|
|
|
25323
25455
|
};
|
|
25324
25456
|
return iconPerStatus[status];
|
|
25325
25457
|
}, [status, error]);
|
|
25326
|
-
const statusStyles = (0,
|
|
25458
|
+
const statusStyles = (0, import_react166.useMemo)(() => {
|
|
25327
25459
|
if (error) {
|
|
25328
|
-
return errorLevel === "caution" ?
|
|
25460
|
+
return errorLevel === "caution" ? import_react165.css`
|
|
25329
25461
|
color: rgb(161, 98, 7);
|
|
25330
25462
|
& svg {
|
|
25331
25463
|
color: rgb(250, 204, 21);
|
|
25332
25464
|
}
|
|
25333
|
-
` :
|
|
25465
|
+
` : import_react165.css`
|
|
25334
25466
|
color: rgb(185, 28, 28);
|
|
25335
25467
|
& svg {
|
|
25336
25468
|
color: var(--brand-primary-2);
|
|
@@ -25338,13 +25470,13 @@ var ProgressListItem = ({
|
|
|
25338
25470
|
`;
|
|
25339
25471
|
}
|
|
25340
25472
|
const colorPerStatus = {
|
|
25341
|
-
completed:
|
|
25473
|
+
completed: import_react165.css`
|
|
25342
25474
|
opacity: 0.75;
|
|
25343
25475
|
`,
|
|
25344
|
-
inProgress:
|
|
25476
|
+
inProgress: import_react165.css`
|
|
25345
25477
|
-webkit-text-stroke-width: thin;
|
|
25346
25478
|
`,
|
|
25347
|
-
queued:
|
|
25479
|
+
queued: import_react165.css`
|
|
25348
25480
|
opacity: 0.5;
|
|
25349
25481
|
`
|
|
25350
25482
|
};
|
|
@@ -25361,17 +25493,17 @@ var ProgressListItem = ({
|
|
|
25361
25493
|
|
|
25362
25494
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
25363
25495
|
init_emotion_jsx_shim();
|
|
25364
|
-
var
|
|
25496
|
+
var import_react168 = require("@emotion/react");
|
|
25365
25497
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
25366
|
-
var
|
|
25498
|
+
var import_react169 = require("react");
|
|
25367
25499
|
|
|
25368
25500
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
25369
25501
|
init_emotion_jsx_shim();
|
|
25370
|
-
var
|
|
25371
|
-
var segmentedControlRootStyles =
|
|
25502
|
+
var import_react167 = require("@emotion/react");
|
|
25503
|
+
var segmentedControlRootStyles = import_react167.css`
|
|
25372
25504
|
position: relative;
|
|
25373
25505
|
`;
|
|
25374
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
25506
|
+
var segmentedControlScrollIndicatorsStyles = import_react167.css`
|
|
25375
25507
|
position: absolute;
|
|
25376
25508
|
inset: 0;
|
|
25377
25509
|
z-index: 1;
|
|
@@ -25399,17 +25531,17 @@ var segmentedControlScrollIndicatorsStyles = import_react166.css`
|
|
|
25399
25531
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
25400
25532
|
}
|
|
25401
25533
|
`;
|
|
25402
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
25534
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react167.css`
|
|
25403
25535
|
&::before {
|
|
25404
25536
|
opacity: 1;
|
|
25405
25537
|
}
|
|
25406
25538
|
`;
|
|
25407
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
25539
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react167.css`
|
|
25408
25540
|
&::after {
|
|
25409
25541
|
opacity: 1;
|
|
25410
25542
|
}
|
|
25411
25543
|
`;
|
|
25412
|
-
var segmentedControlWrapperStyles =
|
|
25544
|
+
var segmentedControlWrapperStyles = import_react167.css`
|
|
25413
25545
|
overflow-y: auto;
|
|
25414
25546
|
scroll-behavior: smooth;
|
|
25415
25547
|
scrollbar-width: none;
|
|
@@ -25418,7 +25550,7 @@ var segmentedControlWrapperStyles = import_react166.css`
|
|
|
25418
25550
|
height: 0px;
|
|
25419
25551
|
}
|
|
25420
25552
|
`;
|
|
25421
|
-
var segmentedControlStyles =
|
|
25553
|
+
var segmentedControlStyles = import_react167.css`
|
|
25422
25554
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
25423
25555
|
--segmented-control-border-width: 1px;
|
|
25424
25556
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -25437,14 +25569,14 @@ var segmentedControlStyles = import_react166.css`
|
|
|
25437
25569
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
25438
25570
|
font-size: var(--fs-xs);
|
|
25439
25571
|
`;
|
|
25440
|
-
var segmentedControlVerticalStyles =
|
|
25572
|
+
var segmentedControlVerticalStyles = import_react167.css`
|
|
25441
25573
|
flex-direction: column;
|
|
25442
25574
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
25443
25575
|
var(--segmented-control-rounded-value) 0 0;
|
|
25444
25576
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
25445
25577
|
var(--segmented-control-rounded-value);
|
|
25446
25578
|
`;
|
|
25447
|
-
var segmentedControlItemStyles =
|
|
25579
|
+
var segmentedControlItemStyles = import_react167.css`
|
|
25448
25580
|
&:first-of-type label {
|
|
25449
25581
|
border-radius: var(--segmented-control-first-border-radius);
|
|
25450
25582
|
}
|
|
@@ -25452,10 +25584,10 @@ var segmentedControlItemStyles = import_react166.css`
|
|
|
25452
25584
|
border-radius: var(--segmented-control-last-border-radius);
|
|
25453
25585
|
}
|
|
25454
25586
|
`;
|
|
25455
|
-
var segmentedControlInputStyles =
|
|
25587
|
+
var segmentedControlInputStyles = import_react167.css`
|
|
25456
25588
|
${accessibleHidden}
|
|
25457
25589
|
`;
|
|
25458
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
25590
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react167.css`
|
|
25459
25591
|
position: relative;
|
|
25460
25592
|
display: flex;
|
|
25461
25593
|
align-items: center;
|
|
@@ -25522,20 +25654,20 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react166.css`
|
|
|
25522
25654
|
`}
|
|
25523
25655
|
}
|
|
25524
25656
|
`;
|
|
25525
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
25657
|
+
var segmentedControlLabelIconOnlyStyles = import_react167.css`
|
|
25526
25658
|
padding-inline: 0.5em;
|
|
25527
25659
|
`;
|
|
25528
|
-
var segmentedControlLabelCheckStyles =
|
|
25660
|
+
var segmentedControlLabelCheckStyles = import_react167.css`
|
|
25529
25661
|
opacity: 0.5;
|
|
25530
25662
|
`;
|
|
25531
|
-
var segmentedControlLabelContentStyles =
|
|
25663
|
+
var segmentedControlLabelContentStyles = import_react167.css`
|
|
25532
25664
|
display: flex;
|
|
25533
25665
|
align-items: center;
|
|
25534
25666
|
justify-content: center;
|
|
25535
25667
|
gap: var(--spacing-sm);
|
|
25536
25668
|
height: 100%;
|
|
25537
25669
|
`;
|
|
25538
|
-
var segmentedControlLabelTextStyles =
|
|
25670
|
+
var segmentedControlLabelTextStyles = import_react167.css`
|
|
25539
25671
|
white-space: nowrap;
|
|
25540
25672
|
`;
|
|
25541
25673
|
|
|
@@ -25555,10 +25687,10 @@ var SegmentedControl = ({
|
|
|
25555
25687
|
currentBackgroundColor = "white",
|
|
25556
25688
|
...props
|
|
25557
25689
|
}) => {
|
|
25558
|
-
const wrapperRef = (0,
|
|
25559
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
25560
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
25561
|
-
const onOptionChange = (0,
|
|
25690
|
+
const wrapperRef = (0, import_react169.useRef)(null);
|
|
25691
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react169.useState)(false);
|
|
25692
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react169.useState)(false);
|
|
25693
|
+
const onOptionChange = (0, import_react169.useCallback)(
|
|
25562
25694
|
(event) => {
|
|
25563
25695
|
if (event.target.checked) {
|
|
25564
25696
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -25566,19 +25698,19 @@ var SegmentedControl = ({
|
|
|
25566
25698
|
},
|
|
25567
25699
|
[options, onChange]
|
|
25568
25700
|
);
|
|
25569
|
-
const sizeStyles = (0,
|
|
25701
|
+
const sizeStyles = (0, import_react169.useMemo)(() => {
|
|
25570
25702
|
const map = {
|
|
25571
|
-
sm: (0,
|
|
25572
|
-
md: (0,
|
|
25573
|
-
lg: (0,
|
|
25574
|
-
xl: (0,
|
|
25703
|
+
sm: (0, import_react168.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
25704
|
+
md: (0, import_react168.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
25705
|
+
lg: (0, import_react168.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
25706
|
+
xl: (0, import_react168.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
25575
25707
|
};
|
|
25576
25708
|
return map[size];
|
|
25577
25709
|
}, [size]);
|
|
25578
|
-
const isIconOnly = (0,
|
|
25710
|
+
const isIconOnly = (0, import_react169.useMemo)(() => {
|
|
25579
25711
|
return options.every((option) => option && option.icon && !option.label);
|
|
25580
25712
|
}, [options]);
|
|
25581
|
-
(0,
|
|
25713
|
+
(0, import_react169.useEffect)(() => {
|
|
25582
25714
|
const wrapperElement = wrapperRef.current;
|
|
25583
25715
|
const onScroll = () => {
|
|
25584
25716
|
if (!wrapperElement) {
|
|
@@ -25673,12 +25805,12 @@ init_emotion_jsx_shim();
|
|
|
25673
25805
|
|
|
25674
25806
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
25675
25807
|
init_emotion_jsx_shim();
|
|
25676
|
-
var
|
|
25677
|
-
var lightFadingOut =
|
|
25808
|
+
var import_react170 = require("@emotion/react");
|
|
25809
|
+
var lightFadingOut = import_react170.keyframes`
|
|
25678
25810
|
from { opacity: 0.1; }
|
|
25679
25811
|
to { opacity: 0.025; }
|
|
25680
25812
|
`;
|
|
25681
|
-
var skeletonStyles =
|
|
25813
|
+
var skeletonStyles = import_react170.css`
|
|
25682
25814
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
25683
25815
|
background-color: var(--gray-900);
|
|
25684
25816
|
`;
|
|
@@ -25713,12 +25845,12 @@ var Skeleton = ({
|
|
|
25713
25845
|
|
|
25714
25846
|
// src/components/Switch/Switch.tsx
|
|
25715
25847
|
init_emotion_jsx_shim();
|
|
25716
|
-
var
|
|
25848
|
+
var import_react172 = require("react");
|
|
25717
25849
|
|
|
25718
25850
|
// src/components/Switch/Switch.styles.ts
|
|
25719
25851
|
init_emotion_jsx_shim();
|
|
25720
|
-
var
|
|
25721
|
-
var SwitchInputContainer =
|
|
25852
|
+
var import_react171 = require("@emotion/react");
|
|
25853
|
+
var SwitchInputContainer = import_react171.css`
|
|
25722
25854
|
cursor: pointer;
|
|
25723
25855
|
display: inline-block;
|
|
25724
25856
|
position: relative;
|
|
@@ -25727,7 +25859,7 @@ var SwitchInputContainer = import_react170.css`
|
|
|
25727
25859
|
vertical-align: middle;
|
|
25728
25860
|
user-select: none;
|
|
25729
25861
|
`;
|
|
25730
|
-
var SwitchInput = (size) =>
|
|
25862
|
+
var SwitchInput = (size) => import_react171.css`
|
|
25731
25863
|
appearance: none;
|
|
25732
25864
|
border-radius: var(--rounded-full);
|
|
25733
25865
|
background-color: var(--white);
|
|
@@ -25737,7 +25869,7 @@ var SwitchInput = (size) => import_react170.css`
|
|
|
25737
25869
|
display: block;
|
|
25738
25870
|
width: ${size === "sm" ? "var(--spacing-base)" : "var(--spacing-md)"};
|
|
25739
25871
|
height: ${size === "sm" ? "var(--spacing-base)" : "var(--spacing-md)"};
|
|
25740
|
-
margin-top: ${size === "sm" ? "var(--spacing-
|
|
25872
|
+
margin-top: ${size === "sm" ? "var(--spacing-2xs)" : "none"};
|
|
25741
25873
|
transition:
|
|
25742
25874
|
transform var(--duration-fast) var(--timing-ease-out),
|
|
25743
25875
|
background-color var(--duration-fast) var(--timing-ease-out),
|
|
@@ -25767,7 +25899,7 @@ var SwitchInput = (size) => import_react170.css`
|
|
|
25767
25899
|
cursor: not-allowed;
|
|
25768
25900
|
}
|
|
25769
25901
|
`;
|
|
25770
|
-
var SwitchInputDisabled =
|
|
25902
|
+
var SwitchInputDisabled = import_react171.css`
|
|
25771
25903
|
opacity: var(--opacity-50);
|
|
25772
25904
|
cursor: not-allowed;
|
|
25773
25905
|
|
|
@@ -25775,7 +25907,7 @@ var SwitchInputDisabled = import_react170.css`
|
|
|
25775
25907
|
cursor: not-allowed;
|
|
25776
25908
|
}
|
|
25777
25909
|
`;
|
|
25778
|
-
var SwitchInputLabel = (size) =>
|
|
25910
|
+
var SwitchInputLabel = (size) => import_react171.css`
|
|
25779
25911
|
align-items: center;
|
|
25780
25912
|
color: var(--typography-base);
|
|
25781
25913
|
display: inline-flex;
|
|
@@ -25791,13 +25923,13 @@ var SwitchInputLabel = (size) => import_react170.css`
|
|
|
25791
25923
|
overflow: hidden;
|
|
25792
25924
|
width: ${size === "sm" ? "var(--spacing-lg)" : "var(--spacing-xl)"};
|
|
25793
25925
|
height: ${size === "sm" ? "var(--spacing-base)" : "var(--spacing-md)"};
|
|
25794
|
-
margin-top: ${size === "sm" ? "var(--spacing-
|
|
25926
|
+
margin-top: ${size === "sm" ? "var(--spacing-2xs)" : "none"};
|
|
25795
25927
|
position: absolute;
|
|
25796
25928
|
left: 0;
|
|
25797
25929
|
top: 0;
|
|
25798
25930
|
}
|
|
25799
25931
|
`;
|
|
25800
|
-
var SwitchText = (size) =>
|
|
25932
|
+
var SwitchText = (size) => import_react171.css`
|
|
25801
25933
|
color: var(--gray-500);
|
|
25802
25934
|
font-size: var(--fs-sm);
|
|
25803
25935
|
padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
|
|
@@ -25805,7 +25937,7 @@ var SwitchText = (size) => import_react170.css`
|
|
|
25805
25937
|
|
|
25806
25938
|
// src/components/Switch/Switch.tsx
|
|
25807
25939
|
var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
|
|
25808
|
-
var Switch = (0,
|
|
25940
|
+
var Switch = (0, import_react172.forwardRef)(
|
|
25809
25941
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
25810
25942
|
let additionalText = infoText;
|
|
25811
25943
|
if (infoText && toggleText) {
|
|
@@ -25834,8 +25966,8 @@ var React24 = __toESM(require("react"));
|
|
|
25834
25966
|
|
|
25835
25967
|
// src/components/Table/Table.styles.ts
|
|
25836
25968
|
init_emotion_jsx_shim();
|
|
25837
|
-
var
|
|
25838
|
-
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) =>
|
|
25969
|
+
var import_react173 = require("@emotion/react");
|
|
25970
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react173.css`
|
|
25839
25971
|
border-bottom: 1px solid var(--gray-400);
|
|
25840
25972
|
border-collapse: collapse;
|
|
25841
25973
|
min-width: 100%;
|
|
@@ -25855,14 +25987,14 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_
|
|
|
25855
25987
|
background-color: var(--gray-50);
|
|
25856
25988
|
}
|
|
25857
25989
|
`;
|
|
25858
|
-
var tableHead =
|
|
25990
|
+
var tableHead = import_react173.css`
|
|
25859
25991
|
color: var(--typography-base);
|
|
25860
25992
|
text-align: left;
|
|
25861
25993
|
`;
|
|
25862
|
-
var tableRow =
|
|
25994
|
+
var tableRow = import_react173.css`
|
|
25863
25995
|
border-bottom: 1px solid var(--gray-100);
|
|
25864
25996
|
`;
|
|
25865
|
-
var tableCellHead =
|
|
25997
|
+
var tableCellHead = import_react173.css`
|
|
25866
25998
|
font-size: var(--fs-sm);
|
|
25867
25999
|
text-transform: uppercase;
|
|
25868
26000
|
font-weight: var(--fw-bold);
|
|
@@ -25908,13 +26040,13 @@ var TableCellData = React24.forwardRef(
|
|
|
25908
26040
|
|
|
25909
26041
|
// src/components/Tabs/Tabs.tsx
|
|
25910
26042
|
init_emotion_jsx_shim();
|
|
25911
|
-
var
|
|
25912
|
-
var
|
|
26043
|
+
var import_react175 = require("@ariakit/react");
|
|
26044
|
+
var import_react176 = require("react");
|
|
25913
26045
|
|
|
25914
26046
|
// src/components/Tabs/Tabs.styles.ts
|
|
25915
26047
|
init_emotion_jsx_shim();
|
|
25916
|
-
var
|
|
25917
|
-
var tabButtonStyles =
|
|
26048
|
+
var import_react174 = require("@emotion/react");
|
|
26049
|
+
var tabButtonStyles = import_react174.css`
|
|
25918
26050
|
align-items: center;
|
|
25919
26051
|
border: 0;
|
|
25920
26052
|
height: 2.5rem;
|
|
@@ -25931,7 +26063,7 @@ var tabButtonStyles = import_react173.css`
|
|
|
25931
26063
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
25932
26064
|
}
|
|
25933
26065
|
`;
|
|
25934
|
-
var tabButtonGroupStyles =
|
|
26066
|
+
var tabButtonGroupStyles = import_react174.css`
|
|
25935
26067
|
display: flex;
|
|
25936
26068
|
gap: var(--spacing-base);
|
|
25937
26069
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -25940,7 +26072,7 @@ var tabButtonGroupStyles = import_react173.css`
|
|
|
25940
26072
|
// src/components/Tabs/Tabs.tsx
|
|
25941
26073
|
var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
|
|
25942
26074
|
var useCurrentTab = () => {
|
|
25943
|
-
const context = (0,
|
|
26075
|
+
const context = (0, import_react175.useTabStore)();
|
|
25944
26076
|
if (!context) {
|
|
25945
26077
|
throw new Error("This component can only be used inside <Tabs>");
|
|
25946
26078
|
}
|
|
@@ -25954,12 +26086,12 @@ var Tabs = ({
|
|
|
25954
26086
|
manual,
|
|
25955
26087
|
...props
|
|
25956
26088
|
}) => {
|
|
25957
|
-
const selected = (0,
|
|
26089
|
+
const selected = (0, import_react176.useMemo)(() => {
|
|
25958
26090
|
if (selectedId) return selectedId;
|
|
25959
26091
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
25960
26092
|
}, [selectedId, useHashForState]);
|
|
25961
|
-
const tab = (0,
|
|
25962
|
-
const onTabSelect = (0,
|
|
26093
|
+
const tab = (0, import_react175.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
26094
|
+
const onTabSelect = (0, import_react176.useCallback)(
|
|
25963
26095
|
(value) => {
|
|
25964
26096
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
25965
26097
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -25970,28 +26102,28 @@ var Tabs = ({
|
|
|
25970
26102
|
},
|
|
25971
26103
|
[onSelectedIdChange, useHashForState]
|
|
25972
26104
|
);
|
|
25973
|
-
(0,
|
|
26105
|
+
(0, import_react176.useEffect)(() => {
|
|
25974
26106
|
if (selected && selected !== tab.getState().activeId) {
|
|
25975
26107
|
tab.setSelectedId(selected);
|
|
25976
26108
|
}
|
|
25977
26109
|
}, [selected, tab]);
|
|
25978
|
-
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
26110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react175.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
25979
26111
|
};
|
|
25980
26112
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
25981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
26113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react175.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
25982
26114
|
};
|
|
25983
26115
|
var TabButton = ({
|
|
25984
26116
|
children,
|
|
25985
26117
|
id,
|
|
25986
26118
|
...props
|
|
25987
26119
|
}) => {
|
|
25988
|
-
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
26120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react175.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
25989
26121
|
};
|
|
25990
26122
|
var TabContent = ({
|
|
25991
26123
|
children,
|
|
25992
26124
|
...props
|
|
25993
26125
|
}) => {
|
|
25994
|
-
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
26126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react175.TabPanel, { ...props, children });
|
|
25995
26127
|
};
|
|
25996
26128
|
|
|
25997
26129
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -25999,8 +26131,8 @@ init_emotion_jsx_shim();
|
|
|
25999
26131
|
|
|
26000
26132
|
// src/components/Validation/StatusBullet.styles.ts
|
|
26001
26133
|
init_emotion_jsx_shim();
|
|
26002
|
-
var
|
|
26003
|
-
var StatusBulletContainer =
|
|
26134
|
+
var import_react177 = require("@emotion/react");
|
|
26135
|
+
var StatusBulletContainer = import_react177.css`
|
|
26004
26136
|
align-items: center;
|
|
26005
26137
|
align-self: center;
|
|
26006
26138
|
color: var(--gray-500);
|
|
@@ -26009,7 +26141,6 @@ var StatusBulletContainer = import_react176.css`
|
|
|
26009
26141
|
gap: var(--spacing-xs);
|
|
26010
26142
|
line-height: 1;
|
|
26011
26143
|
position: relative;
|
|
26012
|
-
text-transform: lowercase;
|
|
26013
26144
|
|
|
26014
26145
|
&:before {
|
|
26015
26146
|
border-radius: var(--rounded-full);
|
|
@@ -26017,33 +26148,33 @@ var StatusBulletContainer = import_react176.css`
|
|
|
26017
26148
|
display: block;
|
|
26018
26149
|
}
|
|
26019
26150
|
`;
|
|
26020
|
-
var StatusBulletBase =
|
|
26151
|
+
var StatusBulletBase = import_react177.css`
|
|
26021
26152
|
font-size: var(--fs-sm);
|
|
26022
26153
|
&:before {
|
|
26023
26154
|
width: var(--fs-xs);
|
|
26024
26155
|
height: var(--fs-xs);
|
|
26025
26156
|
}
|
|
26026
26157
|
`;
|
|
26027
|
-
var StatusBulletSmall =
|
|
26158
|
+
var StatusBulletSmall = import_react177.css`
|
|
26028
26159
|
font-size: var(--fs-xs);
|
|
26029
26160
|
&:before {
|
|
26030
26161
|
width: var(--fs-xxs);
|
|
26031
26162
|
height: var(--fs-xxs);
|
|
26032
26163
|
}
|
|
26033
26164
|
`;
|
|
26034
|
-
var StatusDraft =
|
|
26165
|
+
var StatusDraft = import_react177.css`
|
|
26035
26166
|
&:before {
|
|
26036
26167
|
background: var(--white);
|
|
26037
26168
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
26038
26169
|
}
|
|
26039
26170
|
`;
|
|
26040
|
-
var StatusModified =
|
|
26171
|
+
var StatusModified = import_react177.css`
|
|
26041
26172
|
&:before {
|
|
26042
26173
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
26043
26174
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
26044
26175
|
}
|
|
26045
26176
|
`;
|
|
26046
|
-
var StatusError =
|
|
26177
|
+
var StatusError = import_react177.css`
|
|
26047
26178
|
color: var(--error);
|
|
26048
26179
|
&:before {
|
|
26049
26180
|
/* TODO: replace this with an svg icon */
|
|
@@ -26056,22 +26187,22 @@ var StatusError = import_react176.css`
|
|
|
26056
26187
|
);
|
|
26057
26188
|
}
|
|
26058
26189
|
`;
|
|
26059
|
-
var StatusPublished =
|
|
26190
|
+
var StatusPublished = import_react177.css`
|
|
26060
26191
|
&:before {
|
|
26061
26192
|
background: var(--accent-dark);
|
|
26062
26193
|
}
|
|
26063
26194
|
`;
|
|
26064
|
-
var StatusOrphan =
|
|
26195
|
+
var StatusOrphan = import_react177.css`
|
|
26065
26196
|
&:before {
|
|
26066
26197
|
background: var(--brand-secondary-5);
|
|
26067
26198
|
}
|
|
26068
26199
|
`;
|
|
26069
|
-
var StatusUnknown =
|
|
26200
|
+
var StatusUnknown = import_react177.css`
|
|
26070
26201
|
&:before {
|
|
26071
26202
|
background: var(--gray-800);
|
|
26072
26203
|
}
|
|
26073
26204
|
`;
|
|
26074
|
-
var StatusDeleted =
|
|
26205
|
+
var StatusDeleted = import_react177.css`
|
|
26075
26206
|
&:before {
|
|
26076
26207
|
background: var(--error);
|
|
26077
26208
|
}
|
|
@@ -26084,6 +26215,7 @@ var StatusBullet = ({
|
|
|
26084
26215
|
hideText = false,
|
|
26085
26216
|
size = "base",
|
|
26086
26217
|
message,
|
|
26218
|
+
compact = false,
|
|
26087
26219
|
...props
|
|
26088
26220
|
}) => {
|
|
26089
26221
|
const currentStateStyles = {
|
|
@@ -26098,7 +26230,7 @@ var StatusBullet = ({
|
|
|
26098
26230
|
Deleted: StatusDeleted
|
|
26099
26231
|
};
|
|
26100
26232
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
26101
|
-
|
|
26233
|
+
const StatusComponent = () => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
26102
26234
|
"span",
|
|
26103
26235
|
{
|
|
26104
26236
|
role: "status",
|
|
@@ -26106,7 +26238,11 @@ var StatusBullet = ({
|
|
|
26106
26238
|
...props,
|
|
26107
26239
|
children: hideText ? null : message ? message : status
|
|
26108
26240
|
}
|
|
26109
|
-
)
|
|
26241
|
+
);
|
|
26242
|
+
if (compact) {
|
|
26243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusComponent, {});
|
|
26244
|
+
}
|
|
26245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Tooltip, { title: message != null ? message : status, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(StatusComponent, {}) }) });
|
|
26110
26246
|
};
|
|
26111
26247
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26112
26248
|
0 && (module.exports = {
|