@drivy/cobalt 0.30.0 → 0.31.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.
@@ -4,241 +4,241 @@
4
4
  /**********************************/
5
5
  $theme-colors-map: (
6
6
  background: (
7
- primary: var(--c-white),
8
- secondary: var(--c-white),
7
+ primary: var(--c-background-primary),
8
+ secondary: var(--c-background-secondary),
9
9
  secondaryInteractive: (
10
- DEFAULT: var(--c-white),
11
- hover: var(--c-navy-50)
10
+ DEFAULT: var(--c-background-secondaryInteractive),
11
+ hover: var(--c-background-secondaryInteractive--hover)
12
12
  ),
13
- accent: var(--c-purple-500),
13
+ accent: var(--c-background-accent),
14
14
  accentInteractive: (
15
- DEFAULT: var(--c-purple-500),
16
- hover: var(--c-purple-700)
15
+ DEFAULT: var(--c-background-accentInteractive),
16
+ hover: var(--c-background-accentInteractive--hover)
17
17
  ),
18
- accentAlt: var(--c-purple-100),
18
+ accentAlt: var(--c-background-accentAlt),
19
19
  accentAltInteractive: (
20
- DEFAULT: var(--c-purple-100),
21
- hover: var(--c-purpleLight-100)
20
+ DEFAULT: var(--c-background-accentAltInteractive),
21
+ hover: var(--c-background-accentAltInteractive--hover)
22
22
  ),
23
- info: var(--c-yellow-100),
24
- error: var(--c-red-500),
23
+ info: var(--c-background-info),
24
+ error: var(--c-background-error),
25
25
  errorInteractive: (
26
- DEFAULT: var(--c-red-500),
27
- hover: var(--c-red-700)
26
+ DEFAULT: var(--c-background-errorInteractive),
27
+ hover: var(--c-background-errorInteractive--hover)
28
28
  ),
29
- errorAlt: var(--c-red-100),
30
- success: var(--c-green-700),
31
- successAlt: var(--c-green-100),
32
- connect: var(--c-turquoise-500),
29
+ errorAlt: var(--c-background-errorAlt),
30
+ success: var(--c-background-success),
31
+ successAlt: var(--c-background-successAlt),
32
+ connect: var(--c-background-connect),
33
33
  connectInteractive: (
34
- DEFAULT: var(--c-turquoise-500),
35
- hover: var(--c-turquoise-700)
36
- ),
37
- connectAlt: var(--c-turquoise-50),
38
- driver: var(--c-yellow-500),
39
- owner: var(--c-navy-700),
40
- disabled: var(--c-navy-100),
41
- neutral: var(--c-navy-100),
42
- neutralAlt: var(--c-navy-50),
43
- seasonLow: var(--c-season-100),
44
- seasonMedium: var(--c-season-200),
45
- seasonHigh: var(--c-season-300),
46
- seasonVeryHigh: var(--c-season-400)
34
+ DEFAULT: var(--c-background-connectInteractive),
35
+ hover: var(--c-background-connectInteractive--hover)
36
+ ),
37
+ connectAlt: var(--c-background-connectAlt),
38
+ driver: var(--c-background-driver),
39
+ owner: var(--c-background-owner),
40
+ disabled: var(--c-background-disabled),
41
+ neutral: var(--c-background-neutral),
42
+ neutralAlt: var(--c-background-neutralAlt),
43
+ seasonLow: var(--c-background-seasonLow),
44
+ seasonMedium: var(--c-background-seasonMedium),
45
+ seasonHigh: var(--c-background-seasonHigh),
46
+ seasonVeryHigh: var(--c-background-seasonVeryHigh)
47
47
  ),
