@drivenets/design-system 0.16.0 → 0.17.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 (101) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/index.cjs +234 -191
  3. package/dist/index.d.cts +250 -197
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +250 -197
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +234 -191
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +24 -24
  11. package/src/components/ds-alert-banner/ds-alert-banner.tsx +7 -6
  12. package/src/components/ds-autocomplete/ds-autocomplete.figma.ts +2 -2
  13. package/src/components/ds-avatar/ds-avatar.figma.ts +2 -2
  14. package/src/components/ds-avatar-group/ds-avatar-group.figma.ts +2 -2
  15. package/src/components/ds-breadcrumb/ds-breadcrumb.figma.ts +2 -2
  16. package/src/components/ds-button-v3/ds-button-v3.figma.ts +2 -2
  17. package/src/components/ds-card/figma/ds-card-content.figma.ts +2 -2
  18. package/src/components/ds-card/figma/ds-card-footer.figma.ts +2 -2
  19. package/src/components/ds-card/figma/ds-card-header.figma.ts +2 -2
  20. package/src/components/ds-card/figma/ds-card.figma.ts +2 -2
  21. package/src/components/ds-catalog-layout/ds-catalog-layout.figma.ts +51 -0
  22. package/src/components/ds-catalog-layout/ds-catalog-layout.tsx +9 -8
  23. package/src/components/ds-checkbox/ds-checkbox-level-2.figma.ts +2 -2
  24. package/src/components/ds-checkbox/ds-checkbox.figma.ts +2 -2
  25. package/src/components/ds-checkbox-group/ds-checkbox-group.figma.ts +2 -2
  26. package/src/components/ds-comments-drawer/components/comments-filter-modal/index.ts +0 -1
  27. package/src/components/ds-confirmation/ds-confirmation.tsx +13 -11
  28. package/src/components/ds-date-picker/ds-date-picker.figma.ts +2 -2
  29. package/src/components/ds-divider/ds-divider.figma.ts +2 -2
  30. package/src/components/ds-drawer/ds-drawer.tsx +11 -10
  31. package/src/components/ds-drawer/figma/ds-drawer-content.figma.ts +2 -2
  32. package/src/components/ds-drawer/figma/ds-drawer-footer.figma.ts +2 -2
  33. package/src/components/ds-drawer/figma/ds-drawer-header.figma.ts +2 -2
  34. package/src/components/ds-drawer/figma/ds-drawer.figma.ts +2 -2
  35. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-footer.figma.ts +2 -2
  36. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-group.figma.ts +2 -2
  37. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-item.figma.ts +2 -2
  38. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-separator.figma.ts +2 -2
  39. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu.figma.ts +2 -2
  40. package/src/components/ds-expandable-text-input/ds-expandable-text-input.figma.ts +2 -2
  41. package/src/components/ds-file-upload/components/file-upload-item/index.ts +0 -1
  42. package/src/components/ds-file-upload/ds-file-upload.figma.ts +2 -2
  43. package/src/components/ds-filter-status-icon/ds-filter-status-icon.figma.ts +2 -2
  44. package/src/components/ds-form-control/ds-form-control.figma.ts +2 -2
  45. package/src/components/ds-form-control/ds-form-control.tsx +15 -13
  46. package/src/components/ds-icon/figma/ds-icon-material.figma.batch.ts +1 -1
  47. package/src/components/ds-icon/figma/ds-icon-special.figma.batch.ts +1 -1
  48. package/src/components/ds-key-value-pair/ds-key-value-pair.figma.ts +2 -2
  49. package/src/components/ds-loader/ds-loader.figma.ts +2 -2
  50. package/src/components/ds-modal/ds-modal.tsx +10 -9
  51. package/src/components/ds-modal/figma/ds-modal-content.figma.ts +2 -2
  52. package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +2 -2
  53. package/src/components/ds-modal/figma/ds-modal-header.figma.ts +2 -2
  54. package/src/components/ds-modal/figma/ds-modal.figma.ts +2 -2
  55. package/src/components/ds-number-input/ds-number-input.tsx +1 -0
  56. package/src/components/ds-panel/ds-panel.figma.ts +2 -2
  57. package/src/components/ds-popover/figma/ds-popover-content-item.figma.ts +2 -2
  58. package/src/components/ds-popover/figma/ds-popover-content.figma.ts +2 -2
  59. package/src/components/ds-popover/figma/ds-popover-footer.figma.ts +2 -2
  60. package/src/components/ds-popover/figma/ds-popover-header.figma.ts +2 -2
  61. package/src/components/ds-popover/figma/ds-popover.figma.ts +2 -2
  62. package/src/components/ds-progress-arc/ds-progress-arc.figma.ts +2 -2
  63. package/src/components/ds-progress-donut/ds-progress-donut.figma.ts +2 -2
  64. package/src/components/ds-progress-linear/ds-progress-linear.figma.ts +2 -2
  65. package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +2 -2
  66. package/src/components/ds-radio-group/figma/ds-radio-group-item.figma.ts +2 -2
  67. package/src/components/ds-radio-group/figma/ds-radio-group.figma.ts +2 -2
  68. package/src/components/ds-segment-group/figma/ds-segment-group-item.figma.ts +2 -2
  69. package/src/components/ds-segment-group/figma/ds-segment-group.figma.ts +2 -2
  70. package/src/components/ds-select/ds-select.figma.ts +2 -2
  71. package/src/components/ds-site-node/ds-site-node.figma.ts +2 -2
  72. package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +5 -4
  73. package/src/components/ds-spinner/ds-spinner.figma.ts +2 -2
  74. package/src/components/ds-split-button/ds-split-button.figma.ts +2 -2
  75. package/src/components/ds-status-badge-v2/ds-status-badge-v2.figma.ts +2 -2
  76. package/src/components/ds-stepper/ds-stepper.figma.ts +2 -2
  77. package/src/components/ds-table/components/ds-table-group-header-cell/index.ts +0 -1
  78. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +2 -2
  79. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +2 -4
  80. package/src/components/ds-table/ds-table.module.scss +15 -0
  81. package/src/components/ds-table/ds-table.tsx +37 -34
  82. package/src/components/ds-table/ds-table.types.ts +6 -0
  83. package/src/components/ds-table/figma/ds-table-expandable.figma.ts +2 -2
  84. package/src/components/ds-table/figma/ds-table.figma.ts +2 -2
  85. package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +2 -2
  86. package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +2 -2
  87. package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +2 -2
  88. package/src/components/ds-tabs/figma/ds-tabs.figma.ts +2 -2
  89. package/src/components/ds-text-input/ds-input-field-v02.figma.ts +2 -2
  90. package/src/components/ds-text-input/ds-text-input.figma.ts +2 -2
  91. package/src/components/ds-time-picker/ds-time-picker.figma.ts +2 -2
  92. package/src/components/ds-toast/ds-toast.figma.ts +3 -3
  93. package/src/components/ds-toggle/ds-toggle.figma.ts +2 -2
  94. package/src/components/ds-tooltip/ds-tooltip.figma.ts +2 -2
  95. package/src/components/ds-tree/ds-tree.module.scss +2 -2
  96. package/src/components/ds-tree/ds-tree.tsx +6 -0
  97. package/src/components/ds-tree/ds-tree.types.ts +16 -0
  98. package/src/components/ds-typography/ds-typography.figma.ts +2 -2
  99. package/src/components/ds-user-card/ds-user-card.figma.ts +2 -2
  100. package/src/components/ds-vertical-tabs/ds-vertical-tabs.tsx +13 -6
  101. package/src/components/ds-workspace-layout/ds-workspace-layout.tsx +11 -10
