@itwin/itwinui-css 0.45.0 → 0.48.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 (43) hide show
  1. package/css/all.css +699 -710
  2. package/css/badge.css +4 -2
  3. package/css/button.css +31 -96
  4. package/css/color-picker.css +26 -21
  5. package/css/expandable-block.css +12 -0
  6. package/css/inputs.css +498 -503
  7. package/css/popover.css +3 -3
  8. package/css/side-navigation.css +2 -4
  9. package/css/skip-to-content.css +51 -0
  10. package/css/table.css +10 -49
  11. package/css/tile.css +42 -15
  12. package/css/tree.css +21 -15
  13. package/package.json +2 -2
  14. package/scss/badge/badge.scss +5 -2
  15. package/scss/button/button-group.scss +19 -41
  16. package/scss/button/button.scss +19 -1
  17. package/scss/button/classes.scss +0 -1
  18. package/scss/button/default.scss +1 -0
  19. package/scss/classes.scss +1 -0
  20. package/scss/color-picker/color-picker.scss +57 -52
  21. package/scss/expandable-block/block.scss +23 -0
  22. package/scss/index.scss +1 -0
  23. package/scss/inputs/checkbox-radio.scss +17 -136
  24. package/scss/inputs/checkbox.scss +77 -43
  25. package/scss/inputs/classes.scss +15 -9
  26. package/scss/inputs/index.scss +1 -0
  27. package/scss/inputs/input-with-icon.scss +36 -0
  28. package/scss/inputs/input.scss +1 -0
  29. package/scss/inputs/labeled-inputs.scss +49 -14
  30. package/scss/inputs/radio.scss +9 -3
  31. package/scss/inputs/select.scss +44 -93
  32. package/scss/popover/popover.scss +7 -6
  33. package/scss/side-navigation/side-navigation.scss +3 -6
  34. package/scss/skip-to-content/classes.scss +7 -0
  35. package/scss/skip-to-content/index.scss +3 -0
  36. package/scss/skip-to-content/skip-to-content.scss +37 -0
  37. package/scss/style/mixins.scss +29 -4
  38. package/scss/style/variables.scss +1 -0
  39. package/scss/table/paginator.scss +5 -10
  40. package/scss/tile/classes.scss +4 -0
  41. package/scss/tile/tile.scss +17 -16
  42. package/scss/tree/classes.scss +4 -0
  43. package/scss/tree/tree.scss +17 -4
@@ -7,11 +7,13 @@
7
7
  $iui-color-picker-content-width: ($iui-l * 9) + ($iui-s * 8); // (9 swatches per row) + (gaps)
8
8
  $iui-color-picker-max-width: ($iui-l * 10) + ($iui-s * 9); // (10 swatches per row) + (gaps)
9
9
  $iui-color-swatch-border-radius: 5px;
10
- $iui-inset-box-shadow: inset 0 0 0 1px rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
11
- $iui-active-box-shadow: 0 0 0 $iui-xxs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3));
12
- $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
10
+ $iui-inset-box-shadow: inset 0 0 0 1px rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
11
+ $iui-active-box-shadow: 0 0 0 $iui-xxs rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-3));
12
+ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
13
13
 
14
14
  @mixin iui-color-picker {
15
+ --iui-color-picker-selected-color: initial;
16
+
15
17
  @include iui-dropdown;
16
18
  box-sizing: border-box;
17
19
  border-radius: $iui-border-radius;
@@ -37,40 +39,43 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
37
39
  }
38
40
 
