@itwin/itwinui-css 0.39.1 → 0.42.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 (40) hide show
  1. package/css/all.css +607 -362
  2. package/css/breadcrumbs.css +31 -15
  3. package/css/button.css +279 -189
  4. package/css/code.css +2 -0
  5. package/css/header.css +50 -30
  6. package/css/inputs.css +26 -40
  7. package/css/side-navigation.css +27 -24
  8. package/css/table.css +34 -23
  9. package/css/tile.css +51 -40
  10. package/css/tree.css +107 -0
  11. package/css/user-icon.css +3 -1
  12. package/package.json +1 -1
  13. package/scss/breadcrumbs/breadcrumbs.scss +1 -1
  14. package/scss/button/borderless.scss +37 -39
  15. package/scss/button/button-group.scss +54 -47
  16. package/scss/button/button-icon.scss +12 -0
  17. package/scss/button/button.scss +27 -32
  18. package/scss/button/classes.scss +25 -3
  19. package/scss/button/cta.scss +31 -21
  20. package/scss/button/default.scss +40 -45
  21. package/scss/button/disabled.scss +3 -14
  22. package/scss/button/high-visibility.scss +31 -21
  23. package/scss/button/index.scss +1 -0
  24. package/scss/button/split-menu.scss +39 -20
  25. package/scss/classes.scss +1 -0
  26. package/scss/code/codeblock.scss +4 -0
  27. package/scss/header/header.scss +38 -18
  28. package/scss/index.scss +1 -0
  29. package/scss/inputs/checkbox-radio.scss +1 -3
  30. package/scss/inputs/checkbox.scss +5 -2
  31. package/scss/inputs/classes.scss +2 -2
  32. package/scss/inputs/labeled-inputs.scss +3 -3
  33. package/scss/side-navigation/side-navigation.scss +27 -22
  34. package/scss/table/paginator.scss +34 -21
  35. package/scss/table/table.scss +12 -8
  36. package/scss/tile/tile.scss +4 -2
  37. package/scss/tree/classes.scss +15 -0
  38. package/scss/tree/index.scss +3 -0
  39. package/scss/tree/tree.scss +137 -0
  40. package/scss/user-icon/user-icon.scss +3 -0
@@ -71,12 +71,13 @@
71
71
  > .iui-sidenav-content {
72
72
  max-width: $iui-3xl * 3;
73
73
 
74
- > .iui-sidenav-button.iui-expand > .iui-icon {
74
+ > .iui-sidenav-button.iui-expand > .iui-button-icon {
75
75
  transform: scaleX(-1);
76
76
  }
77
77
  }
78
78
 
79
79
  .iui-sidenav-button {
80
+ gap: $iui-icons-large;
80
81
  border-radius: 0;
81
82
  border-left: none;
82
83
  border-right: none;
@@ -91,44 +92,52 @@
91
92
  }
92
93
  }
93
94
 
95
+ > .iui-button-label {
96
+ white-space: nowrap;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ }
100
+
94
101
  &,
95
- &:enabled:hover,
102
+ &:hover,
96
103
  &[disabled],
