@itwin/itwinui-css 0.42.0 → 0.44.1

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 (59) hide show
  1. package/css/alert.css +46 -61
  2. package/css/all.css +739 -697
  3. package/css/breadcrumbs.css +7 -20
  4. package/css/button.css +165 -181
  5. package/css/code.css +6 -9
  6. package/css/color-picker.css +14 -14
  7. package/css/date-picker.css +91 -85
  8. package/css/expandable-block.css +13 -9
  9. package/css/file-upload.css +4 -3
  10. package/css/footer.css +7 -20
  11. package/css/global.css +7 -9
  12. package/css/header.css +4 -24
  13. package/css/inputs.css +121 -89
  14. package/css/side-navigation.css +1 -16
  15. package/css/slider.css +7 -10
  16. package/css/table.css +170 -34
  17. package/css/tabs.css +8 -3
  18. package/css/tag.css +17 -18
  19. package/css/tile.css +0 -14
  20. package/css/time-picker.css +26 -18
  21. package/css/toast-notification.css +12 -49
  22. package/css/toggle-switch.css +7 -4
  23. package/css/tree.css +2 -3
  24. package/css/wizard.css +4 -4
  25. package/package.json +10 -9
  26. package/scss/alert/alert.scss +4 -2
  27. package/scss/button/borderless.scss +10 -26
  28. package/scss/button/button-group.scss +22 -7
  29. package/scss/button/cta.scss +10 -25
  30. package/scss/button/default.scss +22 -32
  31. package/scss/button/high-visibility.scss +10 -25
  32. package/scss/color-picker/color-picker.scss +2 -25
  33. package/scss/date-picker/classes.scss +20 -0
  34. package/scss/date-picker/date-picker.scss +88 -100
  35. package/scss/expandable-block/block.scss +1 -0
  36. package/scss/file-upload/file-upload.scss +2 -2
  37. package/scss/footer/footer.scss +0 -2
  38. package/scss/header/header.scss +1 -15
  39. package/scss/inputs/checkbox-radio.scss +28 -18
  40. package/scss/inputs/checkbox.scss +9 -8
  41. package/scss/inputs/input.scss +1 -14
  42. package/scss/inputs/labeled-inputs.scss +2 -1
  43. package/scss/inputs/radio-tile.scss +9 -4
  44. package/scss/inputs/select.scss +2 -1
  45. package/scss/side-navigation/side-navigation.scss +1 -33
  46. package/scss/slider/slider.scss +1 -2
  47. package/scss/style/mixins.scss +15 -17
  48. package/scss/table/classes.scss +12 -0
  49. package/scss/table/paginator.scss +39 -37
  50. package/scss/table/table.scss +11 -2
  51. package/scss/tabs/default.scss +5 -0
  52. package/scss/tabs/tabs.scss +1 -8
  53. package/scss/tag/tag.scss +9 -1
  54. package/scss/time-picker/time-picker.scss +1 -0
  55. package/scss/toast-notification/categories.scss +5 -2
  56. package/scss/toast-notification/toast.scss +0 -1
  57. package/scss/toggle-switch/toggle-switch.scss +7 -3
  58. package/scss/tree/tree.scss +2 -2
  59. package/scss/wizard/wizard.scss +3 -3
@@ -6,19 +6,20 @@
6
6
  @import './button-icon';
7
7
 
8
8
  @mixin iui-button-borderless {
9
- @include iui-button-borderless-base;
10
- @include iui-button-size(medium, borderless);
11
-
12
- &:focus {
13
- @include iui-button-borderless-hover-focus;
9
+ border-color: transparent;
10
+ background-color: transparent;
14
11
 
15
- &:where(:not(:focus-visible)) {
16
- @include iui-button-borderless-base;
17
- }
12
+ > .iui-button-icon:only-child {
13
+ margin-left: $iui-component-offset;
14
+ margin-right: $iui-component-offset;
18
15
  }
16
+ @include iui-button-size(medium, borderless);
19
17
 
20
18
  &:hover {
21
- @include iui-button-borderless-hover-focus;
19
+ @include themed {
20
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
21
+ border-color: transparent;
22
+ }
22
23
  }
23
24
 
24
25
  &.iui-active {
@@ -45,20 +46,3 @@
45
46
  }
46
47
  }
47
48
  }
