@itwin/itwinui-css 0.59.2 → 1.0.0-dev.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 (202) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -4
  3. package/css/alert.css +273 -139
  4. package/css/all.css +4046 -4967
  5. package/css/anchor.css +1 -5
  6. package/css/{user-icon.css → avatar.css} +51 -71
  7. package/css/backdrop.css +24 -0
  8. package/css/badge.css +2 -2
  9. package/css/blockquote.css +1 -4
  10. package/css/breadcrumbs.css +64 -137
  11. package/css/button.css +264 -349
  12. package/css/carousel.css +8 -16
  13. package/css/checkbox.css +149 -0
  14. package/css/code.css +5 -13
  15. package/css/color-picker.css +6 -44
  16. package/css/date-picker.css +6 -65
  17. package/css/dialog.css +63 -101
  18. package/css/expandable-block.css +1 -32
  19. package/css/fieldset.css +2 -7
  20. package/css/file-upload.css +0 -15
  21. package/css/footer.css +1 -9
  22. package/css/global.css +8 -63
  23. package/css/header.css +312 -398
  24. package/css/icon.css +0 -30
  25. package/css/information-panel.css +1 -15
  26. package/css/input.css +162 -0
  27. package/css/keyboard.css +2 -6
  28. package/css/location-marker.css +1 -12
  29. package/css/menu.css +1 -17
  30. package/css/progress-indicator.css +1 -93
  31. package/css/radio-tile.css +38 -65
  32. package/css/radio.css +156 -0
  33. package/css/select.css +230 -0
  34. package/css/side-navigation.css +5 -20
  35. package/css/skip-to-content.css +0 -3
  36. package/css/slider.css +2 -14
  37. package/css/stepper.css +141 -0
  38. package/css/surface.css +0 -1
  39. package/css/table.css +252 -339
  40. package/css/tabs.css +26 -65
  41. package/css/tag.css +7 -32
  42. package/css/text.css +1 -3
  43. package/css/textarea.css +96 -0
  44. package/css/tile.css +169 -155
  45. package/css/time-picker.css +2 -14
  46. package/css/{toast-notification.css → toast.css} +3 -45
  47. package/css/toggle-switch.css +13 -60
  48. package/css/tooltip.css +1 -4
  49. package/css/tree.css +0 -14
  50. package/css/utils.css +609 -0
  51. package/css/workflow-diagram.css +67 -0
  52. package/package.json +11 -7
  53. package/scss/alert/alert.scss +50 -44
  54. package/scss/alert/classes.scss +24 -4
  55. package/scss/anchor/anchor.scss +76 -1
  56. package/scss/{user-icon/sizes.scss → avatar/avatar-sizes.scss} +6 -5
  57. package/scss/{user-icon/user-icon.scss → avatar/avatar.scss} +35 -70
  58. package/scss/avatar/classes.scss +27 -0
  59. package/scss/{user-icon → avatar}/index.scss +1 -2
  60. package/scss/backdrop/backdrop.scss +27 -0
  61. package/scss/backdrop/classes.scss +7 -0
  62. package/scss/backdrop/index.scss +3 -0
  63. package/scss/badge/badge.scss +4 -2
  64. package/scss/blockquote/blockquote.scss +4 -9
  65. package/scss/breadcrumbs/breadcrumbs.scss +13 -18
  66. package/scss/button/borderless.scss +20 -32
  67. package/scss/button/button-group.scss +15 -7
  68. package/scss/button/button.scss +64 -42
  69. package/scss/button/classes.scss +47 -37
  70. package/scss/button/default.scss +33 -41
  71. package/scss/button/idea.scss +4 -2
  72. package/scss/button/index.scss +3 -6
  73. package/scss/button/split-button.scss +45 -0
  74. package/scss/button/variant.scss +44 -0
  75. package/scss/carousel/carousel.scss +12 -23
  76. package/scss/{inputs → checkbox}/checkbox.scss +50 -2
  77. package/scss/checkbox/classes.scss +7 -0
  78. package/scss/checkbox/index.scss +3 -0
  79. package/scss/classes.scss +11 -6
  80. package/scss/code/code.scss +3 -5
  81. package/scss/code/codeblock.scss +7 -21
  82. package/scss/color-picker/color-picker.scss +32 -61
  83. package/scss/date-picker/date-picker.scss +21 -55
  84. package/scss/dialog/classes.scss +7 -6
  85. package/scss/dialog/dialog.scss +95 -130
  86. package/scss/expandable-block/block.scss +22 -50
  87. package/scss/fieldset/fieldset.scss +6 -12
  88. package/scss/file-upload/file-upload.scss +13 -23
  89. package/scss/footer/footer.scss +5 -15
  90. package/scss/header/classes.scss +70 -2
  91. package/scss/header/header-buttons.scss +316 -0
  92. package/scss/header/header.scss +40 -408
  93. package/scss/header/index.scss +1 -0
  94. package/scss/icon/{mixins.scss → icon.scss} +5 -15
  95. package/scss/icon/index.scss +1 -2
  96. package/scss/index.scss +11 -6
  97. package/scss/information-panel/information-panel.scss +8 -26
  98. package/scss/input/classes.scss +15 -0
  99. package/scss/input/index.scss +4 -0
  100. package/scss/{inputs → input}/input-with-icon.scss +1 -0
  101. package/scss/{inputs → input}/input.scss +15 -25
  102. package/scss/keyboard/keyboard.scss +5 -9
  103. package/scss/location-marker/data-rich.scss +5 -14
  104. package/scss/location-marker/default.scss +1 -3
  105. package/scss/location-marker/location-marker.scss +1 -3
  106. package/scss/location-marker/me.scss +7 -14
  107. package/scss/menu/menu.scss +16 -36
  108. package/scss/non-ideal-state/non-ideal-state.scss +2 -1
  109. package/scss/progress-indicator/classes.scss +0 -4
  110. package/scss/progress-indicator/linear.scss +9 -27
  111. package/scss/progress-indicator/overlay.scss +4 -10
  112. package/scss/progress-indicator/radial.scss +10 -98
  113. package/scss/radio/classes.scss +7 -0
  114. package/scss/radio/index.scss +3 -0
  115. package/scss/{inputs → radio}/radio.scss +1 -1
  116. package/scss/radio-tile/radio-tile.scss +41 -83
  117. package/scss/select/classes.scss +27 -0
  118. package/scss/select/index.scss +3 -0
  119. package/scss/select/select.scss +124 -0
  120. package/scss/side-navigation/side-navigation.scss +26 -34
  121. package/scss/skip-to-content/skip-to-content.scss +2 -3
  122. package/scss/slider/slider.scss +12 -23
  123. package/scss/stepper/classes.scss +32 -0
  124. package/scss/stepper/index.scss +3 -0
  125. package/scss/stepper/stepper.scss +151 -0
  126. package/scss/style/{variables.scss → global-variables.scss} +4 -2
  127. package/scss/style/global.scss +9 -10
  128. package/scss/{icon/variables.scss → style/icon-sizes.scss} +1 -1
  129. package/scss/style/index.scss +6 -6
  130. package/scss/style/theme.scss +0 -39
  131. package/scss/style/typography.scss +5 -4
  132. package/scss/surface/surface.scss +0 -1
  133. package/scss/table/classes.scss +24 -23
  134. package/scss/table/column-filter.scss +2 -5
  135. package/scss/table/index.scss +1 -2
  136. package/scss/table/paginator.scss +22 -30
  137. package/scss/table/sizes.scss +31 -0
  138. package/scss/table/{variables.scss → table-densities.scss} +2 -1
  139. package/scss/table/table.scss +156 -228
  140. package/scss/tabs/borderless.scss +9 -22
  141. package/scss/tabs/classes.scss +4 -0
  142. package/scss/tabs/default.scss +11 -25
  143. package/scss/tabs/pill.scss +5 -15
  144. package/scss/tabs/tabs.scss +30 -57
  145. package/scss/tag/classes.scss +1 -0
  146. package/scss/tag/tag.scss +11 -21
  147. package/scss/text/mixins.scss +1 -0
  148. package/scss/text/muted.scss +2 -4
  149. package/scss/text/skeleton.scss +8 -11
  150. package/scss/textarea/classes.scss +7 -0
  151. package/scss/textarea/index.scss +3 -0
  152. package/scss/{inputs → textarea}/textarea.scss +2 -1
  153. package/scss/tile/classes.scss +14 -2
  154. package/scss/tile/tile.scss +99 -80
  155. package/scss/time-picker/time-picker.scss +8 -17
  156. package/scss/{toast-notification → toast}/categories.scss +3 -7
  157. package/scss/{toast-notification → toast}/classes.scss +0 -0
  158. package/scss/{toast-notification → toast}/index.scss +0 -0
  159. package/scss/{toast-notification → toast}/toast.scss +7 -16
  160. package/scss/toggle-switch/toggle-switch.scss +11 -30
  161. package/scss/tooltip/tooltip.scss +4 -5
  162. package/scss/tree/tree.scss +10 -22
  163. package/scss/utils/classes.scss +6 -0
  164. package/scss/utils/index.scss +6 -0
  165. package/scss/{inputs → utils/input-container}/classes.scss +0 -28
  166. package/scss/utils/input-container/index.scss +3 -0
  167. package/scss/{inputs/labeled-inputs.scss → utils/input-container/input-container.scss} +16 -113
  168. package/scss/{style → utils}/mixins.scss +26 -43
  169. package/scss/{notification-marker → utils/notification-marker}/classes.scss +0 -0
  170. package/scss/{notification-marker → utils/notification-marker}/index.scss +0 -0
  171. package/scss/{notification-marker → utils/notification-marker}/notification-marker.scss +11 -19
  172. package/scss/{popover → utils/popover}/classes.scss +0 -0
  173. package/scss/{popover → utils/popover}/index.scss +0 -0
  174. package/scss/{popover → utils/popover}/popover.scss +0 -1
  175. package/scss/workflow-diagram/classes.scss +15 -0
  176. package/scss/workflow-diagram/index.scss +3 -0
  177. package/scss/workflow-diagram/workflow-diagram.scss +64 -0
  178. package/src/index.scss +11 -6
  179. package/css/inputs.css +0 -1143
  180. package/css/notification-marker.css +0 -293
  181. package/css/popover.css +0 -14
  182. package/css/reset-global-styles.css +0 -50
  183. package/css/wizard.css +0 -190
  184. package/scss/button/button-icon.scss +0 -12
  185. package/scss/button/cta.scss +0 -31
  186. package/scss/button/disabled.scss +0 -13
  187. package/scss/button/high-visibility.scss +0 -31
  188. package/scss/button/split-menu.scss +0 -66
  189. package/scss/inputs/checkbox-radio.scss +0 -73
  190. package/scss/inputs/index.scss +0 -10
  191. package/scss/inputs/select.scss +0 -66
  192. package/scss/reset-global-styles.scss +0 -33
  193. package/scss/style/anchor.scss +0 -82
  194. package/scss/style/ripple.scss +0 -18
  195. package/scss/table/condensed.scss +0 -15
  196. package/scss/table/extra-condensed.scss +0 -19
  197. package/scss/user-icon/classes.scss +0 -27
  198. package/scss/wizard/classes.scss +0 -27
  199. package/scss/wizard/index.scss +0 -5
  200. package/scss/wizard/long.scss +0 -19
  201. package/scss/wizard/wizard.scss +0 -160
  202. package/scss/wizard/workflow.scss +0 -43
