@itwin/itwinui-css 0.54.1 → 0.57.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 (50) hide show
  1. package/css/all.css +872 -473
  2. package/css/anchor.css +21 -17
  3. package/css/breadcrumbs.css +308 -56
  4. package/css/button.css +9 -12
  5. package/css/footer.css +1 -17
  6. package/css/global.css +14 -17
  7. package/css/header.css +3 -2
  8. package/css/inputs.css +18 -168
  9. package/css/menu.css +21 -0
  10. package/css/popover.css +2 -2
  11. package/css/radio-tile.css +217 -0
  12. package/css/table.css +12 -11
  13. package/css/tabs.css +4 -0
  14. package/css/tag.css +55 -64
  15. package/css/text.css +9 -3
  16. package/css/tile.css +29 -17
  17. package/css/toast-notification.css +1 -1
  18. package/css/toggle-switch.css +65 -0
  19. package/package.json +5 -3
  20. package/scss/anchor/classes.scss +4 -0
  21. package/scss/breadcrumbs/breadcrumbs.scss +74 -18
  22. package/scss/breadcrumbs/classes.scss +9 -0
  23. package/scss/button/button.scss +17 -16
  24. package/scss/button/classes.scss +4 -0
  25. package/scss/button/cta.scss +3 -1
  26. package/scss/button/default.scss +0 -2
  27. package/scss/button/high-visibility.scss +3 -1
  28. package/scss/classes.scss +3 -2
  29. package/scss/header/header.scss +8 -1
  30. package/scss/index.scss +3 -2
  31. package/scss/inputs/checkbox.scss +11 -6
  32. package/scss/inputs/classes.scss +0 -4
  33. package/scss/inputs/index.scss +0 -1
  34. package/scss/inputs/labeled-inputs.scss +1 -1
  35. package/scss/menu/menu.scss +27 -0
  36. package/scss/popover/popover.scss +2 -2
  37. package/scss/radio-tile/classes.scss +31 -0
  38. package/scss/radio-tile/index.scss +3 -0
  39. package/scss/radio-tile/radio-tile.scss +209 -0
  40. package/scss/style/anchor.scss +19 -16
  41. package/scss/style/global.scss +4 -0
  42. package/scss/table/paginator.scss +4 -0
  43. package/scss/tabs/tabs.scss +6 -0
  44. package/scss/tag/classes.scss +14 -1
  45. package/scss/tag/tag.scss +45 -46
  46. package/scss/text/skeleton.scss +13 -7
  47. package/scss/tile/tile.scss +19 -13
  48. package/scss/toast-notification/classes.scss +1 -1
  49. package/scss/toggle-switch/toggle-switch.scss +50 -2
  50. package/scss/inputs/radio-tile.scss +0 -200
package/scss/tag/tag.scss CHANGED
@@ -1,67 +1,66 @@
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 '../icon/index';
5
4
  @import '../text/mixins';
5
+ @import '../button/index';
6
6
 
