@carbon/styles 0.14.0 → 0.15.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.
Files changed (55) hide show
  1. package/package.json +8 -8
  2. package/scss/_motion.scss +7 -36
  3. package/scss/_reset.scss +1 -1
  4. package/scss/components/accordion/_accordion.scss +4 -2
  5. package/scss/components/aspect-ratio/_aspect-ratio.scss +5 -4
  6. package/scss/components/breadcrumb/_breadcrumb.scss +1 -1
  7. package/scss/components/button/_tokens.scss +2 -2
  8. package/scss/components/checkbox/_checkbox.scss +1 -1
  9. package/scss/components/code-snippet/_code-snippet.scss +3 -3
  10. package/scss/components/content-switcher/_content-switcher.scss +5 -1
  11. package/scss/components/copy-button/_copy-button.scss +1 -1
  12. package/scss/components/data-table/_data-table.scss +4 -4
  13. package/scss/components/data-table/action/_data-table-action.scss +3 -3
  14. package/scss/components/data-table/sort/_data-table-sort.scss +1 -1
  15. package/scss/components/date-picker/_flatpickr.scss +27 -20
  16. package/scss/components/dropdown/_dropdown.scss +3 -3
  17. package/scss/components/file-uploader/_file-uploader.scss +4 -4
  18. package/scss/components/form/_form.scss +2 -2
  19. package/scss/components/link/_link.scss +3 -3
  20. package/scss/components/list/_list.scss +2 -2
  21. package/scss/components/list-box/_list-box.scss +3 -3
  22. package/scss/components/loading/_loading.scss +3 -0
  23. package/scss/components/menu/_menu.scss +1 -1
  24. package/scss/components/modal/_modal.scss +3 -3
  25. package/scss/components/notification/_actionable-notification.scss +2 -2
  26. package/scss/components/notification/_inline-notification.scss +3 -3
  27. package/scss/components/notification/_toast-notification.scss +5 -5
  28. package/scss/components/number-input/_number-input.scss +29 -18
  29. package/scss/components/overflow-menu/_overflow-menu.scss +4 -1
  30. package/scss/components/pagination/_index.scss +3 -0
  31. package/scss/components/pagination/_pagination.scss +1 -0
  32. package/scss/components/pagination/_unstable_pagination.scss +173 -0
  33. package/scss/components/pagination-nav/_pagination-nav.scss +2 -2
  34. package/scss/components/popover/_popover.scss +27 -12
  35. package/scss/components/progress-bar/_progress-bar.scss +9 -1
  36. package/scss/components/progress-indicator/_progress-indicator.scss +12 -14
  37. package/scss/components/search/_search.scss +14 -17
  38. package/scss/components/select/_select.scss +8 -2
  39. package/scss/components/slider/_slider.scss +6 -4
  40. package/scss/components/structured-list/_structured-list.scss +2 -3
  41. package/scss/components/tabs/_tabs.scss +3 -3
  42. package/scss/components/tag/_tag.scss +1 -0
  43. package/scss/components/text-area/_text-area.scss +2 -2
  44. package/scss/components/text-input/_text-input.scss +1 -1
  45. package/scss/components/tile/_tile.scss +2 -2
  46. package/scss/components/toggle/_toggle.scss +3 -3
  47. package/scss/components/toggletip/_toggletip.scss +1 -1
  48. package/scss/components/tooltip/_tooltip.scss +3 -3
  49. package/scss/components/treeview/_treeview.scss +1 -1
  50. package/scss/components/ui-shell/header/_header.scss +3 -3
  51. package/scss/components/ui-shell/side-nav/_side-nav.scss +7 -6
  52. package/scss/components/ui-shell/switcher/_switcher.scss +1 -1
  53. package/scss/fonts/_src.scss +1 -1
  54. package/scss/utilities/_keyframes.scss +10 -0
  55. package/scss/utilities/_tooltip.scss +3 -1
@@ -40,7 +40,7 @@
40
40
 
41
41
  .#{$prefix}--search-input {
42
42
  @include reset;
43
- @include type.type-style('body-short-01');
43
+ @include type.type-style('body-compact-01');
44
44
  @include focus-outline('reset');
45
45
 
46
46
  width: 100%;
@@ -99,24 +99,21 @@
99
99
  left: rem(8px);
100
100
  }
101
101
 
102
- // Large styles
103
- // V11: change lg to md
104
- .#{$prefix}--search--lg .#{$prefix}--search-input,
105
- .#{$prefix}--search--lg.#{$prefix}--search--expandable.#{$prefix}--search--expanded
102
+ // Medium styles
103
+ .#{$prefix}--search--md .#{$prefix}--search-input,
104
+ .#{$prefix}--search--md.#{$prefix}--search--expandable.#{$prefix}--search--expanded
106
105
  .#{$prefix}--search-input {
