@itwin/itwinui-css 0.53.3 → 0.54.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.
@@ -0,0 +1,79 @@
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 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
+ @include iui-anchor-status('primary');
9
+ border-radius: $iui-border-radius;
10
+ cursor: pointer;
11
+
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
+ @include iui-anchor-underline('on-hover');
27
+
28
+ @media (prefers-contrast: more) {
29
+ @include iui-anchor-underline('on-initial');
30
+ }
31
+
32
+ @at-root {
33
+ .iui-theme-light &,
34
+ .iui-theme-dark & {
35
+ @include iui-anchor-underline('on-hover');
36
+ }
37
+ }
38
+
39
+ @at-root {
40
+ .iui-theme-light-hc &,
41
+ .iui-theme-dark-hc & {
42
+ @include iui-anchor-underline('on-initial');
43
+ }
44
+ }
45
+ }
46
+
47
+ @mixin iui-anchor-status($status: primary) {
48
+ @include iui-focus($color: var(--iui-color-foreground-#{$status}), $offset: 1px);
49
+ @include themed {
50
+ color: t(iui-color-foreground-#{$status});
51
+ -webkit-tap-highlight-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-5));
52
+ }
53
+ @if $status != primary {
54
+ @include iui-text-selection($status);
55
+ }
56
+
57
+ &:hover {
58
+ @include themed {
59
+ color: t(iui-color-foreground-#{$status}-overlay);
60
+ }
61
+ }
62
+ }
63
+
64
+ /// $behavior should be one of: 'on-hover' or 'on-initial'
65
+ @mixin iui-anchor-underline($behavior: 'on-hover') {
66
+ @if $behavior == 'on-hover' {
67
+ text-decoration: none;
68
+
69
+ &:hover {
70
+ text-decoration: underline;
71
+ }
72
+ } @else {
73
+ text-decoration: underline;
74
+
75
+ &:hover {
76
+ text-decoration: none;
77
+ }
78
+ }
79
+ }
@@ -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-anchor {
6
+ @include iui-anchor;
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 './anchor';
@@ -1,8 +1,9 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
- @import '../icon/index';
4
+ @import '../anchor/index';
5
5
  @import '../button/borderless';
6
+ @import '../icon/index';
6
7
 
7
8
  @mixin iui-breadcrumbs {
8
9
  @include iui-reset;
package/scss/classes.scss CHANGED
@@ -3,6 +3,7 @@
3
3
  @import './style/index';
4
4
  @import './style/global';
5
5
  @import './alert/classes';
6
+ @import './anchor/classes';
6
7
  @import './badge/classes';
7
8
  @import './blockquote/classes';
8
9
  @import './breadcrumbs/classes';
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
+ @import '../anchor/index';
4
5
 
5
6
  @mixin iui-legal-footer {
6
7
  @include iui-reset;
package/scss/index.scss CHANGED
@@ -2,6 +2,7 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './style/index';
4
4
  @import './alert/index';
5
+ @import './anchor/index';
5
6
  @import './badge/index';
6
7
  @import './blockquote/index';
7
8
  @import './breadcrumbs/index';
@@ -15,8 +15,9 @@
15
15
  position: fixed;
16
16
  text-align: center;
17
17
  left: 50%;
18
- opacity: 0;
19
18
  top: $iui-baseline * 2;
19
+ opacity: 0;
20
+ z-index: 99;
20
21
  transform: translateX(-50%) translateY(-170%);
21
22
  transition: background-color $iui-speed-fast ease-in-out;
22
23
  @media (prefers-reduced-motion: no-preference) {
@@ -51,10 +51,6 @@ html {
51
51
  }
52
52
  }
53
53
 
54
- .iui-anchor {
55
- @include iui-anchor;
56
- }
57
-
58
54
  [class*='iui-'],
59
55
  [class*='iui-'] * {
60
56
  // Text highlight
@@ -46,23 +46,6 @@
46
46
  vertical-align: baseline;
47
47
  }
48
48
 
49
- @mixin iui-anchor {
50
- @include iui-focus($offset: 2px);
51
- border-radius: $iui-border-radius;
52
- text-decoration: none;
53
- cursor: pointer;
54
- @include themed {
55
- color: t(iui-color-foreground-primary);
56
- }
57
-
58
- &:hover {
59
- @include themed {
60
- color: t(iui-color-foreground-primary-overlay);
61
- }
62
- text-decoration: underline;
63
- }
64
- }
65
-
66
49
  @mixin iui-text-selection($status: primary) {
67
50
  &::selection,
68
51
  *::selection {
@@ -196,12 +196,12 @@
196
196
  }
197
197
  }
198
198
 
199
- > .iui-slot > .iui-more-options {
199
+ > .iui-slot:not(.iui-disabled) > .iui-more-options {
200
200
  visibility: visible;
201
201
  }
202
202
  }
203
203
 
204
- &:not(.iui-disabled):focus-within > .iui-slot > .iui-more-options {
204
+ &:focus-within > .iui-slot:not(.iui-disabled) > .iui-more-options {
205
205
  visibility: visible;
206
206
  }
207
207
 
@@ -295,15 +295,15 @@
295
295
  }
296
296
  }
297
297
 
298
- &.iui-disabled,
299
- &.iui-disabled + .iui-expanded-content {
298
+ .iui-cell.iui-disabled,
299
+ &.iui-expanded-content.iui-disabled {
300
300
  font-style: italic;
301
301
  cursor: not-allowed;
302
302
  @include themed {
303
303
  color: t(iui-text-color-muted);
304
304
  }
305
305
 
306
- &:hover > .iui-slot > .iui-more-options {
306
+ &.iui-slot:hover > .iui-more-options {
307
307
  visibility: hidden;
308
308
  }
309
309
 
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './tag';
4
+ @import '../anchor/index';
4
5
 
5
6
  .iui-tag {
6
7
  @include iui-tag;
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
+ @import '../anchor/index';
4
5
  @import './toast';
5
6
 
6
7
  /// category must be one of: positive, negative, primary (informational), warning
@@ -19,25 +20,7 @@
19
20
  }
20
21
  }
21
22
 
22
- @if $category != primary {
23
- > .iui-anchor {
24
- @include themed {
25
- color: t(iui-color-foreground-#{$category});
26
- }
27
-
28
- &:hover {
29
- @include themed {
30
- color: t(iui-color-foreground-#{$category}-overlay);
31
- }
32
- }
33
- }
34
-
35
- > .iui-anchor {
36
- outline-color: var(--iui-color-foreground-#{$category});
37
- }
38
-
39
- > .iui-button {
40
- outline-color: var(--iui-color-foreground-#{$category});
41
- }
23
+ > .iui-toast-anchor {
24
+ @include iui-anchor-status($category);
42
25
  }
43
26
  }
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import '../style/index';
4
+ @import '../anchor/index';
4
5
  @import '../icon/index';
5
6
 
6
7
  @mixin iui-toast {
@@ -53,16 +54,14 @@
53
54
  }
54
55
  }
55
56
 
56
- > .iui-anchor {
57
+ &-anchor {
58
+ @include iui-anchor-underline('on-initial');
59
+ border-radius: $iui-border-radius;
60
+ cursor: pointer;
57
61
  font-size: $iui-font-size-small;
58
62
  margin-right: $iui-m;
59
63
  user-select: none;
60
- text-decoration: underline;
61
64
  white-space: nowrap;
62
-
63
- &:hover {
64
- text-decoration: none;
65
- }
66
65
  }
67
66
 
68
67
  > .iui-button {