48
-
49
- @mixin iui-button-borderless-hover-focus {
50
- @include themed {
51
- background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
52
- border-color: transparent;
53
- }
54
- }
55
-
56
- @mixin iui-button-borderless-base {
57
- border-color: transparent;
58
- background-color: transparent;
59
-
60
- > .iui-button-icon:only-child {
61
- margin-left: $iui-component-offset;
62
- margin-right: $iui-component-offset;
63
- }
64
- }
@@ -10,19 +10,34 @@
10
10
  $childSelector: 'input, button'; // target nested inputs and buttons
11
11
 
12
12
  > * {
13
+ display: flex;
14
+
13
15
  #{$childSelector} {
14
- &:hover,
15
- &:focus,
16
- &:focus-within {
17
- position: relative;
16
+ position: relative;
17
+
18
+ &:hover {
18
19
  z-index: 1;
19
20
  }
20
21
 
22
+ &:focus {
23
+ z-index: 2;
24
+
25
+ &:where(:not(:focus-visible):not(:hover)) {
26
+ z-index: revert;
27
+ }
28
+ }
29
+
21
30
  &:disabled {
22
- position: relative;
23
31
  z-index: -1;
24
32
  }
25
33
 
34
+ transition-duration: 0ms; // disable exit animation to avoid border flicker
35
+
36
+ &:hover,
37
+ &:focus {
38
+ transition-duration: $iui-speed-fast; // re-enable enter animation
39
+ }
40
+
26
41
  // Adds stripe above active button
27
42
  &.iui-active {
28
43
  &::after {
@@ -69,8 +84,8 @@
69
84
  }
70
85
 
71
86
  // Use negative margin to make adjacent borders overlap
72
- &:not(:last-child) {
73
- margin-right: -1px;
87
+ + * {
88
+ margin-left: -1px;
74
89
  }
75
90
 
76
91
  // Add slight border between disabled items
@@ -6,19 +6,20 @@
6
6
  @import './disabled';
7
7
 
8
8
  @mixin iui-button-cta {
9
- @include iui-button-cta-base;
10
-
11
- &:focus {
12
- @include iui-button-cta-hover-focus;
13
-
14
- &:where(:not(:focus-visible)) {
15
- @include iui-button-cta-base;
16
- }
9
+ @include themed {
10
+ background-color: t(iui-color-background-positive);
11
+ border-color: t(iui-color-background-positive);
12
+ color: t(iui-color-foreground-accessory);
17
13
  }
14
+ @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px, $thickness: 1px);
18
15
 
19
16
  &:hover,
20
17
  &:active {
21
- @include iui-button-cta-hover-focus;
18
+ @include themed {
19
+ background-color: t(iui-color-background-positive-overlay);
20
+ border-color: t(iui-color-background-positive-overlay);
21
+ color: t(iui-color-foreground-accessory);
22
+ }
22
23
  }
23
24
 
24
25
  &[disabled],
@@ -26,19 +27,3 @@
26
27
  @include iui-button-disabled;
27
28
  }
28
29
  }
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);
43
- }
44
- }
@@ -7,19 +7,21 @@
7
7
  @import './disabled';
8
8
 
9
9
  @mixin iui-button-default {
10
- @include iui-button-default-base;
11
-
12
- &:focus {
13
- @include iui-button-default-hover-focus;
14
-
15
- &:where(:not(:focus-visible)) {
16
- @include iui-button-default-base;
17
- }
10
+ @include themed {
11
+ background-color: t(iui-color-background-1);
12
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
13
+ color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
18
14
  }
15
+ @include iui-focus($offset: -2px, $thickness: 2px);
19
16
 
20
17
  &:hover,
21
18
  &:active {
22
- @include iui-button-default-hover-focus;
19
+ @include themed {
20
+ background-color: t(iui-color-background-1-overlay);
21
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
22
+ color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
23
+ }
24
+ @include iui-notification-marker-hover;
23
25
  }
24
26
 
25
27
  &.iui-dropdown {
@@ -35,15 +37,20 @@
35
37
  }
36
38
  }
37
39
 
38
- &.iui-active {
40
+ &.iui-active:enabled {
41
+ position: relative;
39
42
  @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
43
  color: t(iui-color-foreground-primary);
46
44
  }
45
+
46
+ &::before {
47
+ content: '';
48
+ position: absolute;
49
+ inset: 0;
50
+ @include themed {
51
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
52
+ }
53
+ }
47
54
  }
48
55
 
49
56
  &[disabled],
@@ -51,20 +58,3 @@
51
58
  @include iui-button-disabled;
52
59
  }
