@uniformdev/design-system 19.165.2-alpha.0 → 19.167.2-alpha.3
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 +1127 -673
- package/dist/index.d.mts +44 -5
- package/dist/index.d.ts +44 -5
- package/dist/index.js +1131 -685
- package/package.json +11 -7
package/dist/index.js
CHANGED
|
@@ -1410,6 +1410,7 @@ __export(src_exports, {
|
|
|
1410
1410
|
IntegrationModalIcon: () => IntegrationModalIcon,
|
|
1411
1411
|
IntegrationTile: () => IntegrationTile,
|
|
1412
1412
|
JsonEditor: () => JsonEditor,
|
|
1413
|
+
KeyValueInput: () => KeyValueInput,
|
|
1413
1414
|
Label: () => Label,
|
|
1414
1415
|
LabelLeadingIcon: () => LabelLeadingIcon,
|
|
1415
1416
|
Legend: () => Legend,
|
|
@@ -1587,6 +1588,7 @@ __export(src_exports, {
|
|
|
1587
1588
|
toast: () => import_react_toastify.toast,
|
|
1588
1589
|
uniformComponentIcon: () => uniformComponentIcon,
|
|
1589
1590
|
uniformComponentPatternIcon: () => uniformComponentPatternIcon,
|
|
1591
|
+
uniformCompositionPatternIcon: () => uniformCompositionPatternIcon,
|
|
1590
1592
|
uniformContentTypeIcon: () => uniformContentTypeIcon,
|
|
1591
1593
|
uniformEntryIcon: () => uniformEntryIcon,
|
|
1592
1594
|
uniformEntryPatternIcon: () => uniformEntryPatternIcon,
|
|
@@ -1599,6 +1601,7 @@ __export(src_exports, {
|
|
|
1599
1601
|
useIconContext: () => useIconContext,
|
|
1600
1602
|
useOutsideClick: () => useOutsideClick,
|
|
1601
1603
|
useParameterShell: () => useParameterShell,
|
|
1604
|
+
usePopoverComponentContext: () => usePopoverComponentContext,
|
|
1602
1605
|
useShortcut: () => useShortcut,
|
|
1603
1606
|
utilityColors: () => functionalColors,
|
|
1604
1607
|
warningIcon: () => warningIcon,
|
|
@@ -1615,7 +1618,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1615
1618
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1616
1619
|
"link",
|
|
1617
1620
|
{
|
|
1618
|
-
href: "https://fonts.googleapis.com/css2?family=DM+
|
|
1621
|
+
href: "https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Quantico:ital,wght@0,400;0,700;1,400;1,700&display=swap",
|
|
1619
1622
|
rel: "stylesheet"
|
|
1620
1623
|
}
|
|
1621
1624
|
),
|
|
@@ -1759,7 +1762,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1759
1762
|
/* font family */
|
|
1760
1763
|
--ff-base: 'DM Sans', sans-serif;
|
|
1761
1764
|
--ff-heading: 'Quantico', sans-serif;
|
|
1762
|
-
--ff-mono: '
|
|
1765
|
+
--ff-mono: 'DM Mono', monospace;
|
|
1763
1766
|
|
|
1764
1767
|
/* max text width */
|
|
1765
1768
|
--prose: 65ch;
|
|
@@ -1785,6 +1788,7 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
|
1785
1788
|
--rounded-sm: 0.125rem; /* 2px */
|
|
1786
1789
|
--rounded-base: 0.25rem; /* 4px */
|
|
1787
1790
|
--rounded-md: 0.375rem; /* 6px */
|
|
1791
|
+
--rounded-lg: 0.5rem; /* 8px */
|
|
1788
1792
|
|
|
1789
1793
|
/* anything below here should be removed as its not in our style guide */
|
|
1790
1794
|
--rounded-xl: 0.75rem;
|
|
@@ -4796,6 +4800,25 @@ var uniformComponentPatternIcon = (0, import_all_files2.GenIcon)({
|
|
|
4796
4800
|
}
|
|
4797
4801
|
]
|
|
4798
4802
|
});
|
|
4803
|
+
var uniformCompositionPatternIcon = (0, import_all_files2.GenIcon)({
|
|
4804
|
+
tag: "svg",
|
|
4805
|
+
attr: {
|
|
4806
|
+
role: "img",
|
|
4807
|
+
viewBox: "0 0 24 24"
|
|
4808
|
+
},
|
|
4809
|
+
child: [
|
|
4810
|
+
{
|
|
4811
|
+
tag: "path",
|
|
4812
|
+
attr: {
|
|
4813
|
+
fillRule: "evenodd",
|
|
4814
|
+
clipRule: "evenodd",
|
|
4815
|
+
fill: "currentColor",
|
|
4816
|
+
d: "M6.92163 12H4V13.5H8.42163L6.92163 12ZM12.7397 17.8181C12.6083 17.9314 12.4372 18 12.25 18H3.25C2.83579 18 2.5 17.6642 2.5 17.25V6.75C2.5 6.33579 2.83579 6 3.25 6H8.5V9.75H9.17163L10.6716 8.25H10V6.07501C10.7159 6.22033 11.3577 6.56957 11.8622 7.05945L12.9229 5.99871C11.9761 5.07158 10.6798 4.5 9.25 4.5H3.25C2.00736 4.5 1 5.50736 1 6.75V17.25C1 18.4926 2.00736 19.5 3.25 19.5H12.25C12.8514 19.5 13.3977 19.2641 13.8013 18.8797L12.7397 17.8181ZM11.4216 16.5H4V15H9.92163L11.4216 16.5ZM4 10.5H7V9H4V10.5ZM12.5784 12L16.3497 8.22876L20.1209 12L16.3497 15.7712L12.5784 12ZM16.3497 18.5997L9.75 12L16.3497 5.40034L22.9493 12L16.3497 18.5997Z"
|
|
4817
|
+
},
|
|
4818
|
+
child: []
|
|
4819
|
+
}
|
|
4820
|
+
]
|
|
4821
|
+
});
|
|
4799
4822
|
var uniformContentTypeIcon = import_CgList2.CgList;
|
|
4800
4823
|
var uniformEntryIcon = import_CgPen2.CgPen;
|
|
4801
4824
|
var uniformEntryPatternIcon = (0, import_all_files2.GenIcon)({
|
|
@@ -13867,15 +13890,18 @@ init_emotion_jsx_shim();
|
|
|
13867
13890
|
var import_react32 = require("@emotion/react");
|
|
13868
13891
|
var import_CgChevronDown2 = require("@react-icons/all-files/cg/CgChevronDown");
|
|
13869
13892
|
var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
|
|
13870
|
-
var buttonStyle = import_react32.css`
|
|
13893
|
+
var buttonStyle = (bgColor) => import_react32.css`
|
|
13871
13894
|
border: 0;
|
|
13872
|
-
background-color:
|
|
13895
|
+
background-color: ${bgColor};
|
|
13873
13896
|
display: block;
|
|
13874
13897
|
font-size: var(--fs-sm);
|
|
13875
13898
|
line-height: 1.5;
|
|
13899
|
+
transition: background-color var(--duration-fast) var(--timing-ease-out),
|
|
13900
|
+
outline var(--duration-fast) var(--timing-ease-out);
|
|
13901
|
+
outline: 1px solid transparent;
|
|
13876
13902
|
|
|
13877
13903
|
&:hover {
|
|
13878
|
-
outline:
|
|
13904
|
+
outline-color: var(--gray-300);
|
|
13879
13905
|
background-color: var(--gray-100);
|
|
13880
13906
|
}
|
|
13881
13907
|
|
|
@@ -13883,8 +13909,12 @@ var buttonStyle = import_react32.css`
|
|
|
13883
13909
|
color: var(--gray-400);
|
|
13884
13910
|
}
|
|
13885
13911
|
`;
|
|
13886
|
-
function DropdownStyleMenuTrigger({
|
|
13887
|
-
|
|
13912
|
+
function DropdownStyleMenuTrigger({
|
|
13913
|
+
bgColor = "var(--white)",
|
|
13914
|
+
children,
|
|
13915
|
+
...buttonProps
|
|
13916
|
+
}) {
|
|
13917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { ...buttonProps, css: buttonStyle(bgColor), type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
13888
13918
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children }),
|
|
13889
13919
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_CgChevronDown2.CgChevronDown, { size: "1rem" })
|
|
13890
13920
|
] }) });
|
|
@@ -14118,19 +14148,14 @@ var Menu = React7.forwardRef(function Menu2({
|
|
|
14118
14148
|
"data-testid": testId != null ? testId : "more-menu",
|
|
14119
14149
|
hideOnHoverOutside: (event) => {
|
|
14120
14150
|
var _a;
|
|
14121
|
-
if (!menu.parent)
|
|
14122
|
-
return false;
|
|
14151
|
+
if (!menu.parent) return false;
|
|
14123
14152
|
const { contentElement, anchorElement } = menu.getState();
|
|
14124
14153
|
const [target] = event.composedPath();
|
|
14125
|
-
if (!target)
|
|
14126
|
-
return false;
|
|
14154
|
+
if (!target) return false;
|
|
14127
14155
|
const activeElement = (_a = target.ownerDocument) == null ? void 0 : _a.activeElement;
|
|
14128
|
-
if (anchorElement == null ? void 0 : anchorElement.contains(target))
|
|
14129
|
-
|
|
14130
|
-
if (
|
|
14131
|
-
return false;
|
|
14132
|
-
if (activeElement && target.contains(activeElement))
|
|
14133
|
-
return false;
|
|
14156
|
+
if (anchorElement == null ? void 0 : anchorElement.contains(target)) return false;
|
|
14157
|
+
if (contentElement == null ? void 0 : contentElement.contains(target)) return false;
|
|
14158
|
+
if (activeElement && target.contains(activeElement)) return false;
|
|
14134
14159
|
return true;
|
|
14135
14160
|
},
|
|
14136
14161
|
children: disableAutoSeparatorManagement ? children : filterMenuSeparators(children)
|
|
@@ -14977,8 +15002,7 @@ var InputInlineSelect = ({
|
|
|
14977
15002
|
"aria-expanded": menuVisible,
|
|
14978
15003
|
css: inlineSelectBtn,
|
|
14979
15004
|
onClick: () => {
|
|
14980
|
-
if (!disabled2)
|
|
14981
|
-
setMenuVisible((prev) => !prev);
|
|
15005
|
+
if (!disabled2) setMenuVisible((prev) => !prev);
|
|
14982
15006
|
},
|
|
14983
15007
|
disabled: disabled2,
|
|
14984
15008
|
...props,
|
|
@@ -15840,6 +15864,7 @@ var container = import_react59.css`
|
|
|
15840
15864
|
--calendar-cell-size: 1.8rem;
|
|
15841
15865
|
width: fit-content;
|
|
15842
15866
|
max-width: 100%;
|
|
15867
|
+
margin: 0 auto;
|
|
15843
15868
|
`;
|
|
15844
15869
|
var header = import_react59.css`
|
|
15845
15870
|
display: flex;
|
|
@@ -16611,6 +16636,7 @@ var ChipMultiline = import_react69.css`
|
|
|
16611
16636
|
padding-inline: var(--spacing-sm);
|
|
16612
16637
|
`;
|
|
16613
16638
|
var ChipThemeAccentLight = import_react69.css`
|
|
16639
|
+
--outline-color: var(--accent-light);
|
|
16614
16640
|
background: var(--accent-light);
|
|
16615
16641
|
color: var(--typography-base);
|
|
16616
16642
|
|
|
@@ -16636,6 +16662,7 @@ var ChipThemeAccentLight = import_react69.css`
|
|
|
16636
16662
|
}
|
|
16637
16663
|
`;
|
|
16638
16664
|
var ChipThemeAccentDark = import_react69.css`
|
|
16665
|
+
--outline-color: var(--accent-dark);
|
|
16639
16666
|
background: var(--accent-dark);
|
|
16640
16667
|
color: var(--white);
|
|
16641
16668
|
|
|
@@ -16657,6 +16684,7 @@ var ChipThemeAccentDark = import_react69.css`
|
|
|
16657
16684
|
}
|
|
16658
16685
|
`;
|
|
16659
16686
|
var ChipAltThemeAccentLight = import_react69.css`
|
|
16687
|
+
--outline-color: var(--accent-alt-light);
|
|
16660
16688
|
background: var(--accent-alt-light);
|
|
16661
16689
|
color: var(--typography-base);
|
|
16662
16690
|
|
|
@@ -16682,6 +16710,7 @@ var ChipAltThemeAccentLight = import_react69.css`
|
|
|
16682
16710
|
}
|
|
16683
16711
|
`;
|
|
16684
16712
|
var ChipAltThemeAccentDark = import_react69.css`
|
|
16713
|
+
--outline-color: var(--accent-alt-dark);
|
|
16685
16714
|
background: var(--accent-alt-dark);
|
|
16686
16715
|
color: var(--white);
|
|
16687
16716
|
|
|
@@ -16703,6 +16732,7 @@ var ChipAltThemeAccentDark = import_react69.css`
|
|
|
16703
16732
|
}
|
|
16704
16733
|
`;
|
|
16705
16734
|
var ChipThemeNeutralLight = import_react69.css`
|
|
16735
|
+
--outline-color: var(--gray-300);
|
|
16706
16736
|
background: var(--gray-100);
|
|
16707
16737
|
color: var(--typography-base);
|
|
16708
16738
|
:where([role='button']) {
|
|
@@ -16713,6 +16743,7 @@ var ChipThemeNeutralLight = import_react69.css`
|
|
|
16713
16743
|
}
|
|
16714
16744
|
`;
|
|
16715
16745
|
var ChipThemeNeutralDark = import_react69.css`
|
|
16746
|
+
--outline-color: var(--gray-700);
|
|
16716
16747
|
background: var(--gray-700);
|
|
16717
16748
|
color: var(--white);
|
|
16718
16749
|
:where([role='button']) {
|
|
@@ -16732,6 +16763,15 @@ var ChipActionButton = import_react69.css`
|
|
|
16732
16763
|
border-radius: 0 var(--rounded-full) var(--rounded-full) 0;
|
|
16733
16764
|
padding: 0;
|
|
16734
16765
|
`;
|
|
16766
|
+
var ChipOutlined = import_react69.css`
|
|
16767
|
+
background: var(--white);
|
|
16768
|
+
color: var(--typography-light);
|
|
16769
|
+
box-shadow: inset 0 0 0 1px var(--outline-color);
|
|
16770
|
+
|
|
16771
|
+
> [role='separator'] {
|
|
16772
|
+
border-color: var(--outline-color);
|
|
16773
|
+
}
|
|
16774
|
+
`;
|
|
16735
16775
|
|
|
16736
16776
|
// src/components/Chip/Chip.tsx
|
|
16737
16777
|
var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
|
|
@@ -16748,6 +16788,7 @@ var Chip = ({
|
|
|
16748
16788
|
text,
|
|
16749
16789
|
size = "sm",
|
|
16750
16790
|
theme = "accent-light",
|
|
16791
|
+
variant = "solid",
|
|
16751
16792
|
chipAction,
|
|
16752
16793
|
as = "span",
|
|
16753
16794
|
...props
|
|
@@ -16758,14 +16799,26 @@ var Chip = ({
|
|
|
16758
16799
|
md: ChipMedium
|
|
16759
16800
|
};
|
|
16760
16801
|
const ElementType = as;
|
|
16761
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
16762
|
-
|
|
16763
|
-
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16767
|
-
|
|
16768
|
-
|
|
16802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
16803
|
+
ElementType,
|
|
16804
|
+
{
|
|
16805
|
+
css: [
|
|
16806
|
+
ChipContainer,
|
|
16807
|
+
chipSize[size],
|
|
16808
|
+
chipTheme[theme],
|
|
16809
|
+
variant === "outlined" ? ChipOutlined : void 0
|
|
16810
|
+
],
|
|
16811
|
+
...props,
|
|
16812
|
+
children: [
|
|
16813
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
16814
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { role: "presentation", css: [ChipIcon], children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { icon, iconColor: "currentColor", size: "1rem" }) }),
|
|
16815
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { role: "separator", css: ChipSeparator })
|
|
16816
|
+
] }) : null,
|
|
16817
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { css: ChipText, children: text }),
|
|
16818
|
+
chipAction
|
|
16819
|
+
]
|
|
16820
|
+
}
|
|
16821
|
+
);
|
|
16769
16822
|
};
|
|
16770
16823
|
var DismissibleChipAction = ({ onDismiss, ...props }) => {
|
|
16771
16824
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
@@ -17045,12 +17098,21 @@ var trigger = import_react74.css`
|
|
|
17045
17098
|
var popover = import_react74.css`
|
|
17046
17099
|
padding: var(--spacing-md);
|
|
17047
17100
|
max-width: none;
|
|
17048
|
-
|
|
17049
|
-
|
|
17050
|
-
|
|
17101
|
+
container-type: inline-size;
|
|
17102
|
+
width: 100%;
|
|
17103
|
+
`;
|
|
17104
|
+
var popoverInnerContent = import_react74.css`
|
|
17105
|
+
display: grid;
|
|
17106
|
+
gap: var(--spacing-base);
|
|
17051
17107
|
|
|
17052
|
-
|
|
17053
|
-
grid-template-
|
|
17108
|
+
${cq("360px")} {
|
|
17109
|
+
grid-template-columns: 0.8fr 1fr;
|
|
17110
|
+
grid-template-rows: 1fr 1fr;
|
|
17111
|
+
gap: var(--spacing-md);
|
|
17112
|
+
|
|
17113
|
+
[data-variant='date'] & {
|
|
17114
|
+
grid-template-rows: 1fr;
|
|
17115
|
+
}
|
|
17054
17116
|
}
|
|
17055
17117
|
`;
|
|
17056
17118
|
var calendarSection = import_react74.css`
|
|
@@ -17069,6 +17131,15 @@ var timeSection = import_react74.css`
|
|
|
17069
17131
|
var tzSection = import_react74.css`
|
|
17070
17132
|
align-self: stretch;
|
|
17071
17133
|
`;
|
|
17134
|
+
var datePart = import_react74.css`
|
|
17135
|
+
text-overflow: ellipsis;
|
|
17136
|
+
overflow: hidden;
|
|
17137
|
+
white-space: nowrap;
|
|
17138
|
+
`;
|
|
17139
|
+
var datePartButton = import_react74.css`
|
|
17140
|
+
// this allows the button to be as wide as the text
|
|
17141
|
+
min-width: 0;
|
|
17142
|
+
`;
|
|
17072
17143
|
|
|
17073
17144
|
// src/components/DateTimePicker/DateTimePickerSummary.tsx
|
|
17074
17145
|
init_emotion_jsx_shim();
|
|
@@ -17107,10 +17178,10 @@ function DateTimePickerSummary({
|
|
|
17107
17178
|
}
|
|
17108
17179
|
}
|
|
17109
17180
|
}
|
|
17110
|
-
const
|
|
17181
|
+
const datePart2 = (value == null ? void 0 : value.datetime) ? dateFormat.format(new Date(value.datetime)) : null;
|
|
17111
17182
|
const timePart = (value == null ? void 0 : value.datetime) ? timeFormat.format(new Date(value.datetime)) : null;
|
|
17112
|
-
return
|
|
17113
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("em", { css: inputLabelFocal, children:
|
|
17183
|
+
return datePart2 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { css: datePart, children: [
|
|
17184
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("em", { css: inputLabelFocal, children: datePart2 }),
|
|
17114
17185
|
!!timePart && `, ${timePart}`,
|
|
17115
17186
|
!!(value == null ? void 0 : value.timeZone) && timeZoneWasValid && ` in ${value == null ? void 0 : value.timeZone}`
|
|
17116
17187
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: placeholder });
|
|
@@ -17290,7 +17361,7 @@ var DateTimePicker = ({
|
|
|
17290
17361
|
import_Popover.PopoverDisclosure,
|
|
17291
17362
|
{
|
|
17292
17363
|
...popover2,
|
|
17293
|
-
css:
|
|
17364
|
+
css: datePartButton,
|
|
17294
17365
|
as: Button,
|
|
17295
17366
|
buttonType: "ghostUnimportant",
|
|
17296
17367
|
disabled: disabled2,
|
|
@@ -17313,36 +17384,48 @@ var DateTimePicker = ({
|
|
|
17313
17384
|
}
|
|
17314
17385
|
),
|
|
17315
17386
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_Popover.Popover, { ...popover2, css: [Popover, popover], "aria-label": "Pick a date", children: [
|
|
17316
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.
|
|
17317
|
-
|
|
17318
|
-
|
|
17319
|
-
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
17320
|
-
minValue: parsedMinVisible,
|
|
17321
|
-
maxValue: parseMaxVisible,
|
|
17322
|
-
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
17323
|
-
onChange: handleDateChange,
|
|
17324
|
-
"data-testid": `${testId}-calendar`
|
|
17325
|
-
}
|
|
17326
|
-
) }),
|
|
17327
|
-
variant !== "date" /* Date */ && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: timeSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17328
|
-
InputTime,
|
|
17329
|
-
{
|
|
17330
|
-
label: "Time",
|
|
17331
|
-
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
17332
|
-
belowInputSlot: belowTimeInputSlot,
|
|
17333
|
-
onChange: handleTimeChange
|
|
17334
|
-
}
|
|
17335
|
-
) }),
|
|
17336
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: tzSection, children: [
|
|
17337
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { css: labelText, children: "Timezone" }),
|
|
17338
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17339
|
-
InputComboBox,
|
|
17387
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: popoverInnerContent, children: [
|
|
17388
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: calendarSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17389
|
+
Calendar,
|
|
17340
17390
|
{
|
|
17341
|
-
value:
|
|
17342
|
-
|
|
17343
|
-
|
|
17391
|
+
value: draftDate == null ? void 0 : draftDate.toString(),
|
|
17392
|
+
minValue: parsedMinVisible,
|
|
17393
|
+
maxValue: parseMaxVisible,
|
|
17394
|
+
timeZone: (draftTimeZone == null ? void 0 : draftTimeZone.value) || (parsedValue == null ? void 0 : parsedValue.timeZone) || getLocalTimeZone(),
|
|
17395
|
+
onChange: handleDateChange,
|
|
17396
|
+
"data-testid": `${testId}-calendar`
|
|
17344
17397
|
}
|
|
17345
|
-
)
|
|
17398
|
+
) }),
|
|
17399
|
+
variant !== "date" /* Date */ && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { css: timeSection, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17400
|
+
InputTime,
|
|
17401
|
+
{
|
|
17402
|
+
label: "Time",
|
|
17403
|
+
value: draftTime == null ? void 0 : draftTime.toString(),
|
|
17404
|
+
belowInputSlot: belowTimeInputSlot,
|
|
17405
|
+
onChange: handleTimeChange
|
|
17406
|
+
}
|
|
17407
|
+
) }),
|
|
17408
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: tzSection, children: [
|
|
17409
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Label, { css: labelText, children: "Timezone" }),
|
|
17410
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
17411
|
+
InputComboBox,
|
|
17412
|
+
{
|
|
17413
|
+
value: draftTimeZone,
|
|
17414
|
+
options: TIMEZONE_OPTIONS,
|
|
17415
|
+
onChange: handleTimezoneChange,
|
|
17416
|
+
menuPlacement: "auto",
|
|
17417
|
+
styles: {
|
|
17418
|
+
menu(base) {
|
|
17419
|
+
return {
|
|
17420
|
+
...base,
|
|
17421
|
+
width: "fit-content",
|
|
17422
|
+
right: 0
|
|
17423
|
+
};
|
|
17424
|
+
}
|
|
17425
|
+
}
|
|
17426
|
+
}
|
|
17427
|
+
)
|
|
17428
|
+
] })
|
|
17346
17429
|
] }),
|
|
17347
17430
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(HorizontalRhythm, { gap: "0", children: [
|
|
17348
17431
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { buttonType: "secondary", onClick: handleSelectClick, children: "Select" }),
|
|
@@ -19051,44 +19134,401 @@ var JsonEditor = ({ defaultValue, onChange, jsonSchema, height, readOnly }) => {
|
|
|
19051
19134
|
);
|
|
19052
19135
|
};
|
|
19053
19136
|
|
|
19137
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
19138
|
+
init_emotion_jsx_shim();
|
|
19139
|
+
var import_core = require("@dnd-kit/core");
|
|
19140
|
+
var import_modifiers = require("@dnd-kit/modifiers");
|
|
19141
|
+
var import_sortable = require("@dnd-kit/sortable");
|
|
19142
|
+
var import_utilities = require("@dnd-kit/utilities");
|
|
19143
|
+
var import_react102 = require("react");
|
|
19144
|
+
|
|
19145
|
+
// src/utils/useDebouncedCallback.ts
|
|
19146
|
+
init_emotion_jsx_shim();
|
|
19147
|
+
var import_react100 = require("react");
|
|
19148
|
+
function useDebouncedCallback(callback, deps, delay, maxWait = 0) {
|
|
19149
|
+
const timeout = (0, import_react100.useRef)();
|
|
19150
|
+
const waitTimeout = (0, import_react100.useRef)();
|
|
19151
|
+
const cb = (0, import_react100.useRef)(callback);
|
|
19152
|
+
const lastCall = (0, import_react100.useRef)();
|
|
19153
|
+
const clear = () => {
|
|
19154
|
+
if (timeout.current) {
|
|
19155
|
+
clearTimeout(timeout.current);
|
|
19156
|
+
timeout.current = void 0;
|
|
19157
|
+
}
|
|
19158
|
+
if (waitTimeout.current) {
|
|
19159
|
+
clearTimeout(waitTimeout.current);
|
|
19160
|
+
waitTimeout.current = void 0;
|
|
19161
|
+
}
|
|
19162
|
+
};
|
|
19163
|
+
(0, import_react100.useEffect)(() => {
|
|
19164
|
+
return () => clear();
|
|
19165
|
+
}, []);
|
|
19166
|
+
(0, import_react100.useEffect)(() => {
|
|
19167
|
+
cb.current = callback;
|
|
19168
|
+
}, deps);
|
|
19169
|
+
return (0, import_react100.useMemo)(() => {
|
|
19170
|
+
const execute = () => {
|
|
19171
|
+
clear();
|
|
19172
|
+
if (!lastCall.current) return;
|
|
19173
|
+
const context = lastCall.current;
|
|
19174
|
+
lastCall.current = void 0;
|
|
19175
|
+
cb.current.apply(context.this, context.args);
|
|
19176
|
+
};
|
|
19177
|
+
const wrapped = function(...args) {
|
|
19178
|
+
if (timeout.current) {
|
|
19179
|
+
clearTimeout(timeout.current);
|
|
19180
|
+
}
|
|
19181
|
+
lastCall.current = { args, this: this };
|
|
19182
|
+
timeout.current = setTimeout(execute, delay);
|
|
19183
|
+
if (maxWait > 0 && !waitTimeout.current) {
|
|
19184
|
+
waitTimeout.current = setTimeout(execute, maxWait);
|
|
19185
|
+
}
|
|
19186
|
+
};
|
|
19187
|
+
Object.defineProperties(wrapped, {
|
|
19188
|
+
length: { value: callback.length },
|
|
19189
|
+
name: { value: `${callback.name || "anonymous"}__debounced__${delay}` }
|
|
19190
|
+
});
|
|
19191
|
+
return wrapped;
|
|
19192
|
+
}, [delay, maxWait, ...deps]);
|
|
19193
|
+
}
|
|
19194
|
+
|
|
19195
|
+
// src/components/KeyValueInput/KeyValueInput.styles.ts
|
|
19196
|
+
init_emotion_jsx_shim();
|
|
19197
|
+
var import_react101 = require("@emotion/react");
|
|
19198
|
+
var LabelStyles = import_react101.css`
|
|
19199
|
+
text-transform: uppercase;
|
|
19200
|
+
font-weight: var(--fw-medium);
|
|
19201
|
+
`;
|
|
19202
|
+
var SelectKeyValueRowStyles = import_react101.css`
|
|
19203
|
+
animation: var(--duration-fast) var(--timing-ease-out);
|
|
19204
|
+
align-items: flex-start;
|
|
19205
|
+
display: grid;
|
|
19206
|
+
grid-template-columns: repeat(2, 1fr) 1.5rem;
|
|
19207
|
+
gap: var(--spacing-sm);
|
|
19208
|
+
background-color: white;
|
|
19209
|
+
flex: 1;
|
|
19210
|
+
`;
|
|
19211
|
+
var DragHandle = import_react101.css`
|
|
19212
|
+
position: relative;
|
|
19213
|
+
height: 3.125rem;
|
|
19214
|
+
width: 1rem;
|
|
19215
|
+
cursor: grab;
|
|
19216
|
+
background: transparent;
|
|
19217
|
+
border: 0;
|
|
19218
|
+
|
|
19219
|
+
&::after {
|
|
19220
|
+
content: '';
|
|
19221
|
+
display: block;
|
|
19222
|
+
position: absolute;
|
|
19223
|
+
left: 2px;
|
|
19224
|
+
top: var(--spacing-xs);
|
|
19225
|
+
bottom: var(--spacing-xs);
|
|
19226
|
+
width: 5px;
|
|
19227
|
+
border: 2px dotted var(--gray-300);
|
|
19228
|
+
border-top: 0;
|
|
19229
|
+
border-bottom: 0;
|
|
19230
|
+
opacity: 1;
|
|
19231
|
+
}
|
|
19232
|
+
`;
|
|
19233
|
+
var DragHandleDisabled = import_react101.css`
|
|
19234
|
+
opacity: 0.3;
|
|
19235
|
+
pointer-events: none;
|
|
19236
|
+
`;
|
|
19237
|
+
var rowWrapper = import_react101.css`
|
|
19238
|
+
display: flex;
|
|
19239
|
+
background-color: white;
|
|
19240
|
+
border-radius: var(--rounded-sm);
|
|
19241
|
+
`;
|
|
19242
|
+
|
|
19243
|
+
// src/components/KeyValueInput/KeyValueInput.tsx
|
|
19244
|
+
var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
|
|
19245
|
+
var initialSelectOptionValue = { key: "", value: "" };
|
|
19246
|
+
var generateItemId = (item, index) => item.uniqueId || item.value || item.key || `$index-${index}`;
|
|
19247
|
+
var KeyValueInput = ({
|
|
19248
|
+
value,
|
|
19249
|
+
onChange,
|
|
19250
|
+
label = "Options",
|
|
19251
|
+
newItemDefault = initialSelectOptionValue,
|
|
19252
|
+
keyLabel = "Text",
|
|
19253
|
+
valueLabel = "Value",
|
|
19254
|
+
keyInfoPopover,
|
|
19255
|
+
valueInfoPopover,
|
|
19256
|
+
disabled: disabled2,
|
|
19257
|
+
errors,
|
|
19258
|
+
onFocusChange
|
|
19259
|
+
}) => {
|
|
19260
|
+
const [isDragging, setIsDragging] = (0, import_react102.useState)(false);
|
|
19261
|
+
const popoverStoresMap = (0, import_react102.useRef)({});
|
|
19262
|
+
const lastRowFirstInputRef = (0, import_react102.useRef)(null);
|
|
19263
|
+
const sensors = (0, import_core.useSensors)(
|
|
19264
|
+
(0, import_core.useSensor)(import_core.PointerSensor),
|
|
19265
|
+
(0, import_core.useSensor)(import_core.KeyboardSensor, {
|
|
19266
|
+
coordinateGetter: import_sortable.sortableKeyboardCoordinates
|
|
19267
|
+
})
|
|
19268
|
+
);
|
|
19269
|
+
const valueWithIds = (0, import_react102.useMemo)(() => {
|
|
19270
|
+
return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
|
|
19271
|
+
}, [value]);
|
|
19272
|
+
const handleAddOptionRow = (0, import_react102.useCallback)(() => {
|
|
19273
|
+
onChange([...value, newItemDefault]);
|
|
19274
|
+
}, [onChange, value, newItemDefault]);
|
|
19275
|
+
const handleDeleteOptionRow = (0, import_react102.useCallback)(
|
|
19276
|
+
(deleteIndex) => {
|
|
19277
|
+
const updatedOptions = value.filter((_, index) => index !== deleteIndex);
|
|
19278
|
+
onChange(updatedOptions);
|
|
19279
|
+
},
|
|
19280
|
+
[value, onChange]
|
|
19281
|
+
);
|
|
19282
|
+
const handleFocusChange = useDebouncedCallback(
|
|
19283
|
+
(isFocused) => {
|
|
19284
|
+
onFocusChange == null ? void 0 : onFocusChange(isFocused);
|
|
19285
|
+
},
|
|
19286
|
+
[onFocusChange],
|
|
19287
|
+
300
|
|
19288
|
+
);
|
|
19289
|
+
const handleUpdateOptionRow = (0, import_react102.useCallback)(
|
|
19290
|
+
(rowIndex, rowValue) => {
|
|
19291
|
+
onChange(
|
|
19292
|
+
value.map((item, index) => {
|
|
19293
|
+
if (index === rowIndex) {
|
|
19294
|
+
return rowValue;
|
|
19295
|
+
}
|
|
19296
|
+
return item;
|
|
19297
|
+
})
|
|
19298
|
+
);
|
|
19299
|
+
},
|
|
19300
|
+
[onChange, value]
|
|
19301
|
+
);
|
|
19302
|
+
const handleDragEnd = (0, import_react102.useCallback)(
|
|
19303
|
+
(e) => {
|
|
19304
|
+
setIsDragging(false);
|
|
19305
|
+
const { active: active2, over } = e;
|
|
19306
|
+
if (!(over == null ? void 0 : over.id) || active2.id === over.id) {
|
|
19307
|
+
return;
|
|
19308
|
+
}
|
|
19309
|
+
const activeIndex = valueWithIds.findIndex(({ id }) => id === active2.id);
|
|
19310
|
+
const overIndex = valueWithIds.findIndex(({ id }) => id === over.id);
|
|
19311
|
+
onChange((0, import_sortable.arrayMove)(value, activeIndex, overIndex));
|
|
19312
|
+
},
|
|
19313
|
+
[value, valueWithIds, onChange, setIsDragging]
|
|
19314
|
+
);
|
|
19315
|
+
const handleDragStart = (0, import_react102.useCallback)(() => {
|
|
19316
|
+
Object.values(popoverStoresMap.current).forEach((store) => {
|
|
19317
|
+
store.hide();
|
|
19318
|
+
});
|
|
19319
|
+
setIsDragging(true);
|
|
19320
|
+
}, [setIsDragging]);
|
|
19321
|
+
const handleDragCancel = (0, import_react102.useCallback)(() => {
|
|
19322
|
+
setIsDragging(false);
|
|
19323
|
+
}, [setIsDragging]);
|
|
19324
|
+
(0, import_react102.useEffect)(() => {
|
|
19325
|
+
if (lastRowFirstInputRef.current && value.length > 1) {
|
|
19326
|
+
lastRowFirstInputRef.current.focus();
|
|
19327
|
+
}
|
|
19328
|
+
}, [value.length]);
|
|
19329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(VerticalRhythm, { gap: "xs", children: [
|
|
19330
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { css: LabelStyles, children: label }) }),
|
|
19331
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: [SelectKeyValueRowStyles, { paddingLeft: "var(--spacing-base)" }], children: [
|
|
19332
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
19333
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: keyLabel }),
|
|
19334
|
+
!keyInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19335
|
+
Popover3,
|
|
19336
|
+
{
|
|
19337
|
+
buttonText: `${keyLabel} info`,
|
|
19338
|
+
iconColor: "gray",
|
|
19339
|
+
placement: "bottom-start",
|
|
19340
|
+
onInit: ({ store }) => popoverStoresMap.current.label = store,
|
|
19341
|
+
children: keyInfoPopover
|
|
19342
|
+
}
|
|
19343
|
+
)
|
|
19344
|
+
] }),
|
|
19345
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
19346
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { children: valueLabel }),
|
|
19347
|
+
!valueInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19348
|
+
Popover3,
|
|
19349
|
+
{
|
|
19350
|
+
buttonText: `${valueLabel} info`,
|
|
19351
|
+
iconColor: "gray",
|
|
19352
|
+
placement: "bottom-start",
|
|
19353
|
+
onInit: ({ store }) => popoverStoresMap.current.value = store,
|
|
19354
|
+
children: valueInfoPopover
|
|
19355
|
+
}
|
|
19356
|
+
)
|
|
19357
|
+
] })
|
|
19358
|
+
] }),
|
|
19359
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(VerticalRhythm, { gap: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19360
|
+
import_core.DndContext,
|
|
19361
|
+
{
|
|
19362
|
+
sensors,
|
|
19363
|
+
collisionDetection: import_core.closestCenter,
|
|
19364
|
+
onDragEnd: handleDragEnd,
|
|
19365
|
+
onDragStart: handleDragStart,
|
|
19366
|
+
onDragCancel: handleDragCancel,
|
|
19367
|
+
modifiers: [import_modifiers.restrictToParentElement],
|
|
19368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_sortable.SortableContext, { items: valueWithIds, strategy: import_sortable.verticalListSortingStrategy, children: valueWithIds.map(({ id, ...item }, index) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19369
|
+
KeyValueInputItem,
|
|
19370
|
+
{
|
|
19371
|
+
id,
|
|
19372
|
+
firstInputRef: index === value.length - 1 ? lastRowFirstInputRef : null,
|
|
19373
|
+
value: item,
|
|
19374
|
+
keyLabel: `${keyLabel}, row ${index}`,
|
|
19375
|
+
valueLabel: `${valueLabel}, row ${index}`,
|
|
19376
|
+
disabled: disabled2,
|
|
19377
|
+
disabledDelete: value.length <= 1,
|
|
19378
|
+
disabledDnd: value.length === 1,
|
|
19379
|
+
error: errors == null ? void 0 : errors[index],
|
|
19380
|
+
onChange: (itemValue) => handleUpdateOptionRow(index, itemValue),
|
|
19381
|
+
onDelete: () => handleDeleteOptionRow(index),
|
|
19382
|
+
onFocusChange: handleFocusChange,
|
|
19383
|
+
"data-testid": "key-value-input-item"
|
|
19384
|
+
},
|
|
19385
|
+
isDragging ? id : index
|
|
19386
|
+
)) })
|
|
19387
|
+
}
|
|
19388
|
+
) }),
|
|
19389
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
19390
|
+
Button,
|
|
19391
|
+
{
|
|
19392
|
+
"data-testid": "add-input-row-action",
|
|
19393
|
+
buttonType: "secondaryInvert",
|
|
19394
|
+
size: "xs",
|
|
19395
|
+
onClick: handleAddOptionRow,
|
|
19396
|
+
disabled: disabled2,
|
|
19397
|
+
css: { marginTop: "var(--spacing-base)" },
|
|
19398
|
+
children: [
|
|
19399
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.85rem" }),
|
|
19400
|
+
" Add option"
|
|
19401
|
+
]
|
|
19402
|
+
}
|
|
19403
|
+
)
|
|
19404
|
+
] });
|
|
19405
|
+
};
|
|
19406
|
+
var KeyValueInputItem = ({
|
|
19407
|
+
id,
|
|
19408
|
+
firstInputRef,
|
|
19409
|
+
keyLabel,
|
|
19410
|
+
value,
|
|
19411
|
+
valueLabel,
|
|
19412
|
+
disabled: disabled2,
|
|
19413
|
+
onChange,
|
|
19414
|
+
onDelete,
|
|
19415
|
+
error,
|
|
19416
|
+
onFocusChange,
|
|
19417
|
+
disabledDelete = false,
|
|
19418
|
+
disabledDnd = false
|
|
19419
|
+
}) => {
|
|
19420
|
+
const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = (0, import_sortable.useSortable)({
|
|
19421
|
+
id,
|
|
19422
|
+
disabled: disabledDnd
|
|
19423
|
+
});
|
|
19424
|
+
const style = {
|
|
19425
|
+
transform: import_utilities.CSS.Transform.toString(transform),
|
|
19426
|
+
transition
|
|
19427
|
+
};
|
|
19428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: rowWrapper, ref: setNodeRef, style, children: [
|
|
19429
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19430
|
+
"button",
|
|
19431
|
+
{
|
|
19432
|
+
type: "button",
|
|
19433
|
+
css: [DragHandle, disabledDnd ? DragHandleDisabled : null],
|
|
19434
|
+
ref: setActivatorNodeRef,
|
|
19435
|
+
...attributes,
|
|
19436
|
+
...listeners
|
|
19437
|
+
}
|
|
19438
|
+
),
|
|
19439
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: SelectKeyValueRowStyles, "data-testid": "key-value-input-item", children: [
|
|
19440
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19441
|
+
Input,
|
|
19442
|
+
{
|
|
19443
|
+
ref: firstInputRef,
|
|
19444
|
+
label: keyLabel,
|
|
19445
|
+
showLabel: false,
|
|
19446
|
+
disabled: disabled2,
|
|
19447
|
+
onChange: (e) => {
|
|
19448
|
+
const hasStoredValue = value.value !== value.key;
|
|
19449
|
+
onChange == null ? void 0 : onChange({
|
|
19450
|
+
key: e.currentTarget.value,
|
|
19451
|
+
value: hasStoredValue ? value.value : e.currentTarget.value
|
|
19452
|
+
});
|
|
19453
|
+
},
|
|
19454
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
19455
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
19456
|
+
value: value.key,
|
|
19457
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
|
|
19458
|
+
"data-testid": "key"
|
|
19459
|
+
}
|
|
19460
|
+
),
|
|
19461
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19462
|
+
Input,
|
|
19463
|
+
{
|
|
19464
|
+
label: valueLabel,
|
|
19465
|
+
showLabel: false,
|
|
19466
|
+
disabled: disabled2,
|
|
19467
|
+
onChange: (e) => onChange == null ? void 0 : onChange({
|
|
19468
|
+
key: value.key,
|
|
19469
|
+
value: e.currentTarget.value
|
|
19470
|
+
}),
|
|
19471
|
+
onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
|
|
19472
|
+
onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
|
|
19473
|
+
value: value.value,
|
|
19474
|
+
errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
|
|
19475
|
+
"data-testid": "value"
|
|
19476
|
+
}
|
|
19477
|
+
),
|
|
19478
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { css: { marginTop: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
19479
|
+
Button,
|
|
19480
|
+
{
|
|
19481
|
+
type: "button",
|
|
19482
|
+
buttonType: "ghostDestructive",
|
|
19483
|
+
"data-testid": "delete-row",
|
|
19484
|
+
onClick: onDelete,
|
|
19485
|
+
disabled: disabled2 || disabledDelete,
|
|
19486
|
+
size: "zero",
|
|
19487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "trash", size: 16, iconColor: "currentColor" })
|
|
19488
|
+
}
|
|
19489
|
+
) })
|
|
19490
|
+
] })
|
|
19491
|
+
] });
|
|
19492
|
+
};
|
|
19493
|
+
|
|
19054
19494
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
19055
19495
|
init_emotion_jsx_shim();
|
|
19056
19496
|
|
|
19057
19497
|
// src/components/LimitsBar/LimitsBar.styles.ts
|
|
19058
19498
|
init_emotion_jsx_shim();
|
|
19059
|
-
var
|
|
19060
|
-
var LimitsBarContainer =
|
|
19499
|
+
var import_react103 = require("@emotion/react");
|
|
19500
|
+
var LimitsBarContainer = import_react103.css`
|
|
19061
19501
|
margin-block: var(--spacing-sm);
|
|
19062
19502
|
`;
|
|
19063
|
-
var LimitsBarProgressBar =
|
|
19503
|
+
var LimitsBarProgressBar = import_react103.css`
|
|
19064
19504
|
background: var(--gray-100);
|
|
19065
19505
|
margin-top: var(--spacing-sm);
|
|
19066
19506
|
position: relative;
|
|
19067
19507
|
overflow: hidden;
|
|
19068
19508
|
height: 0.25rem;
|
|
19069
19509
|
`;
|
|
19070
|
-
var LimitsBarProgressBarLine =
|
|
19510
|
+
var LimitsBarProgressBarLine = import_react103.css`
|
|
19071
19511
|
position: absolute;
|
|
19072
19512
|
inset: 0;
|
|
19073
19513
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
19074
19514
|
`;
|
|
19075
|
-
var LimitsBarLabelContainer =
|
|
19515
|
+
var LimitsBarLabelContainer = import_react103.css`
|
|
19076
19516
|
display: flex;
|
|
19077
19517
|
justify-content: space-between;
|
|
19078
19518
|
font-weight: var(--fw-bold);
|
|
19079
19519
|
`;
|
|
19080
|
-
var LimitsBarLabel =
|
|
19520
|
+
var LimitsBarLabel = import_react103.css`
|
|
19081
19521
|
font-size: var(--fs-baase);
|
|
19082
19522
|
`;
|
|
19083
|
-
var LimitsBarBgColor = (statusColor) =>
|
|
19523
|
+
var LimitsBarBgColor = (statusColor) => import_react103.css`
|
|
19084
19524
|
background: ${statusColor};
|
|
19085
19525
|
`;
|
|
19086
|
-
var LimitsBarTextColor = (statusColor) =>
|
|
19526
|
+
var LimitsBarTextColor = (statusColor) => import_react103.css`
|
|
19087
19527
|
color: ${statusColor};
|
|
19088
19528
|
`;
|
|
19089
19529
|
|
|
19090
19530
|
// src/components/LimitsBar/LimitsBar.tsx
|
|
19091
|
-
var
|
|
19531
|
+
var import_jsx_runtime91 = require("@emotion/react/jsx-runtime");
|
|
19092
19532
|
var LimitsBar = ({ current, max, label }) => {
|
|
19093
19533
|
const maxPercentage = 100;
|
|
19094
19534
|
const progressBarValue = Math.ceil(current / max * maxPercentage);
|
|
@@ -19099,16 +19539,16 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
19099
19539
|
danger: "var(--brand-secondary-5)"
|
|
19100
19540
|
};
|
|
19101
19541
|
const statusColor = progressBarValue === 100 ? colorMap.danger : progressBarValue >= 75 ? colorMap.warn : colorMap.base;
|
|
19102
|
-
return /* @__PURE__ */ (0,
|
|
19103
|
-
/* @__PURE__ */ (0,
|
|
19104
|
-
/* @__PURE__ */ (0,
|
|
19105
|
-
/* @__PURE__ */ (0,
|
|
19542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: LimitsBarContainer, children: [
|
|
19543
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: LimitsBarLabelContainer, children: [
|
|
19544
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { css: LimitsBarLabel, children: label }),
|
|
19545
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("span", { css: [LimitsBarLabel, LimitsBarTextColor(statusColor)], children: [
|
|
19106
19546
|
current,
|
|
19107
19547
|
" of ",
|
|
19108
19548
|
max
|
|
19109
19549
|
] })
|
|
19110
19550
|
] }),
|
|
19111
|
-
/* @__PURE__ */ (0,
|
|
19551
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
19112
19552
|
"div",
|
|
19113
19553
|
{
|
|
19114
19554
|
role: "progressbar",
|
|
@@ -19117,7 +19557,7 @@ var LimitsBar = ({ current, max, label }) => {
|
|
|
19117
19557
|
"aria-valuemax": max,
|
|
19118
19558
|
"aria-valuetext": `${current} of ${max}`,
|
|
19119
19559
|
css: LimitsBarProgressBar,
|
|
19120
|
-
children: /* @__PURE__ */ (0,
|
|
19560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
19121
19561
|
"span",
|
|
19122
19562
|
{
|
|
19123
19563
|
role: "presentation",
|
|
@@ -19137,8 +19577,8 @@ init_emotion_jsx_shim();
|
|
|
19137
19577
|
|
|
19138
19578
|
// src/components/LinkList/LinkList.styles.ts
|
|
19139
19579
|
init_emotion_jsx_shim();
|
|
19140
|
-
var
|
|
19141
|
-
var LinkListContainer = (padding) =>
|
|
19580
|
+
var import_react104 = require("@emotion/react");
|
|
19581
|
+
var LinkListContainer = (padding) => import_react104.css`
|
|
19142
19582
|
padding: ${padding};
|
|
19143
19583
|
|
|
19144
19584
|
${mq("sm")} {
|
|
@@ -19146,32 +19586,32 @@ var LinkListContainer = (padding) => import_react101.css`
|
|
|
19146
19586
|
grid-row: 1 / last-line;
|
|
19147
19587
|
}
|
|
19148
19588
|
`;
|
|
19149
|
-
var LinkListTitle =
|
|
19589
|
+
var LinkListTitle = import_react104.css`
|
|
19150
19590
|
font-weight: var(--fw-bold);
|
|
19151
19591
|
font-size: var(--fs-sm);
|
|
19152
19592
|
text-transform: uppercase;
|
|
19153
19593
|
`;
|
|
19154
19594
|
|
|
19155
19595
|
// src/components/LinkList/LinkList.tsx
|
|
19156
|
-
var
|
|
19596
|
+
var import_jsx_runtime92 = require("@emotion/react/jsx-runtime");
|
|
19157
19597
|
var LinkList = ({ title: title2, padding = "var(--spacing-md)", children, ...props }) => {
|
|
19158
|
-
return /* @__PURE__ */ (0,
|
|
19159
|
-
/* @__PURE__ */ (0,
|
|
19598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: LinkListContainer(padding), ...props, children: [
|
|
19599
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Heading2, { level: 3, css: LinkListTitle, children: title2 }),
|
|
19160
19600
|
children
|
|
19161
19601
|
] });
|
|
19162
19602
|
};
|
|
19163
19603
|
|
|
19164
19604
|
// src/components/List/ScrollableList.tsx
|
|
19165
19605
|
init_emotion_jsx_shim();
|
|
19166
|
-
var
|
|
19606
|
+
var import_react106 = require("@emotion/react");
|
|
19167
19607
|
|
|
19168
19608
|
// src/components/List/styles/ScrollableList.styles.ts
|
|
19169
19609
|
init_emotion_jsx_shim();
|
|
19170
|
-
var
|
|
19171
|
-
var ScrollableListContainer =
|
|
19610
|
+
var import_react105 = require("@emotion/react");
|
|
19611
|
+
var ScrollableListContainer = import_react105.css`
|
|
19172
19612
|
position: relative;
|
|
19173
19613
|
`;
|
|
19174
|
-
var ScrollableListInner =
|
|
19614
|
+
var ScrollableListInner = import_react105.css`
|
|
19175
19615
|
background: var(--gray-50);
|
|
19176
19616
|
border-top: 1px solid var(--gray-200);
|
|
19177
19617
|
border-bottom: 1px solid var(--gray-200);
|
|
@@ -19194,19 +19634,19 @@ var ScrollableListInner = import_react102.css`
|
|
|
19194
19634
|
`;
|
|
19195
19635
|
|
|
19196
19636
|
// src/components/List/ScrollableList.tsx
|
|
19197
|
-
var
|
|
19637
|
+
var import_jsx_runtime93 = require("@emotion/react/jsx-runtime");
|
|
19198
19638
|
var ScrollableList = ({ label, children, ...props }) => {
|
|
19199
|
-
return /* @__PURE__ */ (0,
|
|
19200
|
-
label ? /* @__PURE__ */ (0,
|
|
19639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { css: [ScrollableListContainer, scrollbarStyles], ...props, children: [
|
|
19640
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
19201
19641
|
"span",
|
|
19202
19642
|
{
|
|
19203
|
-
css:
|
|
19643
|
+
css: import_react106.css`
|
|
19204
19644
|
${labelText}
|
|
19205
19645
|
`,
|
|
19206
19646
|
children: label
|
|
19207
19647
|
}
|
|
19208
19648
|
) : null,
|
|
19209
|
-
/* @__PURE__ */ (0,
|
|
19649
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { css: [ScrollableListInner, scrollbarStyles], children })
|
|
19210
19650
|
] });
|
|
19211
19651
|
};
|
|
19212
19652
|
|
|
@@ -19216,8 +19656,8 @@ var import_CgCheck4 = require("@react-icons/all-files/cg/CgCheck");
|
|
|
19216
19656
|
|
|
19217
19657
|
// src/components/List/styles/ScrollableListItem.styles.ts
|
|
19218
19658
|
init_emotion_jsx_shim();
|
|
19219
|
-
var
|
|
19220
|
-
var ScrollableListItemContainer =
|
|
19659
|
+
var import_react107 = require("@emotion/react");
|
|
19660
|
+
var ScrollableListItemContainer = import_react107.css`
|
|
19221
19661
|
align-items: center;
|
|
19222
19662
|
background: var(--white);
|
|
19223
19663
|
border-radius: var(--rounded-base);
|
|
@@ -19226,13 +19666,13 @@ var ScrollableListItemContainer = import_react104.css`
|
|
|
19226
19666
|
min-height: 52px;
|
|
19227
19667
|
transition: border-color var(--duration-fast) var(--timing-ease-out);
|
|
19228
19668
|
`;
|
|
19229
|
-
var ScrollableListItemShadow =
|
|
19669
|
+
var ScrollableListItemShadow = import_react107.css`
|
|
19230
19670
|
box-shadow: var(--shadow-base);
|
|
19231
19671
|
`;
|
|
19232
|
-
var ScrollableListItemActive =
|
|
19672
|
+
var ScrollableListItemActive = import_react107.css`
|
|
19233
19673
|
border-color: var(--brand-secondary-3);
|
|
19234
19674
|
`;
|
|
19235
|
-
var ScrollableListItemBtn =
|
|
19675
|
+
var ScrollableListItemBtn = import_react107.css`
|
|
19236
19676
|
align-items: center;
|
|
19237
19677
|
border: none;
|
|
19238
19678
|
background: transparent;
|
|
@@ -19247,27 +19687,27 @@ var ScrollableListItemBtn = import_react104.css`
|
|
|
19247
19687
|
outline: none;
|
|
19248
19688
|
}
|
|
19249
19689
|
`;
|
|
19250
|
-
var ScrollableListInputLabel =
|
|
19690
|
+
var ScrollableListInputLabel = import_react107.css`
|
|
19251
19691
|
align-items: center;
|
|
19252
19692
|
cursor: pointer;
|
|
19253
19693
|
display: flex;
|
|
19254
19694
|
padding: var(--spacing-xs) var(--spacing-base) var(--spacing-xs);
|
|
19255
19695
|
flex-grow: 1;
|
|
19256
19696
|
`;
|
|
19257
|
-
var ScrollableListInputText =
|
|
19697
|
+
var ScrollableListInputText = import_react107.css`
|
|
19258
19698
|
align-items: center;
|
|
19259
19699
|
display: flex;
|
|
19260
19700
|
gap: var(--spacing-sm);
|
|
19261
19701
|
flex-grow: 1;
|
|
19262
19702
|
flex-wrap: wrap;
|
|
19263
19703
|
`;
|
|
19264
|
-
var ScrollableListHiddenInput =
|
|
19704
|
+
var ScrollableListHiddenInput = import_react107.css`
|
|
19265
19705
|
position: absolute;
|
|
19266
19706
|
height: 0;
|
|
19267
19707
|
width: 0;
|
|
19268
19708
|
opacity: 0;
|
|
19269
19709
|
`;
|
|
19270
|
-
var ScrollableListIcon =
|
|
19710
|
+
var ScrollableListIcon = import_react107.css`
|
|
19271
19711
|
border-radius: var(--rounded-full);
|
|
19272
19712
|
background: var(--brand-secondary-3);
|
|
19273
19713
|
color: var(--white);
|
|
@@ -19275,12 +19715,12 @@ var ScrollableListIcon = import_react104.css`
|
|
|
19275
19715
|
min-width: 24px;
|
|
19276
19716
|
opacity: 0;
|
|
19277
19717
|
`;
|
|
19278
|
-
var ScrollableListIconVisible =
|
|
19718
|
+
var ScrollableListIconVisible = import_react107.css`
|
|
19279
19719
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
19280
19720
|
`;
|
|
19281
19721
|
|
|
19282
19722
|
// src/components/List/ScrollableListInputItem.tsx
|
|
19283
|
-
var
|
|
19723
|
+
var import_jsx_runtime94 = require("@emotion/react/jsx-runtime");
|
|
19284
19724
|
var ScrollableListInputItem = ({
|
|
19285
19725
|
label,
|
|
19286
19726
|
icon,
|
|
@@ -19290,7 +19730,7 @@ var ScrollableListInputItem = ({
|
|
|
19290
19730
|
labelTestId,
|
|
19291
19731
|
...props
|
|
19292
19732
|
}) => {
|
|
19293
|
-
return /* @__PURE__ */ (0,
|
|
19733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19294
19734
|
"div",
|
|
19295
19735
|
{
|
|
19296
19736
|
css: [
|
|
@@ -19299,13 +19739,13 @@ var ScrollableListInputItem = ({
|
|
|
19299
19739
|
active2 ? ScrollableListItemActive : void 0
|
|
19300
19740
|
],
|
|
19301
19741
|
...props,
|
|
19302
|
-
children: /* @__PURE__ */ (0,
|
|
19303
|
-
/* @__PURE__ */ (0,
|
|
19742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { "data-testid": labelTestId, css: ScrollableListInputLabel, children: [
|
|
19743
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("span", { css: ScrollableListInputText, children: [
|
|
19304
19744
|
icon,
|
|
19305
19745
|
label
|
|
19306
19746
|
] }),
|
|
19307
|
-
/* @__PURE__ */ (0,
|
|
19308
|
-
/* @__PURE__ */ (0,
|
|
19747
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { css: ScrollableListHiddenInput, children }),
|
|
19748
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
19309
19749
|
Icon,
|
|
19310
19750
|
{
|
|
19311
19751
|
icon: import_CgCheck4.CgCheck,
|
|
@@ -19324,7 +19764,7 @@ var ScrollableListInputItem = ({
|
|
|
19324
19764
|
// src/components/List/ScrollableListItem.tsx
|
|
19325
19765
|
init_emotion_jsx_shim();
|
|
19326
19766
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
19327
|
-
var
|
|
19767
|
+
var import_jsx_runtime95 = require("@emotion/react/jsx-runtime");
|
|
19328
19768
|
var ScrollableListItem = ({
|
|
19329
19769
|
buttonText,
|
|
19330
19770
|
icon,
|
|
@@ -19332,7 +19772,7 @@ var ScrollableListItem = ({
|
|
|
19332
19772
|
disableShadow,
|
|
19333
19773
|
...props
|
|
19334
19774
|
}) => {
|
|
19335
|
-
return /* @__PURE__ */ (0,
|
|
19775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
19336
19776
|
"div",
|
|
19337
19777
|
{
|
|
19338
19778
|
css: [
|
|
@@ -19340,12 +19780,12 @@ var ScrollableListItem = ({
|
|
|
19340
19780
|
disableShadow ? void 0 : ScrollableListItemShadow,
|
|
19341
19781
|
active2 ? ScrollableListItemActive : void 0
|
|
19342
19782
|
],
|
|
19343
|
-
children: /* @__PURE__ */ (0,
|
|
19344
|
-
/* @__PURE__ */ (0,
|
|
19783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("button", { css: ScrollableListItemBtn, type: "button", ...props, children: [
|
|
19784
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", children: [
|
|
19345
19785
|
icon,
|
|
19346
|
-
/* @__PURE__ */ (0,
|
|
19786
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { children: buttonText })
|
|
19347
19787
|
] }),
|
|
19348
|
-
/* @__PURE__ */ (0,
|
|
19788
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
19349
19789
|
Icon,
|
|
19350
19790
|
{
|
|
19351
19791
|
icon: import_CgCheck5.CgCheck,
|
|
@@ -19364,10 +19804,10 @@ init_emotion_jsx_shim();
|
|
|
19364
19804
|
|
|
19365
19805
|
// src/components/LoadingIndicator/LoadingIndicator.styles.ts
|
|
19366
19806
|
init_emotion_jsx_shim();
|
|
19367
|
-
var
|
|
19807
|
+
var import_react108 = require("@emotion/react");
|
|
19368
19808
|
function bounceFade(size) {
|
|
19369
19809
|
const bounceHeight = size === "lg" ? 10 : 5;
|
|
19370
|
-
return
|
|
19810
|
+
return import_react108.keyframes`
|
|
19371
19811
|
0%, 100% {
|
|
19372
19812
|
opacity: 1.0;
|
|
19373
19813
|
transform: translateY(0);
|
|
@@ -19385,13 +19825,13 @@ function bounceFade(size) {
|
|
|
19385
19825
|
}
|
|
19386
19826
|
`;
|
|
19387
19827
|
}
|
|
19388
|
-
var loader =
|
|
19828
|
+
var loader = import_react108.css`
|
|
19389
19829
|
display: inline-flex;
|
|
19390
19830
|
justify-content: center;
|
|
19391
19831
|
`;
|
|
19392
19832
|
function loadingDot(size) {
|
|
19393
19833
|
const dotSize = size === "lg" ? 8 : 4;
|
|
19394
|
-
return
|
|
19834
|
+
return import_react108.css`
|
|
19395
19835
|
background-color: var(--gray-700);
|
|
19396
19836
|
display: block;
|
|
19397
19837
|
border-radius: var(--rounded-full);
|
|
@@ -19416,27 +19856,27 @@ function loadingDot(size) {
|
|
|
19416
19856
|
}
|
|
19417
19857
|
|
|
19418
19858
|
// src/components/LoadingIndicator/LoadingIndicator.tsx
|
|
19419
|
-
var
|
|
19859
|
+
var import_jsx_runtime96 = require("@emotion/react/jsx-runtime");
|
|
19420
19860
|
var LoadingIndicator = ({
|
|
19421
19861
|
size = "lg",
|
|
19422
19862
|
...props
|
|
19423
19863
|
}) => {
|
|
19424
19864
|
const dotStyle = loadingDot(size);
|
|
19425
|
-
return /* @__PURE__ */ (0,
|
|
19426
|
-
/* @__PURE__ */ (0,
|
|
19427
|
-
/* @__PURE__ */ (0,
|
|
19428
|
-
/* @__PURE__ */ (0,
|
|
19865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
|
|
19866
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle }),
|
|
19867
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle }),
|
|
19868
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { css: dotStyle })
|
|
19429
19869
|
] });
|
|
19430
19870
|
};
|
|
19431
19871
|
|
|
19432
19872
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
19433
19873
|
init_emotion_jsx_shim();
|
|
19434
|
-
var
|
|
19874
|
+
var import_react110 = require("react");
|
|
19435
19875
|
|
|
19436
19876
|
// src/components/LoadingOverlay/LoadingOverlay.styles.ts
|
|
19437
19877
|
init_emotion_jsx_shim();
|
|
19438
|
-
var
|
|
19439
|
-
var loadingOverlayContainer =
|
|
19878
|
+
var import_react109 = require("@emotion/react");
|
|
19879
|
+
var loadingOverlayContainer = import_react109.css`
|
|
19440
19880
|
position: absolute;
|
|
19441
19881
|
inset: 0;
|
|
19442
19882
|
overflow: hidden;
|
|
@@ -19444,30 +19884,30 @@ var loadingOverlayContainer = import_react106.css`
|
|
|
19444
19884
|
padding: var(--spacing-xl);
|
|
19445
19885
|
overflow-y: auto;
|
|
19446
19886
|
`;
|
|
19447
|
-
var loadingOverlayVisible =
|
|
19887
|
+
var loadingOverlayVisible = import_react109.css`
|
|
19448
19888
|
display: flex;
|
|
19449
19889
|
`;
|
|
19450
|
-
var loadingOverlayHidden =
|
|
19890
|
+
var loadingOverlayHidden = import_react109.css`
|
|
19451
19891
|
display: none;
|
|
19452
19892
|
`;
|
|
19453
|
-
var loadingOverlayBackground = (bgColor) =>
|
|
19893
|
+
var loadingOverlayBackground = (bgColor) => import_react109.css`
|
|
19454
19894
|
background: ${bgColor};
|
|
19455
19895
|
opacity: 0.92;
|
|
19456
19896
|
position: absolute;
|
|
19457
19897
|
inset: 0 0;
|
|
19458
19898
|
`;
|
|
19459
|
-
var loadingOverlayBody =
|
|
19899
|
+
var loadingOverlayBody = import_react109.css`
|
|
19460
19900
|
align-items: center;
|
|
19461
19901
|
display: flex;
|
|
19462
19902
|
flex-direction: column;
|
|
19463
19903
|
`;
|
|
19464
|
-
var loadingOverlayMessage =
|
|
19904
|
+
var loadingOverlayMessage = import_react109.css`
|
|
19465
19905
|
color: var(--gray-600);
|
|
19466
19906
|
margin: var(--spacing-base) 0 0;
|
|
19467
19907
|
`;
|
|
19468
19908
|
|
|
19469
19909
|
// src/components/LoadingOverlay/LoadingOverlay.tsx
|
|
19470
|
-
var
|
|
19910
|
+
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
19471
19911
|
var LoadingOverlay = ({
|
|
19472
19912
|
isActive,
|
|
19473
19913
|
statusMessage,
|
|
@@ -19478,14 +19918,14 @@ var LoadingOverlay = ({
|
|
|
19478
19918
|
isPaused = false,
|
|
19479
19919
|
children
|
|
19480
19920
|
}) => {
|
|
19481
|
-
const lottieRef = (0,
|
|
19482
|
-
const onLoopComplete = (0,
|
|
19921
|
+
const lottieRef = (0, import_react110.useRef)(null);
|
|
19922
|
+
const onLoopComplete = (0, import_react110.useCallback)(() => {
|
|
19483
19923
|
var _a, _b, _c;
|
|
19484
19924
|
if (isPaused && !((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
19485
19925
|
(_c = lottieRef.current) == null ? void 0 : _c.stop();
|
|
19486
19926
|
}
|
|
19487
19927
|
}, [isPaused]);
|
|
19488
|
-
(0,
|
|
19928
|
+
(0, import_react110.useEffect)(() => {
|
|
19489
19929
|
var _a, _b, _c, _d, _e, _f;
|
|
19490
19930
|
if (!isPaused && ((_b = (_a = lottieRef.current) == null ? void 0 : _a.animationItem) == null ? void 0 : _b.isPaused)) {
|
|
19491
19931
|
(_c = lottieRef.current) == null ? void 0 : _c.play();
|
|
@@ -19493,7 +19933,7 @@ var LoadingOverlay = ({
|
|
|
19493
19933
|
(_f = lottieRef.current) == null ? void 0 : _f.stop();
|
|
19494
19934
|
}
|
|
19495
19935
|
}, [isPaused]);
|
|
19496
|
-
return /* @__PURE__ */ (0,
|
|
19936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
19497
19937
|
"div",
|
|
19498
19938
|
{
|
|
19499
19939
|
role: "alert",
|
|
@@ -19501,9 +19941,9 @@ var LoadingOverlay = ({
|
|
|
19501
19941
|
"aria-hidden": !isActive,
|
|
19502
19942
|
"aria-busy": isActive && !isPaused,
|
|
19503
19943
|
children: [
|
|
19504
|
-
/* @__PURE__ */ (0,
|
|
19505
|
-
/* @__PURE__ */ (0,
|
|
19506
|
-
/* @__PURE__ */ (0,
|
|
19944
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: loadingOverlayBackground(overlayBackgroundColor) }),
|
|
19945
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: { position: "relative", maxWidth: "100%", margin: isTopAligned ? "0" : "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { css: loadingOverlayBody, children: [
|
|
19946
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19507
19947
|
AnimationFile,
|
|
19508
19948
|
{
|
|
19509
19949
|
lottieRef,
|
|
@@ -19518,15 +19958,15 @@ var LoadingOverlay = ({
|
|
|
19518
19958
|
}
|
|
19519
19959
|
}
|
|
19520
19960
|
),
|
|
19521
|
-
statusMessage ? /* @__PURE__ */ (0,
|
|
19522
|
-
/* @__PURE__ */ (0,
|
|
19961
|
+
statusMessage ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: loadingOverlayMessage, children: statusMessage }) : null,
|
|
19962
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { css: { width: "100%", marginTop: "var(--spacing-md)" }, children })
|
|
19523
19963
|
] }) })
|
|
19524
19964
|
]
|
|
19525
19965
|
}
|
|
19526
19966
|
);
|
|
19527
19967
|
};
|
|
19528
19968
|
var LoadingIcon = ({ height, width, ...props }) => {
|
|
19529
|
-
return /* @__PURE__ */ (0,
|
|
19969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19530
19970
|
"svg",
|
|
19531
19971
|
{
|
|
19532
19972
|
viewBox: "0 0 38 38",
|
|
@@ -19536,9 +19976,9 @@ var LoadingIcon = ({ height, width, ...props }) => {
|
|
|
19536
19976
|
stroke: "currentColor",
|
|
19537
19977
|
...props,
|
|
19538
19978
|
"data-testid": "loading-icon",
|
|
19539
|
-
children: /* @__PURE__ */ (0,
|
|
19540
|
-
/* @__PURE__ */ (0,
|
|
19541
|
-
/* @__PURE__ */ (0,
|
|
19979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
19980
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("circle", { strokeOpacity: ".25", cx: "18", cy: "18", r: "18" }),
|
|
19981
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("path", { d: "M36 18c0-9.94-8.06-18-18-18", transform: "rotate(166.645 18 18)", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
19542
19982
|
"animateTransform",
|
|
19543
19983
|
{
|
|
19544
19984
|
attributeName: "transform",
|
|
@@ -19559,13 +19999,13 @@ init_emotion_jsx_shim();
|
|
|
19559
19999
|
|
|
19560
20000
|
// src/components/MediaCard/MediaCard.tsx
|
|
19561
20001
|
init_emotion_jsx_shim();
|
|
19562
|
-
var
|
|
20002
|
+
var import_react114 = require("react");
|
|
19563
20003
|
|
|
19564
20004
|
// src/components/Popover/Popover.tsx
|
|
19565
20005
|
init_emotion_jsx_shim();
|
|
19566
|
-
var
|
|
19567
|
-
var
|
|
19568
|
-
var
|
|
20006
|
+
var import_react111 = require("@ariakit/react");
|
|
20007
|
+
var import_react112 = require("react");
|
|
20008
|
+
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
19569
20009
|
var Popover3 = ({
|
|
19570
20010
|
iconColor = "action",
|
|
19571
20011
|
icon = "info",
|
|
@@ -19580,31 +20020,35 @@ var Popover3 = ({
|
|
|
19580
20020
|
onInit,
|
|
19581
20021
|
...otherProps
|
|
19582
20022
|
}) => {
|
|
19583
|
-
const popover2 = (0,
|
|
19584
|
-
(0,
|
|
20023
|
+
const popover2 = (0, import_react111.usePopoverStore)({ placement });
|
|
20024
|
+
(0, import_react112.useEffect)(() => {
|
|
19585
20025
|
onInit == null ? void 0 : onInit({ store: popover2 });
|
|
19586
20026
|
}, [popover2]);
|
|
19587
|
-
return /* @__PURE__ */ (0,
|
|
19588
|
-
/* @__PURE__ */ (0,
|
|
19589
|
-
|
|
20027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_react111.PopoverProvider, { store: popover2, children: [
|
|
20028
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
20029
|
+
import_react111.PopoverDisclosure,
|
|
19590
20030
|
{
|
|
19591
20031
|
css: [PopoverBtn, trigger2 ? void 0 : PopoverDefaulterTriggerBtn],
|
|
19592
20032
|
title: buttonText,
|
|
19593
20033
|
"data-testid": testId,
|
|
19594
|
-
children: trigger2 ? trigger2 : /* @__PURE__ */ (0,
|
|
19595
|
-
/* @__PURE__ */ (0,
|
|
19596
|
-
/* @__PURE__ */ (0,
|
|
20034
|
+
children: trigger2 ? trigger2 : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
20035
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Icon, { icon, iconColor, size: iconSize }),
|
|
20036
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { hidden: true, children: buttonText })
|
|
19597
20037
|
] })
|
|
19598
20038
|
}
|
|
19599
20039
|
),
|
|
19600
|
-
/* @__PURE__ */ (0,
|
|
20040
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react111.Popover, { unmountOnHide: true, css: Popover, ...otherProps, "aria-label": ariaLabel, children })
|
|
19601
20041
|
] });
|
|
19602
20042
|
};
|
|
20043
|
+
var usePopoverComponentContext = () => {
|
|
20044
|
+
const contextValue = (0, import_react111.usePopoverContext)();
|
|
20045
|
+
return contextValue;
|
|
20046
|
+
};
|
|
19603
20047
|
|
|
19604
20048
|
// src/components/MediaCard/MediaCard.styles.ts
|
|
19605
20049
|
init_emotion_jsx_shim();
|
|
19606
|
-
var
|
|
19607
|
-
var cardBase =
|
|
20050
|
+
var import_react113 = require("@emotion/react");
|
|
20051
|
+
var cardBase = import_react113.css`
|
|
19608
20052
|
--mediacard-title-color: var(--gray-500);
|
|
19609
20053
|
display: flex;
|
|
19610
20054
|
flex-direction: column;
|
|
@@ -19628,7 +20072,7 @@ var cardBase = import_react110.css`
|
|
|
19628
20072
|
cursor: default;
|
|
19629
20073
|
}
|
|
19630
20074
|
`;
|
|
19631
|
-
var coverWrapper =
|
|
20075
|
+
var coverWrapper = import_react113.css`
|
|
19632
20076
|
position: relative;
|
|
19633
20077
|
display: flex;
|
|
19634
20078
|
align-items: center;
|
|
@@ -19641,10 +20085,10 @@ var coverWrapper = import_react110.css`
|
|
|
19641
20085
|
outline: none;
|
|
19642
20086
|
border: 0;
|
|
19643
20087
|
`;
|
|
19644
|
-
var contentWrapper =
|
|
20088
|
+
var contentWrapper = import_react113.css`
|
|
19645
20089
|
padding: var(--spacing-sm);
|
|
19646
20090
|
`;
|
|
19647
|
-
var title =
|
|
20091
|
+
var title = import_react113.css`
|
|
19648
20092
|
font-size: var(--fs-sm);
|
|
19649
20093
|
color: var(--mediacard-title-color);
|
|
19650
20094
|
white-space: nowrap;
|
|
@@ -19659,7 +20103,7 @@ var title = import_react110.css`
|
|
|
19659
20103
|
outline: 2px solid var(--primary-action-default);
|
|
19660
20104
|
}
|
|
19661
20105
|
`;
|
|
19662
|
-
var subtitle =
|
|
20106
|
+
var subtitle = import_react113.css`
|
|
19663
20107
|
font-size: var(--fs-xs);
|
|
19664
20108
|
color: var(--gray-500);
|
|
19665
20109
|
white-space: nowrap;
|
|
@@ -19669,13 +20113,13 @@ var subtitle = import_react110.css`
|
|
|
19669
20113
|
border: 0;
|
|
19670
20114
|
background-color: transparent;
|
|
19671
20115
|
`;
|
|
19672
|
-
var sideSection =
|
|
20116
|
+
var sideSection = import_react113.css`
|
|
19673
20117
|
cursor: default;
|
|
19674
20118
|
`;
|
|
19675
|
-
var menuSection =
|
|
20119
|
+
var menuSection = import_react113.css`
|
|
19676
20120
|
cursor: default;
|
|
19677
20121
|
`;
|
|
19678
|
-
var menuButton =
|
|
20122
|
+
var menuButton = import_react113.css`
|
|
19679
20123
|
padding: var(--spacing-2xs);
|
|
19680
20124
|
border-radius: var(--rounded-sm);
|
|
19681
20125
|
border-width: 0;
|
|
@@ -19687,7 +20131,7 @@ var menuButton = import_react110.css`
|
|
|
19687
20131
|
`;
|
|
19688
20132
|
|
|
19689
20133
|
// src/components/MediaCard/MediaCard.tsx
|
|
19690
|
-
var
|
|
20134
|
+
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
19691
20135
|
var MediaCard = ({
|
|
19692
20136
|
title: title2,
|
|
19693
20137
|
subtitle: subtitle2,
|
|
@@ -19699,17 +20143,17 @@ var MediaCard = ({
|
|
|
19699
20143
|
buttonType,
|
|
19700
20144
|
...cardProps
|
|
19701
20145
|
}) => {
|
|
19702
|
-
const onStopPropogation = (0,
|
|
20146
|
+
const onStopPropogation = (0, import_react114.useCallback)((e) => {
|
|
19703
20147
|
e.stopPropagation();
|
|
19704
20148
|
}, []);
|
|
19705
20149
|
const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
|
|
19706
|
-
return /* @__PURE__ */ (0,
|
|
19707
|
-
/* @__PURE__ */ (0,
|
|
19708
|
-
/* @__PURE__ */ (0,
|
|
19709
|
-
/* @__PURE__ */ (0,
|
|
19710
|
-
/* @__PURE__ */ (0,
|
|
19711
|
-
/* @__PURE__ */ (0,
|
|
19712
|
-
!infoPopover ? null : /* @__PURE__ */ (0,
|
|
20150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Card, { css: cardBase, ...cardProps, onClick, "data-testid": "card-item", children: [
|
|
20151
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { tabIndex: -1, css: coverWrapper, type: buttonType, children: cover }),
|
|
20152
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: contentWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
|
|
20153
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
|
|
20154
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(HorizontalRhythm, { gap: "xs", align: "center", css: { maxWidth: "100%" }, children: [
|
|
20155
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { css: title, "data-testid": "card-title", children: title2 }),
|
|
20156
|
+
!infoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: { display: "flex", cursor: "default" }, onClick: onStopPropogation, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19713
20157
|
Popover3,
|
|
19714
20158
|
{
|
|
19715
20159
|
baseId: `info-of-${title2}`,
|
|
@@ -19718,31 +20162,31 @@ var MediaCard = ({
|
|
|
19718
20162
|
iconColor: "default",
|
|
19719
20163
|
tabIndex: 0,
|
|
19720
20164
|
css: { display: "block", maxWidth: "20rem" },
|
|
19721
|
-
children: /* @__PURE__ */ (0,
|
|
20165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { children: infoPopover })
|
|
19722
20166
|
}
|
|
19723
20167
|
) })
|
|
19724
20168
|
] }),
|
|
19725
|
-
subtitle2 ? /* @__PURE__ */ (0,
|
|
20169
|
+
subtitle2 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("button", { tabIndex: -1, css: subtitle, children: subtitle2 }) : null
|
|
19726
20170
|
] }),
|
|
19727
|
-
sideSection2 ? /* @__PURE__ */ (0,
|
|
19728
|
-
hasMenuItems ? /* @__PURE__ */ (0,
|
|
20171
|
+
sideSection2 ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { css: sideSection, onClick: onStopPropogation, children: sideSection2 }) : null,
|
|
20172
|
+
hasMenuItems ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19729
20173
|
VerticalRhythm,
|
|
19730
20174
|
{
|
|
19731
20175
|
css: menuSection,
|
|
19732
20176
|
align: "center",
|
|
19733
20177
|
justify: "center",
|
|
19734
20178
|
onClick: onStopPropogation,
|
|
19735
|
-
children: /* @__PURE__ */ (0,
|
|
20179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19736
20180
|
Menu,
|
|
19737
20181
|
{
|
|
19738
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
20182
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
19739
20183
|
"button",
|
|
19740
20184
|
{
|
|
19741
20185
|
type: "button",
|
|
19742
20186
|
"aria-label": "More options",
|
|
19743
20187
|
css: menuButton,
|
|
19744
20188
|
"data-testid": "button-more",
|
|
19745
|
-
children: /* @__PURE__ */ (0,
|
|
20189
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
|
|
19746
20190
|
}
|
|
19747
20191
|
),
|
|
19748
20192
|
menuLabel: `Menu of ${title2}`,
|
|
@@ -19758,13 +20202,14 @@ var MediaCard = ({
|
|
|
19758
20202
|
|
|
19759
20203
|
// src/components/Modal/Modal.tsx
|
|
19760
20204
|
init_emotion_jsx_shim();
|
|
20205
|
+
var import_react116 = require("@ariakit/react");
|
|
19761
20206
|
var import_CgClose5 = require("@react-icons/all-files/cg/CgClose");
|
|
19762
|
-
var
|
|
20207
|
+
var import_react117 = __toESM(require("react"));
|
|
19763
20208
|
|
|
19764
20209
|
// src/components/Modal/Modal.styles.ts
|
|
19765
20210
|
init_emotion_jsx_shim();
|
|
19766
|
-
var
|
|
19767
|
-
var modalStyles =
|
|
20211
|
+
var import_react115 = require("@emotion/react");
|
|
20212
|
+
var modalStyles = import_react115.css`
|
|
19768
20213
|
border: none;
|
|
19769
20214
|
position: relative;
|
|
19770
20215
|
max-width: calc(100% - var(--spacing-base) * 2);
|
|
@@ -19778,16 +20223,16 @@ var modalStyles = import_react112.css`
|
|
|
19778
20223
|
opacity: 0.4;
|
|
19779
20224
|
}
|
|
19780
20225
|
`;
|
|
19781
|
-
var modalSizeSmall =
|
|
20226
|
+
var modalSizeSmall = import_react115.css`
|
|
19782
20227
|
width: clamp(280px, 100vw, 400px);
|
|
19783
20228
|
`;
|
|
19784
|
-
var modalSizeMedium =
|
|
20229
|
+
var modalSizeMedium = import_react115.css`
|
|
19785
20230
|
width: clamp(280px, 100vw, 600px);
|
|
19786
20231
|
`;
|
|
19787
|
-
var modalSizeLarge =
|
|
20232
|
+
var modalSizeLarge = import_react115.css`
|
|
19788
20233
|
width: clamp(280px, 100vw, 800px);
|
|
19789
20234
|
`;
|
|
19790
|
-
var modalInnerStyles =
|
|
20235
|
+
var modalInnerStyles = import_react115.css`
|
|
19791
20236
|
position: relative;
|
|
19792
20237
|
width: 100%;
|
|
19793
20238
|
display: flex;
|
|
@@ -19800,7 +20245,7 @@ var modalInnerStyles = import_react112.css`
|
|
|
19800
20245
|
box-shadow: var(--elevation-500);
|
|
19801
20246
|
border-radius: var(--rounded-base);
|
|
19802
20247
|
`;
|
|
19803
|
-
var modalHeaderStyles =
|
|
20248
|
+
var modalHeaderStyles = import_react115.css`
|
|
19804
20249
|
display: flex;
|
|
19805
20250
|
align-items: flex-start;
|
|
19806
20251
|
gap: var(--spacing-base);
|
|
@@ -19808,10 +20253,10 @@ var modalHeaderStyles = import_react112.css`
|
|
|
19808
20253
|
font-family: var(--ff-base);
|
|
19809
20254
|
line-height: 1.2;
|
|
19810
20255
|
`;
|
|
19811
|
-
var modalHeaderHeaderStyles =
|
|
20256
|
+
var modalHeaderHeaderStyles = import_react115.css`
|
|
19812
20257
|
max-width: calc(100% - 3rem);
|
|
19813
20258
|
`;
|
|
19814
|
-
var modalCloseButtonStyles =
|
|
20259
|
+
var modalCloseButtonStyles = import_react115.css`
|
|
19815
20260
|
background: transparent;
|
|
19816
20261
|
border: none;
|
|
19817
20262
|
color: var(--gray-300);
|
|
@@ -19826,7 +20271,7 @@ var modalCloseButtonStyles = import_react112.css`
|
|
|
19826
20271
|
color: var(--gray-400);
|
|
19827
20272
|
}
|
|
19828
20273
|
`;
|
|
19829
|
-
var modalContentStyles =
|
|
20274
|
+
var modalContentStyles = import_react115.css`
|
|
19830
20275
|
position: relative;
|
|
19831
20276
|
flex: 1;
|
|
19832
20277
|
overflow: auto;
|
|
@@ -19835,10 +20280,10 @@ var modalContentStyles = import_react112.css`
|
|
|
19835
20280
|
border-radius: var(--rounded-sm);
|
|
19836
20281
|
${scrollbarStyles}
|
|
19837
20282
|
`;
|
|
19838
|
-
var modalDialogWrapper =
|
|
20283
|
+
var modalDialogWrapper = import_react115.css`
|
|
19839
20284
|
padding: 0 var(--spacing-lg) var(--spacing-md);
|
|
19840
20285
|
`;
|
|
19841
|
-
var modalDialogInnerStyles =
|
|
20286
|
+
var modalDialogInnerStyles = import_react115.css`
|
|
19842
20287
|
// we need to override the gap of the modalInnerStyles when using a modal dialog
|
|
19843
20288
|
> div {
|
|
19844
20289
|
gap: 0;
|
|
@@ -19846,10 +20291,10 @@ var modalDialogInnerStyles = import_react112.css`
|
|
|
19846
20291
|
`;
|
|
19847
20292
|
|
|
19848
20293
|
// src/components/Modal/Modal.tsx
|
|
19849
|
-
var
|
|
20294
|
+
var import_jsx_runtime100 = require("@emotion/react/jsx-runtime");
|
|
19850
20295
|
var defaultModalWidth = "75rem";
|
|
19851
20296
|
var defaultModalHeight = "51rem";
|
|
19852
|
-
var Modal =
|
|
20297
|
+
var Modal = import_react117.default.forwardRef(
|
|
19853
20298
|
({
|
|
19854
20299
|
header: header2,
|
|
19855
20300
|
children,
|
|
@@ -19862,7 +20307,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19862
20307
|
withoutContentBackground = false,
|
|
19863
20308
|
...modalProps
|
|
19864
20309
|
}, ref) => {
|
|
19865
|
-
const dialogRef = (0,
|
|
20310
|
+
const dialogRef = (0, import_react117.useRef)(null);
|
|
19866
20311
|
const size = {
|
|
19867
20312
|
sm: modalSizeSmall,
|
|
19868
20313
|
md: modalSizeMedium,
|
|
@@ -19874,7 +20319,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19874
20319
|
},
|
|
19875
20320
|
shortcut: "escape"
|
|
19876
20321
|
});
|
|
19877
|
-
(0,
|
|
20322
|
+
(0, import_react117.useEffect)(() => {
|
|
19878
20323
|
var _a;
|
|
19879
20324
|
if (!document.contains(dialogRef.current)) {
|
|
19880
20325
|
console.warn(
|
|
@@ -19888,7 +20333,7 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19888
20333
|
(_a2 = dialogRef.current) == null ? void 0 : _a2.close();
|
|
19889
20334
|
};
|
|
19890
20335
|
}, []);
|
|
19891
|
-
return /* @__PURE__ */ (0,
|
|
20336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19892
20337
|
"dialog",
|
|
19893
20338
|
{
|
|
19894
20339
|
ref: (element) => {
|
|
@@ -19910,15 +20355,15 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19910
20355
|
e.preventDefault();
|
|
19911
20356
|
},
|
|
19912
20357
|
...modalProps,
|
|
19913
|
-
children: /* @__PURE__ */ (0,
|
|
20358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react116.PortalContext.Provider, { value: dialogRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
19914
20359
|
"div",
|
|
19915
20360
|
{
|
|
19916
20361
|
css: [modalInnerStyles, { height: height === "auto" ? "auto" : "100%" }],
|
|
19917
20362
|
onClick: (e) => e.stopPropagation(),
|
|
19918
20363
|
children: [
|
|
19919
|
-
/* @__PURE__ */ (0,
|
|
19920
|
-
!header2 ? null : /* @__PURE__ */ (0,
|
|
19921
|
-
/* @__PURE__ */ (0,
|
|
20364
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { css: modalHeaderStyles, children: [
|
|
20365
|
+
!header2 ? null : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { css: modalHeaderHeaderStyles, children: header2 }),
|
|
20366
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19922
20367
|
Button,
|
|
19923
20368
|
{
|
|
19924
20369
|
type: "button",
|
|
@@ -19927,11 +20372,11 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19927
20372
|
title: "Close dialog",
|
|
19928
20373
|
buttonType: "ghost",
|
|
19929
20374
|
"data-testid": "close-dialog",
|
|
19930
|
-
children: /* @__PURE__ */ (0,
|
|
20375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Icon, { icon: import_CgClose5.CgClose, iconColor: "currentColor", size: 24 })
|
|
19931
20376
|
}
|
|
19932
20377
|
)
|
|
19933
20378
|
] }),
|
|
19934
|
-
/* @__PURE__ */ (0,
|
|
20379
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
19935
20380
|
"div",
|
|
19936
20381
|
{
|
|
19937
20382
|
css: [
|
|
@@ -19942,10 +20387,10 @@ var Modal = import_react113.default.forwardRef(
|
|
|
19942
20387
|
children
|
|
19943
20388
|
}
|
|
19944
20389
|
),
|
|
19945
|
-
buttonGroup ? /* @__PURE__ */ (0,
|
|
20390
|
+
buttonGroup ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(HorizontalRhythm, { children: buttonGroup }) : null
|
|
19946
20391
|
]
|
|
19947
20392
|
}
|
|
19948
|
-
)
|
|
20393
|
+
) })
|
|
19949
20394
|
}
|
|
19950
20395
|
);
|
|
19951
20396
|
}
|
|
@@ -19954,11 +20399,11 @@ Modal.displayName = "Modal";
|
|
|
19954
20399
|
|
|
19955
20400
|
// src/components/Modal/ModalDialog.tsx
|
|
19956
20401
|
init_emotion_jsx_shim();
|
|
19957
|
-
var
|
|
19958
|
-
var
|
|
19959
|
-
var ModalDialog = (0,
|
|
20402
|
+
var import_react118 = require("react");
|
|
20403
|
+
var import_jsx_runtime101 = require("@emotion/react/jsx-runtime");
|
|
20404
|
+
var ModalDialog = (0, import_react118.forwardRef)(
|
|
19960
20405
|
({ header: header2, buttonGroup, modalSize = "lg", children, height = "auto", onRequestClose, ...props }, ref) => {
|
|
19961
|
-
return /* @__PURE__ */ (0,
|
|
20406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
19962
20407
|
Modal,
|
|
19963
20408
|
{
|
|
19964
20409
|
...props,
|
|
@@ -19970,10 +20415,10 @@ var ModalDialog = (0, import_react114.forwardRef)(
|
|
|
19970
20415
|
withoutContentPadding: true,
|
|
19971
20416
|
css: modalDialogInnerStyles,
|
|
19972
20417
|
width: "",
|
|
19973
|
-
children: /* @__PURE__ */ (0,
|
|
19974
|
-
/* @__PURE__ */ (0,
|
|
19975
|
-
/* @__PURE__ */ (0,
|
|
19976
|
-
/* @__PURE__ */ (0,
|
|
20418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(VerticalRhythm, { css: modalDialogWrapper, children: [
|
|
20419
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: modalHeaderStyles, children: header2 }),
|
|
20420
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { children }),
|
|
20421
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(HorizontalRhythm, { children: buttonGroup })
|
|
19977
20422
|
] })
|
|
19978
20423
|
}
|
|
19979
20424
|
);
|
|
@@ -19986,17 +20431,17 @@ init_emotion_jsx_shim();
|
|
|
19986
20431
|
|
|
19987
20432
|
// src/components/Objects/styles/ObjectGridContainer.styles.ts
|
|
19988
20433
|
init_emotion_jsx_shim();
|
|
19989
|
-
var
|
|
19990
|
-
var ObjectGridContainer = (gridCount) =>
|
|
20434
|
+
var import_react119 = require("@emotion/react");
|
|
20435
|
+
var ObjectGridContainer = (gridCount) => import_react119.css`
|
|
19991
20436
|
display: grid;
|
|
19992
20437
|
grid-template-columns: repeat(${gridCount}, minmax(250px, 1fr));
|
|
19993
20438
|
gap: var(--spacing-base);
|
|
19994
20439
|
`;
|
|
19995
20440
|
|
|
19996
20441
|
// src/components/Objects/ObjectGridContainer.tsx
|
|
19997
|
-
var
|
|
20442
|
+
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
19998
20443
|
var ObjectGridContainer2 = ({ gridCount = 3, children }) => {
|
|
19999
|
-
return /* @__PURE__ */ (0,
|
|
20444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { "data-testid": "object-grid-container", css: ObjectGridContainer(gridCount), children });
|
|
20000
20445
|
};
|
|
20001
20446
|
|
|
20002
20447
|
// src/components/Objects/ObjectGridItem.tsx
|
|
@@ -20004,8 +20449,8 @@ init_emotion_jsx_shim();
|
|
|
20004
20449
|
|
|
20005
20450
|
// src/components/Objects/styles/ObjectGridItem.styles.ts
|
|
20006
20451
|
init_emotion_jsx_shim();
|
|
20007
|
-
var
|
|
20008
|
-
var ObjectGridItem =
|
|
20452
|
+
var import_react120 = require("@emotion/react");
|
|
20453
|
+
var ObjectGridItem = import_react120.css`
|
|
20009
20454
|
border: 1px solid var(--gray-300);
|
|
20010
20455
|
border-radius: var(--rounded-base);
|
|
20011
20456
|
background: var(--white);
|
|
@@ -20023,21 +20468,21 @@ var ObjectGridItem = import_react116.css`
|
|
|
20023
20468
|
}
|
|
20024
20469
|
}
|
|
20025
20470
|
`;
|
|
20026
|
-
var ObjectGridItemMediaWrapper =
|
|
20471
|
+
var ObjectGridItemMediaWrapper = import_react120.css`
|
|
20027
20472
|
display: flex;
|
|
20028
20473
|
flex: 1 1 0;
|
|
20029
20474
|
position: relative;
|
|
20030
20475
|
`;
|
|
20031
|
-
var ObjectGridItemContentWrapper =
|
|
20476
|
+
var ObjectGridItemContentWrapper = import_react120.css`
|
|
20032
20477
|
padding: 0 var(--spacing-sm) var(--spacing-sm);
|
|
20033
20478
|
min-height: 52px;
|
|
20034
20479
|
`;
|
|
20035
|
-
var ObjectGridItemImage =
|
|
20480
|
+
var ObjectGridItemImage = import_react120.css`
|
|
20036
20481
|
object-fit: cover;
|
|
20037
20482
|
width: 100%;
|
|
20038
20483
|
height: auto;
|
|
20039
20484
|
`;
|
|
20040
|
-
var MenuBtn =
|
|
20485
|
+
var MenuBtn = import_react120.css`
|
|
20041
20486
|
border: none;
|
|
20042
20487
|
background: transparent;
|
|
20043
20488
|
padding: var(--spacing-xs);
|
|
@@ -20052,7 +20497,7 @@ var MenuBtn = import_react116.css`
|
|
|
20052
20497
|
`;
|
|
20053
20498
|
|
|
20054
20499
|
// src/components/Objects/ObjectGridItem.tsx
|
|
20055
|
-
var
|
|
20500
|
+
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
20056
20501
|
var ObjectGridItem2 = ({
|
|
20057
20502
|
header: header2,
|
|
20058
20503
|
cover,
|
|
@@ -20061,28 +20506,28 @@ var ObjectGridItem2 = ({
|
|
|
20061
20506
|
isSelected,
|
|
20062
20507
|
children
|
|
20063
20508
|
}) => {
|
|
20064
|
-
return /* @__PURE__ */ (0,
|
|
20065
|
-
/* @__PURE__ */ (0,
|
|
20066
|
-
/* @__PURE__ */ (0,
|
|
20067
|
-
/* @__PURE__ */ (0,
|
|
20068
|
-
/* @__PURE__ */ (0,
|
|
20509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { css: ObjectGridItem, "aria-selected": isSelected, children: [
|
|
20510
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { css: ObjectGridItemMediaWrapper, children: cover }),
|
|
20511
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(HorizontalRhythm, { css: ObjectGridItemContentWrapper, justify: "space-between", gap: "sm", children: [
|
|
20512
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(VerticalRhythm, { gap: "0", children: [
|
|
20513
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(HorizontalRhythm, { gap: "xs", align: "center", children: header2 }),
|
|
20069
20514
|
children
|
|
20070
20515
|
] }),
|
|
20071
|
-
/* @__PURE__ */ (0,
|
|
20516
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(HorizontalRhythm, { gap: "xs", align: "flex-start", children: [
|
|
20072
20517
|
rightSlot,
|
|
20073
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
20518
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
20074
20519
|
Menu,
|
|
20075
20520
|
{
|
|
20076
20521
|
menuTrigger: (
|
|
20077
20522
|
// TODO: once insights lands we should be able to replace this with MenuTrigger component
|
|
20078
|
-
/* @__PURE__ */ (0,
|
|
20523
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
20079
20524
|
"button",
|
|
20080
20525
|
{
|
|
20081
20526
|
type: "button",
|
|
20082
20527
|
"data-testid": "object-grid-item-menu-btn",
|
|
20083
20528
|
title: "menu options",
|
|
20084
20529
|
css: MenuBtn,
|
|
20085
|
-
children: /* @__PURE__ */ (0,
|
|
20530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Icon, { icon: "more-alt", size: "1rem", iconColor: "currentColor" })
|
|
20086
20531
|
}
|
|
20087
20532
|
)
|
|
20088
20533
|
),
|
|
@@ -20100,15 +20545,15 @@ init_emotion_jsx_shim();
|
|
|
20100
20545
|
|
|
20101
20546
|
// src/components/Objects/styles/ObjectGridItemCardCover.styles.ts
|
|
20102
20547
|
init_emotion_jsx_shim();
|
|
20103
|
-
var
|
|
20104
|
-
var CoverImage =
|
|
20548
|
+
var import_react121 = require("@emotion/react");
|
|
20549
|
+
var CoverImage = import_react121.css`
|
|
20105
20550
|
aspect-ratio: 16/9;
|
|
20106
20551
|
max-width: 100%;
|
|
20107
20552
|
max-height: 100%;
|
|
20108
20553
|
height: auto;
|
|
20109
20554
|
padding: var(--spacing-sm);
|
|
20110
20555
|
`;
|
|
20111
|
-
var CoverIconWrapper =
|
|
20556
|
+
var CoverIconWrapper = import_react121.css`
|
|
20112
20557
|
position: relative;
|
|
20113
20558
|
display: flex;
|
|
20114
20559
|
align-items: center;
|
|
@@ -20116,7 +20561,7 @@ var CoverIconWrapper = import_react117.css`
|
|
|
20116
20561
|
flex: 1;
|
|
20117
20562
|
overflow: hidden;
|
|
20118
20563
|
`;
|
|
20119
|
-
var CoverIconGhost =
|
|
20564
|
+
var CoverIconGhost = import_react121.css`
|
|
20120
20565
|
position: absolute;
|
|
20121
20566
|
width: 60%;
|
|
20122
20567
|
height: auto;
|
|
@@ -20124,7 +20569,7 @@ var CoverIconGhost = import_react117.css`
|
|
|
20124
20569
|
opacity: 0.05;
|
|
20125
20570
|
transform: rotateZ(-15deg) translate(35%, 30%);
|
|
20126
20571
|
`;
|
|
20127
|
-
var CoverSlot =
|
|
20572
|
+
var CoverSlot = import_react121.css`
|
|
20128
20573
|
align-items: center;
|
|
20129
20574
|
background: var(--white);
|
|
20130
20575
|
display: flex;
|
|
@@ -20135,15 +20580,15 @@ var CoverSlot = import_react117.css`
|
|
|
20135
20580
|
width: 24px;
|
|
20136
20581
|
height: 24px;
|
|
20137
20582
|
`;
|
|
20138
|
-
var CoverSlotLeft =
|
|
20583
|
+
var CoverSlotLeft = import_react121.css`
|
|
20139
20584
|
border-bottom-right-radius: var(--rounded-base);
|
|
20140
20585
|
left: var(--spacing-sm);
|
|
20141
20586
|
`;
|
|
20142
|
-
var CoverSlotRight =
|
|
20587
|
+
var CoverSlotRight = import_react121.css`
|
|
20143
20588
|
border-bottom-left-radius: var(--rounded-base);
|
|
20144
20589
|
right: var(--spacing-sm);
|
|
20145
20590
|
`;
|
|
20146
|
-
var CoverButton =
|
|
20591
|
+
var CoverButton = import_react121.css`
|
|
20147
20592
|
align-items: stretch;
|
|
20148
20593
|
border: none;
|
|
20149
20594
|
background: none;
|
|
@@ -20156,7 +20601,7 @@ var CoverButton = import_react117.css`
|
|
|
20156
20601
|
outline: none;
|
|
20157
20602
|
}
|
|
20158
20603
|
`;
|
|
20159
|
-
var CoverSelectedChip =
|
|
20604
|
+
var CoverSelectedChip = import_react121.css`
|
|
20160
20605
|
animation: ${fadeInBottom} var(--duration-fast) var(--timing-ease-out) forwards;
|
|
20161
20606
|
opacity: 0;
|
|
20162
20607
|
position: absolute;
|
|
@@ -20165,11 +20610,11 @@ var CoverSelectedChip = import_react117.css`
|
|
|
20165
20610
|
`;
|
|
20166
20611
|
|
|
20167
20612
|
// src/components/Objects/ObjectGridItemCardCover.tsx
|
|
20168
|
-
var
|
|
20613
|
+
var import_jsx_runtime104 = require("@emotion/react/jsx-runtime");
|
|
20169
20614
|
var ObjectGridItemCardCover = (props) => {
|
|
20170
20615
|
if ("imageUrl" in props && props.imageUrl) {
|
|
20171
20616
|
const { imageUrl } = props;
|
|
20172
|
-
return /* @__PURE__ */ (0,
|
|
20617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20173
20618
|
"img",
|
|
20174
20619
|
{
|
|
20175
20620
|
src: imageUrl,
|
|
@@ -20182,9 +20627,9 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
20182
20627
|
}
|
|
20183
20628
|
if ("icon" in props && props.icon) {
|
|
20184
20629
|
const { icon } = props;
|
|
20185
|
-
return /* @__PURE__ */ (0,
|
|
20186
|
-
/* @__PURE__ */ (0,
|
|
20187
|
-
/* @__PURE__ */ (0,
|
|
20630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", children: [
|
|
20631
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: "currentColor", css: CoverIconGhost }),
|
|
20632
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Icon, { icon, iconColor: "currentColor", size: 48 })
|
|
20188
20633
|
] });
|
|
20189
20634
|
}
|
|
20190
20635
|
};
|
|
@@ -20193,10 +20638,10 @@ var ObjectGridItemCover = ({
|
|
|
20193
20638
|
coverSlotRight,
|
|
20194
20639
|
...props
|
|
20195
20640
|
}) => {
|
|
20196
|
-
return /* @__PURE__ */ (0,
|
|
20197
|
-
coverSlotLeft ? /* @__PURE__ */ (0,
|
|
20198
|
-
/* @__PURE__ */ (0,
|
|
20199
|
-
coverSlotRight ? /* @__PURE__ */ (0,
|
|
20641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
20642
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20643
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20644
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null
|
|
20200
20645
|
] });
|
|
20201
20646
|
};
|
|
20202
20647
|
var ObjectGridItemCoverButton = ({
|
|
@@ -20208,22 +20653,22 @@ var ObjectGridItemCoverButton = ({
|
|
|
20208
20653
|
selectedText = "selected",
|
|
20209
20654
|
...props
|
|
20210
20655
|
}) => {
|
|
20211
|
-
return /* @__PURE__ */ (0,
|
|
20212
|
-
coverSlotLeft ? /* @__PURE__ */ (0,
|
|
20213
|
-
/* @__PURE__ */ (0,
|
|
20214
|
-
coverSlotRight ? /* @__PURE__ */ (0,
|
|
20215
|
-
isSelected ? /* @__PURE__ */ (0,
|
|
20656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("button", { type: "button", css: CoverButton, onClick: () => onSelection(id), "aria-selected": isSelected, children: [
|
|
20657
|
+
coverSlotLeft ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotLeft], children: coverSlotLeft }) : null,
|
|
20658
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ObjectGridItemCardCover, { ...props }),
|
|
20659
|
+
coverSlotRight ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: [CoverSlot, CoverSlotRight], children: coverSlotRight }) : null,
|
|
20660
|
+
isSelected ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { css: CoverSelectedChip, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Chip, { text: selectedText, size: "xs", theme: "accent-dark" }) }) : null
|
|
20216
20661
|
] });
|
|
20217
20662
|
};
|
|
20218
20663
|
|
|
20219
20664
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20220
20665
|
init_emotion_jsx_shim();
|
|
20221
|
-
var
|
|
20666
|
+
var import_react123 = require("react");
|
|
20222
20667
|
|
|
20223
20668
|
// src/components/Objects/styles/ObjectGridItemHeading.styles.ts
|
|
20224
20669
|
init_emotion_jsx_shim();
|
|
20225
|
-
var
|
|
20226
|
-
var ObjectGridItemHeading =
|
|
20670
|
+
var import_react122 = require("@emotion/react");
|
|
20671
|
+
var ObjectGridItemHeading = import_react122.css`
|
|
20227
20672
|
overflow: hidden;
|
|
20228
20673
|
text-overflow: ellipsis;
|
|
20229
20674
|
white-space: initial;
|
|
@@ -20231,20 +20676,20 @@ var ObjectGridItemHeading = import_react118.css`
|
|
|
20231
20676
|
-webkit-line-clamp: 1;
|
|
20232
20677
|
-webkit-box-orient: vertical;
|
|
20233
20678
|
`;
|
|
20234
|
-
var PopoverContent =
|
|
20679
|
+
var PopoverContent = import_react122.css`
|
|
20235
20680
|
min-width: 50px;
|
|
20236
20681
|
`;
|
|
20237
20682
|
|
|
20238
20683
|
// src/components/Objects/ObjectGridItemHeading.tsx
|
|
20239
|
-
var
|
|
20684
|
+
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20240
20685
|
var ObjectGridItemHeading2 = ({
|
|
20241
20686
|
heading,
|
|
20242
20687
|
beforeHeadingSlot,
|
|
20243
20688
|
afterHeadingSlot
|
|
20244
20689
|
}) => {
|
|
20245
|
-
const [hasTruncation, setHasTruncation] = (0,
|
|
20246
|
-
const headingRef = (0,
|
|
20247
|
-
(0,
|
|
20690
|
+
const [hasTruncation, setHasTruncation] = (0, import_react123.useState)(false);
|
|
20691
|
+
const headingRef = (0, import_react123.useRef)(null);
|
|
20692
|
+
(0, import_react123.useEffect)(() => {
|
|
20248
20693
|
const currentHeading = headingRef.current;
|
|
20249
20694
|
const observer = new ResizeObserver((entries) => {
|
|
20250
20695
|
for (const entry of entries) {
|
|
@@ -20261,23 +20706,23 @@ var ObjectGridItemHeading2 = ({
|
|
|
20261
20706
|
}
|
|
20262
20707
|
};
|
|
20263
20708
|
}, []);
|
|
20264
|
-
return /* @__PURE__ */ (0,
|
|
20709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
|
|
20265
20710
|
beforeHeadingSlot,
|
|
20266
|
-
/* @__PURE__ */ (0,
|
|
20711
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { title: hasTruncation ? heading : "", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { role: "heading", css: ObjectGridItemHeading, ref: headingRef, children: heading }) }),
|
|
20267
20712
|
afterHeadingSlot
|
|
20268
20713
|
] });
|
|
20269
20714
|
};
|
|
20270
20715
|
|
|
20271
20716
|
// src/components/Objects/ObjectGridItemIconWithTooltip.tsx
|
|
20272
20717
|
init_emotion_jsx_shim();
|
|
20273
|
-
var
|
|
20718
|
+
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20274
20719
|
var ObjectGridItemIconWithTooltip = ({
|
|
20275
20720
|
tooltipTitle,
|
|
20276
20721
|
placement = "bottom-start",
|
|
20277
20722
|
icon,
|
|
20278
20723
|
iconColor = "accent-dark"
|
|
20279
20724
|
}) => {
|
|
20280
|
-
return /* @__PURE__ */ (0,
|
|
20725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { title: tooltipTitle, placement, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { icon, iconColor, size: "1rem" }) }) });
|
|
20281
20726
|
};
|
|
20282
20727
|
|
|
20283
20728
|
// src/components/Pagination/Pagination.tsx
|
|
@@ -20314,7 +20759,7 @@ var page = import_css.css`
|
|
|
20314
20759
|
`;
|
|
20315
20760
|
|
|
20316
20761
|
// src/components/Pagination/Pagination.tsx
|
|
20317
|
-
var
|
|
20762
|
+
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20318
20763
|
function Pagination({
|
|
20319
20764
|
limit,
|
|
20320
20765
|
offset,
|
|
@@ -20329,12 +20774,12 @@ function Pagination({
|
|
|
20329
20774
|
if (pageCount <= 1) {
|
|
20330
20775
|
return null;
|
|
20331
20776
|
}
|
|
20332
|
-
return /* @__PURE__ */ (0,
|
|
20777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
20333
20778
|
import_react_paginate.default,
|
|
20334
20779
|
{
|
|
20335
20780
|
forcePage: currentPage,
|
|
20336
|
-
previousLabel: /* @__PURE__ */ (0,
|
|
20337
|
-
nextLabel: /* @__PURE__ */ (0,
|
|
20781
|
+
previousLabel: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: prevNextControls, children: "<" }),
|
|
20782
|
+
nextLabel: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: prevNextControls, children: ">" }),
|
|
20338
20783
|
breakLabel: "...",
|
|
20339
20784
|
pageCount,
|
|
20340
20785
|
marginPagesDisplayed: 2,
|
|
@@ -20354,8 +20799,8 @@ function Pagination({
|
|
|
20354
20799
|
|
|
20355
20800
|
// src/components/ParameterInputs/hooks/ParameterShellContext.tsx
|
|
20356
20801
|
init_emotion_jsx_shim();
|
|
20357
|
-
var
|
|
20358
|
-
var ParameterShellContext = (0,
|
|
20802
|
+
var import_react124 = require("react");
|
|
20803
|
+
var ParameterShellContext = (0, import_react124.createContext)({
|
|
20359
20804
|
id: "",
|
|
20360
20805
|
label: "",
|
|
20361
20806
|
hiddenLabel: void 0,
|
|
@@ -20364,7 +20809,7 @@ var ParameterShellContext = (0, import_react120.createContext)({
|
|
|
20364
20809
|
}
|
|
20365
20810
|
});
|
|
20366
20811
|
var useParameterShell = () => {
|
|
20367
|
-
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0,
|
|
20812
|
+
const { id, label, hiddenLabel, errorMessage, handleManuallySetErrorMessage } = (0, import_react124.useContext)(ParameterShellContext);
|
|
20368
20813
|
return {
|
|
20369
20814
|
id,
|
|
20370
20815
|
label,
|
|
@@ -20379,8 +20824,8 @@ init_emotion_jsx_shim();
|
|
|
20379
20824
|
|
|
20380
20825
|
// src/components/ParameterInputs/styles/LabelLeadingIcon.styles.ts
|
|
20381
20826
|
init_emotion_jsx_shim();
|
|
20382
|
-
var
|
|
20383
|
-
var inputIconBtn =
|
|
20827
|
+
var import_react125 = require("@emotion/react");
|
|
20828
|
+
var inputIconBtn = import_react125.css`
|
|
20384
20829
|
align-items: center;
|
|
20385
20830
|
border: none;
|
|
20386
20831
|
border-radius: var(--rounded-base);
|
|
@@ -20406,7 +20851,7 @@ var inputIconBtn = import_react121.css`
|
|
|
20406
20851
|
`;
|
|
20407
20852
|
|
|
20408
20853
|
// src/components/ParameterInputs/LabelLeadingIcon.tsx
|
|
20409
|
-
var
|
|
20854
|
+
var import_jsx_runtime108 = require("@emotion/react/jsx-runtime");
|
|
20410
20855
|
var LabelLeadingIcon = ({
|
|
20411
20856
|
icon,
|
|
20412
20857
|
iconColor,
|
|
@@ -20418,7 +20863,7 @@ var LabelLeadingIcon = ({
|
|
|
20418
20863
|
...props
|
|
20419
20864
|
}) => {
|
|
20420
20865
|
const titleFr = title2 != null ? title2 : isLocked ? "Read-only pattern parameter" : isBound ? "Connected to external content. Click to edit" : "Click to connect to external content";
|
|
20421
|
-
return /* @__PURE__ */ (0,
|
|
20866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Tooltip, { title: titleFr, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
20422
20867
|
"button",
|
|
20423
20868
|
{
|
|
20424
20869
|
css: inputIconBtn,
|
|
@@ -20428,7 +20873,7 @@ var LabelLeadingIcon = ({
|
|
|
20428
20873
|
...props,
|
|
20429
20874
|
"data-testid": "lock-button",
|
|
20430
20875
|
children: [
|
|
20431
|
-
/* @__PURE__ */ (0,
|
|
20876
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
20432
20877
|
Icon,
|
|
20433
20878
|
{
|
|
20434
20879
|
icon: isLocked ? "lock" : icon ? icon : "arrows-expand-down-right",
|
|
@@ -20448,8 +20893,8 @@ init_emotion_jsx_shim();
|
|
|
20448
20893
|
|
|
20449
20894
|
// src/components/ParameterInputs/styles/ParameterInput.styles.ts
|
|
20450
20895
|
init_emotion_jsx_shim();
|
|
20451
|
-
var
|
|
20452
|
-
var inputContainer2 =
|
|
20896
|
+
var import_react126 = require("@emotion/react");
|
|
20897
|
+
var inputContainer2 = import_react126.css`
|
|
20453
20898
|
position: relative;
|
|
20454
20899
|
scroll-margin: var(--spacing-2xl);
|
|
20455
20900
|
|
|
@@ -20462,14 +20907,14 @@ var inputContainer2 = import_react122.css`
|
|
|
20462
20907
|
}
|
|
20463
20908
|
}
|
|
20464
20909
|
`;
|
|
20465
|
-
var labelText2 =
|
|
20910
|
+
var labelText2 = import_react126.css`
|
|
20466
20911
|
align-items: center;
|
|
20467
20912
|
display: flex;
|
|
20468
20913
|
gap: var(--spacing-xs);
|
|
20469
20914
|
font-weight: var(--fw-regular);
|
|
20470
20915
|
margin: 0 0 var(--spacing-xs);
|
|
20471
20916
|
`;
|
|
20472
|
-
var input3 =
|
|
20917
|
+
var input3 = import_react126.css`
|
|
20473
20918
|
display: block;
|
|
20474
20919
|
appearance: none;
|
|
20475
20920
|
box-sizing: border-box;
|
|
@@ -20517,18 +20962,18 @@ var input3 = import_react122.css`
|
|
|
20517
20962
|
color: var(--gray-400);
|
|
20518
20963
|
}
|
|
20519
20964
|
`;
|
|
20520
|
-
var selectInput =
|
|
20965
|
+
var selectInput = import_react126.css`
|
|
20521
20966
|
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");
|
|
20522
20967
|
background-position: right var(--spacing-sm) center;
|
|
20523
20968
|
background-repeat: no-repeat;
|
|
20524
20969
|
background-size: 1rem;
|
|
20525
20970
|
padding-right: var(--spacing-xl);
|
|
20526
20971
|
`;
|
|
20527
|
-
var inputWrapper =
|
|
20972
|
+
var inputWrapper = import_react126.css`
|
|
20528
20973
|
display: flex; // used to correct overflow with chrome textarea
|
|
20529
20974
|
position: relative;
|
|
20530
20975
|
`;
|
|
20531
|
-
var inputIcon2 =
|
|
20976
|
+
var inputIcon2 = import_react126.css`
|
|
20532
20977
|
align-items: center;
|
|
20533
20978
|
background: var(--white);
|
|
20534
20979
|
border-radius: var(--rounded-md) 0 0 var(--rounded-md);
|
|
@@ -20544,7 +20989,7 @@ var inputIcon2 = import_react122.css`
|
|
|
20544
20989
|
width: var(--spacing-lg);
|
|
20545
20990
|
z-index: var(--z-10);
|
|
20546
20991
|
`;
|
|
20547
|
-
var inputToggleLabel2 =
|
|
20992
|
+
var inputToggleLabel2 = import_react126.css`
|
|
20548
20993
|
--inline-label-color: var(--typography-base);
|
|
20549
20994
|
align-items: center;
|
|
20550
20995
|
cursor: pointer;
|
|
@@ -20559,7 +21004,7 @@ var inputToggleLabel2 = import_react122.css`
|
|
|
20559
21004
|
--inline-label-color: var(--gray-400);
|
|
20560
21005
|
}
|
|
20561
21006
|
`;
|
|
20562
|
-
var toggleInput2 =
|
|
21007
|
+
var toggleInput2 = import_react126.css`
|
|
20563
21008
|
appearance: none;
|
|
20564
21009
|
border: 1px solid var(--gray-200);
|
|
20565
21010
|
background: var(--white);
|
|
@@ -20612,7 +21057,7 @@ var toggleInput2 = import_react122.css`
|
|
|
20612
21057
|
border-color: var(--gray-300);
|
|
20613
21058
|
}
|
|
20614
21059
|
`;
|
|
20615
|
-
var inlineLabel2 =
|
|
21060
|
+
var inlineLabel2 = import_react126.css`
|
|
20616
21061
|
color: var(--inline-label-color);
|
|
20617
21062
|
padding-left: var(--spacing-md);
|
|
20618
21063
|
font-size: var(--fs-sm);
|
|
@@ -20629,7 +21074,7 @@ var inlineLabel2 = import_react122.css`
|
|
|
20629
21074
|
}
|
|
20630
21075
|
}
|
|
20631
21076
|
`;
|
|
20632
|
-
var inputMenu =
|
|
21077
|
+
var inputMenu = import_react126.css`
|
|
20633
21078
|
background: none;
|
|
20634
21079
|
border: none;
|
|
20635
21080
|
padding: var(--spacing-2xs);
|
|
@@ -20637,10 +21082,10 @@ var inputMenu = import_react122.css`
|
|
|
20637
21082
|
top: calc(var(--spacing-md) * -1.2);
|
|
20638
21083
|
right: 0;
|
|
20639
21084
|
`;
|
|
20640
|
-
var inputActionItems =
|
|
21085
|
+
var inputActionItems = import_react126.css`
|
|
20641
21086
|
display: flex;
|
|
20642
21087
|
`;
|
|
20643
|
-
var inputMenuHover =
|
|
21088
|
+
var inputMenuHover = import_react126.css`
|
|
20644
21089
|
opacity: var(--opacity-50);
|
|
20645
21090
|
transition: background-color var(--duration-fast) var(--timing-ease-out);
|
|
20646
21091
|
|
|
@@ -20650,11 +21095,11 @@ var inputMenuHover = import_react122.css`
|
|
|
20650
21095
|
background-color: var(--gray-200);
|
|
20651
21096
|
}
|
|
20652
21097
|
`;
|
|
20653
|
-
var textarea2 =
|
|
21098
|
+
var textarea2 = import_react126.css`
|
|
20654
21099
|
resize: vertical;
|
|
20655
21100
|
min-height: 2rem;
|
|
20656
21101
|
`;
|
|
20657
|
-
var dataConnectButton =
|
|
21102
|
+
var dataConnectButton = import_react126.css`
|
|
20658
21103
|
align-items: center;
|
|
20659
21104
|
appearance: none;
|
|
20660
21105
|
box-sizing: border-box;
|
|
@@ -20689,7 +21134,7 @@ var dataConnectButton = import_react122.css`
|
|
|
20689
21134
|
pointer-events: none;
|
|
20690
21135
|
}
|
|
20691
21136
|
`;
|
|
20692
|
-
var linkParameterBtn =
|
|
21137
|
+
var linkParameterBtn = import_react126.css`
|
|
20693
21138
|
border-radius: var(--rounded-base);
|
|
20694
21139
|
background: transparent;
|
|
20695
21140
|
border: none;
|
|
@@ -20698,7 +21143,7 @@ var linkParameterBtn = import_react122.css`
|
|
|
20698
21143
|
font-size: var(--fs-sm);
|
|
20699
21144
|
line-height: 1;
|
|
20700
21145
|
`;
|
|
20701
|
-
var linkParameterControls =
|
|
21146
|
+
var linkParameterControls = import_react126.css`
|
|
20702
21147
|
position: absolute;
|
|
20703
21148
|
inset: 0 0 0 auto;
|
|
20704
21149
|
padding: 0 var(--spacing-base);
|
|
@@ -20707,7 +21152,7 @@ var linkParameterControls = import_react122.css`
|
|
|
20707
21152
|
justify-content: center;
|
|
20708
21153
|
gap: var(--spacing-base);
|
|
20709
21154
|
`;
|
|
20710
|
-
var linkParameterInput = (withExternalLinkIcon) =>
|
|
21155
|
+
var linkParameterInput = (withExternalLinkIcon) => import_react126.css`
|
|
20711
21156
|
padding-right: calc(
|
|
20712
21157
|
${withExternalLinkIcon ? "calc(var(--spacing-lg) * 2 + var(--spacing-xs))" : "var(--spacing-xl)"} +
|
|
20713
21158
|
var(--spacing-base)
|
|
@@ -20720,7 +21165,7 @@ var linkParameterInput = (withExternalLinkIcon) => import_react122.css`
|
|
|
20720
21165
|
}
|
|
20721
21166
|
}
|
|
20722
21167
|
`;
|
|
20723
|
-
var linkParameterIcon =
|
|
21168
|
+
var linkParameterIcon = import_react126.css`
|
|
20724
21169
|
align-items: center;
|
|
20725
21170
|
color: var(--brand-secondary-3);
|
|
20726
21171
|
display: flex;
|
|
@@ -20735,7 +21180,7 @@ var linkParameterIcon = import_react122.css`
|
|
|
20735
21180
|
`;
|
|
20736
21181
|
|
|
20737
21182
|
// src/components/ParameterInputs/ParameterDataResource.tsx
|
|
20738
|
-
var
|
|
21183
|
+
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20739
21184
|
function ParameterDataResource({
|
|
20740
21185
|
label,
|
|
20741
21186
|
labelLeadingIcon,
|
|
@@ -20745,12 +21190,12 @@ function ParameterDataResource({
|
|
|
20745
21190
|
disabled: disabled2,
|
|
20746
21191
|
children
|
|
20747
21192
|
}) {
|
|
20748
|
-
return /* @__PURE__ */ (0,
|
|
20749
|
-
/* @__PURE__ */ (0,
|
|
21193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { "data-testid": "parameter-data-connect-button", children: [
|
|
21194
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { css: labelText2, children: [
|
|
20750
21195
|
labelLeadingIcon ? labelLeadingIcon : null,
|
|
20751
21196
|
label
|
|
20752
21197
|
] }),
|
|
20753
|
-
/* @__PURE__ */ (0,
|
|
21198
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
20754
21199
|
"button",
|
|
20755
21200
|
{
|
|
20756
21201
|
type: "button",
|
|
@@ -20759,12 +21204,12 @@ function ParameterDataResource({
|
|
|
20759
21204
|
disabled: disabled2,
|
|
20760
21205
|
onClick: onConnectDatasource,
|
|
20761
21206
|
children: [
|
|
20762
|
-
/* @__PURE__ */ (0,
|
|
21207
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "advance-input-icon", css: [inputIcon2], children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Icon, { icon: "stack", iconColor: "currentColor", size: "1rem" }) }),
|
|
20763
21208
|
children
|
|
20764
21209
|
]
|
|
20765
21210
|
}
|
|
20766
21211
|
),
|
|
20767
|
-
caption ? /* @__PURE__ */ (0,
|
|
21212
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Caption, { children: caption }) : null
|
|
20768
21213
|
] });
|
|
20769
21214
|
}
|
|
20770
21215
|
|
|
@@ -20773,20 +21218,20 @@ init_emotion_jsx_shim();
|
|
|
20773
21218
|
|
|
20774
21219
|
// src/components/ParameterInputs/styles/ParameterDrawerHeader.styles.ts
|
|
20775
21220
|
init_emotion_jsx_shim();
|
|
20776
|
-
var
|
|
20777
|
-
var ParameterDrawerHeaderContainer =
|
|
21221
|
+
var import_react127 = require("@emotion/react");
|
|
21222
|
+
var ParameterDrawerHeaderContainer = import_react127.css`
|
|
20778
21223
|
align-items: center;
|
|
20779
21224
|
display: flex;
|
|
20780
21225
|
gap: var(--spacing-base);
|
|
20781
21226
|
justify-content: space-between;
|
|
20782
21227
|
margin-bottom: var(--spacing-sm);
|
|
20783
21228
|
`;
|
|
20784
|
-
var ParameterDrawerHeaderTitleGroup =
|
|
21229
|
+
var ParameterDrawerHeaderTitleGroup = import_react127.css`
|
|
20785
21230
|
align-items: center;
|
|
20786
21231
|
display: flex;
|
|
20787
21232
|
gap: var(--spacing-sm);
|
|
20788
21233
|
`;
|
|
20789
|
-
var ParameterDrawerHeaderTitle =
|
|
21234
|
+
var ParameterDrawerHeaderTitle = import_react127.css`
|
|
20790
21235
|
text-overflow: ellipsis;
|
|
20791
21236
|
white-space: nowrap;
|
|
20792
21237
|
overflow: hidden;
|
|
@@ -20794,12 +21239,12 @@ var ParameterDrawerHeaderTitle = import_react123.css`
|
|
|
20794
21239
|
`;
|
|
20795
21240
|
|
|
20796
21241
|
// src/components/ParameterInputs/ParameterDrawerHeader.tsx
|
|
20797
|
-
var
|
|
21242
|
+
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
20798
21243
|
var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
20799
|
-
return /* @__PURE__ */ (0,
|
|
20800
|
-
/* @__PURE__ */ (0,
|
|
21244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { css: ParameterDrawerHeaderContainer, children: [
|
|
21245
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("header", { css: ParameterDrawerHeaderTitleGroup, children: [
|
|
20801
21246
|
iconBeforeTitle,
|
|
20802
|
-
/* @__PURE__ */ (0,
|
|
21247
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Heading2, { level: 3, withMarginBottom: false, css: ParameterDrawerHeaderTitle, title: title2, children: title2 })
|
|
20803
21248
|
] }),
|
|
20804
21249
|
children
|
|
20805
21250
|
] });
|
|
@@ -20807,12 +21252,12 @@ var ParameterDrawerHeader = ({ title: title2, iconBeforeTitle, children }) => {
|
|
|
20807
21252
|
|
|
20808
21253
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20809
21254
|
init_emotion_jsx_shim();
|
|
20810
|
-
var
|
|
21255
|
+
var import_react129 = require("react");
|
|
20811
21256
|
|
|
20812
21257
|
// src/components/ParameterInputs/styles/ParameterGroup.styles.ts
|
|
20813
21258
|
init_emotion_jsx_shim();
|
|
20814
|
-
var
|
|
20815
|
-
var fieldsetStyles =
|
|
21259
|
+
var import_react128 = require("@emotion/react");
|
|
21260
|
+
var fieldsetStyles = import_react128.css`
|
|
20816
21261
|
&:disabled,
|
|
20817
21262
|
[readonly] {
|
|
20818
21263
|
pointer-events: none;
|
|
@@ -20823,7 +21268,7 @@ var fieldsetStyles = import_react124.css`
|
|
|
20823
21268
|
}
|
|
20824
21269
|
}
|
|
20825
21270
|
`;
|
|
20826
|
-
var fieldsetLegend2 =
|
|
21271
|
+
var fieldsetLegend2 = import_react128.css`
|
|
20827
21272
|
display: block;
|
|
20828
21273
|
font-weight: var(--fw-medium);
|
|
20829
21274
|
margin-bottom: var(--spacing-sm);
|
|
@@ -20831,11 +21276,11 @@ var fieldsetLegend2 = import_react124.css`
|
|
|
20831
21276
|
`;
|
|
20832
21277
|
|
|
20833
21278
|
// src/components/ParameterInputs/ParameterGroup.tsx
|
|
20834
|
-
var
|
|
20835
|
-
var ParameterGroup = (0,
|
|
21279
|
+
var import_jsx_runtime111 = require("@emotion/react/jsx-runtime");
|
|
21280
|
+
var ParameterGroup = (0, import_react129.forwardRef)(
|
|
20836
21281
|
({ legend, isDisabled, children, ...props }, ref) => {
|
|
20837
|
-
return /* @__PURE__ */ (0,
|
|
20838
|
-
/* @__PURE__ */ (0,
|
|
21282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("fieldset", { css: fieldsetStyles, disabled: isDisabled, ref, ...props, children: [
|
|
21283
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("legend", { css: fieldsetLegend2, children: legend }),
|
|
20839
21284
|
children
|
|
20840
21285
|
] });
|
|
20841
21286
|
}
|
|
@@ -20843,24 +21288,24 @@ var ParameterGroup = (0, import_react125.forwardRef)(
|
|
|
20843
21288
|
|
|
20844
21289
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
20845
21290
|
init_emotion_jsx_shim();
|
|
20846
|
-
var
|
|
21291
|
+
var import_react136 = require("react");
|
|
20847
21292
|
|
|
20848
21293
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20849
21294
|
init_emotion_jsx_shim();
|
|
20850
|
-
var
|
|
21295
|
+
var import_react131 = require("react");
|
|
20851
21296
|
var import_react_dom2 = require("react-dom");
|
|
20852
21297
|
|
|
20853
21298
|
// src/components/ParameterInputs/styles/ParameterImage.styles.ts
|
|
20854
21299
|
init_emotion_jsx_shim();
|
|
20855
|
-
var
|
|
20856
|
-
var previewWrapper =
|
|
21300
|
+
var import_react130 = require("@emotion/react");
|
|
21301
|
+
var previewWrapper = import_react130.css`
|
|
20857
21302
|
margin-top: var(--spacing-xs);
|
|
20858
21303
|
background: var(--gray-50);
|
|
20859
21304
|
padding: var(--spacing-sm);
|
|
20860
21305
|
border: solid 1px var(--gray-300);
|
|
20861
21306
|
border-radius: var(--rounded-sm);
|
|
20862
21307
|
`;
|
|
20863
|
-
var previewLink =
|
|
21308
|
+
var previewLink = import_react130.css`
|
|
20864
21309
|
display: block;
|
|
20865
21310
|
width: 100%;
|
|
20866
21311
|
|
|
@@ -20868,7 +21313,7 @@ var previewLink = import_react126.css`
|
|
|
20868
21313
|
max-height: 9rem;
|
|
20869
21314
|
}
|
|
20870
21315
|
`;
|
|
20871
|
-
var previewModalWrapper =
|
|
21316
|
+
var previewModalWrapper = import_react130.css`
|
|
20872
21317
|
background: var(--gray-50);
|
|
20873
21318
|
display: flex;
|
|
20874
21319
|
height: 100%;
|
|
@@ -20877,7 +21322,7 @@ var previewModalWrapper = import_react126.css`
|
|
|
20877
21322
|
border: solid 1px var(--gray-300);
|
|
20878
21323
|
border-radius: var(--rounded-sm);
|
|
20879
21324
|
`;
|
|
20880
|
-
var previewModalImage =
|
|
21325
|
+
var previewModalImage = import_react130.css`
|
|
20881
21326
|
display: flex;
|
|
20882
21327
|
height: 100%;
|
|
20883
21328
|
width: 100%;
|
|
@@ -20889,32 +21334,32 @@ var previewModalImage = import_react126.css`
|
|
|
20889
21334
|
`;
|
|
20890
21335
|
|
|
20891
21336
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
20892
|
-
var
|
|
21337
|
+
var import_jsx_runtime112 = require("@emotion/react/jsx-runtime");
|
|
20893
21338
|
function ParameterImagePreview({ imageSrc }) {
|
|
20894
|
-
const [showModal, setShowModal] = (0,
|
|
20895
|
-
return imageSrc ? /* @__PURE__ */ (0,
|
|
20896
|
-
/* @__PURE__ */ (0,
|
|
20897
|
-
/* @__PURE__ */ (0,
|
|
21339
|
+
const [showModal, setShowModal] = (0, import_react131.useState)(false);
|
|
21340
|
+
return imageSrc ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { css: previewWrapper, children: [
|
|
21341
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
|
|
21342
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
20898
21343
|
"button",
|
|
20899
21344
|
{
|
|
20900
21345
|
css: previewLink,
|
|
20901
21346
|
onClick: () => {
|
|
20902
21347
|
setShowModal(true);
|
|
20903
21348
|
},
|
|
20904
|
-
children: /* @__PURE__ */ (0,
|
|
21349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Image, { src: imageSrc, "data-testid": "parameter-image-preview" })
|
|
20905
21350
|
}
|
|
20906
21351
|
)
|
|
20907
21352
|
] }) : null;
|
|
20908
21353
|
}
|
|
20909
21354
|
var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
20910
|
-
return open ? /* @__PURE__ */ (0,
|
|
20911
|
-
/* @__PURE__ */ (0,
|
|
21355
|
+
return open ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_jsx_runtime112.Fragment, { children: (0, import_react_dom2.createPortal)(
|
|
21356
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
20912
21357
|
Modal,
|
|
20913
21358
|
{
|
|
20914
21359
|
header: "Image Preview",
|
|
20915
21360
|
onRequestClose,
|
|
20916
|
-
buttonGroup: /* @__PURE__ */ (0,
|
|
20917
|
-
children: /* @__PURE__ */ (0,
|
|
21361
|
+
buttonGroup: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Button, { buttonType: "secondary", onClick: onRequestClose, children: "Ok" }),
|
|
21362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { css: previewModalWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Image, { src: imageSrc, css: previewModalImage, "data-testid": "parameter-image-preview" }) })
|
|
20918
21363
|
}
|
|
20919
21364
|
),
|
|
20920
21365
|
document.body
|
|
@@ -20923,27 +21368,27 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
20923
21368
|
|
|
20924
21369
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
20925
21370
|
init_emotion_jsx_shim();
|
|
20926
|
-
var
|
|
20927
|
-
var
|
|
21371
|
+
var import_react134 = require("@emotion/react");
|
|
21372
|
+
var import_react135 = require("react");
|
|
20928
21373
|
|
|
20929
21374
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
20930
21375
|
init_emotion_jsx_shim();
|
|
20931
|
-
var
|
|
21376
|
+
var import_jsx_runtime113 = require("@emotion/react/jsx-runtime");
|
|
20932
21377
|
var ParameterLabel = ({ id, asSpan, children, ...props }) => {
|
|
20933
|
-
return !asSpan ? /* @__PURE__ */ (0,
|
|
21378
|
+
return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
|
|
20934
21379
|
};
|
|
20935
21380
|
|
|
20936
21381
|
// src/components/ParameterInputs/ParameterMenuButton.tsx
|
|
20937
21382
|
init_emotion_jsx_shim();
|
|
20938
|
-
var
|
|
20939
|
-
var
|
|
20940
|
-
var ParameterMenuButton = (0,
|
|
21383
|
+
var import_react132 = require("react");
|
|
21384
|
+
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
21385
|
+
var ParameterMenuButton = (0, import_react132.forwardRef)(
|
|
20941
21386
|
({ label, children }, ref) => {
|
|
20942
|
-
return /* @__PURE__ */ (0,
|
|
21387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20943
21388
|
Menu,
|
|
20944
21389
|
{
|
|
20945
21390
|
menuLabel: `${label} menu`,
|
|
20946
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
21391
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
20947
21392
|
"button",
|
|
20948
21393
|
{
|
|
20949
21394
|
className: "parameter-menu",
|
|
@@ -20951,7 +21396,7 @@ var ParameterMenuButton = (0, import_react128.forwardRef)(
|
|
|
20951
21396
|
type: "button",
|
|
20952
21397
|
"aria-label": `${label} options`,
|
|
20953
21398
|
ref,
|
|
20954
|
-
children: /* @__PURE__ */ (0,
|
|
21399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Icon, { icon: "more-alt", iconColor: "currentColor", size: "0.9rem" })
|
|
20955
21400
|
}
|
|
20956
21401
|
),
|
|
20957
21402
|
children
|
|
@@ -20962,14 +21407,14 @@ var ParameterMenuButton = (0, import_react128.forwardRef)(
|
|
|
20962
21407
|
|
|
20963
21408
|
// src/components/ParameterInputs/styles/ParameterShell.styles.ts
|
|
20964
21409
|
init_emotion_jsx_shim();
|
|
20965
|
-
var
|
|
20966
|
-
var emptyParameterShell =
|
|
21410
|
+
var import_react133 = require("@emotion/react");
|
|
21411
|
+
var emptyParameterShell = import_react133.css`
|
|
20967
21412
|
border-radius: var(--rounded-sm);
|
|
20968
21413
|
flex-grow: 1;
|
|
20969
21414
|
position: relative;
|
|
20970
21415
|
max-width: 100%;
|
|
20971
21416
|
`;
|
|
20972
|
-
var emptyParameterShellText =
|
|
21417
|
+
var emptyParameterShellText = import_react133.css`
|
|
20973
21418
|
background: var(--brand-secondary-6);
|
|
20974
21419
|
border-radius: var(--rounded-sm);
|
|
20975
21420
|
padding: var(--spacing-sm);
|
|
@@ -20977,7 +21422,7 @@ var emptyParameterShellText = import_react129.css`
|
|
|
20977
21422
|
font-size: var(--fs-sm);
|
|
20978
21423
|
margin: 0;
|
|
20979
21424
|
`;
|
|
20980
|
-
var overrideMarker =
|
|
21425
|
+
var overrideMarker = import_react133.css`
|
|
20981
21426
|
border-radius: var(--rounded-sm);
|
|
20982
21427
|
border: 10px solid var(--gray-300);
|
|
20983
21428
|
border-left-color: transparent;
|
|
@@ -20988,7 +21433,7 @@ var overrideMarker = import_react129.css`
|
|
|
20988
21433
|
`;
|
|
20989
21434
|
|
|
20990
21435
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
20991
|
-
var
|
|
21436
|
+
var import_jsx_runtime115 = require("@emotion/react/jsx-runtime");
|
|
20992
21437
|
var extractParameterProps = (props) => {
|
|
20993
21438
|
const {
|
|
20994
21439
|
id,
|
|
@@ -21048,36 +21493,36 @@ var ParameterShell = ({
|
|
|
21048
21493
|
isParameterGroup = false,
|
|
21049
21494
|
...props
|
|
21050
21495
|
}) => {
|
|
21051
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
21496
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react135.useState)(void 0);
|
|
21052
21497
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
21053
21498
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
21054
|
-
return /* @__PURE__ */ (0,
|
|
21055
|
-
hiddenLabel || title2 ? null : /* @__PURE__ */ (0,
|
|
21499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { css: inputContainer2, ...props, id, children: [
|
|
21500
|
+
hiddenLabel || title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterLabel, { id, css: labelText2, children: [
|
|
21056
21501
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21057
21502
|
label,
|
|
21058
21503
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21059
21504
|
] }),
|
|
21060
|
-
!title2 ? null : /* @__PURE__ */ (0,
|
|
21505
|
+
!title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterLabel, { id, asSpan: true, children: [
|
|
21061
21506
|
labelLeadingIcon != null ? labelLeadingIcon : null,
|
|
21062
21507
|
title2,
|
|
21063
21508
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
21064
21509
|
] }),
|
|
21065
|
-
/* @__PURE__ */ (0,
|
|
21066
|
-
actionItems ? /* @__PURE__ */ (0,
|
|
21510
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { css: inputWrapper, children: [
|
|
21511
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21067
21512
|
"div",
|
|
21068
21513
|
{
|
|
21069
21514
|
css: [
|
|
21070
21515
|
inputMenu,
|
|
21071
21516
|
inputActionItems,
|
|
21072
|
-
menuItems ?
|
|
21517
|
+
menuItems ? import_react134.css`
|
|
21073
21518
|
right: var(--spacing-md);
|
|
21074
21519
|
` : void 0
|
|
21075
21520
|
],
|
|
21076
21521
|
children: actionItems
|
|
21077
21522
|
}
|
|
21078
21523
|
) : null,
|
|
21079
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
21080
|
-
/* @__PURE__ */ (0,
|
|
21524
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
21525
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21081
21526
|
ParameterShellContext.Provider,
|
|
21082
21527
|
{
|
|
21083
21528
|
value: {
|
|
@@ -21087,14 +21532,14 @@ var ParameterShell = ({
|
|
|
21087
21532
|
errorMessage: errorMessaging,
|
|
21088
21533
|
handleManuallySetErrorMessage: (message) => setErrorMessage(message)
|
|
21089
21534
|
},
|
|
21090
|
-
children: isParameterGroup ? /* @__PURE__ */ (0,
|
|
21535
|
+
children: isParameterGroup ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { style: { flexGrow: 1 }, children }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(ParameterShellPlaceholder, { children: [
|
|
21091
21536
|
children,
|
|
21092
|
-
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0,
|
|
21537
|
+
hasOverriddenValue && onResetOverriddenValue ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ParameterOverrideMarker, { onClick: onResetOverriddenValue }) : null
|
|
21093
21538
|
] })
|
|
21094
21539
|
}
|
|
21095
21540
|
)
|
|
21096
21541
|
] }),
|
|
21097
|
-
/* @__PURE__ */ (0,
|
|
21542
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
21098
21543
|
FieldMessage,
|
|
21099
21544
|
{
|
|
21100
21545
|
helperMessageTestId: captionTestId,
|
|
@@ -21108,27 +21553,27 @@ var ParameterShell = ({
|
|
|
21108
21553
|
] });
|
|
21109
21554
|
};
|
|
21110
21555
|
var ParameterShellPlaceholder = ({ children }) => {
|
|
21111
|
-
return /* @__PURE__ */ (0,
|
|
21556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { css: emptyParameterShell, children });
|
|
21112
21557
|
};
|
|
21113
|
-
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0,
|
|
21558
|
+
var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Tooltip, { title: "The default value has been overridden", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("button", { type: "button", css: overrideMarker, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { hidden: true, children: "reset overridden value to default" }) }) });
|
|
21114
21559
|
|
|
21115
21560
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
21116
|
-
var
|
|
21117
|
-
var ParameterImage = (0,
|
|
21561
|
+
var import_jsx_runtime116 = require("@emotion/react/jsx-runtime");
|
|
21562
|
+
var ParameterImage = (0, import_react136.forwardRef)(
|
|
21118
21563
|
({ children, ...props }, ref) => {
|
|
21119
21564
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21120
|
-
return /* @__PURE__ */ (0,
|
|
21121
|
-
/* @__PURE__ */ (0,
|
|
21565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
21566
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterImageInner, { ref, ...innerProps }),
|
|
21122
21567
|
children
|
|
21123
21568
|
] });
|
|
21124
21569
|
}
|
|
21125
21570
|
);
|
|
21126
|
-
var ParameterImageInner = (0,
|
|
21571
|
+
var ParameterImageInner = (0, import_react136.forwardRef)((props, ref) => {
|
|
21127
21572
|
const { value } = props;
|
|
21128
21573
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
21129
|
-
const deferredValue = (0,
|
|
21130
|
-
return /* @__PURE__ */ (0,
|
|
21131
|
-
/* @__PURE__ */ (0,
|
|
21574
|
+
const deferredValue = (0, import_react136.useDeferredValue)(value);
|
|
21575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
|
|
21576
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
21132
21577
|
"input",
|
|
21133
21578
|
{
|
|
21134
21579
|
css: input3,
|
|
@@ -21140,22 +21585,22 @@ var ParameterImageInner = (0, import_react132.forwardRef)((props, ref) => {
|
|
|
21140
21585
|
...props
|
|
21141
21586
|
}
|
|
21142
21587
|
),
|
|
21143
|
-
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0,
|
|
21588
|
+
errorMessage || props.disablePreview ? null : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(ParameterImagePreview, { imageSrc: deferredValue })
|
|
21144
21589
|
] });
|
|
21145
21590
|
});
|
|
21146
21591
|
|
|
21147
21592
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
21148
21593
|
init_emotion_jsx_shim();
|
|
21149
|
-
var
|
|
21150
|
-
var
|
|
21151
|
-
var ParameterInput = (0,
|
|
21594
|
+
var import_react137 = require("react");
|
|
21595
|
+
var import_jsx_runtime117 = require("@emotion/react/jsx-runtime");
|
|
21596
|
+
var ParameterInput = (0, import_react137.forwardRef)((props, ref) => {
|
|
21152
21597
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21153
|
-
return /* @__PURE__ */ (0,
|
|
21598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
21154
21599
|
});
|
|
21155
|
-
var ParameterInputInner = (0,
|
|
21600
|
+
var ParameterInputInner = (0, import_react137.forwardRef)(
|
|
21156
21601
|
({ ...props }, ref) => {
|
|
21157
21602
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21158
|
-
return /* @__PURE__ */ (0,
|
|
21603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
21159
21604
|
"input",
|
|
21160
21605
|
{
|
|
21161
21606
|
css: input3,
|
|
@@ -21172,19 +21617,19 @@ var ParameterInputInner = (0, import_react133.forwardRef)(
|
|
|
21172
21617
|
|
|
21173
21618
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
21174
21619
|
init_emotion_jsx_shim();
|
|
21175
|
-
var
|
|
21176
|
-
var
|
|
21177
|
-
var ParameterLink = (0,
|
|
21620
|
+
var import_react138 = require("react");
|
|
21621
|
+
var import_jsx_runtime118 = require("@emotion/react/jsx-runtime");
|
|
21622
|
+
var ParameterLink = (0, import_react138.forwardRef)(
|
|
21178
21623
|
({ disabled: disabled2, onConnectLink, externalLink, ...props }, ref) => {
|
|
21179
21624
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21180
|
-
return /* @__PURE__ */ (0,
|
|
21625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21181
21626
|
ParameterShell,
|
|
21182
21627
|
{
|
|
21183
21628
|
"data-testid": "link-parameter-editor",
|
|
21184
21629
|
...shellProps,
|
|
21185
21630
|
label: innerProps.value ? shellProps.label : "",
|
|
21186
21631
|
title: !innerProps.value ? shellProps.label : void 0,
|
|
21187
|
-
children: /* @__PURE__ */ (0,
|
|
21632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21188
21633
|
ParameterLinkInner,
|
|
21189
21634
|
{
|
|
21190
21635
|
onConnectLink,
|
|
@@ -21197,13 +21642,13 @@ var ParameterLink = (0, import_react134.forwardRef)(
|
|
|
21197
21642
|
);
|
|
21198
21643
|
}
|
|
21199
21644
|
);
|
|
21200
|
-
var ParameterLinkInner = (0,
|
|
21645
|
+
var ParameterLinkInner = (0, import_react138.forwardRef)(
|
|
21201
21646
|
({ externalLink, onConnectLink, disabled: disabled2, buttonText = "Select link", ...props }, ref) => {
|
|
21202
21647
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
21203
21648
|
if (!props.value)
|
|
21204
|
-
return /* @__PURE__ */ (0,
|
|
21205
|
-
return /* @__PURE__ */ (0,
|
|
21206
|
-
/* @__PURE__ */ (0,
|
|
21649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("button", { type: "button", css: dataConnectButton, disabled: disabled2, onClick: onConnectLink, children: buttonText });
|
|
21650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { css: inputWrapper, children: [
|
|
21651
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21207
21652
|
"input",
|
|
21208
21653
|
{
|
|
21209
21654
|
type: "text",
|
|
@@ -21215,8 +21660,8 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21215
21660
|
...props
|
|
21216
21661
|
}
|
|
21217
21662
|
),
|
|
21218
|
-
/* @__PURE__ */ (0,
|
|
21219
|
-
/* @__PURE__ */ (0,
|
|
21663
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { css: linkParameterControls, children: [
|
|
21664
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21220
21665
|
"button",
|
|
21221
21666
|
{
|
|
21222
21667
|
type: "button",
|
|
@@ -21227,7 +21672,7 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21227
21672
|
children: "edit"
|
|
21228
21673
|
}
|
|
21229
21674
|
),
|
|
21230
|
-
externalLink ? /* @__PURE__ */ (0,
|
|
21675
|
+
externalLink ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
21231
21676
|
"a",
|
|
21232
21677
|
{
|
|
21233
21678
|
href: externalLink,
|
|
@@ -21235,7 +21680,7 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21235
21680
|
title: "Open link in new tab",
|
|
21236
21681
|
target: "_blank",
|
|
21237
21682
|
rel: "noopener noreferrer",
|
|
21238
|
-
children: /* @__PURE__ */ (0,
|
|
21683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Icon, { icon: "arrows-expand-up-right", iconColor: "currentColor", size: "1rem" })
|
|
21239
21684
|
}
|
|
21240
21685
|
) : null
|
|
21241
21686
|
] })
|
|
@@ -21245,15 +21690,15 @@ var ParameterLinkInner = (0, import_react134.forwardRef)(
|
|
|
21245
21690
|
|
|
21246
21691
|
// src/components/ParameterInputs/ParameterMultiSelect.tsx
|
|
21247
21692
|
init_emotion_jsx_shim();
|
|
21248
|
-
var
|
|
21693
|
+
var import_jsx_runtime119 = require("@emotion/react/jsx-runtime");
|
|
21249
21694
|
var ParameterMultiSelect = ({ disabled: disabled2 = false, ...props }) => {
|
|
21250
21695
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
21251
|
-
return /* @__PURE__ */ (0,
|
|
21696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(ParameterMultiSelectInner, { isDisabled: disabled2, ...innerProps }) });
|
|
21252
21697
|
};
|
|
21253
21698
|
var ParameterMultiSelectInner = (props) => {
|
|
21254
21699
|
var _a;
|
|
21255
21700
|
const { id, label } = useParameterShell();
|
|
21256
|
-
return /* @__PURE__ */ (0,
|
|
21701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
21257
21702
|
InputComboBox,
|
|
21258
21703
|
{
|
|
21259
21704
|
menuPortalTarget: document.body,
|
|
@@ -21304,7 +21749,7 @@ var ParameterMultiSelectInner = (props) => {
|
|
|
21304
21749
|
|
|
21305
21750
|
// src/components/ParameterInputs/ParameterNameAndPublicIdInput.tsx
|
|
21306
21751
|
init_emotion_jsx_shim();
|
|
21307
|
-
var
|
|
21752
|
+
var import_jsx_runtime120 = require("@emotion/react/jsx-runtime");
|
|
21308
21753
|
var ParameterNameAndPublicIdInput = ({
|
|
21309
21754
|
id,
|
|
21310
21755
|
onBlur,
|
|
@@ -21330,8 +21775,8 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21330
21775
|
navigator.clipboard.writeText(values[publicIdFieldName]);
|
|
21331
21776
|
};
|
|
21332
21777
|
autoFocus == null ? void 0 : autoFocus();
|
|
21333
|
-
return /* @__PURE__ */ (0,
|
|
21334
|
-
/* @__PURE__ */ (0,
|
|
21778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
21779
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21335
21780
|
ParameterInput,
|
|
21336
21781
|
{
|
|
21337
21782
|
id: nameIdField,
|
|
@@ -21350,7 +21795,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21350
21795
|
value: values[nameIdField]
|
|
21351
21796
|
}
|
|
21352
21797
|
),
|
|
21353
|
-
/* @__PURE__ */ (0,
|
|
21798
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21354
21799
|
ParameterInput,
|
|
21355
21800
|
{
|
|
21356
21801
|
id: publicIdFieldName,
|
|
@@ -21364,11 +21809,11 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21364
21809
|
caption: !publicIdError ? publicIdCaption : void 0,
|
|
21365
21810
|
placeholder: publicIdPlaceholderText,
|
|
21366
21811
|
errorMessage: publicIdError,
|
|
21367
|
-
menuItems: /* @__PURE__ */ (0,
|
|
21812
|
+
menuItems: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
21368
21813
|
MenuItem,
|
|
21369
21814
|
{
|
|
21370
21815
|
disabled: !values[publicIdFieldName],
|
|
21371
|
-
icon: /* @__PURE__ */ (0,
|
|
21816
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon, { icon: "path-trim", iconColor: "currentColor" }),
|
|
21372
21817
|
onClick: handleCopyPidFieldValue,
|
|
21373
21818
|
children: "Copy"
|
|
21374
21819
|
}
|
|
@@ -21376,13 +21821,13 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
21376
21821
|
value: values[publicIdFieldName]
|
|
21377
21822
|
}
|
|
21378
21823
|
),
|
|
21379
|
-
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0,
|
|
21824
|
+
(warnOverLength == null ? void 0 : warnOverLength.length) && values[publicIdFieldName].length > warnOverLength.length ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Callout, { type: "caution", children: warnOverLength.message }) : null
|
|
21380
21825
|
] });
|
|
21381
21826
|
};
|
|
21382
21827
|
|
|
21383
21828
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21384
21829
|
init_emotion_jsx_shim();
|
|
21385
|
-
var
|
|
21830
|
+
var import_react145 = require("@emotion/react");
|
|
21386
21831
|
var import_list3 = require("@lexical/list");
|
|
21387
21832
|
var import_markdown = require("@lexical/markdown");
|
|
21388
21833
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -21489,7 +21934,7 @@ var getLabelForElement = (type) => {
|
|
|
21489
21934
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
21490
21935
|
var import_fast_equals2 = require("fast-equals");
|
|
21491
21936
|
var import_lexical6 = require("lexical");
|
|
21492
|
-
var
|
|
21937
|
+
var import_react146 = require("react");
|
|
21493
21938
|
|
|
21494
21939
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
21495
21940
|
init_emotion_jsx_shim();
|
|
@@ -21510,13 +21955,13 @@ CustomCodeNode.importDOM = function() {
|
|
|
21510
21955
|
// src/components/ParameterInputs/rich-text/DisableStylesPlugin.ts
|
|
21511
21956
|
init_emotion_jsx_shim();
|
|
21512
21957
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
21513
|
-
var
|
|
21958
|
+
var import_utils3 = require("@lexical/utils");
|
|
21514
21959
|
var import_lexical = require("lexical");
|
|
21515
|
-
var
|
|
21960
|
+
var import_react139 = require("react");
|
|
21516
21961
|
function DisableStylesPlugin() {
|
|
21517
21962
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
21518
|
-
(0,
|
|
21519
|
-
return (0,
|
|
21963
|
+
(0, import_react139.useEffect)(() => {
|
|
21964
|
+
return (0, import_utils3.mergeRegister)(
|
|
21520
21965
|
// Disable text alignment on paragraph nodes
|
|
21521
21966
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
21522
21967
|
if (node.getFormatType() !== "") {
|
|
@@ -21710,13 +22155,13 @@ var codeElement = import_css2.css`
|
|
|
21710
22155
|
|
|
21711
22156
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21712
22157
|
init_emotion_jsx_shim();
|
|
21713
|
-
var
|
|
22158
|
+
var import_react140 = require("@emotion/react");
|
|
21714
22159
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
21715
22160
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
21716
|
-
var
|
|
22161
|
+
var import_utils4 = require("@lexical/utils");
|
|
21717
22162
|
var import_fast_equals = require("fast-equals");
|
|
21718
22163
|
var import_lexical3 = require("lexical");
|
|
21719
|
-
var
|
|
22164
|
+
var import_react141 = require("react");
|
|
21720
22165
|
|
|
21721
22166
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
21722
22167
|
init_emotion_jsx_shim();
|
|
@@ -21734,8 +22179,7 @@ var getElementNodesInSelection = (selection) => {
|
|
|
21734
22179
|
};
|
|
21735
22180
|
var getAncestor = (node, predicate) => {
|
|
21736
22181
|
let parent = node;
|
|
21737
|
-
while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent))
|
|
21738
|
-
;
|
|
22182
|
+
while (parent !== null && (parent = parent.getParent()) !== null && !predicate(parent)) ;
|
|
21739
22183
|
return parent;
|
|
21740
22184
|
};
|
|
21741
22185
|
var getSelectedNode = (selection) => {
|
|
@@ -21755,7 +22199,7 @@ var getSelectedNode = (selection) => {
|
|
|
21755
22199
|
};
|
|
21756
22200
|
|
|
21757
22201
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
21758
|
-
var
|
|
22202
|
+
var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
|
|
21759
22203
|
var isProjectMapLinkValue = (value) => {
|
|
21760
22204
|
return (value == null ? void 0 : value.type) === "projectMapNode" && Boolean(
|
|
21761
22205
|
value.nodeId && value.path && value.projectMapId
|
|
@@ -21778,7 +22222,7 @@ var guessLinkTypeFromPath = (path) => {
|
|
|
21778
22222
|
};
|
|
21779
22223
|
function convertAnchorElement(domNode) {
|
|
21780
22224
|
let node = null;
|
|
21781
|
-
if (!(0,
|
|
22225
|
+
if (!(0, import_utils4.isHTMLAnchorElement)(domNode)) {
|
|
21782
22226
|
return { node };
|
|
21783
22227
|
}
|
|
21784
22228
|
const textContent = domNode.textContent;
|
|
@@ -21887,7 +22331,7 @@ var LinkNode = class _LinkNode extends import_lexical3.ElementNode {
|
|
|
21887
22331
|
element.setAttribute("href", `mailto:${this.__link.path}`);
|
|
21888
22332
|
}
|
|
21889
22333
|
}
|
|
21890
|
-
(0,
|
|
22334
|
+
(0, import_utils4.addClassNamesToElement)(element, config.theme.link);
|
|
21891
22335
|
return element;
|
|
21892
22336
|
}
|
|
21893
22337
|
updateDOM(prevNode, a) {
|
|
@@ -22042,16 +22486,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
22042
22486
|
);
|
|
22043
22487
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
22044
22488
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
22045
|
-
var linkPopover =
|
|
22489
|
+
var linkPopover = import_react140.css`
|
|
22046
22490
|
position: absolute;
|
|
22047
22491
|
z-index: 5;
|
|
22048
22492
|
`;
|
|
22049
|
-
var linkPopoverContainer =
|
|
22493
|
+
var linkPopoverContainer = import_react140.css`
|
|
22050
22494
|
${Popover};
|
|
22051
22495
|
align-items: center;
|
|
22052
22496
|
display: flex;
|
|
22053
22497
|
`;
|
|
22054
|
-
var linkPopoverAnchor =
|
|
22498
|
+
var linkPopoverAnchor = import_react140.css`
|
|
22055
22499
|
${link}
|
|
22056
22500
|
${linkColorDefault}
|
|
22057
22501
|
`;
|
|
@@ -22060,21 +22504,21 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22060
22504
|
return path;
|
|
22061
22505
|
};
|
|
22062
22506
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
22063
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
22064
|
-
const linkPopoverElRef = (0,
|
|
22065
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
22066
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
22067
|
-
(0,
|
|
22507
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react141.useState)();
|
|
22508
|
+
const linkPopoverElRef = (0, import_react141.useRef)(null);
|
|
22509
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react141.useState)(false);
|
|
22510
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react141.useState)(false);
|
|
22511
|
+
(0, import_react141.useEffect)(() => {
|
|
22068
22512
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
22069
22513
|
setLinkPopoverState(void 0);
|
|
22070
22514
|
return;
|
|
22071
22515
|
}
|
|
22072
22516
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
22073
|
-
(0,
|
|
22517
|
+
(0, import_react141.useEffect)(() => {
|
|
22074
22518
|
if (!editor.hasNodes([LinkNode])) {
|
|
22075
22519
|
throw new Error("LinkNode not registered on editor");
|
|
22076
22520
|
}
|
|
22077
|
-
return (0,
|
|
22521
|
+
return (0, import_utils4.mergeRegister)(
|
|
22078
22522
|
editor.registerCommand(
|
|
22079
22523
|
UPSERT_LINK_NODE_COMMAND,
|
|
22080
22524
|
(payload) => {
|
|
@@ -22139,7 +22583,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22139
22583
|
)
|
|
22140
22584
|
);
|
|
22141
22585
|
}, [editor, onConnectLink]);
|
|
22142
|
-
const maybeShowLinkToolbar = (0,
|
|
22586
|
+
const maybeShowLinkToolbar = (0, import_react141.useCallback)(() => {
|
|
22143
22587
|
if (!editor.isEditable()) {
|
|
22144
22588
|
return;
|
|
22145
22589
|
}
|
|
@@ -22171,7 +22615,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22171
22615
|
}
|
|
22172
22616
|
});
|
|
22173
22617
|
}, [editor]);
|
|
22174
|
-
(0,
|
|
22618
|
+
(0, import_react141.useEffect)(() => {
|
|
22175
22619
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22176
22620
|
requestAnimationFrame(() => {
|
|
22177
22621
|
editorState.read(() => {
|
|
@@ -22198,8 +22642,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22198
22642
|
});
|
|
22199
22643
|
});
|
|
22200
22644
|
};
|
|
22201
|
-
return /* @__PURE__ */ (0,
|
|
22202
|
-
/* @__PURE__ */ (0,
|
|
22645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
|
|
22646
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22203
22647
|
import_LexicalNodeEventPlugin.NodeEventPlugin,
|
|
22204
22648
|
{
|
|
22205
22649
|
nodeType: LinkNode,
|
|
@@ -22209,7 +22653,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22209
22653
|
}
|
|
22210
22654
|
}
|
|
22211
22655
|
),
|
|
22212
|
-
linkPopoverState ? /* @__PURE__ */ (0,
|
|
22656
|
+
linkPopoverState ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22213
22657
|
"div",
|
|
22214
22658
|
{
|
|
22215
22659
|
css: linkPopover,
|
|
@@ -22218,8 +22662,8 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22218
22662
|
top: linkPopoverState.position.y
|
|
22219
22663
|
},
|
|
22220
22664
|
ref: linkPopoverElRef,
|
|
22221
|
-
children: /* @__PURE__ */ (0,
|
|
22222
|
-
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0,
|
|
22665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { css: linkPopoverContainer, children: [
|
|
22666
|
+
linkPopoverState.node.__link.type === "projectMapNode" ? linkPopoverState.node.__link.path : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22223
22667
|
"a",
|
|
22224
22668
|
{
|
|
22225
22669
|
href: parsePath(
|
|
@@ -22231,7 +22675,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22231
22675
|
children: parsePath(linkPopoverState.node.__link.path)
|
|
22232
22676
|
}
|
|
22233
22677
|
),
|
|
22234
|
-
/* @__PURE__ */ (0,
|
|
22678
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
22235
22679
|
Button,
|
|
22236
22680
|
{
|
|
22237
22681
|
size: "xs",
|
|
@@ -22239,7 +22683,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
22239
22683
|
onEditLinkNode(linkPopoverState.node);
|
|
22240
22684
|
},
|
|
22241
22685
|
buttonType: "ghost",
|
|
22242
|
-
children: /* @__PURE__ */ (0,
|
|
22686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Icon, { icon: "pen", size: "1rem", title: "Edit link" })
|
|
22243
22687
|
}
|
|
22244
22688
|
)
|
|
22245
22689
|
] })
|
|
@@ -22259,8 +22703,8 @@ var import_list = require("@lexical/list");
|
|
|
22259
22703
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
22260
22704
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
22261
22705
|
var import_lexical4 = require("lexical");
|
|
22262
|
-
var
|
|
22263
|
-
var
|
|
22706
|
+
var import_react142 = require("react");
|
|
22707
|
+
var import_jsx_runtime122 = require("@emotion/react/jsx-runtime");
|
|
22264
22708
|
function isIndentPermitted(maxDepth) {
|
|
22265
22709
|
const selection = (0, import_lexical4.$getSelection)();
|
|
22266
22710
|
if (!(0, import_lexical4.$isRangeSelection)(selection)) {
|
|
@@ -22283,29 +22727,29 @@ function isIndentPermitted(maxDepth) {
|
|
|
22283
22727
|
}
|
|
22284
22728
|
function ListIndentPlugin({ maxDepth }) {
|
|
22285
22729
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
22286
|
-
(0,
|
|
22730
|
+
(0, import_react142.useEffect)(() => {
|
|
22287
22731
|
return editor.registerCommand(
|
|
22288
22732
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
22289
22733
|
() => !isIndentPermitted(maxDepth),
|
|
22290
22734
|
import_lexical4.COMMAND_PRIORITY_CRITICAL
|
|
22291
22735
|
);
|
|
22292
22736
|
}, [editor, maxDepth]);
|
|
22293
|
-
return /* @__PURE__ */ (0,
|
|
22737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
|
|
22294
22738
|
}
|
|
22295
22739
|
|
|
22296
22740
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
22297
22741
|
init_emotion_jsx_shim();
|
|
22298
|
-
var
|
|
22742
|
+
var import_react143 = require("@emotion/react");
|
|
22299
22743
|
var import_code2 = require("@lexical/code");
|
|
22300
22744
|
var import_list2 = require("@lexical/list");
|
|
22301
22745
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
22302
22746
|
var import_rich_text = require("@lexical/rich-text");
|
|
22303
22747
|
var import_selection2 = require("@lexical/selection");
|
|
22304
|
-
var
|
|
22748
|
+
var import_utils7 = require("@lexical/utils");
|
|
22305
22749
|
var import_lexical5 = require("lexical");
|
|
22306
|
-
var
|
|
22307
|
-
var
|
|
22308
|
-
var toolbar =
|
|
22750
|
+
var import_react144 = require("react");
|
|
22751
|
+
var import_jsx_runtime123 = require("@emotion/react/jsx-runtime");
|
|
22752
|
+
var toolbar = import_react143.css`
|
|
22309
22753
|
background: var(--gray-50);
|
|
22310
22754
|
border-radius: var(--rounded-base);
|
|
22311
22755
|
display: flex;
|
|
@@ -22317,7 +22761,7 @@ var toolbar = import_react139.css`
|
|
|
22317
22761
|
top: calc(var(--spacing-sm) * -2);
|
|
22318
22762
|
z-index: 10;
|
|
22319
22763
|
`;
|
|
22320
|
-
var toolbarGroup =
|
|
22764
|
+
var toolbarGroup = import_react143.css`
|
|
22321
22765
|
display: flex;
|
|
22322
22766
|
gap: var(--spacing-xs);
|
|
22323
22767
|
position: relative;
|
|
@@ -22333,7 +22777,7 @@ var toolbarGroup = import_react139.css`
|
|
|
22333
22777
|
width: 1px;
|
|
22334
22778
|
}
|
|
22335
22779
|
`;
|
|
22336
|
-
var richTextToolbarButton =
|
|
22780
|
+
var richTextToolbarButton = import_react143.css`
|
|
22337
22781
|
align-items: center;
|
|
22338
22782
|
appearance: none;
|
|
22339
22783
|
border: 0;
|
|
@@ -22346,17 +22790,17 @@ var richTextToolbarButton = import_react139.css`
|
|
|
22346
22790
|
min-width: 32px;
|
|
22347
22791
|
padding: 0 var(--spacing-sm);
|
|
22348
22792
|
`;
|
|
22349
|
-
var richTextToolbarButtonActive =
|
|
22793
|
+
var richTextToolbarButtonActive = import_react143.css`
|
|
22350
22794
|
background: var(--gray-200);
|
|
22351
22795
|
`;
|
|
22352
|
-
var toolbarIcon =
|
|
22796
|
+
var toolbarIcon = import_react143.css`
|
|
22353
22797
|
color: inherit;
|
|
22354
22798
|
`;
|
|
22355
|
-
var toolbarChevron =
|
|
22799
|
+
var toolbarChevron = import_react143.css`
|
|
22356
22800
|
margin-left: var(--spacing-xs);
|
|
22357
22801
|
`;
|
|
22358
22802
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
22359
|
-
return /* @__PURE__ */ (0,
|
|
22803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
|
|
22360
22804
|
};
|
|
22361
22805
|
var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
|
|
22362
22806
|
["bold", "format-bold"],
|
|
@@ -22407,7 +22851,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22407
22851
|
}
|
|
22408
22852
|
});
|
|
22409
22853
|
};
|
|
22410
|
-
const updateToolbar = (0,
|
|
22854
|
+
const updateToolbar = (0, import_react144.useCallback)(() => {
|
|
22411
22855
|
const selection = (0, import_lexical5.$getSelection)();
|
|
22412
22856
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
22413
22857
|
return;
|
|
@@ -22420,7 +22864,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22420
22864
|
}
|
|
22421
22865
|
setActiveFormats(newActiveFormats);
|
|
22422
22866
|
const anchorNode = selection.anchor.getNode();
|
|
22423
|
-
let element = anchorNode.getKey() === "root" ? anchorNode : (0,
|
|
22867
|
+
let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils7.$findMatchingParent)(anchorNode, (e) => {
|
|
22424
22868
|
const parent = e.getParent();
|
|
22425
22869
|
return parent !== null && (0, import_lexical5.$isRootOrShadowRoot)(parent);
|
|
22426
22870
|
});
|
|
@@ -22431,7 +22875,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22431
22875
|
const elementDOM = editor.getElementByKey(elementKey);
|
|
22432
22876
|
if (elementDOM !== null) {
|
|
22433
22877
|
if ((0, import_list2.$isListNode)(element)) {
|
|
22434
|
-
const parentList = (0,
|
|
22878
|
+
const parentList = (0, import_utils7.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
|
|
22435
22879
|
const type = parentList ? parentList.getListType() : element.getListType();
|
|
22436
22880
|
setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
|
|
22437
22881
|
} else {
|
|
@@ -22446,7 +22890,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22446
22890
|
setIsLink(false);
|
|
22447
22891
|
}
|
|
22448
22892
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
22449
|
-
(0,
|
|
22893
|
+
(0, import_react144.useEffect)(() => {
|
|
22450
22894
|
return editor.registerCommand(
|
|
22451
22895
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
22452
22896
|
(_payload) => {
|
|
@@ -22456,7 +22900,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22456
22900
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
22457
22901
|
);
|
|
22458
22902
|
}, [editor, updateToolbar]);
|
|
22459
|
-
(0,
|
|
22903
|
+
(0, import_react144.useEffect)(() => {
|
|
22460
22904
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
22461
22905
|
requestAnimationFrame(() => {
|
|
22462
22906
|
editorState.read(() => {
|
|
@@ -22465,15 +22909,15 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22465
22909
|
});
|
|
22466
22910
|
});
|
|
22467
22911
|
}, [editor, updateToolbar]);
|
|
22468
|
-
return /* @__PURE__ */ (0,
|
|
22469
|
-
/* @__PURE__ */ (0,
|
|
22912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbar, children: [
|
|
22913
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
22470
22914
|
Menu,
|
|
22471
22915
|
{
|
|
22472
22916
|
menuLabel: "Elements",
|
|
22473
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22917
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("button", { css: richTextToolbarButton, title: "Text styles", children: [
|
|
22474
22918
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
22475
22919
|
" ",
|
|
22476
|
-
/* @__PURE__ */ (0,
|
|
22920
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
22477
22921
|
] }),
|
|
22478
22922
|
placement: "bottom-start",
|
|
22479
22923
|
children: [
|
|
@@ -22483,7 +22927,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22483
22927
|
type: "paragraph"
|
|
22484
22928
|
},
|
|
22485
22929
|
...visibleTextualElements
|
|
22486
|
-
].map((element) => /* @__PURE__ */ (0,
|
|
22930
|
+
].map((element) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22487
22931
|
MenuItem,
|
|
22488
22932
|
{
|
|
22489
22933
|
onClick: () => {
|
|
@@ -22493,12 +22937,12 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22493
22937
|
},
|
|
22494
22938
|
element.type
|
|
22495
22939
|
)),
|
|
22496
|
-
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0,
|
|
22940
|
+
visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
|
|
22497
22941
|
]
|
|
22498
22942
|
}
|
|
22499
22943
|
),
|
|
22500
|
-
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22501
|
-
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0,
|
|
22944
|
+
visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbarGroup, children: [
|
|
22945
|
+
visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22502
22946
|
"button",
|
|
22503
22947
|
{
|
|
22504
22948
|
onClick: () => {
|
|
@@ -22508,16 +22952,16 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22508
22952
|
richTextToolbarButton,
|
|
22509
22953
|
activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
|
|
22510
22954
|
],
|
|
22511
|
-
children: /* @__PURE__ */ (0,
|
|
22955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
|
|
22512
22956
|
}
|
|
22513
22957
|
) }, format.type)),
|
|
22514
|
-
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0,
|
|
22958
|
+
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22515
22959
|
Menu,
|
|
22516
22960
|
{
|
|
22517
22961
|
menuLabel: "Alternative text styles",
|
|
22518
|
-
menuTrigger: /* @__PURE__ */ (0,
|
|
22962
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
22519
22963
|
placement: "bottom-start",
|
|
22520
|
-
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0,
|
|
22964
|
+
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22521
22965
|
MenuItem,
|
|
22522
22966
|
{
|
|
22523
22967
|
onClick: () => {
|
|
@@ -22530,19 +22974,19 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22530
22974
|
}
|
|
22531
22975
|
) : null
|
|
22532
22976
|
] }) : null,
|
|
22533
|
-
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0,
|
|
22534
|
-
linkElementVisible ? /* @__PURE__ */ (0,
|
|
22977
|
+
visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { css: toolbarGroup, children: [
|
|
22978
|
+
linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22535
22979
|
"button",
|
|
22536
22980
|
{
|
|
22537
22981
|
onClick: () => {
|
|
22538
22982
|
isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
|
|
22539
22983
|
},
|
|
22540
22984
|
css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
|
|
22541
|
-
children: /* @__PURE__ */ (0,
|
|
22985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "link" })
|
|
22542
22986
|
}
|
|
22543
22987
|
) }) : null,
|
|
22544
|
-
visibleLists.size > 0 ? /* @__PURE__ */ (0,
|
|
22545
|
-
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0,
|
|
22988
|
+
visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
22989
|
+
visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22546
22990
|
"button",
|
|
22547
22991
|
{
|
|
22548
22992
|
onClick: () => {
|
|
@@ -22552,10 +22996,10 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22552
22996
|
richTextToolbarButton,
|
|
22553
22997
|
activeElement === "unorderedList" ? richTextToolbarButtonActive : null
|
|
22554
22998
|
],
|
|
22555
|
-
children: /* @__PURE__ */ (0,
|
|
22999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
|
|
22556
23000
|
}
|
|
22557
23001
|
) }) : null,
|
|
22558
|
-
visibleLists.has("orderedList") ? /* @__PURE__ */ (0,
|
|
23002
|
+
visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22559
23003
|
"button",
|
|
22560
23004
|
{
|
|
22561
23005
|
onClick: () => {
|
|
@@ -22565,57 +23009,57 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
22565
23009
|
richTextToolbarButton,
|
|
22566
23010
|
activeElement === "orderedList" ? richTextToolbarButtonActive : null
|
|
22567
23011
|
],
|
|
22568
|
-
children: /* @__PURE__ */ (0,
|
|
23012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
|
|
22569
23013
|
}
|
|
22570
23014
|
) }) : null
|
|
22571
23015
|
] }) : null,
|
|
22572
|
-
quoteElementVisible ? /* @__PURE__ */ (0,
|
|
23016
|
+
quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22573
23017
|
"button",
|
|
22574
23018
|
{
|
|
22575
23019
|
onClick: () => {
|
|
22576
23020
|
activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
|
|
22577
23021
|
},
|
|
22578
23022
|
css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
|
|
22579
|
-
children: /* @__PURE__ */ (0,
|
|
23023
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "quote" })
|
|
22580
23024
|
}
|
|
22581
23025
|
) }) : null,
|
|
22582
|
-
codeElementVisible ? /* @__PURE__ */ (0,
|
|
23026
|
+
codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
22583
23027
|
"button",
|
|
22584
23028
|
{
|
|
22585
23029
|
onClick: () => {
|
|
22586
23030
|
activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
|
|
22587
23031
|
},
|
|
22588
23032
|
css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
|
|
22589
|
-
children: /* @__PURE__ */ (0,
|
|
23033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(RichTextToolbarIcon, { icon: "code-slash" })
|
|
22590
23034
|
}
|
|
22591
23035
|
) }) : null
|
|
22592
23036
|
] }) : null,
|
|
22593
|
-
customControls ? /* @__PURE__ */ (0,
|
|
23037
|
+
customControls ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { css: toolbarGroup, children: customControls }) : null
|
|
22594
23038
|
] });
|
|
22595
23039
|
};
|
|
22596
23040
|
var RichTextToolbar_default = RichTextToolbar;
|
|
22597
23041
|
var useRichTextToolbarState = ({ config }) => {
|
|
22598
23042
|
var _a;
|
|
22599
|
-
const enabledBuiltInFormats = (0,
|
|
23043
|
+
const enabledBuiltInFormats = (0, import_react144.useMemo)(() => {
|
|
22600
23044
|
return richTextBuiltInFormats.filter((format) => {
|
|
22601
23045
|
var _a2, _b;
|
|
22602
23046
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
22603
23047
|
});
|
|
22604
23048
|
}, [config]);
|
|
22605
|
-
const enabledBuiltInElements = (0,
|
|
23049
|
+
const enabledBuiltInElements = (0, import_react144.useMemo)(() => {
|
|
22606
23050
|
return richTextBuiltInElements.filter((element) => {
|
|
22607
23051
|
var _a2, _b;
|
|
22608
23052
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
22609
23053
|
});
|
|
22610
23054
|
}, [config]);
|
|
22611
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
23055
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react144.useMemo)(() => {
|
|
22612
23056
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
22613
23057
|
}, [enabledBuiltInFormats]);
|
|
22614
23058
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
22615
23059
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
22616
23060
|
);
|
|
22617
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
22618
|
-
const visibleFormatsWithIcon = (0,
|
|
23061
|
+
const [activeFormats, setActiveFormats] = (0, import_react144.useState)([]);
|
|
23062
|
+
const visibleFormatsWithIcon = (0, import_react144.useMemo)(() => {
|
|
22619
23063
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22620
23064
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22621
23065
|
visibleFormats.add(type);
|
|
@@ -22625,7 +23069,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22625
23069
|
});
|
|
22626
23070
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22627
23071
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
22628
|
-
const visibleFormatsWithoutIcon = (0,
|
|
23072
|
+
const visibleFormatsWithoutIcon = (0, import_react144.useMemo)(() => {
|
|
22629
23073
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
22630
23074
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
22631
23075
|
visibleFormats.add(type);
|
|
@@ -22635,11 +23079,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22635
23079
|
});
|
|
22636
23080
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
22637
23081
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
22638
|
-
const [activeElement, setActiveElement] = (0,
|
|
23082
|
+
const [activeElement, setActiveElement] = (0, import_react144.useState)("paragraph");
|
|
22639
23083
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
22640
23084
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
22641
23085
|
);
|
|
22642
|
-
const visibleTextualElements = (0,
|
|
23086
|
+
const visibleTextualElements = (0, import_react144.useMemo)(() => {
|
|
22643
23087
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
22644
23088
|
return enabledTextualElements;
|
|
22645
23089
|
}
|
|
@@ -22650,24 +23094,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22650
23094
|
}
|
|
22651
23095
|
);
|
|
22652
23096
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
22653
|
-
const [isLink, setIsLink] = (0,
|
|
22654
|
-
const linkElementVisible = (0,
|
|
23097
|
+
const [isLink, setIsLink] = (0, import_react144.useState)(false);
|
|
23098
|
+
const linkElementVisible = (0, import_react144.useMemo)(() => {
|
|
22655
23099
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
22656
23100
|
}, [isLink, enabledBuiltInElements]);
|
|
22657
|
-
const visibleLists = (0,
|
|
23101
|
+
const visibleLists = (0, import_react144.useMemo)(() => {
|
|
22658
23102
|
return new Set(
|
|
22659
23103
|
["orderedList", "unorderedList"].filter(
|
|
22660
23104
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
22661
23105
|
)
|
|
22662
23106
|
);
|
|
22663
23107
|
}, [activeElement, enabledBuiltInElements]);
|
|
22664
|
-
const quoteElementVisible = (0,
|
|
23108
|
+
const quoteElementVisible = (0, import_react144.useMemo)(() => {
|
|
22665
23109
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
22666
23110
|
}, [activeElement, enabledBuiltInElements]);
|
|
22667
|
-
const codeElementVisible = (0,
|
|
23111
|
+
const codeElementVisible = (0, import_react144.useMemo)(() => {
|
|
22668
23112
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
22669
23113
|
}, [activeElement, enabledBuiltInElements]);
|
|
22670
|
-
const visibleElementsWithIcons = (0,
|
|
23114
|
+
const visibleElementsWithIcons = (0, import_react144.useMemo)(() => {
|
|
22671
23115
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
22672
23116
|
if (linkElementVisible) {
|
|
22673
23117
|
visibleElements.add("link");
|
|
@@ -22704,7 +23148,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
22704
23148
|
};
|
|
22705
23149
|
|
|
22706
23150
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
22707
|
-
var
|
|
23151
|
+
var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
|
|
22708
23152
|
var ParameterRichText = ({
|
|
22709
23153
|
label,
|
|
22710
23154
|
labelLeadingIcon,
|
|
@@ -22729,7 +23173,7 @@ var ParameterRichText = ({
|
|
|
22729
23173
|
variables,
|
|
22730
23174
|
customControls
|
|
22731
23175
|
}) => {
|
|
22732
|
-
return /* @__PURE__ */ (0,
|
|
23176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
22733
23177
|
ParameterShell,
|
|
22734
23178
|
{
|
|
22735
23179
|
"data-testid": "parameter-richtext",
|
|
@@ -22743,7 +23187,7 @@ var ParameterRichText = ({
|
|
|
22743
23187
|
captionTestId,
|
|
22744
23188
|
menuItems,
|
|
22745
23189
|
children: [
|
|
22746
|
-
/* @__PURE__ */ (0,
|
|
23190
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22747
23191
|
ParameterRichTextInner,
|
|
22748
23192
|
{
|
|
22749
23193
|
value,
|
|
@@ -22761,23 +23205,23 @@ var ParameterRichText = ({
|
|
|
22761
23205
|
children
|
|
22762
23206
|
}
|
|
22763
23207
|
),
|
|
22764
|
-
menuItems ? /* @__PURE__ */ (0,
|
|
23208
|
+
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children: menuItems }) }) : null
|
|
22765
23209
|
]
|
|
22766
23210
|
}
|
|
22767
23211
|
);
|
|
22768
23212
|
};
|
|
22769
|
-
var editorWrapper =
|
|
23213
|
+
var editorWrapper = import_react145.css`
|
|
22770
23214
|
display: flex;
|
|
22771
23215
|
flex-flow: column;
|
|
22772
23216
|
flex-grow: 1;
|
|
22773
23217
|
`;
|
|
22774
|
-
var editorContainer =
|
|
23218
|
+
var editorContainer = import_react145.css`
|
|
22775
23219
|
display: flex;
|
|
22776
23220
|
flex-flow: column;
|
|
22777
23221
|
flex-grow: 1;
|
|
22778
23222
|
position: relative;
|
|
22779
23223
|
`;
|
|
22780
|
-
var editorPlaceholder =
|
|
23224
|
+
var editorPlaceholder = import_react145.css`
|
|
22781
23225
|
color: var(--gray-500);
|
|
22782
23226
|
font-style: italic;
|
|
22783
23227
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -22788,7 +23232,7 @@ var editorPlaceholder = import_react141.css`
|
|
|
22788
23232
|
top: var(--spacing-sm);
|
|
22789
23233
|
user-select: none;
|
|
22790
23234
|
`;
|
|
22791
|
-
var editorInput =
|
|
23235
|
+
var editorInput = import_react145.css`
|
|
22792
23236
|
background: var(--white);
|
|
22793
23237
|
border: 1px solid var(--gray-200);
|
|
22794
23238
|
border-radius: var(--rounded-sm);
|
|
@@ -22872,8 +23316,8 @@ var ParameterRichTextInner = ({
|
|
|
22872
23316
|
},
|
|
22873
23317
|
editable: !readOnly
|
|
22874
23318
|
};
|
|
22875
|
-
return /* @__PURE__ */ (0,
|
|
22876
|
-
/* @__PURE__ */ (0,
|
|
23319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
23320
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22877
23321
|
RichText,
|
|
22878
23322
|
{
|
|
22879
23323
|
onChange,
|
|
@@ -22910,14 +23354,14 @@ var RichText = ({
|
|
|
22910
23354
|
variables,
|
|
22911
23355
|
customControls
|
|
22912
23356
|
}) => {
|
|
22913
|
-
const editorContainerRef = (0,
|
|
23357
|
+
const editorContainerRef = (0, import_react146.useRef)(null);
|
|
22914
23358
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
22915
|
-
(0,
|
|
23359
|
+
(0, import_react146.useEffect)(() => {
|
|
22916
23360
|
if (onRichTextInit) {
|
|
22917
23361
|
onRichTextInit(editor);
|
|
22918
23362
|
}
|
|
22919
23363
|
}, [editor, onRichTextInit]);
|
|
22920
|
-
(0,
|
|
23364
|
+
(0, import_react146.useEffect)(() => {
|
|
22921
23365
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
22922
23366
|
requestAnimationFrame(() => {
|
|
22923
23367
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -22929,23 +23373,23 @@ var RichText = ({
|
|
|
22929
23373
|
removeUpdateListener();
|
|
22930
23374
|
};
|
|
22931
23375
|
}, [editor, onChange]);
|
|
22932
|
-
(0,
|
|
23376
|
+
(0, import_react146.useEffect)(() => {
|
|
22933
23377
|
editor.setEditable(!readOnly);
|
|
22934
23378
|
}, [editor, readOnly]);
|
|
22935
|
-
return /* @__PURE__ */ (0,
|
|
22936
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22937
|
-
/* @__PURE__ */ (0,
|
|
22938
|
-
/* @__PURE__ */ (0,
|
|
23379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
23380
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RichTextToolbar_default, { config, customControls }),
|
|
23381
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
|
|
23382
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22939
23383
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
22940
23384
|
{
|
|
22941
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
22942
|
-
placeholder: /* @__PURE__ */ (0,
|
|
23385
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
23386
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
|
|
22943
23387
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
22944
23388
|
}
|
|
22945
23389
|
),
|
|
22946
|
-
/* @__PURE__ */ (0,
|
|
22947
|
-
readOnly ? null : /* @__PURE__ */ (0,
|
|
22948
|
-
/* @__PURE__ */ (0,
|
|
23390
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
23391
|
+
readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
|
|
23392
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
22949
23393
|
LinkNodePlugin,
|
|
22950
23394
|
{
|
|
22951
23395
|
onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
|
|
@@ -22955,28 +23399,28 @@ var RichText = ({
|
|
|
22955
23399
|
} : void 0
|
|
22956
23400
|
}
|
|
22957
23401
|
),
|
|
22958
|
-
/* @__PURE__ */ (0,
|
|
22959
|
-
/* @__PURE__ */ (0,
|
|
22960
|
-
/* @__PURE__ */ (0,
|
|
22961
|
-
/* @__PURE__ */ (0,
|
|
23402
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ListIndentPlugin, { maxDepth: 4 }),
|
|
23403
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DisableStylesPlugin, {}),
|
|
23404
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
|
|
23405
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children })
|
|
22962
23406
|
] })
|
|
22963
23407
|
] });
|
|
22964
23408
|
};
|
|
22965
23409
|
|
|
22966
23410
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
22967
23411
|
init_emotion_jsx_shim();
|
|
22968
|
-
var
|
|
22969
|
-
var
|
|
22970
|
-
var ParameterSelect = (0,
|
|
23412
|
+
var import_react147 = require("react");
|
|
23413
|
+
var import_jsx_runtime125 = require("@emotion/react/jsx-runtime");
|
|
23414
|
+
var ParameterSelect = (0, import_react147.forwardRef)(
|
|
22971
23415
|
({ defaultOption, options, ...props }, ref) => {
|
|
22972
23416
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
22973
|
-
return /* @__PURE__ */ (0,
|
|
23417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
22974
23418
|
}
|
|
22975
23419
|
);
|
|
22976
|
-
var ParameterSelectInner = (0,
|
|
23420
|
+
var ParameterSelectInner = (0, import_react147.forwardRef)(
|
|
22977
23421
|
({ defaultOption, options, ...props }, ref) => {
|
|
22978
23422
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
22979
|
-
return /* @__PURE__ */ (0,
|
|
23423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
22980
23424
|
"select",
|
|
22981
23425
|
{
|
|
22982
23426
|
css: [input3, selectInput],
|
|
@@ -22985,10 +23429,10 @@ var ParameterSelectInner = (0, import_react143.forwardRef)(
|
|
|
22985
23429
|
ref,
|
|
22986
23430
|
...props,
|
|
22987
23431
|
children: [
|
|
22988
|
-
defaultOption ? /* @__PURE__ */ (0,
|
|
23432
|
+
defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("option", { value: "", children: defaultOption }) : null,
|
|
22989
23433
|
options.map((option) => {
|
|
22990
23434
|
var _a;
|
|
22991
|
-
return /* @__PURE__ */ (0,
|
|
23435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
|
|
22992
23436
|
})
|
|
22993
23437
|
]
|
|
22994
23438
|
}
|
|
@@ -22998,15 +23442,15 @@ var ParameterSelectInner = (0, import_react143.forwardRef)(
|
|
|
22998
23442
|
|
|
22999
23443
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
23000
23444
|
init_emotion_jsx_shim();
|
|
23001
|
-
var
|
|
23002
|
-
var
|
|
23003
|
-
var ParameterTextarea = (0,
|
|
23445
|
+
var import_react148 = require("react");
|
|
23446
|
+
var import_jsx_runtime126 = require("@emotion/react/jsx-runtime");
|
|
23447
|
+
var ParameterTextarea = (0, import_react148.forwardRef)((props, ref) => {
|
|
23004
23448
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23005
|
-
return /* @__PURE__ */ (0,
|
|
23449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
23006
23450
|
});
|
|
23007
|
-
var ParameterTextareaInner = (0,
|
|
23451
|
+
var ParameterTextareaInner = (0, import_react148.forwardRef)(({ ...props }, ref) => {
|
|
23008
23452
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
23009
|
-
return /* @__PURE__ */ (0,
|
|
23453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
23010
23454
|
"textarea",
|
|
23011
23455
|
{
|
|
23012
23456
|
css: [input3, textarea2],
|
|
@@ -23020,18 +23464,18 @@ var ParameterTextareaInner = (0, import_react144.forwardRef)(({ ...props }, ref)
|
|
|
23020
23464
|
|
|
23021
23465
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
23022
23466
|
init_emotion_jsx_shim();
|
|
23023
|
-
var
|
|
23024
|
-
var
|
|
23025
|
-
var ParameterToggle = (0,
|
|
23467
|
+
var import_react149 = require("react");
|
|
23468
|
+
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
23469
|
+
var ParameterToggle = (0, import_react149.forwardRef)((props, ref) => {
|
|
23026
23470
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
23027
|
-
return /* @__PURE__ */ (0,
|
|
23471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
23028
23472
|
});
|
|
23029
|
-
var ParameterToggleInner = (0,
|
|
23473
|
+
var ParameterToggleInner = (0, import_react149.forwardRef)(
|
|
23030
23474
|
({ children, ...props }, ref) => {
|
|
23031
23475
|
const { id, label } = useParameterShell();
|
|
23032
|
-
return /* @__PURE__ */ (0,
|
|
23033
|
-
/* @__PURE__ */ (0,
|
|
23034
|
-
/* @__PURE__ */ (0,
|
|
23476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
23477
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
|
|
23478
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { css: inlineLabel2, children: label }),
|
|
23035
23479
|
children
|
|
23036
23480
|
] });
|
|
23037
23481
|
}
|
|
@@ -23042,8 +23486,8 @@ init_emotion_jsx_shim();
|
|
|
23042
23486
|
|
|
23043
23487
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
23044
23488
|
init_emotion_jsx_shim();
|
|
23045
|
-
var
|
|
23046
|
-
var container3 =
|
|
23489
|
+
var import_react150 = require("@emotion/react");
|
|
23490
|
+
var container3 = import_react150.css`
|
|
23047
23491
|
background: var(--gray-50);
|
|
23048
23492
|
margin-block: var(--spacing-sm);
|
|
23049
23493
|
position: relative;
|
|
@@ -23053,17 +23497,17 @@ var container3 = import_react146.css`
|
|
|
23053
23497
|
border: solid 1px var(--gray-300);
|
|
23054
23498
|
`;
|
|
23055
23499
|
var themeMap = {
|
|
23056
|
-
primary:
|
|
23500
|
+
primary: import_react150.css`
|
|
23057
23501
|
--progress-color: var(--accent-light);
|
|
23058
23502
|
`,
|
|
23059
|
-
secondary:
|
|
23503
|
+
secondary: import_react150.css`
|
|
23060
23504
|
--progress-color: var(--accent-alt-light);
|
|
23061
23505
|
`,
|
|
23062
|
-
destructive:
|
|
23506
|
+
destructive: import_react150.css`
|
|
23063
23507
|
--progress-color: var(--brand-secondary-5);
|
|
23064
23508
|
`
|
|
23065
23509
|
};
|
|
23066
|
-
var slidingBackgroundPosition =
|
|
23510
|
+
var slidingBackgroundPosition = import_react150.keyframes`
|
|
23067
23511
|
from {
|
|
23068
23512
|
background-position: 0 0;
|
|
23069
23513
|
}
|
|
@@ -23071,10 +23515,10 @@ var slidingBackgroundPosition = import_react146.keyframes`
|
|
|
23071
23515
|
background-position: 64px 0;
|
|
23072
23516
|
}
|
|
23073
23517
|
`;
|
|
23074
|
-
var determinate =
|
|
23518
|
+
var determinate = import_react150.css`
|
|
23075
23519
|
background-color: var(--progress-color);
|
|
23076
23520
|
`;
|
|
23077
|
-
var indeterminate =
|
|
23521
|
+
var indeterminate = import_react150.css`
|
|
23078
23522
|
background-image: linear-gradient(
|
|
23079
23523
|
45deg,
|
|
23080
23524
|
var(--progress-color) 25%,
|
|
@@ -23088,7 +23532,7 @@ var indeterminate = import_react146.css`
|
|
|
23088
23532
|
background-size: 64px 64px;
|
|
23089
23533
|
animation: ${slidingBackgroundPosition} 1s linear infinite;
|
|
23090
23534
|
`;
|
|
23091
|
-
var bar =
|
|
23535
|
+
var bar = import_react150.css`
|
|
23092
23536
|
position: absolute;
|
|
23093
23537
|
inset: 0;
|
|
23094
23538
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -23096,7 +23540,7 @@ var bar = import_react146.css`
|
|
|
23096
23540
|
`;
|
|
23097
23541
|
|
|
23098
23542
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
23099
|
-
var
|
|
23543
|
+
var import_jsx_runtime128 = require("@emotion/react/jsx-runtime");
|
|
23100
23544
|
function ProgressBar({
|
|
23101
23545
|
current,
|
|
23102
23546
|
max,
|
|
@@ -23106,7 +23550,7 @@ function ProgressBar({
|
|
|
23106
23550
|
}) {
|
|
23107
23551
|
const valueNow = Math.min(current, max);
|
|
23108
23552
|
const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
|
|
23109
|
-
return /* @__PURE__ */ (0,
|
|
23553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
23110
23554
|
"div",
|
|
23111
23555
|
{
|
|
23112
23556
|
css: container3,
|
|
@@ -23117,7 +23561,7 @@ function ProgressBar({
|
|
|
23117
23561
|
"aria-valuemax": max,
|
|
23118
23562
|
"aria-valuenow": valueNow,
|
|
23119
23563
|
...props,
|
|
23120
|
-
children: /* @__PURE__ */ (0,
|
|
23564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
23121
23565
|
"div",
|
|
23122
23566
|
{
|
|
23123
23567
|
css: [
|
|
@@ -23137,31 +23581,31 @@ function ProgressBar({
|
|
|
23137
23581
|
|
|
23138
23582
|
// src/components/ProgressList/ProgressList.tsx
|
|
23139
23583
|
init_emotion_jsx_shim();
|
|
23140
|
-
var
|
|
23584
|
+
var import_react152 = require("@emotion/react");
|
|
23141
23585
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
23142
23586
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
23143
23587
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
23144
|
-
var
|
|
23588
|
+
var import_react153 = require("react");
|
|
23145
23589
|
|
|
23146
23590
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
23147
23591
|
init_emotion_jsx_shim();
|
|
23148
|
-
var
|
|
23149
|
-
var progressListStyles =
|
|
23592
|
+
var import_react151 = require("@emotion/react");
|
|
23593
|
+
var progressListStyles = import_react151.css`
|
|
23150
23594
|
display: flex;
|
|
23151
23595
|
flex-direction: column;
|
|
23152
23596
|
gap: var(--spacing-sm);
|
|
23153
23597
|
list-style-type: none;
|
|
23154
23598
|
`;
|
|
23155
|
-
var progressListItemStyles =
|
|
23599
|
+
var progressListItemStyles = import_react151.css`
|
|
23156
23600
|
display: flex;
|
|
23157
23601
|
gap: var(--spacing-base);
|
|
23158
23602
|
align-items: center;
|
|
23159
23603
|
`;
|
|
23160
23604
|
|
|
23161
23605
|
// src/components/ProgressList/ProgressList.tsx
|
|
23162
|
-
var
|
|
23606
|
+
var import_jsx_runtime129 = require("@emotion/react/jsx-runtime");
|
|
23163
23607
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
23164
|
-
const itemsWithStatus = (0,
|
|
23608
|
+
const itemsWithStatus = (0, import_react153.useMemo)(() => {
|
|
23165
23609
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
23166
23610
|
return items.map((item, index) => {
|
|
23167
23611
|
let status = "queued";
|
|
@@ -23173,8 +23617,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
|
23173
23617
|
return { ...item, status };
|
|
23174
23618
|
});
|
|
23175
23619
|
}, [items, inProgressId]);
|
|
23176
|
-
return /* @__PURE__ */ (0,
|
|
23177
|
-
return /* @__PURE__ */ (0,
|
|
23620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
|
|
23621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
23178
23622
|
ProgressListItem,
|
|
23179
23623
|
{
|
|
23180
23624
|
status,
|
|
@@ -23194,7 +23638,7 @@ var ProgressListItem = ({
|
|
|
23194
23638
|
errorLevel = "danger",
|
|
23195
23639
|
autoEllipsis = false
|
|
23196
23640
|
}) => {
|
|
23197
|
-
const icon = (0,
|
|
23641
|
+
const icon = (0, import_react153.useMemo)(() => {
|
|
23198
23642
|
if (error) {
|
|
23199
23643
|
return warningIcon;
|
|
23200
23644
|
}
|
|
@@ -23205,14 +23649,14 @@ var ProgressListItem = ({
|
|
|
23205
23649
|
};
|
|
23206
23650
|
return iconPerStatus[status];
|
|
23207
23651
|
}, [status, error]);
|
|
23208
|
-
const statusStyles = (0,
|
|
23652
|
+
const statusStyles = (0, import_react153.useMemo)(() => {
|
|
23209
23653
|
if (error) {
|
|
23210
|
-
return errorLevel === "caution" ?
|
|
23654
|
+
return errorLevel === "caution" ? import_react152.css`
|
|
23211
23655
|
color: rgb(161, 98, 7);
|
|
23212
23656
|
& svg {
|
|
23213
23657
|
color: rgb(250, 204, 21);
|
|
23214
23658
|
}
|
|
23215
|
-
` :
|
|
23659
|
+
` : import_react152.css`
|
|
23216
23660
|
color: rgb(185, 28, 28);
|
|
23217
23661
|
& svg {
|
|
23218
23662
|
color: var(--brand-primary-2);
|
|
@@ -23220,40 +23664,40 @@ var ProgressListItem = ({
|
|
|
23220
23664
|
`;
|
|
23221
23665
|
}
|
|
23222
23666
|
const colorPerStatus = {
|
|
23223
|
-
completed:
|
|
23667
|
+
completed: import_react152.css`
|
|
23224
23668
|
opacity: 0.75;
|
|
23225
23669
|
`,
|
|
23226
|
-
inProgress:
|
|
23670
|
+
inProgress: import_react152.css`
|
|
23227
23671
|
-webkit-text-stroke-width: thin;
|
|
23228
23672
|
`,
|
|
23229
|
-
queued:
|
|
23673
|
+
queued: import_react152.css`
|
|
23230
23674
|
opacity: 0.5;
|
|
23231
23675
|
`
|
|
23232
23676
|
};
|
|
23233
23677
|
return colorPerStatus[status];
|
|
23234
23678
|
}, [status, error, errorLevel]);
|
|
23235
|
-
return /* @__PURE__ */ (0,
|
|
23236
|
-
/* @__PURE__ */ (0,
|
|
23237
|
-
/* @__PURE__ */ (0,
|
|
23679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
|
|
23680
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
|
|
23681
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { children: [
|
|
23238
23682
|
children,
|
|
23239
|
-
/* @__PURE__ */ (0,
|
|
23683
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
|
|
23240
23684
|
] })
|
|
23241
23685
|
] });
|
|
23242
23686
|
};
|
|
23243
23687
|
|
|
23244
23688
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23245
23689
|
init_emotion_jsx_shim();
|
|
23246
|
-
var
|
|
23690
|
+
var import_react155 = require("@emotion/react");
|
|
23247
23691
|
var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
|
|
23248
|
-
var
|
|
23692
|
+
var import_react156 = require("react");
|
|
23249
23693
|
|
|
23250
23694
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
23251
23695
|
init_emotion_jsx_shim();
|
|
23252
|
-
var
|
|
23253
|
-
var segmentedControlRootStyles =
|
|
23696
|
+
var import_react154 = require("@emotion/react");
|
|
23697
|
+
var segmentedControlRootStyles = import_react154.css`
|
|
23254
23698
|
position: relative;
|
|
23255
23699
|
`;
|
|
23256
|
-
var segmentedControlScrollIndicatorsStyles =
|
|
23700
|
+
var segmentedControlScrollIndicatorsStyles = import_react154.css`
|
|
23257
23701
|
position: absolute;
|
|
23258
23702
|
inset: 0;
|
|
23259
23703
|
z-index: 1;
|
|
@@ -23281,17 +23725,17 @@ var segmentedControlScrollIndicatorsStyles = import_react150.css`
|
|
|
23281
23725
|
background: linear-gradient(to left, var(--background-color) 10%, transparent);
|
|
23282
23726
|
}
|
|
23283
23727
|
`;
|
|
23284
|
-
var segmentedControlScrollIndicatorStartVisibleStyles =
|
|
23728
|
+
var segmentedControlScrollIndicatorStartVisibleStyles = import_react154.css`
|
|
23285
23729
|
&::before {
|
|
23286
23730
|
opacity: 1;
|
|
23287
23731
|
}
|
|
23288
23732
|
`;
|
|
23289
|
-
var segmentedControlScrollIndicatorEndVisibleStyles =
|
|
23733
|
+
var segmentedControlScrollIndicatorEndVisibleStyles = import_react154.css`
|
|
23290
23734
|
&::after {
|
|
23291
23735
|
opacity: 1;
|
|
23292
23736
|
}
|
|
23293
23737
|
`;
|
|
23294
|
-
var segmentedControlWrapperStyles =
|
|
23738
|
+
var segmentedControlWrapperStyles = import_react154.css`
|
|
23295
23739
|
overflow-y: auto;
|
|
23296
23740
|
scroll-behavior: smooth;
|
|
23297
23741
|
scrollbar-width: none;
|
|
@@ -23300,7 +23744,7 @@ var segmentedControlWrapperStyles = import_react150.css`
|
|
|
23300
23744
|
height: 0px;
|
|
23301
23745
|
}
|
|
23302
23746
|
`;
|
|
23303
|
-
var segmentedControlStyles =
|
|
23747
|
+
var segmentedControlStyles = import_react154.css`
|
|
23304
23748
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
23305
23749
|
--segmented-control-border-width: 1px;
|
|
23306
23750
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -23319,14 +23763,14 @@ var segmentedControlStyles = import_react150.css`
|
|
|
23319
23763
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
23320
23764
|
font-size: var(--fs-xs);
|
|
23321
23765
|
`;
|
|
23322
|
-
var segmentedControlVerticalStyles =
|
|
23766
|
+
var segmentedControlVerticalStyles = import_react154.css`
|
|
23323
23767
|
flex-direction: column;
|
|
23324
23768
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
23325
23769
|
var(--segmented-control-rounded-value) 0 0;
|
|
23326
23770
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
23327
23771
|
var(--segmented-control-rounded-value);
|
|
23328
23772
|
`;
|
|
23329
|
-
var segmentedControlItemStyles =
|
|
23773
|
+
var segmentedControlItemStyles = import_react154.css`
|
|
23330
23774
|
&:first-of-type label {
|
|
23331
23775
|
border-radius: var(--segmented-control-first-border-radius);
|
|
23332
23776
|
}
|
|
@@ -23334,10 +23778,10 @@ var segmentedControlItemStyles = import_react150.css`
|
|
|
23334
23778
|
border-radius: var(--segmented-control-last-border-radius);
|
|
23335
23779
|
}
|
|
23336
23780
|
`;
|
|
23337
|
-
var segmentedControlInputStyles =
|
|
23781
|
+
var segmentedControlInputStyles = import_react154.css`
|
|
23338
23782
|
${accessibleHidden}
|
|
23339
23783
|
`;
|
|
23340
|
-
var segmentedControlLabelStyles = (checked, disabled2) =>
|
|
23784
|
+
var segmentedControlLabelStyles = (checked, disabled2) => import_react154.css`
|
|
23341
23785
|
position: relative;
|
|
23342
23786
|
display: flex;
|
|
23343
23787
|
align-items: center;
|
|
@@ -23404,25 +23848,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react150.css`
|
|
|
23404
23848
|
`}
|
|
23405
23849
|
}
|
|
23406
23850
|
`;
|
|
23407
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
23851
|
+
var segmentedControlLabelIconOnlyStyles = import_react154.css`
|
|
23408
23852
|
padding-inline: 0.5em;
|
|
23409
23853
|
`;
|
|
23410
|
-
var segmentedControlLabelCheckStyles =
|
|
23854
|
+
var segmentedControlLabelCheckStyles = import_react154.css`
|
|
23411
23855
|
opacity: 0.5;
|
|
23412
23856
|
`;
|
|
23413
|
-
var segmentedControlLabelContentStyles =
|
|
23857
|
+
var segmentedControlLabelContentStyles = import_react154.css`
|
|
23414
23858
|
display: flex;
|
|
23415
23859
|
align-items: center;
|
|
23416
23860
|
justify-content: center;
|
|
23417
23861
|
gap: var(--spacing-sm);
|
|
23418
23862
|
height: 100%;
|
|
23419
23863
|
`;
|
|
23420
|
-
var segmentedControlLabelTextStyles =
|
|
23864
|
+
var segmentedControlLabelTextStyles = import_react154.css`
|
|
23421
23865
|
white-space: nowrap;
|
|
23422
23866
|
`;
|
|
23423
23867
|
|
|
23424
23868
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
23425
|
-
var
|
|
23869
|
+
var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
|
|
23426
23870
|
var SegmentedControl = ({
|
|
23427
23871
|
name,
|
|
23428
23872
|
options,
|
|
@@ -23437,10 +23881,10 @@ var SegmentedControl = ({
|
|
|
23437
23881
|
currentBackgroundColor = "white",
|
|
23438
23882
|
...props
|
|
23439
23883
|
}) => {
|
|
23440
|
-
const wrapperRef = (0,
|
|
23441
|
-
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0,
|
|
23442
|
-
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0,
|
|
23443
|
-
const onOptionChange = (0,
|
|
23884
|
+
const wrapperRef = (0, import_react156.useRef)(null);
|
|
23885
|
+
const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react156.useState)(false);
|
|
23886
|
+
const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react156.useState)(false);
|
|
23887
|
+
const onOptionChange = (0, import_react156.useCallback)(
|
|
23444
23888
|
(event) => {
|
|
23445
23889
|
if (event.target.checked) {
|
|
23446
23890
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -23448,19 +23892,19 @@ var SegmentedControl = ({
|
|
|
23448
23892
|
},
|
|
23449
23893
|
[options, onChange]
|
|
23450
23894
|
);
|
|
23451
|
-
const sizeStyles = (0,
|
|
23895
|
+
const sizeStyles = (0, import_react156.useMemo)(() => {
|
|
23452
23896
|
const map = {
|
|
23453
|
-
sm: (0,
|
|
23454
|
-
md: (0,
|
|
23455
|
-
lg: (0,
|
|
23456
|
-
xl: (0,
|
|
23897
|
+
sm: (0, import_react155.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
23898
|
+
md: (0, import_react155.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
23899
|
+
lg: (0, import_react155.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
|
|
23900
|
+
xl: (0, import_react155.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
|
|
23457
23901
|
};
|
|
23458
23902
|
return map[size];
|
|
23459
23903
|
}, [size]);
|
|
23460
|
-
const isIconOnly = (0,
|
|
23904
|
+
const isIconOnly = (0, import_react156.useMemo)(() => {
|
|
23461
23905
|
return options.every((option) => option && option.icon && !option.label);
|
|
23462
23906
|
}, [options]);
|
|
23463
|
-
(0,
|
|
23907
|
+
(0, import_react156.useEffect)(() => {
|
|
23464
23908
|
const wrapperElement = wrapperRef.current;
|
|
23465
23909
|
const onScroll = () => {
|
|
23466
23910
|
if (!wrapperElement) {
|
|
@@ -23481,8 +23925,8 @@ var SegmentedControl = ({
|
|
|
23481
23925
|
wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
|
|
23482
23926
|
};
|
|
23483
23927
|
}, []);
|
|
23484
|
-
return /* @__PURE__ */ (0,
|
|
23485
|
-
/* @__PURE__ */ (0,
|
|
23928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
|
|
23929
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23486
23930
|
"div",
|
|
23487
23931
|
{
|
|
23488
23932
|
css: [
|
|
@@ -23498,12 +23942,12 @@ var SegmentedControl = ({
|
|
|
23498
23942
|
}
|
|
23499
23943
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
23500
23944
|
const isDisabled = disabled2 || option.disabled;
|
|
23501
|
-
return /* @__PURE__ */ (0,
|
|
23945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23502
23946
|
"div",
|
|
23503
23947
|
{
|
|
23504
23948
|
css: segmentedControlItemStyles,
|
|
23505
23949
|
"data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
|
|
23506
|
-
children: /* @__PURE__ */ (0,
|
|
23950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
23507
23951
|
"label",
|
|
23508
23952
|
{
|
|
23509
23953
|
css: [
|
|
@@ -23512,7 +23956,7 @@ var SegmentedControl = ({
|
|
|
23512
23956
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
23513
23957
|
],
|
|
23514
23958
|
children: [
|
|
23515
|
-
/* @__PURE__ */ (0,
|
|
23959
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23516
23960
|
"input",
|
|
23517
23961
|
{
|
|
23518
23962
|
css: segmentedControlInputStyles,
|
|
@@ -23524,10 +23968,10 @@ var SegmentedControl = ({
|
|
|
23524
23968
|
disabled: isDisabled
|
|
23525
23969
|
}
|
|
23526
23970
|
),
|
|
23527
|
-
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0,
|
|
23528
|
-
/* @__PURE__ */ (0,
|
|
23529
|
-
!option.icon ? null : /* @__PURE__ */ (0,
|
|
23530
|
-
!text || hideOptionText ? null : /* @__PURE__ */ (0,
|
|
23971
|
+
option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
|
|
23972
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
|
|
23973
|
+
!option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
|
|
23974
|
+
!text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
|
|
23531
23975
|
] })
|
|
23532
23976
|
]
|
|
23533
23977
|
}
|
|
@@ -23537,7 +23981,7 @@ var SegmentedControl = ({
|
|
|
23537
23981
|
})
|
|
23538
23982
|
}
|
|
23539
23983
|
) }),
|
|
23540
|
-
/* @__PURE__ */ (0,
|
|
23984
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
23541
23985
|
"div",
|
|
23542
23986
|
{
|
|
23543
23987
|
css: [
|
|
@@ -23555,18 +23999,18 @@ init_emotion_jsx_shim();
|
|
|
23555
23999
|
|
|
23556
24000
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
23557
24001
|
init_emotion_jsx_shim();
|
|
23558
|
-
var
|
|
23559
|
-
var lightFadingOut =
|
|
24002
|
+
var import_react157 = require("@emotion/react");
|
|
24003
|
+
var lightFadingOut = import_react157.keyframes`
|
|
23560
24004
|
from { opacity: 0.1; }
|
|
23561
24005
|
to { opacity: 0.025; }
|
|
23562
24006
|
`;
|
|
23563
|
-
var skeletonStyles =
|
|
24007
|
+
var skeletonStyles = import_react157.css`
|
|
23564
24008
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
23565
24009
|
background-color: var(--gray-900);
|
|
23566
24010
|
`;
|
|
23567
24011
|
|
|
23568
24012
|
// src/components/Skeleton/Skeleton.tsx
|
|
23569
|
-
var
|
|
24013
|
+
var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
|
|
23570
24014
|
var Skeleton = ({
|
|
23571
24015
|
width = "100%",
|
|
23572
24016
|
height = "1.25rem",
|
|
@@ -23574,7 +24018,7 @@ var Skeleton = ({
|
|
|
23574
24018
|
circle = false,
|
|
23575
24019
|
children,
|
|
23576
24020
|
...otherProps
|
|
23577
|
-
}) => /* @__PURE__ */ (0,
|
|
24021
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
23578
24022
|
"div",
|
|
23579
24023
|
{
|
|
23580
24024
|
css: [
|
|
@@ -23595,12 +24039,12 @@ var Skeleton = ({
|
|
|
23595
24039
|
|
|
23596
24040
|
// src/components/Switch/Switch.tsx
|
|
23597
24041
|
init_emotion_jsx_shim();
|
|
23598
|
-
var
|
|
24042
|
+
var import_react159 = require("react");
|
|
23599
24043
|
|
|
23600
24044
|
// src/components/Switch/Switch.styles.ts
|
|
23601
24045
|
init_emotion_jsx_shim();
|
|
23602
|
-
var
|
|
23603
|
-
var SwitchInputContainer =
|
|
24046
|
+
var import_react158 = require("@emotion/react");
|
|
24047
|
+
var SwitchInputContainer = import_react158.css`
|
|
23604
24048
|
cursor: pointer;
|
|
23605
24049
|
display: inline-block;
|
|
23606
24050
|
position: relative;
|
|
@@ -23609,7 +24053,7 @@ var SwitchInputContainer = import_react154.css`
|
|
|
23609
24053
|
vertical-align: middle;
|
|
23610
24054
|
user-select: none;
|
|
23611
24055
|
`;
|
|
23612
|
-
var SwitchInput = (size) =>
|
|
24056
|
+
var SwitchInput = (size) => import_react158.css`
|
|
23613
24057
|
appearance: none;
|
|
23614
24058
|
border-radius: var(--rounded-full);
|
|
23615
24059
|
background-color: var(--white);
|
|
@@ -23648,7 +24092,7 @@ var SwitchInput = (size) => import_react154.css`
|
|
|
23648
24092
|
cursor: not-allowed;
|
|
23649
24093
|
}
|
|
23650
24094
|
`;
|
|
23651
|
-
var SwitchInputDisabled =
|
|
24095
|
+
var SwitchInputDisabled = import_react158.css`
|
|
23652
24096
|
opacity: var(--opacity-50);
|
|
23653
24097
|
cursor: not-allowed;
|
|
23654
24098
|
|
|
@@ -23656,7 +24100,7 @@ var SwitchInputDisabled = import_react154.css`
|
|
|
23656
24100
|
cursor: not-allowed;
|
|
23657
24101
|
}
|
|
23658
24102
|
`;
|
|
23659
|
-
var SwitchInputLabel = (size) =>
|
|
24103
|
+
var SwitchInputLabel = (size) => import_react158.css`
|
|
23660
24104
|
align-items: center;
|
|
23661
24105
|
color: var(--typography-base);
|
|
23662
24106
|
display: inline-flex;
|
|
@@ -23678,32 +24122,32 @@ var SwitchInputLabel = (size) => import_react154.css`
|
|
|
23678
24122
|
top: 0;
|
|
23679
24123
|
}
|
|
23680
24124
|
`;
|
|
23681
|
-
var SwitchText = (size) =>
|
|
24125
|
+
var SwitchText = (size) => import_react158.css`
|
|
23682
24126
|
color: var(--gray-500);
|
|
23683
24127
|
font-size: var(--fs-sm);
|
|
23684
24128
|
padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
|
|
23685
24129
|
`;
|
|
23686
24130
|
|
|
23687
24131
|
// src/components/Switch/Switch.tsx
|
|
23688
|
-
var
|
|
23689
|
-
var Switch = (0,
|
|
24132
|
+
var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
|
|
24133
|
+
var Switch = (0, import_react159.forwardRef)(
|
|
23690
24134
|
({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
|
|
23691
24135
|
let additionalText = infoText;
|
|
23692
24136
|
if (infoText && toggleText) {
|
|
23693
24137
|
additionalText = inputProps.checked ? toggleText : infoText;
|
|
23694
24138
|
}
|
|
23695
|
-
return /* @__PURE__ */ (0,
|
|
23696
|
-
/* @__PURE__ */ (0,
|
|
24139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
24140
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
23697
24141
|
"label",
|
|
23698
24142
|
{
|
|
23699
24143
|
css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
|
|
23700
24144
|
children: [
|
|
23701
|
-
/* @__PURE__ */ (0,
|
|
23702
|
-
/* @__PURE__ */ (0,
|
|
24145
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
|
|
24146
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { css: SwitchInputLabel(switchSize), children: label })
|
|
23703
24147
|
]
|
|
23704
24148
|
}
|
|
23705
24149
|
),
|
|
23706
|
-
additionalText ? /* @__PURE__ */ (0,
|
|
24150
|
+
additionalText ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { css: SwitchText(switchSize), children: additionalText }) : null,
|
|
23707
24151
|
children
|
|
23708
24152
|
] });
|
|
23709
24153
|
}
|
|
@@ -23715,8 +24159,8 @@ var React24 = __toESM(require("react"));
|
|
|
23715
24159
|
|
|
23716
24160
|
// src/components/Table/Table.styles.ts
|
|
23717
24161
|
init_emotion_jsx_shim();
|
|
23718
|
-
var
|
|
23719
|
-
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) =>
|
|
24162
|
+
var import_react160 = require("@emotion/react");
|
|
24163
|
+
var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react160.css`
|
|
23720
24164
|
border-bottom: 1px solid var(--gray-400);
|
|
23721
24165
|
border-collapse: collapse;
|
|
23722
24166
|
min-width: 100%;
|
|
@@ -23736,66 +24180,66 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_
|
|
|
23736
24180
|
background-color: var(--gray-50);
|
|
23737
24181
|
}
|
|
23738
24182
|
`;
|
|
23739
|
-
var tableHead =
|
|
24183
|
+
var tableHead = import_react160.css`
|
|
23740
24184
|
color: var(--typography-base);
|
|
23741
24185
|
text-align: left;
|
|
23742
24186
|
`;
|
|
23743
|
-
var tableRow =
|
|
24187
|
+
var tableRow = import_react160.css`
|
|
23744
24188
|
border-bottom: 1px solid var(--gray-100);
|
|
23745
24189
|
`;
|
|
23746
|
-
var tableCellHead =
|
|
24190
|
+
var tableCellHead = import_react160.css`
|
|
23747
24191
|
font-size: var(--fs-sm);
|
|
23748
24192
|
text-transform: uppercase;
|
|
23749
24193
|
font-weight: var(--fw-bold);
|
|
23750
24194
|
`;
|
|
23751
24195
|
|
|
23752
24196
|
// src/components/Table/Table.tsx
|
|
23753
|
-
var
|
|
24197
|
+
var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
|
|
23754
24198
|
var Table = React24.forwardRef(
|
|
23755
24199
|
({ children, cellPadding, ...otherProps }, ref) => {
|
|
23756
|
-
return /* @__PURE__ */ (0,
|
|
24200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
|
|
23757
24201
|
}
|
|
23758
24202
|
);
|
|
23759
24203
|
var TableHead = React24.forwardRef(
|
|
23760
24204
|
({ children, ...otherProps }, ref) => {
|
|
23761
|
-
return /* @__PURE__ */ (0,
|
|
24205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
|
|
23762
24206
|
}
|
|
23763
24207
|
);
|
|
23764
24208
|
var TableBody = React24.forwardRef(
|
|
23765
24209
|
({ children, ...otherProps }, ref) => {
|
|
23766
|
-
return /* @__PURE__ */ (0,
|
|
24210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tbody", { ref, ...otherProps, children });
|
|
23767
24211
|
}
|
|
23768
24212
|
);
|
|
23769
24213
|
var TableFoot = React24.forwardRef(
|
|
23770
24214
|
({ children, ...otherProps }, ref) => {
|
|
23771
|
-
return /* @__PURE__ */ (0,
|
|
24215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tfoot", { ref, ...otherProps, children });
|
|
23772
24216
|
}
|
|
23773
24217
|
);
|
|
23774
24218
|
var TableRow = React24.forwardRef(
|
|
23775
24219
|
({ children, ...otherProps }, ref) => {
|
|
23776
|
-
return /* @__PURE__ */ (0,
|
|
24220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
|
|
23777
24221
|
}
|
|
23778
24222
|
);
|
|
23779
24223
|
var TableCellHead = React24.forwardRef(
|
|
23780
24224
|
({ children, ...otherProps }, ref) => {
|
|
23781
|
-
return /* @__PURE__ */ (0,
|
|
24225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
|
|
23782
24226
|
}
|
|
23783
24227
|
);
|
|
23784
24228
|
var TableCellData = React24.forwardRef(
|
|
23785
24229
|
({ children, ...otherProps }, ref) => {
|
|
23786
|
-
return /* @__PURE__ */ (0,
|
|
24230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("td", { ref, ...otherProps, children });
|
|
23787
24231
|
}
|
|
23788
24232
|
);
|
|
23789
24233
|
|
|
23790
24234
|
// src/components/Tabs/Tabs.tsx
|
|
23791
24235
|
init_emotion_jsx_shim();
|
|
23792
|
-
var
|
|
23793
|
-
var
|
|
24236
|
+
var import_react162 = require("@ariakit/react");
|
|
24237
|
+
var import_react163 = require("react");
|
|
23794
24238
|
|
|
23795
24239
|
// src/components/Tabs/Tabs.styles.ts
|
|
23796
24240
|
init_emotion_jsx_shim();
|
|
23797
|
-
var
|
|
23798
|
-
var tabButtonStyles =
|
|
24241
|
+
var import_react161 = require("@emotion/react");
|
|
24242
|
+
var tabButtonStyles = import_react161.css`
|
|
23799
24243
|
align-items: center;
|
|
23800
24244
|
border: 0;
|
|
23801
24245
|
height: 2.5rem;
|
|
@@ -23812,16 +24256,16 @@ var tabButtonStyles = import_react157.css`
|
|
|
23812
24256
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
23813
24257
|
}
|
|
23814
24258
|
`;
|
|
23815
|
-
var tabButtonGroupStyles =
|
|
24259
|
+
var tabButtonGroupStyles = import_react161.css`
|
|
23816
24260
|
display: flex;
|
|
23817
24261
|
gap: var(--spacing-base);
|
|
23818
24262
|
border-bottom: 1px solid var(--gray-300);
|
|
23819
24263
|
`;
|
|
23820
24264
|
|
|
23821
24265
|
// src/components/Tabs/Tabs.tsx
|
|
23822
|
-
var
|
|
24266
|
+
var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
|
|
23823
24267
|
var useCurrentTab = () => {
|
|
23824
|
-
const context = (0,
|
|
24268
|
+
const context = (0, import_react162.useTabStore)();
|
|
23825
24269
|
if (!context) {
|
|
23826
24270
|
throw new Error("This component can only be used inside <Tabs>");
|
|
23827
24271
|
}
|
|
@@ -23835,13 +24279,12 @@ var Tabs = ({
|
|
|
23835
24279
|
manual,
|
|
23836
24280
|
...props
|
|
23837
24281
|
}) => {
|
|
23838
|
-
const selected = (0,
|
|
23839
|
-
if (selectedId)
|
|
23840
|
-
return selectedId;
|
|
24282
|
+
const selected = (0, import_react163.useMemo)(() => {
|
|
24283
|
+
if (selectedId) return selectedId;
|
|
23841
24284
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
23842
24285
|
}, [selectedId, useHashForState]);
|
|
23843
|
-
const tab = (0,
|
|
23844
|
-
const onTabSelect = (0,
|
|
24286
|
+
const tab = (0, import_react162.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
|
|
24287
|
+
const onTabSelect = (0, import_react163.useCallback)(
|
|
23845
24288
|
(value) => {
|
|
23846
24289
|
const selectedValueWithoutNull = value != null ? value : void 0;
|
|
23847
24290
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -23852,28 +24295,28 @@ var Tabs = ({
|
|
|
23852
24295
|
},
|
|
23853
24296
|
[onSelectedIdChange, useHashForState]
|
|
23854
24297
|
);
|
|
23855
|
-
(0,
|
|
24298
|
+
(0, import_react163.useEffect)(() => {
|
|
23856
24299
|
if (selected && selected !== tab.getState().activeId) {
|
|
23857
24300
|
tab.setSelectedId(selected);
|
|
23858
24301
|
}
|
|
23859
24302
|
}, [selected, tab]);
|
|
23860
|
-
return /* @__PURE__ */ (0,
|
|
24303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
|
|
23861
24304
|
};
|
|
23862
24305
|
var TabButtonGroup = ({ children, ...props }) => {
|
|
23863
|
-
return /* @__PURE__ */ (0,
|
|
24306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabList, { ...props, css: tabButtonGroupStyles, children });
|
|
23864
24307
|
};
|
|
23865
24308
|
var TabButton = ({
|
|
23866
24309
|
children,
|
|
23867
24310
|
id,
|
|
23868
24311
|
...props
|
|
23869
24312
|
}) => {
|
|
23870
|
-
return /* @__PURE__ */ (0,
|
|
24313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
|
|
23871
24314
|
};
|
|
23872
24315
|
var TabContent = ({
|
|
23873
24316
|
children,
|
|
23874
24317
|
...props
|
|
23875
24318
|
}) => {
|
|
23876
|
-
return /* @__PURE__ */ (0,
|
|
24319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react162.TabPanel, { ...props, children });
|
|
23877
24320
|
};
|
|
23878
24321
|
|
|
23879
24322
|
// src/components/Validation/StatusBullet.tsx
|
|
@@ -23881,8 +24324,8 @@ init_emotion_jsx_shim();
|
|
|
23881
24324
|
|
|
23882
24325
|
// src/components/Validation/StatusBullet.styles.ts
|
|
23883
24326
|
init_emotion_jsx_shim();
|
|
23884
|
-
var
|
|
23885
|
-
var StatusBulletContainer =
|
|
24327
|
+
var import_react164 = require("@emotion/react");
|
|
24328
|
+
var StatusBulletContainer = import_react164.css`
|
|
23886
24329
|
align-items: center;
|
|
23887
24330
|
align-self: center;
|
|
23888
24331
|
color: var(--gray-500);
|
|
@@ -23899,33 +24342,33 @@ var StatusBulletContainer = import_react160.css`
|
|
|
23899
24342
|
display: block;
|
|
23900
24343
|
}
|
|
23901
24344
|
`;
|
|
23902
|
-
var StatusBulletBase =
|
|
24345
|
+
var StatusBulletBase = import_react164.css`
|
|
23903
24346
|
font-size: var(--fs-sm);
|
|
23904
24347
|
&:before {
|
|
23905
24348
|
width: var(--fs-xs);
|
|
23906
24349
|
height: var(--fs-xs);
|
|
23907
24350
|
}
|
|
23908
24351
|
`;
|
|
23909
|
-
var StatusBulletSmall =
|
|
24352
|
+
var StatusBulletSmall = import_react164.css`
|
|
23910
24353
|
font-size: var(--fs-xs);
|
|
23911
24354
|
&:before {
|
|
23912
24355
|
width: var(--fs-xxs);
|
|
23913
24356
|
height: var(--fs-xxs);
|
|
23914
24357
|
}
|
|
23915
24358
|
`;
|
|
23916
|
-
var StatusDraft =
|
|
24359
|
+
var StatusDraft = import_react164.css`
|
|
23917
24360
|
&:before {
|
|
23918
24361
|
background: var(--white);
|
|
23919
24362
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23920
24363
|
}
|
|
23921
24364
|
`;
|
|
23922
|
-
var StatusModified =
|
|
24365
|
+
var StatusModified = import_react164.css`
|
|
23923
24366
|
&:before {
|
|
23924
24367
|
background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
|
|
23925
24368
|
box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
|
|
23926
24369
|
}
|
|
23927
24370
|
`;
|
|
23928
|
-
var StatusError =
|
|
24371
|
+
var StatusError = import_react164.css`
|
|
23929
24372
|
color: var(--error);
|
|
23930
24373
|
&:before {
|
|
23931
24374
|
/* TODO: replace this with an svg icon */
|
|
@@ -23938,29 +24381,29 @@ var StatusError = import_react160.css`
|
|
|
23938
24381
|
);
|
|
23939
24382
|
}
|
|
23940
24383
|
`;
|
|
23941
|
-
var StatusPublished =
|
|
24384
|
+
var StatusPublished = import_react164.css`
|
|
23942
24385
|
&:before {
|
|
23943
24386
|
background: var(--accent-dark);
|
|
23944
24387
|
}
|
|
23945
24388
|
`;
|
|
23946
|
-
var StatusOrphan =
|
|
24389
|
+
var StatusOrphan = import_react164.css`
|
|
23947
24390
|
&:before {
|
|
23948
24391
|
background: var(--brand-secondary-5);
|
|
23949
24392
|
}
|
|
23950
24393
|
`;
|
|
23951
|
-
var StatusUnknown =
|
|
24394
|
+
var StatusUnknown = import_react164.css`
|
|
23952
24395
|
&:before {
|
|
23953
24396
|
background: var(--gray-800);
|
|
23954
24397
|
}
|
|
23955
24398
|
`;
|
|
23956
|
-
var StatusDeleted =
|
|
24399
|
+
var StatusDeleted = import_react164.css`
|
|
23957
24400
|
&:before {
|
|
23958
24401
|
background: var(--error);
|
|
23959
24402
|
}
|
|
23960
24403
|
`;
|
|
23961
24404
|
|
|
23962
24405
|
// src/components/Validation/StatusBullet.tsx
|
|
23963
|
-
var
|
|
24406
|
+
var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
|
|
23964
24407
|
var StatusBullet = ({
|
|
23965
24408
|
status,
|
|
23966
24409
|
hideText = false,
|
|
@@ -23980,7 +24423,7 @@ var StatusBullet = ({
|
|
|
23980
24423
|
Deleted: StatusDeleted
|
|
23981
24424
|
};
|
|
23982
24425
|
const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
|
|
23983
|
-
return /* @__PURE__ */ (0,
|
|
24426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
23984
24427
|
"span",
|
|
23985
24428
|
{
|
|
23986
24429
|
role: "status",
|
|
@@ -24057,6 +24500,7 @@ var StatusBullet = ({
|
|
|
24057
24500
|
IntegrationModalIcon,
|
|
24058
24501
|
IntegrationTile,
|
|
24059
24502
|
JsonEditor,
|
|
24503
|
+
KeyValueInput,
|
|
24060
24504
|
Label,
|
|
24061
24505
|
LabelLeadingIcon,
|
|
24062
24506
|
Legend,
|
|
@@ -24234,6 +24678,7 @@ var StatusBullet = ({
|
|
|
24234
24678
|
toast,
|
|
24235
24679
|
uniformComponentIcon,
|
|
24236
24680
|
uniformComponentPatternIcon,
|
|
24681
|
+
uniformCompositionPatternIcon,
|
|
24237
24682
|
uniformContentTypeIcon,
|
|
24238
24683
|
uniformEntryIcon,
|
|
24239
24684
|
uniformEntryPatternIcon,
|
|
@@ -24246,6 +24691,7 @@ var StatusBullet = ({
|
|
|
24246
24691
|
useIconContext,
|
|
24247
24692
|
useOutsideClick,
|
|
24248
24693
|
useParameterShell,
|
|
24694
|
+
usePopoverComponentContext,
|
|
24249
24695
|
useShortcut,
|
|
24250
24696
|
utilityColors,
|
|
24251
24697
|
warningIcon,
|