@uniformdev/design-system 20.39.3-alpha.11 → 20.41.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.
package/dist/esm/index.js CHANGED
@@ -665,7 +665,7 @@ var cq = (size) => `@container (min-width: ${size})`;
665
665
  var prefersReducedMotion = (cssProp) => `@media (prefers-reduced-motion: ${cssProp})`;
666
666
 
667
667
  // src/components/Layout/styles/AsideAndSectionLayout.styles.ts
668
- var AsideAdnSectionLayoutContainer = (withSidebar) => css5`
668
+ var AsideAndSectionLayoutContainer = (withSidebar) => css5`
669
669
  display: grid;
670
670
  gap: var(--spacing-sm) 0;
671
671
  height: 100%;
@@ -674,19 +674,18 @@ var AsideAdnSectionLayoutContainer = (withSidebar) => css5`
674
674
  margin-left: ${withSidebar ? 0 : "var(--spacing-sm)"};
675
675
 
676
676
  ${mq("md")} {
677
- grid-template-columns: ${withSidebar ? "200px 1fr" : "1fr"};
677
+ grid-template-columns: ${withSidebar ? "fit-content(25%) 1fr" : "1fr"};
678
678
  }
679
679
  `;
680
- var AsideAdnSectionLayoutAsideStyles = css5`
680
+ var AsideAndSectionLayoutAsideStyles = css5`
681
681
  order: 1;
682
682
  padding: var(--spacing-base) 0 var(--spacing-base) var(--spacing-base);
683
683
 
684
684
  ${mq("md")} {
685
685
  order: 0;
686
- grid-template-columns: minmax(0, 200px) 1fr;
687
686
  }
688
687
  `;
689
- var AsideAdnSectionLayoutSectionStyles = css5`
688
+ var AsideAndSectionLayoutSectionStyles = css5`
690
689
  display: flex;
691
690
  background: var(--white);
692
691
  padding: var(--spacing-lg);
@@ -694,11 +693,11 @@ var AsideAdnSectionLayoutSectionStyles = css5`
694
693
  position: relative;
695
694
  overflow: hidden;
696
695
  `;
697
- var AsideAdnSectionLayoutSectionScrollable = css5`
696
+ var AsideAndSectionLayoutSectionScrollable = css5`
698
697
  overflow: auto;
699
698
  ${scrollbarStyles}
700
699
  `;
701
- var AsideAdnSectionLayoutStickyAsideStyles = css5`
700
+ var AsideAndSectionLayoutStickyAsideStyles = css5`
702
701
  position: sticky;
703
702
  top: var(--spacing-sm);
