@uniformdev/design-system 19.184.3-alpha.32 → 19.186.1

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/index.js CHANGED
@@ -19567,7 +19567,8 @@ var KeyValueInput = ({
19567
19567
  onChange: (itemValue) => handleUpdateOptionRow(index, itemValue),
19568
19568
  onDelete: () => handleDeleteOptionRow(index),
19569
19569
  onFocusChange: handleFocusChange,
19570
- "data-testid": "key-value-input-item"
19570
+ "data-testid": "key-value-input-item",
19571
+ onEnter: handleAddOptionRow
19571
19572
  },
19572
19573
  isDragging ? id : index
19573
19574
  )) })
@@ -19602,7 +19603,8 @@ var KeyValueInputItem = ({
19602
19603
  error,
19603
19604
  onFocusChange,
19604
19605
  disabledDelete = false,
19605
- disabledDnd = false
19606
+ disabledDnd = false,
19607
+ onEnter
19606
19608
  }) => {
19607
19609
  const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = (0, import_sortable.useSortable)({
19608
19610
  id,
@@ -19612,6 +19614,11 @@ var KeyValueInputItem = ({
19612
19614
  transform: import_utilities.CSS.Transform.toString(transform),
19613
19615
  transition
19614
19616
  };
19617
+ const handleEnter = (e) => {
19618
+ if (e.key === "Enter") {
19619
+ onEnter();
19620
+ }
19621
+ };
19615
19622
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: rowWrapper, ref: setNodeRef, style, children: [
19616
19623
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DragHandle, { disableDnd: disabledDnd, ref: setActivatorNodeRef, ...attributes, ...listeners }),
19617
19624
  /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { css: SelectKeyValueRowStyles, "data-testid": "key-value-input-item", children: [
@@ -19631,6 +19638,7 @@ var KeyValueInputItem = ({
19631
19638
  },
19632
19639
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
19633
19640
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
19641
+ onKeyDown: handleEnter,
19634
19642
  value: value.key,
19635
19643
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
19636
19644
  "data-testid": "key"
@@ -19642,12 +19650,15 @@ var KeyValueInputItem = ({
19642
19650
  label: valueLabel,
19643
19651
  showLabel: false,
19644
19652
  disabled: disabled2,
19645
- onChange: (e) => onChange == null ? void 0 : onChange({
19646
- key: value.key,
19647
- value: e.currentTarget.value
19648
- }),
19653
+ onChange: (e) => {
19654
+ onChange == null ? void 0 : onChange({
19655
+ key: value.key,
19656
+ value: e.currentTarget.value
19657
+ });
19658
+ },
19649
19659
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
19650
19660
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
19661
+ onKeyDown: handleEnter,
19651
19662
  value: value.value,
19652
19663
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
19653
19664
  "data-testid": "value"
@@ -21828,8 +21839,8 @@ var import_react141 = require("react");
21828
21839
  // src/components/ParameterInputs/ParameterLabel.tsx
21829
21840
  init_emotion_jsx_shim();
21830
21841
  var import_jsx_runtime121 = require("@emotion/react/jsx-runtime");
21831
- var ParameterLabel = ({ id, asSpan, children, ...props }) => {
21832
- return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("label", { ...props, htmlFor: id, css: labelText2, children }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
21842
+ var ParameterLabel = ({ id, asSpan, children, testId, ...props }) => {
21843
+ return !asSpan ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("label", { ...props, htmlFor: id, css: labelText2, "data-testid": testId, children }) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { "aria-labelledby": id, css: labelText2, children });
21833
21844
  };
21834
21845
 
21835
21846
  // src/components/ParameterInputs/ParameterMenuButton.tsx
@@ -21956,7 +21967,7 @@ var ParameterShell = ({
21956
21967
  label,
21957
21968
  labelTrailingIcon != null ? labelTrailingIcon : null
21958
21969
  ] }),
21959
- !title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(ParameterLabel, { id, asSpan: true, children: [
21970
+ !title2 ? null : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(ParameterLabel, { id, asSpan: true, testId: "parameter-label", children: [
21960
21971
  labelLeadingIcon != null ? labelLeadingIcon : null,
21961
21972
  title2,
21962
21973
  labelTrailingIcon != null ? labelTrailingIcon : null
@@ -22281,11 +22292,11 @@ var ParameterNameAndPublicIdInput = ({
22281
22292
 
22282
22293
  // src/components/ParameterInputs/ParameterRichText.tsx
22283
22294
  init_emotion_jsx_shim();
22284
- var import_react155 = require("@emotion/react");
22295
+ var import_react156 = require("@emotion/react");
22285
22296
  var import_list3 = require("@lexical/list");
22286
22297
  var import_markdown = require("@lexical/markdown");
22287
22298
  var import_LexicalComposer = require("@lexical/react/LexicalComposer");
22288
- var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
22299
+ var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
22289
22300
  var import_LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
22290
22301
  var import_LexicalErrorBoundary = __toESM(require("@lexical/react/LexicalErrorBoundary"));
22291
22302
  var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
@@ -22294,7 +22305,7 @@ var import_LexicalMarkdownShortcutPlugin = require("@lexical/react/LexicalMarkdo
22294
22305
  var import_LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
22295
22306
  var import_LexicalTablePlugin = require("@lexical/react/LexicalTablePlugin");
22296
22307
  var import_rich_text2 = require("@lexical/rich-text");
22297
- var import_table4 = require("@lexical/table");
22308
+ var import_table5 = require("@lexical/table");
22298
22309
 
22299
22310
  // ../richtext/dist/index.mjs
22300
22311
  init_emotion_jsx_shim();
@@ -22393,8 +22404,8 @@ var getLabelForElement = (type) => {
22393
22404
 
22394
22405
  // src/components/ParameterInputs/ParameterRichText.tsx
22395
22406
  var import_fast_equals2 = require("fast-equals");
22396
- var import_lexical8 = require("lexical");
22397
- var import_react156 = require("react");
22407
+ var import_lexical9 = require("lexical");
22408
+ var import_react157 = require("react");
22398
22409
 
22399
22410
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
22400
22411
  init_emotion_jsx_shim();
@@ -22634,9 +22645,32 @@ var tableCellElement = import_css2.css`
22634
22645
  min-width: 2rem;
22635
22646
  outline: none;
22636
22647
  padding: var(--spacing-sm);
22648
+ position: relative;
22637
22649
  text-align: start;
22638
22650
  vertical-align: top;
22639
22651
  width: 7rem;
22652
+
22653
+ /* Used by the table resizer plugin to not change the hovered cell immediately
22654
+ upon going with the mouse over the neighboring cell */
22655
+ &::after {
22656
+ content: '';
22657
+ height: 5px;
22658
+ left: 0;
22659
+ position: absolute;
22660
+ top: 100%;
22661
+ width: 100%;
22662
+ z-index: 1;
22663
+ }
22664
+
22665
+ &::before {
22666
+ content: '';
22667
+ width: 5px;
22668
+ height: 100%;
22669
+ position: absolute;
22670
+ top: 0;
22671
+ left: 100%;
22672
+ z-index: 1;
22673
+ }
22640
22674
  `;
22641
22675
  var tableHeaderElement = import_css2.css`
22642
22676
  background-color: var(--gray-100);
@@ -22988,7 +23022,7 @@ var LINK_POPOVER_OFFSET_X = 0;
22988
23022
  var LINK_POPOVER_OFFSET_Y = 8;
22989
23023
  var linkPopover = import_react146.css`
22990
23024
  position: absolute;
22991
- z-index: 5;
23025
+ z-index: 11;
22992
23026
  `;
22993
23027
  var linkPopoverContainer = import_react146.css`
22994
23028
  ${Popover()};
@@ -23207,10 +23241,9 @@ function getLinkAncestor(node) {
23207
23241
  init_emotion_jsx_shim();
23208
23242
  var import_list = require("@lexical/list");
23209
23243
  var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
23210
- var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
23244
+ var import_utils8 = require("@lexical/utils");
23211
23245
  var import_lexical4 = require("lexical");
23212
23246
  var import_react148 = require("react");
23213
- var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
23214
23247
  function isIndentPermitted(maxDepth) {
23215
23248
  const selection = (0, import_lexical4.$getSelection)();
23216
23249
  if (!(0, import_lexical4.$isRangeSelection)(selection)) {
@@ -23231,16 +23264,84 @@ function isIndentPermitted(maxDepth) {
23231
23264
  }
23232
23265
  return totalDepth <= maxDepth;
23233
23266
  }
23267
+ function $isAnyOfSelectedNodesAListItemNode(selection) {
23268
+ const nodes = selection.getNodes();
23269
+ return (0, import_utils8.$filter)(nodes, (node) => (0, import_list.$isListItemNode)(node) ? node : null).length > 0;
23270
+ }
23271
+ function $indentOverTab(selection) {
23272
+ const nodes = selection.getNodes();
23273
+ const canIndentBlockNodes = (0, import_utils8.$filter)(nodes, (node) => {
23274
+ if ((0, import_lexical4.$isBlockElementNode)(node) && node.canIndent()) {
23275
+ return node;
23276
+ }
23277
+ return null;
23278
+ });
23279
+ if (canIndentBlockNodes.length > 0) {
23280
+ return true;
23281
+ }
23282
+ const anchor = selection.anchor;
23283
+ const focus = selection.focus;
23284
+ const first = focus.isBefore(anchor) ? focus : anchor;
23285
+ const firstNode = first.getNode();
23286
+ const firstBlock = (0, import_utils8.$getNearestBlockElementAncestorOrThrow)(firstNode);
23287
+ if (firstBlock.canIndent()) {
23288
+ const firstBlockKey = firstBlock.getKey();
23289
+ let selectionAtStart = (0, import_lexical4.$createRangeSelection)();
23290
+ selectionAtStart.anchor.set(firstBlockKey, 0, "element");
23291
+ selectionAtStart.focus.set(firstBlockKey, 0, "element");
23292
+ selectionAtStart = (0, import_lexical4.$normalizeSelection__EXPERIMENTAL)(selectionAtStart);
23293
+ if (selectionAtStart.anchor.is(first)) {
23294
+ return true;
23295
+ }
23296
+ }
23297
+ return false;
23298
+ }
23234
23299
  function ListIndentPlugin({ maxDepth }) {
23235
23300
  const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
23301
+ const isInListItemNode = (0, import_react148.useRef)(false);
23236
23302
  (0, import_react148.useEffect)(() => {
23237
23303
  return editor.registerCommand(
23238
- import_lexical4.INDENT_CONTENT_COMMAND,
23239
- () => !isIndentPermitted(maxDepth),
23240
- import_lexical4.COMMAND_PRIORITY_CRITICAL
23304
+ import_lexical4.SELECTION_CHANGE_COMMAND,
23305
+ () => {
23306
+ editor.read(() => {
23307
+ const selection = (0, import_lexical4.$getSelection)();
23308
+ if (!(0, import_lexical4.$isRangeSelection)(selection) || !selection.isCollapsed()) {
23309
+ isInListItemNode.current = false;
23310
+ return false;
23311
+ }
23312
+ isInListItemNode.current = (0, import_utils8.$getNearestNodeOfType)(selection.anchor.getNode(), import_list.ListNode) !== null;
23313
+ });
23314
+ return false;
23315
+ },
23316
+ import_lexical4.COMMAND_PRIORITY_NORMAL
23317
+ );
23318
+ }, [editor]);
23319
+ (0, import_react148.useEffect)(() => {
23320
+ return (0, import_utils8.mergeRegister)(
23321
+ editor.registerCommand(
23322
+ import_lexical4.INDENT_CONTENT_COMMAND,
23323
+ () => !isIndentPermitted(maxDepth),
23324
+ import_lexical4.COMMAND_PRIORITY_CRITICAL
23325
+ ),
23326
+ editor.registerCommand(
23327
+ import_lexical4.KEY_TAB_COMMAND,
23328
+ (event) => {
23329
+ const selection = (0, import_lexical4.$getSelection)();
23330
+ if (!(0, import_lexical4.$isRangeSelection)(selection) || !isInListItemNode.current && !$isAnyOfSelectedNodesAListItemNode(selection)) {
23331
+ return false;
23332
+ }
23333
+ event.preventDefault();
23334
+ if ($indentOverTab(selection)) {
23335
+ const command = event.shiftKey ? import_lexical4.OUTDENT_CONTENT_COMMAND : import_lexical4.INDENT_CONTENT_COMMAND;
23336
+ return editor.dispatchCommand(command, void 0);
23337
+ }
23338
+ return false;
23339
+ },
23340
+ import_lexical4.COMMAND_PRIORITY_CRITICAL
23341
+ )
23241
23342
  );
23242
23343
  }, [editor, maxDepth]);
23243
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {});
23344
+ return null;
23244
23345
  }
23245
23346
 
23246
23347
  // src/components/ParameterInputs/rich-text/RichTextToolbar.tsx
@@ -23252,10 +23353,10 @@ var import_LexicalComposerContext4 = require("@lexical/react/LexicalComposerCont
23252
23353
  var import_rich_text = require("@lexical/rich-text");
23253
23354
  var import_selection2 = require("@lexical/selection");
23254
23355
  var import_table = require("@lexical/table");
23255
- var import_utils9 = require("@lexical/utils");
23356
+ var import_utils10 = require("@lexical/utils");
23256
23357
  var import_lexical5 = require("lexical");
23257
23358
  var import_react150 = require("react");
23258
- var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
23359
+ var import_jsx_runtime130 = require("@emotion/react/jsx-runtime");
23259
23360
  var toolbar = import_react149.css`
23260
23361
  ${scrollbarStyles}
23261
23362
  background: var(--gray-50);
@@ -23263,7 +23364,7 @@ var toolbar = import_react149.css`
23263
23364
  display: flex;
23264
23365
  /* We add 1px because we use a 1px wide separator */
23265
23366
  gap: calc(var(--spacing-sm) + 1px);
23266
- margin: calc(var(--spacing-sm) + var(--spacing-xs)) 0;
23367
+ margin: 0 0 calc(var(--spacing-sm) + var(--spacing-xs)) 0;
23267
23368
  overflow: auto;
23268
23369
  padding: var(--spacing-sm);
23269
23370
  position: sticky;
@@ -23315,7 +23416,7 @@ var toolbarChevron = import_react149.css`
23315
23416
  margin-left: var(--spacing-xs);
23316
23417
  `;
23317
23418
  var RichTextToolbarIcon = ({ icon }) => {
23318
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
23419
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon, css: toolbarIcon, size: "1rem" });
23319
23420
  };
23320
23421
  var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
23321
23422
  ["bold", "format-bold"],
@@ -23392,7 +23493,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23392
23493
  }
23393
23494
  setActiveFormats(newActiveFormats);
23394
23495
  const anchorNode = selection.anchor.getNode();
23395
- let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils9.$findMatchingParent)(anchorNode, (e) => {
23496
+ let element = anchorNode.getKey() === "root" ? anchorNode : (0, import_utils10.$findMatchingParent)(anchorNode, (e) => {
23396
23497
  const parent = e.getParent();
23397
23498
  return parent !== null && (0, import_lexical5.$isRootOrShadowRoot)(parent);
23398
23499
  });
@@ -23403,7 +23504,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23403
23504
  const elementDOM = editor.getElementByKey(elementKey);
23404
23505
  if (elementDOM !== null) {
23405
23506
  if ((0, import_list2.$isListNode)(element)) {
23406
- const parentList = (0, import_utils9.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
23507
+ const parentList = (0, import_utils10.$getNearestNodeOfType)(anchorNode, import_list2.ListNode);
23407
23508
  const type = parentList ? parentList.getListType() : element.getListType();
23408
23509
  setActiveElement(type === "bullet" ? "unorderedList" : "orderedList");
23409
23510
  } else {
@@ -23437,14 +23538,14 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23437
23538
  });
23438
23539
  });
23439
23540
  }, [editor, updateToolbar]);
23440
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: toolbar, children: [
23441
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
23541
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbar, children: [
23542
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
23442
23543
  Menu,
23443
23544
  {
23444
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
23545
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
23445
23546
  visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
23446
23547
  " ",
23447
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
23548
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
23448
23549
  ] }),
23449
23550
  placement: "bottom-start",
23450
23551
  children: [
@@ -23454,7 +23555,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23454
23555
  type: "paragraph"
23455
23556
  },
23456
23557
  ...visibleTextualElements
23457
- ].map((element) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23558
+ ].map((element) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23458
23559
  MenuItem,
23459
23560
  {
23460
23561
  onClick: () => {
@@ -23464,12 +23565,12 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23464
23565
  },
23465
23566
  element.type
23466
23567
  )),
23467
- visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
23568
+ visibleTextualElements.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(MenuItem, { disabled: true, children: "Alternative text styles are not available" }) : null
23468
23569
  ]
23469
23570
  }
23470
23571
  ),
23471
- visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: toolbarGroup, children: [
23472
- visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23572
+ visibleFormatsWithIcon.length > 0 || visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, children: [
23573
+ visibleFormatsWithIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: format.label, placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23473
23574
  "button",
23474
23575
  {
23475
23576
  onClick: () => {
@@ -23479,16 +23580,16 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23479
23580
  richTextToolbarButton,
23480
23581
  activeFormats.includes(format.type) ? richTextToolbarButtonActive : null
23481
23582
  ],
23482
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
23583
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: FORMATS_WITH_ICON.get(format.type) })
23483
23584
  }
23484
23585
  ) }, format.type)),
23485
- visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23586
+ visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23486
23587
  Menu,
23487
23588
  {
23488
23589
  menuLabel: "Alternative text styles",
23489
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
23590
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
23490
23591
  placement: "bottom-start",
23491
- children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23592
+ children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23492
23593
  MenuItem,
23493
23594
  {
23494
23595
  onClick: () => {
@@ -23501,19 +23602,19 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23501
23602
  }
23502
23603
  ) : null
23503
23604
  ] }) : null,
23504
- visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { css: toolbarGroup, children: [
23505
- linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23605
+ visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { css: toolbarGroup, children: [
23606
+ linkElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23506
23607
  "button",
23507
23608
  {
23508
23609
  onClick: () => {
23509
23610
  isLink ? editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {}) : editor.dispatchCommand(OPEN_LINK_NODE_MODAL_COMMAND, {});
23510
23611
  },
23511
23612
  css: [richTextToolbarButton, isLink ? richTextToolbarButtonActive : null],
23512
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichTextToolbarIcon, { icon: "link" })
23613
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "link" })
23513
23614
  }
23514
23615
  ) }) : null,
23515
- visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
23516
- visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23616
+ visibleLists.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
23617
+ visibleLists.has("unorderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Bullet List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23517
23618
  "button",
23518
23619
  {
23519
23620
  onClick: () => {
@@ -23523,10 +23624,10 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23523
23624
  richTextToolbarButton,
23524
23625
  activeElement === "unorderedList" ? richTextToolbarButtonActive : null
23525
23626
  ],
23526
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
23627
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list" })
23527
23628
  }
23528
23629
  ) }) : null,
23529
- visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23630
+ visibleLists.has("orderedList") ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Tooltip, { title: "Ordered List", placement: "top", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23530
23631
  "button",
23531
23632
  {
23532
23633
  onClick: () => {
@@ -23536,48 +23637,48 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
23536
23637
  richTextToolbarButton,
23537
23638
  activeElement === "orderedList" ? richTextToolbarButtonActive : null
23538
23639
  ],
23539
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
23640
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichTextToolbarIcon, { icon: "layout-list-numbered" })
23540
23641
  }
23541
23642
  ) }) : null
