@itwin/itwinui-css 0.58.0 → 0.59.2

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.
@@ -8,6 +8,7 @@
8
8
  @include iui-reset;
9
9
  display: flex;
10
10
  flex-direction: column;
11
+ isolation: isolate;
11
12
 
12
13
  * {
13
14
  box-sizing: border-box;
@@ -16,29 +17,39 @@
16
17
  @include iui-table-cell-icon;
17
18
  }
18
19
 
19
- @mixin iui-table-header {
20
- user-select: none;
20
+ @mixin iui-table-header-wrapper {
21
21
  overflow: hidden;
22
22
  // Fix for Firefox columns misalignment
23
23
  @supports not (overflow: overlay) {
24
24
  overflow-y: scroll;
25
25
  }
26
+ display: flex;
27
+ flex-shrink: 0;
28
+ }
29
+
30
+ @mixin iui-table-header {
31
+ display: flex;
32
+ user-select: none;
33
+ min-width: 100%;
26
34
  flex-shrink: 0;
27
- @include themed {
28
- background-color: t(iui-color-background-3);
29
- }
30
35
 
31
36
  .iui-row {
32
37
  display: flex;
33
38
  flex-grow: 1;
34
- border-left: solid 1px transparent;
35
- border-right: solid 1px transparent;
39
+ min-width: 100%;
40
+ }
41
+
42
+ .iui-cell {
43
+ min-height: $iui-baseline * 5;
44
+ @include themed {
45
+ background-color: t(iui-color-background-3);
46
+ }
36
47
  }
37
48
 
38
49
  .iui-cell:not(.iui-slot) {
39
50
  @include iui-focus;
40
- flex-wrap: wrap;
41
51
  column-gap: $iui-xs;
52
+ padding-block: $iui-baseline * 0.5;
42
53
 
43
54
  &.iui-actionable {
44
55
  cursor: pointer;
@@ -48,12 +59,8 @@
48
59
  cursor: grabbing;
49
60
  }
50
61
 
51
- .iui-filter-button {
52
- margin-right: $iui-s;
53
-
54
- &:not(.iui-active) {
55
- visibility: hidden;
56
- }
62
+ .iui-filter-button:not(.iui-active) {
63
+ visibility: hidden;
57
64
  }
58
65
 
59
66
  > .iui-resizer {
@@ -160,6 +167,17 @@
160
167
  display: flex;
161
168
  flex-grow: 1;
162
169
  align-items: center;
170
+ flex-wrap: wrap;
171
+ justify-content: flex-end;
172
+ margin-right: $iui-sm;
173
+
174
+ .iui-cell-end-icon {
175
+ // Hardcoded size of the borderless button so that the icons are centered
176
+ width: 28px;
177
+ height: 28px;
178
+ margin-right: initial;
179
+ margin-left: auto;
180
+ }
163
181
  }
164
182
 
165
183
  @mixin iui-table-body {
@@ -175,7 +193,7 @@
175
193
  background-color: t(iui-color-background-1);
176
194
  }
177
195
 
178
- &.iui-zebra-striping .iui-row:nth-child(even):not(.iui-selected) {
196
+ &.iui-zebra-striping .iui-row:nth-child(even):not(.iui-selected) .iui-cell {
179
197
  @include themed {
180
198
  background-color: rgba(t(iui-color-foreground-body-rgb), 0.02);
181
199
  }
@@ -184,12 +202,21 @@
184
202
  .iui-row {
185
203
  min-width: 100%;
186
204
  display: flex;
187
- border: solid 1px transparent;
188
- @media (prefers-reduced-motion: no-preference) {
189
- transition: border $iui-speed-fast ease-out;
190
- }
191
- @include themed {
192
- border-bottom-color: t(iui-color-background-border);
205
+
206
+ .iui-cell {
207
+ border-top: solid 1px transparent;
208
+ border-bottom: solid 1px transparent;
209
+ @media (prefers-reduced-motion: no-preference) {
210
+ transition: border $iui-speed-fast ease-out;
211
+ }
212
+
213
+ @include themed {
214
+ border-bottom-color: t(iui-color-background-border);
215
+ }
216
+
217
+ @include themed {
218
+ background-color: t(iui-color-background-1);
219
+ }
193
220
  }
194
221
 
195
222
  > .iui-slot > .iui-more-options {
@@ -197,9 +224,13 @@
197
224
  }
198
225
 
199
226
  &:hover:not(.iui-disabled) {
200
- &:not(.iui-expanded-content) {
227
+ .iui-cell {
201
228
  @include themed {
202
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
229
+ background: linear-gradient(
230
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
231
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
232
+ ),
233
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
203
234
  }
204
235
  }
205
236
 
@@ -220,9 +251,12 @@
220
251
 
221
252
  &.iui-row-expanded {
222
253
  overflow: hidden;
223
- @include themed {
224
- border-left-color: t(iui-color-background-4);
225
- border-right-color: t(iui-color-background-4);
254
+
255
+ .iui-cell {
256
+ @include themed {
257
+ border-left-color: t(iui-color-background-4);
258
+ border-right-color: t(iui-color-background-4);
259
+ }
226
260
  border-bottom-color: transparent;
227
261
  }
228
262
 
@@ -240,36 +274,47 @@
240
274
 
241
275
  &.iui-expanded-content {
242
276
  overflow: hidden;
277
+ border-left: 1px solid transparent;
278
+ border-right: 1px solid transparent;
279
+ @include themed {
280
+ border-bottom: 1px solid t(iui-color-background-border);
281
+ }
243
282
  @include iui-transition-group;
244
283
  }
245
284
 
246
285
  // #region Selection
247
- &:not(.iui-selected) + .iui-selected,
248
- &.iui-selected:first-child {
286
+ &:not(.iui-selected) + .iui-selected .iui-cell,
287
+ &.iui-selected:first-child .iui-cell {
249
288
  border-bottom-color: transparent;
250
289
  }
251
290
 
252
291
  &.iui-selected {
253
- @include themed {
254
- border-color: t(iui-color-foreground-primary);
255
- background: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
292
+ .iui-cell {
293
+ @include themed {
294
+ border-color: t(iui-color-foreground-primary);
295
+ background: linear-gradient(
296
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
297
+ rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
298
+ ),
299
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
300
+ }
256
301
  }
257
302
 
258
- + .iui-selected {
303
+ + .iui-selected .iui-cell {
259
304
  border-bottom-color: transparent;
260
305
  @include themed {
261
306
  border-top-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
262
307
  }
263
308
  }
264
309
 
265
- &:last-child {
310
+ &:last-child .iui-cell {
266
311
  @include themed {
267
312
  border-bottom-color: t(iui-color-foreground-primary);
268
313
  }
269
314
  }
270
315
 
271
- + :not(.iui-selected),
272
- + .iui-expanded-content + :not(.iui-selected) {
316
+ + :not(.iui-selected) .iui-cell,
317
+ + .iui-expanded-content + .iui-row:not(.iui-selected) .iui-cell {
273
318
  @include themed {
274
319
  border-top-color: t(iui-color-foreground-primary);
275
320
  }
@@ -357,12 +402,20 @@
357
402
  display: flex;
358
403
  flex-grow: 1;
359
404
  min-width: $iui-xxl;
360
- min-height: $iui-baseline * 5;
405
+ min-height: $iui-baseline * 5 + 2px; // +2px for border
361
406
  padding-left: $iui-m;
362
407
  flex-basis: $iui-xxl;
363
408
  position: relative;
364
409
  word-break: break-word;
365
410
 
411
+ &:first-of-type {
412
+ border-left: solid 1px transparent;
413
+ }
414
+
415
+ &:last-of-type {
416
+ border-right: solid 1px transparent;
417
+ }
418
+
366
419
  &.iui-slot {
367
420
  width: $iui-l * 2;
368
421
  padding: 0;
@@ -374,6 +427,13 @@
374
427
  flex-basis: $iui-l * 2;
375
428
  }
376
429
 
430
+ &.iui-cell-sticky {
431
+ position: sticky;
432
+ z-index: 1;
433
+ left: var(--iui-table-sticky-left, initial);
434
+ right: var(--iui-table-sticky-right, initial);
435
+ }
436
+
377
437
  &:not(.iui-slot):last-child {
378
438
  padding-right: $iui-m;
379
439
  }
@@ -409,7 +469,7 @@
409
469
  }
410
470
 
411
471
  @mixin iui-table-row-status($status) {
412
- &,
472
+ .iui-cell:first-of-type,
413
473
  + .iui-expanded-content {
414
474
  @include themed {
415
475
  box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-#{$status});
@@ -427,7 +487,11 @@
427
487
 
428
488
  @mixin iui-table-cell-status($status) {
429
489
  @include themed {
430
- background-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-6));
490
+ background: linear-gradient(
491
+ rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-6)),
492
+ rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-6))
493
+ ),
494
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
431
495
  }
432
496
 
433
497
  @include iui-text-selection($status);
@@ -459,3 +523,32 @@
459
523
  margin-left: auto;
460
524
  }
461
525
  }
526
+
527
+ @mixin iui-table-cell-shadow-base {
528
+ position: absolute;
529
+ top: -1px;
530
+ bottom: -1px;
531
+ width: $iui-l;
532
+ pointer-events: none;
533
+
534
+ // Prevents scrollbar from appearing because `top: -1px` and `bottom: -1px`
535
+ // makes content to overflow
536
+ @at-root .iui-table-header & {
537
+ top: 0;
538
+ bottom: 0;
539
+ }
540
+ }
541
+
542
+ @mixin iui-table-cell-shadow-left {
543
+ @include iui-table-cell-shadow-base;
544
+ left: 0;
545
+ transform: translate(-100%);
546
+ box-shadow: inset -10px 0 5px -10px $iui-elevation-color;
547
+ }
548
+
549
+ @mixin iui-table-cell-shadow-right {
550
+ @include iui-table-cell-shadow-base;
551
+ right: 0;
552
+ transform: translate(100%);
553
+ box-shadow: inset 10px 0 5px -10px $iui-elevation-color;
554
+ }
package/src/index.scss ADDED
@@ -0,0 +1,45 @@
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 './alert/index';
5
+ @import './anchor/index';
6
+ @import './badge/index';
7
+ @import './blockquote/index';
8
+ @import './breadcrumbs/index';
9
+ @import './button/index';
10
+ @import './carousel/index';
11
+ @import './code/index';
12
+ @import './color-picker/index';
13
+ @import './date-picker/index';
14
+ @import './dialog/index';
15
+ @import './expandable-block/index';
16
+ @import './file-upload/index';
17
+ @import './footer/index';
18
+ @import './header/index';
19
+ @import './icon/index';
20
+ @import './information-panel/index';
21
+ @import './inputs/index';
22
+ @import './keyboard/index';
23
+ @import './location-marker/index';
24
+ @import './menu/index';
25
+ @import './non-ideal-state/index';
26
+ @import './notification-marker/index';
27
+ @import './popover/index';
28
+ @import './progress-indicator/index';
29
+ @import './radio-tile/index';
30
+ @import './side-navigation/index';
31
+ @import './skip-to-content/index';
32
+ @import './slider/index';
33
+ @import './surface/index';
34
+ @import './table/index';
35
+ @import './tabs/index';
36
+ @import './tag/index';
37
+ @import './text/index';
38
+ @import './tile/index';
39
+ @import './time-picker/index';
40
+ @import './toast-notification/index';
41
+ @import './toggle-switch/index';
42
+ @import './tooltip/index';
43
+ @import './tree/index';
44
+ @import './user-icon/index';
45
+ @import './wizard/index';