@drivenets/design-system 0.13.0 → 0.14.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 (64) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.cjs +791 -326
  3. package/dist/index.d.cts +265 -21
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +265 -21
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +789 -326
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +13 -11
  11. package/src/components/ds-button-v3/ds-button-v3.figma.ts +99 -0
  12. package/src/components/ds-button-v3/ds-button-v3.module.scss +22 -22
  13. package/src/components/ds-card/figma/ds-card-content.figma.ts +15 -0
  14. package/src/components/ds-card/figma/ds-card-footer.figma.ts +15 -0
  15. package/src/components/ds-card/figma/ds-card-header.figma.ts +15 -0
  16. package/src/components/ds-card/figma/ds-card.figma.ts +72 -0
  17. package/src/components/ds-date-picker/ds-date-picker.figma.ts +19 -0
  18. package/src/components/ds-form-control/ds-form-control.figma.ts +76 -0
  19. package/src/components/ds-icon/figma/ds-icon-material.figma.batch.ts +10 -0
  20. package/src/components/ds-icon/figma/ds-icon-special.figma.batch.ts +18 -0
  21. package/src/components/ds-icon/figma/ds-icon.figma.batch.json +2873 -0
  22. package/src/components/ds-modal/figma/ds-modal-content.figma.ts +18 -0
  23. package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +19 -0
  24. package/src/components/ds-modal/figma/ds-modal-header.figma.ts +21 -0
  25. package/src/components/ds-modal/figma/ds-modal.figma.ts +36 -0
  26. package/src/components/ds-popover/ds-popover.module.scss +58 -16
  27. package/src/components/ds-popover/ds-popover.tsx +148 -24
  28. package/src/components/ds-popover/ds-popover.types.ts +95 -12
  29. package/src/components/ds-popover/index.ts +1 -1
  30. package/src/components/ds-select/ds-select.figma.ts +53 -0
  31. package/src/components/ds-split-button/ds-split-button.figma.ts +95 -0
  32. package/src/components/ds-status-badge-v2/ds-status-badge-v2.figma.ts +41 -0
  33. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx +8 -3
  34. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss +31 -0
  35. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +48 -0
  36. package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.types.ts +12 -0
  37. package/src/components/ds-table/components/ds-table-group-header-cell/index.ts +2 -0
  38. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +4 -0
  39. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +55 -39
  40. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +4 -0
  41. package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +2 -0
  42. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +4 -0
  43. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +2 -0
  44. package/src/components/ds-table/context/ds-table-context.ts +4 -0
  45. package/src/components/ds-table/ds-table.tsx +20 -2
  46. package/src/components/ds-table/ds-table.types.ts +55 -0
  47. package/src/components/ds-table/figma/ds-table-expandable.figma.ts +17 -0
  48. package/src/components/ds-table/figma/ds-table.figma.ts +16 -0
  49. package/src/components/ds-table/grouping/hooks/use-column-groups.ts +73 -0
  50. package/src/components/ds-table/grouping/index.ts +5 -0
  51. package/src/components/ds-table/grouping/types/column-group-meta.augmentation.ts +26 -0
  52. package/src/components/ds-table/grouping/types/column-group.types.ts +35 -0
  53. package/src/components/ds-table/grouping/utils/column-group.ts +119 -0
  54. package/src/components/ds-table/index.ts +3 -0
  55. package/src/components/ds-table/styles/_variables.scss +1 -0
  56. package/src/components/ds-tag/ds-tag.module.scss +22 -1
  57. package/src/components/ds-tag/ds-tag.tsx +16 -3
  58. package/src/components/ds-tag/ds-tag.types.ts +22 -8
  59. package/src/components/ds-tag/ds-tag.unit.test.ts +32 -0
  60. package/src/components/ds-tag-filter/ds-tag-filter.tsx +14 -22
  61. package/src/components/ds-text-input/ds-text-input.figma.ts +60 -0
  62. package/src/components/ds-time-picker/ds-time-picker.figma.ts +18 -0
  63. package/src/styles/_root_new.scss +2 -0
  64. package/src/styles/_scrollbars.scss +27 -50
package/dist/index.cjs CHANGED
@@ -52,8 +52,6 @@ let _ark_ui_react_popover = require("@ark-ui/react/popover");
52
52
  let _ark_ui_react_select = require("@ark-ui/react/select");
53
53
  let _radix_ui_react_collapsible = require("@radix-ui/react-collapsible");
54
54
  _radix_ui_react_collapsible = __toESM(_radix_ui_react_collapsible);
55
- let _radix_ui_react_popover = require("@radix-ui/react-popover");
56
- _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
57
55
  let _ark_ui_react_radio_group = require("@ark-ui/react/radio-group");
58
56
  let _ark_ui_react_segment_group = require("@ark-ui/react/segment-group");
59
57
  let _zag_js_steps = require("@zag-js/steps");
@@ -7184,18 +7182,86 @@ var ds_tag_module_default = {
7184
7182
  "exclude": "UdH7Tq_exclude",
7185
7183
  "icon": "UdH7Tq_icon",
7186
7184
  "include": "UdH7Tq_include",
7185
+ "key": "UdH7Tq_key",
7186
+ "keyValue": "UdH7Tq_keyValue",
7187
7187
  "label": "UdH7Tq_label",
7188
7188
  "selected": "UdH7Tq_selected",
7189
7189
  "tag": "UdH7Tq_tag",
7190
+ "value": "UdH7Tq_value",
7190
7191
  "variantIcon": "UdH7Tq_variantIcon"
7191
7192
  };
7192
7193
  //#endregion
7194
+ //#region src/components/ds-stack/ds-stack.module.scss
7195
+ var ds_stack_module_default = { "root": "efmmNG_root" };
7196
+ //#endregion
7197
+ //#region src/components/ds-stack/ds-stack.tsx
7198
+ const DsStack$1 = (t0) => {
7199
+ const $ = (0, react_compiler_runtime.c)(16);
7200
+ const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
7201
+ let t1;
7202
+ if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
7203
+ t1 = {
7204
+ flexDirection: direction,
7205
+ gap,
7206
+ alignItems,
7207
+ justifyContent,
7208
+ flex,
7209
+ flexWrap,
7210
+ width,
7211
+ ...style
7212
+ };
7213
+ $[0] = alignItems;
7214
+ $[1] = direction;
7215
+ $[2] = flex;
7216
+ $[3] = flexWrap;
7217
+ $[4] = gap;
7218
+ $[5] = justifyContent;
7219
+ $[6] = style;
7220
+ $[7] = width;
7221
+ $[8] = t1;
7222
+ } else t1 = $[8];
7223
+ const layoutStyle = t1;
7224
+ let t2;
7225
+ if ($[9] !== className) {
7226
+ t2 = (0, classnames.default)(ds_stack_module_default.root, className);
7227
+ $[9] = className;
7228
+ $[10] = t2;
7229
+ } else t2 = $[10];
7230
+ let t3;
7231
+ if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
7232
+ t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
7233
+ ref,
7234
+ className: t2,
7235
+ style: layoutStyle,
7236
+ children
7237
+ });
7238
+ $[11] = children;
7239
+ $[12] = layoutStyle;
7240
+ $[13] = ref;
7241
+ $[14] = t2;
7242
+ $[15] = t3;
7243
+ } else t3 = $[15];
7244
+ return t3;
7245
+ };
7246
+ //#endregion
7247
+ //#region src/components/ds-stack/index.ts
7248
+ const DsStack = withResponsiveProps(DsStack$1, [
7249
+ "direction",
7250
+ "gap",
7251
+ "alignItems",
7252
+ "justifyContent",
7253
+ "flex",
7254
+ "flexWrap",
7255
+ "width"
7256
+ ]);
7257
+ DsStack.displayName = "DsStack";
7258
+ //#endregion
7193
7259
  //#region src/components/ds-tag/ds-tag.tsx
7194
7260
  /**
7195
7261
  * Design system Tag component
7196
7262
  */
