Skip to content

Commit 8723a60

Browse files
feat(design-system): migrate DS codebase to new tokens (Step 3) [AR-60245] (#449)
# Phase 3 — Removed tokens (apply) > Replacements were chosen manually in `step-3-removed-prep.md`. Visual testing required for affected components. ## Summary - Files scanned: 780 - Files changed: 1 - Total replacements: 1 - Tokens replaced: 12 - Tokens kept (KEEP): 10 ## Replacement decisions | Old token | Replacement | | --------- | ----------- | | `--color-gradient-violet-background` | `linear-gradient(90deg, #001b48 -0.12%, #312e81 99.86%)` | | `--color-gradient-violet-transparent` | `linear-gradient( 180deg, rgba(30, 89, 215, 0.4) 0%, rgba(0, 27, 72, 0.16) 100% )` | | `--color-gradient-blue-light` | `linear-gradient(116deg, #e9eefc 22.81%, #d6e2ff 99.14%)` | | `--color-gradient-linear-1` | `linear-gradient(90deg, #014afb 0%, #152a7e 100%)` | | `--color-marker-magenta-12` | `rgba(255, 0, 183, 0.12)` | | `--color-marker-magenta-60` | `rgba(255, 0, 183, 0.6)` | | `--color-marker-magenta-100` | `rgba(255, 0, 183)` | | `--gradient-violet-background` | `linear-gradient(90deg, #001b48 -0.12%, #312e81 99.86%)` | | `--gradient-violet-transparent` | `linear-gradient(180deg, rgba(30, 89, 215, 0.4) 0%, rgba(0, 27, 72, 0.16) 100%)` | | `--gradient-blue-light` | `linear-gradient(116deg, #e9eefc 22.81%, #d6e2ff 99.14%)` | | `--spacing-10` | `40px` | | `--exo-spacing-4x-small` | `1px` | ### Kept (KEEP) - `--letter-spacing--1percent` — old definition stays in place. - `--icon-width-extra-large` — old definition stays in place. - `--icon-width-large` — old definition stays in place. - `--icon-width-medium` — old definition stays in place. - `--icon-width-small` — old definition stays in place. - `--icon-width-tiny` — old definition stays in place. - `--ds-table-row-small` — old definition stays in place. - `--ds-table-row-medium` — old definition stays in place. - `--ds-table-row-large` — old definition stays in place. - `--ds-table-header-height` — old definition stays in place. ## Replacements per token | Old token | Replacements | | --------- | ------------ | | `--exo-spacing-4x-small` | 1 | ## Affected files (grouped by component) ### `ds-file-upload` (1 replacements) - `packages/design-system/src/components/ds-file-upload/components/file-upload/file-upload.module.scss` — `--exo-spacing-4x-small`×1 ## Visual retest checklist - [x] **ds-file-upload** — Visual check: tokens involved — `--exo-spacing-4x-small` (replaced: `--exo-spacing-4x-small`) # Phase 2 — Changed tokens > Renamed AND value differs. Visual testing required for affected components. ## Summary - Files scanned: 780 - Files changed: 28 - Total replacements: 116 - Same-name Changed tokens (no rename, just retest): 2 - Affected components: 21 ## Value-change reference | Token mapping | Old value | New value | | ------------- | --------- | --------- | | `--color-red-100 → --color-dap-red-100` | `#f5c2bf` | `#ffd2cf` | | `--color-negative-100 → --negative-100` | `#f5c2bf` | `#ffd2cf` | | `--color-background-success → --background-success` | `#ecfdf6` green-50 | `#d9f7e9` green-075 | | `--color-status-bg-success → --status-bg-success` | `#ecfdf6` green-50 | `#d9f7e9` green-075 | | `--color-border-disabled → --border-disabled` | `#e5e8ed` brand-050 | `#c7c9cc` gray-300 | | `--color-border-danger-weak → --border-error-weak` | `#f5c2bf` | `#ffd2cf` | | `--color-font-disabled → --font-disabled` | `#8b98a6` gray-500 | `#c7c9cc` gray-300 | | `--color-icon-danger → --icon-error` | `#d70a00` red-400 | `#a10800` red-500 | | `--font-family-base (same name)` | `'Roboto', sans-serif` | `Roboto` | | `--font-family-code (same name)` | `'Fira Mono', monospace` | `Fira Mono` | | `--paragraph-spacing-* → --*-paragraph-space-*` | `unitless integer (e.g. 8)` | `px (e.g. 8px)` | ## Same-name Changed tokens (value differs, no rename) ### `--font-family-base` — 6 usages - `packages/design-system/src/components/ds-button-v3/ds-button-v3.module.scss` (lines 23) - `packages/design-system/src/components/ds-button-v3/ds-button-v3.stories.module.scss` (lines 16, 33, 50) - `packages/design-system/src/styles/_root_new.scss` (lines 447) - `packages/design-system/src/styles/_typography.scss` (lines 140) ### `--font-family-code` — 6 usages - `packages/design-system/src/components/ds-typography/ds-typography.stories.module.scss` (lines 9) - `packages/design-system/src/stories/colors.module.scss` (lines 58, 72) - `packages/design-system/src/stories/stories-common.module.scss` (lines 76) - `packages/design-system/src/styles/_root_new.scss` (lines 448) - `packages/design-system/src/styles/_typography.scss` (lines 155) ## Replacements per token | Old token | Replacements | | --------- | ------------ | | `--exo-spacing-2x-small` | 31 | | `--action-cta1` | 12 | | `--system-status-error` | 6 | | `--neutral-6` | 6 | | `--spacing-8` | 5 | | `--neutral-3` | 4 | | `--system-status-info` | 4 | | `--system-status-ok` | 4 | | `--action-active-light` | 3 | | `--action-disabled` | 3 | | `--utility-error` | 3 | | `--exo-spacing-x-small` | 3 | | `--spacing-2` | 3 | | `--action-hover-light` | 2 | | `--utility-disabled` | 2 | | `--spacing-1` | 2 | | `--spacing-3` | 2 | | `--spacing-6` | 2 | | `--system-status-in-progress` | 2 | | `--system-status-pending` | 2 | | `--system-status-alert` | 2 | | `--spacing-4` | 2 | | `--action-cta3` | 1 | | `--exo-spacing-standard` | 1 | | `--exo-spacing-small` | 1 | | `--neutral-7` | 1 | | `--color-status-bg-failed` | 1 | | `--utility-in-progress` | 1 | | `--utility-pending` | 1 | | `--utility-alert` | 1 | | `--utility-info` | 1 | | `--utility-ok` | 1 | | `--neutral-8` | 1 | ## Affected files (grouped by component) ### `ds-alert-banner` (3 replacements) - `packages/design-system/src/components/ds-alert-banner/stories/ds-alert-banner.stories.module.scss` — `--exo-spacing-2x-small`×3 ### `ds-breadcrumb` (5 replacements) - `packages/design-system/src/components/ds-breadcrumb/ds-breadcrumb.module.scss` — `--exo-spacing-2x-small`×5 ### `ds-button` (21 replacements) - `packages/design-system/src/components/ds-button/versions/ds-button-legacy/ds-button-legacy.module.scss` — `--action-active-light`×1, `--system-status-error`×1, `--action-hover-light`×1, `--utility-disabled`×1, `--action-disabled`×3, `--utility-error`×2, `--action-cta1`×1, `--action-cta3`×1 - `packages/design-system/src/components/ds-button/versions/ds-button-new/ds-button-new.module.scss` — `--exo-spacing-2x-small`×10 ### `ds-dialog` (2 replacements) - `packages/design-system/src/components/ds-dialog/ds-dialog.module.scss` — `--neutral-3`×1 - `packages/design-system/src/components/ds-dialog/ds-dialog.stories.module.scss` — `--action-cta1`×1 ### `ds-dropdown-menu` (1 replacements) - `packages/design-system/src/components/ds-dropdown-menu/ds-dropdown-menu.stories.scss` — `--action-cta1`×1 ### `ds-file-upload` (9 replacements) - `packages/design-system/src/components/ds-file-upload/components/file-upload-item/file-upload-item.module.scss` — `--exo-spacing-2x-small`×2, `--exo-spacing-x-small`×1 - `packages/design-system/src/components/ds-file-upload/components/file-upload/file-upload.module.scss` — `--exo-spacing-standard`×1, `--exo-spacing-2x-small`×2, `--exo-spacing-x-small`×2, `--exo-spacing-small`×1 ### `ds-form-control` (9 replacements) - `packages/design-system/src/components/ds-form-control/ds-form-control.module.scss` — `--neutral-3`×1 - `packages/design-system/src/components/ds-form-control/stories/ds-form-control.stories.module.scss` — `--action-cta1`×1, `--neutral-3`×1 - `packages/design-system/src/components/ds-form-control/stories/ds-form-control.stories.tsx` — `--action-cta1`×5, `--neutral-3`×1 ### `ds-grid` (1 replacements) - `packages/design-system/src/components/ds-grid/ds-grid.stories.scss` — `--neutral-7`×1 ### `ds-panel` (6 replacements) - `packages/design-system/src/components/ds-panel/ds-panel.module.scss` — `--spacing-1`×1, `--spacing-2`×1, `--spacing-3`×2, `--spacing-6`×2 ### `ds-progress-arc` (3 replacements) - `packages/design-system/src/components/ds-progress-arc/ds-progress-arc.stories.module.scss` — `--spacing-2`×1, `--spacing-8`×2 ### `ds-progress-donut` (3 replacements) - `packages/design-system/src/components/ds-progress-donut/ds-progress-donut.stories.module.scss` — `--spacing-2`×1, `--spacing-8`×2 ### `ds-status-badge` (1 replacements) - `packages/design-system/src/components/ds-status-badge/ds-status-badge.module.scss` — `--color-status-bg-failed`×1 ### `ds-stepper` (1 replacements) - `packages/design-system/src/components/ds-stepper/ds-stepper.module.scss` — `--spacing-8`×1 ### `ds-system-status` (19 replacements) - `packages/design-system/src/components/ds-system-status/ds-system-status.module.scss` — `--system-status-in-progress`×2, `--system-status-pending`×2, `--system-status-error`×2, `--system-status-alert`×2, `--utility-in-progress`×1, `--system-status-info`×2, `--system-status-ok`×2, `--utility-disabled`×1, `--utility-pending`×1, `--utility-error`×1, `--utility-alert`×1, `--utility-info`×1, `--utility-ok`×1 ### `ds-table` (17 replacements) - `packages/design-system/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.module.scss` — `--action-cta1`×1, `--neutral-6`×2 - `packages/design-system/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss` — `--neutral-6`×1 - `packages/design-system/src/components/ds-table/components/ds-table-row/ds-table-row.tsx` — `--action-active-light`×1 - `packages/design-system/src/components/ds-table/ds-table.module.scss` — `--neutral-6`×1 - `packages/design-system/src/components/ds-table/stories/components/progress-infographic/progress-infographic.module.scss` — `--system-status-error`×1, `--system-status-info`×1, `--system-status-ok`×1, `--neutral-6`×1 - `packages/design-system/src/components/ds-table/stories/ds-table.stories.module.scss` — `--system-status-error`×2, `--system-status-info`×1, `--system-status-ok`×1, `--spacing-1`×1, `--spacing-4`×2 ### `ds-tabs` (8 replacements) - `packages/design-system/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.scss` — `--exo-spacing-2x-small`×8 ### `ds-tooltip` (1 replacements) - `packages/design-system/src/components/ds-tooltip/ds-tooltip.module.scss` — `--exo-spacing-2x-small`×1 ### `styles` (6 replacements) - `packages/design-system/src/styles/mixins/_list.scss` — `--action-active-light`×1, `--action-hover-light`×1, `--action-cta1`×2, `--neutral-6`×1, `--neutral-8`×1 ## Visual retest checklist - [x] **ds-alert-banner** — Visual check: tokens involved — `--exo-spacing-2x-small` - [x] **ds-breadcrumb** — Visual check: tokens involved — `--exo-spacing-2x-small` - [x] **ds-button** — Verify: disabled states (background, border, font tone) - [x] **ds-button-v3** — Verify: font fallback chain (Roboto / Fira Mono now bare) - [x] **ds-dialog** — Visual check: tokens involved — `--neutral-3`, `--action-cta1` - [x] **ds-dropdown-menu** — Visual check: tokens involved — `--action-cta1` - [x] **ds-file-upload** — Visual check: tokens involved — `--exo-spacing-standard`, `--exo-spacing-2x-small`, `--exo-spacing-x-small`, `--exo-spacing-small` - [x] **ds-form-control** — Visual check: tokens involved — `--neutral-3`, `--action-cta1` - [x] **ds-grid** — Visual check: tokens involved — `--neutral-7` - [x] **ds-panel** — Visual check: tokens involved — `--spacing-1`, `--spacing-2`, `--spacing-3`, `--spacing-6` - [x] **ds-progress-arc** — Visual check: tokens involved — `--spacing-2`, `--spacing-8` - [x] **ds-progress-donut** — Visual check: tokens involved — `--spacing-2`, `--spacing-8` - [x] **ds-status-badge** — Visual check: tokens involved — `--color-status-bg-failed` - [x] **ds-stepper** — Visual check: tokens involved — `--spacing-8` - [x] **ds-system-status** — Verify: disabled states (background, border, font tone) - [x] **ds-table** — Visual check: tokens involved — `--action-cta1`, `--neutral-6`, `--action-active-light`, `--system-status-error`, `--system-status-info`, `--system-status-ok`, `--spacing-1`, `--spacing-4` - [x] **ds-tabs** — Visual check: tokens involved — `--exo-spacing-2x-small` - [x] **ds-tooltip** — Visual check: tokens involved — `--exo-spacing-2x-small` - [x] **ds-typography** — Verify: font fallback chain (Roboto / Fira Mono now bare) - [x] **stories** — Verify: font fallback chain (Roboto / Fira Mono now bare) - [x] **styles** — Verify: font fallback chain (Roboto / Fira Mono now bare)
1 parent 6a917f0 commit 8723a60

33 files changed

Lines changed: 344 additions & 259 deletions

File tree

.changeset/polite-glasses-shine.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@drivenets/design-system': minor
3+
---
4+
5+
Migrate DS codebase to new tokens

packages/design-system/src/components/ds-alert-banner/stories/ds-alert-banner.stories.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
button.primary {
3333
display: flex;
34-
padding: var(---exo-spacing-2x-small, 4px) var(--sm, 12px);
34+
padding: var(---3xs, 4px) var(--sm, 12px);
3535
align-items: center;
36-
gap: var(---exo-spacing-2x-small, 4px);
36+
gap: var(---3xs, 4px);
3737
align-self: stretch;
38-
border-radius: var(---exo-spacing-2x-small, 4px);
38+
border-radius: var(---3xs, 4px);
3939
border: 1px solid var(--border);
4040
background: var(--background);
4141
}

packages/design-system/src/components/ds-breadcrumb/ds-breadcrumb.module.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
color: var(--background-action);
66
text-decoration: none;
77
outline: none;
8-
padding: var(--exo-spacing-2x-small) var(--sm);
9-
gap: var(--exo-spacing-2x-small);
10-
border-radius: var(--exo-spacing-2x-small);
8+
padding: var(--3xs) var(--sm);
9+
gap: var(--3xs);
10+
border-radius: var(--3xs);
1111
display: flex;
1212
align-items: center;
1313

@@ -82,13 +82,13 @@
8282
}
8383

