@uniformdev/design-system 19.56.0 → 19.56.1-alpha.22
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 +112 -98
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +154 -140
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18356,7 +18356,7 @@ var ParameterGroup = (0, import_react102.forwardRef)(
|
|
|
18356
18356
|
|
|
18357
18357
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18358
18358
|
init_emotion_jsx_shim();
|
|
18359
|
-
var
|
|
18359
|
+
var import_react109 = require("react");
|
|
18360
18360
|
|
|
18361
18361
|
// src/components/ParameterInputs/ParameterImagePreview.tsx
|
|
18362
18362
|
init_emotion_jsx_shim();
|
|
@@ -18437,7 +18437,8 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
|
|
|
18437
18437
|
|
|
18438
18438
|
// src/components/ParameterInputs/ParameterShell.tsx
|
|
18439
18439
|
init_emotion_jsx_shim();
|
|
18440
|
-
var import_react107 = require("react");
|
|
18440
|
+
var import_react107 = require("@emotion/react");
|
|
18441
|
+
var import_react108 = require("react");
|
|
18441
18442
|
|
|
18442
18443
|
// src/components/ParameterInputs/ParameterLabel.tsx
|
|
18443
18444
|
init_emotion_jsx_shim();
|
|
@@ -18555,13 +18556,14 @@ var ParameterShell = ({
|
|
|
18555
18556
|
errorTestId,
|
|
18556
18557
|
captionTestId,
|
|
18557
18558
|
menuItems,
|
|
18559
|
+
actionItems,
|
|
18558
18560
|
hasOverriddenValue,
|
|
18559
18561
|
onResetOverriddenValue,
|
|
18560
18562
|
title: title2,
|
|
18561
18563
|
children,
|
|
18562
18564
|
...props
|
|
18563
18565
|
}) => {
|
|
18564
|
-
const [manualErrorMessage, setManualErrorMessage] = (0,
|
|
18566
|
+
const [manualErrorMessage, setManualErrorMessage] = (0, import_react108.useState)(void 0);
|
|
18565
18567
|
const setErrorMessage = (message) => setManualErrorMessage(message);
|
|
18566
18568
|
const errorMessaging = errorMessage || manualErrorMessage;
|
|
18567
18569
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputContainer2, ...props, children: [
|
|
@@ -18576,6 +18578,18 @@ var ParameterShell = ({
|
|
|
18576
18578
|
labelTrailingIcon != null ? labelTrailingIcon : null
|
|
18577
18579
|
] }),
|
|
18578
18580
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { css: inputWrapper, children: [
|
|
18581
|
+
actionItems ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
18582
|
+
"div",
|
|
18583
|
+
{
|
|
18584
|
+
css: [
|
|
18585
|
+
inputMenu,
|
|
18586
|
+
menuItems ? import_react107.css`
|
|
18587
|
+
right: var(--spacing-md);
|
|
18588
|
+
` : void 0
|
|
18589
|
+
],
|
|
18590
|
+
children: actionItems
|
|
18591
|
+
}
|
|
18592
|
+
) : null,
|
|
18579
18593
|
menuItems ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
|
|
18580
18594
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
18581
18595
|
ParameterShellContext.Provider,
|
|
@@ -18607,7 +18621,7 @@ var ParameterOverrideMarker = (props) => /* @__PURE__ */ (0, import_jsx_runtime9
|
|
|
18607
18621
|
|
|
18608
18622
|
// src/components/ParameterInputs/ParameterImage.tsx
|
|
18609
18623
|
var import_jsx_runtime97 = require("@emotion/react/jsx-runtime");
|
|
18610
|
-
var ParameterImage = (0,
|
|
18624
|
+
var ParameterImage = (0, import_react109.forwardRef)(
|
|
18611
18625
|
({ children, ...props }, ref) => {
|
|
18612
18626
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18613
18627
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(ParameterShell, { "data-test-id": "parameter-image", ...shellProps, children: [
|
|
@@ -18616,10 +18630,10 @@ var ParameterImage = (0, import_react108.forwardRef)(
|
|
|
18616
18630
|
] });
|
|
18617
18631
|
}
|
|
18618
18632
|
);
|
|
18619
|
-
var ParameterImageInner = (0,
|
|
18633
|
+
var ParameterImageInner = (0, import_react109.forwardRef)((props, ref) => {
|
|
18620
18634
|
const { value } = props;
|
|
18621
18635
|
const { id, label, hiddenLabel, errorMessage } = useParameterShell();
|
|
18622
|
-
const deferredValue = (0,
|
|
18636
|
+
const deferredValue = (0, import_react109.useDeferredValue)(value);
|
|
18623
18637
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
18624
18638
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
18625
18639
|
"input",
|
|
@@ -18639,13 +18653,13 @@ var ParameterImageInner = (0, import_react108.forwardRef)((props, ref) => {
|
|
|
18639
18653
|
|
|
18640
18654
|
// src/components/ParameterInputs/ParameterInput.tsx
|
|
18641
18655
|
init_emotion_jsx_shim();
|
|
18642
|
-
var
|
|
18656
|
+
var import_react110 = require("react");
|
|
18643
18657
|
var import_jsx_runtime98 = require("@emotion/react/jsx-runtime");
|
|
18644
|
-
var ParameterInput = (0,
|
|
18658
|
+
var ParameterInput = (0, import_react110.forwardRef)((props, ref) => {
|
|
18645
18659
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18646
18660
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterShell, { "data-testid": "parameter-input", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ParameterInputInner, { ref, ...innerProps }) });
|
|
18647
18661
|
});
|
|
18648
|
-
var ParameterInputInner = (0,
|
|
18662
|
+
var ParameterInputInner = (0, import_react110.forwardRef)(
|
|
18649
18663
|
({ ...props }, ref) => {
|
|
18650
18664
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18651
18665
|
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
@@ -18665,9 +18679,9 @@ var ParameterInputInner = (0, import_react109.forwardRef)(
|
|
|
18665
18679
|
|
|
18666
18680
|
// src/components/ParameterInputs/ParameterLink.tsx
|
|
18667
18681
|
init_emotion_jsx_shim();
|
|
18668
|
-
var
|
|
18682
|
+
var import_react111 = require("react");
|
|
18669
18683
|
var import_jsx_runtime99 = require("@emotion/react/jsx-runtime");
|
|
18670
|
-
var ParameterLink = (0,
|
|
18684
|
+
var ParameterLink = (0, import_react111.forwardRef)(
|
|
18671
18685
|
({ disabled, onConnectLink, externalLink, ...props }, ref) => {
|
|
18672
18686
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
18673
18687
|
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
@@ -18690,7 +18704,7 @@ var ParameterLink = (0, import_react110.forwardRef)(
|
|
|
18690
18704
|
);
|
|
18691
18705
|
}
|
|
18692
18706
|
);
|
|
18693
|
-
var ParameterLinkInner = (0,
|
|
18707
|
+
var ParameterLinkInner = (0, import_react111.forwardRef)(
|
|
18694
18708
|
({ externalLink, onConnectLink, disabled, buttonText = "Select link", ...props }, ref) => {
|
|
18695
18709
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
18696
18710
|
if (!props.value)
|
|
@@ -18816,7 +18830,7 @@ var ParameterNameAndPublicIdInput = ({
|
|
|
18816
18830
|
|
|
18817
18831
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18818
18832
|
init_emotion_jsx_shim();
|
|
18819
|
-
var
|
|
18833
|
+
var import_react118 = require("@emotion/react");
|
|
18820
18834
|
var import_list3 = require("@lexical/list");
|
|
18821
18835
|
var import_markdown = require("@lexical/markdown");
|
|
18822
18836
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
@@ -18923,7 +18937,7 @@ var getLabelForElement = (type) => {
|
|
|
18923
18937
|
// src/components/ParameterInputs/ParameterRichText.tsx
|
|
18924
18938
|
var import_fast_equals2 = require("fast-equals");
|
|
18925
18939
|
var import_lexical6 = require("lexical");
|
|
18926
|
-
var
|
|
18940
|
+
var import_react119 = require("react");
|
|
18927
18941
|
|
|
18928
18942
|
// src/components/ParameterInputs/rich-text/CustomCodeNode.ts
|
|
18929
18943
|
init_emotion_jsx_shim();
|
|
@@ -18946,10 +18960,10 @@ init_emotion_jsx_shim();
|
|
|
18946
18960
|
var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
18947
18961
|
var import_utils2 = require("@lexical/utils");
|
|
18948
18962
|
var import_lexical = require("lexical");
|
|
18949
|
-
var
|
|
18963
|
+
var import_react112 = require("react");
|
|
18950
18964
|
function DisableStylesPlugin() {
|
|
18951
18965
|
const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
|
|
18952
|
-
(0,
|
|
18966
|
+
(0, import_react112.useEffect)(() => {
|
|
18953
18967
|
return (0, import_utils2.mergeRegister)(
|
|
18954
18968
|
// Disable text alignment on paragraph nodes
|
|
18955
18969
|
editor.registerNodeTransform(import_lexical.ParagraphNode, (node) => {
|
|
@@ -19144,13 +19158,13 @@ var codeElement = import_css.css`
|
|
|
19144
19158
|
|
|
19145
19159
|
// src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
|
|
19146
19160
|
init_emotion_jsx_shim();
|
|
19147
|
-
var
|
|
19161
|
+
var import_react113 = require("@emotion/react");
|
|
19148
19162
|
var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
|
|
19149
19163
|
var import_LexicalNodeEventPlugin = require("@lexical/react/LexicalNodeEventPlugin");
|
|
19150
19164
|
var import_utils3 = require("@lexical/utils");
|
|
19151
19165
|
var import_fast_equals = require("fast-equals");
|
|
19152
19166
|
var import_lexical3 = require("lexical");
|
|
19153
|
-
var
|
|
19167
|
+
var import_react114 = require("react");
|
|
19154
19168
|
|
|
19155
19169
|
// src/components/ParameterInputs/rich-text/utils.ts
|
|
19156
19170
|
init_emotion_jsx_shim();
|
|
@@ -19476,16 +19490,16 @@ var OPEN_LINK_NODE_MODAL_COMMAND = (0, import_lexical3.createCommand)(
|
|
|
19476
19490
|
);
|
|
19477
19491
|
var LINK_POPOVER_OFFSET_X = 0;
|
|
19478
19492
|
var LINK_POPOVER_OFFSET_Y = 8;
|
|
19479
|
-
var linkPopover =
|
|
19493
|
+
var linkPopover = import_react113.css`
|
|
19480
19494
|
position: absolute;
|
|
19481
19495
|
z-index: 5;
|
|
19482
19496
|
`;
|
|
19483
|
-
var linkPopoverContainer =
|
|
19497
|
+
var linkPopoverContainer = import_react113.css`
|
|
19484
19498
|
${Popover};
|
|
19485
19499
|
align-items: center;
|
|
19486
19500
|
display: flex;
|
|
19487
19501
|
`;
|
|
19488
|
-
var linkPopoverAnchor =
|
|
19502
|
+
var linkPopoverAnchor = import_react113.css`
|
|
19489
19503
|
${link}
|
|
19490
19504
|
${linkColorDefault}
|
|
19491
19505
|
`;
|
|
@@ -19494,17 +19508,17 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19494
19508
|
return path;
|
|
19495
19509
|
};
|
|
19496
19510
|
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,
|
|
19511
|
+
const [linkPopoverState, setLinkPopoverState] = (0, import_react114.useState)();
|
|
19512
|
+
const linkPopoverElRef = (0, import_react114.useRef)(null);
|
|
19513
|
+
const [isEditorFocused, setIsEditorFocused] = (0, import_react114.useState)(false);
|
|
19514
|
+
const [isLinkPopoverFocused, setIsLinkPopoverFocused] = (0, import_react114.useState)(false);
|
|
19515
|
+
(0, import_react114.useEffect)(() => {
|
|
19502
19516
|
if (!isEditorFocused && !isLinkPopoverFocused) {
|
|
19503
19517
|
setLinkPopoverState(void 0);
|
|
19504
19518
|
return;
|
|
19505
19519
|
}
|
|
19506
19520
|
}, [isEditorFocused, isLinkPopoverFocused]);
|
|
19507
|
-
(0,
|
|
19521
|
+
(0, import_react114.useEffect)(() => {
|
|
19508
19522
|
if (!editor.hasNodes([LinkNode])) {
|
|
19509
19523
|
throw new Error("LinkNode not registered on editor");
|
|
19510
19524
|
}
|
|
@@ -19573,7 +19587,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19573
19587
|
)
|
|
19574
19588
|
);
|
|
19575
19589
|
}, [editor, onConnectLink]);
|
|
19576
|
-
const maybeShowLinkToolbar = (0,
|
|
19590
|
+
const maybeShowLinkToolbar = (0, import_react114.useCallback)(() => {
|
|
19577
19591
|
if (!editor.isEditable()) {
|
|
19578
19592
|
return;
|
|
19579
19593
|
}
|
|
@@ -19605,7 +19619,7 @@ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
|
|
|
19605
19619
|
}
|
|
19606
19620
|
});
|
|
19607
19621
|
}, [editor]);
|
|
19608
|
-
(0,
|
|
19622
|
+
(0, import_react114.useEffect)(() => {
|
|
19609
19623
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19610
19624
|
requestAnimationFrame(() => {
|
|
19611
19625
|
editorState.read(() => {
|
|
@@ -19693,7 +19707,7 @@ var import_list = require("@lexical/list");
|
|
|
19693
19707
|
var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
|
|
19694
19708
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
19695
19709
|
var import_lexical4 = require("lexical");
|
|
19696
|
-
var
|
|
19710
|
+
var import_react115 = require("react");
|
|
19697
19711
|
var import_jsx_runtime102 = require("@emotion/react/jsx-runtime");
|
|
19698
19712
|
function isIndentPermitted(maxDepth) {
|
|
19699
19713
|
const selection = (0, import_lexical4.$getSelection)();
|
|
@@ -19717,7 +19731,7 @@ function isIndentPermitted(maxDepth) {
|
|
|
19717
19731
|
}
|
|
19718
19732
|
function ListIndentPlugin({ maxDepth }) {
|
|
19719
19733
|
const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
|
|
19720
|
-
(0,
|
|
19734
|
+
(0, import_react115.useEffect)(() => {
|
|
19721
19735
|
return editor.registerCommand(
|
|
19722
19736
|
import_lexical4.INDENT_CONTENT_COMMAND,
|
|
19723
19737
|
() => !isIndentPermitted(maxDepth),
|
|
@@ -19729,7 +19743,7 @@ function ListIndentPlugin({ maxDepth }) {
|
|
|
19729
19743
|
|
|
19730
19744
|
// src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
|
|
19731
19745
|
init_emotion_jsx_shim();
|
|
19732
|
-
var
|
|
19746
|
+
var import_react116 = require("@emotion/react");
|
|
19733
19747
|
var import_code2 = require("@lexical/code");
|
|
19734
19748
|
var import_list2 = require("@lexical/list");
|
|
19735
19749
|
var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerContext");
|
|
@@ -19737,9 +19751,9 @@ var import_rich_text = require("@lexical/rich-text");
|
|
|
19737
19751
|
var import_selection2 = require("@lexical/selection");
|
|
19738
19752
|
var import_utils6 = require("@lexical/utils");
|
|
19739
19753
|
var import_lexical5 = require("lexical");
|
|
19740
|
-
var
|
|
19754
|
+
var import_react117 = require("react");
|
|
19741
19755
|
var import_jsx_runtime103 = require("@emotion/react/jsx-runtime");
|
|
19742
|
-
var toolbar =
|
|
19756
|
+
var toolbar = import_react116.css`
|
|
19743
19757
|
background: var(--gray-50);
|
|
19744
19758
|
border-radius: var(--rounded-base);
|
|
19745
19759
|
display: flex;
|
|
@@ -19751,7 +19765,7 @@ var toolbar = import_react115.css`
|
|
|
19751
19765
|
top: calc(var(--spacing-sm) * -2);
|
|
19752
19766
|
z-index: 10;
|
|
19753
19767
|
`;
|
|
19754
|
-
var toolbarGroup =
|
|
19768
|
+
var toolbarGroup = import_react116.css`
|
|
19755
19769
|
display: flex;
|
|
19756
19770
|
gap: var(--spacing-xs);
|
|
19757
19771
|
position: relative;
|
|
@@ -19767,7 +19781,7 @@ var toolbarGroup = import_react115.css`
|
|
|
19767
19781
|
width: 1px;
|
|
19768
19782
|
}
|
|
19769
19783
|
`;
|
|
19770
|
-
var richTextToolbarButton =
|
|
19784
|
+
var richTextToolbarButton = import_react116.css`
|
|
19771
19785
|
align-items: center;
|
|
19772
19786
|
appearance: none;
|
|
19773
19787
|
border: 0;
|
|
@@ -19780,13 +19794,13 @@ var richTextToolbarButton = import_react115.css`
|
|
|
19780
19794
|
min-width: 32px;
|
|
19781
19795
|
padding: 0 var(--spacing-sm);
|
|
19782
19796
|
`;
|
|
19783
|
-
var richTextToolbarButtonActive =
|
|
19797
|
+
var richTextToolbarButtonActive = import_react116.css`
|
|
19784
19798
|
background: var(--gray-200);
|
|
19785
19799
|
`;
|
|
19786
|
-
var toolbarIcon =
|
|
19800
|
+
var toolbarIcon = import_react116.css`
|
|
19787
19801
|
color: inherit;
|
|
19788
19802
|
`;
|
|
19789
|
-
var toolbarChevron =
|
|
19803
|
+
var toolbarChevron = import_react116.css`
|
|
19790
19804
|
margin-left: var(--spacing-xs);
|
|
19791
19805
|
`;
|
|
19792
19806
|
var RichTextToolbarIcon = ({ icon }) => {
|
|
@@ -19841,7 +19855,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19841
19855
|
}
|
|
19842
19856
|
});
|
|
19843
19857
|
};
|
|
19844
|
-
const updateToolbar = (0,
|
|
19858
|
+
const updateToolbar = (0, import_react117.useCallback)(() => {
|
|
19845
19859
|
const selection = (0, import_lexical5.$getSelection)();
|
|
19846
19860
|
if (!(0, import_lexical5.$isRangeSelection)(selection)) {
|
|
19847
19861
|
return;
|
|
@@ -19880,7 +19894,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19880
19894
|
setIsLink(false);
|
|
19881
19895
|
}
|
|
19882
19896
|
}, [editor, setActiveElement, setActiveFormats, setIsLink]);
|
|
19883
|
-
(0,
|
|
19897
|
+
(0, import_react117.useEffect)(() => {
|
|
19884
19898
|
return editor.registerCommand(
|
|
19885
19899
|
import_lexical5.SELECTION_CHANGE_COMMAND,
|
|
19886
19900
|
(_payload) => {
|
|
@@ -19890,7 +19904,7 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
19890
19904
|
import_lexical5.COMMAND_PRIORITY_CRITICAL
|
|
19891
19905
|
);
|
|
19892
19906
|
}, [editor, updateToolbar]);
|
|
19893
|
-
(0,
|
|
19907
|
+
(0, import_react117.useEffect)(() => {
|
|
19894
19908
|
return editor.registerUpdateListener(({ editorState }) => {
|
|
19895
19909
|
requestAnimationFrame(() => {
|
|
19896
19910
|
editorState.read(() => {
|
|
@@ -20030,26 +20044,26 @@ var RichTextToolbar = ({ config, customControls }) => {
|
|
|
20030
20044
|
var RichTextToolbar_default = RichTextToolbar;
|
|
20031
20045
|
var useRichTextToolbarState = ({ config }) => {
|
|
20032
20046
|
var _a;
|
|
20033
|
-
const enabledBuiltInFormats = (0,
|
|
20047
|
+
const enabledBuiltInFormats = (0, import_react117.useMemo)(() => {
|
|
20034
20048
|
return richTextBuiltInFormats.filter((format) => {
|
|
20035
20049
|
var _a2, _b;
|
|
20036
20050
|
return (_b = (_a2 = config == null ? void 0 : config.formatting) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(format.type);
|
|
20037
20051
|
});
|
|
20038
20052
|
}, [config]);
|
|
20039
|
-
const enabledBuiltInElements = (0,
|
|
20053
|
+
const enabledBuiltInElements = (0, import_react117.useMemo)(() => {
|
|
20040
20054
|
return richTextBuiltInElements.filter((element) => {
|
|
20041
20055
|
var _a2, _b;
|
|
20042
20056
|
return (_b = (_a2 = config == null ? void 0 : config.elements) == null ? void 0 : _a2.builtIn) == null ? void 0 : _b.includes(element.type);
|
|
20043
20057
|
});
|
|
20044
20058
|
}, [config]);
|
|
20045
|
-
const enabledBuiltInFormatsWithIcon = (0,
|
|
20059
|
+
const enabledBuiltInFormatsWithIcon = (0, import_react117.useMemo)(() => {
|
|
20046
20060
|
return enabledBuiltInFormats.filter((format) => FORMATS_WITH_ICON.has(format.type));
|
|
20047
20061
|
}, [enabledBuiltInFormats]);
|
|
20048
20062
|
const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
|
|
20049
20063
|
(format) => !FORMATS_WITH_ICON.has(format.type)
|
|
20050
20064
|
);
|
|
20051
|
-
const [activeFormats, setActiveFormats] = (0,
|
|
20052
|
-
const visibleFormatsWithIcon = (0,
|
|
20065
|
+
const [activeFormats, setActiveFormats] = (0, import_react117.useState)([]);
|
|
20066
|
+
const visibleFormatsWithIcon = (0, import_react117.useMemo)(() => {
|
|
20053
20067
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20054
20068
|
activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20055
20069
|
visibleFormats.add(type);
|
|
@@ -20059,7 +20073,7 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20059
20073
|
});
|
|
20060
20074
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20061
20075
|
}, [activeFormats, enabledBuiltInFormatsWithIcon]);
|
|
20062
|
-
const visibleFormatsWithoutIcon = (0,
|
|
20076
|
+
const visibleFormatsWithoutIcon = (0, import_react117.useMemo)(() => {
|
|
20063
20077
|
const visibleFormats = /* @__PURE__ */ new Set();
|
|
20064
20078
|
activeFormats.filter((type) => !FORMATS_WITH_ICON.has(type)).forEach((type) => {
|
|
20065
20079
|
visibleFormats.add(type);
|
|
@@ -20069,11 +20083,11 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20069
20083
|
});
|
|
20070
20084
|
return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
|
|
20071
20085
|
}, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
|
|
20072
|
-
const [activeElement, setActiveElement] = (0,
|
|
20086
|
+
const [activeElement, setActiveElement] = (0, import_react117.useState)("paragraph");
|
|
20073
20087
|
const enabledTextualElements = enabledBuiltInElements.filter(
|
|
20074
20088
|
(element) => TEXTUAL_ELEMENTS.includes(element.type)
|
|
20075
20089
|
);
|
|
20076
|
-
const visibleTextualElements = (0,
|
|
20090
|
+
const visibleTextualElements = (0, import_react117.useMemo)(() => {
|
|
20077
20091
|
if (!TEXTUAL_ELEMENTS.includes(activeElement)) {
|
|
20078
20092
|
return enabledTextualElements;
|
|
20079
20093
|
}
|
|
@@ -20084,24 +20098,24 @@ var useRichTextToolbarState = ({ config }) => {
|
|
|
20084
20098
|
}
|
|
20085
20099
|
);
|
|
20086
20100
|
}, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
|
|
20087
|
-
const [isLink, setIsLink] = (0,
|
|
20088
|
-
const linkElementVisible = (0,
|
|
20101
|
+
const [isLink, setIsLink] = (0, import_react117.useState)(false);
|
|
20102
|
+
const linkElementVisible = (0, import_react117.useMemo)(() => {
|
|
20089
20103
|
return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
|
|
20090
20104
|
}, [isLink, enabledBuiltInElements]);
|
|
20091
|
-
const visibleLists = (0,
|
|
20105
|
+
const visibleLists = (0, import_react117.useMemo)(() => {
|
|
20092
20106
|
return new Set(
|
|
20093
20107
|
["orderedList", "unorderedList"].filter(
|
|
20094
20108
|
(type) => enabledBuiltInElements.some((element) => element.type === type) || activeElement === type
|
|
20095
20109
|
)
|
|
20096
20110
|
);
|
|
20097
20111
|
}, [activeElement, enabledBuiltInElements]);
|
|
20098
|
-
const quoteElementVisible = (0,
|
|
20112
|
+
const quoteElementVisible = (0, import_react117.useMemo)(() => {
|
|
20099
20113
|
return enabledBuiltInElements.some((element) => element.type === "quote") || activeElement === "quote";
|
|
20100
20114
|
}, [activeElement, enabledBuiltInElements]);
|
|
20101
|
-
const codeElementVisible = (0,
|
|
20115
|
+
const codeElementVisible = (0, import_react117.useMemo)(() => {
|
|
20102
20116
|
return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
|
|
20103
20117
|
}, [activeElement, enabledBuiltInElements]);
|
|
20104
|
-
const visibleElementsWithIcons = (0,
|
|
20118
|
+
const visibleElementsWithIcons = (0, import_react117.useMemo)(() => {
|
|
20105
20119
|
const visibleElements = /* @__PURE__ */ new Set();
|
|
20106
20120
|
if (linkElementVisible) {
|
|
20107
20121
|
visibleElements.add("link");
|
|
@@ -20200,18 +20214,18 @@ var ParameterRichText = ({
|
|
|
20200
20214
|
}
|
|
20201
20215
|
);
|
|
20202
20216
|
};
|
|
20203
|
-
var editorWrapper =
|
|
20217
|
+
var editorWrapper = import_react118.css`
|
|
20204
20218
|
display: flex;
|
|
20205
20219
|
flex-flow: column;
|
|
20206
20220
|
flex-grow: 1;
|
|
20207
20221
|
`;
|
|
20208
|
-
var editorContainer =
|
|
20222
|
+
var editorContainer = import_react118.css`
|
|
20209
20223
|
display: flex;
|
|
20210
20224
|
flex-flow: column;
|
|
20211
20225
|
flex-grow: 1;
|
|
20212
20226
|
position: relative;
|
|
20213
20227
|
`;
|
|
20214
|
-
var editorPlaceholder =
|
|
20228
|
+
var editorPlaceholder = import_react118.css`
|
|
20215
20229
|
color: var(--gray-500);
|
|
20216
20230
|
font-style: italic;
|
|
20217
20231
|
/* 1px is added to make sure caret is clearly visible when field is focused
|
|
@@ -20222,7 +20236,7 @@ var editorPlaceholder = import_react117.css`
|
|
|
20222
20236
|
top: var(--spacing-xs);
|
|
20223
20237
|
user-select: none;
|
|
20224
20238
|
`;
|
|
20225
|
-
var editorInput =
|
|
20239
|
+
var editorInput = import_react118.css`
|
|
20226
20240
|
background: var(--white);
|
|
20227
20241
|
border: 1px solid var(--white);
|
|
20228
20242
|
border-radius: var(--rounded-sm);
|
|
@@ -20344,14 +20358,14 @@ var RichText = ({
|
|
|
20344
20358
|
variables,
|
|
20345
20359
|
customControls
|
|
20346
20360
|
}) => {
|
|
20347
|
-
const editorContainerRef = (0,
|
|
20361
|
+
const editorContainerRef = (0, import_react119.useRef)(null);
|
|
20348
20362
|
const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
|
|
20349
|
-
(0,
|
|
20363
|
+
(0, import_react119.useEffect)(() => {
|
|
20350
20364
|
if (onRichTextInit) {
|
|
20351
20365
|
onRichTextInit(editor);
|
|
20352
20366
|
}
|
|
20353
20367
|
}, [editor, onRichTextInit]);
|
|
20354
|
-
(0,
|
|
20368
|
+
(0, import_react119.useEffect)(() => {
|
|
20355
20369
|
const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
|
|
20356
20370
|
requestAnimationFrame(() => {
|
|
20357
20371
|
if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
|
|
@@ -20396,15 +20410,15 @@ var RichText = ({
|
|
|
20396
20410
|
|
|
20397
20411
|
// src/components/ParameterInputs/ParameterSelect.tsx
|
|
20398
20412
|
init_emotion_jsx_shim();
|
|
20399
|
-
var
|
|
20413
|
+
var import_react120 = require("react");
|
|
20400
20414
|
var import_jsx_runtime105 = require("@emotion/react/jsx-runtime");
|
|
20401
|
-
var ParameterSelect = (0,
|
|
20415
|
+
var ParameterSelect = (0, import_react120.forwardRef)(
|
|
20402
20416
|
({ defaultOption, options, ...props }, ref) => {
|
|
20403
20417
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20404
20418
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
|
|
20405
20419
|
}
|
|
20406
20420
|
);
|
|
20407
|
-
var ParameterSelectInner = (0,
|
|
20421
|
+
var ParameterSelectInner = (0, import_react120.forwardRef)(
|
|
20408
20422
|
({ defaultOption, options, ...props }, ref) => {
|
|
20409
20423
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20410
20424
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
@@ -20429,13 +20443,13 @@ var ParameterSelectInner = (0, import_react119.forwardRef)(
|
|
|
20429
20443
|
|
|
20430
20444
|
// src/components/ParameterInputs/ParameterTextarea.tsx
|
|
20431
20445
|
init_emotion_jsx_shim();
|
|
20432
|
-
var
|
|
20446
|
+
var import_react121 = require("react");
|
|
20433
20447
|
var import_jsx_runtime106 = require("@emotion/react/jsx-runtime");
|
|
20434
|
-
var ParameterTextarea = (0,
|
|
20448
|
+
var ParameterTextarea = (0, import_react121.forwardRef)((props, ref) => {
|
|
20435
20449
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20436
20450
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
|
|
20437
20451
|
});
|
|
20438
|
-
var ParameterTextareaInner = (0,
|
|
20452
|
+
var ParameterTextareaInner = (0, import_react121.forwardRef)(({ ...props }, ref) => {
|
|
20439
20453
|
const { id, label, hiddenLabel } = useParameterShell();
|
|
20440
20454
|
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20441
20455
|
"textarea",
|
|
@@ -20451,13 +20465,13 @@ var ParameterTextareaInner = (0, import_react120.forwardRef)(({ ...props }, ref)
|
|
|
20451
20465
|
|
|
20452
20466
|
// src/components/ParameterInputs/ParameterToggle.tsx
|
|
20453
20467
|
init_emotion_jsx_shim();
|
|
20454
|
-
var
|
|
20468
|
+
var import_react122 = require("react");
|
|
20455
20469
|
var import_jsx_runtime107 = require("@emotion/react/jsx-runtime");
|
|
20456
|
-
var ParameterToggle = (0,
|
|
20470
|
+
var ParameterToggle = (0, import_react122.forwardRef)((props, ref) => {
|
|
20457
20471
|
const { shellProps, innerProps } = extractParameterProps(props);
|
|
20458
20472
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
|
|
20459
20473
|
});
|
|
20460
|
-
var ParameterToggleInner = (0,
|
|
20474
|
+
var ParameterToggleInner = (0, import_react122.forwardRef)(
|
|
20461
20475
|
({ ...props }, ref) => {
|
|
20462
20476
|
const { id, label } = useParameterShell();
|
|
20463
20477
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("label", { css: inputToggleLabel2, children: [
|
|
@@ -20472,8 +20486,8 @@ init_emotion_jsx_shim();
|
|
|
20472
20486
|
|
|
20473
20487
|
// src/components/ProgressBar/ProgressBar.styles.ts
|
|
20474
20488
|
init_emotion_jsx_shim();
|
|
20475
|
-
var
|
|
20476
|
-
var container =
|
|
20489
|
+
var import_react123 = require("@emotion/react");
|
|
20490
|
+
var container = import_react123.css`
|
|
20477
20491
|
background: var(--gray-50);
|
|
20478
20492
|
margin-block: var(--spacing-sm);
|
|
20479
20493
|
position: relative;
|
|
@@ -20483,14 +20497,14 @@ var container = import_react122.css`
|
|
|
20483
20497
|
border: solid 1px var(--gray-300);
|
|
20484
20498
|
`;
|
|
20485
20499
|
var themeMap = {
|
|
20486
|
-
primary:
|
|
20500
|
+
primary: import_react123.css`
|
|
20487
20501
|
background-color: var(--accent-light);
|
|
20488
20502
|
`,
|
|
20489
|
-
secondary:
|
|
20503
|
+
secondary: import_react123.css`
|
|
20490
20504
|
background-color: var(--brand-secondary-5);
|
|
20491
20505
|
`
|
|
20492
20506
|
};
|
|
20493
|
-
var bar =
|
|
20507
|
+
var bar = import_react123.css`
|
|
20494
20508
|
position: absolute;
|
|
20495
20509
|
inset: 0;
|
|
20496
20510
|
transition: transform var(--duration-fast) var(--timing-ease-out);
|
|
@@ -20529,22 +20543,22 @@ function ProgressBar({ className, current, max, theme = "primary" }) {
|
|
|
20529
20543
|
|
|
20530
20544
|
// src/components/ProgressList/ProgressList.tsx
|
|
20531
20545
|
init_emotion_jsx_shim();
|
|
20532
|
-
var
|
|
20546
|
+
var import_react125 = require("@emotion/react");
|
|
20533
20547
|
var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
|
|
20534
20548
|
var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
|
|
20535
20549
|
var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
|
|
20536
|
-
var
|
|
20550
|
+
var import_react126 = require("react");
|
|
20537
20551
|
|
|
20538
20552
|
// src/components/ProgressList/styles/ProgressList.styles.ts
|
|
20539
20553
|
init_emotion_jsx_shim();
|
|
20540
|
-
var
|
|
20541
|
-
var progressListStyles =
|
|
20554
|
+
var import_react124 = require("@emotion/react");
|
|
20555
|
+
var progressListStyles = import_react124.css`
|
|
20542
20556
|
display: flex;
|
|
20543
20557
|
flex-direction: column;
|
|
20544
20558
|
gap: var(--spacing-sm);
|
|
20545
20559
|
list-style-type: none;
|
|
20546
20560
|
`;
|
|
20547
|
-
var progressListItemStyles =
|
|
20561
|
+
var progressListItemStyles = import_react124.css`
|
|
20548
20562
|
display: flex;
|
|
20549
20563
|
gap: var(--spacing-base);
|
|
20550
20564
|
align-items: center;
|
|
@@ -20553,7 +20567,7 @@ var progressListItemStyles = import_react123.css`
|
|
|
20553
20567
|
// src/components/ProgressList/ProgressList.tsx
|
|
20554
20568
|
var import_jsx_runtime109 = require("@emotion/react/jsx-runtime");
|
|
20555
20569
|
var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
|
|
20556
|
-
const itemsWithStatus = (0,
|
|
20570
|
+
const itemsWithStatus = (0, import_react126.useMemo)(() => {
|
|
20557
20571
|
const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
|
|
20558
20572
|
return items.map((item, index) => {
|
|
20559
20573
|
let status = "queued";
|
|
@@ -20586,7 +20600,7 @@ var ProgressListItem = ({
|
|
|
20586
20600
|
errorLevel = "danger",
|
|
20587
20601
|
autoEllipsis = false
|
|
20588
20602
|
}) => {
|
|
20589
|
-
const icon = (0,
|
|
20603
|
+
const icon = (0, import_react126.useMemo)(() => {
|
|
20590
20604
|
if (error) {
|
|
20591
20605
|
return warningIcon;
|
|
20592
20606
|
}
|
|
@@ -20597,14 +20611,14 @@ var ProgressListItem = ({
|
|
|
20597
20611
|
};
|
|
20598
20612
|
return iconPerStatus[status];
|
|
20599
20613
|
}, [status, error]);
|
|
20600
|
-
const statusStyles = (0,
|
|
20614
|
+
const statusStyles = (0, import_react126.useMemo)(() => {
|
|
20601
20615
|
if (error) {
|
|
20602
|
-
return errorLevel === "caution" ?
|
|
20616
|
+
return errorLevel === "caution" ? import_react125.css`
|
|
20603
20617
|
color: rgb(161, 98, 7);
|
|
20604
20618
|
& svg {
|
|
20605
20619
|
color: rgb(250, 204, 21);
|
|
20606
20620
|
}
|
|
20607
|
-
` :
|
|
20621
|
+
` : import_react125.css`
|
|
20608
20622
|
color: rgb(185, 28, 28);
|
|
20609
20623
|
& svg {
|
|
20610
20624
|
color: var(--brand-primary-2);
|
|
@@ -20612,13 +20626,13 @@ var ProgressListItem = ({
|
|
|
20612
20626
|
`;
|
|
20613
20627
|
}
|
|
20614
20628
|
const colorPerStatus = {
|
|
20615
|
-
completed:
|
|
20629
|
+
completed: import_react125.css`
|
|
20616
20630
|
opacity: 0.75;
|
|
20617
20631
|
`,
|
|
20618
|
-
inProgress:
|
|
20632
|
+
inProgress: import_react125.css`
|
|
20619
20633
|
-webkit-text-stroke-width: thin;
|
|
20620
20634
|
`,
|
|
20621
|
-
queued:
|
|
20635
|
+
queued: import_react125.css`
|
|
20622
20636
|
opacity: 0.5;
|
|
20623
20637
|
`
|
|
20624
20638
|
};
|
|
@@ -20635,14 +20649,14 @@ var ProgressListItem = ({
|
|
|
20635
20649
|
|
|
20636
20650
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20637
20651
|
init_emotion_jsx_shim();
|
|
20638
|
-
var
|
|
20652
|
+
var import_react128 = require("@emotion/react");
|
|
20639
20653
|
var import_CgCheck5 = require("@react-icons/all-files/cg/CgCheck");
|
|
20640
|
-
var
|
|
20654
|
+
var import_react129 = require("react");
|
|
20641
20655
|
|
|
20642
20656
|
// src/components/SegmentedControl/SegmentedControl.styles.ts
|
|
20643
20657
|
init_emotion_jsx_shim();
|
|
20644
|
-
var
|
|
20645
|
-
var segmentedControlStyles =
|
|
20658
|
+
var import_react127 = require("@emotion/react");
|
|
20659
|
+
var segmentedControlStyles = import_react127.css`
|
|
20646
20660
|
--segmented-control-rounded-value: var(--rounded-base);
|
|
20647
20661
|
--segmented-control-border-width: 1px;
|
|
20648
20662
|
--segmented-control-selected-color: var(--brand-secondary-3);
|
|
@@ -20661,14 +20675,14 @@ var segmentedControlStyles = import_react126.css`
|
|
|
20661
20675
|
border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
|
|
20662
20676
|
font-size: var(--fs-xs);
|
|
20663
20677
|
`;
|
|
20664
|
-
var segmentedControlVerticalStyles =
|
|
20678
|
+
var segmentedControlVerticalStyles = import_react127.css`
|
|
20665
20679
|
flex-direction: column;
|
|
20666
20680
|
--segmented-control-first-border-radius: var(--segmented-control-rounded-value)
|
|
20667
20681
|
var(--segmented-control-rounded-value) 0 0;
|
|
20668
20682
|
--segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
|
|
20669
20683
|
var(--segmented-control-rounded-value);
|
|
20670
20684
|
`;
|
|
20671
|
-
var segmentedControlItemStyles =
|
|
20685
|
+
var segmentedControlItemStyles = import_react127.css`
|
|
20672
20686
|
&:first-of-type label {
|
|
20673
20687
|
border-radius: var(--segmented-control-first-border-radius);
|
|
20674
20688
|
}
|
|
@@ -20676,10 +20690,10 @@ var segmentedControlItemStyles = import_react126.css`
|
|
|
20676
20690
|
border-radius: var(--segmented-control-last-border-radius);
|
|
20677
20691
|
}
|
|
20678
20692
|
`;
|
|
20679
|
-
var segmentedControlInputStyles =
|
|
20693
|
+
var segmentedControlInputStyles = import_react127.css`
|
|
20680
20694
|
${accessibleHidden}
|
|
20681
20695
|
`;
|
|
20682
|
-
var segmentedControlLabelStyles = (checked, disabled) =>
|
|
20696
|
+
var segmentedControlLabelStyles = (checked, disabled) => import_react127.css`
|
|
20683
20697
|
position: relative;
|
|
20684
20698
|
display: flex;
|
|
20685
20699
|
align-items: center;
|
|
@@ -20746,20 +20760,20 @@ var segmentedControlLabelStyles = (checked, disabled) => import_react126.css`
|
|
|
20746
20760
|
`}
|
|
20747
20761
|
}
|
|
20748
20762
|
`;
|
|
20749
|
-
var segmentedControlLabelIconOnlyStyles =
|
|
20763
|
+
var segmentedControlLabelIconOnlyStyles = import_react127.css`
|
|
20750
20764
|
padding-inline: 0.5em;
|
|
20751
20765
|
`;
|
|
20752
|
-
var segmentedControlLabelCheckStyles =
|
|
20766
|
+
var segmentedControlLabelCheckStyles = import_react127.css`
|
|
20753
20767
|
opacity: 0.5;
|
|
20754
20768
|
`;
|
|
20755
|
-
var segmentedControlLabelContentStyles =
|
|
20769
|
+
var segmentedControlLabelContentStyles = import_react127.css`
|
|
20756
20770
|
display: flex;
|
|
20757
20771
|
align-items: center;
|
|
20758
20772
|
justify-content: center;
|
|
20759
20773
|
gap: var(--spacing-sm);
|
|
20760
20774
|
height: 100%;
|
|
20761
20775
|
`;
|
|
20762
|
-
var segmentedControlLabelTextStyles =
|
|
20776
|
+
var segmentedControlLabelTextStyles = import_react127.css``;
|
|
20763
20777
|
|
|
20764
20778
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
20765
20779
|
var import_jsx_runtime110 = require("@emotion/react/jsx-runtime");
|
|
@@ -20774,7 +20788,7 @@ var SegmentedControl = ({
|
|
|
20774
20788
|
size = "md",
|
|
20775
20789
|
...props
|
|
20776
20790
|
}) => {
|
|
20777
|
-
const onOptionChange = (0,
|
|
20791
|
+
const onOptionChange = (0, import_react129.useCallback)(
|
|
20778
20792
|
(event) => {
|
|
20779
20793
|
if (event.target.checked) {
|
|
20780
20794
|
onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
|
|
@@ -20782,15 +20796,15 @@ var SegmentedControl = ({
|
|
|
20782
20796
|
},
|
|
20783
20797
|
[options, onChange]
|
|
20784
20798
|
);
|
|
20785
|
-
const sizeStyles = (0,
|
|
20799
|
+
const sizeStyles = (0, import_react129.useMemo)(() => {
|
|
20786
20800
|
const map = {
|
|
20787
|
-
sm: (0,
|
|
20788
|
-
md: (0,
|
|
20789
|
-
lg: (0,
|
|
20801
|
+
sm: (0, import_react128.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
|
|
20802
|
+
md: (0, import_react128.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
|
|
20803
|
+
lg: (0, import_react128.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" })
|
|
20790
20804
|
};
|
|
20791
20805
|
return map[size];
|
|
20792
20806
|
}, [size]);
|
|
20793
|
-
const isIconOnly = (0,
|
|
20807
|
+
const isIconOnly = (0, import_react129.useMemo)(() => {
|
|
20794
20808
|
return options.every((option) => option.icon && !option.label);
|
|
20795
20809
|
}, [options]);
|
|
20796
20810
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
@@ -20847,12 +20861,12 @@ init_emotion_jsx_shim();
|
|
|
20847
20861
|
|
|
20848
20862
|
// src/components/Skeleton/Skeleton.styles.ts
|
|
20849
20863
|
init_emotion_jsx_shim();
|
|
20850
|
-
var
|
|
20851
|
-
var lightFadingOut =
|
|
20864
|
+
var import_react130 = require("@emotion/react");
|
|
20865
|
+
var lightFadingOut = import_react130.keyframes`
|
|
20852
20866
|
from { opacity: 0.1; }
|
|
20853
20867
|
to { opacity: 0.025; }
|
|
20854
20868
|
`;
|
|
20855
|
-
var skeletonStyles =
|
|
20869
|
+
var skeletonStyles = import_react130.css`
|
|
20856
20870
|
animation: ${lightFadingOut} 1s ease-out infinite alternate;
|
|
20857
20871
|
background-color: var(--gray-900);
|
|
20858
20872
|
`;
|
|
@@ -20891,8 +20905,8 @@ var React23 = __toESM(require("react"));
|
|
|
20891
20905
|
|
|
20892
20906
|
// src/components/Switch/Switch.styles.ts
|
|
20893
20907
|
init_emotion_jsx_shim();
|
|
20894
|
-
var
|
|
20895
|
-
var SwitchInputContainer =
|
|
20908
|
+
var import_react131 = require("@emotion/react");
|
|
20909
|
+
var SwitchInputContainer = import_react131.css`
|
|
20896
20910
|
cursor: pointer;
|
|
20897
20911
|
display: inline-block;
|
|
20898
20912
|
position: relative;
|
|
@@ -20901,7 +20915,7 @@ var SwitchInputContainer = import_react130.css`
|
|
|
20901
20915
|
vertical-align: middle;
|
|
20902
20916
|
user-select: none;
|
|
20903
20917
|
`;
|
|
20904
|
-
var SwitchInput =
|
|
20918
|
+
var SwitchInput = import_react131.css`
|
|
20905
20919
|
appearance: none;
|
|
20906
20920
|
border-radius: var(--rounded-full);
|
|
20907
20921
|
background-color: var(--white);
|
|
@@ -20939,7 +20953,7 @@ var SwitchInput = import_react130.css`
|
|
|
20939
20953
|
cursor: not-allowed;
|
|
20940
20954
|
}
|
|
20941
20955
|
`;
|
|
20942
|
-
var SwitchInputDisabled =
|
|
20956
|
+
var SwitchInputDisabled = import_react131.css`
|
|
20943
20957
|
opacity: var(--opacity-50);
|
|
20944
20958
|
cursor: not-allowed;
|
|
20945
20959
|
|
|
@@ -20947,7 +20961,7 @@ var SwitchInputDisabled = import_react130.css`
|
|
|
20947
20961
|
cursor: not-allowed;
|
|
20948
20962
|
}
|
|
20949
20963
|
`;
|
|
20950
|
-
var SwitchInputLabel =
|
|
20964
|
+
var SwitchInputLabel = import_react131.css`
|
|
20951
20965
|
align-items: center;
|
|
20952
20966
|
color: var(--brand-secondary-1);
|
|
20953
20967
|
display: inline-flex;
|
|
@@ -20969,7 +20983,7 @@ var SwitchInputLabel = import_react130.css`
|
|
|
20969
20983
|
top: 0;
|
|
20970
20984
|
}
|
|
20971
20985
|
`;
|
|
20972
|
-
var SwitchText =
|
|
20986
|
+
var SwitchText = import_react131.css`
|
|
20973
20987
|
color: var(--gray-500);
|
|
20974
20988
|
font-size: var(--fs-sm);
|
|
20975
20989
|
padding-inline: var(--spacing-2xl) 0;
|
|
@@ -21000,8 +21014,8 @@ var React24 = __toESM(require("react"));
|
|
|
21000
21014
|
|
|
21001
21015
|
// src/components/Table/Table.styles.ts
|
|
21002
21016
|
init_emotion_jsx_shim();
|
|
21003
|
-
var
|
|
21004
|
-
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) =>
|
|
21017
|
+
var import_react132 = require("@emotion/react");
|
|
21018
|
+
var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => import_react132.css`
|
|
21005
21019
|
border-bottom: 1px solid var(--gray-400);
|
|
21006
21020
|
border-collapse: collapse;
|
|
21007
21021
|
min-width: 100%;
|
|
@@ -21012,15 +21026,15 @@ var table = ({ cellPadding = "var(--spacing-base) var(--spacing-md)" }) => impor
|
|
|
21012
21026
|
padding: ${cellPadding};
|
|
21013
21027
|
}
|
|
21014
21028
|
`;
|
|
21015
|
-
var tableHead =
|
|
21029
|
+
var tableHead = import_react132.css`
|
|
21016
21030
|
background: var(--gray-100);
|
|
21017
21031
|
color: var(--brand-secondary-1);
|
|
21018
21032
|
text-align: left;
|
|
21019
21033
|
`;
|
|
21020
|
-
var tableRow =
|
|
21034
|
+
var tableRow = import_react132.css`
|
|
21021
21035
|
border-bottom: 1px solid var(--gray-200);
|
|
21022
21036
|
`;
|
|
21023
|
-
var tableCellHead =
|
|
21037
|
+
var tableCellHead = import_react132.css`
|
|
21024
21038
|
font-size: var(--fs-sm);
|
|
21025
21039
|
text-transform: uppercase;
|
|
21026
21040
|
font-weight: var(--fw-bold);
|
|
@@ -21066,13 +21080,13 @@ var TableCellData = React24.forwardRef(
|
|
|
21066
21080
|
|
|
21067
21081
|
// src/components/Tabs/Tabs.tsx
|
|
21068
21082
|
init_emotion_jsx_shim();
|
|
21069
|
-
var
|
|
21083
|
+
var import_react134 = require("react");
|
|
21070
21084
|
var import_Tab = require("reakit/Tab");
|
|
21071
21085
|
|
|
21072
21086
|
// src/components/Tabs/Tabs.styles.ts
|
|
21073
21087
|
init_emotion_jsx_shim();
|
|
21074
|
-
var
|
|
21075
|
-
var tabButtonStyles =
|
|
21088
|
+
var import_react133 = require("@emotion/react");
|
|
21089
|
+
var tabButtonStyles = import_react133.css`
|
|
21076
21090
|
align-items: center;
|
|
21077
21091
|
border: 0;
|
|
21078
21092
|
height: 2.5rem;
|
|
@@ -21089,7 +21103,7 @@ var tabButtonStyles = import_react132.css`
|
|
|
21089
21103
|
box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
|
|
21090
21104
|
}
|
|
21091
21105
|
`;
|
|
21092
|
-
var tabButtonGroupStyles =
|
|
21106
|
+
var tabButtonGroupStyles = import_react133.css`
|
|
21093
21107
|
display: flex;
|
|
21094
21108
|
gap: var(--spacing-base);
|
|
21095
21109
|
border-bottom: 1px solid var(--gray-300);
|
|
@@ -21097,22 +21111,22 @@ var tabButtonGroupStyles = import_react132.css`
|
|
|
21097
21111
|
|
|
21098
21112
|
// src/components/Tabs/Tabs.tsx
|
|
21099
21113
|
var import_jsx_runtime114 = require("@emotion/react/jsx-runtime");
|
|
21100
|
-
var CurrentTabContext = (0,
|
|
21114
|
+
var CurrentTabContext = (0, import_react134.createContext)(null);
|
|
21101
21115
|
var useCurrentTab = () => {
|
|
21102
|
-
const context = (0,
|
|
21116
|
+
const context = (0, import_react134.useContext)(CurrentTabContext);
|
|
21103
21117
|
if (!context) {
|
|
21104
21118
|
throw new Error("This component can only be used inside <Tabs>");
|
|
21105
21119
|
}
|
|
21106
21120
|
return context;
|
|
21107
21121
|
};
|
|
21108
21122
|
var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...props }) => {
|
|
21109
|
-
const selected = (0,
|
|
21123
|
+
const selected = (0, import_react134.useMemo)(() => {
|
|
21110
21124
|
if (selectedId)
|
|
21111
21125
|
return selectedId;
|
|
21112
21126
|
return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
|
|
21113
21127
|
}, [selectedId, useHashForState]);
|
|
21114
21128
|
const tab = (0, import_Tab.useTabState)({ ...props, selectedId: selected });
|
|
21115
|
-
(0,
|
|
21129
|
+
(0, import_react134.useEffect)(() => {
|
|
21116
21130
|
var _a;
|
|
21117
21131
|
const selectedValueWithoutNull = (_a = tab.selectedId) != null ? _a : void 0;
|
|
21118
21132
|
onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
|
|
@@ -21120,7 +21134,7 @@ var Tabs = ({ children, onSelectedIdChange, useHashForState, selectedId, ...prop
|
|
|
21120
21134
|
window.location.hash = selectedValueWithoutNull != null ? selectedValueWithoutNull : "";
|
|
21121
21135
|
}
|
|
21122
21136
|
}, [tab.selectedId, onSelectedIdChange, useHashForState]);
|
|
21123
|
-
(0,
|
|
21137
|
+
(0, import_react134.useEffect)(() => {
|
|
21124
21138
|
if (selected && selected !== tab.selectedId) {
|
|
21125
21139
|
tab.setSelectedId(selected);
|
|
21126
21140
|
}
|
|
@@ -21145,8 +21159,8 @@ init_emotion_jsx_shim();
|
|
|
21145
21159
|
|
|
21146
21160
|
// src/components/Validation/StatusBullet.styles.ts
|
|
21147
21161
|
init_emotion_jsx_shim();
|
|
21148
|
-
var
|
|
21149
|
-
var StatusBulletContainer =
|
|
21162
|
+
var import_react135 = require("@emotion/react");
|
|
21163
|
+
var StatusBulletContainer = import_react135.css`
|
|
21150
21164
|
align-items: center;
|
|
21151
21165
|
align-self: center;
|
|
21152
21166
|
color: var(--gray-500);
|
|
@@ -21163,33 +21177,33 @@ var StatusBulletContainer = import_react134.css`
|
|
|
21163
21177
|
display: block;
|
|
21164
21178
|
}
|
|
21165
21179
|
`;
|
|
21166
|
-
var StatusBulletBase =
|
|
21180
|
+
var StatusBulletBase = import_react135.css`
|
|
21167
21181
|
font-size: var(--fs-sm);
|
|
21168
21182
|
&:before {
|
|
21169
21183
|
width: var(--fs-xs);
|
|
21170
21184
|
height: var(--fs-xs);
|
|
21171
21185
|
}
|
|
21172
21186
|
`;
|
|
21173
|
-
var StatusBulletSmall =
|
|
21187
|
+
var StatusBulletSmall = import_react135.css`
|
|
21174
21188
|
font-size: var(--fs-xs);
|
|
21175
21189
|
&:before {
|
|
21176
21190
|
width: var(--fs-xxs);
|
|
21177
21191
|
height: var(--fs-xxs);
|
|
21178
21192
|
}
|
|
21179
21193
|
`;
|
|
21180
|
-
var StatusDraft =
|
|
21194
|
+
var StatusDraft = import_react135.css`
|
|
21181
21195
|
&:before {
|
|
21182
21196
|
background: var(--white);
|
|
21183
21197
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21184
21198
|
}
|
|
21185
21199
|
`;
|
|
21186
|
-
var StatusModified =
|
|
21200
|
+
var StatusModified = import_react135.css`
|
|
21187
21201
|
&:before {
|
|
21188
21202
|
background: linear-gradient(to right, var(--white) 50%, var(--primary-action-default) 50% 100%);
|
|
21189
21203
|
box-shadow: inset 0 0 0 0.125rem var(--primary-action-default);
|
|
21190
21204
|
}
|
|
21191
21205
|
`;
|
|
21192
|
-
var StatusError =
|
|
21206
|
+
var StatusError = import_react135.css`
|
|
21193
21207
|
color: var(--error);
|
|
21194
21208
|
&:before {
|
|
21195
21209
|
/* TODO: replace this with an svg icon */
|
|
@@ -21202,12 +21216,12 @@ var StatusError = import_react134.css`
|
|
|
21202
21216
|
);
|
|
21203
21217
|
}
|
|
21204
21218
|
`;
|
|
21205
|
-
var StatusPublished =
|
|
21219
|
+
var StatusPublished = import_react135.css`
|
|
21206
21220
|
&:before {
|
|
21207
21221
|
background: var(--primary-action-default);
|
|
21208
21222
|
}
|
|
21209
21223
|
`;
|
|
21210
|
-
var StatusOrphan =
|
|
21224
|
+
var StatusOrphan = import_react135.css`
|
|
21211
21225
|
&:before {
|
|
21212
21226
|
background: var(--brand-secondary-5);
|
|
21213
21227
|
}
|