@carbon/styles 0.11.0-rc.0 → 0.13.0-rc.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.
@@ -25,11 +25,11 @@ $tag-background-red: (
25
25
  ),
26
26
  (
27
27
  theme: themes.$g90,
28
- value: colors.$red-80,
28
+ value: colors.$red-70,
29
29
  ),
30
30
  (
31
31
  theme: themes.$g100,
32
- value: colors.$red-80,
32
+ value: colors.$red-70,
33
33
  ),
34
34
  ),
35
35
  ) !default;
@@ -47,11 +47,11 @@ $tag-color-red: (
47
47
  ),
48
48
  (
49
49
  theme: themes.$g90,
50
- value: colors.$red-30,
50
+ value: colors.$red-20,
51
51
  ),
52
52
  (
53
53
  theme: themes.$g100,
54
- value: colors.$red-30,
54
+ value: colors.$red-20,
55
55
  ),
56
56
  ),
57
57
  ) !default;
@@ -69,11 +69,11 @@ $tag-hover-red: (
69
69
  ),
70
70
  (
71
71
  theme: themes.$g90,
72
- value: colors.$red-70,
72
+ value: colors.$red-70-hover,
73
73
  ),
74
74
  (
75
75
  theme: themes.$g100,
76
- value: colors.$red-70,
76
+ value: colors.$red-70-hover,
77
77
  ),
78
78
  ),
79
79
  ) !default;
@@ -92,11 +92,11 @@ $tag-background-magenta: (
92
92
  ),
93
93
  (
94
94
  theme: themes.$g90,
95
- value: colors.$magenta-80,
95
+ value: colors.$magenta-70,
96
96
  ),
97
97
  (
98
98
  theme: themes.$g100,
99
- value: colors.$magenta-80,
99
+ value: colors.$magenta-70,
100
100
  ),
101
101
  ),
102
102
  ) !default;
@@ -114,11 +114,11 @@ $tag-color-magenta: (
114
114
  ),
115
115
  (
116
116
  theme: themes.$g90,
117
- value: colors.$magenta-30,
117
+ value: colors.$magenta-20,
118
118
  ),
119
119
  (
120
120
  theme: themes.$g100,
121
- value: colors.$magenta-30,
121
+ value: colors.$magenta-20,
122
122
  ),
123
123
  ),
124
124
  ) !default;
@@ -136,11 +136,11 @@ $tag-hover-magenta: (
136
136
  ),
137
137
  (
138
138
  theme: themes.$g90,
139
- value: colors.$magenta-70,
139
+ value: colors.$magenta-70-hover,
140
140
  ),
141
141
  (
142
142
  theme: themes.$g100,
143
- value: colors.$magenta-70,
143
+ value: colors.$magenta-70-hover,
144
144
  ),
145
145
  ),
146
146
  ) !default;
@@ -159,11 +159,11 @@ $tag-background-purple: (
159
159
  ),
160
160
  (
161
161
  theme: themes.$g90,
162
- value: colors.$purple-80,
162
+ value: colors.$purple-70,
163
163
  ),
164
164
  (
165
165
  theme: themes.$g100,
166
- value: colors.$purple-80,
166
+ value: colors.$purple-70,
167
167
  ),
168
168
  ),
169
169
  ) !default;
@@ -181,11 +181,11 @@ $tag-color-purple: (
181
181
  ),
182
182
  (
183
183
  theme: themes.$g90,
184
- value: colors.$purple-30,
184
+ value: colors.$purple-20,
185
185
  ),
186
186
  (
187
187
  theme: themes.$g100,
188
- value: colors.$purple-30,
188
+ value: colors.$purple-20,
189
189
  ),
190
190
  ),
191
191
  ) !default;
@@ -203,11 +203,11 @@ $tag-hover-purple: (
203
203
  ),
204
204
  (
205
205
  theme: themes.$g90,
206
- value: colors.$purple-70,
206
+ value: colors.$purple-70-hover,
207
207
  ),
208
208
  (
209
209
  theme: themes.$g100,
210
- value: colors.$purple-70,
210
+ value: colors.$purple-70-hover,
211
211
  ),