39
41
  @mixin iui-color-swatch {
42
+ --iui-color-swatch-background: initial;
43
+
40
44
  height: $iui-l;
41
45
  width: $iui-l;
42
46
  cursor: pointer;
43
47
  border-radius: $iui-color-swatch-border-radius;
44
- background-color: var(--swatch-color);
45
48
  margin-bottom: $iui-xs;
46
49
  margin-right: $iui-xs;
47
-
50
+ position: relative;
51
+ background-color: var(--iui-color-swatch-background);
52
+ @include iui-transparent-background;
48
53
  @supports (gap: $iui-s) {
49
54
  margin-bottom: 0;
50
55
  margin-right: 0;
51
56
  }
52
57
 
53
- @include themed {
58
+ &::after {
59
+ content: '';
60
+ position: absolute;
61
+ width: inherit;
62
+ height: inherit;
63
+ border-radius: inherit;
64
+ background-color: inherit;
54
65
  box-shadow: $iui-inset-box-shadow;
55
66
  }
56
67
 
57
68
  &:hover {
58
- @include themed {
59
- box-shadow: $iui-hover-box-shadow, $iui-inset-box-shadow;
60
- }
69
+ box-shadow: $iui-hover-box-shadow, $iui-inset-box-shadow;
61
70
  }
62
71
 
63
- @include iui-focus($offset: 0, $thickness: 2px);
72
+ @include iui-focus($offset: 1px, $thickness: 2px);
64
73
 
65
74
  &.iui-active {
66
- @include themed {
67
- box-shadow: $iui-active-box-shadow, $iui-inset-box-shadow;
68
- }
75
+ box-shadow: $iui-active-box-shadow, $iui-inset-box-shadow;
69
76
 
70
77
  &:hover {
71
- @include themed {
72
- box-shadow: $iui-hover-box-shadow, $iui-inset-box-shadow, $iui-active-box-shadow;
73
- }
78
+ box-shadow: $iui-hover-box-shadow, $iui-inset-box-shadow, $iui-active-box-shadow;
74
79
  }
75
80
  }
76
81
  }
@@ -159,14 +164,14 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
159
164
  }
160
165
 
161
166
  @mixin iui-color-field {
167
+ --iui-color-field-hue: initial;
168
+
162
169
  position: relative;
163
170
  cursor: crosshair;
164
171
  width: 100%;
165
172
  height: $iui-baseline * 19;
166
- @include themed {
167
- background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent),
168
- linear-gradient(90deg, rgb(255, 255, 255), var(--hue));
169
- }
173
+ background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent),
174
+ linear-gradient(90deg, rgb(255, 255, 255), var(--iui-color-field-hue));
170
175
 
171
176
  &:not(:last-child) {
172
177
  margin-bottom: round($iui-baseline * 0.5);
@@ -198,34 +203,14 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
198
203
  @mixin iui-opacity-slider {
199
204
  .iui-slider-rail {
200
205
  height: $iui-s;
201
- @include themed {
202
- // Checkered transparency background pattern.
203
- background-image: repeating-linear-gradient(
204
- 45deg,
205
- t(iui-color-background-3) 25%,
206
- transparent 25%,
207
- transparent 75%,
208
- t(iui-color-background-3) 75%,
209
- t(iui-color-background-3)
210
- ),
211
- repeating-linear-gradient(
212
- 45deg,
213
- t(iui-color-background-3) 25%,
214
- t(iui-color-background-5) 25%,
215
- t(iui-color-background-5) 75%,
216
- t(iui-color-background-3) 75%,
217
- t(iui-color-background-3)
218
- );
219
- background-position: 0 0, ($iui-s * 0.5) ($iui-s * 0.5);
220
- background-size: $iui-s $iui-s;
221
- }
206
+ @include iui-transparent-background($size: $iui-s);
222
207
 
223
208
  &::before {
224
209
  display: block;
225
210
  content: '';
226
211
  width: 100%;
227
212
  height: 100%;
228
- background-image: linear-gradient(to right, transparent 0%, var(--selected-color) 100%);
213
+ background-image: linear-gradient(to right, transparent 0%, var(--iui-color-picker-selected-color) 100%);
229
214
  }
230
215
  }
231
216
 
@@ -235,25 +220,45 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
235
220
  }
236
221
 
237
222
  @mixin iui-color-dot {
223
+ --iui-color-dot-inset: initial;
224
+
238
225
  position: absolute;
239
- top: var(--top, 0%);
240
- left: var(--left, 0%);
226
+ inset: var(--iui-color-dot-inset);
241
227
  width: $iui-m;
242
228
  height: $iui-m;
243
229
  border-radius: 50%;
244
230
  transform: translate(-$iui-s, -$iui-s);
245
231
  cursor: crosshair;
246
- @include themed {
247
- box-shadow: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-1)) 0 0 0 $iui-xxs - 1,
248
- inset 0 0 0 $iui-xxs - 1 rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-6));
249
- background-color: var(--selected-color);
250
- }
232
+ box-shadow: rgba(var(--iui-color-foreground-accessory-rgb), var(--iui-opacity-1)) 0 0 0 $iui-xxs - 1,
233
+ inset 0 0 0 $iui-xxs - 1 rgba(var(--iui-color-foreground-accessory-rgb), var(--iui-opacity-6));
234
+ background-color: var(--iui-color-picker-selected-color);
251
235
 