48
48
  text: (
49
- base: var(--c-navy-700),
49
+ base: var(--c-text-base),
50
50
  baseInteractive: (
51
- DEFAULT: var(--c-navy-700),
52
- hover: var(--c-navy-300)
51
+ DEFAULT: var(--c-text-baseInteractive),
52
+ hover: var(--c-text-baseInteractive--hover)
53
53
  ),
54
- subdued: var(--c-navy-300),
54
+ subdued: var(--c-text-subdued),
55
55
  subduedInteractive: (
56
- DEFAULT: var(--c-navy-300),
57
- hover: var(--c-navy-500)
56
+ DEFAULT: var(--c-text-subduedInteractive),
57
+ hover: var(--c-text-subduedInteractive--hover)
58
58
  ),
59
- accent: var(--c-purple-500),
59
+ accent: var(--c-text-accent),
60
60
  accentInteractive: (
61
- DEFAULT: var(--c-purple-500),
62
- hover: var(--c-purple-700)
61
+ DEFAULT: var(--c-text-accentInteractive),
62
+ hover: var(--c-text-accentInteractive--hover)
63
63
  ),
64
- accentAlt: var(--c-purple-500),
64
+ accentAlt: var(--c-text-accentAlt),
65
65
  accentAltInteractive: (
66
- DEFAULT: var(--c-purple-500),
67
- hover: var(--c-purple-700)
68
- ),
69
- info: var(--c-yellow-900),
70
- infoAlt: var(--c-yellow-500),
71
- error: var(--c-red-500),
72
- errorAlt: var(--c-red-500),
73
- success: var(--c-green-700),
74
- successAlt: var(--c-green-900),
75
- warning: var(--c-orange-500),
76
- connect: var(--c-turquoise-500),
77
- driver: var(--c-navy-700),
78
- owner: var(--c-white),
79
- inversed: var(--c-white)
66
+ DEFAULT: var(--c-text-accentAltInteractive),
67
+ hover: var(--c-text-accentAltInteractive--hover)
68
+ ),
69
+ info: var(--c-text-info),
70
+ infoAlt: var(--c-text-infoAlt),
71
+ error: var(--c-text-error),
72
+ errorAlt: var(--c-text-errorAlt),
73
+ success: var(--c-text-success),
74
+ successAlt: var(--c-text-successAlt),
75
+ warning: var(--c-text-warning),
76
+ connect: var(--c-text-connect),
77
+ driver: var(--c-text-driver),
78
+ owner: var(--c-text-owner),
79
+ inversed: var(--c-text-inversed)
80
80
  ),
81
81
  buttonBackground: (
82
- selected: var(--c-purple-100),
82
+ selected: var(--c-buttonBackground-selected),
83
83
  destructiveInteractive: (
84
- DEFAULT: var(--c-red-100),
85
- hover: var(--c-red-120),
86
- press: var(--c-red-150)
84
+ DEFAULT: var(--c-buttonBackground-destructiveInteractive),
85
+ hover: var(--c-buttonBackground-destructiveInteractive--hover),
86
+ press: var(--c-buttonBackground-destructiveInteractive--press)
87
87
  ),
88
- disabled: var(--c-navy-100),
88
+ disabled: var(--c-buttonBackground-disabled),
89
89
  primaryInteractive: (
90
- DEFAULT: var(--c-purple-500),
91
- hover: var(--c-purple-700),
92
- press: var(--c-purple-900)
90
+ DEFAULT: var(--c-buttonBackground-primaryInteractive),
91
+ hover: var(--c-buttonBackground-primaryInteractive--hover),
92
+ press: var(--c-buttonBackground-primaryInteractive--press)
93
93
  ),
94
94
  secondaryInteractive: (
95
- DEFAULT: var(--c-white),
96
- hover: var(--c-white),
97
- press: var(--c-white)
95
+ DEFAULT: var(--c-buttonBackground-secondaryInteractive),
96
+ hover: var(--c-buttonBackground-secondaryInteractive--hover),
97
+ press: var(--c-buttonBackground-secondaryInteractive--press)
98
98
  ),
99
- success: var(--c-green-700),
99
+ success: var(--c-buttonBackground-success),
100
100
  successAltInteractive: (
101
- DEFAULT: var(--c-green-100),
102
- hover: var(--c-green-120),
103
- press: var(--c-green-150)
101
+ DEFAULT: var(--c-buttonBackground-successAltInteractive),
102
+ hover: var(--c-buttonBackground-successAltInteractive--hover),
103
+ press: var(--c-buttonBackground-successAltInteractive--press)
104
104
  ),
105
105
  tertiaryInteractive: (
106
- DEFAULT: var(--c-white),
107
- hover: var(--c-white),
108
- press: var(--c-white)
106
+ DEFAULT: var(--c-buttonBackground-tertiaryInteractive),
107
+ hover: var(--c-buttonBackground-tertiaryInteractive--hover),
108
+ press: var(--c-buttonBackground-tertiaryInteractive--press)
109
109
  )
110
110
  ),
