@drivenets/design-system 0.14.0 → 0.16.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 (193) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/dist/index.cjs +1239 -262
  4. package/dist/index.d.cts +904 -1169
  5. package/dist/index.d.cts.map +1 -1
  6. package/dist/index.d.ts +904 -1169
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1221 -258
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.min.css +1 -1
  11. package/package.json +15 -12
  12. package/src/components/ds-alert-banner/ds-alert-banner.tsx +11 -2
  13. package/src/components/ds-autocomplete/ds-autocomplete.figma.ts +36 -0
  14. package/src/components/ds-autocomplete/ds-autocomplete.tsx +2 -0
  15. package/src/components/ds-avatar/ds-avatar.figma.ts +30 -0
  16. package/src/components/ds-avatar/ds-avatar.tsx +6 -1
  17. package/src/components/ds-avatar/ds-avatar.types.ts +5 -2
  18. package/src/components/ds-avatar-group/ds-avatar-group.figma.ts +27 -0
  19. package/src/components/ds-avatar-group/ds-avatar-group.tsx +6 -1
  20. package/src/components/ds-avatar-group/ds-avatar-group.types.ts +3 -1
  21. package/src/components/ds-breadcrumb/ds-breadcrumb.figma.ts +19 -0
  22. package/src/components/ds-breadcrumb/ds-breadcrumb.tsx +2 -0
  23. package/src/components/ds-button/ds-button.tsx +2 -0
  24. package/src/components/ds-button-v3/ds-button-v3.figma.ts +1 -1
  25. package/src/components/ds-button-v3/ds-button-v3.tsx +6 -0
  26. package/src/components/ds-button-v3/index.ts +2 -0
  27. package/src/components/ds-card/ds-card.tsx +7 -3
  28. package/src/components/ds-catalog-layout/ds-catalog-layout.tsx +8 -0
  29. package/src/components/ds-checkbox/ds-checkbox-level-2.figma.ts +40 -0
  30. package/src/components/ds-checkbox/ds-checkbox.figma.ts +45 -0
  31. package/src/components/ds-checkbox/ds-checkbox.module.scss +1 -1
  32. package/src/components/ds-checkbox/ds-checkbox.tsx +9 -1
  33. package/src/components/ds-checkbox-group/ds-checkbox-group.figma.ts +15 -0
  34. package/src/components/ds-checkbox-group/ds-checkbox-group.tsx +2 -0
  35. package/src/components/ds-chip/ds-chip.tsx +2 -0
  36. package/src/components/ds-chip-group/ds-chip-group.tsx +2 -0
  37. package/src/components/ds-comment-bubble/components/ds-comment-thread/ds-comment-thread.tsx +1 -0
  38. package/src/components/ds-comment-bubble/components/ds-thread-item/ds-thread-item.tsx +1 -0
  39. package/src/components/ds-comment-bubble/ds-comment-bubble.tsx +1 -0
  40. package/src/components/ds-comment-card/ds-comment-card.tsx +1 -0
  41. package/src/components/ds-comment-indicator/ds-comment-indicator.tsx +1 -0
  42. package/src/components/ds-comments-drawer/ds-comments-drawer.tsx +1 -0
  43. package/src/components/ds-confirmation/ds-confirmation.tsx +1 -0
  44. package/src/components/ds-date-input/ds-date-input.tsx +2 -0
  45. package/src/components/ds-date-picker/ds-date-picker.tsx +9 -0
  46. package/src/components/ds-date-picker/ds-date-picker.types.ts +1 -1
  47. package/src/components/ds-date-range-picker/ds-date-range-picker.tsx +2 -0
  48. package/src/components/ds-dialog/ds-dialog.tsx +9 -0
  49. package/src/components/ds-dialog/ds-dialog.types.ts +1 -1
  50. package/src/components/ds-divider/ds-divider.figma.ts +19 -0
  51. package/src/components/ds-divider/ds-divider.tsx +2 -0
  52. package/src/components/ds-drawer/ds-drawer.module.scss +14 -0
  53. package/src/components/ds-drawer/ds-drawer.tsx +30 -1
  54. package/src/components/ds-drawer/ds-drawer.types.ts +7 -0
  55. package/src/components/ds-drawer/figma/ds-drawer-content.figma.ts +15 -0
  56. package/src/components/ds-drawer/figma/ds-drawer-footer.figma.ts +19 -0
  57. package/src/components/ds-drawer/figma/ds-drawer-header.figma.ts +16 -0
  58. package/src/components/ds-drawer/figma/ds-drawer.figma.ts +36 -0
  59. package/src/components/ds-dropdown-menu/ds-dropdown-menu.module.scss +12 -3
  60. package/src/components/ds-dropdown-menu/ds-dropdown-menu.tsx +24 -6
  61. package/src/components/ds-dropdown-menu/ds-dropdown-menu.types.ts +10 -1
  62. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-footer.figma.ts +11 -0
  63. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-group.figma.ts +23 -0
  64. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-item.figma.ts +29 -0
  65. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu-separator.figma.ts +11 -0
  66. package/src/components/ds-dropdown-menu/figma/ds-dropdown-menu.figma.ts +24 -0
  67. package/src/components/ds-expandable-text-input/ds-expandable-text-input.figma.ts +24 -0
  68. package/src/components/ds-expandable-text-input/ds-expandable-text-input.tsx +1 -0
  69. package/src/components/ds-file-upload/ds-file-upload.figma.ts +29 -0
  70. package/src/components/ds-file-upload/ds-file-upload.tsx +2 -0
  71. package/src/components/ds-file-upload/hooks/use-file-upload.ts +7 -0
  72. package/src/components/ds-filter-status-icon/ds-filter-status-icon.figma.ts +22 -0
  73. package/src/components/ds-filter-status-icon/ds-filter-status-icon.tsx +1 -0
  74. package/src/components/ds-form-control/ds-form-control.tsx +3 -0
  75. package/src/components/ds-grid/index.ts +3 -0
  76. package/src/components/ds-icon/ds-icon.tsx +2 -0
  77. package/src/components/ds-key-value-pair/ds-key-value-pair.figma.ts +24 -0
  78. package/src/components/ds-key-value-pair/ds-key-value-pair.tsx +2 -0
  79. package/src/components/ds-loader/ds-loader.figma.ts +11 -0
  80. package/src/components/ds-loader/ds-loader.tsx +2 -0
  81. package/src/components/ds-modal/ds-modal.tsx +9 -0
  82. package/src/components/ds-number-input/ds-number-input.tsx +2 -0
  83. package/src/components/ds-panel/ds-panel.figma.ts +16 -0
  84. package/src/components/ds-panel/index.ts +2 -0
  85. package/src/components/ds-password-input/ds-password-input.tsx +2 -0
  86. package/src/components/ds-popover/ds-popover.tsx +9 -0
  87. package/src/components/ds-popover/figma/ds-popover-content-item.figma.ts +18 -0
  88. package/src/components/ds-popover/figma/ds-popover-content.figma.ts +15 -0
  89. package/src/components/ds-popover/figma/ds-popover-footer.figma.ts +19 -0
  90. package/src/components/ds-popover/figma/ds-popover-header.figma.ts +16 -0
  91. package/src/components/ds-popover/figma/ds-popover.figma.ts +34 -0
  92. package/src/components/ds-progress-arc/ds-progress-arc.figma.ts +23 -0
  93. package/src/components/ds-progress-arc/ds-progress-arc.tsx +2 -0
  94. package/src/components/ds-progress-donut/ds-progress-donut.figma.ts +45 -0
  95. package/src/components/ds-progress-donut/ds-progress-donut.tsx +2 -0
  96. package/src/components/ds-progress-linear/ds-progress-linear.figma.ts +26 -0
  97. package/src/components/ds-progress-linear/ds-progress-linear.tsx +2 -0
  98. package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +29 -0
  99. package/src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss +39 -0
  100. package/src/components/ds-progress-task-bar/ds-progress-task-bar.tsx +124 -0
  101. package/src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts +65 -0
  102. package/src/components/ds-progress-task-bar/index.ts +2 -0
  103. package/src/components/ds-progress-task-bar/utils.ts +51 -0
  104. package/src/components/ds-radio-group/ds-radio-group.tsx +3 -0
  105. package/src/components/ds-radio-group/figma/ds-radio-group-item.figma.ts +24 -0
  106. package/src/components/ds-radio-group/figma/ds-radio-group.figma.ts +14 -0
  107. package/src/components/ds-segment-group/ds-segment-group.tsx +3 -0
  108. package/src/components/ds-segment-group/figma/ds-segment-group-item.figma.ts +25 -0
  109. package/src/components/ds-segment-group/figma/ds-segment-group.figma.ts +23 -0
  110. package/src/components/ds-select/ds-select.tsx +2 -0
  111. package/src/components/ds-site-node/ds-site-node.figma.ts +27 -0
  112. package/src/components/ds-site-node/ds-site-node.module.scss +59 -0
  113. package/src/components/ds-site-node/ds-site-node.tsx +73 -0
  114. package/src/components/ds-site-node/ds-site-node.types.ts +36 -0
  115. package/src/components/ds-site-node/hooks/use-is-overflowing.ts +31 -0
  116. package/src/components/ds-site-node/index.ts +3 -0
  117. package/src/components/ds-skeleton/ds-skeleton-circle.tsx +2 -0
  118. package/src/components/ds-skeleton/ds-skeleton-rect.tsx +2 -0
  119. package/src/components/ds-skeleton/ds-skeleton-text.tsx +2 -0
  120. package/src/components/ds-skeleton/ds-skeleton.ts +7 -1
  121. package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +4 -0
  122. package/src/components/ds-spinner/ds-spinner.figma.ts +19 -0
  123. package/src/components/ds-spinner/ds-spinner.tsx +2 -0
  124. package/src/components/ds-split-button/ds-split-button.tsx +6 -0
  125. package/src/components/ds-status-badge/ds-status-badge.tsx +2 -0
  126. package/src/components/ds-status-badge-v2/index.ts +2 -0
  127. package/src/components/ds-stepper/components/ds-step-content.tsx +2 -0
  128. package/src/components/ds-stepper/components/ds-step-next-button.tsx +2 -0
  129. package/src/components/ds-stepper/components/ds-step.tsx +2 -0
  130. package/src/components/ds-stepper/ds-stepper.figma.ts +38 -0
  131. package/src/components/ds-stepper/ds-stepper.tsx +1 -0
  132. package/src/components/ds-system-status/ds-system-status.tsx +2 -0
  133. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +1 -1
  134. package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +2 -0
  135. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +1 -1
  136. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +2 -0
  137. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-checkbox.tsx +1 -0
  138. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-date.tsx +1 -0
  139. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-number.tsx +1 -0
  140. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-select.tsx +1 -0
  141. package/src/components/ds-table/components/edit/cell-editors/ds-table-edit-cell-text.tsx +1 -0
  142. package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss +14 -2
  143. package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.tsx +20 -0
  144. package/src/components/ds-table/components/edit/ds-table-editing-cell/ds-table-editing-cell.tsx +1 -0
  145. package/src/components/ds-table/ds-table-column.types.ts +24 -0
  146. package/src/components/ds-table/ds-table.tsx +30 -4
  147. package/src/components/ds-table/ds-table.types.ts +7 -0
  148. package/src/components/ds-table/index.ts +4 -0
  149. package/src/components/ds-table/utils/constants.ts +5 -0
  150. package/src/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.tsx +2 -0
  151. package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.tsx +2 -0
  152. package/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.tsx +2 -0
  153. package/src/components/ds-tabs/ds-tabs.tsx +2 -0
  154. package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +78 -0
  155. package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +89 -0
  156. package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +31 -0
  157. package/src/components/ds-tabs/figma/ds-tabs.figma.ts +29 -0
  158. package/src/components/ds-tag/ds-tag.tsx +2 -0
  159. package/src/components/ds-tag-filter/ds-tag-filter.tsx +2 -0
  160. package/src/components/ds-text-input/ds-input-field-v02.figma.ts +87 -0
  161. package/src/components/ds-text-input/ds-text-input.tsx +2 -0
  162. package/src/components/ds-textarea/ds-textarea.tsx +2 -0
  163. package/src/components/ds-time-picker/ds-time-picker.tsx +2 -0
  164. package/src/components/ds-toast/ds-toast-context.tsx +1 -0
  165. package/src/components/ds-toast/ds-toast.figma.ts +34 -0
  166. package/src/components/ds-toast/ds-toast.tsx +3 -0
  167. package/src/components/ds-toggle/ds-toggle.figma.ts +39 -0
  168. package/src/components/ds-toggle/ds-toggle.tsx +2 -0
  169. package/src/components/ds-tooltip/ds-tooltip.figma.ts +16 -0
  170. package/src/components/ds-tooltip/ds-tooltip.module.scss +8 -1
  171. package/src/components/ds-tooltip/ds-tooltip.tsx +35 -15
  172. package/src/components/ds-tooltip/ds-tooltip.types.ts +40 -0
  173. package/src/components/ds-tree/ds-tree.tsx +16 -0
  174. package/src/components/ds-typography/ds-typography.config.ts +1 -1
  175. package/src/components/ds-typography/ds-typography.figma.ts +63 -0
  176. package/src/components/ds-typography/ds-typography.module.scss +16 -0
  177. package/src/components/ds-typography/ds-typography.tsx +64 -7
  178. package/src/components/ds-typography/ds-typography.types.ts +13 -0
  179. package/src/components/ds-typography/hooks/use-truncation.ts +151 -0
  180. package/src/components/ds-user-card/ds-user-card.figma.ts +16 -0
  181. package/src/components/ds-user-card/ds-user-card.module.scss +25 -0
  182. package/src/components/ds-user-card/ds-user-card.tsx +31 -0
  183. package/src/components/ds-user-card/ds-user-card.types.ts +26 -0
  184. package/src/components/ds-user-card/index.ts +2 -0
  185. package/src/components/ds-vertical-tabs/ds-vertical-tabs.tsx +6 -0
  186. package/src/components/ds-workspace-layout/ds-workspace-layout.tsx +10 -0
  187. package/src/index.ts +3 -0
  188. package/src/styles/_root.scss +468 -363
  189. package/src/styles/shared/_dropdown.scss +2 -2
  190. package/src/styles/styles.scss +0 -3
  191. package/src/styles/_colors.scss +0 -65
  192. package/src/styles/_root_new.scss +0 -451
  193. package/src/styles/_spacing.scss +0 -47
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drivenets/design-system",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.cts",
@@ -44,7 +44,6 @@
44
44
  "@radix-ui/react-collapsible": "^1.1.13",