107
106
  height: rem(40px);
108
107
  // 12px padding on either side of icon + 16px icon (40px)
109
108
  padding: 0 $spacing-08;
110
109
  }
111
-
112
- // V11: change lg to md
113
- .#{$prefix}--search--lg .#{$prefix}--search-magnifier-icon {
110
+ .#{$prefix}--search--md .#{$prefix}--search-magnifier-icon {
114
111
  left: rem(12px);
115
112
  }
116
113
 
117
- // V11: change xl to lg
118
- .#{$prefix}--search--xl .#{$prefix}--search-input,
119
- .#{$prefix}--search--xl.#{$prefix}--search--expandable.#{$prefix}--search--expanded
114
+ // Large styles
115
+ .#{$prefix}--search--lg .#{$prefix}--search-input,
116
+ .#{$prefix}--search--lg.#{$prefix}--search--expandable.#{$prefix}--search--expanded
120
117
  .#{$prefix}--search-input {
121
118
  height: rem(48px);
122
119
  // 16px padding on either side of icon + 16px icon (48px)
@@ -245,6 +242,7 @@
245
242
  @include focus-outline('outline');
246
243
  }
247
244
 
245
+ // Small
248
246
  .#{$prefix}--search--sm {
249
247
  .#{$prefix}--search-close,
250
248
  ~ .#{$prefix}--search-button,
@@ -259,8 +257,8 @@
259
257
  }
260
258
  }
261
259
 
262
- // V11: change lg to md
263
- .#{$prefix}--search--lg {
260
+ // Medium
261
+ .#{$prefix}--search--md {
264
262
  .#{$prefix}--search-close,
265
263
  ~ .#{$prefix}--search-button,
266
264
  &.#{$prefix}--search--expandable,
@@ -274,8 +272,8 @@
274
272
  }
275
273
  }
276
274
 
277
- // V11: change xl to lg
278
- .#{$prefix}--search--xl {
275
+ // Large
276
+ .#{$prefix}--search--lg {
279
277
  .#{$prefix}--search-close,
280
278
  ~ .#{$prefix}--search-button,
281
279
  &.#{$prefix}--search--expandable,
@@ -294,9 +292,8 @@
294
292
  visibility: hidden;
295
293
  }
296
294
 
297
- // V11: change xl to lg, lg to md
298
- .#{$prefix}--search--xl.#{$prefix}--skeleton .#{$prefix}--search-input,
299
295
  .#{$prefix}--search--lg.#{$prefix}--skeleton .#{$prefix}--search-input,
296
+ .#{$prefix}--search--md.#{$prefix}--skeleton .#{$prefix}--search-input,
300
297
  .#{$prefix}--search--sm.#{$prefix}--skeleton .#{$prefix}--search-input {
301
298
  @include skeleton;
302
299
 
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  .#{$prefix}--select-input {
43
- @include type-style('body-short-01');
43
+ @include type-style('body-compact-01');
44
44
  @include focus-outline('reset');
45
45
 
46
46
  display: block;
@@ -175,10 +175,15 @@
175
175
  opacity: 1;
176
176
  }
177
177
 
178
- .#{$prefix}--select-optgroup,
178
+ optgroup.#{$prefix}--select-optgroup,
179
179
  .#{$prefix}--select-option {
180
180
  // For the options to show in IE11
181
+ background-color: $background-hover;
181
182
  color: $text-primary;
183
+
184
+ &:disabled {
185
+ color: $text-disabled;
186
+ }
182
187
  }
183
188
 
184
189
  .#{$prefix}--select--inline {
@@ -214,6 +219,7 @@
214
219
  color: $text-primary;
215
220
  }
216
221
 
222
+ .#{$prefix}--select--inline .#{$prefix}--select-input:focus,
217
223
  .#{$prefix}--select--inline .#{$prefix}--select-input:focus option,
218
224
  .#{$prefix}--select--inline .#{$prefix}--select-input:focus optgroup {
219
225
  background-color: $background;
@@ -38,7 +38,9 @@
38
38
  width: 100%;
39
39
  min-width: rem(200px);
40
40
  max-width: rem(640px);
41
+ padding: $spacing-05 0;
41
42
  margin: 0 $spacing-05;
43
+ cursor: pointer;
42
44
  }
43
45
 
44
46
  .#{$prefix}--slider__range-label {
@@ -57,7 +59,6 @@
57
59
  width: 100%;
