@carbon/styles 0.16.0-rc.0 → 0.16.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 +24 -23
- package/package.json +5 -5
- package/scss/_config.scss +5 -0
- package/scss/components/data-table/_data-table.scss +21 -7
- package/scss/components/data-table/action/_data-table-action.scss +17 -19
- package/scss/components/data-table/sort/_data-table-sort.scss +1 -0
- package/scss/components/date-picker/_flatpickr.scss +2 -2
- package/scss/components/radio-button/_radio-button.scss +4 -3
- package/scss/components/select/_select.scss +7 -9
- package/scss/components/tabs/_tabs.scss +4 -0
- package/scss/{_grid.scss → grid/_config.scss} +3 -7
- package/scss/grid/_flexbox.scss +11 -0
- package/scss/grid/_index.scss +16 -0
package/docs/sass.md
CHANGED
|
@@ -122,28 +122,45 @@ to `false`:
|
|
|
122
122
|
|
|
123
123
|
## Grid
|
|
124
124
|
|
|
125
|
-
| Import
|
|
126
|
-
|
|
|
127
|
-
| `@use '@carbon/styles/scss/grid';`
|
|
125
|
+
| Import | Filepath |
|
|
126
|
+
| :----------------------------------------- | :------------------------ |
|
|
127
|
+
| `@use '@carbon/styles/scss/grid';` | `scss/grid/_index.scss` |
|
|
128
|
+
| `@use '@carbon/styles/scss/grid/flexbox';` | `scss/grid/_flexbox.scss` |
|
|
128
129
|
|
|
129
130
|
### Using the grid
|
|
130
131
|
|
|
131
132
|
This package `@forward`s the styles defined in the
|
|
132
133
|
[`@carbon/grid`](https://github.com/carbon-design-system/carbon/tree/main/packages/grid)
|
|
133
|
-
package.
|
|
134
|
-
|
|
134
|
+
package. For full documentation, visit the
|
|
135
|
+
[Sass Documentation](../../grid/docs/sass.md) for the package.
|
|
135
136
|
|
|
136
137
|
To use the grid via `@carbon/styles`, it must be brought in directly or the grid
|
|
137
138
|
specific style sheet must be imported:
|
|
138
139
|
|
|
139
140
|
```scss
|
|
140
|
-
|
|
141
|
+
// All the grid styles are included through this central entrypoint
|
|
141
142
|
@use '@carbon/styles';
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
// Alternatively, the grid styles can be brought in on their own
|
|
144
145
|
@use '@carbon/styles/scss/grid';
|
|
145
146
|
```
|
|
146
147
|
|
|
148
|
+
By default, the emitted grid will be a CSS Grid based implementation. If you
|
|
149
|
+
prefer to use flexbox version, you can configure the package by writing the
|
|
150
|
+
following:
|
|
151
|
+
|
|
152
|
+
```scss
|
|
153
|
+
@use '@carbon/styles' with (
|
|
154
|
+
$use-flexbox-grid: true,
|
|
155
|
+
);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Or you can import the flexbox grid directly:
|
|
159
|
+
|
|
160
|
+
```scss
|
|
161
|
+
@use '@carbon/styles/scss/grid/flexbox';
|
|
162
|
+
```
|
|
163
|
+
|
|
147
164
|
### Classes provided
|
|
148
165
|
|
|
149
166
|
In either case, you will then have access to the grid classes and mixins
|
|
@@ -172,22 +189,6 @@ prefix:
|
|
|
172
189
|
</div>
|
|
173
190
|
```
|
|
174
191
|
|
|
175
|
-
### Grid Mixins
|
|
176
|
-
|
|
177
|
-
In the event that you'd like to configure your own classes for portions of the
|
|
178
|
-
grid, there are a few mixins that can be used.
|
|
179
|
-
|
|
180
|
-
- `css-grid()` provides the base grid definition
|
|
181
|
-
- `subgrid()` provides the subgrid definition
|
|
182
|
-
- `carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios)` generates the
|
|
183
|
-
CSS classname utilities for the aspect ratios
|
|
184
|
-
|
|
185
|
-
```scss
|
|
186
|
-
.custom-grid-class {
|
|
187
|
-
@include css-grid();
|
|
188
|
-
}
|
|
189
|
-
```
|
|
190
|
-
|
|
191
192
|
## Motion
|
|
192
193
|
|
|
193
194
|
The motion package provides helper functions, mixins, and duration tokens to add
|
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.16.0
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@carbon/colors": "^10.37.0",
|
|
24
24
|
"@carbon/feature-flags": "^0.7.0",
|
|
25
|
-
"@carbon/grid": "^10.
|
|
25
|
+
"@carbon/grid": "^10.43.0",
|
|
26
26
|
"@carbon/layout": "^10.37.0",
|
|
27
27
|
"@carbon/motion": "^10.29.0",
|
|
28
|
-
"@carbon/themes": "^10.
|
|
29
|
-
"@carbon/type": "^10.
|
|
28
|
+
"@carbon/themes": "^10.53.0",
|
|
29
|
+
"@carbon/type": "^10.43.0",
|
|
30
30
|
"@ibm/plex": "6.0.0-next.6"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@carbon/test-utils": "^10.21.0",
|
|
34
34
|
"css": "^3.0.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "05b57e9181903cb87173d48a0635691a2e942e30"
|
|
37
37
|
}
|
package/scss/_config.scss
CHANGED
|
@@ -100,17 +100,30 @@
|
|
|
100
100
|
color: $text-primary;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.#{$prefix}--data-table
|
|
104
|
-
.#{$prefix}--data-table tbody tr:hover th .#{$prefix}--link {
|
|
103
|
+
.#{$prefix}--data-table tr:hover .#{$prefix}--link {
|
|
105
104
|
color: $link-secondary;
|
|
106
105
|
}
|
|
107
106
|
|
|
107
|
+
.#{$prefix}--data-table tr:hover .#{$prefix}--link--disabled {
|
|
108
|
+
color: $text-disabled;
|
|
109
|
+
}
|
|
110
|
+
|
|
108
111
|
.#{$prefix}--data-table th,
|
|
109
112
|
.#{$prefix}--data-table td {
|
|
110
113
|
text-align: left;
|
|
111
114
|
vertical-align: middle;
|
|
112
115
|
}
|
|
113
116
|
|
|
117
|
+
.#{$prefix}--data-table th[align='right'],
|
|
118
|
+
.#{$prefix}--data-table td[align='right'] {
|
|
119
|
+
text-align: right;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.#{$prefix}--data-table th[align='center'],
|
|
123
|
+
.#{$prefix}--data-table td[align='center'] {
|
|
124
|
+
text-align: center;
|
|
125
|
+
}
|
|
126
|
+
|
|
114
127
|
.#{$prefix}--data-table th {
|
|
115
128
|
padding-right: $spacing-05;
|
|
116
129
|
padding-left: $spacing-05;
|
|
@@ -238,7 +251,8 @@
|
|
|
238
251
|
}
|
|
239
252
|
}
|
|
240
253
|
|
|
241
|
-
.#{$prefix}--data-table--selected
|
|
254
|
+
.#{$prefix}--data-table--selected
|
|
255
|
+
.#{$prefix}--link:not(.#{$prefix}--link--disabled) {
|
|
242
256
|
color: $link-secondary;
|
|
243
257
|
}
|
|
244
258
|
|
|
@@ -403,10 +417,6 @@
|
|
|
403
417
|
padding-top: $spacing-05;
|
|
404
418
|
}
|
|
405
419
|
|
|
406
|
-
.#{$prefix}--date-table tbody th.#{$prefix}--table-column-checkbox:hover {
|
|
407
|
-
background: $data-table-column-hover;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
420
|
//----------------------------------------------------------------------------
|
|
411
421
|
// Radio
|
|
412
422
|
//----------------------------------------------------------------------------
|
|
@@ -725,6 +735,10 @@
|
|
|
725
735
|
width: auto;
|
|
726
736
|
}
|
|
727
737
|
|
|
738
|
+
.#{$prefix}--data-table-container--static {
|
|
739
|
+
width: fit-content;
|
|
740
|
+
}
|
|
741
|
+
|
|
728
742
|
// -------------
|
|
729
743
|
// Sticky header
|
|
730
744
|
// -------------
|
|
@@ -26,9 +26,8 @@
|
|
|
26
26
|
// Need for batch actions
|
|
27
27
|
position: relative;
|
|
28
28
|
display: flex;
|
|
29
|
-
overflow: hidden;
|
|
30
29
|
width: 100%;
|
|
31
|
-
height: $spacing-09;
|
|
30
|
+
min-height: $spacing-09;
|
|
32
31
|
background-color: $layer;
|
|
33
32
|
}
|
|
34
33
|
|
|
@@ -375,17 +374,14 @@
|
|
|
375
374
|
//-------------------------------------------------
|
|
376
375
|
.#{$prefix}--batch-actions {
|
|
377
376
|
position: absolute;
|
|
378
|
-
|
|
377
|
+
right: 0;
|
|
378
|
+
bottom: 0;
|
|
379
379
|
left: 0;
|
|
380
380
|
display: flex;
|
|
381
|
-
width: 100%;
|
|
382
|
-
height: 100%;
|
|
383
381
|
align-items: center;
|
|
384
|
-
|
|
385
|
-
padding-left: $spacing-06;
|
|
382
|
+
justify-content: space-between;
|
|
386
383
|
background-color: $background-brand;
|
|
387
384
|
clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
|
|
388
|
-
overflow-x: auto;
|
|
389
385
|
pointer-events: none;
|
|
390
386
|
transform: translate3d(0, 48px, 0);
|
|
391
387
|
transition: transform $duration-fast-02 motion(standard, productive),
|
|
@@ -399,6 +395,7 @@
|
|
|
399
395
|
}
|
|
400
396
|
|
|
401
397
|
.#{$prefix}--batch-actions--active {
|
|
398
|
+
overflow: auto hidden;
|
|
402
399
|
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
|
403
400
|
pointer-events: all;
|
|
404
401
|
transform: translate3d(0, 0, 0);
|
|
@@ -406,15 +403,14 @@
|
|
|
406
403
|
|
|
407
404
|
//btns container
|
|
408
405
|
.#{$prefix}--action-list {
|
|
409
|
-
position: absolute;
|
|
410
|
-
right: 0;
|
|
411
406
|
display: flex;
|
|
407
|
+
align-items: center;
|
|
412
408
|
}
|
|
413
409
|
|
|
414
410
|
.#{$prefix}--action-list .#{$prefix}--btn {
|
|
415
|
-
min-width: 0;
|
|
416
411
|
padding: $button-padding-ghost;
|
|
417
412
|
color: $text-on-color;
|
|
413
|
+
white-space: nowrap;
|
|
418
414
|
}
|
|
419
415
|
|
|
420
416
|
.#{$prefix}--action-list .#{$prefix}--btn:disabled {
|
|
@@ -479,22 +475,24 @@
|
|
|
479
475
|
transition: opacity $transition-base $standard-easing;
|
|
480
476
|
}
|
|
481
477
|
|
|
482
|
-
// cancel btn
|
|
483
|
-
.#{$prefix}--batch-summary__cancel {
|
|
484
|
-
position: relative;
|
|
485
|
-
padding-right: $spacing-05;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
478
|
// items selected text
|
|
489
479
|
.#{$prefix}--batch-summary {
|
|
490
|
-
position:
|
|
480
|
+
position: sticky;
|
|
481
|
+
z-index: 100000;
|
|
491
482
|
left: 0;
|
|
492
483
|
display: flex;
|
|
484
|
+
min-height: 3rem;
|
|
493
485
|
align-items: center;
|
|
494
|
-
|
|
486
|
+
padding: 0 $spacing-05;
|
|
487
|
+
background-color: $background-brand;
|
|
488
|
+
|
|
495
489
|
color: $text-on-color;
|
|
496
490
|
}
|
|
497
491
|
|
|
492
|
+
.#{$prefix}--batch-summary__scroll {
|
|
493
|
+
box-shadow: 0.5px 0 0.2px $link-primary-hover;
|
|
494
|
+
}
|
|
495
|
+
|
|
498
496
|
.#{$prefix}--batch-summary__para {
|
|
499
497
|
@include type-style('body-compact-01');
|
|
500
498
|
}
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
border-bottom: 0;
|
|
322
322
|
|
|
323
323
|
&::after {
|
|
324
|
-
border-bottom: rem(4px) solid $
|
|
324
|
+
border-bottom: rem(4px) solid $icon-primary;
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
top: rem(11px);
|
|
330
330
|
|
|
331
331
|
&::after {
|
|
332
|
-
border-top: rem(4px) solid $
|
|
332
|
+
border-top: rem(4px) solid $icon-primary;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
|
@@ -123,7 +123,7 @@ $radio-border-width: 1px !default;
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.#{$prefix}--radio-button:disabled + .#{$prefix}--radio-button__label {
|
|
126
|
-
color: $
|
|
126
|
+
color: $text-disabled;
|
|
127
127
|
cursor: not-allowed;
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -133,10 +133,11 @@ $radio-border-width: 1px !default;
|
|
|
133
133
|
.#{$prefix}--radio-button:disabled:checked
|
|
134
134
|
+ .#{$prefix}--radio-button__label
|
|
135
135
|
.#{$prefix}--radio-button__appearance {
|
|
136
|
-
|
|
136
|
+
// Disabled radio button, checkbox fix #10913
|
|
137
|
+
border-color: $icon-disabled;
|
|
137
138
|
|
|
138
139
|
&::before {
|
|
139
|
-
background-color: $
|
|
140
|
+
background-color: $text-disabled;
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
transition: outline $duration-fast-01 motion(standard, productive);
|
|
63
63
|
|
|
64
64
|
&:hover {
|
|
65
|
-
background-color: $
|
|
65
|
+
background-color: $field-hover;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// Hide default select arrow in IE10+
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
|
|
90
90
|
&:disabled,
|
|
91
91
|
&:hover:disabled {
|
|
92
|
-
border-bottom-color:
|
|
92
|
+
border-bottom-color: transparent;
|
|
93
93
|
background-color: $field;
|
|
94
94
|
color: $text-disabled;
|
|
95
95
|
cursor: not-allowed;
|
|
@@ -101,8 +101,6 @@
|
|
|
101
101
|
max-height: rem(32px);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// TODO V11: Remove xl selector
|
|
105
|
-
.#{$prefix}--select-input--xl,
|
|
106
104
|
.#{$prefix}--select-input--lg {
|
|
107
105
|
height: rem(48px);
|
|
108
106
|
max-height: rem(48px);
|
|
@@ -115,7 +113,7 @@
|
|
|
115
113
|
|
|
116
114
|
.#{$prefix}--select-input__wrapper[data-invalid] .#{$prefix}--select-input,
|
|
117
115
|
.#{$prefix}--select--warning .#{$prefix}--select-input {
|
|
118
|
-
padding-right:
|
|
116
|
+
padding-right: $spacing-10;
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
.#{$prefix}--select-input:disabled ~ .#{$prefix}--select__arrow {
|
|
@@ -123,15 +121,15 @@
|
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
.#{$prefix}--select--light .#{$prefix}--select-input {
|
|
126
|
-
background-color: $field
|
|
124
|
+
background-color: $field;
|
|
127
125
|
|
|
128
126
|
&:hover {
|
|
129
|
-
background-color: $
|
|
127
|
+
background-color: $field-hover;
|
|
130
128
|
}
|
|
131
129
|
|
|
132
130
|
&:disabled,
|
|
133
131
|
&:hover:disabled {
|
|
134
|
-
background-color: $field
|
|
132
|
+
background-color: $field;
|
|
135
133
|
color: $text-disabled;
|
|
136
134
|
cursor: not-allowed;
|
|
137
135
|
}
|
|
@@ -178,7 +176,7 @@
|
|
|
178
176
|
optgroup.#{$prefix}--select-optgroup,
|
|
179
177
|
.#{$prefix}--select-option {
|
|
180
178
|
// For the options to show in IE11
|
|
181
|
-
background-color: $
|
|
179
|
+
background-color: $layer-hover;
|
|
182
180
|
color: $text-primary;
|
|
183
181
|
|
|
184
182
|
&:disabled {
|
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
@use 'config';
|
|
9
|
-
|
|
8
|
+
@use '../config';
|
|
10
9
|
@forward '@carbon/grid'
|
|
11
10
|
show css-grid,
|
|
12
|
-
subgrid,
|
|
13
11
|
flex-grid,
|
|
14
12
|
$grid-gutter,
|
|
15
13
|
$grid-gutter-condensed,
|
|
16
14
|
$grid-breakpoints
|
|
17
15
|
with (
|
|
18
|
-
$prefix: config.$prefix,
|
|
19
|
-
$flex-grid-columns: config.$flex-grid-columns
|
|
16
|
+
$prefix: config.$prefix !default,
|
|
17
|
+
$flex-grid-columns: config.$flex-grid-columns !default
|
|
20
18
|
);
|
|
21
|
-
|
|
22
|
-
@use '@carbon/grid';
|
|
@@ -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 'config';
|
|
9
|
+
@use '@carbon/grid';
|
|
10
|
+
|
|
11
|
+
@include grid.flex-grid();
|
|
@@ -0,0 +1,16 @@
|
|
|
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 'config';
|
|
9
|
+
@use '@carbon/grid';
|
|
10
|
+
@use '../config';
|
|
11
|
+
|
|
12
|
+
@if config.$use-flexbox-grid == true {
|
|
13
|
+
@include grid.flex-grid();
|
|
14
|
+
} @else {
|
|
15
|
+
@include grid.css-grid();
|
|
16
|
+
}
|