45
45
  "@radix-ui/react-dialog": "^1.1.16",
46
46
  "@radix-ui/react-dropdown-menu": "^2.1.17",
47
- "@radix-ui/react-tooltip": "^1.2.9",
48
47
  "@radix-ui/react-visually-hidden": "^1.2.5",
49
48
  "@tanstack/react-table": "^8.21.3",
50
49
  "@tanstack/react-virtual": "^3.14.2",
@@ -64,6 +63,7 @@
64
63
  "@eslint/compat": "^2.1.0",
65
64
  "@faker-js/faker": "^10.3.0",
66
65
  "@figma/code-connect": "^1.4.8",
66
+ "@github-ui/storybook-addon-performance-panel": "^1.1.4",
67
67
  "@hookform/resolvers": "^5.4.0",
68
68
  "@rolldown/plugin-babel": "^0.2.3",
69
69
  "@storybook/addon-a11y": "^10.4.1",
@@ -73,14 +73,15 @@
73
73
  "@storybook/react-vite": "^10.4.1",
74
74
  "@tanstack/react-query": "^5.100.14",
75
75
  "@tanstack/react-router": "^1.170.8",
76
- "@tsdown/css": "^0.22.0",
76
+ "@tsdown/css": "^0.22.12",
77
77
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
78
78
  "@types/react": "^19.2.15",
