@itwin/itwinui-css 0.56.0 → 0.59.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 (39) hide show
  1. package/css/all.css +706 -346
  2. package/css/anchor.css +21 -17
  3. package/css/breadcrumbs.css +312 -57
  4. package/css/button.css +9 -12
  5. package/css/dialog.css +201 -0
  6. package/css/footer.css +1 -17
  7. package/css/global.css +1 -17
  8. package/css/information-panel.css +2 -2
  9. package/css/radio-tile.css +9 -13
  10. package/css/side-navigation.css +1 -1
  11. package/css/table.css +148 -61
  12. package/css/tag.css +1 -17
  13. package/package.json +1 -1
  14. package/scss/anchor/classes.scss +4 -0
  15. package/scss/breadcrumbs/breadcrumbs.scss +77 -18
  16. package/scss/breadcrumbs/classes.scss +12 -0
  17. package/scss/button/button.scss +17 -16
  18. package/scss/button/classes.scss +4 -0
  19. package/scss/button/cta.scss +3 -1
  20. package/scss/button/default.scss +0 -2
  21. package/scss/button/high-visibility.scss +3 -1
  22. package/scss/classes.scss +1 -1
  23. package/scss/dialog/classes.scss +47 -0
  24. package/scss/dialog/dialog.scss +213 -0
  25. package/scss/{modal → dialog}/index.scss +1 -1
  26. package/scss/index.scss +1 -1
  27. package/scss/information-panel/information-panel.scss +2 -2
  28. package/scss/radio-tile/radio-tile.scss +12 -17
  29. package/scss/side-navigation/side-navigation.scss +2 -2
  30. package/scss/style/anchor.scss +19 -16
  31. package/scss/style/elevation.scss +6 -5
  32. package/scss/table/classes.scss +16 -0
  33. package/scss/table/condensed.scss +4 -1
  34. package/scss/table/extra-condensed.scss +8 -1
  35. package/scss/table/paginator.scss +4 -0
  36. package/scss/table/table.scss +137 -37
  37. package/css/modal.css +0 -132
  38. package/scss/modal/classes.scss +0 -15
  39. package/scss/modal/modal.scss +0 -155
@@ -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,27 +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;
51
+ column-gap: $iui-xs;
52
+ padding-block: $iui-baseline * 0.5;
40
53
 
41
54
  &.iui-actionable {
42
55
  cursor: pointer;
@@ -46,13 +59,8 @@
46
59
  cursor: grabbing;
47
60
  }
48
61
 
49
- > .iui-filter-button {
50
- margin-left: $iui-xs;
51
- margin-right: $iui-s;
52
-
53
- &:not(.iui-active) {
54
- visibility: hidden;
55
- }
62
+ .iui-filter-button:not(.iui-active) {
63
+ visibility: hidden;
56
64
  }
57
65
 
58
66
  > .iui-resizer {
@@ -155,6 +163,23 @@
155
163
  }
156
164
  }
157
165
 
166
+ @mixin iui-table-header-actions-container {
167
+ display: flex;
168
+ flex-grow: 1;
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
+ }
181
+ }
182
+
158
183
  @mixin iui-table-body {
159
184
  overflow-y: scroll;
160
185
  overflow: overlay;
@@ -177,12 +202,21 @@
177
202
  .iui-row {
178
203
  min-width: 100%;
179
204
  display: flex;
180
- border: solid 1px transparent;
181
- @media (prefers-reduced-motion: no-preference) {
182
- transition: border $iui-speed-fast ease-out;
183
- }
184
- @include themed {
185
- 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
+ }
186
220
  }
187
221
 
188
222
  > .iui-slot > .iui-more-options {
@@ -190,9 +224,13 @@
190
224
  }
191
225
 
192
226
  &:hover:not(.iui-disabled) {
193
- &:not(.iui-expanded-content) {
227
+ .iui-cell {
194
228
  @include themed {
195
- 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));
196
234
  }
197
235
  }
198
236
 
@@ -213,9 +251,12 @@
213
251
 
214
252
  &.iui-row-expanded {
215
253
  overflow: hidden;
216
- @include themed {
217
- border-left-color: t(iui-color-background-4);
218
- 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
+ }
219
260
  border-bottom-color: transparent;
220
261
  }
221
262
 
@@ -233,36 +274,47 @@
233
274
 
234
275
  &.iui-expanded-content {
235
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
+ }
236
282
  @include iui-transition-group;
237
283
  }
