@drivenets/design-system 0.15.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 (206) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/index.cjs +1092 -381
  3. package/dist/index.d.cts +886 -1204
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +886 -1204
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1076 -377
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +36 -34
  11. package/src/components/ds-alert-banner/ds-alert-banner.tsx +16 -6
  12. package/src/components/ds-autocomplete/ds-autocomplete.figma.ts +36 -0
  13. package/src/components/ds-autocomplete/ds-autocomplete.tsx +2 -0
  14. package/src/components/ds-avatar/ds-avatar.figma.ts +30 -0
  15. package/src/components/ds-avatar/ds-avatar.tsx +6 -1
  16. package/src/components/ds-avatar/ds-avatar.types.ts +5 -2
  17. package/src/components/ds-avatar-group/ds-avatar-group.figma.ts +27 -0
  18. package/src/components/ds-avatar-group/ds-avatar-group.tsx +6 -1
  19. package/src/components/ds-avatar-group/ds-avatar-group.types.ts +3 -1
  20. package/src/components/ds-breadcrumb/ds-breadcrumb.figma.ts +19 -0
  21. package/src/components/ds-breadcrumb/ds-breadcrumb.tsx +2 -0
  22. package/src/components/ds-button/ds-button.tsx +2 -0
  23. package/src/components/ds-button-v3/ds-button-v3.figma.ts +3 -3
  24. package/src/components/ds-button-v3/ds-button-v3.tsx +6 -0
  25. package/src/components/ds-button-v3/index.ts +2 -0
  26. package/src/components/ds-card/ds-card.tsx +7 -3
  27. package/src/components/ds-card/figma/ds-card-content.figma.ts +2 -2
  28. package/src/components/ds-card/figma/ds-card-footer.figma.ts +2 -2
  29. package/src/components/ds-card/figma/ds-card-header.figma.ts +2 -2
  30. package/src/components/ds-card/figma/ds-card.figma.ts +2 -2
  31. package/src/components/ds-catalog-layout/ds-catalog-layout.figma.ts +51 -0
  32. package/src/components/ds-catalog-layout/ds-catalog-layout.tsx +15 -6
  33. package/src/components/ds-checkbox/ds-checkbox-level-2.figma.ts +40 -0
  34. package/src/components/ds-checkbox/ds-checkbox.figma.ts +45 -0
  35. package/src/components/ds-checkbox/ds-checkbox.module.scss +1 -1
  36. package/src/components/ds-checkbox/ds-checkbox.tsx +9 -1
  37. package/src/components/ds-checkbox-group/ds-checkbox-group.figma.ts +15 -0
  38. package/src/components/ds-checkbox-group/ds-checkbox-group.tsx +2 -0
  39. package/src/components/ds-chip/ds-chip.tsx +2 -0
  40. package/src/components/ds-chip-group/ds-chip-group.tsx +2 -0
  41. package/src/components/ds-comment-bubble/components/ds-comment-thread/ds-comment-thread.tsx +1 -0
  42. package/src/components/ds-comment-bubble/components/ds-thread-item/ds-thread-item.tsx +1 -0
  43. package/src/components/ds-comment-bubble/ds-comment-bubble.tsx +1 -0
  44. package/src/components/ds-comment-card/ds-comment-card.tsx +1 -0
  45. package/src/components/ds-comment-indicator/ds-comment-indicator.tsx +1 -0
  46. package/src/components/ds-comments-drawer/components/comments-filter-modal/index.ts +0 -1
  47. package/src/components/ds-comments-drawer/ds-comments-drawer.tsx +1 -0
  48. package/src/components/ds-confirmation/ds-confirmation.tsx +13 -10
  49. package/src/components/ds-date-input/ds-date-input.tsx +2 -0
  50. package/src/components/ds-date-picker/ds-date-picker.figma.ts +2 -2
  51. package/src/components/ds-date-picker/ds-date-picker.tsx +9 -0
  52. package/src/components/ds-date-picker/ds-date-picker.types.ts +1 -1
  53. package/src/components/ds-date-range-picker/ds-date-range-picker.tsx +2 -0
  54. package/src/components/ds-dialog/ds-dialog.tsx +9 -0
  55. package/src/components/ds-dialog/ds-dialog.types.ts +1 -1
  56. package/src/components/ds-divider/ds-divider.figma.ts +19 -0
  57. package/src/components/ds-divider/ds-divider.tsx +2 -0
  58. package/src/components/ds-drawer/ds-drawer.tsx +19 -8
  59. package/src/components/ds-drawer/figma/ds-drawer-content.figma.ts +15 -0
  60. package/src/components/ds-drawer/figma/ds-drawer-footer.figma.ts +19 -0
  61. package/src/components/ds-drawer/figma/ds-drawer-header.figma.ts +16 -0
  62. package/src/components/ds-drawer/figma/ds-drawer.figma.ts +36 -0
  63. package/src/components/ds-dropdown-menu/ds-dropdown-menu.module.scss +12 -3
  64. package/src/components/ds-dropdown-menu/ds-dropdown-menu.tsx +24 -6
  65. package/src/components/ds-dropdown-menu/ds-dropdown-menu.types.ts +10 -1
  66. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-footer.figma.ts +11 -0
  67. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-group.figma.ts +23 -0
  68. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-item.figma.ts +29 -0
  69. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-separator.figma.ts +11 -0
  70. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu.figma.ts +24 -0
  71. package/src/components/ds-expandable-text-input/ds-expandable-text-input.figma.ts +24 -0
  72. package/src/components/ds-expandable-text-input/ds-expandable-text-input.tsx +1 -0
  73. package/src/components/ds-file-upload/components/file-upload-item/index.ts +0 -1
  74. package/src/components/ds-file-upload/ds-file-upload.figma.ts +29 -0
  75. package/src/components/ds-file-upload/ds-file-upload.tsx +2 -0
  76. package/src/components/ds-filter-status-icon/ds-filter-status-icon.figma.ts +22 -0
  77. package/src/components/ds-filter-status-icon/ds-filter-status-icon.tsx +1 -0
  78. package/src/components/ds-form-control/ds-form-control.figma.ts +2 -2
  79. package/src/components/ds-form-control/ds-form-control.tsx +16 -11
  80. package/src/components/ds-grid/index.ts +3 -0
  81. package/src/components/ds-icon/ds-icon.tsx +2 -0
  82. package/src/components/ds-icon/figma/ds-icon-material.figma.batch.ts +1 -1
  83. package/src/components/ds-icon/figma/ds-icon-special.figma.batch.ts +1 -1
  84. package/src/components/ds-key-value-pair/ds-key-value-pair.figma.ts +24 -0
  85. package/src/components/ds-key-value-pair/ds-key-value-pair.tsx +2 -0
  86. package/src/components/ds-loader/ds-loader.figma.ts +11 -0
  87. package/src/components/ds-loader/ds-loader.tsx +2 -0
  88. package/src/components/ds-modal/ds-modal.tsx +17 -7
  89. package/src/components/ds-modal/figma/ds-modal-content.figma.ts +2 -2
  90. package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +2 -2
  91. package/src/components/ds-modal/figma/ds-modal-header.figma.ts +2 -2
  92. package/src/components/ds-modal/figma/ds-modal.figma.ts +2 -2
  93. package/src/components/ds-number-input/ds-number-input.tsx +3 -0
  94. package/src/components/ds-panel/ds-panel.figma.ts +16 -0
  95. package/src/components/ds-panel/index.ts +2 -0
  96. package/src/components/ds-password-input/ds-password-input.tsx +2 -0
  97. package/src/components/ds-popover/ds-popover.tsx +9 -0
  98. package/src/components/ds-popover/figma/ds-popover-content-item.figma.ts +18 -0
  99. package/src/components/ds-popover/figma/ds-popover-content.figma.ts +15 -0
  100. package/src/components/ds-popover/figma/ds-popover-footer.figma.ts +19 -0
  101. package/src/components/ds-popover/figma/ds-popover-header.figma.ts +16 -0
  102. package/src/components/ds-popover/figma/ds-popover.figma.ts +34 -0
  103. package/src/components/ds-progress-arc/ds-progress-arc.figma.ts +23 -0
  104. package/src/components/ds-progress-arc/ds-progress-arc.tsx +2 -0
  105. package/src/components/ds-progress-donut/ds-progress-donut.figma.ts +45 -0
  106. package/src/components/ds-progress-donut/ds-progress-donut.tsx +2 -0
  107. package/src/components/ds-progress-linear/ds-progress-linear.figma.ts +26 -0
  108. package/src/components/ds-progress-linear/ds-progress-linear.tsx +2 -0
  109. package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +2 -2
  110. package/src/components/ds-progress-task-bar/ds-progress-task-bar.tsx +2 -0
  111. package/src/components/ds-radio-group/ds-radio-group.tsx +3 -0
  112. package/src/components/ds-radio-group/figma/ds-radio-group-item.figma.ts +24 -0
  113. package/src/components/ds-radio-group/figma/ds-radio-group.figma.ts +14 -0
  114. package/src/components/ds-segment-group/ds-segment-group.tsx +3 -0
  115. package/src/components/ds-segment-group/figma/ds-segment-group-item.figma.ts +25 -0
  116. package/src/components/ds-segment-group/figma/ds-segment-group.figma.ts +23 -0
  117. package/src/components/ds-select/ds-select.figma.ts +2 -2
  118. package/src/components/ds-select/ds-select.tsx +2 -0
  119. package/src/components/ds-site-node/ds-site-node.figma.ts +27 -0
  120. package/src/components/ds-site-node/ds-site-node.module.scss +59 -0
  121. package/src/components/ds-site-node/ds-site-node.tsx +73 -0
  122. package/src/components/ds-site-node/ds-site-node.types.ts +36 -0
  123. package/src/components/ds-site-node/hooks/use-is-overflowing.ts +31 -0
  124. package/src/components/ds-site-node/index.ts +3 -0
  125. package/src/components/ds-skeleton/ds-skeleton-circle.tsx +2 -0
  126. package/src/components/ds-skeleton/ds-skeleton-rect.tsx +2 -0
  127. package/src/components/ds-skeleton/ds-skeleton-text.tsx +2 -0
  128. package/src/components/ds-skeleton/ds-skeleton.ts +7 -1
  129. package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +7 -2
  130. package/src/components/ds-spinner/ds-spinner.figma.ts +19 -0
  131. package/src/components/ds-spinner/ds-spinner.tsx +2 -0
  132. package/src/components/ds-split-button/ds-split-button.figma.ts +2 -2
  133. package/src/components/ds-split-button/ds-split-button.tsx +6 -0
  134. package/src/components/ds-status-badge/ds-status-badge.tsx +2 -0
  135. package/src/components/ds-status-badge-v2/ds-status-badge-v2.figma.ts +2 -2
  136. package/src/components/ds-status-badge-v2/index.ts +2 -0
  137. package/src/components/ds-stepper/components/ds-step-content.tsx +2 -0
  138. package/src/components/ds-stepper/components/ds-step-next-button.tsx +2 -0
  139. package/src/components/ds-stepper/components/ds-step.tsx +2 -0
  140. package/src/components/ds-stepper/ds-stepper.figma.ts +38 -0
  141. package/src/components/ds-stepper/ds-stepper.tsx +1 -0
  142. package/src/components/ds-system-status/ds-system-status.tsx +2 -0
  143. package/src/components/ds-table/components/ds-table-group-header-cell/index.ts +0 -1
  144. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +2 -2
  145. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +2 -4
  146. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx +1 -0
  147. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx +1 -0
  148. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx +1 -0
  149. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx +1 -0
  150. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx +1 -0
  151. package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.tsx +1 -0
  152. package/src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx +1 -0
  153. package/src/components/ds-table/ds-table.module.scss +15 -0
  154. package/src/components/ds-table/ds-table.tsx +39 -34
  155. package/src/components/ds-table/ds-table.types.ts +6 -0
  156. package/src/components/ds-table/figma/ds-table-expandable.figma.ts +2 -2
  157. package/src/components/ds-table/figma/ds-table.figma.ts +2 -2
  158. package/src/components/ds-table/index.ts +3 -0
  159. package/src/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.tsx +2 -0
  160. package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.tsx +2 -0
  161. package/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.tsx +2 -0
  162. package/src/components/ds-tabs/ds-tabs.tsx +2 -0
  163. package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +2 -2
  164. package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +2 -2
  165. package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +2 -2
  166. package/src/components/ds-tabs/figma/ds-tabs.figma.ts +2 -2
  167. package/src/components/ds-tag/ds-tag.tsx +2 -0
  168. package/src/components/ds-tag-filter/ds-tag-filter.tsx +2 -0
  169. package/src/components/ds-text-input/ds-input-field-v02.figma.ts +87 -0
  170. package/src/components/ds-text-input/ds-text-input.figma.ts +2 -2
  171. package/src/components/ds-text-input/ds-text-input.tsx +2 -0
  172. package/src/components/ds-textarea/ds-textarea.tsx +2 -0
  173. package/src/components/ds-time-picker/ds-time-picker.figma.ts +2 -2
  174. package/src/components/ds-time-picker/ds-time-picker.tsx +2 -0
  175. package/src/components/ds-toast/ds-toast-context.tsx +1 -0
  176. package/src/components/ds-toast/ds-toast.figma.ts +34 -0
  177. package/src/components/ds-toast/ds-toast.tsx +3 -0
  178. package/src/components/ds-toggle/ds-toggle.figma.ts +39 -0
  179. package/src/components/ds-toggle/ds-toggle.tsx +2 -0
  180. package/src/components/ds-tooltip/ds-tooltip.figma.ts +16 -0
  181. package/src/components/ds-tooltip/ds-tooltip.module.scss +8 -1
  182. package/src/components/ds-tooltip/ds-tooltip.tsx +35 -15
  183. package/src/components/ds-tooltip/ds-tooltip.types.ts +40 -0
  184. package/src/components/ds-tree/ds-tree.module.scss +2 -2
  185. package/src/components/ds-tree/ds-tree.tsx +22 -0
  186. package/src/components/ds-tree/ds-tree.types.ts +16 -0
  187. package/src/components/ds-typography/ds-typography.config.ts +1 -1
  188. package/src/components/ds-typography/ds-typography.figma.ts +63 -0
  189. package/src/components/ds-typography/ds-typography.module.scss +16 -0
  190. package/src/components/ds-typography/ds-typography.tsx +64 -7
  191. package/src/components/ds-typography/ds-typography.types.ts +13 -0
  192. package/src/components/ds-typography/hooks/use-truncation.ts +151 -0
  193. package/src/components/ds-user-card/ds-user-card.figma.ts +16 -0
  194. package/src/components/ds-user-card/ds-user-card.module.scss +25 -0
  195. package/src/components/ds-user-card/ds-user-card.tsx +31 -0
  196. package/src/components/ds-user-card/ds-user-card.types.ts +26 -0
  197. package/src/components/ds-user-card/index.ts +2 -0
  198. package/src/components/ds-vertical-tabs/ds-vertical-tabs.tsx +17 -4
  199. package/src/components/ds-workspace-layout/ds-workspace-layout.tsx +19 -8
  200. package/src/index.ts +2 -0
  201. package/src/styles/_root.scss +468 -363
  202. package/src/styles/shared/_dropdown.scss +2 -2
  203. package/src/styles/styles.scss +0 -3
  204. package/src/styles/_colors.scss +0 -65
  205. package/src/styles/_root_new.scss +0 -451
  206. package/src/styles/_spacing.scss +0 -47