212
212
  ),
213
213
  ) !default;
@@ -226,11 +226,11 @@ $tag-background-blue: (
226
226
  ),
227
227
  (
228
228
  theme: themes.$g90,
229
- value: colors.$blue-80,
229
+ value: colors.$blue-70,
230
230
  ),
231
231
  (
232
232
  theme: themes.$g100,
233
- value: colors.$blue-80,
233
+ value: colors.$blue-70,
234
234
  ),
235
235
  ),
236
236
  ) !default;
@@ -248,11 +248,11 @@ $tag-color-blue: (
248
248
  ),
249
249
  (
250
250
  theme: themes.$g90,
251
- value: colors.$blue-30,
251
+ value: colors.$blue-20,
252
252
  ),
253
253
  (
254
254
  theme: themes.$g100,
255
- value: colors.$blue-30,
255
+ value: colors.$blue-20,
256
256
  ),
257
257
  ),
258
258
  ) !default;
@@ -270,11 +270,11 @@ $tag-hover-blue: (
270
270
  ),
271
271
  (
272
272
  theme: themes.$g90,
273
- value: colors.$blue-70,
273
+ value: colors.$blue-70-hover,
274
274
  ),
275
275
  (
276
276
  theme: themes.$g100,
277
- value: colors.$blue-70,
277
+ value: colors.$blue-70-hover,
278
278
  ),
279
279
  ),
280
280
  ) !default;
@@ -293,11 +293,11 @@ $tag-background-cyan: (
293
293
  ),
294
294
  (
295
295
  theme: themes.$g90,
296
- value: colors.$cyan-80,
296
+ value: colors.$cyan-70,
297
297
  ),
298
298
  (
299
299
  theme: themes.$g100,
300
- value: colors.$cyan-80,
300
+ value: colors.$cyan-70,
301
301
  ),
302
302
  ),
303
303
  ) !default;
@@ -315,11 +315,11 @@ $tag-color-cyan: (
315
315
  ),
316
316
  (
317
317
  theme: themes.$g90,
318
- value: colors.$cyan-30,
318
+ value: colors.$cyan-20,
319
319
  ),
320
320
  (
321
321
  theme: themes.$g100,
322
- value: colors.$cyan-30,
322
+ value: colors.$cyan-20,
323
323
  ),
324
324
  ),
325
325
  ) !default;
@@ -337,11 +337,11 @@ $tag-hover-cyan: (
337
337
  ),
338
338
  (
339
339
  theme: themes.$g90,
340
- value: colors.$cyan-70,
340
+ value: colors.$cyan-70-hover,
341
341
  ),
342
342
  (
343
343
  theme: themes.$g100,
344
- value: colors.$cyan-70,
344
+ value: colors.$cyan-70-hover,
345
345
  ),
346
346
  ),
347
347
  ) !default;
@@ -360,11 +360,11 @@ $tag-background-teal: (
360
360
  ),
361
361
  (
362
362
  theme: themes.$g90,
363
- value: colors.$teal-80,
363
+ value: colors.$teal-70,
364
364
  ),
365
365
  (
366
366
  theme: themes.$g100,
367
- value: colors.$teal-80,
367
+ value: colors.$teal-70,
368
368
  ),
369
369
  ),
370
370
  ) !default;
@@ -382,11 +382,11 @@ $tag-color-teal: (
382
382
  ),
383
383
  (
384
384
  theme: themes.$g90,
385
- value: colors.$teal-30,
385
+ value: colors.$teal-20,
386
386
  ),
387
387
  (
388
388
  theme: themes.$g100,
389
- value: colors.$teal-30,
389
+ value: colors.$teal-20,
390
390
  ),
391
391
  ),
392
392
  ) !default;
@@ -404,11 +404,11 @@ $tag-hover-teal: (
404
404
  ),
405
405
  (
406
406
  theme: themes.$g90,
407
- value: colors.$teal-70,
407
+ value: colors.$teal-70-hover,
408
408
  ),
409
409
  (
410
410
  theme: themes.$g100,
411
- value: colors.$teal-70,
411
+ value: colors.$teal-70-hover,
412
412
  ),
