@itwin/itwinui-css 0.44.1 → 0.46.1

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.
package/css/tree.css CHANGED
@@ -72,12 +72,13 @@
72
72
  font-size:12px;
73
73
  color:rgba(0, 0, 0, 0.4);
74
74
  color:var(--iui-text-color-muted); }
75
- .iui-tree-node:focus{
76
- outline:1px solid #008BE1;
75
+ .iui-tree-node:focus-visible{
77
76
  outline:1px solid var(--iui-color-foreground-primary);
78
77
  outline-offset:-1px; }
79
- .iui-tree-node:focus:not(:focus-visible){
80
- outline-offset:-2px; }
78
+ @supports not selector(*:focus-visible){
79
+ .iui-tree-node:focus{
80
+ outline:1px solid var(--iui-color-foreground-primary);
81
+ outline-offset:-1px; } }
81
82
  .iui-tree-node:hover{
82
83
  background-color:rgba(0, 139, 225, 0.1);
83
84
  background-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6)); }
@@ -92,9 +93,13 @@
92
93
  background-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
93
94
  outline:thin solid var(--iui-color-foreground-primary);
94
95
  outline-offset:-1px; }
95
- .iui-tree-node.iui-active:focus{
96
- outline-width:2px;
96
+ .iui-tree-node.iui-active:focus-visible{
97
+ outline:2px solid var(--iui-color-foreground-primary);
97
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; } }
98
103
  .iui-tree-node.iui-disabled{
99
104
  cursor:not-allowed;
100
105
  outline:none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.44.1",
3
+ "version": "0.46.1",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -20,7 +20,6 @@ $iui-button-padding-large: $iui-xs * 6;
20
20
  box-sizing: border-box;
21
21
  border-radius: $iui-border-radius;
22
22
  line-height: $iui-line-height;
23
- outline: none;
24
23
  box-shadow: none;
25
24
  font-size: $iui-font-size;
26
25
  font-weight: $iui-font-weight-normal;
@@ -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';
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';
@@ -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
 
@@ -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,9 +245,14 @@
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;
@@ -259,15 +264,13 @@
259
264
  &.iui-actionable {
260
265
  align-items: center;
261
266
  height: 90%;
262
- margin-right: 1px;
267
+ margin-right: $iui-xxs;
263
268
  padding: 0 $iui-sm;
264
269
  cursor: pointer;
265
270
 
266
271
  @include iui-ripple(var(--iui-color-background-1), var(--iui-color-background-2));
267
272
 
268
273
  svg {
269
- width: $iui-icons-default;
270
- height: $iui-icons-default;
271
274
  @include themed {
272
275
  fill: t(iui-icons-color);
273
276
  }
@@ -278,6 +281,16 @@
278
281
  transform: rotate(180deg); // transform for arrow icon (e.g. svg-caret-down), used in combobox
279
282
  }
280
283
  }
284
+
285
+ &.iui-disabled {
286
+ cursor: not-allowed;
287
+
288
+ svg {
289
+ @include themed {
290
+ fill: t(iui-icons-color-actionable-disabled);
291
+ }
292
+ }
293
+ }
281
294
  }
282
295
 
283
296
  /// Mixin for applying status colors to input container.
@@ -319,9 +332,8 @@
319
332
  }
320
333
  }
321
334
 
322
- > .iui-input,
323
- > .iui-textarea,
324
- > .iui-select > .iui-select-button {
335
+ .iui-input,
336
+ .iui-textarea {
325
337
  padding-bottom: $iui-component-padding-vertical - 1px;
326
338
 
327
339
  &.iui-small {
@@ -344,4 +356,25 @@
344
356
  }
345
357
  }
346
358
  }
359
+
360
+ .iui-input-with-icon {
361
+ --_hover-color: var(--iui-color-foreground-#{$status});
362
+ --_focus-color: var(--iui-color-foreground-#{$status});
363
+ }
364
+
365
+ .iui-select-button {
366
+ border-bottom: transparent;
367
+
368
+ &::after {
369
+ content: '';
370
+ width: 100%;
371
+ position: absolute;
372
+ bottom: 0;
373
+ left: 0;
374
+ height: $iui-xxs;
375
+ @include themed {
376
+ background-color: t(iui-color-foreground-#{$status});
377
+ }
378
+ }
379
+ }
347
380
  }
@@ -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
+ }
@@ -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,31 @@
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
+ }