@itwin/itwinui-css 0.44.2 → 0.47.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 (47) hide show
  1. package/css/all.css +870 -744
  2. package/css/badge.css +4 -2
  3. package/css/button.css +31 -96
  4. package/css/carousel.css +97 -0
  5. package/css/color-picker.css +11 -8
  6. package/css/expandable-block.css +12 -0
  7. package/css/inputs.css +216 -224
  8. package/css/popover.css +12 -0
  9. package/css/side-navigation.css +2 -4
  10. package/css/skip-to-content.css +51 -0
  11. package/css/table.css +11 -50
  12. package/css/tile.css +368 -301
  13. package/css/tree.css +19 -14
  14. package/package.json +2 -2
  15. package/scss/badge/badge.scss +5 -2
  16. package/scss/button/button-group.scss +19 -41
  17. package/scss/button/button.scss +19 -1
  18. package/scss/button/classes.scss +0 -1
  19. package/scss/button/default.scss +1 -0
  20. package/scss/carousel/carousel.scss +119 -0
  21. package/scss/carousel/classes.scss +15 -0
  22. package/scss/carousel/index.scss +3 -0
  23. package/scss/classes.scss +3 -0
  24. package/scss/color-picker/color-picker.scss +13 -6
  25. package/scss/expandable-block/block.scss +23 -0
  26. package/scss/index.scss +3 -0
  27. package/scss/inputs/classes.scss +15 -9
  28. package/scss/inputs/index.scss +1 -0
  29. package/scss/inputs/input-with-icon.scss +36 -0
  30. package/scss/inputs/input.scss +1 -0
  31. package/scss/inputs/labeled-inputs.scss +47 -12
  32. package/scss/inputs/select.scss +44 -93
  33. package/scss/popover/classes.scss +7 -0
  34. package/scss/popover/index.scss +3 -0
  35. package/scss/popover/popover.scss +23 -0
  36. package/scss/side-navigation/side-navigation.scss +3 -6
  37. package/scss/skip-to-content/classes.scss +7 -0
  38. package/scss/skip-to-content/index.scss +3 -0
  39. package/scss/skip-to-content/skip-to-content.scss +36 -0
  40. package/scss/style/mixins.scss +29 -4
  41. package/scss/style/variables.scss +1 -0
  42. package/scss/table/paginator.scss +5 -10
  43. package/scss/table/table.scss +1 -1
  44. package/scss/tile/classes.scss +32 -0
  45. package/scss/tile/tile.scss +231 -235
  46. package/scss/tree/classes.scss +4 -0
  47. package/scss/tree/tree.scss +16 -4
@@ -11,309 +11,305 @@
11
11
  width: $iui-3xl * 3;
12
12
  box-shadow: $iui-elevation-2;
13
13
  backface-visibility: hidden;
14
-
14
+ @include iui-focus($offset: $iui-xxs, $thickness: $iui-xxs);
15
15
  @include themed() {
16
16
  background-color: t(iui-color-background-1);
17
17
  color: t(iui-text-color);
18
18
  }
19
19
 