413
413
  ),
414
414
  ) !default;
@@ -427,11 +427,11 @@ $tag-background-green: (
427
427
  ),
428
428
  (
429
429
  theme: themes.$g90,
430
- value: colors.$green-80,
430
+ value: colors.$green-70,
431
431
  ),
432
432
  (
433
433
  theme: themes.$g100,
434
- value: colors.$green-80,
434
+ value: colors.$green-70,
435
435
  ),
436
436
  ),
437
437
  ) !default;
@@ -449,11 +449,11 @@ $tag-color-green: (
449
449
  ),
450
450
  (
451
451
  theme: themes.$g90,
452
- value: colors.$green-30,
452
+ value: colors.$green-20,
453
453
  ),
454
454
  (
455
455
  theme: themes.$g100,
456
- value: colors.$green-30,
456
+ value: colors.$green-20,
457
457
  ),
458
458
  ),
459
459
  ) !default;
@@ -471,11 +471,11 @@ $tag-hover-green: (
471
471
  ),
472
472
  (
473
473
  theme: themes.$g90,
474
- value: colors.$green-70,
474
+ value: colors.$green-70-hover,
475
475
  ),
476
476
  (
477
477
  theme: themes.$g100,
478
- value: colors.$green-70,
478
+ value: colors.$green-70-hover,
479
479
  ),
480
480
  ),
481
481
  ) !default;
@@ -494,11 +494,11 @@ $tag-background-gray: (
494
494
  ),
495
495
  (
496
496
  theme: themes.$g90,
497
- value: colors.$gray-80,
497
+ value: colors.$gray-70,
498
498
  ),
499
499
  (
500
500
  theme: themes.$g100,
501
- value: colors.$gray-80,
501
+ value: colors.$gray-70,
502
502
  ),
503
503
  ),
504
504
  ) !default;
@@ -516,11 +516,11 @@ $tag-color-gray: (
516
516
  ),
517
517
  (
518
518
  theme: themes.$g90,
519
- value: colors.$gray-30,
519
+ value: colors.$gray-20,
520
520
  ),
521
521
  (
522
522
  theme: themes.$g100,
523
- value: colors.$gray-30,
523
+ value: colors.$gray-20,
524
524
  ),
525
525
  ),
526
526
  ) !default;
@@ -538,11 +538,11 @@ $tag-hover-gray: (
538
538
  ),
539
539
  (
540
540
  theme: themes.$g90,
541
- value: colors.$gray-70,
541
+ value: colors.$gray-70-hover,
542
542
  ),
543
543
  (
544
544
  theme: themes.$g100,
545
- value: colors.$gray-70,
545
+ value: colors.$gray-70-hover,
546
546
  ),
547
547
  ),
548
548
  ) !default;
@@ -561,11 +561,11 @@ $tag-background-cool-gray: (
561
561
  ),
562
562
  (
563
563
  theme: themes.$g90,
564
- value: colors.$cool-gray-80,
564
+ value: colors.$cool-gray-70,
565
565
  ),
566
566
  (
567
567
  theme: themes.$g100,
568
- value: colors.$cool-gray-80,
568
+ value: colors.$cool-gray-70,
569
569
  ),
570
570
  ),
571
571
  ) !default;
@@ -583,11 +583,11 @@ $tag-color-cool-gray: (
583
583
  ),
584
584
  (
585
585
  theme: themes.$g90,
586
- value: colors.$cool-gray-30,
586
+ value: colors.$cool-gray-20,
587
587
  ),
588
588
  (
589
589
  theme: themes.$g100,
590
- value: colors.$cool-gray-30,
590
+ value: colors.$cool-gray-20,
591
591
  ),
592
592
  ),
593
593
  ) !default;
@@ -605,11 +605,11 @@ $tag-hover-cool-gray: (
605
605
  ),
606
606
  (
607
607
  theme: themes.$g90,
608
- value: colors.$cool-gray-70,
608
+ value: colors.$cool-gray-70-hover,
609
609
  ),
610
610
  (
611
611
  theme: themes.$g100,
612
- value: colors.$cool-gray-70,
612
+ value: colors.$cool-gray-70-hover,
613
613
  ),
