@itwin/itwinui-css 0.60.0 → 0.61.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.
package/css/tabs.css CHANGED
@@ -19,9 +19,6 @@
19
19
  .iui-tabs-wrapper.iui-horizontal .iui-tab.iui-active::after{
20
20
  height:2px;
21
21
  }
22
- .iui-tabs-wrapper.iui-vertical .iui-tabs{
23
- flex-direction:column;
24
- }
25
22
  .iui-tabs-wrapper.iui-vertical .iui-tabs li,
26
23
  .iui-tabs-wrapper.iui-vertical .iui-tabs .iui-tab{
27
24
  width:100%;
@@ -44,7 +41,6 @@
44
41
  border:none;
45
42
  vertical-align:baseline;
46
43
  position:relative;
47
- align-items:center;
48
44
  list-style:none;
49
45
  -webkit-user-select:none;
50
46
  -moz-user-select:none;
@@ -61,15 +57,13 @@
61
57
  display:flex;
62
58
  align-items:center;
63
59
  font-size:14px;
60
+ min-height:38px;
61
+ height:100%;
64
62
  cursor:pointer;
63
+ transition:background-color 0.2s ease-out;
65
64
  color:rgba(0, 0, 0, 0.8);
66
65
  color:var(--iui-text-color);
67
66
  }
