@drivenets/design-system 0.17.0 → 0.18.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 (94) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/index.cjs +1727 -701
  3. package/dist/index.d.cts +115 -52
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +115 -52
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1729 -705
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +2 -2
  11. package/src/components/ds-alert-banner/ds-alert-banner-global.figma.ts +49 -0
  12. package/src/components/ds-alert-banner/ds-alert-banner.figma.ts +51 -0
  13. package/src/components/ds-autocomplete/ds-autocomplete.module.scss +15 -4
  14. package/src/components/ds-autocomplete/ds-autocomplete.tsx +10 -3
  15. package/src/components/ds-autocomplete/ds-autocomplete.types.ts +8 -0
  16. package/src/components/ds-button-v3/ds-button-v3.figma.ts +5 -3
  17. package/src/components/ds-button-v3/ds-button-v3.module.scss +84 -17
  18. package/src/components/ds-button-v3/ds-button-v3.tsx +2 -0
  19. package/src/components/ds-button-v3/ds-button-v3.types.ts +11 -2
  20. package/src/components/ds-button-v3/ds-button-v4.figma.ts +121 -0
  21. package/src/components/ds-comment-bubble/ds-comment-bubble.figma.ts +52 -0
  22. package/src/components/ds-comment-card/ds-comment-card.figma.ts +36 -0
  23. package/src/components/ds-comment-indicator/ds-comment-indicator.figma.ts +32 -0
  24. package/src/components/ds-comments-drawer/ds-comments-drawer.figma.ts +19 -0
  25. package/src/components/ds-select/ds-select.figma.ts +2 -1
  26. package/src/components/ds-select/ds-select.tsx +6 -1
  27. package/src/components/ds-select/ds-select.types.ts +2 -1
  28. package/src/components/ds-slider/ds-slider.figma.ts +29 -0
  29. package/src/components/ds-slider/ds-slider.module.scss +104 -0
  30. package/src/components/ds-slider/ds-slider.tsx +118 -0
  31. package/src/components/ds-slider/ds-slider.types.ts +102 -0
  32. package/src/components/ds-slider/ds-slider.utils.ts +14 -0
  33. package/src/components/ds-slider/index.ts +11 -0
  34. package/src/components/ds-smart-tabs/figma/ds-smart-tabs-tab.figma.ts +83 -0
  35. package/src/components/ds-smart-tabs/figma/ds-smart-tabs.figma.ts +23 -0
  36. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss +5 -1
  37. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +15 -3
  38. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +15 -1
  39. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +29 -6
  40. package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.module.scss +23 -0
  41. package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.tsx +218 -0
  42. package/src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.types.ts +14 -0
  43. package/src/components/ds-table/components/ds-table-resize-handle/index.ts +1 -0
  44. package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.module.scss +18 -0
  45. package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.tsx +16 -0
  46. package/src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.types.ts +13 -0
  47. package/src/components/ds-table/components/ds-table-resize-overlay/index.ts +1 -0
  48. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +1 -1
  49. package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +9 -2
  50. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +2 -1
  51. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +9 -2
  52. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx +2 -2
  53. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx +2 -1
  54. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx +2 -1
  55. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx +2 -1
  56. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx +2 -1
  57. package/src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx +12 -3
  58. package/src/components/ds-table/context/ds-table-context.tsx +208 -0
  59. package/src/components/ds-table/ds-table-defaults.ts +42 -0
  60. package/src/components/ds-table/ds-table.module.scss +4 -1
  61. package/src/components/ds-table/ds-table.tsx +139 -214
  62. package/src/components/ds-table/ds-table.types.ts +53 -47
  63. package/src/components/ds-table/grouping/utils/column-group.ts +7 -5
  64. package/src/components/ds-table/hooks/use-cell-editor.ts +5 -1
  65. package/src/components/ds-table/hooks/use-column-resize.ts +385 -0
  66. package/src/components/ds-table/hooks/use-editing-state.ts +190 -0
  67. package/src/components/ds-table/index.ts +1 -0
  68. package/src/components/ds-table/styles/_variables.scss +2 -1
  69. package/src/components/ds-table/utils/column-size-meta.augmentation.ts +16 -0
  70. package/src/components/ds-table/utils/column-size.ts +213 -10
  71. package/src/components/ds-table/utils/column-size.unit.test.ts +213 -0
  72. package/src/components/ds-table/utils/constants.ts +28 -0
  73. package/src/components/ds-table/utils/frozen-body.ts +33 -0
  74. package/src/components/ds-table/utils/frozen-body.unit.test.ts +44 -0
  75. package/src/components/ds-table/utils/table-api.ts +42 -0
  76. package/src/components/ds-table/utils/table-api.unit.test.ts +82 -0
  77. package/src/components/ds-table/utils/table-columns.tsx +119 -0
  78. package/src/components/ds-table/utils/table-columns.unit.test.ts +199 -0
  79. package/src/components/ds-tag/ds-tag.figma.ts +51 -0
  80. package/src/components/ds-tag-filter/ds-tag-filter.figma.ts +16 -0
  81. package/src/components/ds-text-input/ds-input-field-v02.figma.ts +29 -4
  82. package/src/components/ds-text-input/ds-text-input.figma.ts +3 -2
  83. package/src/components/ds-text-input/ds-text-input.tsx +1 -0
  84. package/src/components/ds-text-input/ds-text-input.types.ts +1 -1
  85. package/src/components/ds-tree/ds-tree.figma.ts +54 -0
  86. package/src/components/ds-workspace-layout/ds-workspace-layout.figma.ts +99 -0
  87. package/src/components/ds-workspace-layout/ds-workspace-layout.module.scss +1 -8
  88. package/src/index.ts +1 -0
  89. package/src/styles/_gradients.scss +19 -0
  90. package/src/styles/_root.scss +39 -15
  91. package/src/styles/_typography.scss +1 -0
  92. package/src/styles/shared/_input.scss +10 -0
  93. package/src/styles/styles.scss +1 -0
  94. package/src/components/ds-table/context/ds-table-context.ts +0 -112
package/dist/index.cjs CHANGED
@@ -53,6 +53,7 @@ let _radix_ui_react_collapsible = require("@radix-ui/react-collapsible");
53
53
  _radix_ui_react_collapsible = __toESM(_radix_ui_react_collapsible, 1);
54
54
  let _ark_ui_react_radio_group = require("@ark-ui/react/radio-group");
55
55
  let _ark_ui_react_segment_group = require("@ark-ui/react/segment-group");
56
+ let _ark_ui_react_slider = require("@ark-ui/react/slider");
56
57
  let _zag_js_steps = require("@zag-js/steps");
57
58
  _zag_js_steps = __toESM(_zag_js_steps, 1);
58
59
  let _zag_js_react = require("@zag-js/react");
@@ -3583,110 +3584,122 @@ var ds_autocomplete_module_default = {
3583
3584
  "itemGroup": "pgg73q_itemGroup",
3584
3585
  "itemIcon": "pgg73q_itemIcon",
3585
3586
  "itemText": "pgg73q_itemText",
3587
+ "large": "pgg73q_large",
3586
3588
  "loading": "pgg73q_loading",
3587
3589
  "noMatches": "pgg73q_noMatches",
3588
3590
  "positioner": "pgg73q_positioner",
3589
3591
  "root": "pgg73q_root",
3592
+ "small": "pgg73q_small",
3590
3593
  "startAdornment": "pgg73q_startAdornment",
3591
3594
  "trigger": "pgg73q_trigger"
3592
3595
  };
3593
3596
  //#endregion
3594
3597
  //#region src/components/ds-autocomplete/ds-autocomplete.tsx
3595
3598
  const DsAutocomplete = (t0) => {
3596
- const $ = (0, react_compiler_runtime.c)(53);
3597
- const { id, options: t1, loading: t2, style, className, placeholder: t3, disabled: t4, invalid: t5, onValueChange, onInputValueChange, onOpenChange, locale: t6, highlightMatch: t7, showTrigger: t8, startAdornment } = t0;
3599
+ const $ = (0, react_compiler_runtime.c)(58);
3600
+ const { id, options: t1, loading: t2, size: t3, style, className, placeholder: t4, disabled: t5, invalid: t6, onValueChange, onInputValueChange, onOpenChange, locale: t7, highlightMatch: t8, showTrigger: t9, startAdornment } = t0;
3598
3601
  const options = t1 === void 0 ? [] : t1;
3599
3602
  const loading = t2 === void 0 ? false : t2;
3600
- const placeholder = t3 === void 0 ? "Start typing to search..." : t3;
3601
- const disabled = t4 === void 0 ? false : t4;
3602
- const invalid = t5 === void 0 ? false : t5;
3603
- let t9;
3604
- if ($[0] !== t6) {
3605
- t9 = t6 === void 0 ? {} : t6;
3606
- $[0] = t6;
3607
- $[1] = t9;
3608
- } else t9 = $[1];
3609
- const { loading: t10, noMatches: t11 } = t9;
3610
- const loadingMessage = t10 === void 0 ? "Loading..." : t10;
3611
- const noMatchesMessage = t11 === void 0 ? "No matches found" : t11;
3612
- const highlightMatch = t7 === void 0 ? true : t7;
3613
- const showTrigger = t8 === void 0 ? true : t8;
3603
+ const size = t3 === void 0 ? "default" : t3;
3604
+ const placeholder = t4 === void 0 ? "Start typing to search..." : t4;
3605
+ const disabled = t5 === void 0 ? false : t5;
3606
+ const invalid = t6 === void 0 ? false : t6;
3607
+ let t10;
3608
+ if ($[0] !== t7) {
3609
+ t10 = t7 === void 0 ? {} : t7;
3610
+ $[0] = t7;
3611
+ $[1] = t10;
3612
+ } else t10 = $[1];
3613
+ const { loading: t11, noMatches: t12 } = t10;
3614
+ const loadingMessage = t11 === void 0 ? "Loading..." : t11;
3615
+ const noMatchesMessage = t12 === void 0 ? "No matches found" : t12;
3616
+ const highlightMatch = t8 === void 0 ? true : t8;
3617
+ const showTrigger = t9 === void 0 ? true : t9;
3614
3618
  const [filterText, setFilterText] = (0, react.useState)("");
3615
- let t12;
3619
+ let t13;
3616
3620
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
3617
- t12 = { sensitivity: "base" };
3618
- $[2] = t12;
3619
- } else t12 = $[2];
3620
- const filterUtils = (0, _ark_ui_react_locale.useFilter)(t12);
3621
+ t13 = { sensitivity: "base" };
3622
+ $[2] = t13;
3623
+ } else t13 = $[2];
3624
+ const filterUtils = (0, _ark_ui_react_locale.useFilter)(t13);
3621
3625
  const collection = (0, _ark_ui_react_combobox.createListCollection)({
3622
3626
  items: filterText ? options.filter((opt) => filterUtils.contains(opt.label, filterText)) : options,
3623
- itemToString: _temp$17,
3627
+ itemToString: _temp$18,
3624
3628
  itemToValue: _temp2$9
3625
3629
  });
3626
- let t13;
3630
+ let t14;
3627
3631
  if ($[3] !== onInputValueChange) {
3628
- t13 = (details) => {
3632
+ t14 = (details) => {
3629
3633
  setFilterText(details.inputValue);
3630
3634
  onInputValueChange?.(details.inputValue);
3631
3635
  };
3632
3636
  $[3] = onInputValueChange;
3633
- $[4] = t13;
3634
- } else t13 = $[4];
3635
- const handleInputValueChange = t13;
3636
- let t14;
3637
+ $[4] = t14;
3638
+ } else t14 = $[4];
3639
+ const handleInputValueChange = t14;
3640
+ let t15;
3637
3641
  if ($[5] !== onValueChange) {
3638
- t14 = (details_0) => {
3642
+ t15 = (details_0) => {
3639
3643
  const selectedItem = details_0.items[0];
3640
3644
  onValueChange?.(selectedItem?.value ?? "");
3641
3645
  };
3642
3646
  $[5] = onValueChange;
3643
- $[6] = t14;
3644
- } else t14 = $[6];
3645
- const handleValueChange = t14;
3646
- let t15;
3647
+ $[6] = t15;
3648
+ } else t15 = $[6];
3649
+ const handleValueChange = t15;
3650
+ let t16;
3647
3651
  if ($[7] !== onOpenChange) {
3648
- t15 = (details_1) => {
3652
+ t16 = (details_1) => {
3649
3653
  onOpenChange?.(details_1.open);
3650
3654
  };
3651
3655
  $[7] = onOpenChange;
3652
- $[8] = t15;
3653
- } else t15 = $[8];
3654
- const handleOpenChange = t15;
3655
- let t16;
3656
+ $[8] = t16;
3657
+ } else t16 = $[8];
3658
+ const handleOpenChange = t16;
3659
+ let t17;
3656
3660
  if ($[9] !== className || $[10] !== disabled || $[11] !== invalid) {
3657
- t16 = (0, classnames.default)(ds_autocomplete_module_default.root, {
3661
+ t17 = (0, classnames.default)(ds_autocomplete_module_default.root, {
3658
3662
  [ds_autocomplete_module_default.disabled]: disabled,
3659
3663
  [ds_autocomplete_module_default.invalid]: invalid
3660
3664
  }, className);
3661
3665
  $[9] = className;
3662
3666
  $[10] = disabled;
3663
3667
  $[11] = invalid;
3664
- $[12] = t16;
3665
- } else t16 = $[12];
3666
- const rootClass = t16;
3667
- const t17 = _ark_ui_react_combobox.Combobox;
3668
- const t18 = true;
3669
- let t19;
3670
- if ($[13] !== startAdornment) {
3671
- t19 = startAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3668
+ $[12] = t17;
3669
+ } else t17 = $[12];
3670
+ const rootClass = t17;
3671
+ const t18 = _ark_ui_react_combobox.Combobox;
3672
+ const t19 = true;
3673
+ const t20 = size === "small" && ds_autocomplete_module_default.small;
3674
+ const t21 = size === "large" && ds_autocomplete_module_default.large;
3675
+ let t22;
3676
+ if ($[13] !== t20 || $[14] !== t21) {
3677
+ t22 = (0, classnames.default)(ds_autocomplete_module_default.control, t20, t21);
3678
+ $[13] = t20;
3679
+ $[14] = t21;
3680
+ $[15] = t22;
3681
+ } else t22 = $[15];
3682
+ let t23;
3683
+ if ($[16] !== startAdornment) {
3684
+ t23 = startAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
3672
3685
  className: ds_autocomplete_module_default.startAdornment,
3673
3686
  children: startAdornment
3674
3687
  });
3675
- $[13] = startAdornment;
3676
- $[14] = t19;
3677
- } else t19 = $[14];
3678
- let t20;
3679
- if ($[15] !== placeholder) {
3680
- t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.Input, {
3688
+ $[16] = startAdornment;
3689
+ $[17] = t23;
3690
+ } else t23 = $[17];
3691
+ let t24;
3692
+ if ($[18] !== placeholder) {
3693
+ t24 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.Input, {
3681
3694
  className: ds_autocomplete_module_default.input,
3682
3695
  placeholder
3683
3696
  });
3684
- $[15] = placeholder;
3685
- $[16] = t20;
3686
- } else t20 = $[16];
3687
- let t21;
3688
- if ($[17] !== disabled || $[18] !== showTrigger) {
3689
- t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.Context, { children: (combobox) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3697
+ $[18] = placeholder;
3698
+ $[19] = t24;
3699
+ } else t24 = $[19];
3700
+ let t25;
3701
+ if ($[20] !== disabled || $[21] !== showTrigger || $[22] !== size) {
3702
+ t25 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.Context, { children: (combobox) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3690
3703
  className: ds_autocomplete_module_default.iconContainer,
3691
3704
  children: [combobox.inputValue && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3692
3705
  type: "button",
@@ -3698,56 +3711,58 @@ const DsAutocomplete = (t0) => {
3698
3711
  },
3699
3712
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
3700
3713
  icon: "close",
3701
- size: "medium"
3714
+ size: size === "small" ? "small" : "medium"
3702
3715
  })
3703
3716
  }), showTrigger && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.Trigger, {
3704
3717
  className: ds_autocomplete_module_default.trigger,
3705
3718
  "aria-label": "Toggle dropdown",
3706
3719
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
3707
3720
  icon: "keyboard_arrow_down",
3708
- size: "medium"
3721
+ size: size === "small" ? "small" : "medium"
3709
3722
  })
3710
3723
  })]
3711
3724
  }) });
3712
- $[17] = disabled;
3713
- $[18] = showTrigger;
3714
- $[19] = t21;
3715
- } else t21 = $[19];
3716
- let t22;
3717
- if ($[20] !== t19 || $[21] !== t20 || $[22] !== t21) {
3718
- t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_combobox.Combobox.Control, {
3719
- className: ds_autocomplete_module_default.control,
3725
+ $[20] = disabled;
3726
+ $[21] = showTrigger;
3727
+ $[22] = size;
3728
+ $[23] = t25;
3729
+ } else t25 = $[23];
3730
+ let t26;
3731
+ if ($[24] !== t22 || $[25] !== t23 || $[26] !== t24 || $[27] !== t25) {
3732
+ t26 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_combobox.Combobox.Control, {
3733
+ className: t22,
3720
3734
  children: [
3721
- t19,
3722
- t20,
3723
- t21
3735
+ t23,
3736
+ t24,
3737
+ t25
3724
3738
  ]
3725
3739
  });
3726
- $[20] = t19;
3727
- $[21] = t20;
3728
- $[22] = t21;
3729
- $[23] = t22;
3730
- } else t22 = $[23];
3740
+ $[24] = t22;
3741
+ $[25] = t23;
3742
+ $[26] = t24;
3743
+ $[27] = t25;
3744
+ $[28] = t26;
3745
+ } else t26 = $[28];
3731
3746
  const T0 = _ark_ui_react_portal.Portal;
3732
- const t23 = _ark_ui_react_combobox.Combobox;
3733
- const t24 = ds_autocomplete_module_default;
3734
- const t25 = _ark_ui_react_combobox.Combobox;
3735
- const t26 = ds_autocomplete_module_default;
3736
- let t27;
3737
- if ($[24] !== loading || $[25] !== loadingMessage) {
3738
- t27 = loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3747
+ const t27 = _ark_ui_react_combobox.Combobox;
3748
+ const t28 = ds_autocomplete_module_default;
3749
+ const t29 = _ark_ui_react_combobox.Combobox;
3750
+ const t30 = ds_autocomplete_module_default;
3751
+ let t31;
3752
+ if ($[29] !== loading || $[30] !== loadingMessage) {
3753
+ t31 = loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3739
3754
  className: ds_autocomplete_module_default.loading,
3740
3755
  children: loadingMessage
3741
3756
  });
3742
- $[24] = loading;
3743
- $[25] = loadingMessage;
3744
- $[26] = t27;
3745
- } else t27 = $[26];
3746
- const t28 = !loading && collection.items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3757
+ $[29] = loading;
3758
+ $[30] = loadingMessage;
3759
+ $[31] = t31;
3760
+ } else t31 = $[31];
3761
+ const t32 = !loading && collection.items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3747
3762
  className: ds_autocomplete_module_default.noMatches,
3748
3763
  children: noMatchesMessage
3749
3764
  });
3750
- const t29 = !loading && collection.items.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.ItemGroup, {
3765
+ const t33 = !loading && collection.items.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_combobox.Combobox.ItemGroup, {
3751
3766
  className: ds_autocomplete_module_default.itemGroup,
3752
3767
  children: collection.items.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_combobox.Combobox.Item, {
3753
3768
  item: option,
@@ -3766,44 +3781,44 @@ const DsAutocomplete = (t0) => {
3766
3781
  })]
3767
3782
  }, option.value))
3768
3783
  });