53
60
  }
54
-
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));
69
- }
70
- }
@@ -6,19 +6,20 @@
6
6
  @import './button-icon';
7
7
 
8
8
  @mixin iui-button-high-visibility {
9
- @include iui-button-high-visibility-base;
10
-
11
- &:focus {
12
- @include iui-button-high-visibility-hover-focus;
13
-
14
- &:where(:not(:focus-visible)) {
15
- @include iui-button-high-visibility-base;
16
- }
9
+ @include themed {
10
+ background-color: t(iui-color-background-primary);
11
+ border-color: t(iui-color-background-primary);
12
+ color: t(iui-color-foreground-accessory);
17
13
  }
14
+ @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px, $thickness: 1px);
18
15
 
19
16
  &:hover,
20
17
  &:active {
21
- @include iui-button-high-visibility-hover-focus;
18
+ @include themed {
19
+ background-color: t(iui-color-background-primary-overlay);
20
+ border-color: t(iui-color-background-primary-overlay);
21
+ color: t(iui-color-foreground-accessory);
22
+ }
22
23
  }
23
24
 
24
25
  &[disabled],
@@ -26,19 +27,3 @@
26
27
  @include iui-button-disabled;
27
28
  }
28
29
  }
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);
43
- }
44
- }
@@ -10,7 +10,6 @@ $iui-color-swatch-border-radius: 5px;
10
10
  $iui-inset-box-shadow: inset 0 0 0 1px rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
11
11
  $iui-active-box-shadow: 0 0 0 $iui-xxs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3));
12
12
  $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
13
- $iui-focus-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
14
13
 
15
14
  @mixin iui-color-picker {
16
15
  @include iui-dropdown;
@@ -61,12 +60,7 @@ $iui-focus-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-primary-
61
60
  }
62
61
  }
63
62
 
64
- &:focus {
65
- outline: 0;
66
- @include themed {
67
- box-shadow: $iui-focus-box-shadow, $iui-inset-box-shadow;
68
- }
69
- }
63
+ @include iui-focus($offset: 0, $thickness: 2px);
70
64
 
71
65
  &.iui-active {
72
66
  @include themed {
@@ -78,18 +72,6 @@ $iui-focus-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-primary-
78
72
  box-shadow: $iui-hover-box-shadow, $iui-inset-box-shadow, $iui-active-box-shadow;
79
73
  }
80
74
  }
81
-
82
- &:focus {
83
- @include themed {
84
- box-shadow: $iui-focus-box-shadow, $iui-inset-box-shadow, $iui-active-box-shadow;
85
- }
86
- }
87
-
88
- &:focus:not(:focus-visible) {
89
- @include themed {
90
- box-shadow: $iui-inset-box-shadow, $iui-active-box-shadow;
91
- }
92
- }
93
75
  }
94
76
  }
95
77
 
@@ -273,10 +255,5 @@ $iui-focus-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-primary-
273
255
  }
274
256
  }
275
257
 
276
- &:focus {
277
- outline: 0;
278
- @include themed {
279
- box-shadow: $iui-focus-box-shadow;
280
- }
281
- }
258
+ @include iui-focus($offset: 0, $thickness: 2px);
282
259
  }
@@ -5,3 +5,23 @@
5
5
  .iui-date-picker {
6
6
  @include iui-date-picker;
7
7
  }
8
+
9
+ .iui-calendar-month-year {
10
+ @include iui-calendar-month-year;
11
+ }
12
+
13
+ .iui-calendar-month {
14
+ @include iui-calendar-month;
15
+ }
16
+
17
+ .iui-calendar-weekdays {
18
+ @include iui-calendar-weekdays;
19
+ }
20
+
21
+ .iui-calendar-week {
22
+ @include iui-calendar-week;
23
+ }
24
+
25
+ .iui-calendar-day {
26
+ @include iui-calendar-day;
27
+ }
@@ -14,118 +14,106 @@
14
14
  @include themed {
15
15
  background-color: t(iui-color-background-1);
16
16
  }
