@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
@@ -9,34 +9,34 @@
9
9
  @include typography.ellipsis;
10
10
  display: flex;
11
11
  height: 48px;
12
- padding: var(--spacing-xs) var(--spacing-sm);
12
+ padding: var(--xs) var(--sm);
13
13
  align-items: center;
14
14
  gap: 8px;
15
15
  border-radius: 4px;
16
- border: 1px solid var(--color-border);
17
- background: var(--color-background);
16
+ border: 1px solid var(--border);
17
+ background: var(--background);
18
18
  min-width: 250px;
19
19
 
20
20
  &.active {
21
21
  @include typography.body-sm-md;
22
- border-color: var(--color-border-action-secondary);
22
+ border-color: var(--border-action-secondary);
23
23
 
24
24
  .icon {
25
- color: var(--color-background);
26
- background: var(--tab-color, var(--color-background-action));
25
+ color: var(--background);
26
+ background: var(--tab-color, var(--background-action));
27
27
  }
28
28
 
29
29
  .value {
30
- color: var(--color-font-main);
30
+ color: var(--font-main);
31
31
  }
32
32
  }
33
33
 
34
34
  &:hover:not(.active):not(:disabled) {
35
- border-color: var(--color-border-action-primary-hover);
35
+ border-color: var(--border-action-primary-hover);
36
36
  }
37
37
 
38
38
  &:focus {
39
- outline: auto var(--color-border-action-primary-hover);
39
+ outline: auto var(--border-action-primary-hover);
40
40
  }
41
41
 
42
42
  &.disabled {
@@ -48,8 +48,8 @@
48
48
  display: flex;
49
49
  justify-content: center;
50
50
  align-items: center;
51
- color: var(--color-background-action);
52
- background: var(--color-background-tertiary);
51
+ color: var(--background-action);
52
+ background: var(--background-tertiary);
53
53
  border-radius: 50%;
54
54
  width: var(--icon-width-extra-large);
55
55
  height: var(--icon-width-extra-large);
@@ -63,7 +63,7 @@
63
63
 
64
64
  .content {
65
65
  padding-right: 4px;
66
- color: var(--color-font-secondary);
66
+ color: var(--font-secondary);
67
67
  }
68
68
  }
69
69
  }
@@ -6,15 +6,15 @@ import styles from './ds-smart-tabs.module.scss';
6
6
  import type { Color, DsSmartTabProps, DsSmartTabsProps } from './ds-smart-tabs.types';
7
7
 
8
8
  const colorMap: Record<Color, string> = {
9
- 'dark-blue': 'var(--color-background-info-strong)',
10
- 'light-blue': 'var(--color-background-active-moderate)',
11
- 'dark-gray': 'var(--color-background-brand)',
12
- green: 'var(--color-background-success-strong)',
13
- fuchsia: 'var(--color-data-fuchsia)',
14
- blue: 'var(--color-icon-information-secondary)',
15
- gray: 'var(--color-icon-information-main)',
16
- red: 'var(--color-icon-warning)',
17
- amber: 'var(--color-data-amber)',
9
+ 'dark-blue': 'var(--background-info-strong)',
10
+ 'light-blue': 'var(--background-active-moderate)',
11
+ 'dark-gray': 'var(--background-brand)',
12
+ green: 'var(--background-success-strong)',
13
+ fuchsia: 'var(--color-dap-data-fuchsia)',
14
+ blue: 'var(--icon-information-secondary)',
15
+ gray: 'var(--icon-information-main)',
16
+ red: 'var(--icon-warning)',
17
+ amber: 'var(--color-dap-data-amber)',
18
18
  };
19
19
 