8484
.icon {
85-
margin-right: var(--exo-spacing-2x-small);
85+
margin-right: var(--3xs);
8686
display: flex;
8787
align-items: center;
8888
}
8989

9090
.dropdownIcon {
91-
margin-left: var(--exo-spacing-2x-small);
91+
margin-left: var(--3xs);
9292
display: flex;
9393
align-items: center;
9494
}

packages/design-system/src/components/ds-button/versions/ds-button-legacy/ds-button-legacy.module.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
@use '../../../../styles/typography';
22

3-
$color-primary-default: var(--action-cta1);
4-
$color-primary-hover: var(--action-hover-light);
5-
$color-primary-active: var(--action-active-light);
6-
$color-primary-disabled: var(--action-disabled);
3+
$color-primary-default: var(--color-dap-blue-600);
4+
$color-primary-hover: var(--background-active-status);
5+
$color-primary-active: var(--color-dap-purple-200);
6+
$color-primary-disabled: var(--color-dap-gray-400);
77

8-
$color-secondary-default: var(--action-cta3);
8+
$color-secondary-default: var(--color-dap-brand-300);
99
$color-secondary-hover: var(--color-dap-gray-500);
10-
$color-secondary-disabled: var(--action-disabled);
10+
$color-secondary-disabled: var(--color-dap-gray-400);
1111