@@ -12,7 +12,7 @@ export default {
12
12
  example: icon
13
13
  ? figma.code`<DsIcon icon="${icon}" />`
14
14
  : figma.code`{/* This icon is not available in @drivenets/design-system */}`,
15
- imports: ["import { DsIcon } from '@drivenets/design-system'"],
15
+ imports: ["import { DsIcon } from '@drivenets/design-system';"],
16
16
  id: batch.id,
17
17
  metadata: { nestable: true, props: { icon } },
18
18
  };
@@ -18,7 +18,7 @@ const orientation =
18
18
 
19
19
  export default {
20
20
  example: figma.code`<DsKeyValuePair keyLabel="Label" value="Value" orientation="${orientation}" />`,
21
- imports: ["import { DsKeyValuePair } from '@drivenets/design-system'"],
21
+ imports: ["import { DsKeyValuePair } from '@drivenets/design-system';"],
22
22
  id: 'ds-key-value-pair',
23
23
  metadata: { nestable: true },
24
- };
24
+ } satisfies figma.Template;
@@ -5,7 +5,7 @@ import figma from 'figma';
5
5
 
6
6
  export default {
7
7
  example: figma.code`<DsLoader />`,
8
- imports: ["import { DsLoader } from '@drivenets/design-system'"],
8
+ imports: ["import { DsLoader } from '@drivenets/design-system';"],
9
9
  id: 'ds-loader',
10
10
  metadata: { nestable: true },
11
- };
11
+ } satisfies figma.Template;
@@ -13,7 +13,7 @@ import { DsTypography } from '../ds-typography';
13
13
  * Supports custom header, footer, and body content with grid-based sizing.
