@vialiq/flux-ui 0.18.0 → 0.19.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,6 @@
1
+
2
+ @mixin vi-focus-ring($color-token, $glow-token) {
3
+ outline: var(--vi-border-width-base, 2px) solid var(--vi-focus-ring-color, #{$color-token});
4
+ outline-offset: 0;
5
+ box-shadow: 0 0 0 3px var(--vi-focus-ring-glow, #{$glow-token});
6
+ }
@@ -17,3 +17,5 @@
17
17
  @forward 'animation';
18
18
  @forward 'switch';
19
19
  @forward 'select';
20
+ @forward 'link';
21
+ @forward 'focus';
@@ -0,0 +1,76 @@
1
+ @use '../styles/variables' as tokens;
2
+ @use './focus' as *;
3
+
4
+ @mixin vi-link-styles {
5
+ color: var(--vi-link-color, #{tokens.$link-color});
6
+ text-decoration-thickness: 1px;
7
+ text-underline-offset: var(--vi-link-underline-offset, 2px);
8
+ cursor: pointer;
9
+ transition: color 0.2s ease, text-decoration-color 0.2s ease;
10
+ outline: none;
11
+ text-decoration: underline;
12
+
13
+ &.underline-none {
14
+ text-decoration: none;
15
+ }
16
+
17
+ &.underline-hover {
18
+ text-decoration: none;
19
+ &:hover {
20
+ text-decoration: underline;
21
+ }
22
+ }
23
+
24
+ &.size-inherit {
25
+ font-size: inherit;
26
+ }
27
+
28
+ &.size-sm {
29
+ font-size: var(--vi-font-size-sm, #{tokens.$font-size-sm});
30
+ }
31
+
32
+ &.size-md {
33
+ font-size: var(--vi-font-size-base, #{tokens.$font-size-base});
34
+ }
35
+
36
+ &.size-lg {
37
+ font-size: var(--vi-font-size-lg, #{tokens.$font-size-lg});
38
+ }
39
+
40
+ &.variant-secondary {
41
+ --vi-link-color: var(--vi-link-color-secondary, #{tokens.$link-color-secondary});
42
+ --vi-link-color-hover: var(--vi-link-color-secondary-hover, #{tokens.$color-grey-800});
43
+ --vi-link-color-active: var(--vi-link-color-secondary-active, #{tokens.$color-grey-900});
44
+ --vi-link-color-visited: var(--vi-link-color-secondary-visited, #{tokens.$color-grey-700});
45
+ }
46
+
47
+ &.variant-muted {
48
+ --vi-link-color: var(--vi-link-color-muted, #{tokens.$link-color-muted});
49
+ --vi-link-color-hover: var(--vi-link-color-muted-hover, #{tokens.$color-grey-600});
50
+ --vi-link-color-active: var(--vi-link-color-muted-active, #{tokens.$color-grey-700});
51
+ --vi-link-color-visited: var(--vi-link-color-muted-visited, #{tokens.$color-grey-500});
52
+ }
53
+
54
+ &:visited {
55
+ color: var(--vi-link-color-visited, #{tokens.$link-color-visited});
56
+ }
57
+
58
+ &:hover {
59
+ color: var(--vi-link-color-hover, #{tokens.$link-color-hover});
60
+ }
61
+
62
+ &:active {
63
+ color: var(--vi-link-color-active, #{tokens.$link-color-active});
64
+ }
65
+
66
+ &:focus-visible {
67
+ @include vi-focus-ring(tokens.$link-color, transparent);
68
+ }
69
+
70
+ &[aria-disabled="true"], &.disabled {
71
+ color: var(--vi-link-color-disabled, #{tokens.$link-color-disabled});
72
+ pointer-events: none;
73
+ cursor: not-allowed;
74
+ text-decoration: none;
75
+ }
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vialiq/flux-ui",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -425,3 +425,12 @@ $modal-max-width-sm: var(--vi-modal-max-width-sm, 480px);
425
425
  $modal-max-width-md: var(--vi-modal-max-width-md, 640px);
426
426
  $modal-max-width-lg: var(--vi-modal-max-width-lg, 800px);
427
427
  $modal-max-width-xl: var(--vi-modal-max-width-xl, 960px);
428
+
429
+
430
+ $link-color: var(--vi-link-color, $color-primary);
431
+ $link-color-hover: var(--vi-link-color-hover, $color-blue-800);
432
+ $link-color-active: var(--vi-link-color-active, $color-blue-900);
433
+ $link-color-visited: var(--vi-link-color-visited, $color-purple-600);
434
+ $link-color-disabled: var(--vi-link-color-disabled, $color-grey-400);
435
+ $link-color-secondary:var(--vi-link-color-secondary,$color-grey-700);
436
+ $link-color-muted: var(--vi-link-color-muted, $color-grey-500);