@uniformdev/design-system 19.56.0 → 19.56.1-alpha.10
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 +169 -147
- package/dist/index.d.mts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +211 -189
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1570,7 +1570,7 @@ init_emotion_jsx_shim();
|
|
|
1570
1570
|
// src/styles/Theme.tsx
|
|
1571
1571
|
init_emotion_jsx_shim();
|
|
1572
1572
|
var import_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
1573
|
-
var Theme = ({ disableReset = false }) => {
|
|
1573
|
+
var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
|
|
1574
1574
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1575
1575
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1576
1576
|
"link",
|
|
@@ -1636,7 +1636,7 @@ var Theme = ({ disableReset = false }) => {
|
|
|
1636
1636
|
--tertiary-action-hover: var(--gray-600);
|
|
1637
1637
|
--tertiary-action-active: var(--gray-50);
|
|
1638
1638
|
--tertiary-action-disabled: var(--gray-400);
|
|
1639
|
-
|
|
1639
|
+
|
|
1640
1640
|
/* accent dark */
|
|
1641
1641
|
--accent-dark: var(--purple-rain-500);
|
|
1642
1642
|
--accent-dark-hover: var(--purple-rain-400);
|
|
@@ -1761,64 +1761,72 @@ var Theme = ({ disableReset = false }) => {
|
|
|
1761
1761
|
--duration-fast: 0.25s;
|
|
1762
1762
|
--duration-xfast: 0.15s;
|
|
1763
1763
|
}
|
|
1764
|
-
|
|
1765
|
-
html,
|
|
1766
|
-
body {
|
|
1767
|
-
color: var(--brand-secondary-1);
|
|
1768
|
-
font-family: var(--ff-base);
|
|
1769
|
-
scroll-behavior: smooth;
|
|
1770
|
-
font-weight: var(--fw-regular);
|
|
1771
|
-
line-height: 1.5;
|
|
1764
|
+
`
|
|
1772
1765
|
}
|
|
1766
|
+
}
|
|
1767
|
+
),
|
|
1768
|
+
disableGlobalReset ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1769
|
+
"style",
|
|
1770
|
+
{
|
|
1771
|
+
dangerouslySetInnerHTML: {
|
|
1772
|
+
__html: `
|
|
1773
|
+
html,
|
|
1774
|
+
body {
|
|
1775
|
+
color: var(--brand-secondary-1);
|
|
1776
|
+
font-family: var(--ff-base);
|
|
1777
|
+
scroll-behavior: smooth;
|
|
1778
|
+
font-weight: var(--fw-regular);
|
|
1779
|
+
line-height: 1.5;
|
|
1780
|
+
}
|
|
1773
1781
|
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1782
|
+
li {
|
|
1783
|
+
line-height: 1.5rem;
|
|
1784
|
+
}
|
|
1777
1785
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1786
|
+
a, button {
|
|
1787
|
+
cursor: pointer;
|
|
1788
|
+
}
|
|
1781
1789
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1790
|
+
fieldset {
|
|
1791
|
+
border: 0;
|
|
1792
|
+
padding: 0;
|
|
1793
|
+
margin: 0;
|
|
1794
|
+
min-width: 0;
|
|
1795
|
+
}
|
|
1788
1796
|
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1797
|
+
legend {
|
|
1798
|
+
margin: 0;
|
|
1799
|
+
padding: 0;
|
|
1800
|
+
}
|
|
1793
1801
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1802
|
+
button, input, optgroup, select, textarea {
|
|
1803
|
+
font-family: inherit;
|
|
1804
|
+
font-size: inherit;
|
|
1805
|
+
color: inherit;
|
|
1806
|
+
line-height: 1.25rem;
|
|
1807
|
+
}
|
|
1800
1808
|
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1809
|
+
[role=button], button {
|
|
1810
|
+
cursor: pointer;
|
|
1811
|
+
}
|
|
1804
1812
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1813
|
+
audio, canvas, embed, iframe, img, object, svg, video {
|
|
1814
|
+
display: block;
|
|
1815
|
+
vertical-align: middle;
|
|
1816
|
+
}
|
|
1809
1817
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1818
|
+
pre {
|
|
1819
|
+
white-space: pre;
|
|
1820
|
+
}
|
|
1813
1821
|
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1822
|
+
*:where(ul, ol) {
|
|
1823
|
+
all: unset;
|
|
1824
|
+
}
|
|
1817
1825
|
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1826
|
+
ul, ol {
|
|
1827
|
+
list-style: none;
|
|
1828
|
+
}
|
|
1829
|
+
`
|
|
1822
1830
|
}
|
|
1823
1831
|
}
|
|
1824
1832
|
)
|
|
@@ -18356,7 +18364,7 @@ var ParameterGroup = (0, import_react102.forwardRef)(
|
|
|
18356
18364
|
|
|
18357
18365
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18358
18366
|
init_emotion_jsx_shim();
|
|
18359
|
-
var
|
|
18367
|
+
var import_react109 = require("react");
|
|
18360
18368
|
|
|
18361
18369
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18362
18370
|
init_emotion_jsx_shim();
|
|
@@ -18437,7 +18445,8 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
18437
18445
|
|
|
18438
18446
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
18439
18447
|
init_emotion_jsx_shim();
|
|
18440
|
-
var import_react107 = require("react");
|
|
18448
|
+
var import_react107 = require("@emotion/react");
|
|
18449
|
+
var import_react108 = require("react");
|
|
18441
18450
|
|
|
18442
18451
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
18443
18452
|
init_emotion_jsx_shim();
|
|
@@ -18555,13 +18564,14 @@ var ParameterShell = ({
|
|
|
18555
18564
|
errorTestId,
|
|
18556
18565
|
captionTestId,
|
|
18557
18566
|
menuItems,
|
|
18567
|
+
actionItems,
|
|
18558
18568
|
hasOverriddenValue,
|
|
18559
18569
|
onResetOverriddenValue,
|
|
18560
18570
|
title: title2,
|
|
18561
18571
|
children,
|
|
18562
18572
|
...props
|
|
18563
18573
|
}) => {
|
|
18564
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
18574
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react108.useState)(void 0);
|
|
18565
18575
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
18566
18576
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
18567
18577
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputContainer2, ...props, children: [
|
|
@@ -18576,6 +18586,18 @@ var ParameterShell = ({
|
|
|
18576
18586
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18577
18587
|
] }),
|
|
18578
18588
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputWrapper, children: [
|
|
18589
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
18590
|
+
"div",
|
|
18591
|
+
{
|
|
18592
|
+
css: [
|
|
18593
|
+
inputMenu,
|
|
18594
|
+
menuItems ? import_react107.css`
|
|
18595
|
+
right: var(--spacing-md);
|
|
18596
|
+
` : void 0
|
|
18597
|
+
],
|
|
18598
|
+
children: actionItems
|
|
18599
|
+
}
|
|
18600
|
+
) : null,
|
|
18579
18601
|
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
18580
18602
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
18581
18603
|
ParameterShellContext.Provider,
|
|
@@ -18607,7 +18629,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime9
|
|
|
18607
18629
|
|
|
18608
18630
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18609
18631
|
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
18610
|
-
var ParameterImage = (0,
|
|
18632
|
+
var ParameterImage = (0, import_react109.forwardRef)(
|
|
18611
18633
|
({ children, ...props }, ref) => {
|
|
18612
18634
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18613
18635
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -18616,10 +18638,10 @@ var ParameterImage = (0, import_react108.forwardRef)(
|
|
|
18616
18638
|
] });
|
|
18617
18639
|
}
|
|
18618
18640
|
);
|
|
18619
|
-
var ParameterImageInner = (0,
|
|
18641
|
+
var ParameterImageInner = (0, import_react109.forwardRef)((props, ref) => {
|
|
18620
18642
|
const { value } = props;
|
|
18621
18643
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
18622
|
-
const deferredValue = (0,
|
|
18644
|
+
const deferredValue = (0, import_react109.useDeferredValue)(value);
|
|
18623
18645
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
18624
18646
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
18625
18647
|
"input",
|
|
@@ -18639,13 +18661,13 @@ var ParameterImageInner = (0, import_react108.forwardRef)((props, ref) => {
|
|
|
18639
18661
|
|
|
18640
18662
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
18641
18663
|
init_emotion_jsx_shim();
|
|
18642
|
-
var
|
|
18664
|
+
var import_react110 = require("react");
|
|
18643
18665
|
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
18644
|
-
var ParameterInput = (0,
|
|
18666
|
+
var ParameterInput = (0, import_react110.forwardRef)((props, ref) => {
|
|
18645
18667
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18646
18668
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
18647
18669
|
});
|
|
18648
|
-
var ParameterInputInner = (0,
|
|
18670
|
+
var ParameterInputInner = (0, import_react110.forwardRef)(
|
|
18649
18671
|
({ ...props }, ref) => {
|
|
18650
18672
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18651
18673
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
@@ -18665,9 +18687,9 @@ var ParameterInputInner = (0, import_react109.forwardRef)(
|
|
|
18665
18687
|
|
|
18666
18688
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
18667
18689
|
init_emotion_jsx_shim();
|
|
18668
|
-
var
|
|
18690
|
+
var import_react111 = require("react");
|
|
18669
18691
|
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
18670
|
-
var ParameterLink = (0,
|
|
18692
|
+
var ParameterLink = (0, import_react111.forwardRef)(
|
|
18671
18693
|
({ disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
18672
18694
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18673
18695
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -18690,7 +18712,7 @@ var ParameterLink = (0, import_react110.forwardRef)(
|
|
|
18690
18712
|
);
|
|
18691
18713
|
}
|
|
18692
18714
|
);
|
|
18693
|
-
var ParameterLinkInner = (0,
|
|
18715
|
+
var ParameterLinkInner = (0, import_react111.forwardRef)(
|
|
18694
18716
|
({ externalLink, onConnectLink, disabled, buttonText = "Select link", ...props }, ref) => {
|
|
18695
18717
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18696
18718
|
if (!props.value)
|
|
@@ -18816,7 +18838,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
18816
18838
|
|
|
18817
18839
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18818
18840
|
init_emotion_jsx_shim();
|
|
18819
|
-
var
|
|
18841
|
+
var import_react118 = require("@emotion/react");
|
|
18820
18842
|
var import_list3 = require("@lexical/list");
|
|
18821
18843
|
var import_markdown = require("@lexical/markdown");
|
|
18822
18844
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -18923,7 +18945,7 @@ var getLabelForElement = (type) => {
|
|
|
18923
18945
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18924
18946
|
var import_fast_equals2 = require("fast-equals");
|
|
18925
18947
|
var import_lexical6 = require("lexical");
|
|
18926
|
-
var
|
|
18948
|
+
var import_react119 = require("react");
|
|
18927
18949
|
|
|
18928
18950
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
18929
18951
|
init_emotion_jsx_shim();
|
|
@@ -18946,10 +18968,10 @@ init_emotion_jsx_shim();
|
|
|
18946
18968
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
18947
18969
|
var import_utils2 = require("@lexical/utils");
|
|
18948
18970
|
var import_lexical = require("lexical");
|
|
18949
|
-
var
|
|
18971
|
+
var import_react112 = require("react");
|
|
18950
18972
|
function DisableStylesPlugin() {
|
|
18951
18973
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
18952
|
-
(0,
|
|
18974
|
+
(0, import_react112.useEffect)(() => {
|
|
18953
18975
|
return (0, import_utils2.mergeRegister)(
|
|
18954
18976
|
// Disable text alignment on paragraph nodes
|
|
18955
18977
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -19144,13 +19166,13 @@ var codeElement = import_css.css`
|
|
|
19144
19166
|
|
|
19145
19167
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19146
19168
|
init_emotion_jsx_shim();
|
|
19147
|
-
var
|
|
19169
|
+
var import_react113 = require("@emotion/react");
|
|
19148
19170
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
19149
19171
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
19150
19172
|
var import_utils3 = require("@lexical/utils");
|
|
19151
19173
|
var import_fast_equals = require("fast-equals");
|
|
19152
19174
|
var import_lexical3 = require("lexical");
|
|
19153
|
-
var
|
|
19175
|
+
var import_react114 = require("react");
|
|
19154
19176
|
|
|
19155
19177
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19156
19178
|
init_emotion_jsx_shim();
|
|
@@ -19476,16 +19498,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
19476
19498
|
);
|
|
19477
19499
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
19478
19500
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
19479
|
-
var linkPopover =
|
|
19501
|
+
var linkPopover = import_react113.css`
|
|
19480
19502
|
position: absolute;
|
|
19481
19503
|
z-index: 5;
|
|
19482
19504
|
`;
|
|
19483
|
-
var linkPopoverContainer =
|
|
19505
|
+
var linkPopoverContainer = import_react113.css`
|
|
19484
19506
|
${Popover};
|
|
19485
19507
|
align-items: center;
|
|
19486
19508
|
display: flex;
|
|
19487
19509
|
`;
|
|
19488
|
-
var linkPopoverAnchor =
|
|
19510
|
+
var linkPopoverAnchor = import_react113.css`
|
|
19489
19511
|
${link}
|
|
19490
19512
|
${linkColorDefault}
|
|
19491
19513
|
`;
|
|
@@ -19494,17 +19516,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19494
19516
|
return path;
|
|
19495
19517
|
};
|
|
19496
19518
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
19497
|
-
const [linkPopoverState, setLinkPopoverState] = (0,
|
|
19498
|
-
const linkPopoverElRef = (0,
|
|
19499
|
-
const [isEditorFocused, setIsEditorFocused] = (0,
|
|
19500
|
-
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0,
|
|
19501
|
-
(0,
|
|
19519
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react114.useState)();
|
|
19520
|
+
const linkPopoverElRef = (0, import_react114.useRef)(null);
|
|
19521
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react114.useState)(false);
|
|
19522
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react114.useState)(false);
|
|
19523
|
+
(0, import_react114.useEffect)(() => {
|
|
19502
19524
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
19503
19525
|
setLinkPopoverState(void 0);
|
|
19504
19526
|
return;
|
|
19505
19527
|
}
|
|
19506
19528
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
19507
|
-
(0,
|
|
19529
|
+
(0, import_react114.useEffect)(() => {
|
|
19508
19530
|
if (!editor.hasNodes([LinkNode])) {
|
|
19509
19531
|
throw new Error("LinkNode not registered on editor");
|
|
19510
19532
|
}
|
|
@@ -19573,7 +19595,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19573
19595
|
)
|
|
19574
19596
|
);
|
|
19575
19597
|
}, [editor, onConnectLink]);
|
|
19576
|
-
const maybeShowLinkToolbar = (0,
|
|
19598
|
+
const maybeShowLinkToolbar = (0, import_react114.useCallback)(() => {
|
|
19577
19599
|
if (!editor.isEditable()) {
|
|
19578
19600
|
return;
|
|
19579
19601
|
}
|
|
@@ -19605,7 +19627,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19605
19627
|
}
|
|
19606
19628
|
});
|
|
19607
19629
|
}, [editor]);
|
|
19608
|
-
(0,
|
|
19630
|
+
(0, import_react114.useEffect)(() => {
|
|
19609
19631
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19610
19632
|
requestAnimationFrame(() => {
|
|
19611
19633
|
editorState.read(() => {
|
|
@@ -19693,7 +19715,7 @@ var import_list = require("@lexical/list");
|
|
|
19693
19715
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
19694
19716
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
19695
19717
|
var import_lexical4 = require("lexical");
|
|
19696
|
-
var
|
|
19718
|
+
var import_react115 = require("react");
|
|
19697
19719
|
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
19698
19720
|
function isIndentPermitted(maxDepth) {
|
|
19699
19721
|
const selection = (0, import_lexical4.$getSelection)();
|
|
@@ -19717,7 +19739,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
19717
19739
|
}
|
|
19718
19740
|
function ListIndentPlugin({ maxDepth }) {
|
|
19719
19741
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
19720
|
-
(0,
|
|
19742
|
+
(0, import_react115.useEffect)(() => {
|
|
19721
19743
|
return editor.registerCommand(
|
|
19722
19744
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
19723
19745
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -19729,7 +19751,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
19729
19751
|
|
|
19730
19752
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
19731
19753
|
init_emotion_jsx_shim();
|
|
19732
|
-
var
|
|
19754
|
+
var import_react116 = require("@emotion/react");
|
|
19733
19755
|
var import_code2 = require("@lexical/code");
|
|
19734
19756
|
var import_list2 = require("@lexical/list");
|
|
19735
19757
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19737,9 +19759,9 @@ var import_rich_text = require("@lexical/rich-text");
|
|
|
19737
19759
|
var import_selection2 = require("@lexical/selection");
|
|
19738
19760
|
var import_utils6 = require("@lexical/utils");
|
|
19739
19761
|
var import_lexical5 = require("lexical");
|
|
19740
|
-
var
|
|
19762
|
+
var import_react117 = require("react");
|
|
19741
19763
|
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
19742
|
-
var toolbar =
|
|
19764
|
+
var toolbar = import_react116.css`
|
|
19743
19765
|
background: var(--gray-50);
|
|
19744
19766
|
border-radius: var(--rounded-base);
|
|
19745
19767
|
display: flex;
|
|
@@ -19751,7 +19773,7 @@ var toolbar = import_react115.css`
|
|
|
19751
19773
|
top: calc(var(--spacing-sm) * -2);
|
|
19752
19774
|
z-index: 10;
|
|
19753
19775
|
`;
|
|
19754
|
-
var toolbarGroup =
|
|
19776
|
+
var toolbarGroup = import_react116.css`
|
|
19755
19777
|
display: flex;
|
|
19756
19778
|
gap: var(--spacing-xs);
|
|
19757
19779
|
position: relative;
|
|
@@ -19767,7 +19789,7 @@ var toolbarGroup = import_react115.css`
|
|
|
19767
19789
|
width: 1px;
|
|
19768
19790
|
}
|
|
19769
19791
|
`;
|
|
19770
|
-
var richTextToolbarButton =
|
|
19792
|
+
var richTextToolbarButton = import_react116.css`
|
|
19771
19793
|
align-items: center;
|
|
19772
19794
|
appearance: none;
|
|
19773
19795
|
border: 0;
|
|
@@ -19780,13 +19802,13 @@ var richTextToolbarButton = import_react115.css`
|
|
|
19780
19802
|
min-width: 32px;
|
|
19781
19803
|
padding: 0 var(--spacing-sm);
|
|
19782
19804
|
`;
|
|
19783
|
-
var richTextToolbarButtonActive =
|
|
19805
|
+
var richTextToolbarButtonActive = import_react116.css`
|
|
19784
19806
|
background: var(--gray-200);
|
|
19785
19807
|
`;
|
|
19786
|
-
var toolbarIcon =
|
|
19808
|
+
var toolbarIcon = import_react116.css`
|
|
19787
19809
|
color: inherit;
|
|
19788
19810
|
`;
|
|
19789
|
-
var toolbarChevron =
|
|
19811
|
+
var toolbarChevron = import_react116.css`
|
|
19790
19812
|
margin-left: var(--spacing-xs);
|
|
19791
19813
|
`;
|
|
19792
19814
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19841,7 +19863,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19841
19863
|
}
|
|
19842
19864
|
});
|
|
19843
19865
|
};
|
|
19844
|
-
const updateToolbar = (0,
|
|
19866
|
+
const updateToolbar = (0, import_react117.useCallback)(() => {
|
|
19845
19867
|
const selection = (0, import_lexical5.$getSelection)();
|
|
19846
19868
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
19847
19869
|
return;
|
|
@@ -19880,7 +19902,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19880
19902
|
setIsLink(false);
|
|
19881
19903
|
}
|
|
19882
19904
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
19883
|
-
(0,
|
|
19905
|
+
(0, import_react117.useEffect)(() => {
|
|
19884
19906
|
return editor.registerCommand(
|
|
19885
19907
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
19886
19908
|
(_payload) => {
|
|
@@ -19890,7 +19912,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19890
19912
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
19891
19913
|
);
|
|
19892
19914
|
}, [editor, updateToolbar]);
|
|
19893
|
-
(0,
|
|
19915
|
+
(0, import_react117.useEffect)(() => {
|
|
19894
19916
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19895
19917
|
requestAnimationFrame(() => {
|
|
19896
19918
|
editorState.read(() => {
|
|
@@ -20030,26 +20052,26 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20030
20052
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20031
20053
|
var useRichTextToolbarState = ({ config }) => {
|
|
20032
20054
|
var _a;
|
|
20033
|
-
const enabledBuiltInFormats = (0,
|
|
20055
|
+
const enabledBuiltInFormats = (0, import_react117.useMemo)(() => {
|
|
20034
20056
|
return richTextBuiltInFormats.filter((format) => {
|
|
20035
20057
|
var _a2, _b;
|
|
20036
20058
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
20037
20059
|
});
|
|
20038
20060
|
}, [config]);
|
|
20039
|
-
const enabledBuiltInElements = (0,
|
|
20061
|
+
const enabledBuiltInElements = (0, import_react117.useMemo)(() => {
|
|
20040
20062
|
return richTextBuiltInElements.filter((element) => {
|
|
20041
20063
|
var _a2, _b;
|
|
20042
20064
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
20043
20065
|
});
|
|
20044
20066
|
}, [config]);
|
|
20045
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
20067
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react117.useMemo)(() => {
|
|
20046
20068
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
20047
20069
|
}, [enabledBuiltInFormats]);
|
|
20048
20070
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
20049
20071
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
20050
20072
|
);
|
|
20051
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
20052
|
-
const visibleFormatsWithIcon = (0,
|
|
20073
|
+
const [activeFormats, setActiveFormats] = (0, import_react117.useState)([]);
|
|
20074
|
+
const visibleFormatsWithIcon = (0, import_react117.useMemo)(() => {
|
|
20053
20075
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20054
20076
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20055
20077
|
visibleFormats.add(type);
|
|
@@ -20059,7 +20081,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20059
20081
|
});
|
|
20060
20082
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20061
20083
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
20062
|
-
const visibleFormatsWithoutIcon = (0,
|
|
20084
|
+
const visibleFormatsWithoutIcon = (0, import_react117.useMemo)(() => {
|
|
20063
20085
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20064
20086
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20065
20087
|
visibleFormats.add(type);
|
|
@@ -20069,11 +20091,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20069
20091
|
});
|
|
20070
20092
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20071
20093
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
20072
|
-
const [activeElement, setActiveElement] = (0,
|
|
20094
|
+
const [activeElement, setActiveElement] = (0, import_react117.useState)("paragraph");
|
|
20073
20095
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
20074
20096
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
20075
20097
|
);
|
|
20076
|
-
const visibleTextualElements = (0,
|
|
20098
|
+
const visibleTextualElements = (0, import_react117.useMemo)(() => {
|
|
20077
20099
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
20078
20100
|
return enabledTextualElements;
|
|
20079
20101
|
}
|
|
@@ -20084,24 +20106,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20084
20106
|
}
|
|
20085
20107
|
);
|
|
20086
20108
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
20087
|
-
const [isLink, setIsLink] = (0,
|
|
20088
|
-
const linkElementVisible = (0,
|
|
20109
|
+
const [isLink, setIsLink] = (0, import_react117.useState)(false);
|
|
20110
|
+
const linkElementVisible = (0, import_react117.useMemo)(() => {
|
|
20089
20111
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
20090
20112
|
}, [isLink, enabledBuiltInElements]);
|
|
20091
|
-
const visibleLists = (0,
|
|
20113
|
+
const visibleLists = (0, import_react117.useMemo)(() => {
|
|
20092
20114
|
return new Set(
|
|
20093
20115
|
["orderedList", "unorderedList"].filter(
|
|
20094
20116
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
20095
20117
|
)
|
|
20096
20118
|
);
|
|
20097
20119
|
}, [activeElement, enabledBuiltInElements]);
|
|
20098
|
-
const quoteElementVisible = (0,
|
|
20120
|
+
const quoteElementVisible = (0, import_react117.useMemo)(() => {
|
|
20099
20121
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
20100
20122
|
}, [activeElement, enabledBuiltInElements]);
|
|
20101
|
-
const codeElementVisible = (0,
|
|
20123
|
+
const codeElementVisible = (0, import_react117.useMemo)(() => {
|
|
20102
20124
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
20103
20125
|
}, [activeElement, enabledBuiltInElements]);
|
|
20104
|
-
const visibleElementsWithIcons = (0,
|
|
20126
|
+
const visibleElementsWithIcons = (0, import_react117.useMemo)(() => {
|
|
20105
20127
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
20106
20128
|
if (linkElementVisible) {
|
|
20107
20129
|
visibleElements.add("link");
|
|
@@ -20200,18 +20222,18 @@ var ParameterRichText = ({
|
|
|
20200
20222
|
}
|
|
20201
20223
|
);
|
|
20202
20224
|
};
|
|
20203
|
-
var editorWrapper =
|
|
20225
|
+
var editorWrapper = import_react118.css`
|
|
20204
20226
|
display: flex;
|
|
20205
20227
|
flex-flow: column;
|
|
20206
20228
|
flex-grow: 1;
|
|
20207
20229
|
`;
|
|
20208
|
-
var editorContainer =
|
|
20230
|
+
var editorContainer = import_react118.css`
|
|
20209
20231
|
display: flex;
|
|
20210
20232
|
flex-flow: column;
|
|
20211
20233
|
flex-grow: 1;
|
|
20212
20234
|
position: relative;
|
|
20213
20235
|
`;
|
|
20214
|
-
var editorPlaceholder =
|
|
20236
|
+
var editorPlaceholder = import_react118.css`
|
|
20215
20237
|
color: var(--gray-500);
|
|
20216
20238
|
font-style: italic;
|
|
20217
20239
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20222,7 +20244,7 @@ var editorPlaceholder = import_react117.css`
|
|
|
20222
20244
|
top: var(--spacing-xs);
|
|
20223
20245
|
user-select: none;
|
|
20224
20246
|
`;
|
|
20225
|
-
var editorInput =
|
|
20247
|
+
var editorInput = import_react118.css`
|
|
20226
20248
|
background: var(--white);
|
|
20227
20249
|
border: 1px solid var(--white);
|
|
20228
20250
|
border-radius: var(--rounded-sm);
|
|
@@ -20344,14 +20366,14 @@ var RichText = ({
|
|
|
20344
20366
|
variables,
|
|
20345
20367
|
customControls
|
|
20346
20368
|
}) => {
|
|
20347
|
-
const editorContainerRef = (0,
|
|
20369
|
+
const editorContainerRef = (0, import_react119.useRef)(null);
|
|
20348
20370
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
20349
|
-
(0,
|
|
20371
|
+
(0, import_react119.useEffect)(() => {
|
|
20350
20372
|
if (onRichTextInit) {
|
|
20351
20373
|
onRichTextInit(editor);
|
|
20352
20374
|
}
|
|
20353
20375
|
}, [editor, onRichTextInit]);
|
|
20354
|
-
(0,
|
|
20376
|
+
(0, import_react119.useEffect)(() => {
|
|
20355
20377
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
20356
20378
|
requestAnimationFrame(() => {
|
|
20357
20379
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -20396,15 +20418,15 @@ var RichText = ({
|
|
|
20396
20418
|
|
|
20397
20419
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20398
20420
|
init_emotion_jsx_shim();
|
|
20399
|
-
var
|
|
20421
|
+
var import_react120 = require("react");
|
|
20400
20422
|
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20401
|
-
var ParameterSelect = (0,
|
|
20423
|
+
var ParameterSelect = (0, import_react120.forwardRef)(
|
|
20402
20424
|
({ defaultOption, options, ...props }, ref) => {
|
|
20403
20425
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20404
20426
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20405
20427
|
}
|
|
20406
20428
|
);
|
|
20407
|
-
var ParameterSelectInner = (0,
|
|
20429
|
+
var ParameterSelectInner = (0, import_react120.forwardRef)(
|
|
20408
20430
|
({ defaultOption, options, ...props }, ref) => {
|
|
20409
20431
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20410
20432
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
@@ -20429,13 +20451,13 @@ var ParameterSelectInner = (0, import_react119.forwardRef)(
|
|
|
20429
20451
|
|
|
20430
20452
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20431
20453
|
init_emotion_jsx_shim();
|
|
20432
|
-
var
|
|
20454
|
+
var import_react121 = require("react");
|
|
20433
20455
|
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20434
|
-
var ParameterTextarea = (0,
|
|
20456
|
+
var ParameterTextarea = (0, import_react121.forwardRef)((props, ref) => {
|
|
20435
20457
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20436
20458
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20437
20459
|
});
|
|
20438
|
-
var ParameterTextareaInner = (0,
|
|
20460
|
+
var ParameterTextareaInner = (0, import_react121.forwardRef)(({ ...props }, ref) => {
|
|
20439
20461
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20440
20462
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20441
20463
|
"textarea",
|
|
@@ -20451,13 +20473,13 @@ var ParameterTextareaInner = (0, import_react120.forwardRef)(({ ...props }, ref)
|
|
|
20451
20473
|
|
|
20452
20474
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20453
20475
|
init_emotion_jsx_shim();
|
|
20454
|
-
var
|
|
20476
|
+
var import_react122 = require("react");
|
|
20455
20477
|
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20456
|
-
var ParameterToggle = (0,
|
|
20478
|
+
var ParameterToggle = (0, import_react122.forwardRef)((props, ref) => {
|
|
20457
20479
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20458
20480
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20459
20481
|
});
|
|
20460
|
-
var ParameterToggleInner = (0,
|
|
20482
|
+
var ParameterToggleInner = (0, import_react122.forwardRef)(
|
|
20461
20483
|
({ ...props }, ref) => {
|
|
20462
20484
|
const { id, label } = useParameterShell();
|
|
20463
20485
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
@@ -20472,8 +20494,8 @@ init_emotion_jsx_shim();
|
|
|
20472
20494
|
|
|
20473
20495
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20474
20496
|
init_emotion_jsx_shim();
|
|
20475
|
-
var
|
|
20476
|
-
var container =
|
|
20497
|
+
var import_react123 = require("@emotion/react");
|
|
20498
|
+
var container = import_react123.css`
|
|
20477
20499
|
background: var(--gray-50);
|
|
20478
20500
|
margin-block: var(--spacing-sm);
|
|
20479
20501
|
position: relative;
|
|
@@ -20483,14 +20505,14 @@ var container = import_react122.css`
|
|
|
20483
20505
|
border: solid 1px var(--gray-300);
|
|
20484
20506
|
`;
|
|
20485
20507
|
var themeMap = {
|
|
20486
|
-
primary:
|
|
20508
|
+
primary: import_react123.css`
|
|
20487
20509
|
background-color: var(--accent-light);
|
|
20488
20510
|
`,
|
|
20489
|
-
secondary:
|
|
20511
|
+
secondary: import_react123.css`
|
|
20490
20512
|
background-color: var(--brand-secondary-5);
|
|
20491
20513
|
`
|
|
20492
20514
|
};
|
|
20493
|
-
var bar =
|
|
20515
|
+
var bar = import_react123.css`
|
|
20494
20516
|
position: absolute;
|
|
20495
20517
|
inset: 0;
|
|
20496
20518
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20529,22 +20551,22 @@ function ProgressBar({ className, current, max, theme = "primary" }) {
|
|
|
20529
20551
|
|
|
20530
20552
|
// src/components/ProgressList/ProgressList.tsx
|
|
20531
20553
|
init_emotion_jsx_shim();
|
|
20532
|
-
var
|
|
20554
|
+
var import_react125 = require("@emotion/react");
|
|
20533
20555
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20534
20556
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20535
20557
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20536
|
-
var
|
|
20558
|
+
var import_react126 = require("react");
|
|
20537
20559
|
|
|
20538
20560
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20539
20561
|
init_emotion_jsx_shim();
|
|
20540
|
-
var
|
|
20541
|
-
var progressListStyles =
|
|
20562
|
+
var import_react124 = require("@emotion/react");
|
|
20563
|
+
var progressListStyles = import_react124.css`
|
|
20542
20564
|
display: flex;
|
|
20543
20565
|
flex-direction: column;
|
|
20544
20566
|
gap: var(--spacing-sm);
|
|
20545
20567
|
list-style-type: none;
|
|
20546
20568
|
`;
|
|
20547
|
-
var progressListItemStyles =
|
|
20569
|
+
var progressListItemStyles = import_react124.css`
|
|
20548
20570
|
display: flex;
|
|
20549
20571
|
gap: var(--spacing-base);
|
|
20550
20572
|
align-items: center;
|
|
@@ -20553,7 +20575,7 @@ var progressListItemStyles = import_react123.css`
|
|
|
20553
20575
|
// src/components/ProgressList/ProgressList.tsx
|
|
20554
20576
|
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20555
20577
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20556
|
-
const itemsWithStatus = (0,
|
|
20578
|
+
const itemsWithStatus = (0, import_react126.useMemo)(() => {
|
|
20557
20579
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20558
20580
|
return items.map((item, index) => {
|
|
20559
20581
|
let status = "queued";
|
|
@@ -20586,7 +20608,7 @@ var ProgressListItem = ({
|
|
|
20586
20608
|
errorLevel = "danger",
|
|
20587
20609
|
autoEllipsis = false
|
|
20588
20610
|
}) => {
|
|
20589
|
-
const icon = (0,
|
|
20611
|
+
const icon = (0, import_react126.useMemo)(() => {
|
|
20590
20612
|
if (error) {
|
|
20591
20613
|
return warningIcon;
|
|
20592
20614
|
}
|
|
@@ -20597,14 +20619,14 @@ var ProgressListItem = ({
|
|
|
20597
20619
|
};
|
|
20598
20620
|
return iconPerStatus[status];
|
|
20599
20621
|
}, [status, error]);
|
|
20600
|
-
const statusStyles = (0,
|
|
20622
|
+
const statusStyles = (0, import_react126.useMemo)(() => {
|
|
20601
20623
|
if (error) {
|
|
20602
|
-
return errorLevel === "caution" ?
|
|
20624
|
+
return errorLevel === "caution" ? import_react125.css`
|
|
20603
20625
|
color: rgb(161, 98, 7);
|
|
20604
20626
|
& svg {
|
|
20605
20627
|
color: rgb(250, 204, 21);
|
|
20606
20628
|
}
|
|
20607
|
-
` :
|
|
20629
|
+
` : import_react125.css`
|
|
20608
20630
|
color: rgb(185, 28, 28);
|
|
20609
20631
|
& svg {
|
|
20610
20632
|
color: var(--brand-primary-2);
|
|
@@ -20612,13 +20634,13 @@ var ProgressListItem = ({
|
|
|
20612
20634
|
`;
|
|
20613
20635
|
}
|
|
20614
20636
|
const colorPerStatus = {
|
|
20615
|
-
completed:
|
|
20637
|
+
completed: import_react125.css`
|
|
20616
20638
|
opacity: 0.75;
|
|
20617
20639
|
`,
|
|
20618
|
-
inProgress:
|
|
20640
|
+
inProgress: import_react125.css`
|
|
20619
20641
|
-webkit-text-stroke-width: thin;
|
|
20620
20642
|
`,
|
|
20621
|
-
queued:
|
|
20643
|
+
queued: import_react125.css`
|
|
20622
20644
|
opacity: 0.5;
|
|
20623
20645
|
`
|
|
20624
20646
|
};
|
|
@@ -20635,14 +20657,14 @@ var ProgressListItem = ({
|
|
|
20635
20657
|
|
|
20636
20658
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20637
20659
|
init_emotion_jsx_shim();
|
|
20638
|
-
var
|
|
20660
|
+
var import_react128 = require("@emotion/react");
|
|
20639
20661
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20640
|
-
var
|
|
20662
|
+
var import_react129 = require("react");
|
|
20641
20663
|
|
|
20642
20664
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20643
20665
|
init_emotion_jsx_shim();
|
|
20644
|
-
var
|
|
20645
|
-
var segmentedControlStyles =
|
|
20666
|
+
var import_react127 = require("@emotion/react");
|
|
20667
|
+
var segmentedControlStyles = import_react127.css`
|
|
20646
20668
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20647
20669
|
--segmented-control-border-width: 1px;
|
|
20648
20670
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20661,14 +20683,14 @@ var segmentedControlStyles = import_react126.css`
|
|
|
20661
20683
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20662
20684
|
font-size: var(--fs-xs);
|
|
20663
20685
|
`;
|
|
20664
|
-
var segmentedControlVerticalStyles =
|
|
20686
|
+
var segmentedControlVerticalStyles = import_react127.css`
|
|
20665
20687
|
flex-direction: column;
|
|
20666
20688
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20667
20689
|
var(--segmented-control-rounded-value) 0 0;
|
|
20668
20690
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20669
20691
|
var(--segmented-control-rounded-value);
|
|
20670
20692
|
`;
|
|
20671
|
-
var segmentedControlItemStyles =
|
|
20693
|
+
var segmentedControlItemStyles = import_react127.css`
|
|
20672
20694
|
&:first-of-type label {
|
|
20673
20695
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20674
20696
|
}
|
|
@@ -20676,10 +20698,10 @@ var segmentedControlItemStyles = import_react126.css`
|
|
|
20676
20698
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20677
20699
|
}
|
|
20678
20700
|
`;
|
|
20679
|
-
var segmentedControlInputStyles =
|
|
20701
|
+
var segmentedControlInputStyles = import_react127.css`
|
|
20680
20702
|
${accessibleHidden}
|
|
20681
20703
|
`;
|
|
20682
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20704
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react127.css`
|
|
20683
20705
|
position: relative;
|
|
20684
20706
|
display: flex;
|
|
20685
20707
|
align-items: center;
|
|
@@ -20746,20 +20768,20 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react126.css`
|
|
|
20746
20768
|
`}
|
|
20747
20769
|
}
|
|
20748
20770
|
`;
|
|
20749
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20771
|
+
var segmentedControlLabelIconOnlyStyles = import_react127.css`
|
|
20750
20772
|
padding-inline: 0.5em;
|
|
20751
20773
|
`;
|
|
20752
|
-
var segmentedControlLabelCheckStyles =
|
|
20774
|
+
var segmentedControlLabelCheckStyles = import_react127.css`
|
|
20753
20775
|
opacity: 0.5;
|
|
20754
20776
|
`;
|
|
20755
|
-
var segmentedControlLabelContentStyles =
|
|
20777
|
+
var segmentedControlLabelContentStyles = import_react127.css`
|
|
20756
20778
|
display: flex;
|
|
20757
20779
|
align-items: center;
|
|
20758
20780
|
justify-content: center;
|
|
20759
20781
|
gap: var(--spacing-sm);
|
|
20760
20782
|
height: 100%;
|
|
20761
20783
|
`;
|
|
20762
|
-
var segmentedControlLabelTextStyles =
|
|
20784
|
+
var segmentedControlLabelTextStyles = import_react127.css``;
|
|
20763
20785
|
|
|
20764
20786
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20765
20787
|
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
@@ -20774,7 +20796,7 @@ var SegmentedControl = ({
|
|
|
20774
20796
|
size = "md",
|
|
20775
20797
|
...props
|
|
20776
20798
|
}) => {
|
|
20777
|
-
const onOptionChange = (0,
|
|
20799
|
+
const onOptionChange = (0, import_react129.useCallback)(
|
|
20778
20800
|
(event) => {
|
|
20779
20801
|
if (event.target.checked) {
|
|
20780
20802
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20782,15 +20804,15 @@ var SegmentedControl = ({
|
|
|
20782
20804
|
},
|
|
20783
20805
|
[options, onChange]
|
|
20784
20806
|
);
|
|
20785
|
-
const sizeStyles = (0,
|
|
20807
|
+
const sizeStyles = (0, import_react129.useMemo)(() => {
|
|
20786
20808
|
const map = {
|
|
20787
|
-
sm: (0,
|
|
20788
|
-
md: (0,
|
|
20789
|
-
lg: (0,
|
|
20809
|
+
sm: (0, import_react128.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20810
|
+
md: (0, import_react128.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20811
|
+
lg: (0, import_react128.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20790
20812
|
};
|
|
20791
20813
|
return map[size];
|
|
20792
20814
|
}, [size]);
|
|
20793
|
-
const isIconOnly = (0,
|
|
20815
|
+
const isIconOnly = (0, import_react129.useMemo)(() => {
|
|
20794
20816
|
return options.every((option) => option.icon && !option.label);
|
|
20795
20817
|
}, [options]);
|
|
20796
20818
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
@@ -20847,12 +20869,12 @@ init_emotion_jsx_shim();
|
|
|
20847
20869
|
|
|
20848
20870
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20849
20871
|
init_emotion_jsx_shim();
|
|
20850
|
-
var
|
|
20851
|
-
var lightFadingOut =
|
|
20872
|
+
var import_react130 = require("@emotion/react");
|
|
20873
|
+
var lightFadingOut = import_react130.keyframes`
|
|
20852
20874
|
from { opacity: 0.1; }
|
|
20853
20875
|
to { opacity: 0.025; }
|
|
20854
20876
|
`;
|
|
20855
|
-
var skeletonStyles =
|
|
20877
|
+
var skeletonStyles = import_react130.css`
|
|
20856
20878
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20857
20879
|
background-color: var(--gray-900);
|
|
20858
20880
|
`;
|
|
@@ -20891,8 +20913,8 @@ var React23 = __toESM(require("react"));
|
|
|
20891
20913
|
|
|
20892
20914
|
// src/components/Switch/Switch.styles.ts
|
|
20893
20915
|
init_emotion_jsx_shim();
|
|
20894
|
-
var
|
|
20895
|
-
var SwitchInputContainer =
|
|
20916
|
+
var import_react131 = require("@emotion/react");
|
|
20917
|
+
var SwitchInputContainer = import_react131.css`
|
|
20896
20918
|
cursor: pointer;
|
|
20897
20919
|
display: inline-block;
|
|
20898
20920
|
position: relative;
|
|
@@ -20901,7 +20923,7 @@ var SwitchInputContainer = import_react130.css`
|
|
|
20901
20923
|
vertical-align: middle;
|
|
20902
20924
|
user-select: none;
|
|
20903
20925
|
`;
|
|
20904
|
-
var SwitchInput =
|
|
20926
|
+
var SwitchInput = import_react131.css`
|
|
20905
20927
|
appearance: none;
|
|
20906
20928
|
border-radius: var(--rounded-full);
|
|
20907
20929
|
background-color: var(--white);
|
|
@@ -20939,7 +20961,7 @@ var SwitchInput = import_react130.css`
|
|
|
20939
20961
|
cursor: not-allowed;
|
|
20940
20962
|
}
|
|
20941
20963
|
`;
|
|
20942
|
-
var SwitchInputDisabled =
|
|
20964
|
+
var SwitchInputDisabled = import_react131.css`
|
|
20943
20965
|
opacity: var(--opacity-50);
|
|
20944
20966
|
cursor: not-allowed;
|
|
20945
20967
|
|
|
@@ -20947,7 +20969,7 @@ var SwitchInputDisabled = import_react130.css`
|
|
|
20947
20969
|
cursor: not-allowed;
|
|
20948
20970
|
}
|
|
20949
20971
|
`;
|
|
20950
|
-
var SwitchInputLabel =
|
|
20972
|
+
var SwitchInputLabel = import_react131.css`
|
|
20951
20973
|
align-items: center;
|
|
20952
20974
|
color: var(--brand-secondary-1);
|
|
20953
20975
|
display: inline-flex;
|
|
@@ -20969,7 +20991,7 @@ var SwitchInputLabel = import_react130.css`
|
|
|
20969
20991
|
top: 0;
|
|
20970
20992
|
}
|
|
20971
20993
|
`;
|
|
20972
|
-
var SwitchText =
|
|
20994
|
+
var SwitchText = import_react131.css`
|
|
20973
20995
|
color: var(--gray-500);
|
|
20974
20996
|
font-size: var(--fs-sm);
|
|
20975
20997
|
padding-inline: var(--spacing-2xl) 0;
|
|
@@ -21000,8 +21022,8 @@ var React24 = __toESM(require("react"));
|
|
|
21000
21022
|
|
|
21001
21023
|
// src/components/Table/Table.styles.ts
|
|
21002
21024
|
init_emotion_jsx_shim();
|
|
21003
|
-
var
|
|
21004
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
21025
|
+
var import_react132 = require("@emotion/react");
|
|
21026
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react132.css`
|
|
21005
21027
|
border-bottom: 1px solid var(--gray-400);
|
|
21006
21028
|
border-collapse: collapse;
|
|
21007
21029
|
min-width: 100%;
|
|
@@ -21012,15 +21034,15 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
21012
21034
|
padding: ${cellPadding};
|
|
21013
21035
|
}
|
|
21014
21036
|
`;
|
|
21015
|
-
var tableHead =
|
|
21037
|
+
var tableHead = import_react132.css`
|
|
21016
21038
|
background: var(--gray-100);
|
|
21017
21039
|
color: var(--brand-secondary-1);
|
|
21018
21040
|
text-align: left;
|
|
21019
21041
|
`;
|
|
21020
|
-
var tableRow =
|
|
21042
|
+
var tableRow = import_react132.css`
|
|
21021
21043
|
border-bottom: 1px solid var(--gray-200);
|
|
21022
21044
|
`;
|
|
21023
|
-
var tableCellHead =
|
|
21045
|
+
var tableCellHead = import_react132.css`
|
|
21024
21046
|
font-size: var(--fs-sm);
|
|
21025
21047
|
text-transform: uppercase;
|
|
21026
21048
|
font-weight: var(--fw-bold);
|
|
@@ -21066,13 +21088,13 @@ var TableCellData = React24.forwardRef(
|
|
|
21066
21088
|
|
|
21067
21089
|
// src/components/Tabs/Tabs.tsx
|
|
21068
21090
|
init_emotion_jsx_shim();
|
|
21069
|
-
var
|
|
21091
|
+
var import_react134 = require("react");
|
|
21070
21092
|
var import_Tab = require("reakit/Tab");
|
|
21071
21093
|
|
|
21072
21094
|
// src/components/Tabs/Tabs.styles.ts
|
|
21073
21095
|
init_emotion_jsx_shim();
|
|
21074
|
-
var
|
|
21075
|
-
var tabButtonStyles =
|
|
21096
|
+
var import_react133 = require("@emotion/react");
|
|
21097
|
+
var tabButtonStyles = import_react133.css`
|
|
21076
21098
|
align-items: center;
|
|
21077
21099
|
border: 0;
|
|
21078
21100
|
height: 2.5rem;
|
|
@@ -21089,7 +21111,7 @@ var tabButtonStyles = import_react132.css`
|
|
|
21089
21111
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21090
21112
|
}
|
|
21091
21113
|
`;
|
|
21092
|
-
var tabButtonGroupStyles =
|
|
21114
|
+
var tabButtonGroupStyles = import_react133.css`
|
|
21093
21115
|
display: flex;
|
|
21094
21116
|
gap: var(--spacing-base);
|
|
21095
21117
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -21097,22 +21119,22 @@ var tabButtonGroupStyles = import_react132.css`
|
|
|
21097
21119
|
|
|
21098
21120
|
// src/components/Tabs/Tabs.tsx
|
|
21099
21121
|
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
21100
|
-
var CurrentTabContext = (0,
|
|
21122
|
+
var CurrentTabContext = (0, import_react134.createContext)(null);
|
|
21101
21123
|
var useCurrentTab = () => {
|
|
21102
|
-
const context = (0,
|
|
21124
|
+
const context = (0, import_react134.useContext)(CurrentTabContext);
|
|
21103
21125
|
if (!context) {
|
|
21104
21126
|
throw new Error("This component can only be used inside <Tabs>");
|
|
21105
21127
|
}
|
|
21106
21128
|
return context;
|
|
21107
21129
|
};
|
|
21108
21130
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
21109
|
-
const selected = (0,
|
|
21131
|
+
const selected = (0, import_react134.useMemo)(() => {
|
|
21110
21132
|
if (selectedId)
|
|
21111
21133
|
return selectedId;
|
|
21112
21134
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
21113
21135
|
}, [selectedId, useHashForState]);
|
|
21114
21136
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
21115
|
-
(0,
|
|
21137
|
+
(0, import_react134.useEffect)(() => {
|
|
21116
21138
|
var _a;
|
|
21117
21139
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
21118
21140
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -21120,7 +21142,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
21120
21142
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
21121
21143
|
}
|
|
21122
21144
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
21123
|
-
(0,
|
|
21145
|
+
(0, import_react134.useEffect)(() => {
|
|
21124
21146
|
if (selected && selected !== tab.selectedId) {
|
|
21125
21147
|
tab.setSelectedId(selected);
|
|
21126
21148
|
}
|
|
@@ -21145,8 +21167,8 @@ init_emotion_jsx_shim();
|
|
|
21145
21167
|
|
|
21146
21168
|
// src/components/Validation/StatusBullet.styles.ts
|
|
21147
21169
|
init_emotion_jsx_shim();
|
|
21148
|
-
var
|
|
21149
|
-
var StatusBulletContainer =
|
|
21170
|
+
var import_react135 = require("@emotion/react");
|
|
21171
|
+
var StatusBulletContainer = import_react135.css`
|
|
21150
21172
|
align-items: center;
|
|
21151
21173
|
align-self: center;
|
|
21152
21174
|
color: var(--gray-500);
|
|
@@ -21163,33 +21185,33 @@ var StatusBulletContainer = import_react134.css`
|
|
|
21163
21185
|
display: block;
|
|
21164
21186
|
}
|
|
21165
21187
|
`;
|
|
21166
|
-
var StatusBulletBase =
|
|
21188
|
+
var StatusBulletBase = import_react135.css`
|
|
21167
21189
|
font-size: var(--fs-sm);
|
|
21168
21190
|
&:before {
|
|
21169
21191
|
width: var(--fs-xs);
|
|
21170
21192
|
height: var(--fs-xs);
|
|
21171
21193
|
}
|
|
21172
21194
|
`;
|
|
21173
|
-
var StatusBulletSmall =
|
|
21195
|
+
var StatusBulletSmall = import_react135.css`
|
|
21174
21196
|
font-size: var(--fs-xs);
|
|
21175
21197
|
&:before {
|
|
21176
21198
|
width: var(--fs-xxs);
|
|
21177
21199
|
height: var(--fs-xxs);
|
|
21178
21200
|
}
|
|
21179
21201
|
`;
|
|
21180
|
-
var StatusDraft =
|
|
21202
|
+
var StatusDraft = import_react135.css`
|
|
21181
21203
|
&:before {
|
|
21182
21204
|
background: var(--white);
|
|
21183
21205
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21184
21206
|
}
|
|
21185
21207
|
`;
|
|
21186
|
-
var StatusModified =
|
|
21208
|
+
var StatusModified = import_react135.css`
|
|
21187
21209
|
&:before {
|
|
21188
21210
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
21189
21211
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21190
21212
|
}
|
|
21191
21213
|
`;
|
|
21192
|
-
var StatusError =
|
|
21214
|
+
var StatusError = import_react135.css`
|
|
21193
21215
|
color: var(--error);
|
|
21194
21216
|
&:before {
|
|
21195
21217
|
/* TODO: replace this with an svg icon */
|
|
@@ -21202,12 +21224,12 @@ var StatusError = import_react134.css`
|
|
|
21202
21224
|
);
|
|
21203
21225
|
}
|
|
21204
21226
|
`;
|
|
21205
|
-
var StatusPublished =
|
|
21227
|
+
var StatusPublished = import_react135.css`
|
|
21206
21228
|
&:before {
|
|
21207
21229
|
background: var(--primary-action-default);
|
|
21208
21230
|
}
|
|
21209
21231
|
`;
|
|
21210
|
-
var StatusOrphan =
|
|
21232
|
+
var StatusOrphan = import_react135.css`
|
|
21211
21233
|
&:before {
|
|
21212
21234
|
background: var(--brand-secondary-5);
|
|
21213
21235
|
}
|