@thalassic/ui 0.1.0 → 0.2.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/LICENSE.txt +21 -0
- package/features/button/button-appearance.scss +144 -0
- package/features/button/button-color.scss +41 -0
- package/features/button/button-size.scss +54 -0
- package/features/button/button.scss +59 -0
- package/features/divider/divider.scss +91 -0
- package/features/form/checkbox/checkbox.scss +95 -0
- package/features/form/input/input.scss +9 -0
- package/features/form/password/password.scss +25 -0
- package/features/form/radio-button/radio-button.scss +103 -0
- package/features/form/switch/switch-color.scss +36 -0
- package/features/form/switch/switch.scss +82 -0
- package/features/form-item/form-item.scss +79 -0
- package/features/icon/icon.scss +15 -0
- package/fesm2022/thalassic-ui.mjs +139 -39
- package/fesm2022/thalassic-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/components/_index.scss +1 -0
- package/styles/components/form/_form-control-addon.scss +2 -0
- package/styles/components/form/_form-control-group-size.scss +46 -0
- package/styles/components/form/_form-control-group.scss +58 -0
- package/styles/components/form/_form-control-size.scss +46 -0
- package/styles/components/form/_form-control.scss +45 -0
- package/styles/components/form/_index.scss +5 -0
- package/styles/index.scss +1 -0
- package/styles/mixins/_index.scss +1 -0
- package/styles/mixins/focus-ring.scss +4 -0
- package/types/thalassic-ui.d.ts +98 -17
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Konopyanov Manap
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
.tls-button {
|
|
3
|
+
@mixin hover-focus-state {
|
|
4
|
+
&:not(.tls-button--disabled):hover,
|
|
5
|
+
&:not(.tls-button--disabled):focus-visible {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin active-state {
|
|
11
|
+
&:not(.tls-button--disabled):active {
|
|
12
|
+
@content;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Appearances
|
|
17
|
+
&--filled {
|
|
18
|
+
.tls-button__content {
|
|
19
|
+
color: var(--tls-button-on-color);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tls-button__background {
|
|
23
|
+
background-color: var(--tls-button-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include hover-focus-state {
|
|
27
|
+
.tls-button__background {
|
|
28
|
+
opacity: 0.85;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@include active-state {
|
|
33
|
+
.tls-button__background {
|
|
34
|
+
opacity: 0.75;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--outlined {
|
|
40
|
+
.tls-button__content {
|
|
41
|
+
color: var(--tls-button-color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tls-button__background {
|
|
45
|
+
background-color: var(--tls-button-color);
|
|
46
|
+
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include hover-focus-state {
|
|
51
|
+
.tls-button__background {
|
|
52
|
+
opacity: 0.075;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include active-state {
|
|
57
|
+
.tls-button__background {
|
|
58
|
+
opacity: 0.15;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--text {
|
|
64
|
+
border-color: transparent;
|
|
65
|
+
|
|
66
|
+
.tls-button__content {
|
|
67
|
+
color: var(--tls-button-color);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tls-button__background {
|
|
71
|
+
background-color: var(--tls-button-color);
|
|
72
|
+
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include hover-focus-state {
|
|
77
|
+
.tls-button__background {
|
|
78
|
+
opacity: 0.075;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@include active-state {
|
|
83
|
+
.tls-button__background {
|
|
84
|
+
opacity: 0.15;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--elevated {
|
|
90
|
+
border: none;
|
|
91
|
+
|
|
92
|
+
box-shadow: var(--shadow-sm);
|
|
93
|
+
|
|
94
|
+
transition: box-shadow var(--motion-fast) var(--motion-ease-in-out);
|
|
95
|
+
|
|
96
|
+
.tls-button__content {
|
|
97
|
+
color: var(--tls-button-color);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.tls-button__background {
|
|
101
|
+
background-color: var(--tls-button-color);
|
|
102
|
+
|
|
103
|
+
opacity: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:not(.tls-button--disabled) {
|
|
107
|
+
padding-inline: calc(var(--tls-button-padding-inline) + var(--tls-button-border-width));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include hover-focus-state {
|
|
111
|
+
box-shadow: var(--shadow-md);
|
|
112
|
+
|
|
113
|
+
.tls-button__background {
|
|
114
|
+
opacity: 0.075;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@include active-state {
|
|
119
|
+
box-shadow: var(--shadow-sm);
|
|
120
|
+
|
|
121
|
+
.tls-button__background {
|
|
122
|
+
opacity: 0.15;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&--disabled {
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
|
|
130
|
+
border: var(--tls-button-border-width) solid var(--color-outline);
|
|
131
|
+
|
|
132
|
+
box-shadow: none;
|
|
133
|
+
|
|
134
|
+
.tls-button__content {
|
|
135
|
+
color: var(--tls-button-on-color);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.tls-button__background {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transition: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
&:has(.tls-button.tls-button--primary) {
|
|
3
|
+
--tls-button-on-color: var(--color-on-primary);
|
|
4
|
+
--tls-button-color: var(--color-primary);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&:has(.tls-button.tls-button--secondary) {
|
|
8
|
+
--tls-button-on-color: var(--color-on-secondary);
|
|
9
|
+
--tls-button-color: var(--color-secondary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:has(.tls-button.tls-button--tertiary) {
|
|
13
|
+
--tls-button-on-color: var(--color-on-tertiary);
|
|
14
|
+
--tls-button-color: var(--color-tertiary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:has(.tls-button.tls-button--success) {
|
|
18
|
+
--tls-button-on-color: var(--color-on-success);
|
|
19
|
+
--tls-button-color: var(--color-success);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:has(.tls-button.tls-button--info) {
|
|
23
|
+
--tls-button-on-color: var(--color-on-info);
|
|
24
|
+
--tls-button-color: var(--color-info);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:has(.tls-button.tls-button--warning) {
|
|
28
|
+
--tls-button-on-color: var(--color-on-warning);
|
|
29
|
+
--tls-button-color: var(--color-warning);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:has(.tls-button.tls-button--danger) {
|
|
33
|
+
--tls-button-on-color: var(--color-on-danger);
|
|
34
|
+
--tls-button-color: var(--color-danger);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:has(.tls-button.tls-button--disabled) {
|
|
38
|
+
--tls-button-on-color: var(--color-on-surface-variant);
|
|
39
|
+
--tls-button-color: var(--color-surface-variant);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
.tls-button {
|
|
3
|
+
--tls-button-width: auto;
|
|
4
|
+
|
|
5
|
+
width: var(--tls-button-width);
|
|
6
|
+
height: var(--tls-button-height);
|
|
7
|
+
padding-inline: var(--tls-button-padding-inline);
|
|
8
|
+
|
|
9
|
+
font-size: var(--tls-button-font-size);
|
|
10
|
+
font-weight: var(--tls-button-font-weight);
|
|
11
|
+
line-height: var(--tls-button-line-height);
|
|
12
|
+
letter-spacing: var(--tls-button-letter-spacing);
|
|
13
|
+
|
|
14
|
+
&.tls-button--icon-only {
|
|
15
|
+
padding-inline: 0;
|
|
16
|
+
|
|
17
|
+
aspect-ratio: 1/1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.tls-button--fluid {
|
|
21
|
+
--tls-button-width: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:has(.tls-button.tls-button--sm) {
|
|
26
|
+
--tls-button-height: var(--control-height-sm);
|
|
27
|
+
--tls-button-padding-inline: var(--spacing-3);
|
|
28
|
+
|
|
29
|
+
--tls-button-font-size: var(--font-label-small-size);
|
|
30
|
+
--tls-button-font-weight: var(--font-label-small-weight);
|
|
31
|
+
--tls-button-line-height: var(--font-label-small-line-height);
|
|
32
|
+
--tls-button-letter-spacing: var(--font-label-small-letter-spacing);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:has(.tls-button.tls-button--md) {
|
|
36
|
+
--tls-button-height: var(--control-height-md);
|
|
37
|
+
--tls-button-padding-inline: var(--spacing-4);
|
|
38
|
+
|
|
39
|
+
--tls-button-font-size: var(--font-label-medium-size);
|
|
40
|
+
--tls-button-font-weight: var(--font-label-medium-weight);
|
|
41
|
+
--tls-button-line-height: var(--font-label-medium-line-height);
|
|
42
|
+
--tls-button-letter-spacing: var(--font-label-medium-letter-spacing);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:has(.tls-button.tls-button--lg) {
|
|
46
|
+
--tls-button-height: var(--control-height-lg);
|
|
47
|
+
--tls-button-padding-inline: var(--spacing-5);
|
|
48
|
+
|
|
49
|
+
--tls-button-font-size: var(--font-label-large-size);
|
|
50
|
+
--tls-button-font-weight: var(--font-label-large-weight);
|
|
51
|
+
--tls-button-line-height: var(--font-label-large-line-height);
|
|
52
|
+
--tls-button-letter-spacing: var(--font-label-large-letter-spacing);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@use '../../styles/mixins' as mixins;
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
width: fit-content;
|
|
5
|
+
|
|
6
|
+
display: inline-block;
|
|
7
|
+
|
|
8
|
+
--tls-button-border-width: 1px;
|
|
9
|
+
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:has(.tls-button.tls-button--fluid) {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tls-button {
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
|
|
25
|
+
gap: 0.25rem;
|
|
26
|
+
|
|
27
|
+
border: var(--tls-button-border-width) solid var(--tls-button-color);
|
|
28
|
+
border-radius: var(--radius-md);
|
|
29
|
+
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
|
|
33
|
+
transition: border-color var(--motion-fast) var(--motion-ease-in-out);
|
|
34
|
+
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
@include mixins.focus-ring;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__content {
|
|
40
|
+
z-index: 1;
|
|
41
|
+
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
|
|
45
|
+
transition: color var(--motion-fast) var(--motion-ease-in-out);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__background {
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
|
|
52
|
+
border-radius: inherit;
|
|
53
|
+
|
|
54
|
+
transition:
|
|
55
|
+
background-color var(--motion-fast) var(--motion-ease-in-out),
|
|
56
|
+
opacity var(--motion-fast) var(--motion-ease-in-out);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
:host.tls-divider {
|
|
2
|
+
--tls-divider-line-color: var(--color-outline-variant);
|
|
3
|
+
--tls-divider-line-size: 1px;
|
|
4
|
+
--tls-divider-content-gap: var(--spacing-3);
|
|
5
|
+
--tls-divider-inset: 5%;
|
|
6
|
+
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
gap: var(--tls-divider-content-gap);
|
|
11
|
+
|
|
12
|
+
.tls-divider-content {
|
|
13
|
+
min-width: fit-content;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:has(.tls-divider-content:empty) {
|
|
17
|
+
.tls-divider-content {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.tls-divider-line.tls-divider-line--start {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Orientation
|
|
27
|
+
&.tls-divider--horizontal {
|
|
28
|
+
.tls-divider-line {
|
|
29
|
+
border-right-width: 0;
|
|
30
|
+
border-bottom-width: var(--tls-divider-line-size);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.tls-divider--vertical {
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
|
|
37
|
+
.tls-divider-line {
|
|
38
|
+
border-right-width: var(--tls-divider-line-size);
|
|
39
|
+
border-bottom-width: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Position
|
|
44
|
+
&.tls-divider--start {
|
|
45
|
+
.tls-divider-line.tls-divider-line--start {
|
|
46
|
+
flex-basis: var(--tls-divider-inset);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.tls-divider--flush {
|
|
50
|
+
.tls-divider-line.tls-divider-line--start {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.tls-divider--end {
|
|
57
|
+
.tls-divider-line.tls-divider-line--end {
|
|
58
|
+
flex-basis: var(--tls-divider-inset);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.tls-divider--flush {
|
|
62
|
+
.tls-divider-line.tls-divider-line--end {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Variant
|
|
69
|
+
&.tls-divider--dashed {
|
|
70
|
+
--tls-divider-line-variant: dashed;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.tls-divider--dotted {
|
|
74
|
+
--tls-divider-line-variant: dotted;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.tls-divider--solid {
|
|
78
|
+
--tls-divider-line-variant: solid;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Divider line
|
|
82
|
+
.tls-divider-line {
|
|
83
|
+
flex-basis: 100%;
|
|
84
|
+
flex-grow: 1;
|
|
85
|
+
|
|
86
|
+
border-top-width: 0;
|
|
87
|
+
border-left-width: 0;
|
|
88
|
+
border-style: var(--tls-divider-line-variant);
|
|
89
|
+
border-color: var(--tls-divider-line-color);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@use '../../../styles/mixins' as mixins;
|
|
2
|
+
|
|
3
|
+
:host.tls-checkbox {
|
|
4
|
+
--tls-checkbox-size: 20px;
|
|
5
|
+
--tls-checkbox-border-width: 1px;
|
|
6
|
+
--tls-checkbox-border-color: var(--color-primary);
|
|
7
|
+
--tls-checkbox-checked-icon-color: var(--color-surface);
|
|
8
|
+
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
width: var(--tls-checkbox-size);
|
|
12
|
+
height: var(--tls-checkbox-size);
|
|
13
|
+
|
|
14
|
+
display: inline-block;
|
|
15
|
+
|
|
16
|
+
transition: filter var(--motion-fast) var(--motion-ease-in-out);
|
|
17
|
+
|
|
18
|
+
.tls-checkbox-input {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
margin: 0;
|
|
22
|
+
|
|
23
|
+
appearance: none;
|
|
24
|
+
|
|
25
|
+
border: var(--tls-checkbox-border-width) solid var(--tls-checkbox-border-color);
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
|
|
30
|
+
background-color: var(--color-surface);
|
|
31
|
+
|
|
32
|
+
transition:
|
|
33
|
+
box-shadow var(--motion-fast) var(--motion-ease-in-out),
|
|
34
|
+
border-color var(--motion-fast) var(--motion-ease-in-out),
|
|
35
|
+
background-color var(--motion-fast) var(--motion-ease-in-out);
|
|
36
|
+
|
|
37
|
+
&:checked {
|
|
38
|
+
background-color: var(--color-primary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
@include mixins.focus-ring;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tls-checkbox-icon {
|
|
47
|
+
position: absolute;
|
|
48
|
+
inset: 0;
|
|
49
|
+
|
|
50
|
+
opacity: 0;
|
|
51
|
+
scale: 0;
|
|
52
|
+
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
|
|
55
|
+
color: var(--tls-checkbox-checked-icon-color);
|
|
56
|
+
|
|
57
|
+
transition:
|
|
58
|
+
scale var(--motion-default) var(--motion-ease-bounce),
|
|
59
|
+
opacity var(--motion-fast) var(--motion-ease-in-out);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Checked & Indeterminate
|
|
63
|
+
&.tls-checkbox--checked,
|
|
64
|
+
&.tls-checkbox--indeterminate {
|
|
65
|
+
.tls-checkbox-input {
|
|
66
|
+
background-color: var(--color-primary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.tls-checkbox-icon {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
scale: 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Form control
|
|
76
|
+
&.tls-checkbox--disabled {
|
|
77
|
+
--tls-checkbox-border-color: var(--color-outline);
|
|
78
|
+
|
|
79
|
+
filter: brightness(0.9);
|
|
80
|
+
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
|
|
83
|
+
.tls-checkbox-input {
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:not(.tls-checkbox--disabled).tls-checkbox--touched.tls-checkbox--invalid {
|
|
89
|
+
--tls-checkbox-border-color: var(--color-danger);
|
|
90
|
+
|
|
91
|
+
.tls-checkbox-input {
|
|
92
|
+
box-shadow: 0 0 4px -1px var(--color-danger);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@use '../../../styles/mixins';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
|
|
6
|
+
.tls-password-toggle {
|
|
7
|
+
display: grid;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
@include mixins.focus-ring;
|
|
12
|
+
border-radius: var(--radius-md);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__item {
|
|
16
|
+
grid-area: 1 / 1;
|
|
17
|
+
|
|
18
|
+
text-align: center;
|
|
19
|
+
|
|
20
|
+
&--hidden {
|
|
21
|
+
visibility: hidden;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@use '../../../styles/mixins' as mixins;
|
|
2
|
+
|
|
3
|
+
:host.tls-radio-button {
|
|
4
|
+
--tls-radio-button-size: 20px;
|
|
5
|
+
--tls-radio-button-circle-size: 12px;
|
|
6
|
+
--tls-radio-button-border-size: 1px;
|
|
7
|
+
--tls-radio-button-border-color: var(--color-primary);
|
|
8
|
+
--tls-radio-button-circle-color: var(--color-primary);
|
|
9
|
+
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
width: var(--tls-radio-button-size);
|
|
13
|
+
height: var(--tls-radio-button-size);
|
|
14
|
+
|
|
15
|
+
display: inline-block;
|
|
16
|
+
|
|
17
|
+
transition: filter var(--motion-fast) var(--motion-ease-in-out);
|
|
18
|
+
|
|
19
|
+
.tls-radio-button-input {
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
|
|
24
|
+
appearance: none;
|
|
25
|
+
|
|
26
|
+
border: var(--tls-radio-button-border-size) solid var(--tls-radio-button-border-color);
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
|
|
31
|
+
background-color: var(--color-surface);
|
|
32
|
+
|
|
33
|
+
transition:
|
|
34
|
+
box-shadow var(--motion-fast) var(--motion-ease-in-out),
|
|
35
|
+
border-color var(--motion-fast) var(--motion-ease-in-out),
|
|
36
|
+
background-color var(--motion-fast) var(--motion-ease-in-out);
|
|
37
|
+
|
|
38
|
+
&:focus-visible {
|
|
39
|
+
@include mixins.focus-ring;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tls-radio-button-circle {
|
|
44
|
+
position: absolute;
|
|
45
|
+
inset: 0;
|
|
46
|
+
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
content: '';
|
|
55
|
+
|
|
56
|
+
width: var(--tls-radio-button-circle-size);
|
|
57
|
+
height: var(--tls-radio-button-circle-size);
|
|
58
|
+
|
|
59
|
+
display: inline-block;
|
|
60
|
+
|
|
61
|
+
opacity: 0;
|
|
62
|
+
scale: 0.75;
|
|
63
|
+
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
background-color: var(--tls-radio-button-circle-color);
|
|
66
|
+
|
|
67
|
+
transition:
|
|
68
|
+
scale var(--motion-fast) var(--motion-ease-in-out),
|
|
69
|
+
opacity var(--motion-default) var(--motion-ease-in-out);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Checked
|
|
74
|
+
&.tls-radio-button--checked {
|
|
75
|
+
.tls-radio-button-circle {
|
|
76
|
+
&::before {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
scale: 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Form control
|
|
84
|
+
&.tls-radio-button--disabled {
|
|
85
|
+
--tls-radio-button-border-color: var(--color-outline);
|
|
86
|
+
|
|
87
|
+
filter: brightness(0.9);
|
|
88
|
+
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
|
|
91
|
+
.tls-radio-button-input {
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:not(.tls-radio-button--disabled).tls-radio-button--touched.tls-radio-button--invalid {
|
|
97
|
+
--tls-radio-button-border-color: var(--color-danger);
|
|
98
|
+
|
|
99
|
+
.tls-radio-button-input {
|
|
100
|
+
box-shadow: 0 0 4px -1px var(--color-danger);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
&.tls-switch--checked.tls-switch--primary {
|
|
3
|
+
--tls-switch-color: var(--color-primary);
|
|
4
|
+
--tls-switch-on-color: var(--color-on-primary);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&.tls-switch--checked.tls-switch--secondary {
|
|
8
|
+
--tls-switch-color: var(--color-secondary);
|
|
9
|
+
--tls-switch-on-color: var(--color-on-secondary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.tls-switch--checked.tls-switch--tertiary {
|
|
13
|
+
--tls-switch-color: var(--color-tertiary);
|
|
14
|
+
--tls-switch-on-color: var(--color-on-tertiary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.tls-switch--checked.tls-switch--success {
|
|
18
|
+
--tls-switch-color: var(--color-success);
|
|
19
|
+
--tls-switch-on-color: var(--color-on-success);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.tls-switch--checked.tls-switch--info {
|
|
23
|
+
--tls-switch-color: var(--color-info);
|
|
24
|
+
--tls-switch-on-color: var(--color-on-info);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.tls-switch--checked.tls-switch--warning {
|
|
28
|
+
--tls-switch-color: var(--color-warning);
|
|
29
|
+
--tls-switch-on-color: var(--color-on-warning);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.tls-switch--checked.tls-switch--danger {
|
|
33
|
+
--tls-switch-color: var(--color-danger);
|
|
34
|
+
--tls-switch-on-color: var(--color-on-danger);
|
|
35
|
+
}
|
|
36
|
+
}
|