@drivenets/design-system 0.9.1 → 0.11.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 (176) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/index.cjs +1182 -716
  3. package/dist/index.d.cts +1806 -636
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.ts +1809 -639
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1189 -726
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.min.css +1 -1
  10. package/package.json +11 -13
  11. package/src/components/ds-alert-banner/ds-alert-banner.module.scss +25 -25
  12. package/src/components/ds-autocomplete/ds-autocomplete.module.scss +29 -29
  13. package/src/components/ds-avatar/_mixins.scss +7 -7
  14. package/src/components/ds-avatar/ds-avatar.module.scss +2 -2
  15. package/src/components/ds-avatar-group/ds-avatar-group.module.scss +6 -6
  16. package/src/components/ds-breadcrumb/ds-breadcrumb.module.scss +14 -14
  17. package/src/components/ds-breadcrumb/ds-breadcrumb.types.ts +40 -6
  18. package/src/components/ds-button/ds-button.types.ts +13 -2
  19. package/src/components/ds-button/versions/ds-button-legacy/ds-button-legacy.module.scss +17 -17
  20. package/src/components/ds-button/versions/ds-button-new/ds-button-new.module.scss +135 -135
  21. package/src/components/ds-button-v3/ds-button-v3.module.scss +113 -114
  22. package/src/components/ds-button-v3/ds-button-v3.types.ts +7 -0
  23. package/src/components/ds-card/ds-card.module.scss +12 -12
  24. package/src/components/ds-card/ds-card.types.ts +3 -1
  25. package/src/components/ds-checkbox/ds-checkbox.module.scss +106 -123
  26. package/src/components/ds-checkbox/ds-checkbox.tsx +24 -35
  27. package/src/components/ds-checkbox/ds-checkbox.types.ts +12 -11
  28. package/src/components/ds-checkbox-group/ds-checkbox-group.module.scss +13 -0
  29. package/src/components/ds-checkbox-group/ds-checkbox-group.tsx +20 -0
  30. package/src/components/ds-checkbox-group/ds-checkbox-group.types.ts +8 -0
  31. package/src/components/ds-checkbox-group/hooks/index.ts +6 -0
  32. package/src/components/ds-checkbox-group/hooks/use-checkbox-select-all.ts +65 -0
  33. package/src/components/ds-checkbox-group/index.ts +3 -0
  34. package/src/components/ds-chip/ds-chip.module.scss +17 -17
  35. package/src/components/ds-chip-group/ds-chip-group.module.scss +12 -12
  36. package/src/components/ds-comment-bubble/components/ds-comment-thread/ds-comment-thread.module.scss +3 -3
  37. package/src/components/ds-comment-bubble/components/ds-comment-thread/ds-comment-thread.types.ts +26 -0
  38. package/src/components/ds-comment-bubble/components/ds-thread-item/ds-thread-item.module.scss +18 -18
  39. package/src/components/ds-comment-bubble/components/ds-thread-item/ds-thread-item.types.ts +38 -0
  40. package/src/components/ds-comment-bubble/ds-comment-bubble.module.scss +43 -43
  41. package/src/components/ds-comment-bubble/ds-comment-bubble.types.ts +78 -0
  42. package/src/components/ds-comment-card/ds-comment-card.module.scss +34 -34
  43. package/src/components/ds-comment-card/ds-comment-card.types.ts +114 -0
  44. package/src/components/ds-comment-indicator/ds-comment-indicator.module.scss +9 -9
  45. package/src/components/ds-comment-indicator/ds-comment-indicator.types.ts +26 -0
  46. package/src/components/ds-comments-drawer/comments-filters.types.ts +33 -0
  47. package/src/components/ds-comments-drawer/components/comments-filter-modal/comments-filter-modal.module.scss +10 -10
  48. package/src/components/ds-comments-drawer/components/comments-filter-modal/comments-filter-modal.types.ts +37 -1
  49. package/src/components/ds-comments-drawer/ds-comments-drawer.module.scss +11 -11
  50. package/src/components/ds-comments-drawer/ds-comments-drawer.types.ts +64 -0
  51. package/src/components/ds-date-input/ds-date-input.module.scss +42 -42
  52. package/src/components/ds-date-input/ds-date-input.types.ts +23 -0
  53. package/src/components/ds-date-picker/components/calendar-table.module.scss +17 -17
  54. package/src/components/ds-date-picker/components/calendar-view-control/calendar-view-control.module.scss +8 -8
  55. package/src/components/ds-date-picker/components/day-view/day-view.module.scss +1 -1
  56. package/src/components/ds-date-picker/ds-date-picker.module.scss +1 -1
  57. package/src/components/ds-date-picker/ds-date-picker.tsx +3 -0
  58. package/src/components/ds-date-picker/ds-date-picker.types.ts +20 -0
  59. package/src/components/ds-date-range-picker/ds-date-range-picker.module.scss +1 -1
  60. package/src/components/ds-date-range-picker/ds-date-range-picker.types.ts +28 -0
  61. package/src/components/ds-dialog/ds-dialog.module.scss +3 -3
  62. package/src/components/ds-dialog/ds-dialog.types.ts +10 -1
  63. package/src/components/ds-divider/ds-divider.module.scss +1 -1
  64. package/src/components/ds-drawer/ds-drawer.module.scss +12 -12
  65. package/src/components/ds-dropdown-menu/ds-dropdown-menu.module.scss +22 -14
  66. package/src/components/ds-dropdown-menu/ds-dropdown-menu.tsx +2 -0
  67. package/src/components/ds-dropdown-menu/ds-dropdown-menu.types.ts +33 -0
  68. package/src/components/ds-expandable-text-input/ds-expandable-text-input.module.scss +1 -1
  69. package/src/components/ds-file-upload/components/file-upload/file-upload.module.scss +22 -22
  70. package/src/components/ds-file-upload/components/file-upload/file-upload.types.ts +1 -0
  71. package/src/components/ds-file-upload/components/file-upload-item/file-upload-item.module.scss +23 -23
  72. package/src/components/ds-file-upload/ds-file-upload-api.types.ts +55 -0
  73. package/src/components/ds-filter-status-icon/ds-filter-status-icon.module.scss +5 -5
  74. package/src/components/ds-form-control/ds-form-control.module.scss +13 -13
  75. package/src/components/ds-form-control/ds-form-control.types.ts +3 -0
  76. package/src/components/ds-grid/ds-grid.tsx +29 -12
  77. package/src/components/ds-grid/ds-grid.types.ts +16 -13
  78. package/src/components/ds-grid/index.ts +10 -2
  79. package/src/components/ds-icon/custom-icons/index.ts +2 -0
  80. package/src/components/ds-icon/custom-icons/special-leading-icon.tsx +11 -0
  81. package/src/components/ds-icon/ds-icon.module.scss +8 -0
  82. package/src/components/ds-icon/ds-icon.tsx +10 -4
  83. package/src/components/ds-icon/ds-icon.types.ts +30 -0
  84. package/src/components/ds-key-value-pair/ds-key-value-pair.module.scss +7 -7
  85. package/src/components/ds-key-value-pair/ds-key-value-pair.types.ts +12 -2
  86. package/src/components/ds-modal/ds-modal.module.scss +9 -9
  87. package/src/components/ds-modal/ds-modal.types.ts +16 -0
  88. package/src/components/ds-panel/ds-panel.module.scss +16 -16
  89. package/src/components/ds-panel/ds-panel.types.ts +39 -0
  90. package/src/components/ds-popover/ds-popover.module.scss +2 -2
  91. package/src/components/ds-progress-arc/ds-progress-arc.module.scss +7 -7
  92. package/src/components/ds-progress-donut/ds-progress-donut.module.scss +7 -7
  93. package/src/components/ds-progress-linear/ds-progress-linear.module.scss +15 -15
  94. package/src/components/ds-radio-group/ds-radio-group.module.scss +58 -56
  95. package/src/components/ds-radio-group/ds-radio-group.tsx +35 -28
  96. package/src/components/ds-radio-group/ds-radio-group.types.ts +38 -7
  97. package/src/components/ds-segment-group/ds-segment-group.module.scss +18 -18
  98. package/src/components/ds-segment-group/ds-segment-group.types.ts +17 -0
  99. package/src/components/ds-select/ds-select.module.scss +8 -8
  100. package/src/components/ds-select/ds-select.types.ts +32 -0
  101. package/src/components/ds-skeleton/ds-skeleton.module.scss +1 -1
  102. package/src/components/ds-smart-tabs/ds-smart-tabs.module.scss +12 -12
  103. package/src/components/ds-smart-tabs/ds-smart-tabs.tsx +9 -9
  104. package/src/components/ds-spinner/ds-spinner.module.scss +1 -1
  105. package/src/components/ds-split-button/ds-split-button.module.scss +7 -7
  106. package/src/components/ds-split-button/ds-split-button.types.ts +28 -0
  107. package/src/components/ds-stack/ds-stack.types.ts +23 -0
  108. package/src/components/ds-status-badge/ds-status-badge.module.scss +21 -25
  109. package/src/components/ds-stepper/ds-stepper.module.scss +55 -55
  110. package/src/components/ds-stepper/ds-stepper.types.ts +34 -1
  111. package/src/components/ds-system-status/ds-system-status.module.scss +22 -22
  112. package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.types.ts +27 -0
  113. package/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.module.scss +9 -9
  114. package/src/components/ds-table/components/ds-table-cell/ds-table-cell.module.scss +4 -4
  115. package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +5 -10
  116. package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +6 -9
  117. package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +13 -22
  118. package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +11 -18
  119. package/src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.module.scss +0 -7
  120. package/src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.tsx +19 -28
  121. package/src/components/ds-table/components/ds-table-row-expandable-cell/ds-table-row-expandable-cell.types.ts +7 -1
  122. package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.tsx +3 -8
  123. package/src/components/ds-table/components/ds-table-row-selectable-cell/ds-table-row-selectable-cell.types.ts +11 -0
  124. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +15 -11
  125. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +9 -4
  126. package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.types.ts +27 -0
  127. package/src/components/ds-table/ds-table.module.scss +9 -2
  128. package/src/components/ds-table/ds-table.tsx +26 -4
  129. package/src/components/ds-table/filters/components/range-filter/range-filter.module.scss +1 -1
  130. package/src/components/ds-table/filters/types/filter-adapter.types.ts +6 -0
  131. package/src/components/ds-table/styles/_mixins.scss +1 -1
  132. package/src/components/ds-table/styles/_variables.scss +5 -6
  133. package/src/components/ds-table/utils/constants.ts +10 -0
  134. package/src/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.module.scss +1 -1
  135. package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-indicator.module.scss +1 -1
  136. package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.module.scss +3 -3
  137. package/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.scss +55 -55
  138. package/src/components/ds-tabs/ds-tabs.module.scss +1 -1
  139. package/src/components/ds-tag/ds-tag.module.scss +22 -22
  140. package/src/components/ds-tag/ds-tag.types.ts +6 -0
  141. package/src/components/ds-tag-filter/ds-tag-filter.module.scss +10 -10
  142. package/src/components/ds-tag-filter/ds-tag-filter.types.ts +16 -0
  143. package/src/components/ds-text-input/ds-text-input.module.scss +1 -1
  144. package/src/components/ds-text-input/ds-text-input.types.ts +3 -0
  145. package/src/components/ds-time-picker/components/time-item/time-item.module.scss +8 -8
  146. package/src/components/ds-time-picker/components/time-item/time-item.types.ts +19 -0
  147. package/src/components/ds-time-picker/components/time-scroller/time-scroller.module.scss +3 -3
  148. package/src/components/ds-time-picker/components/time-scroller/time-scroller.types.ts +29 -0
  149. package/src/components/ds-time-picker/ds-time-picker.module.scss +7 -0
  150. package/src/components/ds-time-picker/ds-time-picker.tsx +8 -1
  151. package/src/components/ds-time-picker/ds-time-picker.types.ts +80 -0
  152. package/src/components/ds-toast/ds-toast.module.scss +11 -11
  153. package/src/components/ds-toggle/ds-toggle.module.scss +18 -18
  154. package/src/components/ds-tooltip/ds-tooltip.module.scss +5 -5
  155. package/src/components/ds-tooltip/ds-tooltip.types.ts +6 -0
  156. package/src/components/ds-tree/ds-tree.module.scss +27 -27
  157. package/src/components/ds-tree/ds-tree.types.ts +84 -2
  158. package/src/components/ds-typography/ds-typography.config.ts +46 -27
  159. package/src/components/ds-typography/ds-typography.tsx +22 -7
  160. package/src/components/ds-typography/ds-typography.types.ts +15 -4
  161. package/src/components/ds-vertical-tabs/ds-vertical-tabs.module.scss +13 -13
  162. package/src/components/ds-workspace/ds-workspace.module.scss +55 -0
  163. package/src/components/ds-workspace/ds-workspace.tsx +37 -0
  164. package/src/components/ds-workspace/ds-workspace.types.ts +17 -0
  165. package/src/components/ds-workspace/index.ts +8 -0
  166. package/src/index.ts +2 -0
  167. package/src/styles/_grid.scss +2 -2
  168. package/src/styles/_root.scss +0 -18
  169. package/src/styles/_root_new.scss +449 -0
  170. package/src/styles/_scrollbars.scss +5 -5
  171. package/src/styles/_typography.scss +18 -14
  172. package/src/styles/mixins/_list.scss +8 -8
  173. package/src/styles/shared/_dropdown.scss +9 -9
  174. package/src/styles/shared/_input.scss +47 -49
  175. package/src/styles/styles.scss +1 -0
  176. package/src/styles/_root_updated.scss +0 -593