7197
7263
  const DsTag = (t0) => {
7198
- const $ = (0, react_compiler_runtime.c)(61);
7264
+ const $ = (0, react_compiler_runtime.c)(64);
7199
7265
  let className;
7200
7266
  let label;
7201
7267
  let onClick;
@@ -7209,8 +7275,9 @@ const DsTag = (t0) => {
7209
7275
  let t4;
7210
7276
  let t5;
7211
7277
  let t6;
7278
+ let value;
7212
7279
  if ($[0] !== t0) {
7213
- ({ref, label, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
7280
+ ({ref, label, value, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
7214
7281
  $[0] = t0;
7215
7282
  $[1] = className;
7216
7283
  $[2] = label;
@@ -7225,6 +7292,7 @@ const DsTag = (t0) => {
7225
7292
  $[11] = t4;
7226
7293
  $[12] = t5;
7227
7294
  $[13] = t6;
7295
+ $[14] = value;
7228
7296
  } else {
7229
7297
  className = $[1];
7230
7298
  label = $[2];
@@ -7239,31 +7307,32 @@ const DsTag = (t0) => {
7239
7307
  t4 = $[11];
7240
7308
  t5 = $[12];
7241
7309
  t6 = $[13];
7310
+ value = $[14];
7242
7311
  }
7243
7312
  let t7;
7244
- if ($[14] !== t1) {
7313
+ if ($[15] !== t1) {
7245
7314
  t7 = t1 === void 0 ? {} : t1;
7246
- $[14] = t1;
7247
- $[15] = t7;
7248
- } else t7 = $[15];
7315
+ $[15] = t1;
7316
+ $[16] = t7;
7317
+ } else t7 = $[16];
7249
7318
  const style = t7;
7250
7319
  const size = t2 === void 0 ? "medium" : t2;
7251
7320
  const selected = t3 === void 0 ? false : t3;
7252
7321
  const variant = t4 === void 0 ? "default" : t4;
7253
7322
  const disabled = t5 === void 0 ? false : t5;
7254
7323
  let t8;
7255
- if ($[16] !== t6) {
7324
+ if ($[17] !== t6) {
7256
7325
  t8 = t6 === void 0 ? {} : t6;
7257
- $[16] = t6;
7258
- $[17] = t8;
7259
- } else t8 = $[17];
7326
+ $[17] = t6;
7327
+ $[18] = t8;
7328
+ } else t8 = $[18];
7260
7329
  const locale = t8;
7261
7330
  const t9 = onClick !== void 0 && !disabled;
7262
7331
  const t10 = selected && !disabled;
7263
7332
  const t11 = variant === "include";
7264
7333
  const t12 = variant === "exclude";
7265
7334
  let t13;
7266
- if ($[18] !== className || $[19] !== disabled || $[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t9) {
7335
+ if ($[19] !== className || $[20] !== disabled || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t9) {
7267
7336
  t13 = (0, classnames.default)(ds_tag_module_default.tag, {
7268
7337
  [ds_tag_module_default.clickable]: t9,
7269
7338
  [ds_tag_module_default.selected]: t10,
@@ -7271,27 +7340,27 @@ const DsTag = (t0) => {
7271
7340
  [ds_tag_module_default.exclude]: t12,
7272
7341
  [ds_tag_module_default.disabled]: disabled
7273
7342
  }, className);
7274
- $[18] = className;
7275
- $[19] = disabled;
7276
- $[20] = t10;
7277
- $[21] = t11;
7278
- $[22] = t12;
7279
- $[23] = t9;
7280
- $[24] = t13;
7281
- } else t13 = $[24];
7343
+ $[19] = className;
7344
+ $[20] = disabled;
7345
+ $[21] = t10;
7346
+ $[22] = t11;
7347
+ $[23] = t12;
7348
+ $[24] = t9;
7349
+ $[25] = t13;
7350
+ } else t13 = $[25];
7282
7351
  const tagClass = t13;
7283
7352
  let t14;
7284
- if ($[25] !== onDelete) {
7353
+ if ($[26] !== onDelete) {
7285
7354
  t14 = (event) => {
7286
7355
  event.stopPropagation();
7287
7356
  onDelete?.(event);
7288
7357
  };
7289
- $[25] = onDelete;
7290
- $[26] = t14;
7291
- } else t14 = $[26];
7358
+ $[26] = onDelete;
7359
+ $[27] = t14;
7360
+ } else t14 = $[27];
7292
7361
  const handleDeleteClick = t14;
7293
7362
  let t15;
7294
- if ($[27] !== onClick || $[28] !== onDelete) {
7363
+ if ($[28] !== onClick || $[29] !== onDelete) {
7295
7364
  t15 = (event_0) => {
7296
7365
  if (onClick && (event_0.key === "Enter" || event_0.key === " ")) {
7297
7366
  event_0.preventDefault();
@@ -7303,13 +7372,13 @@ const DsTag = (t0) => {
7303
7372
  onDelete(event_0);
7304
7373
  }
7305
7374
  };
7306
- $[27] = onClick;
7307
- $[28] = onDelete;
7308
- $[29] = t15;
7309
- } else t15 = $[29];
7375
+ $[28] = onClick;
7376
+ $[29] = onDelete;
7377
+ $[30] = t15;
7378
+ } else t15 = $[30];
7310
7379
  const handleKeyDownTag = t15;
7311
7380
  let t16;
7312
- if ($[30] !== onDelete) {
7381
+ if ($[31] !== onDelete) {
7313
7382
  t16 = (event_1) => {
7314
7383
  event_1.stopPropagation();
7315
7384
  if (onDelete && (event_1.key === "Enter" || event_1.key === " ")) {
@@ -7317,21 +7386,21 @@ const DsTag = (t0) => {
7317
7386
  onDelete(event_1);
7318
7387
  }
7319
7388
  };
7320
- $[30] = onDelete;
7321
- $[31] = t16;
7322
- } else t16 = $[31];
7389
+ $[31] = onDelete;
7390
+ $[32] = t16;
7391
+ } else t16 = $[32];
7323
7392
  const handleKeyDownDelete = t16;
7324
7393
  let t17;
7325
- if ($[32] !== onClick) {
7394
+ if ($[33] !== onClick) {
7326
7395
  t17 = (event_2) => {
7327
7396
  if (onClick) {
7328
7397
  event_2.preventDefault();
7329
7398
  onClick(event_2);
7330
7399
  }
7331
7400
  };
7332
- $[32] = onClick;
7333
- $[33] = t17;
7334
- } else t17 = $[33];
7401
+ $[33] = onClick;
7402
+ $[34] = t17;
7403
+ } else t17 = $[34];
7335
7404
  const handleClick = t17;
7336
7405
  let iconVariant = null;
7337
7406
  if (variant === "include") iconVariant = "check_circle";
@@ -7344,7 +7413,7 @@ const DsTag = (t0) => {
7344
7413
  const t23 = typeof label === "string" ? label : void 0;
7345
7414
  const t24 = onClick && selected && !disabled ? "true" : void 0;
7346
7415
  let t25;
7347
- if ($[34] !== iconVariant || $[35] !== slots?.icon) {
7416
+ if ($[35] !== iconVariant || $[36] !== slots?.icon) {
7348
7417
  t25 = (slots?.icon || iconVariant) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
7349
7418
  className: (0, classnames.default)(ds_tag_module_default.icon),
7350
7419
  children: slots?.icon ?? (iconVariant && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
@@ -7353,25 +7422,40 @@ const DsTag = (t0) => {
7353
7422
  className: (0, classnames.default)(ds_tag_module_default.variantIcon)
7354
7423
  }))
7355
7424
  });
7356
- $[34] = iconVariant;
7357
- $[35] = slots?.icon;
7358
- $[36] = t25;
7359
- } else t25 = $[36];
7360
- const t26 = size === "small" ? "body-xs-reg" : "body-sm-reg";
7361
- let t27;
7362
- if ($[37] !== label || $[38] !== t26) {
7363
- t27 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
7364
- variant: t26,
7425
+ $[35] = iconVariant;
7426
+ $[36] = slots?.icon;
7427
+ $[37] = t25;
7428
+ } else t25 = $[37];
7429
+ let t26;
7430
+ if ($[38] !== label || $[39] !== size || $[40] !== value || $[41] !== variant) {
7431
+ t26 = variant === "key-value" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
7432
+ direction: "row",
7433
+ alignItems: "center",
7434
+ gap: "var(--3xs)",
7435
+ className: ds_tag_module_default.keyValue,
7436
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
7437
+ variant: size === "small" ? "body-xs-md" : "body-sm-md",
7438
+ className: ds_tag_module_default.key,
7439
+ children: label
7440
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
7441
+ variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
7442
+ className: ds_tag_module_default.value,
7443
+ children: value
7444
+ })]
7445
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
7446
+ variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
7365
7447
  className: ds_tag_module_default.label,
7366
7448
  children: label
7367
7449
  });
7368
- $[37] = label;
7369
- $[38] = t26;
7370
- $[39] = t27;
7371
- } else t27 = $[39];
7372
- let t28;
7373
- if ($[40] !== disabled || $[41] !== handleDeleteClick || $[42] !== handleKeyDownDelete || $[43] !== locale || $[44] !== onDelete) {
7374
- t28 = onDelete && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7450
+ $[38] = label;
7451
+ $[39] = size;
7452
+ $[40] = value;
7453
+ $[41] = variant;
7454
+ $[42] = t26;
7455
+ } else t26 = $[42];
7456
+ let t27;
7457
+ if ($[43] !== disabled || $[44] !== handleDeleteClick || $[45] !== handleKeyDownDelete || $[46] !== locale || $[47] !== onDelete) {
7458
+ t27 = onDelete && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
7375
7459
  type: "button",
7376
7460
  className: ds_tag_module_default.deleteButton,
7377
7461
  onClick: handleDeleteClick,
@@ -7383,16 +7467,16 @@ const DsTag = (t0) => {
7383
7467
  size: "tiny"
7384
7468
  })
7385
7469
  });
7386
- $[40] = disabled;
7387
- $[41] = handleDeleteClick;
7388
- $[42] = handleKeyDownDelete;
7389
- $[43] = locale;
7390
- $[44] = onDelete;
7391
- $[45] = t28;
7392
- } else t28 = $[45];
7393
- let t29;
7394
- if ($[46] !== disabled || $[47] !== rest || $[48] !== style || $[49] !== t18 || $[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t22 || $[54] !== t23 || $[55] !== t24 || $[56] !== t25 || $[57] !== t27 || $[58] !== t28 || $[59] !== tagClass) {
7395
- t29 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
7470
+ $[43] = disabled;
7471
+ $[44] = handleDeleteClick;
7472
+ $[45] = handleKeyDownDelete;
7473
+ $[46] = locale;
7474
+ $[47] = onDelete;
7475
+ $[48] = t27;
7476
+ } else t27 = $[48];
7477
+ let t28;
7478
+ if ($[49] !== disabled || $[50] !== rest || $[51] !== style || $[52] !== t18 || $[53] !== t19 || $[54] !== t20 || $[55] !== t21 || $[56] !== t22 || $[57] !== t23 || $[58] !== t24 || $[59] !== t25 || $[60] !== t26 || $[61] !== t27 || $[62] !== tagClass) {
7479
+ t28 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
7396
7480
  ref: t18,
7397
7481
  className: tagClass,
7398
7482
  style,
@@ -7406,27 +7490,27 @@ const DsTag = (t0) => {
7406
7490
  ...rest,
7407
7491
  children: [
7408
7492
  t25,
7409
- t27,
7410
- t28
7493
+ t26,
7494
+ t27
7411
7495
  ]
7412
7496
  });
7413
- $[46] = disabled;
7414
- $[47] = rest;
7415
- $[48] = style;
7416
- $[49] = t18;
7417
- $[50] = t19;
7418
- $[51] = t20;
7419
- $[52] = t21;
7420
- $[53] = t22;
7421
- $[54] = t23;
7422
- $[55] = t24;
7423
- $[56] = t25;
7424
- $[57] = t27;
7425
- $[58] = t28;
7426
- $[59] = tagClass;
7427
- $[60] = t29;
7428
- } else t29 = $[60];
7429
- return t29;
7497
+ $[49] = disabled;
7498
+ $[50] = rest;
7499
+ $[51] = style;
7500
+ $[52] = t18;
7501
+ $[53] = t19;
7502
+ $[54] = t20;
7503
+ $[55] = t21;
7504
+ $[56] = t22;
7505
+ $[57] = t23;
7506
+ $[58] = t24;
7507
+ $[59] = t25;
7508
+ $[60] = t26;
7509
+ $[61] = t27;
7510
+ $[62] = tagClass;
7511
+ $[63] = t28;
7512
+ } else t28 = $[63];
7513
+ return t28;
7430
7514
  };
7431
7515
  //#endregion
7432
7516
  //#region src/components/ds-tag/ds-tag.types.ts
@@ -7434,7 +7518,8 @@ const tagSizes = ["medium", "small"];
7434
7518
  const tagVariants = [
7435
7519
  "default",
7436
7520
  "include",
7437
- "exclude"
7521
+ "exclude",
7522
+ "key-value"
7438
7523
  ];
7439
7524
  //#endregion
7440
7525
  //#region src/utils/merge-refs.ts
@@ -8833,87 +8918,86 @@ const DsTagFilter = (t0) => {
8833
8918
  if (items.length === 0) return null;
8834
8919
  let t9;
8835
8920
  if ($[9] !== onItemDelete || $[10] !== onItemSelect) {
8836
- t9 = (item) => {
8837
- return /* @__PURE__ */ (0, react.createElement)(DsTag, {
8838
- ...item.slotProps?.tag || {},
8839
- key: item.id,
8840
- label: item.label,
8841
- selected: item.selected,
8842
- onClick: onItemSelect ? () => onItemSelect(item) : void 0,
8843
- onDelete: onItemDelete ? () => onItemDelete(item) : void 0
8844
- });
8845
- };
8921
+ t9 = (item) => ({
8922
+ ...item.slotProps?.tag,
8923
+ label: item.label,
8924
+ selected: item.selected,
8925
+ onClick: onItemSelect ? () => onItemSelect(item) : void 0,
8926
+ onDelete: onItemDelete ? () => onItemDelete(item) : void 0
8927
+ });
8846
8928
  $[9] = onItemDelete;
8847
8929
  $[10] = onItemSelect;
8848
8930
  $[11] = t9;
8849
8931
  } else t9 = $[11];
8850
- const renderTag = t9;
8932
+ const buildTagProps = t9;
8851
8933
  let t10;
8852
- if ($[12] !== expanded || $[13] !== onExpand) {
8853
- t10 = () => {
8934
+ if ($[12] !== buildTagProps) {
8935
+ t10 = (item_0) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, { ...buildTagProps(item_0) }, item_0.id);
8936
+ $[12] = buildTagProps;
8937
+ $[13] = t10;
8938
+ } else t10 = $[13];
8939
+ const renderTag = t10;
8940
+ let t11;
8941
+ if ($[14] !== expanded || $[15] !== onExpand) {
8942
+ t11 = () => {
8854
8943
  const newExpanded = !expanded;
8855
8944
  setExpanded(newExpanded);
8856
8945
  onExpand?.(newExpanded);
8857
8946
  };
8858
- $[12] = expanded;
8859
- $[13] = onExpand;
8860
- $[14] = t10;
8861
- } else t10 = $[14];
8862
- const handleExpandToggle = t10;
8863
- let t11;
8864
- if ($[15] !== items || $[16] !== onItemDelete || $[17] !== onItemSelect) {
8865
- let t12;
8866
- if ($[19] !== onItemDelete || $[20] !== onItemSelect) {
8867
- t12 = (item_0) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, {
8868
- "data-measure-tag": "",
8869
- label: item_0.label,
8870
- selected: item_0.selected,
8871
- onClick: onItemSelect ? () => onItemSelect(item_0) : void 0,
8872
- onDelete: onItemDelete ? () => onItemDelete(item_0) : void 0
8873
- }, item_0.id);
8874
- $[19] = onItemDelete;
8875
- $[20] = onItemSelect;
8876
- $[21] = t12;
8877
- } else t12 = $[21];
8878
- t11 = items.map(t12);
8879
- $[15] = items;
8880
- $[16] = onItemDelete;
8881
- $[17] = onItemSelect;
8882
- $[18] = t11;
8883
- } else t11 = $[18];
8947
+ $[14] = expanded;
8948
+ $[15] = onExpand;
8949
+ $[16] = t11;
8950
+ } else t11 = $[16];
8951
+ const handleExpandToggle = t11;
8884
8952
  let t12;
8885
- if ($[22] !== t11) {
8886
- t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8953
+ if ($[17] !== buildTagProps || $[18] !== items) {
8954
+ let t13;
8955
+ if ($[20] !== buildTagProps) {
8956
+ t13 = (item_1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, {
8957
+ "data-measure-tag": "",
8958
+ ...buildTagProps(item_1)
8959
+ }, item_1.id);
8960
+ $[20] = buildTagProps;
8961
+ $[21] = t13;
8962
+ } else t13 = $[21];
8963
+ t12 = items.map(t13);
8964
+ $[17] = buildTagProps;
8965
+ $[18] = items;
8966
+ $[19] = t12;
8967
+ } else t12 = $[19];
8968
+ let t13;
8969
+ if ($[22] !== t12) {
8970
+ t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8887
8971
  ref: measurementRef,
8888
8972
  className: ds_tag_filter_module_default.measurementContainer,
8889
8973
  "aria-hidden": "true",
8890
- children: t11
8974
+ children: t12
8891
8975
  });
8892
- $[22] = t11;
8893
- $[23] = t12;
8894
- } else t12 = $[23];
8895
- const measurementContainer = t12;
8896
- const t13 = expanded && ds_tag_filter_module_default.expanded;
8897
- let t14;
8898
- if ($[24] !== className || $[25] !== t13) {
8899
- t14 = (0, classnames.default)(ds_tag_filter_module_default.container, t13, className);
8900
- $[24] = className;
8901
- $[25] = t13;
8902
- $[26] = t14;
8903
- } else t14 = $[26];
8976
+ $[22] = t12;
8977
+ $[23] = t13;
8978
+ } else t13 = $[23];
8979
+ const measurementContainer = t13;
8980
+ const t14 = expanded && ds_tag_filter_module_default.expanded;
8904
8981
  let t15;
