@itwin/itwinui-css 0.39.1 → 0.42.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.
Files changed (40) hide show
  1. package/css/all.css +607 -362
  2. package/css/breadcrumbs.css +31 -15
  3. package/css/button.css +279 -189
  4. package/css/code.css +2 -0
  5. package/css/header.css +50 -30
  6. package/css/inputs.css +26 -40
  7. package/css/side-navigation.css +27 -24
  8. package/css/table.css +34 -23
  9. package/css/tile.css +51 -40
  10. package/css/tree.css +107 -0
  11. package/css/user-icon.css +3 -1
  12. package/package.json +1 -1
  13. package/scss/breadcrumbs/breadcrumbs.scss +1 -1
  14. package/scss/button/borderless.scss +37 -39
  15. package/scss/button/button-group.scss +54 -47
  16. package/scss/button/button-icon.scss +12 -0
  17. package/scss/button/button.scss +27 -32
  18. package/scss/button/classes.scss +25 -3
  19. package/scss/button/cta.scss +31 -21
  20. package/scss/button/default.scss +40 -45
  21. package/scss/button/disabled.scss +3 -14
  22. package/scss/button/high-visibility.scss +31 -21
  23. package/scss/button/index.scss +1 -0
  24. package/scss/button/split-menu.scss +39 -20
  25. package/scss/classes.scss +1 -0
  26. package/scss/code/codeblock.scss +4 -0
  27. package/scss/header/header.scss +38 -18
  28. package/scss/index.scss +1 -0
  29. package/scss/inputs/checkbox-radio.scss +1 -3
  30. package/scss/inputs/checkbox.scss +5 -2
  31. package/scss/inputs/classes.scss +2 -2
  32. package/scss/inputs/labeled-inputs.scss +3 -3
  33. package/scss/side-navigation/side-navigation.scss +27 -22
  34. package/scss/table/paginator.scss +34 -21
  35. package/scss/table/table.scss +12 -8
  36. package/scss/tile/tile.scss +4 -2
  37. package/scss/tree/classes.scss +15 -0
  38. package/scss/tree/index.scss +3 -0
  39. package/scss/tree/tree.scss +137 -0
  40. package/scss/user-icon/user-icon.scss +3 -0
@@ -2,33 +2,43 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
4
  @import './button';
5
+ @import './button-icon';
6
+ @import './disabled';
5
7
 
