@itwin/itwinui-css 0.44.2 → 0.47.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 (47) hide show
  1. package/css/all.css +870 -744
  2. package/css/badge.css +4 -2
  3. package/css/button.css +31 -96
  4. package/css/carousel.css +97 -0
  5. package/css/color-picker.css +11 -8
  6. package/css/expandable-block.css +12 -0
  7. package/css/inputs.css +216 -224
  8. package/css/popover.css +12 -0
  9. package/css/side-navigation.css +2 -4
  10. package/css/skip-to-content.css +51 -0
  11. package/css/table.css +11 -50
  12. package/css/tile.css +368 -301
  13. package/css/tree.css +19 -14
  14. package/package.json +2 -2
  15. package/scss/badge/badge.scss +5 -2
  16. package/scss/button/button-group.scss +19 -41
  17. package/scss/button/button.scss +19 -1
  18. package/scss/button/classes.scss +0 -1
  19. package/scss/button/default.scss +1 -0
  20. package/scss/carousel/carousel.scss +119 -0
  21. package/scss/carousel/classes.scss +15 -0
  22. package/scss/carousel/index.scss +3 -0
  23. package/scss/classes.scss +3 -0
  24. package/scss/color-picker/color-picker.scss +13 -6
  25. package/scss/expandable-block/block.scss +23 -0
  26. package/scss/index.scss +3 -0
  27. package/scss/inputs/classes.scss +15 -9
  28. package/scss/inputs/index.scss +1 -0
  29. package/scss/inputs/input-with-icon.scss +36 -0
  30. package/scss/inputs/input.scss +1 -0
  31. package/scss/inputs/labeled-inputs.scss +47 -12
  32. package/scss/inputs/select.scss +44 -93
  33. package/scss/popover/classes.scss +7 -0
  34. package/scss/popover/index.scss +3 -0
  35. package/scss/popover/popover.scss +23 -0
  36. package/scss/side-navigation/side-navigation.scss +3 -6
  37. package/scss/skip-to-content/classes.scss +7 -0
  38. package/scss/skip-to-content/index.scss +3 -0
  39. package/scss/skip-to-content/skip-to-content.scss +36 -0
  40. package/scss/style/mixins.scss +29 -4
  41. package/scss/style/variables.scss +1 -0
  42. package/scss/table/paginator.scss +5 -10
  43. package/scss/table/table.scss +1 -1
  44. package/scss/tile/classes.scss +32 -0
  45. package/scss/tile/tile.scss +231 -235
  46. package/scss/tree/classes.scss +4 -0
  47. package/scss/tree/tree.scss +16 -4
package/css/tree.css CHANGED
@@ -16,6 +16,25 @@
16
16
  vertical-align:baseline;
17
17
  list-style:none; }
18
18
 
19
+ .iui-tree-item:focus-visible{
20
+ outline:none; }
21
+ .iui-tree-item:focus-visible > .iui-tree-node{
22
+ outline:1px solid var(--iui-color-foreground-primary);
23
+ outline-offset:-1px; }
24
+ .iui-tree-item:focus-visible > .iui-tree-node.iui-active{
25
+ outline:2px solid var(--iui-color-foreground-primary);
26
+ outline-offset:-2px; }
27
+
28
+ @supports not selector(*:focus-visible){
29
+ .iui-tree-item:focus{
30
+ outline:none; }
31
+ .iui-tree-item:focus > .iui-tree-node{
32
+ outline:1px solid var(--iui-color-foreground-primary);
33
+ outline-offset:-1px; }
34
+ .iui-tree-item:focus > .iui-tree-node.iui-active{
35
+ outline:2px solid var(--iui-color-foreground-primary);
36
+ outline-offset:-2px; } }
37
+
19
38
  .iui-tree-node{
20
39
  display:flex;
21
40
  cursor:pointer;
@@ -72,13 +91,6 @@
72
91
  font-size:12px;
73
92
  color:rgba(0, 0, 0, 0.4);
74
93
  color:var(--iui-text-color-muted); }