8982
+ if ($[24] !== className || $[25] !== t14) {
8983
+ t15 = (0, classnames.default)(ds_tag_filter_module_default.container, t14, className);
8984
+ $[24] = className;
8985
+ $[25] = t14;
8986
+ $[26] = t15;
8987
+ } else t15 = $[26];
8988
+ let t16;
8905
8989
  if ($[27] !== label) {
8906
- t15 = label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
8990
+ t16 = label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
8907
8991
  variant: "body-sm-reg",
8908
8992
  className: ds_tag_filter_module_default.label,
8909
8993
  children: label
8910
8994
  });
8911
8995
  $[27] = label;
8912
- $[28] = t15;
8913
- } else t15 = $[28];
8914
- let t16;
8996
+ $[28] = t16;
8997
+ } else t16 = $[28];
8998
+ let t17;
8915
8999
  if ($[29] !== expanded || $[30] !== handleExpandToggle || $[31] !== hasOverflow || $[32] !== hiddenCount || $[33] !== showLess || $[34] !== showMore) {
8916
- t16 = hasOverflow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
9000
+ t17 = hasOverflow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
8917
9001
  design: "v1.2",
8918
9002
  buttonType: "tertiary",
8919
9003
  variant: "ghost",
@@ -8929,11 +9013,11 @@ const DsTagFilter = (t0) => {
8929
9013
  $[32] = hiddenCount;
8930
9014
  $[33] = showLess;
8931
9015
  $[34] = showMore;
8932
- $[35] = t16;
8933
- } else t16 = $[35];
8934
- let t17;
9016
+ $[35] = t17;
9017
+ } else t17 = $[35];
9018
+ let t18;
8935
9019
  if ($[36] !== clearButton || $[37] !== onClearAll) {
8936
- t17 = onClearAll && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
9020
+ t18 = onClearAll && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
8937
9021
  design: "v1.2",
8938
9022
  buttonType: "tertiary",
8939
9023
  variant: "ghost",
@@ -8945,78 +9029,78 @@ const DsTagFilter = (t0) => {
8945
9029
  });