@@ -0,0 +1,45 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=33315-40861
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-checkbox
3
+ // component=DsCheckbox
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const color = instance.getEnum('color', {
9
+ Default: 'default',
10
+ warning: 'warning',
11
+ });
12
+
13
+ const checked = instance.getEnum('checked', {
14
+ unchecked: 'unchecked',
15
+ checked: 'checked',
16
+ partial: 'partial',
17
+ });
18
+
19
+ const state = instance.getEnum('state', {
20
+ default: 'default',
21
+ hover: 'hover',
22
+ focus: 'focus',
23
+ disabled: 'disabled',
24
+ });
25
+
26
+ // `partial` is Ark's indeterminate state; both checked values seed the
27
+ // uncontrolled `defaultChecked` so the snippet renders without a handler.
28
+ const checkedAttr =
29
+ checked === 'partial' ? 'defaultChecked="indeterminate"' : checked === 'checked' ? 'defaultChecked' : '';
30
+
31
+ const attrs = [
32
+ 'label="Label"',
33
+ color === 'warning' ? 'variant="warning"' : '',
34
+ checkedAttr,
35
+ state === 'disabled' ? 'disabled' : '',
36
+ ]
37
+ .filter(Boolean)
38
+ .join(' ');
39
+
40
+ export default {
41
+ example: figma.code`<DsCheckbox ${attrs} />`,
42
+ imports: ["import { DsCheckbox } from '@drivenets/design-system';"],
43
+ id: 'ds-checkbox',
44
+ metadata: { nestable: true },
45
+ } satisfies figma.Template;
@@ -1,4 +1,4 @@
1
- @use '../../styles/root_new';
1
+ @use '../../styles/root';
2
2
  @use '../../styles/typography';