23542
23643
  ] }) : null,
23543
23644
  customControls ? customControls : null
23544
23645
  ] }) : null,
23545
- visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { css: toolbarGroup, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
23646
+ visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: toolbarGroup, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
23546
23647
  Menu,
23547
23648
  {
23548
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", children: [
23649
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", children: [
23549
23650
  "Insert",
23550
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
23651
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
23551
23652
  ] }),
23552
23653
  placement: "bottom-start",
23553
23654
  children: [
23554
- quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23655
+ quoteElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23555
23656
  MenuItem,
23556
23657
  {
23557
23658
  onClick: () => {
23558
23659
  onSelectElement("quote");
23559
23660
  },
23560
- icon: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "quote", iconColor: "currentColor" }),
23661
+ icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "quote", iconColor: "currentColor" }),
23561
23662
  children: "Quote"
23562
23663
  }
23563
23664
  ) : null,
23564
- codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23665
+ codeElementVisible ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23565
23666
  MenuItem,
23566
23667
  {
23567
23668
  onClick: () => {
23568
23669
  onSelectElement("code");
23569
23670
  },
23570
- icon: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "code-slash", iconColor: "currentColor" }),
23671
+ icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "code-slash", iconColor: "currentColor" }),
23571
23672
  children: "Code"