17
-
18
- @include iui-calendar;
19
17
  }
20
18
 
21
- @mixin iui-calendar {
22
- > .iui-calendar {
23
- > .iui-header {
24
- border: none;
25
- padding: 0;
26
- position: relative;
27
- font-weight: $iui-font-weight-bold;
28
- @include themed {
29
- background-color: t(iui-color-background-1);
30
- }
31
-
32
- > .iui-month-year {
33
- display: inline-flex;
34
- width: 100%;
35
- align-items: center;
36
- justify-content: space-between;
37
- padding: 0 $iui-xs;
38
- box-sizing: border-box;
19
+ @mixin iui-calendar-month-year {
20
+ display: inline-flex;
21
+ width: 100%;
22
+ align-items: center;
23
+ justify-content: space-between;
24
+ padding: 0 $iui-xs;
25
+ box-sizing: border-box;
26
+ font-weight: $iui-font-weight-bold;
27
+ @include themed {
28
+ background-color: t(iui-color-background-1);
29
+ }
39
30
 
40
- > span {
41
- margin: 0 $iui-xs;
42
- width: 156px;
43
- white-space: nowrap;
44
- display: inline-flex;
45
- flex-shrink: 0;
46
- align-items: center;
47
- justify-content: center;
48
- line-height: $iui-baseline * 4;
49
- }
31
+ > span {
32
+ margin: 0 $iui-xs;
33
+ width: 156px;
34
+ white-space: nowrap;
35
+ display: inline-flex;
36
+ flex-shrink: 0;
37
+ align-items: center;
38
+ justify-content: center;
39
+ line-height: $iui-baseline * 4;
40
+ }
41
+ }
50
42
 
51
- .iui-month {
52
- overflow: hidden;
53
- max-width: 15ch;
54
- text-overflow: ellipsis;
55
- white-space: nowrap;
56
- flex-shrink: 0;
57
- }
58
- }
43
+ @mixin iui-calendar-month {
44
+ overflow: hidden;
45
+ max-width: 15ch;
46
+ text-overflow: ellipsis;
47
+ white-space: nowrap;
48
+ flex-shrink: 0;
49
+ }
59
50
 
60
- > .iui-weekdays {
61
- line-height: $iui-baseline * 3;
62
- display: flex;
63
- justify-content: space-evenly;
64
- align-items: center;
65
- padding: 0 $iui-s;
66
- @include themed {
67
- background-color: t(iui-color-background-2);
68
- }
51
+ @mixin iui-calendar-weekdays {
52
+ line-height: $iui-baseline * 3;
53
+ display: flex;
54
+ justify-content: space-evenly;
55
+ align-items: center;
56
+ padding: 0 $iui-s;
57
+ font-weight: $iui-font-weight-bold;
58
+ @include themed {
59
+ background-color: t(iui-color-background-2);
60
+ }
69
61
 
70
- > div {
71
- white-space: nowrap;
72
- overflow: hidden;
73
- width: $iui-xl;
74
- text-align: center;
75
- }
76
- }
77
- }
62
+ > div {
63
+ white-space: nowrap;
64
+ overflow: hidden;
65
+ width: $iui-xl;
66
+ text-align: center;
67
+ }
68
+ }
78
69
 
79
- > .iui-dates {
80
- > .iui-week {
81
- white-space: nowrap;
82
- height: $iui-baseline * 3;
83
- display: flex;
84
- align-items: center;
85
- justify-content: space-evenly;
86
- padding: 0 $iui-s;
70
+ @mixin iui-calendar-week {
71
+ white-space: nowrap;
72
+ height: $iui-baseline * 3;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: space-evenly;
76
+ padding: 0 $iui-s;
77
+ }
87
78
 
88
- > .iui-date {
89
- @include iui-focus;
90
- cursor: pointer;
91
- display: inline-block;
92
- width: $iui-baseline * 3;
93
- line-height: $iui-baseline * 3;
79
+ @mixin iui-calendar-day {
80
+ @include iui-focus;
81
+ cursor: pointer;
82
+ display: inline-block;
83
+ width: $iui-baseline * 3;
84
+ line-height: $iui-baseline * 3;
85
+ border-radius: $iui-border-radius;
94
86
 
95
- &:hover:not(.iui-selected) {
96
- border-radius: $iui-border-radius;
97
- font-weight: $iui-font-weight-semibold;
98
- @include themed {
99
- color: t(iui-color-foreground-primary);
100
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
101
- }
102
- }
87
+ &.iui-today {
88
+ font-weight: $iui-font-weight-semibold;
89
+ border-radius: 50%;
90
+ @include themed {
91
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
92
+ }
93
+ }
103
94
 
104
- &.iui-today {
105
- font-weight: $iui-font-weight-semibold;
106
- border-radius: 50%;
107
- @include themed {
108
- background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
109
- }
110
- }
95
+ &:hover {
96
+ font-weight: $iui-font-weight-semibold;
97
+ @include themed {
98
+ color: t(iui-color-foreground-primary);
99
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
100
+ }
101
+ }
111
102
 
112
- &.iui-selected {
113
- font-weight: $iui-font-weight-semibold;
114
- border-radius: $iui-border-radius;
115
- cursor: default;
116
- @include themed {
117
- background-color: t(iui-color-background-primary);
118
- color: t(iui-color-foreground-accessory);
119
- }
120
- }
103
+ &.iui-selected {
104
+ font-weight: $iui-font-weight-semibold;
105
+ border-radius: $iui-border-radius;
106
+ cursor: default;
107
+ @include themed {
108
+ background-color: t(iui-color-background-primary);
109
+ color: t(iui-color-foreground-accessory);
110
+ }
111
+ @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px);
112
+ }
121
113
 
122
- &.iui-outside-month {
123
- @include themed {
124
- color: t(iui-text-color-muted);
125
- }
126
- }
127
- }
128
- }
114
+ &.iui-outside-month {
115
+ @include themed {
116
+ color: t(iui-text-color-muted);
129
117
  }
130
118
  }
131
119
  }
@@ -15,6 +15,7 @@
15
15
  }
16
16
 
17
17
  > .iui-header {
18
+ @include iui-focus;
18
19
  display: flex;
19
20
  align-items: center;
20
21
  padding: $iui-baseline $iui-sm;
@@ -52,9 +52,9 @@
52
52
  flex-direction: row;
53
53
 
54
54
  &:focus-within {
55
- outline: 0;
56
55
  @include themed {
57
- box-shadow: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5)) 0 0 0 2px;
56
+ outline: 2px solid t(iui-color-foreground-primary);
57
+ outline-offset: -2px;
58
58
  }
59
59
  }