79
79
  "@types/react-dom": "^19.2.3",
80
- "@typescript/native-preview": "7.0.0-dev.20260521.1",
80
+ "@types/serve-handler": "^6.1.4",
81
+ "@typescript/native": "npm:typescript@^7.0.2",
81
82
  "@vitejs/plugin-react": "^6.0.2",
82
- "@vitest/browser-playwright": "^4.1.7",
83
- "@vitest/coverage-v8": "^4.1.7",
83
+ "@vitest/browser-playwright": "^4.1.10",
84
+ "@vitest/coverage-v8": "^4.1.10",
84
85
  "babel-plugin-react-compiler": "^1.0.0",
85
86
  "eslint": "^10.0.1",
86
87
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -95,17 +96,18 @@
95
96
  "react-hook-form": "^7.76.1",
96
97
  "remark-gfm": "^4.0.1",
97
98
  "sass-embedded": "^1.100.0",
99
+ "serve-handler": "^6.1.7",
98
100
  "storybook": "^10.4.1",
99
- "tsdown": "^0.22.0",
101
+ "tsdown": "^0.22.12",
100
102
  "typed-scss-modules": "^8.1.1",
101
- "typescript": "^6.0.3",
103
+ "typescript": "npm:@typescript/typescript6",
102
104
  "typescript-plugin-css-modules": "^5.2.0",