75
- .iui-tree-node:focus-visible{
76
- outline:1px solid var(--iui-color-foreground-primary);
77
- outline-offset:-1px; }
78
- @supports not selector(*:focus-visible){
79
- .iui-tree-node:focus{
80
- outline:1px solid var(--iui-color-foreground-primary);
81
- outline-offset:-1px; } }
82
94
  .iui-tree-node:hover{
83
95
  background-color:rgba(0, 139, 225, 0.1);
84
96
  background-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6)); }
@@ -93,13 +105,6 @@
93
105
  background-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
94
106
  outline:thin solid var(--iui-color-foreground-primary);
95
107
  outline-offset:-1px; }
96
- .iui-tree-node.iui-active:focus-visible{
97
- outline:2px solid var(--iui-color-foreground-primary);
98
- outline-offset:-2px; }
99
- @supports not selector(*:focus-visible){
100
- .iui-tree-node.iui-active:focus{
101
- outline:2px solid var(--iui-color-foreground-primary);
102
- outline-offset:-2px; } }
103
108
  .iui-tree-node.iui-disabled{
104
109
  cursor:not-allowed;
105
110
  outline:none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.44.2",
3
+ "version": "0.47.0",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -68,7 +68,7 @@
68
68
  "html-minifier": "^4.0.0",
69
69
  "husky": "=4",
70
70
  "lint-staged": "^11.2.6",
71
- "node-sass": "^5.0.0",
71
+ "node-sass": "^7.0.0",
72
72
  "postcss": "^8.4.5",
73
73
  "postcss-cli": "^8.3.1",
74
74
  "postcss-discard-comments": "^5.0.1",
@@ -11,14 +11,17 @@ $iui-badge-background-primary: $iui-color-foreground-primary--dark;
11
11
  $iui-badge-text-color: rgba($iui-color-foreground-body--light, $iui-opacity-3--light);
12
12
 
13
13
  @mixin iui-badge {
14
+ --iui-badge-background-color: #{$iui-badge-background-default};
15
+ --_iui-badge-text-color: #{$iui-badge-text-color};
16
+
14
17
  @include iui-reset;
15
18
  display: inline-block;
16
19
  font-size: $iui-font-size-small;
17
20
  padding: 0 $iui-xs * 1.5;
18
21
  margin: round($iui-baseline * 0.5) 0;
19
22
  border-radius: $iui-border-radius;
20
- background-color: var(--badge-color, $iui-badge-background-default);
21
- color: var(--badge-text-color, $iui-badge-text-color);
23
+ background-color: var(--iui-badge-background-color);
24
+ color: var(--_iui-badge-text-color);
22
25
  text-transform: uppercase;
23
26
  user-select: none;
24
27
  max-width: 20ch;
@@ -7,29 +7,36 @@
7
7
  align-items: center;
8
8
  isolation: isolate;
9
9
 
10
- $childSelector: 'input, button'; // target nested inputs and buttons
10
+ $childZindexSelector: '.iui-input-container, .iui-button, .iui-input:where(:not(.iui-input-container .iui-input))';
11
+ $childBorderSelector: '.iui-input, .iui-button:where(:not(.iui-borderless))';
12
+ $disabledSelector: '&:disabled, &.iui-disabled, &[aria-disabled="true"]';
11
13
 
12
14
  > * {
13
15
  display: flex;
14
16
 
15
- #{$childSelector} {
17
+ #{$childZindexSelector} {
16
18
  position: relative;
17
19
 
20
+ // Adds stripe above active button
21
+ --_iui-button-active-stripe-inset: #{$iui-xxs} #{$iui-xxs} calc(100% - #{$iui-xs});
22
+
18
23
  &:hover {
19
24
  z-index: 1;
20
25
  }
21
26
 
22
- &:focus {
27
+ &:focus,
28
+ &:focus-within {
23
29
  z-index: 2;
24
-
25
- &:where(:not(:focus-visible):not(:hover)) {
26
- z-index: revert;
27
- }
28
30
  }
29
31
 
30
- &:disabled {
32
+ #{$disabledSelector} {
31
33
  z-index: -1;
32
34
  }
35
+ }
36
+
37
+ #{$childBorderSelector} {
38
+ // Reset border radius
39
+ border-radius: 0;
33
40
 
34
41
  transition-duration: 0ms; // disable exit animation to avoid border flicker
35
42
 
@@ -37,47 +44,18 @@
37
44
  &:focus {
38
45
  transition-duration: $iui-speed-fast; // re-enable enter animation
39
46
  }
40
-
41
- // Adds stripe above active button
42
- &.iui-active {
43
- &::after {
44
- content: '';
45
- position: absolute;
46
- height: $iui-xxs;
47
- opacity: 1;
48
- top: $iui-xxs;
49
- left: $iui-xxs;
50
- width: calc(100% - #{$iui-xs});
51
- @include themed {
52
- background-color: t(iui-color-foreground-primary);
53
- }
54
- }
55
-
56
- &:disabled {
57
- &::after {
58
- @include themed {
59
- background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
60
- }
61
- }
62
- }
63
- }
64
-
65
- // Reset border radius only for non-borderless items
66
- &:not(.iui-borderless) {
67
- border-radius: 0;
68
- }
69
47
  }
70
48
 
71
49
  // Add rounded corners to first and last items
72
50
  &:first-child {
73
- #{$childSelector}:not(.iui-borderless) {
51
+ #{$childBorderSelector} {
74
52
  border-top-left-radius: $iui-border-radius;
75
53
  border-bottom-left-radius: $iui-border-radius;
76
54
  }
77
55
  }
78
56
 
79
57
  &:last-child {
80
- #{$childSelector}:not(.iui-borderless) {
58
+ #{$childBorderSelector} {
81
59
  border-top-right-radius: $iui-border-radius;
82
60
  border-bottom-right-radius: $iui-border-radius;
83
61
  }
@@ -89,8 +67,8 @@
89
67
  }
90
68
 
91
69
  // Add slight border between disabled items
92
- &:not(:first-child) {
93
- .iui-default:disabled {
70
+ &:not(:first-child) :where(.iui-button.iui-default) {
71
+ #{$disabledSelector} {
94
72
  @include themed {
95
73
  border-left-color: t(iui-color-background-4);
96
74
  }
@@ -10,6 +10,8 @@ $iui-button-padding-small: $iui-xs * 2;
10
10
  $iui-button-padding-large: $iui-xs * 6;
11
11
 
12
12
  @mixin iui-button {
13
+ --_iui-button-active-stripe-inset: initial;
14
+
13
15
  @include iui-reset;
14
16
  font-family: inherit;
15
17
  display: inline-flex;
@@ -20,7 +22,6 @@ $iui-button-padding-large: $iui-xs * 6;
20
22
  box-sizing: border-box;
21
23
  border-radius: $iui-border-radius;
22
24
  line-height: $iui-line-height;
23
- outline: none;
24
25
  box-shadow: none;
25
26
  font-size: $iui-font-size;
26
27
  font-weight: $iui-font-weight-normal;
@@ -51,6 +52,23 @@ $iui-button-padding-large: $iui-xs * 6;
51
52
  &:disabled {
52
53
  @include iui-button-disabled;
53
54
  }
55
+
56
+ &.iui-active {
57
+ // Shows active stripe only if --_iui-button-active-stripe-inset is set (from outside)
58
+ &::after {
59
+ content: '';
60
+ position: absolute;
61
+ inset: var(--_iui-button-active-stripe-inset);
62
+ background-color: var(--iui-color-foreground-primary);
63
+ }
64
+
65
+ &[disabled],
66
+ &:disabled {
67
+ &::after {
68
+ background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
69
+ }
70
+ }
71
+ }
54
72
  }
55
73
 
56
74
  /// Mixin for applying padding and margins to various button sizes.
@@ -50,7 +50,6 @@
50
50
  }
51
51
 
52
52
  .iui-button-split-menu {
53
- @include iui-button-group;
54
53
  @include iui-button-split-menu;
55
54
  }
56
55
 
@@ -43,6 +43,7 @@
43
43
  color: t(iui-color-foreground-primary);
44
44
  }
45
45
 
46
+ // Used for combining overlay background color with base background
46
47
  &::before {
47
48
  content: '';
48
49
  position: absolute;
@@ -0,0 +1,119 @@
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 '../text/index';
5
+ @import '../button/button';
6
+
7
+ @mixin iui-carousel {
8
+ overflow: hidden;
9
+ @include iui-focus($offset: 4px);
10
+ border-radius: $iui-border-radius;
11
+ }
12
+
13
+ @mixin iui-carousel-slider {
14
+ display: flex;
15
+ list-style: none;
16
+ margin: 0;
17
+ padding: 0;
18
+ @media (prefers-reduced-motion: no-preference) {
19
+ transition: transform $iui-speed-slow ease-in-out;
20
+ }
21
+
22
+ &-item {
23
+ width: 100%;
24
+ flex-shrink: 0;
25
+ box-sizing: border-box;
26
+ }
27
+ }
28
+
29
+ @mixin iui-carousel-navigation {
30
+ display: flex;
31
+ align-items: center;
32
+ height: $iui-baseline * 3;
33
+ box-sizing: border-box;
34
+ @include themed {
35
+ border-top: $iui-xxs solid t(iui-color-background-4);
36
+ }
37
+
38
+ &-dots,
39
+ &-left,
40
+ &-right {
41
+ display: flex;
42
+ align-items: center;
43
+ flex: 1;
44
+
45
+ button[data-pressed='true'] {
46
+ outline-offset: -1px;
47
+ @include themed {
48
+ outline: 1px solid t(iui-color-foreground-primary);
49
+ }
50
+ }
51
+ }
52
+
53
+ &-dots {
54
+ @include iui-reset;
55
+ @include iui-focus;
56
+ border-radius: $iui-border-radius;
57
+ white-space: nowrap;
58
+ overflow: hidden;
59
+ justify-content: center;
60
+ list-style: none;
61
+ }
62
+
63
+ &-dot {
64
+ @include iui-button-size($size: small);
65
+ background-color: transparent;
66
+ border: none;
67
+ cursor: pointer;
68
+
69
+ &:hover::after {
70
+ @include themed {
71
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-3));
72
+ }
73
+ }
74
+
75
+ &.iui-invisible {
76
+ display: none;
77
+ }
78
+
79
+ &::after {
80
+ content: '';
81
+ display: block;
82
+ width: $iui-icons-small;
83
+ height: $iui-icons-small;
84
+ border-radius: 50%;
85
+ transition: background-color $iui-speed-fast ease;
86
+ @media (prefers-reduced-motion: no-preference) {
87
+ transition: background-color $iui-speed-fast $iui-speed-fast ease, transform $iui-speed ease;
88
+ }
89
+ @include themed {
90
+ background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
91
+ }
92
+ }
93
+
94
+ &.iui-first::after {
95
+ transform: scale(0.5);
96
+ }
97
+
98
+ &.iui-second::after {
99
+ transform: scale(0.75);
100
+ }
101
+
102
+ &.iui-invisible::after {
103
+ transform: scale(0);
104
+ @include themed {
105
+ background-color: rgba(t(iui-color-foreground-body-rgb), 0);
106
+ }
107
+ }
108
+
109
+ &.iui-active::after {
110
+ @include themed {
111
+ background-color: t(iui-color-foreground-primary);
112
+ }
113
+ }
114
+ }
115
+
116
+ &-right {
117
+ justify-content: flex-end;
118
+ }
119
+ }
@@ -0,0 +1,15 @@
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-carousel {
6
+ @include iui-carousel;
7
+ }
8
+
9
+ .iui-carousel-slider {
10
+ @include iui-carousel-slider;
11
+ }
12
+
13
+ .iui-carousel-navigation {
14
+ @include iui-carousel-navigation;
15
+ }
@@ -0,0 +1,3 @@
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 './carousel';
package/scss/classes.scss CHANGED
@@ -7,6 +7,7 @@
7
7
  @import './blockquote/classes';
8
8
  @import './breadcrumbs/classes';
9
9
  @import './button/classes';
10
+ @import './carousel/classes';
10
11
  @import './code/classes';
11
12
  @import './color-picker/classes';
12
13
  @import './date-picker/classes';
@@ -24,6 +25,7 @@
24
25
  @import './modal/classes';
25
26
  @import './non-ideal-state/classes';
26
27
  @import './notification-marker/classes';
28
+ @import './popover/classes';
27
29
  @import './progress-indicator/classes';
28
30
  @import './side-navigation/classes';
29
31
  @import './slider/classes';
@@ -39,3 +41,4 @@
39
41
  @import './tree/classes';
40
42
  @import './user-icon/classes';
41
43
  @import './wizard/classes';
44
+ @import './skip-to-content/classes';
@@ -12,6 +12,8 @@ $iui-active-box-shadow: 0 0 0 $iui-xxs rgba(t(iui-color-foreground-primary-rgb),
12
12
  $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb), t(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,11 +39,13 @@ $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);
48
+ background-color: var(--iui-color-swatch-background);
45
49
  margin-bottom: $iui-xs;
46
50
  margin-right: $iui-xs;
47
51
 
@@ -159,13 +163,15 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
159
163
  }
