@uniformdev/design-system 20.64.1-alpha.3 → 20.65.0

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.
Files changed (3) hide show
  1. package/dist/esm/index.js +196 -107
  2. package/dist/index.js +482 -392
  3. package/package.json +4 -4
package/dist/esm/index.js CHANGED
@@ -13593,10 +13593,16 @@ var ObjectListSubText2 = ({ children, ...props }) => {
13593
13593
  };
13594
13594
 
13595
13595
  // src/components/Pagination/Pagination.tsx
13596
+ import * as React20 from "react";
13596
13597
  import Paginate from "react-paginate";
13597
13598
 
13598
13599
  // src/components/Pagination/Pagniation.styles.ts
13599
13600
  import { css as css92 } from "@emotion/css";
13601
+ var wrapper = css92`
13602
+ display: inline-flex;
13603
+ max-width: 100%;
13604
+ overflow-x: auto;
13605
+ `;
13600
13606
  var container2 = css92`
13601
13607
  align-items: center;
13602
13608
  display: flex;
@@ -13623,6 +13629,90 @@ var page = css92`
13623
13629
  margin-right: var(--spacing-xs);
13624
13630
  `;
13625
13631
 
13632
+ // src/components/Pagination/usePaginationDisplayRange.ts
13633
+ import { useEffect as useEffect19, useState as useState23 } from "react";
13634
+ var DEFAULT_PAGINATION_DISPLAY_RANGE = {
13635
+ marginPagesDisplayed: 2,
13636
+ pageRangeDisplayed: 5
13637
+ };
13638
+ var PREV_NEXT_WIDTH = 64;
13639
+ var BREAK_WIDTH = 28;
13640
+ var PAGE_PADDING = 32;
13641
+ var PAGE_MARGIN = 8;
13642
+ var DIGIT_WIDTH = 10;
13643
+ var WIDE_DISPLAY_RANGE = {
13644
+ marginPagesDisplayed: 2,
13645
+ pageRangeDisplayed: 5
13646
+ };
13647
+ var MEDIUM_DISPLAY_RANGE = {
13648
+ marginPagesDisplayed: 1,
13649
+ pageRangeDisplayed: 3
13650
+ };
13651
+ var COMPACT_DISPLAY_RANGE = {
13652
+ marginPagesDisplayed: 0,
13653
+ pageRangeDisplayed: 3
13654
+ };
13655
+ var MINIMAL_DISPLAY_RANGE = {
13656
+ marginPagesDisplayed: 0,
13657
+ pageRangeDisplayed: 1
13658
+ };
13659
+ function estimatePageButtonWidth(pageCount) {
13660
+ const digits = Math.max(1, String(pageCount).length);
13661
+ return PAGE_PADDING + PAGE_MARGIN + digits * DIGIT_WIDTH;
13662
+ }
13663
+ function getMinimumWidthForDisplayRange(pageCount, displayRange) {
13664
+ const pageButtonWidth = estimatePageButtonWidth(pageCount);
13665
+ const pageButtons = displayRange.marginPagesDisplayed * 2 + displayRange.pageRangeDisplayed;
13666
+ return pageButtons * pageButtonWidth + PREV_NEXT_WIDTH + BREAK_WIDTH * 2;
13667
+ }
13668
+ function getPaginationDisplayRange(containerWidth, pageCount) {
13669
+ if (containerWidth <= 0) {
13670
+ return MINIMAL_DISPLAY_RANGE;
13671
+ }
13672
+ if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, WIDE_DISPLAY_RANGE)) {
13673
+ return WIDE_DISPLAY_RANGE;
13674
+ }
13675
+ if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, MEDIUM_DISPLAY_RANGE)) {
13676
+ return MEDIUM_DISPLAY_RANGE;
13677
+ }
13678
+ if (containerWidth >= getMinimumWidthForDisplayRange(pageCount, COMPACT_DISPLAY_RANGE)) {
13679
+ return COMPACT_DISPLAY_RANGE;
13680
+ }
13681
+ return MINIMAL_DISPLAY_RANGE;
13682
+ }
13683
+ function getAvailablePaginationWidth(container5) {
13684
+ var _a;
13685
+ const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
13686
+ return measurementElement.getBoundingClientRect().width;
13687
+ }
13688
+ function usePaginationDisplayRange(containerRef, pageCount) {
13689
+ const [displayRange, setDisplayRange] = useState23(DEFAULT_PAGINATION_DISPLAY_RANGE);
13690
+ useEffect19(() => {
13691
+ var _a;
13692
+ const container5 = containerRef.current;
13693
+ if (!container5) {
13694
+ return;
13695
+ }
13696
+ const measurementElement = (_a = container5.parentElement) != null ? _a : container5;
13697
+ const updateDisplayRange = () => {
13698
+ const currentContainer = containerRef.current;
13699
+ if (!currentContainer) {
13700
+ return;
13701
+ }
13702
+ setDisplayRange(getPaginationDisplayRange(getAvailablePaginationWidth(currentContainer), pageCount));
13703
+ };
13704
+ updateDisplayRange();
13705
+ const observer = new ResizeObserver(() => {
13706
+ updateDisplayRange();
13707
+ });
13708
+ observer.observe(measurementElement);
13709
+ return () => {
13710
+ observer.disconnect();
13711
+ };
13712
+ }, [containerRef, pageCount]);
13713
+ return displayRange;
13714
+ }
13715
+
13626
13716
  // src/components/Pagination/Pagination.tsx
13627
13717
  import { jsx as jsx122 } from "@emotion/react/jsx-runtime";
13628
13718
  function Pagination({
@@ -13631,15 +13721,14 @@ function Pagination({
13631
13721
  total,
13632
13722
  onPageChange
13633
13723
  }) {
13634
- if (limit < 1) {
13724
+ const containerRef = React20.useRef(null);
13725
+ const pageCount = limit >= 1 ? Math.ceil(total / limit) : 0;
13726
+ const currentPage = limit >= 1 ? Math.ceil(offset / limit) : 0;
13727
+ const { marginPagesDisplayed, pageRangeDisplayed } = usePaginationDisplayRange(containerRef, pageCount);
13728
+ if (limit < 1 || pageCount <= 1) {
13635
13729
  return null;
13636
13730
  }
13637
- const pageCount = Math.ceil(total / limit);
13638
- const currentPage = Math.ceil(offset / limit);
13639
- if (pageCount <= 1) {
13640
- return null;
13641
- }
13642
- return /* @__PURE__ */ jsx122(
13731
+ return /* @__PURE__ */ jsx122("div", { ref: containerRef, className: wrapper, children: /* @__PURE__ */ jsx122(
13643
13732
  Paginate,
13644
13733
  {
13645
13734
  forcePage: currentPage,
@@ -13647,8 +13736,8 @@ function Pagination({
13647
13736
  nextLabel: /* @__PURE__ */ jsx122("div", { className: prevNextControls, children: ">" }),
13648
13737
  breakLabel: "...",
13649
13738
  pageCount,
13650
- marginPagesDisplayed: 2,
13651
- pageRangeDisplayed: 5,
13739
+ marginPagesDisplayed,
13740
+ pageRangeDisplayed,
13652
13741
  onPageChange: ({ selected }) => {
13653
13742
  onPageChange(limit, selected * limit);
13654
13743
  },
@@ -13659,7 +13748,7 @@ function Pagination({
13659
13748
  activeClassName: active,
13660
13749
  pageClassName: page
13661
13750
  }
13662
- );
13751
+ ) });
13663
13752
  }
13664
13753
 
13665
13754
  // src/components/ParameterInputs/hooks/ParameterShellContext.tsx
@@ -13749,7 +13838,7 @@ var LabelLeadingIcon = ({
13749
13838
  };
13750
13839
 
13751
13840
  // src/components/ParameterInputs/ParameterActionButton.tsx
13752
- import React20 from "react";
13841
+ import React21 from "react";
13753
13842
 
13754
13843
  // src/components/ParameterInputs/styles/ParameterActionButton.styles.ts
13755
13844
  import { css as css94 } from "@emotion/react";
@@ -13853,7 +13942,7 @@ var ParameterActionButton = ({
13853
13942
  children
13854
13943
  }
13855
13944
  );
13856
- if (tooltip && (typeof tooltip === "string" || React20.isValidElement(tooltip))) {
13945
+ if (tooltip && (typeof tooltip === "string" || React21.isValidElement(tooltip))) {
13857
13946
  return /* @__PURE__ */ jsx124(Tooltip, { title: tooltip, ...tooltipProps, children: buttonElement });
13858
13947
  }
13859
13948
  return buttonElement;
@@ -13934,7 +14023,7 @@ var ParameterGroup = forwardRef23(
13934
14023
  import { forwardRef as forwardRef25, useDeferredValue } from "react";
13935
14024
 
13936
14025
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13937
- import { useState as useState23 } from "react";
14026
+ import { useState as useState24 } from "react";
13938
14027
  import { createPortal as createPortal2 } from "react-dom";
13939
14028
 
13940
14029
  // src/components/ParameterInputs/styles/ParameterImage.styles.ts
@@ -13977,7 +14066,7 @@ var previewModalImage = css97`
13977
14066
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13978
14067
  import { Fragment as Fragment15, jsx as jsx127, jsxs as jsxs87 } from "@emotion/react/jsx-runtime";