103
105
  "vite": "8.0.14",
104
- "vitest": "^4.1.7",
106
+ "vitest": "^4.1.10",
105
107
  "vitest-browser-react": "^2.1.0",
106
108
  "zod": "^4.4.3",
107
109
  "@drivenets/eslint-plugin-internal": "0.0.0",
108
- "@drivenets/vite-plugin-design-system": "0.0.9"
110
+ "@drivenets/vite-plugin-design-system": "0.0.10"
109
111
  },
110
112
  "scripts": {
111
113
  "start": "storybook dev -p 6006",
@@ -114,15 +116,16 @@
114
116
  "//": "ESLINT_ARGS is used to pass arguments to eslint. We're using it so we don't need to duplicate the lint script.",
115
117
  "lint:fix": "ESLINT_ARGS=--fix pnpm lint",
116
118
  "lint:build": "publint && attw --pack",
117
- "typecheck": "pnpm generate-scss-dts && tsgo; EXIT_CODE=$?; rm -rf .scss-dts; exit $EXIT_CODE",
119
+ "typecheck": "pnpm generate-scss-dts && tsc; EXIT_CODE=$?; rm -rf .scss-dts; exit $EXIT_CODE",
118
120
  "generate-scss-dts": "typed-scss-modules ./src -o ./.scss-dts --nameFormat all --exportType default > /dev/null 2>&1",
119
121
  "figma:lint": "figma connect parse --exit-on-unreadable-files",
120
122
  "figma:publish": "figma connect publish --exit-on-unreadable-files",
121
- "test": "vitest --project=\"!requires-build\"",
123
+ "test": "vitest --project=unit --project=browser --project=storybook",
122
124
  "test:coverage": "pnpm test --coverage",
123
125
  "test:unit": "vitest --project=unit",
124
126
  "test:browser": "vitest --project=browser",
125
127
  "test:requires-build": "vitest --project=requires-build",
128
+ "test:storybook-docs": "vitest --project=storybook-docs",
126
129
  "build": "tsdown",
127
130
  "build:watch": "pnpm build --watch",
128
131
  "build:storybook": "storybook build"
@@ -6,8 +6,11 @@ import { DsIcon } from '../ds-icon';
6
6
  import { DsTypography } from '../ds-typography';
7
7
 
8
8
  /**
9
- * Design system AlertBanner component
10
- * Controlled component that displays alert messages with different variants
9
+ * @summary Controlled banner for surfacing contextual status messages.
10
+ *
11
+ * Renders as an inline bordered card or a full-width global bar, with five
12
+ * severity variants, an optional icon, and an optional close button. Compose the
13
+ * content with `DsAlertBanner.Title`, `DsAlertBanner.Body`, and `DsAlertBanner.Actions`.
11
14
  */
12
15
  const DsAlertBanner = ({
13
16
  open,
@@ -108,8 +111,14 @@ const Actions = ({
108
111
  </div>
109
112
  );
110
113
 
114
+ Title.displayName = 'DsAlertBanner.Title';
115
+ Body.displayName = 'DsAlertBanner.Body';
116
+ Actions.displayName = 'DsAlertBanner.Actions';
117
+
111
118
  DsAlertBanner.Title = Title;
112
119
  DsAlertBanner.Body = Body;
113
120
  DsAlertBanner.Actions = Actions;
114
121
 
122
+ DsAlertBanner.displayName = 'DsAlertBanner';
123
+
115
124
  export default DsAlertBanner;
@@ -0,0 +1,36 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=14824-7324
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-autocomplete
3
+ // component=DsAutocomplete
4
+ import figma from 'figma';
5
+
6
+ const instance = figma.selectedInstance;
7
+
8
+ const state = instance.getEnum('State', {
9
+ Default: 'default',
10
+ Hover: 'hover',
11
+ Focus: 'focus',
12
+ Disable: 'disable',
13
+ Error: 'error',
14
+ 'read only': 'readOnly',
15
+ });
16
+
17
+ const comboBox = instance.getEnum('Combo box', {
18
+ ON: 'on',
19
+ OFF: 'off',
20
+ });
21
+
22
+ const attrs = [
23
+ 'options={[]}',
24
+ comboBox === 'off' ? 'showTrigger={false}' : '',
25
+ state === 'disable' ? 'disabled' : '',
26
+ state === 'error' ? 'invalid' : '',
27
+ ]
28
+ .filter(Boolean)
29
+ .join(' ');
30
+
31
+ export default {
32
+ example: figma.code`<DsAutocomplete ${attrs} />`,
33
+ imports: ["import { DsAutocomplete } from '@drivenets/design-system'"],
34
+ id: 'ds-autocomplete',
35
+ metadata: { nestable: true },
36
+ };
@@ -140,3 +140,5 @@ export const DsAutocomplete = ({
140
140
  </Combobox.Root>
141
141
  );
142
142
  };
143
+
144
+ DsAutocomplete.displayName = 'DsAutocomplete';
@@ -0,0 +1,30 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=14860-11893
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-avatar
3
+ // component=DsAvatar
4
+ //
5
+ // `Size` and `Type` map to the code props. Figma's boolean `Placeholder` variant has no
6
+ // code equivalent — initials-vs-photo is automatic (required `name` drives initials, an
7
+ // optional `src` drives the photo) — so it is ignored. `name` is content, not derivable
8
+ // from Figma, so it is emitted as a placeholder (see `ds-user-card.figma.ts`).
9
+ import figma from 'figma';
10
+
11
+ const instance = figma.selectedInstance;
12
+
13
+ const size =
14
+ instance.getEnum('Size', {
15
+ 'XSM - 18': 'xsm',
16
+ 'SM - 24': 'sm',
17
+ 'Regular - 32': 'regular',
18
+ 'MD - 48': 'md',
19
+ 'LG - 80': 'lg',
20
+ 'XL - 144': 'xl',
21
+ }) ?? 'regular';
22
+
23
+ const type = instance.getEnum('Type', { Circle: 'circle', Rounded: 'rounded' }) ?? 'circle';
24
+
25
+ export default {
26
+ example: figma.code`<DsAvatar name="Full Name" size="${size}" type="${type}" />`,
27
+ imports: ["import { DsAvatar } from '@drivenets/design-system'"],
28
+ id: 'ds-avatar',
29
+ metadata: { nestable: true },
30
+ };
@@ -6,7 +6,11 @@ import type { DsAvatarProps } from './ds-avatar.types';
6
6
  import { DsTooltip } from '../ds-tooltip';
7
7
 
8
8
  /**
9
- * DsAvatar component for displaying user profile pictures or initials
9
+ * @summary Displays a user's profile picture, falling back to initials.
10
+ *
11
+ * Renders a circular or rounded avatar from an image `src`. When the image is
12
+ * missing or fails to load, the trimmed initials derived from `name` are shown
13
+ * instead, and `name` is surfaced in a tooltip on hover.
10
14
  */
11
15
  export const DsAvatar: FC<DsAvatarProps> = ({
12
16
  src,
@@ -40,3 +44,4 @@ export const DsAvatar: FC<DsAvatarProps> = ({
40
44
  </DsTooltip>
41
45
  );
42
46
  };
47
+ DsAvatar.displayName = 'DsAvatar';
@@ -1,7 +1,10 @@
1
1
  import type { CSSProperties } from 'react';
2
2
 
3
- export type DsAvatarSize = 'xsm' | 'sm' | 'regular' | 'md' | 'lg' | 'xl';
4
- export type DsAvatarType = 'circle' | 'rounded';
3
+ export const dsAvatarSizes = ['xsm', 'sm', 'regular', 'md', 'lg', 'xl'] as const;
4
+ export const dsAvatarTypes = ['circle', 'rounded'] as const;
5
+
6
+ export type DsAvatarSize = (typeof dsAvatarSizes)[number];
7
+ export type DsAvatarType = (typeof dsAvatarTypes)[number];
5
8
 
6
9
  export interface DsAvatarProps {
7
10
  /**
@@ -0,0 +1,27 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=14870-20161
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-avatar-group
3
+ // component=DsAvatarGroup
4
+ //
5
+ // `Size` maps to the code prop (note the key is `XS - 18`, unlike `ds-avatar`'s `XSM - 18`).
6
+ // `avatars` is a required data array, not derivable from Figma, so it is emitted as an empty
7
+ // placeholder for the developer to fill in (see `ds-select.figma.ts`). The Figma set only
8
+ // models `type=circle` (code also supports `rounded`) and does not expose `max`, so neither
9
+ // is mapped.
10
+ import figma from 'figma';
11
+
12
+ const instance = figma.selectedInstance;
13
+
14
+ const size =
15
+ instance.getEnum('Size', {
16
+ 'XS - 18': 'xsm',
17
+ 'SM - 24': 'sm',
18
+ 'Regular - 32': 'regular',
19
+ 'MD - 48': 'md',
20
+ }) ?? 'regular';
21
+
22
+ export default {
23
+ example: figma.code`<DsAvatarGroup avatars={[]} size="${size}" />`,
24
+ imports: ["import { DsAvatarGroup } from '@drivenets/design-system'"],
25
+ id: 'ds-avatar-group',
26
+ metadata: { nestable: true },
27
+ };
@@ -7,7 +7,11 @@ import { DsTooltip } from '../ds-tooltip';
7
7
  import { DsTypography } from '../ds-typography';
8
8
 
9
9
  /**
10
- * DsAvatarGroup component for displaying a list of avatars with overlap
10
+ * @summary Overlapping avatars with overflow collapse and tooltip.
11
+ *
12
+ * Renders a row of {@link DsAvatar} members that share `size` and `type`. When
13
+ * `avatars.length` exceeds `max`, the remainder collapse behind a `+N`
14
+ * indicator; hovering it lists the hidden names in a tooltip.
11
15
  */
12
16
  export const DsAvatarGroup: FC<DsAvatarGroupProps> = ({
13
17
  avatars,
@@ -49,3 +53,4 @@ export const DsAvatarGroup: FC<DsAvatarGroupProps> = ({
49
53
  </div>
50
54
  );
51
55
  };
56
+ DsAvatarGroup.displayName = 'DsAvatarGroup';
@@ -2,7 +2,9 @@ import type { DsAvatarProps, DsAvatarSize, DsAvatarType } from '../ds-avatar';
2
2
 
3
3
  export interface DsAvatarGroupProps {
4
4
  /**
5
- * Array of avatar items
5
+ * Avatar items to display. Each item accepts `DsAvatar` props except `size`
6
+ * and `type`, which are set on the group. `name` is required; `src` and `alt`
7
+ * are optional — without `src`, initials are shown per `DsAvatar`.
6
8
  */
7
9
  avatars: Omit<DsAvatarProps, 'size' | 'type'>[];
8
10
  /**
@@ -0,0 +1,19 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=15015-2480
2
+ // source=https://github.com/drivenets/design-system/tree/main/packages/design-system/src/components/ds-breadcrumb
3
+ // component=DsBreadcrumb
4
+ //
5
+ // `DAP_Breadcrumbs-nav_v01` maps to `DsBreadcrumb`. Its `steps`/`icons`/`back` variants do
6
+ // not map to props: the trail is built from a single `items` array (Figma's fixed
7
+ // `steps=1..7` variants only exist because a component can't repeat an array), the per-item
8
+ // icon lives in each `items` entry, and there is no back-navigation feature in code. `items`
9
+ // is required data, so it is emitted as an empty placeholder (see `ds-select.figma.ts`). The
10
+ // single-crumb atom `DAP_Breadcrumbs-item_v01` has no public export and is intentionally not
11
+ // connected.
12
+ import figma from 'figma';
13
+
14
+ export default {
15
+ example: figma.code`<DsBreadcrumb items={[]} />`,
16
+ imports: ["import { DsBreadcrumb } from '@drivenets/design-system'"],
17
+ id: 'ds-breadcrumb',
18
+ metadata: { nestable: true },
19
+ };
@@ -91,4 +91,6 @@ const DsBreadcrumb: React.FC<DsBreadcrumbProps> = ({ items, onSelect, className
91
91
  );
92
92
  };
93
93
 
94
+ DsBreadcrumb.displayName = 'DsBreadcrumb';
95
+
94
96
  export default DsBreadcrumb;
@@ -9,4 +9,6 @@ const DsButton = (props: DsButtonUnifiedProps) => {
9
9
  return <DsButtonLegacy {...props} />;
10
10
  };
11
11
 
12
+ DsButton.displayName = 'DsButton';
13
+
12
14
  export default DsButton;
@@ -5,7 +5,7 @@ import figma from 'figma';
5
5
 
6
6
  const instance = figma.selectedInstance;
7
7
 
8
- const variant = instance.getEnum('Variant', {
8
+ const variant = instance.getEnum('buttonType', {
9
9
  primary: 'primary',
10
10
  secondary: 'secondary',
11
11
  tertiary: 'tertiary',
@@ -11,6 +11,12 @@ const iconSizeMap: Record<ButtonV3Size, IconSize> = Object.freeze({
11
11
  tiny: 'tiny',
12
12
  });
13
13
 
14
+ /**
15
+ * Button for user-triggered actions that do not navigate to another route.
16
+ * Supports color palettes, emphasis variants, sizes, icon-only layout, loading and selected states.
17
+ *
18
+ * @summary action button with color/variant/size, icon-only, loading and selected states
19
+ */
14
20
  const DsButtonV3 = ({
15
21
  ref,
16
22
  className,
@@ -3,4 +3,6 @@ import DsButtonV3Base from './ds-button-v3';
3
3
 
4
4
  export const DsButtonV3 = withResponsiveProps(DsButtonV3Base, ['size']);
5
5
 
6
+ DsButtonV3.displayName = 'DsButtonV3';
7
+
6
8
  export * from './ds-button-v3.types';
@@ -51,9 +51,8 @@ const Root = ({
51
51
  };
52
52
 
53
53
  /**
54
- * Card header - contains title and extra content.
55
- * Use with DsCard.Title and DsCard.Extra for standard layout,
56
- * or provide custom children for full flexibility.
54
+ * Card header — title row and optional trailing content.
55
+ * Provide custom children for full layout flexibility.
57
56
  */
58
57
  const Header = ({ className, children, ref, ...rest }: DsCardHeaderProps) => (
59
58
  <div ref={ref} className={classNames(styles.header, className)} {...rest}>
@@ -79,6 +78,11 @@ const Footer = ({ className, children, ref, ...rest }: DsCardFooterProps) => (
79
78
  </div>
80
79
  );
81
80
 
81
+ Root.displayName = 'DsCard.Root';
82
+ Header.displayName = 'DsCard.Header';
83
+ Body.displayName = 'DsCard.Body';
84
+ Footer.displayName = 'DsCard.Footer';
85
+
82
86
  export const DsCard = {
83
87
  Root,
84
88
  Header,
@@ -121,10 +121,18 @@ const ContentHeader = ({
121
121
  </div>
122
122
  );
123
123
 
124
+ Header.displayName = 'DsCatalogLayout.Header';
125
+ Body.displayName = 'DsCatalogLayout.Body';
126
+ SideMenu.displayName = 'DsCatalogLayout.SideMenu';
127
+ Content.displayName = 'DsCatalogLayout.Content';
128
+ ContentHeader.displayName = 'DsCatalogLayout.ContentHeader';
129
+
124
130
  DsCatalogLayout.Header = Header;
125
131
  DsCatalogLayout.Body = Body;
126
132
  DsCatalogLayout.SideMenu = SideMenu;
127
133
  DsCatalogLayout.Content = Content;
128
134
  DsCatalogLayout.ContentHeader = ContentHeader;
129
135
 
136
+ DsCatalogLayout.displayName = 'DsCatalogLayout';
137
+
130
138
  export default DsCatalogLayout;
@@ -0,0 +1,40 @@
1
+ // url=https://www.figma.com/design/nha3m67y7S57cHCSuQO2gp/DAP-Design-System-1.2?node-id=34856-101385
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 inner = instance.findInstance('DAP_checkbox_v03', { traverseInstances: true });
9
+
10
+ const color =
11
+ inner.type === 'INSTANCE' ? inner.getEnum('color', { Default: 'default', warning: 'warning' }) : 'default';
12
+
13
+ const checked =
14
+ inner.type === 'INSTANCE'
15
+ ? inner.getEnum('checked', { unchecked: 'unchecked', checked: 'checked', partial: 'partial' })
16
+ : 'unchecked';
17
+
18
+ const state =
19
+ inner.type === 'INSTANCE'
20
+ ? inner.getEnum('state', { default: 'default', hover: 'hover', focus: 'focus', disabled: 'disabled' })
21
+ : 'default';
22
+
23
+ const checkedAttr =
24
+ checked === 'partial' ? 'defaultChecked="indeterminate"' : checked === 'checked' ? 'defaultChecked' : '';
25
+
26
+ const attrs = [
27
+ 'label="Label"',
28
+ color === 'warning' ? 'variant="warning"' : '',
29
+ checkedAttr,
30
+ state === 'disabled' ? 'disabled' : '',
31
+ ]
32
+ .filter(Boolean)
33
+ .join(' ');
34
+
35
+ export default {
36
+ example: figma.code`<DsCheckbox ${attrs} />`,
37
+ imports: ["import { DsCheckbox } from '@drivenets/design-system'"],
38
+ id: 'ds-checkbox-level-2',
39
+ metadata: { nestable: true },
40
+ };
@@ -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
+ };
@@ -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
+ };
@@ -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';
@@ -207,3 +207,4 @@ export const DsCommentsDrawer = ({
207
207
  </>
208
208
  );
209
209
  };
210
+ DsCommentsDrawer.displayName = 'DsCommentsDrawer';
@@ -15,3 +15,4 @@ DsConfirmation.CloseTrigger = DsModal.CloseTrigger;
15
15
  DsConfirmation.Body = DsModal.Body;
16
16
  DsConfirmation.Footer = DsModal.Footer;
17
17
  DsConfirmation.Actions = DsModal.Actions;
18
+ DsConfirmation.displayName = 'DsConfirmation';
@@ -307,4 +307,6 @@ const YearView = () => (
307
307
  </DatePicker.View>
308
308
  );
309
309
 
310
+ DsDateInput.displayName = 'DsDateInput';
311
+
310
312
  export default DsDateInput;
@@ -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;