@@ -1,7 +1,7 @@
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 '../style/index';
4
- @import '../icon/index';
4
+ @import '../utils/index';
5
5
  @import '../surface/index';
6
6
 
7
7
  $iui-date-picker-cell-width: 40px;
@@ -26,7 +26,6 @@ $iui-date-picker-today-circle-size: 32px;
26
26
  align-items: center;
27
27
  justify-content: space-between;
28
28
  padding: 0 $iui-xs;
29
- box-sizing: border-box;
30
29
  font-weight: $iui-font-weight-bold;
31
30
  gap: $iui-xs;
32
31
 
@@ -54,9 +53,7 @@ $iui-date-picker-today-circle-size: 32px;
54
53
  display: flex;
55
54
  padding: 0 $iui-s;
56
55
  font-weight: $iui-font-weight-bold;
57
- @include themed {
58
- background-color: t(iui-color-background-2);
59
- }
56
+ background-color: var(--iui-color-background-2);
60
57
 
61
58
  > div {
62
59
  white-space: nowrap;
@@ -88,10 +85,8 @@ $iui-date-picker-today-circle-size: 32px;
88
85
  @mixin iui-calendar-day-base-hover {
89
86
  &:hover {
90
87
  font-weight: $iui-font-weight-semibold;
91
- @include themed {
92
- color: t(iui-color-foreground-primary);
93
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
94
- }
88
+ color: var(--iui-color-foreground-primary);
89
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6));
95
90
  }