@@ -6,10 +6,10 @@
6
6
  @include input.input-container-states;
7
7
  max-height: input.$input-text-height-default;
8
8
  justify-content: space-between;
9
- padding: var(--spacing-xs) var(--spacing-sm);
10
- gap: var(--spacing-3xs);
9
+ padding: var(--xs) var(--sm);
10
+ gap: var(--3xs);
11
11
 
12
- border-color: var(--form-control-border-color, var(--color-border));
12
+ border-color: var(--form-control-border-color, var(--border));
13
13
 
14
14
  &:hover:not(.disabled) {
15
15
  border-color: var(--form-control-border-color, var(--color-border-hover));
@@ -20,23 +20,23 @@
20
20
  }
21
21
 
22
22
  &.disabled {
23
- color: var(--color-background-deselected);
24
- background: var(--color-background-secondary);
25
- border-color: var(--color-border-disabled);
23
+ color: var(--background-deselected);
24
+ background: var(--background-secondary);
25
+ border-color: var(--border-disabled);
26
26
  cursor: not-allowed;
27
27
 
28
28
  .input {
29
- color: var(--color-font-disabled);
29
+ color: var(--font-disabled);
30
30
  }
31
31
 
32
32
  .dateInputButton {
33
- color: var(--color-background-disable);
33
+ color: var(--background-disable);
34
34
  cursor: not-allowed;
35
35
  }
36
36
  }
