@uniformdev/design-system 19.178.2-alpha.25 → 19.179.1-alpha.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/esm/index.js CHANGED
@@ -12449,7 +12449,6 @@ var Menu = React7.forwardRef(function Menu2({
12449
12449
  menuItemsContainerCssClasses,
12450
12450
  testId,
12451
12451
  maxMenuHeight,
12452
- portalElement,
12453
12452
  ...props
12454
12453
  }, ref) {
12455
12454
  const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
@@ -12460,7 +12459,6 @@ var Menu = React7.forwardRef(function Menu2({
12460
12459
  BaseMenu,
12461
12460
  {
12462
12461
  portal: !withoutPortal,
12463
- portalElement,
12464
12462
  unmountOnHide: true,
12465
12463
  gutter: 0,
12466
12464
  shift: menu.parent ? -4 : 0,
@@ -20247,7 +20245,7 @@ var ParameterNameAndPublicIdInput = ({
20247
20245
  };
20248
20246
 
20249
20247
  // src/components/ParameterInputs/ParameterRichText.tsx
20250
- import { css as css100 } from "@emotion/react";
20248
+ import { css as css98 } from "@emotion/react";
20251
20249
  import { ListItemNode, ListNode as ListNode2 } from "@lexical/list";
20252
20250
  import {
20253
20251
  CODE,
@@ -20259,16 +20257,14 @@ import {
20259
20257
  UNORDERED_LIST
20260
20258
  } from "@lexical/markdown";
20261
20259
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
20262
- import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
20260
+ import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
20263
20261
  import { ContentEditable } from "@lexical/react/LexicalContentEditable";
20264
20262
  import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary";
20265
20263
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
20266
20264
  import { ListPlugin } from "@lexical/react/LexicalListPlugin";
20267
20265
  import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPlugin";
20268
20266
  import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
20269
- import { TablePlugin } from "@lexical/react/LexicalTablePlugin";
20270
20267
  import { HeadingNode, QuoteNode } from "@lexical/rich-text";
20271
- import { TableCellNode as TableCellNode2, TableNode, TableRowNode as TableRowNode2 } from "@lexical/table";
20272
20268
 
20273
20269
  // ../richtext/dist/index.mjs
20274
20270
  var richTextBuiltInElements = [
@@ -20316,10 +20312,6 @@ var richTextBuiltInElements = [
20316
20312
  label: "Code Block",
20317
20313
  type: "code"
20318
20314
  },
20319
- {
20320
- label: "Table",
20321
- type: "table"
20322
- },
20323
20315
  {
20324
20316
  label: "Dynamic Token",
20325
20317
  type: "variable"
@@ -20367,7 +20359,7 @@ var getLabelForElement = (type) => {
20367
20359
  // src/components/ParameterInputs/ParameterRichText.tsx
20368
20360
  import { deepEqual as deepEqual2 } from "fast-equals";
20369
20361
  import { ParagraphNode as ParagraphNode2 } from "lexical";
20370
- import { useEffect as useEffect23, useState as useState20 } from "react";
20362
+ import { useEffect as useEffect21, useRef as useRef12 } from "react";
20371
20363
 
20372
20364
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
20373
20365
  import { CodeNode } from "@lexical/code";
@@ -20582,46 +20574,6 @@ var codeElement = css95`
20582
20574
  margin-bottom: 0;
20583
20575
  }
20584
20576
  `;
20585
- var tableElement = css95`
20586
- border-collapse: collapse;
20587
- border-spacing: 0;
20588
- border-color: var(--gray-300);
20589
- border-width: 1px;
20590
- border-style: solid;
20591
- margin-bottom: var(--spacing-base);
20592
- margin-top: 0;
20593
-
20594
- &:last-child {
20595
- margin-bottom: 0;
20596
- }
20597
- `;
20598
- var tableCellElement = css95`
20599
- background-color: var(--white);
20600
- border-color: var(--gray-300);
20601
- border-style: solid;
20602
- border-width: 1px;
20603
- box-sizing: unset;
20604
- min-width: 2rem;
20605
- outline: none;
20606
- padding: var(--spacing-sm);
20607
- text-align: start;
20608
- vertical-align: top;
20609
- width: 7rem;
20610
- `;
20611
- var tableHeaderElement = css95`
20612
- background-color: var(--gray-100);
20613
- border-color: var(--gray-300);
20614
- border-style: solid;
20615
- border-width: 1px;
20616
- box-sizing: unset;
20617
- font-weight: normal;
20618
- min-width: 2rem;
20619
- outline: none;
20620
- padding: var(--spacing-sm);
20621
- text-align: start;
20622
- vertical-align: top;
20623
- width: 7rem;
20624
- `;
20625
20577
 
20626
20578
  // src/components/ParameterInputs/rich-text/LinkNodePlugin.tsx
20627
20579
  import { css as css96 } from "@emotion/react";
@@ -20977,11 +20929,7 @@ var linkPopoverAnchor = css96`
20977
20929
  ${link}
20978
20930
  ${linkColorDefault}
20979
20931
  `;
20980
- function LinkNodePlugin({
20981
- onConnectLink,
20982
- getBoundPath,
20983
- positioningAnchorEl
20984
- }) {
20932
+ function LinkNodePlugin({ onConnectLink, getBoundPath }) {
20985
20933
  const parsePath = getBoundPath != null ? getBoundPath : function(path) {
20986
20934
  return path;
20987
20935
  };
@@ -21085,11 +21033,9 @@ function LinkNodePlugin({
21085
21033
  setLinkPopoverState(void 0);
21086
21034
  return;
21087
21035
  }
21088
- const elementRect = element.getBoundingClientRect();
21089
- const positioningAnchorRect = positioningAnchorEl.getBoundingClientRect();
21090
21036
  const { x, y } = {
21091
- x: elementRect.left - positioningAnchorRect.left + LINK_POPOVER_OFFSET_X,
21092
- y: elementRect.top + elementRect.height - positioningAnchorRect.top + LINK_POPOVER_OFFSET_Y
21037
+ x: element.offsetLeft + LINK_POPOVER_OFFSET_X,
21038
+ y: element.offsetTop + element.clientHeight + LINK_POPOVER_OFFSET_Y
21093
21039
  };
21094
21040
  setLinkPopoverState({
21095
21041
  node: linkNode,
@@ -21098,7 +21044,7 @@ function LinkNodePlugin({
21098
21044
  y
21099
21045
  }
21100
21046
  });
21101
- }, [editor, positioningAnchorEl]);
21047
+ }, [editor]);
21102
21048
  useEffect18(() => {
21103
21049
  return editor.registerUpdateListener(({ editorState }) => {
21104
21050
  requestAnimationFrame(() => {
@@ -21238,12 +21184,10 @@ import {
21238
21184
  import { useLexicalComposerContext as useLexicalComposerContext4 } from "@lexical/react/LexicalComposerContext";
21239
21185
  import { $createHeadingNode, $createQuoteNode, $isHeadingNode } from "@lexical/rich-text";
21240
21186
  import { $setBlocksType } from "@lexical/selection";
21241
- import { $createTableNodeWithDimensions } from "@lexical/table";
21242
21187
  import { $findMatchingParent, $getNearestNodeOfType } from "@lexical/utils";
21243
21188
  import {
21244
21189
  $createParagraphNode,
21245
21190
  $getSelection as $getSelection3,
21246
- $insertNodes,
21247
21191
  $isRangeSelection as $isRangeSelection3,
21248
21192
  $isRootOrShadowRoot,
21249
21193
  COMMAND_PRIORITY_CRITICAL as COMMAND_PRIORITY_CRITICAL2,
@@ -21253,14 +21197,12 @@ import {
21253
21197
  import { useCallback as useCallback11, useEffect as useEffect20, useMemo as useMemo6, useState as useState17 } from "react";
21254
21198
  import { Fragment as Fragment19, jsx as jsx130, jsxs as jsxs86 } from "@emotion/react/jsx-runtime";
21255
21199
  var toolbar = css97`
21256
- ${scrollbarStyles}
21257
21200
  background: var(--gray-50);
21258
21201
  border-radius: var(--rounded-base);
21259
21202
  display: flex;
21260
21203
  /* We add 1px because we use a 1px wide separator */
21261
21204
  gap: calc(var(--spacing-sm) + 1px);
21262
21205
  margin: calc(var(--spacing-sm) + var(--spacing-xs)) 0;
21263
- overflow: auto;
21264
21206
  padding: var(--spacing-sm);
21265
21207
  position: sticky;
21266
21208
  top: calc(var(--spacing-sm) * -2);
@@ -21268,7 +21210,6 @@ var toolbar = css97`
21268
21210
  `;
21269
21211
  var toolbarGroup = css97`
21270
21212
  display: flex;
21271
- flex-shrink: 0;
21272
21213
  gap: var(--spacing-xs);
21273
21214
  position: relative;
21274
21215
 
@@ -21291,7 +21232,6 @@ var richTextToolbarButton = css97`
21291
21232
  box-shadow: none;
21292
21233
  color: var(--gray-900);
21293
21234
  display: flex;
21294
- flex-shrink: 0;
21295
21235
  height: 32px;
21296
21236
  justify-content: center;
21297
21237
  min-width: 32px;
@@ -21300,10 +21240,6 @@ var richTextToolbarButton = css97`
21300
21240
  var richTextToolbarButtonActive = css97`
21301
21241
  background: var(--gray-200);
21302
21242
  `;
21303
- var textStyleButton = css97`
21304
- justify-content: space-between;
21305
- min-width: 7rem;
21306
- `;
21307
21243
  var toolbarIcon = css97`
21308
21244
  color: inherit;
21309
21245
  `;
@@ -21324,7 +21260,7 @@ var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
21324
21260
  ]);
21325
21261
  var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
21326
21262
  var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
21327
- var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
21263
+ var RichTextToolbar = ({ config, customControls }) => {
21328
21264
  const [editor] = useLexicalComposerContext4();
21329
21265
  const {
21330
21266
  activeElement,
@@ -21340,39 +21276,26 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
21340
21276
  visibleLists,
21341
21277
  codeElementVisible,
21342
21278
  quoteElementVisible,
21343
- visibleElementsWithIcons,
21344
- visibleInsertElementsWithIcons,
21345
- tableElementVisible
21279
+ visibleElementsWithIcons
21346
21280
  } = useRichTextToolbarState({ config });
21347
21281
  const onSelectElement = (type) => {
21348
21282
  if (activeElement === type) {
21349
21283
  return;
21350
21284
  }
21351
- editor.focus(() => {
21352
- editor.update(() => {
21353
- const selection = $getSelection3();
21354
- if (HEADING_ELEMENTS.includes(type)) {
21355
- $setBlocksType(selection, () => $createHeadingNode(type));
21356
- } else if (type === "paragraph") {
21357
- $setBlocksType(selection, () => $createParagraphNode());
21358
- } else if (type === "quote") {
21359
- $setBlocksType(selection, () => $createQuoteNode());
21360
- } else if (type === "code") {
21361
- $setBlocksType(selection, () => $createCodeNode());
21362
- } else if (type === "table" && onInsertTable) {
21363
- onInsertTable().then((dimensions) => {
21364
- if (!dimensions) {
21365
- return;
21366
- }
21367
- const { rows, columns } = dimensions;
21368
- editor.focus(() => {
21369
- editor.update(() => {
21370
- $insertNodes([$createTableNodeWithDimensions(rows, columns, false)]);
21371
- });
21372
- });
21373
- });
21374
- }
21375
- });
21285
+ editor.update(() => {
21286
+ const selection = $getSelection3();
21287
+ if (!$isRangeSelection3(selection)) {
21288
+ return;
21289
+ }
21290
+ if (HEADING_ELEMENTS.includes(type)) {
21291
+ $setBlocksType(selection, () => $createHeadingNode(type));
21292
+ } else if (type === "paragraph") {
21293
+ $setBlocksType(selection, () => $createParagraphNode());
21294
+ } else if (type === "quote") {
21295
+ $setBlocksType(selection, () => $createQuoteNode());
21296
+ } else if (type === "code") {
21297
+ $setBlocksType(selection, () => $createCodeNode());
21298
+ }
21376
21299
  });
21377
21300
  };
21378
21301
  const updateToolbar = useCallback11(() => {
@@ -21437,7 +21360,8 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
21437
21360
  /* @__PURE__ */ jsxs86(
21438
21361
  Menu,
21439
21362
  {
21440
- menuTrigger: /* @__PURE__ */ jsxs86("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
21363
+ menuLabel: "Elements",
21364
+ menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Text styles", children: [
21441
21365
  visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
21442
21366
  " ",
21443
21367
  /* @__PURE__ */ jsx130(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
@@ -21497,7 +21421,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
21497
21421
  }
21498
21422
  ) : null
21499
21423
  ] }) : null,
21500
- visibleElementsWithIcons.size > 0 || customControls ? /* @__PURE__ */ jsxs86("div", { css: toolbarGroup, children: [
21424
+ visibleElementsWithIcons.size > 0 ? /* @__PURE__ */ jsxs86("div", { css: toolbarGroup, children: [
21501
21425
  linkElementVisible ? /* @__PURE__ */ jsx130(Tooltip, { title: "Link", placement: "top", children: /* @__PURE__ */ jsx130(
21502
21426
  "button",
21503
21427
  {
@@ -21536,50 +21460,28 @@ var RichTextToolbar = ({ config, customControls, onInsertTable }) => {
21536
21460
  }
21537
21461
  ) }) : null
21538
21462
  ] }) : null,
21539
- customControls ? customControls : null
21463
+ quoteElementVisible ? /* @__PURE__ */ jsx130(Tooltip, { title: "Blockquote", placement: "top", children: /* @__PURE__ */ jsx130(
21464
+ "button",
21465
+ {
21466
+ onClick: () => {
21467
+ activeElement === "quote" ? onSelectElement("paragraph") : onSelectElement("quote");
21468
+ },
21469
+ css: [richTextToolbarButton, activeElement === "quote" ? richTextToolbarButtonActive : null],
21470
+ children: /* @__PURE__ */ jsx130(RichTextToolbarIcon, { icon: "quote" })
21471
+ }
21472
+ ) }) : null,
21473
+ codeElementVisible ? /* @__PURE__ */ jsx130(Tooltip, { title: "Code Block", placement: "top", children: /* @__PURE__ */ jsx130(
21474
+ "button",
21475
+ {
21476
+ onClick: () => {
21477
+ activeElement === "code" ? onSelectElement("paragraph") : onSelectElement("code");
21478
+ },
21479
+ css: [richTextToolbarButton, activeElement === "code" ? richTextToolbarButtonActive : null],
21480
+ children: /* @__PURE__ */ jsx130(RichTextToolbarIcon, { icon: "code-slash" })
21481
+ }
21482
+ ) }) : null
21540
21483
  ] }) : null,
21541
- visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ jsx130("div", { css: toolbarGroup, children: /* @__PURE__ */ jsxs86(
21542
- Menu,
21543
- {
21544
- menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Insert block element", children: [
21545
- "Insert",
21546
- /* @__PURE__ */ jsx130(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
21547
- ] }),
21548
- placement: "bottom-start",
21549
- children: [
21550
- quoteElementVisible ? /* @__PURE__ */ jsx130(
21551
- MenuItem,
21552
- {
21553
- onClick: () => {
21554
- onSelectElement("quote");
21555
- },
21556
- icon: /* @__PURE__ */ jsx130(Icon, { icon: "quote", iconColor: "currentColor" }),
21557
- children: "Quote"
21558
- }
21559
- ) : null,
21560
- codeElementVisible ? /* @__PURE__ */ jsx130(
21561
- MenuItem,
21562
- {
21563
- onClick: () => {
21564
- onSelectElement("code");
21565
- },
21566
- icon: /* @__PURE__ */ jsx130(Icon, { icon: "code-slash", iconColor: "currentColor" }),
21567
- children: "Code"
21568
- }
21569
- ) : null,
21570
- tableElementVisible && onInsertTable !== void 0 ? /* @__PURE__ */ jsx130(
21571
- MenuItem,
21572
- {
21573
- onClick: () => {
21574
- onSelectElement("table");
21575
- },
21576
- icon: /* @__PURE__ */ jsx130(Icon, { icon: "view-grid", iconColor: "currentColor" }),
21577
- children: "Table"
21578
- }
21579
- ) : null
21580
- ]
21581
- }
21582
- ) }) : null
21484
+ customControls ? /* @__PURE__ */ jsx130("div", { css: toolbarGroup, children: customControls }) : null
21583
21485
  ] });
21584
21486
  };
21585
21487
  var RichTextToolbar_default = RichTextToolbar;
@@ -21656,9 +21558,6 @@ var useRichTextToolbarState = ({ config }) => {
21656
21558
  const codeElementVisible = useMemo6(() => {
21657
21559
  return enabledBuiltInElements.some((element) => element.type === "code") || activeElement === "code";
21658
21560
  }, [activeElement, enabledBuiltInElements]);
21659
- const tableElementVisible = useMemo6(() => {
21660
- return enabledBuiltInElements.some((element) => element.type === "table") || activeElement === "table";
21661
- }, [activeElement, enabledBuiltInElements]);
21662
21561
  const visibleElementsWithIcons = useMemo6(() => {
21663
21562
  const visibleElements = /* @__PURE__ */ new Set();
21664
21563
  if (linkElementVisible) {
@@ -21669,21 +21568,14 @@ var useRichTextToolbarState = ({ config }) => {
21669
21568
  visibleElements.add(type);
21670
21569
  });
21671
21570
  }
21672
- return visibleElements;
21673
- }, [linkElementVisible, visibleLists]);
21674
- const visibleInsertElementsWithIcons = useMemo6(() => {
21675
- const visibleElements = /* @__PURE__ */ new Set();
21676
21571
  if (quoteElementVisible) {
21677
21572
  visibleElements.add("quote");
21678
21573
  }
21679
21574
  if (codeElementVisible) {
21680
21575
  visibleElements.add("code");
21681
21576
  }
21682
- if (tableElementVisible) {
21683
- visibleElements.add("table");
21684
- }
21685
21577
  return visibleElements;
21686
- }, [codeElementVisible, quoteElementVisible, tableElementVisible]);
21578
+ }, [codeElementVisible, linkElementVisible, quoteElementVisible, visibleLists]);
21687
21579
  return {
21688
21580
  activeFormats,
21689
21581
  setActiveFormats,
@@ -21698,718 +21590,12 @@ var useRichTextToolbarState = ({ config }) => {
21698
21590
  visibleLists,
21699
21591
  quoteElementVisible,
21700
21592
  codeElementVisible,
21701
- tableElementVisible,
21702
- visibleElementsWithIcons,
21703
- visibleInsertElementsWithIcons
21593
+ visibleElementsWithIcons
21704
21594
  };
21705
21595
  };
21706
21596
 
21707
- // src/components/ParameterInputs/rich-text/TableActionMenuPlugin.tsx
21708
- import { css as css98 } from "@emotion/react";
21709
- import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
21710
- import { useLexicalEditable } from "@lexical/react/useLexicalEditable";
21711
- import {
21712
- $deleteTableColumn__EXPERIMENTAL,
21713
- $deleteTableRow__EXPERIMENTAL,
21714
- $getTableCellNodeFromLexicalNode,
21715
- $getTableColumnIndexFromTableCellNode,
21716
- $getTableNodeFromLexicalNodeOrThrow,
21717
- $getTableRowIndexFromTableCellNode,
21718
- $insertTableColumn__EXPERIMENTAL,
21719
- $insertTableRow__EXPERIMENTAL,
21720
- $isTableCellNode,
21721
- $isTableRowNode,
21722
- $isTableSelection,
21723
- getTableObserverFromTableElement,
21724
- TableCellHeaderStates,
21725
- TableCellNode
21726
- } from "@lexical/table";
21727
- import { $getRoot, $getSelection as $getSelection4, $isRangeSelection as $isRangeSelection4 } from "lexical";
21728
- import { forwardRef as forwardRef22, useCallback as useCallback12, useEffect as useEffect21, useLayoutEffect, useState as useState18 } from "react";
21729
- import { jsx as jsx131, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
21730
- function computeSelectionCount(selection) {
21731
- const selectionShape = selection.getShape();
21732
- return {
21733
- columns: selectionShape.toX - selectionShape.fromX + 1,
21734
- rows: selectionShape.toY - selectionShape.fromY + 1
21735
- };
21736
- }
21737
- var tableActionMenuTrigger = css98`
21738
- position: absolute;
21739
- transform: translate(calc(-100% - 1px), 1px);
21740
- `;
21741
- var TableActionMenuTrigger = forwardRef22((props, ref) => {
21742
- const { tableCellEl, positioningAnchorEl, ...rest } = props;
21743
- const [coordinates, setCoordinates] = useState18({ x: 0, y: 0 });
21744
- useLayoutEffect(() => {
21745
- const rect = tableCellEl.getBoundingClientRect();
21746
- const parentRect = positioningAnchorEl.getBoundingClientRect();
21747
- const relativeX = rect.right - parentRect.left;
21748
- const relativeY = rect.top - parentRect.top;
21749
- setCoordinates({ x: relativeX, y: relativeY });
21750
- }, [tableCellEl, positioningAnchorEl]);
21751
- return /* @__PURE__ */ jsx131(
21752
- IconButton,
21753
- {
21754
- ref,
21755
- css: [
21756
- tableActionMenuTrigger,
21757
- {
21758
- top: coordinates.y,
21759
- left: coordinates.x
21760
- }
21761
- ],
21762
- size: "xs",
21763
- buttonType: "unimportant",
21764
- ...rest,
21765
- children: /* @__PURE__ */ jsx131(Icon, { icon: "chevron-down", size: "1rem", iconColor: "currentColor" })
21766
- }
21767
- );
21768
- });
21769
- TableActionMenuTrigger.displayName = "TableActionMenuTrigger";
21770
- function TableActionMenu({
21771
- tableCellNode: _tableCellNode,
21772
- menuPortalEl,
21773
- tableCellEl,
21774
- positioningAnchorEl
21775
- }) {
21776
- const [editor] = useLexicalComposerContext5();
21777
- const [tableCellNode, updateTableCellNode] = useState18(_tableCellNode);
21778
- const [selectionCounts, updateSelectionCounts] = useState18({
21779
- columns: 1,
21780
- rows: 1
21781
- });
21782
- const [menuTriggerKey, setMenuTriggerKey] = useState18(0);
21783
- const incrementMenuTriggerKey = () => {
21784
- setMenuTriggerKey((key) => key += 1);
21785
- };
21786
- useEffect21(() => {
21787
- return editor.registerMutationListener(
21788
- TableCellNode,
21789
- (nodeMutations) => {
21790
- const nodeUpdated = nodeMutations.get(tableCellNode.getKey()) === "updated";
21791
- if (nodeUpdated) {
21792
- editor.getEditorState().read(() => {
21793
- updateTableCellNode(tableCellNode.getLatest());
21794
- });
21795
- }
21796
- },
21797
- { skipInitialization: true }
21798
- );
21799
- }, [editor, tableCellNode]);
21800
- useEffect21(() => {
21801
- editor.getEditorState().read(() => {
21802
- const selection = $getSelection4();
21803
- if ($isTableSelection(selection)) {
21804
- updateSelectionCounts(computeSelectionCount(selection));
21805
- }
21806
- });
21807
- }, [editor]);
21808
- const clearTableSelection = useCallback12(() => {
21809
- editor.update(() => {
21810
- if (tableCellNode.isAttached()) {
21811
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
21812
- const tableElement2 = editor.getElementByKey(
21813
- tableNode.getKey()
21814
- );
21815
- if (!tableElement2) {
21816
- throw new Error("Expected to find tableElement in DOM");
21817
- }
21818
- const tableSelection = getTableObserverFromTableElement(tableElement2);
21819
- if (tableSelection !== null) {
21820
- tableSelection.clearHighlight();
21821
- }
21822
- tableNode.markDirty();
21823
- updateTableCellNode(tableCellNode.getLatest());
21824
- }
21825
- const rootNode = $getRoot();
21826
- rootNode.selectStart();
21827
- });
21828
- }, [editor, tableCellNode]);
21829
- const insertTableRowAtSelection = useCallback12(
21830
- (shouldInsertAfter) => {
21831
- editor.update(() => {
21832
- $insertTableRow__EXPERIMENTAL(shouldInsertAfter);
21833
- });
21834
- incrementMenuTriggerKey();
21835
- },
21836
- [editor]
21837
- );
21838
- const insertTableColumnAtSelection = useCallback12(
21839
- (shouldInsertAfter) => {
21840
- editor.update(() => {
21841
- for (let i = 0; i < selectionCounts.columns; i++) {
21842
- $insertTableColumn__EXPERIMENTAL(shouldInsertAfter);
21843
- }
21844
- });
21845
- incrementMenuTriggerKey();
21846
- },
21847
- [editor, selectionCounts.columns]
21848
- );
21849
- const deleteTableRowAtSelection = useCallback12(() => {
21850
- editor.update(() => {
21851
- $deleteTableRow__EXPERIMENTAL();
21852
- });
21853
- incrementMenuTriggerKey();
21854
- }, [editor]);
21855
- const deleteTableAtSelection = useCallback12(() => {
21856
- editor.update(() => {
21857
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
21858
- tableNode.remove();
21859
- clearTableSelection();
21860
- });
21861
- }, [editor, tableCellNode, clearTableSelection]);
21862
- const deleteTableColumnAtSelection = useCallback12(() => {
21863
- editor.update(() => {
21864
- $deleteTableColumn__EXPERIMENTAL();
21865
- clearTableSelection();
21866
- });
21867
- incrementMenuTriggerKey();
21868
- }, [editor, clearTableSelection]);
21869
- const toggleTableRowIsHeader = useCallback12(() => {
21870
- editor.update(() => {
21871
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
21872
- const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
21873
- const tableRows = tableNode.getChildren();
21874
- if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {
21875
- throw new Error("Expected table cell to be inside of table row.");
21876
- }
21877
- const tableRow2 = tableRows[tableRowIndex];
21878
- if (!$isTableRowNode(tableRow2)) {
21879
- throw new Error("Expected table row");
21880
- }
21881
- tableRow2.getChildren().forEach((tableCell) => {
21882
- if (!$isTableCellNode(tableCell)) {
21883
- throw new Error("Expected table cell");
21884
- }
21885
- tableCell.toggleHeaderStyle(TableCellHeaderStates.ROW);
21886
- });
21887
- clearTableSelection();
21888
- });
21889
- }, [editor, tableCellNode, clearTableSelection]);
21890
- const toggleTableColumnIsHeader = useCallback12(() => {
21891
- editor.update(() => {
21892
- const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
21893
- const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
21894
- const tableRows = tableNode.getChildren();
21895
- const maxRowsLength = Math.max(...tableRows.map((row) => row.getChildren().length));
21896
- if (tableColumnIndex >= maxRowsLength || tableColumnIndex < 0) {
21897
- throw new Error("Expected table cell to be inside of table row.");
21898
- }
21899
- for (let r = 0; r < tableRows.length; r++) {
21900
- const tableRow2 = tableRows[r];
21901
- if (!$isTableRowNode(tableRow2)) {
21902
- throw new Error("Expected table row");
21903
- }
21904
- const tableCells = tableRow2.getChildren();
21905
- if (tableColumnIndex >= tableCells.length) {
21906
- continue;
21907
- }
21908
- const tableCell = tableCells[tableColumnIndex];
21909
- if (!$isTableCellNode(tableCell)) {
21910
- throw new Error("Expected table cell");
21911
- }
21912
- tableCell.toggleHeaderStyle(TableCellHeaderStates.COLUMN);
21913
- }
21914
- clearTableSelection();
21915
- });
21916
- }, [editor, tableCellNode, clearTableSelection]);
21917
- const menuItemCss = css98({
21918
- fontSize: "var(--fs-sm)"
21919
- });
21920
- return /* @__PURE__ */ jsxs87(
21921
- Menu,
21922
- {
21923
- menuTrigger: /* @__PURE__ */ jsx131(
21924
- TableActionMenuTrigger,
21925
- {
21926
- tableCellEl,
21927
- positioningAnchorEl
21928
- },
21929
- menuTriggerKey
21930
- ),
21931
- portalElement: menuPortalEl,
21932
- maxMenuHeight: "300px",
21933
- children: [
21934
- /* @__PURE__ */ jsxs87(
21935
- MenuItem,
21936
- {
21937
- onClick: () => {
21938
- insertTableRowAtSelection(false);
21939
- },
21940
- css: menuItemCss,
21941
- children: [
21942
- "Insert ",
21943
- selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
21944
- " above"
21945
- ]
21946
- }
21947
- ),
21948
- /* @__PURE__ */ jsxs87(MenuItem, { onClick: () => insertTableRowAtSelection(true), css: menuItemCss, children: [
21949
- "Insert ",
21950
- selectionCounts.rows === 1 ? "row" : `${selectionCounts.rows} rows`,
21951
- " below"
21952
- ] }),
21953
- /* @__PURE__ */ jsx131(MenuItemSeparator, {}),
21954
- /* @__PURE__ */ jsxs87(MenuItem, { onClick: () => insertTableColumnAtSelection(false), css: menuItemCss, children: [
21955
- "Insert ",
21956
- selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
21957
- " left"
21958
- ] }),
21959
- /* @__PURE__ */ jsxs87(MenuItem, { onClick: () => insertTableColumnAtSelection(true), css: menuItemCss, children: [
21960
- "Insert ",
21961
- selectionCounts.columns === 1 ? "column" : `${selectionCounts.columns} columns`,
21962
- " right"
21963
- ] }),
21964
- /* @__PURE__ */ jsx131(MenuItemSeparator, {}),
21965
- /* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableColumnAtSelection(), css: menuItemCss, children: "Delete column" }),
21966
- /* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableRowAtSelection(), css: menuItemCss, children: "Delete row" }),
21967
- /* @__PURE__ */ jsx131(MenuItem, { onClick: () => deleteTableAtSelection(), css: menuItemCss, children: "Delete table" }),
21968
- /* @__PURE__ */ jsx131(MenuItemSeparator, {}),
21969
- /* @__PURE__ */ jsxs87(MenuItem, { onClick: () => toggleTableRowIsHeader(), css: menuItemCss, children: [
21970
- (tableCellNode.__headerState & TableCellHeaderStates.ROW) === TableCellHeaderStates.ROW ? "Remove" : "Add",
21971
- " ",
21972
- "row header"
21973
- ] }),
21974
- /* @__PURE__ */ jsxs87(MenuItem, { onClick: () => toggleTableColumnIsHeader(), css: menuItemCss, children: [
21975
- (tableCellNode.__headerState & TableCellHeaderStates.COLUMN) === TableCellHeaderStates.COLUMN ? "Remove" : "Add",
21976
- " ",
21977
- "column header"
21978
- ] })
21979
- ]
21980
- }
21981
- );
21982
- }
21983
- function TableCellActionMenuContainer({
21984
- menuPortalEl,
21985
- positioningAnchorEl
21986
- }) {
21987
- const [editor] = useLexicalComposerContext5();
21988
- const [tableCellNode, setTableMenuCellNode] = useState18(null);
21989
- const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState18(null);
21990
- const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState18(null);
21991
- useEffect21(() => {
21992
- const newPortalEl = document.createElement("div");
21993
- setTableMenuCellMenuPortalEl(newPortalEl);
21994
- menuPortalEl.appendChild(newPortalEl);
21995
- return () => {
21996
- newPortalEl.remove();
21997
- };
21998
- }, [menuPortalEl]);
21999
- const setTableMenuCellNodeElem = useCallback12((elem) => {
22000
- if (elem) {
22001
- _setTableMenuCellNodeEl(elem);
22002
- } else {
22003
- _setTableMenuCellNodeEl(null);
22004
- }
22005
- }, []);
22006
- const $moveMenu = useCallback12(() => {
22007
- const selection = $getSelection4();
22008
- const nativeSelection = window.getSelection();
22009
- const activeElement = document.activeElement;
22010
- if (selection == null) {
22011
- setTableMenuCellNode(null);
22012
- return;
22013
- }
22014
- const rootElement = editor.getRootElement();
22015
- if ($isRangeSelection4(selection) && rootElement !== null && nativeSelection !== null && rootElement.contains(nativeSelection.anchorNode)) {
22016
- const tableCellNodeFromSelection = $getTableCellNodeFromLexicalNode(selection.anchor.getNode());
22017
- if (tableCellNodeFromSelection == null) {
22018
- setTableMenuCellNode(null);
22019
- setTableMenuCellNodeElem(null);
22020
- return;
22021
- }
22022
- const tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey());
22023
- if (tableCellParentNodeDOM == null) {
22024
- setTableMenuCellNode(null);
22025
- setTableMenuCellNodeElem(null);
22026
- return;
22027
- }
22028
- setTableMenuCellNode(tableCellNodeFromSelection);
22029
- setTableMenuCellNodeElem(tableCellParentNodeDOM);
22030
- } else if (!activeElement) {
22031
- setTableMenuCellNode(null);
22032
- setTableMenuCellNodeElem(null);
22033
- }
22034
- }, [editor, setTableMenuCellNodeElem]);
22035
- useEffect21(() => {
22036
- return editor.registerUpdateListener(() => {
22037
- editor.getEditorState().read(() => {
22038
- $moveMenu();
22039
- });
22040
- });
22041
- });
22042
- return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ jsx131(
22043
- TableActionMenu,
22044
- {
22045
- tableCellNode,
22046
- menuPortalEl: tableCellMenuPortalEl,
22047
- tableCellEl: tableCellNodeEl,
22048
- positioningAnchorEl
22049
- },
22050
- tableCellNode.getKey()
22051
- );
22052
- }
22053
- function TableActionMenuPlugin({ positioningAnchorEl }) {
22054
- const isEditable = useLexicalEditable();
22055
- return isEditable ? /* @__PURE__ */ jsx131(
22056
- TableCellActionMenuContainer,
22057
- {
22058
- menuPortalEl: positioningAnchorEl,
22059
- positioningAnchorEl
22060
- }
22061
- ) : null;
22062
- }
22063
-
22064
- // src/components/ParameterInputs/rich-text/TableCellResizerPlugin.tsx
22065
- import { css as css99 } from "@emotion/react";
22066
- import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
22067
- import { useLexicalEditable as useLexicalEditable2 } from "@lexical/react/useLexicalEditable";
22068
- import {
22069
- $computeTableMapSkipCellCheck,
22070
- $getTableNodeFromLexicalNodeOrThrow as $getTableNodeFromLexicalNodeOrThrow2,
22071
- $getTableRowIndexFromTableCellNode as $getTableRowIndexFromTableCellNode2,
22072
- $isTableCellNode as $isTableCellNode2,
22073
- $isTableRowNode as $isTableRowNode2
22074
- } from "@lexical/table";
22075
- import { calculateZoomLevel } from "@lexical/utils";
22076
- import { $getNearestNodeFromDOMNode } from "lexical";
22077
- import { useCallback as useCallback13, useEffect as useEffect22, useMemo as useMemo7, useRef as useRef12, useState as useState19 } from "react";
22078
- import { createPortal as createPortal3 } from "react-dom";
22079
- import { Fragment as Fragment20, jsx as jsx132, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
22080
- var MIN_ROW_HEIGHT = 33;
22081
- var MIN_COLUMN_WIDTH = 50;
22082
- var tableResizer = css99`
22083
- position: absolute;
22084
- z-index: var(--z-10);
22085
- `;
22086
- var fixedGetDOMCellFromTarget = (node) => {
22087
- let currentNode = node;
22088
- while (currentNode != null) {
22089
- const nodeName = currentNode.nodeName;
22090
- if (nodeName === "TD" || nodeName === "TH") {
22091
- const cell2 = currentNode._cell;
22092
- if (cell2 === void 0) {
22093
- return {
22094
- elem: currentNode
22095
- };
22096
- }
22097
- return cell2;
22098
- }
22099
- currentNode = currentNode.parentNode;
22100
- }
22101
- return null;
22102
- };
22103
- function TableCellResizer({ editor, positioningAnchorEl }) {
22104
- const targetRef = useRef12(null);
22105
- const resizerRef = useRef12(null);
22106
- const tableRectRef = useRef12(null);
22107
- const mouseStartPosRef = useRef12(null);
22108
- const [mouseCurrentPos, updateMouseCurrentPos] = useState19(null);
22109
- const [activeCell, updateActiveCell] = useState19(null);
22110
- const [isMouseDown, updateIsMouseDown] = useState19(false);
22111
- const [draggingDirection, updateDraggingDirection] = useState19(null);
22112
- const resetState = useCallback13(() => {
22113
- updateActiveCell(null);
22114
- targetRef.current = null;
22115
- updateDraggingDirection(null);
22116
- mouseStartPosRef.current = null;
22117
- tableRectRef.current = null;
22118
- }, []);
22119
- const isMouseDownOnEvent = (event) => {
22120
- return (event.buttons & 1) === 1;
22121
- };
22122
- useEffect22(() => {
22123
- const onMouseMove = (event) => {
22124
- setTimeout(() => {
22125
- const target = event.target;
22126
- if (draggingDirection) {
22127
- updateMouseCurrentPos({
22128
- x: event.clientX,
22129
- y: event.clientY
22130
- });
22131
- return;
22132
- }
22133
- updateIsMouseDown(isMouseDownOnEvent(event));
22134
- if (resizerRef.current && resizerRef.current.contains(target)) {
22135
- return;
22136
- }
22137
- if (targetRef.current !== target) {
22138
- targetRef.current = target;
22139
- const cell2 = fixedGetDOMCellFromTarget(target);
22140
- if (cell2 && activeCell !== cell2) {
22141
- editor.update(() => {
22142
- const tableCellNode = $getNearestNodeFromDOMNode(cell2.elem);
22143
- if (!tableCellNode) {
22144
- throw new Error("TableCellResizer: Table cell node not found.");
22145
- }
22146
- const tableNode = $getTableNodeFromLexicalNodeOrThrow2(tableCellNode);
22147
- const tableElement2 = editor.getElementByKey(tableNode.getKey());
22148
- if (!tableElement2) {
22149
- throw new Error("TableCellResizer: Table element not found.");
22150
- }
22151
- targetRef.current = target;
22152
- tableRectRef.current = tableElement2.getBoundingClientRect();
22153
- updateActiveCell(cell2);
22154
- });
22155
- } else if (cell2 == null) {
22156
- resetState();
22157
- }
22158
- }
22159
- }, 0);
22160
- };
22161
- const onMouseDown = () => {
22162
- setTimeout(() => {
22163
- updateIsMouseDown(true);
22164
- }, 0);
22165
- };
22166
- const onMouseUp = () => {
22167
- setTimeout(() => {
22168
- updateIsMouseDown(false);
22169
- }, 0);
22170
- };
22171
- const removeRootListener = editor.registerRootListener((rootElement, prevRootElement) => {
22172
- rootElement == null ? void 0 : rootElement.addEventListener("mousemove", onMouseMove);
22173
- rootElement == null ? void 0 : rootElement.addEventListener("mousedown", onMouseDown);
22174
- rootElement == null ? void 0 : rootElement.addEventListener("mouseup", onMouseUp);
22175
- prevRootElement == null ? void 0 : prevRootElement.removeEventListener("mousemove", onMouseMove);
22176
- prevRootElement == null ? void 0 : prevRootElement.removeEventListener("mousedown", onMouseDown);
22177
- prevRootElement == null ? void 0 : prevRootElement.removeEventListener("mouseup", onMouseUp);
22178
- });
22179
- return () => {
22180
- removeRootListener();
22181
- };
22182
- }, [activeCell, draggingDirection, editor, resetState]);
22183
- const isHeightChanging = (direction) => {
22184
- if (direction === "bottom") {
22185
- return true;
22186
- }
22187
- return false;
22188
- };
22189
- const updateRowHeight = useCallback13(
22190
- (heightChange) => {
22191
- if (!activeCell) {
22192
- throw new Error("TableCellResizer: Expected active cell.");
22193
- }
22194
- editor.update(
22195
- () => {
22196
- const tableCellNode = $getNearestNodeFromDOMNode(activeCell.elem);
22197
- if (!$isTableCellNode2(tableCellNode)) {
22198
- throw new Error("TableCellResizer: Table cell node not found.");
22199
- }
22200
- const tableNode = $getTableNodeFromLexicalNodeOrThrow2(tableCellNode);
22201
- const tableRowIndex = $getTableRowIndexFromTableCellNode2(tableCellNode);
22202
- const tableRows = tableNode.getChildren();
22203
- if (tableRowIndex >= tableRows.length || tableRowIndex < 0) {
22204
- throw new Error("Expected table cell to be inside of table row.");
22205
- }
22206
- const tableRow2 = tableRows[tableRowIndex];
22207
- if (!$isTableRowNode2(tableRow2)) {
22208
- throw new Error("Expected table row");
22209
- }
22210
- let height = tableRow2.getHeight();
22211
- if (height === void 0) {
22212
- const rowCells = tableRow2.getChildren();
22213
- height = Math.min(...rowCells.map((cell2) => {
22214
- var _a;
22215
- return (_a = getCellNodeHeight(cell2, editor)) != null ? _a : Infinity;
22216
- }));
22217
- }
22218
- const newHeight = Math.max(height + heightChange, MIN_ROW_HEIGHT);
22219
- tableRow2.setHeight(newHeight);
22220
- },
22221
- { tag: "skip-scroll-into-view" }
22222
- );
22223
- },
22224
- [activeCell, editor]
22225
- );
22226
- const getCellNodeWidth = (cell2, activeEditor) => {
22227
- const width = cell2.getWidth();
22228
- if (width !== void 0) {
22229
- return width;
22230
- }
22231
- const domCellNode = activeEditor.getElementByKey(cell2.getKey());
22232
- if (domCellNode == null) {
22233
- return void 0;
22234
- }
22235
- const computedStyle = getComputedStyle(domCellNode);
22236
- return domCellNode.clientWidth - parseFloat(computedStyle.paddingLeft) - parseFloat(computedStyle.paddingRight);
22237
- };
22238
- const getCellNodeHeight = (cell2, activeEditor) => {
22239
- const domCellNode = activeEditor.getElementByKey(cell2.getKey());
22240
- return domCellNode == null ? void 0 : domCellNode.clientHeight;
22241
- };
22242
- const getCellColumnIndex = (tableCellNode, tableMap) => {
22243
- for (let row = 0; row < tableMap.length; row++) {
22244
- for (let column = 0; column < tableMap[row].length; column++) {
22245
- if (tableMap[row][column].cell === tableCellNode) {
22246
- return column;
22247
- }
22248
- }
22249
- }
22250
- };
22251
- const updateColumnWidth = useCallback13(
22252
- (widthChange) => {
22253
- if (!activeCell) {
22254
- throw new Error("TableCellResizer: Expected active cell.");
22255
- }
22256
- editor.update(
22257
- () => {
22258
- const tableCellNode = $getNearestNodeFromDOMNode(activeCell.elem);
22259
- if (!$isTableCellNode2(tableCellNode)) {
22260
- throw new Error("TableCellResizer: Table cell node not found.");
22261
- }
22262
- const tableNode = $getTableNodeFromLexicalNodeOrThrow2(tableCellNode);
22263
- const [tableMap] = $computeTableMapSkipCellCheck(tableNode, null, null);
22264
- const columnIndex = getCellColumnIndex(tableCellNode, tableMap);
22265
- if (columnIndex === void 0) {
22266
- throw new Error("TableCellResizer: Table column not found.");
22267
- }
22268
- for (let row = 0; row < tableMap.length; row++) {
22269
- const cell2 = tableMap[row][columnIndex];
22270
- if (cell2.startRow === row && (columnIndex === tableMap[row].length - 1 || tableMap[row][columnIndex].cell !== tableMap[row][columnIndex + 1].cell)) {
22271
- const width = getCellNodeWidth(cell2.cell, editor);
22272
- if (width === void 0) {
22273
- continue;
22274
- }
22275
- const newWidth = Math.max(width + widthChange, MIN_COLUMN_WIDTH);
22276
- cell2.cell.setWidth(newWidth);
22277
- }
22278
- }
22279
- },
22280
- { tag: "skip-scroll-into-view" }
22281
- );
22282
- },
22283
- [activeCell, editor]
22284
- );
22285
- const mouseUpHandler = useCallback13(
22286
- (direction) => {
22287
- const handler = (event) => {
22288
- event.preventDefault();
22289
- event.stopPropagation();
22290
- if (!activeCell) {
22291
- throw new Error("TableCellResizer: Expected active cell.");
22292
- }
22293
- if (mouseStartPosRef.current) {
22294
- const { x, y } = mouseStartPosRef.current;
22295
- if (activeCell === null) {
22296
- return;
22297
- }
22298
- const zoom = calculateZoomLevel(event.target);
22299
- if (isHeightChanging(direction)) {
22300
- const heightChange = (event.clientY - y) / zoom;
22301
- updateRowHeight(heightChange);
22302
- } else {
22303
- const widthChange = (event.clientX - x) / zoom;
22304
- updateColumnWidth(widthChange);
22305
- }
22306
- resetState();
22307
- document.removeEventListener("mouseup", handler);
22308
- }
22309
- };
22310
- return handler;
22311
- },
22312
- [activeCell, resetState, updateColumnWidth, updateRowHeight]
22313
- );
22314
- const toggleResize = useCallback13(
22315
- (direction) => (event) => {
22316
- event.preventDefault();
22317
- event.stopPropagation();
22318
- if (!activeCell) {
22319
- throw new Error("TableCellResizer: Expected active cell.");
22320
- }
22321
- mouseStartPosRef.current = {
22322
- x: event.clientX,
22323
- y: event.clientY
22324
- };
22325
- updateMouseCurrentPos(mouseStartPosRef.current);
22326
- updateDraggingDirection(direction);
22327
- document.addEventListener("mouseup", mouseUpHandler(direction));
22328
- },
22329
- [activeCell, mouseUpHandler]
22330
- );
22331
- const getResizers = useCallback13(() => {
22332
- if (activeCell) {
22333
- const { height, width, top, left } = activeCell.elem.getBoundingClientRect();
22334
- const parentRect = positioningAnchorEl.getBoundingClientRect();
22335
- const zoom = calculateZoomLevel(activeCell.elem);
22336
- const zoneWidth = 10;
22337
- const styles = {
22338
- bottom: {
22339
- backgroundColor: "none",
22340
- cursor: "row-resize",
22341
- height: `${zoneWidth}px`,
22342
- left: `${left - parentRect.left}px`,
22343
- top: `${top - parentRect.top + height - zoneWidth / 2}px`,
22344
- width: `${width}px`
22345
- },
22346
- right: {
22347
- backgroundColor: "none",
22348
- cursor: "col-resize",
22349
- height: `${height}px`,
22350
- left: `${left - parentRect.left + width - zoneWidth / 2}px`,
22351
- top: `${top - parentRect.top}px`,
22352
- width: `${zoneWidth}px`
22353
- }
22354
- };
22355
- const tableRect = tableRectRef.current;
22356
- if (draggingDirection && mouseCurrentPos && tableRect) {
22357
- if (isHeightChanging(draggingDirection)) {
22358
- styles[draggingDirection].left = `${tableRect.left - parentRect.left}px`;
22359
- styles[draggingDirection].top = `${(mouseCurrentPos.y - parentRect.top) / zoom}px`;
22360
- styles[draggingDirection].height = "3px";
22361
- styles[draggingDirection].width = `${tableRect.width}px`;
22362
- } else {
22363
- styles[draggingDirection].top = `${tableRect.top - parentRect.top}px`;
22364
- styles[draggingDirection].left = `${(mouseCurrentPos.x - parentRect.left) / zoom}px`;
22365
- styles[draggingDirection].width = "3px";
22366
- styles[draggingDirection].height = `${tableRect.height}px`;
22367
- }
22368
- styles[draggingDirection].backgroundColor = "#adf";
22369
- }
22370
- return styles;
22371
- }
22372
- return {
22373
- bottom: null,
22374
- left: null,
22375
- right: null,
22376
- top: null
22377
- };
22378
- }, [activeCell, draggingDirection, mouseCurrentPos, positioningAnchorEl]);
22379
- const resizerStyles = getResizers();
22380
- return /* @__PURE__ */ jsx132("div", { ref: resizerRef, children: activeCell != null && !isMouseDown && /* @__PURE__ */ jsxs88(Fragment20, { children: [
22381
- /* @__PURE__ */ jsx132(
22382
- "div",
22383
- {
22384
- css: tableResizer,
22385
- style: resizerStyles.right || void 0,
22386
- onMouseDown: toggleResize("right")
22387
- }
22388
- ),
22389
- /* @__PURE__ */ jsx132(
22390
- "div",
22391
- {
22392
- css: tableResizer,
22393
- style: resizerStyles.bottom || void 0,
22394
- onMouseDown: toggleResize("bottom")
22395
- }
22396
- )
22397
- ] }) });
22398
- }
22399
- function TableCellResizerPlugin({ positioningAnchorEl }) {
22400
- const [editor] = useLexicalComposerContext6();
22401
- const isEditable = useLexicalEditable2();
22402
- return useMemo7(
22403
- () => isEditable ? createPortal3(
22404
- /* @__PURE__ */ jsx132(TableCellResizer, { editor, positioningAnchorEl }),
22405
- positioningAnchorEl
22406
- ) : null,
22407
- [editor, isEditable, positioningAnchorEl]
22408
- );
22409
- }
22410
-
22411
21597
  // src/components/ParameterInputs/ParameterRichText.tsx
22412
- import { Fragment as Fragment21, jsx as jsx133, jsxs as jsxs89 } from "@emotion/react/jsx-runtime";
21598
+ import { Fragment as Fragment20, jsx as jsx131, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
22413
21599
  var ParameterRichText = ({
22414
21600
  label,
22415
21601
  labelLeadingIcon,
@@ -22428,16 +21614,13 @@ var ParameterRichText = ({
22428
21614
  readOnly,
22429
21615
  editorWrapperClassName,
22430
21616
  editorInputClassName,
22431
- editorInputWrapperClassName,
22432
21617
  editorFooter,
22433
21618
  customNodes,
22434
21619
  children,
22435
21620
  variables,
22436
- customControls,
22437
- onInsertTable,
22438
- minimalInteractivity
21621
+ customControls
22439
21622
  }) => {
22440
- return /* @__PURE__ */ jsxs89(
21623
+ return /* @__PURE__ */ jsxs87(
22441
21624
  ParameterShell,
22442
21625
  {
22443
21626
  "data-testid": "parameter-richtext",
@@ -22451,7 +21634,7 @@ var ParameterRichText = ({
22451
21634
  captionTestId,
22452
21635
  menuItems,
22453
21636
  children: [
22454
- /* @__PURE__ */ jsx133(
21637
+ /* @__PURE__ */ jsx131(
22455
21638
  ParameterRichTextInner,
22456
21639
  {
22457
21640
  value,
@@ -22462,33 +21645,30 @@ var ParameterRichText = ({
22462
21645
  readOnly,
22463
21646
  editorWrapperClassName,
22464
21647
  editorInputClassName,
22465
- editorInputWrapperClassName,
22466
21648
  editorFooter,
22467
21649
  customNodes,
22468
21650
  variables,
22469
21651
  customControls,
22470
- onInsertTable,
22471
- minimalInteractivity,
22472
21652
  children
22473
21653
  }
22474
21654
  ),
22475
- menuItems ? /* @__PURE__ */ jsx133(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx133(Fragment21, { children: menuItems }) }) : null
21655
+ menuItems ? /* @__PURE__ */ jsx131(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx131(Fragment20, { children: menuItems }) }) : null
22476
21656
  ]
22477
21657
  }
22478
21658
  );
22479
21659
  };
22480
- var editorWrapper = css100`
21660
+ var editorWrapper = css98`
22481
21661
  display: flex;
22482
21662
  flex-flow: column;
22483
21663
  flex-grow: 1;
22484
21664
  `;
22485
- var editorContainer = css100`
21665
+ var editorContainer = css98`
22486
21666
  display: flex;
22487
21667
  flex-flow: column;
22488
21668
  flex-grow: 1;
22489
21669
  position: relative;
22490
21670
  `;
22491
- var editorPlaceholder = css100`
21671
+ var editorPlaceholder = css98`
22492
21672
  color: var(--gray-500);
22493
21673
  font-style: italic;
22494
21674
  /* 1px is added to make sure caret is clearly visible when field is focused
@@ -22499,7 +21679,7 @@ var editorPlaceholder = css100`
22499
21679
  top: var(--spacing-sm);
22500
21680
  user-select: none;
22501
21681
  `;
22502
- var editorInput = css100`
21682
+ var editorInput = css98`
22503
21683
  background: var(--white);
22504
21684
  border: 1px solid var(--gray-200);
22505
21685
  border-radius: var(--rounded-sm);
@@ -22527,14 +21707,11 @@ var ParameterRichTextInner = ({
22527
21707
  readOnly,
22528
21708
  editorWrapperClassName,
22529
21709
  editorInputClassName,
22530
- editorInputWrapperClassName,
22531
21710
  editorFooter,
22532
21711
  children,
22533
21712
  customNodes,
22534
21713
  variables,
22535
- customControls,
22536
- onInsertTable,
22537
- minimalInteractivity
21714
+ customControls
22538
21715
  }) => {
22539
21716
  const lexicalConfig = {
22540
21717
  namespace: "uniform",
@@ -22550,9 +21727,6 @@ var ParameterRichTextInner = ({
22550
21727
  QuoteNode,
22551
21728
  ParagraphNode2,
22552
21729
  CustomCodeNode,
22553
- TableNode,
22554
- TableCellNode2,
22555
- TableRowNode2,
22556
21730
  ...customNodes != null ? customNodes : []
22557
21731
  ],
22558
21732
  theme: {
@@ -22585,15 +21759,12 @@ var ParameterRichTextInner = ({
22585
21759
  }
22586
21760
  },
22587
21761
  quote: blockquoteElement,
22588
- code: codeElement,
22589
- table: tableElement,
22590
- tableCell: tableCellElement,
22591
- tableCellHeader: tableHeaderElement
21762
+ code: codeElement
22592
21763
  },
22593
21764
  editable: !readOnly
22594
21765
  };
22595
- return /* @__PURE__ */ jsxs89(Fragment21, { children: [
22596
- /* @__PURE__ */ jsx133("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx133(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx133(
21766
+ return /* @__PURE__ */ jsxs87(Fragment20, { children: [
21767
+ /* @__PURE__ */ jsx131("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx131(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx131(
22597
21768
  RichText,
22598
21769
  {
22599
21770
  onChange,
@@ -22602,11 +21773,8 @@ var ParameterRichTextInner = ({
22602
21773
  onRichTextInit,
22603
21774
  readOnly,
22604
21775
  editorInputClassName,
22605
- editorInputWrapperClassName,
22606
21776
  variables,
22607
21777
  customControls,
22608
- onInsertTable,
22609
- minimalInteractivity,
22610
21778
  children
22611
21779
  }
22612
21780
  ) }) }),
@@ -22629,20 +21797,18 @@ var RichText = ({
22629
21797
  onRichTextInit,
22630
21798
  readOnly,
22631
21799
  editorInputClassName,
22632
- editorInputWrapperClassName,
22633
21800
  children,
22634
21801
  variables,
22635
- customControls,
22636
- onInsertTable,
22637
- minimalInteractivity
21802
+ customControls
22638
21803
  }) => {
22639
- const [editor] = useLexicalComposerContext7();
22640
- useEffect23(() => {
21804
+ const editorContainerRef = useRef12(null);
21805
+ const [editor] = useLexicalComposerContext5();
21806
+ useEffect21(() => {
22641
21807
  if (onRichTextInit) {
22642
21808
  onRichTextInit(editor);
22643
21809
  }
22644
21810
  }, [editor, onRichTextInit]);
22645
- useEffect23(() => {
21811
+ useEffect21(() => {
22646
21812
  const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState }) => {
22647
21813
  requestAnimationFrame(() => {
22648
21814
  if (!deepEqual2(editorState.toJSON(), prevEditorState.toJSON())) {
@@ -22654,72 +21820,53 @@ var RichText = ({
22654
21820
  removeUpdateListener();
22655
21821
  };
22656
21822
  }, [editor, onChange]);
22657
- useEffect23(() => {
21823
+ useEffect21(() => {
22658
21824
  editor.setEditable(!readOnly);
22659
21825
  }, [editor, readOnly]);
22660
- const [editorContainerRef, setEditorContainerRef] = useState20(null);
22661
- const onRef = (_editorContainerRef) => {
22662
- if (_editorContainerRef !== null) {
22663
- setEditorContainerRef(_editorContainerRef);
22664
- }
22665
- };
22666
- return /* @__PURE__ */ jsxs89(Fragment21, { children: [
22667
- readOnly || minimalInteractivity ? null : /* @__PURE__ */ jsx133(RichTextToolbar_default, { config, customControls, onInsertTable }),
22668
- /* @__PURE__ */ jsxs89(
22669
- "div",
22670
- {
22671
- css: editorContainer,
22672
- className: editorInputWrapperClassName,
22673
- ref: onRef,
22674
- "data-testid": "value-container",
22675
- children: [
22676
- /* @__PURE__ */ jsx133(
22677
- RichTextPlugin,
22678
- {
22679
- contentEditable: /* @__PURE__ */ jsx133(ContentEditable, { css: editorInput, className: editorInputClassName }),
22680
- placeholder: /* @__PURE__ */ jsx133("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
22681
- ErrorBoundary: LexicalErrorBoundary
22682
- }
22683
- ),
22684
- /* @__PURE__ */ jsx133(ListPlugin, {}),
22685
- /* @__PURE__ */ jsx133(TablePlugin, {}),
22686
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx133(TableActionMenuPlugin, { positioningAnchorEl: editorContainerRef }) : null,
22687
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx133(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
22688
- readOnly ? null : /* @__PURE__ */ jsx133(HistoryPlugin, {}),
22689
- editorContainerRef ? /* @__PURE__ */ jsx133(
22690
- LinkNodePlugin,
22691
- {
22692
- onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
22693
- getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
22694
- var _a, _b;
22695
- return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
22696
- } : void 0,
22697
- positioningAnchorEl: editorContainerRef
22698
- }
22699
- ) : null,
22700
- /* @__PURE__ */ jsx133(ListIndentPlugin, { maxDepth: 4 }),
22701
- /* @__PURE__ */ jsx133(DisableStylesPlugin, {}),
22702
- /* @__PURE__ */ jsx133(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
22703
- /* @__PURE__ */ jsx133(Fragment21, { children })
22704
- ]
22705
- }
22706
- )
21826
+ return /* @__PURE__ */ jsxs87(Fragment20, { children: [
21827
+ readOnly ? null : /* @__PURE__ */ jsx131(RichTextToolbar_default, { config, customControls }),
21828
+ /* @__PURE__ */ jsxs87("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
21829
+ /* @__PURE__ */ jsx131(
21830
+ RichTextPlugin,
21831
+ {
21832
+ contentEditable: /* @__PURE__ */ jsx131(ContentEditable, { css: editorInput, className: editorInputClassName }),
21833
+ placeholder: /* @__PURE__ */ jsx131("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
21834
+ ErrorBoundary: LexicalErrorBoundary
21835
+ }
21836
+ ),
21837
+ /* @__PURE__ */ jsx131(ListPlugin, {}),
21838
+ readOnly ? null : /* @__PURE__ */ jsx131(HistoryPlugin, {}),
21839
+ /* @__PURE__ */ jsx131(
21840
+ LinkNodePlugin,
21841
+ {
21842
+ onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
21843
+ getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
21844
+ var _a, _b;
21845
+ return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
21846
+ } : void 0
21847
+ }
21848
+ ),
21849
+ /* @__PURE__ */ jsx131(ListIndentPlugin, { maxDepth: 4 }),
21850
+ /* @__PURE__ */ jsx131(DisableStylesPlugin, {}),
21851
+ /* @__PURE__ */ jsx131(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS }),
21852
+ /* @__PURE__ */ jsx131(Fragment20, { children })
21853
+ ] })
22707
21854
  ] });
22708
21855
  };
22709
21856
 
22710
21857
  // src/components/ParameterInputs/ParameterSelect.tsx
22711
- import { forwardRef as forwardRef23 } from "react";
22712
- import { jsx as jsx134, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
22713
- var ParameterSelect = forwardRef23(
21858
+ import { forwardRef as forwardRef22 } from "react";
21859
+ import { jsx as jsx132, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
21860
+ var ParameterSelect = forwardRef22(
22714
21861
  ({ defaultOption, options, ...props }, ref) => {
22715
21862
  const { shellProps, innerProps } = extractParameterProps(props);
22716
- return /* @__PURE__ */ jsx134(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx134(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
21863
+ return /* @__PURE__ */ jsx132(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx132(ParameterSelectInner, { options, defaultOption, ...innerProps, ref }) });
22717
21864
  }
22718
21865
  );
22719
- var ParameterSelectInner = forwardRef23(
21866
+ var ParameterSelectInner = forwardRef22(
22720
21867
  ({ defaultOption, options, ...props }, ref) => {
22721
21868
  const { id, label, hiddenLabel } = useParameterShell();
22722
- return /* @__PURE__ */ jsxs90(
21869
+ return /* @__PURE__ */ jsxs88(
22723
21870
  "select",
22724
21871
  {
22725
21872
  css: [input3, selectInput],
@@ -22728,10 +21875,10 @@ var ParameterSelectInner = forwardRef23(
22728
21875
  ref,
22729
21876
  ...props,
22730
21877
  children: [
22731
- defaultOption ? /* @__PURE__ */ jsx134("option", { value: "", children: defaultOption }) : null,
21878
+ defaultOption ? /* @__PURE__ */ jsx132("option", { value: "", children: defaultOption }) : null,
22732
21879
  options.map((option) => {
22733
21880
  var _a;
22734
- return /* @__PURE__ */ jsx134("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
21881
+ return /* @__PURE__ */ jsx132("option", { value: (_a = option.value) != null ? _a : option.label, children: option.label }, option.label);
22735
21882
  })
22736
21883
  ]
22737
21884
  }
@@ -22740,15 +21887,15 @@ var ParameterSelectInner = forwardRef23(
22740
21887
  );
22741
21888
 
22742
21889
  // src/components/ParameterInputs/ParameterTextarea.tsx
22743
- import { forwardRef as forwardRef24 } from "react";
22744
- import { jsx as jsx135 } from "@emotion/react/jsx-runtime";
22745
- var ParameterTextarea = forwardRef24((props, ref) => {
21890
+ import { forwardRef as forwardRef23 } from "react";
21891
+ import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
21892
+ var ParameterTextarea = forwardRef23((props, ref) => {
22746
21893
  const { shellProps, innerProps } = extractParameterProps(props);
22747
- return /* @__PURE__ */ jsx135(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx135(ParameterTextareaInner, { ref, ...innerProps }) });
21894
+ return /* @__PURE__ */ jsx133(ParameterShell, { "data-testid": "parameter-textarea", ...shellProps, children: /* @__PURE__ */ jsx133(ParameterTextareaInner, { ref, ...innerProps }) });
22748
21895
  });
22749
- var ParameterTextareaInner = forwardRef24(({ ...props }, ref) => {
21896
+ var ParameterTextareaInner = forwardRef23(({ ...props }, ref) => {
22750
21897
  const { id, label, hiddenLabel } = useParameterShell();
22751
- return /* @__PURE__ */ jsx135(
21898
+ return /* @__PURE__ */ jsx133(
22752
21899
  "textarea",
22753
21900
  {
22754
21901
  css: [input3, textarea2],
@@ -22761,26 +21908,26 @@ var ParameterTextareaInner = forwardRef24(({ ...props }, ref) => {
22761
21908
  });
22762
21909
 
22763
21910
  // src/components/ParameterInputs/ParameterToggle.tsx
22764
- import { forwardRef as forwardRef25 } from "react";
22765
- import { jsx as jsx136, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
22766
- var ParameterToggle = forwardRef25((props, ref) => {
21911
+ import { forwardRef as forwardRef24 } from "react";
21912
+ import { jsx as jsx134, jsxs as jsxs89 } from "@emotion/react/jsx-runtime";
21913
+ var ParameterToggle = forwardRef24((props, ref) => {
22767
21914
  const { shellProps, innerProps } = extractParameterProps(props);
22768
- return /* @__PURE__ */ jsx136(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx136(ParameterToggleInner, { ref, ...innerProps }) });
21915
+ return /* @__PURE__ */ jsx134(ParameterShell, { ...shellProps, children: /* @__PURE__ */ jsx134(ParameterToggleInner, { ref, ...innerProps }) });
22769
21916
  });
22770
- var ParameterToggleInner = forwardRef25(
21917
+ var ParameterToggleInner = forwardRef24(
22771
21918
  ({ children, ...props }, ref) => {
22772
21919
  const { id, label } = useParameterShell();
22773
- return /* @__PURE__ */ jsxs91("label", { css: inputToggleLabel2, children: [
22774
- /* @__PURE__ */ jsx136("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
22775
- /* @__PURE__ */ jsx136("span", { css: inlineLabel2, children: label }),
21920
+ return /* @__PURE__ */ jsxs89("label", { css: inputToggleLabel2, children: [
21921
+ /* @__PURE__ */ jsx134("input", { css: toggleInput2, type: props.type, id, ref, ...props }),
21922
+ /* @__PURE__ */ jsx134("span", { css: inlineLabel2, children: label }),
22776
21923
  children
22777
21924
  ] });
22778
21925
  }
22779
21926
  );
22780
21927
 
22781
21928
  // src/components/ProgressBar/ProgressBar.styles.ts
22782
- import { css as css101, keyframes as keyframes4 } from "@emotion/react";
22783
- var container3 = css101`
21929
+ import { css as css99, keyframes as keyframes4 } from "@emotion/react";
21930
+ var container3 = css99`
22784
21931
  background: var(--gray-50);
22785
21932
  margin-block: var(--spacing-sm);
22786
21933
  position: relative;
@@ -22790,13 +21937,13 @@ var container3 = css101`
22790
21937
  border: solid 1px var(--gray-300);
22791
21938
  `;
22792
21939
  var themeMap = {
22793
- primary: css101`
21940
+ primary: css99`
22794
21941
  --progress-color: var(--accent-light);
22795
21942
  `,
22796
- secondary: css101`
21943
+ secondary: css99`
22797
21944
  --progress-color: var(--accent-alt-light);
22798
21945
  `,
22799
- destructive: css101`
21946
+ destructive: css99`
22800
21947
  --progress-color: var(--brand-secondary-5);
22801
21948
  `
22802
21949
  };
@@ -22808,10 +21955,10 @@ var slidingBackgroundPosition = keyframes4`
22808
21955
  background-position: 64px 0;
22809
21956
  }
22810
21957
  `;
22811
- var determinate = css101`
21958
+ var determinate = css99`
22812
21959
  background-color: var(--progress-color);
22813
21960
  `;
22814
- var indeterminate = css101`
21961
+ var indeterminate = css99`
22815
21962
  background-image: linear-gradient(
22816
21963
  45deg,
22817
21964
  var(--progress-color) 25%,
@@ -22825,7 +21972,7 @@ var indeterminate = css101`
22825
21972
  background-size: 64px 64px;
22826
21973
  animation: ${slidingBackgroundPosition} 1s linear infinite;
22827
21974
  `;
22828
- var bar = css101`
21975
+ var bar = css99`
22829
21976
  position: absolute;
22830
21977
  inset: 0;
22831
21978
  transition: transform var(--duration-fast) var(--timing-ease-out);
@@ -22833,7 +21980,7 @@ var bar = css101`
22833
21980
  `;
22834
21981
 
22835
21982
  // src/components/ProgressBar/ProgressBar.tsx
22836
- import { jsx as jsx137 } from "@emotion/react/jsx-runtime";
21983
+ import { jsx as jsx135 } from "@emotion/react/jsx-runtime";
22837
21984
  function ProgressBar({
22838
21985
  current,
22839
21986
  max,
@@ -22843,7 +21990,7 @@ function ProgressBar({
22843
21990
  }) {
22844
21991
  const valueNow = Math.min(current, max);
22845
21992
  const valuePercentage = max > 0 ? Math.ceil(100 / max * valueNow) : 0;
22846
- return /* @__PURE__ */ jsx137(
21993
+ return /* @__PURE__ */ jsx135(
22847
21994
  "div",
22848
21995
  {
22849
21996
  css: container3,
@@ -22854,7 +22001,7 @@ function ProgressBar({
22854
22001
  "aria-valuemax": max,
22855
22002
  "aria-valuenow": valueNow,
22856
22003
  ...props,
22857
- children: /* @__PURE__ */ jsx137(
22004
+ children: /* @__PURE__ */ jsx135(
22858
22005
  "div",
22859
22006
  {
22860
22007
  css: [
@@ -22873,30 +22020,30 @@ function ProgressBar({
22873
22020
  }
22874
22021
 
22875
22022
  // src/components/ProgressList/ProgressList.tsx
22876
- import { css as css103 } from "@emotion/react";
22023
+ import { css as css101 } from "@emotion/react";
22877
22024
  import { CgCheckO as CgCheckO2 } from "@react-icons/all-files/cg/CgCheckO";
22878
22025
  import { CgRadioCheck } from "@react-icons/all-files/cg/CgRadioCheck";
22879
22026
  import { CgRecord } from "@react-icons/all-files/cg/CgRecord";
22880
- import { useMemo as useMemo8 } from "react";
22027
+ import { useMemo as useMemo7 } from "react";
22881
22028
 
22882
22029
  // src/components/ProgressList/styles/ProgressList.styles.ts
22883
- import { css as css102 } from "@emotion/react";
22884
- var progressListStyles = css102`
22030
+ import { css as css100 } from "@emotion/react";
22031
+ var progressListStyles = css100`
22885
22032
  display: flex;
22886
22033
  flex-direction: column;
22887
22034
  gap: var(--spacing-sm);
22888
22035
  list-style-type: none;
22889
22036
  `;
22890
- var progressListItemStyles = css102`
22037
+ var progressListItemStyles = css100`
22891
22038
  display: flex;
22892
22039
  gap: var(--spacing-base);
22893
22040
  align-items: center;
22894
22041
  `;
22895
22042
 
22896
22043
  // src/components/ProgressList/ProgressList.tsx
22897
- import { jsx as jsx138, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
22044
+ import { jsx as jsx136, jsxs as jsxs90 } from "@emotion/react/jsx-runtime";
22898
22045
  var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
22899
- const itemsWithStatus = useMemo8(() => {
22046
+ const itemsWithStatus = useMemo7(() => {
22900
22047
  const indexOfInProgressItem = items.findIndex(({ id }) => id === inProgressId);
22901
22048
  return items.map((item, index) => {
22902
22049
  let status = "queued";
@@ -22908,8 +22055,8 @@ var ProgressList = ({ inProgressId, items, autoEllipsis, ...htmlProps }) => {
22908
22055
  return { ...item, status };
22909
22056
  });
22910
22057
  }, [items, inProgressId]);
22911
- return /* @__PURE__ */ jsx138("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
22912
- return /* @__PURE__ */ jsx138(
22058
+ return /* @__PURE__ */ jsx136("ol", { css: progressListStyles, ...htmlProps, children: itemsWithStatus.map(({ id, label, status, error, errorLevel }) => {
22059
+ return /* @__PURE__ */ jsx136(
22913
22060
  ProgressListItem,
22914
22061
  {
22915
22062
  status,
@@ -22929,7 +22076,7 @@ var ProgressListItem = ({
22929
22076
  errorLevel = "danger",
22930
22077
  autoEllipsis = false
22931
22078
  }) => {
22932
- const icon = useMemo8(() => {
22079
+ const icon = useMemo7(() => {
22933
22080
  if (error) {
22934
22081
  return warningIcon;
22935
22082
  }
@@ -22940,14 +22087,14 @@ var ProgressListItem = ({
22940
22087
  };
22941
22088
  return iconPerStatus[status];
22942
22089
  }, [status, error]);
22943
- const statusStyles = useMemo8(() => {
22090
+ const statusStyles = useMemo7(() => {
22944
22091
  if (error) {
22945
- return errorLevel === "caution" ? css103`
22092
+ return errorLevel === "caution" ? css101`
22946
22093
  color: rgb(161, 98, 7);
22947
22094
  & svg {
22948
22095
  color: rgb(250, 204, 21);
22949
22096
  }
22950
- ` : css103`
22097
+ ` : css101`
22951
22098
  color: rgb(185, 28, 28);
22952
22099
  & svg {
22953
22100
  color: var(--brand-primary-2);
@@ -22955,38 +22102,38 @@ var ProgressListItem = ({
22955
22102
  `;
22956
22103
  }
22957
22104
  const colorPerStatus = {
22958
- completed: css103`
22105
+ completed: css101`
22959
22106
  opacity: 0.75;
22960
22107
  `,
22961
- inProgress: css103`
22108
+ inProgress: css101`
22962
22109
  -webkit-text-stroke-width: thin;
22963
22110
  `,
22964
- queued: css103`
22111
+ queued: css101`
22965
22112
  opacity: 0.5;
22966
22113
  `
22967
22114
  };
22968
22115
  return colorPerStatus[status];
22969
22116
  }, [status, error, errorLevel]);
22970
- return /* @__PURE__ */ jsxs92("li", { css: [progressListItemStyles, statusStyles], children: [
22971
- /* @__PURE__ */ jsx138(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx138("div", { children: /* @__PURE__ */ jsx138(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
22972
- /* @__PURE__ */ jsxs92("div", { children: [
22117
+ return /* @__PURE__ */ jsxs90("li", { css: [progressListItemStyles, statusStyles], children: [
22118
+ /* @__PURE__ */ jsx136(Tooltip, { title: error != null ? error : "", children: /* @__PURE__ */ jsx136("div", { children: /* @__PURE__ */ jsx136(Icon, { icon, size: 20, iconColor: "currentColor" }) }) }),
22119
+ /* @__PURE__ */ jsxs90("div", { children: [
22973
22120
  children,
22974
- /* @__PURE__ */ jsx138("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
22121
+ /* @__PURE__ */ jsx136("span", { css: { visibility: autoEllipsis && status === "inProgress" && !error ? "visible" : "hidden" }, children: "..." })
22975
22122
  ] })
22976
22123
  ] });
22977
22124
  };
22978
22125
 
22979
22126
  // src/components/SegmentedControl/SegmentedControl.tsx
22980
- import { css as css105 } from "@emotion/react";
22127
+ import { css as css103 } from "@emotion/react";
22981
22128
  import { CgCheck as CgCheck5 } from "@react-icons/all-files/cg/CgCheck";
22982
- import { useCallback as useCallback14, useEffect as useEffect24, useMemo as useMemo9, useRef as useRef13, useState as useState21 } from "react";
22129
+ import { useCallback as useCallback12, useEffect as useEffect22, useMemo as useMemo8, useRef as useRef13, useState as useState18 } from "react";
22983
22130
 
22984
22131
  // src/components/SegmentedControl/SegmentedControl.styles.ts
22985
- import { css as css104 } from "@emotion/react";
22986
- var segmentedControlRootStyles = css104`
22132
+ import { css as css102 } from "@emotion/react";
22133
+ var segmentedControlRootStyles = css102`
22987
22134
  position: relative;
22988
22135
  `;
22989
- var segmentedControlScrollIndicatorsStyles = css104`
22136
+ var segmentedControlScrollIndicatorsStyles = css102`
22990
22137
  position: absolute;
22991
22138
  inset: 0;
22992
22139
  z-index: 1;
@@ -23014,17 +22161,17 @@ var segmentedControlScrollIndicatorsStyles = css104`
23014
22161
  background: linear-gradient(to left, var(--background-color) 10%, transparent);
23015
22162
  }
23016
22163
  `;
23017
- var segmentedControlScrollIndicatorStartVisibleStyles = css104`
22164
+ var segmentedControlScrollIndicatorStartVisibleStyles = css102`
23018
22165
  &::before {
23019
22166
  opacity: 1;
23020
22167
  }
23021
22168
  `;
23022
- var segmentedControlScrollIndicatorEndVisibleStyles = css104`
22169
+ var segmentedControlScrollIndicatorEndVisibleStyles = css102`
23023
22170
  &::after {
23024
22171
  opacity: 1;
23025
22172
  }
23026
22173
  `;
23027
- var segmentedControlWrapperStyles = css104`
22174
+ var segmentedControlWrapperStyles = css102`
23028
22175
  overflow-y: auto;
23029
22176
  scroll-behavior: smooth;
23030
22177
  scrollbar-width: none;
@@ -23033,7 +22180,7 @@ var segmentedControlWrapperStyles = css104`
23033
22180
  height: 0px;
23034
22181
  }
23035
22182
  `;
23036
- var segmentedControlStyles = css104`
22183
+ var segmentedControlStyles = css102`
23037
22184
  --segmented-control-rounded-value: var(--rounded-base);
23038
22185
  --segmented-control-border-width: 1px;
23039
22186
  --segmented-control-selected-color: var(--brand-secondary-3);
@@ -23052,14 +22199,14 @@ var segmentedControlStyles = css104`
23052
22199
  border-radius: calc(var(--segmented-control-rounded-value) + var(--segmented-control-border-width));
23053
22200
  font-size: var(--fs-xs);
23054
22201
  `;
23055
- var segmentedControlVerticalStyles = css104`
22202
+ var segmentedControlVerticalStyles = css102`
23056
22203
  flex-direction: column;
23057
22204
  --segmented-control-first-border-radius: var(--segmented-control-rounded-value)
23058
22205
  var(--segmented-control-rounded-value) 0 0;
23059
22206
  --segmented-control-last-border-radius: 0 0 var(--segmented-control-rounded-value)
23060
22207
  var(--segmented-control-rounded-value);
23061
22208
  `;
23062
- var segmentedControlItemStyles = css104`
22209
+ var segmentedControlItemStyles = css102`
23063
22210
  &:first-of-type label {
23064
22211
  border-radius: var(--segmented-control-first-border-radius);
23065
22212
  }
@@ -23067,10 +22214,10 @@ var segmentedControlItemStyles = css104`
23067
22214
  border-radius: var(--segmented-control-last-border-radius);
23068
22215
  }
23069
22216
  `;
23070
- var segmentedControlInputStyles = css104`
22217
+ var segmentedControlInputStyles = css102`
23071
22218
  ${accessibleHidden}
23072
22219
  `;
23073
- var segmentedControlLabelStyles = (checked, disabled2) => css104`
22220
+ var segmentedControlLabelStyles = (checked, disabled2) => css102`
23074
22221
  position: relative;
23075
22222
  display: flex;
23076
22223
  align-items: center;
@@ -23137,25 +22284,25 @@ var segmentedControlLabelStyles = (checked, disabled2) => css104`
23137
22284
  `}
23138
22285
  }
23139
22286
  `;
23140
- var segmentedControlLabelIconOnlyStyles = css104`
22287
+ var segmentedControlLabelIconOnlyStyles = css102`
23141
22288
  padding-inline: 0.5em;
23142
22289
  `;
23143
- var segmentedControlLabelCheckStyles = css104`
22290
+ var segmentedControlLabelCheckStyles = css102`
23144
22291
  opacity: 0.5;
23145
22292
  `;
23146
- var segmentedControlLabelContentStyles = css104`
22293
+ var segmentedControlLabelContentStyles = css102`
23147
22294
  display: flex;
23148
22295
  align-items: center;
23149
22296
  justify-content: center;
23150
22297
  gap: var(--spacing-sm);
23151
22298
  height: 100%;
23152
22299
  `;
23153
- var segmentedControlLabelTextStyles = css104`
22300
+ var segmentedControlLabelTextStyles = css102`
23154
22301
  white-space: nowrap;
23155
22302
  `;
23156
22303
 
23157
22304
  // src/components/SegmentedControl/SegmentedControl.tsx
23158
- import { jsx as jsx139, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
22305
+ import { jsx as jsx137, jsxs as jsxs91 } from "@emotion/react/jsx-runtime";
23159
22306
  var SegmentedControl = ({
23160
22307
  name,
23161
22308
  options,
@@ -23171,9 +22318,9 @@ var SegmentedControl = ({
23171
22318
  ...props
23172
22319
  }) => {
23173
22320
  const wrapperRef = useRef13(null);
23174
- const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState21(false);
23175
- const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState21(false);
23176
- const onOptionChange = useCallback14(
22321
+ const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState18(false);
22322
+ const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState18(false);
22323
+ const onOptionChange = useCallback12(
23177
22324
  (event) => {
23178
22325
  if (event.target.checked) {
23179
22326
  onChange == null ? void 0 : onChange(options[parseInt(event.target.value)].value);
@@ -23181,19 +22328,19 @@ var SegmentedControl = ({
23181
22328
  },
23182
22329
  [options, onChange]
23183
22330
  );
23184
- const sizeStyles = useMemo9(() => {
22331
+ const sizeStyles = useMemo8(() => {
23185
22332
  const map = {
23186
- sm: css105({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
23187
- md: css105({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
23188
- lg: css105({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
23189
- xl: css105({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
22333
+ sm: css103({ height: "calc(24px - 2px)", fontSize: "var(--fs-xs)" }),
22334
+ md: css103({ height: "calc(32px - 2px)", fontSize: "var(--fs-sm)" }),
22335
+ lg: css103({ height: "calc(40px - 2px)", fontSize: "var(--fs-base)" }),
22336
+ xl: css103({ height: "calc(48px - 2px)", fontSize: "var(--fs-base)" })
23190
22337
  };
23191
22338
  return map[size];
23192
22339
  }, [size]);
23193
- const isIconOnly = useMemo9(() => {
22340
+ const isIconOnly = useMemo8(() => {
23194
22341
  return options.every((option) => option && option.icon && !option.label);
23195
22342
  }, [options]);
23196
- useEffect24(() => {
22343
+ useEffect22(() => {
23197
22344
  const wrapperElement = wrapperRef.current;
23198
22345
  const onScroll = () => {
23199
22346
  if (!wrapperElement) {
@@ -23214,8 +22361,8 @@ var SegmentedControl = ({
23214
22361
  wrapperElement == null ? void 0 : wrapperElement.removeEventListener("scroll", onScroll);
23215
22362
  };
23216
22363
  }, []);
23217
- return /* @__PURE__ */ jsxs93("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
23218
- /* @__PURE__ */ jsx139("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ jsx139(
22364
+ return /* @__PURE__ */ jsxs91("div", { css: [segmentedControlRootStyles, { "--background-color": currentBackgroundColor }], children: [
22365
+ /* @__PURE__ */ jsx137("div", { ref: wrapperRef, css: segmentedControlWrapperStyles, children: /* @__PURE__ */ jsx137(
23219
22366
  "div",
23220
22367
  {
23221
22368
  css: [
@@ -23231,12 +22378,12 @@ var SegmentedControl = ({
23231
22378
  }
23232
22379
  const text = option.label ? option.label : option.icon ? null : String(option.value);
23233
22380
  const isDisabled = disabled2 || option.disabled;
23234
- return /* @__PURE__ */ jsx139(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx139(
22381
+ return /* @__PURE__ */ jsx137(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx137(
23235
22382
  "div",
23236
22383
  {
23237
22384
  css: segmentedControlItemStyles,
23238
22385
  "data-testid": option["data-testid"] ? option["data-testid"] : "container-segmented-control",
23239
- children: /* @__PURE__ */ jsxs93(
22386
+ children: /* @__PURE__ */ jsxs91(
23240
22387
  "label",
23241
22388
  {
23242
22389
  css: [
@@ -23245,7 +22392,7 @@ var SegmentedControl = ({
23245
22392
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
23246
22393
  ],
23247
22394
  children: [
23248
- /* @__PURE__ */ jsx139(
22395
+ /* @__PURE__ */ jsx137(
23249
22396
  "input",
23250
22397
  {
23251
22398
  css: segmentedControlInputStyles,
@@ -23257,10 +22404,10 @@ var SegmentedControl = ({
23257
22404
  disabled: isDisabled
23258
22405
  }
23259
22406
  ),
23260
- option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx139(CgCheck5, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
23261
- /* @__PURE__ */ jsxs93("span", { css: segmentedControlLabelContentStyles, children: [
23262
- !option.icon ? null : /* @__PURE__ */ jsx139(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
23263
- !text || hideOptionText ? null : /* @__PURE__ */ jsx139("span", { css: segmentedControlLabelTextStyles, children: text })
22407
+ option.value !== value || noCheckmark ? null : /* @__PURE__ */ jsx137(CgCheck5, { css: segmentedControlLabelCheckStyles, "aria-label": "Selected", size: "1.5em" }),
22408
+ /* @__PURE__ */ jsxs91("span", { css: segmentedControlLabelContentStyles, children: [
22409
+ !option.icon ? null : /* @__PURE__ */ jsx137(Icon, { icon: option.icon, size: iconSize, iconColor: "currentColor" }),
22410
+ !text || hideOptionText ? null : /* @__PURE__ */ jsx137("span", { css: segmentedControlLabelTextStyles, children: text })
23264
22411
  ] })
23265
22412
  ]
23266
22413
  }
@@ -23270,7 +22417,7 @@ var SegmentedControl = ({
23270
22417
  })
23271
22418
  }
23272
22419
  ) }),
23273
- /* @__PURE__ */ jsx139(
22420
+ /* @__PURE__ */ jsx137(
23274
22421
  "div",
23275
22422
  {
23276
22423
  css: [
@@ -23284,18 +22431,18 @@ var SegmentedControl = ({
23284
22431
  };
23285
22432
 
23286
22433
  // src/components/Skeleton/Skeleton.styles.ts
23287
- import { css as css106, keyframes as keyframes5 } from "@emotion/react";
22434
+ import { css as css104, keyframes as keyframes5 } from "@emotion/react";
23288
22435
  var lightFadingOut = keyframes5`
23289
22436
  from { opacity: 0.1; }
23290
22437
  to { opacity: 0.025; }
23291
22438
  `;
23292
- var skeletonStyles = css106`
22439
+ var skeletonStyles = css104`
23293
22440
  animation: ${lightFadingOut} 1s ease-out infinite alternate;
23294
22441
  background-color: var(--gray-900);
23295
22442
  `;
23296
22443
 
23297
22444
  // src/components/Skeleton/Skeleton.tsx
23298
- import { jsx as jsx140 } from "@emotion/react/jsx-runtime";
22445
+ import { jsx as jsx138 } from "@emotion/react/jsx-runtime";
23299
22446
  var Skeleton = ({
23300
22447
  width = "100%",
23301
22448
  height = "1.25rem",
@@ -23303,7 +22450,7 @@ var Skeleton = ({
23303
22450
  circle = false,
23304
22451
  children,
23305
22452
  ...otherProps
23306
- }) => /* @__PURE__ */ jsx140(
22453
+ }) => /* @__PURE__ */ jsx138(
23307
22454
  "div",
23308
22455
  {
23309
22456
  css: [
@@ -23323,11 +22470,11 @@ var Skeleton = ({
23323
22470
  );
23324
22471
 
23325
22472
  // src/components/Switch/Switch.tsx
23326
- import { forwardRef as forwardRef26 } from "react";
22473
+ import { forwardRef as forwardRef25 } from "react";
23327
22474
 
23328
22475
  // src/components/Switch/Switch.styles.ts
23329
- import { css as css107 } from "@emotion/react";
23330
- var SwitchInputContainer = css107`
22476
+ import { css as css105 } from "@emotion/react";
22477
+ var SwitchInputContainer = css105`
23331
22478
  cursor: pointer;
23332
22479
  display: inline-block;
23333
22480
  position: relative;
@@ -23336,7 +22483,7 @@ var SwitchInputContainer = css107`
23336
22483
  vertical-align: middle;
23337
22484
  user-select: none;
23338
22485
  `;
23339
- var SwitchInput = (size) => css107`
22486
+ var SwitchInput = (size) => css105`
23340
22487
  appearance: none;
23341
22488
  border-radius: var(--rounded-full);
23342
22489
  background-color: var(--white);
@@ -23375,7 +22522,7 @@ var SwitchInput = (size) => css107`
23375
22522
  cursor: not-allowed;
23376
22523
  }
23377
22524
  `;
23378
- var SwitchInputDisabled = css107`
22525
+ var SwitchInputDisabled = css105`
23379
22526
  opacity: var(--opacity-50);
23380
22527
  cursor: not-allowed;
23381
22528
 
@@ -23383,7 +22530,7 @@ var SwitchInputDisabled = css107`
23383
22530
  cursor: not-allowed;
23384
22531
  }
23385
22532
  `;
23386
- var SwitchInputLabel = (size) => css107`
22533
+ var SwitchInputLabel = (size) => css105`
23387
22534
  align-items: center;
23388
22535
  color: var(--typography-base);
23389
22536
  display: inline-flex;
@@ -23405,32 +22552,32 @@ var SwitchInputLabel = (size) => css107`
23405
22552
  top: 0;
23406
22553
  }
23407
22554
  `;
23408
- var SwitchText = (size) => css107`
22555
+ var SwitchText = (size) => css105`
23409
22556
  color: var(--gray-500);
23410
22557
  font-size: var(--fs-sm);
23411
22558
  padding-inline: ${size === "sm" ? "var(--spacing-xl)" : "var(--spacing-2xl)"} 0;
23412
22559
  `;
23413
22560
 
23414
22561
  // src/components/Switch/Switch.tsx
23415
- import { Fragment as Fragment22, jsx as jsx141, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
23416
- var Switch = forwardRef26(
22562
+ import { Fragment as Fragment21, jsx as jsx139, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
22563
+ var Switch = forwardRef25(
23417
22564
  ({ label, infoText, toggleText, children, switchSize = "base", ...inputProps }, ref) => {
23418
22565
  let additionalText = infoText;
23419
22566
  if (infoText && toggleText) {
23420
22567
  additionalText = inputProps.checked ? toggleText : infoText;
23421
22568
  }
23422
- return /* @__PURE__ */ jsxs94(Fragment22, { children: [
23423
- /* @__PURE__ */ jsxs94(
22569
+ return /* @__PURE__ */ jsxs92(Fragment21, { children: [
22570
+ /* @__PURE__ */ jsxs92(
23424
22571
  "label",
23425
22572
  {
23426
22573
  css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0],
23427
22574
  children: [
23428
- /* @__PURE__ */ jsx141("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
23429
- /* @__PURE__ */ jsx141("span", { css: SwitchInputLabel(switchSize), children: label })
22575
+ /* @__PURE__ */ jsx139("input", { type: "checkbox", css: SwitchInput(switchSize), ...inputProps, ref }),
22576
+ /* @__PURE__ */ jsx139("span", { css: SwitchInputLabel(switchSize), children: label })
23430
22577
  ]
23431
22578
  }
23432
22579
  ),
23433
- additionalText ? /* @__PURE__ */ jsx141("p", { css: SwitchText(switchSize), children: additionalText }) : null,
22580
+ additionalText ? /* @__PURE__ */ jsx139("p", { css: SwitchText(switchSize), children: additionalText }) : null,
23434
22581
  children
23435
22582
  ] });
23436
22583
  }
@@ -23440,8 +22587,8 @@ var Switch = forwardRef26(
23440
22587
  import * as React24 from "react";
23441
22588
 
23442
22589
  // src/components/Table/Table.styles.ts
23443
- import { css as css108 } from "@emotion/react";
23444
- var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css108`
22590
+ import { css as css106 } from "@emotion/react";
22591
+ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css106`
23445
22592
  border-bottom: 1px solid var(--gray-400);
23446
22593
  border-collapse: collapse;
23447
22594
  min-width: 100%;
@@ -23461,54 +22608,54 @@ var table = ({ cellPadding = "var(--spacing-sm) var(--spacing-md)" }) => css108`
23461
22608
  background-color: var(--gray-50);
23462
22609
  }
23463
22610
  `;
23464
- var tableHead = css108`
22611
+ var tableHead = css106`
23465
22612
  color: var(--typography-base);
23466
22613
  text-align: left;
23467
22614
  `;
23468
- var tableRow = css108`
22615
+ var tableRow = css106`
23469
22616
  border-bottom: 1px solid var(--gray-100);
23470
22617
  `;
23471
- var tableCellHead = css108`
22618
+ var tableCellHead = css106`
23472
22619
  font-size: var(--fs-sm);
23473
22620
  text-transform: uppercase;
23474
22621
  font-weight: var(--fw-bold);
23475
22622
  `;
23476
22623
 
23477
22624
  // src/components/Table/Table.tsx
23478
- import { jsx as jsx142 } from "@emotion/react/jsx-runtime";
22625
+ import { jsx as jsx140 } from "@emotion/react/jsx-runtime";
23479
22626
  var Table = React24.forwardRef(
23480
22627
  ({ children, cellPadding, ...otherProps }, ref) => {
23481
- return /* @__PURE__ */ jsx142("table", { ref, css: table({ cellPadding }), ...otherProps, children });
22628
+ return /* @__PURE__ */ jsx140("table", { ref, css: table({ cellPadding }), ...otherProps, children });
23482
22629
  }
23483
22630
  );
23484
22631
  var TableHead = React24.forwardRef(
23485
22632
  ({ children, ...otherProps }, ref) => {
23486
- return /* @__PURE__ */ jsx142("thead", { ref, css: tableHead, ...otherProps, children });
22633
+ return /* @__PURE__ */ jsx140("thead", { ref, css: tableHead, ...otherProps, children });
23487
22634
  }
23488
22635
  );
23489
22636
  var TableBody = React24.forwardRef(
23490
22637
  ({ children, ...otherProps }, ref) => {
23491
- return /* @__PURE__ */ jsx142("tbody", { ref, ...otherProps, children });
22638
+ return /* @__PURE__ */ jsx140("tbody", { ref, ...otherProps, children });
23492
22639
  }
23493
22640
  );
23494
22641
  var TableFoot = React24.forwardRef(
23495
22642
  ({ children, ...otherProps }, ref) => {
23496
- return /* @__PURE__ */ jsx142("tfoot", { ref, ...otherProps, children });
22643
+ return /* @__PURE__ */ jsx140("tfoot", { ref, ...otherProps, children });
23497
22644
  }
23498
22645
  );
23499
22646
  var TableRow = React24.forwardRef(
23500
22647
  ({ children, ...otherProps }, ref) => {
23501
- return /* @__PURE__ */ jsx142("tr", { ref, css: tableRow, ...otherProps, children });
22648
+ return /* @__PURE__ */ jsx140("tr", { ref, css: tableRow, ...otherProps, children });
23502
22649
  }
23503
22650
  );
23504
22651
  var TableCellHead = React24.forwardRef(
23505
22652
  ({ children, ...otherProps }, ref) => {
23506
- return /* @__PURE__ */ jsx142("th", { ref, css: tableCellHead, ...otherProps, children });
22653
+ return /* @__PURE__ */ jsx140("th", { ref, css: tableCellHead, ...otherProps, children });
23507
22654
  }
23508
22655
  );
23509
22656
  var TableCellData = React24.forwardRef(
23510
22657
  ({ children, ...otherProps }, ref) => {
23511
- return /* @__PURE__ */ jsx142("td", { ref, ...otherProps, children });
22658
+ return /* @__PURE__ */ jsx140("td", { ref, ...otherProps, children });
23512
22659
  }
23513
22660
  );
23514
22661
 
@@ -23520,11 +22667,11 @@ import {
23520
22667
  TabProvider as AriakitTabProvider,
23521
22668
  useTabStore as useAriakitTabStore
23522
22669
  } from "@ariakit/react";
23523
- import { useCallback as useCallback15, useEffect as useEffect25, useMemo as useMemo10 } from "react";
22670
+ import { useCallback as useCallback13, useEffect as useEffect23, useMemo as useMemo9 } from "react";
23524
22671
 
23525
22672
  // src/components/Tabs/Tabs.styles.ts
23526
- import { css as css109 } from "@emotion/react";
23527
- var tabButtonStyles = css109`
22673
+ import { css as css107 } from "@emotion/react";
22674
+ var tabButtonStyles = css107`
23528
22675
  align-items: center;
23529
22676
  border: 0;
23530
22677
  height: 2.5rem;
@@ -23541,14 +22688,14 @@ var tabButtonStyles = css109`
23541
22688
  box-shadow: inset 0 -2px 0 var(--brand-secondary-3);
23542
22689
  }
23543
22690
  `;
23544
- var tabButtonGroupStyles = css109`
22691
+ var tabButtonGroupStyles = css107`
23545
22692
  display: flex;
23546
22693
  gap: var(--spacing-base);
23547
22694
  border-bottom: 1px solid var(--gray-300);
23548
22695
  `;
23549
22696
 
23550
22697
  // src/components/Tabs/Tabs.tsx
23551
- import { jsx as jsx143 } from "@emotion/react/jsx-runtime";
22698
+ import { jsx as jsx141 } from "@emotion/react/jsx-runtime";
23552
22699
  var useCurrentTab = () => {
23553
22700
  const context = useAriakitTabStore();
23554
22701
  if (!context) {
@@ -23564,12 +22711,12 @@ var Tabs = ({
23564
22711
  manual,
23565
22712
  ...props
23566
22713
  }) => {
23567
- const selected = useMemo10(() => {
22714
+ const selected = useMemo9(() => {
23568
22715
  if (selectedId) return selectedId;
23569
22716
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
23570
22717
  }, [selectedId, useHashForState]);
23571
22718
  const tab = useAriakitTabStore({ ...props, selectOnMove: !manual, selectedId: selected });
23572
- const onTabSelect = useCallback15(
22719
+ const onTabSelect = useCallback13(
23573
22720
  (value) => {
23574
22721
  const selectedValueWithoutNull = value != null ? value : void 0;
23575
22722
  onSelectedIdChange == null ? void 0 : onSelectedIdChange(selectedValueWithoutNull);
@@ -23580,33 +22727,33 @@ var Tabs = ({
23580
22727
  },
23581
22728
  [onSelectedIdChange, useHashForState]
23582
22729
  );
23583
- useEffect25(() => {
22730
+ useEffect23(() => {
23584
22731
  if (selected && selected !== tab.getState().activeId) {
23585
22732
  tab.setSelectedId(selected);
23586
22733
  }
23587
22734
  }, [selected, tab]);
23588
- return /* @__PURE__ */ jsx143(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
22735
+ return /* @__PURE__ */ jsx141(AriakitTabProvider, { store: tab, setSelectedId: onTabSelect, children });
23589
22736
  };
23590
22737
  var TabButtonGroup = ({ children, ...props }) => {
23591
- return /* @__PURE__ */ jsx143(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
22738
+ return /* @__PURE__ */ jsx141(AriakitTabList, { ...props, css: tabButtonGroupStyles, children });
23592
22739
  };
23593
22740
  var TabButton = ({
23594
22741
  children,
23595
22742
  id,
23596
22743
  ...props
23597
22744
  }) => {
23598
- return /* @__PURE__ */ jsx143(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
22745
+ return /* @__PURE__ */ jsx141(AriakitTab, { type: "button", id, ...props, css: tabButtonStyles, children });
23599
22746
  };
23600
22747
  var TabContent = ({
23601
22748
  children,
23602
22749
  ...props
23603
22750
  }) => {
23604
- return /* @__PURE__ */ jsx143(AriakitTabPanel, { ...props, children });
22751
+ return /* @__PURE__ */ jsx141(AriakitTabPanel, { ...props, children });
23605
22752
  };
23606
22753
 
23607
22754
  // src/components/Validation/StatusBullet.styles.ts
23608
- import { css as css110 } from "@emotion/react";
23609
- var StatusBulletContainer = css110`
22755
+ import { css as css108 } from "@emotion/react";
22756
+ var StatusBulletContainer = css108`
23610
22757
  align-items: center;
23611
22758
  align-self: center;
23612
22759
  color: var(--gray-500);
@@ -23623,33 +22770,33 @@ var StatusBulletContainer = css110`
23623
22770
  display: block;
23624
22771
  }
23625
22772
  `;
23626
- var StatusBulletBase = css110`
22773
+ var StatusBulletBase = css108`
23627
22774
  font-size: var(--fs-sm);
23628
22775
  &:before {
23629
22776
  width: var(--fs-xs);
23630
22777
  height: var(--fs-xs);
23631
22778
  }
23632
22779
  `;
23633
- var StatusBulletSmall = css110`
22780
+ var StatusBulletSmall = css108`
23634
22781
  font-size: var(--fs-xs);
23635
22782
  &:before {
23636
22783
  width: var(--fs-xxs);
23637
22784
  height: var(--fs-xxs);
23638
22785
  }
23639
22786
  `;
23640
- var StatusDraft = css110`
22787
+ var StatusDraft = css108`
23641
22788
  &:before {
23642
22789
  background: var(--white);
23643
22790
  box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
23644
22791
  }
23645
22792
  `;
23646
- var StatusModified = css110`
22793
+ var StatusModified = css108`
23647
22794
  &:before {
23648
22795
  background: linear-gradient(to right, var(--white) 50%, var(--accent-dark) 50% 100%);
23649
22796
  box-shadow: inset 0 0 0 0.125rem var(--accent-dark);
23650
22797
  }
23651
22798
  `;
23652
- var StatusError = css110`
22799
+ var StatusError = css108`
23653
22800
  color: var(--error);
23654
22801
  &:before {
23655
22802
  /* TODO: replace this with an svg icon */
@@ -23662,29 +22809,29 @@ var StatusError = css110`
23662
22809
  );
23663
22810
  }
23664
22811
  `;
23665
- var StatusPublished = css110`
22812
+ var StatusPublished = css108`
23666
22813
  &:before {
23667
22814
  background: var(--accent-dark);
23668
22815
  }
23669
22816
  `;
23670
- var StatusOrphan = css110`
22817
+ var StatusOrphan = css108`
23671
22818
  &:before {
23672
22819
  background: var(--brand-secondary-5);
23673
22820
  }
23674
22821
  `;
23675
- var StatusUnknown = css110`
22822
+ var StatusUnknown = css108`
23676
22823
  &:before {
23677
22824
  background: var(--gray-800);
23678
22825
  }
23679
22826
  `;
23680
- var StatusDeleted = css110`
22827
+ var StatusDeleted = css108`
23681
22828
  &:before {
23682
22829
  background: var(--error);
23683
22830
  }
23684
22831
  `;
23685
22832
 
23686
22833
  // src/components/Validation/StatusBullet.tsx
23687
- import { jsx as jsx144 } from "@emotion/react/jsx-runtime";
22834
+ import { jsx as jsx142 } from "@emotion/react/jsx-runtime";
23688
22835
  var StatusBullet = ({
23689
22836
  status,
23690
22837
  hideText = false,
@@ -23704,7 +22851,7 @@ var StatusBullet = ({
23704
22851
  Deleted: StatusDeleted
23705
22852
  };
23706
22853
  const statusSize = size === "base" ? StatusBulletBase : StatusBulletSmall;
23707
- return /* @__PURE__ */ jsx144(
22854
+ return /* @__PURE__ */ jsx142(
23708
22855
  "span",
23709
22856
  {
23710
22857
  role: "status",
@@ -23979,7 +23126,6 @@ export {
23979
23126
  useOutsideClick,
23980
23127
  useParameterShell,
23981
23128
  usePopoverComponentContext,
23982
- useRichTextToolbarState,
23983
23129
  useShortcut,
23984
23130
  functionalColors as utilityColors,
23985
23131
  warningIcon,