@carbon/styles 0.7.0 → 0.9.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/package.json +9 -9
- package/scss/_feature-flags.scss +8 -1
- package/scss/_spacing.scss +1 -0
- package/scss/_type.scss +1 -0
- package/scss/components/_index.scss +1 -0
- package/scss/components/button/_button.scss +9 -0
- package/scss/components/checkbox/_checkbox.scss +1 -0
- package/scss/components/code-snippet/_code-snippet.scss +3 -3
- package/scss/components/data-table/_data-table.scss +1 -0
- package/scss/components/data-table/expandable/_data-table-expandable.scss +2 -2
- package/scss/components/date-picker/_date-picker.scss +1 -1
- package/scss/components/date-picker/_flatpickr.scss +39 -38
- package/scss/components/dropdown/_dropdown.scss +4 -4
- package/scss/components/file-uploader/_file-uploader.scss +4 -1
- package/scss/components/form/_form.scss +15 -6
- package/scss/components/list-box/_list-box.scss +34 -4
- package/scss/components/notification/_actionable-notification.scss +5 -2
- package/scss/components/notification/_inline-notification.scss +7 -4
- package/scss/components/notification/_toast-notification.scss +13 -8
- package/scss/components/number-input/_number-input.scss +3 -3
- package/scss/components/overflow-menu/_overflow-menu.scss +4 -4
- package/scss/components/popover/_popover.scss +232 -199
- package/scss/components/progress-indicator/_progress-indicator.scss +6 -0
- package/scss/components/radio-button/_radio-button.scss +11 -9
- package/scss/components/search/_search.scss +7 -7
- package/scss/components/stack/_index.scss +11 -0
- package/scss/components/stack/_stack.scss +34 -0
- package/scss/components/structured-list/_structured-list.scss +7 -4
- package/scss/components/tabs/_tabs.scss +4 -1
- package/scss/components/tile/_tile.scss +4 -3
- package/scss/components/toggle/_toggle.scss +80 -18
- package/scss/components/tooltip/_tooltip.scss +14 -727
- package/scss/components/treeview/_treeview.scss +17 -17
- package/scss/components/ui-shell/header/_header.scss +19 -0
- package/scss/utilities/_convert.scss +13 -4
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Radio
|
|
10
10
|
//-----------------------------
|
|
11
11
|
|
|
12
|
-
@use '../../
|
|
12
|
+
@use '../../theme' as *;
|
|
13
13
|
@use '../../type';
|
|
14
14
|
@use '../form';
|
|
15
15
|
@use '../../utilities/focus-outline' as *;
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
@use '../../config' as *;
|
|
21
21
|
@use '../../spacing' as *;
|
|
22
22
|
|
|
23
|
+
@use '../button/tokens' as *;
|
|
24
|
+
|
|
23
25
|
/// @type Number
|
|
24
26
|
/// @access public
|
|
25
27
|
/// @group radio-button
|
|
@@ -119,21 +121,21 @@ $radio-border-width: 1px !default;
|
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
.#{$prefix}--radio-button:disabled
|
|
123
|
-
color: $disabled
|
|
124
|
+
.#{$prefix}--radio-button:button-disabled + .#{$prefix}--radio-button__label {
|
|
125
|
+
color: $button-disabled;
|
|
124
126
|
cursor: not-allowed;
|
|
125
127
|
}
|
|
126
128
|
|
|
127
|
-
.#{$prefix}--radio-button:disabled
|
|
129
|
+
.#{$prefix}--radio-button:button-disabled
|
|
128
130
|
+ .#{$prefix}--radio-button__label
|
|
129
131
|
.#{$prefix}--radio-button__appearance,
|
|
130
|
-
.#{$prefix}--radio-button:disabled
|
|
132
|
+
.#{$prefix}--radio-button:button-disabled:checked
|
|
131
133
|
+ .#{$prefix}--radio-button__label
|
|
132
134
|
.#{$prefix}--radio-button__appearance {
|
|
133
|
-
border-color: $disabled
|
|
135
|
+
border-color: $border-disabled;
|
|
134
136
|
|
|
135
137
|
&::before {
|
|
136
|
-
background-color: $disabled
|
|
138
|
+
background-color: $button-disabled;
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -142,8 +144,8 @@ $radio-border-width: 1px !default;
|
|
|
142
144
|
.#{$prefix}--radio-button:focus
|
|
143
145
|
+ .#{$prefix}--radio-button__label
|
|
144
146
|
.#{$prefix}--radio-button__appearance {
|
|
145
|
-
|
|
146
|
-
outline:
|
|
147
|
+
outline: 2px solid $focus;
|
|
148
|
+
outline-offset: 1.5px;
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
// Skeleton State
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Search
|
|
10
10
|
//-----------------------------
|
|
11
11
|
|
|
12
|
-
@use '../../
|
|
12
|
+
@use '../../theme' as *;
|
|
13
13
|
@use '../../config' as *;
|
|
14
14
|
@use '../../type';
|
|
15
15
|
@use '../../motion' as *;
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
|
|
71
71
|
.#{$prefix}--search-input[disabled] {
|
|
72
72
|
border-bottom: 1px solid transparent;
|
|
73
|
-
background-color: $field
|
|
74
|
-
color: $disabled
|
|
73
|
+
background-color: $field;
|
|
74
|
+
color: $text-disabled;
|
|
75
75
|
cursor: not-allowed;
|
|
76
76
|
|
|
77
77
|
&::placeholder {
|
|
78
|
-
color: $
|
|
78
|
+
color: $field;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
.#{$prefix}--search--light .#{$prefix}--search-input {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
border-bottom: 1px solid $border-strong;
|
|
161
161
|
|
|
162
162
|
&::before {
|
|
163
|
-
background-color: $hover
|
|
163
|
+
background-color: $field-hover;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
visibility: inherit;
|
|
201
201
|
|
|
202
202
|
&:hover {
|
|
203
|
-
background-color: $hover
|
|
203
|
+
background-color: $field-hover;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
&:focus {
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
.#{$prefix}--search--disabled svg {
|
|
234
|
-
fill: $disabled
|
|
234
|
+
fill: $icon-on-color-disabled;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.#{$prefix}--search-close:focus,
|
|
@@ -0,0 +1,34 @@
|
|
|
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 '../../utilities/custom-property';
|
|
11
|
+
|
|
12
|
+
@mixin stack() {
|
|
13
|
+
.#{$prefix}--stack-horizontal {
|
|
14
|
+
display: inline-grid;
|
|
15
|
+
column-gap: custom-property.get-var('stack-gap', 0);
|
|
16
|
+
grid-auto-flow: column;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.#{$prefix}--stack-vertical {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-auto-flow: row;
|
|
22
|
+
row-gap: custom-property.get-var('stack-gap', 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
$index: 1;
|
|
26
|
+
|
|
27
|
+
@each $step, $value in spacing.$spacing {
|
|
28
|
+
.#{$prefix}--stack-scale-#{$index} {
|
|
29
|
+
@include custom-property.declaration('stack-gap', $value);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
$index: $index + 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@use '../../feature-flags' as *;
|
|
10
10
|
@use "../../type" as *;
|
|
11
11
|
@use '../../motion';
|
|
12
|
-
@use '../../
|
|
12
|
+
@use '../../theme' as *;
|
|
13
13
|
@use "../../utilities/focus-outline" as *;
|
|
14
14
|
@use "../../utilities/skeleton" as *;
|
|
15
15
|
@use "../../utilities/high-contrast-mode" as *;
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
|
|
37
37
|
display: table;
|
|
38
38
|
width: 100%;
|
|
39
|
-
|
|
39
|
+
@if not enabled('enable-v11-release') {
|
|
40
|
+
margin-bottom: 5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
40
43
|
background-color: transparent;
|
|
41
44
|
border-collapse: collapse;
|
|
42
45
|
border-spacing: 0;
|
|
@@ -86,8 +89,8 @@
|
|
|
86
89
|
|
|
87
90
|
.#{$prefix}--structured-list--selection
|
|
88
91
|
.#{$prefix}--structured-list-row:hover:not(.#{$prefix}--structured-list-row--header-row):not(.#{$prefix}--structured-list-row--selected) {
|
|
89
|
-
border-bottom: 1px solid $hover
|
|
90
|
-
background-color: $hover
|
|
92
|
+
border-bottom: 1px solid $background-hover;
|
|
93
|
+
background-color: $background-hover;
|
|
91
94
|
cursor: pointer;
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -733,8 +733,11 @@
|
|
|
733
733
|
@include focus-outline('reset');
|
|
734
734
|
@include type-style('body-short-01');
|
|
735
735
|
|
|
736
|
+
@if not feature-flag-enabled('enable-v11-release') {
|
|
737
|
+
width: rem(160px);
|
|
738
|
+
}
|
|
739
|
+
|
|
736
740
|
overflow: hidden;
|
|
737
|
-
width: rem(160px);
|
|
738
741
|
padding: $spacing-04 $spacing-05 $spacing-03;
|
|
739
742
|
border-bottom: $tab-underline-color;
|
|
740
743
|
color: $text-secondary;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@use '../../config' as *;
|
|
9
9
|
@use '../../motion' as *;
|
|
10
10
|
@use '../../spacing' as *;
|
|
11
|
-
@use '../../
|
|
11
|
+
@use '../../theme' as *;
|
|
12
12
|
@use '../../type' as *;
|
|
13
13
|
@use '../button/tokens' as button;
|
|
14
14
|
@use '../../utilities/focus-outline' as *;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
// V11: Possibly deprecate
|
|
42
42
|
.#{$prefix}--tile--light {
|
|
43
|
-
background-color: $
|
|
43
|
+
background-color: $layer-02;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.#{$prefix}--tile--clickable,
|
|
@@ -162,6 +162,7 @@
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.#{$prefix}--tile--expandable {
|
|
165
|
+
position: relative;
|
|
165
166
|
overflow: hidden;
|
|
166
167
|
width: 100%;
|
|
167
168
|
border: 0;
|
|
@@ -249,7 +250,7 @@
|
|
|
249
250
|
|
|
250
251
|
// V11: Possibly deprecate
|
|
251
252
|
.#{$prefix}--tile--disabled.#{$prefix}--tile--selectable.#{$prefix}--tile--light {
|
|
252
|
-
background-color: $
|
|
253
|
+
background-color: $layer-02;
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
.#{$prefix}--tile--disabled.#{$prefix}--tile--is-selected {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
//3
|
|
7
7
|
|
|
8
8
|
@use '../../config' as *;
|
|
9
|
-
@use '../../feature-flags'
|
|
9
|
+
@use '../../feature-flags';
|
|
10
10
|
@use '../../motion' as *;
|
|
11
11
|
@use '../../spacing' as *;
|
|
12
12
|
@use '../../theme' as *;
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
@use '../../utilities/convert' as *;
|
|
16
16
|
@use '../../utilities/high-contrast-mode' as *;
|
|
17
17
|
@use '../../utilities/visually-hidden' as *;
|
|
18
|
+
@use '../../utilities/skeleton' as *;
|
|
18
19
|
|
|
19
20
|
/// Toggle styles
|
|
20
21
|
/// @access public
|
|
21
22
|
/// @group toggle
|
|
22
23
|
@mixin toggle {
|
|
23
|
-
@if enabled('enable-v11-release') {
|
|
24
|
+
@if feature-flags.enabled('enable-v11-release') {
|
|
24
25
|
.#{$prefix}--toggle__label-text {
|
|
25
26
|
@include type-style('label-01');
|
|
26
27
|
|
|
@@ -586,30 +587,91 @@
|
|
|
586
587
|
//----------------------------------------------
|
|
587
588
|
// Skeleton
|
|
588
589
|
// ---------------------------------------------
|
|
590
|
+
//md toggle input
|
|
591
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
592
|
+
+ .#{$prefix}--toggle-input__label
|
|
593
|
+
.#{$prefix}--toggle__switch {
|
|
594
|
+
@include skeleton;
|
|
589
595
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
596
|
+
width: 3rem;
|
|
597
|
+
margin-top: 0.5rem;
|
|
598
|
+
}
|
|
593
599
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
600
|
+
//md skeleton label text
|
|
601
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
602
|
+
+ .#{$prefix}--toggle-input__label
|
|
603
|
+
> div {
|
|
604
|
+
overflow: hidden;
|
|
605
|
+
width: 1.5rem;
|
|
606
|
+
height: 0.5rem;
|
|
607
|
+
//hides text
|
|
608
|
+
font-size: 0%;
|
|
609
|
+
line-height: 0;
|
|
610
|
+
|
|
611
|
+
@include skeleton;
|
|
597
612
|
}
|
|
598
613
|
|
|
599
|
-
//
|
|
600
|
-
.#{$prefix}--
|
|
601
|
-
|
|
602
|
-
|
|
614
|
+
//small toggle input
|
|
615
|
+
.#{$prefix}--toggle-input--small.#{$prefix}--skeleton
|
|
616
|
+
+ .#{$prefix}--toggle-input__label
|
|
617
|
+
.#{$prefix}--toggle__switch {
|
|
618
|
+
@include skeleton;
|
|
619
|
+
|
|
620
|
+
width: 2rem;
|
|
621
|
+
margin-top: 0.5rem;
|
|
603
622
|
}
|
|
604
623
|
|
|
605
|
-
//
|
|
606
|
-
.#{$prefix}--toggle-input
|
|
624
|
+
//sm skeleton label text
|
|
625
|
+
.#{$prefix}--toggle-input--small.#{$prefix}--skeleton
|
|
607
626
|
+ .#{$prefix}--toggle-input__label
|
|
608
|
-
>
|
|
609
|
-
|
|
627
|
+
> div {
|
|
628
|
+
overflow: hidden;
|
|
629
|
+
width: 1rem;
|
|
630
|
+
height: 0.5rem;
|
|
631
|
+
//hides text
|
|
632
|
+
font-size: 0%;
|
|
633
|
+
line-height: 0;
|
|
634
|
+
|
|
635
|
+
@include skeleton;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
// on/off text skeleton
|
|
639
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
610
640
|
+ .#{$prefix}--toggle-input__label
|
|
611
|
-
|
|
612
|
-
|
|
641
|
+
.#{$prefix}--toggle__switch
|
|
642
|
+
.#{$prefix}--toggle__text--left {
|
|
643
|
+
@include skeleton;
|
|
644
|
+
|
|
645
|
+
position: absolute;
|
|
646
|
+
width: 1rem;
|
|
647
|
+
height: 0.5rem;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.#{$prefix}--toggle-input--small.#{$prefix}--skeleton
|
|
651
|
+
+ .#{$prefix}--toggle-input__label
|
|
652
|
+
.#{$prefix}--toggle__switch
|
|
653
|
+
.#{$prefix}--toggle__text--left {
|
|
654
|
+
left: 2rem;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
//pseudo "toggle" button
|
|
658
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
659
|
+
+ .#{$prefix}--toggle-input__label
|
|
660
|
+
.#{$prefix}--toggle__switch::after,
|
|
661
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
662
|
+
+ .#{$prefix}--toggle-input__label
|
|
663
|
+
.#{$prefix}--toggle__appearance::after,
|
|
664
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
665
|
+
+ .#{$prefix}--toggle-input__label
|
|
666
|
+
.#{$prefix}--toggle__appearance::before {
|
|
667
|
+
display: none;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
//make it square
|
|
671
|
+
.#{$prefix}--toggle.#{$prefix}--skeleton
|
|
672
|
+
+ .#{$prefix}--toggle-input__label
|
|
673
|
+
.#{$prefix}--toggle__switch::before {
|
|
674
|
+
border-radius: 0;
|
|
613
675
|
}
|
|
614
676
|
}
|
|
615
677
|
}
|