@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
@@ -44,9 +44,9 @@
44
44
  }
45
45
 
46
46
  .iui-input,
47
+ .iui-input-with-icon,
47
48
  .iui-textarea,
48
- .iui-input-group,
49
- .iui-select {
49
+ .iui-input-group {
50
50
  grid-area: inputs;
51
51
  // stylelint-disable -- fix position in IE
52
52
  -ms-grid-row: 2;
@@ -84,9 +84,9 @@
84
84
  }
85
85
 
86
86
  .iui-input,
87
+ .iui-input-with-icon,
87
88
  .iui-textarea,
88
- .iui-input-group,
89
- .iui-select {
89
+ .iui-input-group {
90
90
  // stylelint-disable -- fix position in IE
91
91
  -ms-grid-row: 1;
92
92
  -ms-grid-column: 2;
@@ -220,7 +220,7 @@
220
220
  }
221
221
  }
222
222
 
223
- /// Icon to be shown near an input.
223
+ /// Icon to be shown near a message.
224
224
  @mixin iui-input-icon {
225
225
  display: flex;
226
226
  grid-area: icon;
@@ -245,29 +245,34 @@
245
245
 
246
246
  grid-area: inputs;
247
247
  justify-self: end;
248
- margin: 0 $iui-sm 0 0;
248
+ margin: 0 ($iui-sm + $iui-xxs) 0 0;
249
249
  position: relative;
250
250
 
251
+ svg {
252
+ width: $iui-icons-default;
253
+ height: $iui-icons-default;
254
+ }
255
+
251
256
  &.iui-button {
252
257
  height: 100%;
253
258
  width: fit-content;
254
259
  margin-right: 0;
255
260
  border-top-left-radius: 0;
256
261
  border-bottom-left-radius: 0;
262
+ border-top-right-radius: inherit;
263
+ border-bottom-right-radius: inherit;
257
264
  }
258
265
 
259
266
  &.iui-actionable {
260
267
  align-items: center;
261
268
  height: 90%;
262
- margin-right: 1px;
269
+ margin-right: $iui-xxs;
263
270
  padding: 0 $iui-sm;
264
271
  cursor: pointer;
265
272
 
266
273
  @include iui-ripple(var(--iui-color-background-1), var(--iui-color-background-2));
267
274
 
268
275
  svg {
269
- width: $iui-icons-default;
270
- height: $iui-icons-default;
271
276
  @include themed {
272
277
  fill: t(iui-icons-color);
273
278
  }
@@ -278,6 +283,16 @@
278
283
  transform: rotate(180deg); // transform for arrow icon (e.g. svg-caret-down), used in combobox
279
284
  }
280
285
  }
286
+
287
+ &.iui-disabled {
288
+ cursor: not-allowed;
289
+
290
+ svg {
291
+ @include themed {
292
+ fill: t(iui-icons-color-actionable-disabled);
293
+ }
294
+ }
295
+ }
281
296
  }
282
297
 
283
298
  /// Mixin for applying status colors to input container.
@@ -319,9 +334,8 @@
319
334
  }
320
335
  }
321
336
 
322
- > .iui-input,
323
- > .iui-textarea,
324
- > .iui-select > .iui-select-button {
337
+ .iui-input,
338
+ .iui-textarea {
325
339
  padding-bottom: $iui-component-padding-vertical - 1px;
326
340
 
327
341
  &.iui-small {
@@ -344,4 +358,25 @@
344
358
  }
345
359
  }
346
360
  }