8946
9030
  $[36] = clearButton;
8947
9031
  $[37] = onClearAll;
8948
- $[38] = t17;
8949
- } else t17 = $[38];
8950
- let t18;
8951
- if ($[39] !== t16 || $[40] !== t17) {
8952
- t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8953
- className: ds_tag_filter_module_default.headerActions,
8954
- children: [t16, t17]
8955
- });
8956
- $[39] = t16;
8957
- $[40] = t17;
8958
- $[41] = t18;
8959
- } else t18 = $[41];
9032
+ $[38] = t18;
9033
+ } else t18 = $[38];
8960
9034
  let t19;
8961
- if ($[42] !== t15 || $[43] !== t18) {
9035
+ if ($[39] !== t17 || $[40] !== t18) {
8962
9036
  t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8963
- className: ds_tag_filter_module_default.header,
8964
- children: [t15, t18]
9037
+ className: ds_tag_filter_module_default.headerActions,
9038
+ children: [t17, t18]
8965
9039
  });
8966
- $[42] = t15;
8967
- $[43] = t18;
8968
- $[44] = t19;
8969
- } else t19 = $[44];
9040
+ $[39] = t17;
9041
+ $[40] = t18;
9042
+ $[41] = t19;
9043
+ } else t19 = $[41];
8970
9044
  let t20;
9045
+ if ($[42] !== t16 || $[43] !== t19) {
9046
+ t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9047
+ className: ds_tag_filter_module_default.header,
9048
+ children: [t16, t19]
9049
+ });
9050
+ $[42] = t16;
9051
+ $[43] = t19;
9052
+ $[44] = t20;
9053
+ } else t20 = $[44];
9054
+ let t21;
8971
9055
  if ($[45] !== renderTag || $[46] !== visibleTags) {
8972
- let t21;
9056
+ let t22;
8973
9057
  if ($[48] !== renderTag) {
8974
- t21 = (item_1) => renderTag(item_1);
9058
+ t22 = (item_2) => renderTag(item_2);
8975
9059
  $[48] = renderTag;
8976
- $[49] = t21;
8977
- } else t21 = $[49];
8978
- t20 = visibleTags.map(t21);
9060
+ $[49] = t22;
9061
+ } else t22 = $[49];
9062
+ t21 = visibleTags.map(t22);
8979
9063
  $[45] = renderTag;
8980
9064
  $[46] = visibleTags;
8981
- $[47] = t20;
8982
- } else t20 = $[47];
8983
- let t21;
8984
- if ($[50] !== t20) {
8985
- t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9065
+ $[47] = t21;
9066
+ } else t21 = $[47];
9067
+ let t22;
9068
+ if ($[50] !== t21) {
9069
+ t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8986
9070
  className: ds_tag_filter_module_default.tagsArea,
8987
- children: t20
9071
+ children: t21
8988
9072
  });
8989
- $[50] = t20;
8990
- $[51] = t21;
8991
- } else t21 = $[51];
8992
- let t22;
8993
- if ($[52] !== style || $[53] !== t14 || $[54] !== t19 || $[55] !== t21) {
8994
- t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9073
+ $[50] = t21;
9074
+ $[51] = t22;
9075
+ } else t22 = $[51];
9076
+ let t23;
9077
+ if ($[52] !== style || $[53] !== t15 || $[54] !== t20 || $[55] !== t22) {
9078
+ t23 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8995
9079
  ref: containerRef,
8996
- className: t14,
9080
+ className: t15,
8997
9081
  style,
8998
- children: [t19, t21]
9082
+ children: [t20, t22]
8999
9083
  });
9000
9084
  $[52] = style;
9001
- $[53] = t14;
9002
- $[54] = t19;
9003
- $[55] = t21;
9004
- $[56] = t22;
9005
- } else t22 = $[56];
9006
- let t23;
9085
+ $[53] = t15;
9086
+ $[54] = t20;
9087
+ $[55] = t22;
9088
+ $[56] = t23;
9089
+ } else t23 = $[56];
9090
+ let t24;
9007
9091
  if ($[57] !== measurementContainer) {
9008
- t23 = (0, react_dom.createPortal)(measurementContainer, document.body);
9092
+ t24 = (0, react_dom.createPortal)(measurementContainer, document.body);
9009
9093
  $[57] = measurementContainer;
9010
- $[58] = t23;
9011
- } else t23 = $[58];
9012
- let t24;
9013
- if ($[59] !== t22 || $[60] !== t23) {
9014
- t24 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t22, t23] });
9015
- $[59] = t22;
9016
- $[60] = t23;
9017
- $[61] = t24;
9018
- } else t24 = $[61];
9019
- return t24;
9094
+ $[58] = t24;
9095
+ } else t24 = $[58];
9096
+ let t25;
9097
+ if ($[59] !== t23 || $[60] !== t24) {
9098
+ t25 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t23, t24] });
9099
+ $[59] = t23;
9100
+ $[60] = t24;
9101
+ $[61] = t25;
9102
+ } else t25 = $[61];
9103
+ return t25;
9020
9104
  };
9021
9105
  //#endregion
9022
9106
  //#region src/components/ds-comments-drawer/comments-filters.ts
@@ -15487,62 +15571,335 @@ const DsPanel = withResponsiveProps(DsPanelBase, ["width"]);
15487
15571
  //#endregion
15488
15572
  //#region src/components/ds-popover/ds-popover.module.scss
15489
15573
  var ds_popover_module_default = {
15490
- "arrow": "Xt6oSq_arrow",
15491
- "content": "Xt6oSq_content"
15574
+ "content": "Xt6oSq_content",
15575
+ "ds-popover-in": "Xt6oSq_ds-popover-in",
15576
+ "footer": "Xt6oSq_footer",
15577
+ "header": "Xt6oSq_header",
15578
+ "headerIcon": "Xt6oSq_headerIcon",
15579
+ "panel": "Xt6oSq_panel",
15580
+ "title": "Xt6oSq_title"
15492
15581
  };
