@itwin/itwinui-css 0.56.0 → 0.57.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.
package/css/global.css CHANGED
@@ -583,12 +583,12 @@ html.iui-theme-dark-hc{
583
583
  }
584
584
 
585
585
  .iui-anchor{
586
- --_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>");
587
586
  color:#008ae0;
588
587
  -webkit-tap-highlight-color:rgba(0, 138, 224, 0.2);
589
588
  color:var(--iui-color-foreground-primary);
590
589
  -webkit-tap-highlight-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
591
590
  border-radius:3px;
591
+ box-sizing:border-box;
592
592
  cursor:pointer;
593
593
  text-decoration:none;
594
594
  }
@@ -606,22 +606,6 @@ html.iui-theme-dark-hc{
606
606
  color:#006bad;
607
607
  color:var(--iui-color-foreground-primary-overlay);
608
608
  }
609
- .iui-anchor-external::after{
610
- content:"";
611
- display:inline-block;
612
- width:1.5ch;
613
- height:1.5ch;
614
- margin-left:0.5ch;
615
- vertical-align:-0.1ch;
616
- background-color:currentColor;
617
- -webkit-mask:var(--_iui-anchor-external-svg);
618
- mask:var(--_iui-anchor-external-svg);
619
- }
620
- @media (forced-colors: active){
621
- .iui-anchor-external::after{
622
- background-color:LinkText;
623
- }
624
- }
625
609
  .iui-anchor:hover{
626
610
  text-decoration:underline;
627
611
  }
@@ -39,12 +39,12 @@
39
39
  border-color:rgba(0, 0, 0, 0.8);
40
40
  border-color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
41
41
  }
42
- .iui-radio-tile-content:hover svg{
42
+ .iui-radio-tile-content:hover .iui-radio-tile-icon{
43
43
  fill:rgba(0, 0, 0, 0.8);
44
44
  fill:var(--iui-icons-color-actionable);
45
45
  }
46
46
  @media (forced-colors: active){
47
- .iui-radio-tile-content:hover svg{
47
+ .iui-radio-tile-content:hover .iui-radio-tile-icon{
48
48
  fill:CanvasText;
49
49
  }
50
50
  }
@@ -102,12 +102,12 @@
102
102
  border-color:Highlight;
103
103
  }
104
104
  }
105
- .iui-radio-tile-input:checked + * svg{
105
+ .iui-radio-tile-input:checked + * .iui-radio-tile-icon{
106
106
  fill:#008ae0;
107
107
  fill:var(--iui-icons-color-primary);
108
108
  }
109
109
  @media (forced-colors: active){
110
- .iui-radio-tile-input:checked + * svg{
110
+ .iui-radio-tile-input:checked + * .iui-radio-tile-icon{
111
111
  fill:Highlight;
112
112
  }
113
113
  }
@@ -145,18 +145,16 @@
145
145
  background-color:GrayText;
146
146
  }
147
147
  }