13979
14068
  function ParameterImagePreview({ imageSrc }) {
13980
- const [showModal, setShowModal] = useState23(false);
14069
+ const [showModal, setShowModal] = useState24(false);
13981
14070
  return imageSrc ? /* @__PURE__ */ jsxs87("div", { css: previewWrapper, children: [
13982
14071
  /* @__PURE__ */ jsx127(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
13983
14072
  /* @__PURE__ */ jsx127(
@@ -14010,7 +14099,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
14010
14099
 
14011
14100
  // src/components/ParameterInputs/ParameterShell.tsx
14012
14101
  import { css as css100 } from "@emotion/react";
14013
- import { useState as useState24 } from "react";
14102
+ import { useState as useState25 } from "react";
14014
14103
 
14015
14104
  // src/components/ParameterInputs/styles/ParameterInput.styles.ts
14016
14105
  import { css as css98 } from "@emotion/react";
@@ -14464,7 +14553,7 @@ var ParameterShell = ({
14464
14553
  menuWithoutPortal,
14465
14554
  ...props
14466
14555
  }) => {
14467
- const [manualErrorMessage, setManualErrorMessage] = useState24(void 0);
14556
+ const [manualErrorMessage, setManualErrorMessage] = useState25(void 0);
14468
14557
  const setErrorMessage = (message) => setManualErrorMessage(message);
14469
14558
  const errorMessaging = errorMessage || manualErrorMessage;
14470
14559
  return /* @__PURE__ */ jsxs88("div", { css: inputContainer2, ...props, id, children: [
@@ -14601,7 +14690,7 @@ var ParameterInputInner = forwardRef26(({ enableMouseWheel = false, ...props },
14601
14690
  });
14602
14691
 
14603
14692
  // src/components/ParameterInputs/ParameterLabels.tsx
14604
- import { useMemo as useMemo8, useRef as useRef13 } from "react";
14693
+ import { useMemo as useMemo8, useRef as useRef14 } from "react";
14605
14694
  import { jsx as jsx133 } from "@emotion/react/jsx-runtime";
14606
14695
  var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
14607
14696
  const { shellProps, innerProps } = extractParameterProps(props);
@@ -14663,8 +14752,8 @@ var ParameterLabelsInner = (props) => {
14663
14752
  var _a;
14664
14753
  const { label: label2 } = useParameterShell();
14665
14754
  const { onChange } = props;
14666
- const containerRef = useRef13(null);
14667
- const hasPositionedRef = useRef13(false);
14755
+ const containerRef = useRef14(null);
14756
+ const hasPositionedRef = useRef14(false);
14668
14757
  const selectedValues = useMemo8(
14669
14758
  () => {
14670
14759
  var _a2, _b;
@@ -14980,7 +15069,7 @@ import { forwardRef as forwardRef29 } from "react";
14980
15069
  import { forwardRef as forwardRef28, useCallback as useCallback12, useMemo as useMemo9 } from "react";
14981
15070
 
14982
15071
  // src/components/Slider/SliderLabels.tsx
14983
- import { useEffect as useEffect19, useRef as useRef14, useState as useState25 } from "react";
15072
+ import { useEffect as useEffect20, useRef as useRef15, useState as useState26 } from "react";
14984
15073
 
14985
15074
  // src/components/Slider/styles/Slider.styles.ts
14986
15075
  import { css as css101 } from "@emotion/react";
@@ -15405,9 +15494,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
15405
15494
  }));
15406
15495
  }
15407
15496
  function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
15408
- const containerRef = useRef14(null);
15409
- const [measuredWidth, setMeasuredWidth] = useState25(containerWidth);
15410
- useEffect19(() => {
15497
+ const containerRef = useRef15(null);
15498
+ const [measuredWidth, setMeasuredWidth] = useState26(containerWidth);
15499
+ useEffect20(() => {
15411
15500
  if (containerRef.current) {
15412
15501
  const resizeObserver = new ResizeObserver((entries) => {
15413
15502
  for (const entry of entries) {
@@ -15785,7 +15874,7 @@ var defaultParameterConfiguration = {
15785
15874
  // src/components/ParameterInputs/ParameterRichText.tsx
15786
15875
  import { deepEqual as deepEqual2 } from "fast-equals";
15787
15876
  import { ParagraphNode as ParagraphNode2 } from "lexical";
15788
- import { useEffect as useEffect28, useState as useState31 } from "react";
15877
+ import { useEffect as useEffect29, useState as useState32 } from "react";
15789
15878
 
15790
15879
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
15791
15880
  import { CodeNode } from "@lexical/code";
@@ -15806,10 +15895,10 @@ CustomCodeNode.importDOM = function() {
15806
15895
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
15807
15896
  import { mergeRegister } from "@lexical/utils";
15808
15897
  import { ParagraphNode } from "lexical";
15809
- import { useEffect as useEffect20 } from "react";
15898
+ import { useEffect as useEffect21 } from "react";
15810
15899
  function DisableStylesPlugin() {
15811
15900
  const [editor] = useLexicalComposerContext();
15812
- useEffect20(() => {
15901
+ useEffect21(() => {
15813
15902
  return mergeRegister(
15814
15903
  // Disable text alignment on paragraph nodes
15815
15904
  editor.registerNodeTransform(ParagraphNode, (node) => {
@@ -16068,10 +16157,10 @@ var tableHeaderElement = css102`
16068
16157
  import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
16069
16158
  import { $insertFirst } from "@lexical/utils";
16070
16159
  import { $createParagraphNode, $getRoot, $insertNodes } from "lexical";
16071
- import { useEffect as useEffect21 } from "react";
16160
+ import { useEffect as useEffect22 } from "react";
16072
16161
  var ImprovedAssetSelectionPlugin = () => {
16073
16162
  const [editor] = useLexicalComposerContext2();
16074
- useEffect21(() => {
16163
+ useEffect22(() => {
16075
16164
  editor.getRootElement();
16076
16165
  const onRootClick = (event) => {
16077
16166
  if (event.target !== editor.getRootElement()) {
@@ -16142,7 +16231,7 @@ import {
16142
16231
  FOCUS_COMMAND,
16143
16232
  PASTE_COMMAND
16144
16233
  } from "lexical";
16145
- import { useCallback as useCallback13, useEffect as useEffect22, useRef as useRef15, useState as useState26 } from "react";
16234
+ import { useCallback as useCallback13, useEffect as useEffect23, useRef as useRef16, useState as useState27 } from "react";
16146
16235
 
16147
16236
  // src/components/ParameterInputs/rich-text/utils.ts
16148
16237
  import { $isAtNodeEnd } from "@lexical/selection";
@@ -16515,17 +16604,17 @@ function LinkNodePlugin({
16515
16604
  return path;
16516
16605
  };
16517
16606
  const [editor] = useLexicalComposerContext3();
16518
- const [linkPopoverState, setLinkPopoverState] = useState26();
16519
- const linkPopoverElRef = useRef15(null);
16520
- const [isEditorFocused, setIsEditorFocused] = useState26(false);
16521
- const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState26(false);
16522
- useEffect22(() => {
16607
+ const [linkPopoverState, setLinkPopoverState] = useState27();
16608
+ const linkPopoverElRef = useRef16(null);
16609
+ const [isEditorFocused, setIsEditorFocused] = useState27(false);
16610
+ const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState27(false);
16611
+ useEffect23(() => {
16523
16612
  if (!isEditorFocused && !isLinkPopoverFocused) {
16524
16613
  setLinkPopoverState(void 0);
16525
16614
  return;
16526
16615
  }
16527
16616
  }, [isEditorFocused, isLinkPopoverFocused]);
16528
- useEffect22(() => {
16617
+ useEffect23(() => {
16529
16618
  if (!editor.hasNodes([LinkNode])) {
16530
16619
  throw new Error("LinkNode not registered on editor");
16531
16620
  }
@@ -16663,7 +16752,7 @@ function LinkNodePlugin({
16663
16752
  }
16664
16753
  });
16665
16754
  }, [editor, positioningAnchorEl]);
16666
- useEffect22(() => {
16755
+ useEffect23(() => {
16667
16756
  return editor.registerUpdateListener(({ editorState }) => {
16668
16757
  requestAnimationFrame(() => {
16669
16758
  editorState.read(() => {
@@ -16767,7 +16856,7 @@ import {
16767
16856
  OUTDENT_CONTENT_COMMAND,
16768
16857
  SELECTION_CHANGE_COMMAND
16769
16858
  } from "lexical";
16770
- import { useEffect as useEffect23, useRef as useRef16 } from "react";
16859
+ import { useEffect as useEffect24, useRef as useRef17 } from "react";
16771
16860
  function isIndentPermitted(maxDepth) {
16772
16861
  const selection = $getSelection2();
16773
16862
  if (!$isRangeSelection2(selection)) {
@@ -16822,8 +16911,8 @@ function $indentOverTab(selection) {
16822
16911
  }
16823
16912
  function ListIndentPlugin({ maxDepth }) {
16824
16913
  const [editor] = useLexicalComposerContext4();
16825
- const isInListItemNode = useRef16(false);
16826
- useEffect23(() => {
16914
+ const isInListItemNode = useRef17(false);
16915
+ useEffect24(() => {
16827
16916
  return editor.registerCommand(
16828
16917
  SELECTION_CHANGE_COMMAND,
16829
16918
  () => {
@@ -16840,7 +16929,7 @@ function ListIndentPlugin({ maxDepth }) {
16840
16929
  COMMAND_PRIORITY_NORMAL
16841
16930
  );
16842
16931
  }, [editor]);
16843
- useEffect23(() => {
16932
+ useEffect24(() => {
16844
16933
  return mergeRegister3(
16845
16934
  editor.registerCommand(
16846
16935
  INDENT_CONTENT_COMMAND,
@@ -16889,7 +16978,7 @@ import {
16889
16978
  TableCellNode
16890
16979
  } from "@lexical/table";
16891
16980
  import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3, $setSelection } from "lexical";
16892
- import { forwardRef as forwardRef30, useCallback as useCallback14, useEffect as useEffect24, useLayoutEffect, useState as useState27 } from "react";
16981
+ import { forwardRef as forwardRef30, useCallback as useCallback14, useEffect as useEffect25, useLayoutEffect, useState as useState28 } from "react";
16893
16982
  import { jsx as jsx141, jsxs as jsxs94 } from "@emotion/react/jsx-runtime";
16894
16983
  function computeSelectionCount(selection) {
16895
16984
  const selectionShape = selection.getShape();
@@ -16904,7 +16993,7 @@ var tableActionMenuTrigger = css104`
16904
16993
  `;
16905
16994
  var TableActionMenuTrigger = forwardRef30((props, ref) => {
16906
16995
  const { tableCellEl, positioningAnchorEl, ...rest } = props;
16907
- const [coordinates, setCoordinates] = useState27({ x: 0, y: 0 });
16996
+ const [coordinates, setCoordinates] = useState28({ x: 0, y: 0 });
16908
16997
  useLayoutEffect(() => {
16909
16998
  const rect = tableCellEl.getBoundingClientRect();
16910
16999
  const parentRect = positioningAnchorEl.getBoundingClientRect();
@@ -16938,16 +17027,16 @@ function TableActionMenu({
16938
17027
  positioningAnchorEl
16939
17028
  }) {
16940
17029
  const [editor] = useLexicalComposerContext5();
16941
- const [tableCellNode, updateTableCellNode] = useState27(_tableCellNode);
16942
- const [selectionCounts, updateSelectionCounts] = useState27({
17030
+ const [tableCellNode, updateTableCellNode] = useState28(_tableCellNode);
17031
+ const [selectionCounts, updateSelectionCounts] = useState28({
16943
17032
  columns: 1,
16944
17033
  rows: 1
16945
17034
  });
16946
- const [menuTriggerKey, setMenuTriggerKey] = useState27(0);
17035
+ const [menuTriggerKey, setMenuTriggerKey] = useState28(0);
16947
17036
  const incrementMenuTriggerKey = () => {
16948
17037
  setMenuTriggerKey((key) => key += 1);
16949
17038
  };
16950
- useEffect24(() => {
17039
+ useEffect25(() => {
16951
17040
  return editor.registerMutationListener(
16952
17041
  TableCellNode,
16953
17042
  (nodeMutations) => {
@@ -16961,7 +17050,7 @@ function TableActionMenu({
16961
17050
  { skipInitialization: true }
16962
17051
  );
16963
17052
  }, [editor, tableCellNode]);
16964
- useEffect24(() => {
17053
+ useEffect25(() => {
16965
17054
  editor.getEditorState().read(() => {
16966
17055
  const selection = $getSelection3();
16967
17056
  if ($isTableSelection(selection)) {
@@ -17136,10 +17225,10 @@ function TableCellActionMenuContainer({
17136
17225
  positioningAnchorEl
17137
17226
  }) {
17138
17227
  const [editor] = useLexicalComposerContext5();
17139
- const [tableCellNode, setTableMenuCellNode] = useState27(null);
17140
- const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState27(null);
17141
- const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState27(null);
17142
- useEffect24(() => {
17228
+ const [tableCellNode, setTableMenuCellNode] = useState28(null);
17229
+ const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState28(null);
17230
+ const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState28(null);
17231
+ useEffect25(() => {
17143
17232
  const newPortalEl = document.createElement("div");
17144
17233
  setTableMenuCellMenuPortalEl(newPortalEl);
17145
17234
  menuPortalEl.appendChild(newPortalEl);
@@ -17183,7 +17272,7 @@ function TableCellActionMenuContainer({
17183
17272
  setTableMenuCellNodeElem(null);
17184
17273
  }
17185
17274
  }, [editor, setTableMenuCellNodeElem]);
17186
- useEffect24(() => {
17275
+ useEffect25(() => {
17187
17276
  return editor.registerUpdateListener(() => {
17188
17277
  editor.getEditorState().read(() => {
17189
17278
  $moveMenu();
@@ -17222,7 +17311,7 @@ import {
17222
17311
  } from "@lexical/table";
17223
17312
  import { calculateZoomLevel } from "@lexical/utils";
17224
17313
  import { $getNearestNodeFromDOMNode } from "lexical";
17225
- import { useCallback as useCallback15, useEffect as useEffect25, useMemo as useMemo10, useRef as useRef17, useState as useState28 } from "react";
17314
+ import { useCallback as useCallback15, useEffect as useEffect26, useMemo as useMemo10, useRef as useRef18, useState as useState29 } from "react";
17226
17315
  import { createPortal as createPortal3 } from "react-dom";
17227
17316
  import { Fragment as Fragment19, jsx as jsx142, jsxs as jsxs95 } from "@emotion/react/jsx-runtime";
17228
17317
  var MIN_ROW_HEIGHT = 33;
@@ -17249,14 +17338,14 @@ var fixedGetDOMCellFromTarget = (node) => {
17249
17338
  return null;
17250
17339
  };
17251
17340
  function TableCellResizer({ editor, positioningAnchorEl }) {
17252
- const targetRef = useRef17(null);
17253
- const resizerRef = useRef17(null);
17254
- const tableRectRef = useRef17(null);
17255
- const mouseStartPosRef = useRef17(null);
17256
- const [mouseCurrentPos, updateMouseCurrentPos] = useState28(null);
17257
- const [activeCell, updateActiveCell] = useState28(null);
17258
- const [isMouseDown, updateIsMouseDown] = useState28(false);
17259
- const [draggingDirection, updateDraggingDirection] = useState28(null);
17341
+ const targetRef = useRef18(null);
17342
+ const resizerRef = useRef18(null);
17343
+ const tableRectRef = useRef18(null);
17344
+ const mouseStartPosRef = useRef18(null);
17345
+ const [mouseCurrentPos, updateMouseCurrentPos] = useState29(null);
17346
+ const [activeCell, updateActiveCell] = useState29(null);
17347
+ const [isMouseDown, updateIsMouseDown] = useState29(false);
17348
+ const [draggingDirection, updateDraggingDirection] = useState29(null);
17260
17349
  const resetState = useCallback15(() => {
17261
17350
  updateActiveCell(null);
17262
17351
  targetRef.current = null;
@@ -17267,7 +17356,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
17267
17356
  const isMouseDownOnEvent = (event) => {
17268
17357
  return (event.buttons & 1) === 1;
17269
17358
  };
17270
- useEffect25(() => {
17359
+ useEffect26(() => {
17271
17360
  const onMouseMove = (event) => {
17272
17361
  setTimeout(() => {
17273
17362
  const target = event.target;
@@ -17566,11 +17655,11 @@ import {
17566
17655
  COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
17567
17656
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
17568
17657
  } from "lexical";
17569
- import { useEffect as useEffect26, useState as useState29 } from "react";
17658
+ import { useEffect as useEffect27, useState as useState30 } from "react";
17570
17659
  var TableSelectionPlugin = () => {
17571
17660
  const [editor] = useLexicalComposerContext7();
17572
- const [closestTableCellNode, setClosestTableCellNode] = useState29(null);
17573
- useEffect26(() => {
17661
+ const [closestTableCellNode, setClosestTableCellNode] = useState30(null);
17662
+ useEffect27(() => {
17574
17663
  return editor.registerCommand(
17575
17664
  SELECTION_CHANGE_COMMAND2,
17576
17665
  () => {
@@ -17592,7 +17681,7 @@ var TableSelectionPlugin = () => {
17592
17681
  COMMAND_PRIORITY_NORMAL2
17593
17682
  );
17594
17683
  }, [editor]);
17595
- useEffect26(() => {
17684
+ useEffect27(() => {
17596
17685
  const onControlA = (event) => {
17597
17686
  if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
17598
17687
  if (!closestTableCellNode) {
@@ -17639,7 +17728,7 @@ import {
17639
17728
  FORMAT_TEXT_COMMAND,
17640
17729
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
17641
17730
  } from "lexical";
17642
- import { useCallback as useCallback16, useEffect as useEffect27 } from "react";
17731
+ import { useCallback as useCallback16, useEffect as useEffect28 } from "react";
17643
17732
 
17644
17733
  // src/components/ParameterInputs/rich-text/toolbar/constants.ts
17645
17734
  var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
@@ -17655,7 +17744,7 @@ var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
17655
17744
  var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
17656
17745
 
17657
17746
  // src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
17658
- import { useMemo as useMemo11, useState as useState30 } from "react";
17747
+ import { useMemo as useMemo11, useState as useState31 } from "react";
17659
17748
  var useRichTextToolbarState = ({ config }) => {
17660
17749
  var _a;
17661
17750
  const enabledBuiltInFormats = useMemo11(() => {
@@ -17676,7 +17765,7 @@ var useRichTextToolbarState = ({ config }) => {
17676
17765
  const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
17677
17766
  (format) => !FORMATS_WITH_ICON.has(format.type)
17678
17767
  );
17679
- const [activeFormats, setActiveFormats] = useState30([]);
17768
+ const [activeFormats, setActiveFormats] = useState31([]);
17680
17769
  const visibleFormatsWithIcon = useMemo11(() => {
17681
17770
  const visibleFormats = /* @__PURE__ */ new Set();
17682
17771
  activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
@@ -17697,7 +17786,7 @@ var useRichTextToolbarState = ({ config }) => {
17697
17786
  });
17698
17787
  return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
17699
17788
  }, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
17700
- const [activeElement, setActiveElement] = useState30("paragraph");
17789
+ const [activeElement, setActiveElement] = useState31("paragraph");
17701
17790
  const enabledTextualElements = enabledBuiltInElements.filter(
17702
17791
  (element) => TEXTUAL_ELEMENTS.includes(element.type)
17703
17792
  );
@@ -17712,7 +17801,7 @@ var useRichTextToolbarState = ({ config }) => {
17712
17801
  }
17713
17802
  );
17714
17803
  }, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
17715
- const [isLink, setIsLink] = useState30(false);
17804
+ const [isLink, setIsLink] = useState31(false);
17716
17805
  const linkElementVisible = useMemo11(() => {
17717
17806
  return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
17718
17807
  }, [isLink, enabledBuiltInElements]);
@@ -17940,7 +18029,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17940
18029
  setIsLink(false);
17941
18030
  }
17942
18031
  }, [editor, setActiveElement, setActiveFormats, setIsLink]);
17943
- useEffect27(() => {
18032
+ useEffect28(() => {
17944
18033
  return editor.registerCommand(
17945
18034
  SELECTION_CHANGE_COMMAND3,
17946
18035
  (_payload) => {
@@ -17950,7 +18039,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17950
18039
  COMMAND_PRIORITY_CRITICAL2
17951
18040
  );
17952
18041
  }, [editor, updateToolbar]);
17953
- useEffect27(() => {
18042
+ useEffect28(() => {
17954
18043
  return editor.registerUpdateListener(({ editorState }) => {
17955
18044
  requestAnimationFrame(() => {
17956
18045
  editorState.read(() => {
@@ -18351,12 +18440,12 @@ var RichText = ({
18351
18440
  placeholder
18352
18441
  }) => {
18353
18442
  const [editor] = useLexicalComposerContext9();
18354
- useEffect28(() => {
18443
+ useEffect29(() => {
18355
18444
  if (onRichTextInit) {
18356
18445
  onRichTextInit(editor);
18357
18446
  }
18358
18447
  }, [editor, onRichTextInit]);
18359
- useEffect28(() => {
18448
+ useEffect29(() => {
18360
18449
  const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
18361
18450
  requestAnimationFrame(() => {
18362
18451
  const previousEditorState = prevEditorState.toJSON();
@@ -18373,16 +18462,16 @@ var RichText = ({
18373
18462
  removeUpdateListener();
18374
18463
  };
18375
18464
  }, [editor, onChange]);
18376
- useEffect28(() => {
18465
+ useEffect29(() => {
18377
18466
  editor.setEditable(!readOnly);
18378
18467
  }, [editor, readOnly]);
18379
- const [editorContainerRef, setEditorContainerRef] = useState31(null);
18468
+ const [editorContainerRef, setEditorContainerRef] = useState32(null);
18380
18469
  const onEditorContainerRef = (_editorContainerRef) => {
18381
18470
  if (_editorContainerRef !== null) {
18382
18471
  setEditorContainerRef(_editorContainerRef);
18383
18472
  }
18384
18473
  };
18385
- const [portalContainerRef, setPortalContainerRef] = useState31(null);
18474
+ const [portalContainerRef, setPortalContainerRef] = useState32(null);
18386
18475
  const onPortalContainerRef = (_portalContainerRef) => {
18387
18476
  if (_portalContainerRef !== null) {
18388
18477
  setPortalContainerRef(_portalContainerRef);
@@ -18790,7 +18879,7 @@ var ProgressListItem = ({
18790
18879
 
18791
18880
  // src/components/SegmentedControl/SegmentedControl.tsx
18792
18881
  import { css as css112 } from "@emotion/react";
18793
- import { useCallback as useCallback18, useEffect as useEffect29, useMemo as useMemo14, useRef as useRef18, useState as useState32 } from "react";
18882
+ import { useCallback as useCallback18, useEffect as useEffect30, useMemo as useMemo14, useRef as useRef19, useState as useState33 } from "react";
18794
18883
 
18795
18884
  // src/components/SegmentedControl/SegmentedControl.styles.ts
18796
18885
  import { css as css111 } from "@emotion/react";
@@ -18969,9 +19058,9 @@ var SegmentedControl = ({
18969
19058
  // deprecated, destructured to prevent spreading to DOM
18970
19059
  ...props
18971
19060
  }) => {
18972
- const wrapperRef = useRef18(null);
18973
- const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState32(false);
18974
- const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState32(false);
19061
+ const wrapperRef = useRef19(null);
19062
+ const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState33(false);
19063
+ const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState33(false);
18975
19064
  const onOptionChange = useCallback18(
18976
19065
  (event) => {
18977
19066
  if (event.target.checked) {
@@ -18992,7 +19081,7 @@ var SegmentedControl = ({
18992
19081
  const isIconOnly = useMemo14(() => {
18993
19082
  return options.every((option) => option && option.icon && !option.label);
18994
19083
  }, [options]);
18995
- useEffect29(() => {
19084
+ useEffect30(() => {
18996
19085
  const wrapperElement = wrapperRef.current;
18997
19086
  const onScroll = () => {
18998
19087
  if (!wrapperElement) {
@@ -19122,7 +19211,7 @@ var Skeleton = ({
19122
19211
  );
19123
19212
 
19124
19213
  // src/components/Spinner/Spinner.tsx
19125
- import { useEffect as useEffect30, useRef as useRef19 } from "react";
19214
+ import { useEffect as useEffect31, useRef as useRef20 } from "react";
19126
19215
 
19127
19216
  // src/components/Spinner/Spinner.styles.ts
19128
19217
  import { css as css114 } from "@emotion/react";
@@ -19562,8 +19651,8 @@ var Spinner = ({
19562
19651
  label: label2,
19563
19652
  isPaused
19564
19653
  }) => {
19565
- const ref = useRef19(null);
19566
- useEffect30(() => {
19654
+ const ref = useRef20(null);
19655
+ useEffect31(() => {
19567
19656
  var _a, _b, _c;
19568
19657
  (_c = ref.current) == null ? void 0 : _c.style.setProperty("--pyramid-size", ((_b = (_a = ref.current) == null ? void 0 : _a.clientWidth) != null ? _b : 200) / 6 + "px");
19569
19658
  }, [width]);
@@ -19631,7 +19720,7 @@ var Spinner = ({
19631
19720
  };
19632
19721
 
19633
19722
  // src/components/StackedModal/hooks/StackedModalProvider.tsx
19634
- import { createContext as createContext9, useCallback as useCallback19, useContext as useContext9, useMemo as useMemo15, useRef as useRef20, useState as useState33 } from "react";
19723
+ import { createContext as createContext9, useCallback as useCallback19, useContext as useContext9, useMemo as useMemo15, useRef as useRef21, useState as useState34 } from "react";
19635
19724
  import { jsx as jsx154 } from "@emotion/react/jsx-runtime";
19636
19725
  var StackedModalContext = createContext9(null);
19637
19726
  function useStackedModal() {
@@ -19651,9 +19740,9 @@ function useStepTransition(index) {
19651
19740
  };
19652
19741
  }
19653
19742
  function StackedModalProvider({ children, totalSteps, initialStep }) {
19654
- const [currentStep, setCurrentStep] = useState33(initialStep);
19655
- const [direction, setDirection] = useState33("forward");
19656
- const previousStepRef = useRef20(initialStep);
19743
+ const [currentStep, setCurrentStep] = useState34(initialStep);
19744
+ const [direction, setDirection] = useState34("forward");
19745
+ const previousStepRef = useRef21(initialStep);
19657
19746
  const nextStep = useCallback19(() => {
19658
19747
  setCurrentStep((prev) => {
19659
19748
  if (prev >= totalSteps - 1) {
@@ -19703,7 +19792,7 @@ function StackedModalProvider({ children, totalSteps, initialStep }) {
19703
19792
  }
19704
19793
 
19705
19794
  // src/components/StackedModal/StackedModal.tsx
19706
- import React24 from "react";
19795
+ import React25 from "react";
19707
19796
 
19708
19797
  // src/components/StackedModal/styles/StackedModal.styles.ts
19709
19798
  import { css as css115, keyframes as keyframes7 } from "@emotion/react";
@@ -19871,18 +19960,18 @@ function StackedModalStep({ children, buttonGroup }) {
19871
19960
  // src/components/StackedModal/StackedModal.tsx
19872
19961
  import { jsx as jsx157 } from "@emotion/react/jsx-runtime";
19873
19962
  function filterSteps(children) {
19874
- return React24.Children.toArray(children).filter(
19875
- (child) => React24.isValidElement(child) && child.type === StackedModalStep
19963
+ return React25.Children.toArray(children).filter(
19964
+ (child) => React25.isValidElement(child) && child.type === StackedModalStep
19876
19965
  );
19877
19966
  }
19878
- var StackedModal = React24.forwardRef(
19967
+ var StackedModal = React25.forwardRef(
19879
19968
  ({ children, initialStep = 0, ...rest }, ref) => {
19880
19969
  const steps = filterSteps(children);
19881
19970
  return /* @__PURE__ */ jsx157(StackedModalProvider, { totalSteps: steps.length, initialStep, children: /* @__PURE__ */ jsx157(StackedModalInner, { ref, steps, ...rest }) });
19882
19971
  }
19883
19972
  );
19884
19973
  StackedModal.displayName = "StackedModal";
19885
- var StackedModalInner = React24.forwardRef(
19974
+ var StackedModalInner = React25.forwardRef(
19886
19975
  ({ steps, onRequestClose, modalSize = "lg", width, height }, ref) => {
19887
19976
  return /* @__PURE__ */ jsx157("div", { css: stackedModalRootStyles, children: /* @__PURE__ */ jsx157(
19888
19977
  Modal,
@@ -20175,39 +20264,39 @@ var ResponsiveTableContainer = ({ children }) => {
20175
20264
  };
20176
20265
 
20177
20266
  // src/components/Table/Table.tsx
20178
- import * as React25 from "react";
20267
+ import * as React26 from "react";
20179
20268
  import { jsx as jsx160 } from "@emotion/react/jsx-runtime";
20180
- var Table = React25.forwardRef(
20269
+ var Table = React26.forwardRef(
20181
20270
  ({ children, cellPadding, ...otherProps }, ref) => {
20182
20271
  return /* @__PURE__ */ jsx160("table", { ref, css: table({ cellPadding }), ...otherProps, children });
20183
20272
  }
20184
20273
  );
20185
- var TableHead = React25.forwardRef(
20274
+ var TableHead = React26.forwardRef(
20186
20275
  ({ children, ...otherProps }, ref) => {
20187
20276
  return /* @__PURE__ */ jsx160("thead", { ref, css: tableHead, ...otherProps, children });
20188
20277
  }
20189
20278
  );
20190
- var TableBody = React25.forwardRef(
20279
+ var TableBody = React26.forwardRef(
20191
20280
  ({ children, ...otherProps }, ref) => {
20192
20281
  return /* @__PURE__ */ jsx160("tbody", { ref, ...otherProps, children });
20193
20282
  }
20194
20283
  );
20195
- var TableFoot = React25.forwardRef(
20284
+ var TableFoot = React26.forwardRef(
20196
20285
  ({ children, ...otherProps }, ref) => {
20197
20286
  return /* @__PURE__ */ jsx160("tfoot", { ref, ...otherProps, children });
20198
20287
  }
20199
20288
  );
20200
- var TableRow = React25.forwardRef(
20289
+ var TableRow = React26.forwardRef(
20201
20290
  ({ children, ...otherProps }, ref) => {
20202
20291
  return /* @__PURE__ */ jsx160("tr", { ref, css: tableRow, ...otherProps, children });
20203
20292
  }
20204
20293
  );
20205
- var TableCellHead = React25.forwardRef(
20294
+ var TableCellHead = React26.forwardRef(
20206
20295
  ({ children, ...otherProps }, ref) => {
20207
20296
  return /* @__PURE__ */ jsx160("th", { ref, css: tableCellHead, ...otherProps, children });
20208
20297
  }
20209
20298
  );
20210
- var TableCellData = React25.forwardRef(
20299
+ var TableCellData = React26.forwardRef(
20211
20300
  ({ children, ...otherProps }, ref) => {
20212
20301
  return /* @__PURE__ */ jsx160("td", { ref, ...otherProps, children });
20213
20302
  }
@@ -20215,7 +20304,7 @@ var TableCellData = React25.forwardRef(
20215
20304
 
20216
20305
  // src/components/Tabs/Tabs.tsx
20217
20306
  import { Tabs as BaseUITabs } from "@base-ui/react/tabs";
20218
- import { createContext as createContext10, useCallback as useCallback20, useContext as useContext10, useEffect as useEffect31, useMemo as useMemo17, useRef as useRef21, useState as useState34 } from "react";
20307
+ import { createContext as createContext10, useCallback as useCallback20, useContext as useContext10, useEffect as useEffect32, useMemo as useMemo17, useRef as useRef22, useState as useState35 } from "react";
20219
20308
 
20220
20309
  // src/components/Tabs/Tabs.styles.ts
20221
20310
  import { css as css118 } from "@emotion/react";
@@ -20269,8 +20358,8 @@ var Tabs = ({
20269
20358
  return useHashForState && typeof window !== "undefined" && window.location.hash ? window.location.hash.substring(1) : void 0;
20270
20359
  }, [selectedId, useHashForState]);
20271
20360
  const isControlled = selected !== void 0;
20272
- const [uncontrolledValue, setUncontrolledValue] = useState34(void 0);
20273
- const firstTabRegistered = useRef21(false);
20361
+ const [uncontrolledValue, setUncontrolledValue] = useState35(void 0);
20362
+ const firstTabRegistered = useRef22(false);
20274
20363
  const registerTab = useCallback20(
20275
20364
  (value) => {
20276
20365
  if (!firstTabRegistered.current) {
@@ -20326,7 +20415,7 @@ var TabButton = ({
20326
20415
  ...props
20327
20416
  }) => {
20328
20417
  const registration = useContext10(TabRegistrationContext);
20329
- useEffect31(() => {
20418
+ useEffect32(() => {
20330
20419
  registration == null ? void 0 : registration.registerTab(id);
20331
20420
  }, []);
20332
20421
  return /* @__PURE__ */ jsx161(BaseUITabs.Tab, { type: "button", value: id, "data-tab-id": id, ...props, css: tabButtonStyles, children });