23572
23673
  }
23573
23674
  ) : null,
23574
- tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23675
+ tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
23575
23676
  MenuItem,
23576
23677
  {
23577
23678
  onClick: () => {
23578
23679
  onSelectElement("table");
23579
23680
  },
23580
- icon: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "view-grid", iconColor: "currentColor" }),
23681
+ icon: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { icon: "view-grid", iconColor: "currentColor" }),
23581
23682
  children: "Table"
23582
23683
  }
23583
23684
  ) : null
@@ -23716,7 +23817,7 @@ var import_useLexicalEditable = require("@lexical/react/useLexicalEditable");
23716
23817
  var import_table2 = require("@lexical/table");
23717
23818
  var import_lexical6 = require("lexical");
23718
23819
  var import_react152 = require("react");
23719
- var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
23820
+ var import_jsx_runtime131 = require("@emotion/react/jsx-runtime");
23720
23821
  function computeSelectionCount(selection) {
23721
23822
  const selectionShape = selection.getShape();
23722
23823
  return {
@@ -23734,11 +23835,11 @@ var TableActionMenuTrigger = (0, import_react152.forwardRef)((props, ref) => {
23734
23835
  (0, import_react152.useLayoutEffect)(() => {
23735
23836
  const rect = tableCellEl.getBoundingClientRect();
23736
23837
  const parentRect = positioningAnchorEl.getBoundingClientRect();
23737
- const relativeX = rect.right - parentRect.left;
23738
- const relativeY = rect.top - parentRect.top;
23838
+ const relativeX = rect.right - parentRect.left + positioningAnchorEl.scrollLeft;
23839
+ const relativeY = rect.top - parentRect.top + positioningAnchorEl.scrollTop;
23739
23840
  setCoordinates({ x: relativeX, y: relativeY });
23740
23841
  }, [tableCellEl, positioningAnchorEl]);
23741
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
23842
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23742
23843
  IconButton,
23743
23844
  {
23744
23845
  ref,
@@ -23752,7 +23853,7 @@ var TableActionMenuTrigger = (0, import_react152.forwardRef)((props, ref) => {
23752
23853
  size: "xs",
23753
23854
  buttonType: "unimportant",
23754
23855
  ...rest,
23755
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
23856
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
23756
23857
  }
23757
23858
  );
23758
23859
  });
@@ -23852,10 +23953,9 @@ function TableActionMenu({
23852
23953
  const deleteTableColumnAtSelection = (0, import_react152.useCallback)(() => {
23853
23954
  editor.update(() => {
23854
23955
  (0, import_table2.$deleteTableColumn__EXPERIMENTAL)();
23855
- clearTableSelection();
23856
23956
  });
23857
23957
  incrementMenuTriggerKey();
23858
- }, [editor, clearTableSelection]);
23958
+ }, [editor]);
23859
23959
  const toggleTableRowIsHeader = (0, import_react152.useCallback)(() => {
23860
23960
  editor.update(() => {
23861
23961
  const tableNode = (0, import_table2.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
@@ -23907,10 +24007,10 @@ function TableActionMenu({
23907
24007
  const menuItemCss = (0, import_react151.css)({
23908
24008
  fontSize: "var(--fs-sm)"
23909
24009
  });
23910
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
24010
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
23911
24011
  Menu,
23912
24012
  {
23913
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24013
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
23914
24014
  TableActionMenuTrigger,
23915
24015
  {
23916
24016
  tableCellEl,
@@ -23921,7 +24021,7 @@ function TableActionMenu({
23921
24021
  portalElement: menuPortalEl,
23922
24022
  maxMenuHeight: "300px",
23923
24023
  children: [
23924
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
24024
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
23925
24025
  MenuItem,
23926
24026
  {
23927
24027
  onClick: () => {
@@ -23935,33 +24035,33 @@ function TableActionMenu({
23935
24035
  ]
23936
24036
  }
23937
24037
  ),
23938
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
24038
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
23939
24039
  "Insert ",
23940
24040
  selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
23941
24041
  " below"
23942
24042
  ] }),
23943
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItemSeparator, {}),
23944
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
24043
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItemSeparator, {}),
24044
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
23945
24045
  "Insert ",
23946
24046
  selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
23947
24047
  " left"
23948
24048
  ] }),
23949
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
24049
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
23950
24050
  "Insert ",
23951
24051
  selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
23952
24052
  " right"
23953
24053
  ] }),
23954
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItemSeparator, {}),
23955
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
23956
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
23957
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
23958
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MenuItemSeparator, {}),
23959
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
24054
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItemSeparator, {}),
24055
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
24056
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
24057
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
24058
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(MenuItemSeparator, {}),
24059
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
23960
24060
  (tableCellNode.__headerState & import_table2.TableCellHeaderStates.ROW) === import_table2.TableCellHeaderStates.ROW ? "Remove" : "Add",
23961
24061
  " ",
23962
24062
  "row header"
23963
24063
  ] }),
23964
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
24064
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
23965
24065
  (tableCellNode.__headerState & import_table2.TableCellHeaderStates.COLUMN) === import_table2.TableCellHeaderStates.COLUMN ? "Remove" : "Add",
23966
24066
  " ",
23967
24067
  "column header"
@@ -24029,7 +24129,7 @@ function TableCellActionMenuContainer({
24029
24129
  });
24030
24130
  });
24031
24131
  });
24032
- return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24132
+ return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
24033
24133
  TableActionMenu,
24034
24134
  {
24035
24135
  tableCellNode,
@@ -24040,15 +24140,12 @@ function TableCellActionMenuContainer({
24040
24140
  tableCellNode.getKey()
24041
24141
  );
24042
24142
  }
24043
- function TableActionMenuPlugin({ positioningAnchorEl }) {
24143
+ function TableActionMenuPlugin({
24144
+ positioningAnchorEl,
24145
+ menuPortalEl
24146
+ }) {
24044
24147
  const isEditable = (0, import_useLexicalEditable.useLexicalEditable)();
24045
- return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24046
- TableCellActionMenuContainer,
24047
- {
24048
- menuPortalEl: positioningAnchorEl,
24049
- positioningAnchorEl
24050
- }
24051
- ) : null;
24148
+ return isEditable ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TableCellActionMenuContainer, { menuPortalEl, positioningAnchorEl }) : null;
24052
24149
  }
24053
24150
 
24054
24151
  // src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
@@ -24057,11 +24154,11 @@ var import_react153 = require("@emotion/react");
24057
24154
  var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerContext");
24058
24155
  var import_useLexicalEditable2 = require("@lexical/react/useLexicalEditable");
24059
24156
  var import_table3 = require("@lexical/table");
24060
- var import_utils11 = require("@lexical/utils");
24157
+ var import_utils12 = require("@lexical/utils");
24061
24158
  var import_lexical7 = require("lexical");
24062
24159
  var import_react154 = require("react");
24063
24160
  var import_react_dom3 = require("react-dom");
24064
- var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
24161
+ var import_jsx_runtime132 = require("@emotion/react/jsx-runtime");
24065
24162
  var MIN_ROW_HEIGHT = 33;
24066
24163
  var MIN_COLUMN_WIDTH = 50;