3769
- let t30;
3770
- if ($[27] !== t25.Content || $[28] !== t26.content || $[29] !== t27 || $[30] !== t28 || $[31] !== t29) {
3771
- t30 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t25.Content, {
3772
- className: t26.content,
3784
+ let t34;
3785
+ if ($[32] !== t29.Content || $[33] !== t30.content || $[34] !== t31 || $[35] !== t32 || $[36] !== t33) {
3786
+ t34 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t29.Content, {
3787
+ className: t30.content,
3773
3788
  children: [
3774
- t27,
3775
- t28,
3776
- t29
3789
+ t31,
3790
+ t32,
3791
+ t33
3777
3792
  ]
3778
3793
  });
3779
- $[27] = t25.Content;
3780
- $[28] = t26.content;
3781
- $[29] = t27;
3782
- $[30] = t28;
3783
- $[31] = t29;
3784
- $[32] = t30;
3785
- } else t30 = $[32];
3786
- let t31;
3787
- if ($[33] !== t23.Positioner || $[34] !== t24.positioner || $[35] !== t30) {
3788
- t31 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(t23.Positioner, {
3789
- className: t24.positioner,
3790
- children: t30
3791
- });
3792
- $[33] = t23.Positioner;
3793
- $[34] = t24.positioner;
3794
- $[35] = t30;
3795
- $[36] = t31;
3796
- } else t31 = $[36];
3797
- let t32;
3798
- if ($[37] !== T0 || $[38] !== t31) {
3799
- t32 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(T0, { children: t31 });
3800
- $[37] = T0;
3801
- $[38] = t31;
3802
- $[39] = t32;
3803
- } else t32 = $[39];
3804
- let t33;
3805
- if ($[40] !== collection || $[41] !== disabled || $[42] !== handleInputValueChange || $[43] !== handleOpenChange || $[44] !== handleValueChange || $[45] !== id || $[46] !== invalid || $[47] !== rootClass || $[48] !== style || $[49] !== t17.Root || $[50] !== t22 || $[51] !== t32) {
3806
- t33 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t17.Root, {
3794
+ $[32] = t29.Content;
3795
+ $[33] = t30.content;
3796
+ $[34] = t31;
3797
+ $[35] = t32;
3798
+ $[36] = t33;
3799
+ $[37] = t34;
3800
+ } else t34 = $[37];
3801
+ let t35;
3802
+ if ($[38] !== t27.Positioner || $[39] !== t28.positioner || $[40] !== t34) {
3803
+ t35 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(t27.Positioner, {
3804
+ className: t28.positioner,
3805
+ children: t34
3806
+ });
3807
+ $[38] = t27.Positioner;
3808
+ $[39] = t28.positioner;
3809
+ $[40] = t34;
3810
+ $[41] = t35;
3811
+ } else t35 = $[41];
3812
+ let t36;
3813
+ if ($[42] !== T0 || $[43] !== t35) {
3814
+ t36 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(T0, { children: t35 });
3815
+ $[42] = T0;
3816
+ $[43] = t35;
3817
+ $[44] = t36;
3818
+ } else t36 = $[44];
3819
+ let t37;
3820
+ if ($[45] !== collection || $[46] !== disabled || $[47] !== handleInputValueChange || $[48] !== handleOpenChange || $[49] !== handleValueChange || $[50] !== id || $[51] !== invalid || $[52] !== rootClass || $[53] !== style || $[54] !== t18.Root || $[55] !== t26 || $[56] !== t36) {
3821
+ t37 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t18.Root, {
3807
3822
  id,
3808
3823
  collection,
3809
3824
  className: rootClass,
@@ -3813,33 +3828,40 @@ const DsAutocomplete = (t0) => {
3813
3828
  onInputValueChange: handleInputValueChange,
3814
3829
  onValueChange: handleValueChange,
3815
3830
  onOpenChange: handleOpenChange,
3816
- closeOnSelect: t18,
3817
- children: [t22, t32]
3818
- });
3819
- $[40] = collection;
3820
- $[41] = disabled;
3821
- $[42] = handleInputValueChange;
3822
- $[43] = handleOpenChange;
3823
- $[44] = handleValueChange;
3824
- $[45] = id;
3825
- $[46] = invalid;
3826
- $[47] = rootClass;
3827
- $[48] = style;
3828
- $[49] = t17.Root;
3829
- $[50] = t22;
3830
- $[51] = t32;
3831
- $[52] = t33;
3832
- } else t33 = $[52];
3833
- return t33;
3831
+ closeOnSelect: t19,
3832
+ children: [t26, t36]
3833
+ });
3834
+ $[45] = collection;
3835
+ $[46] = disabled;
3836
+ $[47] = handleInputValueChange;
3837
+ $[48] = handleOpenChange;
3838
+ $[49] = handleValueChange;
3839
+ $[50] = id;
3840
+ $[51] = invalid;
3841
+ $[52] = rootClass;
3842
+ $[53] = style;
3843
+ $[54] = t18.Root;
3844
+ $[55] = t26;
3845
+ $[56] = t36;
3846
+ $[57] = t37;
3847
+ } else t37 = $[57];
3848
+ return t37;
3834
3849
  };
3835
3850
  DsAutocomplete.displayName = "DsAutocomplete";
3836
- function _temp$17(item) {
3851
+ function _temp$18(item) {
3837
3852
  return item.label;
3838
3853
  }
3839
3854
  function _temp2$9(item_0) {
3840
3855
  return item_0.value;
3841
3856
  }
3842
3857
  //#endregion
3858
+ //#region src/components/ds-autocomplete/ds-autocomplete.types.ts
3859
+ const autocompleteSizes = [
3860
+ "small",
3861
+ "default",
3862
+ "large"
3863
+ ];
3864
+ //#endregion
3843
3865
  //#region src/components/ds-avatar/ds-avatar.module.scss
3844
3866
  var ds_avatar_module_default = {
3845
3867
  "avatar": "VcKEMW_avatar",
@@ -3938,11 +3960,11 @@ const DsAvatar = (t0) => {
3938
3960
  return t11;
3939
3961
  };
3940
3962
  DsAvatar.displayName = "DsAvatar";
3941
- function _temp$16(w) {
3963
+ function _temp$17(w) {
3942
3964
  return w[0];
3943
3965
  }
3944
3966
  function _temp2$8(name_0) {
3945
- return name_0.trim().split(" ").map(_temp$16).join("");
3967
+ return name_0.trim().split(" ").map(_temp$17).join("");
3946
3968
  }
3947
3969
  //#endregion
3948
3970
  //#region src/components/ds-avatar/ds-avatar.types.ts
@@ -4014,7 +4036,7 @@ const DsAvatarGroup = (t0) => {
4014
4036
  t6 = remainingCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
4015
4037
  content: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4016
4038
  className: ds_avatar_group_module_default.tooltipList,
4017
- children: hiddenAvatars.map(_temp$15)
4039
+ children: hiddenAvatars.map(_temp$16)
4018
4040
  }),
4019
4041
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4020
4042
  className: (0, classnames.default)(ds_avatar_group_module_default.moreAvatar, ds_avatar_group_module_default[size], ds_avatar_group_module_default[type]),
@@ -4048,7 +4070,7 @@ const DsAvatarGroup = (t0) => {
4048
4070
  return t7;
4049
4071
  };
4050
4072
  DsAvatarGroup.displayName = "DsAvatarGroup";
4051
- function _temp$15(avatar_0, index_0) {
4073
+ function _temp$16(avatar_0, index_0) {
4052
4074
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
4053
4075
  variant: "body-xs-reg",
4054
4076
  children: avatar_0.name
@@ -4102,6 +4124,7 @@ var ds_text_input_module_default = {
4102
4124
  "iconButton": "zbxt3W_iconButton",
4103
4125
  "indicator": "zbxt3W_indicator",
4104
4126
  "input": "zbxt3W_input",
4127
+ "large": "zbxt3W_large",
4105
4128
  "small": "zbxt3W_small",
4106
4129
  "textInputContainer": "zbxt3W_textInputContainer",
4107
4130
  "trigger": "zbxt3W_trigger"
@@ -4109,7 +4132,7 @@ var ds_text_input_module_default = {
4109
4132
  //#endregion
4110
4133
  //#region src/components/ds-text-input/ds-text-input.tsx
4111
4134
  const DsTextInput = (t0) => {
4112
- const $ = (0, react_compiler_runtime.c)(42);
4135
+ const $ = (0, react_compiler_runtime.c)(43);
4113
4136
  const { id, ref, name, size: t1, type: t2, onFocus, onBlur, onKeyDown, onChange, onValueChange, className, style: t3, value, defaultValue, min, max, minLength, maxLength, placeholder, disabled: t4, readOnly: t5, tabIndex, slots } = t0;
4114
4137
  const size = t1 === void 0 ? "default" : t1;
4115
4138
  const type = t2 === void 0 ? "text" : t2;
@@ -4125,51 +4148,54 @@ const DsTextInput = (t0) => {
4125
4148
  const InputWrapper = slots?.inputWrapper ?? react.Fragment;
4126
4149
  const t7 = size === "small";
4127
4150
  const t8 = size === "default";
4128
- let t9;
4129
- if ($[2] !== className || $[3] !== t7 || $[4] !== t8) {
4130
- t9 = (0, classnames.default)(ds_text_input_module_default.textInputContainer, {
4151
+ const t9 = size === "large";
4152
+ let t10;
4153
+ if ($[2] !== className || $[3] !== t7 || $[4] !== t8 || $[5] !== t9) {
4154
+ t10 = (0, classnames.default)(ds_text_input_module_default.textInputContainer, {
4131
4155
  [ds_text_input_module_default.small]: t7,
4132
- [ds_text_input_module_default.default]: t8
4156
+ [ds_text_input_module_default.default]: t8,
4157
+ [ds_text_input_module_default.large]: t9
4133
4158
  }, className);
4134
4159
  $[2] = className;
4135
4160
  $[3] = t7;
4136
4161
  $[4] = t8;
4137
4162
  $[5] = t9;
4138
- } else t9 = $[5];
4139
- const containerClass = t9;
4140
- let t10;
4141
- if ($[6] !== onChange || $[7] !== onValueChange) {
4142
- t10 = (event) => {
4163
+ $[6] = t10;
4164
+ } else t10 = $[6];
4165
+ const containerClass = t10;
4166
+ let t11;
4167
+ if ($[7] !== onChange || $[8] !== onValueChange) {
4168
+ t11 = (event) => {
4143
4169
  const newValue = event.target.value;
4144
4170
  onChange?.(event);
4145
4171
  onValueChange?.(newValue);
4146
4172
  };
4147
- $[6] = onChange;
4148
- $[7] = onValueChange;
4149
- $[8] = t10;
4150
- } else t10 = $[8];
4151
- const handleChange = t10;
4152
- let t11;
4153
- if ($[9] !== slots) {
4154
- t11 = slots?.startAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4173
+ $[7] = onChange;
4174
+ $[8] = onValueChange;
4175
+ $[9] = t11;
4176
+ } else t11 = $[9];
4177
+ const handleChange = t11;
4178
+ let t12;
4179
+ if ($[10] !== slots) {
4180
+ t12 = slots?.startAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4155
4181
  className: ds_text_input_module_default.adornment,
4156
4182
  children: slots.startAdornment
4157
4183
  });
4158
- $[9] = slots;
4159
- $[10] = t11;
4160
- } else t11 = $[10];
4161
- let t12;
4162
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
4163
- t12 = (0, classnames.default)(ds_text_input_module_default.input);
4184
+ $[10] = slots;
4164
4185
  $[11] = t12;
4165
4186
  } else t12 = $[11];
4166
4187
  let t13;
4167
- if ($[12] !== defaultValue || $[13] !== disabled || $[14] !== handleChange || $[15] !== id || $[16] !== max || $[17] !== maxLength || $[18] !== min || $[19] !== minLength || $[20] !== name || $[21] !== onBlur || $[22] !== onFocus || $[23] !== onKeyDown || $[24] !== placeholder || $[25] !== readOnly || $[26] !== ref || $[27] !== tabIndex || $[28] !== type || $[29] !== value) {
4168
- t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
4188
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
4189
+ t13 = (0, classnames.default)(ds_text_input_module_default.input);
4190
+ $[12] = t13;
4191
+ } else t13 = $[12];
4192
+ let t14;
4193
+ if ($[13] !== defaultValue || $[14] !== disabled || $[15] !== handleChange || $[16] !== id || $[17] !== max || $[18] !== maxLength || $[19] !== min || $[20] !== minLength || $[21] !== name || $[22] !== onBlur || $[23] !== onFocus || $[24] !== onKeyDown || $[25] !== placeholder || $[26] !== readOnly || $[27] !== ref || $[28] !== tabIndex || $[29] !== type || $[30] !== value) {
4194
+ t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
4169
4195
  id,
4170
4196
  ref,
4171
4197
  name,
4172
- className: t12,
4198
+ className: t13,
4173
4199
  type,
4174
4200
  value,
4175
4201
  defaultValue,
@@ -4186,66 +4212,70 @@ const DsTextInput = (t0) => {
4186
4212
  onChange: handleChange,
4187
4213
  tabIndex
4188
4214
  });
4189
- $[12] = defaultValue;
4190
- $[13] = disabled;
4191
- $[14] = handleChange;
4192
- $[15] = id;
4193
- $[16] = max;
4194
- $[17] = maxLength;
4195
- $[18] = min;
4196
- $[19] = minLength;
4197
- $[20] = name;
4198
- $[21] = onBlur;
4199
- $[22] = onFocus;
4200
- $[23] = onKeyDown;
4201
- $[24] = placeholder;
4202
- $[25] = readOnly;
4203
- $[26] = ref;
4204
- $[27] = tabIndex;
4205
- $[28] = type;
4206
- $[29] = value;
4207
- $[30] = t13;
4208
- } else t13 = $[30];
4209
- let t14;
4210
- if ($[31] !== InputWrapper || $[32] !== t13) {
4211
- t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputWrapper, { children: t13 });
4212
- $[31] = InputWrapper;
4213
- $[32] = t13;
4214
- $[33] = t14;
4215
- } else t14 = $[33];
4215
+ $[13] = defaultValue;
4216
+ $[14] = disabled;
4217
+ $[15] = handleChange;
4218
+ $[16] = id;
4219
+ $[17] = max;
4220
+ $[18] = maxLength;
4221
+ $[19] = min;
4222
+ $[20] = minLength;
4223
+ $[21] = name;
4224
+ $[22] = onBlur;
4225
+ $[23] = onFocus;
4226
+ $[24] = onKeyDown;
4227
+ $[25] = placeholder;
4228
+ $[26] = readOnly;
4229
+ $[27] = ref;
4230
+ $[28] = tabIndex;
4231
+ $[29] = type;
4232
+ $[30] = value;
4233
+ $[31] = t14;
4234
+ } else t14 = $[31];
4216
4235
  let t15;
4217
- if ($[34] !== slots) {
4218
- t15 = slots?.endAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4236
+ if ($[32] !== InputWrapper || $[33] !== t14) {
4237
+ t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputWrapper, { children: t14 });
4238
+ $[32] = InputWrapper;
4239
+ $[33] = t14;
4240
+ $[34] = t15;
4241
+ } else t15 = $[34];
4242
+ let t16;
4243
+ if ($[35] !== slots) {
4244
+ t16 = slots?.endAdornment && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
4219
4245
  className: ds_text_input_module_default.adornment,
4220
4246
  children: slots.endAdornment
4221
4247
  });
4222
- $[34] = slots;
4223
- $[35] = t15;
4224
- } else t15 = $[35];
4225
- let t16;
4226
- if ($[36] !== containerClass || $[37] !== style || $[38] !== t11 || $[39] !== t14 || $[40] !== t15) {
4227
- t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4248
+ $[35] = slots;
4249
+ $[36] = t16;
4250
+ } else t16 = $[36];
4251
+ let t17;
4252
+ if ($[37] !== containerClass || $[38] !== style || $[39] !== t12 || $[40] !== t15 || $[41] !== t16) {
4253
+ t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
4228
4254
  className: containerClass,
4229
4255
  style,
4230
4256
  children: [
4231
- t11,
4232
- t14,
4233
- t15
4257
+ t12,
4258
+ t15,
4259
+ t16
4234
4260
  ]
4235
4261
  });
4236
- $[36] = containerClass;
4237
- $[37] = style;
4238
- $[38] = t11;
4239
- $[39] = t14;
4262
+ $[37] = containerClass;
4263
+ $[38] = style;
4264
+ $[39] = t12;
4240
4265
  $[40] = t15;
4241
4266
  $[41] = t16;
4242
- } else t16 = $[41];
4243
- return t16;
4267
+ $[42] = t17;
4268
+ } else t17 = $[42];
4269
+ return t17;
4244
4270
  };
4245
4271
  DsTextInput.displayName = "DsTextInput";
4246
4272
  //#endregion
4247
4273
  //#region src/components/ds-text-input/ds-text-input.types.ts
4248
- const textInputSizes = ["small", "default"];
4274
+ const textInputSizes = [
4275
+ "small",
4276
+ "default",
4277
+ "large"
4278
+ ];
4249
4279
  //#endregion
4250
4280
  //#region src/components/ds-dropdown-menu/ds-dropdown-menu.tsx
4251
4281
  const GroupContext = (0, react.createContext)(null);
@@ -4609,7 +4639,7 @@ const ItemGroupLabel = (t0) => {
4609
4639
  className: t1,
4610
4640
  style,
4611
4641
  onClick: toggle,
4612
- onKeyDown: _temp$14,
4642
+ onKeyDown: _temp$15,
4613
4643
  children: [t2, t5]
4614
4644
  })
4615
4645
  });
@@ -4924,7 +4954,7 @@ DsDropdownMenu.ItemGroupLabel.displayName = "DsDropdownMenu.ItemGroupLabel";
4924
4954
  DsDropdownMenu.ItemGroupContent.displayName = "DsDropdownMenu.ItemGroupContent";
4925
4955
  DsDropdownMenu.Separator.displayName = "DsDropdownMenu.Separator";
4926
4956
  DsDropdownMenuLegacy.displayName = "DsDropdownMenuLegacy";
