@itwin/itwinui-css 0.33.1 → 0.35.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.
@@ -120,11 +120,9 @@
120
120
 
121
121
  .iui-side-navigation-submenu{
122
122
  min-width:192px;
123
- width:384px;
124
123
  max-width:50vw;
125
124
  height:100%;
126
125
  box-sizing:border-box;
127
- padding:0 12px 11px;
128
126
  overflow-x:hidden;
129
127
  overflow-y:auto;
130
128
  overflow-y:overlay;
@@ -140,6 +138,12 @@
140
138
  @media (prefers-reduced-motion: no-preference){
141
139
  .iui-side-navigation-submenu.iui-enter-active, .iui-side-navigation-submenu.iui-exit-active{
142
140
  transition:opacity 0.2s ease-out, width 0.2s ease-out, height 0.2s ease-out; } }
141
+ .iui-side-navigation-submenu.iui-enter-active, .iui-side-navigation-submenu.iui-exit-active{
142
+ display:flex; }
143
+ .iui-side-navigation-submenu-content{
144
+ padding:0 12px 11px;
145
+ flex-shrink:0;
146
+ box-sizing:border-box; }
143
147
  .iui-side-navigation-submenu-header{
144
148
  height:55px;
145
149
  display:flex;
@@ -162,9 +166,9 @@
162
166
  white-space:nowrap;
163
167
  overflow:hidden;
164
168
  text-overflow:ellipsis; }
165
- .iui-side-navigation-submenu-header-label-actions{
166
- flex-shrink:0;
167
- margin-left:8px; }
169
+ .iui-side-navigation-submenu-header-actions{
170
+ flex-shrink:0;
171
+ margin-left:8px; }
168
172
 
169
173
  .iui-side-navigation-wrapper{
170
174
  display:flex;
package/css/slider.css CHANGED
@@ -3,7 +3,8 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  .iui-slider-component-container{
6
- display:flex; }
6
+ display:flex;
7
+ min-height:22px; }
7
8
  .iui-slider-component-container .iui-slider-min,
8
9
  .iui-slider-component-container .iui-slider-max{
9
10
  -webkit-user-select:all;
package/css/table.css CHANGED
@@ -35,11 +35,11 @@
35
35
  margin-left:auto; }
36
36
  .iui-table.iui-condensed .iui-table-header .iui-cell,
37
37
  .iui-table.iui-condensed .iui-row .iui-cell,
38
- .iui-table.iui-condensed + .iui-paginator{
38
+ .iui-table.iui-condensed .iui-paginator{
39
39
  min-height:44px; }
40
40
  .iui-table.iui-extra-condensed .iui-table-header .iui-cell,
41
41
  .iui-table.iui-extra-condensed .iui-row .iui-cell,
42
- .iui-table.iui-extra-condensed + .iui-paginator{
42
+ .iui-table.iui-extra-condensed .iui-paginator{
43
43
  min-height:33px; }
44
44
 
45
45
  .iui-table-header{
@@ -119,11 +119,13 @@
119
119
  overflow-x:hidden;
120
120
  overflow-y:scroll;
121
121
  overflow-y:overlay;
122
+ display:flex;
123
+ flex-direction:column;
124
+ flex-grow:1;
122
125
  background-color:#FFF;
123
126
  background-color:var(--iui-color-background-1); }
124
127
  .iui-table-body .iui-row{
125
128
  display:flex;
126
- flex-grow:1;
127
129
  border:solid 1px transparent;
128
130
  border-bottom-color:#DCE0E3;
129
131
  border-bottom-color:var(--iui-color-background-4); }
@@ -261,6 +263,11 @@
261
263
  .iui-table-body > .iui-table-empty{
262
264
  text-align:center;
263
265
  padding:32px;
266
+ display:flex;
267
+ flex-direction:column;
268
+ justify-content:center;
269
+ align-items:center;
270
+ flex-grow:1;
264
271
  color:rgba(0, 0, 0, 0.4);
265
272
  background-color:#FFF;
266
273
  color:var(--iui-text-color-muted);
@@ -327,7 +334,6 @@
327
334
  border:none;
328
335
  vertical-align:baseline;
329
336
  display:flex;
330
- flex:1;
331
337
  justify-content:space-around;
332
338
  align-items:center;
333
339
  min-height:55px;
@@ -344,9 +350,11 @@
344
350
  display:flex;
345
351
  align-items:center;
346
352
  position:relative;
347
- flex:1; }
353
+ flex:1;
354
+ min-width:0; }
348
355
  .iui-paginator > .iui-center{
349
356
  justify-content:center;
357
+ flex:2 1;
350
358
  color:rgba(0, 0, 0, 0.8);
351
359
  color:var(--iui-text-color); }
352
360
  .iui-paginator > .iui-center .iui-button-group{
@@ -357,6 +365,8 @@
357
365
  .iui-paginator > .iui-center .iui-button-group > .iui-button.iui-small,
358
366
  .iui-paginator > .iui-center .iui-button-group > .iui-ellipsis.iui-small{
359
367
  width:27px; }
368
+ .iui-paginator > .iui-center .iui-button-group > .iui-button{
369
+ transition:none; }
360
370
  .iui-paginator > .iui-center .iui-button-group > .iui-ellipsis{
361
371
  display:flex;
362
372
  justify-content:center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.33.1",
3
+ "version": "0.35.2",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -80,6 +80,7 @@
80
80
  "trim-newlines": "^3.0.1",
81
81
  "glob-parent": "^5.1.2",
82
82
  "jpeg-js": "^0.4.3",
83
- "set-value": "^4.1.0"
83
+ "set-value": "^4.1.0",
84
+ "ansi-regex": "^5.0.1"
84
85
  }
85
86
  }
@@ -13,25 +13,34 @@
13
13
  @include themed {
14
14
  border: 1px solid t(iui-color-background-5);
15
15
  color: t(iui-text-color);
16
+ background-color: t(iui-color-background-1);
16
17
  }
17
18
 
18
- > .iui-icon {
19
+ &-icon {
19
20
  @include iui-icons-default;
20
21
  flex-shrink: 0;
21
22
  margin-left: $iui-m;
22
23
  }
23
24
 
24
- > .iui-message {
25
+ &-message {
25
26
  margin: $iui-baseline $iui-m;
27
+ }
26
28
 
27
- > a {
28
- margin-left: $iui-s;
29
- text-decoration: underline;
30
- user-select: none;
31
- white-space: nowrap;
29
+ &-link {
30
+ cursor: pointer;
31
+ margin-left: $iui-s;
32
+ text-decoration: underline;
33
+ user-select: none;
34
+ white-space: nowrap;
35
+ @include iui-focus;
36
+ @include themed {
37
+ color: t(iui-color-foreground-primary);
38
+ }
32
39
 
33
- &:hover {
34
- text-decoration: none;
40
+ &:hover {
41
+ text-decoration: none;
42
+ @include themed {
43
+ color: t(iui-color-foreground-primary-overlay);
35
44
  }
36
45
  }
37
46
  }
@@ -49,3 +58,48 @@
49
58
  width: 100vw;
50
59
  }
51
60
  }
61
+
62
+ /// Modifier mixin to categorize the alert
63
+ /// @arg $statusColor Can be one of: positive, negative, warning, primary
64
+ /// @arg $rootSelector Selector of the root alert element. Defaults to .iui-alert
65
+ @mixin iui-alert-category($statusColor, $rootSelector: '.iui-alert') {
66
+ @include themed {
67
+ background: linear-gradient(
68
+ rgba(t(iui-color-foreground-#{$statusColor}-rgb), t(iui-opacity-6)),
69
+ rgba(t(iui-color-foreground-#{$statusColor}-rgb), t(iui-opacity-6))
70
+ ),
71
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
72
+ border-color: t(iui-color-foreground-#{$statusColor});
73
+ }
74
+
75
+ #{$rootSelector}-icon {
76
+ @include themed {
77
+ fill: t(iui-icons-color-#{$statusColor});
78
+ }
79
+ }
80
+
81
+ #{$rootSelector}-message {
82
+ &::selection {
83
+ @include themed {
84
+ background-color: rgba(t(iui-color-foreground-#{$statusColor}-rgb), t(iui-opacity-4));
85
+ }
86
+ }
87
+ }
88
+
89
+ #{$rootSelector}-link {
90
+ @include themed {
91
+ color: t(iui-color-foreground-#{$statusColor});
92
+ }
93
+
94
+ &:hover {
95
+ @include themed {
96
+ color: t(iui-color-foreground-#{$statusColor}-overlay);
97
+ }
98
+ }
99
+ }
100
+
101
+ #{$rootSelector}-link,
102
+ > .iui-button {
103
+ @include iui-focus(if($statusColor == primary, iui-focus-box-shadow, iui-focus-#{$statusColor}-box-shadow));
104
+ }
105
+ }
@@ -5,19 +5,9 @@
5
5
  .iui-alert {
6
6
  @include iui-alert;
7
7
 
8
- &.iui-informational {
9
- @include iui-alert-informational;
10
- }
11
-
12
- &.iui-positive {
13
- @include iui-alert-positive;
14
- }
15
-
16
- &.iui-warning {
17
- @include iui-alert-warning;
18
- }
19
-
20
- &.iui-negative {
21
- @include iui-alert-negative;
8
+ @each $status in positive, negative, warning, informational {
9
+ &.iui-#{$status} {
10
+ @include iui-alert-category($statusColor: if($status == informational, 'primary', $status));
11
+ }
22
12
  }
23
13
  }
@@ -1,7 +1,3 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './alert';
4
- @import './informational';
5
- @import './positive';
6
- @import './warning';
7
- @import './negative';
@@ -9,6 +9,7 @@ $iui-button-padding-large: $iui-xs * 6;
9
9
 
10
10
  @mixin iui-button {
11
11
  @include iui-reset;
12
+ font-family: inherit;
12
13
  display: inline-flex;
13
14
  align-items: center;
14
15
  vertical-align: middle;
@@ -32,7 +32,7 @@
32
32
 
33
33
  > .iui-icon,
34
34
  > .iui-status-icon {
35
- display: block;
35
+ display: inline-flex;
36
36
  flex-shrink: 0;
37
37
  width: $iui-icons-default;
38
38
  height: $iui-icons-default;
@@ -149,4 +149,21 @@
149
149
  }
150
150
  }
151
151
  }
152
+
153
+ &.iui-small .iui-header {
154
+ padding: ($iui-baseline * 0.5) $iui-s;
155
+
156
+ > .iui-icon {
157
+ width: $iui-icons-small;
158
+ height: $iui-icons-small;
159
+ }
160
+
161
+ > .iui-expandable-block-label {
162
+ margin-left: $iui-s;
163
+ }
164
+
165
+ > .iui-status-icon {
166
+ margin-left: $iui-s;
167
+ }
168
+ }
152
169
  }
@@ -16,4 +16,8 @@
16
16
  &.iui-bottom {
17
17
  @include iui-information-panel-bottom;
18
18
  }
19
+
20
+ &.iui-visible {
21
+ @include iui-information-panel-visible;
22
+ }
19
23
  }
@@ -14,6 +14,10 @@
14
14
  flex-direction: column;
15
15
  box-sizing: border-box;
16
16
  z-index: 2; // Needs to be higher than table's column resizers.
17
+ @media (prefers-reduced-motion: no-preference) {
18
+ transition: transform $iui-speed-fast ease-out, opacity $iui-speed-fast ease;
19
+ }
20
+
17
21
  @include themed {
18
22
  background-color: t(iui-color-background-1);
19
23
  }
@@ -22,7 +26,6 @@
22
26
  display: none;
23
27
  position: absolute;
24
28
  touch-action: none;
25
- z-index: 1000;
26
29
 
27
30
  > .iui-resizer-bar {
28
31
  @include themed {
@@ -37,14 +40,6 @@
37
40
  }
38
41
  }
39
42
 
40
- &.iui-information-panel-visible {
41
- opacity: 1;
42
-
43
- > .iui-resizer {
44
- display: flex;
45
- }
46
- }
47
-
48
43
  .iui-information-header,
49
44
  .iui-information-body {
50
45
  padding-left: $iui-sm;
@@ -53,7 +48,8 @@
53
48
  }
54
49
 
55
50
  .iui-information-header {
56
- height: $iui-baseline * 6;
51
+ height: $iui-baseline * 5;
52
+ flex-shrink: 0;
57
53
  display: flex;
58
54
  align-items: center;
59
55
  justify-content: space-between;
@@ -95,6 +91,7 @@
95
91
  padding-bottom: $iui-baseline;
96
92
  height: 100%;
97
93
  overflow-x: hidden;
94
+ overflow-y: auto;
98
95
  overflow-y: overlay;
99
96
 
100
97
  > hr {
@@ -105,8 +102,18 @@
105
102
  }
106
103
  }
107
104
 
105
+ @mixin iui-information-panel-visible {
106
+ opacity: 1;
107
+ transform: translate(0);
108
+
109
+ > .iui-resizer {
110
+ display: flex;
111
+ }
112
+ }
113
+
108
114
  @mixin iui-information-panel-vertical {
109
115
  top: 0;
116
+ right: 0;
110
117
  width: $iui-3xl * 4;
111
118
  min-width: $iui-3xl * 2;
112
119
  height: 100%;
@@ -133,6 +140,7 @@
133
140
  }
134
141
  @mixin iui-information-panel-horizontal {
135
142
  left: 0;
143
+ bottom: 0;
136
144
  height: $iui-3xl * 4;
137
145
  min-height: $iui-3xl * 2;
138
146
  width: 100%;
@@ -160,30 +168,22 @@
160
168
 
161
169
  @mixin iui-information-panel-right {
162
170
  @include iui-information-panel-vertical;
163
- right: ($iui-3xl * 4) * -1; // Default width set negative so the panel hides off screen.
171
+ transform: translateX(100%); // hide off screen
164
172
  box-shadow: -1px 0 14px rgba(0, 0, 0, 0.25);
165
- transition: right $iui-speed-fast ease-out, opacity $iui-speed-fast ease;
173
+ clip-path: inset(0 0 0 -15px); // show box-shadow only on the left
166
174
 
167
175
  > .iui-resizer {
168
- left: ($iui-m * 0.5) * -1;
169
- }
170
-
171
- &.iui-information-panel-visible {
172
- right: 0;
176
+ left: $iui-m * -0.5;
173
177
  }
174
178
  }
175
179
 
176
180
  @mixin iui-information-panel-bottom {
177
181
  @include iui-information-panel-horizontal;
178
- bottom: ($iui-3xl * 4) * -1; // Default height set negative so the panel hides off screen.
182
+ transform: translateY(100%); // hide off screen
179
183
  box-shadow: 0 -1px 14px rgba(0, 0, 0, 0.25);
180
- transition: bottom $iui-speed-fast ease-out, opacity $iui-speed-fast ease;
184
+ clip-path: inset(-15px 0 0 0); // show box-shadow only on top
181
185
 
182
186
  > .iui-resizer {
183
- top: ($iui-m * 0.5) * -1;
184
- }
185
-
186
- &.iui-information-panel-visible {
187
- bottom: 0;
187
+ top: $iui-m * -0.5;
188
188
  }
189
189
  }
@@ -3,7 +3,7 @@
3
3
  @import './index';
4
4
 
5
5
  @each $status in primary, positive, warning, negative, accessory {
6
- &.iui-notification-#{$status} {
6
+ .iui-notification-#{$status} {
7
7
  @include iui-notification-marker($status: $status);
8
8
  }
9
9
  }
@@ -174,11 +174,9 @@
174
174
 
175
175
  @mixin iui-side-navigation-submenu {
176
176
  min-width: $iui-3xl * 2;
177
- width: $iui-3xl * 4;
178
177
  max-width: 50vw;
179
178
  height: 100%;
180
179
  box-sizing: border-box;
181
- padding: 0 $iui-sm $iui-baseline;
182
180
  overflow-x: hidden;
183
181
  overflow-y: auto;
184
182
  overflow-y: overlay;
@@ -190,6 +188,17 @@
190
188
 
191
189
  @include iui-transition-group;
192
190
 
191
+ &.iui-enter-active,
192
+ &.iui-exit-active {
193
+ display: flex;
194
+ }
195
+
196
+ &-content {
197
+ padding: 0 $iui-sm $iui-baseline;
198
+ flex-shrink: 0;
199
+ box-sizing: border-box;
200
+ }
201
+
193
202
  &-header {
194
203
  height: $iui-baseline * 5;
195
204
  display: flex;
@@ -211,11 +220,11 @@
211
220
  overflow: hidden;
212
221
  text-overflow: ellipsis;
213
222
  }
223
+ }
214
224
 
215
- &-actions {
216
- flex-shrink: 0;
217
- margin-left: $iui-s;
218
- }
225
+ &-actions {
226
+ flex-shrink: 0;
227
+ margin-left: $iui-s;
219
228
  }
220
229
  }
221
230
  }
@@ -9,6 +9,7 @@ $tick-height: $iui-baseline; // 11px
9
9
 
10
10
  @mixin iui-slider-component-container {
11
11
  display: flex;
12
+ min-height: $iui-baseline * 2;
12
13
 
13
14
  .iui-slider-min,
14
15
  .iui-slider-max {
@@ -140,7 +140,7 @@
140
140
  }
141
141
 
142
142
  /// Classes for react-transition-group
143
- /// Used for expand/collapse transitions. Needs height to be set in JS.
143
+ /// Used for expand/collapse transitions. Needs height/width to be set in JS.
144
144
  @mixin iui-transition-group {
145
145
  &.iui-enter,
146
146
  &.iui-exit-active {
@@ -6,7 +6,7 @@
6
6
  @mixin iui-table-condensed {
7
7
  .iui-table-header .iui-cell,
8
8
  .iui-row .iui-cell,
9
- + .iui-paginator {
9
+ .iui-paginator {
10
10
  min-height: $iui-baseline * 4;
11
11
  }
12
12
  }
@@ -6,7 +6,7 @@
6
6
  @mixin iui-table-extra-condensed {
7
7
  .iui-table-header .iui-cell,
8
8
  .iui-row .iui-cell,
9
- + .iui-paginator {
9
+ .iui-paginator {
10
10
  min-height: $iui-baseline * 3;
11
11
  }
12
12
  }
@@ -8,7 +8,6 @@
8
8
  @mixin iui-paginator {
9
9
  @include iui-reset;
10
10
  display: flex;
11
- flex: 1;
12
11
  justify-content: space-around;
13
12
  align-items: center;
14
13
  min-height: $iui-baseline * 5;
@@ -25,10 +24,12 @@
25
24
  align-items: center;
26
25
  position: relative;
27
26
  flex: 1;
27
+ min-width: 0;
28
28
  }
29
29
 
30
30
  > .iui-center {
31
31
  justify-content: center;
32
+ flex: 2 1;
32
33
  @include themed {
33
34
  color: t(iui-text-color);
34
35
  }
@@ -45,6 +46,11 @@
45
46
  }
46
47
  }
47
48
 
49
+ > .iui-button {
50
+ // Animation looks odd when switching pages
51
+ transition: none;
52
+ }
53
+
48
54
  > .iui-ellipsis {
49
55
  display: flex;
50
56
  justify-content: center;
@@ -126,6 +126,9 @@
126
126
  overflow-x: hidden;
127
127
  overflow-y: scroll;
128
128
  overflow-y: overlay;
129
+ display: flex;
130
+ flex-direction: column;
131
+ flex-grow: 1;
129
132
 
130
133
  @include themed {
131
134
  background-color: t(iui-color-background-1);
@@ -133,7 +136,6 @@
133
136
 
134
137
  .iui-row {
135
138
  display: flex;
136
- flex-grow: 1;
137
139
  border: solid 1px transparent;
138
140
  @media (prefers-reduced-motion: no-preference) {
139
141
  transition: border $iui-speed-fast ease-out;
@@ -292,6 +294,11 @@
292
294
  > .iui-table-empty {
293
295
  text-align: center;
294
296
  padding: $iui-xl;
297
+ display: flex;
298
+ flex-direction: column;
299
+ justify-content: center;
300
+ align-items: center;
301
+ flex-grow: 1;
295
302
  @include themed {
296
303
  color: t(iui-text-color-muted);
297
304
  background-color: t(iui-color-background-1);
@@ -1,35 +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 './alert';
5
-
6
- @mixin iui-alert-informational {
7
- @include themed {
8
- background: linear-gradient(
9
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
10
- rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
11
- ),
12
- linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
13
- border-color: t(iui-color-foreground-primary);
14
- }
15
-
16
- > .iui-icon,
17
- > .iui-icon > * {
18
- @include themed {
19
- fill: t(iui-icons-color-primary);
20
- }
21
- }
22
-
23
- > .iui-message > a {
24
- @include iui-focus;
25
- @include themed {
26
- color: t(iui-color-foreground-primary);
27
- }
28
-
29
- &:hover {
30
- @include themed {
31
- color: t(iui-color-foreground-primary-overlay);
32
- }
33
- }
34
- }
35
- }
@@ -1,50 +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 './alert';
5
-
6
- @mixin iui-alert-negative {
7
- @include themed {
8
- background: linear-gradient(
9
- rgba(t(iui-color-foreground-negative-rgb), t(iui-opacity-6)),
10
- rgba(t(iui-color-foreground-negative-rgb), t(iui-opacity-6))
11
- ),
12
- linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
13
- border-color: t(iui-color-foreground-negative);
14
- }
15
-
16
- > .iui-icon,
17
- > .iui-icon > * {
18
- @include themed {
19
- fill: t(iui-icons-color-negative);
20
- }
21
- }
22
-
23
- > .iui-message {
24
- > a {
25
- @include themed {
26
- color: t(iui-color-foreground-negative);
27
- }
28
-
29
- &:hover {
30
- @include themed {
31
- color: t(iui-color-foreground-negative-overlay);
32
- }
33
- }
34
- }
35
-
36
- &::selection {
37
- @include themed {
38
- background-color: rgba(
39
- t(iui-color-foreground-negative-rgb),
40
- t(iui-opacity-4)
41
- );
42
- }
43
- }
44
- }
45
-
46
- > .iui-message > a,
47
- > .iui-button {
48
- @include iui-focus(iui-focus-negative-box-shadow);
49
- }
50
- }