15493
15582
  //#endregion
15494
15583
  //#region src/components/ds-popover/ds-popover.tsx
15495
- const DsPopover = (t0) => {
15496
- const $ = (0, react_compiler_runtime.c)(13);
15497
- const { trigger, children, className, align: t1, side: t2 } = t0;
15498
- const align = t1 === void 0 ? "center" : t1;
15499
- const side = t2 === void 0 ? "top" : t2;
15500
- let t3;
15501
- if ($[0] !== trigger) {
15502
- t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Trigger, {
15503
- asChild: true,
15504
- children: trigger
15505
- });
15506
- $[0] = trigger;
15507
- $[1] = t3;
15508
- } else t3 = $[1];
15509
- let t4;
15510
- if ($[2] !== className) {
15511
- t4 = (0, classnames.default)(ds_popover_module_default.content, className);
15512
- $[2] = className;
15513
- $[3] = t4;
15514
- } else t4 = $[3];
15584
+ const DEFAULT_PANEL_WIDTH = 400;
15585
+ const toPlacement = (side, align) => align === "center" ? side : `${side}-${align}`;
15586
+ const DsPopoverRoot = (t0) => {
15587
+ const $ = (0, react_compiler_runtime.c)(15);
15588
+ const { open, defaultOpen, side: t1, align: t2, gutter: t3, modal: t4, children, onOpenChange } = t0;
15589
+ const side = t1 === void 0 ? "bottom" : t1;
15590
+ const align = t2 === void 0 ? "center" : t2;
15591
+ const gutter = t3 === void 0 ? 8 : t3;
15592
+ const modal = t4 === void 0 ? false : t4;
15515
15593
  let t5;
15516
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
15517
- t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Arrow, { className: ds_popover_module_default.arrow });
15518
- $[4] = t5;
15519
- } else t5 = $[4];
15594
+ if ($[0] !== align || $[1] !== side) {
15595
+ t5 = toPlacement(side, align);
15596
+ $[0] = align;
15597
+ $[1] = side;
15598
+ $[2] = t5;
15599
+ } else t5 = $[2];
15520
15600
  let t6;
15521
- if ($[5] !== align || $[6] !== children || $[7] !== side || $[8] !== t4) {
15522
- t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_popover.Content, {
15523
- side,
15524
- align,
15525
- sideOffset: 8,
15526
- collisionPadding: 16,
15527
- className: t4,
15528
- children: [children, t5]
15529
- }) });
15530
- $[5] = align;
15531
- $[6] = children;
15532
- $[7] = side;
15533
- $[8] = t4;
15534
- $[9] = t6;
15535
- } else t6 = $[9];
15601
+ if ($[3] !== gutter || $[4] !== t5) {
15602
+ t6 = {
15603
+ placement: t5,
15604
+ gutter
15605
+ };
15606
+ $[3] = gutter;
15607
+ $[4] = t5;
15608
+ $[5] = t6;
15609
+ } else t6 = $[5];
15536
15610
  let t7;
15537
- if ($[10] !== t3 || $[11] !== t6) {
15538
- t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_popover.Root, { children: [t3, t6] });
15539
- $[10] = t3;
15540
- $[11] = t6;
15541
- $[12] = t7;
15542
- } else t7 = $[12];
15543
- return t7;
15611
+ if ($[6] !== onOpenChange) {
15612
+ t7 = (details) => onOpenChange?.(details.open);
15613
+ $[6] = onOpenChange;
15614
+ $[7] = t7;
15615
+ } else t7 = $[7];
15616
+ let t8;
15617
+ if ($[8] !== children || $[9] !== defaultOpen || $[10] !== modal || $[11] !== open || $[12] !== t6 || $[13] !== t7) {
15618
+ t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Root, {
15619
+ open,
15620
+ defaultOpen,
15621
+ modal,
15622
+ positioning: t6,
15623
+ onOpenChange: t7,
15624
+ children
15625
+ });
15626
+ $[8] = children;
15627
+ $[9] = defaultOpen;
15628
+ $[10] = modal;
15629
+ $[11] = open;
15630
+ $[12] = t6;
15631
+ $[13] = t7;
15632
+ $[14] = t8;
15633
+ } else t8 = $[14];
15634
+ return t8;
15544
15635
  };