12-
$color-error-default: var(--system-status-error);
13-
$color-error-hover: var(--utility-error);
14-
$color-error-active: var(--utility-error);
15-
$color-error-disabled: var(--action-disabled);
12+
$color-error-default: var(--background-error);
13+
$color-error-hover: var(--color-dap-red-100);
14+
$color-error-active: var(--color-dap-red-100);
15+
$color-error-disabled: var(--color-dap-gray-400);
1616

1717
$color-white: var(--color-dap-gray-050);
18-
$color-neutral-6: var(--utility-disabled);
18+
$color-neutral-6: var(--color-dap-gray-200);
1919
$color-neutral-4: var(--color-dap-gray-500);
2020

2121
@mixin button-filled($background, $hover, $active, $disabled) {

packages/design-system/src/components/ds-button/versions/ds-button-new/ds-button-new.module.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ $button-size-large: 40px;
3838
padding-block: 0;
3939
padding-inline: 0;
4040
border: 2px solid transparent;
41-
border-radius: var(--exo-spacing-2x-small);
41+
border-radius: var(--3xs);
4242

4343
.content {
4444
display: flex;
4545
align-items: center;
4646
justify-content: center;
47-
gap: var(--exo-spacing-2x-small);
47+
gap: var(--3xs);
4848
padding: 0 var(--sm);
4949
border: 1px solid transparent;
50-
border-radius: var(--exo-spacing-2x-small);
50+
border-radius: var(--3xs);
5151
flex-grow: 1;
5252
}
5353

@@ -116,7 +116,7 @@ $button-size-large: 40px;
116116

117117
.content {
118118
border-color: var(--background);
119-
border-radius: calc(var(--exo-spacing-2x-small) / 2);
119+
border-radius: calc(var(--3xs) / 2);
120120
}
121121
}
122122