37
37
 
38
38
  &.readOnly {
39
- background: var(--color-background-secondary);
39
+ background: var(--background-secondary);
40
40
  cursor: default;
41
41
  }
42
42
  }
@@ -57,11 +57,11 @@
57
57
  transition: color 0.2s ease;
58
58
 
59
59
  &:hover:not(:disabled) {
60
- color: var(--color-background-action-hover);
60
+ color: var(--background-action-hover);
61
61
  }
62
62
 
63
63
  &:disabled {
64
- color: var(--color-background-disable);
64
+ color: var(--background-disable);
65
65
  cursor: not-allowed;
66
66
  }
67
67
  }
@@ -72,7 +72,7 @@
72
72
 
73
73
  .content {
74
74
  @include dropdown.dropdown-content;
75
- padding: var(--spacing-standard);
75
+ padding: var(--standard);
76
76
  min-width: fit-content;
77
77
  }
78
78
 
@@ -80,7 +80,7 @@
80
80
  display: flex;
81
81
  justify-content: space-between;
82
82
  align-items: center;
83
- margin-bottom: var(--spacing-xs);
83
+ margin-bottom: var(--xs);
84
84
  }
85
85
 
86
86
  .viewTrigger {
@@ -91,9 +91,9 @@
91
91
  background: transparent;
92
92
  border: none;
93
93
  cursor: pointer;
94
- padding: var(--spacing-2xs) var(--spacing-xs);
95
- border-radius: var(--spacing-2xs);
96
- color: var(--color-font-main);
94
+ padding: var(--2xs) var(--xs);
95
+ border-radius: var(--2xs);
96
+ color: var(--font-main);
97
97
  transition: background-color 0.2s;
98
98
 
99
99
  &:hover {
@@ -109,14 +109,14 @@
109
109
  background: transparent;
110
110
  border: none;
111
111
  cursor: pointer;
112
- padding: var(--spacing-2xs);
113
- border-radius: var(--spacing-2xs);
114
- color: var(--color-font-secondary);
112
+ padding: var(--2xs);
113
+ border-radius: var(--2xs);
114
+ color: var(--font-secondary);
115
115
  transition: all 0.2s;
116
116
 
117
117
  &:hover {
118
118
  background: var(--color-background-hover);
119
- color: var(--color-font-main);
119
+ color: var(--font-main);
120
120
  }
121
121
 
122
122
  &:disabled {
@@ -128,7 +128,7 @@
128
128
  .calendarView {
129
129
  display: flex;
130
130
  flex-direction: column;
131
- gap: var(--spacing-xs);
131
+ gap: var(--xs);
132
132
  }
133
133
 
134
134
  .table {
@@ -137,28 +137,28 @@
137
137
 
138
138
  .tableBody .tableRow .tableCellTrigger:focus-visible {
139
139
  .tableCellTriggerValue {
140
- outline: 2px solid var(--color-background-action-hover);
141
- border-radius: var(--spacing-2xs);
140
+ outline: 2px solid var(--background-action-hover);
141
+ border-radius: var(--2xs);
142
142
  border-width: 0;
143
143
  }
144
144
  }
145
145
  }
146
146
 
147
147
  .tableHead {
148
- border-bottom: 1px solid var(--color-border);
148
+ border-bottom: 1px solid var(--border);
149
149
  }
150
150
 
151
151
  .tableHeader {
152
152
  text-align: center;
153
- padding: var(--spacing-2xs);
154
- color: var(--color-font-secondary);
153
+ padding: var(--2xs);
154
+ color: var(--font-secondary);
155
155
  font-weight: var(--font-weight-medium);
156
156
  }
157
157
 
158
158
  .tableRow {
159
159
  &:first-child {
160
160
  .tableCellTrigger {
161
- margin-top: var(--spacing-xs);
161
+ margin-top: var(--xs);
162
162
  }
163
163
  }
164
164
  }
@@ -176,38 +176,38 @@
176
176
  display: flex;
177
177
  align-items: center;
178
178
  justify-content: center;
179
- width: var(--spacing-xl);
180
- height: var(--spacing-xl);
181
- margin: var(--spacing-3xs);
182
- color: var(--color-font-main);
183
- border-radius: var(--spacing-xs);
179
+ width: var(--xl);
180
+ height: var(--xl);
181
+ margin: var(--3xs);
182
+ color: var(--font-main);
183
+ border-radius: var(--xs);
184
184
  }
185
185
 
186
186
  &:hover:not([data-disabled], [data-selected], [data-in-range], [data-in-hover-range])
187
187
  .tableCellTriggerValue {
188
- outline: 1px solid var(--color-border);
189
- background: var(--color-background-action-hover-weak);
188
+ outline: 1px solid var(--border);
189
+ background: var(--background-action-hover-weak);
190
190
  }
191
191
 
192
192
  &[data-outside-range] .tableCellTriggerValue {
193
- color: var(--color-font-disabled);
193
+ color: var(--font-disabled);
194
194
  }
195
195
 
196
196
  &[data-selected] .tableCellTriggerValue {
197
- background: var(--color-background-selected);
198
- color: var(--color-font-on-action);
197
+ background: var(--background-primary);
198
+ color: var(--font-on-action);
199
199
  }
200
200
 
201
201
  &[data-in-range]:not([data-selected]) {
202
202
  position: relative;
203
203
 
204
204
  .tableCellTriggerValue {
205
- background: var(--color-background-action-secondary-hover);
205
+ background: var(--background-action-secondary-hover);
206
206
  }
207
207
  }
208
208
 
209
209
  &[data-today]:not([data-selected], [data-in-range]):hover .tableCellTriggerValue {
210
- border-radius: var(--spacing-xs);
210
+ border-radius: var(--xs);
211
211
  }
212
212
 
213
213
  &[data-today]:not([data-selected]) .tableCellTriggerValue {
@@ -218,7 +218,7 @@
218
218
  position: absolute;
219
219
  width: 75%;
220
220
  bottom: 4px;
221
- border-bottom: 1px solid var(--color-background-brand);
221
+ border-bottom: 1px solid var(--background-brand);
222
222
  }
223
223
  }
224
224
 
@@ -230,12 +230,12 @@
230
230
  position: absolute;
231
231
  width: 75%;
232
232
  bottom: 4px;
233
- border-bottom: 1px solid var(--color-background);
233
+ border-bottom: 1px solid var(--background);
234
234
  }