58
60
  height: rem(2px);
59
61
  background: $border-subtle;
60
- cursor: pointer;
61
62
  transform: translate(0%, -50%);
62
63
  }
63
64
 
@@ -87,13 +88,11 @@
87
88
  .#{$prefix}--slider__thumb {
88
89
  position: absolute;
89
90
  z-index: 3;
90
- top: 0;
91
91
  width: rem(14px);
92
92
  height: rem(14px);
93
93
  background: $layer-selected-inverse;
94
94
  border-radius: 50%;
95
95
  box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px transparent;
96
- cursor: pointer;
97
96
  outline: none;
98
97
  transform: translate(-50%, -50%);
99
98
  transition: transform $duration-fast-02 motion(standard, productive),
@@ -150,6 +149,10 @@
150
149
  color: $text-disabled;
151
150
  }
152
151
 
152
+ .#{$prefix}--slider--disabled.#{$prefix}--slider {
153
+ cursor: not-allowed;
154
+ }
155
+
153
156
  .#{$prefix}--slider--disabled .#{$prefix}--slider__thumb {
154
157
  background-color: $border-subtle;
155
158
 
@@ -177,7 +180,6 @@
177
180
  .#{$prefix}--slider__thumb:focus
178
181
  ~ .#{$prefix}--slider__filled-track {
179
182
  background-color: $border-subtle;
180
- cursor: not-allowed;
181
183
  }
182
184
 
183
185
  .#{$prefix}--slider--disabled
@@ -44,7 +44,6 @@
44
44
  border-collapse: collapse;
45
45
  border-spacing: 0;
46
46
  overflow-x: auto;
47
- overflow-y: hidden;
48
47
 
49
48
  // Condensed list
50
49
  &.#{$prefix}--structured-list--condensed .#{$prefix}--structured-list-td,
@@ -134,7 +133,7 @@
134
133
  .#{$prefix}--structured-list-th {
135
134
  @include reset;
136
135
  @include padding-th;
137
- @include type-style('productive-heading-01');
136
+ @include type-style('heading-compact-01');
138
137
 
139
138
  display: table-cell;
140
139
  height: rem(40px);
@@ -152,7 +151,7 @@
152
151
 
153
152
  .#{$prefix}--structured-list-td {
154
153
  @include reset;
155
- @include type-style('body-long-01');
154
+ @include type-style('body-01');
156
155
  @include padding-td;
157
156
 
158
157
  position: relative;
@@ -38,7 +38,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
38
38
  @mixin tabs {
39
39
  .#{$prefix}--tabs {
40
40
  @include reset;
41
- @include type-style('body-short-01');
41
+ @include type-style('body-compact-01');
42
42
 
43
43
  display: flex;
44
44
  width: 100%;
@@ -215,7 +215,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
215
215
  .#{$prefix}--tabs__nav-link {
216
216
  @include button-reset.reset($width: false);
217
217
  @include focus-outline('reset');
218
- @include type-style('body-short-01');
218
+ @include type-style('body-compact-01');
219
219
 
220
220
  @if not feature-flag-enabled('enable-v11-release') {
221
221
  width: rem(160px);
@@ -298,7 +298,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
298
298
  .#{$prefix}--tabs__nav-link:focus,
299
299
  .#{$prefix}--tabs__nav-item--selected:active
300
300
  .#{$prefix}--tabs__nav-link:active {
301
- @include type-style('productive-heading-01');
301
+ @include type-style('heading-compact-01');
302
302
 
303
303
  color: $text-primary;
304
304
  }
@@ -178,6 +178,7 @@
178
178
  cursor: pointer;
179
179
  transition: background-color $duration-fast-01 motion(standard, productive),
180
180
  box-shadow $duration-fast-01 motion(standard, productive);
181
+
181
182
  svg {
182
183
  fill: currentColor;
183
184
  }
@@ -22,7 +22,7 @@
22
22
  @mixin text-area {
23
23
  .#{$prefix}--text-area {
24
24
  @include reset;
25
- @include type-style('body-long-01');
25
+ @include type-style('body-01');
26
26
  @include focus-outline('reset');
27
27
 
28
28
  width: 100%;
@@ -47,7 +47,7 @@
47
47
 
48
48
  .#{$prefix}--text-area::placeholder {
49
49
  @include placeholder-colors;
50
- @include type-style('body-long-01');
50
+ @include type-style('body-01');
51
51
  }
52
52
 
53
53
  // V11: Possibly deprecate
@@ -32,7 +32,7 @@
32
32
  @mixin text-input {
33
33
  .#{$prefix}--text-input {
34
34
  @include reset;
35
- @include type-style('body-short-01');
35
+ @include type-style('body-compact-01');
36
36
  @include focus-outline('reset');
37
37
 
38
38
  width: 100%;
@@ -40,7 +40,7 @@
40
40
 
41
41
  // V11: Possibly deprecate
42
42
  .#{$prefix}--tile--light {
43
- background-color: $layer-02;
43
+ background-color: $layer;
44
44
  }
45
45
 
46
46
  .#{$prefix}--tile--clickable,
@@ -75,7 +75,7 @@
75
75
 
76
76
  .#{$prefix}--tile--clickable {
77
77
  @include reset;
78
- @include type-style('body-short-01');
78
+ @include type-style('body-compact-01');
79
79
 
80
80
  color: $text-primary;
81
81
  text-decoration: none;
@@ -85,7 +85,7 @@
85
85
  }