238
284
 
239
285
  // #region Selection
240
- &:not(.iui-selected) + .iui-selected,
241
- &.iui-selected:first-child {
286
+ &:not(.iui-selected) + .iui-selected .iui-cell,
287
+ &.iui-selected:first-child .iui-cell {
242
288
  border-bottom-color: transparent;
243
289
  }
244
290
 
245
291
  &.iui-selected {
246
- @include themed {
247
- border-color: t(iui-color-foreground-primary);
248
- 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
+ }
249
301
  }
250
302
 
251
- + .iui-selected {
303
+ + .iui-selected .iui-cell {
252
304
  border-bottom-color: transparent;
253
305
  @include themed {
254
306
  border-top-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
255
307
  }
256
308
  }
257
309
 
258
- &:last-child {
310
+ &:last-child .iui-cell {
259
311
  @include themed {
260
312
  border-bottom-color: t(iui-color-foreground-primary);
261
313
  }
262
314
  }
263
315
 
264
- + :not(.iui-selected),
265
- + .iui-expanded-content + :not(.iui-selected) {
316
+ + :not(.iui-selected) .iui-cell,
317
+ + .iui-expanded-content + .iui-row:not(.iui-selected) .iui-cell {
266
318
  @include themed {
267
319
  border-top-color: t(iui-color-foreground-primary);
268
320
  }
@@ -350,12 +402,20 @@
350
402
  display: flex;
351
403
  flex-grow: 1;
352
404
  min-width: $iui-xxl;
353
- min-height: $iui-baseline * 5;
405
+ min-height: $iui-baseline * 5 + 2px; // +2px for border
354
406
  padding-left: $iui-m;
355
407
  flex-basis: $iui-xxl;
356
408
  position: relative;
357
409
  word-break: break-word;
358
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
+
359
419
  &.iui-slot {
360
420
  width: $iui-l * 2;
361
421
  padding: 0;
@@ -367,6 +427,13 @@
367
427
  flex-basis: $iui-l * 2;
368
428
  }
369
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
+
370
437
  &:not(.iui-slot):last-child {
371
438
  padding-right: $iui-m;
372
439
  }
@@ -402,7 +469,7 @@
402
469
  }
403
470
 
404
471
  @mixin iui-table-row-status($status) {
405
- &,
472
+ .iui-cell:first-of-type,
406
473
  + .iui-expanded-content {
407
474
  @include themed {
408
475
  box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-#{$status});
@@ -420,7 +487,11 @@
420
487
 
421
488
  @mixin iui-table-cell-status($status) {
422
489
  @include themed {
423
- 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));
424
495
  }
425
496
 
426
497
  @include iui-text-selection($status);
@@ -452,3 +523,32 @@
452
523
  margin-left: auto;
453
524
  }
454
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/css/modal.css DELETED
@@ -1,132 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- .iui-modal{
6
- margin:0;
7
- padding:0;
8
- border:none;
9
- vertical-align:baseline;
10
- z-index:999;
11
- position:fixed;
12
- top:0;
13
- left:0;
14
- width:100%;
15
- height:100%;
16
- background-color:rgba(0, 0, 0, 0.4);
17
- background-color:rgba(0, 0, 0, var(--iui-opacity-4));
18
- visibility:hidden;
19
- opacity:0;
20
- }
21
- @media (prefers-reduced-motion: no-preference){
22
- .iui-modal{
23
- transition:visibility 0s linear 0.2s, opacity 0.2s ease-out;
24
- }
25
- }
26
- .iui-modal.iui-modal-visible{
27
- visibility:visible;
28
- opacity:1;
29
- transition-delay:0s;
30
- }
31
- .iui-modal > .iui-modal-dialog{
32
- position:absolute;
33
- left:50%;
34
- top:33%;
35
- transform:translate(-50%, -33%);
36
- z-index:1000;
37
- max-width:50%;
38
- min-width:380px;
39
- max-height:100vh;
40
- border-radius:3px;
41
- box-shadow:0 9px 46px rgba(0, 0, 0, 0.25);
42
- padding:11px 16px;
43
- box-sizing:border-box;
44
- background-color:white;
45
- background-color:var(--iui-color-background-1);
46
- }
47
- @media screen and (max-width: 400px){
48
- .iui-modal > .iui-modal-dialog{
49
- max-width:95%;
50
- width:95%;
51
- min-width:95%;
52
- }
53
- }
54
- .iui-modal > .iui-modal-dialog .iui-title-bar{
55
- display:flex;
56
- align-items:center;
57
- margin-bottom:11px;
58
- justify-content:space-between;
59
- }
60
- .iui-modal > .iui-modal-dialog .iui-title-bar > .iui-title{
61
- font-size:18px;
62
- white-space:nowrap;
63
- overflow:hidden;
64
- text-overflow:ellipsis;
65
- line-height:1.5;
66
- }
67
- .iui-modal > .iui-modal-dialog .iui-button-bar{
68
- margin-top:11px;
69
- display:flex;
70
- align-items:center;
71
- justify-content:flex-end;
72
- }
73
- .iui-modal > .iui-modal-dialog .iui-button-bar > .iui-button:not(:last-child){
74
- margin-right:8px;
75
- }
76
- .iui-modal > .iui-modal-dialog .iui-modal-content{
77
- flex-grow:2;
78
- margin:0 -16px;
79
- padding:0 16px;
80
- overflow-y:auto;
81
- overflow-y:overlay;
82
- }
83
- .iui-modal-full-page > .iui-modal-dialog{
84
- display:flex;
85
- flex-direction:column;
86
- height:100vh;
87
- width:100vw;
88
- left:0;
89
- top:0;
90
- transform:none;
91
- max-width:initial;
92
- min-width:initial;
93
- border-radius:0;
94
- will-change:transform;
95
- }
96
- @media (prefers-reduced-motion: no-preference){
97
- .iui-modal-full-page{
98
- transition:visibility 0s linear 0.8s, opacity 0.4s ease-out 0.2s;
99
- }
100
- }
101
- .iui-modal-full-page > .iui-modal-dialog{
102
- transform:translateY(100%);
103
- }
104
- @media (prefers-reduced-motion: no-preference){
105
- .iui-modal-full-page > .iui-modal-dialog{
106
- transition:visibility 0s linear 0.4s, opacity 0s linear 0.4s, transform 0.25s ease-in;
107
- }
108
- }
109
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
110
- transform:translateY(0);
111
- }
112
- @media (prefers-reduced-motion: no-preference){
113
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
114
- transition:transform 0.3s ease-out;
115
- }
116
- }
117
- .iui-modal-animation-enter .iui-modal-full-page .iui-modal-dialog{
118
- transform:translateY(100%);
119
- opacity:0;
120
- }
121
- .iui-modal-animation-enter-active .iui-modal-full-page .iui-modal-dialog{
122
- transform:translateY(0);
123
- opacity:1;
124
- }
125
- .iui-modal-animation-enter .iui-modal{
126
- visibility:hidden;
127
- opacity:0;
128
- }
129
- .iui-modal-animation-enter-active .iui-modal{
130
- visibility:visible;
131
- opacity:1;
132
- }
@@ -1,15 +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 './index';
4
-
5
- .iui-modal {
6
- @include iui-modal;
7
-
8
- &-full-page {
9
- @include iui-modal-full-page;
10
- }
11
-
12
- &-animation {
13
- @include iui-modal-animation;
14
- }
15
- }
@@ -1,155 +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-modal {
7
- @include iui-reset;
8
- z-index: 999;
9
- position: fixed;
10
- top: 0;
11
- left: 0;
12
- width: 100%;
13
- height: 100%;
14
- @include themed {
15
- background-color: rgba(0, 0, 0, t(iui-opacity-4));
16
- }
17
-
18
- // #region Small Modal Animations for CSS
19
- visibility: hidden;
20
- opacity: 0;
21
- @media (prefers-reduced-motion: no-preference) {
22
- transition: visibility $iui-speed-instant linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
23
- }
24
-
25
- &.iui-modal-visible {
26
- visibility: visible;
27
- opacity: 1;
28
- // remove delay for entry animation so it's instantly visible
29
- transition-delay: $iui-speed-instant;
30
- }
31
- // #endregion Small Modal Animations for CSS
32
-
33
- > .iui-modal-dialog {
34
- position: absolute;
35
- left: 50%;
36
- top: 33%;
37
- transform: translate(-50%, -33%);
38
- z-index: 1000;
39
- max-width: 50%;
40
- min-width: 380px;
41
- max-height: 100vh;
42
- border-radius: $iui-border-radius;
43
- box-shadow: $iui-elevation-24;
44
- padding: $iui-baseline $iui-m;
45
- box-sizing: border-box;
46
-
47
- @include themed {
48
- background-color: t(iui-color-background-1);
49
- }
50
-
51
- @media screen and (max-width: 400px) {
52
- max-width: 95%;
53
- width: 95%;
54
- min-width: 95%;
55
- }
56
-
57
- .iui-title-bar {
58
- display: flex;
59
- align-items: center;
60
- margin-bottom: $iui-baseline;
61
- justify-content: space-between;
62
-
63
- > .iui-title {
64
- font-size: $iui-font-size-subheading;
65
- white-space: nowrap;
66
- overflow: hidden;
67
- text-overflow: ellipsis;
68
- line-height: 1.5;
69
- }
70
- }
71
-
72
- .iui-button-bar {
73
- margin-top: $iui-baseline;
74
- display: flex;
75
- align-items: center;
76
- justify-content: flex-end;
77
-
78
- > .iui-button:not(:last-child) {
79
- margin-right: $iui-s;
80
- }
81
- }
82
-
83
- .iui-modal-content {
84
- flex-grow: 2;
85
- margin: 0 -#{$iui-m};
86
- padding: 0 $iui-m;
87
- overflow-y: auto;
88
- overflow-y: overlay;
89
- }
90
- }
91
- }
92
-
93
- @mixin iui-modal-full-page {
94
- $iui-full-page-modal-slide-in-speed: 0.3s;
95
- $iui-full-page-modal-slide-out-speed: 0.25s;
96
-
97
- > .iui-modal-dialog {
98
- display: flex;
99
- flex-direction: column;
100
- height: 100vh;
101
- width: 100vw;
102
- left: 0;
103
- top: 0;
104
- transform: none;
105
- max-width: initial;
106
- min-width: initial;
107
- border-radius: 0;
108
- will-change: transform;
109
- }
110
-
111
- // #region Full Page Modal Animations for CSS
112
- @media (prefers-reduced-motion: no-preference) {
113
- transition: visibility $iui-speed-instant linear $iui-speed-slow, opacity $iui-speed ease-out $iui-speed-fast;
114
- }
115
-
116
- > .iui-modal-dialog {
117
- transform: translateY(100%);
118
- @media (prefers-reduced-motion: no-preference) {
119
- transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
120
- transform $iui-full-page-modal-slide-out-speed ease-in;
121
- }
122
- }
123
-
124
- &.iui-modal-visible > .iui-modal-dialog {
125
- transform: translateY(0);
126
- @media (prefers-reduced-motion: no-preference) {
127
- transition: transform $iui-full-page-modal-slide-in-speed ease-out;
128
- }
129
- }
130
- // #endregion Full Page Modal Animations for CSS
131
- }
132
-
133
- @mixin iui-modal-animation {
134
- // Full Page Modal Animations for React
135
- &-enter .iui-modal-full-page .iui-modal-dialog {
136
- transform: translateY(100%);
137
- opacity: 0;
138
- }
139
-
140
- &-enter-active .iui-modal-full-page .iui-modal-dialog {
141
- transform: translateY(0);
142
- opacity: 1;
143
- }
144
-
145
- // Small Modal Animations for React
146
- &-enter .iui-modal {
147
- visibility: hidden;
148
- opacity: 0;
149
- }
150
-
151
- &-enter-active .iui-modal {
152
- visibility: visible;
153
- opacity: 1;
154
- }
155
- }