zenkit-css 1.2.0 → 1.2.1

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,416 @@
1
+ // ========================================
2
+ // ZenKit - Pin Input Component
3
+ // ========================================
4
+
5
+ @use '../abstracts/variables' as *;
6
+
7
+ // ----------------------------------------
8
+ // Pin Input Container
9
+ // ----------------------------------------
10
+ .pin-input {
11
+ display: inline-flex;
12
+ gap: 0.5rem;
13
+ align-items: center;
14
+ }
15
+
16
+ // ----------------------------------------
17
+ // Pin Input Field
18
+ // ----------------------------------------
19
+ .pin-input-field {
20
+ width: 3rem;
21
+ height: 3rem;
22
+ padding: 0;
23
+ font-family: var(--font-mono);
24
+ font-size: 1.5rem;
25
+ font-weight: $font-weight-semibold;
26
+ text-align: center;
27
+ color: var(--text);
28
+ background-color: var(--bg);
29
+ border: 2px solid var(--border);
30
+ border-radius: $border-radius;
31
+ transition: border-color $transition-fast $transition-timing,
32
+ box-shadow $transition-fast $transition-timing,
33
+ background-color $transition-fast $transition-timing;
34
+ caret-color: var(--primary);
35
+
36
+ &::placeholder {
37
+ color: var(--gray-300);
38
+ }
39
+
40
+ &:focus {
41
+ outline: none;
42
+ border-color: var(--primary);
43
+ box-shadow: 0 0 0 3px rgba($primary, 0.15);
44
+ }
45
+
46
+ &::-webkit-outer-spin-button,
47
+ &::-webkit-inner-spin-button {
48
+ -webkit-appearance: none;
49
+ margin: 0;
50
+ }
51
+
52
+ &[type="number"] {
53
+ -moz-appearance: textfield;
54
+ }
55
+ }
56
+
57
+ // ----------------------------------------
58
+ // Pin Input Sizes
59
+ // ----------------------------------------
60
+ .pin-input-xs {
61
+ gap: 0.25rem;
62
+
63
+ .pin-input-field {
64
+ width: 2rem;
65
+ height: 2rem;
66
+ font-size: 1rem;
67
+ }
68
+ }
69
+
70
+ .pin-input-sm {
71
+ gap: 0.375rem;
72
+
73
+ .pin-input-field {
74
+ width: 2.5rem;
75
+ height: 2.5rem;
76
+ font-size: 1.25rem;
77
+ }
78
+ }
79
+
80
+ .pin-input-md {
81
+ gap: 0.5rem;
82
+
83
+ .pin-input-field {
84
+ width: 3rem;
85
+ height: 3rem;
86
+ font-size: 1.5rem;
87
+ }
88
+ }
89
+
90
+ .pin-input-lg {
91
+ gap: 0.625rem;
92
+
93
+ .pin-input-field {
94
+ width: 3.5rem;
95
+ height: 3.5rem;
96
+ font-size: 1.75rem;
97
+ }
98
+ }
99
+
100
+ .pin-input-xl {
101
+ gap: 0.75rem;
102
+
103
+ .pin-input-field {
104
+ width: 4rem;
105
+ height: 4rem;
106
+ font-size: 2rem;
107
+ }
108
+ }
109
+
110
+ // ----------------------------------------
111
+ // Pin Input States
112
+ // ----------------------------------------
113
+ .pin-input-field:disabled {
114
+ background-color: var(--bg-muted);
115
+ cursor: not-allowed;
116
+ opacity: 0.6;
117
+ }
118
+
119
+ .pin-input-field[readonly] {
120
+ background-color: var(--bg-muted);
121
+ cursor: default;
122
+ }
123
+
124
+ // ----------------------------------------
125
+ // Pin Input Validation States
126
+ // ----------------------------------------
127
+ .pin-input-error .pin-input-field {
128
+ border-color: var(--danger);
129
+
130
+ &:focus {
131
+ border-color: var(--danger);
132
+ box-shadow: 0 0 0 3px rgba($danger, 0.15);
133
+ }
134
+ }
135
+
136
+ .pin-input-success .pin-input-field {
137
+ border-color: var(--success);
138
+
139
+ &:focus {
140
+ border-color: var(--success);
141
+ box-shadow: 0 0 0 3px rgba($success, 0.15);
142
+ }
143
+ }
144
+
145
+ // ----------------------------------------
146
+ // Pin Input Filled State
147
+ // ----------------------------------------
148
+ .pin-input-field.filled,
149
+ .pin-input-field:not(:placeholder-shown) {
150
+ border-color: var(--primary-300);
151
+ background-color: var(--primary-50);
152
+ }
153
+
154
+ // ----------------------------------------
155
+ // Pin Input Variants
156
+ // ----------------------------------------
157
+
158
+ // Underline variant
159
+ .pin-input-underline .pin-input-field {
160
+ border-width: 0 0 2px 0;
161
+ border-radius: 0;
162
+ background: transparent;
163
+
164
+ &:focus {
165
+ box-shadow: none;
166
+ border-color: var(--primary);
167
+ }
168
+ }
169
+
170
+ // Rounded variant
171
+ .pin-input-rounded .pin-input-field {
172
+ border-radius: $border-radius-full;
173
+ }
174
+
175
+ // Ghost variant
176
+ .pin-input-ghost .pin-input-field {
177
+ border-color: transparent;
178
+ background-color: var(--gray-100);
179
+
180
+ &:focus {
181
+ background-color: var(--bg);
182
+ border-color: var(--primary);
183
+ }
184
+ }
185
+
186
+ // Flushed (no border, only bottom)
187
+ .pin-input-flushed .pin-input-field {
188
+ border: none;
189
+ border-bottom: 2px solid var(--border);
190
+ border-radius: 0;
191
+ background: transparent;
192
+
193
+ &:focus {
194
+ box-shadow: none;
195
+ border-color: var(--primary);
196
+ }
197
+ }
198
+
199
+ // ----------------------------------------
200
+ // Pin Input with Separator
201
+ // ----------------------------------------
202
+ .pin-input-separator {
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+ width: 1rem;
207
+ color: var(--text-muted);
208
+ font-size: 1.25rem;
209
+
210
+ &::before {
211
+ content: "-";
212
+ }
213
+ }
214
+
215
+ .pin-input-separator-dot::before {
216
+ content: "•";
217
+ }
218
+
219
+ // ----------------------------------------
220
+ // Pin Input Masked
221
+ // ----------------------------------------
222
+ .pin-input-masked .pin-input-field {
223
+ -webkit-text-security: disc;
224
+ text-security: disc;
225
+ }
226
+
227
+ // ----------------------------------------
228
+ // Pin Input Alphanumeric
229
+ // ----------------------------------------
230
+ .pin-input-alphanumeric .pin-input-field {
231
+ text-transform: uppercase;
232
+ }
233
+
234
+ // ----------------------------------------
235
+ // Pin Input with Labels
236
+ // ----------------------------------------
237
+ .pin-input-wrapper {
238
+ display: flex;
239
+ flex-direction: column;
240
+ align-items: center;
241
+ gap: 0.75rem;
242
+ }
243
+
244
+ .pin-input-label {
245
+ font-size: var(--text-sm);
246
+ font-weight: $font-weight-medium;
247
+ color: var(--text);
248
+ }
249
+
250
+ .pin-input-help {
251
+ font-size: var(--text-xs);
252
+ color: var(--text-muted);
253
+ }
254
+
255
+ .pin-input-error-text {
256
+ font-size: var(--text-xs);
257
+ color: var(--danger);
258
+ }
259
+
260
+ // ----------------------------------------
261
+ // Pin Input Complete Animation
262
+ // ----------------------------------------
263
+ .pin-input-complete .pin-input-field {
264
+ animation: pin-input-success 0.3s ease-out;
265
+ border-color: var(--success);
266
+ background-color: var(--success-50);
267
+ }
268
+
269
+ @keyframes pin-input-success {
270
+ 0% {
271
+ transform: scale(1);
272
+ }
273
+ 50% {
274
+ transform: scale(1.1);
275
+ }
276
+ 100% {
277
+ transform: scale(1);
278
+ }
279
+ }
280
+
281
+ // ----------------------------------------
282
+ // Pin Input Shake (Error)
283
+ // ----------------------------------------
284
+ .pin-input-shake {
285
+ animation: pin-input-shake 0.4s ease-out;
286
+ }
287
+
288
+ @keyframes pin-input-shake {
289
+ 0%, 100% {
290
+ transform: translateX(0);
291
+ }
292
+ 20%, 60% {
293
+ transform: translateX(-4px);
294
+ }
295
+ 40%, 80% {
296
+ transform: translateX(4px);
297
+ }
298
+ }
299
+
300
+ // ----------------------------------------
301
+ // Pin Input Loading
302
+ // ----------------------------------------
303
+ .pin-input-loading {
304
+ position: relative;
305
+ pointer-events: none;
306
+
307
+ &::after {
308
+ content: "";
309
+ position: absolute;
310
+ top: 50%;
311
+ left: 50%;
312
+ transform: translate(-50%, -50%);
313
+ width: 1.5rem;
314
+ height: 1.5rem;
315
+ border: 2px solid var(--primary);
316
+ border-top-color: transparent;
317
+ border-radius: 50%;
318
+ animation: spin 0.6s linear infinite;
319
+ }
320
+
321
+ .pin-input-field {
322
+ opacity: 0.5;
323
+ }
324
+ }
325
+
326
+ // ----------------------------------------
327
+ // Pin Input One-Time Password
328
+ // ----------------------------------------
329
+ .pin-input-otp {
330
+ .pin-input-field {
331
+ ime-mode: disabled;
332
+ -webkit-ime-mode: disabled;
333
+ }
334
+ }
335
+
336
+ // ----------------------------------------
337
+ // Pin Input Group (with separator)
338
+ // ----------------------------------------
339
+ .pin-input-group {
340
+ display: inline-flex;
341
+ align-items: center;
342
+ gap: 0.25rem;
343
+ }
344
+
345
+ .pin-input-group + .pin-input-separator + .pin-input-group {
346
+ margin-left: 0;
347
+ }
348
+
349
+ // ----------------------------------------
350
+ // Resend Timer
351
+ // ----------------------------------------
352
+ .pin-input-resend {
353
+ display: flex;
354
+ flex-direction: column;
355
+ align-items: center;
356
+ gap: 0.5rem;
357
+ margin-top: 1rem;
358
+ }
359
+
360
+ .pin-input-resend-text {
361
+ font-size: var(--text-sm);
362
+ color: var(--text-muted);
363
+ }
364
+
365
+ .pin-input-resend-link {
366
+ font-size: var(--text-sm);
367
+ color: var(--primary);
368
+ cursor: pointer;
369
+ text-decoration: none;
370
+
371
+ &:hover {
372
+ text-decoration: underline;
373
+ }
374
+
375
+ &:disabled,
376
+ &.disabled {
377
+ color: var(--text-muted);
378
+ cursor: not-allowed;
379
+ }
380
+ }
381
+
382
+ .pin-input-timer {
383
+ font-weight: $font-weight-medium;
384
+ color: var(--text);
385
+ }
386
+
387
+ // ----------------------------------------
388
+ // Dark Mode
389
+ // ----------------------------------------
390
+ [data-theme="dark"] {
391
+ .pin-input-field {
392
+ background-color: var(--gray-800);
393
+ border-color: var(--gray-600);
394
+
395
+ &:focus {
396
+ background-color: var(--gray-900);
397
+ }
398
+ }
399
+
400
+ .pin-input-ghost .pin-input-field {
401
+ background-color: var(--gray-700);
402
+
403
+ &:focus {
404
+ background-color: var(--gray-800);
405
+ }
406
+ }
407
+
408
+ .pin-input-field.filled,
409
+ .pin-input-field:not(:placeholder-shown) {
410
+ background-color: var(--gray-700);
411
+ }
412
+
413
+ .pin-input-complete .pin-input-field {
414
+ background-color: rgba($success, 0.2);
415
+ }
416
+ }
package/scss/zenkit.scss CHANGED
@@ -111,6 +111,11 @@
111
111
  @use 'components/toggle';
112
112
  @use 'components/hovercard';
113
113
  @use 'components/circularprogress';
114
+ @use 'components/menubar';
115
+ @use 'components/navigationmenu';
116
+ @use 'components/fieldset';
117
+ @use 'components/pininput';
118
+ @use 'components/editable';
114
119
 
115
120
  // ----------------------------------------
116
121
  // 6. Components - JavaScript Enhanced