4927
- function _temp$14(e) {
4957
+ function _temp$15(e) {
4928
4958
  return e.stopPropagation();
4929
4959
  }
4930
4960
  function _temp2$7(e) {
@@ -4990,7 +5020,7 @@ const DsBreadcrumb = (t0) => {
4990
5020
  placeholder: "Search",
4991
5021
  value: search,
4992
5022
  onValueChange: setSearch,
4993
- onKeyDown: _temp$13,
5023
+ onKeyDown: _temp$14,
4994
5024
  slots: { startAdornment: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
4995
5025
  icon: "search",
4996
5026
  size: "tiny"
@@ -5047,7 +5077,7 @@ const DsBreadcrumb = (t0) => {
5047
5077
  return t4;
5048
5078
  };
5049
5079
  DsBreadcrumb.displayName = "DsBreadcrumb";
5050
- function _temp$13(e) {
5080
+ function _temp$14(e) {
5051
5081
  return e.stopPropagation();
5052
5082
  }
5053
5083
  //#endregion
@@ -5503,7 +5533,7 @@ const iconSizeMap = Object.freeze({
5503
5533
  * @summary action button with color/variant/size, icon-only, loading and selected states
5504
5534
  */
5505
5535
  const DsButtonV3$1 = (t0) => {
5506
- const $ = (0, react_compiler_runtime.c)(37);
5536
+ const $ = (0, react_compiler_runtime.c)(39);
5507
5537
  let children;
5508
5538
  let className;
5509
5539
  let disabled;
@@ -5517,8 +5547,9 @@ const DsButtonV3$1 = (t0) => {
5517
5547
  let t4;
5518
5548
  let t5;
5519
5549
  let t6;
5550
+ let t7;
5520
5551
  if ($[0] !== t0) {
5521
- ({ref, className, style, children, icon, disabled, loading: t1, color: t2, variant: t3, size: t4, selected: t5, type: t6, ...rest} = t0);
5552
+ ({ref, className, style, children, icon, disabled, loading: t1, color: t2, variant: t3, size: t4, selected: t5, highEmphasis: t6, type: t7, ...rest} = t0);
5522
5553
  $[0] = t0;
5523
5554
  $[1] = children;
5524
5555
  $[2] = className;
@@ -5533,6 +5564,7 @@ const DsButtonV3$1 = (t0) => {
5533
5564
  $[11] = t4;
5534
5565
  $[12] = t5;
5535
5566
  $[13] = t6;
5567
+ $[14] = t7;
5536
5568
  } else {
5537
5569
  children = $[1];
5538
5570
  className = $[2];
@@ -5547,80 +5579,86 @@ const DsButtonV3$1 = (t0) => {
5547
5579
  t4 = $[11];
5548
5580
  t5 = $[12];
5549
5581
  t6 = $[13];
5582
+ t7 = $[14];
5550
5583
  }
5551
5584
  const loading = t1 === void 0 ? false : t1;
5552
5585
  const color = t2 === void 0 ? "default" : t2;
5553
5586
  const variant = t3 === void 0 ? "primary" : t3;
5554
5587
  const size = t4 === void 0 ? "medium" : t4;
5555
5588
  const selected = t5 === void 0 ? false : t5;
5556
- const type = t6 === void 0 ? "button" : t6;
5589
+ const highEmphasis = t6 === void 0 ? false : t6;
5590
+ const type = t7 === void 0 ? "button" : t7;
5557
5591
  const isIconOnly = icon !== void 0 && !children;
5558
- const t7 = disabled || loading;
5559
- const t8 = loading || void 0;
5560
- let t9;
5561
- if ($[14] !== className) {
5562
- t9 = (0, classnames.default)(ds_button_v3_module_default.root, className);
5563
- $[14] = className;
5564
- $[15] = t9;
5565
- } else t9 = $[15];
5566
- const t10 = selected ? "true" : void 0;
5567
- const t11 = isIconOnly || void 0;
5568
- const t12 = loading && !disabled ? "" : void 0;
5569
- let t13;
5570
- if ($[16] !== icon || $[17] !== loading || $[18] !== size) {
5571
- t13 = loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSpinner, {}) : icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
5592
+ const t8 = disabled || loading;
5593
+ const t9 = loading || void 0;
5594
+ let t10;
5595
+ if ($[15] !== className) {
5596
+ t10 = (0, classnames.default)(ds_button_v3_module_default.root, className);
5597
+ $[15] = className;
5598
+ $[16] = t10;
5599
+ } else t10 = $[16];
5600
+ const t11 = selected ? "true" : void 0;
5601
+ const t12 = highEmphasis ? "true" : void 0;
5602
+ const t13 = isIconOnly || void 0;
5603
+ const t14 = loading && !disabled ? "" : void 0;
5604
+ let t15;
5605
+ if ($[17] !== icon || $[18] !== loading || $[19] !== size) {
5606
+ t15 = loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSpinner, {}) : icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
5572
5607
  icon,
5573
5608
  size: iconSizeMap[size],
5574
5609
  "aria-hidden": true
5575
5610
  });
5576
- $[16] = icon;
5577
- $[17] = loading;
5578
- $[18] = size;
5579
- $[19] = t13;
5580
- } else t13 = $[19];
5581
- let t14;
5582
- if ($[20] !== children || $[21] !== color || $[22] !== ref || $[23] !== rest || $[24] !== selected || $[25] !== size || $[26] !== style || $[27] !== t10 || $[28] !== t11 || $[29] !== t12 || $[30] !== t13 || $[31] !== t7 || $[32] !== t8 || $[33] !== t9 || $[34] !== type || $[35] !== variant) {
5583
- t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
5611
+ $[17] = icon;
5612
+ $[18] = loading;
5613
+ $[19] = size;
5614
+ $[20] = t15;
5615
+ } else t15 = $[20];
5616
+ let t16;
5617
+ if ($[21] !== children || $[22] !== color || $[23] !== ref || $[24] !== rest || $[25] !== selected || $[26] !== size || $[27] !== style || $[28] !== t10 || $[29] !== t11 || $[30] !== t12 || $[31] !== t13 || $[32] !== t14 || $[33] !== t15 || $[34] !== t8 || $[35] !== t9 || $[36] !== type || $[37] !== variant) {
5618
+ t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
5584
5619
  ref,
5585
5620
  type,
5586
- disabled: t7,
5587
- "aria-busy": t8,
5621
+ disabled: t8,
5622
+ "aria-busy": t9,
5588
5623
  "aria-pressed": selected,
5589
- className: t9,
5624
+ className: t10,
5590
5625
  style,
5591
5626
  "data-color": color,
5592
5627
  "data-variant": variant,
5593
5628
  "data-size": size,
5594
- "data-selected": t10,
5595
- "data-icon-only": t11,
5596
- "data-loading": t12,
5629
+ "data-selected": t11,
5630
+ "data-high-emphasis": t12,
5631
+ "data-icon-only": t13,
5632
+ "data-loading": t14,
5597
5633
  ...rest,
5598
- children: [t13, children]
5599
- });
5600
- $[20] = children;
5601
- $[21] = color;
5602
- $[22] = ref;
5603
- $[23] = rest;
5604
- $[24] = selected;
5605
- $[25] = size;
5606
- $[26] = style;
5607
- $[27] = t10;
5608
- $[28] = t11;
5609
- $[29] = t12;
5610
- $[30] = t13;
5611
- $[31] = t7;
5612
- $[32] = t8;
5613
- $[33] = t9;
5614
- $[34] = type;
5615
- $[35] = variant;
5616
- $[36] = t14;
5617
- } else t14 = $[36];
5618
- return t14;
5634
+ children: [t15, children]
5635
+ });
5636
+ $[21] = children;
5637
+ $[22] = color;
5638
+ $[23] = ref;
5639
+ $[24] = rest;
5640
+ $[25] = selected;
5641
+ $[26] = size;
5642
+ $[27] = style;
5643
+ $[28] = t10;
5644
+ $[29] = t11;
5645
+ $[30] = t12;
5646
+ $[31] = t13;
5647
+ $[32] = t14;
5648
+ $[33] = t15;
5649
+ $[34] = t8;
5650
+ $[35] = t9;
5651
+ $[36] = type;
5652
+ $[37] = variant;
5653
+ $[38] = t16;
5654
+ } else t16 = $[38];
5655
+ return t16;
5619
5656
  };
5620
5657
  //#endregion
5621
5658
  //#region src/components/ds-button-v3/ds-button-v3.types.ts
5622
5659
  const buttonV3Variants = [
5623
5660
  "primary",
5661
+ "primary-subtle",
5624
5662
  "secondary",
5625
5663
  "tertiary"
5626
5664
  ];
@@ -7317,7 +7355,7 @@ const DsCommentThread = (t0) => {
7317
7355
  const bottomRef = (0, react.useRef)(null);
7318
7356
  let t1;
7319
7357
  if ($[0] !== messages) {
7320
- t1 = messages.find(_temp$12) || messages[0];
7358
+ t1 = messages.find(_temp$13) || messages[0];
7321
7359
  $[0] = messages;
7322
7360
  $[1] = t1;
7323
7361
  } else t1 = $[1];
@@ -7458,7 +7496,7 @@ const DsCommentThread = (t0) => {
7458
7496
  return t22;
7459
7497
  };
7460
7498
  DsCommentThread.displayName = "DsCommentThread";
7461
- function _temp$12(m) {
7499
+ function _temp$13(m) {
7462
7500
  return m.isInitialMessage;
7463
7501
  }
7464
7502
  //#endregion
@@ -8182,7 +8220,7 @@ const DsCommentCard = (t0) => {
8182
8220
  const { numericId, author, createdAt, messages, referenceTag, isActionRequired } = comment;
8183
8221
  let t4;
8184
8222
  if ($[0] !== messages) {
8185
- t4 = messages.find(_temp$11) || messages[0];
8223
+ t4 = messages.find(_temp$12) || messages[0];
8186
8224
  $[0] = messages;
8187
8225
  $[1] = t4;
8188
8226
  } else t4 = $[1];
@@ -8507,7 +8545,7 @@ const DsCommentCard = (t0) => {
8507
8545
  return t34;
8508
8546
  };
8509
8547
  DsCommentCard.displayName = "DsCommentCard";
8510
- function _temp$11(m) {
8548
+ function _temp$12(m) {
8511
8549
  return m.isInitialMessage;
8512
8550
  }
8513
8551
  function _temp2$6(m_0) {
@@ -9955,7 +9993,7 @@ const DsTabsTab = (t0) => {
9955
9993
  })
9956
9994
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsDropdownMenu.Content, {
9957
9995
  className: ds_tabs_tab_module_default.menuContent,
9958
- children: menuActionItems.map(_temp$10)
9996
+ children: menuActionItems.map(_temp$11)
9959
9997
  })]
9960
9998
  });
9961
9999
  $[17] = handleMenuActionSelect;
@@ -9994,7 +10032,7 @@ const DsTabsTab = (t0) => {
9994
10032
  return t6;
9995
10033
  };
9996
10034
  DsTabsTab.displayName = "DsTabs.Tab";
9997
- function _temp$10(item) {
10035
+ function _temp$11(item) {
9998
10036
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsDropdownMenu.Item, {
9999
10037
  value: item.value,
10000
10038
  disabled: item.disabled,
@@ -10521,7 +10559,7 @@ const YearView$1 = () => {
10521
10559
  return t0;
10522
10560
  };
10523
10561
  DsDateInput.displayName = "DsDateInput";
10524
- function _temp$9(weekDay, id) {
10562
+ function _temp$10(weekDay, id) {
10525
10563
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableHeader, {
10526
10564
  className: ds_date_input_module_default.tableHeader,
10527
10565
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
@@ -10556,7 +10594,7 @@ function _temp4$2(datePicker) {
10556
10594
  className: ds_date_input_module_default.tableHead,
10557
10595
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableRow, {
10558
10596
  className: ds_date_input_module_default.tableRow,
10559
- children: datePicker.weekDays.map(_temp$9)
10597
+ children: datePicker.weekDays.map(_temp$10)
10560
10598
  })
10561
10599
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableBody, {
10562
10600
  className: ds_date_input_module_default.tableBody,
@@ -11199,7 +11237,7 @@ const DsCommentsDrawer = (t0) => {
11199
11237
  authorsMap.set(comment.author.id, comment.author.name);
11200
11238
  comment.labels?.forEach((label) => labelsSet.add(label));
11201
11239
  });
11202
- availableAuthors = Array.from(authorsMap.entries()).map(_temp$8);
11240
+ availableAuthors = Array.from(authorsMap.entries()).map(_temp$9);
11203
11241
  availableLabels = Array.from(labelsSet);
11204
11242
  let filteredComments = comments;
11205
11243
  if (!showResolved) filteredComments = filteredComments.filter(_temp2$4);
@@ -11552,7 +11590,7 @@ const DsCommentsDrawer = (t0) => {
11552
11590
  return t18;
11553
11591
  };
11554
11592
  DsCommentsDrawer.displayName = "DsCommentsDrawer";
11555
- function _temp$8(t0) {
11593
+ function _temp$9(t0) {
11556
11594
  const [id, name] = t0;
11557
11595
  return {
11558
11596
  id,
@@ -12356,7 +12394,7 @@ const DayView = (t0) => {
12356
12394
  className: calendar_table_module_default.table,
12357
12395
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableHead, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableRow, {
12358
12396
  className: calendar_table_module_default.tableRow,
12359
- children: datePicker.weekDays.map(_temp$7)
12397
+ children: datePicker.weekDays.map(_temp$8)
12360
12398
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableBody, {
12361
12399
  className: calendar_table_module_default.tableBody,
12362
12400
  children: datePicker.weeks.map(_temp3$3)
@@ -12371,7 +12409,7 @@ const DayView = (t0) => {
12371
12409
  } else t1 = $[1];
12372
12410
  return t1;
12373
12411
  };
12374
- function _temp$7(weekDay, idx) {
12412
+ function _temp$8(weekDay, idx) {
12375
12413
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableHeader, {
12376
12414
  className: calendar_table_module_default.tableHeader,
12377
12415
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
@@ -12415,7 +12453,7 @@ const MonthView = () => {
12415
12453
  } else t0 = $[0];
12416
12454
  return t0;
12417
12455
  };
12418
- function _temp$6(month, monthIdx) {
12456
+ function _temp$7(month, monthIdx) {
12419
12457
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableCell, {
12420
12458
  value: month.value,
12421
12459
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableCellTrigger, {
@@ -12430,7 +12468,7 @@ function _temp$6(month, monthIdx) {
12430
12468
  function _temp2$2(months, rowIdx) {
12431
12469
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableRow, {
12432
12470
  className: calendar_table_module_default.tableRow,
12433
- children: months.map(_temp$6)
12471
+ children: months.map(_temp$7)
12434
12472
  }, rowIdx);
12435
12473
  }
12436
12474
  function _temp3$2(datePicker) {
@@ -12462,7 +12500,7 @@ const YearView = () => {
12462
12500
  } else t0 = $[0];
12463
12501
  return t0;
12464
12502
  };
12465
- function _temp$5(year, yearIdx) {
12503
+ function _temp$6(year, yearIdx) {
12466
12504
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableCell, {
12467
12505
  value: year.value,
12468
12506
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableCellTrigger, {
@@ -12477,7 +12515,7 @@ function _temp$5(year, yearIdx) {
12477
12515
  function _temp2$1(years, rowIdx) {
12478
12516
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_date_picker.DatePicker.TableRow, {
12479
12517
  className: calendar_table_module_default.tableRow,
12480
- children: years.map(_temp$5)
12518
+ children: years.map(_temp$6)
12481
12519
  }, rowIdx);
12482
12520
  }
12483
12521
  function _temp3$1(datePicker) {
@@ -12953,6 +12991,7 @@ var ds_select_module_default = {
12953
12991
  "item": "KdTZ_G_item",
12954
12992
  "itemIcon": "KdTZ_G_itemIcon",
12955
12993
  "itemValue": "KdTZ_G_itemValue",
12994
+ "large": "KdTZ_G_large",
12956
12995
  "multiSelectItemsContainer": "KdTZ_G_multiSelectItemsContainer",
12957
12996
  "searchIcon": "KdTZ_G_searchIcon",
12958
12997
  "searchInput": "KdTZ_G_searchInput",
@@ -13064,7 +13103,7 @@ const SELECT_ALL_OPTION = {
13064
13103
  value: SELECT_ALL_VALUE
13065
13104
  };
13066
13105
  const DsSelect = (t0) => {
13067
- const $ = (0, react_compiler_runtime.c)(29);
13106
+ const $ = (0, react_compiler_runtime.c)(30);
13068
13107
  const { id, options: userOptions, value, style, size, clearable, onClear, onBlur, className, placeholder: t1, disabled, renderOption, ...multiselectProps } = t0;
13069
13108
  const placeholder = t1 === void 0 ? "Click to select a value" : t1;
13070
13109
  const [searchTerm, setSearchTerm] = (0, react.useState)("");
@@ -13072,7 +13111,7 @@ const DsSelect = (t0) => {
13072
13111
  const internalOptions = multiselectProps.multiple ? [SELECT_ALL_OPTION, ...userOptions] : userOptions;
13073
13112
  const collection = (0, _ark_ui_react_select.createListCollection)({
13074
13113
  items: internalOptions,
13075
- itemToValue: _temp$4
13114
+ itemToValue: _temp$5
13076
13115
  });
13077
13116
  let t2;
13078
13117
  if ($[0] !== searchTerm) {
@@ -13134,29 +13173,31 @@ const DsSelect = (t0) => {
13134
13173
  });
13135
13174
  };
13136
13175
  const t4 = size === "small" && ds_select_module_default.small;
13137
- let t5;
13138
- if ($[3] !== className || $[4] !== t4) {
13139
- t5 = (0, classnames.default)(ds_select_module_default.control, t4, className);
13176
+ const t5 = size === "large" && ds_select_module_default.large;
13177
+ let t6;
13178
+ if ($[3] !== className || $[4] !== t4 || $[5] !== t5) {
13179
+ t6 = (0, classnames.default)(ds_select_module_default.control, t4, t5, className);
13140
13180
  $[3] = className;
13141
13181
  $[4] = t4;
13142
13182
  $[5] = t5;
13143
- } else t5 = $[5];
13144
- const t6 = size === "small" ? "small" : "medium";
13145
- let t7;
13146
- if ($[6] !== t6) {
13147
- t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.Indicator, {
13183
+ $[6] = t6;
13184
+ } else t6 = $[6];
13185
+ const t7 = size === "small" ? "small" : "medium";
13186
+ let t8;
13187
+ if ($[7] !== t7) {
13188
+ t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.Indicator, {
13148
13189
  className: ds_select_module_default.triggerIcon,
13149
13190
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
13150
13191
  icon: "keyboard_arrow_down",
13151
- size: t6
13192
+ size: t7
13152
13193
  })
13153
13194
  });
13154
- $[6] = t6;
13155
13195
  $[7] = t7;
13156
- } else t7 = $[7];
13157
- let t8;
13158
- if ($[8] !== clearable || $[9] !== onClear || $[10] !== size) {
13159
- t8 = clearable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.ClearTrigger, {
13196
+ $[8] = t8;
13197
+ } else t8 = $[8];
13198
+ let t9;
13199
+ if ($[9] !== clearable || $[10] !== onClear || $[11] !== size) {
13200
+ t9 = clearable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.ClearTrigger, {
13160
13201
  className: ds_select_module_default.clearIcon,
13161
13202
  onClick: onClear,
13162
13203
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
@@ -13164,19 +13205,19 @@ const DsSelect = (t0) => {
13164
13205
  size: size === "small" ? "small" : "medium"
13165
13206
  })
13166
13207
  });
13167
- $[8] = clearable;
13168
- $[9] = onClear;
13169
- $[10] = size;
13170
- $[11] = t8;
13171
- } else t8 = $[11];
13208
+ $[9] = clearable;
13209
+ $[10] = onClear;
13210
+ $[11] = size;
13211
+ $[12] = t9;
13212
+ } else t9 = $[12];
13172
13213
  const T0 = _ark_ui_react_portal.Portal;
13173
- const t9 = _ark_ui_react_select.Select;
13174
- const t10 = ds_select_module_default;
13175
- const t11 = _ark_ui_react_select.Select;
13176
- const t12 = ds_select_module_default;
13177
- let t13;
13178
- if ($[12] !== searchTerm || $[13] !== userOptions.length) {
13179
- t13 = userOptions.length > SEARCH_THRESHOLD && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13214
+ const t10 = _ark_ui_react_select.Select;
13215
+ const t11 = ds_select_module_default;
13216
+ const t12 = _ark_ui_react_select.Select;
13217
+ const t13 = ds_select_module_default;
13218
+ let t14;
13219
+ if ($[13] !== searchTerm || $[14] !== userOptions.length) {
13220
+ t14 = userOptions.length > SEARCH_THRESHOLD && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13180
13221
  className: ds_select_module_default.searchInput,
13181
13222
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTextInput, {
13182
13223
  placeholder: "Search",
@@ -13189,17 +13230,17 @@ const DsSelect = (t0) => {
13189
13230
  }) }
13190
13231
  })
13191
13232
  });
13192
- $[12] = searchTerm;
13193
- $[13] = userOptions.length;
13194
- $[14] = t13;
13195
- } else t13 = $[14];
13196
- const t14 = multiselectProps.multiple && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectItemsChips, {
13233
+ $[13] = searchTerm;
13234
+ $[14] = userOptions.length;
13235
+ $[15] = t14;
13236
+ } else t14 = $[15];
13237
+ const t15 = multiselectProps.multiple && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectItemsChips, {
13197
13238
  onValueChange: multiselectProps.onValueChange,
13198
13239
  showAll: showAllItems,
13199
13240
  onShowAll: () => setShowAllItems(true),
13200
13241
  count: 6
13201
13242
  });
13202
- const t15 = filteredOptions.map((item_0) => {
13243
+ const t16 = filteredOptions.map((item_0) => {
13203
13244
  const checked = getItemCheckedState({
13204
13245
  item: item_0,
13205
13246
  select,
@@ -13223,52 +13264,52 @@ const DsSelect = (t0) => {
13223
13264
  })
13224
13265
  }, collection.getItemValue(item_0));
13225
13266
  });
13226
- let t16;
13227
- if ($[15] !== t11.Content || $[16] !== t12.content || $[17] !== t13 || $[18] !== t14 || $[19] !== t15) {
13228
- t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t11.Content, {
13229
- className: t12.content,
13267
+ let t17;
13268
+ if ($[16] !== t12.Content || $[17] !== t13.content || $[18] !== t14 || $[19] !== t15 || $[20] !== t16) {
13269
+ t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(t12.Content, {
13270
+ className: t13.content,
13230
13271
  children: [
13231
- t13,
13232
13272
  t14,
13233
- t15
13273
+ t15,
13274
+ t16
13234
13275
  ]
13235
13276
  });
13236
- $[15] = t11.Content;
13237
- $[16] = t12.content;
13238
- $[17] = t13;
13277
+ $[16] = t12.Content;
13278
+ $[17] = t13.content;
13239
13279
  $[18] = t14;
13240
13280
  $[19] = t15;
13241
13281
  $[20] = t16;
13242
- } else t16 = $[20];
13243
- let t17;
13244
- if ($[21] !== t10.viewport || $[22] !== t16 || $[23] !== t9.Positioner) {
13245
- t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(t9.Positioner, {
13246
- className: t10.viewport,
13247
- children: t16
13282
+ $[21] = t17;
13283
+ } else t17 = $[21];
13284
+ let t18;
13285
+ if ($[22] !== t10.Positioner || $[23] !== t11.viewport || $[24] !== t17) {
13286
+ t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(t10.Positioner, {
13287
+ className: t11.viewport,
13288
+ children: t17
13248
13289
  });
13249
- $[21] = t10.viewport;
13250
- $[22] = t16;
13251
- $[23] = t9.Positioner;
13290
+ $[22] = t10.Positioner;
13291
+ $[23] = t11.viewport;
13252
13292
  $[24] = t17;
13253
- } else t17 = $[24];
13254
- let t18;
13255
- if ($[25] !== T0 || $[26] !== t17) {
13256
- t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(T0, { children: t17 });
13257
- $[25] = T0;
13258
- $[26] = t17;
13259
- $[27] = t18;
13260
- } else t18 = $[27];
13293
+ $[25] = t18;
13294
+ } else t18 = $[25];
13261
13295
  let t19;
13262
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
13263
- t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.HiddenSelect, { style: { display: "none" } });
13296
+ if ($[26] !== T0 || $[27] !== t18) {
13297
+ t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(T0, { children: t18 });
13298
+ $[26] = T0;
13299
+ $[27] = t18;
13264
13300
  $[28] = t19;
13265
13301
  } else t19 = $[28];
13302
+ let t20;
13303
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
13304
+ t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_select.Select.HiddenSelect, { style: { display: "none" } });
13305
+ $[29] = t20;
13306
+ } else t20 = $[29];
13266
13307
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_select.Select.RootProvider, {
13267
13308
  value: select,
13268
13309
  lazyMount: true,
13269
13310
  children: [
13270
13311
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_select.Select.Control, {
13271
- className: t5,
13312
+ className: t6,
13272
13313
  style,
13273
13314
  onBlur,
13274
13315
  onKeyDown: (e) => {
@@ -13284,11 +13325,11 @@ const DsSelect = (t0) => {
13284
13325
  id,
13285
13326
  className: ds_select_module_default.trigger,
13286
13327
  "aria-labelledby": null,
13287
- children: [renderTriggerValue(), t7]
13288
- }), t8]
13328
+ children: [renderTriggerValue(), t8]
13329
+ }), t9]
13289
13330
  }),
13290
- t18,
13291
- t19
13331
+ t19,
13332
+ t20
13292
13333
  ]
13293
13334
  });
13294
13335
  };
@@ -13298,7 +13339,7 @@ function getItemCheckedState({ item, select, options }) {
13298
13339
  return select.hasSelectedItems ? "indeterminate" : false;
13299
13340
  }
13300
13341
  DsSelect.displayName = "DsSelect";
13301
- function _temp$4(item) {
13342
+ function _temp$5(item) {
13302
13343
  return item.value;
13303
13344
  }
13304
13345
  function _temp2(value_0) {
@@ -13320,6 +13361,7 @@ var ds_number_input_module_default = {
13320
13361
  "iconButton": "XMQUTG_iconButton",
13321
13362
  "indicator": "XMQUTG_indicator",
13322
13363
  "input": "XMQUTG_input",
13364
+ "large": "XMQUTG_large",
13323
13365
  "small": "XMQUTG_small",
13324
13366
  "textInputContainer": "XMQUTG_textInputContainer",
13325
13367
  "trigger": "XMQUTG_trigger"
@@ -13485,6 +13527,7 @@ var ds_password_input_module_default = {
13485
13527
  "iconButton": "v5YZUq_iconButton",
13486
13528
  "indicator": "v5YZUq_indicator",
13487
13529
  "input": "v5YZUq_input",
13530
+ "large": "v5YZUq_large",
13488
13531
  "small": "v5YZUq_small",
13489
13532
  "textInputContainer": "v5YZUq_textInputContainer",
13490
13533
  "trigger": "v5YZUq_trigger"
@@ -14554,7 +14597,7 @@ const FileUploadItem = (t0) => {
14554
14597
  } else t20 = $[46];
14555
14598
  let t21;
14556
14599
  if ($[47] !== errors || $[48] !== status) {
14557
- t21 = status === "error" && errors?.length && errors.map(_temp$3);
14600
+ t21 = status === "error" && errors?.length && errors.map(_temp$4);
14558
14601
  $[47] = errors;
14559
14602
  $[48] = status;
14560
14603
  $[49] = t21;
@@ -14597,7 +14640,7 @@ const FileUploadItem = (t0) => {
14597
14640
  } else t23 = $[60];
14598
14641
  return t23;
14599
14642
  };
14600
- function _temp$3(error) {
14643
+ function _temp$4(error) {
14601
14644
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14602
14645
  className: file_upload_item_module_default.errorMessage,
14603
14646
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
@@ -17374,7 +17417,7 @@ const DsRadioGroupLegacy = (t0) => {
17374
17417
  } else t3 = $[3];
17375
17418
  let t4;
17376
17419
  if ($[4] !== options) {
17377
- t4 = options.map(_temp$2);
17420
+ t4 = options.map(_temp$3);
17378
17421
  $[4] = options;
17379
17422
  $[5] = t4;
17380
17423
  } else t4 = $[5];
@@ -17417,7 +17460,7 @@ const DsRadioGroup = {
17417
17460
  DsRadioGroup.Root.displayName = "DsRadioGroup.Root";
17418
17461
  DsRadioGroup.Item.displayName = "DsRadioGroup.Item";
17419
17462
  DsRadioGroupLegacy.displayName = "DsRadioGroupLegacy";
17420
- function _temp$2(option) {
17463
+ function _temp$3(option) {
17421
17464
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_radio_group.RadioGroup.Item, {
17422
17465
  value: option.value,
17423
17466
  disabled: option.disabled,
@@ -17677,7 +17720,7 @@ const useIsOverflowing = (text) => {
17677
17720
  const observer = new ResizeObserver(measure);
17678
17721
  observer.observe(element);
17679
17722
  const frame = requestAnimationFrame(measure);
17680
- document.fonts.ready.then(measure).catch(_temp$1);
17723
+ document.fonts.ready.then(measure).catch(_temp$2);
17681
17724
  document.fonts.addEventListener("loadingdone", measure);
17682
17725
  return () => {
17683
17726
  cancelAnimationFrame(frame);
@@ -17705,7 +17748,7 @@ const useIsOverflowing = (text) => {
17705
17748
  } else t2 = $[4];
17706
17749
  return t2;
17707
17750
  };
17708
- function _temp$1() {}
17751
+ function _temp$2() {}
17709
17752
  //#endregion
17710
17753
  //#region src/components/ds-site-node/ds-site-node.module.scss
17711
17754
  var ds_site_node_module_default = {
@@ -18067,73 +18110,321 @@ DsSkeleton.Text.displayName = "DsSkeleton.Text";
18067
18110
  DsSkeleton.Circle.displayName = "DsSkeleton.Circle";
18068
18111
  DsSkeleton.Rect.displayName = "DsSkeleton.Rect";
18069
18112
  //#endregion
18070
- //#region src/components/ds-smart-tabs/ds-smart-tabs.module.scss
18071
- var ds_smart_tabs_module_default = {
18072
- "active": "yjt8Lq_active",
18073
- "container": "yjt8Lq_container",
18074
- "content": "yjt8Lq_content",
18075
- "disabled": "yjt8Lq_disabled",
18076
- "icon": "yjt8Lq_icon",
18077
- "label": "yjt8Lq_label",
18078
- "tab": "yjt8Lq_tab",
18079
- "value": "yjt8Lq_value"
18113
+ //#region src/components/ds-slider/ds-slider.utils.ts
18114
+ /**
18115
+ * Normalizes the public value (a number or a `[min, max]` tuple) into the
18116
+ * `number[]` shape Ark's slider works with. Returns `undefined` when no value
18117
+ * is provided so controlled/uncontrolled detection stays intact.
18118
+ */
18119
+ const toArray = (value) => {
18120
+ if (value === void 0) return;
18121
+ return Array.isArray(value) ? value : [value];
18080
18122
  };
18081
18123
  //#endregion
18082
- //#region src/components/ds-smart-tabs/ds-smart-tabs.tsx
18083
- const colorMap = {
18084
- "dark-blue": "var(--background-info-strong)",
18085
- "light-blue": "var(--background-active-moderate)",
18086
- "dark-gray": "var(--background-brand)",
18087
- green: "var(--background-success-strong)",
18088
- fuchsia: "var(--color-dap-data-fuchsia)",
18089
- blue: "var(--icon-information-secondary)",
18090
- gray: "var(--icon-information-main)",
18091
- red: "var(--icon-warning)",
18092
- amber: "var(--color-dap-data-amber)"
18093
- };
18094
- const SmartTabsContext = (0, react.createContext)(null);
18095
- const useSmartTabsContext = () => {
18096
- const context = (0, react.useContext)(SmartTabsContext);
18097
- if (!context) throw new Error("DsTab must be used within DsSmartTabs");
18098
- return context;
18124
+ //#region src/components/ds-slider/ds-slider.module.scss
18125
+ var ds_slider_module_default = {
18126
+ "control": "_7ZtIQW_control",
18127
+ "header": "_7ZtIQW_header",
18128
+ "large": "_7ZtIQW_large",
18129
+ "range": "_7ZtIQW_range",
18130
+ "root": "_7ZtIQW_root",
18131
+ "small": "_7ZtIQW_small",
18132
+ "thumb": "_7ZtIQW_thumb",
18133
+ "track": "_7ZtIQW_track",
18134
+ "valueText": "_7ZtIQW_valueText"
18099
18135
  };
18136
+ //#endregion
18137
+ //#region src/components/ds-slider/ds-slider.tsx
18100
18138
  /**
18101
- * Individual tab component
18139
+ * @summary Selects a numeric value or a numeric interval by dragging thumbs along a track.
18140
+ *
18141
+ * Use for picking a number or interval from a known continuous range where visual
18142
+ * adjustment beats typing (filter ranges, thresholds, capacity limits). For exact
18143
+ * numeric entry use DsNumberInput; for a few discrete options use DsSegmentGroup.
18102
18144
  */
18103
- const DsSmartTab = (t0) => {
18104
- const $ = (0, react_compiler_runtime.c)(40);
18105
- let className;
18106
- let color;
18107
- let content;
18108
- let disabled;
18109
- let icon;
18110
- let label;
18111
- let props;
18112
- let t1;
18113
- let value;
18114
- if ($[0] !== t0) {
18115
- ({label, value, icon, content, color, disabled, className, style: t1, ...props} = t0);
18116
- $[0] = t0;
18117
- $[1] = className;
18118
- $[2] = color;
18119
- $[3] = content;
18120
- $[4] = disabled;
18121
- $[5] = icon;
18122
- $[6] = label;
18123
- $[7] = props;
18124
- $[8] = t1;
18125
- $[9] = value;
18126
- } else {
18127
- className = $[1];
18128
- color = $[2];
18129
- content = $[3];
18130
- disabled = $[4];
18131
- icon = $[5];
18132
- label = $[6];
18133
- props = $[7];
18134
- t1 = $[8];
18135
- value = $[9];
18136
- }
18145
+ const DsSlider$1 = (t0) => {
18146
+ const $ = (0, react_compiler_runtime.c)(69);
18147
+ const { ref, className, style, label, type: t1, size: t2, min: t3, max: t4, step: t5, value, defaultValue, name, disabled: t6, thumbLabels, formatValue: t7, onValueChange, onValueChangeEnd } = t0;
18148
+ const type = t1 === void 0 ? "value" : t1;
18149
+ const size = t2 === void 0 ? "medium" : t2;
18150
+ const min = t3 === void 0 ? 0 : t3;
18151
+ const max = t4 === void 0 ? 100 : t4;
18152
+ const step = t5 === void 0 ? 1 : t5;
18153
+ const disabled = t6 === void 0 ? false : t6;
18154
+ const formatValue = t7 === void 0 ? String : t7;
18155
+ const isRange = type === "range";
18156
+ let t8;
18157
+ if ($[0] !== value) {
18158
+ t8 = toArray(value);
18159
+ $[0] = value;
18160
+ $[1] = t8;
18161
+ } else t8 = $[1];
18162
+ const controlledValue = t8;
18163
+ let t9;
18164
+ if ($[2] !== isRange || $[3] !== max || $[4] !== min) {
18165
+ t9 = isRange ? [min, max] : [min];
18166
+ $[2] = isRange;
18167
+ $[3] = max;
18168
+ $[4] = min;
18169
+ $[5] = t9;
18170
+ } else t9 = $[5];
18171
+ const fallbackValue = t9;
18172
+ let t10;
18173
+ if ($[6] !== isRange || $[7] !== max || $[8] !== min) {
18174
+ t10 = (next) => isRange ? [next[0] ?? min, next[1] ?? max] : next[0] ?? min;
18175
+ $[6] = isRange;
18176
+ $[7] = max;
18177
+ $[8] = min;
18178
+ $[9] = t10;
18179
+ } else t10 = $[9];
18180
+ const toPublicValue = t10;
18181
+ let t11;
18182
+ if ($[10] !== controlledValue || $[11] !== onValueChange || $[12] !== toPublicValue) {
18183
+ t11 = controlledValue !== void 0 ? (next_0) => onValueChange?.(toPublicValue(next_0)) : void 0;
18184
+ $[10] = controlledValue;
18185
+ $[11] = onValueChange;
18186
+ $[12] = toPublicValue;
18187
+ $[13] = t11;
18188
+ } else t11 = $[13];
18189
+ let t12;
18190
+ if ($[14] !== defaultValue || $[15] !== fallbackValue) {
18191
+ t12 = toArray(defaultValue) ?? fallbackValue;
18192
+ $[14] = defaultValue;
18193
+ $[15] = fallbackValue;
18194
+ $[16] = t12;
18195
+ } else t12 = $[16];
18196
+ const [values, setValues] = useControlled(controlledValue, t11, t12);
18197
+ let t13;
18198
+ if ($[17] !== controlledValue || $[18] !== onValueChange || $[19] !== setValues || $[20] !== toPublicValue) {
18199
+ t13 = (details) => {
18200
+ setValues(details.value);
18201
+ if (controlledValue === void 0) onValueChange?.(toPublicValue(details.value));
18202
+ };
18203
+ $[17] = controlledValue;
18204
+ $[18] = onValueChange;
18205
+ $[19] = setValues;
18206
+ $[20] = toPublicValue;
18207
+ $[21] = t13;
18208
+ } else t13 = $[21];
18209
+ const handleValueChange = t13;
18210
+ let t14;
18211
+ if ($[22] !== formatValue || $[23] !== isRange || $[24] !== max || $[25] !== min || $[26] !== values[0] || $[27] !== values[1]) {
18212
+ t14 = isRange ? `${formatValue(values[0] ?? min)}-${formatValue(values[1] ?? max)}` : formatValue(values[0] ?? min);
18213
+ $[22] = formatValue;
18214
+ $[23] = isRange;
18215
+ $[24] = max;
18216
+ $[25] = min;
18217
+ $[26] = values[0];
18218
+ $[27] = values[1];
18219
+ $[28] = t14;
18220
+ } else t14 = $[28];
18221
+ const valueText = t14;
18222
+ const textColor = disabled ? "disabled" : "main";
18223
+ let t15;
18224
+ if ($[29] !== isRange || $[30] !== label || $[31] !== thumbLabels) {
18225
+ t15 = isRange ? thumbLabels : label ? [label] : thumbLabels;
18226
+ $[29] = isRange;
18227
+ $[30] = label;
18228
+ $[31] = thumbLabels;
18229
+ $[32] = t15;
18230
+ } else t15 = $[32];
18231
+ const thumbAriaLabels = t15;
18232
+ const t16 = size === "small";
18233
+ const t17 = size === "large";
18234
+ let t18;
18235
+ if ($[33] !== className || $[34] !== t16 || $[35] !== t17) {
18236
+ t18 = (0, classnames.default)(ds_slider_module_default.root, {
18237
+ [ds_slider_module_default.small]: t16,
18238
+ [ds_slider_module_default.large]: t17
18239
+ }, className);
18240
+ $[33] = className;
18241
+ $[34] = t16;
18242
+ $[35] = t17;
18243
+ $[36] = t18;
18244
+ } else t18 = $[36];
18245
+ const rootClass = t18;
18246
+ let t19;
18247
+ if ($[37] !== onValueChangeEnd || $[38] !== toPublicValue) {
18248
+ t19 = (details_0) => onValueChangeEnd?.(toPublicValue(details_0.value));
18249
+ $[37] = onValueChangeEnd;
18250
+ $[38] = toPublicValue;
18251
+ $[39] = t19;
18252
+ } else t19 = $[39];
18253
+ let t20;
18254
+ if ($[40] !== label || $[41] !== textColor) {
18255
+ t20 = label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
18256
+ variant: "body-sm-md",
18257
+ color: textColor,
18258
+ children: label
18259
+ });
18260
+ $[40] = label;
18261
+ $[41] = textColor;
18262
+ $[42] = t20;
18263
+ } else t20 = $[42];
18264
+ let t21;
18265
+ if ($[43] !== textColor || $[44] !== valueText) {
18266
+ t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
18267
+ variant: "body-sm-md",
18268
+ color: textColor,
18269
+ className: ds_slider_module_default.valueText,
18270
+ children: valueText
18271
+ });
18272
+ $[43] = textColor;
18273
+ $[44] = valueText;
18274
+ $[45] = t21;
18275
+ } else t21 = $[45];
18276
+ let t22;
18277
+ if ($[46] !== t20 || $[47] !== t21) {
18278
+ t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
18279
+ className: ds_slider_module_default.header,
18280
+ children: [t20, t21]
18281
+ });
18282
+ $[46] = t20;
18283
+ $[47] = t21;
18284
+ $[48] = t22;
18285
+ } else t22 = $[48];
18286
+ let t23;
18287
+ if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
18288
+ t23 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_slider.Slider.Track, {
18289
+ className: ds_slider_module_default.track,
18290
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_slider.Slider.Range, { className: ds_slider_module_default.range })
18291
+ });
18292
+ $[49] = t23;
18293
+ } else t23 = $[49];
18294
+ let t24;
18295
+ if ($[50] !== values) {
18296
+ t24 = values.map(_temp$1);
18297
+ $[50] = values;
18298
+ $[51] = t24;
18299
+ } else t24 = $[51];
18300
+ let t25;
18301
+ if ($[52] !== t24) {
18302
+ t25 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_slider.Slider.Control, {
18303
+ className: ds_slider_module_default.control,
18304
+ children: [t23, t24]
18305
+ });
18306
+ $[52] = t24;
18307
+ $[53] = t25;
18308
+ } else t25 = $[53];
18309
+ let t26;
18310
+ if ($[54] !== disabled || $[55] !== handleValueChange || $[56] !== max || $[57] !== min || $[58] !== name || $[59] !== ref || $[60] !== rootClass || $[61] !== step || $[62] !== style || $[63] !== t19 || $[64] !== t22 || $[65] !== t25 || $[66] !== thumbAriaLabels || $[67] !== values) {
18311
+ t26 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_ark_ui_react_slider.Slider.Root, {
18312
+ ref,
18313
+ className: rootClass,
18314
+ style,
18315
+ value: values,
18316
+ min,
18317
+ max,
18318
+ step,
18319
+ name,
18320
+ disabled,
18321
+ "aria-label": thumbAriaLabels,
18322
+ onValueChange: handleValueChange,
18323
+ onValueChangeEnd: t19,
18324
+ children: [t22, t25]
18325
+ });
18326
+ $[54] = disabled;
18327
+ $[55] = handleValueChange;
18328
+ $[56] = max;
18329
+ $[57] = min;
18330
+ $[58] = name;
18331
+ $[59] = ref;
18332
+ $[60] = rootClass;
18333
+ $[61] = step;
18334
+ $[62] = style;
18335
+ $[63] = t19;
18336
+ $[64] = t22;
18337
+ $[65] = t25;
18338
+ $[66] = thumbAriaLabels;
18339
+ $[67] = values;
18340
+ $[68] = t26;
18341
+ } else t26 = $[68];
18342
+ return t26;
18343
+ };
18344
+ DsSlider$1.displayName = "DsSlider";
18345
+ function _temp$1(_, index) {
18346
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_slider.Slider.Thumb, {
18347
+ index,
18348
+ className: ds_slider_module_default.thumb,
18349
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_slider.Slider.HiddenInput, {})
18350
+ }, index);
18351
+ }
18352
+ //#endregion
18353
+ //#region src/components/ds-slider/index.ts
18354
+ const DsSlider = withResponsiveProps(DsSlider$1, [
18355
+ "size",
18356
+ "step",
18357
+ "thumbLabels"
18358
+ ]);
18359
+ DsSlider.displayName = "DsSlider";
18360
+ //#endregion
18361
+ //#region src/components/ds-smart-tabs/ds-smart-tabs.module.scss
18362
+ var ds_smart_tabs_module_default = {
18363
+ "active": "yjt8Lq_active",
18364
+ "container": "yjt8Lq_container",
18365
+ "content": "yjt8Lq_content",
18366
+ "disabled": "yjt8Lq_disabled",
18367
+ "icon": "yjt8Lq_icon",
18368
+ "label": "yjt8Lq_label",
18369
+ "tab": "yjt8Lq_tab",
18370
+ "value": "yjt8Lq_value"
18371
+ };
18372
+ //#endregion
18373
+ //#region src/components/ds-smart-tabs/ds-smart-tabs.tsx
18374
+ const colorMap = {
18375
+ "dark-blue": "var(--background-info-strong)",
18376
+ "light-blue": "var(--background-active-moderate)",
18377
+ "dark-gray": "var(--background-brand)",
18378
+ green: "var(--background-success-strong)",
18379
+ fuchsia: "var(--color-dap-data-fuchsia)",
18380
+ blue: "var(--icon-information-secondary)",
18381
+ gray: "var(--icon-information-main)",
18382
+ red: "var(--icon-warning)",
18383
+ amber: "var(--color-dap-data-amber)"
18384
+ };
18385
+ const SmartTabsContext = (0, react.createContext)(null);
18386
+ const useSmartTabsContext = () => {
18387
+ const context = (0, react.useContext)(SmartTabsContext);
18388
+ if (!context) throw new Error("DsTab must be used within DsSmartTabs");
18389
+ return context;
18390
+ };
18391
+ /**
18392
+ * Individual tab component
18393
+ */
18394
+ const DsSmartTab = (t0) => {
18395
+ const $ = (0, react_compiler_runtime.c)(40);
18396
+ let className;
18397
+ let color;
18398
+ let content;
18399
+ let disabled;
18400
+ let icon;
18401
+ let label;
18402
+ let props;
18403
+ let t1;
18404
+ let value;
18405
+ if ($[0] !== t0) {
18406
+ ({label, value, icon, content, color, disabled, className, style: t1, ...props} = t0);
18407
+ $[0] = t0;
18408
+ $[1] = className;
18409
+ $[2] = color;
18410
+ $[3] = content;
18411
+ $[4] = disabled;
18412
+ $[5] = icon;
18413
+ $[6] = label;
18414
+ $[7] = props;
18415
+ $[8] = t1;
18416
+ $[9] = value;
18417
+ } else {
18418
+ className = $[1];
18419
+ color = $[2];
18420
+ content = $[3];
18421
+ disabled = $[4];
18422
+ icon = $[5];
18423
+ label = $[6];
18424
+ props = $[7];
18425
+ t1 = $[8];
18426
+ value = $[9];
18427
+ }
18137
18428
  let t2;
18138
18429
  if ($[10] !== t1) {
18139
18430
  t2 = t1 === void 0 ? {} : t1;
@@ -19971,6 +20262,8 @@ var ds_table_header_module_default = {
19971
20262
  "groupStart": "-2rCNG_groupStart",
19972
20263
  "header": "-2rCNG_header",
19973
20264
  "headerCell": "-2rCNG_headerCell",
20265
+ "headerLabel": "-2rCNG_headerLabel",
20266
+ "headerLabelStack": "-2rCNG_headerLabelStack",
19974
20267
  "headerRow": "-2rCNG_headerRow",
19975
20268
  "headerRowNoBorder": "-2rCNG_headerRowNoBorder",
19976
20269
  "headerRowVirtualized": "-2rCNG_headerRowVirtualized",
@@ -19996,16 +20289,15 @@ var ds_table_shared_module_default = {
19996
20289
  "rotate-90": "WQ6Axa_rotate-90"
19997
20290
  };
19998
20291
  //#endregion
19999
- //#region src/components/ds-table/context/ds-table-context.ts
20000
- const DsTableContext = (0, react.createContext)(null);
20001
- const useDsTableContext = () => {
20002
- const context = (0, react.useContext)(DsTableContext);
20003
- if (!context) throw new Error("useDsTableContext must be used within DsTable");
20004
- return context;
20005
- };
20292
+ //#region src/components/ds-table/hooks/use-editing-state.ts
20293
+ /** Shown when an async `onCellEdit` commit rejects with a non-`Error` reason. */
20294
+ const EDIT_FALLBACK_ERROR = "Save failed";
20295
+ const isThenable = (value) => typeof value === "object" && value !== null && typeof value.then === "function";
20296
+ /** Prefer a thrown `Error`'s message; fall back to a generic string otherwise. */
20297
+ const extractErrorMessage = (reason, fallback) => reason instanceof Error && reason.message ? reason.message : fallback;
20006
20298
  /**
20007
20299
  * Hoisted editing state for single-cell-at-a-time inline editing.
20008
- * Lives on {@link DsTableContext} so cell renderers and editors share one provider.
20300
+ * Surfaced on DsTableContext so cell renderers and editors share one provider.
20009
20301
  */
20010
20302
  const useEditingState = (onCellEdit, onCellValidate) => {
20011
20303
  const [editing, setEditing] = (0, react.useState)(null);
@@ -20015,6 +20307,12 @@ const useEditingState = (onCellEdit, onCellValidate) => {
20015
20307
  onCellValidateRef.current = onCellValidate;
20016
20308
  const editingRef = (0, react.useRef)(editing);
20017
20309
  editingRef.current = editing;
20310
+ const generationRef = (0, react.useRef)(0);
20311
+ const abortRef = (0, react.useRef)(null);
20312
+ const abortPending = (0, react.useCallback)(() => {
20313
+ abortRef.current?.abort();
20314
+ abortRef.current = null;
20315
+ }, []);
20018
20316
  return {
20019
20317
  editing,
20020
20318
  beginEdit: (0, react.useCallback)((cell) => {
@@ -20022,65 +20320,184 @@ const useEditingState = (onCellEdit, onCellValidate) => {
20022
20320
  if (current) {
20023
20321
  if (current.cell.row.id === cell.row.id && current.cell.column.id === cell.column.id) return;
20024
20322
  }
20323
+ abortPending();
20324
+ generationRef.current += 1;
20025
20325
  setEditing({
20026
20326
  cell,
20027
20327
  draftValue: cell.getValue(),
20028
- error: null
20328
+ error: null,
20329
+ pending: false
20029
20330
  });
20030
- }, []),
20331
+ }, [abortPending]),
20031
20332
  setDraft: (0, react.useCallback)((value) => {
20032
20333
  const current = editingRef.current;
20033
20334
  if (!current) return;
20335
+ const error = onCellValidateRef.current?.(current.cell.row.original, current.cell.column.id, value) ?? null;
20034
20336
  setEditing({
20035
20337
  ...current,
20036
20338
  draftValue: value,
20037
- error: null
20339
+ error
20038
20340
  });
20039
20341
  }, []),
20040
20342
  commit: (0, react.useCallback)((overrideValue) => {
20041
20343
  const current = editingRef.current;
20042
- if (!current) return;
20344
+ if (!current || current.pending) return;
20043
20345
  const valueToCommit = overrideValue !== void 0 ? overrideValue : current.draftValue;
20044
- const error = onCellValidateRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit) ?? null;
20045
- if (error !== null) {
20346
+ const validationError = onCellValidateRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit) ?? null;
20347
+ if (validationError !== null) {
20046
20348
  setEditing({
20047
20349
  ...current,
20048
20350
  draftValue: valueToCommit,
20049
- error
20351
+ error: validationError,
20352
+ pending: false
20050
20353
  });
20051
20354
  return;
20052
20355
  }
20053
- onCellEditRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit);
20054
- setEditing(null);
20055
- }, []),
20356
+ generationRef.current += 1;
20357
+ const token = generationRef.current;
20358
+ abortPending();
20359
+ const controller = new AbortController();
20360
+ abortRef.current = controller;
20361
+ const { signal } = controller;
20362
+ const isStale = () => generationRef.current !== token;
20363
+ const settle = () => {
20364
+ if (abortRef.current === controller) abortRef.current = null;
20365
+ };
20366
+ const showError = (error) => {
20367
+ settle();
20368
+ if (isStale()) return;
20369
+ const live = editingRef.current;
20370
+ setEditing(live ? {
20371
+ ...live,
20372
+ draftValue: valueToCommit,
20373
+ error,
20374
+ pending: false
20375
+ } : null);
20376
+ };
20377
+ const editResult = onCellEditRef.current?.(current.cell.row.original, current.cell.column.id, valueToCommit, signal);
20378
+ const applyEditResult = (error) => {
20379
+ if (error !== null) {
20380
+ showError(error);
20381
+ return;
20382
+ }
20383
+ settle();
20384
+ if (isStale()) return;
20385
+ setEditing(null);
20386
+ };
20387
+ if (!isThenable(editResult)) {
20388
+ applyEditResult(editResult ?? null);
20389
+ return;
20390
+ }
20391
+ setEditing({
20392
+ ...current,
20393
+ draftValue: valueToCommit,
20394
+ error: null,
20395
+ pending: true
20396
+ });
20397
+ editResult.then((value) => {
20398
+ applyEditResult(value ?? null);
20399
+ }, (reason) => {
20400
+ applyEditResult(extractErrorMessage(reason, EDIT_FALLBACK_ERROR));
20401
+ });
20402
+ }, [abortPending]),
20056
20403
  cancel: (0, react.useCallback)(() => {
20404
+ abortPending();
20405
+ generationRef.current += 1;
20057
20406
  setEditing(null);
20058
- }, [])
20407
+ }, [abortPending])
20059
20408
  };
20060
20409
  };
20061
20410
  //#endregion
20062
- //#region src/components/ds-table/utils/column-size.ts
20411
+ //#region src/components/ds-table/context/ds-table-context.tsx
20412
+ const DsTableContext = (0, react.createContext)(null);
20413
+ const useDsTableContext = () => {
20414
+ const context = (0, react.useContext)(DsTableContext);
20415
+ if (!context) throw new Error("useDsTableContext must be used within DsTable");
20416
+ return context;
20417
+ };
20063
20418
  /**
20064
- * Generates the appropriate style object for a table column/cell based on its size
20065
- *
20066
- * Custom-sized columns get a fixed `width` plus `minWidth` and `flexShrink: 0` so
20067
- * they enforce horizontal overflow on the table container. Default-sized columns
20068
- * grow to fill the row evenly via `flex: 1`.
20069
- *
20070
- * @param columnSize - The size of the column
20071
- * @returns Style object for the column/cell
20419
+ * Assembles {@link DsTableContext} from public table props plus derived grouping
20420
+ * and resize slices. Owns inline-edit state. Picks context fields from
20421
+ * `tableProps` and ignores the rest (`columns`, `data`, etc.).
20072
20422
  */
20073
- const getColumnSizeStyle = (columnSize) => {
20074
- if (columnSize !== _tanstack_react_table.defaultColumnSizing.size) return {
20075
- width: columnSize,
20076
- minWidth: columnSize,
20077
- flexShrink: 0
20078
- };
20079
- return {
20080
- flex: 1,
20081
- minWidth: 0
20082
- };
20423
+ const DsTableContextProvider = ({ tableProps, derived, children }) => {
20424
+ const { stickyHeader, bordered, fullWidth, rowSize, expandable, selectable, reorderable, showSelectAllCheckbox, loading, onRowClick, onRowDoubleClick, primaryRowActions, secondaryRowActions, renderExpandedRow, virtualized, activeRowId, locale, onCellEdit, onCellValidate } = tableProps;
20425
+ const { collapsedColumnGroups, onToggleColumnGroup } = derived.grouping;
20426
+ const { resizableColumns, resizeSizingReady, resizeContainerRef, onResizeHover, onResizeDragStart, onResizeReset, onResizeKeyboardNudge } = derived.resize;
20427
+ const { editing, beginEdit, setDraft, commit, cancel } = useEditingState(onCellEdit, onCellValidate);
20428
+ const contextValue = (0, react.useMemo)(() => ({
20429
+ stickyHeader,
20430
+ bordered,
20431
+ fullWidth,
20432
+ rowSize,
20433
+ expandable,
20434
+ selectable,
20435
+ reorderable,
20436
+ showSelectAllCheckbox,
20437
+ loading,
20438
+ onRowClick: loading ? void 0 : onRowClick,
20439
+ onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
20440
+ primaryRowActions,
20441
+ secondaryRowActions,
20442
+ renderExpandedRow,
20443
+ virtualized,
20444
+ activeRowId,
20445
+ collapsedColumnGroups,
20446
+ onToggleColumnGroup,
20447
+ locale,
20448
+ onCellEdit,
20449
+ resizableColumns,
20450
+ resizeSizingReady,
20451
+ resizeContainerRef,
20452
+ onResizeHover,
20453
+ onResizeDragStart,
20454
+ onResizeReset,
20455
+ onResizeKeyboardNudge,
20456
+ editing,
20457
+ beginEdit,
20458
+ setDraft,
20459
+ commit,
20460
+ cancel
20461
+ }), [
20462
+ stickyHeader,
20463
+ bordered,
20464
+ fullWidth,
20465
+ rowSize,
20466
+ expandable,
20467
+ selectable,
20468
+ reorderable,
20469
+ showSelectAllCheckbox,
20470
+ loading,
20471
+ onRowClick,
20472
+ onRowDoubleClick,
20473
+ primaryRowActions,
20474
+ secondaryRowActions,
20475
+ renderExpandedRow,
20476
+ virtualized,
20477
+ activeRowId,
20478
+ collapsedColumnGroups,
20479
+ onToggleColumnGroup,
20480
+ locale,
20481
+ onCellEdit,
20482
+ resizableColumns,
20483
+ resizeSizingReady,
20484
+ resizeContainerRef,
20485
+ onResizeHover,
20486
+ onResizeDragStart,
20487
+ onResizeReset,
20488
+ onResizeKeyboardNudge,
20489
+ editing,
20490
+ beginEdit,
20491
+ setDraft,
20492
+ commit,
20493
+ cancel
20494
+ ]);
20495
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableContext.Provider, {
20496
+ value: contextValue,
20497
+ children
20498
+ });
20083
20499
  };
20500
+ DsTableContextProvider.displayName = "DsTableContextProvider";
20084
20501
  /**
20085
20502
  * Column id used for the synthetic expander column injected when `expandable` is set.
20086
20503
  */
@@ -20094,42 +20511,178 @@ const SELECT_COLUMN_ID = "select";
20094
20511
  * (non-virtualized tables only).
20095
20512
  */
20096
20513
  const REORDER_COLUMN_ID = "reorder";
20514
+ /**
20515
+ * Injected utility leaf ids (`select`, `expander`, `reorder`). Present in internal
20516
+ * sizing for layout; omitted from the public `onColumnSizingChange` payload.
20517
+ */
20518
+ const BUILTIN_COLUMN_IDS = Object.freeze(/* @__PURE__ */ new Set([
20519
+ SELECT_COLUMN_ID,
20520
+ EXPANDER_COLUMN_ID,
20521
+ REORDER_COLUMN_ID
20522
+ ]));
20097
20523
  //#endregion
20098
- //#region src/components/ds-table/grouping/utils/column-group.ts
20524
+ //#region src/components/ds-table/utils/column-size.ts
20525
+ const DEFAULT_MAX_COLUMN_SIZE = Number.MAX_SAFE_INTEGER;
20099
20526
  /**
20100
- * Builds the flex style for a group header cell so it lines up with the combined
20101
- * width of its visible leaf columns.
20527
+ * Whether a column should use a fixed width rather than fill (`flex: 1`).
20102
20528
  *
20103
- * Fixed-width leaves contribute to `flexBasis`; default-sized leaves each add one
20104
- * unit of `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so
20105
- * both header rows distribute free space identically.
20529
+ * True when the user has resized it (`columnSizing` entry), or when the raw
20530
+ * column def authored `size` (`meta.hasExplicitSize`). TanStack merges a
20531
+ * default size of 150 onto every column, so `columnDef.size` alone cannot
20532
+ * tell authored 150px from an unsized fill column.
20106
20533
  */
20107
- const getGroupColumnSizeStyle = (leafColumns) => {
20108
- let fixedWidth = 0;
20109
- let flexCount = 0;
20110
- for (const leaf of leafColumns) {
20111
- const size = leaf.getSize();
20112
- if (size !== _tanstack_react_table.defaultColumnSizing.size) fixedWidth += size;
20113
- else flexCount += 1;
20114
- }
20115
- if (flexCount === 0) return {
20116
- width: fixedWidth,
20117
- minWidth: fixedWidth,
20534
+ const isExplicitColumnWidth = (column, columnSizing) => {
20535
+ if (columnSizing[column.id] !== void 0) return true;
20536
+ return column.columnDef.meta?.hasExplicitSize === true;
20537
+ };
20538
+ /**
20539
+ * Style for a table column/cell based on its size and whether that size is explicit.
20540
+ *
20541
+ * Explicit columns get a fixed `width` plus `minWidth` and `flexShrink: 0` so they
20542
+ * enforce horizontal overflow on the table container. Fill columns grow evenly via
20543
+ * `flex: 1`.
20544
+ */
20545
+ const getColumnSizeStyle = (columnSize, isExplicit) => {
20546
+ if (isExplicit) return {
20547
+ width: columnSize,
20548
+ minWidth: columnSize,
20118
20549
  flexShrink: 0
20119
20550
  };
20120
20551
  return {
20121
- flexGrow: flexCount,
20122
- flexShrink: 0,
20123
- flexBasis: fixedWidth,
20124
- minWidth: fixedWidth
20552
+ flex: 1,
20553
+ minWidth: 0
20125
20554
  };
20126
20555
  };
20556
+ const getHeaderSizeCssVar = (headerId) => `--header-${headerId}-size`;
20557
+ const getColumnSizeCssVar = (columnId) => `--col-${columnId}-size`;
20127
20558
  /**
20128
- * Whether a column is the first visible leaf of its parent group. Used to draw a
20129
- * single side border at the start of each group in both the header and body.
20559
+ * Pixel width via a CSS variable on an ancestor, so frozen (memoized) cells still
20560
+ * track live resize without React reconciling each row.
20130
20561
  */
20131
- const isFirstLeafColumnOfGroup = (column) => {
20132
- const parent = column.parent;
20562
+ const getResizableHeaderStyle = (headerId) => ({
20563
+ width: `calc(var(${getHeaderSizeCssVar(headerId)}) * 1px)`,
20564
+ minWidth: `calc(var(${getHeaderSizeCssVar(headerId)}) * 1px)`,
20565
+ flexShrink: 0
20566
+ });
20567
+ const getResizableColumnStyle = (columnId) => ({
20568
+ width: `calc(var(${getColumnSizeCssVar(columnId)}) * 1px)`,
20569
+ minWidth: `calc(var(${getColumnSizeCssVar(columnId)}) * 1px)`,
20570
+ flexShrink: 0
20571
+ });
20572
+ const getHeaderCellSizeStyle = (headerId, columnSize, isExplicit, resizeSizingReady) => {
20573
+ if (resizeSizingReady) return getResizableHeaderStyle(headerId);
20574
+ return getColumnSizeStyle(columnSize, isExplicit);
20575
+ };
20576
+ const getBodyCellSizeStyle = (columnId, columnSize, isExplicit, resizeSizingReady) => {
20577
+ if (resizeSizingReady) return getResizableColumnStyle(columnId);
20578
+ return getColumnSizeStyle(columnSize, isExplicit);
20579
+ };
20580
+ /**
20581
+ * TanStack v8 performant-resize map: header ids for header cells, column ids for
20582
+ * body cells. Values are unitless px; consumers use `calc(var(...) * 1px)`.
20583
+ */
20584
+ const getColumnSizeCssVars = (headers) => {
20585
+ const colSizes = {};
20586
+ for (const header of headers) {
20587
+ colSizes[getHeaderSizeCssVar(header.id)] = header.getSize();
20588
+ colSizes[getColumnSizeCssVar(header.column.id)] = header.column.getSize();
20589
+ }
20590
+ return colSizes;
20591
+ };
20592
+ /**
20593
+ * TanStack `getSize()` formula: `min(max(minSize, width), maxSize)`. Defaults
20594
+ * match DsTable (`RESIZE_MIN_COLUMN_WIDTH`, unlimited max).
20595
+ */
20596
+ const clampColumnSize = (width, minSize = 52, maxSize = DEFAULT_MAX_COLUMN_SIZE) => Math.min(Math.max(minSize, width), maxSize);
20597
+ /**
20598
+ * Clamps every finite entry in `sizing` to that leaf's `minSize` / `maxSize`.
20599
+ * Non-finite widths are omitted so they do not poison state. Ids missing from
20600
+ * `columns` use the table defaults.
20601
+ */
20602
+ const clampColumnSizing = (sizing, columns) => {
20603
+ const boundsById = new Map(columns.map((column) => [column.id, column.columnDef]));
20604
+ const next = {};
20605
+ for (const [id, width] of Object.entries(sizing)) {
20606
+ if (!Number.isFinite(width)) continue;
20607
+ const bounds = boundsById.get(id);
20608
+ next[id] = clampColumnSize(width, bounds?.minSize ?? 52, bounds?.maxSize ?? DEFAULT_MAX_COLUMN_SIZE);
20609
+ }
20610
+ return next;
20611
+ };
20612
+ /**
20613
+ * Width to restore on double-click: explicit `columnDef.size`, otherwise the
20614
+ * snapshotted measured width.
20615
+ */
20616
+ const getResizeOriginSize = (column, measuredWidth) => {
20617
+ if (isExplicitColumnWidth(column, {})) return column.columnDef.size;
20618
+ return measuredWidth;
20619
+ };
20620
+ /**
20621
+ * Measured leaf header widths keyed by column id. Group header cells share
20622
+ * `data-column-id` with a different id, so only `leafColumnIds` are read.
20623
+ */
20624
+ const measureLeafHeaderWidths = (tableEl, leafColumnIds) => {
20625
+ const widths = {};
20626
+ for (const id of leafColumnIds) {
20627
+ const cell = tableEl.querySelector(`thead th[data-column-id="${CSS.escape(id)}"]`);
20628
+ if (cell instanceof HTMLElement) widths[id] = cell.getBoundingClientRect().width;
20629
+ }
20630
+ return widths;
20631
+ };
20632
+ /**
20633
+ * Sizing entries for leaves that are not yet in `existing`. Does not overwrite
20634
+ * user-resized (or previously snapshotted) ids.
20635
+ */
20636
+ const collectMissingLeafSizing = (measured, existing) => {
20637
+ const next = {};
20638
+ for (const [id, width] of Object.entries(measured)) if (existing[id] === void 0) next[id] = Math.round(width);
20639
+ return next;
20640
+ };
20641
+ /**
20642
+ * Copy of `columnSizing` without injected utility leaves. Use at the public
20643
+ * `onColumnSizingChange` boundary so consumers persist only their own columns.
20644
+ */
20645
+ const omitBuiltinColumnSizing = (columnSizing) => {
20646
+ const next = {};
20647
+ for (const [id, size] of Object.entries(columnSizing)) if (!BUILTIN_COLUMN_IDS.has(id)) next[id] = size;
20648
+ return next;
20649
+ };
20650
+ //#endregion
20651
+ //#region src/components/ds-table/grouping/utils/column-group.ts
20652
+ /**
20653
+ * Builds the flex style for a group header cell so it lines up with the combined
20654
+ * width of its visible leaf columns.
20655
+ *
20656
+ * Fixed-width leaves contribute to `flexBasis`; fill leaves each add one unit of
20657
+ * `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so both
20658
+ * header rows distribute free space identically.
20659
+ */
20660
+ const getGroupColumnSizeStyle = (leafColumns, columnSizing) => {
20661
+ let fixedWidth = 0;
20662
+ let flexCount = 0;
20663
+ for (const leaf of leafColumns) {
20664
+ const size = leaf.getSize();
20665
+ if (isExplicitColumnWidth(leaf, columnSizing)) fixedWidth += size;
20666
+ else flexCount += 1;
20667
+ }
20668
+ if (flexCount === 0) return {
20669
+ width: fixedWidth,
20670
+ minWidth: fixedWidth,
20671
+ flexShrink: 0
20672
+ };
20673
+ return {
20674
+ flexGrow: flexCount,
20675
+ flexShrink: 0,
20676
+ flexBasis: fixedWidth,
20677
+ minWidth: fixedWidth
20678
+ };
20679
+ };
20680
+ /**
20681
+ * Whether a column is the first visible leaf of its parent group. Used to draw a
20682
+ * single side border at the start of each group in both the header and body.
20683
+ */
20684
+ const isFirstLeafColumnOfGroup = (column) => {
20685
+ const parent = column.parent;
20133
20686
  if (!parent) return false;
20134
20687
  return parent.getLeafColumns().filter((leaf) => leaf.getIsVisible())[0]?.id === column.id;
20135
20688
  };
@@ -20197,9 +20750,153 @@ const useColumnGroups = ({ columns, collapsedColumnGroups, onCollapsedColumnGrou
20197
20750
  */
20198
20751
  const defaultDsTableLocale = Object.freeze({
20199
20752
  collapseColumnGroup: "Collapse column group",
20200
- expandColumnGroup: "Expand column group"
20753
+ expandColumnGroup: "Expand column group",
20754
+ resizeColumn: "Resize column"
20201
20755
  });
20202
20756
  //#endregion
20757
+ //#region src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.module.scss
20758
+ var ds_table_resize_handle_module_default = { "resizeHandle": "vDdhQW_resizeHandle" };
20759
+ //#endregion
20760
+ //#region src/components/ds-table/components/ds-table-resize-handle/ds-table-resize-handle.tsx
20761
+ const clientPointFromEvent = (event) => {
20762
+ if (event instanceof MouseEvent) return {
20763
+ x: event.clientX,
20764
+ y: event.clientY
20765
+ };
20766
+ if (typeof TouchEvent !== "undefined" && event instanceof TouchEvent) {
20767
+ const touch = event.changedTouches[0];
20768
+ return touch ? {
20769
+ x: touch.clientX,
20770
+ y: touch.clientY
20771
+ } : null;
20772
+ }
20773
+ return null;
20774
+ };
20775
+ /**
20776
+ * Handle straddling the right edge of a resizable header cell.
20777
+ *
20778
+ * Drag is TanStack v8 `header.getResizeHandler()`. Hover drives the full-height
20779
+ * overlay; double-click restores snapshot origin widths for this header's
20780
+ * leaves. As a focusable `separator`, Arrow keys nudge the width (Shift for a
20781
+ * larger step) for keyboard operability (WCAG 2.1.1).
20782
+ */
20783
+ const DsTableResizeHandle = ({ header }) => {
20784
+ const { resizeContainerRef, onResizeHover, onResizeDragStart, onResizeReset, onResizeKeyboardNudge, locale } = useDsTableContext();
20785
+ const handleRef = (0, react.useRef)(null);
20786
+ const isPointerOverRef = (0, react.useRef)(false);
20787
+ const detachDragEndRef = (0, react.useRef)(null);
20788
+ (0, react.useEffect)(() => () => {
20789
+ detachDragEndRef.current?.();
20790
+ }, []);
20791
+ const label = {
20792
+ ...defaultDsTableLocale,
20793
+ ...locale
20794
+ }.resizeColumn;
20795
+ const measureCellRightOffset = () => {
20796
+ const containerEl = resizeContainerRef?.current;
20797
+ const cellEl = handleRef.current?.closest("th");
20798
+ if (!containerEl || !cellEl) return null;
20799
+ return cellEl.getBoundingClientRect().right - containerEl.getBoundingClientRect().left + containerEl.scrollLeft;
20800
+ };
20801
+ const reportHover = () => {
20802
+ const offset = measureCellRightOffset();
20803
+ if (offset === null) return;
20804
+ onResizeHover?.(header.column.id, offset);
20805
+ };
20806
+ const clearHover = () => {
20807
+ isPointerOverRef.current = false;
20808
+ onResizeHover?.(null, null);
20809
+ };
20810
+ const syncHoverAtPoint = (clientX, clientY) => {
20811
+ const handleEl = handleRef.current;
20812
+ const hit = (handleEl?.ownerDocument ?? document).elementFromPoint(clientX, clientY);
20813
+ if (handleEl && hit && (hit === handleEl || handleEl.contains(hit))) {
20814
+ isPointerOverRef.current = true;
20815
+ reportHover();
20816
+ return;
20817
+ }
20818
+ clearHover();
20819
+ };
20820
+ const attachDragEndListeners = () => {
20821
+ detachDragEndRef.current?.();
20822
+ const doc = handleRef.current?.ownerDocument ?? document;
20823
+ const onDragEnd = (event) => {
20824
+ detachDragEndRef.current?.();
20825
+ detachDragEndRef.current = null;
20826
+ const point = clientPointFromEvent(event);
20827
+ clearHover();
20828
+ (handleRef.current?.ownerDocument.defaultView ?? window).requestAnimationFrame(() => {
20829
+ if (!point) return;
20830
+ syncHoverAtPoint(point.x, point.y);
20831
+ });
20832
+ };
20833
+ doc.addEventListener("mouseup", onDragEnd);
20834
+ doc.addEventListener("touchend", onDragEnd);
20835
+ detachDragEndRef.current = () => {
20836
+ doc.removeEventListener("mouseup", onDragEnd);
20837
+ doc.removeEventListener("touchend", onDragEnd);
20838
+ };
20839
+ };
20840
+ const handlePointerEnter = () => {
20841
+ isPointerOverRef.current = true;
20842
+ reportHover();
20843
+ };
20844
+ const handlePointerLeave = () => {
20845
+ clearHover();
20846
+ };
20847
+ const startDrag = () => {
20848
+ const offset = measureCellRightOffset();
20849
+ if (offset !== null) onResizeDragStart?.(offset);
20850
+ };
20851
+ const handlePointerDown = (event) => {
20852
+ if (event.pointerType === "touch") return;
20853
+ event.stopPropagation();
20854
+ startDrag();
20855
+ header.getResizeHandler(handleRef.current?.ownerDocument ?? document)(event);
20856
+ attachDragEndListeners();
20857
+ };
20858
+ const handleTouchStart = (event) => {
20859
+ event.stopPropagation();
20860
+ startDrag();
20861
+ header.getResizeHandler(handleRef.current?.ownerDocument ?? document)(event);
20862
+ attachDragEndListeners();
20863
+ };
20864
+ const handleReset = (event) => {
20865
+ event.preventDefault();
20866
+ event.stopPropagation();
20867
+ const leafIds = header.column.getLeafColumns().map((column) => column.id);
20868
+ onResizeReset?.(leafIds);
20869
+ if (isPointerOverRef.current) reportHover();
20870
+ else clearHover();
20871
+ };
20872
+ const handleKeyDown = (event) => {
20873
+ if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
20874
+ event.preventDefault();
20875
+ event.stopPropagation();
20876
+ const step = event.shiftKey ? 40 : 10;
20877
+ const delta = event.key === "ArrowRight" ? step : -step;
20878
+ onResizeKeyboardNudge?.(header.column.id, delta);
20879
+ };
20880
+ const isLeaf = header.subHeaders.length === 0;
20881
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
20882
+ ref: handleRef,
20883
+ role: "separator",
20884
+ "aria-orientation": "vertical",
20885
+ "aria-label": label,
20886
+ tabIndex: 0,
20887
+ "aria-valuenow": Math.round(header.getSize()),
20888
+ "aria-valuemin": isLeaf ? header.column.columnDef.minSize ?? 52 : void 0,
20889
+ className: ds_table_resize_handle_module_default.resizeHandle,
20890
+ onPointerDown: handlePointerDown,
20891
+ onPointerEnter: handlePointerEnter,
20892
+ onPointerLeave: handlePointerLeave,
20893
+ onTouchStart: handleTouchStart,
20894
+ onClick: (event) => event.stopPropagation(),
20895
+ onDoubleClick: handleReset,
20896
+ onKeyDown: handleKeyDown
20897
+ });
20898
+ };
20899
+ //#endregion
20203
20900
  //#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss
20204
20901
  var ds_table_group_header_cell_module_default = {
20205
20902
  "collapseToggle": "HuJ4KG_collapseToggle",
@@ -20210,22 +20907,25 @@ var ds_table_group_header_cell_module_default = {
20210
20907
  //#endregion
20211
20908
  //#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx
20212
20909
  const DsTableGroupHeaderCell = ({ header }) => {
20213
- const { collapsedColumnGroups, onToggleColumnGroup, locale } = useDsTableContext();
20910
+ const { collapsedColumnGroups, onToggleColumnGroup, locale, resizableColumns, resizeSizingReady } = useDsTableContext();
20214
20911
  const groupId = header.column.id;
20215
- const groupStyle = getGroupColumnSizeStyle(header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible()));
20912
+ const visibleLeafColumns = header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible());
20913
+ const groupStyle = resizeSizingReady ? getResizableHeaderStyle(header.id) : getGroupColumnSizeStyle(visibleLeafColumns, {});
20216
20914
  const isCollapsible = header.column.columnDef.meta?.group?.collapsible ?? false;
20217
20915
  const isCollapsed = collapsedColumnGroups?.includes(groupId) ?? false;
20916
+ const canResize = resizableColumns && !isCollapsed && header.column.getCanResize();
20218
20917
  const mergedLocale = {
20219
20918
  ...defaultDsTableLocale,
20220
20919
  ...locale
20221
20920
  };
20222
20921
  const toggleLabel = isCollapsed ? mergedLocale.expandColumnGroup : mergedLocale.collapseColumnGroup;
20223
20922
  const handleToggle = () => onToggleColumnGroup?.(groupId);
20224
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
20923
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TableHead, {
20924
+ "data-column-id": groupId,
20225
20925
  className: ds_table_group_header_cell_module_default.groupHeaderCell,
20226
20926
  style: groupStyle,
20227
20927
  colSpan: header.colSpan,
20228
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
20928
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
20229
20929
  className: ds_table_group_header_cell_module_default.groupHeaderContent,
20230
20930
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
20231
20931
  className: ds_table_group_header_cell_module_default.groupLabel,
@@ -20240,42 +20940,49 @@ const DsTableGroupHeaderCell = ({ header }) => {
20240
20940
  title: toggleLabel,
20241
20941
  onClick: handleToggle
20242
20942
  })]
20243
- })
20943
+ }), canResize && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableResizeHandle, { header })]
20244
20944
  });
20245
20945
  };
20246
20946
  //#endregion
20247
20947
  //#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
20248
20948
  const DsTableHeader = ({ table }) => {
20249
- const { bordered, virtualized } = useDsTableContext();
20949
+ const { bordered, virtualized, resizableColumns, resizeSizingReady } = useDsTableContext();
20250
20950
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHeader, {
20251
20951
  className: (0, classnames.default)(ds_table_header_module_default.header, virtualized && ds_table_header_module_default.virtualizedHeader),
20252
20952
  children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
20253
20953
  className: (0, classnames.default)(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
20254
20954
  children: headerGroup.headers.map((header) => {
20955
+ const columnSizing = table.getState().columnSizing;
20255
20956
  if (header.isPlaceholder) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
20256
20957
  className: ds_table_header_module_default.headerCell,
20257
- style: getColumnSizeStyle(header.getSize())
20958
+ style: getHeaderCellSizeStyle(header.id, header.getSize(), isExplicitColumnWidth(header.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady)
20258
20959
  }, header.id);
20259
20960
  if (header.subHeaders.length > 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableGroupHeaderCell, { header }, header.id);
20260
- const headerStyle = getColumnSizeStyle(header.column.getSize());
20961
+ const headerStyle = getHeaderCellSizeStyle(header.id, header.column.getSize(), isExplicitColumnWidth(header.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady);
20261
20962
  const canSort = header.column.getCanSort();
20963
+ const canResize = resizableColumns && header.column.getCanResize();
20262
20964
  const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
20263
20965
  const isGroupStart = isFirstLeafColumnOfGroup(header.column);
20264
20966
  const metaFilter = header.column.columnDef.meta?.filter;
20265
20967
  const resolvedFilter = metaFilter && "render" in metaFilter ? metaFilter : void 0;
20266
20968
  const hasActiveColumnFilter = resolvedFilter?.hasActiveFilter ?? false;
20267
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
20969
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TableHead, {
20970
+ "data-column-id": header.column.id,
20268
20971
  className: (0, classnames.default)(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader, isSelectColumn && ds_table_header_module_default.selectHeaderCell, resolvedFilter && ds_table_header_module_default.filterableHeader, hasActiveColumnFilter && ds_table_header_module_default.filterActive, isGroupStart && ds_table_header_module_default.groupStart),
20269
20972
  onClick: header.column.getToggleSortingHandler(),
20270
20973
  style: headerStyle,
20271
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
20974
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
20272
20975
  className: ds_table_header_module_default.headerSortContainer,
20273
20976
  children: [
20274
20977
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
20275
20978
  direction: "column",
20276
20979
  justifyContent: "center",
20277
20980
  width: "100%",
20278
- children: (0, _tanstack_react_table.flexRender)(header.column.columnDef.header, header.getContext())
20981
+ className: ds_table_header_module_default.headerLabelStack,
20982
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
20983
+ className: ds_table_header_module_default.headerLabel,
20984
+ children: (0, _tanstack_react_table.flexRender)(header.column.columnDef.header, header.getContext())
20985
+ })
20279
20986
  }),
20280
20987
  canSort && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
20281
20988
  className: ds_table_header_module_default.pageButtonIconContainer,
@@ -20301,13 +21008,29 @@ const DsTableHeader = ({ table }) => {
20301
21008
  })
20302
21009
  })
20303
21010
  ]
20304
- })
21011
+ }), canResize && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableResizeHandle, { header })]
20305
21012
  }, header.id);
