@itwin/itwinui-css 0.60.0 → 0.63.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 (57) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/css/alert.css +7 -2
  3. package/css/all.css +709 -212
  4. package/css/anchor.css +1 -1
  5. package/css/badge.css +1 -1
  6. package/css/blockquote.css +1 -1
  7. package/css/breadcrumbs.css +5 -5
  8. package/css/button.css +13 -13
  9. package/css/carousel.css +2 -2
  10. package/css/code.css +3 -3
  11. package/css/color-picker.css +6 -6
  12. package/css/date-picker.css +6 -6
  13. package/css/dialog.css +30 -4
  14. package/css/expandable-block.css +6 -1
  15. package/css/fieldset.css +2 -2
  16. package/css/file-upload.css +6 -0
  17. package/css/footer.css +29 -29
  18. package/css/global.css +1 -1
  19. package/css/header.css +8 -3
  20. package/css/icon.css +30 -0
  21. package/css/inputs.css +201 -5
  22. package/css/keyboard.css +1 -1
  23. package/css/location-marker.css +1 -1
  24. package/css/menu.css +1 -1
  25. package/css/radio-tile.css +2 -2
  26. package/css/side-navigation.css +5 -0
  27. package/css/slider.css +161 -46
  28. package/css/table.css +3 -3
  29. package/css/tabs.css +31 -27
  30. package/css/tag.css +4 -11
  31. package/css/text.css +1 -1
  32. package/css/tile.css +102 -0
  33. package/css/time-picker.css +2 -2
  34. package/css/toast-notification.css +2 -2
  35. package/css/tooltip.css +1 -1
  36. package/css/tree.css +5 -0
  37. package/package.json +12 -8
  38. package/scss/color-picker/color-picker.scss +35 -31
  39. package/scss/dialog/classes.scss +1 -0
  40. package/scss/dialog/dialog.scss +36 -3
  41. package/scss/footer/classes.scss +16 -0
  42. package/scss/footer/footer.scss +38 -41
  43. package/scss/icon/mixins.scss +3 -0
  44. package/scss/inputs/classes.scss +20 -0
  45. package/scss/inputs/select.scss +66 -0
  46. package/scss/slider/classes.scss +13 -0
  47. package/scss/slider/slider.scss +146 -36
  48. package/scss/style/variables.scss +1 -1
  49. package/scss/table/table.scss +5 -1
  50. package/scss/tabs/borderless.scss +3 -4
  51. package/scss/tabs/classes.scss +4 -0
  52. package/scss/tabs/default.scss +3 -4
  53. package/scss/tabs/pill.scss +1 -1
  54. package/scss/tabs/tabs.scss +14 -13
  55. package/scss/tag/tag.scss +2 -2
  56. package/scss/tile/classes.scss +12 -0
  57. package/scss/tile/tile.scss +49 -0
@@ -10,56 +10,53 @@
10
10
  width: 100%;
11
11
  padding: $iui-baseline 0;
12
12
  font-size: $iui-font-size-small;
13
+ }
13
14
 