614
614
  ),
615
615
  ) !default;
@@ -628,11 +628,11 @@ $tag-background-warm-gray: (
628
628
  ),
629
629
  (
630
630
  theme: themes.$g90,
631
- value: colors.$warm-gray-80,
631
+ value: colors.$warm-gray-70,
632
632
  ),
633
633
  (
634
634
  theme: themes.$g100,
635
- value: colors.$warm-gray-80,
635
+ value: colors.$warm-gray-70,
636
636
  ),
637
637
  ),
638
638
  ) !default;
@@ -650,11 +650,11 @@ $tag-color-warm-gray: (
650
650
  ),
651
651
  (
652
652
  theme: themes.$g90,
653
- value: colors.$warm-gray-30,
653
+ value: colors.$warm-gray-20,
654
654
  ),
655
655
  (
656
656
  theme: themes.$g100,
657
- value: colors.$warm-gray-30,
657
+ value: colors.$warm-gray-20,
658
658
  ),
659
659
  ),
660
660
  ) !default;
@@ -672,11 +672,11 @@ $tag-hover-warm-gray: (
672
672
  ),
673
673
  (
674
674
  theme: themes.$g90,
675
- value: colors.$warm-gray-70,
675
+ value: colors.$warm-gray-70-hover,
676
676
  ),
677
677
  (
678
678
  theme: themes.$g100,
679
- value: colors.$warm-gray-70,
679
+ value: colors.$warm-gray-70-hover,
680
680
  ),
681
681
  ),
682
682
  ) !default;
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @forward 'toggletip';
9
+ @use 'toggletip';
10
+
11
+ @include toggletip.toggletip;
@@ -0,0 +1,81 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use '../../config' as *;
9
+ @use '../../spacing';
10
+ @use '../../theme';
11
+ @use '../../type';
12
+ @use '../../utilities/button-reset';
13
+ @use '../../utilities/convert';
14
+ @use '../../utilities/custom-property';
15
+ @use '../../utilities/focus-outline';
16
+
17
+ @mixin toggletip() {
18
+ .#{$prefix}--toggletip-label {
19
+ @include type.type-style('label-01');
20
+
21
+ margin-right: spacing.$spacing-03;
22
+
23
+ color: theme.$text-secondary;
24
+ }
25
+
26
+ .#{$prefix}--toggletip-button {
27
+ @include button-reset.reset();
28
+
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+
33
+ .#{$prefix}--toggletip-button svg {
34
+ fill: theme.$icon-secondary;
35
+ }
36
+
37
+ .#{$prefix}--toggletip-button:hover svg,
38
+ .#{$prefix}--toggletip--open .#{$prefix}--toggletip-button svg {
39
+ fill: theme.$icon-primary;
40
+ }
41
+
42
+ .#{$prefix}--toggletip-button:focus {
43
+ @include focus-outline.focus-outline;
44
+ }
45
+
46
+ .#{$prefix}--toggletip {
47
+ @include custom-property.declaration('popover-offset', convert.rem(13px));
48
+ }
49
+
50
+ .#{$prefix}--toggletip-content {
51
+ @include custom-property.declaration(
52
+ 'button-focus-color',
53
+ theme.$focus-inverse
54
+ );
55
+ @include custom-property.declaration(
56
+ 'link-text-color',
57
+ theme.$link-inverse
58
+ );
59
+ @include custom-property.declaration(
60
+ 'link-hover-text-color',
61
+ theme.$link-inverse
62
+ );
63
+ @include custom-property.declaration(
64
+ 'link-focus-text-color',
65
+ theme.$focus-inverse
66
+ );
67
+ @include type.type-style('body-short-01');
68
+
69
+ display: grid;
70
+ max-width: 18rem;
71
+ padding: spacing.$spacing-05;
72
+ row-gap: spacing.$spacing-05;
73
+ }
74
+
75
+ .#{$prefix}--toggletip-actions {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: space-between;
79
+ column-gap: spacing.$spacing-05;
80
+ }
81
+ }
@@ -36,6 +36,7 @@
36
36
  .#{$prefix}--header__action {