96
91
  }
97
92
 
@@ -106,56 +101,41 @@ $iui-date-picker-today-circle-size: 32px;
106
101
  width: $iui-date-picker-today-circle-size;
107
102
  height: $iui-date-picker-today-circle-size;
108
103
  border-radius: $iui-border-radius-round;
109
- box-sizing: border-box;
110
104
  top: 50%;
111
105
  left: 50%;
112
106
  transform: translate(-50%, -50%);
113
- @include themed {
114
- border: 2px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-5));
115
- }
107
+ border: 2px solid rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
116
108
  }
117
109
 
118
110
  &:hover {
119
111
  background-color: initial;
120
- @include themed {
121
- color: t(iui-color-foreground-primary);
122
- }
112
+ color: var(--iui-color-foreground-primary);
123
113
  }
124
114
 
125
115
  &:hover::before {
126
- @include themed {
127
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
128
- }
116
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6));
129
117
  }
130
118
  }
131
119
 
132
120
  @mixin iui-calendar-day-selected-base {
133
121
  font-weight: $iui-font-weight-semibold;
134
- @include themed {
135
- background-color: t(iui-color-background-primary);
136
- color: t(iui-color-foreground-accessory);
137
- }
122
+ background-color: var(--iui-color-background-primary);
123
+ color: var(--iui-color-foreground-accessory);
138
124
  @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px);
