@carbon/styles 0.8.0 → 0.10.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 +3 -3
- package/scss/components/button/_button.scss +2 -112
- package/scss/components/button/_tokens.scss +2 -2
- package/scss/components/checkbox/_checkbox.scss +3 -0
- package/scss/components/data-table/_data-table.scss +1 -0
- package/scss/components/form/_form.scss +7 -4
- package/scss/components/number-input/_number-input.scss +3 -3
- package/scss/components/overflow-menu/_overflow-menu.scss +5 -4
- package/scss/components/popover/_popover.scss +241 -199
- package/scss/components/radio-button/_radio-button.scss +11 -9
- package/scss/components/search/_search.scss +7 -7
- package/scss/components/structured-list/_structured-list.scss +3 -3
- package/scss/components/tabs/_tabs.scss +111 -551
- package/scss/components/tile/_tile.scss +4 -3
- package/scss/components/tooltip/_index.scss +1 -0
- package/scss/components/tooltip/_tooltip.scss +38 -725
- package/scss/components/treeview/_treeview.scss +17 -17
|
@@ -5,319 +5,361 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
@use '../../theme' as *;
|
|
9
8
|
@use '../../config' as *;
|
|
10
|
-
@use '../../
|
|
9
|
+
@use '../../theme';
|
|
11
10
|
@use '../../utilities/box-shadow' as *;
|
|
11
|
+
@use '../../utilities/custom-property';
|
|
12
12
|
@use '../../utilities/high-contrast-mode' as *;
|
|
13
13
|
@use '../../utilities/focus-outline' as *;
|
|
14
14
|
@use '../../utilities/' as *;
|
|
15
15
|
@use '../../utilities/convert' as *;
|
|
16
16
|
|
|
17
|
-
/// Popover component
|
|
18
|
-
///
|
|
19
|
-
///
|
|
17
|
+
/// The Popover component is used for triggering a pop-up next to a trigger
|
|
18
|
+
/// element, typically a button, in a given direction. It is made up of several
|
|
19
|
+
/// parts and includes a handful of modifiers to change the appearance.
|
|
20
|
+
///
|
|
21
|
+
/// The parts of a popover include:
|
|
22
|
+
/// The popover container `.cds-popover-container`
|
|
23
|
+
/// This container contains the trigger and the popover and is used to
|
|
24
|
+
/// coordinate positioning relative to the trigger button
|
|
25
|
+
///
|
|
26
|
+
/// The popover
|
|
27
|
+
/// This is an intermediate container that is used for the
|
|
28
|
+
/// `filter: drop-shadow()` effect on the popover content and the caret. It is
|
|
29
|
+
/// an absolutely positioned container that matches the dimensions of the
|
|
30
|
+
/// container so that popover content and caret can be positioned absolutely.
|
|
31
|
+
///
|
|
32
|
+
/// Popover content
|
|
33
|
+
/// This is the containing element for user-provided content and sets the
|
|
34
|
+
/// background and text color for the area.
|
|
35
|
+
///
|
|
36
|
+
/// Popover caret
|
|
37
|
+
/// This caret is an optional modifier that displays a character centered with
|
|
38
|
+
/// respect to the trigger element
|
|
39
|
+
|
|
40
|
+
// The background color for the popover container
|
|
41
|
+
$popover-background-color: custom-property.get-var(
|
|
42
|
+
'popover-background-color',
|
|
43
|
+
theme.$layer
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
// The drop shadow value used for the popover container
|
|
47
|
+
$popover-drop-shadow: custom-property.get-var('popover-drop-shadow', 'none');
|
|
48
|
+
|
|
49
|
+
// The border radius value for the popover container
|
|
50
|
+
$popover-border-radius: custom-property.get-var('popover-border-radius', 2px);
|
|
51
|
+
|
|
52
|
+
// The text color used for text placed inside of the popover
|
|
53
|
+
$popover-text-color: custom-property.get-var(
|
|
54
|
+
'popover-text-color',
|
|
55
|
+
theme.$text-primary
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
// The distance between the popover container and the triggering element
|
|
59
|
+
// Specify the distance between the popover and the trigger. This value must
|
|
60
|
+
// have a unit otherwise the `calc()` expression will not work
|
|
61
|
+
// stylelint-disable-next-line length-zero-no-unit
|
|
62
|
+
$popover-offset: custom-property.get-var('popover-offset', 0rem);
|
|
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
|
+
|
|
20
73
|
@mixin popover {
|
|
21
|
-
|
|
22
|
-
$popover-
|
|
23
|
-
|
|
74
|
+
// Container
|
|
75
|
+
.#{$prefix}--popover-container {
|
|
76
|
+
position: relative;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
}
|
|
24
79
|
|
|
25
|
-
|
|
26
|
-
// Specify the distance between the popover and the trigger. This value must
|
|
27
|
-
// have a unit otherwise the `calc()` expression will not work
|
|
28
|
-
// stylelint-disable-next-line length-zero-no-unit
|
|
29
|
-
--cds-popover-offset: 0rem;
|
|
80
|
+
/// Modifiers
|
|
30
81
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
82
|
+
// Light modifier
|
|
83
|
+
.#{$prefix}--popover--light .#{$prefix}--popover-content {
|
|
84
|
+
@include custom-property.declaration(
|
|
85
|
+
'popover-background-color',
|
|
86
|
+
theme.$layer-02
|
|
87
|
+
);
|
|
88
|
+
}
|
|
34
89
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
90
|
+
// High contrast modifier
|
|
91
|
+
.#{$prefix}--popover--high-contrast .#{$prefix}--popover {
|
|
92
|
+
@include custom-property.declaration(
|
|
93
|
+
'popover-background-color',
|
|
94
|
+
theme.$background-inverse
|
|
95
|
+
);
|
|
96
|
+
@include custom-property.declaration(
|
|
97
|
+
'popover-text-color',
|
|
98
|
+
theme.$text-inverse
|
|
99
|
+
);
|
|
38
100
|
}
|
|
39
101
|
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
display: block;
|
|
47
|
-
content: '';
|
|
102
|
+
// Drop shadow modifier
|
|
103
|
+
.#{$prefix}--popover--drop-shadow .#{$prefix}--popover {
|
|
104
|
+
@include custom-property.declaration(
|
|
105
|
+
'popover-drop-shadow',
|
|
106
|
+
drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2))
|
|
107
|
+
);
|
|
48
108
|
}
|
|
49
109
|
|
|
50
|
-
|
|
51
|
-
|
|
110
|
+
// Caret tip modifier
|
|
111
|
+
.#{$prefix}--popover--caret {
|
|
112
|
+
@include custom-property.declaration('popover-offset', rem(10px));
|
|
52
113
|
}
|
|
53
114
|
|
|
54
|
-
|
|
55
|
-
|
|
115
|
+
// Popover, this element contains both the caret and the popover content
|
|
116
|
+
.#{$prefix}--popover {
|
|
117
|
+
position: absolute;
|
|
118
|
+
top: 0;
|
|
119
|
+
right: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
left: 0;
|
|
122
|
+
filter: $popover-drop-shadow;
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
}
|
|
56
125
|
|
|
57
|
-
|
|
126
|
+
// Popover content
|
|
127
|
+
.#{$prefix}--popover-content {
|
|
128
|
+
position: absolute;
|
|
129
|
+
z-index: z('floating');
|
|
130
|
+
display: none;
|
|
58
131
|
width: max-content;
|
|
59
132
|
max-width: rem(368px);
|
|
60
|
-
background-color: $
|
|
61
|
-
border-radius:
|
|
133
|
+
background-color: $popover-background-color;
|
|
134
|
+
border-radius: $popover-border-radius;
|
|
62
135
|
color: $popover-text-color;
|
|
136
|
+
pointer-events: auto;
|
|
63
137
|
}
|
|
64
138
|
|
|
65
|
-
.#{$prefix}--popover--
|
|
66
|
-
|
|
139
|
+
.#{$prefix}--popover--open .#{$prefix}--popover-content {
|
|
140
|
+
display: block;
|
|
67
141
|
}
|
|
68
142
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
143
|
+
// We use a pseudo element inside of the popover to create a space between the
|
|
144
|
+
// target and the popover. This helps in situations like toolcarets where you do
|
|
145
|
+
// not want the toolcaret to disappear when the user moves from the target to
|
|
146
|
+
// the popover.
|
|
147
|
+
.#{$prefix}--popover-content::before {
|
|
148
|
+
position: absolute;
|
|
149
|
+
display: none;
|
|
150
|
+
content: '';
|
|
72
151
|
}
|
|
73
152
|
|
|
74
|
-
.#{$prefix}--popover--
|
|
75
|
-
|
|
153
|
+
.#{$prefix}--popover--open .#{$prefix}--popover-content::before {
|
|
154
|
+
display: block;
|
|
76
155
|
}
|
|
77
156
|
|
|
78
|
-
|
|
79
|
-
.#{$prefix}--popover
|
|
157
|
+
// Popover caret
|
|
158
|
+
.#{$prefix}--popover-caret {
|
|
80
159
|
position: absolute;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
160
|
+
z-index: z('floating');
|
|
161
|
+
display: none;
|
|
162
|
+
background-color: $popover-background-color;
|
|
163
|
+
// We use `will-change: transform` to prevent antialiasing when our caret
|
|
164
|
+
// has subpixel rendering. When this happens, a single pixel line appears
|
|
165
|
+
// between the caret and popover-content that we would like to avoid
|
|
166
|
+
will-change: transform;
|
|
86
167
|
}
|
|
87
168
|
|
|
88
|
-
.#{$prefix}--popover--
|
|
89
|
-
|
|
90
|
-
|
|
169
|
+
.#{$prefix}--popover--open.#{$prefix}--popover--caret
|
|
170
|
+
.#{$prefix}--popover-caret {
|
|
171
|
+
display: block;
|
|
91
172
|
}
|
|
92
173
|
|
|
93
|
-
// The popover's tooltip is created by drawing two 8px x 8px boxes, one for
|
|
94
|
-
// rendering the box-shadow that the popover content uses and another for
|
|
95
|
-
// layering on top of this box to create an effect of a popover caret with a
|
|
96
|
-
// box-shadow. The layer with the box-shadow is rendered behind the popover
|
|
97
|
-
// content, while the other is rendered above of the popover content.
|
|
98
|
-
|
|
99
174
|
//-----------------------------------------------------------------------------
|
|
100
175
|
// Bottom
|
|
101
176
|
//-----------------------------------------------------------------------------
|
|
102
|
-
.#{$prefix}--popover--bottom {
|
|
103
|
-
bottom: 0;
|
|
104
|
-
left: 50%;
|
|
105
|
-
transform: translate(-50%, calc(100% + var(--cds-popover-offset)));
|
|
106
|
-
}
|
|
107
177
|
|
|
108
|
-
|
|
109
|
-
|
|
178
|
+
// Popover content placement
|
|
179
|
+
.#{$prefix}--popover--bottom .#{$prefix}--popover-content {
|
|
180
|
+
bottom: 0;
|
|
110
181
|
left: 50%;
|
|
111
|
-
transform: translate(-50%,
|
|
182
|
+
transform: translate(-50%, calc(100% + $popover-offset));
|
|
112
183
|
}
|
|
113
184
|
|
|
114
|
-
|
|
115
|
-
.#{$prefix}--popover--bottom-left {
|
|
185
|
+
.#{$prefix}--popover--bottom-left .#{$prefix}--popover-content {
|
|
116
186
|
bottom: 0;
|
|
117
187
|
left: 0;
|
|
118
|
-
transform:
|
|
188
|
+
transform: translate(0, calc(100% + $popover-offset));
|
|
119
189
|
}
|
|
120
190
|
|
|
121
|
-
|
|
122
|
-
top: 0;
|
|
123
|
-
left: 0;
|
|
124
|
-
transform: translate(var(--cds-popover-caret-offset), -50%) rotate(45deg);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// Bottom right
|
|
128
|
-
.#{$prefix}--popover--bottom-right {
|
|
191
|
+
.#{$prefix}--popover--bottom-right .#{$prefix}--popover-content {
|
|
129
192
|
right: 0;
|
|
130
193
|
bottom: 0;
|
|
131
|
-
transform:
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
@include place-caret(bottom-right) {
|
|
135
|
-
top: 0;
|
|
136
|
-
right: 0;
|
|
137
|
-
transform: translate(calc(-1 * var(--cds-popover-caret-offset)), -50%)
|
|
138
|
-
rotate(45deg);
|
|
194
|
+
transform: translate(0, calc(100% + $popover-offset));
|
|
139
195
|
}
|
|
140
196
|
|
|
141
|
-
//
|
|
142
|
-
.#{$prefix}--popover--bottom.#{$prefix}--popover::before,
|
|
143
|
-
.#{$prefix}--popover--bottom-left.#{$prefix}--popover::before,
|
|
144
|
-
.#{$prefix}--popover--bottom-right.#{$prefix}--popover::before {
|
|
197
|
+
// Popover hover area placement
|
|
198
|
+
.#{$prefix}--popover--bottom .#{$prefix}--popover-content::before,
|
|
199
|
+
.#{$prefix}--popover--bottom-left .#{$prefix}--popover-content::before,
|
|
200
|
+
.#{$prefix}--popover--bottom-right .#{$prefix}--popover-content::before {
|
|
145
201
|
top: 0;
|
|
146
202
|
right: 0;
|
|
147
203
|
left: 0;
|
|
148
|
-
height:
|
|
204
|
+
height: $popover-offset;
|
|
149
205
|
transform: translateY(-100%);
|
|
150
206
|
}
|
|
151
207
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
.#{$prefix}--popover--
|
|
156
|
-
bottom: 100%;
|
|
157
|
-
left: 50%;
|
|
158
|
-
transform: translate(-50%, calc(-1 * var(--cds-popover-offset)));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
@include place-caret(top) {
|
|
208
|
+
// Caret placement
|
|
209
|
+
.#{$prefix}--popover--bottom .#{$prefix}--popover-caret,
|
|
210
|
+
.#{$prefix}--popover--bottom-left .#{$prefix}--popover-caret,
|
|
211
|
+
.#{$prefix}--popover--bottom-right .#{$prefix}--popover-caret {
|
|
162
212
|
bottom: 0;
|
|
163
213
|
left: 50%;
|
|
164
|
-
|
|
214
|
+
width: $popover-caret-width;
|
|
215
|
+
height: $popover-caret-height;
|
|
216
|
+
clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
|
|
217
|
+
transform: translate(-50%, $popover-offset);
|
|
165
218
|
}
|
|
166
219
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
left: 0;
|
|
171
|
-
transform: translateY(calc(-1 * var(--cds-popover-offset)));
|
|
172
|
-
}
|
|
220
|
+
//-----------------------------------------------------------------------------
|
|
221
|
+
// Top
|
|
222
|
+
//-----------------------------------------------------------------------------
|
|
173
223
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
224
|
+
// Popover content placement
|
|
225
|
+
.#{$prefix}--popover--top .#{$prefix}--popover-content {
|
|
226
|
+
top: 0;
|
|
227
|
+
left: 50%;
|
|
228
|
+
transform: translate(-50%, calc(-100% - $popover-offset));
|
|
178
229
|
}
|
|
179
230
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
transform: translateY(calc(-1 * var(--cds-popover-offset)));
|
|
231
|
+
.#{$prefix}--popover--top-left .#{$prefix}--popover-content {
|
|
232
|
+
top: 0;
|
|
233
|
+
left: 0;
|
|
234
|
+
transform: translate(0, calc(-100% - $popover-offset));
|
|
185
235
|
}
|
|
186
236
|
|
|
187
|
-
|
|
237
|
+
.#{$prefix}--popover--top-right .#{$prefix}--popover-content {
|
|
238
|
+
top: 0;
|
|
188
239
|
right: 0;
|
|
189
|
-
|
|
190
|
-
transform: translate(calc(-1 * var(--cds-popover-caret-offset)), 50%)
|
|
191
|
-
rotate(45deg);
|
|
240
|
+
transform: translate(0, calc(-100% - $popover-offset));
|
|
192
241
|
}
|
|
193
242
|
|
|
194
|
-
//
|
|
195
|
-
.#{$prefix}--popover--top.#{$prefix}--popover::before,
|
|
196
|
-
.#{$prefix}--popover--top-left.#{$prefix}--popover::before,
|
|
197
|
-
.#{$prefix}--popover--top-right.#{$prefix}--popover::before {
|
|
243
|
+
// Popover hover area placement
|
|
244
|
+
.#{$prefix}--popover--top .#{$prefix}--popover-content::before,
|
|
245
|
+
.#{$prefix}--popover--top-left .#{$prefix}--popover-content::before,
|
|
246
|
+
.#{$prefix}--popover--top-right .#{$prefix}--popover-content::before {
|
|
198
247
|
right: 0;
|
|
199
248
|
bottom: 0;
|
|
200
249
|
left: 0;
|
|
201
|
-
height:
|
|
250
|
+
height: $popover-offset;
|
|
202
251
|
transform: translateY(100%);
|
|
203
252
|
}
|
|
204
253
|
|
|
254
|
+
// Caret placement
|
|
255
|
+
.#{$prefix}--popover--top .#{$prefix}--popover-caret,
|
|
256
|
+
.#{$prefix}--popover--top-left .#{$prefix}--popover-caret,
|
|
257
|
+
.#{$prefix}--popover--top-right .#{$prefix}--popover-caret {
|
|
258
|
+
top: 0;
|
|
259
|
+
left: 50%;
|
|
260
|
+
width: $popover-caret-width;
|
|
261
|
+
height: $popover-caret-height;
|
|
262
|
+
clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
|
|
263
|
+
transform: translate(-50%, calc(-1 * $popover-offset));
|
|
264
|
+
}
|
|
265
|
+
|
|
205
266
|
//-----------------------------------------------------------------------------
|
|
206
267
|
// Right
|
|
207
268
|
//-----------------------------------------------------------------------------
|
|
208
|
-
.#{$prefix}--popover--right {
|
|
209
|
-
top: 50%;
|
|
210
|
-
left: 100%;
|
|
211
|
-
transform: translate(var(--cds-popover-offset), -50%);
|
|
212
|
-
}
|
|
213
269
|
|
|
214
|
-
|
|
270
|
+
// Popover content placement
|
|
271
|
+
.#{$prefix}--popover--right .#{$prefix}--popover-content {
|
|
215
272
|
top: 50%;
|
|
216
|
-
left: 0;
|
|
217
|
-
transform: translate(-50%, -50%) rotate(45deg);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// Right top
|
|
221
|
-
.#{$prefix}--popover--right-top {
|
|
222
|
-
top: 0;
|
|
223
273
|
left: 100%;
|
|
224
|
-
|
|
274
|
+
// Add in 0.1px to prevent rounding errors where the content is
|
|
275
|
+
// moved farther than the caret
|
|
276
|
+
transform: translate($popover-offset, -50%);
|
|
225
277
|
}
|
|
226
278
|
|
|
227
|
-
|
|
279
|
+
.#{$prefix}--popover--right-top .#{$prefix}--popover-content {
|
|
228
280
|
top: 0;
|
|
229
|
-
left: 0;
|
|
230
|
-
transform: translate(-50%, var(--cds-popover-caret-offset)) rotate(45deg);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Right bottom
|
|
234
|
-
.#{$prefix}--popover--right-bottom {
|
|
235
|
-
bottom: 0;
|
|
236
281
|
left: 100%;
|
|
237
|
-
transform:
|
|
282
|
+
transform: translate($popover-offset, 0);
|
|
238
283
|
}
|
|
239
284
|
|
|
240
|
-
|
|
285
|
+
.#{$prefix}--popover--right-bottom .#{$prefix}--popover-content {
|
|
241
286
|
bottom: 0;
|
|
242
|
-
left:
|
|
243
|
-
transform: translate(
|
|
244
|
-
rotate(45deg);
|
|
287
|
+
left: 100%;
|
|
288
|
+
transform: translate($popover-offset, 0);
|
|
245
289
|
}
|
|
246
290
|
|
|
247
|
-
//
|
|
248
|
-
.#{$prefix}--popover--right.#{$prefix}--popover::before,
|
|
249
|
-
.#{$prefix}--popover--right-top.#{$prefix}--popover::before,
|
|
250
|
-
.#{$prefix}--popover--right-bottom.#{$prefix}--popover::before {
|
|
291
|
+
// Popover hover area placement
|
|
292
|
+
.#{$prefix}--popover--right .#{$prefix}--popover-content::before,
|
|
293
|
+
.#{$prefix}--popover--right-top .#{$prefix}--popover-content::before,
|
|
294
|
+
.#{$prefix}--popover--right-bottom .#{$prefix}--popover-content::before {
|
|
251
295
|
top: 0;
|
|
252
296
|
bottom: 0;
|
|
253
297
|
left: 0;
|
|
254
|
-
width:
|
|
298
|
+
width: $popover-offset;
|
|
255
299
|
transform: translateX(-100%);
|
|
256
300
|
}
|
|
257
301
|
|
|
302
|
+
// Caret placement
|
|
303
|
+
.#{$prefix}--popover--right .#{$prefix}--popover-caret,
|
|
304
|
+
.#{$prefix}--popover--right-top .#{$prefix}--popover-caret,
|
|
305
|
+
.#{$prefix}--popover--right-bottom .#{$prefix}--popover-caret {
|
|
306
|
+
top: 50%;
|
|
307
|
+
left: 100%;
|
|
308
|
+
width: $popover-caret-height;
|
|
309
|
+
height: $popover-caret-width;
|
|
310
|
+
clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
|
|
311
|
+
transform: translate(calc($popover-offset - 100%), -50%);
|
|
312
|
+
}
|
|
313
|
+
|
|
258
314
|
//-----------------------------------------------------------------------------
|
|
259
315
|
// Left
|
|
260
316
|
//-----------------------------------------------------------------------------
|
|
261
|
-
.#{$prefix}--popover--left {
|
|
262
|
-
top: 50%;
|
|
263
|
-
right: 100%;
|
|
264
|
-
transform: translate(calc(-1 * var(--cds-popover-offset)), -50%);
|
|
265
|
-
}
|
|
266
317
|
|
|
267
|
-
|
|
318
|
+
// Popover content placement
|
|
319
|
+
.#{$prefix}--popover--left .#{$prefix}--popover-content {
|
|
268
320
|
top: 50%;
|
|
269
|
-
right: 0;
|
|
270
|
-
transform: translate(50%, -50%) rotate(45deg);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// Left top
|
|
274
|
-
.#{$prefix}--popover--left-top {
|
|
275
|
-
top: 0;
|
|
276
321
|
right: 100%;
|
|
277
|
-
|
|
322
|
+
// Add in 0.1px to prevent rounding errors where the content is
|
|
323
|
+
// moved farther than the caret
|
|
324
|
+
transform: translate(calc(-1 * $popover-offset + 0.1px), -50%);
|
|
278
325
|
}
|
|
279
326
|
|
|
280
|
-
|
|
327
|
+
.#{$prefix}--popover--left-top .#{$prefix}--popover-content {
|
|
281
328
|
top: 0;
|
|
282
|
-
right: 0;
|
|
283
|
-
transform: translate(50%, var(--cds-popover-caret-offset)) rotate(45deg);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// Left bottom
|
|
287
|
-
.#{$prefix}--popover--left-bottom {
|
|
288
329
|
right: 100%;
|
|
289
|
-
|
|
290
|
-
|
|
330
|
+
// Add in 0.1px to prevent rounding errors where the content is
|
|
331
|
+
// moved farther than the caret
|
|
332
|
+
transform: translate(calc(-1 * $popover-offset + 0.1px), 0);
|
|
291
333
|
}
|
|
292
334
|
|
|
293
|
-
|
|
294
|
-
right:
|
|
335
|
+
.#{$prefix}--popover--left-bottom .#{$prefix}--popover-content {
|
|
336
|
+
right: 100%;
|
|
295
337
|
bottom: 0;
|
|
296
|
-
|
|
297
|
-
|
|
338
|
+
// Add in 0.1px to prevent rounding errors where the content is
|
|
339
|
+
// moved farther than the caret
|
|
340
|
+
transform: translate(calc(-1 * $popover-offset + 0.1px), 0);
|
|
298
341
|
}
|
|
299
342
|
|
|
300
|
-
//
|
|
301
|
-
.#{$prefix}--popover--left.#{$prefix}--popover::before,
|
|
302
|
-
.#{$prefix}--popover--left-top.#{$prefix}--popover::before,
|
|
303
|
-
.#{$prefix}--popover--left-bottom.#{$prefix}--popover::before {
|
|
343
|
+
// Popover hover area placement
|
|
344
|
+
.#{$prefix}--popover--left .#{$prefix}--popover-content::before,
|
|
345
|
+
.#{$prefix}--popover--left-top .#{$prefix}--popover-content::before,
|
|
346
|
+
.#{$prefix}--popover--left-bottom .#{$prefix}--popover-content::before {
|
|
304
347
|
top: 0;
|
|
305
348
|
right: 0;
|
|
306
349
|
bottom: 0;
|
|
307
|
-
width:
|
|
350
|
+
width: $popover-offset;
|
|
308
351
|
transform: translateX(100%);
|
|
309
352
|
}
|
|
310
|
-
}
|
|
311
353
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
354
|
+
// Caret placement
|
|
355
|
+
.#{$prefix}--popover--left .#{$prefix}--popover-caret,
|
|
356
|
+
.#{$prefix}--popover--left-top .#{$prefix}--popover-caret,
|
|
357
|
+
.#{$prefix}--popover--left-bottom .#{$prefix}--popover-caret {
|
|
358
|
+
top: 50%;
|
|
359
|
+
right: 100%;
|
|
360
|
+
width: $popover-caret-height;
|
|
361
|
+
height: $popover-caret-width;
|
|
362
|
+
clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
|
|
363
|
+
transform: translate(calc(-1 * $popover-offset + 100%), -50%);
|
|
322
364
|
}
|
|
323
365
|
}
|
|
@@ -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,
|