24067
24164
  var tableResizer = import_react153.css`
@@ -24280,7 +24377,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24280
24377
  if (activeCell === null) {
24281
24378
  return;
24282
24379
  }
24283
- const zoom = (0, import_utils11.calculateZoomLevel)(event.target);
24380
+ const zoom = (0, import_utils12.calculateZoomLevel)(event.target);
24284
24381
  if (isHeightChanging(direction)) {
24285
24382
  const heightChange = (event.clientY - y) / zoom;
24286
24383
  updateRowHeight(heightChange);
@@ -24317,7 +24414,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24317
24414
  if (activeCell) {
24318
24415
  const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
24319
24416
  const parentRect = positioningAnchorEl.getBoundingClientRect();
24320
- const zoom = (0, import_utils11.calculateZoomLevel)(activeCell.elem);
24417
+ const zoom = (0, import_utils12.calculateZoomLevel)(activeCell.elem);
24321
24418
  const zoneWidth = 10;
24322
24419
  const styles = {
24323
24420
  bottom: {
@@ -24325,7 +24422,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24325
24422
  cursor: "row-resize",
24326
24423
  height: `${zoneWidth}px`,
24327
24424
  left: `${left - parentRect.left}px`,
24328
- top: `${top - parentRect.top + height - zoneWidth / 2}px`,
24425
+ top: `${top - parentRect.top + positioningAnchorEl.scrollTop + height - zoneWidth / 2}px`,
24329
24426
  width: `${width}px`
24330
24427
  },
24331
24428
  right: {
@@ -24333,7 +24430,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24333
24430
  cursor: "col-resize",
24334
24431
  height: `${height}px`,
24335
24432
  left: `${left - parentRect.left + width - zoneWidth / 2}px`,
24336
- top: `${top - parentRect.top}px`,
24433
+ top: `${top - parentRect.top + positioningAnchorEl.scrollTop}px`,
24337
24434
  width: `${zoneWidth}px`
24338
24435
  }
24339
24436
  };
@@ -24341,11 +24438,11 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24341
24438
  if (draggingDirection && mouseCurrentPos && tableRect) {
24342
24439
  if (isHeightChanging(draggingDirection)) {
24343
24440
  styles[draggingDirection].left = `${tableRect.left - parentRect.left}px`;
24344
- styles[draggingDirection].top = `${(mouseCurrentPos.y - parentRect.top) / zoom}px`;
24441
+ styles[draggingDirection].top = `${(mouseCurrentPos.y - parentRect.top + positioningAnchorEl.scrollTop) / zoom}px`;
24345
24442
  styles[draggingDirection].height = "3px";
24346
24443
  styles[draggingDirection].width = `${tableRect.width}px`;
24347
24444
  } else {
24348
- styles[draggingDirection].top = `${tableRect.top - parentRect.top}px`;
24445
+ styles[draggingDirection].top = `${tableRect.top - parentRect.top + positioningAnchorEl.scrollTop}px`;
24349
24446
  styles[draggingDirection].left = `${(mouseCurrentPos.x - parentRect.left) / zoom}px`;
24350
24447
  styles[draggingDirection].width = "3px";
24351
24448
  styles[draggingDirection].height = `${tableRect.height}px`;
@@ -24362,8 +24459,8 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24362
24459
  };
24363
24460
  }, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
24364
24461
  const resizerStyles = getResizers();
24365
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
24366
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24462
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
24463
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24367
24464
  "div",
24368
24465
  {
24369
24466
  css: tableResizer,
@@ -24371,7 +24468,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
24371
24468
  onMouseDown: toggleResize("right")
24372
24469
  }
24373
24470
  ),
24374
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24471
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
24375
24472
  "div",
24376
24473
  {
24377
24474
  css: tableResizer,
@@ -24386,15 +24483,68 @@ function TableCellResizerPlugin({ positioningAnchorEl }) {
24386
24483
  const isEditable = (0, import_useLexicalEditable2.useLexicalEditable)();
24387
24484
  return (0, import_react154.useMemo)(
24388
24485
  () => isEditable ? (0, import_react_dom3.createPortal)(
24389
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
24486
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(TableCellResizer, { editor, positioningAnchorEl }),
24390
24487
  positioningAnchorEl
24391
24488
  ) : null,
24392
24489
  [editor, isEditable, positioningAnchorEl]
24393
24490
  );
24394
24491
  }
24395
24492
 
24493
+ // src/components/ParameterInputs/rich-text/TableSelectionPlugin.tsx
24494
+ init_emotion_jsx_shim();
24495
+ var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
24496
+ var import_table4 = require("@lexical/table");
24497
+ var import_lexical8 = require("lexical");
24498
+ var import_react155 = require("react");
24499
+ var TableSelectionPlugin = () => {
24500
+ const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
24501
+ const [closestTableCellNode, setClosestTableCellNode] = (0, import_react155.useState)(null);
24502
+ (0, import_react155.useEffect)(() => {
24503
+ return editor.registerCommand(
24504
+ import_lexical8.SELECTION_CHANGE_COMMAND,
24505
+ () => {
24506
+ editor.read(() => {
24507
+ const selection = (0, import_lexical8.$getSelection)();
24508
+ if (!(0, import_lexical8.$isRangeSelection)(selection) || !selection.isCollapsed()) {
24509
+ setClosestTableCellNode(null);
24510
+ return false;
24511
+ }
24512
+ const tableCellNode = (0, import_table4.$findCellNode)(selection.anchor.getNode());
24513
+ if (tableCellNode === null) {
24514
+ setClosestTableCellNode(null);
24515
+ return false;
24516
+ }
24517
+ setClosestTableCellNode(tableCellNode);
24518
+ });
24519
+ return false;
24520
+ },
24521
+ import_lexical8.COMMAND_PRIORITY_NORMAL
24522
+ );
24523
+ }, [editor]);
24524
+ (0, import_react155.useEffect)(() => {
24525
+ const onControlA = (event) => {
24526
+ if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
24527
+ if (!closestTableCellNode) {
24528
+ return;
24529
+ }
24530
+ event.preventDefault();
24531
+ editor.update(() => {
24532
+ const selection = closestTableCellNode.select(0, closestTableCellNode.getChildrenSize());
24533
+ (0, import_lexical8.$setSelection)(selection);
24534
+ });
24535
+ }
24536
+ };
24537
+ return editor.registerRootListener((rootElement, prevRootElement) => {
24538
+ rootElement == null ? void 0 : rootElement.addEventListener("keydown", onControlA);
24539
+ prevRootElement == null ? void 0 : prevRootElement.removeEventListener("keydown", onControlA);
24540
+ });
24541
+ }, [editor, closestTableCellNode]);
24542
+ return null;
24543
+ };
24544
+ var TableSelectionPlugin_default = TableSelectionPlugin;
24545
+
24396
24546
  // src/components/ParameterInputs/ParameterRichText.tsx
24397
- var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
24547
+ var import_jsx_runtime133 = require("@emotion/react/jsx-runtime");
24398
24548
  var ParameterRichText = ({
24399
24549
  label,
24400
24550
  labelLeadingIcon,
@@ -24422,7 +24572,7 @@ var ParameterRichText = ({
24422
24572
  onInsertTable,
24423
24573
  minimalInteractivity
24424
24574
  }) => {
24425
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
24575
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
24426
24576
  ParameterShell,
24427
24577
  {
24428
24578
  "data-testid": "parameter-richtext",
@@ -24436,7 +24586,7 @@ var ParameterRichText = ({
24436
24586
  captionTestId,
24437
24587
  menuItems,
24438
24588
  children: [
24439
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
24589
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24440
24590
  ParameterRichTextInner,
24441
24591
  {
24442
24592
  value,
@@ -24457,23 +24607,73 @@ var ParameterRichText = ({
24457
24607
  children
24458
24608
  }
24459
24609
  ),
24460
- menuItems ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children: menuItems }) }) : null
24610
+ menuItems ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_jsx_runtime133.Fragment, { children: menuItems }) }) : null
24461
24611
  ]
24462
24612
  }
24463
24613
  );
24464
24614
  };
24465
- var editorWrapper = import_react155.css`
24615
+ var editorContainerWrapper = import_react156.css`
24616
+ position: relative;
24617
+
24618
+ &::before {
24619
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 96.12%);
24620
+ bottom: 1px;
24621
+ content: '';
24622
+ display: block;
24623
+ height: 30px;
24624
+ left: var(--spacing-sm);
24625
+ pointer-events: none;
24626
+ position: absolute;
24627
+ right: var(--spacing-sm);
24628
+ z-index: 2;
24629
+ }
24630
+ `;
24631
+ var editorWrapper = import_react156.css`
24466
24632
  display: flex;
24467
24633
  flex-flow: column;
24468
24634
  flex-grow: 1;
24469
24635
  `;
24470
- var editorContainer = import_react155.css`
24636
+ var editorContainer = import_react156.css`
24637
+ ${scrollbarStyles}
24638
+ background: var(--white);
24639
+ border-radius: var(--rounded-sm);
24640
+ border: 1px solid var(--gray-200);
24641
+ color: var(--gray-900);
24471
24642
  display: flex;
24472
24643
  flex-flow: column;
24473
24644
  flex-grow: 1;
24645
+ font-size: var(--fs-base);
24646
+ height: max-content;
24647
+ line-height: 1.2;
24648
+ max-height: 300px;
24649
+ min-height: 50px;
24650
+ overflow-y: auto;
24651
+ padding: var(--spacing-sm);
24474
24652
  position: relative;
24653
+ resize: vertical;
24654
+
24655
+ &:focus,
24656
+ &:focus-within {
24657
+ border-radius: var(--rounded-sm);
24658
+ box-shadow: var(--elevation-100);
24659
+ border: 1px solid var(--accent-dark-hover);
24660
+ outline: none;
24661
+ }
24662
+
24663
+ &[style*='height:'] {
24664
+ min-height: 50px;
24665
+ max-height: unset;
24666
+ }
24475
24667
  `;
24476
- var editorPlaceholder = import_react155.css`
24668
+ var editorContainerOverflowWrapper = import_react156.css`
24669
+ overflow: hidden;
24670
+ pointer-events: none;
24671
+
24672
+ & > * {
24673
+ pointer-events: auto;
24674
+ }
24675
+ `;
24676
+ var editorPlaceholder = import_react156.css`
24477
24677
  color: var(--gray-500);
24478
24678
  font-style: italic;
24479
24679
  /* 1px is added to make sure caret is clearly visible when field is focused
@@ -24484,22 +24684,11 @@ var editorPlaceholder = import_react155.css`
24484
24684
  top: var(--spacing-sm);
24485
24685
  user-select: none;
24486
24686
  `;
24487
- var editorInput = import_react155.css`
24488
- background: var(--white);
24489
- border: 1px solid var(--gray-200);
24490
- border-radius: var(--rounded-sm);
24491
- color: var(--gray-900);
24492
- flex-grow: 1;
24493
- font-size: var(--fs-base);
24494
- line-height: 1.2;
24495
- min-height: 2rem;
24496
- padding: var(--spacing-sm);
24687
+ var editorInput = import_react156.css`
24688
+ min-height: 100%;
24497
24689
 
24498
24690
  &:focus,
24499
24691
  &:focus-within {
24500
- border-radius: var(--rounded-sm);
24501
- box-shadow: var(--elevation-100);
24502
- border: 1px solid var(--accent-dark-hover);
24503
24692
  outline: none;
24504
24693
  }
24505
24694
  `;