@@ -207,7 +207,7 @@ $button-size-large: 40px;
207207
.content {
208208
border-color: var(--background);
209209
background: var(--background-action-hover-weak);
210-
border-radius: calc(var(--exo-spacing-2x-small) / 2);
210+
border-radius: calc(var(--3xs) / 2);
211211
}
212212
}
213213

@@ -318,7 +318,7 @@ $button-size-large: 40px;
318318

319319
.content {
320320
border-color: var(--background);
321-
border-radius: calc(var(--exo-spacing-2x-small) / 2);
321+
border-radius: calc(var(--3xs) / 2);
322322
}
323323
}
324324

@@ -448,7 +448,7 @@ $button-size-large: 40px;
448448

449449
.content {
450450
border-color: var(--font-on-action);
451-
border-radius: calc(var(--exo-spacing-2x-small) / 2);
451+
border-radius: calc(var(--3xs) / 2);
452452
}
453453
}
454454

@@ -496,7 +496,7 @@ $button-size-large: 40px;
496496
border-color: transparent;
497497
background: var(--light-buttons-secondary-background);
498498
color: var(--light-buttons-secondary-hover);
499-
border-radius: calc(var(--exo-spacing-2x-small) / 2);
499+
border-radius: calc(var(--3xs) / 2);
500500
}
501501
}
502502