252
236
  &:hover {
253
- @include themed {
254
- box-shadow: $iui-hover-box-shadow;
255
- }
237
+ box-shadow: $iui-hover-box-shadow;
256
238
  }
257
239
 
258
240
  @include iui-focus($offset: 0, $thickness: 2px);
259
241
  }
242
+
243
+ @mixin iui-transparent-background($size: $iui-m) {
244
+ background-position: 0 0, ($size * 0.5) ($size * 0.5);
245
+ background-size: $size $size;
246
+ @include themed {
247
+ background-image: repeating-linear-gradient(
248
+ 45deg,
249
+ t(iui-color-background-3) 25%,
250
+ transparent 25%,
251
+ transparent 75%,
252
+ t(iui-color-background-3) 75%,
253
+ t(iui-color-background-3)
254
+ ),
255
+ repeating-linear-gradient(
256
+ 45deg,
257
+ t(iui-color-background-3) 25%,
258
+ t(iui-color-background-5) 25%,
259
+ t(iui-color-background-5) 75%,
260
+ t(iui-color-background-3) 75%,
261
+ t(iui-color-background-3)
262
+ );
263
+ }
264
+ }
@@ -167,4 +167,27 @@
167
167
  margin-left: $iui-s;
168
168
  }
169
169
  }
170
+
171
+ &.iui-borderless {
172
+ &,
173
+ .iui-header,
174
+ .iui-expandable-content {
175
+ background-color: transparent;
176
+ border: initial;
177
+ }
178
+
179
+ .iui-header {
180
+ border-radius: $iui-border-radius;
181
+
182
+ &:hover {
183
+ @include themed {
184
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
185
+ }
186
+ }
187
+ }
188
+
189
+ .iui-expandable-content > div {
190
+ padding: 0;
191
+ }
192
+ }
170
193
  }
package/scss/index.scss CHANGED
@@ -39,3 +39,4 @@
39
39
  @import './tree/index';
40
40
  @import './user-icon/index';
41
41
  @import './wizard/index';
42
+ @import './skip-to-content/index';
@@ -15,64 +15,24 @@
15
15
  color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
16
16
  }
17
17
 