111
111
  buttonIcon: (
112
- selected: var(--c-purple-500),
112
+ selected: var(--c-buttonIcon-selected),
113
113
  destructiveInteractive: (
114
- DEFAULT: var(--c-red-500),
115
- hover: var(--c-red-500),
116
- press: var(--c-red-500)
114
+ DEFAULT: var(--c-buttonIcon-destructiveInteractive),
115
+ hover: var(--c-buttonIcon-destructiveInteractive--hover),
116
+ press: var(--c-buttonIcon-destructiveInteractive--press)
117
117
  ),
118
- disabled: var(--c-navy-300),
118
+ disabled: var(--c-buttonIcon-disabled),
119
119
  primaryInteractive: (
120
- DEFAULT: var(--c-white),
121
- hover: var(--c-white),
122
- press: var(--c-white)
120
+ DEFAULT: var(--c-buttonIcon-primaryInteractive),
121
+ hover: var(--c-buttonIcon-primaryInteractive--hover),
122
+ press: var(--c-buttonIcon-primaryInteractive--press)
123
123
  ),
124
124
  secondaryInteractive: (
125
- DEFAULT: var(--c-purple-500),
126
- hover: var(--c-purple-700),
127
- press: var(--c-purple-900)
125
+ DEFAULT: var(--c-buttonIcon-secondaryInteractive),
126
+ hover: var(--c-buttonIcon-secondaryInteractive--hover),
127
+ press: var(--c-buttonIcon-secondaryInteractive--press)
128
128
  ),
129
- success: var(--c-white),
129
+ success: var(--c-buttonIcon-success),
130
130
  successAltInteractive: (
131
- DEFAULT: var(--c-green-900),
132
- hover: var(--c-green-900),
133
- press: var(--c-green-900)
131
+ DEFAULT: var(--c-buttonIcon-successAltInteractive),
132
+ hover: var(--c-buttonIcon-successAltInteractive--hover),
133
+ press: var(--c-buttonIcon-successAltInteractive--press)
134
134
  ),
135
135
  tertiaryInteractive: (
136
- DEFAULT: var(--c-purple-500),
137
- hover: var(--c-purple-700),
138
- press: var(--c-purple-900)
136
+ DEFAULT: var(--c-buttonIcon-tertiaryInteractive),
137
+ hover: var(--c-buttonIcon-tertiaryInteractive--hover),
138
+ press: var(--c-buttonIcon-tertiaryInteractive--press)
139
139
  )
140
140
  ),
141
141
  buttonLabel: (
142
- selected: var(--c-purple-500),
142
+ selected: var(--c-buttonLabel-selected),
143
143
  destructiveInteractive: (
144
- DEFAULT: var(--c-red-500),
145
- hover: var(--c-red-500),
146
- press: var(--c-red-500)
144
+ DEFAULT: var(--c-buttonLabel-destructiveInteractive),
145
+ hover: var(--c-buttonLabel-destructiveInteractive--hover),
146
+ press: var(--c-buttonLabel-destructiveInteractive--press)
147
147
  ),
148
- disabled: var(--c-navy-300),
148
+ disabled: var(--c-buttonLabel-disabled),
149
149
  primaryInteractive: (
150
- DEFAULT: var(--c-white),
151
- hover: var(--c-white),
152
- press: var(--c-white)
150
+ DEFAULT: var(--c-buttonLabel-primaryInteractive),
151
+ hover: var(--c-buttonLabel-primaryInteractive--hover),
152
+ press: var(--c-buttonLabel-primaryInteractive--press)
153
153
  ),
154
154
  secondaryInteractive: (
155
- DEFAULT: var(--c-purple-500),
156
- hover: var(--c-purple-700),
157
- press: var(--c-purple-900)
155
+ DEFAULT: var(--c-buttonLabel-secondaryInteractive),
156
+ hover: var(--c-buttonLabel-secondaryInteractive--hover),
157
+ press: var(--c-buttonLabel-secondaryInteractive--press)
158
158
  ),
159
- success: var(--c-white),
159
+ success: var(--c-buttonLabel-success),
160
160
  successAltInteractive: (
161
- DEFAULT: var(--c-green-900),
162
- hover: var(--c-green-900),
163
- press: var(--c-green-900)
161
+ DEFAULT: var(--c-buttonLabel-successAltInteractive),
162
+ hover: var(--c-buttonLabel-successAltInteractive--hover),
163
+ press: var(--c-buttonLabel-successAltInteractive--press)
164
164
  ),
165
165
  tertiaryInteractive: (
166
- DEFAULT: var(--c-purple-500),
167
- hover: var(--c-purple-700),
168
- press: var(--c-purple-900)
166
+ DEFAULT: var(--c-buttonLabel-tertiaryInteractive),
167
+ hover: var(--c-buttonLabel-tertiaryInteractive--hover),
168
+ press: var(--c-buttonLabel-tertiaryInteractive--press)
169
169
  )
170
170
  ),