20
- .iui-thumbnail {
21
- width: 100%;
22
- height: $iui-baseline * 14;
23
- flex-shrink: 0;
24
- overflow: hidden;
25
- position: relative;
26
- display: flex;
27
- align-items: center;
28
- justify-content: center;
29
-
30
- @include themed() {
31
- background-color: t(iui-color-background-1-overlay);
32
- border-bottom: 1px solid t(iui-color-background-4);
33
- }
34
-
35
- > .iui-type-indicator,
36
- > .iui-quick-action {
37
- @include iui-button-borderless;
38
- @include iui-button-size(small, borderless);
20
+ &:hover,
21
+ &:focus-within {
22
+ .iui-tile-more-options {
23
+ @include visually-hidden-revert;
39
24
  position: absolute;
40
- border-radius: 50%;
41
- top: round($iui-baseline * 0.5);
42
25
  }
43
26
 
44
- > .iui-type-indicator {
45
- left: $iui-s;
27
+ .iui-tile-metadata:not(:last-child) {
28
+ width: calc(100% - #{$iui-xl});
46
29
  }
47
30
 
48
- > .iui-quick-action {
49
- right: $iui-s;
31
+ .iui-tile-thumbnail-picture {
32
+ transform: translateZ(0) scale(1.1);
50
33
  }
34
+ }
51
35
 
52
- > .iui-badge-container {
53
- position: absolute;
54
- bottom: round($iui-baseline * 0.5);
55
- width: calc(100% - 2 * #{$iui-sm});
56
- height: auto;
57
- right: $iui-sm;
58
- display: flex;
59
- justify-content: flex-end;
60
- overflow: hidden;
36
+ &.iui-new {
37
+ .iui-tile-name,
38
+ .iui-tile-description {
39
+ font-weight: $iui-font-weight-semibold;
40
+ }
41
+ }
61
42
 
62
- > .iui-badge:not(:last-child) {
63
- margin-right: $iui-xs;
64
- }
43
+ &.iui-selected {
44
+ @include iui-focus($offset: 0, $thickness: $iui-xs);
45
+ @include themed() {
46
+ outline: solid 2px t(iui-color-foreground-primary);
47
+ background: linear-gradient(
48
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
49
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
50
+ ),
51
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
65
52
  }
66
53
 
67
- .iui-thumbnail-icon {
68
- @include iui-icons-3xl;
54
+ .iui-tile-thumbnail-picture {
55
+ transform: translateZ(0) scale(1.1);
69
56
  }
57
+ }
70
58
 
71
- > .iui-picture ~ .iui-thumbnail-icon {
72
- z-index: 1;
73
- cursor: pointer;
74
- @media (prefers-reduced-motion: no-preference) {
75
- transition: fill $iui-speed-fast ease;
76
- }
59
+ &.iui-folder {
60
+ display: inline-flex;
61
+ flex-direction: row;
62
+ flex-wrap: nowrap;
63
+
64
+ .iui-tile-thumbnail {
65
+ height: $iui-baseline * 10;
66
+ flex: 1;
67
+ border-bottom: none;
77
68
  @include themed() {
78
- fill: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-3));
79
- filter: drop-shadow(0 2px 1px rgba(0, 1, 5, t(iui-opacity-5)));
69
+ border-right: 1px solid t(iui-color-background-4);
80
70
  }
71
+ }
81
72
 
82
- &:hover {
83
- @include themed() {
84
- fill: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-2));
85
- }
86
- }
73
+ .iui-tile-content {
74
+ flex: 2;
87
75
  }
88
76
 
89
- > .iui-picture {
90
- width: 100%;
77
+ .iui-tile-description {
91
78
  height: 100%;
92
- @media (prefers-reduced-motion: no-preference) {
93
- transition: transform $iui-speed ease;
94
- }
95
- position: absolute;
96
- top: 0;
97
- left: 0;
98
-
99
- @at-root {
100
- div#{&} {
101
- background-position: center;
102
- background-size: cover;
103
- }
104
- }
79
+ max-height: $iui-baseline * 4;
80
+ margin-bottom: 0;
81
+ -webkit-line-clamp: 2;
105
82
  }
83
+ }
84
+ }
106
85
 
107
- > .iui-picture + .iui-button,
108
- > .iui-picture + .iui-button + .iui-button {
109
- @include iui-blur($opacity: 5);
110
-
111
- &:enabled > .iui-button-icon {
112
- @include themed() {
113
- fill: t(iui-color-foreground-accessory);
114
- filter: drop-shadow(0 2px 1px rgba(0, 0, 0, t(iui-opacity-5)));
115
- }
116
- }
117
-
118
- &:hover,
119
- &.iui-active:enabled,
120
- &.iui-active:enabled:hover,
121
- &.iui-active:active {
122
- @include themed() {
123
- background-color: rgba(0, 0, 0, t(iui-opacity-4));
124
- }
86
+ @mixin iui-tile-content {
87
+ padding: $iui-baseline $iui-sm;
88
+ position: relative;
89
+ display: flex;
90
+ flex-direction: column;
91
+ flex-grow: 2;
92
+ min-width: 0;
125
93
 
126
- .iui-button-icon {
127
- @include themed() {
128
- fill: t(iui-color-foreground-accessory);
129
- }
130
- }
131
- }
94
+ .iui-tile-name {
95
+ display: flex;
96
+ flex-shrink: 0;
97
+ align-items: center;
98
+ font-size: $iui-font-size-leading;
99
+ user-select: all;
100
+ margin-bottom: $iui-baseline * 0.5;
101
+ @include themed() {
102
+ color: t(iui-text-color);
132
103
  }
133
104
  }
134
105
 
135
- > .iui-content {
136
- padding: $iui-baseline $iui-sm;
137
- position: relative;
138
- display: flex;
139
- flex-direction: column;
140
- flex-grow: 2;
141
- min-width: 0;
142
-
143
- > .iui-name {
144
- display: flex;
145
- flex-shrink: 0;
146
- align-items: center;
147
- font-size: $iui-font-size-leading;
148
- user-select: all;
149
- margin-bottom: $iui-baseline * 0.5;
150
-
151
- @include themed() {
152
- color: t(iui-text-color);
153
- }
106
+ .iui-tile-status-icon {
107
+ @include iui-icons-default;
108
+ margin-right: $iui-s;
109
+ flex-shrink: 0;
110
+ }
154
111
 
155
- .iui-tile-status-icon {
156
- @include iui-icons-default;
157
- margin-right: $iui-s;
158
- flex-shrink: 0;
159
- }
112
+ .iui-tile-name-label {
113
+ overflow: hidden;
114
+ white-space: nowrap;
115
+ text-overflow: ellipsis;
116
+ }
160
117
 
161
- > .iui-name-label {
162
- overflow: hidden;
163
- white-space: nowrap;
164
- text-overflow: ellipsis;
165
- }
118
+ .iui-tile-description {
119
+ margin-bottom: $iui-baseline;
120
+ font-size: $iui-font-size;
121
+ height: 100%;
122
+ max-height: $iui-baseline * 6;
123
+ @include iui-line-clamp(3);
124
+ @include themed() {
125
+ color: t(iui-text-color-muted);
166
126
  }
127
+ }
167
128
 
168
- > .iui-description {
169
- margin-bottom: $iui-baseline;
170
- font-size: $iui-font-size;
171
- height: 100%;
172
- max-height: $iui-baseline * 6;
173
-
174
- @include iui-line-clamp(3);
175
- @include themed() {
176
- color: t(iui-text-color-muted);
177
- }
129
+ .iui-tile-metadata {
130
+ font-size: $iui-font-size-small;
131
+ flex-shrink: 0;
132
+ overflow: hidden;
133
+ text-overflow: ellipsis;
134
+ height: $iui-line-height;
135
+ width: 100%;
136
+ display: flex;
137
+ align-items: center;
138
+ margin-top: auto;
139
+ @include themed() {
140
+ color: t(iui-text-color-muted);
178
141
  }
179
142
 
180
- > .iui-metadata {
181
- font-size: $iui-font-size-small;
143
+ > svg,
144
+ .iui-tile-metadata-icon {
145
+ @include iui-icons-default;
146
+ margin-right: $iui-s;
182
147
  flex-shrink: 0;
148
+ }
149
+
150
+ > * {
151
+ white-space: nowrap;
183
152
  overflow: hidden;
184
153
  text-overflow: ellipsis;
185
- height: $iui-line-height;
186
- width: 100%;
187
- display: flex;
188
- align-items: center;
189
- margin-top: auto;
154
+ }
155
+ }
156
+ }
190
157
 
191
- @include themed() {
192
- color: t(iui-text-color-muted);
193
- }
158
+ @mixin iui-tile-thumbnail {
159
+ width: 100%;
160
+ height: $iui-baseline * 14;
161
+ flex-shrink: 0;
162
+ overflow: hidden;
163
+ position: relative;
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: center;
167
+ @include themed() {
168
+ background-color: t(iui-color-background-1-overlay);
169
+ border-bottom: 1px solid t(iui-color-background-4);
170
+ }
194
171
 
195
- > svg,
196
- .iui-metadata-icon {
197
- @include iui-icons-default;
198
- margin-right: $iui-s;
199
- flex-shrink: 0;
200
- }
172
+ .iui-thumbnail-icon {
173
+ @include iui-icons-3xl;
174
+ }
175
+ }
201
176
 
202
- > * {
203
- white-space: nowrap;
204
- overflow: hidden;
205
- text-overflow: ellipsis;
206
- }
177
+ @mixin iui-tile-thumbnail-picture {
178
+ width: 100%;
179
+ height: 100%;
180
+ position: absolute;
181
+ top: 0;
182
+ left: 0;
183
+ @media (prefers-reduced-motion: no-preference) {
184
+ transition: transform $iui-speed ease;
185
+ }
186
+ @at-root {
187
+ div#{&} {
188
+ background-position: center;
189
+ background-size: cover;
207
190
  }
191
+ }
208
192
 
209
- > .iui-more-options {
210
- @include iui-button-size(small, borderless);
211
- position: absolute;
212
- bottom: $iui-baseline * 0.5;
213
- right: $iui-s;
214
- visibility: hidden;
193
+ ~ .iui-thumbnail-icon {
194
+ z-index: 1;
195
+ cursor: pointer;
196
+ @media (prefers-reduced-motion: no-preference) {
197
+ transition: fill $iui-speed-fast ease;
198
+ }
199
+ @include themed() {
200
+ fill: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-3));
201
+ filter: drop-shadow(0 2px 1px rgba(0, 1, 5, t(iui-opacity-5)));
202
+ }
215
203
 
216
- &.iui-visible {
217
- visibility: visible;
204
+ &:hover {
205
+ @include themed() {
206
+ fill: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-2));
218
207
  }
219
208
  }
220
209
  }
221
210
 
222
- .iui-tile-buttons {
223
- display: flex;
224
- flex-shrink: 0;
225
- user-select: none;
226
- white-space: nowrap;
227
-
228
- > .iui-button {
229
- font-size: $iui-font-size;
230
- flex: 1;
231
- height: auto;
232
- padding: $iui-baseline $iui-sm;
233
- overflow: hidden;
234
- white-space: nowrap;
235
- text-overflow: ellipsis;
236
- text-align: center;
237
- margin: 0;
238
- border: initial;
239
- border-radius: 0;
211
+ ~ .iui-tile-thumbnail-type-indicator,
212
+ ~ .iui-tile-thumbnail-quick-action {
213
+ @include iui-blur($opacity: 5);
240
214
 
241
- &,
242
- &:hover {
243
- @include themed() {
244
- border-top: 1px solid t(iui-color-background-4);
245
- }
215
+ > .iui-button-icon {
216
+ @include themed() {
217
+ fill: t(iui-color-foreground-accessory);
218
+ filter: drop-shadow(0 2px 1px rgba(0, 0, 0, t(iui-opacity-5)));
246
219
  }
247
220
  }
248
221
 
249
- > button:not(:last-child) {
222
+ &:hover,
223
+ &.iui-active:enabled,
224
+ &.iui-active:enabled:hover,
225
+ &.iui-active:active {
250
226
  @include themed() {
251
- border-right: 1px solid t(iui-color-background-4);
227
+ background-color: rgba(0, 0, 0, t(iui-opacity-4));
228
+ }
229
+
230
+ .iui-button-icon {
231
+ @include themed() {
232
+ fill: t(iui-color-foreground-accessory);
233
+ }
252
234
  }
253
235
  }
254
236
  }
237
+ }
255
238
 
256
- &:hover,
257
- &:focus-within {
258
- .iui-metadata:not(:last-child) {
259
- width: calc(100% - #{$iui-xl});
260
- }
239
+ @mixin iui-tile-thumbnail-type-indicator {
240
+ @include iui-button-borderless;
241
+ @include iui-button-size(small, borderless);
242
+ position: absolute;
243
+ border-radius: 50%;
244
+ top: round($iui-baseline * 0.5);
245
+ left: $iui-s;
246
+ }
261
247
 
262
- .iui-more-options {
263
- visibility: visible;
264
- }
248
+ @mixin iui-tile-thumbnail-quick-action {
249
+ @include iui-button-borderless;
250
+ @include iui-button-size(small, borderless);
251
+ position: absolute;
252
+ border-radius: 50%;
253
+ top: round($iui-baseline * 0.5);
254
+ right: $iui-s;
255
+ }
265
256
 
266
- .iui-picture {
267
- transform: translateZ(0) scale(1.1);
268
- }
257
+ @mixin iui-tile-thumbnail-badge {
258
+ position: absolute;
259
+ bottom: round($iui-baseline * 0.5);
260
+ width: calc(100% - 2 * #{$iui-sm});
261
+ height: auto;
262
+ right: $iui-sm;
263
+ display: flex;
264
+ justify-content: flex-end;
265
+ overflow: hidden;
266
+
267
+ > .iui-badge:not(:last-child) {
268
+ margin-right: $iui-xs;
269
269
  }
270
+ }
270
271
 
271
- &.iui-new {
272
- .iui-name,
273
- .iui-description {
274
- font-weight: $iui-font-weight-semibold;
272
+ @mixin iui-tile-buttons {
273
+ display: flex;
274
+ flex-shrink: 0;
275
+ user-select: none;
276
+ white-space: nowrap;
277
+
278
+ > .iui-button {
279
+ font-size: $iui-font-size;
280
+ flex: 1;
281
+ height: auto;
282
+ padding: $iui-baseline $iui-sm;
283
+ overflow: hidden;
284
+ white-space: nowrap;
285
+ text-overflow: ellipsis;
286
+ text-align: center;
287
+ margin: 0;
288
+ border: initial;
289
+ border-radius: 0;
290
+
291
+ &,
292
+ &:hover {
293
+ @include themed() {
294
+ border-top: 1px solid t(iui-color-background-4);
295
+ border-color: t(iui-color-background-4);
296
+ }
275
297
  }
276
298
  }
277
299
 
278
- &.iui-selected {
300
+ > button:not(:last-child) {
279
301
  @include themed() {
280
- outline: solid 2px t(iui-color-foreground-primary);
281
- background: linear-gradient(
282
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
283
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
284
- ),
285
- linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
286
- }
287
-
288
- .iui-picture {
289
- transform: translateZ(0) scale(1.1);
302
+ border-right: 1px solid t(iui-color-background-4);
290
303
  }
291
304
  }
305
+ }
292
306
 
293
- &.iui-folder {
294
- display: inline-flex;
295
- flex-direction: row;
296
- flex-wrap: nowrap;
297
-
298
- > .iui-thumbnail {
299
- height: $iui-baseline * 10;
300
- flex: 1;
301
- border-bottom: none;
302
-
303
- @include themed() {
304
- border-right: 1px solid t(iui-color-background-4);
305
- }
306
- }
307
-
308
- > .iui-content {
309
- flex: 2;
307
+ @mixin iui-tile-more-options {
308
+ position: absolute;
309
+ bottom: $iui-baseline * 0.5;
310
+ right: $iui-s;
310
311
 
311
- > .iui-description {
312
- height: 100%;
313
- max-height: $iui-baseline * 4;
314
- margin-bottom: 0;
315
- -webkit-line-clamp: 2;
316
- }
317
- }
312
+ &:not(.iui-visible) {
313
+ @include visually-hidden;
318
314
  }
319
315
  }
@@ -10,6 +10,10 @@
10
10
  @include iui-sub-tree;
11
11
  }
12
12
 
13
+ .iui-tree-item {
14
+ @include iui-tree-item;
15
+ }
16
+
13
17
  .iui-tree-node {
14
18
  @include iui-tree-node;
15
19
  }
@@ -17,6 +17,22 @@ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding
17
17
  list-style: none;
18
18
  }
19
19
 
20
+ @mixin iui-tree-item {
21
+ @include focus-visible {
22
+ outline: none;
23
+
24
+ > .iui-tree-node {
25
+ outline: 1px solid var(--iui-color-foreground-primary);
26
+ outline-offset: -1px;
27
+
28
+ &.iui-active {
29
+ outline: 2px solid var(--iui-color-foreground-primary);
30
+ outline-offset: -2px;
31
+ }
32
+ }
33
+ }
34
+ }
35
+
20
36
  @mixin iui-tree-node {
21
37
  display: flex;
22
38
  cursor: pointer;
@@ -83,8 +99,6 @@ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding
83
99
  }
84
100
  }
85
101
 
86
- @include iui-focus;
87
-
88
102
  &:hover {
89
103
  @include themed {
90
104
  background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
@@ -104,8 +118,6 @@ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding
104
118
  outline: $iui-active-outline;
105
119
  outline-offset: -1px;
106
120
  }
107
-
108
- @include iui-focus($offset: -2px, $thickness: $iui-xxs);
109
121
  }
110
122
 
111
123
  &.iui-disabled {