148
- .iui-radio-tile-input:disabled + * svg{
148
+ .iui-radio-tile-input:disabled + * .iui-radio-tile-icon{
149
+ filter:grayscale(100%);
149
150
  fill:rgba(0, 0, 0, 0.2);
150
151
  fill:var(--iui-icons-color-actionable-disabled);
151
152
  }
152
153
  @media (forced-colors: active){
153
- .iui-radio-tile-input:disabled + * svg{
154
+ .iui-radio-tile-input:disabled + * .iui-radio-tile-icon{
154
155
  fill:GrayText;
155
156
  }
156
157
  }
157
- .iui-radio-tile-input:disabled + * .iui-radio-tile-icon{
158
- filter:grayscale(100%);
159
- }
160
158
  @media (forced-colors: active){
161
159
  .iui-radio-tile-input:disabled + * .iui-radio-tile-label,
162
160
  .iui-radio-tile-input:disabled + * .iui-radio-tile-sublabel{
@@ -185,18 +183,16 @@
185
183
  margin:0 auto;
186
184
  padding-top:6px;
187
185
  padding-bottom:11px;
188
- }
189
- .iui-radio-tile-icon svg{
190
186
  fill:rgba(0, 0, 0, 0.4);
191
187
  fill:var(--iui-icons-color);
192
188
  }
193
189
  @media (prefers-reduced-motion: no-preference){
194
- .iui-radio-tile-icon svg{
190
+ .iui-radio-tile-icon{
195
191
  transition:fill 0.2s ease-out;
196
192
  }
197
193
  }
198
194
  @media (forced-colors: active){
199
- .iui-radio-tile-icon svg{
195
+ .iui-radio-tile-icon{
200
196
  fill:CanvasText;
201
197
  }
202
198
  }
package/css/table.css CHANGED
@@ -533,6 +533,7 @@
533
533
 
534
534
  .iui-paginator-page-button{
535
535
  --_iui-button-active-stripe-inset:initial;
536
+ --_iui-button-text-color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
536
537
  margin:0;
537
538
  padding:0;
538
539
  border:none;
@@ -559,6 +560,7 @@
559
560
  border:1px solid transparent;
560
561
  color:rgba(0, 0, 0, 0.8);
561
562
  color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
563
+ color:var(--_iui-button-text-color);
562
564
  border-color:transparent;
563
565
  background-color:transparent;
564
566
  padding:0 8px;
@@ -573,9 +575,8 @@
573
575
  }
574
576
  }
575
577
  .iui-paginator-page-button:hover{
578
+ --_iui-button-text-color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-1));
576
579
  text-decoration:none;
577
- color:black;
578
- color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-1));
579
580
  }
580
581
  .iui-paginator-page-button:focus-visible{
581
582
  outline:1px solid var(--iui-color-foreground-primary);
@@ -596,15 +597,6 @@
596
597
  border-color:var(--iui-color-background-disabled);
597
598
  color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
598
599
  }
599
- .iui-paginator-page-button.iui-active::after{
600
- content:"";
601
- position:absolute;
602
- inset:var(--_iui-button-active-stripe-inset);
603
- background-color:var(--iui-color-foreground-primary);
604
- }
605
- .iui-paginator-page-button.iui-active[disabled]::after, .iui-paginator-page-button.iui-active:disabled::after{
606
- background-color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
607
- }
608
600
  .iui-paginator-page-button > .iui-button-icon:only-child{
609
601
  margin-left:3px;
610
602
  margin-right:3px;
@@ -639,6 +631,15 @@
639
631
  background-color:rgba(0, 0, 0, 0.05);
640
632
  background-color:rgba(var(--iui-color-foreground-body-rgb), 0.05);
641
633
  }
634
+ .iui-paginator-page-button.iui-active::after{
635
+ content:"";
636
+ position:absolute;
637
+ inset:var(--_iui-button-active-stripe-inset);
638
+ background-color:var(--iui-color-foreground-primary);
639
+ }
640
+ .iui-paginator-page-button.iui-active[disabled]::after, .iui-paginator-page-button.iui-active:disabled::after{
641
+ background-color:rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
642
+ }
642
643
  .iui-paginator-page-button-small{
643
644
  padding:0 8px;
644
645
  height:27px;
package/css/tag.css CHANGED
@@ -73,12 +73,12 @@
73
73
  }
74
74
 
75
75
  a.iui-tag-basic{
76
- --_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>");
77
76
  color:#008ae0;
78
77
  -webkit-tap-highlight-color:rgba(0, 138, 224, 0.2);
79
78
  color:var(--iui-color-foreground-primary);
80
79
  -webkit-tap-highlight-color:rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-5));
81
80
  border-radius:3px;
81
+ box-sizing:border-box;
82
82
  cursor:pointer;
83
83
  text-decoration:none;