20306
21013
  })
20307
21014
  }, headerGroup.id))
20308
21015
  });
20309
21016
  };
20310
21017
  //#endregion
21018
+ //#region src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.module.scss
21019
+ var ds_table_resize_overlay_module_default = { "resizeOverlay": "DO-LLa_resizeOverlay" };
21020
+ //#endregion
21021
+ //#region src/components/ds-table/components/ds-table-resize-overlay/ds-table-resize-overlay.tsx
21022
+ /**
21023
+ * Full-height divider that tracks the active column's right edge during hover
21024
+ * and drag resize.
21025
+ */
21026
+ const DsTableResizeOverlay = ({ offset, phase }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
21027
+ className: ds_table_resize_overlay_module_default.resizeOverlay,
21028
+ style: { left: offset },
21029
+ "data-resize-overlay": true,
21030
+ "data-resize-phase": phase,
21031
+ "aria-hidden": true
21032
+ });
21033
+ //#endregion
20311
21034
  //#region src/components/ds-table/ds-table.module.scss
20312
21035
  var ds_table_module_default = {
20313
21036
  "bulkActionsVisible": "iL9mtW_bulkActionsVisible",
@@ -20322,6 +21045,28 @@ var ds_table_module_default = {
20322
21045
  "virtualizedContainer": "iL9mtW_virtualizedContainer"
20323
21046
  };
20324
21047
  //#endregion
21048
+ //#region src/components/ds-table/ds-table-defaults.ts
21049
+ /**
21050
+ * Applies the documented `DsTable` prop defaults. Call once at the table
21051
+ * boundary so orchestration and context see the same resolved values.
21052
+ */
21053
+ const applyDsTableDefaults = (props) => ({
21054
+ ...props,
21055
+ virtualized: props.virtualized ?? false,
21056
+ stickyHeader: props.stickyHeader ?? true,
21057
+ bordered: props.bordered ?? true,
21058
+ fullWidth: props.fullWidth ?? true,
21059
+ rowSize: props.rowSize ?? "medium",
21060
+ loading: props.loading ?? false,
21061
+ expandable: props.expandable ?? false,
21062
+ selectable: props.selectable ?? false,
21063
+ showSelectAllCheckbox: props.showSelectAllCheckbox ?? true,
21064
+ primaryRowActions: props.primaryRowActions ?? [],
21065
+ actions: props.actions ?? [],
21066
+ reorderable: props.reorderable ?? false,
21067
+ resizableColumns: props.resizableColumns ?? false
21068
+ });
21069
+ //#endregion
20325
21070
  //#region src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss
20326
21071
  var ds_table_editable_cell_module_default = {
20327
21072
  "editButton": "g5FEoW_editButton",
@@ -20387,12 +21132,16 @@ var ds_table_editing_cell_module_default = {
20387
21132
  //#endregion
20388
21133
  //#region src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx
20389
21134
  const DsTableEditingCell = ({ cell }) => {
20390
- const { commit, cancel } = useDsTableContext();
21135
+ const { commit, cancel, editing } = useDsTableContext();
20391
21136
  const columnDef = cell.column.columnDef;
20392
21137
  const editAnchorRef = (0, react.useRef)(null);
21138
+ const isActiveCell = editing?.cell.id === cell.id;
21139
+ const isPending = isActiveCell && editing.pending;
21140
+ const hasError = isActiveCell && editing.error !== null;
20393
21141
  const handleSubmit = (event) => {
20394
21142
  event.preventDefault();
20395
21143
  event.stopPropagation();
21144
+ if (isPending || hasError) return;
20396
21145
  commit();
20397
21146
  };
20398
21147
  (0, react.useEffect)(() => {
@@ -20444,6 +21193,8 @@ const DsTableEditingCell = ({ cell }) => {
20444
21193
  variant: "tertiary",
20445
21194
  size: "small",
20446
21195
  icon: "check",
21196
+ loading: isPending,
21197
+ disabled: hasError,
20447
21198
  "aria-label": "Confirm edit",
20448
21199
  onClick: (event) => {
20449
21200
  event.stopPropagation();
@@ -20589,7 +21340,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
20589
21340
  });
20590
21341
  };
20591
21342
  const DsTableRow = ({ ref, row, isSelected }) => {
20592
- const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading } = useDsTableContext();
21343
+ const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading, resizeSizingReady } = useDsTableContext();
20593
21344
  const isExpanded = row.getIsExpanded();
20594
21345
  const isActive = activeRowId === row.id;
20595
21346
  const { attributes, listeners, setNodeRef, transform, transition, isDragging } = (0, _dnd_kit_sortable.useSortable)({
@@ -20618,7 +21369,8 @@ const DsTableRow = ({ ref, row, isSelected }) => {
20618
21369
  onClick: () => onRowClick?.(row.original),
20619
21370
  onDoubleClick: () => onRowDoubleClick?.(row.original),
20620
21371
  children: row.getVisibleCells().map((cell, idx) => {
20621
- const cellStyle = getColumnSizeStyle(cell.column.getSize());
21372
+ const columnSizing = cell.getContext().table.getState().columnSizing;
21373
+ const cellStyle = getBodyCellSizeStyle(cell.column.id, cell.column.getSize(), isExplicitColumnWidth(cell.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady);
20622
21374
  if (cell.column.id === "reorder") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsRowDragHandle, {
20623
21375
  isDragging,
20624
21376
  attributes,
@@ -20650,56 +21402,6 @@ const DsTableRow = ({ ref, row, isSelected }) => {
20650
21402
  })] });
20651
21403
  };
20652
21404
  //#endregion
20653
- //#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.module.scss
20654
- var ds_table_row_expandable_cell_module_default = { "button": "enUIjW_button" };
20655
- //#endregion
20656
- //#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.tsx
20657
- const DsTableRowExpandableCell = ({ row, buttonClassName }) => {
20658
- const isExpanded = row.getIsExpanded();
20659
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsButton, {
20660
- design: "v1.2",
20661
- buttonType: "tertiary",
20662
- size: "small",
20663
- className: (0, classnames.default)(ds_table_row_expandable_cell_module_default.button, buttonClassName),
20664
- onClick: (e) => {
20665
- e.stopPropagation();
20666
- row.toggleExpanded();
20667
- },
20668
- onDoubleClick: (e) => {
20669
- e.stopPropagation();
20670
- },
20671
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
20672
- icon: "chevron_right",
20673
- size: "small",
20674
- className: (0, classnames.default)(ds_table_shared_module_default.pageButtonIcon, isExpanded && "rotate-90")
20675
- })
20676
- });
20677
- };
20678
- //#endregion
20679
- //#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
20680
- const DsTableRowSelectableCell = ({ row }) => {
20681
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
20682
- className: ds_table_shared_module_default.checkboxContainer,
20683
- checked: row.getIsSelected(),
20684
- disabled: !row.getCanSelect(),
20685
- onCheckedChange: (checked) => row.toggleSelected(!!checked),
20686
- onClick: (e) => e.stopPropagation(),
20687
- onDoubleClick: (e) => e.stopPropagation()
20688
- });
20689
- };
20690
- //#endregion
20691
- //#region src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx
20692
- const DsTableHeaderSelectableCell = ({ table }) => {
20693
- const checked = table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false;
20694
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
20695
- className: ds_table_shared_module_default.checkboxContainer,
20696
- checked,
20697
- onCheckedChange: (nextChecked) => table.toggleAllRowsSelected(!!nextChecked),
20698
- onClick: (e) => e.stopPropagation(),
20699
- onDoubleClick: (e) => e.stopPropagation()
20700
- });
20701
- };
20702
- //#endregion
20703
21405
  //#region src/components/ds-table/hooks/use-drag-and-drop.tsx