15545
- //#endregion
15636
+ const DsPopoverTrigger = (t0) => {
15637
+ const $ = (0, react_compiler_runtime.c)(3);
15638
+ const { children, className } = t0;
15639
+ let t1;
15640
+ if ($[0] !== children || $[1] !== className) {
15641
+ t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Trigger, {
15642
+ asChild: true,
15643
+ className,
15644
+ children
15645
+ });
15646
+ $[0] = children;
15647
+ $[1] = className;
15648
+ $[2] = t1;
15649
+ } else t1 = $[2];
15650
+ return t1;
15651
+ };
15652
+ const DsPopoverPanel = (t0) => {
15653
+ const $ = (0, react_compiler_runtime.c)(11);
15654
+ const { width: t1, className, style, children, ref, "aria-label": ariaLabel } = t0;
15655
+ const width = t1 === void 0 ? DEFAULT_PANEL_WIDTH : t1;
15656
+ let t2;
15657
+ if ($[0] !== className) {
15658
+ t2 = (0, classnames.default)(ds_popover_module_default.panel, className);
15659
+ $[0] = className;
15660
+ $[1] = t2;
15661
+ } else t2 = $[1];
15662
+ let t3;
15663
+ if ($[2] !== style || $[3] !== width) {
15664
+ t3 = {
15665
+ ...style,
15666
+ width
15667
+ };
15668
+ $[2] = style;
15669
+ $[3] = width;
15670
+ $[4] = t3;
15671
+ } else t3 = $[4];
15672
+ let t4;
15673
+ if ($[5] !== ariaLabel || $[6] !== children || $[7] !== ref || $[8] !== t2 || $[9] !== t3) {
15674
+ t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_portal.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Content, {
15675
+ ref,
15676
+ "aria-label": ariaLabel,
15677
+ className: t2,
15678
+ style: t3,
15679
+ children
15680
+ }) }) });
15681
+ $[5] = ariaLabel;
15682
+ $[6] = children;
15683
+ $[7] = ref;
15684
+ $[8] = t2;
15685
+ $[9] = t3;
15686
+ $[10] = t4;
15687
+ } else t4 = $[10];
15688
+ return t4;
15689
+ };
15690
+ const DsPopoverHeader = (t0) => {
15691
+ const $ = (0, react_compiler_runtime.c)(11);
15692
+ const { icon, className, style, children } = t0;
15693
+ let t1;
15694
+ if ($[0] !== className) {
15695
+ t1 = (0, classnames.default)(ds_popover_module_default.header, className);
15696
+ $[0] = className;
15697
+ $[1] = t1;
15698
+ } else t1 = $[1];
15699
+ let t2;
15700
+ if ($[2] !== icon) {
15701
+ t2 = icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
15702
+ className: ds_popover_module_default.headerIcon,
15703
+ children: icon
15704
+ });
15705
+ $[2] = icon;
15706
+ $[3] = t2;
15707
+ } else t2 = $[3];
15708
+ let t3;
15709
+ if ($[4] !== children) {
15710
+ t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Title, {
15711
+ className: ds_popover_module_default.title,
15712
+ asChild: true,
15713
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
15714
+ variant: "heading3",
15715
+ color: "main",
15716
+ children
15717
+ })
15718
+ });
15719
+ $[4] = children;
15720
+ $[5] = t3;
15721
+ } else t3 = $[5];
15722
+ let t4;
15723
+ if ($[6] !== style || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
15724
+ t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15725
+ className: t1,
15726
+ style,
15727
+ children: [t2, t3]
15728
+ });
15729
+ $[6] = style;
15730
+ $[7] = t1;
15731
+ $[8] = t2;
15732
+ $[9] = t3;
15733
+ $[10] = t4;
15734
+ } else t4 = $[10];
15735
+ return t4;
15736
+ };
15737
+ const DsPopoverContent = (t0) => {
15738
+ const $ = (0, react_compiler_runtime.c)(6);
15739
+ const { className, style, children } = t0;
15740
+ let t1;
15741
+ if ($[0] !== className) {
15742
+ t1 = (0, classnames.default)(ds_popover_module_default.content, className);
15743
+ $[0] = className;
15744
+ $[1] = t1;
15745
+ } else t1 = $[1];
15746
+ let t2;
15747
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
15748
+ t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15749
+ className: t1,
15750
+ style,
15751
+ children
15752
+ });
15753
+ $[2] = children;
15754
+ $[3] = style;
15755
+ $[4] = t1;
15756
+ $[5] = t2;
15757
+ } else t2 = $[5];
15758
+ return t2;
15759
+ };
15760
+ const DsPopoverContentItem = (t0) => {
15761
+ const $ = (0, react_compiler_runtime.c)(11);
15762
+ const { status, headline, className, style, children } = t0;
15763
+ const hasHeader = Boolean(status) || Boolean(headline);
15764
+ let t1;
15765
+ if ($[0] !== hasHeader || $[1] !== headline || $[2] !== status) {
15766
+ t1 = hasHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
15767
+ direction: "row",
15768
+ alignItems: "center",
15769
+ gap: "var(--xs)",
15770
+ children: [status, headline && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
15771
+ variant: "body-sm-semi-bold",
15772
+ color: "main",
15773
+ children: headline
15774
+ })]
15775
+ });
15776
+ $[0] = hasHeader;
15777
+ $[1] = headline;
15778
+ $[2] = status;
15779
+ $[3] = t1;
15780
+ } else t1 = $[3];
15781
+ let t2;
15782
+ if ($[4] !== children) {
15783
+ t2 = children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
15784
+ variant: "body-sm-reg",
15785
+ color: "main",
15786
+ asChild: true,
15787
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
15788
+ direction: "row",
15789
+ alignItems: "center",
15790
+ gap: "var(--xs)",
15791
+ children
15792
+ })
15793
+ });
15794
+ $[4] = children;
15795
+ $[5] = t2;
15796
+ } else t2 = $[5];
15797
+ let t3;
15798
+ if ($[6] !== className || $[7] !== style || $[8] !== t1 || $[9] !== t2) {
15799
+ t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
15800
+ direction: "column",
15801
+ gap: "var(--xs)",
15802
+ className,
15803
+ style,
15804
+ children: [t1, t2]
15805
+ });
15806
+ $[6] = className;
15807
+ $[7] = style;
15808
+ $[8] = t1;
15809
+ $[9] = t2;
15810
+ $[10] = t3;
15811
+ } else t3 = $[10];
15812
+ return t3;
15813
+ };
15814
+ const DsPopoverFooter = (t0) => {
15815
+ const $ = (0, react_compiler_runtime.c)(6);
15816
+ const { className, style, children } = t0;
15817
+ let t1;
15818
+ if ($[0] !== className) {
15819
+ t1 = (0, classnames.default)(ds_popover_module_default.footer, className);
15820
+ $[0] = className;
15821
+ $[1] = t1;
15822
+ } else t1 = $[1];
15823
+ let t2;
15824
+ if ($[2] !== children || $[3] !== style || $[4] !== t1) {
15825
+ t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15826
+ className: t1,
15827
+ style,
15828
+ children
15829
+ });
15830
+ $[2] = children;
15831
+ $[3] = style;
15832
+ $[4] = t1;
15833
+ $[5] = t2;
15834
+ } else t2 = $[5];
15835
+ return t2;
15836
+ };
15837
+ /**
15838
+ * Legacy single-element form. Keeps the old call signature and `side` default
15839
+ * ('top') compiling and opening, but now renders the new fixed-width panel —
15840
+ * styling differs from the old Radix popover and the Radix `Popover.Close`
15841
+ * context is no longer wired.
15842
+ * @deprecated Migrate to the compound API (`DsPopover.Root` / `.Trigger` / `.Panel`).
15843
+ */
15844
+ const DsPopoverLegacy = (t0) => {
15845
+ const $ = (0, react_compiler_runtime.c)(10);
15846
+ const { trigger, children, className, side: t1, align: t2 } = t0;
15847
+ const side = t1 === void 0 ? "top" : t1;
15848
+ const align = t2 === void 0 ? "center" : t2;
15849
+ let t3;
15850
+ if ($[0] !== trigger) {
15851
+ t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsPopoverTrigger, { children: trigger });
15852
+ $[0] = trigger;
15853
+ $[1] = t3;
15854
+ } else t3 = $[1];
15855
+ let t4;
15856
+ if ($[2] !== children || $[3] !== className) {
15857
+ t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsPopoverPanel, {
15858
+ className,
15859
+ children
15860
+ });
15861
+ $[2] = children;
15862
+ $[3] = className;
15863
+ $[4] = t4;
15864
+ } else t4 = $[4];
15865
+ let t5;
15866
+ if ($[5] !== align || $[6] !== side || $[7] !== t3 || $[8] !== t4) {
15867
+ t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsPopoverRoot, {
15868
+ side,
15869
+ align,
15870
+ children: [t3, t4]
15871
+ });
15872
+ $[5] = align;
15873
+ $[6] = side;
15874
+ $[7] = t3;
15875
+ $[8] = t4;
15876
+ $[9] = t5;
15877
+ } else t5 = $[9];
15878
+ return t5;
15879
+ };
15880
+ const DsPopover = Object.assign(DsPopoverLegacy, {
15881
+ Root: DsPopoverRoot,
15882
+ Trigger: DsPopoverTrigger,
15883
+ Panel: DsPopoverPanel,
15884
+ Header: DsPopoverHeader,
15885
+ Content: DsPopoverContent,
15886
+ ContentItem: DsPopoverContentItem,
15887
+ Footer: DsPopoverFooter
15888
+ });
15889
+ //#endregion
15890
+ //#region src/components/ds-popover/ds-popover.types.ts
15891
+ const popoverSides = [
15892
+ "top",
15893
+ "right",
15894
+ "bottom",
15895
+ "left"
15896
+ ];
15897
+ const popoverAligns = [
15898
+ "start",
15899
+ "center",
15900
+ "end"
15901
+ ];
15902
+ //#endregion
15546
15903
  //#region src/components/ds-progress-arc/ds-progress-arc.module.scss
15547
15904
  var ds_progress_arc_module_default = {
15548
15905
  "center": "GIMU2W_center",
@@ -17311,71 +17668,6 @@ const splitButtonSizes = ["medium", "small"];
17311
17668
  const DsSplitButton = withResponsiveProps(DsSplitButton$1, ["size"]);
17312
17669
  DsSplitButton.displayName = "DsSplitButton";
17313
17670
  //#endregion
17314
- //#region src/components/ds-stack/ds-stack.module.scss
17315
- var ds_stack_module_default = { "root": "efmmNG_root" };
17316
- //#endregion
17317
- //#region src/components/ds-stack/ds-stack.tsx
17318
- const DsStack$1 = (t0) => {
17319
- const $ = (0, react_compiler_runtime.c)(16);
17320
- const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
17321
- let t1;
17322
- if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
17323
- t1 = {
17324
- flexDirection: direction,
17325
- gap,
17326
- alignItems,
17327
- justifyContent,
17328
- flex,
17329
- flexWrap,
17330
- width,
17331
- ...style
17332
- };
17333
- $[0] = alignItems;
17334
- $[1] = direction;
17335
- $[2] = flex;
17336
- $[3] = flexWrap;
17337
- $[4] = gap;
17338
- $[5] = justifyContent;
17339
- $[6] = style;
17340
- $[7] = width;
17341
- $[8] = t1;
17342
- } else t1 = $[8];
17343
- const layoutStyle = t1;
17344
- let t2;
17345
- if ($[9] !== className) {
17346
- t2 = (0, classnames.default)(ds_stack_module_default.root, className);
17347
- $[9] = className;
17348
- $[10] = t2;
17349
- } else t2 = $[10];
17350
- let t3;
17351
- if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
17352
- t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17353
- ref,
17354
- className: t2,
17355
- style: layoutStyle,
17356
- children
17357
- });
17358
- $[11] = children;
17359
- $[12] = layoutStyle;
17360
- $[13] = ref;
17361
- $[14] = t2;
17362
- $[15] = t3;
17363
- } else t3 = $[15];
17364
- return t3;
17365
- };
17366
- //#endregion
17367
- //#region src/components/ds-stack/index.ts
17368
- const DsStack = withResponsiveProps(DsStack$1, [
17369
- "direction",
17370
- "gap",
17371
- "alignItems",
17372
- "justifyContent",
17373
- "flex",
17374
- "flexWrap",
17375
- "width"
17376
- ]);
17377
- DsStack.displayName = "DsStack";
17378
- //#endregion
17379
17671
  //#region src/components/ds-status-badge/ds-status-badge.module.scss