139
125
  }
140
126
 
141
127
  @mixin iui-calendar-day-selected-today-base {
142
128
  &:hover {
143
- @include themed {
144
- background-color: t(iui-color-background-primary);
145
- color: t(iui-color-foreground-accessory);
146
- }
129
+ background-color: var(--iui-color-background-primary);
130
+ color: var(--iui-color-foreground-accessory);
147
131
 
148
132
  &::before {
149
- @include themed {
150
- background-color: initial;
151
- }
133
+ background-color: initial;
152
134
  }
153
135
  }
154
136
 
155
137
  &::before {
156
- @include themed {
157
- border-color: rgba(t(iui-color-foreground-accessory-rgb), t(iui-opacity-4));
158
- }
138
+ border-color: rgba(var(--iui-color-foreground-accessory-rgb), var(--iui-opacity-4));
159
139
  }
160
140
  }
161
141
  //#endregion Helper mixins
@@ -225,17 +205,12 @@ $iui-date-picker-today-circle-size: 32px;
225
205
  @include iui-calendar-day-base;
226
206
 
227
207
  border-radius: 0;
228
- @include themed {
229
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5));
230
- color: t(iui-text-color);
231
- }
208
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
209
+ color: var(--iui-text-color);
232
210
 
233
211
  &:hover {
234
212
  font-weight: $iui-font-weight-semibold;
235
-
236
- @include themed {
237
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
238
- }
213
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-4));
239
214
  }
240
215
  }
241
216
 
@@ -243,22 +218,16 @@ $iui-date-picker-today-circle-size: 32px;
243
218
  @include iui-calendar-day-today-base;
244
219
 
245
220
  &:hover {
246
- @include themed {
247
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5));
248
- color: t(iui-text-color);
249
- }
221
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
222
+ color: var(--iui-text-color);
250
223
 
251
224
  &::before {
252
- @include themed {
253
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
254
- }
225
+ background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-4));
255
226
  }
256
227
  }
257
228
 
258
229
  &::before {
259
- @include themed {
260
- border-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
261
- }
230
+ border-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-4));
262
231
  }
263
232
  }
264
233
  }
@@ -268,10 +237,7 @@ $iui-date-picker-today-circle-size: 32px;
268
237
  &-today {
269
238
  @include iui-calendar-day-base;
270
239
  @include iui-calendar-day-base-hover;
271
-
272
- @include themed {
273
- color: t(iui-text-color-muted);
274
- }
240
+ color: var(--iui-text-color-muted);
275
241
  }
276
242
 