14
14
  * Use columns prop to control modal width (1-12 grid columns).
15
15
  */
16
- const DsModal = ({
16
+ const DsModalRoot = ({
17
17
  open,
18
18
  columns = 6,
19
19
  dividers = false,
@@ -145,13 +145,14 @@ Body.displayName = 'DsModal.Body';
145
145
  Footer.displayName = 'DsModal.Footer';
146
146
  Actions.displayName = 'DsModal.Actions';
147
147
 
148
- DsModal.Header = Header;
149
- DsModal.Title = Title;
150
- DsModal.CloseTrigger = CloseTrigger;
151
- DsModal.Body = Body;
152
- DsModal.Footer = Footer;
153
- DsModal.Actions = Actions;
154
-
155
- DsModal.displayName = 'DsModal';
148
+ const DsModal = Object.assign(DsModalRoot, {
149
+ displayName: 'DsModal',
150
+ Header,
151
+ Title,
152
+ CloseTrigger,
153
+ Body,
154
+ Footer,
155
+ Actions,
156
+ });
156
157
 
157
158
  export default DsModal;
@@ -12,7 +12,7 @@ const content = instance.getSlot('Modal content slot');
12
12
 
13
13
  export default {
14
14
  example: figma.code`<DsModal.Body>${content}</DsModal.Body>`,
15
- imports: ["import { DsModal } from '@drivenets/design-system'"],
15
+ imports: ["import { DsModal } from '@drivenets/design-system';"],
16
16
  id: 'ds-modal-content',
17
17
  metadata: { nestable: true },
18
- };
18
+ } satisfies figma.Template;
@@ -13,7 +13,7 @@ const rightButtons = instance.getSlot('right side buttons');
13
13
 
14
14
  export default {
15
15
  example: figma.code`<DsModal.Footer><DsModal.Actions>${rightButtons}</DsModal.Actions></DsModal.Footer>`,
16
- imports: ["import { DsModal } from '@drivenets/design-system'"],
16
+ imports: ["import { DsModal } from '@drivenets/design-system';"],
17
17
  id: 'ds-modal-footer',
18
18
  metadata: { nestable: true },
19
- };
19
+ } satisfies figma.Template;
@@ -15,7 +15,7 @@ const title = titleNode.type === 'TEXT' ? titleNode.textContent : 'Modal title';
15
15
 
16
16
  export default {
17
17
  example: figma.code`<DsModal.Header><DsModal.Title>${title}</DsModal.Title><DsModal.CloseTrigger /></DsModal.Header>`,
18
- imports: ["import { DsModal } from '@drivenets/design-system'"],
18
+ imports: ["import { DsModal } from '@drivenets/design-system';"],
19
19
  id: 'ds-modal-header',
20
20
  metadata: { nestable: true },
21
- };
21
+ } satisfies figma.Template;
@@ -30,7 +30,7 @@ if (footer.type === 'INSTANCE') {
30
30
 
31
31
  export default {
32
32
  example: figma.code`<DsModal open columns={6} onOpenChange={() => {}}>${headerCode}${contentCode}${footerCode}</DsModal>`,
33
- imports: ["import { DsModal } from '@drivenets/design-system'"],
33
+ imports: ["import { DsModal } from '@drivenets/design-system';"],
34
34
  id: 'ds-modal',
35
35
  metadata: { nestable: false },
36
- };
36
+ } satisfies figma.Template;
@@ -35,6 +35,7 @@ const DsNumberInput: FC<DsNumberInputProps> = ({
35
35
  return (
36
36
  <NumberInput.Root
37
37
  id={id}
38
+ ids={{ input: id }}
38
39
  min={min}
39
40
  max={max}
40
41
  step={step}
@@ -10,7 +10,7 @@ const openAttr = open ? 'open' : 'open={false}';
10
10
 
11
11
  export default {
12
12
  example: figma.code`<DsPanel ${openAttr}>{/* panel content */}</DsPanel>`,
13
- imports: ["import { DsPanel } from '@drivenets/design-system'"],
13
+ imports: ["import { DsPanel } from '@drivenets/design-system';"],
14
14
  id: 'ds-panel',
15
15
  metadata: { nestable: false },
16
- };
16
+ } satisfies figma.Template;
@@ -12,7 +12,7 @@ const body = instance.getSlot('Slot');
12
12
 
13
13
  export default {
14
14
  example: figma.code`<DsPopover.ContentItem${headlineAttr}>${body}</DsPopover.ContentItem>`,
15
- imports: ["import { DsPopover } from '@drivenets/design-system'"],
15
+ imports: ["import { DsPopover } from '@drivenets/design-system';"],
16
16
  id: 'ds-popover-content-item',
17
17
  metadata: { nestable: true },
18
- };
18
+ } satisfies figma.Template;
@@ -9,7 +9,7 @@ const items = instance.getSlot('Slot');
9
9
 
10
10
  export default {
11
11
  example: figma.code`<DsPopover.Content>${items}</DsPopover.Content>`,
12
- imports: ["import { DsPopover } from '@drivenets/design-system'"],
12
+ imports: ["import { DsPopover } from '@drivenets/design-system';"],
13
13
  id: 'ds-popover-content',
14
14
  metadata: { nestable: true },
15
- };
15
+ } satisfies figma.Template;
@@ -13,7 +13,7 @@ if (button.type === 'INSTANCE') {
13
13
 
14
14
  export default {
15
15
  example: figma.code`<DsPopover.Footer>${buttonCode}</DsPopover.Footer>`,
16
- imports: ["import { DsPopover } from '@drivenets/design-system'"],
16
+ imports: ["import { DsPopover } from '@drivenets/design-system';"],
17
17
  id: 'ds-popover-footer',
18
18
  metadata: { nestable: true },
19
- };
19
+ } satisfies figma.Template;
@@ -10,7 +10,7 @@ const title = titleNode.type === 'TEXT' ? titleNode.textContent : 'Popover title
10
10
 
11
11
  export default {
12
12
  example: figma.code`<DsPopover.Header>${title}</DsPopover.Header>`,
13
- imports: ["import { DsPopover } from '@drivenets/design-system'"],
13
+ imports: ["import { DsPopover } from '@drivenets/design-system';"],
14
14
  id: 'ds-popover-header',
15
15
  metadata: { nestable: true },
16
- };
16
+ } satisfies figma.Template;
@@ -28,7 +28,7 @@ export default {
28
28
  <DsPopover.Trigger>{/* trigger element */}</DsPopover.Trigger>
29
29
  <DsPopover.Panel>${headerCode}${contentCode}${footerCode}</DsPopover.Panel>
30
30
  </DsPopover.Root>`,
31
- imports: ["import { DsPopover } from '@drivenets/design-system'"],
31
+ imports: ["import { DsPopover } from '@drivenets/design-system';"],
32
32
  id: 'ds-popover',
33
33
  metadata: { nestable: false },
34
- };
34
+ } satisfies figma.Template;
@@ -17,7 +17,7 @@ const variant = instance.getEnum('State', {
17
17
 
18
18
  export default {
19
19
  example: figma.code`<DsProgressArc variant="${variant}" size="${size}" value={0} />`,
20
- imports: ["import { DsProgressArc } from '@drivenets/design-system'"],
20
+ imports: ["import { DsProgressArc } from '@drivenets/design-system';"],
21
21
  id: 'ds-progress-arc',
22
22
  metadata: { nestable: false },
23
- };
23
+ } satisfies figma.Template;
@@ -39,7 +39,7 @@ const valueProp = typeof value === 'number' ? ` value={${String(value)}}` : '';
39
39
 
40
40
  export default {
41
41
  example: figma.code`<DsProgressDonut variant="${variant}" size="${size}"${valueProp} />`,
42
- imports: ["import { DsProgressDonut } from '@drivenets/design-system'"],
42
+ imports: ["import { DsProgressDonut } from '@drivenets/design-system';"],
43
43
  id: 'ds-progress-donut',
44
44
  metadata: { nestable: false },
45
- };
45
+ } satisfies figma.Template;
@@ -20,7 +20,7 @@ const variant = instance.getEnum('Type', {
20
20
 
21
21
  export default {
22
22
  example: figma.code`<DsProgressLinear variant="${variant}" size="${size}" value={0} />`,
23
- imports: ["import { DsProgressLinear } from '@drivenets/design-system'"],
23
+ imports: ["import { DsProgressLinear } from '@drivenets/design-system';"],
24
24
  id: 'ds-progress-linear',
25
25
  metadata: { nestable: false },
26
- };
26
+ } satisfies figma.Template;
@@ -23,7 +23,7 @@ const attrs = [
23
23
 
24
24
  export default {
25
25
  example: zero ? figma.code`<DsProgressTaskBar total={999} />` : figma.code`<DsProgressTaskBar ${attrs} />`,
26
- imports: ["import { DsProgressTaskBar } from '@drivenets/design-system'"],
26
+ imports: ["import { DsProgressTaskBar } from '@drivenets/design-system';"],
27
27
  id: 'ds-progress-task-bar',
28
28
  metadata: { nestable: false },
29
- };
29
+ } satisfies figma.Template;
@@ -18,7 +18,7 @@ const attrs = ['value="option"', 'label="Option"', state === 'disabled' ? 'disab
18
18
 
19
19
  export default {
20
20
  example: figma.code`<DsRadioGroup.Item ${attrs} />`,
21
- imports: ["import { DsRadioGroup } from '@drivenets/design-system'"],
21
+ imports: ["import { DsRadioGroup } from '@drivenets/design-system';"],
22
22
  id: 'ds-radio-group-item',
23
23
  metadata: { nestable: true },
24
- };
24
+ } satisfies figma.Template;
@@ -8,7 +8,7 @@ export default {
8
8
  <DsRadioGroup.Item value="option-1" label="Option 1" />
9
9
  <DsRadioGroup.Item value="option-2" label="Option 2" />
10
10
  </DsRadioGroup.Root>`,
11
- imports: ["import { DsRadioGroup } from '@drivenets/design-system'"],
11
+ imports: ["import { DsRadioGroup } from '@drivenets/design-system';"],
12
12
  id: 'ds-radio-group',
13
13
  metadata: { nestable: false },
14
- };
14
+ } satisfies figma.Template;
@@ -19,7 +19,7 @@ const attrs = ['value="option"', 'label="Option"', state === 'disabled' ? 'disab
19
19
 
20
20
  export default {
21
21
  example: figma.code`<DsSegmentGroup.Item ${attrs} />`,
22
- imports: ["import { DsSegmentGroup } from '@drivenets/design-system'"],
22
+ imports: ["import { DsSegmentGroup } from '@drivenets/design-system';"],
23
23
  id: 'ds-segment-group-item',
24
24
  metadata: { nestable: true },
25
- };
25
+ } satisfies figma.Template;
@@ -17,7 +17,7 @@ export default {
17
17
  <DsSegmentGroup.Item value="option-1" label="Option 1" />
18
18
  <DsSegmentGroup.Item value="option-2" label="Option 2" />
19
19
  </DsSegmentGroup.Root>`,
20
- imports: ["import { DsSegmentGroup } from '@drivenets/design-system'"],
20
+ imports: ["import { DsSegmentGroup } from '@drivenets/design-system';"],
21
21
  id: 'ds-segment-group',
22
22
  metadata: { nestable: false },
23
- };
23
+ } satisfies figma.Template;
@@ -47,7 +47,7 @@ const attrs = [
47
47
 
48
48
  export default {
49
49
  example: figma.code`<DsSelect ${attrs} />`,
50
- imports: ["import { DsSelect } from '@drivenets/design-system'"],
50
+ imports: ["import { DsSelect } from '@drivenets/design-system';"],
51
51
  id: 'ds-select',
52
52
  metadata: { nestable: true, props: { fcMember: 'Select', fcProps: attrs } },
53
- };
53
+ } satisfies figma.Template;
@@ -21,7 +21,7 @@ export default {
21
21
  state === 'overflow'
22
22
  ? figma.code`<DsSiteNode state="${state}" overflowLabel="${overflowLabel}" />`
23
23
  : figma.code`<DsSiteNode state="${state}" tier="${tier}" siteCode="${siteCode}" />`,
24
- imports: ["import { DsSiteNode } from '@drivenets/design-system'"],
24
+ imports: ["import { DsSiteNode } from '@drivenets/design-system';"],
25
25
  id: 'ds-site-node',
26
26
  metadata: { nestable: true },
27
- };
27
+ } satisfies figma.Template;
@@ -86,7 +86,7 @@ const DsSmartTab: React.FC<DsSmartTabProps> = ({
86
86
  /**
87
87
  * Design system SmartTabs component
88
88
  */
89
- const DsSmartTabs = ({
89
+ const DsSmartTabsRoot = ({
90
90
  activeTab,
91
91
  onTabClick,
92
92
  className,
@@ -110,8 +110,9 @@ const DsSmartTabs = ({
110
110
 
111
111
  DsSmartTab.displayName = 'DsSmartTabs.Tab';
112
112
 
113
- DsSmartTabs.Tab = DsSmartTab;
114
-
115
- DsSmartTabs.displayName = 'DsSmartTabs';
113
+ const DsSmartTabs = Object.assign(DsSmartTabsRoot, {
114
+ displayName: 'DsSmartTabs',
115
+ Tab: DsSmartTab,
116
+ });
116
117
 
117
118
  export default DsSmartTabs;
@@ -13,7 +13,7 @@ const size = instance.getEnum('Size', {
13
13
 
14
14
  export default {
15
15
  example: figma.code`<DsSpinner size="${size}" />`,
16
- imports: ["import { DsSpinner } from '@drivenets/design-system'"],
16
+ imports: ["import { DsSpinner } from '@drivenets/design-system';"],
17
17
  id: 'ds-spinner',
18
18
  metadata: { nestable: true },
19
- };
19
+ } satisfies figma.Template;
@@ -89,7 +89,7 @@ const buttonProps = [
89
89
 
90
90
  export default {
91
91
  example: figma.code`<DsSplitButton size="${size}"${disabled ? ' disabled' : ''} slotProps={{ button: { ${buttonProps} }, select: { options: [], value: '' } }} />`,
92
- imports: ["import { DsSplitButton } from '@drivenets/design-system'"],
92
+ imports: ["import { DsSplitButton } from '@drivenets/design-system';"],
93
93
  id: 'ds-split-button',
94
94
  metadata: { nestable: false },
95
- };
95
+ } satisfies figma.Template;
@@ -35,7 +35,7 @@ export default {
35
35
  : structure === 'text-only'
36
36
  ? figma.code`<DsStatusBadgeV2 phase="${phase}" label="${label}" variant="${variant}" size="${size}" icon={null} />`
37
37
  : figma.code`<DsStatusBadgeV2 phase="${phase}" label="${label}" variant="${variant}" size="${size}" />`,
38
- imports: ["import { DsStatusBadgeV2 } from '@drivenets/design-system'"],
38
+ imports: ["import { DsStatusBadgeV2 } from '@drivenets/design-system';"],
39
39
  id: 'ds-status-badge-v2',
40
40
  metadata: { nestable: true },
41
- };
41
+ } satisfies figma.Template;
@@ -32,7 +32,7 @@ export default {
32
32
  </DsStep>
33
33
  {/* Add a <DsStep> per step */}
34
34
  </DsStepper>`,
35
- imports: ["import { DsStepper, DsStep, DsStepContent, DsNextStepButton } from '@drivenets/design-system'"],
35
+ imports: ["import { DsStepper, DsStep, DsStepContent, DsNextStepButton } from '@drivenets/design-system';"],
36
36
  id: 'ds-stepper',
37
37
  metadata: { nestable: true },
38
- };
38
+ } satisfies figma.Template;
@@ -1,2 +1 @@
1
1
  export { DsTableGroupHeaderCell } from './ds-table-group-header-cell';
