vanilla-jui 1.5.33 → 1.5.35

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/src/css/form.css CHANGED
@@ -71,7 +71,7 @@
71
71
 
72
72
  .j-form .form-field .field-control .help-block {
73
73
  font-size: var(--form-help-block-font-size, var(--font-size-sm));
74
- color: var(--form-help-block-color, var(--ui-fg-soft));
74
+ color: var(--form-help-block-fg, var(--ui-fg-soft));
75
75
  margin: 0;
76
76
  }
77
77
 
@@ -94,35 +94,34 @@
94
94
  }
95
95
 
96
96
  /* input */
97
+ .j-input {
98
+ font-size: var(--input-font-size, var(--font-size-md));
99
+ background-color: var(--input-bg, inherit);
100
+ color: var(--input-fg, inherit);
101
+ }
102
+
97
103
  .j-input:not([type='checkbox']) {
98
104
  /* display: block; */
99
105
  padding: var(--input-padding, calc(var(--space) * 1.5) var(--s2));
100
- border-width: var(--input-border-width, 1px);
101
- border-style: var(--input-border-style, solid);
102
- border-color: var(--input-border-color, var(--ui-input-border));
103
- border-radius: var(--input-border-radius, var(--radius-md));
106
+ border-width: 1px;
107
+ border-style: solid;
108
+ border-color: var(--ui-border);
109
+ border-radius: var(--radius-md);
104
110
  height: var(--input-height, var(--el-height-md));
105
111
  line-height: var(--input-line-height, var(--line-height));
106
- box-shadow: var(--input-box-shadow, var(--shadow-sm));
107
- background-color: inherit;
108
- color: inherit;
109
112
  letter-spacing: 0.5px;
110
113
  }
111
114
 
112
- .j-input:not([type='file']) {
113
- font-size: var(--input-font-size, var(--font-size-md));
114
- }
115
-
116
115
  .j-input.is-sm {
117
- height: var(--input-height-sm, var(--el-height-sm));
118
- font-size: var(--input-font-size-sm, var(--font-size-sm, 0.75rem));
119
- line-height: var(--input-line-height-sm, var(--line-height-self));
116
+ --input-height: var(--el-height-sm);
117
+ --input-line-height: var(--line-height-self);
118
+ --input-font-size: var(--font-size-sm);
120
119
  }
121
120
 
122
121
  .j-input.is-lg {
123
- height: var(--input-height-lg, var(--el-height-lg));
124
- font-size: var(--input-font-size-lg, var(--font-size-lg, 1rem));
125
- line-height: var(--input-line-height-lg, var(--line-height));
122
+ --input-height: var(--el-height-lg);
123
+ --input-line-height: var(--line-height);
124
+ --input-font-size: var(--font-size-lg);
126
125
  }
127
126
 
128
127
  .j-input[type='password'].is-sm {
@@ -141,6 +140,26 @@
141
140
  letter-spacing: 0.5px;
142
141
  }
143
142
 
143
+ .j-input[type='date'],
144
+ .j-input[type='datetime'],
145
+ .j-input[type='datetime-local'],
146
+ .j-input[type='time'],
147
+ .j-input[type='week'],
148
+ .j-input[type='month'],
149
+ .j-input[type='file'],
150
+ .j-input[type='color'] {
151
+ --input-font-size: var(--font-size-sm);
152
+ --input-fg: var(--ui-fg-muted);
153
+ }
154
+
155
+ .j-input[type='color'] {
156
+ --input-padding: var(--space);
157
+ }
158
+
159
+ .j-input[type='color']::-webkit-color-swatch {
160
+ border: 0;
161
+ }
162
+
144
163
  /* type file */
145
164
  .j-input[type='file'] {
146
165
  appearance: none;
@@ -149,22 +168,21 @@
149
168
  cursor: pointer;
150
169
  }
151
170
 