704
703
  `;
@@ -714,21 +713,21 @@ var AsideAndSectionLayout = ({
714
713
  "main",
715
714
  {
716
715
  css: [
717
- AsideAdnSectionLayoutContainer(Boolean(sidebar)),
718
- isStickyAside ? AsideAdnSectionLayoutSectionScrollable : null
716
+ AsideAndSectionLayoutContainer(Boolean(sidebar)),
717
+ isStickyAside ? AsideAndSectionLayoutSectionScrollable : null
719
718
  ],
720
719
  children: [
721
720
  sidebar ? /* @__PURE__ */ jsx5(
722
721
  "aside",
723
722
  {
724
723
  css: [
725
- AsideAdnSectionLayoutAsideStyles,
726
- isStickyAside ? AsideAdnSectionLayoutStickyAsideStyles : null
724
+ AsideAndSectionLayoutAsideStyles,
725
+ isStickyAside ? AsideAndSectionLayoutStickyAsideStyles : null
727
726
  ],
728
727
  children: sidebar
729
728
  }
730
729
  ) : null,
731
- /* @__PURE__ */ jsx5("section", { css: AsideAdnSectionLayoutSectionStyles, children })
730
+ /* @__PURE__ */ jsx5("section", { css: AsideAndSectionLayoutSectionStyles, children })
732
731
  ]
733
732
  }
734
733
  );
@@ -2275,15 +2274,7 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
2275
2274
  );
2276
2275
  return null;
2277
2276
  }
2278
- return /* @__PURE__ */ jsx16(
2279
- IconComponent,
2280
- {
2281
- role: "img",
2282
- size,
2283
- ...otherProps,
2284
- css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
2285
- }
2286
- );
2277
+ return /* @__PURE__ */ jsx16(IconComponent, { role: "img", size, ...otherProps, css: [IconImg, customColor[iconColor]] });
2287
2278
  };
2288
2279
  var Icon = React3.memo(IconInner);
2289
2280
 
@@ -4016,10 +4007,11 @@ var DropdownStyleMenuTrigger = forwardRef2(
4016
4007
  const buttonVariantStyle = variant === "ghost" ? ghostButtonStyle : outlineButtonStyle;
4017
4008
  return /* @__PURE__ */ jsx23("button", { ref, ...buttonProps, css: [buttonStyle(bgColor), buttonVariantStyle], type: "button", children: /* @__PURE__ */ jsxs13(HorizontalRhythm, { align: "center", gap: "xs", children: [
4018
4009
  /* @__PURE__ */ jsx23("div", { children }),
4019
- /* @__PURE__ */ jsx23(CgChevronDown, { iconColor: "currentColor", size: "1rem" })
4010
+ /* @__PURE__ */ jsx23(Icon, { icon: CgChevronDown, iconColor: "currentColor", size: "1rem" })
4020
4011
  ] }) });
4021
4012
  }
4022
4013
  );
4014
+ DropdownStyleMenuTrigger.displayName = "DropdownStyleMenuTrigger";
4023
4015
 
4024
4016
  // src/components/Menu/Menu.tsx
4025
4017
  import {
@@ -7111,13 +7103,12 @@ var Counter = ({
7111
7103
  if (typeof count === "undefined") {
7112
7104
  return null;
7113
7105
  }
7114
- const isNumber = typeof count === "number";
7115
- const isTripleDigits = isNumber && count > 99 ? /* @__PURE__ */ jsxs39("span", { css: counterTripleValue, title: `${count}`, children: [
7106
+ const isTripleDigits = count > 99 ? /* @__PURE__ */ jsxs39("span", { css: counterTripleValue, title: `${count}`, children: [
7116
7107
  "99",
7117
7108
  /* @__PURE__ */ jsx60(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.5rem", css: counterIcon.tripleValue })
7118
7109
  ] }) : count;
7119
7110
  const formatCount = count === 0 ? /* @__PURE__ */ jsx60("span", { css: counterZeroValue, title: `${count}` }) : isTripleDigits;
7120
- return /* @__PURE__ */ jsxs39("div", { css: [counterContainer(bgColor, Boolean(icon || !isNumber)), sizeStyles[size]], ...props, children: [
7111
+ return /* @__PURE__ */ jsxs39("div", { css: [counterContainer(bgColor, Boolean(icon)), sizeStyles[size]], ...props, children: [
7121
7112
  icon ? /* @__PURE__ */ jsx60(
7122
7113
  "span",
7123
7114
  {
@@ -9489,7 +9480,13 @@ import {
9489
9480
  verticalListSortingStrategy
9490
9481
  } from "@dnd-kit/sortable";
9491
9482
  import { CSS } from "@dnd-kit/utilities";
9492
- import { useCallback as useCallback7, useEffect as useEffect11, useMemo as useMemo5, useRef as useRef6, useState as useState11 } from "react";
9483
+ import {
9484
+ useCallback as useCallback7,
9485
+ useEffect as useEffect11,
9486
+ useMemo as useMemo5,
9487
+ useRef as useRef6,
9488
+ useState as useState11
9489
+ } from "react";
9493
9490
 
9494
9491
  // src/utils/useDebouncedCallback.ts
9495
9492
  import { useEffect as useEffect10, useMemo as useMemo4, useRef as useRef5 } from "react";
@@ -9580,8 +9577,12 @@ var KeyValueInput = ({
9580
9577
  renderIconSelector
9581
9578
  }) => {
9582
9579
  const [isDragging, setIsDragging] = useState11(false);
9580
+ const [indexToFocus, setIndexToFocus] = useState11(null);
9583
9581
  const popoverStoresMap = useRef6({});
9584
- const lastRowFirstInputRef = useRef6(null);
9582
+ const keyInputRefsMap = useRef6({});
9583
+ const [blockAutoGenerateForValues, setBlockAutoGenerateForValues] = useState11(
9584
+ () => new Set(value.map((item) => item.value))
9585
+ );
9585
9586
  const sensors = useSensors(
9586
9587
  useSensor(PointerSensor),
9587
9588
  useSensor(KeyboardSensor, {
@@ -9591,13 +9592,28 @@ var KeyValueInput = ({
9591
9592
  const valueWithIds = useMemo5(() => {
9592
9593
  return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
9593
9594
  }, [value]);
9594
- const handleAddOptionRow = useCallback7(() => {
9595
- onChange([...value, newItemDefault]);
9596
- }, [onChange, value, newItemDefault]);
9595
+ const handleAddOptionRow = useCallback7(
9596
+ (insertIndex) => {
9597
+ const newValue = [...value];
9598
+ newValue.splice(insertIndex + 1, 0, newItemDefault);
9599
+ setIndexToFocus(insertIndex + 1);
9600
+ onChange(newValue);
9601
+ },
9602
+ [onChange, value, newItemDefault]
9603
+ );
9597
9604
  const handleDeleteOptionRow = useCallback7(
9598
9605
  (deleteIndex) => {
9599
9606
  const updatedOptions = value.filter((_, index) => index !== deleteIndex);
9600
9607
  onChange(updatedOptions);
9608
+ setBlockAutoGenerateForValues((current) => {
9609
+ const newSet = new Set(current);
9610
+ newSet.delete(value[deleteIndex].value);
9611
+ return newSet;
9612
+ });
9613
+ if (updatedOptions.length > 0) {
9614
+ const focusIndex = deleteIndex >= updatedOptions.length ? updatedOptions.length - 1 : deleteIndex;
9615
+ setIndexToFocus(focusIndex);
9616
+ }
9601
9617
  },
9602
9618
  [value, onChange]
9603
9619
  );
@@ -9621,6 +9637,34 @@ var KeyValueInput = ({
9621
9637
  },
9622
9638
  [onChange, value]
9623
9639
  );
9640
+ const handleKeyPaste = useCallback7(
9641
+ (rowIndex, e) => {
9642
+ const pastedText = e.clipboardData.getData("text");
9643
+ const lines = pastedText.split("\n").filter((line) => line.trim() !== "");
9644
+ if (lines.length <= 1) {
9645
+ return;
9646
+ }
9647
+ e.preventDefault();
9648
+ const newItems = [];
9649
+ lines.forEach((line) => {
9650
+ const linePieces = line.split(",");
9651
+ const hasMultipleCommas = linePieces.length > 2;
9652
+ if (linePieces.length > 1 && !hasMultipleCommas) {
9653
+ const key = linePieces[0].trim();
9654
+ const val = linePieces[1].trim();
9655
+ newItems.push({ key, value: val });
9656
+ } else {
9657
+ const trimmedLine = line.trim();
9658
+ newItems.push({ key: trimmedLine, value: trimmedLine });
9659
+ }
9660
+ });
9661
+ const newValue = [...value];
9662
+ newValue.splice(rowIndex, 1, ...newItems);
9663
+ onChange(newValue);
9664
+ setIndexToFocus(rowIndex + newItems.length - 1);
9665
+ },
9666
+ [onChange, value]
9667
+ );
9624
9668
  const handleDragEnd = useCallback7(
9625
9669
  (e) => {
9626
9670
  setIsDragging(false);
@@ -9644,10 +9688,17 @@ var KeyValueInput = ({
9644
9688
  setIsDragging(false);
9645
9689
  }, [setIsDragging]);
9646
9690
  useEffect11(() => {
9647
- if (lastRowFirstInputRef.current && value.length > 1) {
9648
- lastRowFirstInputRef.current.focus();
9649
- }
9650
- }, [value.length]);
9691
+ const timeoutId = setTimeout(() => {
9692
+ var _a;
9693
+ if (indexToFocus !== null && keyInputRefsMap.current[indexToFocus]) {
9694
+ (_a = keyInputRefsMap.current[indexToFocus]) == null ? void 0 : _a.focus();
9695
+ setIndexToFocus(null);
9696
+ }
9697
+ });
9698
+ return () => {
9699
+ clearTimeout(timeoutId);
9700
+ };
9701
+ }, [indexToFocus]);
9651
9702
  return /* @__PURE__ */ jsxs59(VerticalRhythm, { gap: "xs", children: [
9652
9703
  /* @__PURE__ */ jsx91(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ jsx91("span", { css: LabelStyles, children: label2 }) }),
9653
9704
  /* @__PURE__ */ jsxs59(
@@ -9685,18 +9736,24 @@ var KeyValueInput = ({
9685
9736
  }
9686
9737
  )
9687
9738
  ] }),
9688
- /* @__PURE__ */ jsxs59(HorizontalRhythm, { align: "center", gap: "xs", children: [
9689
- /* @__PURE__ */ jsx91("span", { children: valueLabel }),
9690
- !valueInfoPopover ? null : /* @__PURE__ */ jsx91(
9691
- Popover3,
9692
- {
9693
- buttonText: `${valueLabel} info`,
9694
- iconColor: "gray",
9695
- placement: "bottom-start",
9696
- onInit: ({ store }) => popoverStoresMap.current.value = store,
9697
- children: valueInfoPopover
9698
- }
9699
- )
9739
+ /* @__PURE__ */ jsxs59(HorizontalRhythm, { align: "center", justify: "space-between", children: [
9740
+ /* @__PURE__ */ jsxs59(HorizontalRhythm, { align: "center", gap: "xs", children: [
9741
+ /* @__PURE__ */ jsx91("span", { children: valueLabel }),
9742
+ !valueInfoPopover ? null : /* @__PURE__ */ jsx91(
9743
+ Popover3,
9744
+ {
9745
+ buttonText: `${valueLabel} info`,
9746
+ iconColor: "gray",
9747
+ placement: "bottom-start",
9748
+ onInit: ({ store }) => popoverStoresMap.current.value = store,
9749
+ children: valueInfoPopover
9750
+ }
9751
+ )
9752
+ ] }),
9753
+ /* @__PURE__ */ jsxs59(Caption, { css: { fontSize: "var(--fs-xs)" }, children: [
9754
+ getFormattedShortcut("enter"),
9755
+ " to insert row"
9756
+ ] })
9700
9757
  ] })
9701
9758
  ]
9702
9759
  }
@@ -9714,7 +9771,7 @@ var KeyValueInput = ({
9714
9771
  KeyValueInputItem,
9715
9772
  {
9716
9773
  id,
9717
- firstInputRef: index === value.length - 1 ? lastRowFirstInputRef : null,
9774
+ firstInputRef: (ref) => keyInputRefsMap.current[index] = ref,
9718
9775
  value: item,
9719
9776
  keyLabel: `${keyLabel}, row ${index}`,
9720
9777
  valueLabel: `${valueLabel}, row ${index}`,
@@ -9727,9 +9784,16 @@ var KeyValueInput = ({
9727
9784
  onDelete: () => handleDeleteOptionRow(index),
9728
9785
  onFocusChange: handleFocusChange,
9729
9786
  "data-testid": "key-value-input-item",
9730
- onEnter: handleAddOptionRow,
9787
+ onEnter: () => handleAddOptionRow(index),
9788
+ onKeyPaste: (e) => handleKeyPaste(index, e),
9731
9789
  showIconColumn,
9732
- renderIconSelector
9790
+ renderIconSelector,
9791
+ blockAutoGenerateValue: item.value !== "" && blockAutoGenerateForValues.has(item.value),
9792
+ onBlurValue: (value2) => setBlockAutoGenerateForValues((current) => {
9793
+ const newSet = new Set(current);
9794
+ newSet.add(value2);
9795
+ return newSet;
9796
+ })
9733
9797
  },
9734
9798
  isDragging ? id : index
9735
9799
  )) })
@@ -9738,7 +9802,7 @@ var KeyValueInput = ({
9738
9802
  /* @__PURE__ */ jsx91(
9739
9803
  AddListButton,
9740
9804
  {
9741
- onButtonClick: handleAddOptionRow,
9805
+ onButtonClick: () => handleAddOptionRow(value.length - 1),
9742
9806
  disabled: disabled2,
9743
9807
  "data-testid": "add-input-row-action",
9744
9808
  css: { marginTop: "var(--spacing-sm)", marginLeft: "var(--spacing-base)" }
@@ -9761,8 +9825,11 @@ var KeyValueInputItem = ({
9761
9825
  disabledDelete = false,
9762
9826
  disabledDnd = false,
9763
9827
  onEnter,
9828
+ onKeyPaste,
9764
9829
  showIconColumn = false,
9765
- renderIconSelector
9830
+ renderIconSelector,
9831
+ blockAutoGenerateValue,
9832
+ onBlurValue
9766
9833
  }) => {
9767
9834
  const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = useSortable({
9768
9835
  id,
@@ -9777,6 +9844,11 @@ var KeyValueInputItem = ({
9777
9844
  onEnter();
9778
9845
  }
9779
9846
  };
9847
+ const handleValueKeyDown = (e) => {
9848
+ if (e.key === "Enter") {
9849
+ onEnter();
9850
+ }
9851
+ };
9780
9852
  return /* @__PURE__ */ jsxs59("div", { css: rowWrapper, ref: setNodeRef, style, children: [
9781
9853
  /* @__PURE__ */ jsx91(DragHandle, { disableDnd: disabledDnd, ref: setActivatorNodeRef, ...attributes, ...listeners }),
9782
9854
  /* @__PURE__ */ jsxs59(
@@ -9820,7 +9892,7 @@ var KeyValueInputItem = ({
9820
9892
  showLabel: false,
9821
9893
  disabled: disabled2,
9822
9894
  onChange: (e) => {
9823
- const hasStoredValue = value.value !== value.key;
9895
+ const hasStoredValue = value.value !== value.key || blockAutoGenerateValue;
9824
9896
  onChange == null ? void 0 : onChange({
9825
9897
  key: e.currentTarget.value,
9826
9898
  value: hasStoredValue ? value.value : e.currentTarget.value,
@@ -9830,6 +9902,7 @@ var KeyValueInputItem = ({
9830
9902
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
9831
9903
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
9832
9904
  onKeyDown: handleEnter,
9905
+ onPaste: onKeyPaste,
9833
9906
  value: value.key,
9834
9907
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
9835
9908
  "data-testid": "key"
@@ -9848,9 +9921,12 @@ var KeyValueInputItem = ({
9848
9921
  icon: value.icon
9849
9922
  });
9850
9923
  },
9851
- onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
9924
+ onBlur: () => {
9925
+ onFocusChange == null ? void 0 : onFocusChange(false);
9926
+ onBlurValue == null ? void 0 : onBlurValue(value.value);
9927
+ },
9852
9928
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
9853
- onKeyDown: handleEnter,
9929
+ onKeyDown: handleValueKeyDown,
9854
9930
  value: value.value,
9855
9931
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
9856
9932
  "data-testid": "value"
@@ -16193,55 +16269,63 @@ var RichText = ({
16193
16269
  onInsertAsset
16194
16270
  }
16195
16271
  ),
16196
- /* @__PURE__ */ jsxs90("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
16197
- /* @__PURE__ */ jsxs90(
16198
- "div",
16199
- {
16200
- css: editorContainer,
16201
- className: editorInputWrapperClassName,
16202
- ref: onEditorContainerRef,
16203
- "data-testid": "value-container",
16204
- children: [
16205
- /* @__PURE__ */ jsx134(
16206
- RichTextPlugin,
16207
- {
16208
- contentEditable: /* @__PURE__ */ jsx134(ContentEditable, { css: editorInput, className: editorInputClassName }),
16209
- placeholder: /* @__PURE__ */ jsx134("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
16210
- ErrorBoundary: LexicalErrorBoundary
16211
- }
16212
- ),
16213
- /* @__PURE__ */ jsx134(ListPlugin, {}),
16214
- /* @__PURE__ */ jsx134(ListIndentPlugin, { maxDepth: 4 }),
16215
- /* @__PURE__ */ jsx134(TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
16216
- /* @__PURE__ */ jsx134("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(
16217
- TableActionMenuPlugin,
16218
- {
16219
- positioningAnchorEl: editorContainerRef,
16220
- menuPortalEl: portalContainerRef
16221
- }
16222
- ) : null }),
16223
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
16224
- readOnly ? null : /* @__PURE__ */ jsx134(HistoryPlugin, {}),
16225
- /* @__PURE__ */ jsx134(DisableStylesPlugin, {}),
16226
- /* @__PURE__ */ jsx134(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
16227
- ]
16228
- }
16229
- ),
16230
- /* @__PURE__ */ jsx134(Fragment18, { children }),
16231
- editorContainerRef ? /* @__PURE__ */ jsx134(
16232
- LinkNodePlugin,
16233
- {
16234
- onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
16235
- getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
16236
- var _a, _b;
16237
- return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
16238
- } : void 0,
16239
- positioningAnchorEl: editorContainerRef
16240
- }
16241
- ) : null,
16242
- /* @__PURE__ */ jsx134(TableSelectionPlugin_default, {}),
16243
- /* @__PURE__ */ jsx134(ImprovedAssetSelectionPlugin_default, {})
16244
- ] })
16272
+ /* @__PURE__ */ jsxs90(
16273
+ "div",
16274
+ {
16275
+ css: editorContainerWrapper,
16276
+ "data-editor-container-wrapper": true,
16277
+ ref: onPortalContainerRef,
16278
+ children: [
16279
+ /* @__PURE__ */ jsxs90(
16280
+ "div",
16281
+ {
16282
+ css: editorContainer,
16283
+ className: editorInputWrapperClassName,
16284
+ ref: onEditorContainerRef,
16285
+ "data-testid": "value-container",
16286
+ children: [
16287
+ /* @__PURE__ */ jsx134(
16288
+ RichTextPlugin,
16289
+ {
16290
+ contentEditable: /* @__PURE__ */ jsx134(ContentEditable, { css: editorInput, className: editorInputClassName }),
16291
+ placeholder: /* @__PURE__ */ jsx134("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
16292
+ ErrorBoundary: LexicalErrorBoundary
16293
+ }
16294
+ ),
16295
+ /* @__PURE__ */ jsx134(ListPlugin, {}),
16296
+ /* @__PURE__ */ jsx134(ListIndentPlugin, { maxDepth: 4 }),
16297
+ /* @__PURE__ */ jsx134(TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
16298
+ /* @__PURE__ */ jsx134("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(
16299
+ TableActionMenuPlugin,
16300
+ {
16301
+ positioningAnchorEl: editorContainerRef,
16302
+ menuPortalEl: portalContainerRef
16303
+ }
16304
+ ) : null }),
16305
+ editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ jsx134(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
16306
+ readOnly ? null : /* @__PURE__ */ jsx134(HistoryPlugin, {}),
16307
+ /* @__PURE__ */ jsx134(DisableStylesPlugin, {}),
16308
+ /* @__PURE__ */ jsx134(MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
16309
+ ]
16310
+ }
16311
+ ),
16312
+ /* @__PURE__ */ jsx134(Fragment18, { children }),
16313
+ editorContainerRef ? /* @__PURE__ */ jsx134(
16314
+ LinkNodePlugin,
16315
+ {
16316
+ onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
16317
+ getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
16318
+ var _a, _b;
16319
+ return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
16320
+ } : void 0,
16321
+ positioningAnchorEl: editorContainerRef
16322
+ }
16323
+ ) : null,
16324
+ /* @__PURE__ */ jsx134(TableSelectionPlugin_default, {}),
16325
+ /* @__PURE__ */ jsx134(ImprovedAssetSelectionPlugin_default, {})
16326
+ ]
16327
+ }
16328
+ )
16245
16329
  ] });
16246
16330
  };
16247
16331
 
@@ -16883,7 +16967,7 @@ var lightFadingOut = keyframes5`
16883
16967
  `;
16884
16968
  var skeletonStyles = css106`