84
84
  }
@@ -96,22 +96,6 @@ a.iui-tag-basic:hover{
96
96
  color:#006bad;
97
97
  color:var(--iui-color-foreground-primary-overlay);
98
98
  }
99
- a.iui-tag-basic-external::after{
100
- content:"";
101
- display:inline-block;
102
- width:1.5ch;
103
- height:1.5ch;
104
- margin-left:0.5ch;
105
- vertical-align:-0.1ch;
106
- background-color:currentColor;
107
- -webkit-mask:var(--_iui-anchor-external-svg);
108
- mask:var(--_iui-anchor-external-svg);
109
- }
110
- @media (forced-colors: active){
111
- a.iui-tag-basic-external::after{
112
- background-color:LinkText;
113
- }
114
- }
115
99
  a.iui-tag-basic:hover{
116
100
  text-decoration:underline;
117
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-css",
3
- "version": "0.56.0",
3
+ "version": "0.57.0",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "src/index.scss",
@@ -4,4 +4,8 @@
4
4
 
5
5
  .iui-anchor {
6
6
  @include iui-anchor;
7
+
8
+ &-external {
9
+ @include iui-anchor-external;
10
+ }
7
11
  }
@@ -21,45 +21,101 @@
21
21
 
22
22
  @mixin iui-breadcrumbs-item {
23
23
  display: flex;
24
+ align-items: center;
24
25
  line-height: $iui-component-height;
25
26
  height: $iui-component-height;
26
- max-width: $iui-3xl * 2;
27
- margin: 0 $iui-sm;
28
27
 
29
- a {
30
- @include iui-anchor;
31
- }
32
-
33
- .iui-button {
34
- @include iui-button-borderless;
35
- margin: 0 (-$iui-s - 1);
28
+ > * {
29
+ max-width: 26ch;
36
30
  }
31
+ }
37
32
 
38
- > *,
39
- .iui-button-label {
33
+ @mixin iui-breadcrumbs-item-overrides {
34
+ > * {
35
+ padding: 0 $iui-s;
40
36
  overflow: hidden;
41
37
  white-space: nowrap;
42
38
  text-overflow: ellipsis;
39
+ @include themed {
40
+ color: t(iui-text-color);
41
+ }
43
42
  }
44
43
 
45
- &:not(.iui-current) > .iui-button {
46
- @include themed {
47
- color: t(iui-color-foreground-primary);
44
+ > :any-link {
45
+ @include iui-anchor;
46
+
47
+ &:focus {
48
+ outline-offset: -1px;
49
+ }
50
+ }
51
+
52
+ .iui-button {
53
+ &.iui-button {
54
+ @include iui-button-borderless;
55
+ @include iui-focus;
56
+ border: none;
57
+ }
58
+
59
+ &-label {
60
+ overflow: hidden;
61
+ white-space: nowrap;
62
+ text-overflow: ellipsis;
48
63
  }
49
64
 
50
- &:hover {
51
- @include themed {
52
- color: t(iui-color-foreground-primary-overlay);
65
+ &:not([aria-current]) {
66
+ &,
67
+ &:hover,
68
+ &:active {
69
+ --_iui-button-text-color: var(--iui-color-foreground-primary);
53
70
  }
54
71
  }
55
72
  }
56
73
  }
57
74
 
75
+ @mixin iui-breadcrumbs-text {
76
+ padding: 0 $iui-s;
77
+ overflow: hidden;
78
+ white-space: nowrap;
79
+ text-overflow: ellipsis;
80
+
81
+ @at-root a#{&} {
82
+ @include iui-anchor;
83
+
84
+ &:focus {
85
+ outline-offset: -1px;
86
+ }
87
+ }
88
+ }
89
+
90
+ @mixin iui-breadcrumbs-button {
91
+ @include iui-button;
92
+ @include iui-button-borderless;
93
+ padding: 0;
94
+ border: none;
95
+ @include themed {
96
+ color: t(iui-color-foreground-primary);
97
+ }
98
+
99
+ &[aria-current] {
100
+ @include themed {
101
+ color: t(iui-text-color);
102
+ }
103
+ }
104
+ }
105
+
58
106
  @mixin iui-breadcrumbs-separator {
59
107
  display: flex;
108
+ margin: 0 $iui-xxs;
60
109
 
61
110
  svg {
62
- @include iui-icons-small;
111
+ width: $iui-icons-small;
112
+ height: $iui-icons-small;
63
113
  display: flex; // needed for vertical alignment of webcomponents
114
+ @include themed {
115
+ fill: t(iui-icons-color);
116
+ }
117
+ @media (forced-colors: active) {
118
+ fill: CanvasText;
119
+ }
64
120
  }
65
121
  }
@@ -12,6 +12,15 @@
12
12
 
13
13
  .iui-breadcrumbs-item {
14
14
  @include iui-breadcrumbs-item;
15
+ @include iui-breadcrumbs-item-overrides;
16
+ }
17
+
18
+ .iui-breadcrumbs-text {
19
+ @include iui-breadcrumbs-text;
20
+ }
21
+
22
+ .iui-breadcrumbs-button {
23
+ @include iui-breadcrumbs-button;
15
24
  }
16
25
 
17
26
  .iui-breadcrumbs-separator {
@@ -11,6 +11,7 @@ $iui-button-padding-large: $iui-xs * 6;
11
11
 
12
12
  @mixin iui-button {
13
13
  --_iui-button-active-stripe-inset: initial;
14
+ --_iui-button-text-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
14
15
 
15
16
  @include iui-reset;
16
17
  font-family: inherit;
@@ -38,12 +39,12 @@ $iui-button-padding-large: $iui-xs * 6;
38
39
  @include themed {
39
40
  color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
40
41
  }
42
+ color: var(--_iui-button-text-color);
41
43
 
42
44
  &:hover {
45
+ --_iui-button-text-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-1));
46
+
43
47
  text-decoration: none;
44
- @include themed {
45
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
46
- }
47
48
  }
48
49
 
49
50
  @include iui-focus;
@@ -52,21 +53,21 @@ $iui-button-padding-large: $iui-xs * 6;
52
53
  &:disabled {
53
54
  @include iui-button-disabled;
54
55
  }
56
+ }
55
57
 
56
- &.iui-active {
57
- // Shows active stripe only if --_iui-button-active-stripe-inset is set (from outside)
58
- &::after {
59
- content: '';
60
- position: absolute;
61
- inset: var(--_iui-button-active-stripe-inset);
62
- background-color: var(--iui-color-foreground-primary);
63
- }
58
+ @mixin iui-button-active {
59
+ // Shows active stripe only if --_iui-button-active-stripe-inset is set (from outside)
60
+ &::after {
61
+ content: '';
62
+ position: absolute;
63
+ inset: var(--_iui-button-active-stripe-inset);
64
+ background-color: var(--iui-color-foreground-primary);
65
+ }
64
66
 
65
- &[disabled],
66
- &:disabled {
67
- &::after {
68
- background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
69
- }
67
+ &[disabled],
68
+ &:disabled {
69
+ &::after {
70
+ background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-5));
70
71
  }
71
72
  }
72
73
  }
@@ -6,6 +6,10 @@
6
6
  @include iui-button;
7
7
  @include iui-button-size;
8
8
 
9
+ &.iui-active {
10
+ @include iui-button-active;
11
+ }
12
+
9
13
  &.iui-default {
10
14
  @include iui-button-default;
11
15
  }
@@ -6,11 +6,14 @@
6
6
  @import './disabled';
7
7
 
8
8
  @mixin iui-button-cta {
9
+ --_iui-button-text-color: var(--iui-color-foreground-accessory);
10
+
9
11
  @include themed {
10
12
  background-color: t(iui-color-background-positive);
11
13
  border-color: t(iui-color-background-positive);
12
14
  color: t(iui-color-foreground-accessory);
13
15
  }
16
+ color: var(--_iui-button-text-color);
14
17
  @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px, $thickness: 1px);
15
18
 
16
19
  &:hover,
@@ -18,7 +21,6 @@
18
21
  @include themed {
19
22
  background-color: t(iui-color-background-positive-overlay);
20
23
  border-color: t(iui-color-background-positive-overlay);
21
- color: t(iui-color-foreground-accessory);
22
24
  }
23
25
  }
24
26
 
@@ -10,7 +10,6 @@
10
10
  @include themed {
11
11
  background-color: t(iui-color-background-1);
12
12
  border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
13
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
14
13
  }
15
14
  @include iui-focus($offset: -2px, $thickness: 2px);
16
15
 
@@ -19,7 +18,6 @@
19
18
  @include themed {
20
19
  background-color: t(iui-color-background-1-overlay);
21
20
  border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
22
- color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-1));
23
21
  }
24
22
  @include iui-notification-marker-hover;
25
23
  }
@@ -6,11 +6,14 @@
6
6
  @import './button-icon';
7
7
 
8
8
  @mixin iui-button-high-visibility {
9
+ --_iui-button-text-color: var(--iui-color-foreground-accessory);
10
+
9
11
  @include themed {
10
12
  background-color: t(iui-color-background-primary);
11
13
  border-color: t(iui-color-background-primary);
12
14
  color: t(iui-color-foreground-accessory);
13
15
  }
16
+ color: var(--_iui-button-text-color);
14
17
  @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px, $thickness: 1px);
15
18
 
16
19
  &:hover,
@@ -18,7 +21,6 @@
18
21
  @include themed {
19
22
  background-color: t(iui-color-background-primary-overlay);
20
23
  border-color: t(iui-color-background-primary-overlay);
21
- color: t(iui-color-foreground-accessory);
22
24
  }
23
25
  }