37
37
  @include button-reset.reset();
38
38
 
39
+ display: inline-flex;
39
40
  width: mini-units(6);
40
41
  height: mini-units(6);
41
42
  border: rem(2px) solid transparent;
@@ -80,6 +81,7 @@
80
81
  }
81
82
 
82
83
  .#{$prefix}--header__action.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger {
84
+ align-items: center;
83
85
  justify-content: center;
84
86
  }
85
87
 
@@ -21,6 +21,57 @@ $-filenames: (
21
21
  IBM-Plex-Serif: 'IBMPlexSerif',
22
22
  );
23
23
 
24
+ $-google-filenames: (
25
+ IBM-Plex-Mono: (
26
+ name: 'ibmplexmono',
27
+ version: 'v7',
28
+ hash: '-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-otFQ',
29
+ ),
30
+ IBM-Plex-Sans-Arabic: (
31
+ name: 'ibmplexsansarabic',
32
+ version: 'v5',
33
+ hash: 'Qw3CZRtWPQCuHme67tEYUIx3Kh0PHR9N6Ys43PW5fslBEg0',
34
+ ),
35
+ IBM-Plex-Sans-Devanagari: (
36
+ name: 'ibmplexsansdevanagari',
37
+ version: 'v5',
38
+ hash: 'XRXH3JCMvG4IDoS9SubXB6W-UX5iehIMBFR2-O_PX0j1Uc7wCWQq',
39
+ ),
40
+ IBM-Plex-Sans-Hebrew: (
41
+ name: 'ibmplexsanshebrew',
42
+ version: 'v5',
43
+ hash: 'BCa2qYENg9Kw1mpLpO0bGM5lfHAAZHhDXE2v-lgVrjaNzC4',
44
+ ),
45
+ IBM-Plex-Sans-Thai-Looped: (
46
+ name: 'ibmplexsansthailooped',
47
+ version: 'v5',
48
+ hash: 'tss_AoJJRAhL3BTrK3r2xxbFhvKfyBB6l7hHT30L9BiKoXOrFCUb6Q',
49
+ ),
50
+ IBM-Plex-Sans-Thai: (
51
+ name: 'ibmplexsansthai',
52
+ version: 'v5',
53
+ hash: 'm8JPje1VVIzcq1HzJq2AEdo2Tj_qvLqMBNYgR8BKU4cX',
54
+ ),
55
+ IBM-Plex-Sans: (
56
+ name: 'ibmplexsans',
57
+ version: 'v9',
58
+ hash: 'zYXgKVElMYYaJe8bpLHnCwDKhdzeFaxOedfTDw',
59
+ ),
60
+ IBM-Plex-Serif: (
61
+ name: 'ibmplexserif',
62
+ version: 'v10',
63
+ hash: 'jizDREVNn1dOx-zrZ2X3pZvkTiUS2zcZiVbJsNo',
64
+ ),
65
+ );
66
+
67
+ @function -get-google-filename($map, $keys...) {
68
+ @each $key in $keys {
69
+ $map: map-get($map, $key);
70
+ }
71
+
72
+ @return $map;
73
+ }
74
+
24
75
  @function -get-base-filename($name) {
25
76
  @return map.get($-filenames, $name);
26
77
  }