152
- .j-input[type='file'] {
153
- font-size: var(--font-size-sm);
154
- }
155
-
156
- .j-input[type='file']::file-selector-button,
157
- html.j-font-sm .j-input[type='file']::file-selector-button {
171
+ .j-input[type='file']::file-selector-button {
172
+ color: var(--ui-fg-muted);
158
173
  appearance: none;
159
174
  border-width: 0;
160
175
  border-inline-end-width: 1px;
161
176
  border-radius: 0;
177
+ border-color: var(--ui-border);
178
+ background-color: var(--ui-surface-subtle);
162
179
  margin: calc(var(--space) * -2);
180
+ }
181
+
182
+ .j-input[type='file']::file-selector-button,
183
+ html.j-font-sm .j-input[type='file']::file-selector-button {
163
184
  margin-inline-end: var(--s2);
164
185
  padding: var(--s2);
165
- border-color: var(--input-border-color, var(--ui-input-border));
166
- background-color: var(--ui-surface-subtle);
167
- font-size: var(--font-size-sm, 0.75rem);
168
186
  }
169
187
 
170
188
  html.j-font-md .j-input[type='file']::file-selector-button {
@@ -216,31 +234,23 @@
216
234
  .j-input[data-valid='false'],
217
235
  .j-select[data-valid='false'],
218
236
  .j-textarea[data-valid='false'] {
219
- border-color: var(--form-invalid-border-color, var(--state-danger));
237
+ border-color: var(--state-danger);
220
238
  /* background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d63939' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='18' y1='6' x2='6' y2='18'%3e%3c/line%3e%3cline x1='6' y1='6' x2='18' y2='18'%3e%3c/line%3e%3c/svg%3e"); */
221
239
  }
222
240
 
223
- /* type color */
224
- .j-input[type='color'] {
225
- --input-padding: var(--space);
226
- }
227
-
228
241
  /* type radio */
229
242
  .j-radio {
230
243
  display: flex;
231
- /* gap: var(--radio-gap); */
232
244
  flex-wrap: wrap;
233
245
  }
234
246
 
235
247
  .j-radio.is-vertical {
236
248
  flex-direction: column;
237
- /* --radio-gap: var(--s3); */
238
249
  }
239
250
 
240
251
  .j-radio,
241
252
  .j-radio.is-horizontal {
242
253
  flex-direction: row;
243
- /* --radio-gap: var(--s4); */
244
254
  }
245
255
 
246
256
  .j-radio label {
@@ -261,9 +271,9 @@
261
271
  width: 1rem;
262
272
  height: 1rem;
263
273
  border-radius: 50%;
264
- border-width: var(--input-border-width, 1px);
265
- border-style: var(--input-border-style, solid);
266
- border-color: var(--input-border-color, var(--ui-input-border));
274
+ border-width: 1px;
275
+ border-style: solid;
276
+ border-color: var(--ui-border);
267
277
  background-color: var(--ui-bg);
268
278
  cursor: pointer;
269
279
  position: relative;
@@ -276,8 +286,8 @@
276
286
  }
277
287
 
278
288
  .j-radio label input[type='radio']:focus-visible {
279
- outline: 2px solid var(--ui-input-focus-border);
280
- outline-offset: 2px;
289
+ outline: 2px solid var(--tone-ring);
290
+ outline-offset: 1px;
281
291
  }
282
292
 
283
293
  .j-radio label input[type='radio']:before {
@@ -299,7 +309,6 @@
299
309
 
300
310
  .j-radio label:has(input[type='radio']:disabled) {
301
311
  cursor: not-allowed;
302
- /* opacity: var(--opacity-disabled); */
303
312
  color: var(--ui-disabled-fg);
304
313
  }
305
314
 
@@ -314,6 +323,7 @@
314
323
  flex-wrap: nowrap;
315
324
  }
316
325
 
326
+ /* radio group */
317
327
  .j-radio.is-group input[type='radio'] {
318
328
  clip: rect(0 0 0 0);
319
329
  clip-path: inset(100%);
@@ -325,18 +335,20 @@
325
335
  }
326
336
 
327
337
  .j-radio.is-group label span.radio-text {
328
- cursor: pointer;
338
+ color: var(--ui-fg);
329
339
  background-color: var(--ui-bg);
330
340
  padding: var(--radio-group-padding, calc(var(--space) * 1.5) var(--s3));
331
341
  height: var(--el-height-md);
332
342
  line-height: var(--line-height);
343
+ box-shadow: 0 0 0 1px var(--ui-input-border);
344
+ cursor: pointer;
333
345
  position: relative;
334
- box-shadow: 0 0 0 0.0625em var(--ui-input-border);
335
- text-align: center;
336
- user-select: none;
337
346
  display: flex;
338
347
  justify-content: center;
339
348
  align-items: center;
349
+ text-align: center;
350
+ user-select: none;
351
+ letter-spacing: 0.5px;
340
352
  }
341
353
 
342
354
  .j-radio.is-group label:not(:first-child) span.radio-text {
@@ -344,7 +356,7 @@
344
356
  }
345
357
 
346
358
  .j-radio.is-group input[type='radio']:checked + span.radio-text {
347
- box-shadow: 0 0 0 0.0625em var(--tone-solid);
359
+ box-shadow: 0 0 0 1px var(--tone-solid);
348
360
  background-color: var(--tone-solid);
349
361
  z-index: 1;
350
362
  color: var(--tone-fg);
@@ -358,6 +370,10 @@
358
370
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
359
371
  }
360
372
 
373
+ .j-radio.is-group label {
374
+ padding: 0;
375
+ }
376
+
361
377
  .j-radio.is-group.is-sm label {
362
378
  font-size: var(--font-size-sm);
363
379
  }
@@ -367,11 +383,6 @@
367
383
  height: var(--el-height-sm);
368
384
  }
369
385
 
370
- .j-radio.is-group label {
371
- font-size: var(--font-size-md);
372
- padding: 0;
373
- }
374
-
375
386
  .j-radio.is-group.is-lg label {
376
387
  font-size: var(--font-size-lg);
377
388
  }
@@ -421,10 +432,10 @@
421
432
  width: 1rem;
422
433
  height: 1rem;
423
434
  aspect-ratio: 1/1;
424
- border-width: var(--input-border-width, 1px);
425
- border-style: var(--input-border-style, solid);
426
- border-color: var(--input-border-color, var(--ui-input-border));
427
- border-radius: var(--input-border-radius, var(--radius-md));
435
+ border-width: 1px;
436
+ border-style: solid;
437
+ border-color: var(--ui-border);
438
+ border-radius: var(--radius-md);
428
439
  cursor: pointer;
429
440
  position: relative;
430
441
  margin: 0;
@@ -446,32 +457,33 @@
446
457
  }