7
- @mixin iui-tag {
7
+ @mixin iui-tag-base {
8
8
  @include iui-reset;
9
- @include iui-focus($offset: -2px, $thickness: 2px);
10
9
  user-select: all;
11
10
  text-transform: lowercase;
12
11
  display: inline-flex;
12
+ }
13
+
14
+ @mixin iui-tag-basic {
15
+ @include iui-tag-base;
13
16
 
14
17
  &:not(a) {
15
18
  @include themed {
16
19
  color: t(iui-text-color-muted);
17
20
  }
18
21
  }
22
+ }
19
23
 
20
- &:not(.iui-basic) {
21
- height: $iui-baseline * 3;
22
- margin: $iui-component-offset 0;
23
- border-radius: ($iui-baseline * 3) * 0.5;
24
- box-sizing: border-box;
25
- padding: 0 $iui-xxs;
26
- align-items: center;
27
- @media (prefers-reduced-motion: no-preference) {
28
- transition: border $iui-speed-fast ease-out;
29
- }
30
- font-size: $iui-font-size;
31
- text-transform: none;
32
- cursor: default;
33
- @include themed {
34
- border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
35
- background-color: t(iui-color-background-1);
36
- color: t(iui-text-color);
37
- }
38
-
39
- > .iui-label {
40
- @include iui-text;
41
- white-space: nowrap;
42
- text-overflow: ellipsis;
43
- overflow: hidden;
44
- margin: 0 $iui-xs 0 $iui-s;
24
+ @mixin iui-tag {
25
+ @include iui-tag-base;
26
+ height: $iui-baseline * 3;
27
+ margin: $iui-component-offset 0;
28
+ border-radius: $iui-border-radius-round;
29
+ box-sizing: border-box;
30
+ padding: 0 $iui-xxs;
31
+ align-items: center;
32
+ transition: border-color $iui-speed-fast ease-out;
33
+ font-size: $iui-font-size;
34
+ text-transform: none;
35
+ cursor: default;
36
+ -webkit-tap-highlight-color: transparent;
37
+ @include themed {
38
+ border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
39
+ background-color: t(iui-color-background-1);
40
+ color: t(iui-text-color);
41
+ }
45
42
 
46
- &:only-child {
47
- margin: 0 $iui-s;
48
- }
43
+ &:hover {
44
+ @include themed {
45
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
49
46
  }
47
+ }
48
+ }
50
49
 
51
- > .iui-button {
52
- border-radius: 50%;
53
- }
50
+ @mixin iui-tag-label {
51
+ @include iui-text;
52
+ white-space: nowrap;
53
+ text-overflow: ellipsis;
54
+ overflow: hidden;
55
+ margin: 0 $iui-xs 0 $iui-s;
54
56
 
55
- &:hover {
56
- @include themed {
57
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
58
- }
59
- }
57
+ &:only-child {
58
+ margin: 0 $iui-s;
60
59
  }
60
+ }
61
61
 
62
- &.iui-basic {
63
- outline-offset: 1px;
64
- }
62
+ @mixin iui-tag-button {
63
+ border-radius: 50%;
65
64
  }
66
65
 
67
66
  @mixin iui-tag-container {
@@ -69,15 +68,15 @@
69
68
  color: t(iui-text-color-muted);
70
69
  }
71
70
 
72
- > a.iui-basic {
71
+ > a.iui-tag-basic {
73
72
  margin: $iui-xxs;
74
73
  }
75
74
 
76
- > .iui-tag:not(:last-child) {
75
+ > *:not(last-child) {
77
76
  margin-right: $iui-xs;
78
77
  }
79
78
 
80
- > .iui-basic:not(:last-child)::after {
79
+ > .iui-tag-basic:not(:last-child)::after {
81
80
  content: ',';
82
81
  }
83
82
 
@@ -94,7 +93,7 @@
94
93
  border-radius: $iui-border-radius;
95
94
  padding: $iui-component-offset $iui-sm;
96
95
  @include themed {
97
- background-color: t(iui-color-background-2);
96
+ background-color: t(iui-color-background-3);
98
97
  }
99
98
  }
100
99
  }
@@ -7,17 +7,23 @@
7
7
  user-select: none;
8
8
  color: transparent;
9
9
  border-radius: $iui-border-radius;
10
+ cursor: progress;
10
11
 
11
12
  @include themed {
12
13
  background: linear-gradient(
13
- 270deg,
14
- t(iui-color-background-3),
15
- t(iui-color-background-3),
16
- t(iui-color-background-2),
17
- t(iui-color-background-3),
18
- t(iui-color-background-3)
14
+ 292deg,
15
+ t(iui-text-color-muted),
16
+ t(iui-text-color-muted),
17
+ t(iui-text-color-placeholder),
18
+ t(iui-text-color-muted),
19
+ t(iui-text-color-muted)
19
20
  );
20
- background-size: 200% 100%;
21
+ }
22
+ background-size: 200% 100%;
23
+
24
+ @media (forced-colors: active) {
25
+ forced-color-adjust: none;
26
+ background: linear-gradient(292deg, CanvasText, CanvasText, Canvas, CanvasText, CanvasText);
21
27
  }
22
28
 
23
29
  @media (prefers-reduced-motion: no-preference) {
@@ -1,21 +1,17 @@
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 '../icon/index';
5
4
  @import '../button/index';
5
+ @import '../icon/index';
6
+ @import '../surface/index';
6
7
 
7
8
  @mixin iui-tile {
8
9
  @include iui-reset;
10
+ @include iui-surface;
9
11
  display: inline-flex;
10
12
  flex-direction: column;
11
13
  width: $iui-3xl * 3;
12
- box-shadow: $iui-elevation-2;
13
14
  backface-visibility: hidden;
14
- @include iui-focus($offset: $iui-xxs, $thickness: $iui-xxs);
15
- @include themed() {
16
- background-color: t(iui-color-background-1);
17
- color: t(iui-text-color);
18
- }
19
15
 
20
16
  &:hover,
21
17
  &:focus-within {
@@ -27,10 +23,6 @@
27
23
  .iui-tile-metadata:not(:last-child) {
28
24
  width: calc(100% - #{$iui-xl});
29
25
  }
30
-
31
- .iui-tile-thumbnail-picture {
32
- transform: translateZ(0) scale(1.1);
33
- }
34
26
  }
35
27
 
36
28
  &.iui-new {
@@ -50,9 +42,23 @@
50
42
  ),
51
43
  linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
52
44
  }
45
+ }
46
+
47
+ &.iui-actionable {
48
+ @include iui-focus($offset: $iui-xxs, $thickness: $iui-xxs);
49
+ cursor: pointer;
50
+ transition: box-shadow $iui-speed-fast ease-in-out;
51
+
52
+ &:hover {
53
+ box-shadow: $iui-elevation-8;
54
+ }
53
55
 
54
- .iui-tile-thumbnail-picture {
55
- transform: translateZ(0) scale(1.1);
56
+ &:hover,
57
+ &:focus-within,
58
+ &.iui-selected {
59
+ .iui-tile-thumbnail-picture {
60
+ transform: translateZ(0) scale(1.1);
61
+ }
56
62
  }
57
63
  }
58
64
 
@@ -17,7 +17,7 @@
17
17
  align-items: center;
18
18
  flex-direction: column;
19
19
  justify-content: center;
20
- z-index: 1070;
20
+ z-index: 99999;
21
21
 
22
22
  @media screen and (max-width: 400px) {
23
23
  width: calc(100vw - 36px);
@@ -30,6 +30,9 @@
30
30
  @include themed {
31
31
  color: t(iui-text-color-muted);
32
32
  }
33
+ @media (forced-colors: active) {
34
+ color: GrayText;
35
+ }
33
36
  }
34
37
 
35
38
  // For labels on the left
@@ -92,14 +95,24 @@
92
95
  // #region Unchecked toggle switch
93
96
  background-color: var(--iui-color-background-1);
94
97
  border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
98
+ @media (forced-colors: active) {
99
+ border-color: CanvasText;
100
+ }
95
101
 
96
102
  &::after {
97
103
  background-color: var(--iui-color-foreground-body);
98
104
  opacity: var(--iui-opacity-2);
105
+ @media (forced-colors: active) {
106
+ background-color: CanvasText;
107
+ opacity: 1;
108
+ }
99
109
  }
100
110
 
101
111
  &:hover {
102
112
  border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
113
+ @media (forced-colors: active) {
114
+ border-color: CanvasText;
115
+ }
103
116
  }
104
117
 
105
118
  @include focus-visible {
@@ -111,11 +124,19 @@
111
124
  &:checked {
112
125
  background-color: var(--iui-color-background-primary);
113
126
  border-color: var(--iui-color-background-primary);
127
+ @media (forced-colors: active) {
128
+ background-color: Highlight;
129
+ border-color: Highlight;
130
+ }
114
131
 
115
132
  &::after {
116
133
  transform: translateX($iui-toggle-switch-handle-size + $iui-toggle-switch-handle-offset);
117
134
  background-color: var(--iui-color-foreground-accessory);
118
135
  opacity: var(--iui-opacity-2);
136
+ @media (forced-colors: active) {
137
+ background-color: HighlightText;
138
+ opacity: 1;
139
+ }
119
140
  }
120
141
 
121
142
  ~ .iui-toggle-switch-icon {
@@ -141,10 +162,18 @@
141
162
  cursor: not-allowed;
142
163
  background-color: var(--iui-color-background-disabled);
143
164
  border-color: var(--iui-color-background-disabled);
165
+ @media (forced-colors: active) {
166
+ border-color: GrayText;
167
+ }
144
168
 
145
169
  &::after {
146
170
  background-color: var(--iui-color-foreground-body);
147
171
  opacity: var(--iui-opacity-5);
172
+
173
+ @media (forced-colors: active) {
174
+ background-color: GrayText;
175
+ opacity: 0.75;
176
+ }
148
177
  }
149
178
 
150
179
  ~ .iui-toggle-switch-icon {
@@ -152,8 +181,24 @@
152
181
  fill: var(--iui-icons-color-actionable);
153
182
  }
154
183
 
155
- &:checked ~ .iui-toggle-switch-icon {
156
- opacity: var(--iui-opacity-5);
184
+ &:checked {
185
+ @media (forced-colors: active) {
186
+ background-color: GrayText;
187
+ }
188
+
189
+ &::after {
190
+ @media (forced-colors: active) {
191
+ background-color: Canvas;
192
+ }
193
+ }
194
+
195
+ ~ .iui-toggle-switch-icon {
196
+ opacity: var(--iui-opacity-5);
197
+ @media (forced-colors: active) {
198
+ fill: Canvas;
199
+ opacity: 0.75;
200
+ }
201
+ }
157
202
  }
158
203
  }
159
204
  // #endregion Disabled toggle switch
@@ -170,5 +215,8 @@
170
215
  transition: opacity $iui-speed-fast ease-out;
171
216
  pointer-events: none;
172
217
  fill: var(--iui-color-foreground-accessory);
218
+ @media (forced-colors: active) {
219
+ fill: HighlightText;
220
+ }
173
221
  }
174
222
  }
@@ -1,200 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
- @import '../icon/index';
5
-
6
- @mixin iui-radio-tile {
7
- display: inline-flex;
8
- flex-wrap: wrap;
9
- width: fit-content;
10
- user-select: none;
11
- // Create stacking context
12
- position: relative;
13
- z-index: 0;
14
-
15
- > label {
16
- cursor: pointer;
17
-
18
- > input {
19
- width: 0;
20
- height: 0;
21
- appearance: none;
22
- opacity: 0;
23
- position: absolute;
24
- }
25
-
26
- // Radio tile styling
27
- > .iui-radio-tile {
28
- width: $iui-xl * 5;
29
- height: 100%;
30
- box-sizing: border-box;
31
- padding: $iui-s;
32
- position: relative;
33
- z-index: 1;
34
- @media (prefers-reduced-motion: no-preference) {
35
- transition: border-color $iui-speed-fast ease-out;
36
- }
37
-
38
- @include themed {
39
- border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
40
- background-color: t(iui-color-background-1);
41
- }
42
-
43
- > .iui-icon {
44
- width: $iui-icons-xl;
45
- height: $iui-icons-xl;
46
- display: block;
47
- margin: 0 auto;
48
- margin-top: round($iui-baseline * 0.5);
49
- margin-bottom: $iui-baseline;
50
- @media (prefers-reduced-motion: no-preference) {
51
- transition: fill $iui-speed-fast ease-out;
52
- }
53
- @include themed {
54
- fill: t(iui-icons-color);
55
- }
56
- }
57
-
58
- > .iui-checkmark {
59
- display: none;
60
- width: $iui-icons-default;
61
- height: $iui-icons-default;
62
- position: absolute;
63
- right: $iui-s;
64
-
65
- @include themed {
66
- fill: t(iui-icons-color-primary);
67
- }
68
- }
69
-
70
- > .iui-label {
71
- font-size: $iui-font-size;
72
- font-weight: $iui-font-weight-semibold;
73
- line-height: $iui-line-height;
74
- text-align: center;
75
-
76
- @include themed {
77
- color: t(iui-text-color);
78
- }
79
- }
80
-
81
- > .iui-description {
82
- font-size: $iui-font-size-small;
83
- line-height: round($iui-baseline * 1.375);
84
- text-align: center;
85
-
86
- @include themed {
87
- color: t(iui-text-color-muted);
88
- }
89
- }
90
- }
91
-
92
- // Rounded corners on first tile
93
- &:first-child > .iui-radio-tile {
94
- border-radius: $iui-border-radius 0 0 $iui-border-radius;
95
- }
96
-
97
- // Rounded corners on last tile
98
- &:last-child > .iui-radio-tile {
99
- border-radius: 0 $iui-border-radius $iui-border-radius 0;
100
- }
101
-
102
- // All tiles shift 1px left so we don't have 2px thick dividers
103
- &:not(:first-child) > .iui-radio-tile {
104
- margin-left: -1px;
105
- }
106
-
107
- // Adds focus to enabled radio tiles
108
- input:enabled {
109
- &:focus ~ .iui-radio-tile {
110
- @include themed {
111
- outline: 2px solid t(iui-color-foreground-primary);
112
- outline-offset: -4px;
113
- }
114
- }
115
-
116
- &:focus:not(:focus-visible) ~ .iui-radio-tile {
117
- outline: none;
118
- }
119
- }
120
-
121
- // Adds hover to everything that is not checked or disabled
122
- &:hover > input:enabled:not(:checked) ~ .iui-radio-tile {
123
- z-index: 2;
124
- @include themed {
125
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
126
- }
127
- @media (prefers-reduced-motion: no-preference) {
128
- transition: border-color $iui-speed-fast ease-out;
129
- }
130
-
131
- > .iui-icon {
132
- @include themed {
133
- fill: t(iui-icons-color-actionable);
134
- }
135
- @media (prefers-reduced-motion: no-preference) {
136
- transition: fill $iui-speed-fast ease-out;
137
- }
138
- }
139
- }
140
-
141
- // Styles checked radio tile
142
- input:checked ~ .iui-radio-tile {
143
- padding: $iui-s - 1;
144
- z-index: 3;
145
-
146
- @include themed {
147
- border: 2px solid t(iui-color-foreground-primary);
148
- }
149
-
150
- > .iui-icon {
151
- @include themed {
152
- fill: t(iui-icons-color-primary);
153
- }
154
- }
155
-
156
- > .iui-checkmark {
157
- display: inline-block;
158
- }
159
- }
160
-
161
- // Styles disabled radio tile
162
- input:disabled ~ .iui-radio-tile {
163
- cursor: not-allowed;
164
- z-index: 0;
165
-
166
- @include themed {
167
- border-color: t(iui-color-background-disabled);
168
- background-color: t(iui-color-background-disabled);
169
- }
170
-
171
- > .iui-checkmark {
172
- @include themed {
173
- fill: t(iui-icons-color-actionable-disabled);
174
- }
175
- }
176
-
177
- > .iui-icon {
178
- @include themed {
179
- fill: t(iui-icons-color-actionable-disabled);
180
- }
181
- filter: $iui-icons-color-multicolor-disabled;
182
- }
183
-
184
- > .iui-label {
185
- @include themed {
186
- color: t(iui-text-color-muted);
187
- }
188
- }
189
- }
190
-
191
- // Styles disabled checked radio tile
192
- input:disabled:checked ~ .iui-radio-tile {
193
- z-index: 3;
194
-
195
- @include themed {
196
- border: 2px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
197
- }
198
- }
199
- }
200
- }