20704
21406
  const DragWrapper = ({ children, onDragEnd, sensors }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_dnd_kit_core.DndContext, {
20705
21407
  collisionDetection: _dnd_kit_core.closestCenter,
@@ -20744,6 +21446,201 @@ function useDragAndDrop({ isDragEnabled, onOrderChange, items }) {
20744
21446
  };
20745
21447
  }
20746
21448
  //#endregion
21449
+ //#region src/components/ds-table/hooks/use-column-resize.ts
21450
+ const INITIAL_COLUMN_SIZING_INFO = {
21451
+ startOffset: null,
21452
+ startSize: null,
21453
+ deltaOffset: null,
21454
+ deltaPercentage: null,
21455
+ isResizingColumn: false,
21456
+ columnSizingStart: []
21457
+ };
21458
+ /**
21459
+ * Owns column-resize state, TanStack sizing handlers, origin snapshots, seed
21460
+ * measurement, hover/drag overlay model, and the context slice consumed by
21461
+ * resize handles.
21462
+ *
21463
+ * Call before `useReactTable`, spread `tableOptions` / `state` into it, then
21464
+ * `bind(table)` during render for CSS vars, overlay, and context.
21465
+ */
21466
+ const useColumnResize = ({ enabled, columnSizing: columnSizingProp, onColumnSizingChange, columns, columnVisibility }) => {
21467
+ const [columnResizeState, setColumnResizeState] = (0, react.useState)({
21468
+ columnSizing: {},
21469
+ columnSizingInfo: INITIAL_COLUMN_SIZING_INFO
21470
+ });
21471
+ const { columnSizing: internalColumnSizing, columnSizingInfo } = columnResizeState;
21472
+ const columnSizing = (0, react.useMemo)(() => columnSizingProp ? {
21473
+ ...columnSizingProp,
21474
+ ...internalColumnSizing
21475
+ } : internalColumnSizing, [columnSizingProp, internalColumnSizing]);
21476
+ const [resizeHover, setResizeHover] = (0, react.useState)(null);
21477
+ const dragStartOffsetRef = (0, react.useRef)(null);
21478
+ const resizeOriginSizingRef = (0, react.useRef)({});
21479
+ const containerRef = (0, react.useRef)(null);
21480
+ const tableRef = (0, react.useRef)(null);
21481
+ const columnSizingRef = (0, react.useRef)(columnSizing);
21482
+ columnSizingRef.current = columnSizing;
21483
+ const columnSizingInfoRef = (0, react.useRef)(columnSizingInfo);
21484
+ columnSizingInfoRef.current = columnSizingInfo;
21485
+ const onColumnSizingChangeRef = (0, react.useRef)(onColumnSizingChange);
21486
+ onColumnSizingChangeRef.current = onColumnSizingChange;
21487
+ const leafSizeBoundsRef = (0, react.useRef)([]);
21488
+ const handleColumnSizingChange = (0, react.useCallback)((updaterOrValue) => {
21489
+ const clamped = clampColumnSizing(typeof updaterOrValue === "function" ? updaterOrValue(columnSizingRef.current) : updaterOrValue, leafSizeBoundsRef.current);
21490
+ columnSizingRef.current = clamped;
21491
+ setColumnResizeState((prev) => ({
21492
+ ...prev,
21493
+ columnSizing: clamped
21494
+ }));
21495
+ }, []);
21496
+ const handleColumnSizingInfoChange = (0, react.useCallback)((updaterOrValue) => {
21497
+ const prevInfo = columnSizingInfoRef.current;
21498
+ const nextInfo = typeof updaterOrValue === "function" ? updaterOrValue(prevInfo) : updaterOrValue;
21499
+ const ended = Boolean(prevInfo.isResizingColumn) && nextInfo.isResizingColumn === false;
21500
+ columnSizingInfoRef.current = nextInfo;
21501
+ setColumnResizeState((prev) => ({
21502
+ ...prev,
21503
+ columnSizingInfo: nextInfo
21504
+ }));
21505
+ if (ended) onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(columnSizingRef.current));
21506
+ }, []);
21507
+ const handleResizeHover = (0, react.useCallback)((columnId, offset) => {
21508
+ setResizeHover(columnId === null || offset === null ? null : {
21509
+ columnId,
21510
+ offset
21511
+ });
21512
+ }, []);
21513
+ const handleResizeDragStart = (0, react.useCallback)((offset) => {
21514
+ dragStartOffsetRef.current = offset;
21515
+ }, []);
21516
+ const handleResizeReset = (0, react.useCallback)((columnIds) => {
21517
+ const next = { ...columnSizingRef.current };
21518
+ for (const id of columnIds) {
21519
+ const origin = resizeOriginSizingRef.current[id];
21520
+ if (origin !== void 0) next[id] = origin;
21521
+ }
21522
+ const clamped = clampColumnSizing(next, leafSizeBoundsRef.current);
21523
+ handleColumnSizingChange(clamped);
21524
+ onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(clamped));
21525
+ }, [handleColumnSizingChange]);
21526
+ const handleResizeKeyboardNudge = (0, react.useCallback)((columnId, delta) => {
21527
+ const table = tableRef.current;
21528
+ const column = table?.getColumn(columnId);
21529
+ if (!table || !column) return;
21530
+ const leaves = column.getLeafColumns().filter((leaf) => leaf.getIsVisible() && leaf.getCanResize());
21531
+ const totalSize = leaves.reduce((sum, leaf) => sum + leaf.getSize(), 0);
21532
+ if (leaves.length === 0 || totalSize <= 0) return;
21533
+ const next = { ...columnSizingRef.current };
21534
+ for (const leaf of leaves) {
21535
+ const size = leaf.getSize();
21536
+ next[leaf.id] = Math.round(size + delta * (size / totalSize));
21537
+ }
21538
+ const clamped = clampColumnSizing(next, leafSizeBoundsRef.current);
21539
+ handleColumnSizingChange(clamped);
21540
+ onColumnSizingChangeRef.current?.(omitBuiltinColumnSizing(clamped));
21541
+ }, [handleColumnSizingChange]);
21542
+ (0, react.useLayoutEffect)(() => {
21543
+ if (!enabled) return;
21544
+ const container = containerRef.current;
21545
+ const table = tableRef.current;
21546
+ if (!container || !table) return;
21547
+ const seedMissingLeaves = () => {
21548
+ if (container.getBoundingClientRect().width === 0) return false;
21549
+ const tableEl = container.querySelector("table");
21550
+ if (!(tableEl instanceof HTMLElement)) return false;
21551
+ const leaves = table.getVisibleLeafColumns();
21552
+ const measured = measureLeafHeaderWidths(tableEl, leaves.map((column) => column.id));
21553
+ for (const column of leaves) {
21554
+ const measuredWidth = measured[column.id];
21555
+ if (measuredWidth === void 0 || resizeOriginSizingRef.current[column.id] !== void 0) continue;
21556
+ resizeOriginSizingRef.current[column.id] = getResizeOriginSize(column, Math.round(measuredWidth));
21557
+ }
21558
+ const missing = collectMissingLeafSizing(measured, columnSizingRef.current);
21559
+ if (Object.keys(missing).length > 0) handleColumnSizingChange((prev) => ({
21560
+ ...clampColumnSizing(missing, leafSizeBoundsRef.current),
21561
+ ...prev
21562
+ }));
21563
+ return true;
21564
+ };
21565
+ if (seedMissingLeaves()) return;
21566
+ const observer = new ResizeObserver(() => {
21567
+ if (seedMissingLeaves()) observer.disconnect();
21568
+ });
21569
+ observer.observe(container);
21570
+ return () => observer.disconnect();
21571
+ }, [
21572
+ enabled,
21573
+ columns,
21574
+ columnVisibility,
21575
+ handleColumnSizingChange
21576
+ ]);
21577
+ const tableOptions = (0, react.useMemo)(() => ({
21578
+ enableColumnResizing: enabled,
21579
+ columnResizeMode: "onChange",
21580
+ ...enabled ? { defaultColumn: { minSize: 52 } } : {},
21581
+ onColumnSizingChange: handleColumnSizingChange,
21582
+ onColumnSizingInfoChange: handleColumnSizingInfoChange
21583
+ }), [
21584
+ enabled,
21585
+ handleColumnSizingChange,
21586
+ handleColumnSizingInfoChange
21587
+ ]);
21588
+ const bind = (table) => {
21589
+ tableRef.current = table;
21590
+ leafSizeBoundsRef.current = table.getAllLeafColumns();
21591
+ const visibleLeafIds = table.getVisibleLeafColumns().map((column) => column.id);
21592
+ const resizeSizingReady = enabled && visibleLeafIds.length > 0 && visibleLeafIds.every((id) => columnSizing[id] !== void 0);
21593
+ const columnSizeVars = resizeSizingReady ? {
21594
+ ...getColumnSizeCssVars(table.getFlatHeaders()),
21595
+ width: table.getTotalSize()
21596
+ } : void 0;
21597
+ if (!enabled) return {
21598
+ columnSizeVars: void 0,
21599
+ activeResize: null,
21600
+ context: {
21601
+ resizableColumns: false,
21602
+ resizeSizingReady: false,
21603
+ resizeContainerRef: containerRef,
21604
+ onResizeHover: handleResizeHover,
21605
+ onResizeDragStart: handleResizeDragStart,
21606
+ onResizeReset: handleResizeReset,
21607
+ onResizeKeyboardNudge: handleResizeKeyboardNudge
21608
+ }
21609
+ };
21610
+ const isResizingColumn = columnSizingInfo.isResizingColumn;
21611
+ const resizingHeader = typeof isResizingColumn === "string" ? table.getFlatHeaders().find((header) => header.column.id === isResizingColumn) : void 0;
21612
+ const startSize = columnSizingInfo.startSize;
21613
+ const clampedResizeDelta = resizingHeader && startSize !== null ? resizingHeader.getSize() - startSize : columnSizingInfo.deltaOffset ?? 0;
21614
+ return {
21615
+ columnSizeVars,
21616
+ activeResize: isResizingColumn && dragStartOffsetRef.current !== null ? {
21617
+ offset: dragStartOffsetRef.current + clampedResizeDelta,
21618
+ phase: "dragging"
21619
+ } : resizeHover ? {
21620
+ offset: resizeHover.offset,
21621
+ phase: "hover"
21622
+ } : null,
21623
+ context: {
21624
+ resizableColumns: enabled,
21625
+ resizeSizingReady,
21626
+ resizeContainerRef: containerRef,
21627
+ onResizeHover: handleResizeHover,
21628
+ onResizeDragStart: handleResizeDragStart,
21629
+ onResizeReset: handleResizeReset,
21630
+ onResizeKeyboardNudge: handleResizeKeyboardNudge
21631
+ }
21632
+ };
21633
+ };
21634
+ return {
21635
+ tableOptions,
21636
+ state: {
21637
+ columnSizing,
21638
+ columnSizingInfo
21639
+ },
21640
+ bind
21641
+ };
21642
+ };
21643
+ //#endregion
20747
21644
  //#region src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.module.scss
