@eui/styles 19.3.11-snapshot-1765528216041 → 19.3.11-snapshot-1765958867581

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.
@@ -1,4 +1,5 @@
1
1
  @use "sass:math";
2
+ @use "sass:map";
2
3
 
3
4
  @function v($var, $fallback: null) {
4
5
  @if ($fallback) {
@@ -7,6 +8,20 @@
7
8
  @return var(--#{$var});
8
9
  }
9
10
  }
11
+ @function mapReverseValues($map) {
12
+ $keys: map.keys($map);
13
+ $map-reversed: ();
14
+
15
+ @for $i from length($keys) through 1 {
16
+ $currentPos: calc(length($keys) - $i + 1);
17
+
18
+ $map-reversed: map.merge(
19
+ $map-reversed,
20
+ (nth($keys, $currentPos): map.get($map, nth($keys, $i)))
21
+ );
22
+ }
23
+ @return $map-reversed;
24
+ }
10
25
  @function map-deep-get($map, $keys...) {
11
26
  @each $key in $keys {
12
27
  @debug #{$map};
@@ -0,0 +1,232 @@
1
+ @use 'sass:map';
2
+ @use 'sass:color';
3
+ @use '../01-base/' as base;
4
+ @use './maps-colors-default' as defaultColors;
5
+
6
+ $color-map: (
7
+ br: base.mapReverseValues(map.get(defaultColors.$color-map, 'br')),
8
+ pr: base.mapReverseValues(map.get(defaultColors.$color-map, 'pr')),
9
+ gr: base.mapReverseValues(map.get(defaultColors.$color-map, 'gr')),
10
+ grn: base.mapReverseValues(map.get(defaultColors.$color-map, 'grn')),
11
+ cta: base.mapReverseValues(map.get(defaultColors.$color-map, 'cta')),
12
+ in: base.mapReverseValues(map.get(defaultColors.$color-map, 'in')),
13
+ su: base.mapReverseValues(map.get(defaultColors.$color-map, 'su')),
14
+ wa: base.mapReverseValues(map.get(defaultColors.$color-map, 'wa')),
15
+ da: base.mapReverseValues(map.get(defaultColors.$color-map, 'da'))
16
+ );
17
+
18
+ $color-state-map: (
19
+ branding: (
20
+ base: map.get(map.get($color-map, br), 900),
21
+ default: map.get(map.get($color-map, br), 900),
22
+ lighter: map.get(map.get($color-map, br), 700),
23
+ light: map.get(map.get($color-map, br), 800),
24
+ dark: map.get(map.get($color-map, br), 950),
25
+ surface: map.get(map.get($color-map, br), 900),
26
+ on-surface: base.getContrast(map.get(map.get($color-map, br), 900)),
27
+ surface-light: map.get(map.get($color-map, br), 800),
28
+ on-surface-light: base.getContrast(map.get(map.get($color-map, br), 800)),
29
+ surface-dark: map.get(map.get($color-map, br), 950),
30
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, br), 950)),
31
+ ),
32
+ primary: (
33
+ base: map.get(map.get($color-map, pr), 600),
34
+ default: map.get(map.get($color-map, pr), 700),
35
+ lighter: map.get(map.get($color-map, pr), 500),
36
+ light: map.get(map.get($color-map, pr), 600),
37
+ dark: map.get(map.get($color-map, pr), 900),
38
+ darker: map.get(map.get($color-map, pr), 950),
39
+ surface-light: map.get(map.get($color-map, pr), 75),
40
+ on-surface-light: map.get(map.get($color-map, pr), 900),
41
+ surface-light-hover: map.get(map.get($color-map, pr), 100),
42
+ on-surface-light-hover: map.get(map.get($color-map, pr), 950),
43
+ surface-medium: map.get(map.get($color-map, pr), 200),
44
+ on-surface-medium: base.getContrast(map.get(map.get($color-map, pr), 200)),
45
+ surface-medium-hover: map.get(map.get($color-map, pr), 300),
46
+ on-surface-medium-hover: base.getContrast(map.get(map.get($color-map, pr), 300)),
47
+ surface: map.get(map.get($color-map, pr), 600),
48
+ on-surface: base.getContrast(map.get(map.get($color-map, pr), 600)),
49
+ surface-hover: map.get(map.get($color-map, pr), 700),
50
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, pr), 700)),
51
+ surface-dark: map.get(map.get($color-map, pr), 900),
52
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, pr), 900)),
53
+ border: map.get(map.get($color-map, pr), 500),
54
+ border-light: map.get(map.get($color-map, pr), 300),
55
+ border-lighter: map.get(map.get($color-map, pr), 200),
56
+ ),
57
+ secondary: (
58
+ base: map.get(map.get($color-map, gr), 500),
59
+ default: map.get(map.get($color-map, gr), 800),
60
+ lighter: map.get(map.get($color-map, gr), 600),
61
+ light: map.get(map.get($color-map, gr), 700),
62
+ dark: map.get(map.get($color-map, gr), 900),
63
+ darker: map.get(map.get($color-map, gr), 950),
64
+ surface-light: map.get(map.get($color-map, gr), 50),
65
+ on-surface-light: map.get(map.get($color-map, gr), 900),
66
+ surface-light-hover: map.get(map.get($color-map, gr), 75),
67
+ on-surface-light-hover: map.get(map.get($color-map, gr), 950),
68
+ surface-medium: map.get(map.get($color-map, gr), 75),
69
+ on-surface-medium: map.get(map.get($color-map, gr), 900),
70
+ surface-medium-hover: map.get(map.get($color-map, gr), 100),
71
+ on-surface-medium-hover: map.get(map.get($color-map, gr), 950),
72
+ surface: map.get(map.get($color-map, gr), 600),
73
+ on-surface: base.getContrast(map.get(map.get($color-map, gr), 600)),
74
+ surface-hover: map.get(map.get($color-map, gr), 700),
75
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, gr), 700)),
76
+ surface-dark: map.get(map.get($color-map, gr), 900),
77
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, gr), 900)),
78
+ border: map.get(map.get($color-map, gr), 500),
79
+ border-light: map.get(map.get($color-map, gr), 300),
80
+ border-lighter: map.get(map.get($color-map, gr), 200),
81
+ ),
82
+ neutral: (
83
+ base: map.get(map.get($color-map, grn), 500),
84
+ default: map.get(map.get($color-map, grn), 500),
85
+ lighter: map.get(map.get($color-map, grn), 600),
86
+ light: map.get(map.get($color-map, grn), 700),
87
+ dark: map.get(map.get($color-map, grn), 900),
88
+ darker: map.get(map.get($color-map, grn), 950),
89
+ surface-light: map.get(map.get($color-map, grn), 50),
90
+ on-surface-light: map.get(map.get($color-map, grn), 900),
91
+ surface-light-hover: map.get(map.get($color-map, grn), 75),
92
+ on-surface-light-hover: map.get(map.get($color-map, grn), 950),
93
+ surface-medium: map.get(map.get($color-map, grn), 75),
94
+ on-surface-medium: map.get(map.get($color-map, grn), 900),
95
+ surface-medium-hover: map.get(map.get($color-map, grn), 100),
96
+ on-surface-medium-hover: map.get(map.get($color-map, grn), 950),
97
+ surface: map.get(map.get($color-map, grn), 400),
98
+ on-surface: base.getContrast(map.get(map.get($color-map, grn), 400)),
99
+ surface-hover: map.get(map.get($color-map, grn), 300),
100
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, grn), 300)),
101
+ surface-dark: map.get(map.get($color-map, grn), 900),
102
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, grn), 900)),
103
+ border: map.get(map.get($color-map, grn), 500),
104
+ border-light: map.get(map.get($color-map, grn), 400),
105
+ border-lighter: map.get(map.get($color-map, grn), 300),
106
+ ),
107
+ cta: (
108
+ base: map.get(map.get($color-map, cta), 400),
109
+ default: map.get(map.get($color-map, cta), 900),
110
+ lighter: map.get(map.get($color-map, cta), 400),
111
+ light: map.get(map.get($color-map, cta), 500),
112
+ dark: map.get(map.get($color-map, cta), 800),
113
+ darker: map.get(map.get($color-map, cta), 900),
114
+ surface-light: map.get(map.get($color-map, cta), 25),
115
+ on-surface-light: map.get(map.get($color-map, cta), 800),
116
+ surface-light-hover: map.get(map.get($color-map, cta), 50),
117
+ on-surface-light-hover: map.get(map.get($color-map, cta), 950),
118
+ surface-medium: map.get(map.get($color-map, cta), 75),
119
+ on-surface-medium: map.get(map.get($color-map, cta), 900),
120
+ surface-medium-hover: map.get(map.get($color-map, cta), 100),
121
+ on-surface-medium-hover: map.get(map.get($color-map, cta), 950),
122
+ surface: map.get(map.get($color-map, cta), 400),
123
+ on-surface: base.getContrast(map.get(map.get($color-map, cta), 400)),
124
+ surface-hover: map.get(map.get($color-map, cta), 500),
125
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, cta), 500)),
126
+ surface-dark: map.get(map.get($color-map, cta), 600),
127
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, cta), 600)),
128
+ border: map.get(map.get($color-map, cta), 300),
129
+ border-light: map.get(map.get($color-map, cta), 100),
130
+ border-lighter: map.get(map.get($color-map, cta), 75),
131
+ ),
132
+ info: (
133
+ base: map.get(map.get($color-map, in), 500),
134
+ default: map.get(map.get($color-map, in), 600),
135
+ lighter: map.get(map.get($color-map, in), 400),
136
+ light: map.get(map.get($color-map, in), 500),
137
+ dark: map.get(map.get($color-map, in), 800),
138
+ darker: map.get(map.get($color-map, in), 900),
139
+ surface-light: map.get(map.get($color-map, in), 75),
140
+ on-surface-light: map.get(map.get($color-map, in), 600),
141
+ surface-light-hover: map.get(map.get($color-map, in), 100),
142
+ on-surface-light-hover: map.get(map.get($color-map, in), 800),
143
+ surface-medium: map.get(map.get($color-map, in), 200),
144
+ on-surface-medium: map.get(map.get($color-map, in), 950),
145
+ surface-medium-hover: map.get(map.get($color-map, in), 300),
146
+ on-surface-medium-hover: base.getContrast(map.get(map.get($color-map, in), 300)),
147
+ surface: map.get(map.get($color-map, in), 600),
148
+ on-surface: base.getContrast(map.get(map.get($color-map, in), 600)),
149
+ surface-hover: map.get(map.get($color-map, in), 800),
150
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, in), 800)),
151
+ surface-dark: map.get(map.get($color-map, in), 800),
152
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, in), 800)),
153
+ border: map.get(map.get($color-map, in), 400),
154
+ border-light: map.get(map.get($color-map, in), 300),
155
+ border-lighter: map.get(map.get($color-map, in), 200),
156
+ ),
157
+ success: (
158
+ base: map.get(map.get($color-map, su), 700),
159
+ default: map.get(map.get($color-map, su), 900),
160
+ lighter: map.get(map.get($color-map, su), 700),
161
+ light: map.get(map.get($color-map, su), 800),
162
+ dark: map.get(map.get($color-map, su), 900),
163
+ darker: map.get(map.get($color-map, su), 950),
164
+ surface-light: map.get(map.get($color-map, su), 100),
165
+ on-surface-light: map.get(map.get($color-map, su), 950),
166
+ surface-light-hover: map.get(map.get($color-map, su), 200),
167
+ on-surface-light-hover: map.get(map.get($color-map, su), 950),
168
+ surface-medium: map.get(map.get($color-map, su), 300),
169
+ on-surface-medium: base.getContrast(map.get(map.get($color-map, su), 300)),
170
+ surface-medium-hover: map.get(map.get($color-map, su), 400),
171
+ on-surface-medium-hover: base.getContrast(map.get(map.get($color-map, su), 400)),
172
+ surface: map.get(map.get($color-map, su), 900),
173
+ on-surface: base.getContrast(map.get(map.get($color-map, su), 900)),
174
+ surface-hover: map.get(map.get($color-map, su), 950),
175
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, su), 950)),
176
+ surface-dark: map.get(map.get($color-map, su), 950),
177
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, su), 950)),
178
+ border: map.get(map.get($color-map, su), 600),
179
+ border-light: map.get(map.get($color-map, su), 400),
180
+ border-lighter: map.get(map.get($color-map, su), 300),
181
+ ),
182
+ warning: (
183
+ base: map.get(map.get($color-map, wa), 500),
184
+ default: map.get(map.get($color-map, wa), 900),
185
+ lighter: map.get(map.get($color-map, wa), 700),
186
+ light: map.get(map.get($color-map, wa), 800),
187
+ dark: map.get(map.get($color-map, wa), 950),
188
+ darker: map.get(map.get($color-map, wa), 950),
189
+ surface-light: map.get(map.get($color-map, wa), 50),
190
+ on-surface-light: map.get(map.get($color-map, wa), 900),
191
+ surface-light-hover: map.get(map.get($color-map, wa), 75),
192
+ on-surface-light-hover: map.get(map.get($color-map, wa), 950),
193
+ surface-medium: map.get(map.get($color-map, wa), 100),
194
+ on-surface-medium: map.get(map.get($color-map, wa), 900),
195
+ surface-medium-hover: map.get(map.get($color-map, wa), 200),
196
+ on-surface-medium-hover: map.get(map.get($color-map, wa), 950),
197
+ surface: map.get(map.get($color-map, wa), 500),
198
+ on-surface: base.getContrast(map.get(map.get($color-map, wa), 500)),
199
+ surface-hover: map.get(map.get($color-map, wa), 600),
200
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, wa), 600)),
201
+ surface-dark: map.get(map.get($color-map, wa), 900),
202
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, wa), 900)),
203
+ border: map.get(map.get($color-map, wa), 400),
204
+ border-light: map.get(map.get($color-map, wa), 200),
205
+ border-lighter: map.get(map.get($color-map, wa), 100),
206
+ ),
207
+ danger: (
208
+ base: map.get(map.get($color-map, da), 500),
209
+ default: map.get(map.get($color-map, da), 600),
210
+ lighter: map.get(map.get($color-map, da), 400),
211
+ light: map.get(map.get($color-map, da), 500),
212
+ dark: map.get(map.get($color-map, da), 700),
213
+ darker: map.get(map.get($color-map, da), 800),
214
+ surface-light: map.get(map.get($color-map, da), 75),
215
+ on-surface-light: map.get(map.get($color-map, da), 700),
216
+ surface-light-hover: map.get(map.get($color-map, da), 100),
217
+ on-surface-light-hover: map.get(map.get($color-map, da), 900),
218
+ surface-medium: map.get(map.get($color-map, da), 200),
219
+ on-surface-medium: map.get(map.get($color-map, da), 900),
220
+ surface-medium-hover: map.get(map.get($color-map, da), 300),
221
+ on-surface-medium-hover: map.get(map.get($color-map, da), 950),
222
+ surface: map.get(map.get($color-map, da), 600),
223
+ on-surface: base.getContrast(map.get(map.get($color-map, da), 600)),
224
+ surface-hover: map.get(map.get($color-map, da), 600),
225
+ on-surface-hover: base.getContrast(map.get(map.get($color-map, da), 700)),
226
+ surface-dark: map.get(map.get($color-map, da), 800),
227
+ on-surface-dark: base.getContrast(map.get(map.get($color-map, da), 800)),
228
+ border: map.get(map.get($color-map, da), 500),
229
+ border-light: map.get(map.get($color-map, da), 300),
230
+ border-lighter: map.get(map.get($color-map, da), 200),
231
+ ),
232
+ );