@basis-ng/styles 0.0.1-alpha.98 → 0.0.1-alpha.99
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/package.json +1 -1
- package/src/components/otp.component.css +129 -0
- package/src/index.css +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
b-otp {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 0.5rem;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
input[otp-digit] {
|
|
8
|
+
width: 3rem;
|
|
9
|
+
height: 3rem;
|
|
10
|
+
text-align: center;
|
|
11
|
+
padding-left: 0;
|
|
12
|
+
padding-right: 0;
|
|
13
|
+
font-size: 2rem;
|
|
14
|
+
border-radius: 0.75rem;
|
|
15
|
+
box-shadow: 0 0 0 1px var(--border-color, #ccc);
|
|
16
|
+
border: none;
|
|
17
|
+
background: var(--input-background, #fff);
|
|
18
|
+
transition: box-shadow 0.2s;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
input[otp-digit]:focus {
|
|
22
|
+
box-shadow: 0 0 0 2px var(--primary, #007bff);
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
input[otp-digit]:disabled {
|
|
27
|
+
background-color: var(--input-background);
|
|
28
|
+
color: var(--input-foreground);
|
|
29
|
+
opacity: 0.6;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input[otp-digit]::-webkit-outer-spin-button,
|
|
34
|
+
input[otp-digit]::-webkit-inner-spin-button {
|
|
35
|
+
-webkit-appearance: none;
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
input[otp-digit] {
|
|
40
|
+
appearance: textfield;
|
|
41
|
+
-moz-appearance: textfield;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
input[otp-digit] {
|
|
45
|
+
background-color: var(--input-background);
|
|
46
|
+
border-radius: var(--radius, 0.5rem);
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
border-width: 1px;
|
|
49
|
+
border-style: solid;
|
|
50
|
+
border-color: var(--border-color, transparent);
|
|
51
|
+
transition:
|
|
52
|
+
opacity 0.2s,
|
|
53
|
+
background-color 0.2s,
|
|
54
|
+
border-color 0.2s;
|
|
55
|
+
font-size: 1rem;
|
|
56
|
+
color: var(--input-foreground);
|
|
57
|
+
font-family: 'Geist', sans-serif;
|
|
58
|
+
text-align: center;
|
|
59
|
+
|
|
60
|
+
&:read-only:not(:disabled) {
|
|
61
|
+
border-width: 0px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&::-webkit-outer-spin-button,
|
|
65
|
+
&::-webkit-inner-spin-button {
|
|
66
|
+
-webkit-appearance: none;
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[type='number'] {
|
|
71
|
+
appearance: textfield;
|
|
72
|
+
-moz-appearance: textfield;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:focus-visible:not(:read-only) {
|
|
76
|
+
outline: 2px solid var(--primary);
|
|
77
|
+
outline-offset: 2px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&::placeholder {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:disabled {
|
|
85
|
+
opacity: 0.6;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.size-1 {
|
|
90
|
+
width: 1.714rem;
|
|
91
|
+
height: 1.714rem;
|
|
92
|
+
font-size: 0.857rem;
|
|
93
|
+
padding: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.size-2 {
|
|
97
|
+
width: 2.286rem;
|
|
98
|
+
height: 2.286rem;
|
|
99
|
+
font-size: 1rem;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.size-3 {
|
|
104
|
+
width: 2.857rem;
|
|
105
|
+
height: 2.857rem;
|
|
106
|
+
font-size: 1.143rem;
|
|
107
|
+
padding: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
b-otp.ng-invalid.ng-touched input[otp-digit],
|
|
112
|
+
b-otp.ng-invalid.ng-dirty input[otp-digit] {
|
|
113
|
+
color: var(--error-foreground);
|
|
114
|
+
background-color: var(--error);
|
|
115
|
+
border-color: var(--error-border-color);
|
|
116
|
+
outline: 2px solid var(--error-foreground);
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
b-otp.ng-invalid.ng-touched input[otp-digit]:focus-visible,
|
|
121
|
+
b-otp.ng-invalid.ng-dirty input[otp-digit]:focus-visible {
|
|
122
|
+
outline: 2px solid var(--error-foreground);
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
b-otp.ng-invalid.ng-touched input[otp-digit]::placeholder,
|
|
127
|
+
b-otp.ng-invalid.ng-dirty input[otp-digit]::placeholder {
|
|
128
|
+
color: var(--error-foreground);
|
|
129
|
+
}
|
package/src/index.css
CHANGED