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