@carbon/styles 1.17.0-rc.1 → 1.17.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "1.17.0-rc.1",
4
+ "version": "1.17.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,12 +32,12 @@
32
32
  "sass": "^1.33.0"
33
33
  },
34
34
  "dependencies": {
35
- "@carbon/colors": "^11.7.1-rc.0",
35
+ "@carbon/colors": "^11.8.0",
36
36
  "@carbon/feature-flags": "^0.9.0",
37
37
  "@carbon/grid": "^11.7.0",
38
38
  "@carbon/layout": "^11.7.0",
39
39
  "@carbon/motion": "^11.5.0",
40
- "@carbon/themes": "^11.11.1-rc.0",
40
+ "@carbon/themes": "^11.12.0",
41
41
  "@carbon/type": "^11.11.0",
42
42
  "@ibm/plex": "6.0.0-next.6"
43
43
  },
@@ -59,5 +59,5 @@
59
59
  "scss/**/*.css",
60
60
  "css/**/*.css"
61
61
  ],
62
- "gitHead": "01475a0713de3b5243b747ffe7036f652ae5c22f"
62
+ "gitHead": "06fdbdbc9cade1f6c352024175d348f9bd107b14"
63
63
  }
@@ -24,6 +24,7 @@
24
24
  @use 'dropdown';
25
25
  @use 'file-uploader';
26
26
  @use 'fluid-combo-box';
27
+ @use 'fluid-date-picker';
27
28
  @use 'fluid-dropdown';
28
29
  @use 'fluid-list-box';
29
30
  @use 'fluid-multiselect';
@@ -329,26 +329,6 @@
329
329
  transition: background-color $duration-fast-01 motion(entrance, productive);
330
330
  }
331
331
 
332
- .#{$prefix}--data-table
333
- .#{$prefix}--table-column-checkbox
334
- .#{$prefix}--checkbox:focus
335
- + .#{$prefix}--checkbox-label::before {
336
- //make checkbox focus larger to match expansion btn focus
337
- outline-offset: rem(6px);
338
- }
339
-
340
- .#{$prefix}--data-table--compact
341
- .#{$prefix}--table-column-checkbox
342
- .#{$prefix}--checkbox:focus
343
- + .#{$prefix}--checkbox-label::before,
344
- .#{$prefix}--data-table--xs
345
- .#{$prefix}--table-column-checkbox
346
- .#{$prefix}--checkbox:focus
347
- + .#{$prefix}--checkbox-label::before {
348
- //make checkbox match expansion button focus size
349
- outline-offset: rem(2px);
350
- }
351
-
352
332
  .#{$prefix}--data-table thead th.#{$prefix}--table-column-checkbox,
353
333
  .#{$prefix}--data-table tbody td.#{$prefix}--table-column-checkbox,
354
334
  .#{$prefix}--data-table thead th.#{$prefix}--table-expand,
@@ -46,6 +46,10 @@
46
46
  justify-content: space-between;
47
47
  }
48
48
 
49
+ .#{$prefix}--date-picker-container .#{$prefix}--label {
50
+ display: flex;
51
+ }
52
+
49
53
  .#{$prefix}--date-picker-input__wrapper {
50
54
  position: relative;
51
55
  display: flex;