@@ -544,7 +544,7 @@ $button-size-large: 40px;
544544
.content {
545545
background: var(--Dark-Buttons-secondary-light-hover-background);
546546
color: var(--light-buttons-tertiary);
547-
border-radius: var(--exo-spacing-2x-small);
547+
border-radius: var(--3xs);
548548
}
549549
}
550550

@@ -592,7 +592,7 @@ $button-size-large: 40px;
592592
.content {
593593
background: var(--Dark-Buttons-secondary-light-hover-background);
594594
color: var(--light-buttons-tertiary);
595-
border-radius: var(--exo-spacing-2x-small);
595+
border-radius: var(--3xs);
596596
}
597597
}
598598

packages/design-system/src/components/ds-dialog/ds-dialog.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
.description {
4141
@include typography.p-base;
42-
color: var(--neutral-3);
42+
color: var(--color-dap-gray-500);
4343
margin-bottom: 16px;
4444
}
4545

packages/design-system/src/components/ds-dialog/ds-dialog.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
top: 20px;
1212
left: 20px;
1313
z-index: 1;
14-
color: var(--action-cta1);
14+
color: var(--color-dap-blue-600);
1515
}

packages/design-system/src/components/ds-dropdown-menu/ds-dropdown-menu.stories.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818

1919
&:hover {
20-
border-color: var(--action-cta1);
20+
border-color: var(--color-dap-blue-600);
2121
}
2222