171
171
  icon: (
172
- base: var(--c-navy-500),
172
+ base: var(--c-icon-base),
173
173
  baseInteractive: (
174
- DEFAULT: var(--c-navy-500),
175
- hover: var(--c-navy-700)
174
+ DEFAULT: var(--c-icon-baseInteractive),
175
+ hover: var(--c-icon-baseInteractive--hover)
176
176
  ),
177
- subdued: var(--c-navy-300),
177
+ subdued: var(--c-icon-subdued),
178
178
  subduedInteractive: (
179
- DEFAULT: var(--c-navy-300),
180
- hover: var(--c-navy-500)
179
+ DEFAULT: var(--c-icon-subduedInteractive),
180
+ hover: var(--c-icon-subduedInteractive--hover)
181
181
  ),
182
- accent: var(--c-purple-500),
182
+ accent: var(--c-icon-accent),
183
183
  accentInteractive: (
184
- DEFAULT: var(--c-purple-500),
185
- hover: var(--c-purple-700)
184
+ DEFAULT: var(--c-icon-accentInteractive),
185
+ hover: var(--c-icon-accentInteractive--hover)
186
186
  ),
187
- accentAlt: var(--c-purple-500),
187
+ accentAlt: var(--c-icon-accentAlt),
188
188
  accentAltInteractive: (
189
- DEFAULT: var(--c-purple-500),
190
- hover: var(--c-purple-700)
191
- ),
192
- info: var(--c-yellow-900),
193
- infoAlt: var(--c-yellow-500),
194
- error: var(--c-red-500),
195
- errorAlt: var(--c-red-500),
196
- success: var(--c-green-700),
197
- successAlt: var(--c-green-900),
198
- warning: var(--c-orange-500),
199
- connect: var(--c-turquoise-500),
200
- connectAlt: var(--c-turquoise-900),
201
- driver: var(--c-navy-700),
202
- owner: var(--c-white),
203
- inversed: var(--c-white),
204
- disabled: var(--c-navy-100)
189
+ DEFAULT: var(--c-icon-accentAltInteractive),
190
+ hover: var(--c-icon-accentAltInteractive--hover)
191
+ ),
192
+ info: var(--c-icon-info),
193
+ infoAlt: var(--c-icon-infoAlt),
194
+ error: var(--c-icon-error),
195
+ errorAlt: var(--c-icon-errorAlt),
196
+ success: var(--c-icon-success),
197
+ successAlt: var(--c-icon-successAlt),
198
+ warning: var(--c-icon-warning),
199
+ connect: var(--c-icon-connect),
200
+ connectAlt: var(--c-icon-connectAlt),
201
+ driver: var(--c-icon-driver),
202
+ owner: var(--c-icon-owner),
203
+ inversed: var(--c-icon-inversed),
204
+ disabled: var(--c-icon-disabled)
205
205
  ),
206
206
  stroke: (
207
- base: var(--c-navy-100),
207
+ base: var(--c-stroke-base),
208
208
  baseInteractive: (
209
- DEFAULT: var(--c-navy-100),
210
- hover: var(--c-navy-300),
211
- press: var(--c-navy-500)
209
+ DEFAULT: var(--c-stroke-baseInteractive),
210
+ hover: var(--c-stroke-baseInteractive--hover),
211
+ press: var(--c-stroke-baseInteractive--press)
212
212
  ),
213
- strong: var(--c-navy-300),
213
+ strong: var(--c-stroke-strong),
214
214
  strongInteractive: (
215
- DEFAULT: var(--c-navy-300),
216
- hover: var(--c-navy-500),
217
- press: var(--c-navy-700)
215
+ DEFAULT: var(--c-stroke-strongInteractive),
216
+ hover: var(--c-stroke-strongInteractive--hover),
217
+ press: var(--c-stroke-strongInteractive--press)
218
218
  ),
219
- subdued: var(--c-navy-100),
220
- accent: var(--c-purple-500),
219
+ subdued: var(--c-stroke-subdued),
220
+ accent: var(--c-stroke-accent),
221
221
  accentInteractive: (
222
- DEFAULT: var(--c-purple-500),
223
- hover: var(--c-purple-700),
224
- press: var(--c-purple-900)
225
- ),
226
- accentAlt: var(--c-purple-300),
227
- error: var(--c-red-500),
228
- errorAlt: var(--c-red-500),
229
- success: var(--c-green-500),
230
- successAlt: var(--c-green-500)
222
+ DEFAULT: var(--c-stroke-accentInteractive),
223
+ hover: var(--c-stroke-accentInteractive--hover),
224
+ press: var(--c-stroke-accentInteractive--press)
225
+ ),
226
+ accentAlt: var(--c-stroke-accentAlt),
227
+ error: var(--c-stroke-error),
228
+ errorAlt: var(--c-stroke-errorAlt),
229
+ success: var(--c-stroke-success),
230
+ successAlt: var(--c-stroke-successAlt)
231
231
  ),