60
60
  }
@@ -14,7 +14,6 @@
14
14
  list-style-type: none;
15
15
  margin: 0 auto;
16
16
  padding: 0;
17
- overflow: hidden;
18
17
  display: flex;
19
18
  justify-content: center;
20
19
  align-items: center;
@@ -43,7 +42,6 @@
43
42
 
44
43
  > a {
45
44
  @include iui-anchor;
46
- @include iui-focus;
47
45
 
48
46
  &,
49
47
  &:hover {
@@ -186,8 +186,7 @@
186
186
  color: unset;
187
187
  // #endregion
188
188
 
189
- &:hover,
190
- &:focus {
189
+ &:hover {
191
190
  @include themed {
192
191
  background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
193
192
  }
@@ -402,19 +401,6 @@
402
401
  }
403
402
  }
404
403
 
405
- // Focus styling - blue outline
406
- &:focus {
407
- @include themed {
408
- box-shadow: t(iui-focus-box-shadow), 0 $iui-xxs 0 0 t(iui-color-foreground-primary);
409
- }
410
- }
411
-
412
- &:focus:not(:focus-visible) {
413
- @include themed {
414
- box-shadow: 0 $iui-xxs 0 0 t(iui-color-foreground-primary);
415
- }
416
- }
417
-
418
404
  // Disabled state
419
405
  &.iui-disabled,
420
406
  &:disabled {