@@ -24533,11 +24722,11 @@ var ParameterRichTextInner = ({
24533
24722
  LinkNode,
24534
24723
  import_rich_text2.HeadingNode,
24535
24724
  import_rich_text2.QuoteNode,
24536
- import_lexical8.ParagraphNode,
24725
+ import_lexical9.ParagraphNode,
24537
24726
  CustomCodeNode,
24538
- import_table4.TableNode,
24539
- import_table4.TableCellNode,
24540
- import_table4.TableRowNode,
24727
+ import_table5.TableNode,
24728
+ import_table5.TableCellNode,
24729
+ import_table5.TableRowNode,
24541
24730
  ...customNodes != null ? customNodes : []
24542
24731
  ],
24543
24732
  theme: {
@@ -24577,8 +24766,8 @@ var ParameterRichTextInner = ({
24577
24766
  },
24578
24767
  editable: !readOnly
24579
24768
  };
24580
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
24581
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
24769
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
24770
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24582
24771
  RichText,
24583
24772
  {
24584
24773
  onChange,
@@ -24621,13 +24810,13 @@ var RichText = ({
24621
24810
  onInsertTable,
24622
24811
  minimalInteractivity
24623
24812
  }) => {
24624
- const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
24625
- (0, import_react156.useEffect)(() => {
24813
+ const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
24814
+ (0, import_react157.useEffect)(() => {
24626
24815
  if (onRichTextInit) {
24627
24816
  onRichTextInit(editor);
24628
24817
  }
24629
24818
  }, [editor, onRichTextInit]);
24630
- (0, import_react156.useEffect)(() => {
24819
+ (0, import_react157.useEffect)(() => {
24631
24820
  const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
24632
24821
  requestAnimationFrame(() => {
24633
24822
  if (!(0, import_fast_equals2.deepEqual)(editorState.toJSON(), prevEditorState.toJSON())) {
@@ -24639,73 +24828,88 @@ var RichText = ({
24639
24828
  removeUpdateListener();
24640
24829
  };
24641
24830
  }, [editor, onChange]);
24642
- (0, import_react156.useEffect)(() => {
24831
+ (0, import_react157.useEffect)(() => {
24643
24832
  editor.setEditable(!readOnly);
24644
24833
  }, [editor, readOnly]);
24645
- const [editorContainerRef, setEditorContainerRef] = (0, import_react156.useState)(null);
24646
- const onRef = (_editorContainerRef) => {
24834
+ const [editorContainerRef, setEditorContainerRef] = (0, import_react157.useState)(null);
24835
+ const onEditorContainerRef = (_editorContainerRef) => {
24647
24836
  if (_editorContainerRef !== null) {
24648
24837
  setEditorContainerRef(_editorContainerRef);
24649
24838
  }
24650
24839
  };
24651
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
24652
- readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(RichTextToolbar_default, { config, customControls, onInsertTable }),
24653
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
24654
- "div",
24655
- {
24656
- css: editorContainer,
24657
- className: editorInputWrapperClassName,
24658
- ref: onRef,
24659
- "data-testid": "value-container",
24660
- children: [
24661
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
24662
- import_LexicalRichTextPlugin.RichTextPlugin,
24663
- {
24664
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
24665
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
24666
- ErrorBoundary: import_LexicalErrorBoundary.default
24667
- }
24668
- ),
24669
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalListPlugin.ListPlugin, {}),
24670
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
24671
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableActionMenuPlugin, { positioningAnchorEl: editorContainerRef }) : null,
24672
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
24673
- readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
24674
- editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
24675
- LinkNodePlugin,
24676
- {
24677
- onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
24678
- getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
24679
- var _a, _b;
24680
- return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
24681
- } : void 0,
24682
- positioningAnchorEl: editorContainerRef
24683
- }
24684
- ) : null,
24685
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ListIndentPlugin, { maxDepth: 4 }),
24686
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DisableStylesPlugin, {}),
24687
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
24688
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children })
24689
- ]
24690
- }
24691
- )
24840
+ const [portalContainerRef, setPortalContainerRef] = (0, import_react157.useState)(null);
24841
+ const onPortalContainerRef = (_portalContainerRef) => {
24842
+ if (_portalContainerRef !== null) {
24843
+ setPortalContainerRef(_portalContainerRef);
24844
+ }
24845
+ };
24846
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
24847
+ readOnly || minimalInteractivity ? null : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(RichTextToolbar_default, { config, customControls, onInsertTable }),
24848
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
24849
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
24850
+ "div",
24851
+ {
24852
+ css: editorContainer,
24853
+ className: editorInputWrapperClassName,
24854
+ ref: onEditorContainerRef,
24855
+ "data-testid": "value-container",
24856
+ children: [
24857
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24858
+ import_LexicalRichTextPlugin.RichTextPlugin,
24859
+ {
24860
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
24861
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
24862
+ ErrorBoundary: import_LexicalErrorBoundary.default
24863
+ }
24864
+ ),
24865
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalListPlugin.ListPlugin, {}),
24866
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(ListIndentPlugin, { maxDepth: 4 }),
24867
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalTablePlugin.TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
24868
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { css: editorContainerOverflowWrapper, children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24869
+ TableActionMenuPlugin,
24870
+ {
24871
+ positioningAnchorEl: editorContainerRef,
24872
+ menuPortalEl: portalContainerRef
24873
+ }
24874
+ ) : null }),
24875
+ editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
24876
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
24877
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(DisableStylesPlugin, {}),
24878
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
24879
+ ]
24880
+ }
24881
+ ),
24882
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_jsx_runtime133.Fragment, { children }),
24883
+ editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
24884
+ LinkNodePlugin,
24885
+ {
24886
+ onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
24887
+ getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
24888
+ var _a, _b;
24889
+ return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
24890
+ } : void 0,
24891
+ positioningAnchorEl: editorContainerRef
24892
+ }
24893
+ ) : null,
24894
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(TableSelectionPlugin_default, {})
24895
+ ] })
24692
24896
  ] });
24693
24897
  };
24694
24898
 
24695
24899
  // src/components/ParameterInputs/ParameterSelect.tsx
24696
24900
  init_emotion_jsx_shim();