447
458
 
448
459
  /* switch checkbox */
449
- .j-switch.is-default {
460
+ .j-switch {
461
+ display: inline-block;
450
462
  position: relative;
451
463
  }
452
464
 
453
- .j-switch.is-default.is-sm {
465
+ .j-switch.is-sm {
454
466
  width: 1.75rem;
455
467
  height: var(--switch-height-sm, calc(var(--space, 0 0.25rem) * 4));
456
468
  }
457
469
 
458
- .j-switch.is-default.is-md {
470
+ .j-switch.is-md {
459
471
  width: 2.625rem;
460
472
  height: var(--switch-height-md, calc(var(--space, 0 0.25rem) * 6));
461
473
  }
462
474
 
463
- .j-switch.is-default.is-lg {
475
+ .j-switch.is-lg {
464
476
  width: 3.5rem;
465
477
  height: var(--switch-height-lg, calc(var(--space, 0 0.25rem) * 8));
466
478
  }
467
479
 
468
- .j-switch.is-default input[type='checkbox'] {
480
+ .j-switch input[type='checkbox'] {
469
481
  width: 0;
470
482
  height: 0;
471
483
  opacity: 0;
472
484
  }
473
485
 
474
- .j-switch.is-default .switch-slider {
486
+ .j-switch .switch-slider {
475
487
  position: absolute;
476
488
  cursor: pointer;
477
489
  inset: 0;
@@ -480,214 +492,110 @@
480
492
  transition: all 0.3s ease;
481
493
  }
482
494
 
483
- .j-switch.is-default .switch-slider:after {
495
+ .j-switch .switch-slider:after {
484
496
  content: '';
485
497
  position: absolute;
486
498
  border-radius: 50%;
487
499
  background-color: #fff;
488
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
500
+ /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); */
489
501
  transition: all 0.3s ease;
490
502
  }
491
503
 
492
- .j-switch.is-default.is-sm .switch-slider:after {
504
+ .j-switch.is-sm .switch-slider:after {
493
505
  left: 0.125rem;
494
506
  bottom: 0.125rem;
495
507
  width: 0.75rem;
496
508
  height: 0.75rem;
497
509
  }
498
510
 
499
- .j-switch.is-default.is-md .switch-slider:after {
511
+ .j-switch.is-md .switch-slider:after {
500
512
  left: 0.1875rem;
501
513
  bottom: 0.1875rem;
502
514
  width: 1.125rem;
503
515
  height: 1.125rem;
504
516
  }
505
517
 
506
- .j-switch.is-default.is-lg .switch-slider:after {
518
+ .j-switch.is-lg .switch-slider:after {
507
519
  left: 0.25rem;
508
520
  bottom: 0.25rem;
509
521
  width: 1.5rem;
510
522
  height: 1.5rem;
511
523
  }
512
524
 
513
- .j-switch.is-default input[type='checkbox']:checked + .switch-slider {
525
+ .j-switch input[type='checkbox']:checked + .switch-slider {
514
526
  background-color: var(--tone-solid);
515
527
  }
516
528
 
517
- .j-switch.is-default.is-sm
518
- input[type='checkbox']:checked
519
- + .switch-slider:after {
529
+ .j-switch.is-sm input[type='checkbox']:checked + .switch-slider:after {
520
530
  transform: translateX(0.75rem);
521
531
  }
522
532
 
523
- .j-switch.is-default.is-md
524
- input[type='checkbox']:checked
525
- + .switch-slider:after {
533
+ .j-switch.is-md input[type='checkbox']:checked + .switch-slider:after {
526
534
  transform: translateX(1.125rem);
527
535
  }
528
536
 
529
- .j-switch.is-default.is-lg
530
- input[type='checkbox']:checked
531
- + .switch-slider:after {
537
+ .j-switch.is-lg input[type='checkbox']:checked + .switch-slider:after {
532
538
  transform: translateX(1.5rem);
533
539
  }
534
540
 
535
541
  .j-theme-gray
536
- .j-switch.is-default
542
+ .j-switch
537
543
  input[type='checkbox']:checked
538
544
  + .switch-slider:after {
539
545
  background-color: var(--ui-bg);
540
546
  }
541
547
 
542
548
  .j-theme-olive
543
- .j-switch.is-default
549
+ .j-switch
544
550
  input[type='checkbox']:checked
545
551
  + .switch-slider:after {
546
552
  background-color: var(--ui-bg);
547
553
  }
548
554
 
549
- .j-switch.is-default .switch-slider:hover {
555
+ .j-switch .switch-slider:hover {
550
556
  opacity: var(--opacity-hover, 0.9);
551
557
  }
552
558
 
553
- .j-switch.is-line {
554
- position: relative;
555
- display: inline-block;
556
- }
557
-
558
- .j-switch.is-line.is-sm {
559
- width: 1.75rem;
560
- height: calc(var(--space, 0 0.25rem) * 4);
561
- }
562
-
563
- .j-switch.is-line.is-md {
564
- width: 2.625rem;
565
- height: calc(var(--space, 0 0.25rem) * 6);
566
- }
567
-
568
- .j-switch.is-line.is-lg {
569
- width: 3.5rem;
570
- height: calc(var(--space, 0 0.25rem) * 8);
571
- }
572
-
573
- .j-switch.is-line input[type='checkbox'] {
574
- opacity: 0;
575
- width: 0;
576
- height: 0;
577
- }
578
-
579
- .j-switch.is-line .switch-slider {
580
- position: absolute;
581
- cursor: pointer;
582
- inset: 0;
583
- border: 1px solid var(--input-border-color, var(--ui-input-border));
584
- border-radius: 50px;
585
- transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
586
- }
587
-
588
- .j-switch.is-line.is-md .switch-slider,
589
- .j-switch.is-line.is-lg .switch-slider {
590
- border-width: 2px;
591
- }
592
-
593
- .j-switch.is-line .switch-slider:before {
594
- content: '';
595
- position: absolute;
596
- background-color: var(--ui-input-border);
597
- border-radius: inherit;
598
- transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
599
- }
600
-
601
- .j-switch.is-line.is-sm .switch-slider:before {
602
- left: 0.125rem;
603
- bottom: 0.125rem;
604
- width: 0.625rem;
605
- height: 0.625rem;
606
- }
607
-
608
- .j-switch.is-line.is-md .switch-slider:before {
609
- left: 0.125rem;
610
- bottom: 0.125rem;
611
- width: 1rem;
612
- height: 1rem;
613
- }
614
-
615
- .j-switch.is-line.is-lg .switch-slider:before {
616
- left: 0.1875rem;
617
- bottom: 0.1875rem;
618
- width: 1.375rem;
619
- height: 1.375rem;
620
- }
621
-
622
- .j-switch.is-line input:checked + .switch-slider {
623
- box-shadow: 0 0 8px var(--tone-solid);
624
- border-color: var(--tone-solid);
625
- }
626
-
627
- .j-switch.is-line input:checked + .switch-slider:before {
628
- background-color: var(--tone-solid);
629
- }
630
-
631
- .j-switch.is-line.is-sm input:checked + .switch-slider:before {
632
- transform: translateX(0.75rem);
633
- }
634
-
635
- .j-switch.is-line.is-md input:checked + .switch-slider:before {
636
- transform: translateX(1.125rem);
637
- }
638
-
639
- .j-switch.is-line.is-lg input:checked + .switch-slider:before {
640
- transform: translateX(1.5rem);
641
- }
642
-
643
559
  /* select */
644
560
  select.j-select {
645
- padding: var(
646
- --input-padding,
647
- calc(var(--space) * 1.5) calc(var(--space) * 1.5)
648
- );
649
- border-width: var(--input-border-width, 1px);
650
- border-style: var(--input-border-style, solid);
651
- border-color: var(--input-border-color, var(--ui-input-border));
652
- border-radius: var(--input-border-radius, var(--radius-md));
561
+ padding: var(--input-padding, calc(var(--space) * 1.5));
562
+ border-width: 1px;
563
+ border-style: solid;
564
+ border-color: var(--ui-border);
565
+ border-radius: var(--radius-md);
653
566
  height: var(--input-height, var(--el-height-md));
654
567
  line-height: var(--input-line-height, var(--line-height));
655
- box-shadow: var(--input-box-shadow, var(--shadow-sm));
656
568
  background-color: var(--input-background-color, inherit);
657
569
  font-size: var(--input-font-size, var(--font-size-md));
570
+ letter-spacing: 0.5px;
658
571
  }
659
572
 
660
573
  select.j-select.is-sm {
574
+ --input-padding: var(--space);
661
575
  --input-height: var(--el-height-sm);
662
- --input-padding: var(--space) var(--space);
663
576
  --input-font-size: var(--font-size-sm);
664
577
  }
665
578
 
666
579
  select.j-select.is-lg {
580
+ --input-padding: var(--s2);
667
581
  --input-height: var(--el-height-lg);
668
- --input-padding: var(--s2) var(--s2);
669
582
  --input-font-size: var(--font-size-lg);
670
583
  }
671
584
 
672
585
  /* textarea */
673
586
  textarea.j-textarea {
674
587
  min-height: var(--textarea-min-height, calc(var(--space) * 18));
675
- border-width: var(--input-border-width, 1px);
676
- border-style: var(--input-border-style, solid);
677
- border-color: var(--input-border-color, var(--ui-input-border));
678
- border-radius: var(--input-border-radius, var(--radius-md));
588
+ border-width: 1px;
589
+ border-style: solid;
590
+ border-color: var(--ui-border);
591
+ border-radius: var(--radius-md);
679
592
  background-color: var(--input-background-color, var(--ui-bg));
680
593
  color: var(--input-color, var(--ui-input-color));
681
594
  resize: vertical;
682
- padding: var(--textarea-padding, var(--s2));
595
+ padding: var(--space) var(--s2);
683
596
  font-family: inherit;
684
597
  font-size: var(--textarea-font-size, var(--font-size-md));
685
598
  line-height: var(--textarea-line-height, var(--line-height));
686
- box-shadow: var(--textarea-box-shadow, var(--shadow-sm));
687
- }
688
-
689
- textarea.j-textarea:focus {
690
- border-color: transparent;
691
599
  }
692
600
 
693
601
  textarea.j-textarea:disabled {
@@ -711,45 +619,45 @@
711
619
  width: 100%;
712
620
  }
713
621
 
714
- .input-group > input.j-input,
715
- .input-group > select.j-select {
622
+ .input-group .j-button {
623
+ box-shadow: none;
624
+ }
625
+
626
+ .input-group input.j-input,
627
+ .input-group select.j-select {
716
628
  position: relative;
717
629
  flex: 1 1 auto;
718
- width: 1%;
630
+ /* width: 1%; */
719
631
  min-width: 0;
720
- letter-spacing: 0.4px;
632
+ /* letter-spacing: 0.4px; */
721
633
  }
722
634
 
723
- .input-group > .el-addon > .j-button {
635
+ .input-group .el-addon .j-button {
724
636
  position: relative;
725
- border-color: var(--input-border-color, var(--ui-input-border));
637
+ border-color: var(--ui-border);
726
638
  color: var(--ui-fg-muted);
727
- background: var(--ui-surface-muted);
639
+ background: var(--ui-bg-muted);
728
640
  }
729
641
 
730
642
  .input-group > .el-addon > .is-text {
731
643
  display: flex;
732
644
  align-items: center;
733
645
  white-space: nowrap;
734
- font-size: var(--font-size, 0.875rem);
735
- line-height: var(--line-height, 1.25rem);
646
+ font-size: var(--font-size-md);
647
+ line-height: var(--line-height);
736
648
  color: var(--ui-fg-muted);
737
- background-color: var(
738
- --input-group-text-addon-background,
739
- var(--ui-bg-muted)
740
- );
741
- padding: var(--input-group-text-addon-padding, var(--s2));
742
- height: var(--button-height, var(--el-height-md));
743
- border-width: var(--border-width, 1px);
744
- border-style: var(--border-style, solid);
745
- border-color: var(--input-border-color, var(--ui-input-border));
746
- border-radius: var(--button-border-radius, var(--radius-md));
747
- box-shadow: var(--shadow-sm);
649
+ background-color: var(--ui-bg-muted);
650
+ padding: var(--s2);
651
+ height: var(--el-height-md);
652
+ border-width: 1px;
653
+ border-style: solid;
654
+ border-color: var(--ui-border);
655
+ border-radius: var(--radius-md);
748
656
  user-select: none;
749
657
  }
750
658
 
751
659
  .input-group > .el-addon > .is-text.icon-close {
752
- width: var(--button-height, var(--el-height-md));
660
+ width: var(--el-height-md);
753
661
  }
754
662
 
755
663
  .input-group > *:not(:first-child) {
@@ -781,30 +689,29 @@
781
689
  border-bottom-right-radius: 0;
782
690
  }
783
691
 
784
- .input-group select.j-select:focus {
785
- border-color: transparent;
786
- z-index: 1;
787
- }
788
-
789
692
  /* input inner group */
790
693
  .input-inner-group {
791
694
  position: relative;
792
695
  }
793
696
 
794
- .input-inner-group > input.j-input {
697
+ .input-inner-group button.j-button {
698
+ box-shadow: none;
699
+ }
700
+
701
+ .input-inner-group input.j-input {
795
702
  width: 100%;
796
703
  letter-spacing: 0.4px;
797
704
  }
798
705
 
799
- .input-inner-group > input.j-input:not(:last-child) {
706
+ .input-inner-group input.j-input:not(:last-child) {
800
707
  padding-right: var(--el-height-md);
801
708
  }
802
709
 
803
- .input-inner-group > input.j-input:not(:first-child) {
710
+ .input-inner-group input.j-input:not(:first-child) {
804
711
  padding-left: var(--el-height-md);
805
712
  }
806
713
 
807
- .input-inner-group > .el-addon {
714
+ .input-inner-group .el-addon {
808
715
  position: absolute;
809
716
  top: 0;
810
717
  bottom: 0;
@@ -813,75 +720,57 @@
813
720
  align-items: center;
814
721
  justify-content: center;
815
722
  min-width: var(--el-height-md);
816
- color: var(--ui-fg-subtle);
817
- font-size: 0.875em;
723
+ color: var(--ui-fg-muted);
724
+ /* font-size: 0.875em; */
818
725
  }
819
726
 
820
- .input-inner-group > .el-addon:last-child {
727
+ .input-inner-group .el-addon:last-child {
821
728
  right: 0;
822
729
  left: auto;
823
730
  }
824
731
 
825
732
  .input-inner-group
826
- > .el-addon:first-child.is-text:has(.j-button:not(.is-icon)) {
733
+ .el-addon:first-child.is-text:has(.j-button:not(.is-icon)) {
827
734
  left: var(--space);
828
735
  }
829
736
 
830
- .input-inner-group
831
- > .el-addon:last-child.is-text:has(.j-button:not(.is-icon)) {
737
+ .input-inner-group .el-addon:last-child.is-text:has(.j-button:not(.is-icon)) {
832
738
  right: var(--space);
833
739
  }
834
740
 
835
- .input-inner-group > .el-addon > svg {
741
+ .input-inner-group .el-addon svg {
836
742
  width: var(--font-size-xl);
837
743
  height: var(--font-size-xl);
838
744
  }
839
745
 
840
- .input-inner-group > .el-addon > .el-text {
841
- color: currentColor;
842
- }
843
-
844
- .input-inner-group > .el-addon.is-text {
845
- color: var(--ui-fg);
746
+ .input-inner-group .el-addon.is-text {
846
747
  display: flex;
847
748
  gap: var(--space);
848
749
  }
849
750
 
850
751
  /* status active */
851
- .input-group > .el-addon > .j-button:not(:disabled):active {
852
- transform: none;
853
- outline: var(--input-focus-outline, 2px solid var(--tone-solid));
854
- border-color: transparent;
855
- z-index: 2;
752
+ .input-group .j-button:not(:disabled):active,
753
+ .input-group .j-input:focus-within,
754
+ .input-group select.j-select:focus {
755
+ z-index: 1;
856
756
  }
857
757
 
858
758
  /* status focus */
759
+ .j-input:focus,
760
+ .j-input:focus-within,
761
+ .j-input:focus-visible,
762
+ .j-textarea:focus,
763
+ .j-textarea:focus-within,
764
+ .j-textarea:focus-visible,
765
+ select.j-select:focus,
766
+ select.j-select:focus-within,
859
767
  select.j-select:focus-visible,
860
- .j-input:focus-within {
861
- outline: var(--input-focus-outline, 2px solid var(--tone-solid));
862
- border-color: transparent;
863
- box-shadow: var(--input-focus-shadow, none);
864
- }
865
-
866
- /* .j-input[data-valid='true']:focus-within,
867
- .j-select[data-valid='true']:focus-within {
868
- border-color: transparent;
869
- outline-color: var(--form-valid-border-color, var(--state-success));
870
- } */
871
-
872
768
  .j-input[data-valid='false']:focus-within,
873
- .j-select[data-valid='false']:focus-within {
874
- border-color: transparent;
875
- outline-color: var(--form-invalid-border-color, var(--state-danger));
876
- }
877
-
878
- .input-group > .j-input:focus-within {
879
- z-index: 2;
880
- }
881
-
882
- .j-textarea:focus-within {
883
- outline: var(--textarea-focus-outline, 2px solid var(--tone-solid));
884
- border-color: transparent;
769
+ .j-select[data-valid='false']:focus-within,
770
+ .input-group .j-button:not(:disabled):active {
771
+ outline: 0;
772
+ border-color: var(--tone-solid);
773
+ box-shadow: 0 0 0 4px var(--tone-ring);
885
774
  }
886
775
 
887
776
  .j-radio label input[type='radio']:focus-within {
@@ -895,24 +784,13 @@
895
784
  }
896
785
 
897
786
  /* status readonly */
898
- .j-input:not([type='file']):not(.is-line):not(.is-blank)[readonly] {
899
- background-color: var(--input-readonly-bg, var(--ui-surface-active));
900
- }
901
-
787
+ .j-input:not([type='file']):not(.is-line):not(.is-blank)[readonly],
902
788
  .j-textarea[readonly] {
903
789
  background-color: var(--ui-surface-active);
904
790
  }
905
791
 
906
792
  /* status disabled */
907
- .j-input:disabled,
908
- .j-textarea:disabled {
909
- opacity: var(--input-disabled-opacity, var(--opacity-disabled));
910
- }
911
-
912
- .j-input:disabled:not(.is-line):not(.is-ghost):not(.is-blank) {
913
- background-color: var(--ui-disabled-bg);
914
- }
915
-
793
+ .j-input:disabled:not(.is-line):not(.is-ghost):not(.is-blank),
916
794
  .j-textarea[disabled] {
917
795
  background-color: var(--ui-disabled-bg);
918
796
  }
@@ -947,25 +825,19 @@
947
825
  }
948
826
 
949
827
  /* switch disabled */
950
- .j-switch.is-default:has(input[type='checkbox']:disabled),
828
+ .j-switch:has(input[type='checkbox']:disabled),
951
829
  .j-switch.is-line:has(input[type='checkbox']:disabled) {
952
830
  opacity: var(--opacity-disabled);
953
831
  cursor: not-allowed;
954
832
  }
955
833
 
956
- .j-switch.is-default:has(input[type='checkbox']:disabled) .switch-slider,
834
+ .j-switch:has(input[type='checkbox']:disabled) .switch-slider,
957
835
  .j-switch.is-line:has(input[type='checkbox']:disabled) .switch-slider {
958
836
  cursor: not-allowed;
959
837
  }
960
838
 
961
- .j-switch.is-default:has(input[type='checkbox']:disabled)
962
- .switch-slider:before,
839
+ .j-switch:has(input[type='checkbox']:disabled) .switch-slider:before,
963
840
  .j-switch.is-line:has(input[type='checkbox']:disabled) .switch-slider:before {
964
841
  background-color: var(--ui-border);
965
842
  }
966
-
967
- /* status placeholder shown */
968
- /* input.j-input:not([type='file']):not(:placeholder-shown) {
969
- background-color: var(--tone-subtle);
970
- } */
971
843
  }