3
3
 
4
4
  $checkbox-size: 16px;
@@ -5,7 +5,13 @@ import type { DsCheckboxProps } from './ds-checkbox.types';
5
5
  import { DsIcon } from '../ds-icon';
6
6
 
7
7
  /**
8
- * Design system Checkbox component
8
+ * @summary Checkbox for single and grouped selection
9
+ *
10
+ * Checkbox for boolean and multi-select inputs. Use standalone for a single
11
+ * toggle, or compose inside `DsCheckboxGroup` for multi-select lists. Import
12
+ * `useCheckboxSelectAll` from `ds-checkbox-group` for parent "select all"
13
+ * checkboxes. `checked` accepts `true`, `false`, or `"indeterminate"`.
14
+ *
9
15
  */
10
16
  const DsCheckbox = ({
11
17
  variant = 'default',
@@ -42,4 +48,6 @@ const DsCheckbox = ({
42
48
  );
43
49
  };
44
50
 
51
+ DsCheckbox.displayName = 'DsCheckbox';
52
+
45
53
  export default DsCheckbox;
@@ -0,0 +1,15 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=34859-101457
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-checkbox-group
3
+ // component=DsCheckboxGroup
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const checkboxes = instance.getSlot('checkboxes slot');
9
+
10
+ export default {
11
+ example: figma.code`<DsCheckboxGroup>${checkboxes}</DsCheckboxGroup>`,
12
+ imports: ["import { DsCheckboxGroup, DsCheckbox } from '@drivenets/design-system';"],
13
+ id: 'ds-checkbox-group',
14
+ metadata: { nestable: false },
15
+ } satisfies figma.Template;
@@ -17,4 +17,6 @@ const DsCheckboxGroup: React.FC<DsCheckboxGroupProps> = ({
17
17
  );
18
18
  };
19
19
 
20
+ DsCheckboxGroup.displayName = 'DsCheckboxGroup';
21
+
20
22
  export default DsCheckboxGroup;
@@ -71,4 +71,6 @@ const DsChip: React.FC<DsChipProps> = ({
71
71
  );
72
72
  };
73
73
 
74
+ DsChip.displayName = 'DsChip';
75
+
74
76
  export default DsChip;
@@ -119,4 +119,6 @@ const DsChipGroup: React.FC<DsChipGroupProps> = ({
119
119
  );
120
120
  };
121
121
 
122
+ DsChipGroup.displayName = 'DsChipGroup';
123
+
122
124
  export default DsChipGroup;
@@ -81,3 +81,4 @@ export const DsCommentThread = ({
81
81
  </div>
82
82
  );
83
83
  };
84
+ DsCommentThread.displayName = 'DsCommentThread';
@@ -136,3 +136,4 @@ export const DsThreadItem = ({
136
136
  </div>
137
137
  );
138
138
  };
139
+ DsThreadItem.displayName = 'DsThreadItem';
@@ -247,3 +247,4 @@ export const DsCommentBubble = ({
247
247
  </div>
248
248
  );
249
249
  };
250
+ DsCommentBubble.displayName = 'DsCommentBubble';
@@ -169,3 +169,4 @@ export const DsCommentCard = ({
169
169
  </button>
170
170
  );
171
171
  };
172
+ DsCommentCard.displayName = 'DsCommentCard';
@@ -46,3 +46,4 @@ export const DsCommentIndicator = ({
46
46
  </button>
47
47
  );
48
48
  };
49
+ DsCommentIndicator.displayName = 'DsCommentIndicator';
@@ -1,2 +1 @@
1
1
  export { CommentsFilterModal } from './comments-filter-modal';
2
- export type { CommentsFilterModalProps } from './comments-filter-modal.types';
@@ -207,3 +207,4 @@ export const DsCommentsDrawer = ({
207
207
  </>
208
208
  );
209
209
  };
210
+ DsCommentsDrawer.displayName = 'DsCommentsDrawer';
@@ -1,17 +1,20 @@
1
1
  import { DsModal } from '../ds-modal';
2
2
  import type { DsConfirmationProps } from './ds-confirmation.types';
3
3
 
4
+ const DsConfirmationRoot = (props: DsConfirmationProps) => (
5
+ <DsModal columns={4} closeOnEscape closeOnInteractOutside {...props} />
6
+ );
7
+
4
8
  /**
5
9
  * @deprecated DsConfirmation is deprecated. Use DsModal instead.
6
10
  * @see {@link ../ds-modal} for the replacement component.
7
11
  */
8
- export const DsConfirmation = (props: DsConfirmationProps) => (
9
- <DsModal columns={4} closeOnEscape closeOnInteractOutside {...props} />
10
- );
11
-
12
- DsConfirmation.Header = DsModal.Header;
13
- DsConfirmation.Title = DsModal.Title;
14
- DsConfirmation.CloseTrigger = DsModal.CloseTrigger;
15
- DsConfirmation.Body = DsModal.Body;
16
- DsConfirmation.Footer = DsModal.Footer;
17
- DsConfirmation.Actions = DsModal.Actions;
12
+ export const DsConfirmation = Object.assign(DsConfirmationRoot, {
13
+ displayName: 'DsConfirmation',
14
+ Header: DsModal.Header,
15
+ Title: DsModal.Title,
16
+ CloseTrigger: DsModal.CloseTrigger,
17
+ Body: DsModal.Body,
18
+ Footer: DsModal.Footer,
19
+ Actions: DsModal.Actions,
20
+ });
@@ -307,4 +307,6 @@ const YearView = () => (
307
307
  </DatePicker.View>
308
308
  );
309
309
 
310
+ DsDateInput.displayName = 'DsDateInput';
311
+
310
312
  export default DsDateInput;
@@ -13,7 +13,7 @@ export default {
13
13
  example: figma.code`const [value, setValue] = useState<Date | null>(null);
14
14
 
15
15
  <DsDatePicker value={value} onChange={setValue} withTime placeholder="mm/dd/yyyy, hh:mm AM/PM" />`,
16
- imports: ["import { useState } from 'react'", "import { DsDatePicker } from '@drivenets/design-system'"],
16
+ imports: ["import { DsDatePicker } from '@drivenets/design-system';", "import { useState } from 'react';"],
17
17
  id: 'ds-date-picker',
18
18
  metadata: { nestable: true, props: { fcMember: 'DatePicker', fcProps: '' } },
19
- };
19
+ } satisfies figma.Template;
@@ -20,6 +20,13 @@ import { DayView } from './components/day-view';
20
20
  import { MonthView } from './components/month-view';
21
21
  import { YearView } from './components/year-view';
22
22
 
23
+ /**
24
+ * @summary Date and optional time input with calendar popover and manual typing.
25
+ *
26
+ * Supports controlled (`value` + `onChange`) and uncontrolled (`defaultValue`) modes.
27
+ * Pass `withTime` to include a nested time picker. A clear button appears when a
28
+ * value is set unless `hideClearButton` is set.
29
+ */
23
30
  const DsDatePicker = ({
24
31
  placeholder,
25
32
  className,
@@ -211,4 +218,6 @@ const DsDatePicker = ({
211
218
  );
212
219
  };
213
220
 
221
+ DsDatePicker.displayName = 'DsDatePicker';
222
+
214
223
  export default DsDatePicker;
@@ -98,7 +98,7 @@ export interface DsDatePickerProps extends Pick<
98
98
 
99
99
  /**
100
100
  * Whether to hide the clear button
101
- * @default true
101
+ * @default false
102
102
  */
103
103
  hideClearButton?: boolean;
104
104
 
@@ -98,4 +98,6 @@ const DsDateRangePicker = ({
98
98
  );
99
99
  };
100
100
 
101
+ DsDateRangePicker.displayName = 'DsDateRangePicker';
102
+
101
103
  export default DsDateRangePicker;
@@ -5,6 +5,13 @@ import classNames from 'classnames';
5
5
  import styles from './ds-dialog.module.scss';
6
6
  import type { DsDialogProps } from './ds-dialog.types';
7
7
 
8
+ /**
9
+ * @summary Lightweight controlled dialog for simple panels and popovers.
10
+ *
11
+ * Renders a Radix dialog with required accessible title, optional description,
12
+ * and custom body content. Use for focused overlays and menu-style panels.
13
+ * Prefer `DsModal` when you need structured header, body, and footer sections.
14
+ */
8
15
  const DsDialog: React.FC<DsDialogProps> = ({
9
16
  open,
10
17
  onOpenChange,
@@ -67,4 +74,6 @@ const DsDialog: React.FC<DsDialogProps> = ({
67
74
  );
68
75
  };
69
76
 
77
+ DsDialog.displayName = 'DsDialog';
78
+
70
79
  export default DsDialog;
@@ -36,7 +36,7 @@ export interface DsDialogProps {
36
36
  /**
37
37
  * Ref to the element the dialog should be anchored to (for relative placement)
38
38
  */
39
- anchorRef?: React.RefObject<HTMLElement>;
39
+ anchorRef?: React.RefObject<HTMLElement | null>;
40
40
  /**
41
41
  * Custom fixed position (e.g., { top: number, left: number })
42
42
  */
@@ -0,0 +1,19 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=32735-122261
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-divider
3
+ // component=DsDivider
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const orientation =
9
+ instance.getEnum('direction', {
10
+ Horizontal: 'horizontal',
11
+ Vertical: 'vertical',
12
+ }) ?? 'horizontal';
13
+
14
+ export default {
15
+ example: figma.code`<DsDivider orientation="${orientation}" />`,
16
+ imports: ["import { DsDivider } from '@drivenets/design-system';"],
17
+ id: 'ds-divider',
18
+ metadata: { nestable: true },
19
+ } satisfies figma.Template;
@@ -19,4 +19,6 @@ const DsDivider: React.FC<DsDividerProps> = ({ orientation = 'horizontal', compo
19
19
  return <Component role="separator" aria-orientation={orientation} className={classes} style={style} />;
20
20
  };
21
21
 
22
+ DsDivider.displayName = 'DsDivider';
23
+
22
24
  export default DsDivider;
@@ -9,7 +9,7 @@ import { DsTypography } from '../ds-typography';
9
9
  import { useArkDialogBodyLockCleanup } from '../../utils/use-ark-dialog-body-lock-cleanup';
10
10
  import { useResponsiveValue } from '../../utils/responsive';
11
11
 
12
- const DsDrawer = ({
12
+ const DsDrawerRoot = ({
13
13
  open,
14
14
  onOpenChange,
15
15
  onOpenAutoFocus,
@@ -170,12 +170,23 @@ const Actions = ({
170
170
  </div>
171
171
  );
172
172
 
173
- DsDrawer.Header = Header;
174
- DsDrawer.Title = Title;
175
- DsDrawer.CloseTrigger = CloseTrigger;
176
- DsDrawer.Toolbar = Toolbar;
177
- DsDrawer.Body = Body;
178
- DsDrawer.Footer = Footer;
179
- DsDrawer.Actions = Actions;
173
+ Header.displayName = 'DsDrawer.Header';
174
+ Title.displayName = 'DsDrawer.Title';
175
+ CloseTrigger.displayName = 'DsDrawer.CloseTrigger';
176
+ Toolbar.displayName = 'DsDrawer.Toolbar';
177
+ Body.displayName = 'DsDrawer.Body';
178
+ Footer.displayName = 'DsDrawer.Footer';
179
+ Actions.displayName = 'DsDrawer.Actions';
180
+
181
+ const DsDrawer = Object.assign(DsDrawerRoot, {
182
+ displayName: 'DsDrawer',
183
+ Header,
184
+ Title,
185
+ CloseTrigger,
186
+ Toolbar,
187
+ Body,
188
+ Footer,
189
+ Actions,
190
+ });
180
191
 
181
192
  export default DsDrawer;
@@ -0,0 +1,15 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=31470-130498
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-drawer
3
+ // component=DsDrawer.Body
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const content = instance.getSlot('Drawer content slot');
9
+
10
+ export default {
11
+ example: figma.code`<DsDrawer.Body>${content}</DsDrawer.Body>`,
12
+ imports: ["import { DsDrawer } from '@drivenets/design-system';"],
13
+ id: 'ds-drawer-content',
14
+ metadata: { nestable: true },
15
+ } satisfies figma.Template;
@@ -0,0 +1,19 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=31416-38250
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-drawer
3
+ // component=DsDrawer.Footer
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const button = instance.findInstance('DAP_Button_v03', { traverseInstances: true });
9
+ let buttonCode: figma.ResultSection[] | undefined;
10
+ if (button.type === 'INSTANCE') {
11
+ buttonCode = button.executeTemplate().example;
12
+ }
13
+
14
+ export default {
15
+ example: figma.code`<DsDrawer.Footer><DsDrawer.Actions>${buttonCode}</DsDrawer.Actions></DsDrawer.Footer>`,
16
+ imports: ["import { DsDrawer } from '@drivenets/design-system';"],
17
+ id: 'ds-drawer-footer',
18
+ metadata: { nestable: true },
19
+ } satisfies figma.Template;
@@ -0,0 +1,16 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=31416-38215
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-drawer
3
+ // component=DsDrawer.Header
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const titleNode = instance.findText('left side', { traverseInstances: true });
9
+ const title = titleNode.type === 'TEXT' ? titleNode.textContent : 'Drawer title';
10
+
11
+ export default {
12
+ example: figma.code`<DsDrawer.Header><DsDrawer.Title>${title}</DsDrawer.Title><DsDrawer.CloseTrigger /></DsDrawer.Header>`,
13
+ imports: ["import { DsDrawer } from '@drivenets/design-system';"],
14
+ id: 'ds-drawer-header',
15
+ metadata: { nestable: true },
16
+ } satisfies figma.Template;
@@ -0,0 +1,36 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=31945-54500
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-drawer
3
+ // component=DsDrawer
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const header = instance.findInstance('DAP_drawer-in-header_v02', { traverseInstances: true });
9
+ let headerCode: figma.ResultSection[] | undefined;
10
+ if (header.type === 'INSTANCE') {
11
+ headerCode = header.executeTemplate().example;
12
+ }
13
+
14
+ const content = instance.findInstance('DAP_drawer-content_v02', { traverseInstances: true });
15
+ let contentCode: figma.ResultSection[] | undefined;
16
+ if (content.type === 'INSTANCE') {
17
+ contentCode = content.executeTemplate().example;
18
+ }
19
+
20
+ // The footer instance is named `sheet-footer` inside the assembled drawer but the
21
+ // standalone part is `DAP_drawer-in-footer_v02`; try both so the footer resolves.
22
+ let footer = instance.findInstance('DAP_drawer-in-footer_v02', { traverseInstances: true });
23
+ if (footer.type !== 'INSTANCE') {
24
+ footer = instance.findInstance('sheet-footer', { traverseInstances: true });
25
+ }
26
+ let footerCode: figma.ResultSection[] | undefined;
27
+ if (footer.type === 'INSTANCE') {
28
+ footerCode = footer.executeTemplate().example;
29
+ }
30
+
31
+ export default {
32
+ example: figma.code`<DsDrawer open columns={4} onOpenChange={() => {}}>${headerCode}${contentCode}${footerCode}</DsDrawer>`,
33
+ imports: ["import { DsDrawer } from '@drivenets/design-system';"],
34
+ id: 'ds-drawer',
35
+ metadata: { nestable: false },
36
+ } satisfies figma.Template;
@@ -17,7 +17,8 @@
17
17
  display: none;
18
18
  }
19
19
 
20
- &[data-nested='menu'] {
20
+ &[data-side='right'],
21
+ &[data-side='left'] {
21
22
  margin-top: -1px;
22
23
  z-index: 10000;
23
24
  }
@@ -83,12 +84,20 @@
83
84
  bottom: -1px;
84
85
  z-index: 1;
85
86
  display: flex;
87
+ border-top: 1px solid var(--border-secondary);
88
+ background-color: var(--background);
89
+ }
90
+
91
+ .actionsRow {
86
92
  align-items: center;
87
93
  justify-content: flex-end;
88
94
  gap: var(--xs);
89
95
  padding: var(--3xs) var(--xs);
90
- border-top: 1px solid var(--border-secondary);
91
- background-color: var(--background);
96
+ }
97
+
98
+ .actionsStretch {
99
+ flex-direction: column;
100
+ padding: var(--3xs);
92
101
  }
93
102
 
94
103
  .groupLabel {
@@ -35,9 +35,11 @@ interface GroupContextValue {
35
35
 
36
36
  const GroupContext = createContext<GroupContextValue | null>(null);
37
37
 
38
+ const MENU_GUTTER = 4;
39
+
38
40
  const DEFAULT_POSITIONING: DsDropdownMenuPositioning = {
39
41
  placement: 'bottom-start' as const,
40
- gutter: 4,
42
+ gutter: MENU_GUTTER,
41
43
  };
42
44
 
43
45
  /**
@@ -158,15 +160,18 @@ const Header: React.FC<DsDropdownMenuHeaderProps> = ({ children, className, styl
158
160
  };
159
161
 
160
162
  /**
161
- * Actions component - footer container for action buttons
163
+ * Actions component - sticky bottom slot for action buttons (`align="end"`) or
164
+ * full-width elements like a logout item (`align="stretch"`).
162
165
  */
163
- const Actions: React.FC<DsDropdownMenuActionsProps> = ({ children, className, style }) => {
166
+ const Actions: React.FC<DsDropdownMenuActionsProps> = ({ children, align = 'end', className, style }) => {
164
167
  return (
165
168
  <div
166
- className={classNames(styles.actions, className)}
169
+ className={classNames(
170
+ styles.actions,
171
+ align === 'stretch' ? styles.actionsStretch : styles.actionsRow,
172
+ className,
173
+ )}
167
174
  style={style}
168
- role="menu"
169
- aria-label="Menu actions"
170
175
  >
171
176
  {children}
172
177
  </div>
@@ -414,3 +419,16 @@ export const DsDropdownMenu = {
414
419
  ItemGroupContent,
415
420
  Separator,
416
421
  };
422
+ DsDropdownMenu.Root.displayName = 'DsDropdownMenu.Root';
423
+ DsDropdownMenu.Trigger.displayName = 'DsDropdownMenu.Trigger';
424
+ DsDropdownMenu.Content.displayName = 'DsDropdownMenu.Content';
425
+ DsDropdownMenu.Item.displayName = 'DsDropdownMenu.Item';
426
+ DsDropdownMenu.ItemIndicator.displayName = 'DsDropdownMenu.ItemIndicator';
427
+ DsDropdownMenu.TriggerItem.displayName = 'DsDropdownMenu.TriggerItem';
428
+ DsDropdownMenu.Header.displayName = 'DsDropdownMenu.Header';
429
+ DsDropdownMenu.Actions.displayName = 'DsDropdownMenu.Actions';
430
+ DsDropdownMenu.ItemGroup.displayName = 'DsDropdownMenu.ItemGroup';
431
+ DsDropdownMenu.ItemGroupLabel.displayName = 'DsDropdownMenu.ItemGroupLabel';
432
+ DsDropdownMenu.ItemGroupContent.displayName = 'DsDropdownMenu.ItemGroupContent';
433
+ DsDropdownMenu.Separator.displayName = 'DsDropdownMenu.Separator';
434
+ DsDropdownMenuLegacy.displayName = 'DsDropdownMenuLegacy';
@@ -5,6 +5,9 @@ import type { IconType } from '../ds-icon';
5
5
  export const dropdownMenuItemVariants = ['default', 'error'] as const;
6
6
  export type DropdownMenuItemVariant = (typeof dropdownMenuItemVariants)[number];
7
7
 
8
+ export const dropdownMenuActionsAlignments = ['end', 'stretch'] as const;
9
+ export type DropdownMenuActionsAlign = (typeof dropdownMenuActionsAlignments)[number];
10
+
8
11
  /**
9
12
  * Base positioning type
10
13
  */
@@ -242,9 +245,15 @@ export interface DsDropdownMenuHeaderProps {
242
245
  */
243
246
  export interface DsDropdownMenuActionsProps {
244
247
  /**
245
- * The action buttons or elements
248
+ * The action buttons or full-width elements pinned to the bottom of the menu.
246
249
  */
247
250
  children: ReactNode;
251
+ /**
252
+ * How children are laid out. `end` is a right-aligned button row (e.g.
253
+ * Cancel/Apply); `stretch` stacks full-width children (e.g. a logout item).
254
+ * @default 'end'
255
+ */
256
+ align?: DropdownMenuActionsAlign;
248
257
  /**
249
258
  * Optional CSS class name
250
259
  */
@@ -0,0 +1,11 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=35299-7214
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-dropdown-menu
3
+ // component=DsDropdownMenu.Actions
4
+ import figma from 'figma';
5
+
6
+ export default {
7
+ example: figma.code`<DsDropdownMenu.Actions>{/* action buttons */}</DsDropdownMenu.Actions>`,
8
+ imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
9
+ id: 'ds-dropdown-menu-footer',
10
+ metadata: { nestable: true },
11
+ } satisfies figma.Template;
@@ -0,0 +1,23 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=13761-206276
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-dropdown-menu
3
+ // component=DsDropdownMenu.ItemGroup
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const collapsed = instance.getEnum('Type', { Expanded: false, Collapsed: true });
9
+
10
+ const labelNode = instance.findText('Menu text', { traverseInstances: true });
11
+ const label = labelNode.type === 'TEXT' ? labelNode.textContent : 'Group name';
12
+
13
+ const collapsedAttr = collapsed ? ' collapsed' : '';
14
+
15
+ export default {
16
+ example: figma.code`<DsDropdownMenu.ItemGroup${collapsedAttr}>
17
+ <DsDropdownMenu.ItemGroupLabel>${label}</DsDropdownMenu.ItemGroupLabel>
18
+ <DsDropdownMenu.ItemGroupContent>{/* group items */}</DsDropdownMenu.ItemGroupContent>
19
+ </DsDropdownMenu.ItemGroup>`,
20
+ imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
21
+ id: 'ds-dropdown-menu-group',
22
+ metadata: { nestable: true },
23
+ } satisfies figma.Template;
@@ -0,0 +1,29 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=35298-162404
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-dropdown-menu
3
+ // component=DsDropdownMenu.Item
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const type = instance.getEnum('type', {
9
+ default: 'default',
10
+ checkbox: 'checkbox',
11
+ radio: 'radio',
12
+ error: 'error',
13
+ });
14
+
15
+ const selected = instance.getEnum('selected', { true: true, false: false });
16
+
17
+ const labelNode = instance.findText('Menu text', { traverseInstances: true });
18
+ const label = labelNode.type === 'TEXT' ? labelNode.textContent : 'Menu item';
19
+
20
+ const variantAttr = type === 'error' ? ' variant="error"' : '';
21
+ const selectedAttr = selected ? ' selected' : '';
22
+ const indicator = type === 'checkbox' || type === 'radio' ? '<DsDropdownMenu.ItemIndicator />' : '';
23
+
24
+ export default {
25
+ example: figma.code`<DsDropdownMenu.Item value="item"${variantAttr}${selectedAttr}>${label}${indicator}</DsDropdownMenu.Item>`,
26
+ imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
27
+ id: 'ds-dropdown-menu-item',
28
+ metadata: { nestable: true },
29
+ } satisfies figma.Template;
@@ -0,0 +1,11 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=13683-206080
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-dropdown-menu
3
+ // component=DsDropdownMenu.Separator
4
+ import figma from 'figma';
5
+
6
+ export default {
7
+ example: figma.code`<DsDropdownMenu.Separator />`,
8
+ imports: ["import { DsDropdownMenu } from '@drivenets/design-system';"],
9
+ id: 'ds-dropdown-menu-separator',
10
+ metadata: { nestable: true },
11
+ } satisfies figma.Template;