@uniformdev/design-system 20.49.4-alpha.102 → 20.49.4-alpha.124

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
@@ -10631,12 +10631,13 @@ var KeyValueInputItem = ({
10631
10631
  // src/components/LabelsQuickFilter/LabelsQuickFilter.tsx
10632
10632
  import { TbChevronRight as TbChevronRight2 } from "@react-icons/all-files/tb/TbChevronRight";
10633
10633
  import { TbTags } from "@react-icons/all-files/tb/TbTags";
10634
- import { useCallback as useCallback8, useEffect as useEffect14, useMemo as useMemo6, useRef as useRef9, useState as useState14 } from "react";
10634
+ import { useCallback as useCallback8, useEffect as useEffect15, useMemo as useMemo6, useRef as useRef10, useState as useState15 } from "react";
10635
10635
 
10636
10636
  // src/components/QuickFilter/QuickFilter.tsx
10637
10637
  import { CgMathPlus as CgMathPlus2 } from "@react-icons/all-files/cg/CgMathPlus";
10638
10638
  import { CgTag } from "@react-icons/all-files/cg/CgTag";
10639
10639
  import { TbWashDryclean } from "@react-icons/all-files/tb/TbWashDryclean";
10640
+ import { useEffect as useEffect14, useRef as useRef9, useState as useState14 } from "react";
10640
10641
 
10641
10642
  // src/components/Swatch/Swatch.styles.ts
10642
10643
  import { css as css74 } from "@emotion/react";
@@ -11038,12 +11039,50 @@ var QuickFilter = ({
11038
11039
  resultsComponent,
11039
11040
  hasNoResultsMessage = "",
11040
11041
  searchPlaceholderText = "Search...",
11041
- maxContainerSize = "4rem"
11042
+ maxContainerSize = "4rem",
11043
+ onOpen,
11044
+ onClose,
11045
+ menuPlacement = "bottom-end",
11046
+ menuGetAnchorRect,
11047
+ menuUpdatePosition
11042
11048
  }) => {
11043
11049
  const hasSelectedItems = selectedItems && (selectedItems == null ? void 0 : selectedItems.length) > 0;
11050
+ const containerRef = useRef9(null);
11051
+ const hasPositionedRef = useRef9(false);
11052
+ const [open, setOpen] = useState14(false);
11053
+ useEffect14(() => {
11054
+ if (open) {
11055
+ onOpen == null ? void 0 : onOpen();
11056
+ } else {
11057
+ onClose == null ? void 0 : onClose();
11058
+ }
11059
+ }, [open, onOpen, onClose]);
11060
+ const defaultGetAnchorRect = () => {
11061
+ var _a;
11062
+ const rect = (_a = containerRef.current) == null ? void 0 : _a.getBoundingClientRect();
11063
+ if (!rect) {
11064
+ return null;
11065
+ }
11066
+ return {
11067
+ x: rect.right,
11068
+ y: rect.top - rect.height,
11069
+ width: 0,
11070
+ height: rect.height
11071
+ };
11072
+ };
11073
+ const defaultUpdatePosition = ({ updatePosition }) => {
11074
+ if (!hasPositionedRef.current) {
11075
+ hasPositionedRef.current = true;
11076
+ updatePosition();
11077
+ }
11078
+ };
11079
+ const resolvedGetAnchorRect = menuGetAnchorRect === null ? void 0 : menuGetAnchorRect != null ? menuGetAnchorRect : defaultGetAnchorRect;
11080
+ const resolvedUpdatePosition = menuUpdatePosition === null ? void 0 : menuUpdatePosition != null ? menuUpdatePosition : defaultUpdatePosition;
11081
+ const useDefaultUpdatePosition = menuUpdatePosition === void 0;
11044
11082
  return /* @__PURE__ */ jsxs64(
11045
11083
  HorizontalRhythm,
11046
11084
  {
11085
+ ref: containerRef,
11047
11086
  gap: "sm",
11048
11087
  align: "center",
11049
11088
  css: [
@@ -11063,6 +11102,16 @@ var QuickFilter = ({
11063
11102
  searchPlaceholder: searchPlaceholderText,
11064
11103
  disableSearch: totalResults < maxCount,
11065
11104
  disabled: disabled2,
11105
+ placement: menuPlacement,
11106
+ getAnchorRect: resolvedGetAnchorRect,
11107
+ updatePosition: resolvedUpdatePosition,
11108
+ onClose: () => {
11109
+ if (useDefaultUpdatePosition) {
11110
+ hasPositionedRef.current = false;
11111
+ }
11112
+ setOpen(false);
11113
+ },
11114
+ open,
11066
11115
  menuTrigger: /* @__PURE__ */ jsxs64(
11067
11116
  "div",
11068
11117
  {
@@ -11090,7 +11139,7 @@ var QuickFilter = ({
11090
11139
  }
11091
11140
  ) : null
11092
11141
  ] }),
11093
- /* @__PURE__ */ jsx98("div", { css: QuickFilterFullMenu(maxContainerSize), children: selectedItems && selectedItems.length > 0 ? /* @__PURE__ */ jsxs64(
11142
+ /* @__PURE__ */ jsx98("div", { css: QuickFilterFullMenu(maxContainerSize), children: selectedItems && selectedItems.length > 0 ? addButtonText !== null ? /* @__PURE__ */ jsxs64(
11094
11143
  Button,
11095
11144
  {
11096
11145
  type: "button",
@@ -11101,12 +11150,15 @@ var QuickFilter = ({
11101
11150
  buttonType: "tertiary",
11102
11151
  variant: "soft",
11103
11152
  css: QuickFilterTruncatedButton,
11153
+ onClick: () => {
11154
+ setOpen(true);
11155
+ },
11104
11156
  children: [
11105
11157
  /* @__PURE__ */ jsx98("span", { children: addButtonText }),
11106
11158
  /* @__PURE__ */ jsx98(Icon, { icon: CgMathPlus2, iconColor: "currentColor", size: "1rem" })
11107
11159
  ]
11108
11160
  }
11109
- ) : /* @__PURE__ */ jsxs64(
11161
+ ) : null : /* @__PURE__ */ jsxs64(
11110
11162
  Button,
11111
11163
  {
11112
11164
  type: "button",
@@ -11117,6 +11169,9 @@ var QuickFilter = ({
11117
11169
  buttonType: "tertiary",
11118
11170
  variant: "soft",
11119
11171
  css: QuickFilterTruncatedButton,
11172
+ onClick: () => {
11173
+ setOpen(true);
11174
+ },
11120
11175
  children: [
11121
11176
  iconLeft ? /* @__PURE__ */ jsx98(Icon, { icon: iconLeft, iconColor: "currentColor", size: "1rem" }) : null,
11122
11177
  /* @__PURE__ */ jsx98("span", { children: buttonText })
@@ -11155,6 +11210,7 @@ var QuickFilter = ({
11155
11210
  import { Fragment as Fragment10, jsx as jsx99, jsxs as jsxs65 } from "@emotion/react/jsx-runtime";
11156
11211
  var LabelsQuickFilter = ({
11157
11212
  buttonText,
11213
+ addButtonText,
11158
11214
  items,
11159
11215
  selectedIds,
11160
11216
  onSelect,
@@ -11164,9 +11220,15 @@ var LabelsQuickFilter = ({
11164
11220
  totalResults,
11165
11221
  onCreateLabel,
11166
11222
  withoutPortal = false,
11167
- maxContainerSize = "4rem"
11223
+ maxContainerSize = "4rem",
11224
+ onOpen,
11225
+ onClose,
11226
+ menuPlacement,
11227
+ menuGetAnchorRect,
11228
+ menuUpdatePosition,
11229
+ maxCount = 0
11168
11230
  }) => {
11169
- const [searchTerm, setSearchTerm] = useState14("");
11231
+ const [searchTerm, setSearchTerm] = useState15("");
11170
11232
  const selectedIdsSet = useMemo6(
11171
11233
  () => selectedIds instanceof Set ? selectedIds : new Set(selectedIds),
11172
11234
  [selectedIds]
@@ -11312,7 +11374,7 @@ var LabelsQuickFilter = ({
11312
11374
  isCreateSelected: isCreateSelected2
11313
11375
  };
11314
11376
  }, [filteredItems, searchTerm, selectedIdsSet]);
11315
- const createLabelStateRef = useRef9({ searchTerm, canCreateLabel, isCreateDisabled, onCreateLabel });
11377
+ const createLabelStateRef = useRef10({ searchTerm, canCreateLabel, isCreateDisabled, onCreateLabel });
11316
11378
  createLabelStateRef.current = { searchTerm, canCreateLabel, isCreateDisabled, onCreateLabel };
11317
11379
  const handleEnterKey = useCallback8((e) => {
11318
11380
  const { searchTerm: searchTerm2, canCreateLabel: canCreateLabel2, isCreateDisabled: isCreateDisabled2, onCreateLabel: onCreateLabel2 } = createLabelStateRef.current;
@@ -11320,7 +11382,7 @@ var LabelsQuickFilter = ({
11320
11382
  onCreateLabel2(searchTerm2);
11321
11383
  }
11322
11384
  }, []);
11323
- useEffect14(() => {
11385
+ useEffect15(() => {
11324
11386
  if (!onCreateLabel) {
11325
11387
  return;
11326
11388
  }
@@ -11335,12 +11397,19 @@ var LabelsQuickFilter = ({
11335
11397
  testId,
11336
11398
  selectedItems,
11337
11399
  buttonText,
11400
+ addButtonText,
11338
11401
  onSearchTermChanged: setSearchTerm,
11339
11402
  hasNoResultsMessage: filteredItems.length === 0 ? "No matching results" : "",
11340
11403
  totalResults: computedTotalResults,
11341
11404
  onItemRemoved: onDeselect,
11342
11405
  disabled: disabled2,
11343
11406
  maxContainerSize,
11407
+ onOpen,
11408
+ onClose,
11409
+ menuPlacement,
11410
+ menuGetAnchorRect,
11411
+ menuUpdatePosition,
11412
+ maxCount,
11344
11413
  children: [
11345
11414
  filteredItems.map((item) => {
11346
11415
  if (!item.isGroup && item.parent) {
@@ -11384,7 +11453,7 @@ import {
11384
11453
  usePopoverContext,
11385
11454
  usePopoverStore as usePopoverStore2
11386
11455
  } from "@ariakit/react";
11387
- import { useEffect as useEffect15 } from "react";
11456
+ import { useEffect as useEffect16 } from "react";
11388
11457
 
11389
11458
  // src/components/Popover/PopoverBody.tsx
11390
11459
  import { jsx as jsx100 } from "@emotion/react/jsx-runtime";
@@ -11428,7 +11497,7 @@ var Popover3 = ({
11428
11497
  ...otherProps
11429
11498
  }) => {
11430
11499
  const popover2 = usePopoverStore2({ placement });
11431
- useEffect15(() => {
11500
+ useEffect16(() => {
11432
11501
  onInit == null ? void 0 : onInit({ store: popover2 });
11433
11502
  }, [popover2]);
11434
11503
  return /* @__PURE__ */ jsxs66(PopoverProvider2, { store: popover2, children: [
@@ -11819,7 +11888,7 @@ var LoadingIndicator = ({ size = "lg", color = "gray", ...props }) => {
11819
11888
  // src/components/Modal/Modal.tsx
11820
11889
  import { PortalContext } from "@ariakit/react";
11821
11890
  import { CgClose as CgClose5 } from "@react-icons/all-files/cg/CgClose";
11822
- import React16, { useEffect as useEffect16, useRef as useRef10 } from "react";
11891
+ import React16, { useEffect as useEffect17, useRef as useRef11 } from "react";
11823
11892
 
11824
11893
  // src/components/Modal/Modal.styles.ts
11825
11894
  import { css as css83 } from "@emotion/react";
@@ -11923,8 +11992,8 @@ var Modal = React16.forwardRef(
11923
11992
  disableBodyScroll = false,
11924
11993
  ...modalProps
11925
11994
  }, ref) => {
11926
- const mouseDownInsideModal = useRef10(false);
11927
- const dialogRef = useRef10(null);
11995
+ const mouseDownInsideModal = useRef11(false);
11996
+ const dialogRef = useRef11(null);
11928
11997
  const size = {
11929
11998
  sm: modalSizeSmall,
11930
11999
  md: modalSizeMedium,
@@ -11936,7 +12005,7 @@ var Modal = React16.forwardRef(
11936
12005
  },
11937
12006
  shortcut: "escape"
11938
12007
  });
11939
- useEffect16(() => {
12008
+ useEffect17(() => {
11940
12009
  var _a;
11941
12010
  if (!document.contains(dialogRef.current)) {
11942
12011
  console.warn(
@@ -12372,7 +12441,7 @@ var ObjectGridItemCoverButton = ({
12372
12441
  };
12373
12442
 
12374
12443
  // src/components/Objects/ObjectGridItemHeading.tsx
12375
- import { useEffect as useEffect17, useRef as useRef11, useState as useState15 } from "react";
12444
+ import { useEffect as useEffect18, useRef as useRef12, useState as useState16 } from "react";
12376
12445
 
12377
12446
  // src/components/Objects/styles/ObjectGridItemHeading.styles.ts
12378
12447
  import { css as css87 } from "@emotion/react";
@@ -12398,12 +12467,12 @@ var ObjectGridItemHeading2 = ({
12398
12467
  tooltip,
12399
12468
  ...props
12400
12469
  }) => {
12401
- const [hasTruncation, setHasTruncation] = useState15(false);
12402
- const headingRef = useRef11(null);
12470
+ const [hasTruncation, setHasTruncation] = useState16(false);
12471
+ const headingRef = useRef12(null);
12403
12472
  const onStopPropagation = (e) => {
12404
12473
  e.stopPropagation();
12405
12474
  };
12406
- useEffect17(() => {
12475
+ useEffect18(() => {
12407
12476
  const currentHeading = headingRef.current;
12408
12477
  const observer = new ResizeObserver((entries) => {
12409
12478
  for (const entry of entries) {
@@ -13098,7 +13167,7 @@ var ParameterGroup = forwardRef21(
13098
13167
  import { forwardRef as forwardRef23, useDeferredValue } from "react";
13099
13168
 
13100
13169
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13101
- import { useState as useState16 } from "react";
13170
+ import { useState as useState17 } from "react";
13102
13171
  import { createPortal as createPortal2 } from "react-dom";
13103
13172
 
13104
13173
  // src/components/ParameterInputs/styles/ParameterImage.styles.ts
@@ -13141,7 +13210,7 @@ var previewModalImage = css96`
13141
13210
  // src/components/ParameterInputs/ParameterImagePreview.tsx
13142
13211
  import { Fragment as Fragment13, jsx as jsx126, jsxs as jsxs85 } from "@emotion/react/jsx-runtime";
13143
13212
  function ParameterImagePreview({ imageSrc }) {
13144
- const [showModal, setShowModal] = useState16(false);
13213
+ const [showModal, setShowModal] = useState17(false);
13145
13214
  return imageSrc ? /* @__PURE__ */ jsxs85("div", { css: previewWrapper, children: [
13146
13215
  /* @__PURE__ */ jsx126(PreviewImageModal, { open: showModal, imageSrc, onRequestClose: () => setShowModal(false) }),
13147
13216
  /* @__PURE__ */ jsx126(
@@ -13173,7 +13242,7 @@ var PreviewImageModal = ({ open, onRequestClose, imageSrc }) => {
13173
13242
 
13174
13243
  // src/components/ParameterInputs/ParameterShell.tsx
13175
13244
  import { css as css99 } from "@emotion/react";
13176
- import { useState as useState17 } from "react";
13245
+ import { useState as useState18 } from "react";
13177
13246
 
13178
13247
  // src/components/ParameterInputs/styles/ParameterInput.styles.ts
13179
13248
  import { css as css97 } from "@emotion/react";
@@ -13621,7 +13690,7 @@ var ParameterShell = ({
13621
13690
  menuWithoutPortal,
13622
13691
  ...props
13623
13692
  }) => {
13624
- const [manualErrorMessage, setManualErrorMessage] = useState17(void 0);
13693
+ const [manualErrorMessage, setManualErrorMessage] = useState18(void 0);
13625
13694
  const setErrorMessage = (message) => setManualErrorMessage(message);
13626
13695
  const errorMessaging = errorMessage || manualErrorMessage;
13627
13696
  return /* @__PURE__ */ jsxs86("div", { css: inputContainer2, ...props, id, children: [
@@ -13758,7 +13827,7 @@ var ParameterInputInner = forwardRef24(({ enableMouseWheel = false, ...props },
13758
13827
  });
13759
13828
 
13760
13829
  // src/components/ParameterInputs/ParameterLabels.tsx
13761
- import { useMemo as useMemo7 } from "react";
13830
+ import { useMemo as useMemo7, useRef as useRef13 } from "react";
13762
13831
  import { jsx as jsx132 } from "@emotion/react/jsx-runtime";
13763
13832
  var ParameterLabels = ({ disabled: disabled2 = false, ...props }) => {
13764
13833
  const { shellProps, innerProps } = extractParameterProps(props);
@@ -13820,6 +13889,8 @@ var ParameterLabelsInner = (props) => {
13820
13889
  var _a;
13821
13890
  const { label: label2 } = useParameterShell();
13822
13891
  const { onChange } = props;
13892
+ const containerRef = useRef13(null);
13893
+ const hasPositionedRef = useRef13(false);
13823
13894
  const selectedValues = useMemo7(
13824
13895
  () => {
13825
13896
  var _a2, _b;
@@ -13865,6 +13936,7 @@ var ParameterLabelsInner = (props) => {
13865
13936
  return /* @__PURE__ */ jsx132(
13866
13937
  "div",
13867
13938
  {
13939
+ ref: containerRef,
13868
13940
  style: {
13869
13941
  // set the container size to the width of the parent
13870
13942
  // this prevents the quick filter from triggering the responsive styles
@@ -13875,6 +13947,7 @@ var ParameterLabelsInner = (props) => {
13875
13947
  {
13876
13948
  testId: "parameter-labels-quick-filter",
13877
13949
  buttonText: (_a = props.buttonText) != null ? _a : typeof label2 === "string" ? label2 : "Add labels",
13950
+ addButtonText: props.addButtonText,
13878
13951
  items,
13879
13952
  selectedIds,
13880
13953
  onSelect: handleSelect,
@@ -13882,7 +13955,34 @@ var ParameterLabelsInner = (props) => {
13882
13955
  disabled: props.isDisabled,
13883
13956
  onCreateLabel: props == null ? void 0 : props.onCreateLabel,
13884
13957
  totalResults: items.filter((item) => !item.isGroup).length,
13885
- maxContainerSize: "0rem"
13958
+ maxContainerSize: "0rem",
13959
+ onOpen: props.onOpen,
13960
+ onClose: () => {
13961
+ var _a2;
13962
+ hasPositionedRef.current = false;
13963
+ (_a2 = props.onClose) == null ? void 0 : _a2.call(props);
13964
+ },
13965
+ menuPlacement: "bottom-start",
13966
+ menuGetAnchorRect: () => {
13967
+ var _a2;
13968
+ const rect = (_a2 = containerRef.current) == null ? void 0 : _a2.getBoundingClientRect();
13969
+ if (!rect) {
13970
+ return null;
13971
+ }
13972
+ return {
13973
+ x: rect.left - (rect.width + 24),
13974
+ y: rect.top - rect.height,
13975
+ width: 0,
13976
+ height: rect.height
13977
+ };
13978
+ },
13979
+ menuUpdatePosition: ({ updatePosition }) => {
13980
+ if (!hasPositionedRef.current) {
13981
+ hasPositionedRef.current = true;
13982
+ updatePosition();
13983
+ }
13984
+ },
13985
+ maxCount: props.maxCount
13886
13986
  }
13887
13987
  )
13888
13988
  }
@@ -14105,7 +14205,7 @@ import { forwardRef as forwardRef27 } from "react";
14105
14205
  import { forwardRef as forwardRef26, useCallback as useCallback9, useMemo as useMemo8 } from "react";
14106
14206
 
14107
14207
  // src/components/Slider/SliderLabels.tsx
14108
- import { useEffect as useEffect18, useRef as useRef12, useState as useState18 } from "react";
14208
+ import { useEffect as useEffect19, useRef as useRef14, useState as useState19 } from "react";
14109
14209
 
14110
14210
  // src/components/Slider/styles/Slider.styles.ts
14111
14211
  import { css as css100 } from "@emotion/react";
@@ -14530,9 +14630,9 @@ function calculateLabelVisibility(ticks, currentValue, containerWidth) {
14530
14630
  }));
14531
14631
  }
14532
14632
  function SliderLabels({ ticks, currentValue, containerWidth = 300 }) {
14533
- const containerRef = useRef12(null);
14534
- const [measuredWidth, setMeasuredWidth] = useState18(containerWidth);
14535
- useEffect18(() => {
14633
+ const containerRef = useRef14(null);
14634
+ const [measuredWidth, setMeasuredWidth] = useState19(containerWidth);
14635
+ useEffect19(() => {
14536
14636
  if (containerRef.current) {
14537
14637
  const resizeObserver = new ResizeObserver((entries) => {
14538
14638
  for (const entry of entries) {
@@ -14910,7 +15010,7 @@ var defaultParameterConfiguration = {
14910
15010
  // src/components/ParameterInputs/ParameterRichText.tsx
14911
15011
  import { deepEqual as deepEqual2 } from "fast-equals";
14912
15012
  import { ParagraphNode as ParagraphNode2 } from "lexical";
14913
- import { useEffect as useEffect27, useState as useState24 } from "react";
15013
+ import { useEffect as useEffect28, useState as useState25 } from "react";
14914
15014
 
14915
15015
  // src/components/ParameterInputs/rich-text/CustomCodeNode.ts
14916
15016
  import { CodeNode } from "@lexical/code";
@@ -14931,10 +15031,10 @@ CustomCodeNode.importDOM = function() {
14931
15031
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
14932
15032
  import { mergeRegister } from "@lexical/utils";
14933
15033
  import { ParagraphNode } from "lexical";
14934
- import { useEffect as useEffect19 } from "react";
15034
+ import { useEffect as useEffect20 } from "react";
14935
15035
  function DisableStylesPlugin() {
14936
15036
  const [editor] = useLexicalComposerContext();
14937
- useEffect19(() => {
15037
+ useEffect20(() => {
14938
15038
  return mergeRegister(
14939
15039
  // Disable text alignment on paragraph nodes
14940
15040
  editor.registerNodeTransform(ParagraphNode, (node) => {
@@ -15193,10 +15293,10 @@ var tableHeaderElement = css101`
15193
15293
  import { useLexicalComposerContext as useLexicalComposerContext2 } from "@lexical/react/LexicalComposerContext";
15194
15294
  import { $insertFirst } from "@lexical/utils";
15195
15295
  import { $createParagraphNode, $getRoot, $insertNodes } from "lexical";
15196
- import { useEffect as useEffect20 } from "react";
15296
+ import { useEffect as useEffect21 } from "react";
15197
15297
  var ImprovedAssetSelectionPlugin = () => {
15198
15298
  const [editor] = useLexicalComposerContext2();
15199
- useEffect20(() => {
15299
+ useEffect21(() => {
15200
15300
  editor.getRootElement();
15201
15301
  const onRootClick = (event) => {
15202
15302
  if (event.target !== editor.getRootElement()) {
@@ -15267,7 +15367,7 @@ import {
15267
15367
  FOCUS_COMMAND,
15268
15368
  PASTE_COMMAND
15269
15369
  } from "lexical";
15270
- import { useCallback as useCallback10, useEffect as useEffect21, useRef as useRef13, useState as useState19 } from "react";
15370
+ import { useCallback as useCallback10, useEffect as useEffect22, useRef as useRef15, useState as useState20 } from "react";
15271
15371
 
15272
15372
  // src/components/ParameterInputs/rich-text/utils.ts
15273
15373
  import { $isAtNodeEnd } from "@lexical/selection";
@@ -15640,17 +15740,17 @@ function LinkNodePlugin({
15640
15740
  return path;
15641
15741
  };
15642
15742
  const [editor] = useLexicalComposerContext3();
15643
- const [linkPopoverState, setLinkPopoverState] = useState19();
15644
- const linkPopoverElRef = useRef13(null);
15645
- const [isEditorFocused, setIsEditorFocused] = useState19(false);
15646
- const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState19(false);
15647
- useEffect21(() => {
15743
+ const [linkPopoverState, setLinkPopoverState] = useState20();
15744
+ const linkPopoverElRef = useRef15(null);
15745
+ const [isEditorFocused, setIsEditorFocused] = useState20(false);
15746
+ const [isLinkPopoverFocused, setIsLinkPopoverFocused] = useState20(false);
15747
+ useEffect22(() => {
15648
15748
  if (!isEditorFocused && !isLinkPopoverFocused) {
15649
15749
  setLinkPopoverState(void 0);
15650
15750
  return;
15651
15751
  }
15652
15752
  }, [isEditorFocused, isLinkPopoverFocused]);
15653
- useEffect21(() => {
15753
+ useEffect22(() => {
15654
15754
  if (!editor.hasNodes([LinkNode])) {
15655
15755
  throw new Error("LinkNode not registered on editor");
15656
15756
  }
@@ -15788,7 +15888,7 @@ function LinkNodePlugin({
15788
15888
  }
15789
15889
  });
15790
15890
  }, [editor, positioningAnchorEl]);
15791
- useEffect21(() => {
15891
+ useEffect22(() => {
15792
15892
  return editor.registerUpdateListener(({ editorState }) => {
15793
15893
  requestAnimationFrame(() => {
15794
15894
  editorState.read(() => {
@@ -15892,7 +15992,7 @@ import {
15892
15992
  OUTDENT_CONTENT_COMMAND,
15893
15993
  SELECTION_CHANGE_COMMAND
15894
15994
  } from "lexical";
15895
- import { useEffect as useEffect22, useRef as useRef14 } from "react";
15995
+ import { useEffect as useEffect23, useRef as useRef16 } from "react";
15896
15996
  function isIndentPermitted(maxDepth) {
15897
15997
  const selection = $getSelection2();
15898
15998
  if (!$isRangeSelection2(selection)) {
@@ -15947,8 +16047,8 @@ function $indentOverTab(selection) {
15947
16047
  }
15948
16048
  function ListIndentPlugin({ maxDepth }) {
15949
16049
  const [editor] = useLexicalComposerContext4();
15950
- const isInListItemNode = useRef14(false);
15951
- useEffect22(() => {
16050
+ const isInListItemNode = useRef16(false);
16051
+ useEffect23(() => {
15952
16052
  return editor.registerCommand(
15953
16053
  SELECTION_CHANGE_COMMAND,
15954
16054
  () => {
@@ -15965,7 +16065,7 @@ function ListIndentPlugin({ maxDepth }) {
15965
16065
  COMMAND_PRIORITY_NORMAL
15966
16066
  );
15967
16067
  }, [editor]);
15968
- useEffect22(() => {
16068
+ useEffect23(() => {
15969
16069
  return mergeRegister3(
15970
16070
  editor.registerCommand(
15971
16071
  INDENT_CONTENT_COMMAND,
@@ -16014,7 +16114,7 @@ import {
16014
16114
  TableCellNode
16015
16115
  } from "@lexical/table";
16016
16116
  import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3, $setSelection } from "lexical";
16017
- import { forwardRef as forwardRef28, useCallback as useCallback11, useEffect as useEffect23, useLayoutEffect, useState as useState20 } from "react";
16117
+ import { forwardRef as forwardRef28, useCallback as useCallback11, useEffect as useEffect24, useLayoutEffect, useState as useState21 } from "react";
16018
16118
  import { jsx as jsx140, jsxs as jsxs92 } from "@emotion/react/jsx-runtime";
16019
16119
  function computeSelectionCount(selection) {
16020
16120
  const selectionShape = selection.getShape();
@@ -16029,7 +16129,7 @@ var tableActionMenuTrigger = css103`
16029
16129
  `;
16030
16130
  var TableActionMenuTrigger = forwardRef28((props, ref) => {
16031
16131
  const { tableCellEl, positioningAnchorEl, ...rest } = props;
16032
- const [coordinates, setCoordinates] = useState20({ x: 0, y: 0 });
16132
+ const [coordinates, setCoordinates] = useState21({ x: 0, y: 0 });
16033
16133
  useLayoutEffect(() => {
16034
16134
  const rect = tableCellEl.getBoundingClientRect();
16035
16135
  const parentRect = positioningAnchorEl.getBoundingClientRect();
@@ -16063,16 +16163,16 @@ function TableActionMenu({
16063
16163
  positioningAnchorEl
16064
16164
  }) {
16065
16165
  const [editor] = useLexicalComposerContext5();
16066
- const [tableCellNode, updateTableCellNode] = useState20(_tableCellNode);
16067
- const [selectionCounts, updateSelectionCounts] = useState20({
16166
+ const [tableCellNode, updateTableCellNode] = useState21(_tableCellNode);
16167
+ const [selectionCounts, updateSelectionCounts] = useState21({
16068
16168
  columns: 1,
16069
16169
  rows: 1
16070
16170
  });
16071
- const [menuTriggerKey, setMenuTriggerKey] = useState20(0);
16171
+ const [menuTriggerKey, setMenuTriggerKey] = useState21(0);
16072
16172
  const incrementMenuTriggerKey = () => {
16073
16173
  setMenuTriggerKey((key) => key += 1);
16074
16174
  };
16075
- useEffect23(() => {
16175
+ useEffect24(() => {
16076
16176
  return editor.registerMutationListener(
16077
16177
  TableCellNode,
16078
16178
  (nodeMutations) => {
@@ -16086,7 +16186,7 @@ function TableActionMenu({
16086
16186
  { skipInitialization: true }
16087
16187
  );
16088
16188
  }, [editor, tableCellNode]);
16089
- useEffect23(() => {
16189
+ useEffect24(() => {
16090
16190
  editor.getEditorState().read(() => {
16091
16191
  const selection = $getSelection3();
16092
16192
  if ($isTableSelection(selection)) {
@@ -16261,10 +16361,10 @@ function TableCellActionMenuContainer({
16261
16361
  positioningAnchorEl
16262
16362
  }) {
16263
16363
  const [editor] = useLexicalComposerContext5();
16264
- const [tableCellNode, setTableMenuCellNode] = useState20(null);
16265
- const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState20(null);
16266
- const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState20(null);
16267
- useEffect23(() => {
16364
+ const [tableCellNode, setTableMenuCellNode] = useState21(null);
16365
+ const [tableCellNodeEl, _setTableMenuCellNodeEl] = useState21(null);
16366
+ const [tableCellMenuPortalEl, setTableMenuCellMenuPortalEl] = useState21(null);
16367
+ useEffect24(() => {
16268
16368
  const newPortalEl = document.createElement("div");
16269
16369
  setTableMenuCellMenuPortalEl(newPortalEl);
16270
16370
  menuPortalEl.appendChild(newPortalEl);
@@ -16308,7 +16408,7 @@ function TableCellActionMenuContainer({
16308
16408
  setTableMenuCellNodeElem(null);
16309
16409
  }
16310
16410
  }, [editor, setTableMenuCellNodeElem]);
16311
- useEffect23(() => {
16411
+ useEffect24(() => {
16312
16412
  return editor.registerUpdateListener(() => {
16313
16413
  editor.getEditorState().read(() => {
16314
16414
  $moveMenu();
@@ -16347,7 +16447,7 @@ import {
16347
16447
  } from "@lexical/table";
16348
16448
  import { calculateZoomLevel } from "@lexical/utils";
16349
16449
  import { $getNearestNodeFromDOMNode } from "lexical";
16350
- import { useCallback as useCallback12, useEffect as useEffect24, useMemo as useMemo9, useRef as useRef15, useState as useState21 } from "react";
16450
+ import { useCallback as useCallback12, useEffect as useEffect25, useMemo as useMemo9, useRef as useRef17, useState as useState22 } from "react";
16351
16451
  import { createPortal as createPortal3 } from "react-dom";
16352
16452
  import { Fragment as Fragment17, jsx as jsx141, jsxs as jsxs93 } from "@emotion/react/jsx-runtime";
16353
16453
  var MIN_ROW_HEIGHT = 33;
@@ -16374,14 +16474,14 @@ var fixedGetDOMCellFromTarget = (node) => {
16374
16474
  return null;
16375
16475
  };
16376
16476
  function TableCellResizer({ editor, positioningAnchorEl }) {
16377
- const targetRef = useRef15(null);
16378
- const resizerRef = useRef15(null);
16379
- const tableRectRef = useRef15(null);
16380
- const mouseStartPosRef = useRef15(null);
16381
- const [mouseCurrentPos, updateMouseCurrentPos] = useState21(null);
16382
- const [activeCell, updateActiveCell] = useState21(null);
16383
- const [isMouseDown, updateIsMouseDown] = useState21(false);
16384
- const [draggingDirection, updateDraggingDirection] = useState21(null);
16477
+ const targetRef = useRef17(null);
16478
+ const resizerRef = useRef17(null);
16479
+ const tableRectRef = useRef17(null);
16480
+ const mouseStartPosRef = useRef17(null);
16481
+ const [mouseCurrentPos, updateMouseCurrentPos] = useState22(null);
16482
+ const [activeCell, updateActiveCell] = useState22(null);
16483
+ const [isMouseDown, updateIsMouseDown] = useState22(false);
16484
+ const [draggingDirection, updateDraggingDirection] = useState22(null);
16385
16485
  const resetState = useCallback12(() => {
16386
16486
  updateActiveCell(null);
16387
16487
  targetRef.current = null;
@@ -16392,7 +16492,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
16392
16492
  const isMouseDownOnEvent = (event) => {
16393
16493
  return (event.buttons & 1) === 1;
16394
16494
  };
16395
- useEffect24(() => {
16495
+ useEffect25(() => {
16396
16496
  const onMouseMove = (event) => {
16397
16497
  setTimeout(() => {
16398
16498
  const target = event.target;
@@ -16691,11 +16791,11 @@ import {
16691
16791
  COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
16692
16792
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
16693
16793
  } from "lexical";
16694
- import { useEffect as useEffect25, useState as useState22 } from "react";
16794
+ import { useEffect as useEffect26, useState as useState23 } from "react";
16695
16795
  var TableSelectionPlugin = () => {
16696
16796
  const [editor] = useLexicalComposerContext7();
16697
- const [closestTableCellNode, setClosestTableCellNode] = useState22(null);
16698
- useEffect25(() => {
16797
+ const [closestTableCellNode, setClosestTableCellNode] = useState23(null);
16798
+ useEffect26(() => {
16699
16799
  return editor.registerCommand(
16700
16800
  SELECTION_CHANGE_COMMAND2,
16701
16801
  () => {
@@ -16717,7 +16817,7 @@ var TableSelectionPlugin = () => {
16717
16817
  COMMAND_PRIORITY_NORMAL2
16718
16818
  );
16719
16819
  }, [editor]);
16720
- useEffect25(() => {
16820
+ useEffect26(() => {
16721
16821
  const onControlA = (event) => {
16722
16822
  if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
16723
16823
  if (!closestTableCellNode) {
@@ -16764,7 +16864,7 @@ import {
16764
16864
  FORMAT_TEXT_COMMAND,
16765
16865
  SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND3
16766
16866
  } from "lexical";
16767
- import { useCallback as useCallback13, useEffect as useEffect26 } from "react";
16867
+ import { useCallback as useCallback13, useEffect as useEffect27 } from "react";
16768
16868
 
16769
16869
  // src/components/ParameterInputs/rich-text/toolbar/constants.ts
16770
16870
  var FORMATS_WITH_ICON = /* @__PURE__ */ new Map([
@@ -16780,7 +16880,7 @@ var HEADING_ELEMENTS = ["h1", "h2", "h3", "h4", "h5", "h6"];
16780
16880
  var TEXTUAL_ELEMENTS = HEADING_ELEMENTS;
16781
16881
 
16782
16882
  // src/components/ParameterInputs/rich-text/toolbar/useRichTextToolbarState.ts
16783
- import { useMemo as useMemo10, useState as useState23 } from "react";
16883
+ import { useMemo as useMemo10, useState as useState24 } from "react";
16784
16884
  var useRichTextToolbarState = ({ config }) => {
16785
16885
  var _a;
16786
16886
  const enabledBuiltInFormats = useMemo10(() => {
@@ -16801,7 +16901,7 @@ var useRichTextToolbarState = ({ config }) => {
16801
16901
  const enabledBuiltInFormatsWithoutIcon = enabledBuiltInFormats.filter(
16802
16902
  (format) => !FORMATS_WITH_ICON.has(format.type)
16803
16903
  );
16804
- const [activeFormats, setActiveFormats] = useState23([]);
16904
+ const [activeFormats, setActiveFormats] = useState24([]);
16805
16905
  const visibleFormatsWithIcon = useMemo10(() => {
16806
16906
  const visibleFormats = /* @__PURE__ */ new Set();
16807
16907
  activeFormats.filter((type) => FORMATS_WITH_ICON.has(type)).forEach((type) => {
@@ -16822,7 +16922,7 @@ var useRichTextToolbarState = ({ config }) => {
16822
16922
  });
16823
16923
  return richTextBuiltInFormats.filter((format) => visibleFormats.has(format.type));
16824
16924
  }, [activeFormats, enabledBuiltInFormatsWithoutIcon]);
16825
- const [activeElement, setActiveElement] = useState23("paragraph");
16925
+ const [activeElement, setActiveElement] = useState24("paragraph");
16826
16926
  const enabledTextualElements = enabledBuiltInElements.filter(
16827
16927
  (element) => TEXTUAL_ELEMENTS.includes(element.type)
16828
16928
  );
@@ -16837,7 +16937,7 @@ var useRichTextToolbarState = ({ config }) => {
16837
16937
  }
16838
16938
  );
16839
16939
  }, [activeElement, (_a = config == null ? void 0 : config.elements) == null ? void 0 : _a.builtIn, enabledTextualElements]);
16840
- const [isLink, setIsLink] = useState23(false);
16940
+ const [isLink, setIsLink] = useState24(false);
16841
16941
  const linkElementVisible = useMemo10(() => {
16842
16942
  return enabledBuiltInElements.some((element) => element.type === "link") || isLink;
16843
16943
  }, [isLink, enabledBuiltInElements]);
@@ -17065,7 +17165,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17065
17165
  setIsLink(false);
17066
17166
  }
17067
17167
  }, [editor, setActiveElement, setActiveFormats, setIsLink]);
17068
- useEffect26(() => {
17168
+ useEffect27(() => {
17069
17169
  return editor.registerCommand(
17070
17170
  SELECTION_CHANGE_COMMAND3,
17071
17171
  (_payload) => {
@@ -17075,7 +17175,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
17075
17175
  COMMAND_PRIORITY_CRITICAL2
17076
17176
  );
17077
17177
  }, [editor, updateToolbar]);
17078
- useEffect26(() => {
17178
+ useEffect27(() => {
17079
17179
  return editor.registerUpdateListener(({ editorState }) => {
17080
17180
  requestAnimationFrame(() => {
17081
17181
  editorState.read(() => {
@@ -17476,12 +17576,12 @@ var RichText = ({
17476
17576
  placeholder
17477
17577
  }) => {
17478
17578
  const [editor] = useLexicalComposerContext9();
17479
- useEffect27(() => {
17579
+ useEffect28(() => {
17480
17580
  if (onRichTextInit) {
17481
17581
  onRichTextInit(editor);
17482
17582
  }
17483
17583
  }, [editor, onRichTextInit]);
17484
- useEffect27(() => {
17584
+ useEffect28(() => {
17485
17585
  const removeUpdateListener = editor.registerUpdateListener(({ editorState, prevEditorState, tags }) => {
17486
17586
  requestAnimationFrame(() => {
17487
17587
  const previousEditorState = prevEditorState.toJSON();
@@ -17498,16 +17598,16 @@ var RichText = ({
17498
17598
  removeUpdateListener();
17499
17599
  };
17500
17600
  }, [editor, onChange]);
17501
- useEffect27(() => {
17601
+ useEffect28(() => {
17502
17602
  editor.setEditable(!readOnly);
17503
17603
  }, [editor, readOnly]);
17504
- const [editorContainerRef, setEditorContainerRef] = useState24(null);
17604
+ const [editorContainerRef, setEditorContainerRef] = useState25(null);
17505
17605
  const onEditorContainerRef = (_editorContainerRef) => {
17506
17606
  if (_editorContainerRef !== null) {
17507
17607
  setEditorContainerRef(_editorContainerRef);
17508
17608
  }
17509
17609
  };
17510
- const [portalContainerRef, setPortalContainerRef] = useState24(null);
17610
+ const [portalContainerRef, setPortalContainerRef] = useState25(null);
17511
17611
  const onPortalContainerRef = (_portalContainerRef) => {
17512
17612
  if (_portalContainerRef !== null) {
17513
17613
  setPortalContainerRef(_portalContainerRef);
@@ -17915,7 +18015,7 @@ var ProgressListItem = ({
17915
18015
 
17916
18016
  // src/components/SegmentedControl/SegmentedControl.tsx
17917
18017
  import { css as css111 } from "@emotion/react";
17918
- import { useCallback as useCallback15, useEffect as useEffect28, useMemo as useMemo13, useRef as useRef16, useState as useState25 } from "react";
18018
+ import { useCallback as useCallback15, useEffect as useEffect29, useMemo as useMemo13, useRef as useRef18, useState as useState26 } from "react";
17919
18019
 
17920
18020
  // src/components/SegmentedControl/SegmentedControl.styles.ts
17921
18021
  import { css as css110 } from "@emotion/react";
@@ -18094,9 +18194,9 @@ var SegmentedControl = ({
18094
18194
  // deprecated, destructured to prevent spreading to DOM
18095
18195
  ...props
18096
18196
  }) => {
18097
- const wrapperRef = useRef16(null);
18098
- const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState25(false);
18099
- const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState25(false);
18197
+ const wrapperRef = useRef18(null);
18198
+ const [isOverflowStartShadowVisible, setIsOverflowStartShadowVisible] = useState26(false);
18199
+ const [isOverflowEndShadowVisible, setIsOverflowEndShadowVisible] = useState26(false);
18100
18200
  const onOptionChange = useCallback15(
18101
18201
  (event) => {
18102
18202
  if (event.target.checked) {
@@ -18117,7 +18217,7 @@ var SegmentedControl = ({
18117
18217
  const isIconOnly = useMemo13(() => {
18118
18218
  return options.every((option) => option && option.icon && !option.label);
18119
18219
  }, [options]);
18120
- useEffect28(() => {
18220
+ useEffect29(() => {
18121
18221
  const wrapperElement = wrapperRef.current;
18122
18222
  const onScroll = () => {
18123
18223
  if (!wrapperElement) {
@@ -18247,7 +18347,7 @@ var Skeleton = ({
18247
18347
  );
18248
18348
 
18249
18349
  // src/components/Spinner/Spinner.tsx
18250
- import { useEffect as useEffect29, useRef as useRef17 } from "react";
18350
+ import { useEffect as useEffect30, useRef as useRef19 } from "react";
18251
18351
 
18252
18352
  // src/components/Spinner/Spinner.styles.ts
18253
18353
  import { css as css113 } from "@emotion/react";
@@ -18687,8 +18787,8 @@ var Spinner = ({
18687
18787
  label: label2,
18688
18788
  isPaused
18689
18789
  }) => {
18690
- const ref = useRef17(null);
18691
- useEffect29(() => {
18790
+ const ref = useRef19(null);
18791
+ useEffect30(() => {
18692
18792
  var _a, _b, _c;
18693
18793
  (_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");
18694
18794
  }, [width]);
@@ -18756,7 +18856,7 @@ var Spinner = ({
18756
18856
  };
18757
18857
 
18758
18858
  // src/components/StackedModal/hooks/StackedModalProvider.tsx
18759
- import { createContext as createContext6, useCallback as useCallback16, useContext as useContext6, useMemo as useMemo14, useRef as useRef18, useState as useState26 } from "react";
18859
+ import { createContext as createContext6, useCallback as useCallback16, useContext as useContext6, useMemo as useMemo14, useRef as useRef20, useState as useState27 } from "react";
18760
18860
  import { jsx as jsx153 } from "@emotion/react/jsx-runtime";
18761
18861
  var StackedModalContext = createContext6(null);
18762
18862
  function useStackedModal() {
@@ -18776,9 +18876,9 @@ function useStepTransition(index) {
18776
18876
  };
18777
18877
  }
18778
18878
  function StackedModalProvider({ children, totalSteps, initialStep }) {
18779
- const [currentStep, setCurrentStep] = useState26(initialStep);
18780
- const [direction, setDirection] = useState26("forward");
18781
- const previousStepRef = useRef18(initialStep);
18879
+ const [currentStep, setCurrentStep] = useState27(initialStep);
18880
+ const [direction, setDirection] = useState27("forward");
18881
+ const previousStepRef = useRef20(initialStep);
18782
18882
  const nextStep = useCallback16(() => {
18783
18883
  setCurrentStep((prev) => {
18784
18884
  if (prev >= totalSteps - 1) {