24
26
 
@@ -42,7 +42,7 @@
42
42
  border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
43
43
  }
44
44
 
45
- svg {
45
+ .iui-radio-tile-icon {
46
46
  @media (forced-colors: active) {
47
47
  fill: CanvasText;
48
48
  }
@@ -90,7 +90,7 @@
90
90
  border: 2px solid t(iui-color-foreground-primary);
91
91
  }
92
92
 
93
- svg {
93
+ .iui-radio-tile-icon {
94
94
  @media (forced-colors: active) {
95
95
  fill: Highlight;
96
96
  }
@@ -133,7 +133,8 @@
133
133
  }
134
134
  }
135
135
 
136
- svg {
136
+ .iui-radio-tile-icon {
137
+ filter: $iui-icons-color-multicolor-disabled;
137
138
  @media (forced-colors: active) {
138
139
  fill: GrayText;
139
140
  }
@@ -142,10 +143,6 @@
142
143
  }
143
144
  }
144
145
 
145
- .iui-radio-tile-icon {
146
- filter: $iui-icons-color-multicolor-disabled;
147
- }
148
-
149
146
  .iui-radio-tile-label,
150
147
  .iui-radio-tile-sublabel {
151
148
  @media (forced-colors: active) {
@@ -179,16 +176,14 @@
179
176
  padding-top: round($iui-baseline * 0.5);
180
177
  padding-bottom: $iui-baseline;
181
178
 
182
- svg {
183
- @media (prefers-reduced-motion: no-preference) {
184
- transition: fill $iui-speed-fast ease-out;
185
- }
186
- @media (forced-colors: active) {
187
- fill: CanvasText;
188
- }
189
- @include themed {
190
- fill: t(iui-icons-color);
191
- }
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);
192
187
  }
193
188
  }
194
189
 
@@ -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 {
@@ -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