@@ -0,0 +1,341 @@
1
+ //
2
+ // Copyright IBM Corp. 2022
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
+ //-----------------------------
9
+ // Fluid Date Picker
10
+ //-----------------------------
11
+ @use '../../config' as *;
12
+ @use '../../motion' as *;
13
+ @use '../../spacing' as *;
14
+ @use '../../theme' as *;
15
+ @use '../../utilities/convert' as *;
16
+ @use '../../utilities/focus-outline' as *;
17
+ @use '../date-picker';
18
+
19
+ @mixin fluid-date-picker {
20
+ .#{$prefix}--date-picker--fluid {
21
+ display: inline-flex;
22
+ background: $field;
23
+ }
24
+
25
+ .#{$prefix}--date-picker--fluid .#{$prefix}--date-picker {
26
+ position: relative;
27
+ width: 100%;
28
+ height: 100%;
29
+ transition: background-color $duration-fast-01 motion(standard, productive),
30
+ outline $duration-fast-01 motion(standard, productive);
31
+ }
32
+
33
+ .#{$prefix}--date-picker--fluid .#{$prefix}--label {
34
+ position: absolute;
35
+ z-index: 1;
36
+ top: rem(13px);
37
+ left: $spacing-05;
38
+ display: flex;
39
+ height: rem(16px);
40
+ align-items: center;
41
+ margin: 0;
42
+ }
43
+
44
+ .#{$prefix}--date-picker--fluid
45
+ .#{$prefix}--date-picker-input__wrapper
46
+ .#{$prefix}--date-picker__input {
47
+ min-width: rem(144px);
48
+ min-height: rem(64px);
49
+ padding: rem(32px) $spacing-05 rem(13px);
50
+ border-bottom: none;
51
+ background: transparent;
52
+ }
53
+
54
+ // Simple
55
+ .#{$prefix}--date-picker--fluid
56
+ .#{$prefix}--date-picker--simple
57
+ .#{$prefix}--date-picker__icon {
58
+ display: none;
59
+ }
60
+
61
+ .#{$prefix}--date-picker--fluid
62
+ .#{$prefix}--date-picker--simple
63
+ .#{$prefix}--date-picker__input:not(.#{$prefix}--date-picker__input--invalid):not(.#{$prefix}--date-picker__input--warn),
64
+ .#{$prefix}--date-picker--fluid
65
+ .#{$prefix}--date-picker--simple
66
+ .#{$prefix}--date-picker--fluid--warn {
67
+ border-bottom: 1px solid $border-strong;
68
+ }
69
+
70
+ // Single, Range
71
+ .#{$prefix}--date-picker--fluid .#{$prefix}--date-picker__icon {
72
+ top: rem(43px);
73
+ }
74
+
75
+ .#{$prefix}--date-picker--fluid
76
+ .#{$prefix}--date-picker--single
77
+ .#{$prefix}--date-picker__input {
78
+ width: 100%;
79
+ }
80
+
81
+ .#{$prefix}--date-picker--fluid .#{$prefix}--date-picker--single {
82
+ border-bottom: none;
83
+ }
84
+
85
+ .#{$prefix}--date-picker--fluid
86
+ .#{$prefix}--date-picker--single
87
+ .#{$prefix}--date-picker__input:not(.#{$prefix}--date-picker__input--invalid),
88
+ .#{$prefix}--date-picker--single .#{$prefix}--date-picker--fluid--warn {
89
+ border-bottom: 1px solid $border-strong;
90
+ }
91
+
92
+ // Range
93
+ .#{$prefix}--date-picker--fluid:not(.#{$prefix}--date-picker--fluid--invalid):not(.#{$prefix}--date-picker--fluid--warn)
94
+ .#{$prefix}--date-picker--range
95
+ .#{$prefix}--date-picker-container:not(.#{$prefix}--date-picker--fluid--invalid) {
96
+ border-bottom: 1px solid $border-strong;
97
+ }
98
+
99
+ .#{$prefix}--date-picker--fluid
100
+ .#{$prefix}--date-picker--range
101
+ .#{$prefix}--date-picker__input,
102
+ .#{$prefix}--date-picker--fluid
103
+ .#{$prefix}--date-picker--range
104
+ .#{$prefix}--date-picker-container {
105
+ width: 100%;
106
+ min-width: rem(144px);
107
+ min-height: rem(63px);
108
+ }
109
+
110
+ .#{$prefix}--date-picker--fluid
111
+ .#{$prefix}--date-picker--range
112
+ > .#{$prefix}--date-picker-container:first-child {
113
+ margin-right: 0;
114
+ }
115
+
116
+ .#{$prefix}--date-picker--fluid
117
+ .#{$prefix}--date-picker--range
118
+ > .#{$prefix}--date-picker-container:last-child
119
+ .#{$prefix}--date-picker__input {
120
+ border-left: 1px solid $border-strong;
121
+ }
122
+
123
+ // Invalid
124
+ // Entire input
125
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid,
126
+ // Just one input invalid
127
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid {
128
+ @include focus-outline('invalid');
129
+ }
130
+
131
+ .#{$prefix}--date-picker--fluid
132
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
133
+ .#{$prefix}--date-picker__input--invalid {
134
+ outline: none;
135
+ }
136
+
137
+ .#{$prefix}--date-picker--fluid
138
+ .#{$prefix}--date-picker-container:last-child.#{$prefix}--date-picker--fluid--invalid
139
+ .#{$prefix}--date-picker__input--invalid,
140
+ .#{$prefix}--date-picker--fluid
141
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
142
+ + .#{$prefix}--date-picker-container
143
+ .#{$prefix}--date-picker__input {
144
+ border-left: none;
145
+ }
146
+
147
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
148
+ .#{$prefix}--form-requirement,
149
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--warn
150
+ .#{$prefix}--form-requirement {
151
+ padding: $spacing-03 rem(40px) $spacing-03 $spacing-05;
152
+ margin: 0;
153
+ }
154
+
155
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
156
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
157
+ .#{$prefix}--date-picker,
158
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
159
+ .#{$prefix}--date-picker,
160
+ .#{$prefix}--date-picker--fluid
161
+ .#{$prefix}--date-picker--single
162
+ .#{$prefix}--date-picker--fluid--warn
163
+ .#{$prefix}--date-picker__input,
164
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn
165
+ .#{$prefix}--date-picker--range
166
+ .#{$prefix}--date-picker-container {
167
+ border-bottom: 1px solid transparent;
168
+ }
169
+
170
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
171
+ .#{$prefix}--date-picker--range
172
+ > .#{$prefix}--date-picker-container:last-child
173
+ .#{$prefix}--date-picker__input,
174
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn
175
+ .#{$prefix}--date-picker--range
176
+ > .#{$prefix}--date-picker-container:last-child
177
+ .#{$prefix}--date-picker__input,
178
+ .#{$prefix}--date-picker--fluid
179
+ .#{$prefix}--date-picker--fluid--warn
180
+ + .#{$prefix}--date-picker-container:last-child
181
+ .#{$prefix}--date-picker__input,
182
+ .#{$prefix}--date-picker--fluid
183
+ .#{$prefix}--date-picker--fluid--warn.#{$prefix}--date-picker-container:last-child
184
+ .#{$prefix}--date-picker__input {
185
+ border-left: 1px solid transparent;
186
+ }
187
+
188
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
189
+ .#{$prefix}--date-picker--range
190
+ > .#{$prefix}--date-picker-container:first-child::after,
191
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn
192
+ .#{$prefix}--date-picker--range
193
+ > .#{$prefix}--date-picker-container:first-child::after,
194
+ .#{$prefix}--date-picker--fluid
195
+ .#{$prefix}--date-picker--range
196
+ .#{$prefix}--date-picker--fluid--warn.#{$prefix}--date-picker-container:first-child::after,
197
+ .#{$prefix}--date-picker--fluid
198
+ .#{$prefix}--date-picker--range
199
+ .#{$prefix}--date-picker--fluid--warn.#{$prefix}--date-picker-container:last-child::after {
200
+ position: absolute;
201
+ top: rem(8px);
202
+ right: 0;
203
+ display: block;
204
+ width: 1px;
205
+ height: calc(100% - 1rem);
206
+ background: $border-strong;
207
+ content: '';
208
+ }
209
+
210
+ .#{$prefix}--date-picker--fluid
211
+ .#{$prefix}--date-picker--fluid--warn.#{$prefix}--date-picker-container:last-child::after {
212
+ left: 0;
213
+ }
214
+
215
+ .#{$prefix}--date-picker--fluid .#{$prefix}--date-picker__divider {
216
+ width: calc(100% - 2rem);
217
+ border-style: solid;
218
+ border-color: $border-subtle;
219
+ border-bottom: none;
220
+ margin: 0 1rem;
221
+ }
222
+
223
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
224
+ .#{$prefix}--date-picker__icon--invalid,
225
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--warn
226
+ .#{$prefix}--date-picker__icon--warn {
227
+ top: rem(80px);
228
+ }
229
+
230
+ .#{$prefix}--date-picker--fluid
231
+ .#{$prefix}--date-picker--simple
232
+ .#{$prefix}--date-picker--fluid--invalid
233
+ .#{$prefix}--date-picker__icon--invalid,
234
+ .#{$prefix}--date-picker--fluid
235
+ .#{$prefix}--date-picker--simple
236
+ .#{$prefix}--date-picker--fluid--warn
237
+ .#{$prefix}--date-picker__icon--warn {
238
+ display: block;
239
+ }
240
+
241
+ // Set focus when single input is invalid
242
+ .#{$prefix}--date-picker-container.#{$prefix}--date-picker--fluid--invalid
243
+ .#{$prefix}--date-picker__input:focus {
244
+ @include focus-outline('outline');
245
+ }
246
+
247
+ // Entire Datepicker invalid state
248
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
249
+ .#{$prefix}--date-picker--range
250
+ ~ .#{$prefix}--form-requirement,
251
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn
252
+ .#{$prefix}--date-picker--range
253
+ ~ .#{$prefix}--form-requirement {
254
+ display: block;
255
+ overflow: visible;
256
+ max-height: 100%;
257
+ padding: $spacing-03 rem(40px) $spacing-03 $spacing-05;
258
+ margin-top: 0;
259
+ }
260
+
261
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
262
+ .#{$prefix}--date-picker--range
263
+ ~ .#{$prefix}--form-requirement {
264
+ color: $text-error;
265
+ }
266
+
267
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid,
268
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn {
269
+ position: relative;
270
+ }
271
+
272
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--invalid
273
+ .#{$prefix}--date-picker--range
274
+ + .#{$prefix}--date-picker__icon,
275
+ .#{$prefix}--date-picker--fluid.#{$prefix}--date-picker--fluid--warn
276
+ .#{$prefix}--date-picker--range
277
+ + .#{$prefix}--date-picker__icon {
278
+ top: rem(80px);
279
+ }
280
+
281
+ // Skeleton
282
+ .#{$prefix}--date-picker--fluid__skeleton {
283
+ height: rem(64px);
284
+ border-bottom: 1px solid $skeleton-element;
285
+ background: $skeleton-background;
286
+ }
287
+
288
+ .#{$prefix}--date-picker--fluid__skeleton--container {
289
+ position: relative;
290
+ width: 100%;
291
+ height: rem(64px);
292
+ padding: rem(13px) rem(40px) rem(13px) $spacing-05;
293
+ }
294
+
295
+ .#{$prefix}--date-picker--fluid__skeleton .#{$prefix}--skeleton {
296
+ height: 1rem;
297
+ }
298
+
299
+ .#{$prefix}--date-picker--fluid__skeleton .#{$prefix}--label {
300
+ margin-bottom: rem(4px);
301
+ }
302
+
303
+ .#{$prefix}--date-picker--fluid__skeleton .#{$prefix}--text-input {
304
+ width: 80%;
305
+ height: rem(18px);
306
+ }
307
+
308
+ .#{$prefix}--date-picker--fluid__skeleton--container
309
+ .#{$prefix}--date-picker__icon {
310
+ top: auto;
311
+ bottom: rem(2px);
312
+ }
313
+
314
+ // Range skeleton
315
+ .#{$prefix}--date-picker--fluid__skeleton--range {
316
+ display: flex;
317
+ flex-direction: row;
318
+ }
319
+
320
+ .#{$prefix}--date-picker--fluid__skeleton--range
321
+ .#{$prefix}--date-picker--fluid__skeleton--container {
322
+ display: flex;
323
+ width: 50%;
324
+ flex-direction: column;
325
+ }
326
+
327
+ .#{$prefix}--date-picker--fluid__skeleton--range
328
+ .#{$prefix}--date-picker--fluid__skeleton--container:first-of-type {
329
+ border-right: 1px solid $skeleton-element;
330
+ }
331
+
332
+ .#{$prefix}--date-picker--fluid__skeleton--range .#{$prefix}--text-input {
333
+ width: 100%;
334
+ }
335
+
336
+ .#{$prefix}--date-picker--fluid__skeleton--range
337
+ .#{$prefix}--date-picker--fluid__skeleton--container
338
+ .#{$prefix}--date-picker__icon {
339
+ bottom: rem(5px);
340
+ }
341
+ }
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright IBM Corp. 2022
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 'fluid-date-picker';
9
+ @use 'fluid-date-picker';
10
+
11
+ @include fluid-date-picker.fluid-date-picker;
@@ -64,7 +64,7 @@
64
64
  // invalid