235
235
  }
236
236
 
237
237
  &[data-disabled] .tableCellTriggerValue {
238
- color: var(--color-font-disabled);
238
+ color: var(--font-disabled);
239
239
  cursor: not-allowed;
240
240
  opacity: 0.5;
241
241
  }
@@ -63,6 +63,29 @@ type DsDateInputBaseProps = Pick<
63
63
  DatePickerRootProps,
64
64
  'disabled' | 'readOnly' | 'id' | 'open' | 'name' | 'style'
65
65
  > & {
66
+ /**
67
+ * Unique identifier for the input field
68
+ */
69
+ id?: string;
70
+ /**
71
+ * HTML name attribute for the input field, used in form submissions
72
+ */
73
+ name?: string;
74
+ /**
75
+ * Whether the input is disabled and cannot be interacted with
76
+ * @default false
77
+ */
78
+ disabled?: boolean;
79
+ /**
80
+ * Whether the input is read-only. The field is focusable but the value cannot
81
+ * be changed.
82
+ * @default false
83
+ */
84
+ readOnly?: boolean;
85
+ /**
86
+ * Whether the calendar popover is open (controlled). Pair with `onOpenChange`.
87
+ */
88
+ open?: boolean;
66
89
  /**
67
90
  * Callback when the open state changes
68
91
  * @param open - Whether the calendar is open
@@ -4,8 +4,8 @@
4
4
 
5
5
  .tableBody .tableRow .tableCellTrigger:focus-visible {
6
6
  .tableCellTrigger {
7
- outline: 2px solid var(--color-background-action-hover);
8
- border-radius: var(--spacing-2xs);
7
+ outline: 2px solid var(--background-action-hover);
8
+ border-radius: var(--2xs);
9
9
  border-width: 0;
10
10
  }
11
11
  }
@@ -13,15 +13,15 @@
13
13
 
14
14
  .tableHeader {
15
15
  text-align: center;
16
- padding: var(--spacing-2xs);
17
- color: var(--color-font-secondary);
16
+ padding: var(--2xs);
17
+ color: var(--font-secondary);
18
18
  font-weight: var(--font-weight-medium);
19
19
  }
20
20
 
21
21
  .tableRow {
22
22
  &:first-child {
23
23
  .tableCellTrigger {
24
- margin-top: var(--spacing-xs);
24
+ margin-top: var(--xs);
25
25
  }
26
26
  }
27
27
  }
@@ -34,26 +34,26 @@
34
34
  user-select: none;
35
35
  -webkit-tap-highlight-color: transparent;
36
36
  outline: none;
37
- border-radius: var(--spacing-xs);
38
- color: var(--color-font-main);
39
- margin: var(--spacing-3xs);
37
+ border-radius: var(--xs);
38
+ color: var(--font-main);
39
+ margin: var(--3xs);
40
40
 
41
41
  &:hover:not([data-disabled], [data-selected]) {
42
- outline: 1px solid var(--color-border);
43
- background: var(--color-background-action-hover-weak);
42
+ outline: 1px solid var(--border);
43
+ background: var(--background-action-hover-weak);
44
44
  }
45
45
 
46
46
  &[data-outside-range] {
47
- color: var(--color-font-disabled);
47
+ color: var(--font-disabled);
48
48
  }
49
49
 
50
50
  &[data-selected] {
51
- background: var(--color-background-selected);
52
- color: var(--color-font-on-action);
51
+ background: var(--background-primary);
52
+ color: var(--font-on-action);
53
53
  }
54
54
 
55
55
  &[data-today]:not([data-selected]):hover {
56
- border-radius: var(--spacing-xs);
56
+ border-radius: var(--xs);
57
57
  }
58
58
 
59
59
  &[data-today]:not([data-selected]) {
@@ -64,7 +64,7 @@
64
64
  position: absolute;
65
65
  width: 75%;
66
66
  bottom: 4px;
67
- border-bottom: 1px solid var(--color-background-brand);
67
+ border-bottom: 1px solid var(--background-brand);
68
68
  }
69
69
  }
70
70
 
@@ -76,12 +76,12 @@
76
76
  position: absolute;
77
77
  width: 75%;
78
78
  bottom: 4px;
79
- border-bottom: 1px solid var(--color-background);
79
+ border-bottom: 1px solid var(--background);
80
80
  }
81
81
  }
82
82
 
83
83
  &[data-disabled] {
84
- color: var(--color-font-disabled);
84
+ color: var(--font-disabled);
85
85
  cursor: not-allowed;
86
86
  opacity: 0.5;
87
87
  }
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
5
- margin-bottom: var(--spacing-sm);
5
+ margin-bottom: var(--sm);
6
6
  }
7
7
 
8
8
  .viewTrigger {
@@ -13,9 +13,9 @@
13
13
  background: transparent;
14
14
  border: none;
15
15
  cursor: pointer;
16
- padding: var(--spacing-2xs) var(--spacing-xs);
17
- border-radius: var(--spacing-2xs);
18
- color: var(--color-font-main);
16
+ padding: var(--2xs) var(--xs);
17
+ border-radius: var(--2xs);
18
+ color: var(--font-main);
19
19
  transition: background-color 0.2s;
20
20
 
21
21
  &:hover {
@@ -31,14 +31,14 @@
31
31
  background: transparent;
32
32
  border: none;
33
33
  cursor: pointer;
34
- padding: var(--spacing-2xs);
35
- border-radius: var(--spacing-2xs);
36
- color: var(--color-font-secondary);
34
+ padding: var(--2xs);
35
+ border-radius: var(--2xs);
36
+ color: var(--font-secondary);
37
37
  transition: all 0.2s;
38
38
 
39
39
  &:hover {
40
40
  background: var(--color-background-hover);
41
- color: var(--color-font-main);
41
+ color: var(--font-main);
42
42
  }
43
43
 
44
44
  &:disabled {
@@ -3,7 +3,7 @@ $trigger-size: 32px;
3
3
  .dayView {
4
4
  display: flex;
5
5
  flex-direction: column;
6
- gap: var(--spacing-xs);
6
+ gap: var(--xs);
7
7
  }
8
8
 
9
9
  .trigger {
@@ -20,7 +20,7 @@
20
20
 
21
21
  .content {
22
22
  @include dropdown.dropdown-content;
23
- padding: var(--spacing-standard);
23
+ padding: var(--standard);
24
24
  min-width: fit-content;
25
25
  }
26
26
 
@@ -31,6 +31,7 @@ const DsDatePicker = ({
31
31
  slotProps,
32
32
  onChange,
33
33
  onOpenChange,
34
+ onBlur,
34
35
  value: _value,
35
36
  defaultValue: _defaultValue,
36
37
  min: _min,
@@ -97,6 +98,8 @@ const DsDatePicker = ({
97
98
  } else {
98
99
  resetInput();
99
100
  }
101
+
102
+ onBlur?.();
100
103
  };
101
104
 
102
105
  const showClearButton = !hideClearButton && !disabled && !readOnly && !!value;
@@ -3,13 +3,28 @@ import type { DsTextInputProps } from '../ds-text-input';
3
3
  import type { DsTimePickerProps } from '../ds-time-picker';
4
4
 
5
5
  export interface DsDatePickerLocale {
6
+ /**
7
+ * aria-label for the button that opens the calendar popover
8
+ */
6
9
  openCalendarLabel?: string;
10
+ /**
11
+ * aria-label for the button that reveals the time picker when `withTime` is set
12
+ */
7
13
  timeTriggerLabel?: string;
14
+ /**
15
+ * aria-label for the clear button
16
+ */
8
17
  clearLabel?: string;
9
18
  }