16885
16969
  animation: ${lightFadingOut} 1s ease-out infinite alternate;
16886
- background-color: var(--gray-900);
16970
+ background-color: var(--gray-500);
16887
16971
  `;
16888
16972
 
16889
16973
  // src/components/Skeleton/Skeleton.tsx
package/dist/index.d.mts CHANGED
@@ -1502,10 +1502,8 @@ declare const MultilineChip: ({ children, onClick, ...props }: MultilineChipProp
1502
1502
  type CounterBgColors = 'var(--white)' | 'var(--gray-50)' | 'var(--accent-light)' | 'var(--accent-dark)' | 'transparent';
1503
1503
  type CounterIconColors = 'auto' | 'var(--utility-caution-icon)' | 'var(--utility-danger-icon)' | 'var(--utility-info-icon)' | 'var(--utility-success-icon)' | 'red';
1504
1504
  type CounterProps = {
1505
- /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear.
1506
- * String can be used for formatting purposes, e.g. "1.2k" or regionalized number, e.g. "1,200"
1507
- */
1508
- count: number | string | undefined;
1505
+ /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear. */
1506
+ count: number | undefined;
1509
1507
  /** sets the background color
1510
1508
  * @default 'transparent'
1511
1509
  */
package/dist/index.d.ts CHANGED
@@ -1502,10 +1502,8 @@ declare const MultilineChip: ({ children, onClick, ...props }: MultilineChipProp
1502
1502
  type CounterBgColors = 'var(--white)' | 'var(--gray-50)' | 'var(--accent-light)' | 'var(--accent-dark)' | 'transparent';
1503
1503
  type CounterIconColors = 'auto' | 'var(--utility-caution-icon)' | 'var(--utility-danger-icon)' | 'var(--utility-info-icon)' | 'var(--utility-success-icon)' | 'red';
1504
1504
  type CounterProps = {
1505
- /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear.
1506
- * String can be used for formatting purposes, e.g. "1.2k" or regionalized number, e.g. "1,200"
1507
- */
1508
- count: number | string | undefined;
1505
+ /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear. */
1506
+ count: number | undefined;
1509
1507
  /** sets the background color
1510
1508
  * @default 'transparent'
1511
1509
  */
package/dist/index.js CHANGED
@@ -2337,7 +2337,7 @@ var cq = (size) => `@container (min-width: ${size})`;
2337
2337
  var prefersReducedMotion = (cssProp) => `@media (prefers-reduced-motion: ${cssProp})`;
2338
2338
 
2339
2339
  // src/components/Layout/styles/AsideAndSectionLayout.styles.ts
2340
- var AsideAdnSectionLayoutContainer = (withSidebar) => import_react6.css`
2340
+ var AsideAndSectionLayoutContainer = (withSidebar) => import_react6.css`
2341
2341
  display: grid;
2342
2342
  gap: var(--spacing-sm) 0;
2343
2343
  height: 100%;
@@ -2346,19 +2346,18 @@ var AsideAdnSectionLayoutContainer = (withSidebar) => import_react6.css`
2346
2346
  margin-left: ${withSidebar ? 0 : "var(--spacing-sm)"};