277
243
  &-today {
@@ -2,12 +2,8 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './index';
4
4
 
5
- .iui-dialog-backdrop {
6
- @include iui-dialog-backdrop;
7
-
8
- &.iui-dialog-backdrop-relative {
9
- @include iui-dialog-backdrop-relative;
10
- }
5
+ .iui-dialog-wrapper {
6
+ @include iui-dialog-wrapper;
11
7
  }
12
8
 
13
9
  .iui-dialog {
@@ -16,6 +12,7 @@
16
12
 
17
13
  .iui-dialog-default {
18
14
  @include iui-dialog-default;
15
+ @include iui-dialog-placement;
19
16
  }
20
17
 
21
18
  .iui-dialog-full-page {
@@ -34,6 +31,10 @@
34
31
  @include iui-dialog-title-bar;
35
32
  }
36
33
 
34
+ .iui-dialog-title-bar-filled {
35
+ @include iui-dialog-title-bar-filled;
36
+ }
37
+
37
38
  .iui-dialog-content {
38
39
  @include iui-dialog-content;
39
40
  }
@@ -1,146 +1,135 @@
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 '../style/index';
4
- @import '../icon/index';
4
+ @import '../utils/index';
5
5
 
6
- @mixin iui-dialog-backdrop {
7
- @include iui-reset;
8
- z-index: 999;
9
- isolation: isolate;
10
- position: fixed;
6
+ $iui-dialog-width: 380px;
7
+
8
+ @mixin iui-dialog-wrapper {
9
+ position: relative;
10
+ overflow: hidden;
11
11
  top: 0;
12
12
  left: 0;
13
13
  width: 100%;
14
14
  height: 100%;
15
- @include themed {
16
- background-color: rgba(0, 0, 0, t(iui-opacity-4));
17
- }
18
-
19
- // Small/Resizable Dialog Animations for CSS
20
- visibility: hidden;
21
- opacity: 0;
22
- transition: visibility $iui-speed-instant linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
23
-
24
- &.iui-dialog-visible {
25
- visibility: visible;
26
- opacity: 1;
27
- // remove delay for entry animation so dialog is instantly visible
28
- transition-delay: $iui-speed-instant;
29
- }
30
- }
31
-
32
- @mixin iui-dialog-backdrop-relative {
33
- position: relative;
34
- overflow: hidden;
15
+ pointer-events: none;
16
+ transform: translateX(0); // creates containing block for position: fixed
35
17
  }
36
18
 
37
19
  @mixin iui-dialog {
20
+ z-index: 999;
21
+ isolation: isolate;
38
22
  border-radius: $iui-border-radius;
39
23
  box-shadow: $iui-elevation-24;
40
- box-sizing: border-box;
41
- position: absolute;
42
- padding: $iui-baseline $iui-m;
43
- box-sizing: border-box;
24
+ position: fixed;
44
25
  padding: $iui-baseline $iui-m;
45
26
  overflow: hidden;
46
- @include themed {
47
- background-color: t(iui-color-background-1);
48
- }
27
+ pointer-events: auto;
28
+ background-color: var(--iui-color-background-1);
49
29
  @media (forced-colors: active) {
50
30
  border: 1px solid;
51
31
  }
32
+
33
+ &:not(.iui-dialog-visible) {
34
+ visibility: hidden;
35
+ opacity: 0;
36
+ }
37
+
38
+ transition: visibility $iui-speed-instant linear, opacity $iui-speed-fast ease-out;
39
+ transition-delay: $iui-speed-fast, $iui-speed-instant;
40
+
41
+ &.iui-dialog-visible {
42
+ transition-delay: $iui-speed-instant; // remove delay for entry animation
43
+ }
52
44
  }
53
45
 
54
46
  @mixin iui-dialog-default {
55
- .iui-dialog {
47
+ max-width: Max(50%, $iui-dialog-width);
48
+ min-width: $iui-dialog-width;
49
+ max-height: 100vh;
50
+ }
51
+
52
+ @mixin iui-dialog-placement {
53
+ &:not([data-iui-placement]) {
56
54
  left: 50%;
57
55
  top: 33%;
58
56
  transform: translate(-50%, -33%);
59
- max-width: 50%;
60
- min-width: 380px;
61
- max-height: 100vh;
62
-
63
- @media screen and (max-width: 400px) {
64
- max-width: 95%;
65
- width: 95%;
66
- min-width: 95%;
67
- }
68
57
  }
69
- }
70
58
 
71
- @mixin iui-dialog-full-page {
72
- @media (prefers-reduced-motion: no-preference) {
73
- transition: visibility $iui-speed-instant linear $iui-speed-slow, opacity $iui-speed ease-out $iui-speed-fast;
59
+ &[data-iui-placement='top-left'] {
60
+ top: 0;
61
+ left: 0;
62
+ margin-left: $iui-baseline;
63
+ margin-top: $iui-m;
74
64
  }
75
65
 
76
- .iui-dialog {
77
- border-radius: 0;
78
- height: 100vh;
79
- width: 100vw;
66
+ &[data-iui-placement='top-right'] {
80
67
  top: 0;
68
+ right: 0;
69
+ margin-right: $iui-baseline;
70
+ margin-top: $iui-m;
71
+ }
72
+
73
+ &[data-iui-placement='bottom-left'] {
74
+ bottom: 0;
81
75
  left: 0;
82
- max-width: initial;
83
- min-width: initial;
84
- display: flex;
85
- flex-direction: column;
86
- will-change: transform;
87
- @media (prefers-reduced-motion: no-preference) {
88
- transform: translateY(100%);
89
- transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
90
- transform $iui-speed-fast ease-in;
91
- }
76
+ margin-left: $iui-baseline;
77
+ margin-bottom: $iui-m;
92
78
  }
93
79
 
94
- &.iui-dialog-visible .iui-dialog {
95
- transform: translateY(0);
96
- @media (prefers-reduced-motion: no-preference) {
80
+ &[data-iui-placement='bottom-right'] {
81
+ bottom: 0;
82
+ right: 0;
83
+ margin-right: $iui-baseline;
84
+ margin-bottom: $iui-m;
85
+ }
86
+ }
87
+
88
+ @mixin iui-dialog-full-page {
89
+ border-radius: 0;
90
+ height: 100vh;
91
+ height: 100dvh;
92
+ width: 100vw;
93
+ top: 0;
94
+ left: 0;
95
+ display: flex;
96
+ flex-direction: column;
97
+ will-change: transform;
98
+
99
+ &:not(.iui-dialog-visible) {
100
+ transform: translateY(100%);
101
+ }
102
+
103
+ @media (prefers-reduced-motion: no-preference) {
104
+ transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
105
+ transform $iui-speed-fast ease-in;
106
+
107
+ &.iui-dialog-visible {
97
108
  transition: transform $iui-speed ease-out;
98
109
  }
99
110
  }
100
111
  }
101
112
 
102
113
  @mixin iui-dialog-draggable {
103
- background-color: transparent;
104
- pointer-events: none;
105
- z-index: 998;
106
-
107
- .iui-dialog {
108
- pointer-events: initial;
109
- max-width: 100vw;
110
- max-height: 100vh;
111
- min-width: 380px;
112
- min-height: 144px;
113
- display: flex;
114
- flex-direction: column;
115
- padding: 0;
116
- @include themed {
117
- border: 1px solid t(iui-color-background-border);
118
- }
119
- }
114
+ max-width: 100%;
115
+ max-height: 100vh;
116
+ min-width: $iui-dialog-width;
117
+ min-height: 144px;
118
+ display: flex;
119
+ flex-direction: column;
120
+ border: 1px solid var(--iui-color-background-border);
120
121
  }
121
122
 
122
123
  @mixin iui-dialog-animation {
123
- // Full Page Dialog Animations for React
124
- &-enter .iui-dialog-full-page .iui-dialog {
124
+ &-enter {
125
125
  transform: translateY(100%);
126
126
  opacity: 0;
127
127
  }
128
128
 
129
- &-enter-active .iui-dialog-full-page .iui-dialog {
129
+ &-enter-active {
130
130
  transform: translateY(0);
131
131
  opacity: 1;
132
132
  }
133
-
134
- // Small Dialog Animations for React
135
- &-enter .iui-dialog-backdrop {
136
- visibility: hidden;
137
- opacity: 0;
138
- }
139
-
140
- &-enter-active .iui-dialog-backdrop {
141
- visibility: visible;
142
- opacity: 1;
143
- }
144
133
  }
145
134
 
146
135
  @mixin iui-dialog-title {
@@ -156,22 +145,19 @@
156
145
  align-items: center;
157
146
  margin-bottom: $iui-baseline;
158
147
  justify-content: space-between;
159
- box-sizing: border-box;
160
148
  font-size: $iui-font-size-subheading;
149
+ }
161
150
 
162
- @at-root .iui-dialog-draggable & {
163
- user-select: none;
164
- font-size: $iui-font-size-leading;
165
- padding: round($iui-baseline * 0.5) $iui-m;
166
- cursor: grab;
167
- @include themed {
168
- background-color: t(iui-color-background-3);
169
- border-bottom: 1px solid t(iui-color-background-border);
170
- }
151
+ @mixin iui-dialog-title-bar-filled {
152
+ font-size: $iui-font-size-leading;
153
+ padding: round($iui-baseline * 0.5) $iui-m;
154
+ margin: -#{$iui-baseline} -#{$iui-m} $iui-baseline -#{$iui-m}; // negative margin to counteract dialog padding
155
+ cursor: grab;
156
+ background-color: var(--iui-color-background-3);
157
+ border-bottom: 1px solid var(--iui-color-background-border);
171
158
 
172
- &:active {
173
- cursor: grabbing;
174
- }
159
+ &:active {
160
+ cursor: grabbing;
175
161
  }
176
162
  }
177
163
 
@@ -181,10 +167,6 @@
181
167
  padding: 0 $iui-m;
182
168
  overflow-y: auto;
183
169
  overflow-y: overlay;
184
-
185
- @at-root .iui-dialog-draggable & {
186
- margin: 0;
187
- }
188
170
  }
189
171
 
190
172
  @mixin iui-dialog-button-bar {
@@ -192,22 +174,5 @@
192
174
  display: flex;
193
175
  align-items: center;
194
176
  justify-content: flex-end;
195
-
196
- @at-root .iui-dialog-draggable & {
197
- padding: 0 $iui-m $iui-baseline $iui-m;
198
- }
199
-
200
- // #region IE support
201
- > .iui-button:not(:last-child) {
202
- margin-right: $iui-s;
203
- }
204
-
205
- @supports (column-gap: $iui-s) {
206
- column-gap: $iui-s;
207
-
208
- > .iui-button:not(:last-child) {
209
- margin-right: 0;
210
- }
211
- }
212
- // #endregion IE support
177
+ gap: $iui-s;
213
178
  }
@@ -1,18 +1,15 @@
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 '../style/index';
4
- @import '../text/mixins';
4
+ @import '../utils/index';
5
5
  @import '../icon/index';
6
6
 
7
7
  @mixin iui-expandable-block {
8
8
  @include iui-reset;
9
9
  display: flex;
10
10
  flex-direction: column;
11
- box-sizing: border-box;
12
11
  width: 100%;
13
- @include themed {
14
- background-color: t(iui-color-background-1);
15
- }
12
+ background-color: var(--iui-color-background-1);
16
13
 
17
14
  > .iui-header {
18
15
  @include iui-focus;
@@ -20,16 +17,13 @@
20
17
  align-items: center;
21
18
  padding: $iui-baseline $iui-sm;
22
19
  cursor: pointer;
23
- box-sizing: border-box;
24
20
  user-select: none;
25
21
  @media (prefers-reduced-motion: no-preference) {
26
22
  transition: background-color $iui-speed-fast ease-out;
27
23
  }
28
- @include themed {
29
- border: 1px solid t(iui-color-background-3);
30
- border-bottom-color: t(iui-color-background-4);
31
- background-color: t(iui-color-background-3);
32
- }
24
+ border: 1px solid var(--iui-color-background-3);
25
+ border-bottom-color: var(--iui-color-background-4);
26
+ background-color: var(--iui-color-background-3);
33
27
 
34
28
  > .iui-icon,
35
29
  > .iui-status-icon {
@@ -43,9 +37,7 @@
43
37
  @media (prefers-reduced-motion: no-preference) {
44
38
  transition: transform $iui-speed-fast ease-out;
45
39
  }
46
- @include themed {
47
- fill: t(iui-icons-color-actionable);
48
- }
40
+ fill: var(--iui-icons-color-actionable);
49
41
  }
50
42
 
51
43
  > .iui-status-icon {
@@ -62,9 +54,7 @@
62
54
  @media (prefers-reduced-motion: no-preference) {
63
55
  transition: color $iui-speed-fast ease;
64
56
  }
65
- @include themed {
66
- color: t(iui-text-color);
67
- }
57
+ color: var(--iui-text-color);
68
58
  }
69
59
 
70
60
  .iui-title,
@@ -80,9 +70,7 @@
80
70
 
81
71
  .iui-caption {
82
72
  font-size: $iui-font-size-small;
83
- @include themed {
84
- color: t(iui-text-color-muted);
85
- }
73
+ color: var(--iui-text-color-muted);
86
74
  }
87
75
 
88
76
  @include iui-focus;
@@ -90,13 +78,9 @@
90
78
 
91
79
  .iui-expandable-content {
92
80
  overflow: hidden;
93
- box-sizing: border-box;
94
-
95
- @include themed {
96
- border-bottom: 1px solid t(iui-color-background-4);
97
- border-right: 1px solid t(iui-color-background-4);
98
- border-left: 1px solid t(iui-color-background-4);
99
- }
81
+ border-bottom: 1px solid var(--iui-color-background-4);
82
+ border-right: 1px solid var(--iui-color-background-4);
83
+ border-left: 1px solid var(--iui-color-background-4);
100
84
 
101
85
  @include iui-transition-group;
102
86
 
@@ -108,21 +92,15 @@
108
92
 
109
93
  &:hover {
110
94
  > .iui-header {
111
- @include themed {
112
- background-color: t(iui-color-background-4);
113
- }
95
+ background-color: var(--iui-color-background-4);
114
96
 
115
97
  > .iui-icon {
116
- @include themed {
117
- fill: t(iui-icons-color-actionable-hover);
118
- }
98
+ fill: var(--iui-icons-color-actionable-hover);
119
99
  }
120
100
 
121
101
  .iui-caption,
122
102
  .iui-title {
123
- @include themed {
124
- color: t(iui-color-foreground-body);
125
- }
103
+ color: var(--iui-color-foreground-body);
126
104
  @media (prefers-reduced-motion: no-preference) {
127
105
  transition: color $iui-speed-fast ease;
128
106
  }
@@ -132,17 +110,13 @@
132
110
 
133
111
  &.iui-expanded {
134
112
  > .iui-header {
135
- @include themed {
136
- background-color: t(iui-color-background-3);
137
- border-left: 1px solid t(iui-color-background-4);
138
- border-top: 1px solid t(iui-color-background-4);
139
- border-right: 1px solid t(iui-color-background-4);
140
-
141
- &:hover {
142
- @include themed {
143
- background-color: t(iui-color-background-4);
144
- }
145
- }
113
+ background-color: var(--iui-color-background-3);
114
+ border-left: 1px solid var(--iui-color-background-4);
115
+ border-top: 1px solid var(--iui-color-background-4);
116
+ border-right: 1px solid var(--iui-color-background-4);
117
+
118
+ &:hover {
119
+ background-color: var(--iui-color-background-4);
146
120
  }
147
121
 
148
122
  > .iui-icon {
@@ -180,9 +154,7 @@
180
154
  border-radius: $iui-border-radius;
181
155
 
182
156
  &:hover {
183
- @include themed {
184
- background-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-6));
185
- }
157
+ background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-6));
186
158
  }
187
159
  }
188
160
 
@@ -1,35 +1,29 @@
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 '../style/index';
4
- @import '../inputs/index';
4
+ @import '../utils/index';
5
5
 
6
6
  @mixin iui-fieldset {
7
7
  @include iui-reset;
8
8
  padding: $iui-baseline $iui-sm;
9
9
  border-radius: $iui-border-radius;
10
- @include themed {
11
- border: 1px solid t(iui-color-background-border);
12
- background-color: t(iui-color-background-1);
13
- }
10
+ border: 1px solid var(--iui-color-background-border);
11
+ background-color: var(--iui-color-background-1);
14
12
 
15
13
  legend {
16
14
  font-size: $iui-font-size-leading;
17
15
  padding: $iui-component-padding-vertical-small $iui-s;
18
16
  border-radius: $iui-border-radius;
19
17
  user-select: none;
20
- @include themed {
21
- background-color: t(iui-color-background-4);
22
- color: t(iui-text-color);
23
- }
18
+ background-color: var(--iui-color-background-4);
19
+ color: var(--iui-text-color);
24
20
  }
25
21
 
26
22
  &[disabled] {
27
23
  cursor: not-allowed;
28
24
 
29
25
  legend {
30
- @include themed {
31
- color: t(iui-text-color-muted);
32
- }
26
+ color: var(--iui-text-color-muted);
33
27
  }
34
28
  }
35
29
  }