10
19
 
11
20
  export interface DsDatePickerSlotProps {
21
+ /**
22
+ * Props forwarded to the underlying `DsTextInput` that displays the selected date.
23
+ */
12
24
  input?: DsTextInputProps;
25
+ /**
26
+ * Props forwarded to the nested `DsTimePicker` rendered when `withTime` is set.
27
+ */
13
28
  timePicker?: DsTimePickerProps;
14
29
  }
15
30
 
@@ -40,6 +55,11 @@ export interface DsDatePickerProps extends Pick<
40
55
  */
41
56
  onOpenChange?: (open: boolean) => void;
42
57
 
58
+ /**
59
+ * Callback when the input is blurred
60
+ */
61
+ onBlur?: () => void;
62
+
43
63
  /**
44
64
  * Minimum allowed datetime as Date object
45
65
  */
@@ -1,6 +1,6 @@
1
1
  .root {
2
2
  display: flex;
3
- gap: var(--spacing-xs);
3
+ gap: var(--xs);
4
4
  }
5
5
 
6
6
  .horizontal {
@@ -7,15 +7,31 @@ export const dateRangePickerOrientations = ['horizontal', 'vertical'] as const;
7
7
  export type DateRangePickerOrientation = (typeof dateRangePickerOrientations)[number];
8
8
 
9
9
  export interface DsDateRangePickerLocale {
10
+ /**
11
+ * Label shown on the "Clear all" button.
12
+ */
10
13
  clearAllLabel?: string;
11
14
  }
12
15
 
13
16
  export type DateRangeFormControlSlotProps = Partial<Omit<DsFormControlProps, 'children'>>;
14
17
 
15
18
  export interface DsDateRangePickerSlotProps {
19
+ /**
20
+ * Props forwarded to the start-date `DsDatePicker`.
21
+ */
16
22
  startDatePicker?: DsDatePickerProps;
23
+ /**
24
+ * Props forwarded to the end-date `DsDatePicker`.
25
+ */
17
26
  endDatePicker?: DsDatePickerProps;
27
+ /**
28
+ * Props forwarded to the `DsFormControl` wrapping the start-date picker
29
+ * (e.g., to set a label or helper text).
30
+ */
18
31
  startDateFormControl?: DateRangeFormControlSlotProps;
32
+ /**
33
+ * Props forwarded to the `DsFormControl` wrapping the end-date picker.
34
+ */
19
35
  endDateFormControl?: DateRangeFormControlSlotProps;
20
36
  }
21
37
 
@@ -71,10 +87,22 @@ export interface DsDateRangePickerProps {
71
87
  */
72
88
  closeOnSelect?: boolean;
73
89
 
90
+ /**
91
+ * Whether both pickers are disabled.
92
+ * @default false
93
+ */
74
94
  disabled?: boolean;
75
95
 
96
+ /**
97
+ * Whether both pickers are read-only. Inputs are focusable but values cannot
98
+ * be changed.
99
+ * @default false
100
+ */
76
101
  readOnly?: boolean;
77
102
 
103
+ /**
104
+ * Additional CSS class name applied to the range picker wrapper.
105
+ */
78
106
  className?: string;
79
107
 
80
108
  /**
@@ -14,7 +14,7 @@
14
14
  --_shadow-size: 18px;
15
15
  --_shadow-y-offset: 6px;
16
16
 
17
- background: var(--white, #fff);
17
+ background: var(--color-dap-gray-050, #fff);
18
18
  border-radius: 8px;
19
19
  box-shadow: 0 var(--_shadow-y-offset) var(--_shadow-size) 0 rgba(4, 69, 204, 0.3);
20
20
  padding: 12px;
@@ -34,12 +34,12 @@
34
34
  .title {
35
35
  @include typography.p-base;
36
36
  @include typography.medium;
37
- color: var(--neutral-1);
37
+ color: var(--color-dap-gray-700);
38
38
  }
39
39
 
40
40
  .description {
41
41
  @include typography.p-base;
42
- color: var(--neutral-3);
42
+ color: var(--color-dap-gray-500);
43
43
  margin-bottom: 16px;
44
44
  }
45
45
 
@@ -40,7 +40,16 @@ export interface DsDialogProps {
40
40
  /**
41
41
  * Custom fixed position (e.g., { top: number, left: number })
42
42
  */
43
- customPosition?: { top: number; left: number };
43
+ customPosition?: {
44
+ /**
45
+ * Distance in pixels from the top of the viewport.
46
+ */
47
+ top: number;
48
+ /**
49
+ * Distance in pixels from the left of the viewport.
50
+ */
51
+ left: number;
52
+ };
44
53
  /**
45
54
  * If true, show modal overlay and center dialog (default: true)
46
55
  */
@@ -5,7 +5,7 @@
5
5
  padding: 0;
6
6
  color: transparent;
7
7
 
8
- background-color: var(--color-border-secondary);
8
+ background-color: var(--border-secondary);
9
9
  flex-shrink: 0;
10
10
  }
11
11
 
@@ -47,7 +47,7 @@
47
47
  display: block;
48
48
  top: 0;
49
49
  bottom: 0;
50
- background: var(--color-background);
50
+ background: var(--background);
51
51
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.22);
52
52
  z-index: 1200;