20748
21645
  var ds_table_body_virtualized_module_default = {
20749
21646
  "body": "vRRk8q_body",
@@ -20773,7 +21670,7 @@ var ds_table_row_virtualized_module_default = {
20773
21670
  //#endregion
20774
21671
  //#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
20775
21672
  const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
20776
- const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading } = useDsTableContext();
21673
+ const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading, resizeSizingReady } = useDsTableContext();
20777
21674
  const isExpanded = row.getIsExpanded();
20778
21675
  const isActive = activeRowId === row.id;
20779
21676
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
@@ -20797,8 +21694,9 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
20797
21694
  onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
20798
21695
  children: isExpandedRowContent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: row.getVisibleCells().map((cell, idx) => {
20799
21696
  const isLastColumn = idx === row.getVisibleCells().length - 1;
21697
+ const columnSizing = cell.getContext().table.getState().columnSizing;
20800
21698
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
20801
- style: getColumnSizeStyle(cell.column.getSize()),
21699
+ style: getBodyCellSizeStyle(cell.column.id, cell.column.getSize(), isExplicitColumnWidth(cell.column, resizeSizingReady ? columnSizing : {}), !!resizeSizingReady),
20802
21700
  className: (0, classnames.default)(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell, cell.column.id === "select" && ds_table_row_virtualized_module_default.selectableCell, isFirstLeafColumnOfGroup(cell.column) && ds_table_row_virtualized_module_default.groupStart, typeof cell.column.columnDef.editCell === "function" && ds_table_row_virtualized_module_default.editableCell),
20803
21701
  children: isLastColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableCell, {
20804
21702
  row,
@@ -20937,6 +21835,194 @@ function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAn
20937
21835
  });
20938
21836
  }
