Skip to content

Commit 05f5a20

Browse files
committed
Add more color mappings
1 parent 049321f commit 05f5a20

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

polaris-migrator/src/migrations/replace-sass-color/color-maps.ts

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable line-comment-position */
21
import type {Exact} from 'type-fest';
32

43
export interface ColorHue {
@@ -44,14 +43,25 @@ export const colorMap = createMap({
4443
});
4544

4645
export const backgroundColorMap = createMap({
46+
ink: {
47+
lighter: '--p-surface-neutral',
48+
},
4749
green: {
4850
base: '--p-surface-success',
4951
light: '--p-surface-success-subdued',
5052
},
53+
yellow: {
54+
base: '--p-surface-warning',
55+
light: '--p-surface-warning-subdued',
56+
},
57+
red: {
58+
base: '--p-surface-critical',
59+
light: '--p-surface-critical-subdued',
60+
},
5161
sky: {
5262
base: '--p-surface-neutral',
53-
light: '--p-surface-subdued',
54-
lighter: '--p-surface-selected', // or --p-surface-disabled
63+
light: '--p-surface-neutral-subdued',
64+
lighter: '--p-surface-subdued',
5565
},
5666
black: {
5767
base: '--p-surface-dark',
@@ -63,14 +73,28 @@ export const backgroundColorMap = createMap({
6373

6474
export const borderColorMap = createMap({
6575
indigo: {
66-
base: '--p-interactive', // or --p-border-disabled
76+
base: '--p-interactive',
6777
},
6878
blue: {
6979
base: '--p-border-subdued',
7080
},
81+
green: {
82+
dark: '--p-border-success',
83+
base: '--p-border-success',
84+
light: '--p-border-success-disabled',
85+
lighter: '--p-border-success-subdued',
86+
},
87+
yellow: {
88+
dark: '--p-border-warning',
89+
base: '--p-border-warning',
90+
light: '--p-border-warning-disabled',
91+
lighter: '--p-border-warning-subdued',
92+
},
7193
red: {
7294
dark: '--p-border-critical',
7395
base: '--p-border-critical',
96+
light: '--p-border-critical-disabled',
97+
lighter: '--p-border-critical-subdued',
7498
},
7599
sky: {
76100
base: '--p-border-subdued',

0 commit comments

Comments
 (0)