@drivenets/design-system 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/dist/index.cjs +371 -62
- package/dist/index.d.cts +107 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +107 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +370 -63
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +4 -3
- package/src/components/ds-drawer/ds-drawer.module.scss +14 -0
- package/src/components/ds-drawer/ds-drawer.tsx +20 -1
- package/src/components/ds-drawer/ds-drawer.types.ts +7 -0
- package/src/components/ds-file-upload/hooks/use-file-upload.ts +7 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +29 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss +39 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.tsx +122 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts +65 -0
- package/src/components/ds-progress-task-bar/index.ts +2 -0
- package/src/components/ds-progress-task-bar/utils.ts +51 -0
- package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +1 -1
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +2 -0
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +1 -1
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +2 -0
- package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss +14 -2
- package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.tsx +19 -0
- package/src/components/ds-table/ds-table-column.types.ts +24 -0
- package/src/components/ds-table/ds-table.tsx +28 -4
- package/src/components/ds-table/ds-table.types.ts +7 -0
- package/src/components/ds-table/index.ts +1 -0
- package/src/components/ds-table/utils/constants.ts +5 -0
- package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +78 -0
- package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +89 -0
- package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +31 -0
- package/src/components/ds-tabs/figma/ds-tabs.figma.ts +29 -0
- package/src/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @drivenets/design-system
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b9bf892: Add an `onOpenAutoFocus` prop to `DsDrawer`. Call `event.preventDefault()` to stop the drawer from stealing focus on open, keeping the caret where it was (e.g. in a text input that triggered the drawer) for type-ahead / popover patterns.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- b9bf892: Fix `DsDrawer` intercepting pointer events while closed. A closed (or closing) drawer stays mounted and transformed; for inset/offset drawers this could land the invisible content over neighboring UI and swallow its clicks. Closed-state content is now `pointer-events: none`, so a closed drawer is fully click-through regardless of docked position, while open drawers (including during the open animation) stay interactive.
|
|
12
|
+
- f672a7c: Add `DsProgressTaskBar` component
|
|
13
|
+
- 99099bc: Add a `loading` prop to `DsTable`
|
|
14
|
+
- c429032: Add `ColumnDef.editDisabled` to `DsTable` for locking individual editable cells.
|
|
15
|
+
|
|
3
16
|
## 0.14.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ We recommend using our provided Vite plugin to automatically include the necessa
|
|
|
27
27
|
Or you can manually add the following lines to the `<head>` section of your `index.html` file:
|
|
28
28
|
|
|
29
29
|
```HTML
|
|
30
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" />
|
|
30
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,600;0,700;0,900;1,100;1,300;1,400;1,500;1,600;1,700;1,900&display=swap" />
|
|
31
31
|
|
|
32
32
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" />
|
|
33
33
|
|
package/dist/index.cjs
CHANGED
|
@@ -8437,8 +8437,8 @@ const useArkDialogBodyLockCleanup = (open, enabled) => {
|
|
|
8437
8437
|
//#endregion
|
|
8438
8438
|
//#region src/components/ds-drawer/ds-drawer.tsx
|
|
8439
8439
|
const DsDrawer = (t0) => {
|
|
8440
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
8441
|
-
const { open, onOpenChange, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8440
|
+
const $ = (0, react_compiler_runtime.c)(28);
|
|
8441
|
+
const { open, onOpenChange, onOpenAutoFocus, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8442
8442
|
const columns = t1 === void 0 ? 4 : t1;
|
|
8443
8443
|
const position = t2 === void 0 ? "end" : t2;
|
|
8444
8444
|
const backdrop = t3 === void 0 ? false : t3;
|
|
@@ -8456,75 +8456,88 @@ const DsDrawer = (t0) => {
|
|
|
8456
8456
|
$[1] = t7;
|
|
8457
8457
|
} else t7 = $[1];
|
|
8458
8458
|
const handleOpenChange = t7;
|
|
8459
|
-
const Wrapper = portal ? _ark_ui_react_portal.Portal : react.Fragment;
|
|
8460
8459
|
let t8;
|
|
8461
|
-
if ($[2] !==
|
|
8462
|
-
t8 =
|
|
8463
|
-
|
|
8460
|
+
if ($[2] !== onOpenAutoFocus) {
|
|
8461
|
+
t8 = onOpenAutoFocus ? () => {
|
|
8462
|
+
const event = new Event("openAutoFocus", { cancelable: true });
|
|
8463
|
+
onOpenAutoFocus(event);
|
|
8464
|
+
return event.defaultPrevented ? document.activeElement : void 0;
|
|
8465
|
+
} : void 0;
|
|
8466
|
+
$[2] = onOpenAutoFocus;
|
|
8464
8467
|
$[3] = t8;
|
|
8465
8468
|
} else t8 = $[3];
|
|
8466
|
-
const
|
|
8467
|
-
const
|
|
8468
|
-
let
|
|
8469
|
-
if ($[4] !==
|
|
8470
|
-
|
|
8471
|
-
$[4] =
|
|
8472
|
-
$[5] =
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8469
|
+
const initialFocusEl = t8;
|
|
8470
|
+
const Wrapper = portal ? _ark_ui_react_portal.Portal : react.Fragment;
|
|
8471
|
+
let t9;
|
|
8472
|
+
if ($[4] !== backdrop) {
|
|
8473
|
+
t9 = backdrop && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Backdrop, { className: ds_drawer_module_default.backdrop });
|
|
8474
|
+
$[4] = backdrop;
|
|
8475
|
+
$[5] = t9;
|
|
8476
|
+
} else t9 = $[5];
|
|
8477
|
+
const t10 = ds_drawer_module_default[`position-${position}`];
|
|
8478
|
+
const t11 = ds_drawer_module_default[`cols-${resolvedColumns}`];
|
|
8476
8479
|
let t12;
|
|
8477
|
-
if ($[8] !==
|
|
8478
|
-
t12 =
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
$[8] = children;
|
|
8480
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11) {
|
|
8481
|
+
t12 = (0, classnames.default)(ds_drawer_module_default.drawer, t10, className, t11);
|
|
8482
|
+
$[6] = className;
|
|
8483
|
+
$[7] = t10;
|
|
8484
|
+
$[8] = t11;
|
|
8483
8485
|
$[9] = t12;
|
|
8484
8486
|
} else t12 = $[9];
|
|
8485
8487
|
let t13;
|
|
8486
|
-
if ($[10] !==
|
|
8487
|
-
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8488
|
+
if ($[10] !== children) {
|
|
8489
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8490
|
+
className: ds_drawer_module_default.content,
|
|
8491
|
+
children
|
|
8492
|
+
});
|
|
8493
|
+
$[10] = children;
|
|
8494
|
+
$[11] = t13;
|
|
8495
|
+
} else t13 = $[11];
|
|
8496
|
+
let t14;
|
|
8497
|
+
if ($[12] !== style || $[13] !== t12 || $[14] !== t13) {
|
|
8498
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Positioner, {
|
|
8488
8499
|
className: ds_drawer_module_default.positioner,
|
|
8489
8500
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Content, {
|
|
8490
8501
|
style,
|
|
8491
|
-
className:
|
|
8492
|
-
children:
|
|
8502
|
+
className: t12,
|
|
8503
|
+
children: t13
|
|
8493
8504
|
})
|
|
8494
8505
|
});
|
|
8495
|
-
$[
|
|
8496
|
-
$[
|
|
8497
|
-
$[
|
|
8498
|
-
$[
|
|
8499
|
-
} else
|
|
8500
|
-
let t14;
|
|
8501
|
-
if ($[14] !== Wrapper || $[15] !== t13 || $[16] !== t8) {
|
|
8502
|
-
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, { children: [t8, t13] });
|
|
8503
|
-
$[14] = Wrapper;
|
|
8504
|
-
$[15] = t13;
|
|
8505
|
-
$[16] = t8;
|
|
8506
|
-
$[17] = t14;
|
|
8507
|
-
} else t14 = $[17];
|
|
8506
|
+
$[12] = style;
|
|
8507
|
+
$[13] = t12;
|
|
8508
|
+
$[14] = t13;
|
|
8509
|
+
$[15] = t14;
|
|
8510
|
+
} else t14 = $[15];
|
|
8508
8511
|
let t15;
|
|
8509
|
-
if ($[
|
|
8510
|
-
t15 = /* @__PURE__ */ (0, react_jsx_runtime.
|
|
8512
|
+
if ($[16] !== Wrapper || $[17] !== t14 || $[18] !== t9) {
|
|
8513
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, { children: [t9, t14] });
|
|
8514
|
+
$[16] = Wrapper;
|
|
8515
|
+
$[17] = t14;
|
|
8516
|
+
$[18] = t9;
|
|
8517
|
+
$[19] = t15;
|
|
8518
|
+
} else t15 = $[19];
|
|
8519
|
+
let t16;
|
|
8520
|
+
if ($[20] !== backdrop || $[21] !== closeOnEscape || $[22] !== closeOnInteractOutside || $[23] !== handleOpenChange || $[24] !== initialFocusEl || $[25] !== open || $[26] !== t15) {
|
|
8521
|
+
t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Root, {
|
|
8511
8522
|
open,
|
|
8512
8523
|
onOpenChange: handleOpenChange,
|
|
8513
8524
|
modal: backdrop,
|
|
8514
8525
|
closeOnEscape,
|
|
8515
8526
|
closeOnInteractOutside,
|
|
8516
8527
|
preventScroll: backdrop,
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
$[
|
|
8521
|
-
$[
|
|
8522
|
-
$[
|
|
8523
|
-
$[
|
|
8524
|
-
$[
|
|
8525
|
-
$[
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
+
initialFocusEl,
|
|
8529
|
+
children: t15
|
|
8530
|
+
});
|
|
8531
|
+
$[20] = backdrop;
|
|
8532
|
+
$[21] = closeOnEscape;
|
|
8533
|
+
$[22] = closeOnInteractOutside;
|
|
8534
|
+
$[23] = handleOpenChange;
|
|
8535
|
+
$[24] = initialFocusEl;
|
|
8536
|
+
$[25] = open;
|
|
8537
|
+
$[26] = t15;
|
|
8538
|
+
$[27] = t16;
|
|
8539
|
+
} else t16 = $[27];
|
|
8540
|
+
return t16;
|
|
8528
8541
|
};
|
|
8529
8542
|
const Header$2 = (t0) => {
|
|
8530
8543
|
const $ = (0, react_compiler_runtime.c)(6);
|
|
@@ -14788,6 +14801,7 @@ function useFileUpload({ adapter, autoUpload = true, maxConcurrent = 3, maxFiles
|
|
|
14788
14801
|
updateFileProgress(fileId_2, 100);
|
|
14789
14802
|
onFileUploadComplete?.(fileId_2, result);
|
|
14790
14803
|
} catch (error_0) {
|
|
14804
|
+
if (abortController.signal.aborted) return;
|
|
14791
14805
|
const errorMessage = error_0 instanceof Error ? error_0.message : "Upload failed";
|
|
14792
14806
|
let status_0 = "interrupted";
|
|
14793
14807
|
if (error_0 instanceof FileUploadError) status_0 = error_0.isRetryable ? "interrupted" : "error";
|
|
@@ -16539,6 +16553,263 @@ const progressLinearSizes = [
|
|
|
16539
16553
|
"large"
|
|
16540
16554
|
];
|
|
16541
16555
|
//#endregion
|
|
16556
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss
|
|
16557
|
+
var ds_progress_task_bar_module_default = {
|
|
16558
|
+
"bar": "SN3VFW_bar",
|
|
16559
|
+
"segment": "SN3VFW_segment",
|
|
16560
|
+
"segmentCompleted": "SN3VFW_segmentCompleted",
|
|
16561
|
+
"segmentFailed": "SN3VFW_segmentFailed",
|
|
16562
|
+
"segmentRunning": "SN3VFW_segmentRunning",
|
|
16563
|
+
"statusIcon": "SN3VFW_statusIcon",
|
|
16564
|
+
"total": "SN3VFW_total"
|
|
16565
|
+
};
|
|
16566
|
+
//#endregion
|
|
16567
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts
|
|
16568
|
+
const taskBarStatuses = [
|
|
16569
|
+
"completed",
|
|
16570
|
+
"running",
|
|
16571
|
+
"failed"
|
|
16572
|
+
];
|
|
16573
|
+
//#endregion
|
|
16574
|
+
//#region src/components/ds-progress-task-bar/utils.ts
|
|
16575
|
+
const COUNT_UNITS = [
|
|
16576
|
+
{
|
|
16577
|
+
value: 1e9,
|
|
16578
|
+
suffix: "B"
|
|
16579
|
+
},
|
|
16580
|
+
{
|
|
16581
|
+
value: 1e6,
|
|
16582
|
+
suffix: "M"
|
|
16583
|
+
},
|
|
16584
|
+
{
|
|
16585
|
+
value: 1e3,
|
|
16586
|
+
suffix: "K"
|
|
16587
|
+
}
|
|
16588
|
+
];
|
|
16589
|
+
const ABBREVIATION_FLOOR = 1e3;
|
|
16590
|
+
const DECIMAL_THRESHOLD = 10;
|
|
16591
|
+
const stripTrailingZero = (value) => value % 1 === 0 ? String(value) : value.toFixed(1);
|
|
16592
|
+
/**
|
|
16593
|
+
* Format a task count for the legend, following the design's abbreviation rules:
|
|
16594
|
+
* - `< 1000` → exact number (e.g. `999`)
|
|
16595
|
+
* - single-digit unit → one decimal (e.g. `1.1K`, `1.2M`)
|
|
16596
|
+
* - multi-digit unit → whole number, truncated so `999,999 → 999K`
|
|
16597
|
+
*/
|
|
16598
|
+
const formatCount = (count) => {
|
|
16599
|
+
if (!Number.isFinite(count)) return "0";
|
|
16600
|
+
const rounded = Math.max(0, Math.round(count));
|
|
16601
|
+
if (rounded < ABBREVIATION_FLOOR) return String(rounded);
|
|
16602
|
+
const unit = COUNT_UNITS.find(({ value }) => rounded >= value);
|
|
16603
|
+
if (unit === void 0) return String(rounded);
|
|
16604
|
+
const scaled = rounded / unit.value;
|
|
16605
|
+
if (scaled < DECIMAL_THRESHOLD) return `${stripTrailingZero(Math.round(scaled * 10) / 10)}${unit.suffix}`;
|
|
16606
|
+
return `${String(Math.floor(scaled))}${unit.suffix}`;
|
|
16607
|
+
};
|
|
16608
|
+
//#endregion
|
|
16609
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.tsx
|
|
16610
|
+
const statusIcon = Object.freeze({
|
|
16611
|
+
completed: "check_circle",
|
|
16612
|
+
running: "play_circle",
|
|
16613
|
+
failed: "cancel"
|
|
16614
|
+
});
|
|
16615
|
+
const statusIconColor = Object.freeze({
|
|
16616
|
+
completed: "success",
|
|
16617
|
+
running: "action",
|
|
16618
|
+
failed: "error"
|
|
16619
|
+
});
|
|
16620
|
+
const statusTextColor = Object.freeze({
|
|
16621
|
+
completed: "success",
|
|
16622
|
+
running: "action",
|
|
16623
|
+
failed: "error"
|
|
16624
|
+
});
|
|
16625
|
+
const statusSegmentClass = Object.freeze({
|
|
16626
|
+
completed: ds_progress_task_bar_module_default.segmentCompleted,
|
|
16627
|
+
running: ds_progress_task_bar_module_default.segmentRunning,
|
|
16628
|
+
failed: ds_progress_task_bar_module_default.segmentFailed
|
|
16629
|
+
});
|
|
16630
|
+
const defaultLocale = Object.freeze({
|
|
16631
|
+
completed: "Completed",
|
|
16632
|
+
running: "Running",
|
|
16633
|
+
failed: "Failed",
|
|
16634
|
+
total: (total) => `of ${total}`
|
|
16635
|
+
});
|
|
16636
|
+
const DsProgressTaskBar = (t0) => {
|
|
16637
|
+
const $ = (0, react_compiler_runtime.c)(39);
|
|
16638
|
+
const { completed: t1, running: t2, failed: t3, total, locale, className, style, ref } = t0;
|
|
16639
|
+
const completed = t1 === void 0 ? 0 : t1;
|
|
16640
|
+
const running = t2 === void 0 ? 0 : t2;
|
|
16641
|
+
const failed = t3 === void 0 ? 0 : t3;
|
|
16642
|
+
const t4 = Math.max(0, completed);
|
|
16643
|
+
const t5 = Math.max(0, running);
|
|
16644
|
+
const t6 = Math.max(0, failed);
|
|
16645
|
+
let T0;
|
|
16646
|
+
let t10;
|
|
16647
|
+
let t11;
|
|
16648
|
+
let t12;
|
|
16649
|
+
let t13;
|
|
16650
|
+
let t14;
|
|
16651
|
+
let t15;
|
|
16652
|
+
let t16;
|
|
16653
|
+
let t17;
|
|
16654
|
+
let t18;
|
|
16655
|
+
let t19;
|
|
16656
|
+
let t7;
|
|
16657
|
+
let t8;
|
|
16658
|
+
let t9;
|
|
16659
|
+
if ($[0] !== className || $[1] !== locale || $[2] !== ref || $[3] !== style || $[4] !== t4 || $[5] !== t5 || $[6] !== t6 || $[7] !== total) {
|
|
16660
|
+
const counts = {
|
|
16661
|
+
completed: t4,
|
|
16662
|
+
running: t5,
|
|
16663
|
+
failed: t6
|
|
16664
|
+
};
|
|
16665
|
+
const sum = counts.completed + counts.running + counts.failed;
|
|
16666
|
+
const denominator = Math.max(total ?? sum, sum);
|
|
16667
|
+
const mergedLocale = {
|
|
16668
|
+
...defaultLocale,
|
|
16669
|
+
...locale
|
|
16670
|
+
};
|
|
16671
|
+
const activeStatuses = taskBarStatuses.filter((status) => counts[status] > 0);
|
|
16672
|
+
const segmentWidth = (status_0) => denominator > 0 ? `${String(counts[status_0] / denominator * 100)}%` : "0%";
|
|
16673
|
+
T0 = DsStack;
|
|
16674
|
+
t13 = ref;
|
|
16675
|
+
t14 = "column";
|
|
16676
|
+
t15 = "var(--xs)";
|
|
16677
|
+
t16 = "100%";
|
|
16678
|
+
t17 = className;
|
|
16679
|
+
t18 = style;
|
|
16680
|
+
t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
16681
|
+
direction: "row",
|
|
16682
|
+
alignItems: "center",
|
|
16683
|
+
justifyContent: "space-between",
|
|
16684
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
|
|
16685
|
+
direction: "row",
|
|
16686
|
+
alignItems: "center",
|
|
16687
|
+
gap: "var(--3xs)",
|
|
16688
|
+
children: activeStatuses.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16689
|
+
variant: "body-xs-reg",
|
|
16690
|
+
color: "secondary",
|
|
16691
|
+
children: "0"
|
|
16692
|
+
}) : activeStatuses.map((status_1) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
16693
|
+
direction: "row",
|
|
16694
|
+
alignItems: "center",
|
|
16695
|
+
gap: "var(--4xs)",
|
|
16696
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
16697
|
+
content: mergedLocale[status_1],
|
|
16698
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16699
|
+
className: ds_progress_task_bar_module_default.statusIcon,
|
|
16700
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
|
|
16701
|
+
icon: statusIcon[status_1],
|
|
16702
|
+
size: "tiny",
|
|
16703
|
+
color: statusIconColor[status_1],
|
|
16704
|
+
filled: true
|
|
16705
|
+
})
|
|
16706
|
+
})
|
|
16707
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16708
|
+
variant: "body-xs-reg",
|
|
16709
|
+
color: statusTextColor[status_1],
|
|
16710
|
+
children: formatCount(counts[status_1])
|
|
16711
|
+
})]
|
|
16712
|
+
}, status_1))
|
|
16713
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16714
|
+
variant: "body-xs-reg",
|
|
16715
|
+
color: "secondary",
|
|
16716
|
+
className: ds_progress_task_bar_module_default.total,
|
|
16717
|
+
children: mergedLocale.total(formatCount(denominator))
|
|
16718
|
+
})]
|
|
16719
|
+
});
|
|
16720
|
+
t7 = ds_progress_task_bar_module_default.bar;
|
|
16721
|
+
t8 = "progressbar";
|
|
16722
|
+
t9 = 0;
|
|
16723
|
+
t10 = denominator;
|
|
16724
|
+
t11 = sum;
|
|
16725
|
+
t12 = activeStatuses.map((status_2) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
16726
|
+
content: mergedLocale[status_2],
|
|
16727
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16728
|
+
className: (0, classnames.default)(ds_progress_task_bar_module_default.segment, statusSegmentClass[status_2]),
|
|
16729
|
+
style: { width: segmentWidth(status_2) }
|
|
16730
|
+
})
|
|
16731
|
+
}, status_2));
|
|
16732
|
+
$[0] = className;
|
|
16733
|
+
$[1] = locale;
|
|
16734
|
+
$[2] = ref;
|
|
16735
|
+
$[3] = style;
|
|
16736
|
+
$[4] = t4;
|
|
16737
|
+
$[5] = t5;
|
|
16738
|
+
$[6] = t6;
|
|
16739
|
+
$[7] = total;
|
|
16740
|
+
$[8] = T0;
|
|
16741
|
+
$[9] = t10;
|
|
16742
|
+
$[10] = t11;
|
|
16743
|
+
$[11] = t12;
|
|
16744
|
+
$[12] = t13;
|
|
16745
|
+
$[13] = t14;
|
|
16746
|
+
$[14] = t15;
|
|
16747
|
+
$[15] = t16;
|
|
16748
|
+
$[16] = t17;
|
|
16749
|
+
$[17] = t18;
|
|
16750
|
+
$[18] = t19;
|
|
16751
|
+
$[19] = t7;
|
|
16752
|
+
$[20] = t8;
|
|
16753
|
+
$[21] = t9;
|
|
16754
|
+
} else {
|
|
16755
|
+
T0 = $[8];
|
|
16756
|
+
t10 = $[9];
|
|
16757
|
+
t11 = $[10];
|
|
16758
|
+
t12 = $[11];
|
|
16759
|
+
t13 = $[12];
|
|
16760
|
+
t14 = $[13];
|
|
16761
|
+
t15 = $[14];
|
|
16762
|
+
t16 = $[15];
|
|
16763
|
+
t17 = $[16];
|
|
16764
|
+
t18 = $[17];
|
|
16765
|
+
t19 = $[18];
|
|
16766
|
+
t7 = $[19];
|
|
16767
|
+
t8 = $[20];
|
|
16768
|
+
t9 = $[21];
|
|
16769
|
+
}
|
|
16770
|
+
let t20;
|
|
16771
|
+
if ($[22] !== t10 || $[23] !== t11 || $[24] !== t12 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
|
|
16772
|
+
t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16773
|
+
className: t7,
|
|
16774
|
+
role: t8,
|
|
16775
|
+
"aria-valuemin": t9,
|
|
16776
|
+
"aria-valuemax": t10,
|
|
16777
|
+
"aria-valuenow": t11,
|
|
16778
|
+
children: t12
|
|
16779
|
+
});
|
|
16780
|
+
$[22] = t10;
|
|
16781
|
+
$[23] = t11;
|
|
16782
|
+
$[24] = t12;
|
|
16783
|
+
$[25] = t7;
|
|
16784
|
+
$[26] = t8;
|
|
16785
|
+
$[27] = t9;
|
|
16786
|
+
$[28] = t20;
|
|
16787
|
+
} else t20 = $[28];
|
|
16788
|
+
let t21;
|
|
16789
|
+
if ($[29] !== T0 || $[30] !== t13 || $[31] !== t14 || $[32] !== t15 || $[33] !== t16 || $[34] !== t17 || $[35] !== t18 || $[36] !== t19 || $[37] !== t20) {
|
|
16790
|
+
t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(T0, {
|
|
16791
|
+
ref: t13,
|
|
16792
|
+
direction: t14,
|
|
16793
|
+
gap: t15,
|
|
16794
|
+
width: t16,
|
|
16795
|
+
className: t17,
|
|
16796
|
+
style: t18,
|
|
16797
|
+
children: [t19, t20]
|
|
16798
|
+
});
|
|
16799
|
+
$[29] = T0;
|
|
16800
|
+
$[30] = t13;
|
|
16801
|
+
$[31] = t14;
|
|
16802
|
+
$[32] = t15;
|
|
16803
|
+
$[33] = t16;
|
|
16804
|
+
$[34] = t17;
|
|
16805
|
+
$[35] = t18;
|
|
16806
|
+
$[36] = t19;
|
|
16807
|
+
$[37] = t20;
|
|
16808
|
+
$[38] = t21;
|
|
16809
|
+
} else t21 = $[38];
|
|
16810
|
+
return t21;
|
|
16811
|
+
};
|
|
16812
|
+
//#endregion
|
|
16542
16813
|
//#region src/components/ds-radio-group/ds-radio-group.module.scss
|
|
16543
16814
|
var ds_radio_group_module_default = {
|
|
16544
16815
|
"labelInfo": "gJbMxW_labelInfo",
|
|
@@ -19499,6 +19770,7 @@ var ds_table_module_default = {
|
|
|
19499
19770
|
//#region src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss
|
|
19500
19771
|
var ds_table_editable_cell_module_default = {
|
|
19501
19772
|
"editButton": "g5FEoW_editButton",
|
|
19773
|
+
"lockIcon": "g5FEoW_lockIcon",
|
|
19502
19774
|
"root": "g5FEoW_root"
|
|
19503
19775
|
};
|
|
19504
19776
|
//#endregion
|
|
@@ -19510,6 +19782,26 @@ const DsTableEditableCell = ({ cell, children }) => {
|
|
|
19510
19782
|
event.stopPropagation();
|
|
19511
19783
|
beginEdit(cell);
|
|
19512
19784
|
};
|
|
19785
|
+
const editDisabled = cell.column.columnDef.editDisabled?.(cell.getContext());
|
|
19786
|
+
const locked = editDisabled === true || typeof editDisabled === "object";
|
|
19787
|
+
const reason = typeof editDisabled === "object" ? editDisabled.reason : void 0;
|
|
19788
|
+
if (locked) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19789
|
+
className: ds_table_editable_cell_module_default.root,
|
|
19790
|
+
"data-locked": "",
|
|
19791
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
19792
|
+
content: reason,
|
|
19793
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19794
|
+
className: ds_table_editable_cell_module_default.lockIcon,
|
|
19795
|
+
"aria-label": "Editing disabled",
|
|
19796
|
+
role: "img",
|
|
19797
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
|
|
19798
|
+
icon: "lock",
|
|
19799
|
+
size: "small",
|
|
19800
|
+
color: "secondary"
|
|
19801
|
+
})
|
|
19802
|
+
})
|
|
19803
|
+
})]
|
|
19804
|
+
});
|
|
19513
19805
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19514
19806
|
className: ds_table_editable_cell_module_default.root,
|
|
19515
19807
|
"data-active": isEditing ? "" : void 0,
|
|
@@ -19713,6 +20005,7 @@ var ds_table_row_module_default = {
|
|
|
19713
20005
|
"expandedRow": "t8OZCq_expandedRow",
|
|
19714
20006
|
"groupStart": "t8OZCq_groupStart",
|
|
19715
20007
|
"isDragging": "t8OZCq_isDragging",
|
|
20008
|
+
"loadingRow": "t8OZCq_loadingRow",
|
|
19716
20009
|
"rowDragHandle": "t8OZCq_rowDragHandle",
|
|
19717
20010
|
"rowNoBorder": "t8OZCq_rowNoBorder",
|
|
19718
20011
|
"selectableCell": "t8OZCq_selectableCell",
|
|
@@ -19739,7 +20032,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
|
|
|
19739
20032
|
});
|
|
19740
20033
|
};
|
|
19741
20034
|
const DsTableRow = ({ ref, row, isSelected }) => {
|
|
19742
|
-
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
|
|
20035
|
+
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading } = useDsTableContext();
|
|
19743
20036
|
const isExpanded = row.getIsExpanded();
|
|
19744
20037
|
const isActive = activeRowId === row.id;
|
|
19745
20038
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = (0, _dnd_kit_sortable.useSortable)({
|
|
@@ -19763,7 +20056,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
19763
20056
|
[ds_table_row_module_default.sizeSmall]: rowSize === "small",
|
|
19764
20057
|
[ds_table_row_module_default.sizeMedium]: rowSize === "medium",
|
|
19765
20058
|
[ds_table_row_module_default.sizeLarge]: rowSize === "large"
|
|
19766
|
-
}, onRowClick && ds_table_row_module_default.clickableRow, !bordered && ds_table_row_module_default.rowNoBorder, isExpanded && ds_table_row_module_default.expanded),
|
|
20059
|
+
}, onRowClick && ds_table_row_module_default.clickableRow, !bordered && ds_table_row_module_default.rowNoBorder, isExpanded && ds_table_row_module_default.expanded, loading && ds_table_row_module_default.loadingRow),
|
|
19767
20060
|
style: rowStyle,
|
|
19768
20061
|
onClick: () => onRowClick?.(row.original),
|
|
19769
20062
|
onDoubleClick: () => onRowDoubleClick?.(row.original),
|
|
@@ -19912,6 +20205,7 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19912
20205
|
"expandedRow": "NcME7q_expandedRow",
|
|
19913
20206
|
"expandedRowContent": "NcME7q_expandedRowContent",
|
|
19914
20207
|
"groupStart": "NcME7q_groupStart",
|
|
20208
|
+
"loadingRow": "NcME7q_loadingRow",
|
|
19915
20209
|
"row": "NcME7q_row",
|
|
19916
20210
|
"rowNoBorder": "NcME7q_rowNoBorder",
|
|
19917
20211
|
"selectableCell": "NcME7q_selectableCell",
|
|
@@ -19922,7 +20216,7 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19922
20216
|
//#endregion
|
|
19923
20217
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
19924
20218
|
const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
|
|
19925
|
-
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
|
|
20219
|
+
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading } = useDsTableContext();
|
|
19926
20220
|
const isExpanded = row.getIsExpanded();
|
|
19927
20221
|
const isActive = activeRowId === row.id;
|
|
19928
20222
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
|
|
@@ -19941,7 +20235,7 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
|
|
|
19941
20235
|
[ds_table_row_virtualized_module_default.sizeSmall]: rowSize === "small",
|
|
19942
20236
|
[ds_table_row_virtualized_module_default.sizeMedium]: rowSize === "medium",
|
|
19943
20237
|
[ds_table_row_virtualized_module_default.sizeLarge]: rowSize === "large"
|
|
19944
|
-
}, isExpandedRowContent && ds_table_row_virtualized_module_default.expandedRowContent, onRowClick && ds_table_row_virtualized_module_default.clickableRow, !bordered && ds_table_row_virtualized_module_default.rowNoBorder, isExpanded && ds_table_row_virtualized_module_default.expanded),
|
|
20238
|
+
}, isExpandedRowContent && ds_table_row_virtualized_module_default.expandedRowContent, onRowClick && ds_table_row_virtualized_module_default.clickableRow, !bordered && ds_table_row_virtualized_module_default.rowNoBorder, isExpanded && ds_table_row_virtualized_module_default.expanded, loading && ds_table_row_virtualized_module_default.loadingRow),
|
|
19945
20239
|
onClick: isExpandedRowContent ? void 0 : () => onRowClick?.(row.original),
|
|
19946
20240
|
onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
|
|
19947
20241
|
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) => {
|
|
@@ -20095,7 +20389,7 @@ const ROW_SIZE_HEIGHT_MAP = {
|
|
|
20095
20389
|
/**
|
|
20096
20390
|
* Design system Table component
|
|
20097
20391
|
*/
|
|
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 }) => {
|
|
20392
|
+
const DsTable = ({ ref, columns: columnsProp, data: tableData, 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 }) => {
|
|
20099
20393
|
const [data, setData] = react.useState(tableData);
|
|
20100
20394
|
const [sorting, setSorting] = react.useState([]);
|
|
20101
20395
|
const [internalColumnFilters, setInternalColumnFilters] = react.useState([]);
|
|
@@ -20187,9 +20481,20 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
20187
20481
|
hasSelectColumn,
|
|
20188
20482
|
showSelectAllCheckbox
|
|
20189
20483
|
]);
|
|
20484
|
+
const skeletonColumns = (0, react.useMemo)(() => {
|
|
20485
|
+
const toSkeleton = (cols) => cols.map((column) => "columns" in column && column.columns ? {
|
|
20486
|
+
...column,
|
|
20487
|
+
columns: toSkeleton(column.columns)
|
|
20488
|
+
} : {
|
|
20489
|
+
...column,
|
|
20490
|
+
cell: column.loadingCell ?? (() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSkeletonText, { width: "60%" }))
|
|
20491
|
+
});
|
|
20492
|
+
return toSkeleton(columns);
|
|
20493
|
+
}, [columns]);
|
|
20494
|
+
const skeletonData = (0, react.useMemo)(() => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` })), []);
|
|
20190
20495
|
const table = (0, _tanstack_react_table.useReactTable)({
|
|
20191
|
-
data: reorderable ? data : tableData,
|
|
20192
|
-
columns,
|
|
20496
|
+
data: loading ? skeletonData : reorderable ? data : tableData,
|
|
20497
|
+
columns: loading ? skeletonColumns : columns,
|
|
20193
20498
|
getCoreRowModel: (0, _tanstack_react_table.getCoreRowModel)(),
|
|
20194
20499
|
onSortingChange: handleSortingChange,
|
|
20195
20500
|
getSortedRowModel: (0, _tanstack_react_table.getSortedRowModel)(),
|
|
@@ -20255,6 +20560,7 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
20255
20560
|
}) });
|
|
20256
20561
|
const selectedRows = Object.entries(rowSelection).filter(([, selected]) => selected).map(([key]) => rowsById[key]?.original).filter((v) => !!v);
|
|
20257
20562
|
const isBulkActionsVisible = selectable && actions.length > 0 && selectedRows.length > 0;
|
|
20563
|
+
const editingState = useEditingState(onCellEdit, onCellValidate);
|
|
20258
20564
|
const contextValue = {
|
|
20259
20565
|
stickyHeader,
|
|
20260
20566
|
bordered,
|
|
@@ -20264,8 +20570,9 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
20264
20570
|
selectable,
|
|
20265
20571
|
reorderable,
|
|
20266
20572
|
showSelectAllCheckbox,
|
|
20267
|
-
|
|
20268
|
-
|
|
20573
|
+
loading,
|
|
20574
|
+
onRowClick: loading ? void 0 : onRowClick,
|
|
20575
|
+
onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
|
|
20269
20576
|
primaryRowActions,
|
|
20270
20577
|
secondaryRowActions,
|
|
20271
20578
|
renderExpandedRow,
|
|
@@ -20275,7 +20582,7 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
20275
20582
|
onToggleColumnGroup: toggleColumnGroup,
|
|
20276
20583
|
locale,
|
|
20277
20584
|
onCellEdit,
|
|
20278
|
-
...
|
|
20585
|
+
...editingState
|
|
20279
20586
|
};
|
|
20280
20587
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableContext.Provider, {
|
|
20281
20588
|
value: contextValue,
|
|
@@ -21896,6 +22203,7 @@ exports.DsPopover = DsPopover;
|
|
|
21896
22203
|
exports.DsProgressArc = DsProgressArc;
|
|
21897
22204
|
exports.DsProgressDonut = DsProgressDonut;
|
|
21898
22205
|
exports.DsProgressLinear = DsProgressLinear;
|
|
22206
|
+
exports.DsProgressTaskBar = DsProgressTaskBar;
|
|
21899
22207
|
exports.DsRadioGroup = DsRadioGroup;
|
|
21900
22208
|
exports.DsRadioGroupLegacy = DsRadioGroupLegacy;
|
|
21901
22209
|
exports.DsSegmentGroup = DsSegmentGroup;
|
|
@@ -21985,6 +22293,7 @@ exports.statusBadgeV2Variants = statusBadgeV2Variants;
|
|
|
21985
22293
|
exports.systemStatuses = systemStatuses;
|
|
21986
22294
|
exports.tagSizes = tagSizes;
|
|
21987
22295
|
exports.tagVariants = tagVariants;
|
|
22296
|
+
exports.taskBarStatuses = taskBarStatuses;
|
|
21988
22297
|
exports.textInputSizes = textInputSizes;
|
|
21989
22298
|
exports.useBreakpoint = useBreakpoint;
|
|
21990
22299
|
exports.useCellEditor = useCellEditor;
|