18
- > input {
19
- width: 0;
20
- height: 0;
21
- appearance: none;
22
- opacity: 0;
23
- position: absolute;
24
- }
25
-
26
- &.iui-disabled {
27
- cursor: not-allowed;
28
- }
29
-
30
- .iui-checkbox-checkmark,
31
- .iui-radio-dot {
32
- width: $iui-icons-default;
33
- height: $iui-icons-default;
34
- margin: 0;
35
- display: flex;
36
- flex-shrink: 0;
37
- justify-content: center;
38
- align-items: center;
39
- position: relative;
40
- isolation: isolate;
41
- @include themed {
42
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
43
- background-color: t(iui-color-background-1);
44
- }
18
+ gap: $iui-s;
45
19
 
46
- &::after {
47
- content: '';
48
- position: absolute;
49
- inset: 0;
50
- z-index: -1;
51
- transition: border-color $iui-speed-fast ease-out;
52
- border-radius: inherit;
53
- border-style: solid;
54
- border-width: 1px;
55
- border-color: inherit;
20
+ // #region flex gap fallback
21
+ > * + * {
22
+ margin-left: $iui-s;
23
+ @supports (gap: $iui-s) {
24
+ margin-left: 0;
56
25
  }
26
+ }
27
+ // #endregion
57
28
 
58
- svg:not(.iui-radial) {
59
- width: 100%;
60
- height: 100%;
61
- @include themed {
62
- fill: t(iui-icons-color-primary);
63
- }
64
-
65
- > * {
66
- opacity: 0;
67
- @media (prefers-reduced-motion: no-preference) {
68
- transition: opacity $iui-speed-fast ease;
69
- }
70
- }
71
- }
29
+ &.iui-loading {
30
+ cursor: wait;
31
+ color: var(--iui-text-color-muted);
72
32
  }
73
33
 
74
- > .iui-label {
75
- margin-right: $iui-s;
34
+ > .iui-checkbox-label,
35
+ > .iui-radio-label {
76
36
  display: flex;
77
37
  align-items: center;
78
38
 
@@ -80,95 +40,16 @@
80
40
  width: $iui-icons-default;
81
41
  height: $iui-icons-default;
82
42
  vertical-align: middle;
83
- @include themed {
84
- fill: t(iui-icons-color-actionable);
85
- }
43
+ fill: currentColor;
86
44
  }
87
45
  }
88
46
 
89
- // For labels on the left
90
- .iui-checkbox-checkmark ~ .iui-label,
91
- .iui-radio-dot ~ .iui-label {
92
- margin-left: $iui-s;
93
- margin-right: 0;
94
- }
95
-
96
- // Adds hover to everything that is not disabled
97
- &:hover > input:enabled ~ .iui-checkbox-checkmark,
98
- &:hover > input:enabled ~ .iui-radio-dot {
99
- @include themed {
100
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
101
- }
102
- }
103
-
104
- // Selected checkboxes & radios border opacity increase
105
- input:checked ~ .iui-checkbox-checkmark,
106
- input:indeterminate ~ .iui-checkbox-checkmark,
107
- input:checked ~ .iui-radio-dot {
108
- @include themed {
109
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-3));
110
- }
111
- }
112
-
113
- // Show check, partial, or dot depending on type
114
- input:checked ~ .iui-checkbox-checkmark .iui-check,
115
- input:indeterminate ~ .iui-checkbox-checkmark .iui-check-partial,
116
- input:checked ~ .iui-radio-dot circle {
117
- opacity: 1;
118
- @media (prefers-reduced-motion: no-preference) {
119
- transition: opacity $iui-speed-fast ease;
120
- }
121
- }
122
-
123
- // Adds focus to enabled checkbox & radio
124
- input:enabled {
125
- &:focus {
126
- ~ .iui-checkbox-checkmark,
127
- ~ .iui-radio-dot {
128
- @include themed {
129
- outline: 2px solid t(iui-color-foreground-primary);
130
- }
131
- outline-offset: -1px;
132
- }
133
- }
134
-
135
- &:focus:not(:focus-visible) {
136
- ~ .iui-checkbox-checkmark,
137
- ~ .iui-radio-dot {
138
- outline: none;
139
- }
140
- }
141
- }
142
-
143
- // Styles disabled checkbox & radio
144
- input:disabled ~ .iui-checkbox-checkmark,
145
- input:disabled ~ .iui-radio-dot {
146
- cursor: not-allowed;
147
- @include themed {
148
- background-color: t(iui-color-background-disabled);
149
- border-color: t(iui-color-background-disabled);
150
- }
151
- }
152
-
153
- // Styles disabled checks
154
- input:disabled ~ .iui-checkbox-checkmark svg,
155
- input:disabled ~ .iui-radio-dot svg {
156
- @include themed {
157
- fill: t(iui-icons-color-actionable-disabled);
158
- }
159
- }
160
-
161
- // Styles disabled labels
162
- input:disabled ~ .iui-label {
47
+ &.iui-disabled {
163
48
  cursor: not-allowed;
164
- @include themed {
165
- color: t(iui-text-color-muted);
166
- }
49
+ color: var(--iui-text-color-muted);
167
50
 
168
51
  svg {
169
- @include themed {
170
- fill: t(iui-icons-color-actionable-disabled);
171
- }
52
+ fill: var(--iui-icons-color-actionable-disabled);
172
53
  }
173
54
  }
174
55
 
@@ -4,63 +4,97 @@
4
4
  @import '../icon/index';
5
5
 
6
6
  @mixin iui-checkbox {
7
- @include iui-inputs-checkbox-radio;
7
+ &-wrapper {
8
+ @include iui-inputs-checkbox-radio;
9
+ }
10
+
11
+ --_iui-checkbox-checkmark-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m6.5 12.5-4.5-4.5 1.5-1.5 3 3 6-6 1.5 1.5z" /></svg>');
12
+ --_iui-checkbox-indeterminate-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m2.75 6.875h10.5v2.25h-10.5z" /></svg>');
13
+ --_iui-checkbox-unchecked-svg: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16"></svg>');
14
+
15
+ --_iui-checkbox-svg-color: var(--iui-color-foreground-primary);
16
+ --_iui-checkbox-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
17
+ --_iui-checkbox-background-color: var(--iui-color-background-1);
18
+ --_iui-checkbox-mask-image: initial;
8
19
 
9
- .iui-checkbox-checkmark {
10
- border-radius: $iui-border-radius;
20
+ appearance: none; // disable default browser styles
21
+ margin: 0;
22
+ width: $iui-icons-default;
23
+ height: $iui-icons-default;
24
+ position: relative;
25
+ border-radius: $iui-border-radius;
26
+ background-color: var(--_iui-checkbox-background-color);
27
+ cursor: pointer;
28
+
29
+ &::before {
30
+ content: '';
31
+ position: absolute;
32
+ inset: 0;
33
+ transition: border-color $iui-speed-fast ease-out;
34
+ border-radius: inherit;
35
+ border-style: solid;
36
+ border-width: 1px;
37
+ border-color: var(--_iui-checkbox-border-color);
11
38
  }
12
39
 
13
- &.iui-loading {
14
- cursor: wait;
40
+ &::after {
41
+ content: '';
42
+ position: absolute;
43
+ inset: 0;
44
+ background-color: var(--_iui-checkbox-svg-color);
45
+ mask: var(--_iui-checkbox-mask-image) no-repeat center;
46
+ }
15
47
 
16
- input ~ .iui-checkbox-checkmark {
17
- border-color: transparent;
18
- background-color: transparent;
19
- }
48
+ &:not(:checked) {
49
+ --_iui-checkbox-mask-image: var(--_iui-checkbox-unchecked-svg);
50
+ }
20
51
 
21
- input:disabled ~ .iui-checkbox-checkmark {
22
- cursor: wait;
23
- }
52
+ &:checked {
53
+ --_iui-checkbox-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-3));
54
+ --_iui-checkbox-mask-image: var(--_iui-checkbox-checkmark-svg);
55
+ }
24
56
 
25
- input:disabled ~ .iui-label {
26
- cursor: wait;
27
- }
57
+ &:indeterminate {
58
+ --_iui-checkbox-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-3));
59
+ --_iui-checkbox-mask-image: var(--_iui-checkbox-indeterminate-svg);
28
60
  }