17380
17672
  var ds_status_badge_module_default = {
17381
17673
  "active": "U5k6UG_active",
@@ -18852,6 +19144,7 @@ var ds_table_header_module_default = {
18852
19144
  "filterableHeader": "-2rCNG_filterableHeader",
18853
19145
  "filterActive": "-2rCNG_filterActive",
18854
19146
  "filterTriggerContainer": "-2rCNG_filterTriggerContainer",
19147
+ "groupStart": "-2rCNG_groupStart",
18855
19148
  "headerCell": "-2rCNG_headerCell",
18856
19149
  "headerRow": "-2rCNG_headerRow",
18857
19150
  "headerRowNoBorder": "-2rCNG_headerRowNoBorder",
@@ -18978,6 +19271,154 @@ const SELECT_COLUMN_ID = "select";
18978
19271
  */
18979
19272
  const REORDER_COLUMN_ID = "reorder";
18980
19273
  //#endregion
19274
+ //#region src/components/ds-table/grouping/utils/column-group.ts
19275
+ /**
19276
+ * Builds the flex style for a group header cell so it lines up with the combined
19277
+ * width of its visible leaf columns.
19278
+ *
19279
+ * Fixed-width leaves contribute to `flexBasis`; default-sized leaves each add one
19280
+ * unit of `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so
19281
+ * both header rows distribute free space identically.
19282
+ */
19283
+ const getGroupColumnSizeStyle = (leafColumns) => {
19284
+ let fixedWidth = 0;
19285
+ let flexCount = 0;
19286
+ for (const leaf of leafColumns) {
19287
+ const size = leaf.getSize();
19288
+ if (size !== _tanstack_react_table.defaultColumnSizing.size) fixedWidth += size;
19289
+ else flexCount += 1;
19290
+ }
19291
+ if (flexCount === 0) return {
19292
+ width: fixedWidth,
19293
+ minWidth: fixedWidth,
19294
+ flexShrink: 0
19295
+ };
19296
+ return {
19297
+ flexGrow: flexCount,
19298
+ flexShrink: 0,
19299
+ flexBasis: fixedWidth,
19300
+ minWidth: fixedWidth
19301
+ };
19302
+ };
19303
+ /**
19304
+ * Whether a column is the first visible leaf of its parent group. Used to draw a
19305
+ * single side border at the start of each group in both the header and body.
19306
+ */
19307
+ const isFirstLeafColumnOfGroup = (column) => {
19308
+ const parent = column.parent;
19309
+ if (!parent) return false;
19310
+ return parent.getLeafColumns().filter((leaf) => leaf.getIsVisible())[0]?.id === column.id;
19311
+ };
19312
+ const getLeafColumnId = (def) => def.id ?? def.accessorKey;
19313
+ /**
19314
+ * Collects the ids of groups declared with `meta.group.defaultCollapsed`, used to
19315
+ * seed the uncontrolled collapse state.
19316
+ */
19317
+ const getInitialCollapsedGroups = (columns) => {
19318
+ const collapsed = [];
19319
+ const visit = (defs) => {
19320
+ for (const def of defs) if (def.columns) {
19321
+ if (def.id && def.meta?.group?.defaultCollapsed) collapsed.push(def.id);
19322
+ visit(def.columns);
19323
+ }
19324
+ };
19325
+ visit(columns);
19326
+ return collapsed;
19327
+ };
19328
+ /**
19329
+ * Maps collapsed groups to a {@link VisibilityState} that hides every leaf column
19330
+ * inside a collapsed group except those flagged `meta.keepVisibleWhenCollapsed`.
19331
+ * Layered on top of the consumer's own visibility so collapse never mutates it.
19332
+ */
19333
+ const getCollapsedColumnVisibility = (columns, collapsedGroupIds) => {
19334
+ const visibility = {};
19335
+ const visit = (defs, isInsideCollapsedGroup) => {
19336
+ for (const def of defs) {
19337
+ if (def.columns) {
19338
+ const isGroupCollapsed = isInsideCollapsedGroup || !!def.id && collapsedGroupIds.includes(def.id);
19339
+ visit(def.columns, isGroupCollapsed);
19340
+ continue;
19341
+ }
19342
+ if (!isInsideCollapsedGroup || def.meta?.keepVisibleWhenCollapsed) continue;
19343
+ const columnId = getLeafColumnId(def);
19344
+ if (columnId) visibility[columnId] = false;
19345
+ }
19346
+ };
19347
+ visit(columns, false);
19348
+ return visibility;
19349
+ };
19350
+ //#endregion
19351
+ //#region src/components/ds-table/grouping/hooks/use-column-groups.ts
19352
+ /**
19353
+ * Manages column-group collapse state. Supports both controlled
19354
+ * (`collapsedColumnGroups` + `onCollapsedColumnGroupsChange`) and uncontrolled
19355
+ * usage (seeded from `meta.group.defaultCollapsed`).
19356
+ */
19357
+ const useColumnGroups = ({ columns, collapsedColumnGroups, onCollapsedColumnGroupsChange }) => {
19358
+ const [collapsed, setCollapsed] = useControlled(collapsedColumnGroups, onCollapsedColumnGroupsChange, getInitialCollapsedGroups(columns));
19359
+ const toggleColumnGroup = (groupId) => {
19360
+ setCollapsed(collapsed.includes(groupId) ? collapsed.filter((id) => id !== groupId) : [...collapsed, groupId]);
19361
+ };
19362
+ return {
19363
+ collapsedColumnGroups: collapsed,
19364
+ toggleColumnGroup,
19365
+ collapsedVisibility: (0, react.useMemo)(() => getCollapsedColumnVisibility(columns, collapsed), [columns, collapsed])
19366
+ };
19367
+ };
19368
+ //#endregion
19369
+ //#region src/components/ds-table/ds-table.types.ts
19370
+ /**
19371
+ * Default English strings for {@link DsTableLocale}.
19372
+ */
19373
+ const defaultDsTableLocale = Object.freeze({
19374
+ collapseColumnGroup: "Collapse column group",
19375
+ expandColumnGroup: "Expand column group"
19376
+ });
19377
+ //#endregion
19378
+ //#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss
19379
+ var ds_table_group_header_cell_module_default = {
19380
+ "collapseToggle": "HuJ4KG_collapseToggle",
19381
+ "groupHeaderCell": "HuJ4KG_groupHeaderCell",
19382
+ "groupHeaderContent": "HuJ4KG_groupHeaderContent",
19383
+ "groupLabel": "HuJ4KG_groupLabel"
19384
+ };
19385
+ //#endregion
19386
+ //#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx
19387
+ const DsTableGroupHeaderCell = ({ header }) => {
19388
+ const { collapsedColumnGroups, onToggleColumnGroup, locale } = useDsTableContext();
19389
+ const groupId = header.column.id;
19390
+ const groupStyle = getGroupColumnSizeStyle(header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible()));
19391
+ const isCollapsible = header.column.columnDef.meta?.group?.collapsible ?? false;
19392
+ const isCollapsed = collapsedColumnGroups?.includes(groupId) ?? false;
19393
+ const mergedLocale = {
19394
+ ...defaultDsTableLocale,
19395
+ ...locale
19396
+ };
19397
+ const toggleLabel = isCollapsed ? mergedLocale.expandColumnGroup : mergedLocale.collapseColumnGroup;
19398
+ const handleToggle = () => onToggleColumnGroup?.(groupId);
19399
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
19400
+ className: ds_table_group_header_cell_module_default.groupHeaderCell,
19401
+ style: groupStyle,
19402
+ colSpan: header.colSpan,
19403
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
19404
+ className: ds_table_group_header_cell_module_default.groupHeaderContent,
19405
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
19406
+ className: ds_table_group_header_cell_module_default.groupLabel,
19407
+ children: (0, _tanstack_react_table.flexRender)(header.column.columnDef.header, header.getContext())
19408
+ }), isCollapsible && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsButtonV3, {
19409
+ variant: "secondary",
19410
+ size: "tiny",
19411
+ icon: isCollapsed ? "chevron_right" : "chevron_left",
19412
+ className: ds_table_group_header_cell_module_default.collapseToggle,
19413
+ "aria-label": toggleLabel,
19414
+ "aria-expanded": !isCollapsed,
19415
+ title: toggleLabel,
19416
+ onClick: handleToggle
19417
+ })]
19418
+ })
19419
+ });
19420
+ };
19421
+ //#endregion
18981
19422
  //#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
