@itwin/itwinui-css 0.55.0 → 0.58.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 (48) hide show
  1. package/css/all.css +1116 -689
  2. package/css/anchor.css +21 -17
  3. package/css/breadcrumbs.css +312 -57
  4. package/css/button.css +9 -12
  5. package/css/dialog.css +201 -0
  6. package/css/footer.css +1 -17
  7. package/css/global.css +1 -17
  8. package/css/inputs.css +18 -168
  9. package/css/radio-tile.css +217 -0
  10. package/css/table.css +25 -14
  11. package/css/tabs.css +4 -0
  12. package/css/tag.css +1 -17
  13. package/css/text.css +9 -3
  14. package/css/toast-notification.css +1 -1
  15. package/css/toggle-switch.css +65 -0
  16. package/package.json +1 -1
  17. package/scss/anchor/classes.scss +4 -0
  18. package/scss/breadcrumbs/breadcrumbs.scss +77 -18
  19. package/scss/breadcrumbs/classes.scss +12 -0
  20. package/scss/button/button.scss +17 -16
  21. package/scss/button/classes.scss +4 -0
  22. package/scss/button/cta.scss +3 -1
  23. package/scss/button/default.scss +0 -2
  24. package/scss/button/high-visibility.scss +3 -1
  25. package/scss/classes.scss +4 -3
  26. package/scss/dialog/classes.scss +47 -0
  27. package/scss/dialog/dialog.scss +213 -0
  28. package/scss/{modal → dialog}/index.scss +1 -1
  29. package/scss/index.scss +4 -3
  30. package/scss/inputs/checkbox.scss +11 -6
  31. package/scss/inputs/classes.scss +0 -4
  32. package/scss/inputs/index.scss +0 -1
  33. package/scss/inputs/labeled-inputs.scss +1 -1
  34. package/scss/radio-tile/classes.scss +31 -0
  35. package/scss/radio-tile/index.scss +3 -0
  36. package/scss/radio-tile/radio-tile.scss +209 -0
  37. package/scss/style/anchor.scss +19 -16
  38. package/scss/table/classes.scss +4 -0
  39. package/scss/table/paginator.scss +4 -0
  40. package/scss/table/table.scss +9 -2
  41. package/scss/tabs/tabs.scss +6 -0
  42. package/scss/text/skeleton.scss +13 -7
  43. package/scss/toast-notification/classes.scss +1 -1
  44. package/scss/toggle-switch/toggle-switch.scss +50 -2
  45. package/css/modal.css +0 -132
  46. package/scss/inputs/radio-tile.scss +0 -200
  47. package/scss/modal/classes.scss +0 -15
  48. package/scss/modal/modal.scss +0 -155