24697
- var import_react157 = require("react");
24698
- var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
24699
- var ParameterSelect = (0, import_react157.forwardRef)(
24901
+ var import_react158 = require("react");
24902
+ var import_jsx_runtime134 = require("@emotion/react/jsx-runtime");
24903
+ var ParameterSelect = (0, import_react158.forwardRef)(
24700
24904
  ({ defaultOption, options, ...props }, ref) => {
24701
24905
  const { shellProps, innerProps } = extractParameterProps(props);
24702
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
24906
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
24703
24907
  }
24704
24908
  );
24705
- var ParameterSelectInner = (0, import_react157.forwardRef)(
24909
+ var ParameterSelectInner = (0, import_react158.forwardRef)(
24706
24910
  ({ defaultOption, options, ...props }, ref) => {
24707
24911
  const { id, label, hiddenLabel } = useParameterShell();
24708
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
24912
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
24709
24913
  "select",
24710
24914
  {
24711
24915
  css: [input3, selectInput],
@@ -24714,10 +24918,10 @@ var ParameterSelectInner = (0, import_react157.forwardRef)(
24714
24918
  ref,
24715
24919
  ...props,
24716
24920
  children: [
24717
- defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("option", { value: "", children: defaultOption }) : null,
24921
+ defaultOption ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("option", { value: "", children: defaultOption }) : null,
24718
24922
  options.map((option) => {
24719
24923
  var _a;
24720
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
24924
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
24721
24925
  })
24722
24926
  ]
24723
24927
  }
@@ -24727,15 +24931,15 @@ var ParameterSelectInner = (0, import_react157.forwardRef)(
24727
24931
 
24728
24932
  // src/components/ParameterInputs/ParameterTextarea.tsx
24729
24933
  init_emotion_jsx_shim();
24730
- var import_react158 = require("react");
24731
- var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
24732
- var ParameterTextarea = (0, import_react158.forwardRef)((props, ref) => {
24934
+ var import_react159 = require("react");
24935
+ var import_jsx_runtime135 = require("@emotion/react/jsx-runtime");
24936
+ var ParameterTextarea = (0, import_react159.forwardRef)((props, ref) => {
24733
24937
  const { shellProps, innerProps } = extractParameterProps(props);
24734
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
24938
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ParameterTextareaInner, { ref, ...innerProps }) });
24735
24939
  });
24736
- var ParameterTextareaInner = (0, import_react158.forwardRef)(({ ...props }, ref) => {
24940
+ var ParameterTextareaInner = (0, import_react159.forwardRef)(({ ...props }, ref) => {
24737
24941
  const { id, label, hiddenLabel } = useParameterShell();
24738
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
24942
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
24739
24943
  "textarea",
24740
24944
  {
24741
24945
  css: [input3, textarea2],
@@ -24749,18 +24953,18 @@ var ParameterTextareaInner = (0, import_react158.forwardRef)(({ ...props }, ref)
24749
24953
 
24750
24954
  // src/components/ParameterInputs/ParameterToggle.tsx
24751
24955
  init_emotion_jsx_shim();
24752
- var import_react159 = require("react");
24753
- var import_jsx_runtime137 = require("@emotion/react/jsx-runtime");
24754
- var ParameterToggle = (0, import_react159.forwardRef)((props, ref) => {
24956
+ var import_react160 = require("react");
24957
+ var import_jsx_runtime136 = require("@emotion/react/jsx-runtime");
24958
+ var ParameterToggle = (0, import_react160.forwardRef)((props, ref) => {
24755
24959
  const { shellProps, innerProps } = extractParameterProps(props);
24756
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
24960
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterShell, { ...shellProps, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ParameterToggleInner, { ref, ...innerProps }) });
24757
24961
  });
24758
- var ParameterToggleInner = (0, import_react159.forwardRef)(
24962
+ var ParameterToggleInner = (0, import_react160.forwardRef)(
24759
24963
  ({ children, ...props }, ref) => {
24760
24964
  const { id, label } = useParameterShell();
24761
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("label", { css: inputToggleLabel2, children: [
24762
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
24763
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("span", { css: inlineLabel2, children: label }),
24965
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("label", { css: inputToggleLabel2, children: [
24966
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
24967
+ /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("span", { css: inlineLabel2, children: label }),
24764
24968
  children
24765
24969
  ] });
24766
24970
  }
@@ -24771,8 +24975,8 @@ init_emotion_jsx_shim();
24771
24975
 
24772
24976
  // src/components/ProgressBar/ProgressBar.styles.ts
24773
24977
  init_emotion_jsx_shim();
24774
- var import_react160 = require("@emotion/react");
24775
- var container3 = import_react160.css`
24978
+ var import_react161 = require("@emotion/react");
24979
+ var container3 = import_react161.css`
24776
24980
  background: var(--gray-50);
24777
24981
  margin-block: var(--spacing-sm);
24778
24982
  position: relative;
@@ -24782,17 +24986,17 @@ var container3 = import_react160.css`
24782
24986
  border: solid 1px var(--gray-300);
24783
24987
  `;
24784
24988
  var themeMap = {
24785
- primary: import_react160.css`
24989
+ primary: import_react161.css`
24786
24990
  --progress-color: var(--accent-light);
24787
24991
  `,
24788
- secondary: import_react160.css`
24992
+ secondary: import_react161.css`
24789
24993
  --progress-color: var(--accent-alt-light);
24790
24994
  `,
24791
- destructive: import_react160.css`
24995
+ destructive: import_react161.css`
24792
24996
  --progress-color: var(--brand-secondary-5);
24793
24997
  `
24794
24998
  };
24795
- var slidingBackgroundPosition = import_react160.keyframes`
24999
+ var slidingBackgroundPosition = import_react161.keyframes`
24796
25000
  from {
24797
25001
  background-position: 0 0;
24798
25002
  }
@@ -24800,10 +25004,10 @@ var slidingBackgroundPosition = import_react160.keyframes`
24800
25004
  background-position: 64px 0;
24801
25005
  }
24802
25006
  `;
24803
- var determinate = import_react160.css`
25007
+ var determinate = import_react161.css`
24804
25008
  background-color: var(--progress-color);
24805
25009
  `;
24806
- var indeterminate = import_react160.css`
25010
+ var indeterminate = import_react161.css`
24807
25011
  background-image: linear-gradient(
24808
25012
  45deg,
24809
25013
  var(--progress-color) 25%,
@@ -24817,7 +25021,7 @@ var indeterminate = import_react160.css`
24817
25021
  background-size: 64px 64px;
24818
25022
  animation: ${slidingBackgroundPosition} 1s linear infinite;
24819
25023
  `;
24820
- var bar = import_react160.css`
25024
+ var bar = import_react161.css`
24821
25025
  position: absolute;
24822
25026
  inset: 0;
24823
25027
  transition: transform var(--duration-fast) var(--timing-ease-out);
@@ -24825,7 +25029,7 @@ var bar = import_react160.css`
24825
25029
  `;
24826
25030
 
24827
25031
  // src/components/ProgressBar/ProgressBar.tsx
24828
- var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
25032
+ var import_jsx_runtime137 = require("@emotion/react/jsx-runtime");
24829
25033
  function ProgressBar({
24830
25034
  current,
24831
25035
  max,
@@ -24835,7 +25039,7 @@ function ProgressBar({
24835
25039
  }) {
24836
25040
  const valueNow = Math.min(current, max);
24837
25041
  const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
24838
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
25042
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
24839
25043
  "div",
24840
25044
  {
24841
25045
  css: container3,
@@ -24846,7 +25050,7 @@ function ProgressBar({
24846
25050
  "aria-valuemax": max,
24847
25051
  "aria-valuenow": valueNow,
24848
25052
  ...props,
24849
- children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
25053
+ children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
24850
25054
  "div",
24851
25055
  {
24852
25056
  css: [
@@ -24866,31 +25070,31 @@ function ProgressBar({
24866
25070
 
24867
25071
  // src/components/ProgressList/ProgressList.tsx
24868
25072
  init_emotion_jsx_shim();
24869
- var import_react162 = require("@emotion/react");
25073
+ var import_react163 = require("@emotion/react");
24870
25074
  var import_CgCheckO3 = require("@react-icons/all-files/cg/CgCheckO");
24871
25075
  var import_CgRadioCheck2 = require("@react-icons/all-files/cg/CgRadioCheck");
24872
25076
  var import_CgRecord2 = require("@react-icons/all-files/cg/CgRecord");
24873
- var import_react163 = require("react");
25077
+ var import_react164 = require("react");
24874
25078
 
24875
25079
  // src/components/ProgressList/styles/ProgressList.styles.ts
24876
25080
  init_emotion_jsx_shim();
24877
- var import_react161 = require("@emotion/react");
24878
- var progressListStyles = import_react161.css`
25081
+ var import_react162 = require("@emotion/react");
25082
+ var progressListStyles = import_react162.css`
24879
25083
  display: flex;
24880
25084
  flex-direction: column;
24881
25085
  gap: var(--spacing-sm);
24882
25086
  list-style-type: none;
24883
25087
  `;
24884
- var progressListItemStyles = import_react161.css`
25088
+ var progressListItemStyles = import_react162.css`
24885
25089
  display: flex;
24886
25090
  gap: var(--spacing-base);
24887
25091
  align-items: center;
24888
25092
  `;
24889
25093
 
24890
25094
  // src/components/ProgressList/ProgressList.tsx
24891
- var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
25095
+ var import_jsx_runtime138 = require("@emotion/react/jsx-runtime");
24892
25096
  var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
24893
- const itemsWithStatus = (0, import_react163.useMemo)(() => {
25097
+ const itemsWithStatus = (0, import_react164.useMemo)(() => {
24894
25098
  const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
24895
25099
  return items.map((item, index) => {
24896
25100
  let status = "queued";
@@ -24902,8 +25106,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
24902
25106
  return { ...item, status };
24903
25107
  });
24904
25108
  }, [items, inProgressId]);
24905
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
24906
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
25109
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
25110
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
24907
25111
  ProgressListItem,
24908
25112
  {
24909
25113
  status,
@@ -24923,7 +25127,7 @@ var ProgressListItem = ({
24923
25127
  errorLevel = "danger",
24924
25128
  autoEllipsis = false
24925
25129
  }) => {
24926
- const icon = (0, import_react163.useMemo)(() => {
25130
+ const icon = (0, import_react164.useMemo)(() => {
24927
25131
  if (error) {
24928
25132
  return warningIcon;
24929
25133
  }
@@ -24934,14 +25138,14 @@ var ProgressListItem = ({
24934
25138
  };
24935
25139
  return iconPerStatus[status];
24936
25140
  }, [status, error]);
24937
- const statusStyles = (0, import_react163.useMemo)(() => {
25141
+ const statusStyles = (0, import_react164.useMemo)(() => {
24938
25142
  if (error) {
24939
- return errorLevel === "caution" ? import_react162.css`
25143
+ return errorLevel === "caution" ? import_react163.css`
24940
25144
  color: rgb(161, 98, 7);
24941
25145
  & svg {
24942
25146
  color: rgb(250, 204, 21);
24943
25147
  }
24944
- ` : import_react162.css`
25148
+ ` : import_react163.css`
24945
25149
  color: rgb(185, 28, 28);
24946
25150
  & svg {
24947
25151
  color: var(--brand-primary-2);
@@ -24949,40 +25153,40 @@ var ProgressListItem = ({
24949
25153
  `;
24950
25154
  }
24951
25155
  const colorPerStatus = {
24952
- completed: import_react162.css`
25156
+ completed: import_react163.css`
24953
25157
  opacity: 0.75;
24954
25158
  `,
24955
- inProgress: import_react162.css`
25159
+ inProgress: import_react163.css`
24956
25160
  -webkit-text-stroke-width: thin;
24957
25161
  `,
24958
- queued: import_react162.css`
25162
+ queued: import_react163.css`
24959
25163
  opacity: 0.5;
24960
25164
  `
24961
25165
  };
24962
25166
  return colorPerStatus[status];
24963
25167
  }, [status, error, errorLevel]);
24964
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
24965
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
24966
- /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { children: [
25168
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("li", { css: [progressListItemStyles, statusStyles], children: [
25169
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
25170
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { children: [
24967
25171
  children,
24968
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
25172
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
24969
25173
  ] })
24970
25174
  ] });
24971
25175
  };
24972
25176
 
24973
25177
  // src/components/SegmentedControl/SegmentedControl.tsx
24974
25178
  init_emotion_jsx_shim();
24975
- var import_react165 = require("@emotion/react");
25179
+ var import_react166 = require("@emotion/react");
24976
25180
  var import_CgCheck6 = require("@react-icons/all-files/cg/CgCheck");
24977
- var import_react166 = require("react");
25181
+ var import_react167 = require("react");
24978
25182
 
24979
25183
  // src/components/SegmentedControl/SegmentedControl.styles.ts
24980
25184
  init_emotion_jsx_shim();
24981
- var import_react164 = require("@emotion/react");
24982
- var segmentedControlRootStyles = import_react164.css`
25185
+ var import_react165 = require("@emotion/react");
25186
+ var segmentedControlRootStyles = import_react165.css`
24983
25187
  position: relative;
24984
25188
  `;
24985
- var segmentedControlScrollIndicatorsStyles = import_react164.css`
25189
+ var segmentedControlScrollIndicatorsStyles = import_react165.css`
24986
25190
  position: absolute;
24987
25191
  inset: 0;
24988
25192
  z-index: 1;
@@ -25010,17 +25214,17 @@ var segmentedControlScrollIndicatorsStyles = import_react164.css`
25010
25214
  background: linear-gradient(to left, var(--background-color) 10%, transparent);
25011
25215
  }
25012
25216
  `;
25013
- var segmentedControlScrollIndicatorStartVisibleStyles = import_react164.css`
25217
+ var segmentedControlScrollIndicatorStartVisibleStyles = import_react165.css`
25014
25218
  &::before {
25015
25219
  opacity: 1;
25016
25220
  }
25017
25221
  `;
25018
- var segmentedControlScrollIndicatorEndVisibleStyles = import_react164.css`
25222
+ var segmentedControlScrollIndicatorEndVisibleStyles = import_react165.css`
25019
25223
  &::after {
25020
25224
  opacity: 1;
25021
25225
  }
25022
25226
  `;
25023
- var segmentedControlWrapperStyles = import_react164.css`
25227
+ var segmentedControlWrapperStyles = import_react165.css`
25024
25228
  overflow-y: auto;
25025
25229
  scroll-behavior: smooth;
25026
25230
  scrollbar-width: none;
@@ -25029,7 +25233,7 @@ var segmentedControlWrapperStyles = import_react164.css`
25029
25233
  height: 0px;
25030
25234
  }
25031
25235
  `;
25032
- var segmentedControlStyles = import_react164.css`
25236
+ var segmentedControlStyles = import_react165.css`
25033
25237
  --segmented-control-rounded-value: var(--rounded-base);
25034
25238
  --segmented-control-border-width: 1px;
25035
25239
  --segmented-control-selected-color: var(--brand-secondary-3);
@@ -25048,14 +25252,14 @@ var segmentedControlStyles = import_react164.css`
25048
25252
  border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
25049
25253
  font-size: var(--fs-xs);
25050
25254
  `;
25051
- var segmentedControlVerticalStyles = import_react164.css`
25255
+ var segmentedControlVerticalStyles = import_react165.css`
25052
25256
  flex-direction: column;
25053
25257
  --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
25054
25258
  var(--segmented-control-rounded-value) 0 0;
25055
25259
  --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
25056
25260
  var(--segmented-control-rounded-value);
25057
25261
  `;
25058
- var segmentedControlItemStyles = import_react164.css`
25262
+ var segmentedControlItemStyles = import_react165.css`
25059
25263
  &:first-of-type label {
25060
25264
  border-radius: var(--segmented-control-first-border-radius);
25061
25265
  }
@@ -25063,10 +25267,10 @@ var segmentedControlItemStyles = import_react164.css`
25063
25267
  border-radius: var(--segmented-control-last-border-radius);
25064
25268
  }
25065
25269
  `;
25066
- var segmentedControlInputStyles = import_react164.css`
25270
+ var segmentedControlInputStyles = import_react165.css`
25067
25271
  ${accessibleHidden}
25068
25272
  `;
25069
- var segmentedControlLabelStyles = (checked, disabled2) => import_react164.css`
25273
+ var segmentedControlLabelStyles = (checked, disabled2) => import_react165.css`
25070
25274
  position: relative;
25071
25275
  display: flex;
25072
25276
  align-items: center;
@@ -25133,25 +25337,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => import_react164.css`
25133
25337
  `}
25134
25338
  }
25135
25339
  `;
25136
- var segmentedControlLabelIconOnlyStyles = import_react164.css`
25340
+ var segmentedControlLabelIconOnlyStyles = import_react165.css`
25137
25341
  padding-inline: 0.5em;
25138
25342
  `;
25139
- var segmentedControlLabelCheckStyles = import_react164.css`
25343
+ var segmentedControlLabelCheckStyles = import_react165.css`
25140
25344
  opacity: 0.5;
25141
25345
  `;
25142
- var segmentedControlLabelContentStyles = import_react164.css`
25346
+ var segmentedControlLabelContentStyles = import_react165.css`
25143
25347
  display: flex;
25144
25348
  align-items: center;
25145
25349
  justify-content: center;
25146
25350
  gap: var(--spacing-sm);
25147
25351
  height: 100%;
25148
25352
  `;
25149
- var segmentedControlLabelTextStyles = import_react164.css`
25353
+ var segmentedControlLabelTextStyles = import_react165.css`
25150
25354
  white-space: nowrap;
25151
25355
  `;
25152
25356
 
25153
25357
  // src/components/SegmentedControl/SegmentedControl.tsx
25154
- var import_jsx_runtime140 = require("@emotion/react/jsx-runtime");
25358
+ var import_jsx_runtime139 = require("@emotion/react/jsx-runtime");
25155
25359
  var SegmentedControl = ({
25156
25360
  name,
25157
25361
  options,
@@ -25166,10 +25370,10 @@ var SegmentedControl = ({
25166
25370
  currentBackgroundColor = "white",
25167
25371
  ...props
25168
25372
  }) => {
25169
- const wrapperRef = (0, import_react166.useRef)(null);
25170
- const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react166.useState)(false);
25171
- const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react166.useState)(false);
25172
- const onOptionChange = (0, import_react166.useCallback)(
25373
+ const wrapperRef = (0, import_react167.useRef)(null);
25374
+ const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = (0, import_react167.useState)(false);
25375
+ const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = (0, import_react167.useState)(false);
25376
+ const onOptionChange = (0, import_react167.useCallback)(
25173
25377
  (event) => {
25174
25378
  if (event.target.checked) {
25175
25379
  onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
@@ -25177,19 +25381,19 @@ var SegmentedControl = ({
25177
25381
  },
25178
25382
  [options, onChange]
25179
25383
  );
25180
- const sizeStyles = (0, import_react166.useMemo)(() => {
25384
+ const sizeStyles = (0, import_react167.useMemo)(() => {
25181
25385
  const map = {
25182
- sm: (0, import_react165.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
25183
- md: (0, import_react165.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
25184
- lg: (0, import_react165.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
25185
- xl: (0, import_react165.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
25386
+ sm: (0, import_react166.css)({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
25387
+ md: (0, import_react166.css)({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
25388
+ lg: (0, import_react166.css)({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
25389
+ xl: (0, import_react166.css)({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
25186
25390
  };
25187
25391
  return map[size];
25188
25392
  }, [size]);
25189
- const isIconOnly = (0, import_react166.useMemo)(() => {
25393
+ const isIconOnly = (0, import_react167.useMemo)(() => {
25190
25394
  return options.every((option) => option && option.icon && !option.label);
25191
25395
  }, [options]);
25192
- (0, import_react166.useEffect)(() => {
25396
+ (0, import_react167.useEffect)(() => {
25193
25397
  const wrapperElement = wrapperRef.current;
25194
25398
  const onScroll = () => {
25195
25399
  if (!wrapperElement) {
@@ -25210,8 +25414,8 @@ var SegmentedControl = ({
25210
25414
  wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
25211
25415
  };
25212
25416
  }, []);
25213
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
25214
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
25417
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
25418
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
25215
25419
  "div",
25216
25420
  {
25217
25421
  css: [
@@ -25227,12 +25431,12 @@ var SegmentedControl = ({
25227
25431
  }
25228
25432
  const text = option.label ? option.label : option.icon ? null : String(option.value);
25229
25433
  const isDisabled = disabled2 || option.disabled;
25230
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
25434
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
25231
25435
  "div",
25232
25436
  {
25233
25437
  css: segmentedControlItemStyles,
25234
25438
  "data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
25235
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
25439
+ children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
25236
25440
  "label",
25237
25441
  {
25238
25442
  css: [
@@ -25241,7 +25445,7 @@ var SegmentedControl = ({
25241
25445
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
25242
25446
  ],
25243
25447
  children: [
25244
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
25448
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
25245
25449
  "input",
25246
25450
  {
25247
25451
  css: segmentedControlInputStyles,
@@ -25253,10 +25457,10 @@ var SegmentedControl = ({
25253
25457
  disabled: isDisabled
25254
25458
  }
25255
25459
  ),
25256
- option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
25257
- /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
25258
- !option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
25259
- !text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
25460
+ option.value !== value || noCheckmark ? null : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_CgCheck6.CgCheck, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
25461
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { css: segmentedControlLabelContentStyles, children: [
25462
+ !option.icon ? null : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
25463
+ !text || hideOptionText ? null : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { css: segmentedControlLabelTextStyles, children: text })
25260
25464
  ] })
25261
25465
  ]
25262
25466
  }
@@ -25266,7 +25470,7 @@ var SegmentedControl = ({
25266
25470
  })
25267
25471
  }
25268
25472
  ) }),
25269
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
25473
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
25270
25474
  "div",
25271
25475
  {
25272
25476
  css: [
@@ -25284,18 +25488,18 @@ init_emotion_jsx_shim();
25284
25488
 
25285
25489
  // src/components/Skeleton/Skeleton.styles.ts
25286
25490
  init_emotion_jsx_shim();
25287
- var import_react167 = require("@emotion/react");
25288
- var lightFadingOut = import_react167.keyframes`
25491
+ var import_react168 = require("@emotion/react");
25492
+ var lightFadingOut = import_react168.keyframes`
25289
25493
  from { opacity: 0.1; }
25290
25494
  to { opacity: 0.025; }
25291
25495
  `;
25292
- var skeletonStyles = import_react167.css`
25496
+ var skeletonStyles = import_react168.css`
25293
25497
  animation: ${lightFadingOut} 1s ease-out infinite alternate;
25294
25498
  background-color: var(--gray-900);
25295
25499
  `;
25296
25500
 
25297
25501
  // src/components/Skeleton/Skeleton.tsx
25298
- var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
25502
+ var import_jsx_runtime140 = require("@emotion/react/jsx-runtime");
25299
25503
  var Skeleton = ({
25300
25504
  width = "100%",
25301
25505
  height = "1.25rem",
@@ -25303,7 +25507,7 @@ var Skeleton = ({
25303
25507
  circle = false,
25304
25508
  children,
25305
25509
  ...otherProps
25306
- }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
25510
+ }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
25307
25511
  "div",
25308
25512
  {
25309
25513
  css: [
@@ -25324,12 +25528,12 @@ var Skeleton = ({
25324
25528
 
25325
25529
  // src/components/Switch/Switch.tsx
25326
25530
  init_emotion_jsx_shim();
25327
- var import_react169 = require("react");
25531
+ var import_react170 = require("react");
25328
25532
 
25329
25533
  // src/components/Switch/Switch.styles.ts
25330
25534
  init_emotion_jsx_shim();
25331
- var import_react168 = require("@emotion/react");
25332
- var SwitchInputContainer = import_react168.css`
25535
+ var import_react169 = require("@emotion/react");
25536
+ var SwitchInputContainer = import_react169.css`
25333
25537
  cursor: pointer;
25334
25538
  display: inline-block;
25335
25539
  position: relative;
@@ -25338,7 +25542,7 @@ var SwitchInputContainer = import_react168.css`
25338
25542
  vertical-align: middle;
25339
25543
  user-select: none;
25340
25544
  `;
25341
- var SwitchInput = (size) => import_react168.css`
25545
+ var SwitchInput = (size) => import_react169.css`
25342
25546
  appearance: none;
25343
25547
  border-radius: var(--rounded-full);
25344
25548
  background-color: var(--white);
@@ -25378,7 +25582,7 @@ var SwitchInput = (size) => import_react168.css`
25378
25582
  cursor: not-allowed;
25379
25583
  }
25380
25584
  `;
25381
- var SwitchInputDisabled = import_react168.css`
25585
+ var SwitchInputDisabled = import_react169.css`
25382
25586
  opacity: var(--opacity-50);
25383
25587
  cursor: not-allowed;
25384
25588
 
@@ -25386,7 +25590,7 @@ var SwitchInputDisabled = import_react168.css`
25386
25590
  cursor: not-allowed;
25387
25591
  }
25388
25592
  `;
25389
- var SwitchInputLabel = (size) => import_react168.css`
25593
+ var SwitchInputLabel = (size) => import_react169.css`
25390
25594
  align-items: center;
25391
25595
  color: var(--typography-base);
25392
25596
  display: inline-flex;
@@ -25408,32 +25612,32 @@ var SwitchInputLabel = (size) => import_react168.css`
25408
25612
  top: 0;
25409
25613
  }
25410
25614
  `;
25411
- var SwitchText = (size) => import_react168.css`
25615
+ var SwitchText = (size) => import_react169.css`
25412
25616
  color: var(--gray-500);
25413
25617
  font-size: var(--fs-sm);
25414
25618
  padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
25415
25619
  `;
25416
25620
 
25417
25621
  // src/components/Switch/Switch.tsx
25418
- var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
25419
- var Switch = (0, import_react169.forwardRef)(
25622
+ var import_jsx_runtime141 = require("@emotion/react/jsx-runtime");
25623
+ var Switch = (0, import_react170.forwardRef)(
25420
25624
  ({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
25421
25625
  let additionalText = infoText;
25422
25626
  if (infoText && toggleText) {
25423
25627
  additionalText = inputProps.checked ? toggleText : infoText;
25424
25628
  }
25425
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
25426
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
25629
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, { children: [
25630
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
25427
25631
  "label",
25428
25632
  {
25429
25633
  css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
25430
25634
  children: [
25431
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
25432
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { css: SwitchInputLabel(switchSize), children: label })
25635
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
25636
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("span", { css: SwitchInputLabel(switchSize), children: label })
25433
25637
  ]
25434
25638
  }
25435
25639
  ),
25436
- additionalText ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { css: SwitchText(switchSize), children: additionalText }) : null,
25640
+ additionalText ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { css: SwitchText(switchSize), children: additionalText }) : null,
25437
25641
  children
25438
25642
  ] });
25439
25643
  }
@@ -25445,8 +25649,8 @@ var React24 = __toESM(require("react"));
25445
25649
 
25446
25650
  // src/components/Table/Table.styles.ts
25447
25651
  init_emotion_jsx_shim();
25448
- var import_react170 = require("@emotion/react");
25449
- var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react170.css`
25652
+ var import_react171 = require("@emotion/react");
25653
+ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_react171.css`
25450
25654
  border-bottom: 1px solid var(--gray-400);
25451
25655
  border-collapse: collapse;
25452
25656
  min-width: 100%;
@@ -25466,66 +25670,66 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => import_
25466
25670
  background-color: var(--gray-50);
25467
25671
  }
25468
25672
  `;
25469
- var tableHead = import_react170.css`
25673
+ var tableHead = import_react171.css`
25470
25674
  color: var(--typography-base);
25471
25675
  text-align: left;
25472
25676
  `;
25473
- var tableRow = import_react170.css`
25677
+ var tableRow = import_react171.css`
25474
25678
  border-bottom: 1px solid var(--gray-100);
25475
25679
  `;
25476
- var tableCellHead = import_react170.css`
25680
+ var tableCellHead = import_react171.css`
25477
25681
  font-size: var(--fs-sm);
25478
25682
  text-transform: uppercase;
25479
25683
  font-weight: var(--fw-bold);
25480
25684
  `;
25481
25685
 
25482
25686
  // src/components/Table/Table.tsx
25483
- var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
25687
+ var import_jsx_runtime142 = require("@emotion/react/jsx-runtime");
25484
25688
  var Table = React24.forwardRef(
25485
25689
  ({ children, cellPadding, ...otherProps }, ref) => {
25486
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
25690
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("table", { ref, css: table({ cellPadding }), ...otherProps, children });
25487
25691
  }
25488
25692
  );
25489
25693
  var TableHead = React24.forwardRef(
25490
25694
  ({ children, ...otherProps }, ref) => {
25491
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
25695
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
25492
25696
  }
25493
25697
  );
25494
25698
  var TableBody = React24.forwardRef(
25495
25699
  ({ children, ...otherProps }, ref) => {
25496
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("tbody", { ref, ...otherProps, children });
25700
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tbody", { ref, ...otherProps, children });
25497
25701
  }
25498
25702
  );
25499
25703
  var TableFoot = React24.forwardRef(
25500
25704
  ({ children, ...otherProps }, ref) => {
25501
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("tfoot", { ref, ...otherProps, children });
25705
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tfoot", { ref, ...otherProps, children });
25502
25706
  }
25503
25707
  );
25504
25708
  var TableRow = React24.forwardRef(
25505
25709
  ({ children, ...otherProps }, ref) => {
25506
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
25710
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
25507
25711
  }
25508
25712
  );
25509
25713
  var TableCellHead = React24.forwardRef(
25510
25714
  ({ children, ...otherProps }, ref) => {
25511
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
25715
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
25512
25716
  }
25513
25717
  );
25514
25718
  var TableCellData = React24.forwardRef(
25515
25719
  ({ children, ...otherProps }, ref) => {
25516
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("td", { ref, ...otherProps, children });
25720
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("td", { ref, ...otherProps, children });
25517
25721
  }
25518
25722
  );
25519
25723
 
25520
25724
  // src/components/Tabs/Tabs.tsx
25521
25725
  init_emotion_jsx_shim();
25522
- var import_react172 = require("@ariakit/react");
25523
- var import_react173 = require("react");
25726
+ var import_react173 = require("@ariakit/react");
25727
+ var import_react174 = require("react");
25524
25728
 
25525
25729
  // src/components/Tabs/Tabs.styles.ts
25526
25730
  init_emotion_jsx_shim();
25527
- var import_react171 = require("@emotion/react");
25528
- var tabButtonStyles = import_react171.css`
25731
+ var import_react172 = require("@emotion/react");
25732
+ var tabButtonStyles = import_react172.css`
25529
25733
  align-items: center;
25530
25734
  border: 0;
25531
25735
  height: 2.5rem;
@@ -25542,16 +25746,16 @@ var tabButtonStyles = import_react171.css`
25542
25746
  box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
25543
25747
  }
25544
25748
  `;
25545
- var tabButtonGroupStyles = import_react171.css`
25749
+ var tabButtonGroupStyles = import_react172.css`
25546
25750
  display: flex;
25547
25751
  gap: var(--spacing-base);
25548
25752
  border-bottom: 1px solid var(--gray-300);
25549
25753
  `;
25550
25754
 
25551
25755
  // src/components/Tabs/Tabs.tsx
25552
- var import_jsx_runtime144 = require("@emotion/react/jsx-runtime");
25756
+ var import_jsx_runtime143 = require("@emotion/react/jsx-runtime");
25553
25757
  var useCurrentTab = () => {
25554
- const context = (0, import_react172.useTabStore)();
25758
+ const context = (0, import_react173.useTabStore)();
25555
25759
  if (!context) {
25556
25760
  throw new Error("This component can only be used inside <Tabs>");
25557
25761
  }
@@ -25565,12 +25769,12 @@ var Tabs = ({
25565
25769
  manual,
25566
25770
  ...props
25567
25771
  }) => {
25568
- const selected = (0, import_react173.useMemo)(() => {
25772
+ const selected = (0, import_react174.useMemo)(() => {
25569
25773
  if (selectedId) return selectedId;
25570
25774
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
25571
25775
  }, [selectedId, useHashForState]);
25572
- const tab = (0, import_react172.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
25573
- const onTabSelect = (0, import_react173.useCallback)(
25776
+ const tab = (0, import_react173.useTabStore)({ ...props, selectOnMove: !manual, selectedId: selected });
25777
+ const onTabSelect = (0, import_react174.useCallback)(
25574
25778
  (value) => {
25575
25779
  const selectedValueWithoutNull = value != null ? value : void 0;
25576
25780
  onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
@@ -25581,28 +25785,28 @@ var Tabs = ({
25581
25785
  },
25582
25786
  [onSelectedIdChange, useHashForState]
25583
25787
  );
25584
- (0, import_react173.useEffect)(() => {
25788
+ (0, import_react174.useEffect)(() => {
25585
25789
  if (selected && selected !== tab.getState().activeId) {
25586
25790
  tab.setSelectedId(selected);
25587
25791
  }
25588
25792
  }, [selected, tab]);
25589
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react172.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
25793
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react173.TabProvider, { store: tab, setSelectedId: onTabSelect, children });
25590
25794
  };
25591
25795
  var TabButtonGroup = ({ children, ...props }) => {
25592
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react172.TabList, { ...props, css: tabButtonGroupStyles, children });
25796
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react173.TabList, { ...props, css: tabButtonGroupStyles, children });
25593
25797
  };
25594
25798
  var TabButton = ({
25595
25799
  children,
25596
25800
  id,
25597
25801
  ...props
25598
25802
  }) => {
25599
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react172.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
25803
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react173.Tab, { type: "button", id, ...props, css: tabButtonStyles, children });
25600
25804
  };
25601
25805
  var TabContent = ({
25602
25806
  children,
25603
25807
  ...props
25604
25808
  }) => {
25605
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react172.TabPanel, { ...props, children });
25809
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_react173.TabPanel, { ...props, children });
25606
25810
  };
25607
25811
 
25608
25812
  // src/components/Validation/StatusBullet.tsx
@@ -25610,8 +25814,8 @@ init_emotion_jsx_shim();
25610
25814
 
25611
25815
  // src/components/Validation/StatusBullet.styles.ts
25612
25816
  init_emotion_jsx_shim();
25613
- var import_react174 = require("@emotion/react");
25614
- var StatusBulletContainer = import_react174.css`
25817
+ var import_react175 = require("@emotion/react");
25818
+ var StatusBulletContainer = import_react175.css`
25615
25819
  align-items: center;
25616
25820
  align-self: center;
25617
25821
  color: var(--gray-500);
@@ -25628,33 +25832,33 @@ var StatusBulletContainer = import_react174.css`
25628
25832
  display: block;
25629
25833
  }
25630
25834
  `;
25631
- var StatusBulletBase = import_react174.css`
25835
+ var StatusBulletBase = import_react175.css`
25632
25836
  font-size: var(--fs-sm);
25633
25837
  &:before {
25634
25838
  width: var(--fs-xs);
25635
25839
  height: var(--fs-xs);
25636
25840
  }
25637
25841
  `;
25638
- var StatusBulletSmall = import_react174.css`
25842
+ var StatusBulletSmall = import_react175.css`
25639
25843
  font-size: var(--fs-xs);
25640
25844
  &:before {
25641
25845
  width: var(--fs-xxs);
25642
25846
  height: var(--fs-xxs);
25643
25847
  }
25644
25848
  `;
25645
- var StatusDraft = import_react174.css`
25849
+ var StatusDraft = import_react175.css`
25646
25850
  &:before {
25647
25851
  background: var(--white);
25648
25852
  box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
25649
25853
  }
25650
25854
  `;
25651
- var StatusModified = import_react174.css`
25855
+ var StatusModified = import_react175.css`
25652
25856
  &:before {
25653
25857
  background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
25654
25858
  box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
25655
25859
  }
25656
25860
  `;
25657
- var StatusError = import_react174.css`
25861
+ var StatusError = import_react175.css`
25658
25862
  color: var(--error);
25659
25863
  &:before {
25660
25864
  /* TODO: replace this with an svg icon */
@@ -25667,29 +25871,29 @@ var StatusError = import_react174.css`
25667
25871
  );
25668
25872
  }
25669
25873
  `;
25670
- var StatusPublished = import_react174.css`
25874
+ var StatusPublished = import_react175.css`
25671
25875
  &:before {
25672
25876
  background: var(--accent-dark);
25673
25877
  }
25674
25878
  `;
25675
- var StatusOrphan = import_react174.css`
25879
+ var StatusOrphan = import_react175.css`
25676
25880
  &:before {
25677
25881
  background: var(--brand-secondary-5);
25678
25882
  }
25679
25883
  `;
25680
- var StatusUnknown = import_react174.css`
25884
+ var StatusUnknown = import_react175.css`
25681
25885
  &:before {
25682
25886
  background: var(--gray-800);
25683
25887
  }
25684
25888
  `;
25685
- var StatusDeleted = import_react174.css`
25889
+ var StatusDeleted = import_react175.css`
25686
25890
  &:before {
25687
25891
  background: var(--error);
25688
25892
  }
25689
25893
  `;
25690
25894
 
25691
25895
  // src/components/Validation/StatusBullet.tsx
25692
- var import_jsx_runtime145 = require("@emotion/react/jsx-runtime");
25896
+ var import_jsx_runtime144 = require("@emotion/react/jsx-runtime");
25693
25897
  var StatusBullet = ({
25694
25898
  status,
25695
25899
  hideText = false,
@@ -25709,7 +25913,7 @@ var StatusBullet = ({
25709
25913
  Deleted: StatusDeleted
25710
25914
  };
25711
25915
  const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
25712
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
25916
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
25713
25917
  "span",
25714
25918
  {
25715
25919
  role: "status",