6
8
  @mixin iui-button-cta {
7
- @include themed {
8
- background-color: t(iui-color-background-positive);
9
- border-color: t(iui-color-background-positive);
10
- color: t(iui-color-foreground-accessory);
11
- }
9
+ @include iui-button-cta-base;
10
+
11
+ &:focus {
12
+ @include iui-button-cta-hover-focus;
12
13
 
13
- > .iui-icon {
14
- @include themed {
15
- fill: t(iui-color-foreground-accessory);
14
+ &:where(:not(:focus-visible)) {
15
+ @include iui-button-cta-base;
16
16
  }
17
17
  }
18
18
 
19
- &:enabled:hover,
20
- &:enabled:active,
21
- &:focus-visible {
22
- @include themed {
23
- background-color: t(iui-color-background-positive-overlay);
24
- border-color: t(iui-color-background-positive-overlay);
25
- color: t(iui-color-foreground-accessory);
26
- }
19
+ &:hover,
20
+ &:active {
21
+ @include iui-button-cta-hover-focus;
22
+ }
27
23
 
28
- > .iui-icon {
29
- @include themed {
30
- fill: t(iui-color-foreground-accessory);
31
- }
32
- }
24
+ &[disabled],
25
+ &:disabled {
26
+ @include iui-button-disabled;
27
+ }
28
+ }
29
+
30
+ @mixin iui-button-cta-hover-focus {
31
+ @include themed {
32
+ background-color: t(iui-color-background-positive-overlay);
33
+ border-color: t(iui-color-background-positive-overlay);
34
+ color: t(iui-color-foreground-accessory);
35
+ }
36
+ }
37
+
38
+ @mixin iui-button-cta-base {
39
+ @include themed {
40
+ background-color: t(iui-color-background-positive);
41
+ border-color: t(iui-color-background-positive);
42
+ color: t(iui-color-foreground-accessory);
33
43
  }
34
44
  }
@@ -2,36 +2,24 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
4
  @import './button';
5
+ @import './button-icon';
5
6
  @import '../notification-marker/index';
7
+ @import './disabled';
6
8
 
7
9
  @mixin iui-button-default {
8
- @include themed {
9
- background-color: t(iui-color-background-1);
10
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
11
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
12
- }
10
+ @include iui-button-default-base;
13
11
 
14
- > .iui-icon {
15
- @include themed {
16
- fill: t(iui-icons-color-actionable);
17
- }
18
- }
12
+ &:focus {
13
+ @include iui-button-default-hover-focus;
19
14
 
20
- &:enabled:hover,
21
- &:enabled:active,
22
- &:focus-visible {
23
- @include themed {
24
- background-color: t(iui-color-background-1-overlay);
25
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
26
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
15
+ &:where(:not(:focus-visible)) {
16
+ @include iui-button-default-base;
27
17
  }
28
- @include iui-notification-marker-hover;
18
+ }
29
19
 
30
- > .iui-icon {
31
- @include themed {
32
- fill: t(iui-icons-color-actionable-hover);
33
- }
34
- }
20
+ &:hover,
21
+ &:active {
22
+ @include iui-button-default-hover-focus;
35
23
  }
36
24
 
37
25
  &.iui-dropdown {
@@ -47,29 +35,36 @@
47
35
  }
48
36
  }
49
37
 
50
- &.iui-active:not(.iui-high-visibility):not(.iui-cta) {
51
- &:enabled,
52
- &:enabled:hover,
53
- &:enabled:active {
54
- @include themed {
55
- background: linear-gradient(
56
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
57
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
58
- ),
59
- linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
60
- }
38
+ &.iui-active {
39
+ @include themed {
40
+ background: linear-gradient(
41
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
42
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
43
+ ),
44
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
45
+ color: t(iui-color-foreground-primary);
46
+ }
47
+ }
61
48
 
62
- > .iui-label {
63
- @include themed {
64
- color: t(iui-color-foreground-primary);
65
- }
66
- }
49
+ &[disabled],
50
+ &:disabled {
51
+ @include iui-button-disabled;
52
+ }
53
+ }
67
54
 
68
- > .iui-icon {
69
- @include themed {
70
- fill: t(iui-icons-color-primary);
71
- }
72
- }
73
- }
55
+ @mixin iui-button-default-hover-focus {
56
+ @include themed {
57
+ background-color: t(iui-color-background-1-overlay);
58
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
59
+ color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
60
+ }
61
+ @include iui-notification-marker-hover;
62
+ }
63
+
64
+ @mixin iui-button-default-base {
65
+ @include themed {
66
+ background-color: t(iui-color-background-1);
67
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
68
+ color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
74
69
  }
75
70
  }
@@ -1,24 +1,13 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
- @import './button';
4
+ @import './button-icon';
5
5
 
6
6
  @mixin iui-button-disabled {
7
7
  cursor: not-allowed;
8
8
  @include themed {
9
- background-color: t(iui-color-background-disabled);
9
+ background: t(iui-color-background-disabled);
10
10
  border-color: t(iui-color-background-disabled);
11
- }
12
-
13
- > .iui-label {
14
- @include themed {
15
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
16
- }
17
- }
18
-
19
- > .iui-icon {
20
- @include themed {
21
- fill: t(iui-icons-color-actionable-disabled);
22
- }
11
+ color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
23
12
  }
24
13
  }
@@ -2,33 +2,43 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
4
  @import './button';
5
+ @import './disabled';
6
+ @import './button-icon';
5
7
 
6
8
  @mixin iui-button-high-visibility {
7
- @include themed {
8
- background-color: t(iui-color-background-primary);
9
- border-color: t(iui-color-background-primary);
10
- color: t(iui-color-foreground-accessory);
11
- }
9
+ @include iui-button-high-visibility-base;
10
+
11
+ &:focus {
12
+ @include iui-button-high-visibility-hover-focus;
12
13
 
13
- > .iui-icon {
14
- @include themed {
15
- fill: t(iui-color-foreground-accessory);
14
+ &:where(:not(:focus-visible)) {
15
+ @include iui-button-high-visibility-base;
16
16
  }
17
17
  }
18
18
 
19
- &:enabled:hover,
20
- &:enabled:active,
21
- &:focus-visible {
22
- @include themed {
23
- background-color: t(iui-color-background-primary-overlay);
24
- border-color: t(iui-color-background-primary-overlay);
25
- color: t(iui-color-foreground-accessory);
26
- }
19
+ &:hover,
20
+ &:active {
21
+ @include iui-button-high-visibility-hover-focus;
22
+ }
27
23
 
28
- > .iui-icon {
29
- @include themed {
30
- fill: t(iui-color-foreground-accessory);
31
- }
32
- }
24
+ &[disabled],
25
+ &:disabled {
26
+ @include iui-button-disabled;
27
+ }
28
+ }
29
+
30
+ @mixin iui-button-high-visibility-hover-focus {
31
+ @include themed {
32
+ background-color: t(iui-color-background-primary-overlay);
33
+ border-color: t(iui-color-background-primary-overlay);
34
+ color: t(iui-color-foreground-accessory);
35
+ }
36
+ }
37
+
38
+ @mixin iui-button-high-visibility-base {
39
+ @include themed {
40
+ background-color: t(iui-color-background-primary);
41
+ border-color: t(iui-color-background-primary);
42
+ color: t(iui-color-foreground-accessory);
33
43
  }
34
44
  }
@@ -9,3 +9,4 @@
9
9
  @import './split-menu';
10
10
  @import './borderless';
11
11
  @import './disabled';
12
+ @import './button-icon';
@@ -11,31 +11,45 @@
11
11
  }
12
12
  }
13
13
 
14
- .iui-button:first-child {
15
- &.iui-borderless:hover {
16
- background-color: transparent;
14
+ > * {
15
+ &:first-child {
16
+ > .iui-borderless:hover {
17
+ background-color: transparent;
18
+ }
17
19
  }
18
- }
19
20
 
20
- // Sizes
21
- > .iui-button + .iui-button {
22
- padding: $iui-xs;
23
- }
21
+ // Sizes
22
+ &:last-child {
23
+ > .iui-button {
24
+ padding: $iui-xs;
25
+ }
24
26
 
25
- > .iui-small + .iui-small {
26
- padding: $iui-xxs;
27
- }
27
+ > .iui-small {
28
+ padding: $iui-xxs;
29
+ }
28
30
 
29
- > .iui-large + .iui-large {
30
- padding: $iui-s;
31
- }
31
+ > .iui-large {
32
+ padding: $iui-s;
33
+ }
34
+ }
32
35
 
33
- > .iui-high-visibility + .iui-high-visibility,
34
- > .iui-high-visibility + .iui-high-visibility:hover,
35
- > .iui-cta + .iui-cta,
36
- > .iui-cta + .iui-cta:hover {
37
- @include themed {
38
- border-left-color: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-4));
36
+ // Border between buttons for high-visibility and cta
37
+ &:first-child {
38
+ > .iui-high-visibility,
39
+ > .iui-cta {
40
+ @include themed {
41
+ border-right-color: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-4));
42
+ }
43
+ }
44
+ }
45
+
46
+ &:last-child {
47
+ > .iui-high-visibility,
48
+ > .iui-cta {
49
+ @include themed {
50
+ border-left-color: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-4));
51
+ }
52
+ }
39
53
  }
40
54
  }
41
55
 
@@ -44,4 +58,9 @@
44
58
  background-color: transparent;
45
59
  }
46
60
  }
61
+
62
+ &[disabled],
63
+ &:disabled {
64
+ @include iui-button-disabled;
65
+ }
47
66
  }