53
53
  pointer-events: auto;
@@ -167,29 +167,29 @@
167
167
  align-items: center;
168
168
  justify-content: space-between;
169
169
  flex-wrap: wrap;
170
- border-bottom: 1px solid var(--color-border);
171
- padding: var(--spacing-sm) var(--spacing-standard);
172
- gap: var(--spacing-3xs);
170
+ border-bottom: 1px solid var(--border);
171
+ padding: var(--sm) var(--standard);
172
+ gap: var(--3xs);
173
173
  }
174
174
 
175
175
  .title {
176
176
  margin: 0;
177
- color: var(--color-font-main);
177
+ color: var(--font-main);
178
178
  }
179
179
 
180
180
  .closeTrigger {
181
181
  display: flex;
182
182
  align-items: center;
183
183
  justify-content: center;
184
- color: var(--color-icon-secondary);
184
+ color: var(--icon-action-secondary);
185
185
  }
186
186
 
187
187
  .toolbar {
188
188
  display: flex;
189
189
  align-items: center;
190
- border-bottom: 1px solid var(--color-border);
191
- padding: var(--spacing-sm) var(--spacing-standard);
192
- gap: var(--spacing-3xs);
190
+ border-bottom: 1px solid var(--border);
191
+ padding: var(--sm) var(--standard);
192
+ gap: var(--3xs);
193
193
  }
194
194
 
195
195
  .body {
@@ -200,13 +200,13 @@
200
200
  .footer {
201
201
  display: flex;
202
202
  align-items: center;
203
- padding: var(--spacing-standard);
204
- border-top: 1px solid var(--color-border);
203
+ padding: var(--standard);
204
+ border-top: 1px solid var(--border);
205
205
  }
206
206
 
207
207
  .actions {
208
208
  display: flex;
209
209
  align-items: center;
210
- gap: var(--spacing-xs);
210
+ gap: var(--xs);
211
211
  margin-left: auto;
212
212
  }