65
65
  .#{$prefix}--text-area--fluid .#{$prefix}--text-area--invalid,
66
66
  .#{$prefix}--text-area--fluid .#{$prefix}--text-area:focus {
67
- border-bottom: none;
67
+ border-bottom: 1px solid transparent;
68
68
  }
69
69
 
70
70
  .#{$prefix}--text-area__divider,
@@ -20,6 +20,17 @@
20
20
  $input-label-weight: 400 !default;
21
21
 
22
22
  @mixin form {
23
+ // Override Chrome autocomplete styles
24
+ input:-webkit-autofill,
25
+ input:-webkit-autofill:hover,
26
+ input:-webkit-autofill:focus,
27
+ textarea:-webkit-autofill,
28
+ textarea:-webkit-autofill:hover,
29
+ textarea:-webkit-autofill:focus {
30
+ box-shadow: 0 0 0 1000px $field inset;
31
+ -webkit-text-fill-color: $text-primary;
32
+ }
33
+
23
34
  .#{$prefix}--fieldset {
24
35
  @include reset;
25
36
  }
@@ -105,4 +105,42 @@
105
105
  .#{$prefix}--list-box__menu {
106
106
  visibility: hidden;
107
107
  }
108
+
109
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly,
110
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly:hover {
111
+ background-color: transparent;
112
+ }
113
+
114
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
115
+ .#{$prefix}--list-box__menu-icon
116
+ svg {
117
+ fill: $icon-disabled;
118
+ }
119
+
120
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
121
+ .#{$prefix}--tag--filter,
122
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
123
+ .#{$prefix}--tag__close-icon:hover {
124
+ background-color: transparent;
125
+ color: $text-primary;
126
+ cursor: default;
127
+ }
128
+
129
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
130
+ .#{$prefix}--tag--filter {
131
+ box-shadow: 0 0 0 1px $background-inverse;
132
+ }
133
+
134
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
135
+ .#{$prefix}--tag--filter
136
+ svg {
137
+ fill: $icon-disabled;
138
+ }
139
+
140
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
141
+ .#{$prefix}--list-box__field,
142
+ .#{$prefix}--multi-select.#{$prefix}--multi-select--readonly
143
+ .#{$prefix}--list-box__menu-icon {
144
+ cursor: default;
145
+ }
108
146
  }
@@ -25,7 +25,6 @@
25
25
  @include type-style('body-01');
26
26
  @include focus-outline('reset');
27
27
 
28
- width: 100%;
29
28
  min-width: 10rem;
30
29
  height: 100%;
31
30
  min-height: rem(40px);
@@ -108,6 +107,7 @@
108
107
  .#{$prefix}--text-area.#{$prefix}--skeleton {
109
108
  @include skeleton;
110
109
 
110
+ width: 100%;
111
111
  height: rem(100px);
112
112
 
113
113
  &::placeholder {