2347
2347
 
2348
2348
  ${mq("md")} {
2349
- grid-template-columns: ${withSidebar ? "200px 1fr" : "1fr"};
2349
+ grid-template-columns: ${withSidebar ? "fit-content(25%) 1fr" : "1fr"};
2350
2350
  }
2351
2351
  `;
2352
- var AsideAdnSectionLayoutAsideStyles = import_react6.css`
2352
+ var AsideAndSectionLayoutAsideStyles = import_react6.css`
2353
2353
  order: 1;
2354
2354
  padding: var(--spacing-base) 0 var(--spacing-base) var(--spacing-base);
2355
2355
 
2356
2356
  ${mq("md")} {
2357
2357
  order: 0;
2358
- grid-template-columns: minmax(0, 200px) 1fr;
2359
2358
  }
2360
2359
  `;
2361
- var AsideAdnSectionLayoutSectionStyles = import_react6.css`
2360
+ var AsideAndSectionLayoutSectionStyles = import_react6.css`
2362
2361
  display: flex;
2363
2362
  background: var(--white);
2364
2363
  padding: var(--spacing-lg);
@@ -2366,11 +2365,11 @@ var AsideAdnSectionLayoutSectionStyles = import_react6.css`
2366
2365
  position: relative;
2367
2366
  overflow: hidden;
2368
2367
  `;