97
- &:focus-visible {
104
+ &:focus {
98
105
  @include themed {
99
106
  border-color: t(iui-color-background-5);
100
107
  }
101
108
  }
102
109
 
103
- > .iui-icon:not(.iui-user-icon) {
110
+ // Overriding border from default button
111
+ &:focus:not(:focus-visible) {
112
+ @include themed {
113
+ border-color: t(iui-color-background-5);
114
+ }
115
+ }
116
+
117
+ > .iui-button-icon:not(.iui-user-icon) {
104
118
  width: $iui-icons-large;
105
119
  height: $iui-icons-large;
106
120
  flex-shrink: 0;
107
-
108
- + .iui-label {
109
- margin-left: $iui-icons-large;
110
- white-space: nowrap;
111
- overflow: hidden;
112
- text-overflow: ellipsis;
113
- }
114
121
  }
115
122
 
116
- &.iui-submenu-open .iui-icon {
123
+ &.iui-submenu-open .iui-button-icon {
117
124
  @include themed {
118
125
  fill: t(iui-color-foreground-primary);
119
126
  }
120
127
  }
121
128
 
122
129
  &.iui-active {
123
- &:focus,
124
- &:focus-visible {
130
+ @include themed {
131
+ box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
132
+ }
133
+
134
+ &:focus {
125
135
  @include themed {
126
136
  box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3)),
127
137
  inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
128
138
  }
129
139
  }
130
140
 
131
- &,
132
141
  &:focus:not(:focus-visible) {
133
142
  @include themed {
134
143
  box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
@@ -136,7 +145,8 @@
136
145
  }
137
146
  }
138
147
 
139
- &[disabled] {
148
+ &[disabled],
149
+ &:disabled {
140
150
  @include themed {
141
151
  background-color: t(iui-color-background-2);
142
152
  }
@@ -153,11 +163,6 @@
153
163
  box-shadow: none;
154
164
  }
155
165
 
156
- &:focus-visible {
157
- outline: 0;
158
- box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3));
159
- }
160
-
161
166
  &.iui-expand {
162
167
  height: $iui-line-height;
163
168
  justify-content: center;
@@ -166,7 +171,7 @@
166
171
  border-bottom: 1px solid t(iui-color-background-5);
167
172
  }
168
173
 
169
- > .iui-icon {
174
+ > .iui-button-icon {
170
175
  @include iui-icons-small;
171
176
  @media (prefers-reduced-motion: no-preference) {
172
177
  transition: transform $iui-speed ease-out;
@@ -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,37 @@
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
+ display: flex; // for vertically aligning svgs
43
44
 
44
- &.iui-small {
45
- width: $iui-component-height-small;
45
+ > .iui-button,
46
+ > .iui-ellipsis {
47
+ width: $iui-component-height;
48
+
49
+ &.iui-small {
50
+ width: $iui-component-height-small;
51
+ }
46
52
  }
47
- }
48
53
 
49
- > .iui-button {
50
- // Animation looks odd when switching pages
51
- transition: none;
52
- }
54
+ > .iui-button {
55
+ // Animation looks odd when switching pages
56
+ transition: none;
57
+ }
53
58
 
54
- > .iui-ellipsis {
55
- display: flex;
56
- justify-content: center;
57
- align-items: center;
58
- @include themed {
59
- color: t(iui-text-color-muted);
59
+ > .iui-ellipsis {
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ @include themed {
64
+ color: t(iui-text-color-muted);
65
+ }
60
66
  }
61
- }
62
67
 
63
- > .iui-active::after {
64
- top: auto;
65
- bottom: $iui-xxs;
68
+ > .iui-active::after {
69
+ top: auto;
70
+ bottom: $iui-xxs;
71
+ }
66
72
  }
67
73
  }
68
74
  }
@@ -70,4 +76,11 @@
70
76
  > .iui-right {
71
77
  justify-content: flex-end;
72
78
  }
79
+
80
+ &-page-size-label {
81
+ @include iui-text-muted;
82
+ white-space: nowrap;
83
+ overflow: hidden;
84
+ text-overflow: ellipsis;
85
+ }
73
86
  }
@@ -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;
@@ -164,7 +164,7 @@
164
164
  visibility: visible;
165
165
  }
166
166
 
167
- .iui-row-expander > .iui-icon {
167
+ .iui-row-expander > .iui-button-icon {
168
168
  @media (prefers-reduced-motion: no-preference) {
169
169
  transition: transform $iui-speed-fast ease-out;
170
170
  }
@@ -178,7 +178,7 @@
178
178
  border-bottom-color: transparent;
179
179
  }
180
180
 
181
- .iui-row-expander > .iui-icon {
181
+ .iui-row-expander > .iui-button-icon {
182
182
  transform: rotate(90deg);
183
183
  }
184
184
 
@@ -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
  }
@@ -35,6 +35,7 @@
35
35
  > .iui-type-indicator,
36
36
  > .iui-quick-action {
37
37
  @include iui-button-borderless;
38
+ @include iui-button-size(small, borderless);
38
39
  position: absolute;
39
40
  border-radius: 50%;
40
41
  top: round($iui-baseline * 0.5);
@@ -107,7 +108,7 @@
107
108
  > .iui-picture + .iui-button + .iui-button {
108
109
  @include iui-blur($opacity: 5);
109
110
 
110
- &:enabled > .iui-icon {
111
+ &:enabled > .iui-button-icon {
111
112
  @include themed() {
112
113
  fill: t(iui-color-foreground-accessory);
113
114
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, t(iui-opacity-5)));
@@ -122,7 +123,7 @@
122
123
  background-color: rgba(0, 0, 0, t(iui-opacity-4));
123
124
  }
124
125
 
125
- > .iui-icon {
126
+ .iui-button-icon {
126
127
  @include themed() {
127
128
  fill: t(iui-color-foreground-accessory);
128
129
  }
@@ -206,6 +207,7 @@
206
207
  }
207
208
 
208
209
  > .iui-more-options {
210
+ @include iui-button-size(small, borderless);
209
211
  position: absolute;
210
212
  bottom: $iui-baseline * 0.5;
211
213
  right: $iui-s;
@@ -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 {