zidan-select 0.0.0-stage → 2.0.2

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,1073 @@
1
+ /*!
2
+ * ZidanForm v2.0.0 — plugin-core.css
3
+ * Structure and mechanics only: layout, positioning, visibility, focus
4
+ * plumbing and accessible native-input handling. No colours, borders colours,
5
+ * shadows or decorative skin — load plugin-theme.css (or your own theme) for
6
+ * appearance.
7
+ *
8
+ * https://github.com/akhtar1985/zidan-select
9
+ * MIT License © akhtar1985
10
+ */
11
+
12
+ /* ==================================================================
13
+ 1. Scope reset
14
+ ================================================================== */
15
+
16
+ .zs-root,
17
+ .zs-field,
18
+ .zs-radio-group {
19
+ position: relative;
20
+ display: block;
21
+ width: 100%;
22
+ box-sizing: border-box;
23
+ font-family: var(--zs-font-family, inherit);
24
+ font-size: var(--zs-font-size, 0.9375rem);
25
+ line-height: var(--zs-line-height, 1.4);
26
+ -webkit-tap-highlight-color: transparent;
27
+ }
28
+
29
+ .zs-root *,
30
+ .zs-root *::before,
31
+ .zs-root *::after,
32
+ .zs-field *,
33
+ .zs-field *::before,
34
+ .zs-field *::after,
35
+ .zs-radio-group *,
36
+ .zs-radio-group *::before,
37
+ .zs-radio-group *::after {
38
+ box-sizing: border-box;
39
+ }
40
+
41
+ /* ==================================================================
42
+ 2. Select / combobox / tags — shell
43
+ ================================================================== */
44
+
45
+ .zs-root .zs-label {
46
+ display: block;
47
+ margin-bottom: 6px;
48
+ font-size: var(--zs-label-size, 0.8125rem);
49
+ font-weight: 600;
50
+ letter-spacing: 0.01em;
51
+ }
52
+
53
+ .zs-control {
54
+ position: relative;
55
+ display: flex;
56
+ align-items: center;
57
+ flex-wrap: wrap;
58
+ gap: var(--zs-gap, 6px);
59
+ width: 100%;
60
+ min-height: var(--zs-height, 44px);
61
+ padding: var(--zs-padding-y, 5px) var(--zs-padding-x, 12px);
62
+ border-width: var(--zs-border-width, 1px);
63
+ border-style: solid;
64
+ border-radius: var(--zs-radius, 10px);
65
+ cursor: pointer;
66
+ transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
67
+ }
68
+
69
+ /* bootstrap mounted inside the widget must not double-style our control */
70
+ .zs-root .zs-control.form-control {
71
+ display: flex;
72
+ align-items: center;
73
+ flex-wrap: wrap;
74
+ gap: var(--zs-gap, 6px);
75
+ padding: var(--zs-padding-y, 5px) var(--zs-padding-x, 12px);
76
+ height: auto;
77
+ min-height: var(--zs-height, 44px);
78
+ }
79
+
80
+ .zs-root--focus .zs-control,
81
+ .zs-root--open .zs-control {
82
+ outline: none;
83
+ }
84
+
85
+ .zs-root--disabled .zs-control,
86
+ .zs-root--disabled .zs-control:hover {
87
+ cursor: not-allowed;
88
+ }
89
+
90
+ /* ==================================================================
91
+ 3. Values, chips, input, icons
92
+ ================================================================== */
93
+
94
+ .zs-root .zs-chips {
95
+ display: flex;
96
+ flex-wrap: wrap;
97
+ align-items: center;
98
+ gap: var(--zs-gap, 6px);
99
+ max-width: 100%;
100
+ }
101
+
102
+ .zs-root .zs-chips[hidden] {
103
+ display: none;
104
+ }
105
+
106
+ .zs-root .zs-chip {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ gap: 4px;
110
+ max-width: 100%;
111
+ padding: 3px 4px 3px 9px;
112
+ font-size: 0.8125rem;
113
+ font-weight: 500;
114
+ border-width: 1px;
115
+ border-style: solid;
116
+ border-radius: var(--zs-chip-radius, 8px);
117
+ transition: background-color 150ms ease, border-color 150ms ease;
118
+ }
119
+
120
+ .zs-root .zs-chip-label {
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ }
125
+
126
+ .zs-root .zs-chip-remove {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ width: 18px;
131
+ height: 18px;
132
+ padding: 0;
133
+ border: 0;
134
+ border-radius: 50%;
135
+ cursor: pointer;
136
+ opacity: 0.6;
137
+ transition: opacity 150ms ease, background-color 150ms ease;
138
+ }
139
+
140
+ .zs-root .zs-chip-remove:hover,
141
+ .zs-root .zs-chip-remove:focus-visible {
142
+ opacity: 1;
143
+ outline: none;
144
+ }
145
+
146
+ .zs-root .zs-input {
147
+ flex: 1 1 60px;
148
+ min-width: 60px;
149
+ height: 32px;
150
+ margin: 0;
151
+ padding: 0;
152
+ font: inherit;
153
+ border: 0;
154
+ border-radius: 0;
155
+ outline: none;
156
+ box-shadow: none;
157
+ appearance: none;
158
+ -webkit-appearance: none;
159
+ }
160
+
161
+ .zs-root .zs-input:focus {
162
+ outline: none;
163
+ box-shadow: none;
164
+ }
165
+
166
+ .zs-root .zs-input[readonly],
167
+ .zs-root--disabled .zs-input {
168
+ cursor: pointer;
169
+ }
170
+
171
+ .zs-root--disabled .zs-input {
172
+ cursor: not-allowed;
173
+ }
174
+
175
+ .zs-root .zs-clear,
176
+ .zs-root .zs-arrow {
177
+ display: inline-flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ flex: 0 0 auto;
181
+ }
182
+
183
+ .zs-root .zs-clear {
184
+ width: 22px;
185
+ height: 22px;
186
+ padding: 0;
187
+ border: 0;
188
+ border-radius: 50%;
189
+ cursor: pointer;
190
+ opacity: 0.75;
191
+ transition: opacity 150ms ease, background-color 150ms ease;
192
+ }
193
+
194
+ .zs-root .zs-clear[hidden] {
195
+ display: none;
196
+ }
197
+
198
+ .zs-root .zs-clear:hover {
199
+ opacity: 1;
200
+ }
201
+
202
+ .zs-root .zs-clear:focus-visible {
203
+ outline: none;
204
+ }
205
+
206
+ .zs-root .zs-arrow {
207
+ pointer-events: none;
208
+ transition: transform 150ms ease, color 150ms ease;
209
+ }
210
+
211
+ .zs-root--open .zs-arrow {
212
+ transform: rotate(180deg);
213
+ }
214
+
215
+ .zs-root--tags .zs-control {
216
+ padding-top: 6px;
217
+ padding-bottom: 6px;
218
+ }
219
+
220
+ .zs-root--tags .zs-input {
221
+ height: 28px;
222
+ }
223
+
224
+ /* ==================================================================
225
+ 4. Dropdown / listbox
226
+ ================================================================== */
227
+
228
+ .zs-root .zs-dropdown {
229
+ position: absolute;
230
+ z-index: var(--zs-z-index, 1055);
231
+ top: calc(100% + 6px);
232
+ left: 0;
233
+ right: 0;
234
+ display: none;
235
+ max-height: 280px;
236
+ padding: 6px;
237
+ overflow-y: auto;
238
+ overscroll-behavior: contain;
239
+ border-width: var(--zs-dropdown-border-width, 1px);
240
+ border-style: solid;
241
+ border-radius: var(--zs-dropdown-radius, 12px);
242
+ }
243
+
244
+ .zs-root--open .zs-dropdown {
245
+ display: block;
246
+ animation: zs-dropdown-in 140ms ease-out;
247
+ }
248
+
249
+ .zs-root--dropup .zs-dropdown {
250
+ top: auto;
251
+ bottom: calc(100% + 6px);
252
+ }
253
+
254
+ .zs-root--dropup.zs-root--open .zs-dropdown {
255
+ animation-name: zs-dropdown-in-up;
256
+ }
257
+
258
+ @keyframes zs-dropdown-in {
259
+ from { opacity: 0; transform: translateY(-4px); }
260
+ to { opacity: 1; transform: translateY(0); }
261
+ }
262
+
263
+ @keyframes zs-dropdown-in-up {
264
+ from { opacity: 0; transform: translateY(4px); }
265
+ to { opacity: 1; transform: translateY(0); }
266
+ }
267
+
268
+ .zs-root .zs-group {
269
+ padding: 8px 10px 4px;
270
+ font-size: 0.6875rem;
271
+ font-weight: 700;
272
+ letter-spacing: 0.06em;
273
+ text-transform: uppercase;
274
+ }
275
+
276
+ .zs-root .zs-option {
277
+ display: flex;
278
+ align-items: center;
279
+ gap: 8px;
280
+ padding: var(--zs-option-padding-y, 9px) var(--zs-option-padding-x, 12px);
281
+ border-radius: var(--zs-option-radius, 8px);
282
+ cursor: pointer;
283
+ transition: background-color 90ms linear, color 90ms linear;
284
+ scroll-margin: 6px;
285
+ }
286
+
287
+ .zs-root .zs-option-label {
288
+ flex: 1 1 auto;
289
+ min-width: 0;
290
+ overflow: hidden;
291
+ text-overflow: ellipsis;
292
+ white-space: nowrap;
293
+ }
294
+
295
+ .zs-root .zs-option--selected::after {
296
+ content: "";
297
+ flex: 0 0 auto;
298
+ width: 14px;
299
+ height: 14px;
300
+ margin-left: auto;
301
+ background-color: currentColor;
302
+ -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
303
+ mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
304
+ opacity: 0.85;
305
+ }
306
+
307
+ .zs-root .zs-option--disabled {
308
+ cursor: not-allowed;
309
+ opacity: 0.45;
310
+ }
311
+
312
+ .zs-root .zs-option--disabled::after {
313
+ display: none;
314
+ }
315
+
316
+ .zs-root .zs-state {
317
+ display: flex;
318
+ align-items: center;
319
+ gap: 8px;
320
+ padding: 12px;
321
+ font-size: 0.875rem;
322
+ }
323
+
324
+ .zs-root .zs-spinner {
325
+ width: 14px;
326
+ height: 14px;
327
+ border-width: 2px;
328
+ border-style: solid;
329
+ border-radius: 50%;
330
+ animation: zs-spin 700ms linear infinite;
331
+ }
332
+
333
+ @keyframes zs-spin {
334
+ to { transform: rotate(360deg); }
335
+ }
336
+
337
+ @media (max-width: 480px) {
338
+ .zs-root .zs-dropdown {
339
+ max-height: min(280px, 45vh);
340
+ }
341
+ }
342
+
343
+ /* screen-reader only live region */
344
+ .zs-root .zs-live,
345
+ .zs-field .zs-sr-only {
346
+ position: absolute;
347
+ width: 1px;
348
+ height: 1px;
349
+ margin: -1px;
350
+ padding: 0;
351
+ overflow: hidden;
352
+ clip: rect(0 0 0 0);
353
+ clip-path: inset(50%);
354
+ white-space: nowrap;
355
+ border: 0;
356
+ }
357
+
358
+ /* ==================================================================
359
+ 5. Select layout mechanics
360
+ (skin and token presets live in plugin-theme.css)
361
+ ================================================================== */
362
+
363
+ .zs-root[data-zs-layout="classic-clean"] .zs-control {
364
+ padding-top: var(--zs-padding-y, 5px);
365
+ padding-bottom: var(--zs-padding-y, 5px);
366
+ }
367
+
368
+ .zs-root[data-zs-layout="floating-label"] .zs-control {
369
+ padding-top: 16px;
370
+ padding-bottom: 6px;
371
+ align-items: flex-end;
372
+ }
373
+
374
+ .zs-root[data-zs-layout="floating-label"] .zs-label {
375
+ position: absolute;
376
+ left: calc(var(--zs-padding-x, 12px) + 1px);
377
+ top: 50%;
378
+ margin: 0;
379
+ padding: 0 4px;
380
+ transform: translateY(-50%);
381
+ font-size: var(--zs-font-size, 0.9375rem);
382
+ font-weight: 500;
383
+ border-radius: 4px;
384
+ pointer-events: none;
385
+ transition: transform 150ms ease, font-size 150ms ease, color 150ms ease, top 150ms ease;
386
+ }
387
+
388
+ .zs-root[data-zs-layout="floating-label"].zs-root--focus .zs-label,
389
+ .zs-root[data-zs-layout="floating-label"].zs-root--open .zs-label,
390
+ .zs-root[data-zs-layout="floating-label"].zs-root--has-value .zs-label {
391
+ top: 10px;
392
+ transform: translateY(-50%) scale(0.86);
393
+ transform-origin: left center;
394
+ font-weight: 600;
395
+ }
396
+
397
+ .zs-root[data-zs-layout="floating-label"] .zs-input {
398
+ height: 28px;
399
+ }
400
+
401
+ .zs-root[data-zs-layout="floating-label"].zs-root--multiple .zs-control,
402
+ .zs-root[data-zs-layout="floating-label"].zs-root--tags .zs-control {
403
+ padding-top: 20px;
404
+ }
405
+
406
+ .zs-root[data-zs-layout="soft-pill"] .zs-chip-remove {
407
+ width: 20px;
408
+ height: 20px;
409
+ }
410
+
411
+ .zs-root[data-zs-layout="soft-pill"] .zs-dropdown {
412
+ padding: 8px;
413
+ }
414
+
415
+ .zs-root[data-zs-layout="soft-pill"].zs-root--multiple .zs-input,
416
+ .zs-root[data-zs-layout="soft-pill"].zs-root--tags .zs-input {
417
+ min-width: 90px;
418
+ }
419
+
420
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-control {
421
+ font-weight: 600;
422
+ }
423
+
424
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-chip {
425
+ font-weight: 700;
426
+ letter-spacing: 0.01em;
427
+ }
428
+
429
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-dropdown {
430
+ padding: 0;
431
+ }
432
+
433
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-option {
434
+ border-bottom-width: 1px;
435
+ border-bottom-style: solid;
436
+ font-weight: 500;
437
+ }
438
+
439
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-option:last-child {
440
+ border-bottom: 0;
441
+ }
442
+
443
+ .zs-root[data-zs-layout="bordered-brutalist"] .zs-group {
444
+ border-bottom-width: 2px;
445
+ border-bottom-style: solid;
446
+ font-weight: 800;
447
+ }
448
+
449
+ .zs-root[data-zs-layout="glass-elevated"] .zs-control,
450
+ .zs-root[data-zs-layout="glass-elevated"] .zs-dropdown {
451
+ -webkit-backdrop-filter: blur(14px) saturate(150%);
452
+ backdrop-filter: blur(14px) saturate(150%);
453
+ }
454
+
455
+ .zs-root[data-zs-layout="glass-elevated"] .zs-dropdown {
456
+ -webkit-backdrop-filter: blur(18px) saturate(160%);
457
+ backdrop-filter: blur(18px) saturate(160%);
458
+ }
459
+
460
+ .zs-root--mount {
461
+ margin: 0;
462
+ }
463
+
464
+ /* ==================================================================
465
+ 6. Fields — shared shell
466
+ ================================================================== */
467
+
468
+ .zs-field {
469
+ display: flex;
470
+ flex-direction: column;
471
+ gap: var(--zs-field-gap, 6px);
472
+ }
473
+
474
+ .zs-field[data-zs-layout="inline"] {
475
+ flex-direction: row;
476
+ align-items: center;
477
+ flex-wrap: wrap;
478
+ gap: 10px;
479
+ }
480
+
481
+ .zs-field__label {
482
+ display: block;
483
+ font-size: var(--zs-label-size, 0.8125rem);
484
+ font-weight: 600;
485
+ letter-spacing: 0.01em;
486
+ }
487
+
488
+ .zs-field__hint {
489
+ margin: 0;
490
+ font-size: 0.75rem;
491
+ }
492
+
493
+ .zs-field__meta {
494
+ display: flex;
495
+ align-items: baseline;
496
+ justify-content: space-between;
497
+ gap: 10px;
498
+ }
499
+
500
+ .zs-counter {
501
+ margin-left: auto;
502
+ font-size: 0.75rem;
503
+ font-variant-numeric: tabular-nums;
504
+ white-space: nowrap;
505
+ }
506
+
507
+ /* the real control: 1×1px and transparent, never display:none — jQuery
508
+ Validation's ":hidden" ignore and native validation must still see it */
509
+ .zs-native-input {
510
+ position: absolute;
511
+ width: 1px;
512
+ height: 1px;
513
+ margin: 0;
514
+ padding: 0;
515
+ border: 0;
516
+ opacity: 0;
517
+ overflow: hidden;
518
+ clip-path: inset(50%);
519
+ white-space: nowrap;
520
+ }
521
+
522
+ .zs-field--inline .zs-check,
523
+ .zs-field--inline .zs-radio {
524
+ margin: 0;
525
+ }
526
+
527
+ /* ==================================================================
528
+ 7. Checkbox / switch
529
+ ================================================================== */
530
+
531
+ .zs-check {
532
+ position: relative;
533
+ display: inline-flex;
534
+ align-items: center;
535
+ gap: var(--zs-check-gap, 10px);
536
+ cursor: pointer;
537
+ user-select: none;
538
+ }
539
+
540
+ .zs-check--disabled {
541
+ cursor: not-allowed;
542
+ }
543
+
544
+ .zs-check-box,
545
+ .zs-switch-track,
546
+ .zs-radio-dot {
547
+ position: relative;
548
+ flex: 0 0 auto;
549
+ display: inline-block;
550
+ width: var(--zs-check-size, 20px);
551
+ height: var(--zs-check-size, 20px);
552
+ border-width: var(--zs-border-width, 1px);
553
+ border-style: solid;
554
+ border-radius: var(--zs-check-radius, 6px);
555
+ transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
556
+ }
557
+
558
+ .zs-check-box::after,
559
+ .zs-check-box::before {
560
+ content: "";
561
+ position: absolute;
562
+ inset: 0;
563
+ opacity: 0;
564
+ transition: opacity 120ms ease, transform 120ms ease;
565
+ }
566
+
567
+ .zs-check-box::after {
568
+ -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
569
+ mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
570
+ }
571
+
572
+ .zs-check-box::before {
573
+ inset: 5px 4px;
574
+ border-radius: 1px;
575
+ }
576
+
577
+ .zs-check--checked .zs-check-box::after {
578
+ opacity: 1;
579
+ }
580
+
581
+ .zs-check--indeterminate .zs-check-box::before {
582
+ opacity: 1;
583
+ }
584
+
585
+ .zs-check-label {
586
+ min-width: 0;
587
+ }
588
+
589
+ .zs-check-label:empty {
590
+ display: none;
591
+ }
592
+
593
+ /* switch */
594
+ .zs-switch-track {
595
+ width: var(--zs-switch-width, 40px);
596
+ height: var(--zs-switch-height, 22px);
597
+ border-radius: 999px;
598
+ }
599
+
600
+ .zs-switch-track::after {
601
+ content: "";
602
+ position: absolute;
603
+ top: 50%;
604
+ left: 2px;
605
+ width: calc(var(--zs-switch-height, 22px) - 6px);
606
+ height: calc(var(--zs-switch-height, 22px) - 6px);
607
+ transform: translateY(-50%);
608
+ border-radius: 50%;
609
+ transition: transform 160ms ease;
610
+ }
611
+
612
+ .zs-check--checked .zs-switch-track::after {
613
+ transform: translate(calc(var(--zs-switch-width, 40px) - var(--zs-switch-height, 22px)), -50%);
614
+ }
615
+
616
+ /* card variant */
617
+ .zs-field[data-zs-variant="card"] .zs-check {
618
+ width: 100%;
619
+ padding: 12px 14px;
620
+ border-width: var(--zs-border-width, 1px);
621
+ border-style: solid;
622
+ border-radius: var(--zs-radius, 10px);
623
+ transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
624
+ }
625
+
626
+ .zs-field[data-zs-variant="card"] .zs-check-label {
627
+ display: flex;
628
+ flex-direction: column;
629
+ gap: 2px;
630
+ }
631
+
632
+ /* ==================================================================
633
+ 8. Radio groups
634
+ ================================================================== */
635
+
636
+ .zs-radio-group {
637
+ display: flex;
638
+ flex-direction: column;
639
+ gap: var(--zs-radio-gap, 10px);
640
+ border: 0;
641
+ margin: 0;
642
+ padding: 0;
643
+ min-width: 0;
644
+ }
645
+
646
+ .zs-radio-group > legend {
647
+ padding: 0;
648
+ margin-bottom: 6px;
649
+ font-size: var(--zs-label-size, 0.8125rem);
650
+ font-weight: 600;
651
+ }
652
+
653
+ .zs-radio-group[data-zs-variant="inline"] {
654
+ flex-direction: row;
655
+ flex-wrap: wrap;
656
+ gap: 10px 18px;
657
+ }
658
+
659
+ .zs-radio-group[data-zs-variant="card"] {
660
+ display: grid;
661
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
662
+ gap: 10px;
663
+ }
664
+
665
+ .zs-radio {
666
+ position: relative;
667
+ display: inline-flex;
668
+ align-items: center;
669
+ gap: var(--zs-check-gap, 10px);
670
+ cursor: pointer;
671
+ user-select: none;
672
+ }
673
+
674
+ .zs-radio-dot {
675
+ width: var(--zs-radio-size, 18px);
676
+ height: var(--zs-radio-size, 18px);
677
+ border-radius: 50%;
678
+ }
679
+
680
+ .zs-radio-dot::after {
681
+ content: "";
682
+ position: absolute;
683
+ top: 50%;
684
+ left: 50%;
685
+ width: 7px;
686
+ height: 7px;
687
+ border-radius: 50%;
688
+ transform: translate(-50%, -50%) scale(0.4);
689
+ opacity: 0;
690
+ transition: opacity 120ms ease, transform 120ms ease;
691
+ }
692
+
693
+ .zs-radio--checked .zs-radio-dot::after {
694
+ opacity: 1;
695
+ transform: translate(-50%, -50%) scale(1);
696
+ }
697
+
698
+ .zs-radio--disabled {
699
+ cursor: not-allowed;
700
+ }
701
+
702
+ .zs-radio-group[data-zs-variant="card"] .zs-radio {
703
+ padding: 12px;
704
+ border-width: var(--zs-border-width, 1px);
705
+ border-style: solid;
706
+ border-radius: var(--zs-radius, 10px);
707
+ transition: border-color 150ms ease, background-color 150ms ease;
708
+ }
709
+
710
+ .zs-radio-label {
711
+ min-width: 0;
712
+ }
713
+
714
+ /* ==================================================================
715
+ 9. File upload
716
+ ================================================================== */
717
+
718
+ .zs-field--file .zs-file-drop {
719
+ position: relative;
720
+ display: flex;
721
+ flex-direction: column;
722
+ align-items: center;
723
+ justify-content: center;
724
+ gap: 4px;
725
+ padding: 22px 16px;
726
+ min-height: 128px;
727
+ text-align: center;
728
+ border-width: 1.5px;
729
+ border-style: dashed;
730
+ border-radius: var(--zs-radius, 10px);
731
+ cursor: pointer;
732
+ transition: border-color 150ms ease, background-color 150ms ease;
733
+ }
734
+
735
+ .zs-file-icon {
736
+ display: inline-flex;
737
+ align-items: center;
738
+ justify-content: center;
739
+ width: 34px;
740
+ height: 34px;
741
+ margin-bottom: 4px;
742
+ border-radius: 50%;
743
+ }
744
+
745
+ .zs-file-drop-title {
746
+ font-weight: 600;
747
+ }
748
+
749
+ .zs-file-drop-hint {
750
+ font-size: 0.75rem;
751
+ }
752
+
753
+ .zs-file-list {
754
+ display: flex;
755
+ flex-direction: column;
756
+ gap: 6px;
757
+ margin: 0;
758
+ padding: 0;
759
+ list-style: none;
760
+ }
761
+
762
+ .zs-file-list[hidden] {
763
+ display: none;
764
+ }
765
+
766
+ .zs-file-item {
767
+ display: flex;
768
+ align-items: center;
769
+ gap: 10px;
770
+ padding: 8px 10px;
771
+ border-width: var(--zs-border-width, 1px);
772
+ border-style: solid;
773
+ border-radius: var(--zs-radius, 10px);
774
+ }
775
+
776
+ .zs-file-thumb {
777
+ flex: 0 0 auto;
778
+ display: inline-flex;
779
+ align-items: center;
780
+ justify-content: center;
781
+ width: 38px;
782
+ height: 38px;
783
+ overflow: hidden;
784
+ border-radius: 8px;
785
+ font-size: 0.625rem;
786
+ font-weight: 700;
787
+ letter-spacing: 0.02em;
788
+ }
789
+
790
+ .zs-file-thumb img {
791
+ width: 100%;
792
+ height: 100%;
793
+ object-fit: cover;
794
+ display: block;
795
+ }
796
+
797
+ .zs-file-info {
798
+ display: flex;
799
+ flex-direction: column;
800
+ min-width: 0;
801
+ flex: 1 1 auto;
802
+ }
803
+
804
+ .zs-file-name {
805
+ overflow: hidden;
806
+ text-overflow: ellipsis;
807
+ white-space: nowrap;
808
+ font-size: 0.8125rem;
809
+ font-weight: 600;
810
+ }
811
+
812
+ .zs-file-size {
813
+ font-size: 0.6875rem;
814
+ }
815
+
816
+ .zs-file-remove {
817
+ flex: 0 0 auto;
818
+ width: 26px;
819
+ height: 26px;
820
+ padding: 0;
821
+ border: 0;
822
+ border-radius: 50%;
823
+ font-size: 1rem;
824
+ line-height: 1;
825
+ cursor: pointer;
826
+ transition: background-color 150ms ease;
827
+ }
828
+
829
+ .zs-file-meta-row {
830
+ display: flex;
831
+ align-items: center;
832
+ justify-content: space-between;
833
+ gap: 10px;
834
+ min-height: 20px;
835
+ }
836
+
837
+ .zs-file-status {
838
+ font-size: 0.75rem;
839
+ }
840
+
841
+ .zs-file-clear {
842
+ margin-left: auto;
843
+ padding: 2px 8px;
844
+ border-width: 1px;
845
+ border-style: solid;
846
+ border-radius: 999px;
847
+ font-size: 0.6875rem;
848
+ font-weight: 600;
849
+ cursor: pointer;
850
+ }
851
+
852
+ .zs-file-clear[hidden] {
853
+ display: none;
854
+ }
855
+
856
+ /* ==================================================================
857
+ 10. Text inputs & textarea
858
+ ================================================================== */
859
+
860
+ .zs-input-shell {
861
+ position: relative;
862
+ display: flex;
863
+ align-items: center;
864
+ gap: 6px;
865
+ width: 100%;
866
+ min-height: var(--zs-height, 44px);
867
+ padding: 0 var(--zs-padding-x, 12px);
868
+ border-width: var(--zs-border-width, 1px);
869
+ border-style: solid;
870
+ border-radius: var(--zs-radius, 10px);
871
+ transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
872
+ }
873
+
874
+ .zs-input-native {
875
+ flex: 1 1 auto;
876
+ min-width: 0;
877
+ width: 100%;
878
+ padding: 10px 0;
879
+ font: inherit;
880
+ color: inherit;
881
+ background: transparent;
882
+ border: 0;
883
+ outline: none;
884
+ box-shadow: none;
885
+ appearance: none;
886
+ -webkit-appearance: none;
887
+ }
888
+
889
+ .zs-input-native::placeholder {
890
+ opacity: 1;
891
+ }
892
+
893
+ textarea.zs-input-native {
894
+ resize: vertical;
895
+ min-height: 92px;
896
+ }
897
+
898
+ /* controls that own their native widget keep it: appearance:none would
899
+ flatten the range track and hide the number spinners */
900
+ .zs-field[data-zs-type="number"] .zs-input-native,
901
+ .zs-field[data-zs-type="range"] .zs-input-native,
902
+ .zs-field[data-zs-type="color"] .zs-input-native,
903
+ .zs-field[data-zs-type="date"] .zs-input-native,
904
+ .zs-field[data-zs-type="time"] .zs-input-native,
905
+ .zs-field[data-zs-type="datetime-local"] .zs-input-native,
906
+ .zs-field[data-zs-type="month"] .zs-input-native,
907
+ .zs-field[data-zs-type="week"] .zs-input-native {
908
+ appearance: auto;
909
+ -webkit-appearance: auto;
910
+ }
911
+
912
+ .zs-field[data-zs-type="color"] .zs-input-native {
913
+ height: 34px;
914
+ padding: 0;
915
+ cursor: pointer;
916
+ }
917
+
918
+ .zs-field[data-zs-type="range"] .zs-input-native {
919
+ padding: 0;
920
+ height: 26px;
921
+ cursor: pointer;
922
+ }
923
+
924
+ .zs-field[data-zs-type="file"] .zs-input-native {
925
+ width: 100%;
926
+ }
927
+
928
+ .zs-input-prefix,
929
+ .zs-input-suffix {
930
+ flex: 0 0 auto;
931
+ font-size: 0.8125rem;
932
+ white-space: nowrap;
933
+ }
934
+
935
+ .zs-input-action {
936
+ flex: 0 0 auto;
937
+ display: inline-flex;
938
+ align-items: center;
939
+ justify-content: center;
940
+ min-width: 22px;
941
+ height: 22px;
942
+ padding: 0 3px;
943
+ font-size: 0.7rem;
944
+ font-weight: 600;
945
+ border: 0;
946
+ border-radius: 6px;
947
+ cursor: pointer;
948
+ transition: background-color 150ms ease, opacity 150ms ease;
949
+ }
950
+
951
+ .zs-input-action[hidden] {
952
+ display: none;
953
+ }
954
+
955
+ .zs-input-clear {
956
+ font-size: 0.95rem;
957
+ line-height: 1;
958
+ }
959
+
960
+ .zs-input-action:focus-visible {
961
+ outline: none;
962
+ }
963
+
964
+ /* floating & outlined label mechanics */
965
+ .zs-field[data-zs-layout="floating"] .zs-input-shell,
966
+ .zs-field[data-zs-layout="outlined"] .zs-input-shell {
967
+ padding-top: 6px;
968
+ align-items: center;
969
+ }
970
+
971
+ .zs-field[data-zs-layout="floating"] .zs-field__label,
972
+ .zs-field[data-zs-layout="outlined"] .zs-field__label {
973
+ position: absolute;
974
+ left: calc(var(--zs-padding-x, 12px) + 2px);
975
+ top: 50%;
976
+ margin: 0;
977
+ padding: 0 4px;
978
+ transform: translateY(-50%);
979
+ font-size: var(--zs-font-size, 0.9375rem);
980
+ font-weight: 500;
981
+ white-space: nowrap;
982
+ pointer-events: none;
983
+ transition: transform 140ms ease, font-size 140ms ease, top 140ms ease, color 140ms ease;
984
+ }
985
+
986
+ /* lifted label: filled, focused, or forced up by a prefix/suffix adornment */
987
+ .zs-field[data-zs-layout="floating"].zs-field--filled .zs-field__label,
988
+ .zs-field[data-zs-layout="floating"].zs-field--focused .zs-field__label,
989
+ .zs-field[data-zs-layout="floating"].zs-field--adorned .zs-field__label,
990
+ .zs-field[data-zs-layout="outlined"].zs-field--filled .zs-field__label,
991
+ .zs-field[data-zs-layout="outlined"].zs-field--focused .zs-field__label,
992
+ .zs-field[data-zs-layout="outlined"].zs-field--adorned .zs-field__label {
993
+ top: 0;
994
+ transform: translateY(-50%) scale(0.86);
995
+ transform-origin: left center;
996
+ font-weight: 600;
997
+ }
998
+
999
+ .zs-field[data-zs-layout="floating"].zs-field--adorned .zs-input-shell,
1000
+ .zs-field[data-zs-layout="outlined"].zs-field--adorned .zs-input-shell {
1001
+ padding-top: 10px;
1002
+ }
1003
+
1004
+ .zs-field[data-zs-layout="floating"] .zs-input-native,
1005
+ .zs-field[data-zs-layout="outlined"] .zs-input-native {
1006
+ padding-top: 12px;
1007
+ }
1008
+
1009
+ .zs-field[data-zs-layout="compact"] .zs-input-shell,
1010
+ .zs-field[data-zs-layout="compact"] .zs-control {
1011
+ min-height: 34px;
1012
+ }
1013
+
1014
+ .zs-field[data-zs-layout="card"] {
1015
+ padding: 14px;
1016
+ border-width: var(--zs-border-width, 1px);
1017
+ border-style: solid;
1018
+ border-radius: var(--zs-radius, 10px);
1019
+ }
1020
+
1021
+ /* ==================================================================
1022
+ 11. Form layout helper
1023
+ ================================================================== */
1024
+
1025
+ .zs-form-grid {
1026
+ display: grid;
1027
+ grid-template-columns: repeat(auto-fit, minmax(var(--zs-grid-min, 230px), 1fr));
1028
+ gap: var(--zs-grid-gap, 16px);
1029
+ align-items: start;
1030
+ }
1031
+
1032
+ .zs-form-grid > .zs-full {
1033
+ grid-column: 1 / -1;
1034
+ }
1035
+
1036
+ /* ==================================================================
1037
+ 12. Focus & motion
1038
+ ================================================================== */
1039
+
1040
+ .zs-check input:focus-visible + .zs-check-box,
1041
+ .zs-check input:focus-visible + .zs-switch-track,
1042
+ .zs-radio input:focus-visible + .zs-radio-dot {
1043
+ outline: 2px solid transparent;
1044
+ outline-offset: 2px;
1045
+ }
1046
+
1047
+ .zs-input-native:focus-visible,
1048
+ .zs-file-input:focus-visible {
1049
+ outline: none;
1050
+ }
1051
+
1052
+ @media (prefers-reduced-motion: reduce) {
1053
+ .zs-root,
1054
+ .zs-root *,
1055
+ .zs-root *::before,
1056
+ .zs-root *::after,
1057
+ .zs-field,
1058
+ .zs-field *,
1059
+ .zs-field *::before,
1060
+ .zs-field *::after,
1061
+ .zs-radio-group,
1062
+ .zs-radio-group * {
1063
+ animation-duration: 0.001ms !important;
1064
+ animation-iteration-count: 1 !important;
1065
+ transition-duration: 0.001ms !important;
1066
+ scroll-behavior: auto !important;
1067
+ }
1068
+
1069
+ .zs-root .zs-spinner {
1070
+ animation-duration: 1.2s !important;
1071
+ animation-iteration-count: infinite !important;
1072
+ }
1073
+ }