@vialiq/flux-ui 0.17.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.
- package/components/_focus.scss +6 -0
- package/components/_index.scss +3 -0
- package/components/_input.scss +7 -0
- package/components/_label.scss +53 -0
- package/components/_link.scss +76 -0
- package/package.json +1 -1
- package/styles/_variables.scss +9 -0
package/components/_index.scss
CHANGED
package/components/_input.scss
CHANGED
|
@@ -60,6 +60,13 @@
|
|
|
60
60
|
&::placeholder {
|
|
61
61
|
color: var(--vi-input-placeholder-color, #{tokens.$text-secondary});
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
&:disabled {
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
background-color: var(--vi-input-bg-disabled, #{tokens.$layer-disabled});
|
|
67
|
+
color: var(--vi-input-text-disabled, #{tokens.$text-disabled});
|
|
68
|
+
border-color: var(--vi-input-border-disabled, #{tokens.$border-02});
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
// -------------------------------------------------------------------------
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@use '../styles/variables' as tokens;
|
|
2
|
+
|
|
3
|
+
@layer components {
|
|
4
|
+
.vi-label {
|
|
5
|
+
// --vi-label-font-size: var(--vi-font-size-sm)
|
|
6
|
+
--vi-label-font-size: var(--vi-font-size-sm, #{tokens.$font-size-sm});
|
|
7
|
+
// --vi-label-font-weight: var(--vi-font-weight-medium)
|
|
8
|
+
--vi-label-font-weight: var(--vi-font-weight-medium, #{tokens.$font-weight-medium});
|
|
9
|
+
// --vi-label-color: var(--vi-text-primary)
|
|
10
|
+
--vi-label-color: var(--vi-text-primary, #{tokens.$text-primary});
|
|
11
|
+
// --vi-label-color-disabled: var(--vi-text-disabled)
|
|
12
|
+
--vi-label-color-disabled: var(--vi-text-disabled, #{tokens.$text-disabled});
|
|
13
|
+
// --vi-label-required-color: var(--vi-color-error)
|
|
14
|
+
--vi-label-required-color: var(--vi-color-error, #{tokens.$color-error});
|
|
15
|
+
// --vi-label-optional-color: var(--vi-text-helper)
|
|
16
|
+
--vi-label-optional-color: var(--vi-text-helper, #{tokens.$text-helper});
|
|
17
|
+
// --vi-label-gap: 4px
|
|
18
|
+
--vi-label-gap: 4px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.vi-label {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--vi-label-gap);
|
|
25
|
+
font-size: var(--vi-label-font-size);
|
|
26
|
+
font-weight: var(--vi-label-font-weight);
|
|
27
|
+
color: var(--vi-label-color);
|
|
28
|
+
line-height: 1.5;
|
|
29
|
+
margin: 0;
|
|
30
|
+
|
|
31
|
+
&.size-sm {
|
|
32
|
+
--vi-label-font-size: var(--vi-font-size-xs, #{tokens.$font-size-xs});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.size-lg {
|
|
36
|
+
--vi-label-font-size: var(--vi-font-size-base, #{tokens.$font-size-base});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.is-disabled {
|
|
40
|
+
color: var(--vi-label-color-disabled);
|
|
41
|
+
cursor: default;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vi-label-required {
|
|
46
|
+
color: var(--vi-label-required-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.vi-label-optional {
|
|
50
|
+
color: var(--vi-label-optional-color);
|
|
51
|
+
font-weight: normal;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -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
package/styles/_variables.scss
CHANGED
|
@@ -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);
|