package/scss/classes.scss CHANGED
@@ -36,5 +36,6 @@
36
36
  @import './toast-notification/classes';
37
37
  @import './toggle-switch/classes';
38
38
  @import './tooltip/classes';
39
+ @import './tree/classes';
39
40
  @import './user-icon/classes';
40
41
  @import './wizard/classes';
@@ -26,6 +26,10 @@
26
26
  }
27
27
  }
28
28
 
29
+ .iui-button {
30
+ gap: 0;
31
+ }
32
+
29
33
  > .iui-codeblock-content {
30
34
  margin: 0;
31
35
  overflow-x: auto;
@@ -3,9 +3,11 @@
3
3
  @import '../style/index';
4
4
  @import '../user-icon/index';
5
5
  @import '../icon/index';
6
+ @import '../button/index';
6
7
 
7
8
  @mixin iui-page-header {
8
9
  @include iui-reset;
10
+
9
11
  display: flex;
10
12
  justify-content: space-between;
11
13
  width: 100%;
@@ -123,7 +125,7 @@
123
125
  @include iui-display-none;
124
126
  }
125
127
 
126
- .iui-header-button-icon + .iui-label {
128
+ .iui-header-button-icon + .iui-button-label {
127
129
  margin-left: 0;
128
130
  }
129
131
  }
@@ -154,7 +156,8 @@
154
156
  @include iui-header-button-icon;
155
157
  }