2
- export type { DsTableGroupHeaderCellProps } from './ds-table-group-header-cell.types';
@@ -1,8 +1,8 @@
1
1
  @use '../../../../styles/typography';
2
2
  @use '../../styles/variables' as vars;
3
3
 
4
- .stickyHeader {
5
- background-color: var(--background);
4
+ .header {
5
+ background-color: var(--background-secondary);
6
6
  }
7
7
 
8
8
  .virtualizedHeader {
@@ -15,12 +15,10 @@ import { DsTableGroupHeaderCell } from '../ds-table-group-header-cell';
15
15
  import { isFirstLeafColumnOfGroup } from '../../grouping';
16
16
 
17
17
  const DsTableHeader = <TData,>({ table }: DsTableHeaderProps<TData>) => {
18
- const { stickyHeader, bordered, virtualized } = useDsTableContext<TData, unknown>();
18
+ const { bordered, virtualized } = useDsTableContext<TData, unknown>();
19
19
 
20
20
  return (
21
- <TableHeader
22
- className={classnames(stickyHeader && styles.stickyHeader, virtualized && styles.virtualizedHeader)}
23
- >
21
+ <TableHeader className={classnames(styles.header, virtualized && styles.virtualizedHeader)}>
24
22
  {table.getHeaderGroups().map((headerGroup) => (
25
23
  <TableRow
26
24
  key={headerGroup.id}
@@ -18,9 +18,24 @@ $bulk-actions-reserved-space: 80px;
18
18
  border-style: solid;
19
19
  border-color: var(--color-dap-gray-400);
20
20
  background: var(--background);
21
+ display: flex;
22
+ flex-direction: column;
23
+ max-height: 100%;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .controls {
28
+ background: var(--background);
29
+ border-bottom: 1px solid var(--border);
30
+ padding: var(--xs) var(--standard);
31
+ display: flex;
32
+ align-items: center;
33
+ flex-shrink: 0;
21
34
  }
22
35
 
23
36
  .dataTableContainer {
37
+ flex: 1;
38
+ min-height: 0;
24
39
  max-height: 100%;
25
40
  overflow-x: auto;
26
41
  overflow-y: hidden;
@@ -52,6 +52,7 @@ const DsTable = <TData extends { id: string }, TValue>({
52
52
  ref,
53
53
  columns: columnsProp,
54
54
  data: tableData,
55
+ controls,
55
56
  virtualized = false,
56
57
  virtualizedOptions,
57
58
  className,
@@ -336,41 +337,43 @@ const DsTable = <TData extends { id: string }, TValue>({
336
337
  return (
337
338
  <DsTableContext.Provider value={contextValue}>
338
339
  <div
339
- ref={tableContainerRef}
340
- className={classnames(
341
- styles.container,
342
- !virtualized && styles.dataTableContainer,
343
- virtualized && styles.virtualizedContainer,
344
- isBulkActionsVisible && styles.bulkActionsVisible,
345
- className,
346
- )}
340
+ className={classnames(styles.container, isBulkActionsVisible && styles.bulkActionsVisible, className)}
347
341
  >
348
- <DragWrapper>
349
- <Table className={classnames(fullWidth && styles.fullWidth, !bordered && styles.tableNoBorder)}>
350
- <DsTableHeader table={table} />
351
- {virtualized ? (
352
- <DsTableBodyVirtualized
353
- table={table}
354
- emptyState={emptyState}
355
- estimateSize={virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize]}
356
- overscan={virtualizedOptions?.overscan}
357
- onScroll={onScroll}
358
- rowSelection={rowSelection}
359
- infiniteScroll={infiniteScroll}
360
- />
361
- ) : (
362
- <TableBody>
363
- <SortableWrapper>
364
- {rows.length
365
- ? rows.map((row) => (
366
- <DsTableRow key={row.id} row={row} isSelected={!!rowSelection[row.id]} />
367
- ))
368
- : renderEmptyState()}
369
- </SortableWrapper>
370
- </TableBody>
371
- )}
372
- </Table>
373
- </DragWrapper>
342
+ {controls && <div className={styles.controls}>{controls}</div>}
343
+ <div
344
+ ref={tableContainerRef}
345
+ className={classnames(
346
+ !virtualized && styles.dataTableContainer,
347
+ virtualized && styles.virtualizedContainer,
348
+ )}
349
+ >
350
+ <DragWrapper>
351
+ <Table className={classnames(fullWidth && styles.fullWidth, !bordered && styles.tableNoBorder)}>
352
+ <DsTableHeader table={table} />
353
+ {virtualized ? (
354
+ <DsTableBodyVirtualized
355
+ table={table}
356
+ emptyState={emptyState}
357
+ estimateSize={virtualizedOptions?.estimateSize || ROW_SIZE_HEIGHT_MAP[rowSize]}
358
+ overscan={virtualizedOptions?.overscan}
359
+ onScroll={onScroll}
360
+ rowSelection={rowSelection}
361
+ infiniteScroll={infiniteScroll}
362
+ />
363
+ ) : (
364
+ <TableBody>
365
+ <SortableWrapper>
366
+ {rows.length
367
+ ? rows.map((row) => (
368
+ <DsTableRow key={row.id} row={row} isSelected={!!rowSelection[row.id]} />
369
+ ))
370
+ : renderEmptyState()}
371
+ </SortableWrapper>
372
+ </TableBody>
373
+ )}
374
+ </Table>
375
+ </DragWrapper>
376
+ </div>
374
377
  {selectable && actions.length > 0 && (
375
378
  <DsTableBulkActions
376
379
  numSelectedRows={selectedRows.length}
@@ -228,6 +228,12 @@ export interface DsDataTableProps<TData, TValue> {
228
228
  */
229
229
  data: TData[];
230
230
 
231
+ /**
232
+ * Optional content rendered in a pinned controls bar above the table header
233
+ * (e.g. filters, action buttons). Layout is owned by the consumer.
234
+ */
235
+ controls?: React.ReactNode;
236
+
231
237
  /**
232
238
  * Whether the table is virtualized
233
239
  * @default false
@@ -11,7 +11,7 @@ import figma from 'figma';
11
11
 
12
12
  export default {
13
13
  example: figma.code`<DsTable columns={columns} data={data} expandable renderExpandedRow={(row) => null} />`,
14
- imports: ["import { DsTable } from '@drivenets/design-system'"],
14
+ imports: ["import { DsTable } from '@drivenets/design-system';"],
15
15
  id: 'ds-table-expandable',
16
16
  metadata: { nestable: false },
17
- };
17
+ } satisfies figma.Template;
@@ -10,7 +10,7 @@ import figma from 'figma';
10
10
 
11
11
  export default {
12
12
  example: figma.code`<DsTable columns={columns} data={data} />`,
13
- imports: ["import { DsTable } from '@drivenets/design-system'"],
13
+ imports: ["import { DsTable } from '@drivenets/design-system';"],
14
14
  id: 'ds-table',
15
15
  metadata: { nestable: false },
16
- };
16
+ } satisfies figma.Template;
@@ -72,7 +72,7 @@ const attrs = [`value="${value}"`, `label="${label}"`, icon ? `icon="${icon}"` :
72
72
 
73
73
  export default {
74
74
  example: figma.code`<DsTabs.Tab ${attrs} />`,
75
- imports: ["import { DsTabs } from '@drivenets/design-system'"],
75
+ imports: ["import { DsTabs } from '@drivenets/design-system';"],
76
76
  id: 'ds-tabs-tab-vertical',
77
77
  metadata: { nestable: true },
78
- };
78
+ } satisfies figma.Template;
@@ -83,7 +83,7 @@ const attrs = [
83
83
 
84
84
  export default {
85
85
  example: figma.code`<DsTabs.Tab ${attrs} />`,
86
- imports: ["import { DsTabs } from '@drivenets/design-system'"],
86
+ imports: ["import { DsTabs } from '@drivenets/design-system';"],
87
87
  id: 'ds-tabs-tab',
88
88
  metadata: { nestable: true },
89
- };
89
+ } satisfies figma.Template;
@@ -25,7 +25,7 @@ export default {
25
25
  <DsTabs.List>${tabs}</DsTabs.List>
26
26
  {/* Add a <DsTabs.Content value="..."> panel for each tab */}
27
27
  </DsTabs.Root>`,
28
- imports: ["import { DsTabs } from '@drivenets/design-system'"],
28
+ imports: ["import { DsTabs } from '@drivenets/design-system';"],
29
29
  id: 'ds-tabs-vertical',
30
30
  metadata: { nestable: false },
31
- };
31
+ } satisfies figma.Template;
@@ -23,7 +23,7 @@ export default {
23
23
  <DsTabs.List>${tabs}</DsTabs.List>
24
24
  {/* Add a <DsTabs.Content value="..."> panel for each tab */}
25
25
  </DsTabs.Root>`,
26
- imports: ["import { DsTabs } from '@drivenets/design-system'"],
26
+ imports: ["import { DsTabs } from '@drivenets/design-system';"],
27
27
  id: 'ds-tabs',
28
28
  metadata: { nestable: false },
29
- };
29
+ } satisfies figma.Template;
@@ -81,7 +81,7 @@ const attrs = [
81
81
 
82
82
  export default {
83
83
  example: figma.code`<${info.component} ${attrs} />`,
84
- imports: [`import { ${info.component} } from '@drivenets/design-system'`],
84
+ imports: [`import { ${info.component} } from '@drivenets/design-system';`],
85
85
  id: 'ds-input-field-v02',
86
86
  metadata: { nestable: true, props: { fcMember: info.fcMember, fcProps: attrs } },
87
- };
87
+ } satisfies figma.Template;
@@ -54,7 +54,7 @@ export default {
54
54
  : type === 'password'
55
55
  ? figma.code`<DsPasswordInput ${sizeAttr} ${disabled ? 'disabled' : ''} />`
56
56
  : figma.code`<DsTextInput ${sizeAttr} ${disabled ? 'disabled' : ''} ${readOnly ? 'readOnly' : ''} />`,
57
- imports: [`import { ${componentName} } from '@drivenets/design-system'`],
57
+ imports: [`import { ${componentName} } from '@drivenets/design-system';`],
58
58
  id: 'ds-text-input',
59
59
  metadata: { nestable: true, props: { fcMember, fcProps } },
60
- };
60
+ } satisfies figma.Template;
@@ -12,7 +12,7 @@ export default {
12
12
  example: figma.code`const [value, setValue] = useState<Date | null>(null);
13
13
 
14
14
  <DsTimePicker value={value} onChange={setValue} placeholder="hh:mm AM/PM" />`,
15
- imports: ["import { useState } from 'react'", "import { DsTimePicker } from '@drivenets/design-system'"],
15
+ imports: ["import { DsTimePicker } from '@drivenets/design-system';", "import { useState } from 'react';"],
16
16
  id: 'ds-time-picker',
17
17
  metadata: { nestable: true, props: { fcMember: 'TimePicker', fcProps: '' } },
18
- };
18
+ } satisfies figma.Template;