18982
19423
  const DsTableHeader = ({ table }) => {
18983
19424
  const { stickyHeader, bordered, virtualized } = useDsTableContext();
@@ -18986,17 +19427,23 @@ const DsTableHeader = ({ table }) => {
18986
19427
  children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
18987
19428
  className: (0, classnames.default)(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
18988
19429
  children: headerGroup.headers.map((header) => {
19430
+ if (header.isPlaceholder) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
19431
+ className: ds_table_header_module_default.headerCell,
19432
+ style: getColumnSizeStyle(header.getSize())
19433
+ }, header.id);
19434
+ if (header.subHeaders.length > 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableGroupHeaderCell, { header }, header.id);
18989
19435
  const headerStyle = getColumnSizeStyle(header.column.getSize());
18990
19436
  const canSort = header.column.getCanSort();
18991
19437
  const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
19438
+ const isGroupStart = isFirstLeafColumnOfGroup(header.column);
18992
19439
  const metaFilter = header.column.columnDef.meta?.filter;
18993
19440
  const resolvedFilter = metaFilter && "render" in metaFilter ? metaFilter : void 0;
18994
19441
  const hasActiveColumnFilter = resolvedFilter?.hasActiveFilter ?? false;
18995
19442
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
18996
- 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),
19443
+ 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),
18997
19444
  onClick: header.column.getToggleSortingHandler(),
18998
19445
  style: headerStyle,
18999
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
19446
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
19000
19447
  className: ds_table_header_module_default.headerSortContainer,
19001
19448
  children: [
19002
19449
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
@@ -19264,6 +19711,7 @@ var ds_table_row_module_default = {
19264
19711
  "expandableCell": "t8OZCq_expandableCell",
19265
19712
  "expanded": "t8OZCq_expanded",
19266
19713
  "expandedRow": "t8OZCq_expandedRow",
19714
+ "groupStart": "t8OZCq_groupStart",
19267
19715
  "isDragging": "t8OZCq_isDragging",
19268
19716
  "rowDragHandle": "t8OZCq_rowDragHandle",
19269
19717
  "rowNoBorder": "t8OZCq_rowNoBorder",
@@ -19329,7 +19777,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
19329
19777
  }, cell.id);
19330
19778
  const isLastColumn = idx === row.getVisibleCells().length - 1;
19331
19779
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
19332
- className: (0, classnames.default)(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell, cell.column.id === "select" && ds_table_row_module_default.selectableCell, typeof cell.column.columnDef.editCell === "function" && ds_table_row_module_default.editableCell),
19780
+ className: (0, classnames.default)(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell, cell.column.id === "select" && ds_table_row_module_default.selectableCell, isFirstLeafColumnOfGroup(cell.column) && ds_table_row_module_default.groupStart, typeof cell.column.columnDef.editCell === "function" && ds_table_row_module_default.editableCell),
19333
19781
  style: cellStyle,
19334
19782
  children: isLastColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableCell, {
19335
19783
  row,
@@ -19463,6 +19911,7 @@ var ds_table_row_virtualized_module_default = {
19463
19911
  "expanded": "NcME7q_expanded",
19464
19912
  "expandedRow": "NcME7q_expandedRow",
19465
19913
  "expandedRowContent": "NcME7q_expandedRowContent",
19914
+ "groupStart": "NcME7q_groupStart",
19466
19915
  "row": "NcME7q_row",
19467
19916
  "rowNoBorder": "NcME7q_rowNoBorder",
19468
19917
  "selectableCell": "NcME7q_selectableCell",
@@ -19499,7 +19948,7 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
19499
19948
  const isLastColumn = idx === row.getVisibleCells().length - 1;
19500
19949
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
19501
19950
  style: getColumnSizeStyle(cell.column.getSize()),
19502
- 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, typeof cell.column.columnDef.editCell === "function" && ds_table_row_virtualized_module_default.editableCell),
19951
+ 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),
19503
19952
  children: isLastColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableCell, {
19504
19953
  row,
19505
19954
  cell,
@@ -19609,6 +20058,7 @@ const DsTableBodyVirtualized = ({ table, emptyState, estimateSize, overscan, onS
19609
20058
  function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState, rowSelection }) {
19610
20059
  const virtualRows = rowVirtualizer.getVirtualItems();
19611
20060
  const totalSize = rowVirtualizer.getTotalSize();
20061
+ const hasNoData = rowsAndExpandedRowContent.length === 0;
19612
20062
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TableBody, {
19613
20063
  ref,
19614
20064
  className: ds_table_body_virtualized_module_default.body,
@@ -19624,10 +20074,10 @@ function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAn
19624
20074
  rowVirtualizer,
19625
20075
  virtualRow
19626
20076
  }, virtualRow.key);
19627
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
20077
+ }) : hasNoData ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
19628
20078
  className: ds_table_body_virtualized_module_default.emptyState,
19629
20079
  children: emptyState || "No results."
19630
- }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
20080
+ }) }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
19631
20081
  "aria-hidden": true,
19632
20082
  className: ds_table_body_virtualized_module_default.sentinel,
19633
20083
  style: { top: `${totalSize.toString()}px` },
@@ -19645,7 +20095,7 @@ const ROW_SIZE_HEIGHT_MAP = {
19645
20095
  /**
19646
20096
  * Design system Table component
19647
20097
  */
19648
- const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, activeRowId, infiniteScroll, onCellEdit, onCellValidate }) => {
20098
+ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", 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 }) => {
19649
20099
  const [data, setData] = react.useState(tableData);
19650
20100
  const [sorting, setSorting] = react.useState([]);
19651
20101
  const [internalColumnFilters, setInternalColumnFilters] = react.useState([]);
@@ -19666,12 +20116,21 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
19666
20116
  if (onColumnFiltersChange) onColumnFiltersChange(newFilters);
19667
20117
  else setInternalColumnFilters(newFilters);
19668
20118
  };
19669
- const columnVisibility = externalColumnVisibility ?? internalColumnVisibility;
20119
+ const baseColumnVisibility = externalColumnVisibility ?? internalColumnVisibility;
19670
20120
  const handleColumnVisibilityChange = (updaterOrValue) => {
19671
- const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(columnVisibility) : updaterOrValue;
20121
+ const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(baseColumnVisibility) : updaterOrValue;
19672
20122
  if (onColumnVisibilityChange) onColumnVisibilityChange(newVisibility);
19673
20123
  else setInternalColumnVisibility(newVisibility);
19674
20124
  };
20125
+ const { collapsedColumnGroups, toggleColumnGroup, collapsedVisibility } = useColumnGroups({
20126
+ columns: columnsProp,
20127
+ collapsedColumnGroups: externalCollapsedColumnGroups,
20128
+ onCollapsedColumnGroupsChange
20129
+ });
20130
+ const columnVisibility = (0, react.useMemo)(() => ({
20131
+ ...baseColumnVisibility,
20132
+ ...collapsedVisibility
20133
+ }), [baseColumnVisibility, collapsedVisibility]);
19675
20134
  const handleSortingChange = (updaterOrValue) => {
19676
20135
  const newSorting = typeof updaterOrValue === "function" ? updaterOrValue(sorting) : updaterOrValue;
19677
20136
  setSorting(newSorting);
@@ -19812,6 +20271,9 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
19812
20271
  renderExpandedRow,
19813
20272
  virtualized,
19814
20273
  activeRowId,
20274
+ collapsedColumnGroups,
20275
+ onToggleColumnGroup: toggleColumnGroup,
20276
+ locale,
19815
20277
  onCellEdit,
19816
20278
  ...useEditingState(onCellEdit, onCellValidate)
19817
20279
  };
@@ -21493,6 +21955,7 @@ exports.createDsTreeCollection = createDsTreeCollection;
21493
21955
  exports.createDualRangeFilterAdapter = createDualRangeFilterAdapter;
21494
21956
  exports.createFilterAdapter = createFilterAdapter;
21495
21957
  exports.customIcons = customIcons;
21958
+ exports.defaultDsTableLocale = defaultDsTableLocale;
21496
21959
  exports.dropdownMenuItemVariants = dropdownMenuItemVariants;
21497
21960
  exports.dsKeyValuePairOrientations = dsKeyValuePairOrientations;
21498
21961
  exports.filterStatuses = filterStatuses;
@@ -21503,6 +21966,8 @@ exports.iconVariants = iconVariants;
21503
21966
  exports.isCustomIcon = isCustomIcon;
21504
21967
  exports.isResponsiveValue = isResponsiveValue;
21505
21968
  exports.loaderVariants = loaderVariants;
21969
+ exports.popoverAligns = popoverAligns;
21970
+ exports.popoverSides = popoverSides;
21506
21971
  exports.progressArcSizes = progressArcSizes;
21507
21972
  exports.progressArcVariants = progressArcVariants;
21508
21973
  exports.progressDonutSizes = progressDonutSizes;