2369
- var AsideAdnSectionLayoutSectionScrollable = import_react6.css`
2368
+ var AsideAndSectionLayoutSectionScrollable = import_react6.css`
2370
2369
  overflow: auto;
2371
2370
  ${scrollbarStyles}
2372
2371
  `;
2373
- var AsideAdnSectionLayoutStickyAsideStyles = import_react6.css`
2372
+ var AsideAndSectionLayoutStickyAsideStyles = import_react6.css`
2374
2373
  position: sticky;
2375
2374
  top: var(--spacing-sm);
2376
2375
  `;
@@ -2386,21 +2385,21 @@ var AsideAndSectionLayout = ({
2386
2385
  "main",
2387
2386
  {
2388
2387
  css: [
2389
- AsideAdnSectionLayoutContainer(Boolean(sidebar)),
2390
- isStickyAside ? AsideAdnSectionLayoutSectionScrollable : null
2388
+ AsideAndSectionLayoutContainer(Boolean(sidebar)),
2389
+ isStickyAside ? AsideAndSectionLayoutSectionScrollable : null
2391
2390
  ],
2392
2391
  children: [
2393
2392
  sidebar ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2394
2393
  "aside",
2395
2394
  {
2396
2395
  css: [
2397
- AsideAdnSectionLayoutAsideStyles,
2398
- isStickyAside ? AsideAdnSectionLayoutStickyAsideStyles : null
2396
+ AsideAndSectionLayoutAsideStyles,
2397
+ isStickyAside ? AsideAndSectionLayoutStickyAsideStyles : null
2399
2398
  ],
2400
2399
  children: sidebar
2401
2400
  }
2402
2401
  ) : null,
2403
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("section", { css: AsideAdnSectionLayoutSectionStyles, children })
2402
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("section", { css: AsideAndSectionLayoutSectionStyles, children })
2404
2403
  ]
2405
2404
  }
2406
2405
  );
@@ -3989,15 +3988,7 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
3989
3988
  );
3990
3989
  return null;
3991
3990
  }
3992
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3993
- IconComponent,
3994
- {
3995
- role: "img",
3996
- size,
3997
- ...otherProps,
3998
- css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
3999
- }
4000
- );
3991
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { role: "img", size, ...otherProps, css: [IconImg, customColor[iconColor]] });
4001
3992
  };
4002
3993
  var Icon = import_react24.default.memo(IconInner);
4003
3994
 
@@ -5747,10 +5738,11 @@ var DropdownStyleMenuTrigger = (0, import_react31.forwardRef)(
5747
5738
  const buttonVariantStyle = variant === "ghost" ? ghostButtonStyle : outlineButtonStyle;
5748
5739
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("button", { ref, ...buttonProps, css: [buttonStyle(bgColor), buttonVariantStyle], type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
5749
5740
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children }),
5750
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_CgChevronDown2.CgChevronDown, { iconColor: "currentColor", size: "1rem" })
5741
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { icon: import_CgChevronDown2.CgChevronDown, iconColor: "currentColor", size: "1rem" })
5751
5742
  ] }) });