2323
span {

packages/design-system/src/components/ds-file-upload/components/file-upload-item/file-upload-item.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
gap: var(--2xs);
1111
width: 100%;
1212
background-color: var(--background);
13-
padding: var(--4xs) var(--exo-spacing-x-small);
13+
padding: var(--4xs) var(--xs);
1414
border: 1px solid transparent;
15-
border-radius: var(--exo-spacing-2x-small);
15+
border-radius: var(--3xs);
1616
transition: all 0.2s ease;
1717

1818
&:hover {
@@ -86,7 +86,7 @@
8686
width: 100%;
8787
height: 100%;
8888
background-color: var(--background-tertiary);
89-
border-radius: var(--exo-spacing-2x-small);
89+
border-radius: var(--3xs);
9090
overflow: hidden;
9191
}
9292

packages/design-system/src/components/ds-file-upload/components/file-upload/file-upload.module.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
flex-direction: column;
1212
align-items: center;
1313
justify-content: center;
14-
padding: var(--exo-spacing-small) var(--exo-spacing-standard);
15-
border: var(--exo-spacing-4x-small) dashed var(--border);
16-
border-radius: var(--exo-spacing-2x-small);
14+
padding: var(--sm) var(--standard);
15+
border: 1px dashed var(--border);
16+
border-radius: var(--3xs);
1717
background-color: var(--background);
1818
transition: all 0.2s ease;
1919
cursor: pointer;
@@ -69,10 +69,10 @@
6969
.fileList {
7070
display: flex;
7171
flex-direction: column;
72-
gap: var(--exo-spacing-x-small);
73-
margin-top: var(--exo-spacing-x-small);
72+
gap: var(--xs);
73+
margin-top: var(--xs);
7474
padding: var(--xs);
75-
border-radius: var(--exo-spacing-2x-small);
75+
border-radius: var(--3xs);
7676
background: var(--background-secondary);
7777
}
7878

0 commit comments

Comments
 (0)