86
86
 
87
87
  .#{$prefix}--toggle__text {
88
- @include type-style('body-long-01');
88
+ @include type-style('body-01');
89
89
 
90
90
  color: $text-primary;
91
91
  }
@@ -232,7 +232,7 @@
232
232
 
233
233
  .#{$prefix}--toggle__text--left,
234
234
  .#{$prefix}--toggle__text--right {
235
- @include type-style('body-short-01');
235
+ @include type-style('body-compact-01');
236
236
 
237
237
  position: relative;
238
238
  margin-left: $spacing-03;
@@ -456,7 +456,7 @@
456
456
 
457
457
  .#{$prefix}--toggle__text--off,
458
458
  .#{$prefix}--toggle__text--on {
459
- @include type-style('body-short-01');
459
+ @include type-style('body-compact-01');
460
460
 
461
461
  position: absolute;
462
462
  // top offset needed to vertically center absolutely positioned flex child in IE11
@@ -64,7 +64,7 @@
64
64
  'link-focus-text-color',
65
65
  theme.$focus-inverse
66
66
  );
67
- @include type.type-style('body-short-01');
67
+ @include type.type-style('body-compact-01');
68
68
 
69
69
  display: grid;
70
70
  max-width: 18rem;
@@ -30,7 +30,7 @@ $tooltip-padding-inline: custom-property.get-var(
30
30
  }
31
31
 
32
32
  .#{$prefix}--tooltip-content {
33
- @include type.type-style('body-long-01');
33
+ @include type.type-style('body-01');
34
34
 
35
35
  max-width: convert.rem(288px);
36
36
  padding: $tooltip-padding-block $tooltip-padding-inline;
@@ -60,7 +60,7 @@ $tooltip-padding-inline: custom-property.get-var(
60
60
  }
61
61
 
62
62
  .#{$prefix}--definition-tooltip {
63
- @include type.type-style('body-long-01');
63
+ @include type.type-style('body-01');
64
64
 
65
65
  max-width: convert.rem(176px);
66
66
  padding: convert.rem(8px) convert.rem(16px);
@@ -85,6 +85,6 @@ $tooltip-padding-inline: custom-property.get-var(
85
85
  }
86
86
 
87
87
  .#{$prefix}--icon-tooltip .#{$prefix}--tooltip-content {
88
- @include type.type-style('body-short-01');
88
+ @include type.type-style('body-compact-01');
89
89
  }
90
90
  }
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .#{$prefix}--tree-node__label {
69
- @include type-style('body-short-01');
69
+ @include type-style('body-compact-01');
70
70
 
71
71
  display: flex;
72
72
  min-height: rem(32px);
@@ -39,7 +39,7 @@
39
39
  display: inline-flex;
40
40
  width: mini-units(6);
41
41
  height: mini-units(6);
42
- border: rem(2px) solid transparent;
42
+ border: rem(1px) solid transparent;
43
43
  transition: background-color $duration-fast-02,
44
44
  border-color $duration-fast-02;
45
45
  }
@@ -124,7 +124,7 @@
124
124
  // Header - Name
125
125
  //--------------------------------------------------------------------------
126
126
  a.#{$prefix}--header__name {
127
- @include type-style('body-short-01');
127
+ @include type-style('body-compact-01');
128
128
 
129
129
  display: flex;
130
130
  height: 100%;
@@ -324,7 +324,7 @@
324
324
  width: mini-units(25);
325
325
  flex-direction: column;
326
326
  background-color: $layer;
327
- box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
327
+ box-shadow: 0 4px 8px 0 rgb(0 0 0 / 50%);
328
328
  transform: translateY(100%);
329
329
  }
330
330
 
@@ -81,8 +81,8 @@
81
81
  height: 0;
82
82
  background-color: transparent;