@@ -0,0 +1,209 @@
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
+ @mixin iui-radio-tile {
7
+ cursor: pointer;
8
+ @include themed {
9
+ -webkit-tap-highlight-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
10
+ }
11
+
12
+ &:first-of-type > .iui-radio-tile-content {
13
+ border-radius: $iui-border-radius 0 0 $iui-border-radius;
14
+ }
15
+
16
+ &:last-of-type > .iui-radio-tile-content {
17
+ border-radius: 0 $iui-border-radius $iui-border-radius 0;
18
+ }
19
+
20
+ &:not(:first-of-type) > .iui-radio-tile-content {
21
+ margin-left: -1px;
22
+ }
23
+ }
24
+ @mixin iui-radio-tile-content {
25
+ width: $iui-xl * 5;
26
+ height: 100%;
27
+ box-sizing: border-box;
28
+ padding: $iui-s;
29
+ position: relative;
30
+ z-index: 1;
31
+ @media (prefers-reduced-motion: no-preference) {
32
+ transition: border-color $iui-speed-fast ease-out;
33
+ }
34
+ @include themed {
35
+ border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
36
+ background-color: t(iui-color-background-1);
37
+ }
38
+
39
+ &:hover {
40
+ z-index: 2;
41
+ @include themed {
42
+ border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
43
+ }
44
+
45
+ .iui-radio-tile-icon {
46
+ @media (forced-colors: active) {
47
+ fill: CanvasText;
48
+ }
49
+ @include themed {
50
+ fill: t(iui-icons-color-actionable);
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ @mixin iui-radio-tile-container {
57
+ display: inline-flex;
58
+ flex-wrap: wrap;
59
+ user-select: none;
60
+ // Create stacking context
61
+ position: relative;
62
+ z-index: 0;
63
+ }
64
+
65
+ @mixin iui-radio-tile-input {
66
+ width: 0;
67
+ height: 0;
68
+ appearance: none;
69
+ opacity: 0;
70
+ position: absolute;
71
+ @include focus-visible {
72
+ + * {
73
+ outline-offset: -4px;
74
+ @media (forced-colors: active) {
75
+ outline-color: Highlight;
76
+ }
77
+ @include themed {
78
+ outline: 2px solid t(iui-color-foreground-primary);
79
+ }
80
+ }
81
+ }
82
+
83
+ &:checked + * {
84
+ padding: $iui-s - 1;
85
+ z-index: 3;
86
+ @media (forced-colors: active) {
87
+ border-color: Highlight;
88
+ }
89
+ @include themed {
90
+ border: 2px solid t(iui-color-foreground-primary);
91
+ }
92
+
93
+ .iui-radio-tile-icon {
94
+ @media (forced-colors: active) {
95
+ fill: Highlight;
96
+ }
97
+ @include themed {
98
+ fill: t(iui-icons-color-primary);
99
+ }
100
+ }
101
+
102
+ &::after {
103
+ content: '';
104
+ width: $iui-icons-default;
105
+ height: $iui-icons-default;
106
+ position: absolute;
107
+ top: $iui-s;
108
+ right: $iui-s;
109
+ mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6,14L0,8l2-2l4,4l8-8l2,2L6,14z" /></svg>');
110
+ @media (forced-colors: active) {
111
+ background-color: Highlight;
112
+ }
113
+ @include themed {
114
+ background-color: t(iui-color-foreground-primary);
115
+ }
116
+ }
117
+ }
118
+
119
+ &:disabled + * {
120
+ cursor: not-allowed;
121
+ z-index: 0;
122
+ @include themed {
123
+ border-color: t(iui-color-background-disabled);
124
+ background-color: t(iui-color-background-disabled);
125
+ }
126
+
127
+ &::after {
128
+ @media (forced-colors: active) {
129
+ background-color: GrayText;
130
+ }
131
+ @include themed {
132
+ background-color: t(iui-icons-color-actionable-disabled);
133
+ }
134
+ }
135
+
136
+ .iui-radio-tile-icon {
137
+ filter: $iui-icons-color-multicolor-disabled;
138
+ @media (forced-colors: active) {
139
+ fill: GrayText;
140
+ }
141
+ @include themed {
142
+ fill: t(iui-icons-color-actionable-disabled);
143
+ }
144
+ }
145
+
146
+ .iui-radio-tile-label,
147
+ .iui-radio-tile-sublabel {
148
+ @media (forced-colors: active) {
149
+ color: GrayText;
150
+ }
151
+ }
152
+
153
+ .iui-radio-tile-label {
154
+ @include themed {
155
+ color: t(iui-text-color-muted);
156
+ }
157
+ }
158
+ }
159
+
160
+ &:disabled:checked + * {
161
+ z-index: 3;
162
+ @media (forced-colors: active) {
163
+ border-color: GrayText;
164
+ }
165
+ @include themed {
166
+ border: 2px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
167
+ }
168
+ }
169
+ }
170
+
171
+ @mixin iui-radio-tile-icon {
172
+ width: $iui-icons-xl;
173
+ height: $iui-icons-xl;
174
+ display: block;
175
+ margin: 0 auto;
176
+ padding-top: round($iui-baseline * 0.5);
177
+ padding-bottom: $iui-baseline;
178
+
179
+ @media (prefers-reduced-motion: no-preference) {
180
+ transition: fill $iui-speed-fast ease-out;
181
+ }
182
+ @media (forced-colors: active) {
183
+ fill: CanvasText;
184
+ }
185
+ @include themed {
186
+ fill: t(iui-icons-color);
187
+ }
188
+ }
189
+
190
+ @mixin iui-radio-tile-label {
191
+ font-size: $iui-font-size;
192
+ font-weight: $iui-font-weight-semibold;
193
+ line-height: $iui-line-height;
194
+ text-align: center;
195
+ word-break: break-word;
196
+ @include themed {
197
+ color: t(iui-text-color);
198
+ }
199
+ }
200
+
201
+ @mixin iui-radio-tile-sublabel {
202
+ font-size: $iui-font-size-small;
203
+ line-height: round($iui-baseline * 1.375);
204
+ text-align: center;
205
+ word-break: break-word;
206
+ @include themed {
207
+ color: t(iui-text-color-muted);
208
+ }
209
+ }
@@ -3,26 +3,11 @@
3
3
  @import './index';
4
4
 
5
5
  @mixin iui-anchor {
6
- --_iui-anchor-external-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
7
-
8
6
  @include iui-anchor-status('primary');
9
7
  border-radius: $iui-border-radius;
8
+ box-sizing: border-box;
10
9
  cursor: pointer;
11
10
 
12
- &-external::after {
13
- content: '';
14
- display: inline-block;
15
- width: 1.5ch;
16
- height: 1.5ch;
17
- margin-left: 0.5ch;
18
- vertical-align: -0.1ch;
19
- background-color: currentColor;
20
- mask: var(--_iui-anchor-external-svg);
21
- @media (forced-colors: active) {
22
- background-color: LinkText;
23
- }
24
- }
25
-
26
11
  @include iui-anchor-underline('on-hover');
27
12
 
28
13
  @media (prefers-contrast: more) {
@@ -44,6 +29,24 @@
44
29
  }
45
30
  }
46
31
 
32
+ @mixin iui-anchor-external {
33
+ --_iui-anchor-external-svg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m16 0v5.4l-1.9-2-8.4 8.4-1.5-1.5 8.3-8.4-1.9-1.9m5.4 16v-9h-1v8h-14v-14h8v-1h-9v16z' /></svg>");
34
+
35
+ &::after {
36
+ content: '';
37
+ display: inline-block;
38
+ width: 1.5ch;
39
+ height: 1.5ch;
40
+ margin-left: 0.5ch;
41
+ vertical-align: -0.1ch;
42
+ background-color: currentColor;
43
+ mask: var(--_iui-anchor-external-svg);
44
+ @media (forced-colors: active) {
45
+ background-color: LinkText;
46
+ }
47
+ }
48
+ }
49
+
47
50
  @mixin iui-anchor-status($status: primary) {
48
51
  @include iui-focus($color: var(--iui-color-foreground-#{$status}), $offset: 1px);
49
52
  @include themed {
@@ -18,6 +18,10 @@
18
18
  @include iui-table-header;
19
19
  }
20
20
 
21
+ .iui-table-header-actions-container {
22
+ @include iui-table-header-actions-container;
23
+ }
24
+
21
25
  .iui-table-body {
22
26
  @include iui-table-body;
23
27
  }
@@ -73,6 +73,10 @@
73
73
  @include iui-button-borderless;
74
74
  width: $iui-component-height;
75
75
 
76
+ &.iui-active {
77
+ @include iui-button-active;
78
+ }
79
+
76
80
  // Adds stripe above active button
77
81
  --_iui-button-active-stripe-inset: calc(100% - #{$iui-xs}) #{$iui-xxs} #{$iui-xxs};
78
82
 
@@ -37,6 +37,8 @@
37
37
 
38
38
  .iui-cell:not(.iui-slot) {
39
39
  @include iui-focus;
40
+ flex-wrap: wrap;
41
+ column-gap: $iui-xs;
40
42
 
41
43
  &.iui-actionable {
42
44
  cursor: pointer;
@@ -46,8 +48,7 @@
46
48
  cursor: grabbing;
47
49
  }
48
50
 
49
- > .iui-filter-button {
50
- margin-left: $iui-xs;
51
+ .iui-filter-button {
51
52
  margin-right: $iui-s;
52
53
 
53
54
  &:not(.iui-active) {
@@ -155,6 +156,12 @@
155
156
  }
156
157
  }
157
158
 
159
+ @mixin iui-table-header-actions-container {
160
+ display: flex;
161
+ flex-grow: 1;
162
+ align-items: center;
163
+ }
164
+
158
165
  @mixin iui-table-body {
159
166
  overflow-y: scroll;
160
167
  overflow: overlay;
@@ -34,6 +34,12 @@
34
34
  fill: t(iui-icons-color-primary);
35
35
  }
36
36
  }
37
+
38
+ .iui-tab-description {
39
+ @include themed {
40
+ opacity: t(iui-opacity-1);
41
+ }
42
+ }
37
43
  }
38
44
 
39
45
  &[disabled] {
@@ -7,17 +7,23 @@
7
7
  user-select: none;
8
8
  color: transparent;
9
9
  border-radius: $iui-border-radius;
10
+ cursor: progress;
10
11
 
11
12
  @include themed {
12
13
  background: linear-gradient(
13
- 270deg,
14
- t(iui-color-background-3),
15
- t(iui-color-background-3),
16
- t(iui-color-background-2),
17
- t(iui-color-background-3),
18
- t(iui-color-background-3)
14
+ 292deg,
15
+ t(iui-text-color-muted),
16
+ t(iui-text-color-muted),
17
+ t(iui-text-color-placeholder),
18
+ t(iui-text-color-muted),
19
+ t(iui-text-color-muted)
19
20
  );
20
- background-size: 200% 100%;
21
+ }
22
+ background-size: 200% 100%;
23
+
24
+ @media (forced-colors: active) {
25
+ forced-color-adjust: none;
26
+ background: linear-gradient(292deg, CanvasText, CanvasText, Canvas, CanvasText, CanvasText);
21
27
  }
22
28
 
23
29
  @media (prefers-reduced-motion: no-preference) {
@@ -17,7 +17,7 @@
17
17
  align-items: center;
18
18
  flex-direction: column;
19
19
  justify-content: center;
20
- z-index: 1070;
20
+ z-index: 99999;
21
21
 
22
22
  @media screen and (max-width: 400px) {
23
23
  width: calc(100vw - 36px);
@@ -30,6 +30,9 @@
30
30
  @include themed {
31
31
  color: t(iui-text-color-muted);
32
32
  }
33
+ @media (forced-colors: active) {
34
+ color: GrayText;
35
+ }
33
36
  }
34
37
 
35
38
  // For labels on the left
@@ -92,14 +95,24 @@
92
95
  // #region Unchecked toggle switch
93
96
  background-color: var(--iui-color-background-1);
94
97
  border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
98
+ @media (forced-colors: active) {
99
+ border-color: CanvasText;
100
+ }
95
101
 
96
102
  &::after {
97
103
  background-color: var(--iui-color-foreground-body);
98
104
  opacity: var(--iui-opacity-2);
105
+ @media (forced-colors: active) {
106
+ background-color: CanvasText;
107
+ opacity: 1;
108
+ }
99
109
  }
100
110
 
101
111
  &:hover {
102
112
  border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
113
+ @media (forced-colors: active) {
114
+ border-color: CanvasText;
115
+ }
103
116
  }
104
117
 
105
118
  @include focus-visible {
@@ -111,11 +124,19 @@
111
124
  &:checked {
112
125
  background-color: var(--iui-color-background-primary);
113
126
  border-color: var(--iui-color-background-primary);
127
+ @media (forced-colors: active) {
128
+ background-color: Highlight;
129
+ border-color: Highlight;
130
+ }
114
131
 
115
132
  &::after {
116
133
  transform: translateX($iui-toggle-switch-handle-size + $iui-toggle-switch-handle-offset);
117
134
  background-color: var(--iui-color-foreground-accessory);
118
135
  opacity: var(--iui-opacity-2);
136
+ @media (forced-colors: active) {
137
+ background-color: HighlightText;
138
+ opacity: 1;
139
+ }
119
140
  }
120
141
 
121
142
  ~ .iui-toggle-switch-icon {
@@ -141,10 +162,18 @@
141
162
  cursor: not-allowed;
142
163
  background-color: var(--iui-color-background-disabled);
143
164
  border-color: var(--iui-color-background-disabled);
165
+ @media (forced-colors: active) {
166
+ border-color: GrayText;
167
+ }
144
168
 
145
169
  &::after {
146
170
  background-color: var(--iui-color-foreground-body);
147
171
  opacity: var(--iui-opacity-5);
172
+
173
+ @media (forced-colors: active) {
174
+ background-color: GrayText;
175
+ opacity: 0.75;
176
+ }
148
177
  }
149
178
 
150
179
  ~ .iui-toggle-switch-icon {
@@ -152,8 +181,24 @@
152
181
  fill: var(--iui-icons-color-actionable);
153
182
  }
154
183
 
155
- &:checked ~ .iui-toggle-switch-icon {
156
- opacity: var(--iui-opacity-5);
184
+ &:checked {
185
+ @media (forced-colors: active) {
186
+ background-color: GrayText;
187
+ }
188
+
189
+ &::after {
190
+ @media (forced-colors: active) {
191
+ background-color: Canvas;
192
+ }
193
+ }
194
+
195
+ ~ .iui-toggle-switch-icon {
196
+ opacity: var(--iui-opacity-5);
197
+ @media (forced-colors: active) {
198
+ fill: Canvas;
199
+ opacity: 0.75;
200
+ }
201
+ }
157
202
  }
158
203
  }
159
204
  // #endregion Disabled toggle switch
@@ -170,5 +215,8 @@
170
215
  transition: opacity $iui-speed-fast ease-out;
171
216
  pointer-events: none;
172
217
  fill: var(--iui-color-foreground-accessory);
218
+ @media (forced-colors: active) {
219
+ fill: HighlightText;
220
+ }
173
221
  }
174
222
  }
package/css/modal.css DELETED
@@ -1,132 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- .iui-modal{
6
- margin:0;
7
- padding:0;
8
- border:none;
9
- vertical-align:baseline;
10
- z-index:999;
11
- position:fixed;
12
- top:0;
13
- left:0;
14
- width:100%;
15
- height:100%;
16
- background-color:rgba(0, 0, 0, 0.4);
17
- background-color:rgba(0, 0, 0, var(--iui-opacity-4));
18
- visibility:hidden;
19
- opacity:0;
20
- }
21
- @media (prefers-reduced-motion: no-preference){
22
- .iui-modal{
23
- transition:visibility 0s linear 0.2s, opacity 0.2s ease-out;
24
- }
25
- }
26
- .iui-modal.iui-modal-visible{
27
- visibility:visible;
28
- opacity:1;
29
- transition-delay:0s;
30
- }
31
- .iui-modal > .iui-modal-dialog{
32
- position:absolute;
33
- left:50%;
34
- top:33%;
35
- transform:translate(-50%, -33%);
36
- z-index:1000;
37
- max-width:50%;
38
- min-width:380px;
39
- max-height:100vh;
40
- border-radius:3px;
41
- box-shadow:0 9px 46px rgba(0, 0, 0, 0.25);
42
- padding:11px 16px;
43
- box-sizing:border-box;
44
- background-color:white;
45
- background-color:var(--iui-color-background-1);
46
- }
47
- @media screen and (max-width: 400px){
48
- .iui-modal > .iui-modal-dialog{
49
- max-width:95%;
50
- width:95%;
51
- min-width:95%;
52
- }
53
- }
54
- .iui-modal > .iui-modal-dialog .iui-title-bar{
55
- display:flex;
56
- align-items:center;
57
- margin-bottom:11px;
58
- justify-content:space-between;
59
- }
60
- .iui-modal > .iui-modal-dialog .iui-title-bar > .iui-title{
61
- font-size:18px;
62
- white-space:nowrap;
63
- overflow:hidden;
64
- text-overflow:ellipsis;
65
- line-height:1.5;
66
- }
67
- .iui-modal > .iui-modal-dialog .iui-button-bar{
68
- margin-top:11px;
69
- display:flex;
70
- align-items:center;
71
- justify-content:flex-end;
72
- }
73
- .iui-modal > .iui-modal-dialog .iui-button-bar > .iui-button:not(:last-child){
74
- margin-right:8px;
75
- }
76
- .iui-modal > .iui-modal-dialog .iui-modal-content{
77
- flex-grow:2;
78
- margin:0 -16px;
79
- padding:0 16px;
80
- overflow-y:auto;
81
- overflow-y:overlay;
82
- }
83
- .iui-modal-full-page > .iui-modal-dialog{
84
- display:flex;
85
- flex-direction:column;
86
- height:100vh;
87
- width:100vw;
88
- left:0;
89
- top:0;
90
- transform:none;
91
- max-width:initial;
92
- min-width:initial;
93
- border-radius:0;
94
- will-change:transform;
95
- }
96
- @media (prefers-reduced-motion: no-preference){
97
- .iui-modal-full-page{
98
- transition:visibility 0s linear 0.8s, opacity 0.4s ease-out 0.2s;
99
- }
100
- }
101
- .iui-modal-full-page > .iui-modal-dialog{
102
- transform:translateY(100%);
103
- }
104
- @media (prefers-reduced-motion: no-preference){
105
- .iui-modal-full-page > .iui-modal-dialog{
106
- transition:visibility 0s linear 0.4s, opacity 0s linear 0.4s, transform 0.25s ease-in;
107
- }
108
- }
109
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
110
- transform:translateY(0);
111
- }
112
- @media (prefers-reduced-motion: no-preference){
113
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
114
- transition:transform 0.3s ease-out;
115
- }
116
- }
117
- .iui-modal-animation-enter .iui-modal-full-page .iui-modal-dialog{
118
- transform:translateY(100%);
119
- opacity:0;
120
- }
121
- .iui-modal-animation-enter-active .iui-modal-full-page .iui-modal-dialog{
122
- transform:translateY(0);
123
- opacity:1;
124
- }
125
- .iui-modal-animation-enter .iui-modal{
126
- visibility:hidden;
127
- opacity:0;
128
- }
129
- .iui-modal-animation-enter-active .iui-modal{
130
- visibility:visible;
131
- opacity:1;
132
- }