20939
21837
  //#endregion
21838
+ //#region src/components/ds-table/components/ds-table-header-selectable-cell/ds-table-header-selectable-cell.tsx
21839
+ const DsTableHeaderSelectableCell = ({ table }) => {
21840
+ const checked = table.getIsAllRowsSelected() ? true : table.getIsSomeRowsSelected() ? "indeterminate" : false;
21841
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
21842
+ className: ds_table_shared_module_default.checkboxContainer,
21843
+ checked,
21844
+ onCheckedChange: (nextChecked) => table.toggleAllRowsSelected(!!nextChecked),
21845
+ onClick: (e) => e.stopPropagation(),
21846
+ onDoubleClick: (e) => e.stopPropagation()
21847
+ });
21848
+ };
21849
+ //#endregion
21850
+ //#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.module.scss
21851
+ var ds_table_row_expandable_cell_module_default = { "button": "enUIjW_button" };
21852
+ //#endregion
21853
+ //#region src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.tsx
21854
+ const DsTableRowExpandableCell = ({ row, buttonClassName }) => {
21855
+ const isExpanded = row.getIsExpanded();
21856
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsButton, {
21857
+ design: "v1.2",
21858
+ buttonType: "tertiary",
21859
+ size: "small",
21860
+ className: (0, classnames.default)(ds_table_row_expandable_cell_module_default.button, buttonClassName),
21861
+ onClick: (e) => {
21862
+ e.stopPropagation();
21863
+ row.toggleExpanded();
21864
+ },
21865
+ onDoubleClick: (e) => {
21866
+ e.stopPropagation();
21867
+ },
21868
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
21869
+ icon: "chevron_right",
21870
+ size: "small",
21871
+ className: (0, classnames.default)(ds_table_shared_module_default.pageButtonIcon, isExpanded && "rotate-90")
21872
+ })
21873
+ });
21874
+ };
21875
+ //#endregion
21876
+ //#region src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx
21877
+ const DsTableRowSelectableCell = ({ row }) => {
21878
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
21879
+ className: ds_table_shared_module_default.checkboxContainer,
21880
+ checked: row.getIsSelected(),
21881
+ disabled: !row.getCanSelect(),
21882
+ onCheckedChange: (checked) => row.toggleSelected(!!checked),
21883
+ onClick: (e) => e.stopPropagation(),
21884
+ onDoubleClick: (e) => e.stopPropagation()
21885
+ });
21886
+ };
21887
+ //#endregion
21888
+ //#region src/components/ds-table/utils/table-columns.tsx
21889
+ const EXPLICIT_SIZE_META = { hasExplicitSize: true };
21890
+ /**
21891
+ * Clones leaf defs that authored `size` so `meta.hasExplicitSize` survives
21892
+ * TanStack’s default-size merge. Group defs are cloned only to recurse;
21893
+ * unsized leaves are returned as-is.
21894
+ */
21895
+ const stampExplicitSize = (columns) => columns.map((column) => {
21896
+ if ("columns" in column && column.columns) return {
21897
+ ...column,
21898
+ columns: stampExplicitSize(column.columns)
21899
+ };
21900
+ if (column.size === void 0) return column;
21901
+ return {
21902
+ ...column,
21903
+ meta: {
21904
+ ...column.meta,
21905
+ ...EXPLICIT_SIZE_META
21906
+ }
21907
+ };
21908
+ });
21909
+ /**
21910
+ * Prepends the builtin select / expander / reorder columns when those features
21911
+ * are on. Reorder is omitted for virtualized tables. Unshift order yields
21912
+ * visual order: reorder, expander, select, then consumer columns.
21913
+ */
21914
+ const getAugmentedColumns = (columns, { selectable, expandable, reorderable, virtualized, showSelectAllCheckbox }) => {
21915
+ const augmentedColumns = stampExplicitSize(columns);
21916
+ if (selectable) augmentedColumns.unshift({
21917
+ id: SELECT_COLUMN_ID,
21918
+ size: 36,
21919
+ minSize: 36,
21920
+ maxSize: 36,
21921
+ enableSorting: false,
21922
+ enableResizing: false,
21923
+ meta: EXPLICIT_SIZE_META,
21924
+ header: ({ table }) => showSelectAllCheckbox ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableHeaderSelectableCell, { table }) : null,
21925
+ cell: ({ row }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowSelectableCell, { row })
21926
+ });
21927
+ if (expandable) augmentedColumns.unshift({
21928
+ id: EXPANDER_COLUMN_ID,
21929
+ size: 36,
21930
+ minSize: 36,
21931
+ maxSize: 36,
21932
+ enableSorting: false,
21933
+ enableResizing: false,
21934
+ meta: EXPLICIT_SIZE_META,
21935
+ header: () => null,
21936
+ cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowExpandableCell, { row }) : null
21937
+ });
21938
+ if (reorderable && !virtualized) augmentedColumns.unshift({
21939
+ id: REORDER_COLUMN_ID,
21940
+ size: 60,
21941
+ minSize: 60,
21942
+ maxSize: 60,
21943
+ enableSorting: false,
21944
+ enableResizing: false,
21945
+ meta: EXPLICIT_SIZE_META,
21946
+ header: "Order",
21947
+ cell: () => null
21948
+ });
21949
+ return augmentedColumns;
21950
+ };
21951
+ /**
21952
+ * Replaces each leaf `cell` with `loadingCell` (or a default text skeleton).
21953
+ * Group columns are cloned with the same transform applied to their children.
21954
+ */
21955
+ const toSkeletonColumns = (columns) => columns.map((column) => "columns" in column && column.columns ? {
21956
+ ...column,
21957
+ columns: toSkeletonColumns(column.columns)
21958
+ } : {
21959
+ ...column,
21960
+ cell: column.loadingCell ?? (() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSkeletonText, { width: "60%" }))
21961
+ });
21962
+ const createSkeletonRows = () => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` }));
21963
+ //#endregion
21964
+ //#region src/components/ds-table/utils/table-api.ts
21965
+ const createTableApi = (table) => ({
21966
+ selectRow: (rowId) => {
21967
+ table.getRow(rowId).toggleSelected(true);
21968
+ },
21969
+ deselectRow: (rowId) => {
21970
+ table.getRow(rowId).toggleSelected(false);
21971
+ },
21972
+ selectAllRows: () => {
21973
+ table.toggleAllRowsSelected(true);
21974
+ },
21975
+ deselectAllRows: () => {
21976
+ table.toggleAllRowsSelected(false);
21977
+ },
21978
+ selectRows: (rowIds) => {
21979
+ const selection = {};
21980
+ rowIds.forEach((id) => selection[id] = true);
21981
+ table.setRowSelection(selection);
21982
+ },
21983
+ getSelectedRows: () => {
21984
+ return table.getFilteredSelectedRowModel().rows.map((r) => r.original);
21985
+ },
21986
+ expandRow: (rowId) => {
21987
+ table.getRow(rowId).toggleExpanded(true);
21988
+ },
21989
+ collapseRow: (rowId) => {
21990
+ table.getRow(rowId).toggleExpanded(false);
21991
+ },
21992
+ expandAllRows: () => {
21993
+ table.toggleAllRowsExpanded(true);
21994
+ },
21995
+ collapseAllRows: () => {
21996
+ table.toggleAllRowsExpanded(false);
21997
+ },
21998
+ expandRows: (rowIds) => {
21999
+ const expansion = {};
22000
+ rowIds.forEach((id) => expansion[id] = true);
22001
+ table.setExpanded(expansion);
22002
+ }
22003
+ });
22004
+ //#endregion
22005
+ //#region src/components/ds-table/utils/frozen-body.ts
22006
+ /**
22007
+ * `React.memo` comparator for the table body during a column-resize drag.
22008
+ *
22009
+ * While a column is being resized, sizing is applied through CSS variables on
22010
+ * the table element, so body rows do not need to re-render — freezing them keeps
22011
+ * dragging smooth. `table` is a stable mutable instance (ref-equal across
22012
+ * renders), so comparing it is meaningless and it is skipped; every other prop
22013
+ * must be referentially unchanged to freeze. That way parent-driven updates mid-
22014
+ * drag (`rowSelection`, `emptyState`, `onScroll`, `infiniteScroll`, ...) are not
22015
+ * dropped.
22016
+ */
22017
+ const areBodiesFrozen = (prev, next) => {
22018
+ if (!next.table.getState().columnSizingInfo.isResizingColumn) return false;
22019
+ const prevProps = prev;
22020
+ const nextProps = next;
22021
+ const keys = /* @__PURE__ */ new Set([...Object.keys(prevProps), ...Object.keys(nextProps)]);
22022
+ for (const key of keys) if (key !== "table" && prevProps[key] !== nextProps[key]) return false;
22023
+ return true;
22024
+ };
22025
+ //#endregion
20940
22026
  //#region src/components/ds-table/ds-table.tsx
20941
22027
  const ROW_SIZE_HEIGHT_MAP = {
20942
22028
  small: 36,
@@ -20946,7 +22032,9 @@ const ROW_SIZE_HEIGHT_MAP = {
20946
22032
  /**
20947
22033
  * Design system Table component
20948
22034
  */
20949
- const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", loading = false, expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, collapsedColumnGroups: externalCollapsedColumnGroups, onCollapsedColumnGroupsChange, locale, activeRowId, infiniteScroll, onCellEdit, onCellValidate }) => {
22035
+ const DsTable = (props) => {
22036
+ const tableProps = applyDsTableDefaults(props);
22037
+ const { ref, columns: columnsProp, data: tableData, controls, virtualized, virtualizedOptions, className, emptyState, bordered, fullWidth, rowSize, loading, expandable, selectable, showSelectAllCheckbox, onSelectionChange, onSortingChange, onScroll, actions, reorderable, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, collapsedColumnGroups: externalCollapsedColumnGroups, onCollapsedColumnGroupsChange, infiniteScroll, resizableColumns, columnSizing, onColumnSizingChange } = tableProps;
20950
22038
  const [data, setData] = react.useState(tableData);
20951
22039
  const [sorting, setSorting] = react.useState([]);
20952
22040
  const [internalColumnFilters, setInternalColumnFilters] = react.useState([]);
@@ -20960,7 +22048,6 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
20960
22048
  },
20961
22049
  items: data
20962
22050
  });
20963
- const tableContainerRef = react.useRef(null);
20964
22051
  const columnFilters = externalColumnFilters ?? internalColumnFilters;
20965
22052
  const handleColumnFiltersChange = (updaterOrValue) => {
20966
22053
  const newFilters = typeof updaterOrValue === "function" ? updaterOrValue(columnFilters) : updaterOrValue;
@@ -20992,63 +22079,31 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
20992
22079
  setRowSelection(newRowSelection);
20993
22080
  onSelectionChange?.(newRowSelection);
20994
22081
  };
20995
- const hasExpanderColumn = !!expandable;
20996
- const hasSelectColumn = !!selectable;
20997
- const hasReorderColumn = reorderable && !virtualized;
20998
- const columns = (0, react.useMemo)(() => {
20999
- const augmentedColumns = [...columnsProp];
21000
- if (hasSelectColumn) {
21001
- const selectColumn = {
21002
- id: SELECT_COLUMN_ID,
21003
- size: 36,
21004
- enableSorting: false,
21005
- enableResizing: false,
21006
- header: ({ table }) => showSelectAllCheckbox ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableHeaderSelectableCell, { table }) : null,
21007
- cell: ({ row }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowSelectableCell, { row })
21008
- };
21009
- augmentedColumns.unshift(selectColumn);
21010
- }
21011
- if (hasExpanderColumn) {
21012
- const expanderColumn = {
21013
- id: EXPANDER_COLUMN_ID,
21014
- size: 36,
21015
- enableSorting: false,
21016
- enableResizing: false,
21017
- header: () => null,
21018
- cell: ({ row }) => row.getCanExpand() ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRowExpandableCell, { row }) : null
21019
- };
21020
- augmentedColumns.unshift(expanderColumn);
21021
- }
21022
- if (hasReorderColumn) {
21023
- const reorderColumn = {
21024
- id: REORDER_COLUMN_ID,
21025
- size: 60,
21026
- enableSorting: false,
21027
- enableResizing: false,
21028
- header: "Order",
21029
- cell: () => null
21030
- };
21031
- augmentedColumns.unshift(reorderColumn);
21032
- }
21033
- return augmentedColumns;
21034
- }, [
22082
+ const hasSelectColumn = Boolean(selectable);
22083
+ const hasExpanderColumn = Boolean(expandable);
22084
+ const columns = (0, react.useMemo)(() => getAugmentedColumns(columnsProp, {
22085
+ selectable: hasSelectColumn,
22086
+ expandable: hasExpanderColumn,
22087
+ reorderable,
22088
+ virtualized,
22089
+ showSelectAllCheckbox
22090
+ }), [
21035
22091
  columnsProp,
21036
- hasExpanderColumn,
21037
- hasReorderColumn,
21038
22092
  hasSelectColumn,
22093
+ hasExpanderColumn,
22094
+ reorderable,
22095
+ virtualized,
21039
22096
  showSelectAllCheckbox
21040
22097
  ]);
21041
- const skeletonColumns = (0, react.useMemo)(() => {
21042
- const toSkeleton = (cols) => cols.map((column) => "columns" in column && column.columns ? {
21043
- ...column,
21044
- columns: toSkeleton(column.columns)
21045
- } : {
21046
- ...column,
21047
- cell: column.loadingCell ?? (() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSkeletonText, { width: "60%" }))
21048
- });
21049
- return toSkeleton(columns);
21050
- }, [columns]);
21051
- const skeletonData = (0, react.useMemo)(() => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` })), []);
22098
+ const skeletonColumns = (0, react.useMemo)(() => toSkeletonColumns(columns), [columns]);
22099
+ const skeletonData = (0, react.useMemo)(() => createSkeletonRows(), []);
22100
+ const resize = useColumnResize({
22101
+ enabled: resizableColumns,
22102
+ columnSizing,
22103
+ onColumnSizingChange,
22104
+ columns,
22105
+ columnVisibility
22106
+ });
21052
22107
  const table = (0, _tanstack_react_table.useReactTable)({
21053
22108
  data: loading ? skeletonData : reorderable ? data : tableData,
21054
22109
  columns: loading ? skeletonColumns : columns,
@@ -21062,87 +22117,30 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
21062
22117
  getRowId: (row) => row.id,
21063
22118
  getExpandedRowModel: (0, _tanstack_react_table.getExpandedRowModel)(),
21064
22119
  getRowCanExpand: typeof expandable === "function" ? (row) => expandable(row.original) : () => expandable,
22120
+ ...resize.tableOptions,
21065
22121
  state: {
21066
22122
  sorting,
21067
22123
  columnFilters,
21068
22124
  columnVisibility,
21069
- rowSelection
22125
+ rowSelection,
22126
+ ...resize.state
21070
22127
  },
21071
22128
  enableRowSelection: typeof selectable === "function" ? (row) => selectable(row.original) : selectable
21072
22129
  });
