@itwin/itwinui-css 0.40.0 → 0.42.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/scss/index.scss CHANGED
@@ -34,5 +34,6 @@
34
34
  @import './toast-notification/index';
35
35
  @import './toggle-switch/index';
36
36
  @import './tooltip/index';
37
+ @import './tree/index';
37
38
  @import './user-icon/index';
38
39
  @import './wizard/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
 
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  &.iui-inline-icon {
27
- .iui-input-icon {
27
+ > .iui-input-icon {
28
28
  @include iui-input-icon-inline;
29
29
  }
30
30
  }
@@ -13,7 +13,7 @@
13
13
  'label label'
14
14
  'inputs inputs' / auto 1fr;
15
15
 
16
- &.iui-inline-icon:not(.iui-inline-label) .iui-input-icon {
16
+ &.iui-inline-icon:not(.iui-inline-label) > .iui-input-icon {
17
17
  // stylelint-disable -- fix position in IE
18
18
  -ms-grid-row: 2;
19
19
  -ms-grid-column: 2;
@@ -38,7 +38,7 @@
38
38
  'icon message' / auto 1fr;
39
39
 
40
40
  // add margin to the icon if it is below input
41
- &:not(.iui-inline-icon) .iui-input-icon {
41
+ &:not(.iui-inline-icon) > .iui-input-icon {
42
42
  margin-top: $iui-component-offset;
43
43
  }
44
44
  }
@@ -105,7 +105,7 @@
105
105
  'label inputs inputs'
106
106
  '. icon message' / auto auto 1fr;
107
107
 
108
- &:not(.iui-inline-icon) .iui-input-icon {
108
+ &:not(.iui-inline-icon) > .iui-input-icon {
109
109
  // stylelint-disable -- fix position in IE
110
110
  -ms-grid-row: 2;
111
111
  -ms-grid-column: 2;
@@ -3,12 +3,13 @@
3
3
  @import '../style/index';
4
4
  @import '../icon/index';
5
5
  @import '../button/index';
6
+ @import '../text/index';
6
7
  @import './variables';
7
8
 
8
9
  @mixin iui-paginator {
9
10
  @include iui-reset;
10
11
  display: flex;
11
- justify-content: space-around;
12
+ justify-content: space-between;
12
13
  align-items: center;
13
14
  min-height: $iui-baseline * 5;
14
15
  padding: 0 $iui-m;
@@ -37,32 +38,36 @@
37
38
  .iui-button-group {
38
39
  margin: 0 $iui-s;
39
40
 
40
- > .iui-button,
41
- > .iui-ellipsis {
42
- width: $iui-component-height;
41
+ > * {
42
+ margin-right: 0; // unset negative margin from button-group
43
43
 
44
- &.iui-small {
45
- width: $iui-component-height-small;
44
+ > .iui-button,
45
+ > .iui-ellipsis {
46
+ width: $iui-component-height;
47
+
48
+ &.iui-small {
49
+ width: $iui-component-height-small;
50
+ }
46
51
  }
47
- }
48
52
 
49
- > .iui-button {
50
- // Animation looks odd when switching pages
51
- transition: none;
52
- }
53
+ > .iui-button {
54
+ // Animation looks odd when switching pages
55
+ transition: none;
56
+ }
53
57
 
54
- > .iui-ellipsis {
55
- display: flex;
56
- justify-content: center;
57
- align-items: center;
58
- @include themed {
59
- color: t(iui-text-color-muted);
58
+ > .iui-ellipsis {
59
+ display: flex;
60
+ justify-content: center;
61
+ align-items: center;
62
+ @include themed {
63
+ color: t(iui-text-color-muted);
64
+ }
60
65
  }
61
- }
62
66
 
63
- > .iui-active::after {
64
- top: auto;
65
- bottom: $iui-xxs;
67
+ > .iui-active::after {
68
+ top: auto;
69
+ bottom: $iui-xxs;
70
+ }
66
71
  }
67
72
  }
68
73
  }
@@ -70,4 +75,11 @@
70
75
  > .iui-right {
71
76
  justify-content: flex-end;
72
77
  }
78
+
79
+ &-page-size-label {
80
+ @include iui-text-muted;
81
+ white-space: nowrap;
82
+ overflow: hidden;
83
+ text-overflow: ellipsis;
84
+ }
73
85
  }
@@ -13,12 +13,6 @@
13
13
  box-sizing: border-box;
14
14
  }
15
15
 
16
- &.iui-zebra-striping > .iui-table-body > .iui-row:nth-child(even):not(.iui-selected) {
17
- @include themed {
18
- background: rgba(t(iui-color-foreground-body-rgb), 0.02);
19
- }
20
- }
21
-
22
16
  @include iui-table-cell-icon;
23
17
  }
24
18
 
@@ -134,6 +128,12 @@
134
128
  background-color: t(iui-color-background-1);
135
129
  }
136
130
 
131
+ &.iui-zebra-striping > .iui-row:nth-child(even):not(.iui-selected) {
132
+ @include themed {
133
+ background-color: rgba(t(iui-color-foreground-body-rgb), 0.02);
134
+ }
135
+ }
136
+
137
137
  .iui-row {
138
138
  display: flex;
139
139
  border: solid 1px transparent;
@@ -325,6 +325,10 @@
325
325
  flex-basis: $iui-l * 2;
326
326
  }
327
327
 
328
+ &:not(.iui-slot):last-child {
329
+ padding-right: $iui-m;
330
+ }
331
+
328
332
  &.iui-positive {
329
333
  @include iui-table-cell-status($status: positive);
330
334
  }
@@ -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-tree {
6
+ @include iui-tree;
7
+ }
8
+
9
+ .iui-sub-tree {
10
+ @include iui-sub-tree;
11
+ }
12
+
13
+ .iui-tree-node {
14
+ @include iui-tree-node;
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 './tree';
@@ -0,0 +1,137 @@
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 '../icon/index';
5
+
6
+ $iui-active-outline: thin solid t(iui-color-foreground-primary);
7
+ $iui-expander-inline-padding: $iui-component-offset + $iui-xxs + 1px; // margin + padding + border
8
+ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding * 2); // icon width + inline padding on both sides
9
+
10
+ @mixin iui-tree {
11
+ @include iui-reset;
12
+ list-style: none;
13
+ }
14
+
15
+ @mixin iui-sub-tree {
16
+ @include iui-reset;
17
+ list-style: none;
18
+ }
19
+
20
+ @mixin iui-tree-node {
21
+ display: flex;
22
+ cursor: pointer;
23
+ padding: 0 $iui-s;
24
+
25
+ &-checkbox {
26
+ margin-right: $iui-s;
27
+ }
28
+
29
+ &-content {
30
+ display: flex;
31
+ align-items: center;
32
+ box-sizing: border-box;
33
+ min-height: $iui-baseline * 3;
34
+ margin-left: calc(#{$iui-expander-button-width} * (var(--level, 0)));
35
+ overflow: hidden;
36
+ padding-left: $iui-xxs;
37
+
38
+ &-icon {
39
+ @include iui-icons-default;
40
+ padding: 0 $iui-expander-inline-padding;
41
+ flex-shrink: 0;
42
+
43
+ &:first-child {
44
+ margin-left: $iui-expander-button-width;
45
+ }
46
+ }
47
+
48
+ &-expander-icon {
49
+ @media (prefers-reduced-motion: no-preference) {
50
+ transition: transform $iui-speed-fast ease-out;
51
+ }
52
+
53
+ &-expanded {
54
+ transform: rotate(90deg);
55
+ }
56
+ }
57
+
58
+ &-label {
59
+ min-width: 0;
60
+ padding-left: $iui-expander-inline-padding;
61
+
62
+ &:first-child {
63
+ margin-left: $iui-expander-button-width;
64
+ }
65
+ }
66
+
67
+ &-title,
68
+ &-caption {
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ }
73
+
74
+ &-title {
75
+ font-size: $iui-font-size;
76
+ }
77
+
78
+ &-caption {
79
+ font-size: $iui-font-size-small;
80
+ @include themed {
81
+ color: t(iui-text-color-muted);
82
+ }
83
+ }
84
+ }
85
+
86
+ &:focus {
87
+ @include themed {
88
+ outline: thin solid rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
89
+ outline-offset: -1px;
90
+ }
91
+ }
92
+
93
+ &:focus:not(:focus-visible) {
94
+ outline-offset: -2px;
95
+ }
96
+
97
+ &:hover {
98
+ @include themed {
99
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
100
+ }
101
+
102
+ .iui-tree-node-content-caption {
103
+ @include themed {
104
+ color: t(iui-color-foreground-body);
105
+ }
106
+ transition: color $iui-speed-fast ease;
107
+ }
108
+ }
109
+
110
+ &.iui-active {
111
+ @include themed {
112
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5));
113
+ outline: $iui-active-outline;
114
+ outline-offset: -1px;
115
+ }
116
+
117
+ &:focus {
118
+ outline-width: $iui-xxs;
119
+ outline-offset: -2px;
120
+ }
121
+ }
122
+
123
+ &.iui-disabled {
124
+ cursor: not-allowed;
125
+ outline: none;
126
+ background-color: transparent;
127
+ @include themed {
128
+ color: t(iui-text-color-placeholder);
129
+ }
130
+
131
+ .iui-tree-node-content-caption {
132
+ @include themed {
133
+ color: t(iui-text-color-placeholder);
134
+ }
135
+ }
136
+ }
137
+ }
@@ -70,6 +70,9 @@
70
70
  height: 100%;
71
71
  border-width: 0;
72
72
  border-radius: 50%;
73
+ @include themed {
74
+ background-color: t(iui-color-background-1);
75
+ }
73
76
  }
74
77
 
75
78
  > .iui-status {