29
61
 
30
- &-visibility {
31
- // Adds hover to everything that is not disabled
32
- &:hover > input:enabled ~ .iui-checkbox-checkmark {
33
- @include themed {
34
- background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
35
- }
36
- }
62
+ &:hover {
63
+ --_iui-checkbox-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
64
+ }
37
65
 
38
- input ~ .iui-checkbox-checkmark::after,
39
- &:hover > input:enabled ~ .iui-checkbox-checkmark::after {
40
- border: none;
41
- }
66
+ @include iui-focus($thickness: 2px);
42
67
 
43
- input ~ .iui-checkbox-checkmark {
44
- background-color: transparent;
45
- }
68
+ &.iui-checkbox-visibility {
69
+ --_iui-checkbox-checkmark-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m8 2.99051a8.81883 8.81883 0 0 0 -8 4.95062 8.74664 8.74664 0 0 0 8 5.06836 8.63266 8.63266 0 0 0 8-5.06836 8.83631 8.83631 0 0 0 -8-4.95062zm-1.31445 1.86981a1.47663 1.47663 0 1 1 -1.47663 1.47668 1.47665 1.47665 0 0 1 1.47663-1.47668zm1.31445 6.64917a7.17486 7.17486 0 0 1 -6.30475-3.55237 7.4952 7.4952 0 0 1 2.81475-2.6336 3.83956 3.83956 0 1 0 6.98126.00244 7.522 7.522 0 0 1 2.81774 2.63916 7.09785 7.09785 0 0 1 -6.309 3.54437z" /></svg>');
70
+ --_iui-checkbox-indeterminate-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m8 3v7.9a4.01179 4.01179 0 0 0 4-4 6.7509 6.7509 0 0 0 -.2-1.4l.1.1a6.89429 6.89429 0 0 1 2.4 2.4 8.39088 8.39088 0 0 1 -2.3 2.3 6.89412 6.89412 0 0 1 -3.9 1.2c-.03345 0-.06653-.00677-.1-.0072v1.5072a8.90686 8.90686 0 0 0 8-5 8.90686 8.90686 0 0 0 -8-5z" opacity=".33" /><path d="m8 0a1 1 0 0 0 -1 1v2.07135a8.91637 8.91637 0 0 0 -7 4.92865 8.91637 8.91637 0 0 0 7 4.92865v2.07135a1 1 0 0 0 2 0v-14a1 1 0 0 0 -1-1zm-1.5 4.9a1.55426 1.55426 0 0 1 .5.087v2.81451a1.40746 1.40746 0 0 1 -.5.09849 1.538 1.538 0 0 1 -1.5-1.5 1.53794 1.53794 0 0 1 1.5-1.5zm-2.3 5.4a6.97279 6.97279 0 0 1 -2.5-2.3 6.89429 6.89429 0 0 1 2.4-2.4c.1 0 .1-.1.2-.1a3.194 3.194 0 0 0 -.3 1.4 4.0047 4.0047 0 0 0 3 3.857v.65289a6.37491 6.37491 0 0 1 -2.8-1.10989z" /></svg>');
71
+ --_iui-checkbox-unchecked-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m1.70671 12.879 11.17218-11.17219 1.4142 1.4142-11.17218 11.17218zm.99329-1.679 1.1-1.1a5.06317 5.06317 0 0 1 -2-2.1 7.48268 7.48268 0 0 1 6.2-3.5 4.86877 4.86877 0 0 1 1.2.1l1.3-1.3a10.07431 10.07431 0 0 0 -2.5-.3 8.84129 8.84129 0 0 0 -8 5 8.42455 8.42455 0 0 0 2.7 3.2zm10.7-6.4-1.1 1.1a7.08625 7.08625 0 0 1 2 2.1 7.50323 7.50323 0 0 1 -6.2 3.5 8.31665 8.31665 0 0 1 -1.3-.2l-1.3 1.3a8.909 8.909 0 0 0 6.4-.5 9.04344 9.04344 0 0 0 4.1-4.1 9.168 9.168 0 0 0 -2.6-3.2z" /></svg>');
46
72
 
47
- input:checked ~ .iui-checkbox-checkmark .iui-uncheck,
48
- input:indeterminate ~ .iui-checkbox-checkmark .iui-uncheck {
49
- opacity: 0;
50
- }
73
+ --_iui-checkbox-border-color: transparent;
74
+ --_iui-checkbox-background-color: transparent;
51
75
 
52
- input ~ .iui-checkbox-checkmark .iui-uncheck {
53
- opacity: 1;
54
- transition: opacity $iui-speed-fast ease;
55
- @include themed {
56
- fill: t(iui-icons-color-actionable);
57
- }
76
+ &:where(:not(:checked):not(:indeterminate)) {
77
+ --_iui-checkbox-svg-color: var(--iui-icons-color-actionable);
58
78
  }
59
79
 
60
- input:disabled ~ .iui-checkbox-checkmark .iui-uncheck {
61
- @include themed {
62
- fill: t(iui-icons-color-actionable-disabled);
63
- }
80
+ &:where(:hover) {
81
+ --_iui-checkbox-border-color: transparent;
82
+ --_iui-checkbox-background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-6));
64
83
  }
65
84
  }
85
+
86
+ &:disabled {
87
+ --_iui-checkbox-svg-color: var(--iui-icons-color-actionable-disabled);
88
+ --_iui-checkbox-border-color: var(--iui-color-background-disabled);
89
+ --_iui-checkbox-background-color: var(--iui-color-background-disabled);
90
+ cursor: not-allowed;
91
+ }
92
+
93
+ &.iui-loading {
94
+ --_iui-checkbox-border-color: transparent;
95
+ --_iui-checkbox-background-color: transparent;
96
+ opacity: 0;
97
+ position: absolute;
98
+ cursor: wait;
99
+ }
66
100
  }