21073
- (0, react.useImperativeHandle)(ref, () => ({
21074
- selectRow: (rowId) => {
21075
- table.getRow(rowId).toggleSelected(true);
21076
- },
21077
- deselectRow: (rowId) => {
21078
- table.getRow(rowId).toggleSelected(false);
21079
- },
21080
- selectAllRows: () => {
21081
- table.toggleAllRowsSelected(true);
21082
- },
21083
- deselectAllRows: () => {
21084
- table.toggleAllRowsSelected(false);
21085
- },
21086
- selectRows: (rowIds) => {
21087
- const selection = {};
21088
- rowIds.forEach((id) => selection[id] = true);
21089
- table.setRowSelection(selection);
21090
- },
21091
- getSelectedRows: () => {
21092
- return table.getFilteredSelectedRowModel().rows.map((r) => r.original);
21093
- },
21094
- expandRow: (rowId) => {
21095
- table.getRow(rowId).toggleExpanded(true);
21096
- },
21097
- collapseRow: (rowId) => {
21098
- table.getRow(rowId).toggleExpanded(false);
21099
- },
21100
- expandAllRows: () => {
21101
- table.toggleAllRowsExpanded(true);
21102
- },
21103
- collapseAllRows: () => {
21104
- table.toggleAllRowsExpanded(false);
21105
- },
21106
- expandRows: (rowIds) => {
21107
- const expansion = {};
21108
- rowIds.forEach((id) => expansion[id] = true);
21109
- table.setExpanded(expansion);
21110
- }
21111
- }), [table]);
21112
- const { rows, rowsById } = table.getRowModel();
21113
- const renderEmptyState = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
21114
- colSpan: columns.length,
21115
- className: ds_table_module_default.emptyState,
21116
- children: emptyState || "No results."
21117
- }) });
22130
+ const { columnSizeVars, activeResize, context: resizeContext } = resize.bind(table);
22131
+ (0, react.useImperativeHandle)(ref, () => createTableApi(table), [table]);
22132
+ const { rowsById } = table.getRowModel();
21118
22133
  const selectedRows = Object.entries(rowSelection).filter(([, selected]) => selected).map(([key]) => rowsById[key]?.original).filter((v) => !!v);
21119
22134
  const isBulkActionsVisible = selectable && actions.length > 0 && selectedRows.length > 0;
21120
- const editingState = useEditingState(onCellEdit, onCellValidate);
21121
- const contextValue = {
21122
- stickyHeader,
21123
- bordered,
21124
- fullWidth,
21125
- rowSize,
21126
- expandable,
21127
- selectable,
21128
- reorderable,
21129
- showSelectAllCheckbox,
21130
- loading,
21131
- onRowClick: loading ? void 0 : onRowClick,
21132
- onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
21133
- primaryRowActions,
21134
- secondaryRowActions,
21135
- renderExpandedRow,
21136
- virtualized,
21137
- activeRowId,
21138
- collapsedColumnGroups,
21139
- onToggleColumnGroup: toggleColumnGroup,
21140
- locale,
21141
- onCellEdit,
21142
- ...editingState
21143
- };
21144
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableContext.Provider, {
21145
- value: contextValue,
22135
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableContextProvider, {
22136
+ tableProps,
22137
+ derived: {
22138
+ grouping: {
22139
+ collapsedColumnGroups,
22140
+ onToggleColumnGroup: toggleColumnGroup
22141
+ },
22142
+ resize: resizeContext
22143
+ },
21146
22144
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
21147
22145
  className: (0, classnames.default)(ds_table_module_default.container, isBulkActionsVisible && ds_table_module_default.bulkActionsVisible, className),
21148
22146
  children: [
@@ -21150,12 +22148,13 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
21150
22148
  className: ds_table_module_default.controls,
21151
22149
  children: controls
21152
22150
  }),
21153
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
21154
- ref: tableContainerRef,
22151
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
22152
+ ref: resizeContext.resizeContainerRef,
21155
22153
  className: (0, classnames.default)(!virtualized && ds_table_module_default.dataTableContainer, virtualized && ds_table_module_default.virtualizedContainer),
21156
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragWrapper, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table, {
22154
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragWrapper, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table, {
21157
22155
  className: (0, classnames.default)(fullWidth && ds_table_module_default.fullWidth, !bordered && ds_table_module_default.tableNoBorder),
21158
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableHeader, { table }), virtualized ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableBodyVirtualized, {
22156
+ style: columnSizeVars,
22157
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableHeader, { table }), virtualized ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedDsTableBodyVirtualized, {
21159
22158
  table,
21160
22159
  emptyState,
21161
22160
  estimateSize: virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize],
@@ -21163,11 +22162,16 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
21163
22162
  onScroll,
21164
22163
  rowSelection,
21165
22164
  infiniteScroll
21166
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableWrapper, { children: rows.length ? rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRow, {
21167
- row,
21168
- isSelected: !!rowSelection[row.id]
21169
- }, row.id)) : renderEmptyState() }) })]
21170
- }) })
22165
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoizedDsTableRowsBody, {
22166
+ table,
22167
+ rowSelection,
22168
+ emptyState,
22169
+ SortableWrapper
22170
+ })]
22171
+ }) }), activeResize ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableResizeOverlay, {
22172
+ offset: activeResize.offset,
22173
+ phase: activeResize.phase
22174
+ }) : null]
21171
22175
  }),
21172
22176
  selectable && actions.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableBulkActions, {
21173
22177
  numSelectedRows: selectedRows.length,
@@ -21181,6 +22185,20 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, controls, virtual
21181
22185
  })
21182
22186
  });
21183
22187
  };
22188
+ const DsTableRowsBody = ({ table, rowSelection, emptyState, SortableWrapper }) => {
22189
+ const { rows } = table.getRowModel();
22190
+ const columnCount = table.getVisibleLeafColumns().length;
22191
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableWrapper, { children: rows.length ? rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableRow, {
22192
+ row,
22193
+ isSelected: !!rowSelection[row.id]
22194
+ }, row.id)) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
22195
+ colSpan: columnCount,
22196
+ className: ds_table_module_default.emptyState,
22197
+ children: emptyState || "No results."
22198
+ }) }) }) });
22199
+ };
22200
+ const MemoizedDsTableRowsBody = react.memo(DsTableRowsBody, areBodiesFrozen);
22201
+ const MemoizedDsTableBodyVirtualized = react.memo(DsTableBodyVirtualized, areBodiesFrozen);
21184
22202
  DsTable.displayName = "DsTable";
21185
22203
  //#endregion
21186
22204
  //#region src/components/ds-table/hooks/use-cell-editor.ts
@@ -21195,6 +22213,7 @@ const useCellEditor = ({ cellContext }) => {
21195
22213
  const isActiveCell = ctx.editing !== null && ctx.editing.cell.row.id === row.id && ctx.editing.cell.column.id === column.id;
21196
22214
  const value = isActiveCell && ctx.editing ? ctx.editing.draftValue : getValue();
21197
22215
  const error = isActiveCell && ctx.editing ? ctx.editing.error : null;
22216
+ const isPending = isActiveCell && ctx.editing ? ctx.editing.pending : false;
21198
22217
  const setValue = (next) => {
21199
22218
  ctx.setDraft(next);
21200
22219
  };
@@ -21210,6 +22229,7 @@ const useCellEditor = ({ cellContext }) => {
21210
22229
  return {
21211
22230
  value,
21212
22231
  error,
22232
+ isPending,
21213
22233
  setValue,
21214
22234
  commit,
21215
22235
  cancel,
@@ -21241,7 +22261,7 @@ const TableEditFormControl = ({ cellContext, error, children }) => {
21241
22261
  //#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx
21242
22262
  /** Text input editor for table cells. Render via `ColumnDef.editCell`. */
21243
22263
  const DsTableEditCellText = ({ cellContext, placeholder, maxLength }) => {
21244
- const { value, setValue, error } = useCellEditor({ cellContext });
22264
+ const { value, setValue, error, isPending } = useCellEditor({ cellContext });
21245
22265
  const inputRef = (0, react.useRef)(null);
21246
22266
  (0, react.useEffect)(() => {
21247
22267
  const input = inputRef.current;
@@ -21258,6 +22278,7 @@ const DsTableEditCellText = ({ cellContext, placeholder, maxLength }) => {
21258
22278
  value,
21259
22279
  placeholder,
21260
22280
  maxLength,
22281
+ disabled: isPending,
21261
22282
  onValueChange: setValue,
21262
22283
  slots: error ? { endAdornment: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
21263
22284
  icon: "error",
@@ -21271,7 +22292,7 @@ DsTableEditCellText.displayName = "DsTableEditCellText";
21271
22292
  //#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx
21272
22293
  /** Number input editor for table cells. Render via `ColumnDef.editCell`. */
21273
22294
  const DsTableEditCellNumber = ({ cellContext, min, max, step }) => {
21274
- const { value, setValue, error } = useCellEditor({ cellContext });
22295
+ const { value, setValue, error, isPending } = useCellEditor({ cellContext });
21275
22296
  const inputRef = (0, react.useRef)(null);
21276
22297
  (0, react.useEffect)(() => {
21277
22298
  const input = inputRef.current;
@@ -21289,6 +22310,7 @@ const DsTableEditCellNumber = ({ cellContext, min, max, step }) => {
21289
22310
  min,
21290
22311
  max,
21291
22312
  step,
22313
+ disabled: isPending,
21292
22314
  onValueChange: setValue
21293
22315
  })
21294
22316
  });
@@ -21298,7 +22320,7 @@ DsTableEditCellNumber.displayName = "DsTableEditCellNumber";
21298
22320
  //#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx
21299
22321
  /** Select editor for table cells. Render via `ColumnDef.editCell`. */
21300
22322
  const DsTableEditCellSelect = ({ cellContext, options, placeholder }) => {
21301
- const { value, setValue, error } = useCellEditor({ cellContext });
22323
+ const { value, setValue, error, isPending } = useCellEditor({ cellContext });
21302
22324
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableEditFormControl, {
21303
22325
  cellContext,
21304
22326
  error,
@@ -21307,6 +22329,7 @@ const DsTableEditCellSelect = ({ cellContext, options, placeholder }) => {
21307
22329
  value,
21308
22330
  options,
21309
22331
  placeholder,
22332
+ disabled: isPending,
21310
22333
  onValueChange: setValue
21311
22334
  })
21312
22335
  });
@@ -21316,7 +22339,7 @@ DsTableEditCellSelect.displayName = "DsTableEditCellSelect";
21316
22339
  //#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx
21317
22340
  /** Date picker editor for table cells. Render via `ColumnDef.editCell`. */
21318
22341
  const DsTableEditCellDate = ({ cellContext, min, max, placeholder }) => {
21319
- const { value, setValue, error } = useCellEditor({ cellContext });
22342
+ const { value, setValue, error, isPending } = useCellEditor({ cellContext });
21320
22343
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableEditFormControl, {
21321
22344
  cellContext,
21322
22345
  error,
@@ -21326,6 +22349,7 @@ const DsTableEditCellDate = ({ cellContext, min, max, placeholder }) => {
21326
22349
  min,
21327
22350
  max,
21328
22351
  placeholder,
22352
+ disabled: isPending,
21329
22353
  onChange: setValue,
21330
22354
  slotProps: error ? { input: { slots: { endAdornment: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
21331
22355
  icon: "error",
@@ -21339,10 +22363,10 @@ DsTableEditCellDate.displayName = "DsTableEditCellDate";
21339
22363
  //#region src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx
21340
22364
  /** Checkbox editor for table cells. Render via `ColumnDef.editCell`. */
21341
22365
  const DsTableEditCellCheckbox = ({ cellContext, disabled }) => {
21342
- const { value, setValue } = useCellEditor({ cellContext });
22366
+ const { value, setValue, isPending } = useCellEditor({ cellContext });
21343
22367
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsCheckbox, {
21344
22368
  checked: value,
21345
- disabled,
22369
+ disabled: disabled || isPending,
21346
22370
  onCheckedChange: (checked) => setValue(checked === true)
21347
22371
  });
21348
22372
  };
@@ -22911,6 +23935,7 @@ exports.DsSkeleton = DsSkeleton;
22911
23935
  exports.DsSkeletonCircle = DsSkeletonCircle;
22912
23936
  exports.DsSkeletonRect = DsSkeletonRect;
22913
23937
  exports.DsSkeletonText = DsSkeletonText;
23938
+ exports.DsSlider = DsSlider;
22914
23939
  exports.DsSmartTabs = DsSmartTabs;
22915
23940
  exports.DsSpinner = DsSpinner;
22916
23941
  exports.DsSplitButton = DsSplitButton;
@@ -22950,6 +23975,7 @@ exports.FileUpload = FileUpload;
22950
23975
  exports.FileUploadError = FileUploadError;
22951
23976
  exports.RetryableFileUploadError = RetryableFileUploadError;
22952
23977
  exports.alertBannerVariants = alertBannerVariants;
23978
+ exports.autocompleteSizes = autocompleteSizes;
22953
23979
  exports.breakpoints = breakpoints;
22954
23980
  exports.buttonV3Colors = buttonV3Colors;
22955
23981
  exports.buttonV3Sizes = buttonV3Sizes;