68
- @media (prefers-reduced-motion: no-preference){
69
- .iui-tabs .iui-tab{
70
- transition:background-color 0.2s ease-out;
71
- }
72
- }
73
67
  .iui-tabs .iui-tab.iui-active{
74
68
  color:#008ae0;
75
69
  color:var(--iui-color-foreground-primary);
@@ -104,20 +98,14 @@
104
98
  .iui-tabs .iui-tab-icon{
105
99
  width:16px;
106
100
  height:16px;
101
+ flex-shrink:0;
102
+ transition:fill 0.2s ease-out;
107
103
  fill:rgba(0, 0, 0, 0.8);
108
104
  fill:var(--iui-icons-color-actionable);
109
105
  }
110
- @media (prefers-reduced-motion: no-preference){
111
- .iui-tabs .iui-tab-icon{
112
- transition:fill 0.2s ease-out;
113
- }
114
- }
115
106
  .iui-tabs .iui-tab-icon + .iui-tab-label{
116
107
  margin-left:8px;
117
108
  }
118
- .iui-tabs .iui-tab-label{
119
- text-align:left;
120
- }
121
109
  .iui-tabs .iui-tab-description{
122
110
  display:none;
123
111
  font-size:12px;
@@ -156,8 +144,7 @@
156
144
  background-color:var(--iui-color-foreground-positive);
157
145
  }
158
146
  .iui-tabs.iui-default .iui-tab{
159
- height:38px;
160
- padding:0 16px;
147
+ padding:4px 16px;
161
148
  box-sizing:border-box;
162
149
  background-color:#f9f9fb;
163
150
  border:1px solid #c7ccd1;
@@ -205,10 +192,10 @@
205
192
  }
206
193
 
207
194
  .iui-tabs.iui-default.iui-large .iui-tab{
208
- height:49px;
195
+ min-height:49px;
209
196
  }
210
197
  .iui-tabs.iui-default.iui-large .iui-tab-description{
211
- display:block;
198
+ display:-webkit-box;
212
199
  }
213
200
  .iui-tabs.iui-default.iui-green .iui-tab::after{
214
201
  background-color:#53a21a;
@@ -223,8 +210,7 @@
223
210
  border:1px solid var(--iui-color-background-5);
224
211
  }
225
212
  .iui-tabs.iui-borderless .iui-tab{
226
- height:38px;
227
- padding:0 24px;
213
+ padding:4px 24px;
228
214
  background-color:transparent;
229
215
  }
230
216
  .iui-tabs.iui-borderless .iui-tab::after{
@@ -258,10 +244,10 @@
258
244
  background-color:rgba(var(--iui-color-foreground-positive-rgb), var(--iui-opacity-6));
259
245
  }
260
246
  .iui-tabs.iui-borderless.iui-large .iui-tab{
261
- height:49px;
247
+ min-height:49px;
262
248
  }
263
249
  .iui-tabs.iui-borderless.iui-large .iui-tab-description{
264
- display:block;
250
+ display:-webkit-box;
265
251
  }
266
252
  .iui-tabs.iui-borderless .iui-tab[disabled]:hover{
267
253
  background-color:transparent;
@@ -281,11 +267,11 @@
281
267
  background-color:rgba(var(--iui-color-foreground-positive-rgb), var(--iui-opacity-6));
282
268
  }
283
269
  .iui-tabs.iui-pill .iui-tab{
284
- height:38px;
270
+ padding:4px;
285
271
  background-color:transparent;
286
272
  width:100%;
287
273
  justify-content:center;
288
- border-radius:3px;
274
+ border-radius:4px;
289
275
  }
290
276
  .iui-tabs.iui-pill .iui-tab::after{
291
277
  bottom:0;
@@ -347,4 +333,22 @@
347
333
  .iui-tabs.iui-not-animated.iui-green .iui-tab::after{
348
334
  background-color:#53a21a;
349
335
  background-color:var(--iui-color-foreground-positive);
336
+ }
337
+
338
+ .iui-tab-label{
339
+ text-align:left;
340
+ max-width:60ch;
341
+ }
342
+ .iui-tab-label > *{
343
+ overflow:hidden;
344
+ white-space:nowrap;
345
+ text-overflow:ellipsis;
346
+ }
347
+ @supports (-webkit-line-clamp: 1){
348
+ .iui-tab-label > *{
349
+ white-space:unset;
350
+ display:-webkit-box;
351
+ -webkit-line-clamp:3;
352
+ -webkit-box-orient:vertical;
353
+ }
350
354
  }
package/css/tag.css CHANGED
@@ -3,17 +3,14 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  .iui-tag{
6
- margin:0;
7
- padding:0;
8
- border:none;
9
- vertical-align:baseline;
10
6
  -webkit-user-select:all;
11
7
  -moz-user-select:all;
12
8
  user-select:all;
13
9
  text-transform:lowercase;
14
10
  display:inline-flex;
15
11
  height:33px;
16
- margin:3px 0;
12
+ margin-top:3px;
13
+ margin-bottom:3px;
17
14
  border-radius:9999px;
18
15
  box-sizing:border-box;
19
16
  padding:0 2px;
@@ -36,10 +33,6 @@
36
33
  }
37
34
 
38
35
  .iui-tag-basic{
39
- margin:0;
40
- padding:0;
41
- border:none;
42
- vertical-align:baseline;
43
36
  -webkit-user-select:all;
44
37
  -moz-user-select:all;
45
38
  user-select:all;
@@ -77,7 +70,7 @@ a.iui-tag-basic{
77
70
  -webkit-tap-highlight-color:rgba(0, 138, 224, 0.2);
78
71
  color:var(--iui-color-foreground-primary);
79
72
  -webkit-tap-highlight-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
80
- border-radius:3px;
73
+ border-radius:4px;
81
74
  box-sizing:border-box;
82
75
  cursor:pointer;
83
76
  text-decoration:none;
@@ -163,7 +156,7 @@ a.iui-tag-basic:focus-visible{
163
156
  overflow-x:scroll;
164
157
  }
165
158
  .iui-tag-container.iui-visible{
166
- border-radius:3px;
159
+ border-radius:4px;
167
160
  padding:3px 12px;
168
161
  background-color:#edeff2;
169
162
  background-color:var(--iui-color-background-3);
package/css/text.css CHANGED
@@ -74,7 +74,7 @@
74
74
  -ms-user-select:none;
75
75
  user-select:none;
76
76
  color:transparent;
77
- border-radius:3px;
77
+ border-radius:4px;
78
78
  cursor:progress;
79
79
  background:linear-gradient(292deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
80
80
  background:linear-gradient(292deg, var(--iui-text-color-muted), var(--iui-text-color-muted), var(--iui-text-color-placeholder), var(--iui-text-color-muted), var(--iui-text-color-muted));
@@ -44,7 +44,7 @@
44
44
  }
45
45
  .iui-time > ol > li{
46
46
  padding:6px 16px;
47
- border-radius:3px;
47
+ border-radius:4px;
48
48
  }
49
49
  .iui-time > ol > li:focus-visible{
50
50
  outline:1px solid var(--iui-color-foreground-primary);
@@ -103,7 +103,7 @@
103
103
  }
104
104
  .iui-period > ol > li{
105
105
  padding:6px 16px;
106
- border-radius:3px;
106
+ border-radius:4px;
107
107
  }
108
108
  .iui-period > ol > li:focus-visible{
109
109
  outline:1px solid var(--iui-color-foreground-primary);
@@ -84,7 +84,7 @@
84
84
  pointer-events:all;
85
85
  margin:0 16px 11px 16px;
86
86
  min-height:44px;
87
- border-radius:3px;
87
+ border-radius:4px;
88
88
  background-color:white;
89
89
  border:1px solid black;
90
90
  box-shadow:0 0 0 1px rgba(255, 255, 255, 0.4), 0 9px 46px rgba(0, 0, 0, 0.25);
@@ -124,7 +124,7 @@
124
124
  }
125
125
  .iui-toast-anchor{
126
126
  text-decoration:underline;
127
- border-radius:3px;
127
+ border-radius:4px;
128
128
  cursor:pointer;
129
129
  font-size:12px;
130
130
  margin-right:16px;
package/css/tooltip.css CHANGED
@@ -37,7 +37,7 @@
37
37
  vertical-align:baseline;
38
38
  display:block;
39
39
  text-align:center;
40
- border-radius:3px;
40
+ border-radius:4px;
41
41
  font-size:12px;
42
42
  overflow:hidden;
43
43
  max-width:400px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.60.0",
3
+ "version": "0.61.0",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -12,6 +12,7 @@
12
12
 
13
13
  .iui-dialog-default {
14
14
  @include iui-dialog-default;
15
+ @include iui-dialog-placement;
15
16
  }
16
17
 
17
18
  .iui-dialog-full-page {
@@ -48,14 +48,47 @@ $iui-dialog-width: 380px;
48
48
  }
49
49
 
50
50
  @mixin iui-dialog-default {
51
- left: 50%;
52
- top: 33%;
53
- transform: translate(-50%, -33%);
54
51
  max-width: Max(50%, $iui-dialog-width);
55
52
  min-width: $iui-dialog-width;
56
53
  max-height: 100vh;
57
54
  }
58
55
 
56
+ @mixin iui-dialog-placement {
57
+ &:not([data-iui-placement]) {
58
+ left: 50%;
59
+ top: 33%;
60
+ transform: translate(-50%, -33%);
61
+ }
62
+
63
+ &[data-iui-placement='top-left'] {
64
+ top: 0;
65
+ left: 0;
66
+ margin-left: $iui-baseline;
67
+ margin-top: $iui-m;
68
+ }
69
+
70
+ &[data-iui-placement='top-right'] {
71
+ top: 0;
72
+ right: 0;
73
+ margin-right: $iui-baseline;
74
+ margin-top: $iui-m;
75
+ }
76
+
77
+ &[data-iui-placement='bottom-left'] {
78
+ bottom: 0;
79
+ left: 0;
80
+ margin-left: $iui-baseline;
81
+ margin-bottom: $iui-m;
82
+ }
83
+
84
+ &[data-iui-placement='bottom-right'] {
85
+ bottom: 0;
86
+ right: 0;
87
+ margin-right: $iui-baseline;
88
+ margin-bottom: $iui-m;
89
+ }
90
+ }
91
+
59
92
  @mixin iui-dialog-full-page {
60
93
  border-radius: 0;
61
94
  height: 100vh;
@@ -46,6 +46,26 @@
46
46
  @include iui-select-button;
47
47
  }
48
48
 
49
+ .iui-select-tag-container {
50
+ @include iui-select-tag-container;
51
+ }
52
+
53
+ .iui-select-tag {
54
+ @include iui-select-tag;
55
+ }
56
+
57
+ .iui-select-tag-label {
58
+ @include iui-select-tag-label;
59
+ }
60
+
61
+ .iui-select-tag-button {
62
+ @include iui-select-tag-button;
63
+ }
64
+
65
+ .iui-select-tag-button-icon {
66
+ @include iui-select-tag-button-icon;
67
+ }
68
+
49
69
  .iui-textarea {
50
70
  @include iui-textarea;
51
71
  }
@@ -2,6 +2,8 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
4
  @import '../menu/index';
5
+ @import '../tag/index';
6
+ @import '../button/index';
5
7
 
6
8
  @mixin iui-select-button {
7
9
  @include iui-focus($offset: -2px, $thickness: 2px);
@@ -64,3 +66,67 @@
64
66
  }
65
67
  }
66
68
  }
69
+
70
+ @mixin iui-select-tag-container {
71
+ position: absolute;
72
+ // align wth Select's padding
73
+ inset: 0 $iui-icons-default + $iui-l 0 $iui-sm;
74
+ height: 100%;
75
+ display: flex;
76
+ align-items: center;
77
+ gap: $iui-xs;
78
+ overflow: hidden;
79
+
80
+ > * + * {
81
+ margin-left: $iui-xs;
82
+ @supports (gap: $iui-xs) {
83
+ margin-left: 0;
84
+ }
85
+ }
86
+ }
87
+
88
+ @mixin iui-select-tag {
89
+ @include iui-tag;
90
+ // Override hardcoded Tag margin
91
+ margin-top: 0;
92
+ margin-bottom: 0;
93
+ display: inline-flex;
94
+ align-items: center;
95
+ height: 80%;
96
+ max-height: $iui-baseline * 3;
97
+ }
98
+
99
+ @mixin iui-select-tag-label {
100
+ @include iui-tag-label;
101
+ display: inline-flex;
102
+ align-items: center;
103
+
104
+ @at-root .iui-select-button.iui-small & {
105
+ font-size: $iui-font-size-small;
106
+ line-height: floor($iui-baseline * 1.5);
107
+ }
108
+ }
109
+
110
+ @mixin iui-select-tag-button {
111
+ @include iui-button;
112
+ @include iui-button-borderless;
113
+ @include iui-tag-button;
114
+ padding: 0 $iui-xs;
115
+ height: 100%;
116
+ aspect-ratio: 1 / 1;
117
+
118
+ @at-root .iui-select-button.iui-small & {
119
+ font-size: $iui-font-size-small;
120
+ line-height: floor($iui-baseline * 1.5);
121
+ }
122
+ }
123
+
124
+ @mixin iui-select-tag-button-icon {
125
+ @include iui-button-icon;
126
+ flex-shrink: 0;
127
+
128
+ @at-root .iui-select-button.iui-small & {
129
+ width: $iui-icons-small;
130
+ height: $iui-icons-small;
131
+ }
132
+ }
@@ -4,7 +4,7 @@
4
4
  @import './baseline';
5
5
  @import '../icon/variables';
6
6
 
7
- $iui-border-radius: 3px;
7
+ $iui-border-radius: 4px;
8
8
  $iui-border-radius-round: 9999px;
9
9
  $iui-blur-filter: blur(5px);
10
10
 
@@ -5,8 +5,7 @@
5
5
 
6
6
  @mixin iui-tabs-borderless {
7
7
  .iui-tab {
8
- height: $iui-component-height;
9
- padding: 0 ($iui-component-padding-horizontal * 2);
8
+ padding: $iui-xs ($iui-component-padding-horizontal * 2);
10
9
  background-color: transparent;
11
10
 
12
11
  &::after {
@@ -56,11 +55,11 @@
56
55
 
57
56
  &.iui-large {
58
57
  .iui-tab {
59
- height: $iui-component-height-large;
58
+ min-height: $iui-component-height-large;
60
59
  }
61
60
 
62
61
  .iui-tab-description {
63
- display: block;
62
+ display: -webkit-box; /* stylelint-disable-line */
64
63
  }
65
64
  }
66
65
 
@@ -38,3 +38,7 @@
38
38
  @include iui-tab-not-animated;
39
39
  }
40
40
  }
41
+
42
+ .iui-tab-label {
43
+ @include iui-tab-label;
44
+ }
@@ -7,8 +7,7 @@
7
7
  @include iui-tab-not-animated;
8
8
 
9
9
  .iui-tab {
10
- height: $iui-component-height;
11
- padding: 0 $iui-m;
10
+ padding: $iui-xs $iui-m;
12
11
  box-sizing: border-box;
13
12
  @include themed {
14
13
  background-color: t(iui-color-background-2);
@@ -78,11 +77,11 @@
78
77
 
79
78
  &.iui-large {
80
79
  .iui-tab {
81
- height: $iui-component-height-large;
80
+ min-height: $iui-component-height-large;
82
81
  }
83
82
 
84
83
  .iui-tab-description {
85
- display: block;
84
+ display: -webkit-box; /* stylelint-disable-line */
86
85
  }
87
86
  }
88
87
 
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  .iui-tab {
25
- height: $iui-component-height;
25
+ padding: $iui-xs;
26
26
  background-color: transparent;
27
27
  width: 100%;
28
28
  justify-content: center;
@@ -5,7 +5,6 @@
5
5
  @mixin iui-tabs {
6
6
  @include iui-reset;
7
7
  position: relative;
8
- align-items: center;
9
8
  list-style: none;
10
9
  user-select: none;
11
10
 
@@ -16,10 +15,10 @@
16
15
  display: flex;
17
16
  align-items: center;
18
17
  font-size: $iui-font-size;
18
+ min-height: $iui-component-height;
19
+ height: 100%;
19
20
  cursor: pointer;
20
- @media (prefers-reduced-motion: no-preference) {
21
- transition: background-color $iui-speed-fast ease-out;
22
- }
21
+ transition: background-color $iui-speed-fast ease-out;
23
22
  @include themed {
24
23
  color: t(iui-text-color);
25
24
  }
@@ -61,9 +60,8 @@
61
60
  .iui-tab-icon {
62
61
  width: $iui-icons-default;
63
62
  height: $iui-icons-default;
64
- @media (prefers-reduced-motion: no-preference) {
65
- transition: fill $iui-speed-fast ease-out;
66
- }
63
+ flex-shrink: 0;
64
+ transition: fill $iui-speed-fast ease-out;
67
65
  @include themed {
68
66
  fill: t(iui-icons-color-actionable);
69
67
  }
@@ -73,10 +71,6 @@
73
71
  }
74
72
  }
75
73
 
76
- .iui-tab-label {
77
- text-align: left;
78
- }
79
-
80
74
  .iui-tab-description {
81
75
  display: none;
82
76
  font-size: $iui-font-size-small;
@@ -110,6 +104,15 @@
110
104
  }
111
105
  }
112
106
 
107
+ @mixin iui-tab-label {
108
+ text-align: left;
109
+ max-width: 60ch;
110
+
111
+ > * {
112
+ @include iui-line-clamp(3);
113
+ }
114
+ }
115
+
113
116
  @mixin iui-tabs-horizontal {
114
117
  flex-direction: column;
115
118
 
@@ -131,8 +134,6 @@
131
134
 
132
135
  @mixin iui-tabs-vertical {
133
136
  .iui-tabs {
134
- flex-direction: column;
135
-
136
137
  li,
137
138
  .iui-tab {
138
139
  width: 100%;
package/scss/tag/tag.scss CHANGED
@@ -5,7 +5,6 @@
5
5
  @import '../button/index';
6
6
 
7
7
  @mixin iui-tag-base {
8
- @include iui-reset;
9
8
  user-select: all;
10
9
  text-transform: lowercase;
11
10
  display: inline-flex;
@@ -24,7 +23,8 @@
24
23
  @mixin iui-tag {
25
24
  @include iui-tag-base;
26
25
  height: $iui-baseline * 3;
27
- margin: $iui-component-offset 0;
26
+ margin-top: $iui-component-offset;
27
+ margin-bottom: $iui-component-offset;
28
28
  border-radius: $iui-border-radius-round;
29
29
  box-sizing: border-box;
30
30
  padding: 0 $iui-xxs;