361
+
362
+ .iui-input-with-icon {
363
+ --_hover-color: var(--iui-color-foreground-#{$status});
364
+ --_focus-color: var(--iui-color-foreground-#{$status});
365
+ }
366
+
367
+ .iui-select-button {
368
+ border-bottom: transparent;
369
+
370
+ &::after {
371
+ content: '';
372
+ width: 100%;
373
+ position: absolute;
374
+ bottom: 0;
375
+ left: 0;
376
+ height: $iui-xxs;
377
+ @include themed {
378
+ background-color: t(iui-color-foreground-#{$status});
379
+ }
380
+ }
381
+ }
347
382
  }
@@ -3,113 +3,64 @@
3
3
  @import '../style/index';
4
4
  @import '../menu/index';
5
5
 
6
- $iui-after-border: 5px solid;
6
+ @mixin iui-select-button {
7
+ @include iui-focus($offset: -2px, $thickness: 2px);
8
+ width: 100%;
9
+ margin: 0;
10
+ border-radius: $iui-border-radius;
11
+ box-sizing: border-box;
12
+ padding: $iui-component-padding-vertical $iui-component-padding-horizontal;
13
+ min-height: $iui-component-height;
14
+ transition: border-color $iui-speed-fast ease-out;
7
15
 
8
- @mixin iui-select {
9
- @include iui-reset;
10
16
  display: flex;
11
- flex-direction: column;
17
+ align-items: center;
18
+ user-select: none;
12
19
  position: relative;
13
- width: 100%;
14
- min-width: 0;
15
-
16
- > .iui-select-button {
17
- @include iui-input;
18
- @include iui-focus($offset: -2px, $thickness: 2px);
19
- display: flex;
20
- align-items: center;
21
- min-height: $iui-component-height;
22
- padding-right: $iui-xl;
23
- user-select: none;
24
- position: relative;
25
- @media (prefers-reduced-motion: no-preference) {
26
- transition: border-color $iui-speed-fast ease-out;
27
- }
28
-
29
- > .iui-icon {
30
- @include iui-menu-icon;
31
- }
32
-
33
- > .iui-content {
34
- overflow: hidden;
35
- white-space: nowrap;
36
- text-overflow: ellipsis;
37
- }
38
-
39
- &.iui-placeholder {
40
- @include themed {
41
- color: t(iui-text-color-placeholder);
42
- }
43
- }
44
-
45
- &::after {
46
- content: '';
47
- position: absolute;
48
- top: 50%;
49
- right: $iui-m;
50
- transform: translateY(-50%);
51
- width: 0;
52
- height: 0;
53
- border-left: $iui-after-border transparent;
54
- border-right: $iui-after-border transparent;
55
- @include themed {
56
- border-top: $iui-after-border t(iui-icons-color-actionable);
57
- }
58
- }
59
-
60
- &:hover {
61
- @include themed {
62
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
63
- }
64
-
65
- &::after {
66
- border-bottom: none;
67
- @include themed {
68
- border-top: $iui-after-border t(iui-icons-color-actionable-hover);
69
- }
70
- }
71
- }
20
+ overflow: hidden;
72
21
 
73
- &.iui-active {
74
- &::after {
75
- border-top: none;
76
- @include themed {
77
- border-bottom: $iui-after-border t(iui-icons-color-actionable);
78
- }
79
- }
80
-
81
- &:hover::after {
82
- @include themed {
83
- border-bottom: $iui-after-border t(iui-icons-color-actionable-hover);
84
- }
85
- }
86
- }
87
-
88
- &.iui-disabled {
89
- cursor: not-allowed;
90
- @include themed {
91
- background-color: t(iui-color-background-disabled);
92
- border-color: t(iui-color-background-disabled);
93
- }
94
-
95
- &::after {
96
- @include themed {
97
- border-top: $iui-after-border t(iui-icons-color-actionable-disabled);
98
- }
99
- }
100
- }
22
+ @include themed {
23
+ color: t(iui-text-color);
24
+ background-color: t(iui-color-background-1);
25
+ border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
101
26
  }
102
27
 
103
- &.iui-small .iui-select-button {
28
+ &.iui-small {
104
29
  padding-top: $iui-component-padding-vertical-small;
105
30
  padding-bottom: $iui-component-padding-vertical-small;
106
31
  min-height: $iui-component-height-small;
107
32
  }
108
33
 
109
- &.iui-large .iui-select-button {
34
+ &.iui-large {
110
35
  padding-top: $iui-component-padding-vertical-large;
111
36
  padding-bottom: $iui-component-padding-vertical-large;
112
37
  min-height: $iui-component-height-large;
113
38
  font-size: $iui-font-size-leading;
114
39
  }
40
+
41
+ &.iui-disabled {
42
+ @include themed {
43
+ background-color: t(iui-color-background-disabled);
44
+ border-color: t(iui-color-background-disabled);
45
+ }
46
+ --_hover-color: var(--iui-color-background-disabled);
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ .iui-icon {
51
+ @include iui-menu-icon;
52
+ fill: currentColor;
53
+ }
54
+
55
+ .iui-content {
56
+ overflow: hidden;
57
+ white-space: nowrap;
58
+ text-overflow: ellipsis;
59
+ }
60
+
61
+ &.iui-placeholder {
62
+ @include themed {
63
+ color: t(iui-text-color-placeholder);
64
+ }
65
+ }
115
66
  }
@@ -0,0 +1,7 @@
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-popover {
6
+ @include iui-popover;
7
+ }
@@ -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 './popover';
@@ -0,0 +1,23 @@
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
+ // tippy.js helper class to hide Popover when it is scrolled out of view
6
+ @mixin iui-popover {
7
+ /* stylelint-disable-next-line selector-class-pattern */
8
+ &.tippy-box {
9
+ &[data-reference-hidden] {
10
+ visibility: visible;
11
+ pointer-events: auto;
12
+ }
13
+
14
+ // Resets tippy.js default stylings that interfere with our own
15
+ all: revert;
16
+ }
17
+
18
+ // Resets tippy.js default stylings that interfere with our own
19
+ /* stylelint-disable-next-line selector-class-pattern */
20
+ .tippy-content {
21
+ all: revert;
22
+ }
23
+ }
@@ -84,6 +84,9 @@
84
84
  overflow: hidden;
85
85
  justify-content: flex-start;
86
86
 
87
+ // Adds stripe to the left of active button
88
+ --_iui-button-active-stripe-inset: 0 calc(100% - #{$iui-xxs}) 0 0;
89
+
87
90
  &:not(.iui-expand) {
88
91
  height: $iui-baseline * 5;
89
92
  // iPhone notch support
@@ -118,12 +121,6 @@
118
121
  }
119
122
  }
120
123
 
121
- &.iui-active {
122
- @include themed {
123
- box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
124
- }
125
- }
126
-
127
124
  &[disabled],
128
125
  &:disabled {
129
126
  @include themed {
@@ -0,0 +1,7 @@
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-skip-to-content-link {
6
+ @include iui-skip-to-content-link;
7
+ }
@@ -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 './skip-to-content';
@@ -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 iui-skip-to-content-link {
6
+ @include iui-blur($opacity: 3);
7
+ @include iui-focus($offset: 2px, $thickness: 2px);
8
+ @include themed {
9
+ color: t(iui-color-foreground-accessory);
10
+ }
11
+ border-radius: $iui-border-radius-round;
12
+ text-decoration: none;
13
+ user-select: none;
14
+ padding: ($iui-baseline * 0.75) $iui-m;
15
+ position: fixed;
16
+ text-align: center;
17
+ left: 50%;
18
+ top: $iui-baseline * 2;
19
+ transform: translateX(-50%) translateY(-170%);
20
+ transition: background-color $iui-speed-fast ease-in-out;
21
+ @media (prefers-reduced-motion: no-preference) {
22
+ transition: background-color $iui-speed-fast ease-in-out, transform $iui-speed-slow ease-in-out, box-shadow $iui-speed-fast ease-in-out;
23
+ }
24
+
25
+ &:hover {
26
+ @include iui-blur($opacity: 2);
27
+ }
28
+
29
+ &:focus {
30
+ transform: translateX(-50%) translateY(0);
31
+ box-shadow: $iui-elevation-16;
32
+ @media (prefers-reduced-motion: no-preference) {
33
+ transition: transform $iui-speed-fast ease-in-out;
34
+ }
35
+ }
36
+ }
@@ -114,10 +114,8 @@
114
114
 
115
115
  // With blur
116
116
  @supports (backdrop-filter: $iui-blur-filter) {
117
- @include themed() {
118
- background-color: rgba(0, 0, 0, t(iui-opacity-#{$opacity}));
119
- backdrop-filter: $iui-blur-filter;
120
- }
117
+ background-color: rgba(0, 0, 0, var(--iui-opacity-#{$opacity}));
118
+ backdrop-filter: $iui-blur-filter;
121
119
  }
122
120
  }
123
121
 
@@ -130,6 +128,33 @@
130
128
  padding: 0;
131
129
  }
132
130
 
131
+ /// Visually hides an element but keeps it accessible to screen readers.
132
+ /// Because it applies some potentially invasive styles, use this mixin on a wrapper element for best results.
133
+ /// If it contains a focusable element, make sure to revert/exclude these styles.
134
+ @mixin visually-hidden {
135
+ clip-path: inset(50%);
136
+ overflow: hidden;
137
+ position: absolute;
138
+ white-space: nowrap;
139
+ height: 1px;
140
+ width: 1px;
141
+ padding: 0;
142
+ margin: -1px;
143
+ border-width: 0;
144
+ }
145
+
146
+ /// Reverts visually-hidden styles, making it visible again.
147
+ @mixin visually-hidden-revert {
148
+ clip-path: revert;
149
+ overflow: visible;
150
+ position: static;
151
+ white-space: normal;
152
+ height: auto;
153
+ width: auto;
154
+ padding: 0;
155
+ margin: 0;
156
+ }
157
+
133
158
  /// Classes for react-transition-group
134
159
  /// Used for expand/collapse transitions. Needs height/width to be set in JS.
135
160
  @mixin iui-transition-group {
@@ -5,6 +5,7 @@
5
5
  @import '../icon/variables';
6
6
 
7
7
  $iui-border-radius: 3px;
8
+ $iui-border-radius-round: 9999px;
8
9
  $iui-blur-filter: blur(5px);
9
10
 
10
11
  $iui-component-offset: 3px;
@@ -63,17 +63,9 @@
63
63
  }
64
64
 
65
65
  @mixin iui-paginator-pages-group {
66
- @include iui-button-group;
66
+ display: inline-flex;
67
+ align-items: center;
67
68
  margin: 0 $iui-s;
68
-
69
- > * + * {
70
- margin-left: 0; // unset negative margin from button-group
71
- }
72
-
73
- button.iui-active::after {
74
- top: auto;
75
- bottom: $iui-xxs;
76
- }
77
69
  }
78
70
 
79
71
  @mixin iui-paginator-page-button {
@@ -81,6 +73,9 @@
81
73
  @include iui-button-borderless;
82
74
  width: $iui-component-height;
83
75
 
76
+ // Adds stripe above active button
77
+ --_iui-button-active-stripe-inset: calc(100% - #{$iui-xs}) #{$iui-xxs} #{$iui-xxs};
78
+
84
79
  &-small {
85
80
  @include iui-button-size(small);
86
81
  width: $iui-component-height-small;
@@ -135,7 +135,7 @@
135
135
  background-color: t(iui-color-background-1);
136
136
  }
137
137
 
138
- &.iui-zebra-striping > .iui-row:nth-child(even):not(.iui-selected) {
138
+ &.iui-zebra-striping .iui-row:nth-child(even):not(.iui-selected) {
139
139
  @include themed {
140
140
  background-color: rgba(t(iui-color-foreground-body-rgb), 0.02);
141
141
  }
@@ -5,3 +5,35 @@
5
5
  .iui-tile {
6
6
  @include iui-tile;
7
7
  }
8
+
9
+ .iui-tile-thumbnail-type-indicator {
10
+ @include iui-tile-thumbnail-type-indicator;
11
+ }
12
+
13
+ .iui-tile-thumbnail-quick-action {
14
+ @include iui-tile-thumbnail-quick-action;
15
+ }
16
+
17
+ .iui-tile-thumbnail-badge-container {
18
+ @include iui-tile-thumbnail-badge;
19
+ }
20
+
21
+ .iui-tile-buttons {
22
+ @include iui-tile-buttons;
23
+ }
24
+
25
+ .iui-tile-thumbnail {
26
+ @include iui-tile-thumbnail;
27
+ }
28
+
29
+ .iui-tile-thumbnail-picture {
30
+ @include iui-tile-thumbnail-picture;
31
+ }
32
+
33
+ .iui-tile-content {
34
+ @include iui-tile-content;
35
+ }
36
+
37
+ .iui-tile-more-options {
38
+ @include iui-tile-more-options;
39
+ }