5752
5743
  }
5753
5744
  );
5745
+ DropdownStyleMenuTrigger.displayName = "DropdownStyleMenuTrigger";
5754
5746
 
5755
5747
  // src/components/Menu/Menu.tsx
5756
5748
  init_emotion_jsx_shim();
@@ -8908,13 +8900,12 @@ var Counter = ({
8908
8900
  if (typeof count === "undefined") {
8909
8901
  return null;
8910
8902
  }
8911
- const isNumber = typeof count === "number";
8912
- const isTripleDigits = isNumber && count > 99 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { css: counterTripleValue, title: `${count}`, children: [
8903
+ const isTripleDigits = count > 99 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { css: counterTripleValue, title: `${count}`, children: [
8913
8904
  "99",
8914
8905
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.5rem", css: counterIcon.tripleValue })
8915
8906
  ] }) : count;
8916
8907
  const formatCount = count === 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { css: counterZeroValue, title: `${count}` }) : isTripleDigits;
8917
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: [counterContainer(bgColor, Boolean(icon || !isNumber)), sizeStyles[size]], ...props, children: [
8908
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: [counterContainer(bgColor, Boolean(icon)), sizeStyles[size]], ...props, children: [
8918
8909
  icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
8919
8910
  "span",
8920
8911
  {
@@ -11437,8 +11428,12 @@ var KeyValueInput = ({
11437
11428
  renderIconSelector
11438
11429
  }) => {
11439
11430
  const [isDragging, setIsDragging] = (0, import_react106.useState)(false);
11431
+ const [indexToFocus, setIndexToFocus] = (0, import_react106.useState)(null);
11440
11432
  const popoverStoresMap = (0, import_react106.useRef)({});
11441
- const lastRowFirstInputRef = (0, import_react106.useRef)(null);
11433
+ const keyInputRefsMap = (0, import_react106.useRef)({});
11434
+ const [blockAutoGenerateForValues, setBlockAutoGenerateForValues] = (0, import_react106.useState)(
11435
+ () => new Set(value.map((item) => item.value))
11436
+ );
11442
11437
  const sensors = (0, import_core.useSensors)(
11443
11438
  (0, import_core.useSensor)(import_core.PointerSensor),
11444
11439
  (0, import_core.useSensor)(import_core.KeyboardSensor, {
@@ -11448,13 +11443,28 @@ var KeyValueInput = ({
11448
11443
  const valueWithIds = (0, import_react106.useMemo)(() => {
11449
11444
  return value.map((item, index) => ({ ...item, id: generateItemId(item, index) }));
11450
11445
  }, [value]);
11451
- const handleAddOptionRow = (0, import_react106.useCallback)(() => {
11452
- onChange([...value, newItemDefault]);
11453
- }, [onChange, value, newItemDefault]);
11446
+ const handleAddOptionRow = (0, import_react106.useCallback)(
11447
+ (insertIndex) => {
11448
+ const newValue = [...value];
11449
+ newValue.splice(insertIndex + 1, 0, newItemDefault);
11450
+ setIndexToFocus(insertIndex + 1);
11451
+ onChange(newValue);
11452
+ },
11453
+ [onChange, value, newItemDefault]
11454
+ );
11454
11455
  const handleDeleteOptionRow = (0, import_react106.useCallback)(
11455
11456
  (deleteIndex) => {
11456
11457
  const updatedOptions = value.filter((_, index) => index !== deleteIndex);
11457
11458
  onChange(updatedOptions);
11459
+ setBlockAutoGenerateForValues((current) => {
11460
+ const newSet = new Set(current);
11461
+ newSet.delete(value[deleteIndex].value);
11462
+ return newSet;
11463
+ });
11464
+ if (updatedOptions.length > 0) {
11465
+ const focusIndex = deleteIndex >= updatedOptions.length ? updatedOptions.length - 1 : deleteIndex;
11466
+ setIndexToFocus(focusIndex);
11467
+ }
11458
11468
  },
11459
11469
  [value, onChange]
11460
11470
  );
@@ -11478,6 +11488,34 @@ var KeyValueInput = ({
11478
11488
  },
11479
11489
  [onChange, value]
11480
11490
  );
11491
+ const handleKeyPaste = (0, import_react106.useCallback)(
11492
+ (rowIndex, e) => {
11493
+ const pastedText = e.clipboardData.getData("text");
11494
+ const lines = pastedText.split("\n").filter((line) => line.trim() !== "");
11495
+ if (lines.length <= 1) {
11496
+ return;
11497
+ }
11498
+ e.preventDefault();
11499
+ const newItems = [];
11500
+ lines.forEach((line) => {
11501
+ const linePieces = line.split(",");
11502
+ const hasMultipleCommas = linePieces.length > 2;
11503
+ if (linePieces.length > 1 && !hasMultipleCommas) {
11504
+ const key = linePieces[0].trim();
11505
+ const val = linePieces[1].trim();
11506
+ newItems.push({ key, value: val });
11507
+ } else {
11508
+ const trimmedLine = line.trim();
11509
+ newItems.push({ key: trimmedLine, value: trimmedLine });
11510
+ }
11511
+ });
11512
+ const newValue = [...value];
11513
+ newValue.splice(rowIndex, 1, ...newItems);
11514
+ onChange(newValue);
11515
+ setIndexToFocus(rowIndex + newItems.length - 1);
11516
+ },
11517
+ [onChange, value]
11518
+ );
11481
11519
  const handleDragEnd = (0, import_react106.useCallback)(
11482
11520
  (e) => {
11483
11521
  setIsDragging(false);
@@ -11501,10 +11539,17 @@ var KeyValueInput = ({
11501
11539
  setIsDragging(false);
11502
11540
  }, [setIsDragging]);
11503
11541
  (0, import_react106.useEffect)(() => {
11504
- if (lastRowFirstInputRef.current && value.length > 1) {
11505
- lastRowFirstInputRef.current.focus();
11506
- }
11507
- }, [value.length]);
11542
+ const timeoutId = setTimeout(() => {
11543
+ var _a;
11544
+ if (indexToFocus !== null && keyInputRefsMap.current[indexToFocus]) {
11545
+ (_a = keyInputRefsMap.current[indexToFocus]) == null ? void 0 : _a.focus();
11546
+ setIndexToFocus(null);
11547
+ }
11548
+ });
11549
+ return () => {
11550
+ clearTimeout(timeoutId);
11551
+ };
11552
+ }, [indexToFocus]);
11508
11553
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(VerticalRhythm, { gap: "xs", children: [
11509
11554
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(HorizontalRhythm, { align: "center", justify: "space-between", css: { marginBottom: "var(--spacing-xs)" }, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { css: LabelStyles, children: label2 }) }),
11510
11555
  /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
@@ -11542,18 +11587,24 @@ var KeyValueInput = ({
11542
11587
  }
11543
11588
  )
11544
11589
  ] }),
11545
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
11546
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: valueLabel }),
11547
- !valueInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
11548
- Popover3,
11549
- {
11550
- buttonText: `${valueLabel} info`,
11551
- iconColor: "gray",
11552
- placement: "bottom-start",
11553
- onInit: ({ store }) => popoverStoresMap.current.value = store,
11554
- children: valueInfoPopover
11555
- }
11556
- )
11590
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(HorizontalRhythm, { align: "center", justify: "space-between", children: [
11591
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(HorizontalRhythm, { align: "center", gap: "xs", children: [
11592
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: valueLabel }),
11593
+ !valueInfoPopover ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
11594
+ Popover3,
11595
+ {
11596
+ buttonText: `${valueLabel} info`,
11597
+ iconColor: "gray",
11598
+ placement: "bottom-start",
11599
+ onInit: ({ store }) => popoverStoresMap.current.value = store,
11600
+ children: valueInfoPopover
11601
+ }
11602
+ )
11603
+ ] }),
11604
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Caption, { css: { fontSize: "var(--fs-xs)" }, children: [
11605
+ getFormattedShortcut("enter"),
11606
+ " to insert row"
11607
+ ] })
11557
11608
  ] })
11558
11609
  ]
11559
11610
  }
@@ -11571,7 +11622,7 @@ var KeyValueInput = ({
11571
11622
  KeyValueInputItem,
11572
11623
  {
11573
11624
  id,
11574
- firstInputRef: index === value.length - 1 ? lastRowFirstInputRef : null,
11625
+ firstInputRef: (ref) => keyInputRefsMap.current[index] = ref,
11575
11626
  value: item,
11576
11627
  keyLabel: `${keyLabel}, row ${index}`,
11577
11628
  valueLabel: `${valueLabel}, row ${index}`,
@@ -11584,9 +11635,16 @@ var KeyValueInput = ({
11584
11635
  onDelete: () => handleDeleteOptionRow(index),
11585
11636
  onFocusChange: handleFocusChange,
11586
11637
  "data-testid": "key-value-input-item",
11587
- onEnter: handleAddOptionRow,
11638
+ onEnter: () => handleAddOptionRow(index),
11639
+ onKeyPaste: (e) => handleKeyPaste(index, e),
11588
11640
  showIconColumn,
11589
- renderIconSelector
11641
+ renderIconSelector,
11642
+ blockAutoGenerateValue: item.value !== "" && blockAutoGenerateForValues.has(item.value),
11643
+ onBlurValue: (value2) => setBlockAutoGenerateForValues((current) => {
11644
+ const newSet = new Set(current);
11645
+ newSet.add(value2);
11646
+ return newSet;
11647
+ })
11590
11648
  },
11591
11649
  isDragging ? id : index
11592
11650
  )) })
@@ -11595,7 +11653,7 @@ var KeyValueInput = ({
11595
11653
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
11596
11654
  AddListButton,
11597
11655
  {
11598
- onButtonClick: handleAddOptionRow,
11656
+ onButtonClick: () => handleAddOptionRow(value.length - 1),
11599
11657
  disabled: disabled2,
11600
11658
  "data-testid": "add-input-row-action",
11601
11659
  css: { marginTop: "var(--spacing-sm)", marginLeft: "var(--spacing-base)" }
@@ -11618,8 +11676,11 @@ var KeyValueInputItem = ({
11618
11676
  disabledDelete = false,
11619
11677
  disabledDnd = false,
11620
11678
  onEnter,
11679
+ onKeyPaste,
11621
11680
  showIconColumn = false,
11622
- renderIconSelector
11681
+ renderIconSelector,
11682
+ blockAutoGenerateValue,
11683
+ onBlurValue
11623
11684
  }) => {
11624
11685
  const { attributes, listeners, setNodeRef, transform, transition, setActivatorNodeRef, isSorting } = (0, import_sortable.useSortable)({
11625
11686
  id,
@@ -11634,6 +11695,11 @@ var KeyValueInputItem = ({
11634
11695
  onEnter();
11635
11696
  }
11636
11697
  };
11698
+ const handleValueKeyDown = (e) => {
11699
+ if (e.key === "Enter") {
11700
+ onEnter();
11701
+ }
11702
+ };
11637
11703
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: rowWrapper, ref: setNodeRef, style, children: [
11638
11704
  /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DragHandle, { disableDnd: disabledDnd, ref: setActivatorNodeRef, ...attributes, ...listeners }),
11639
11705
  /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
@@ -11677,7 +11743,7 @@ var KeyValueInputItem = ({
11677
11743
  showLabel: false,
11678
11744
  disabled: disabled2,
11679
11745
  onChange: (e) => {
11680
- const hasStoredValue = value.value !== value.key;
11746
+ const hasStoredValue = value.value !== value.key || blockAutoGenerateValue;
11681
11747
  onChange == null ? void 0 : onChange({
11682
11748
  key: e.currentTarget.value,
11683
11749
  value: hasStoredValue ? value.value : e.currentTarget.value,
@@ -11687,6 +11753,7 @@ var KeyValueInputItem = ({
11687
11753
  onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
11688
11754
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
11689
11755
  onKeyDown: handleEnter,
11756
+ onPaste: onKeyPaste,
11690
11757
  value: value.key,
11691
11758
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.key,
11692
11759
  "data-testid": "key"
@@ -11705,9 +11772,12 @@ var KeyValueInputItem = ({
11705
11772
  icon: value.icon
11706
11773
  });
11707
11774
  },
11708
- onBlur: () => onFocusChange == null ? void 0 : onFocusChange(false),
11775
+ onBlur: () => {
11776
+ onFocusChange == null ? void 0 : onFocusChange(false);
11777
+ onBlurValue == null ? void 0 : onBlurValue(value.value);
11778
+ },
11709
11779
  onFocus: () => onFocusChange == null ? void 0 : onFocusChange(true),
11710
- onKeyDown: handleEnter,
11780
+ onKeyDown: handleValueKeyDown,
11711
11781
  value: value.value,
11712
11782
  errorMessage: isSorting ? void 0 : error == null ? void 0 : error.value,
11713
11783
  "data-testid": "value"
@@ -18062,55 +18132,63 @@ var RichText = ({
18062
18132
  onInsertAsset
18063
18133
  }
18064
18134
  ),
18065
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { css: editorContainerWrapper, ref: onPortalContainerRef, children: [
18066
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
18067
- "div",
18068
- {
18069
- css: editorContainer,
18070
- className: editorInputWrapperClassName,
18071
- ref: onEditorContainerRef,
18072
- "data-testid": "value-container",
18073
- children: [
18074
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18075
- import_LexicalRichTextPlugin.RichTextPlugin,
18076
- {
18077
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
18078
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
18079
- ErrorBoundary: import_LexicalErrorBoundary.default
18080
- }
18081
- ),
18082
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalListPlugin.ListPlugin, {}),
18083
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ListIndentPlugin, { maxDepth: 4 }),
18084
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalTablePlugin.TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
18085
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18086
- TableActionMenuPlugin,
18087
- {
18088
- positioningAnchorEl: editorContainerRef,
18089
- menuPortalEl: portalContainerRef
18090
- }
18091
- ) : null }),
18092
- editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
18093
- readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
18094
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DisableStylesPlugin, {}),
18095
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
18096
- ]
18097
- }
18098
- ),
18099
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children }),
18100
- editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18101
- LinkNodePlugin,
18102
- {
18103
- onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
18104
- getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
18105
- var _a, _b;
18106
- return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
18107
- } : void 0,
18108
- positioningAnchorEl: editorContainerRef
18109
- }
18110
- ) : null,
18111
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableSelectionPlugin_default, {}),
18112
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ImprovedAssetSelectionPlugin_default, {})
18113
- ] })
18135
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
18136
+ "div",
18137
+ {
18138
+ css: editorContainerWrapper,
18139
+ "data-editor-container-wrapper": true,
18140
+ ref: onPortalContainerRef,
18141
+ children: [
18142
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
18143
+ "div",
18144
+ {
18145
+ css: editorContainer,
18146
+ className: editorInputWrapperClassName,
18147
+ ref: onEditorContainerRef,
18148
+ "data-testid": "value-container",
18149
+ children: [
18150
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18151
+ import_LexicalRichTextPlugin.RichTextPlugin,
18152
+ {
18153
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
18154
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
18155
+ ErrorBoundary: import_LexicalErrorBoundary.default
18156
+ }
18157
+ ),
18158
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalListPlugin.ListPlugin, {}),
18159
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ListIndentPlugin, { maxDepth: 4 }),
18160
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalTablePlugin.TablePlugin, { hasCellMerge: false, hasCellBackgroundColor: false }),
18161
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { css: editorContainerOverflowWrapper, "data-testid": "table-action-menu-plugin", children: editorContainerRef && portalContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18162
+ TableActionMenuPlugin,
18163
+ {
18164
+ positioningAnchorEl: editorContainerRef,
18165
+ menuPortalEl: portalContainerRef
18166
+ }
18167
+ ) : null }),
18168
+ editorContainerRef && !minimalInteractivity ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableCellResizerPlugin, { positioningAnchorEl: editorContainerRef }) : null,
18169
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalHistoryPlugin.HistoryPlugin, {}),
18170
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(DisableStylesPlugin, {}),
18171
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_LexicalMarkdownShortcutPlugin.MarkdownShortcutPlugin, { transformers: MARKDOWN_TRANSFORMERS })
18172
+ ]
18173
+ }
18174
+ ),
18175
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_jsx_runtime134.Fragment, { children }),
18176
+ editorContainerRef ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
18177
+ LinkNodePlugin,
18178
+ {
18179
+ onConnectLink: onConnectLink ? onConnectLink : () => Promise.resolve(),
18180
+ getBoundPath: (variables == null ? void 0 : variables.bindVariables) ? (path) => {
18181
+ var _a, _b;
18182
+ return (_b = (_a = variables.bindVariables) == null ? void 0 : _a.call(variables, path)) != null ? _b : path;
18183
+ } : void 0,
18184
+ positioningAnchorEl: editorContainerRef
18185
+ }
18186
+ ) : null,
18187
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(TableSelectionPlugin_default, {}),
18188
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(ImprovedAssetSelectionPlugin_default, {})
18189
+ ]
18190
+ }
18191
+ )
18114
18192
  ] });
