@itwin/itwinui-css 0.39.0 → 0.41.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 (40) hide show
  1. package/css/all.css +525 -280
  2. package/css/breadcrumbs.css +31 -15
  3. package/css/button.css +228 -137
  4. package/css/code.css +2 -0
  5. package/css/header.css +34 -16
  6. package/css/inputs.css +34 -44
  7. package/css/side-navigation.css +27 -24
  8. package/css/table.css +11 -3
  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 +3 -3
  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 +5 -0
  25. package/scss/classes.scss +1 -0
  26. package/scss/code/codeblock.scss +4 -0
  27. package/scss/header/header.scss +22 -10
  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 -6
  32. package/scss/inputs/labeled-inputs.scss +13 -5
  33. package/scss/side-navigation/side-navigation.scss +27 -22
  34. package/scss/table/paginator.scss +9 -1
  35. package/scss/table/table.scss +6 -2
  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
@@ -44,4 +44,9 @@
44
44
  background-color: transparent;
45
45
  }
46
46
  }
47
+
48
+ &[disabled],
49
+ &:disabled {
50
+ @include iui-button-disabled;
51
+ }
47
52
  }
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
  }
@@ -376,7 +388,7 @@
376
388
  }
377
389
 
378
390
  // Blue text
379
- .iui-label {
391
+ .iui-button-label {
380
392
  @include themed {
381
393
  color: t(iui-color-foreground-primary);
382
394
  }
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
  }
@@ -38,10 +38,6 @@
38
38
 
39
39
  .iui-input-label {
40
40
  @include iui-input-label;
41
-
42
- &.iui-inline {
43
- @include iui-input-label-inline;
44
- }
45
41
  }
46
42
 
47
43
  .iui-input {
@@ -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;
@@ -164,7 +164,8 @@
164
164
 
165
165
  &.iui-required {
166
166
  &::after {
167
- content: ' *';
167
+ content: '*';
168
+ margin-left: $iui-xs;
168
169
  @include themed {
169
170
  color: t(iui-color-foreground-negative);
170
171
  }
@@ -192,10 +193,17 @@
192
193
  }
193
194
 
194
195
  /// Independent label outside the grid.
196
+ /// Supports .iui-inline modifier to place it inline.
195
197
  @mixin iui-input-label {
196
198
  @include iui-input-label-styling;
197
199
  @include iui-input-label-cursor;
198
- display: inline-block;
200
+ display: block;
201
+
202
+ &.iui-inline {
203
+ @include iui-input-label-inline;
204
+ display: inline-flex;
205
+ align-items: center;
206
+ }
199
207
  }
200
208
 
201
209
  /// Message shown below input
@@ -71,12 +71,13 @@
71
71
  > .iui-sidenav-content {
72
72
  max-width: $iui-3xl * 3;
73
73
 
74
- > .iui-sidenav-button.iui-expand > .iui-icon {
74
+ > .iui-sidenav-button.iui-expand > .iui-button-icon {
75
75
  transform: scaleX(-1);
76
76
  }
77
77
  }
78
78
 
79
79
  .iui-sidenav-button {
80
+ gap: $iui-icons-large;
80
81
  border-radius: 0;
81
82
  border-left: none;
82
83
  border-right: none;
@@ -91,44 +92,52 @@
91
92
  }
92
93
  }
93
94
 
95
+ > .iui-button-label {
96
+ white-space: nowrap;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ }
100
+
94
101
  &,
95
- &:enabled:hover,
102
+ &:hover,
96
103
  &[disabled],
97
- &:focus-visible {
104
+ &:focus {
98
105
  @include themed {
99
106
  border-color: t(iui-color-background-5);
100
107
  }
101
108
  }
102
109
 
103
- > .iui-icon:not(.iui-user-icon) {
110
+ // Overriding border from default button
111
+ &:focus:not(:focus-visible) {
112
+ @include themed {
113
+ border-color: t(iui-color-background-5);
114
+ }
115
+ }
116
+
117
+ > .iui-button-icon:not(.iui-user-icon) {
104
118
  width: $iui-icons-large;
105
119
  height: $iui-icons-large;
106
120
  flex-shrink: 0;
107
-
108
- + .iui-label {
109
- margin-left: $iui-icons-large;
110
- white-space: nowrap;
111
- overflow: hidden;
112
- text-overflow: ellipsis;
113
- }
114
121
  }
115
122
 
116
- &.iui-submenu-open .iui-icon {
123
+ &.iui-submenu-open .iui-button-icon {
117
124
  @include themed {
118
125
  fill: t(iui-color-foreground-primary);
119
126
  }
120
127
  }
121
128
 
122
129
  &.iui-active {
123
- &:focus,
124
- &:focus-visible {
130
+ @include themed {
131
+ box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
132
+ }
133
+
134
+ &:focus {
125
135
  @include themed {
126
136
  box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3)),
127
137
  inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
128
138
  }
129
139
  }
130
140
 
131
- &,
132
141
  &:focus:not(:focus-visible) {
133
142
  @include themed {
134
143
  box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
@@ -136,7 +145,8 @@
136
145
  }
137
146
  }
138
147
 
139
- &[disabled] {
148
+ &[disabled],
149
+ &:disabled {
140
150
  @include themed {
141
151
  background-color: t(iui-color-background-2);
142
152
  }
@@ -153,11 +163,6 @@
153
163
  box-shadow: none;
154
164
  }
155
165
 
156
- &:focus-visible {
157
- outline: 0;
158
- box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3));
159
- }
160
-
161
166
  &.iui-expand {
162
167
  height: $iui-line-height;
163
168
  justify-content: center;
@@ -166,7 +171,7 @@
166
171
  border-bottom: 1px solid t(iui-color-background-5);
167
172
  }
168
173
 
169
- > .iui-icon {
174
+ > .iui-button-icon {
170
175
  @include iui-icons-small;
171
176
  @media (prefers-reduced-motion: no-preference) {
172
177
  transition: transform $iui-speed ease-out;
@@ -3,12 +3,13 @@
3
3
  @import '../style/index';
4
4
  @import '../icon/index';
5
5
  @import '../button/index';
6
+ @import '../text/index';
6
7
  @import './variables';
7
8
 
8
9
  @mixin iui-paginator {
9
10
  @include iui-reset;
10
11
  display: flex;
11
- justify-content: space-around;
12
+ justify-content: space-between;
12
13
  align-items: center;
13
14
  min-height: $iui-baseline * 5;
14
15
  padding: 0 $iui-m;
@@ -70,4 +71,11 @@
70
71
  > .iui-right {
71
72
  justify-content: flex-end;
72
73
  }
74
+
75
+ &-page-size-label {
76
+ @include iui-text-muted;
77
+ white-space: nowrap;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
73
81
  }
@@ -164,7 +164,7 @@
164
164
  visibility: visible;
165
165
  }
166
166
 
167
- .iui-row-expander > .iui-icon {
167
+ .iui-row-expander > .iui-button-icon {
168
168
  @media (prefers-reduced-motion: no-preference) {
169
169
  transition: transform $iui-speed-fast ease-out;
170
170
  }
@@ -178,7 +178,7 @@
178
178
  border-bottom-color: transparent;
179
179
  }
180
180
 
181
- .iui-row-expander > .iui-icon {
181
+ .iui-row-expander > .iui-button-icon {
182
182
  transform: rotate(90deg);
183
183
  }
184
184
 
@@ -325,6 +325,10 @@
325
325
  flex-basis: $iui-l * 2;
326
326
  }
327
327
 
328
+ &:not(.iui-slot):last-child {
329
+ padding-right: $iui-m;
330
+ }
331
+
328
332
  &.iui-positive {
329
333
  @include iui-table-cell-status($status: positive);
330
334
  }
@@ -35,6 +35,7 @@
35
35
  > .iui-type-indicator,
36
36
  > .iui-quick-action {
37
37
  @include iui-button-borderless;
38
+ @include iui-button-size(small, borderless);
38
39
  position: absolute;
39
40
  border-radius: 50%;
40
41
  top: round($iui-baseline * 0.5);
@@ -107,7 +108,7 @@
107
108
  > .iui-picture + .iui-button + .iui-button {
108
109
  @include iui-blur($opacity: 5);
109
110
 
110
- &:enabled > .iui-icon {
111
+ &:enabled > .iui-button-icon {
111
112
  @include themed() {
112
113
  fill: t(iui-color-foreground-accessory);
113
114
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, t(iui-opacity-5)));
@@ -122,7 +123,7 @@
122
123
  background-color: rgba(0, 0, 0, t(iui-opacity-4));
123
124
  }
124
125
 
125
- > .iui-icon {
126
+ .iui-button-icon {
126
127
  @include themed() {
127
128
  fill: t(iui-color-foreground-accessory);
128
129
  }
@@ -206,6 +207,7 @@
206
207
  }
207
208
 
208
209
  > .iui-more-options {
210
+ @include iui-button-size(small, borderless);
209
211
  position: absolute;
210
212
  bottom: $iui-baseline * 0.5;
211
213
  right: $iui-s;
@@ -0,0 +1,15 @@
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 './index';
4
+
5
+ .iui-tree {
6
+ @include iui-tree;
7
+ }
8
+
9
+ .iui-sub-tree {
10
+ @include iui-sub-tree;
11
+ }
12
+
13
+ .iui-tree-node {
14
+ @include iui-tree-node;
15
+ }
@@ -0,0 +1,3 @@
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 './tree';
@@ -0,0 +1,137 @@
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
+ $iui-active-outline: thin solid t(iui-color-foreground-primary);
7
+ $iui-expander-inline-padding: $iui-component-offset + $iui-xxs + 1px; // margin + padding + border
8
+ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding * 2); // icon width + inline padding on both sides
9
+
10
+ @mixin iui-tree {
11
+ @include iui-reset;
12
+ list-style: none;
13
+ }
14
+
15
+ @mixin iui-sub-tree {
16
+ @include iui-reset;
17
+ list-style: none;
18
+ }
19
+
20
+ @mixin iui-tree-node {
21
+ display: flex;
22
+ cursor: pointer;
23
+ padding: 0 $iui-s;
24
+
25
+ &-checkbox {
26
+ margin-right: $iui-s;
27
+ }
28
+
29
+ &-content {
30
+ display: flex;
31
+ align-items: center;
32
+ box-sizing: border-box;
33
+ min-height: $iui-baseline * 3;
34
+ margin-left: calc(#{$iui-expander-button-width} * (var(--level, 0)));
35
+ overflow: hidden;
36
+ padding-left: $iui-xxs;
37
+
38
+ &-icon {
39
+ @include iui-icons-default;
40
+ padding: 0 $iui-expander-inline-padding;
41
+ flex-shrink: 0;
42
+
43
+ &:first-child {
44
+ margin-left: $iui-expander-button-width;
45
+ }
46
+ }
47
+
48
+ &-expander-icon {
49
+ @media (prefers-reduced-motion: no-preference) {
50
+ transition: transform $iui-speed-fast ease-out;
51
+ }
52
+
53
+ &-expanded {
54
+ transform: rotate(90deg);
55
+ }
56
+ }
57
+
58
+ &-label {
59
+ min-width: 0;
60
+ padding-left: $iui-expander-inline-padding;
61
+
62
+ &:first-child {
63
+ margin-left: $iui-expander-button-width;
64
+ }
65
+ }
66
+
67
+ &-title,
68
+ &-caption {
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ }
73
+
74
+ &-title {
75
+ font-size: $iui-font-size;
76
+ }
77
+
78
+ &-caption {
79
+ font-size: $iui-font-size-small;
80
+ @include themed {
81
+ color: t(iui-text-color-muted);
82
+ }
83
+ }
84
+ }
85
+
86
+ &:focus {
87
+ @include themed {
88
+ outline: thin solid rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
89
+ outline-offset: -1px;
90
+ }
91
+ }
92
+
93
+ &:focus:not(:focus-visible) {
94
+ outline-offset: -2px;
95
+ }
96
+
97
+ &:hover {
98
+ @include themed {
99
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
100
+ }
101
+
102
+ .iui-tree-node-content-caption {
103
+ @include themed {
104
+ color: t(iui-color-foreground-body);
105
+ }
106
+ transition: color $iui-speed-fast ease;
107
+ }
108
+ }
109
+
110
+ &.iui-active {
111
+ @include themed {
112
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5));
113
+ outline: $iui-active-outline;
114
+ outline-offset: -1px;
115
+ }
116
+
117
+ &:focus {
118
+ outline-width: $iui-xxs;
119
+ outline-offset: -2px;
120
+ }
121
+ }
122
+
123
+ &.iui-disabled {
124
+ cursor: not-allowed;
125
+ outline: none;
126
+ background-color: transparent;
127
+ @include themed {
128
+ color: t(iui-text-color-placeholder);
129
+ }
130
+
131
+ .iui-tree-node-content-caption {
132
+ @include themed {
133
+ color: t(iui-text-color-placeholder);
134
+ }
135
+ }
136
+ }
137
+ }
@@ -70,6 +70,9 @@
70
70
  height: 100%;
71
71
  border-width: 0;
72
72
  border-radius: 50%;
73
+ @include themed {
74
+ background-color: t(iui-color-background-1);
75
+ }
73
76
  }
74
77
 
75
78
  > .iui-status {