232
232
  fill: (
233
- base: var(--c-navy-500),
234
- secondary: var(--c-yellow-500),
235
- subdued: var(--c-navy-100),
236
- accent: var(--c-purple-500),
237
- accentAlt: var(--c-purple-100),
238
- error: var(--c-red-500),
239
- negative: var(--c-red-150),
240
- success: var(--c-green-500),
241
- disabled: var(--c-navy-300),
242
- neutral: var(--c-navy-50)
233
+ base: var(--c-fill-base),
234
+ secondary: var(--c-fill-secondary),
235
+ subdued: var(--c-fill-subdued),
236
+ accent: var(--c-fill-accent),
237
+ accentAlt: var(--c-fill-accentAlt),
238
+ error: var(--c-fill-error),
239
+ negative: var(--c-fill-negative),
240
+ success: var(--c-fill-success),
241
+ disabled: var(--c-fill-disabled),
242
+ neutral: var(--c-fill-neutral)
243
243
  )
244
244
  );
@@ -1,6 +1,6 @@
1
1
  @import "./_colors-map";
2
2
 
3
- @mixin semantic-color($color, $category, $property) {
3
+ @mixin semantic-color($category, $color, $property) {
4
4
  $semantic-colors-data: map-get($theme-colors-map, $category);
5
5
  $semantic-color: map-get($semantic-colors-data, $color);
6
6
  @if not $semantic-color {
@@ -24,24 +24,46 @@
24
24
  }
25
25
  }
26
26
 
27
+ @function color-var($category, $color, $modifier: "") {
28
+ $semantic-colors-data: map-get($theme-colors-map, $category);
29
+ $semantic-color: map-get($semantic-colors-data, $color);
30
+ @if not $semantic-color {
31
+ @error "Didn't found any match for: #{$color}, #{$category}";
32
+ }
33
+ @if type-of($semantic-color) == string {
34
+ @if $modifier != "" {
35
+ @error "There is no modifier #{$modifier} for: #{$color}, #{$category}";
36
+ }
37
+ @return $semantic-color;
38
+ } @else {
39
+ @if not $modifier {
40
+ @error "A modifier must be provied for: #{$color}, #{$category}.";
41
+ }
42
+ @if not map-has-key($semantic-color, $modifier) {
43
+ @error "Didn't found any match for: #{$color}, #{$category} with modifier: #{$modifier}";
44
+ }
45
+ @return map-get($semantic-color, $modifier);
46
+ }
47
+ }
48
+
27
49
  @mixin bg-color($color) {
28
- @include semantic-color($color, background, background-color);
50
+ @include semantic-color(background, $color, background-color);
29
51
  }
30
52
 
31
53
  @mixin fill-color($color) {
32
- @include semantic-color($color, fill, fill);
54
+ @include semantic-color(fill, $color, fill);
33
55
  }
34
56
 
35
57
  @mixin fill-bg-color($color) {
36
- @include semantic-color($color, fill, background-color);
58
+ @include semantic-color(fill, $color, background-color);
37
59
  }
38
60
 
39
61
  @mixin border-color($color) {
40
- @include semantic-color($color, stroke, border-color);
62
+ @include semantic-color(stroke, $color, border-color);
41
63
  }
42
64
 
43
65
  @mixin text-color($color) {
44
- @include semantic-color($color, text, color);
66
+ @include semantic-color(text, $color, color);
45
67
  }
46
68
 
47
69
  // LEGACY