160
164
 
161
165
  @mixin iui-color-field {
166
+ --iui-color-field-hue: initial;
167
+
162
168
  position: relative;
163
169
  cursor: crosshair;
164
170
  width: 100%;
165
171
  height: $iui-baseline * 19;
166
172
  @include themed {
167
173
  background-image: linear-gradient(0deg, rgb(0, 0, 0), transparent),
168
- linear-gradient(90deg, rgb(255, 255, 255), var(--hue));
174
+ linear-gradient(90deg, rgb(255, 255, 255), var(--iui-color-field-hue));
169
175
  }
170
176
 
171
177
  &:not(:last-child) {
@@ -225,7 +231,7 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
225
231
  content: '';
226
232
  width: 100%;
227
233
  height: 100%;
228
- background-image: linear-gradient(to right, transparent 0%, var(--selected-color) 100%);
234
+ background-image: linear-gradient(to right, transparent 0%, var(--iui-color-picker-selected-color) 100%);
229
235
  }
230
236
  }
231
237
 
@@ -235,9 +241,10 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
235
241
  }
236
242
 
237
243
  @mixin iui-color-dot {
244
+ --iui-color-dot-inset: initial;
245
+
238
246
  position: absolute;
239
- top: var(--top, 0%);
240
- left: var(--left, 0%);
247
+ inset: var(--iui-color-dot-inset);
241
248
  width: $iui-m;
242
249
  height: $iui-m;
243
250
  border-radius: 50%;
@@ -246,7 +253,7 @@ $iui-hover-box-shadow: 0 0 1px $iui-xxs + 1 rgba(t(iui-color-foreground-body-rgb
246
253
  @include themed {
247
254
  box-shadow: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-1)) 0 0 0 $iui-xxs - 1,
248
255
  inset 0 0 0 $iui-xxs - 1 rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-6));
249
- background-color: var(--selected-color);
256
+ background-color: var(--iui-color-picker-selected-color);
250
257
  }
251
258
 
252
259
  &:hover {
@@ -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
@@ -6,6 +6,7 @@
6
6
  @import './blockquote/index';
7
7
  @import './breadcrumbs/index';
8
8
  @import './button/index';
9
+ @import './carousel/index';
9
10
  @import './code/index';
10
11
  @import './color-picker/index';
11
12
  @import './date-picker/index';
@@ -22,6 +23,7 @@
22
23
  @import './modal/index';
23
24
  @import './non-ideal-state/index';
24
25
  @import './notification-marker/index';
26
+ @import './popover/index';
25
27
  @import './progress-indicator/index';
26
28
  @import './side-navigation/index';
27
29
  @import './slider/index';
@@ -37,3 +39,4 @@
37
39
  @import './tree/index';
38
40
  @import './user-icon/index';
39
41
  @import './wizard/index';
42
+ @import './skip-to-content/index';
@@ -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