@@ -9,7 +9,7 @@
9
9
  @include iui-input-container-label;
10
10
  }
11
11
 
12
- > .iui-input-icon {
12
+ .iui-input-icon {
13
13
  @include iui-input-icon;
14
14
  }
15
15
 
@@ -17,18 +17,16 @@
17
17
  @include iui-input-message;
18
18
  }
19
19
 
20
+ &.iui-inline-icon > .iui-input-icon {
21
+ @include iui-input-icon-inline;
22
+ }
23
+
20
24
  &.iui-inline-label {
21
25
  > .iui-label {
22
26
  @include iui-input-label-inline;
23
27
  }
24
28
  }
25
29
 
26
- &.iui-inline-icon {
27
- > .iui-input-icon {
28
- @include iui-input-icon-inline;
29
- }
30
- }
31
-
32
30
  @each $status in positive, negative, warning {
33
31
  &.iui-#{$status} {
34
32
  @include iui-input-status($status: $status);
@@ -44,12 +42,20 @@
44
42
  @include iui-input;
45
43
  }
46
44
 
45
+ .iui-select-button {
46
+ @include iui-select-button;
47
+ }
48
+
47
49
  .iui-textarea {
48
50
  @include iui-textarea;
49
51
  }
50
52
 
51
- .iui-select {
52
- @include iui-select;
53
+ .iui-input-with-icon {
54
+ @include iui-input-with-icon;
55
+ }
56
+
57
+ .iui-end-icon {
58
+ @include iui-end-icon;
53
59
  }
54
60
 
55
61
  .iui-checkbox {
@@ -2,6 +2,7 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './labeled-inputs';
4
4
  @import './input';
5
+ @import './input-with-icon';
5
6
  @import './textarea';
6
7
  @import './select';
7
8
  @import './checkbox-radio';
@@ -0,0 +1,36 @@
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
+
5
+ // Mixin to have inputs combined with icon (eg. select)
6
+ @mixin iui-input-with-icon {
7
+ display: grid;
8
+ align-items: center;
9
+ cursor: pointer;
10
+
11
+ > :first-child {
12
+ grid-area: 1 / -1;
13
+ padding-right: $iui-icons-default + $iui-l;
14
+ }
15
+
16
+ &:focus-within {
17
+ > :first-child {
18
+ // --_focus-color can be used to control this from outside
19
+ outline: 2px solid var(--_focus-color, var(--iui-color-foreground-primary));
20
+ outline-offset: -2px;
21
+ }
22
+ }
23
+
24
+ &:hover {
25
+ > :first-child {
26
+ // --_hover-color can be used to control this from outside
27
+ border-color: var(--_hover-color, rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2)));
28
+ }
29
+ }
30
+ }
31
+
32
+ @mixin iui-end-icon {
33
+ @include iui-input-icon-inline;
34
+ display: flex;
35
+ grid-area: 1 / -1;
36
+ }
@@ -63,6 +63,7 @@
63
63
  border-color: t(iui-color-background-disabled);
64
64
  }
65
65
  cursor: not-allowed;
66
+ --_hover-color: var(--iui-color-background-disabled);
66
67
  }
67
68
  }
68
69