83
83
  opacity: 0;
84
- transition: opacity $transition--expansion $standard-easing,
85
- background-color $transition--expansion $standard-easing;
84
+ transition: opacity $transition-expansion $standard-easing,
85
+ background-color $transition-expansion $standard-easing;
86
86
  }
87
87
 
88
88
  .#{$prefix}--side-nav__overlay-active {
@@ -91,8 +91,8 @@
91
91
  height: 100vh;
92
92
  background-color: $overlay;
93
93
  opacity: 1;
94
- transition: opacity $transition--expansion $standard-easing,
95
- background-color $transition--expansion $standard-easing;
94
+ transition: opacity $transition-expansion $standard-easing,
95
+ background-color $transition-expansion $standard-easing;
96
96
  }
97
97
  }
98
98
 
@@ -192,7 +192,7 @@
192
192
  //----------------------------------------------------------------------------
193
193
  .#{$prefix}--side-nav__submenu {
194
194
  @include button-reset.reset($width: true);
195
- @include type-style('productive-heading-01');
195
+ @include type-style('heading-compact-01');
196
196
  @include focus-outline('reset');
197
197
 
198
198
  display: flex;
@@ -254,6 +254,7 @@
254
254
  position: relative;
255
255
  background-color: $background-selected;
256
256
  color: $text-primary;
257
+
257
258
  &::before {
258
259
  position: absolute;
259
260
  top: 0;
@@ -317,7 +318,7 @@
317
318
  .#{$prefix}--header__menu-title[aria-expanded='true']
318
319
  + .#{$prefix}--header__menu {
319
320
  @include focus-outline('reset');
320
- @include type-style('productive-heading-01');
321
+ @include type-style('heading-compact-01');
321
322
 
322
323
  position: relative;
323
324
  display: flex;
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  .#{$prefix}--switcher__item-link {
48
- @include type-style('productive-heading-01');
48
+ @include type-style('heading-compact-01');
49
49
 
50
50
  display: block;
51
51
  height: $spacing-07;
@@ -66,7 +66,7 @@ $-google-filenames: (
66
66
 
67
67
  @function -get-google-filename($map, $keys...) {
68
68
  @each $key in $keys {
69
- $map: map-get($map, $key);
69
+ $map: map.get($map, $key);
70
70
  }
71
71
 
72
72
  @return $map;
@@ -19,6 +19,7 @@
19
19
  0% {
20
20
  @include content-visible;
21
21
  }
22
+
22
23
  100% {
23
24
  @include content-hidden;
24
25
  }
@@ -28,6 +29,7 @@
28
29
  0% {
29
30
  @include content-hidden;
30
31
  }
32
+
31
33
  100% {
32
34
  @include content-visible;
33
35
  }
@@ -39,35 +41,43 @@
39
41
  transform: scaleX(0);
40
42
  transform-origin: left;
41
43
  }
44
+
42
45
  20% {
43
46
  opacity: 1;
44
47
  transform: scaleX(1);
45
48
  transform-origin: left;
46
49
  }
50
+
47
51
  28% {
48
52
  transform: scaleX(1);
49
53
  transform-origin: right;
50
54
  }
55
+
51
56
  51% {
52
57
  transform: scaleX(0);
53
58
  transform-origin: right;
54
59
  }
60
+
55
61
  58% {
56
62
  transform: scaleX(0);
57
63
  transform-origin: right;
58
64
  }
65
+
59
66
  82% {
60
67
  transform: scaleX(1);
61
68
  transform-origin: right;
62
69
  }
70
+
63
71
  83% {
64
72
  transform: scaleX(1);
65
73
  transform-origin: left;
66
74
  }
75
+
67
76
  96% {
68
77
  transform: scaleX(0);
69
78
  transform-origin: left;
70
79
  }
80
+
71
81
  100% {
72
82
  opacity: 0.3;
73
83
  transform: scaleX(0);
@@ -51,7 +51,7 @@
51
51
  font-weight: 400;
52
52
  text-align: left;
53
53
  transform: translateX(-50%);
54
- @include type.type-style('body-short-01');
54
+ @include type.type-style('body-compact-01');
55
55
 
56
56
  // IE media query
57
57
  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
@@ -93,6 +93,7 @@
93
93
 
94
94
  @if $tooltip-type == 'icon' {
95
95
  cursor: pointer;
96
+
96
97
  &:focus {
97
98
  outline: 1px solid transparent;
98
99
 
@@ -181,6 +182,7 @@
181
182
  from {
182
183
  opacity: 0;
183
184
  }
185
+
184
186
  to {
185
187
  opacity: 1;
186
188
  }