@@ -37,44 +88,65 @@ $-filenames: (
37
88
  /// @param {List} $formats
38
89
  /// @returns List
39
90
  @function -default-resolver($name, $weight, $style, $unicode-range, $formats) {
40
- $filename: -get-base-filename($name);
91
+ @if (config.$use-google-fonts) {
92
+ $filename: -get-google-filename($-google-filenames, $name, 'name');
93
+ $version: -get-google-filename($-google-filenames, $name, 'version');
94
+ $hash: -get-google-filename($-google-filenames, $name, 'hash');
41
95
 
42
- // Special case for weight = Regular (400)
43
- @if $weight == Regular {
44
- @if $style == italic {
45
- $filename: '#{$filename}-Italic';
46
- } @else {
47
- $filename: '#{$filename}-Regular';
96
+ $filenames: ();
97
+
98
+ @each $format in $formats {
99
+ $url: 'https://fonts.gstatic.com/s/#{$filename}/#{$version}/#{$hash}';
100
+
101
+ // Add extension
102
+ $url: '#{$url}.#{$format}';
103
+ $filenames: list.append(
104
+ $filenames,
105
+ url('#{$url}') format('#{$format}'),
106
+ $separator: comma
107
+ );
48
108
  }
109
+
110
+ @return $filenames;
49
111
  } @else {
50
- // Otherwise add weight + optional style (italic)
51
- $filename: '#{$filename}-#{$weight}';
52
- @if $style == italic {
53
- $filename: '#{$filename}Italic';
112
+ $filename: -get-base-filename($name);
113
+
114
+ // Special case for weight = Regular (400)
115
+ @if $weight == Regular {
116
+ @if $style == italic {
117
+ $filename: '#{$filename}-Italic';
118
+ } @else {
119
+ $filename: '#{$filename}-Regular';
120
+ }
121
+ } @else {
122
+ // Otherwise add weight + optional style (italic)
123
+ $filename: '#{$filename}-#{$weight}';
124
+ @if $style == italic {
125
+ $filename: '#{$filename}Italic';
126
+ }
54
127
  }
55
- }
56
128
 
57
- $filenames: ();
129
+ $filenames: ();
58
130
 
59
- @each $format in $formats {
60
- $url: $filename;
131
+ @each $format in $formats {
132
+ $url: $filename;
133
+ @if $unicode-range {
134
+ $url: '#{config.$font-path}/#{$name}/fonts/split/#{$format}/#{$filename}-#{$unicode-range}';
135
+ } @else {
136
+ $url: '#{config.$font-path}/#{$name}/fonts/complete/#{$format}/#{$filename}';
137
+ }
61
138
 
62
- @if $unicode-range {
63
- $url: '#{config.$font-path}/#{$name}/fonts/split/#{$format}/#{$filename}-#{$unicode-range}';
64
- } @else {
65
- $url: '#{config.$font-path}/#{$name}/fonts/complete/#{$format}/#{$filename}';
139
+ // Add extension
140
+ $url: '#{$url}.#{$format}';
141
+ $filenames: list.append(
142
+ $filenames,
143
+ url('#{$url}') format('#{$format}'),
144
+ $separator: comma
145
+ );
66
146
  }
67
147
 
68
- // Add extension
69
- $url: '#{$url}.#{$format}';
70
- $filenames: list.append(
71
- $filenames,
72
- url('#{$url}') format('#{$format}'),
73
- $separator: comma
74
- );
148
+ @return $filenames;
75
149
  }
76
-
77
- @return $filenames;
78
150
  }
79
151
 
80
152
  /// The resolver used for locating the filepaths in `url() format()` values in
@@ -1,38 +0,0 @@
1
- //
2
- // Copyright IBM Corp. 2021
3
- //
4
- // This source code is licensed under the Apache-2.0 license found in the
5
- // LICENSE file in the root directory of this source tree.
6
- //
7
-
8
- @use 'sass:list';
9
- @use 'sass:meta';
10
- @use '../config' as *;
11
- @use './custom-property';
12
-
13
- /// Define a map of layer sets, each set should have values for each layer in
14
- /// the application. The key of this map is used for the CSS Custom Property
15
- /// name whose value is updated as more layers are added.
16
- /// @type {Map}
17
- $layer-sets: () !default;
18
-
19
- /// Emit the layer tokens defined in $layer-sets for the given $level
20
- /// @param {Number} $level
21
- @mixin -emit-layer-tokens($level) {
22
- @each $key, $layer-set in $layer-sets {
23
- $value: list.nth($layer-set, $level);
24
- @include custom-property.declaration($key, $value);
25
- }
26
- }
27
-
28
- :root {
29
- @include -emit-layer-tokens(1);
30
- }
31
-
32
- .#{$prefix}--layer {
33
- @include -emit-layer-tokens(2);
34
-
35
- .#{$prefix}--layer {
36
- @include -emit-layer-tokens(3);
37
- }
38
- }