18115
18193
  };
18116
18194
 
@@ -18768,7 +18846,7 @@ var lightFadingOut = import_react176.keyframes`
18768
18846
  `;
18769
18847
  var skeletonStyles = import_react176.css`
18770
18848
  animation: ${lightFadingOut} 1s ease-out infinite alternate;
18771
- background-color: var(--gray-900);
18849
+ background-color: var(--gray-500);
18772
18850
  `;
18773
18851
 
18774
18852
  // src/components/Skeleton/Skeleton.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.39.3-alpha.11+b3ab5fb305",
3
+ "version": "20.41.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "exports": {
@@ -38,8 +38,8 @@
38
38
  "@storybook/theming": "^8.3.3",
39
39
  "@types/react": "18.3.24",
40
40
  "@types/react-dom": "18.3.7",
41
- "@uniformdev/canvas": "^20.39.3-alpha.11+b3ab5fb305",
42
- "@uniformdev/richtext": "^20.39.3-alpha.11+b3ab5fb305",
41
+ "@uniformdev/canvas": "^20.41.0",
42
+ "@uniformdev/richtext": "^20.41.0",
43
43
  "@vitest/coverage-v8": "3.2.4",
44
44
  "autoprefixer": "10.4.21",
45
45
  "hygen": "6.2.11",
@@ -93,5 +93,5 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "gitHead": "b3ab5fb305533690de4bbd859a69196b6c26ee2f"
96
+ "gitHead": "0ec454ba75fa0b042566d38359e1db3bca61c30d"
97
97
  }