156
158
 
157
- .iui-header-button.iui-header-button { // boost specificity
159
+ // boost specificity
160
+ .iui-header-button.iui-header-button {
158
161
  @include iui-header-button;
159
162
  }
160
163
 
@@ -172,7 +175,7 @@
172
175
  @at-root {
173
176
  a#{&}, // rendered as anchor element
174
177
  button#{&}, // rendered as button element
175
- &[role='button'] { // rendered as div with role=button
178
+ &[role='button'] {
176
179
  @include iui-header-button-focus;
177
180
  cursor: pointer;
178
181
 
@@ -230,13 +233,18 @@
230
233
  }
231
234
 
232
235
  @mixin iui-header-button {
236
+ @include iui-button-size(large, borderless);
237
+
238
+ gap: 0;
233
239
  max-width: 25vw;
240
+ height: 100%;
241
+ border-radius: 0;
234
242
  overflow: hidden;
235
243
  padding-right: $iui-s;
236
244
 
237
245
  @include iui-header-button-focus;
238
246
 
239
- > .iui-label {
247
+ > .iui-button-label {
240
248
  text-align: left;
241
249
  font-size: $iui-font-size;
242
250
  overflow: hidden;
@@ -257,10 +265,14 @@
257
265
  }
258
266
  }
259
267
 
260
- > .iui-icon {
268
+ > .iui-button-icon {
261
269
  flex-shrink: 0;
262
270
  }
263
271
 
272
+ > * + * {
273
+ margin-left: $iui-sm;
274
+ }
275
+
264
276
  .iui-header-button-icon {
265
277
  padding: $iui-xs;
266
278
  @include iui-header-button-icon($iui-icons-default, $iui-border-radius);
@@ -289,11 +301,11 @@
289
301
  height: $iui-icons-small;
290
302
  padding: $iui-xxs;
291
303
  }
304
+ }
292
305
 
293
- .iui-label {
294
- .iui-description {
295
- @include iui-display-none;
296
- }
306
+ .iui-button-label {
307
+ .iui-description {
308
+ @include iui-display-none;
297
309
  }
298
310
  }
299
311
  }
@@ -302,9 +314,13 @@
302
314
  }
303
315
 
304
316
  @mixin iui-header-split-button {
305
- height: 100%;
306
- display: flex;
307
- overflow: hidden;
317
+ &,
318
+ > * {
319
+ height: 100%;
320
+ display: flex;
321
+ overflow: hidden;
322
+ }
323
+
308
324
  max-width: 25vw;
309
325
 
310
326
  .iui-button {
@@ -312,8 +328,10 @@
312
328
  padding: 0 $iui-xs;
313
329
  }
314
330
 
315
- .iui-button:first-child {
316
- padding-left: $iui-sm;
331
+ > *:first-child {
332
+ .iui-button {
333
+ padding-left: $iui-sm;
334
+ }
317
335
  }
318
336
 
319
337
  &.iui-active {
@@ -331,8 +349,10 @@
331
349
  display: none;
332
350
  }
333
351
  }
352
+ }
334
353
 
335
- &:last-child:hover {
354
+ > *:last-child {
355
+ > .iui-button:hover {
336
356
  @include themed {
337
357
  background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
338
358
  }
@@ -376,7 +396,7 @@
376
396
  }
377
397
 
378
398
  // Blue text
379
- .iui-label {
399
+ .iui-button-label {
380
400
  @include themed {
381
401
  color: t(iui-color-foreground-primary);
382
402
  }
@@ -403,13 +423,13 @@
403
423
  box-shadow: 0 $iui-xxs 0 0 rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
404
424
  }
405
425
 
406
- .iui-label {
426
+ .iui-button-label {
407
427
  @include themed {
408
428
  color: t(iui-icons-color-actionable-disabled);
409
429
  }
410
430
  }
411
431
 
412
- .iui-icon,
432
+ .iui-button-icon,
413
433
  svg {
414
434
  @include themed {
415
435
  fill: t(iui-icons-color-actionable-disabled);
package/scss/index.scss CHANGED
@@ -34,5 +34,6 @@
34
34
  @import './toast-notification/index';
35
35
  @import './toggle-switch/index';
36
36
  @import './tooltip/index';
37
+ @import './tree/index';
37
38
  @import './user-icon/index';
38
39
  @import './wizard/index';
@@ -47,9 +47,7 @@
47
47
  width: $iui-sm;
48
48
  height: $iui-sm;
49
49
 
50
- > path,
51
- > circle,
52
- > g {
50
+ > * {
53
51
  opacity: 0;
54
52
  @media (prefers-reduced-motion: no-preference) {
55
53
  transition: opacity $iui-speed-fast ease;
@@ -31,7 +31,7 @@
31
31
  // Adds hover to everything that is not disabled
32
32
  &:hover > input:enabled ~ .iui-checkbox-checkmark {
33
33
  @include themed {
34
- background-color: t(iui-color-background-1-overlay);
34
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
35
35
  }
36
36
  }
37
37
 
@@ -54,9 +54,12 @@
54
54
  opacity: 0;
55
55
  }
56
56
 
57
- input ~ .iui-checkbox-checkmark > svg > .iui-uncheck {
57
+ input ~ .iui-checkbox-checkmark .iui-uncheck {
58
58
  opacity: 1;
59
59
  transition: opacity $iui-speed-fast ease;
60
+ @include themed {
61
+ fill: t(iui-icons-color-actionable);
62
+ }
60
63
  }
61
64
  }
62
65
  }
@@ -9,7 +9,7 @@
9
9
  @include iui-input-container-label;
10
10
  }
11
11
 
12
- .iui-input-icon {
12
+ > .iui-input-icon {
13
13
  @include iui-input-icon;
14
14
  }
15
15
 
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  &.iui-inline-icon {
27
- .iui-input-icon {
27
+ > .iui-input-icon {
28
28
  @include iui-input-icon-inline;
29
29
  }
30
30
  }
@@ -13,7 +13,7 @@
13
13
  'label label'
14
14
  'inputs inputs' / auto 1fr;
15
15
 
16
- &.iui-inline-icon:not(.iui-inline-label) .iui-input-icon {
16
+ &.iui-inline-icon:not(.iui-inline-label) > .iui-input-icon {
17
17
  // stylelint-disable -- fix position in IE
18
18
  -ms-grid-row: 2;
19
19
  -ms-grid-column: 2;
@@ -38,7 +38,7 @@
38
38
  'icon message' / auto 1fr;
39
39
 
40
40
  // add margin to the icon if it is below input
41
- &:not(.iui-inline-icon) .iui-input-icon {
41
+ &:not(.iui-inline-icon) > .iui-input-icon {
42
42
  margin-top: $iui-component-offset;
43
43
  }
44
44
  }
@@ -105,7 +105,7 @@
105
105
  'label inputs inputs'
106
106
  '. icon message' / auto auto 1fr;
107
107
 
108
- &:not(.iui-inline-icon) .iui-input-icon {
108
+ &:not(.iui-inline-icon) > .iui-input-icon {
109
109
  // stylelint-disable -- fix position in IE
110
110
  -ms-grid-row: 2;
111
111
  -ms-grid-column: 2;