14
- > ul {
15
- list-style-type: none;
16
- margin: 0 auto;
17
- padding: 0;
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- flex-wrap: wrap;
22
-
23
- > li {
24
- display: inline-block;
25
- user-select: none;
26
- white-space: nowrap;
27
- word-break: keep-all;
28
-
29
- @include themed {
30
- color: t(iui-text-color-muted);
31
- }
15
+ @mixin iui-legal-footer-list {
16
+ list-style-type: none;
17
+ margin: 0 auto;
18
+ padding: 0;
19
+ display: flex;
20
+ justify-content: center;
21
+ align-items: center;
22
+ flex-wrap: wrap;
23
+ }
32
24
 
33
- .iui-separator {
34
- margin: 0 $iui-s;
35
- width: 1px;
36
- height: $iui-baseline;
37
- display: inline-table;
25
+ @mixin iui-legal-footer-item {
26
+ display: flex;
27
+ align-items: center;
28
+ user-select: none;
29
+ white-space: nowrap;
30
+ word-break: keep-all;
38
31
 
39
- @include themed {
40
- background-color: t(iui-text-color-muted);
41
- }
42
- }
32
+ @include themed {
33
+ color: t(iui-text-color-muted);
34
+ }
43
35
 
44
- > a {
45
- @include iui-anchor;
36
+ > a {
37
+ @include iui-anchor;
46
38
 
47
- &,
48
- &:hover {
49
- @include themed {
50
- color: t(iui-text-color-muted);
51
- }
52
- }
39
+ &,
40
+ &:hover {
41
+ @include themed {
42
+ color: t(iui-text-color-muted);
53
43
  }
54
44
  }
55
45
  }
46
+ }
56
47
 
57
- > .iui-legal-footer-developer {
58
- display: block;
59
- user-select: all;
48
+ @mixin iui-legal-footer-separator {
49
+ margin: 0 $iui-s;
50
+ width: 1px;
51
+ height: $iui-baseline;
60
52
 
61
- @include themed {
62
- color: t(iui-text-color-muted);
63
- }
53
+ @include themed {
54
+ background-color: t(iui-text-color-muted);
55
+ }
56
+ }
57
+
58
+ @mixin iui-legal-footer-developer {
59
+ @include themed {
60
+ color: t(iui-text-color-muted);
64
61
  }
65
62
  }
@@ -48,6 +48,9 @@
48
48
  @include themed {
49
49
  fill: t(iui-icons-color);
50
50
  }
51
+ @media (forced-colors: active) {
52
+ fill: CanvasText;
53
+ }
51
54
 
52
55
  &.iui-informational {
53
56
  @include themed {
@@ -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
+ }
@@ -2,6 +2,14 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './index';
4
4
 
5
+ .iui-slider-horizontal {
6
+ @include iui-slider-horizontal;
7
+ }
8
+
9
+ .iui-slider-vertical {
10
+ @include iui-slider-vertical;
11
+ }
12
+
5
13
  .iui-slider-component-container {
6
14
  @include iui-slider-component-container;
7
15
  }
@@ -25,3 +33,8 @@
25
33
  .iui-slider-track {
26
34
  @include iui-slider-track;
27
35
  }
36
+
37
+ .iui-slider-min,
38
+ .iui-slider-max {
39
+ @include iui-slider-endpoints;
40
+ }
@@ -9,30 +9,18 @@ $tick-height: $iui-baseline; // 11px
9
9
 
10
10
  @mixin iui-slider-component-container {
11
11
  display: flex;
12
- min-height: $iui-baseline * 2;
13
-
14
- .iui-slider-min,
15
- .iui-slider-max {
16
- user-select: all;
17
- margin-top: $iui-xxs;
18
12
 
19
- svg {
20
- @include iui-icons-default;
21
- margin-top: $iui-xs;
22
- }
23
- }
24
-
25
- .iui-slider-min {
26
- margin-right: $iui-sm;
27
- text-align: right;
13
+ &.iui-disabled {
14
+ @include iui-slider-disabled;
28
15
  }
16
+ }
29
17
 
30
- .iui-slider-max {
31
- margin-left: $iui-sm;
32
- }
18
+ @mixin iui-slider-endpoints {
19
+ user-select: all;
33
20
 
34
- &.iui-disabled {
35
- @include iui-slider-disabled;
21
+ svg {
22
+ @include iui-icons-default;
23
+ margin-top: $iui-xs;
36
24
  }
37
25
  }
38
26
 
@@ -49,12 +37,12 @@ $tick-height: $iui-baseline; // 11px
49
37
 
50
38
  @mixin iui-slider-rail {
51
39
  position: absolute;
52
- width: 100%;
53
- height: $track-height;
54
- top: $iui-sm;
55
40
  @include themed {
56
41
  background-color: t(iui-color-background-border);
57
42
  }
43
+ @media (forced-colors: active) {
44
+ background-color: CanvasText;
45
+ }
58
46
  }
59
47
 
60
48
  @mixin iui-slider-thumb {
@@ -62,10 +50,6 @@ $tick-height: $iui-baseline; // 11px
62
50
  height: $thumb-height;
63
51
  width: $thumb-height;
64
52
  border-radius: 100%;
65
- top: $track-height + 1; // position center of thumb in center of track
66
- transform: translateX(
67
- (-$thumb-height - 2) * 0.5
68
- ); // Adjust the left (set in code) by radius of thumb so thumb center is at value position
69
53
  z-index: 1;
70
54
  cursor: grab;
71
55
  @include iui-focus($thickness: 2px);
@@ -73,6 +57,10 @@ $tick-height: $iui-baseline; // 11px
73
57
  background: t(iui-color-background-1);
74
58
  border: 1px solid t(iui-color-background-border);
75
59
  }
60
+ @media (forced-colors: active) {
61
+ background: Canvas;
62
+ border: 1px solid CanvasText;
63
+ }
76
64
 
77
65
  &:active {
78
66
  cursor: grabbing;
@@ -82,17 +70,17 @@ $tick-height: $iui-baseline; // 11px
82
70
  @mixin iui-slider-track {
83
71
  pointer-events: none;
84
72
  position: absolute;
85
- height: $track-height;
86
- left: 0;
87
73
  top: $iui-sm;
88
74
  @include themed {
89
75
  background-color: t(iui-color-foreground-primary);
90
76
  }
77
+ @media (forced-colors: active) {
78
+ background-color: Highlight;
79
+ }
91
80
  }
92
81
 
93
82
  @mixin iui-slider-ticks {
94
83
  position: relative;
95
- padding-top: $iui-m;
96
84
  display: flex;
97
85
  pointer-events: none;
98
86
  justify-content: space-between;
@@ -103,12 +91,15 @@ $tick-height: $iui-baseline; // 11px
103
91
  display: flex;
104
92
  pointer-events: none;
105
93
  justify-content: center;
106
- width: 1px;
107
- height: $tick-height;
108
- line-height: $tick-height * 4;
109
- margin-bottom: $tick-height * 2;
110
- @include themed {
111
- background-color: t(iui-color-background-4);
94
+ align-items: center;
95
+
96
+ &::before {
97
+ @include themed {
98
+ background-color: t(iui-color-background-4);
99
+ }
100
+ @media (forced-colors: active) {
101
+ background-color: CanvasText;
102
+ }
112
103
  }
113
104
  }
114
105
  }
@@ -127,12 +118,19 @@ $tick-height: $iui-baseline; // 11px
127
118
  background-color: t(iui-color-background-4);
128
119
  border-color: t(iui-color-background-4);
129
120
  }
121
+ @media (forced-colors: active) {
122
+ background-color: GrayText;
123
+ border-color: GrayText;
124
+ }
130
125
  }
131
126
 
132
127
  .iui-slider-track {
133
128
  @include themed {
134
129
  background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
135
130
  }
131
+ @media (forced-colors: active) {
132
+ background-color: GrayText;
133
+ }
136
134
  }
137
135
 
138
136
  .iui-slider-min,
@@ -142,5 +140,117 @@ $tick-height: $iui-baseline; // 11px
142
140
  @include themed {
143
141
  color: t(iui-text-color-muted);
144
142
  }
143
+ @media (forced-colors: active) {
144
+ color: GrayText;
145
+ }
146
+ }
147
+ }
148
+
149
+ @mixin iui-slider-horizontal {
150
+ min-height: $iui-baseline * 2;
151
+
152
+ .iui-slider-rail {
153
+ width: 100%;
154
+ height: $track-height;
155
+ top: $iui-sm;
156
+ }
157
+
158
+ .iui-slider-thumb {
159
+ top: $track-height + 1; // position center of thumb in center of track
160
+ transform: translateX(
161
+ -50%
162
+ ); // Adjust the left (set in code) by radius of thumb so thumb center is at value position
163
+ }
164
+
165
+ .iui-slider-track {
166
+ height: $track-height;
167
+ left: 0;
168
+ }
169
+
170
+ .iui-slider-ticks {
171
+ padding-top: $iui-m;
172
+
173
+ .iui-slider-tick {
174
+ flex-direction: column;
175
+ width: 1px;
176
+
177
+ &::before {
178
+ content: '';
179
+ width: 1px;
180
+ height: $tick-height;
181
+ }
182
+ }
183
+ }
184
+
185
+ .iui-slider-min,
186
+ .iui-slider-max {
187
+ margin-top: $iui-xxs;
188
+ }
189
+
190
+ .iui-slider-min {
191
+ margin-right: $iui-sm;
192
+ text-align: right;
193
+ }
194
+
195
+ .iui-slider-max {
196
+ margin-left: $iui-sm;
197
+ }
198
+ }
199
+
200
+ @mixin iui-slider-vertical {
201
+ flex-direction: column-reverse;
202
+ min-width: $iui-baseline * 2;
203
+ height: 100%;
204
+
205
+ .iui-slider-rail {
206
+ width: $track-height;
207
+ height: 100%;
208
+ left: $iui-sm;
209
+ }
210
+
211
+ .iui-slider-thumb {
212
+ transform: translateY(
213
+ 50%
214
+ ); // Adjust the bottom (set in code) by radius of thumb so thumb center is at value position
215
+ left: $track-height + 1;
216
+ }
217
+
218
+ .iui-slider-track {
219
+ width: $track-height;
220
+ bottom: 0;
221
+ left: $iui-sm;
222
+ }
223
+
224
+ .iui-slider-ticks {
225
+ padding-left: $iui-m;
226
+ flex-direction: column-reverse;
227
+ align-items: flex-start;
228
+ height: 100%;
229
+
230
+ .iui-slider-tick {
231
+ flex: row;
232
+ height: 1px;
233
+
234
+ &::before {
235
+ content: '';
236
+ width: $tick-height;
237
+ height: 1px;
238
+ margin-right: $tick-height * 1;
239
+ }
240
+ }
241
+ }
242
+
243
+ .iui-slider-min,
244
+ .iui-slider-max {
245
+ margin-left: $iui-xxs;
246
+ text-align: center;
247
+ }
248
+
249
+ .iui-slider-min {
250
+ margin-top: $iui-sm;
251
+ }
252
+
253
+ .iui-slider-max {
254
+ margin-bottom: $iui-sm;
145
255
  }
146
256
  }
@@ -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
 
@@ -195,7 +195,11 @@
195
195
 
196
196
  &.iui-zebra-striping .iui-row:nth-child(even):not(.iui-selected) .iui-cell {
197
197
  @include themed {
198
- background-color: rgba(t(iui-color-foreground-body-rgb), 0.02);
198
+ background: linear-gradient(
199
+ rgba(t(iui-color-foreground-body-rgb), 0.02),
200
+ rgba(t(iui-color-foreground-body-rgb), 0.02)
201
+ ),
202
+ linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
199
203
  }
200
204
  }
201
205
 
@@ -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;
@@ -4,6 +4,18 @@
4
4
 
5
5
  .iui-tile {
6
6
  @include iui-tile;
7
+
8
+ &.iui-positive {
9
+ @include iui-tile-status(positive);
10
+ }
11
+
12
+ &.iui-warning {
13
+ @include iui-tile-status(warning);
14
+ }
15
+
16
+ &.iui-negative {
17
+ @include iui-tile-status(negative);
18
+ }
7
19
  }
8
20
 
9
21
  .iui-tile-thumbnail-type-indicator {