20
20
  interface SmartTabsContextType {
@@ -20,7 +20,7 @@
20
20
 
21
21
  .progressArc {
22
22
  transition: stroke-dasharray 0.3s ease-in-out;
23
- stroke: var(--color-background-selected);
23
+ stroke: var(--background-primary);
24
24
 
25
25
  button &,
26
26
  [role='button'] & {
@@ -49,11 +49,11 @@ $border-width: 1px;
49
49
  }
50
50
 
51
51
  &:not(:disabled):is(:hover, :active, [data-selected='true']) {
52
- border-right-color: var(--border-border-secondary-hover);
52
+ border-right-color: var(--border-secondary-hover);
53
53
  }
54
54
 
55
55
  &:not(:disabled):focus-visible {
56
- border-right-color: var(--border-border-inverse);
56
+ border-right-color: var(--border-inverse);
57
57
  }
58
58
  }
59
59
 
@@ -74,8 +74,8 @@ $border-width: 1px;
74
74
  left: -$divider-width;
75
75
  z-index: $divider-z-index;
76
76
  width: $divider-width;
77
- padding: var(--spacing-3xs) 0;
78
- background-color: var(--background-background);
77
+ padding: var(--3xs) 0;
78
+ background-color: var(--background);
79
79
 
80
80
  @include when-button-highlighted {
81
81
  display: none;
@@ -86,14 +86,14 @@ $border-width: 1px;
86
86
  }
87
87
 
88
88
  .divider {
89
- background-color: var(--color-border-secondary);
89
+ background-color: var(--border-secondary);
90
90
  width: $divider-width;
91
91
  height: 100%;
92
92
 
93
93
  @include when-button-disabled {
94
- background-color: var(--border-border-disabled);
94
+ background-color: var(--border-disabled);
95
95
  }
96
96
  @include when-select-disabled {
97
- background-color: var(--border-border-disabled);
97
+ background-color: var(--border-disabled);
98
98
  }
99
99
  }
@@ -11,15 +11,43 @@ type ButtonSlotProps = Omit<DsButtonV3Props, 'variant' | 'color' | 'size'>;
11
11
  type SelectSlotProps = DistributiveOmit<DsSelectProps, 'size'>;
12
12
 
13
13
  export interface DsSplitButtonSlotProps {
14
+ /**
15
+ * Props forwarded to the primary action button (`DsButtonV3`). `variant`, `color`
16
+ * and `size` are controlled by the split button and cannot be overridden here.
17
+ */
14
18
  button: ButtonSlotProps;
19
+ /**
20
+ * Props forwarded to the dropdown select (`DsSelect`). `size` is controlled by
21
+ * the split button and cannot be overridden here.
22
+ */
15
23
  select: SelectSlotProps;
16
24
  }
17
25
 
18
26
  export interface DsSplitButtonProps {
27
+ /**
28
+ * Ref forwarded to the split-button wrapper element
29
+ */
19
30
  ref?: Ref<HTMLDivElement>;
31
+ /**
32
+ * Additional CSS class name applied to the wrapper element
33
+ */
20
34
  className?: string;
35
+ /**
36
+ * Inline styles applied to the wrapper element
37
+ */
21
38
  style?: CSSProperties;
39
+ /**
40
+ * Visual size applied to both the button and select slots.
41
+ * @default medium
42
+ */
22
43
  size?: SplitButtonSize;
44
+ /**
45
+ * Whether both the button and the select are disabled.
46
+ * @default false
47
+ */
23
48
  disabled?: boolean;
49
+ /**
50
+ * Props forwarded to the internal button and select slots.
51
+ */
24
52
  slotProps: DsSplitButtonSlotProps;
25
53
  }
@@ -4,12 +4,35 @@ type CSSProps = Properties<string | number>;
4
4
  import type { CSSProperties, ReactNode, Ref } from 'react';
5
5
 
6
6
  export interface DsStackProps {
7
+ /**
8
+ * Flex direction of the stack (maps to CSS `flex-direction`).
9
+ * @default row
10
+ */
7
11
  direction?: CSSProps['flexDirection'];
12
+ /**
13
+ * Space between children (maps to CSS `gap`). Accepts any valid CSS gap value,
14
+ * e.g. `8`, `'1rem'`, `'var(--ds-space-2)'`.
15
+ */
8
16
  gap?: CSSProps['gap'];
17
+ /**
18
+ * Cross-axis alignment of children (maps to CSS `align-items`).
19
+ */
9
20
  alignItems?: CSSProps['alignItems'];
21
+ /**
22
+ * Main-axis alignment of children (maps to CSS `justify-content`).
23
+ */
10
24
  justifyContent?: CSSProps['justifyContent'];
25
+ /**
26
+ * Flex shorthand applied to the stack itself (maps to CSS `flex`).
27
+ */
11
28
  flex?: CSSProps['flex'];
29
+ /**
30
+ * Whether and how children wrap onto multiple lines (maps to CSS `flex-wrap`).
31
+ */
12
32
  flexWrap?: CSSProps['flexWrap'];
33
+ /**
34
+ * Width of the stack container (maps to CSS `width`).
35
+ */
13
36
  width?: CSSProps['width'];
14
37
 
15
38
  children?: ReactNode;
@@ -1,6 +1,6 @@
1
1
  @use '../../styles/typography';
2
2
 
3
- @mixin status-filled($color, $background, $label-color: var(--color-font-on-action)) {
3
+ @mixin status-filled($color, $background, $label-color: var(--font-on-action)) {
4
4
  color: $color;
5
5
  background: $background;
6
6
 
@@ -15,7 +15,7 @@
15
15
  background: $background;
16
16
 
17
17
  .label {
18
- color: var(--color-font-main);
18
+ color: var(--font-main);
19
19
  }
20
20
  }
21
21
  }
@@ -23,55 +23,51 @@
23
23
  .container {
24
24
  display: flex;
25
25
  align-items: center;
26
- padding: var(--spacing-3xs) var(--spacing-standard) var(--spacing-3xs) var(--spacing-xs);
26
+ padding: var(--3xs) var(--standard) var(--3xs) var(--xs);
27
27
  width: max-content;
28
- color: var(--color-icon-inverse);
29
- gap: var(--spacing-3xs);
28
+ color: var(--icon-inverse);
29
+ gap: var(--3xs);
30
30
  border-radius: 100vmax;
31
31
 
32
32
  &.small {
33
- padding: var(--spacing-4xs) var(--spacing-xs) var(--spacing-4xs) var(--spacing-3xs);
34
- gap: var(--spacing-4xs);
33
+ padding: var(--4xs) var(--xs) var(--4xs) var(--3xs);
34
+ gap: var(--4xs);
35
35
  }
36
36
  }
37
37
 
38
38
  .active {
39
- @include status-filled(var(--color-font-on-action), var(--color-background-success-strong));
40
- @include status-ghost(var(--color-background-success-strong), var(--color-status-bg-success));
39
+ @include status-filled(var(--font-on-action), var(--background-success-strong));
40
+ @include status-ghost(var(--background-success-strong), var(--status-bg-success));
41
41
  }
42
42
 
43
43
  .running {
44
- @include status-filled(var(--color-font-on-action), var(--color-background-active-moderate));
45
- @include status-ghost(var(--color-icon-information-secondary), var(--color-status-bg-progress));
44
+ @include status-filled(var(--font-on-action), var(--background-active-moderate));
45
+ @include status-ghost(var(--icon-information-secondary), var(--status-bg-progress));
46
46
  }
47
47
 
48
48
  .pending {
49
- @include status-filled(var(--color-font-on-action), var(--color-data-fuchsia));
50
- @include status-ghost(var(--color-data-purple), var(--color-data-light-purple));
49
+ @include status-filled(var(--font-on-action), var(--color-dap-data-fuchsia));
50
+ @include status-ghost(var(--color-dap-data-purple), var(--color-dap-data-light-purple));
51
51
  }
52
52
 
53
53
  .draft {
54
- @include status-filled(var(--color-font-on-action), var(--color-icon-information-main));
55
- @include status-ghost(var(--color-icon-secondary), var(--color-status-bg-neutral));
54
+ @include status-filled(var(--font-on-action), var(--icon-information-main));
55
+ @include status-ghost(var(--icon-action-secondary), var(--status-bg-neutral));
56
56
  }
57
57
 
58
58
  .inactive {
59
- @include status-filled(
60
- var(--color-icon-secondary),
61
- var(--color-background-disable),
62
- var(--color-font-on-disabled)
63
- );
64
- @include status-ghost(var(--color-icon-secondary), var(--color-status-bg-inactive));
59
+ @include status-filled(var(--icon-action-secondary), var(--background-disable), var(--font-on-disabled));
60
+ @include status-ghost(var(--icon-action-secondary), var(--status-bg-inactive));
65
61
  }
66
62
 
67
63
  .warning {
68
- @include status-filled(var(--color-font-on-action), var(--color-background-warning-strong));
69
- @include status-ghost(var(--color-background-warning-strong), var(--color-status-bg-warning));
64
+ @include status-filled(var(--font-on-action), var(--background-warning-strong));
65
+ @include status-ghost(var(--background-warning-strong), var(--status-bg-warning));
70
66
  }
71
67
 
72
68
  .failed {
73
- @include status-filled(var(--color-font-on-action), var(--color-background-danger-strong));
74
- @include status-ghost(var(--color-background-danger-strong-hover), var(--color-status-bg-failed));
69
+ @include status-filled(var(--font-on-action), var(--background-error));
70
+ @include status-ghost(var(--background-error-hover), var(--background-error-secondary-hover));
75
71
  }
76
72
 
77
73
  .label::first-letter {
@@ -1,33 +1,33 @@
1
1
  @use '../../styles/mixin' as mixins;
2
2
 
3
- $step-padding: var(--spacing-sm);
4
- $step-gap: var(--spacing-standard);
5
- $step-border-radius: var(--spacing-3xs);
3
+ $step-padding: var(--sm);
4
+ $step-gap: var(--standard);
5
+ $step-border-radius: var(--3xs);
6
6
 
7
- $step-single-padding-block: var(--spacing-standard);
8
- $step-single-padding-inline-start: var(--spacing-sm);
9
- $step-single-padding-inline-end: var(--spacing-md);
10
- $step-single-border-radius: var(--spacing-xs);
7
+ $step-single-padding-block: var(--standard);
8
+ $step-single-padding-inline-start: var(--sm);
9
+ $step-single-padding-inline-end: var(--md);
10
+ $step-single-border-radius: var(--xs);
11
11
 
12
12
  $indicator-size: 36px;
13
13
  $indicator-size-single: var(--icon-width-extra-large);
14
- $indicator-border-width: var(--spacing-4xs);
14
+ $indicator-border-width: var(--4xs);
15
15
  $indicator-border-width-current: 3px;
16
- $indicator-container-padding: 0 var(--spacing-4xs);
16
+ $indicator-container-padding: 0 var(--4xs);
17
17
 
18
- $separator-width: var(--spacing-4xs);
19
- $separator-offset: var(--spacing-sm);
18
+ $separator-width: var(--4xs);
19
+ $separator-offset: var(--sm);
20
20
 
21
- $label-padding: var(--spacing-4xs) 0;
22
- $label-font-size: var(--font-size-md);
23
- $label-font-size-single: var(--font-size-sm);
21
+ $label-padding: var(--4xs) 0;
22
+ $label-font-size: var(--body-font-size-md);
23
+ $label-font-size-single: var(--body-font-size-sm);
24
24
  $label-line-height: 1.5;
25
25
  $label-font-weight: var(--font-weight-medium);
26
- $description-font-size: var(--font-size-sm);
26
+ $description-font-size: var(--body-font-size-sm);
27
27
  $description-line-height: 1.4;
28
28
 
29
- $actions-margin-top: var(--spacing-sm);
30
- $actions-gap: var(--spacing-3xs);
29
+ $actions-margin-top: var(--sm);
30
+ $actions-gap: var(--3xs);
31
31
 
32
32
  $drag-handle-size: 20px;
33
33
 
@@ -41,11 +41,11 @@ $horizontal-description-line-clamp: 2;
41
41
  flex-shrink: 0;
42
42
  width: $drag-handle-size;
43
43
  height: $drag-handle-size;
44
- color: var(--color-font-secondary);
44
+ color: var(--font-secondary);
45
45
  cursor: grab;
46
46
  }
47
47
  .root {
48
- background: var(--color-background);
48
+ background: var(--background);
49
49
  overflow-y: auto;
50
50
 
51
51
  &.floating {
@@ -84,7 +84,7 @@ $horizontal-description-line-clamp: 2;
84
84
 
85
85
  &[data-current] {
86
86
  border-radius: $step-border-radius;
87
- background: var(--color-background-action-secondary-hover);
87
+ background: var(--background-action-secondary-hover);
88
88
  }
89
89
 
90
90
  .indicatorContainer {
@@ -95,7 +95,7 @@ $horizontal-description-line-clamp: 2;
95
95
  .indicator {
96
96
  height: $indicator-size;
97
97
  width: $indicator-size;
98
- border: $indicator-border-width solid var(--color-border);
98
+ border: $indicator-border-width solid var(--border);
99
99
  display: grid;
100
100
  place-items: center;
101
101
  border-radius: 100%;
@@ -107,14 +107,14 @@ $horizontal-description-line-clamp: 2;
107
107
  }
108
108
 
109
109
  &[data-complete] .indicator {
110
- color: var(--color-background-selected);
111
- border-color: var(--color-background-selected);
110
+ color: var(--background-primary);
111
+ border-color: var(--background-primary);
112
112
  }
113
113
 
114
114
  &[data-current] .indicator {
115
- background: var(--color-background-selected);
116
- color: var(--white);
117
- border: $indicator-border-width-current solid var(--white);
115
+ background: var(--background-primary);
116
+ color: var(--color-dap-gray-050);
117
+ border: $indicator-border-width-current solid var(--color-dap-gray-050);
118
118
  }
119
119
 
120
120
  .separator {
@@ -124,15 +124,15 @@ $horizontal-description-line-clamp: 2;
124
124
  top: $indicator-size;
125
125
  left: 50%;
126
126
  margin-left: calc($separator-width / -2);
127
- background: var(--color-border);
127
+ background: var(--border);
128
128
  z-index: 10;
129
129
 
130
130
  &[data-complete] {
131
- background: var(--color-background-selected);
131
+ background: var(--background-primary);
132
132
  }
133
133
 
134
134
  &[data-current] {
135
- background: var(--color-background-selected);
135
+ background: var(--background-primary);
136
136
  }
137
137
  }
138
138
  }
@@ -153,7 +153,7 @@ $horizontal-description-line-clamp: 2;
153
153
  font-size: $label-font-size;
154
154
  line-height: $label-line-height;
155
155
  font-weight: $label-font-weight;
156
- color: var(--color-font-secondary);
156
+ color: var(--font-secondary);
157
157
 
158
158
  .root.variantSingle & {
159
159
  font-size: $label-font-size-single;
@@ -164,26 +164,26 @@ $horizontal-description-line-clamp: 2;
164
164
  margin: 0;
165
165
  font-size: $description-font-size;
166
166
  line-height: $description-line-height;
167
- color: var(--color-background-deselected);
167
+ color: var(--background-deselected);
168
168
  }
169
169
 
170
170
  &[data-current] {
171
171
  .stepLabel {
172
- color: var(--color-font-action);
172
+ color: var(--font-action);
173
173
  }
174
174
 
175
175
  .stepDescription {
176
- color: var(--color-font-main);
176
+ color: var(--font-main);
177
177
  }
178
178
  }
179
179
 
180
180
  &[data-complete] {
181
181
  .stepLabel {
182
- color: var(--color-font-main);
182
+ color: var(--font-main);
183
183
  }
184
184
 
185
185
  .stepDescription {
186
- color: var(--color-font-secondary);
186
+ color: var(--font-secondary);
187
187
  }
188
188
  }
189
189
 
@@ -200,20 +200,20 @@ $horizontal-description-line-clamp: 2;
200
200
 
201
201
  .step[data-error] {
202
202
  .indicatorContainer .indicator {
203
- background: var(--color-background-danger-weak);
204
- color: var(--color-background-danger-strong);
205
- border-color: var(--color-background-danger-strong);
203
+ background: var(--background-error-secondary-hover);
204
+ color: var(--background-error);
205
+ border-color: var(--background-error);
206
206
  }
207
207
 
208
208
  .stepLabel {
209
- color: var(--color-font-danger);
209
+ color: var(--font-error);
210
210
  }
211
211
  }
212
212
 
213
213
  .root[data-orientation='horizontal'] {
214
214
  display: flex;
215
215
  align-items: center;
216
- padding: var(--spacing-xs) var(--spacing-standard);
216
+ padding: var(--xs) var(--standard);
217
217
 
218
218
  .stepsContainer {
219
219
  display: flex;
@@ -227,16 +227,16 @@ $horizontal-description-line-clamp: 2;
227
227
  display: flex;
228
228
  align-items: center;
229
229
  flex-shrink: 0;
230
- padding-inline-start: var(--spacing-xs);
230
+ padding-inline-start: var(--xs);
231
231
  }
232
232
 
233
233
  .step {
234
234
  flex: 1 1 0;
235
235
  align-self: stretch;
236
236
  align-items: center;
237
- padding: var(--spacing-3xs) var(--spacing-xs);
238
- gap: var(--spacing-sm);
239
- border-radius: var(--spacing-2xs);
237
+ padding: var(--3xs) var(--xs);
238
+ gap: var(--sm);
239
+ border-radius: var(--2xs);
240
240
  overflow: clip;
241
241
  min-width: $horizontal-other-min-width;
242
242
 
@@ -244,7 +244,7 @@ $horizontal-description-line-clamp: 2;
244
244
  flex-grow: 2;
245
245
  max-width: none;
246
246
  min-width: $horizontal-current-min-width;
247
- border-radius: var(--spacing-2xs);
247
+ border-radius: var(--2xs);
248
248
 
249
249
  .stepLabel {
250
250
  flex-shrink: 0;
@@ -268,15 +268,15 @@ $horizontal-description-line-clamp: 2;
268
268
  .stepLabelRow {
269
269
  display: flex;
270
270
  align-items: center;
271
- gap: var(--spacing-sm);
271
+ gap: var(--sm);
272
272
  height: $indicator-size;
273
273
  min-width: 0;
274
274
  }
275
275
 
276
276
  .stepLabel {
277
277
  padding: 0;
278
- font-size: var(--font-size-sm);
279
- line-height: var(--line-height-sm);
278
+ font-size: var(--body-font-size-sm);
279
+ line-height: var(--body-line-height-small);
280
280
  white-space: nowrap;
281
281
  overflow: hidden;
282
282
  text-overflow: ellipsis;
@@ -285,23 +285,23 @@ $horizontal-description-line-clamp: 2;
285
285
 
286
286
  .horizontalSeparator {
287
287
  flex: 1 1 0;
288
- height: var(--spacing-4xs);
288
+ height: var(--4xs);
289
289
  min-width: 0;
290
- background: var(--color-border-contrast);
290
+ background: var(--border-contrast);
291
291
 
292
292
  &[data-complete] {
293
- background: var(--color-background-selected);
293
+ background: var(--background-primary);
294
294
  }
295
295
 
296
296
  &[data-current] {
297
- background: var(--color-outline-moderate);
297
+ background: var(--outline-moderate);
298
298
  }
299
299
  }
300
300
 
301
301
  .stepDescription {
302
- font-size: var(--font-size-xs);
303
- line-height: var(--line-height-xs);
304
- max-height: var(--spacing-8);
302
+ font-size: var(--body-font-size-xs);
303
+ line-height: var(--body-line-height-xs);
304
+ max-height: var(--xl);
305
305
  overflow: hidden;
306
306
  display: -webkit-box;
307
307
  -webkit-line-clamp: $horizontal-description-line-clamp;
@@ -7,16 +7,49 @@ export type DsStepperOrientation = 'horizontal' | 'vertical';
7
7
 
8
8
  export type DsStepperProps = PropsWithChildren<
9
9
  {
10
+ /**
11
+ * Visual variant of the stepper. Currently only `single` is supported.
12
+ * @default single
13
+ */
10
14
  variant?: DsStepperVariant;
15
+ /**
16
+ * Layout orientation of the stepper.
17
+ * @default horizontal
18
+ */
11
19
  orientation?: DsStepperOrientation;
20
+ /**
21
+ * When `true`, renders the stepper as a floating overlay (typically pinned
22
+ * to the bottom of the viewport) instead of inline in the layout.
23
+ * @default false
24
+ */
12
25
  floating?: boolean;
26
+ /**
27
+ * Called when the final step completes (i.e., the user finishes the last step).
28
+ */
13
29
  onComplete?: steps.Props['onStepComplete'];
30
+ /**
31
+ * Zero-based index of the currently active step (controlled). Pair with
32
+ * `onStepChange`.
33
+ */
14
34
  activeStep?: steps.Props['step'];
35
+ /**
36
+ * Additional CSS class name applied to the stepper root.
37
+ */
15
38
  className?: string;
16
39
  /**
17
40
  * Optional actions rendered at the end of the stepper.
18
41
  * Horizontal: displayed after the steps. Vertical: displayed at the bottom.
19
42
  */
20
43
  actions?: ReactNode;
21
- } & Pick<steps.Props, 'onStepChange' | 'count'>
44
+ } & Pick<steps.Props, 'onStepChange' | 'count'> & {
45
+ /**
46
+ * Called when the active step changes. Receives the zag-js step-change
47
+ * details including the new index.
48
+ */
49
+ onStepChange?: steps.Props['onStepChange'];
50
+ /**
51
+ * Total number of steps in the stepper.
52
+ */
53
+ count?: steps.Props['count'];
54
+ }
22
55
  >;