@carbon/styles 0.9.0-rc.0 → 0.11.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.
package/docs/sass.md CHANGED
@@ -120,23 +120,6 @@ to `false`:
120
120
  );
121
121
  ```
122
122
 
123
- ### Emitting additional typefaces
124
-
125
- When using the font-face declarations, only `IBM Plex Sans` and `IBM Plex Mono`
126
- are emitted. If you would like to emit additional typefaces, like
127
- `IBM Plex Sans Arabic`, you can set additional config tokens:
128
-
129
- ```scss
130
- @use '@carbon/styles/scss/config' with (
131
- $css--plex-arabic: true,
132
- );
133
- ```
134
-
135
- | IBM Plex Language | Token |
136
- | :---------------- | :------------------ |
137
- | Arabic | `$css--plex-arabic` |
138
- | TODO | `TODO` |
139
-
140
123
  ## Grid
141
124
 
142
125
  | Import | Filepath |
package/index.scss CHANGED
@@ -7,7 +7,6 @@
7
7
 
8
8
  @forward 'scss/config';
9
9
  @forward 'scss/colors' hide $white;
10
- @forward 'scss/font-face';
11
10
  @forward 'scss/grid';
12
11
  @forward 'scss/motion';
13
12
  @forward 'scss/type';
@@ -15,4 +14,5 @@
15
14
  @forward 'scss/theme';
16
15
 
17
16
  @use 'scss/reset';
17
+ @forward 'scss/fonts';
18
18
  @use 'scss/components';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "0.9.0-rc.0",
4
+ "version": "0.11.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,13 +25,13 @@
25
25
  "@carbon/grid": "^10.39.0",
26
26
  "@carbon/layout": "^10.34.0",
27
27
  "@carbon/motion": "^10.26.0",
28
- "@carbon/themes": "^10.47.0-rc.0",
29
- "@carbon/type": "^10.38.0",
28
+ "@carbon/themes": "^10.48.0-rc.0",
29
+ "@carbon/type": "^10.39.0-rc.0",
30
30
  "@ibm/plex": "6.0.0-next.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@carbon/test-utils": "^10.20.0",
34
34
  "css": "^3.0.0"
35
35
  },
36
- "gitHead": "ca5da0de81f653fecfc7272d7771f0e0aa9c35c7"
36
+ "gitHead": "f6e5dd2362aa2970add45c7fb7fc32841c252671"
37
37
  }
package/scss/_config.scss CHANGED
@@ -5,14 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- /// The value used to prefix selectors and CSS Custom Properties across the
9
- /// codebase
10
- /// @access public
11
- /// @type String
12
- /// @group config
13
- $prefix: 'cds' !default;
14
-
15
- /// If true, includes font face mixins in `_css--font-face.scss` depending on the `css--plex` feature flag
8
+ /// If true, includes font face mixins from scss/fonts
16
9
  /// @access public
17
10
  /// @type Bool
18
11
  /// @group config
@@ -30,8 +23,22 @@ $css--reset: true !default;
30
23
  /// @group config
31
24
  $css--default-type: true !default;
32
25
 
33
- /// If true, include IBM Plex Arabic type
26
+ /// Specify the default value for the `font-display` property used for fonts
27
+ /// loaded with @font-face
34
28
  /// @access public
35
- /// @type Bool
29
+ /// @type String
30
+ /// @group config
31
+ $font-display: 'swap' !default;
32
+
33
+ /// Specify the base path for loading IBM Plex
34
+ /// @access public
35
+ /// @type String
36
+ /// @group config
37
+ $font-path: '~@ibm/plex' !default;
38
+
39
+ /// The value used to prefix selectors and CSS Custom Properties across the
40
+ /// codebase
41
+ /// @access public
42
+ /// @type String
36
43
  /// @group config
37
- $css--plex-arabic: false !default;
44
+ $prefix: 'cds' !default;
@@ -15,7 +15,6 @@
15
15
  @use '../../utilities/focus-outline';
16
16
  @use '../../utilities/high-contrast-mode' as *;
17
17
  @use '../../utilities/skeleton' as *;
18
- @use '../../utilities/tooltip' as *;
19
18
  @use '../../utilities/visually-hidden' as *;
20
19
  @use 'tokens' as *;
21
20
 
@@ -145,118 +144,9 @@
145
144
  &.#{$prefix}--btn--md {
146
145
  padding: $button-padding-ghost-field;
147
146
  }
148
- }
149
-
150
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger {
151
- @include tooltip--trigger('icon', 'bottom');
152
-
153
- svg,
154
- &:hover svg,
155
- &:focus svg {
156
- fill: currentColor;
157
- }
158
-
159
- &.#{$prefix}--btn--disabled.#{$prefix}--tooltip--a11y::before,
160
- &.#{$prefix}--btn--disabled.#{$prefix}--tooltip--a11y::after,
161
- &.#{$prefix}--btn--disabled .#{$prefix}--assistive-text {
162
- overflow: hidden;
163
- margin: -1px;
164
- clip: rect(0, 0, 0, 0);
165
- opacity: 0;
166
- }
167
- }
168
-
169
- // Allow pointer events on tooltip when tooltip is visible
170
- .#{$prefix}--btn.#{$prefix}--btn--icon-only:not(.#{$prefix}--tooltip--hidden)
171
- .#{$prefix}--assistive-text {
172
- pointer-events: all;
173
- }
174
-
175
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus {
176
- border-color: $focus;
177
- }
178
-
179
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:active:not([disabled]) {
180
- border-color: transparent;
181
- }
182
-
183
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger:focus
184
- svg {
185
- outline-color: transparent;
186
- }
187
-
188
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger[disabled]:hover,
189
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger[disabled]:focus,
190
- .#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--tooltip__trigger[disabled]:active {
191
- cursor: not-allowed;
192
- fill: $icon-on-color-disabled;
193
- }
194
-
195
- .#{$prefix}--tooltip__trigger.#{$prefix}--btn--icon-only--top {
196
- @include tooltip--trigger('icon', 'top');
197
- @include tooltip--placement('icon', 'top', 'center');
198
-
199
- &.#{$prefix}--tooltip--align-start {
200
- @include tooltip--placement('icon', 'top', 'start');
201
- }
202
-
203
- &.#{$prefix}--tooltip--align-center {
204
- @include tooltip--placement('icon', 'top', 'center');
205
- }
206
-
207
- &.#{$prefix}--tooltip--align-end {
208
- @include tooltip--placement('icon', 'top', 'end');
209
- }
210
- }
211
-
212
- .#{$prefix}--tooltip__trigger.#{$prefix}--btn--icon-only--right {
213
- @include tooltip--trigger('icon', 'right');
214
- @include tooltip--placement('icon', 'right', 'center');
215
-
216
- &.#{$prefix}--tooltip--align-start {
217
- @include tooltip--placement('icon', 'right', 'start');
218
- }
219
-
220
- &.#{$prefix}--tooltip--align-center {
221
- @include tooltip--placement('icon', 'right', 'center');
222
- }
223
-
224
- &.#{$prefix}--tooltip--align-end {
225
- @include tooltip--placement('icon', 'right', 'end');
226
- }
227
- }
228
-
229
- .#{$prefix}--tooltip__trigger.#{$prefix}--btn--icon-only--bottom {
230
- @include tooltip--trigger('icon', 'bottom');
231
- @include tooltip--placement('icon', 'bottom', 'center');
232
-
233
- &.#{$prefix}--tooltip--align-start {
234
- @include tooltip--placement('icon', 'bottom', 'start');
235
- }
236
-
237
- &.#{$prefix}--tooltip--align-center {
238
- @include tooltip--placement('icon', 'bottom', 'center');
239
- }
240
-
241
- &.#{$prefix}--tooltip--align-end {
242
- @include tooltip--placement('icon', 'bottom', 'end');
243
- }
244
- }
245
-
246
- .#{$prefix}--tooltip__trigger.#{$prefix}--btn--icon-only--left {
247
- @include tooltip--trigger('icon', 'left');
248
- @include tooltip--placement('icon', 'left', 'center');
249
-
250
- &.#{$prefix}--tooltip--align-start {
251
- @include tooltip--placement('icon', 'left', 'start');
252
- }
253
-
254
- &.#{$prefix}--tooltip--align-center {
255
- @include tooltip--placement('icon', 'left', 'center');
256
- }
257
147
 
258
- &.#{$prefix}--tooltip--align-end {
259
- @include tooltip--placement('icon', 'left', 'end');
148
+ &:not([disabled]) svg {
149
+ fill: $icon-primary;
260
150
  }
261
151
  }
262
152
 
@@ -62,11 +62,11 @@ $button-secondary: (
62
62
  ),
63
63
  (
64
64
  theme: themes.$g10,
65
- value: #6f6f6f,
65
+ value: #393939,
66
66
  ),
67
67
  (
68
68
  theme: themes.$g90,
69
- value: #393939,
69
+ value: #6f6f6f,
70
70
  ),
71
71
  (
72
72
  theme: themes.$g100,
@@ -41,6 +41,9 @@
41
41
  // to match the specs.
42
42
  .#{$prefix}--checkbox {
43
43
  @include visually-hidden;
44
+ //even though its hidden, positioning is for native validation to be aligned to checkbox
45
+ top: 1.25rem;
46
+ left: 0.7rem;
44
47
  }
45
48
 
46
49
  // The label corresponds to the content inside of the `label` tag. Since we're
@@ -50,16 +50,19 @@ $input-label-weight: 400 !default;
50
50
  @include type-style('label-01');
51
51
 
52
52
  display: inline-block;
53
- @if not enabled('enable-v11-release') {
54
- margin-bottom: $spacing-03;
55
- }
56
-
53
+ margin-bottom: $spacing-03;
57
54
  color: $text-secondary;
58
55
  font-weight: $input-label-weight;
59
56
  line-height: 1rem;
60
57
  vertical-align: baseline;
61
58
  }
62
59
 
60
+ @if enabled('enable-v11-release') {
61
+ .#{$prefix}--label--no-margin {
62
+ margin-bottom: 0;
63
+ }
64
+ }
65
+
63
66
  .#{$prefix}--label .#{$prefix}--tooltip__trigger {
64
67
  // When tooltip trigger is put in form label the trigger button should fit in the size of label
65
68
  // https://github.com/IBM/carbon-components-react/issues/115
@@ -743,8 +743,8 @@ $list-box-menu-width: rem(300px);
743
743
 
744
744
  .#{$prefix}--list-box__menu-item--active:hover,
745
745
  .#{$prefix}--list-box__menu-item--active.#{$prefix}--list-box__menu-item--highlighted {
746
- border-bottom-color: $layer-selected;
747
- background-color: $layer-selected;
746
+ border-bottom-color: $layer-selected-hover;
747
+ background-color: $layer-selected-hover;
748
748
  }
749
749
 
750
750
  .#{$prefix}--list-box__menu-item--active
@@ -16,6 +16,7 @@
16
16
  @use '../../utilities/focus-outline' as *;
17
17
  @use '../../utilities/high-contrast-mode' as *;
18
18
  @use '../../utilities/convert' as *;
19
+ @use '../../utilities/z-index' as *;
19
20
 
20
21
  /// Overflow menu styles
21
22
  /// @access public
@@ -61,6 +61,15 @@ $popover-text-color: custom-property.get-var(
61
61
  // stylelint-disable-next-line length-zero-no-unit
62
62
  $popover-offset: custom-property.get-var('popover-offset', 0rem);
63
63
 
64
+ // Customize the dimensions of the caret by specifying its width or height.
65
+ // These values will be flipped in left or right directions to have the
66
+ // correct dimensions
67
+ $popover-caret-width: custom-property.get-var('popover-caret-width', rem(12px));
68
+ $popover-caret-height: custom-property.get-var(
69
+ 'popover-caret-height',
70
+ rem(6px)
71
+ );
72
+
64
73
  @mixin popover {
65
74
  // Container
66
75
  .#{$prefix}--popover-container {
@@ -202,8 +211,8 @@ $popover-offset: custom-property.get-var('popover-offset', 0rem);
202
211
  .#{$prefix}--popover--bottom-right .#{$prefix}--popover-caret {
203
212
  bottom: 0;
204
213
  left: 50%;
205
- width: rem(12px);
206
- height: rem(6px);
214
+ width: $popover-caret-width;
215
+ height: $popover-caret-height;
207
216
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
208
217
  transform: translate(-50%, $popover-offset);
209
218
  }
@@ -248,8 +257,8 @@ $popover-offset: custom-property.get-var('popover-offset', 0rem);
248
257
  .#{$prefix}--popover--top-right .#{$prefix}--popover-caret {
249
258
  top: 0;
250
259
  left: 50%;
251
- width: rem(12px);
252
- height: rem(6px);
260
+ width: $popover-caret-width;
261
+ height: $popover-caret-height;
253
262
  clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
254
263
  transform: translate(-50%, calc(-1 * $popover-offset));
255
264
  }
@@ -296,8 +305,8 @@ $popover-offset: custom-property.get-var('popover-offset', 0rem);
296
305
  .#{$prefix}--popover--right-bottom .#{$prefix}--popover-caret {
297
306
  top: 50%;
298
307
  left: 100%;
299
- width: rem(6px);
300
- height: rem(12px);
308
+ width: $popover-caret-height;
309
+ height: $popover-caret-width;
301
310
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
302
311
  transform: translate(calc($popover-offset - 100%), -50%);
303
312
  }
@@ -348,8 +357,8 @@ $popover-offset: custom-property.get-var('popover-offset', 0rem);
348
357
  .#{$prefix}--popover--left-bottom .#{$prefix}--popover-caret {
349
358
  top: 50%;
350
359
  right: 100%;
351
- width: rem(6px);
352
- height: rem(12px);
360
+ width: $popover-caret-height;
361
+ height: $popover-caret-width;
353
362
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
354
363
  transform: translate(calc(-1 * $popover-offset + 100%), -50%);
355
364
  }
@@ -121,15 +121,15 @@ $radio-border-width: 1px !default;
121
121
  }
122
122
  }
123
123
 
124
- .#{$prefix}--radio-button:button-disabled + .#{$prefix}--radio-button__label {
124
+ .#{$prefix}--radio-button:disabled + .#{$prefix}--radio-button__label {
125
125
  color: $button-disabled;
126
126
  cursor: not-allowed;
127
127
  }
128
128
 
129
- .#{$prefix}--radio-button:button-disabled
129
+ .#{$prefix}--radio-button:disabled
130
130
  + .#{$prefix}--radio-button__label
131
131
  .#{$prefix}--radio-button__appearance,
132
- .#{$prefix}--radio-button:button-disabled:checked
132
+ .#{$prefix}--radio-button:disabled:checked
133
133
  + .#{$prefix}--radio-button__label
134
134
  .#{$prefix}--radio-button__appearance {
135
135
  border-color: $border-disabled;