vanilla-jui 1.7.26 → 1.7.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-jui",
3
- "version": "1.7.26",
3
+ "version": "1.7.27",
4
4
  "private": false,
5
5
  "description": "A lightweight, reactive, and fully customizable vanilla JS UI library.",
6
6
  "keywords": [
@@ -921,8 +921,7 @@ export function createForm(input: FormProps = {}): Form {
921
921
  'data-field-label': () => fieldAccessor().name || id,
922
922
  children: () => asRenderable(fieldAccessor().label),
923
923
  };
924
- // if (isGroupedControl()) return jsx('legend', labelProps) as HTMLElement;
925
- if (isGroupedControl()) return jsx('label', labelProps) as HTMLElement;
924
+ if (isGroupedControl()) return jsx('legend', labelProps) as HTMLElement;
926
925
  return jsx('label', { ...labelProps, for: id }) as HTMLElement;
927
926
  };
928
927
  const controlContainer = (): HTMLElement =>
@@ -1,44 +1,32 @@
1
1
  @layer components {
2
- .j-form,
3
- .j-form .form-field,
4
- .j-form .form-field .field-legend {
5
- display: flex;
6
- }
7
-
8
- .j-form {
9
- flex-direction: column;
10
- gap: var(--s3);
11
- }
12
-
13
2
  .j-form .form-field {
14
- gap: var(--space);
15
- margin: 0;
16
- }
17
-
18
- .j-form fieldset.form-field {
19
3
  border: 0;
20
4
  padding: 0;
5
+ margin: 0 0 var(--s3);
21
6
  }
22
7
 
23
- .j-form .form-field {
24
- flex-direction: column;
8
+ .j-form .form-field:last-of-type {
9
+ margin: 0;
25
10
  }
26
11
 
27
12
  .j-form .form-field .field-legend {
28
13
  color: var(--ui-fg-muted);
29
14
  font-size: var(--font-size-sm);
30
- gap: var(--space);
15
+ display: block;
16
+ padding: 0;
17
+ margin-bottom: var(--space);
31
18
  }
32
19
 
33
20
  .j-form .field-legend.is-required::after {
34
21
  content: '*';
35
22
  color: var(--state-danger);
23
+ margin-left: var(--space);
36
24
  }
37
25
 
38
26
  .j-form .form-field .field-control .help-block {
39
27
  font-size: var(--font-size-sm);
40
28
  color: var(--ui-fg-soft);
41
- margin: 0;
29
+ margin: var(--space) 0 0;
42
30
  }
43
31
 
44
32
  .j-form .form-field .field-control .help-block[data-valid='false'] {
@@ -48,7 +36,7 @@
48
36
  .j-form .form-buttons {
49
37
  display: flex;
50
38
  gap: var(--s2);
51
- margin-top: var(--s2);
39
+ margin-top: var(--s6);
52
40
  }
53
41
 
54
42
  .j-form [data-field-buttons] button {
@@ -276,7 +264,7 @@
276
264
  margin-left: 1px;
277
265
  }
278
266
 
279
- .j-radio.is-group input[type='radio']:checked + span.radio-text {
267
+ .j-radio.is-group input[type='radio']:checked+span.radio-text {
280
268
  box-shadow: 0 0 0 1px var(--tone-solid);
281
269
  background-color: var(--tone-solid);
282
270
  z-index: 1;
@@ -440,33 +428,27 @@
440
428
  height: 1.5rem;
441
429
  }
442
430
 
443
- .j-switch input[type='checkbox']:checked + .switch-slider {
431
+ .j-switch input[type='checkbox']:checked+.switch-slider {
444
432
  background-color: var(--tone-solid);
445
433
  }
446
434
 
447
- .j-switch.is-sm input[type='checkbox']:checked + .switch-slider:after {
435
+ .j-switch.is-sm input[type='checkbox']:checked+.switch-slider:after {
448
436
  transform: translateX(0.75rem);
449
437
  }
450
438
 
451
- .j-switch.is-md input[type='checkbox']:checked + .switch-slider:after {
439
+ .j-switch.is-md input[type='checkbox']:checked+.switch-slider:after {
452
440
  transform: translateX(1.125rem);
453
441
  }
454
442
 
455
- .j-switch.is-lg input[type='checkbox']:checked + .switch-slider:after {
443
+ .j-switch.is-lg input[type='checkbox']:checked+.switch-slider:after {
456
444
  transform: translateX(1.5rem);
457
445
  }
458
446
 
459
- .j-theme-gray
460
- .j-switch
461
- input[type='checkbox']:checked
462
- + .switch-slider:after {
447
+ .j-theme-gray .j-switch input[type='checkbox']:checked+.switch-slider:after {
463
448
  background-color: var(--ui-bg);
464
449
  }
465
450
 
466
- .j-theme-olive
467
- .j-switch
468
- input[type='checkbox']:checked
469
- + .switch-slider:after {
451
+ .j-theme-olive .j-switch input[type='checkbox']:checked+.switch-slider:after {
470
452
  background-color: var(--ui-bg);
471
453
  }
472
454
 
@@ -564,31 +546,28 @@
564
546
  width: var(--input-height);
565
547
  }
566
548
 
567
- .input-group > *:not(:first-child) {
549
+ .input-group>*:not(:first-child) {
568
550
  margin-left: -1px;
569
551
  }
570
552
 
571
- .input-group > input.j-input:not(:first-child),
572
- .input-group > select.j-select:not(:first-child),
573
- .input-group
574
- > :not(select.j-select)
575
- + .el-addon:not(:first-child)
576
- > .is-text {
553
+ .input-group>input.j-input:not(:first-child),
554
+ .input-group>select.j-select:not(:first-child),
555
+ .input-group> :not(select.j-select)+.el-addon:not(:first-child)>.is-text {
577
556
  border-left-color: transparent;
578
557
  }
579
558
 
580
- .input-group > input.j-input:not(:first-child),
581
- .input-group > select.j-select:not(:first-child),
582
- .input-group > *:not(:first-child) > *,
583
- .input-group > *:not(:first-child) > .is-text {
559
+ .input-group>input.j-input:not(:first-child),
560
+ .input-group>select.j-select:not(:first-child),
561
+ .input-group>*:not(:first-child)>*,
562
+ .input-group>*:not(:first-child)>.is-text {
584
563
  border-top-left-radius: 0;
585
564
  border-bottom-left-radius: 0;
586
565
  }
587
566
 
588
- .input-group > input.j-input:not(:last-child),
589
- .input-group > select.j-select:not(:last-child),
590
- .input-group > *:not(:last-child) > *,
591
- .input-group > *:not(:last-child) > .is-text {
567
+ .input-group>input.j-input:not(:last-child),
568
+ .input-group>select.j-select:not(:last-child),
569
+ .input-group>*:not(:last-child)>*,
570
+ .input-group>*:not(:last-child)>.is-text {
592
571
  border-top-right-radius: 0;
593
572
  border-bottom-right-radius: 0;
594
573
  }
@@ -617,13 +596,13 @@
617
596
  --btn-box-shadow: none;
618
597
  }
619
598
 
620
- .input-inner-group .el-addon + .j-input {
599
+ .input-inner-group .el-addon+.j-input {
621
600
  /* padding-inline: 0 var(--space); */
622
601
  padding-left: 0;
623
602
  padding-right: var(--space);
624
603
  }
625
604
 
626
- .input-inner-group .el-addon + .j-select {
605
+ .input-inner-group .el-addon+.j-select {
627
606
  /* padding-inline-start: 2px; */
628
607
  padding-left: 2px;
629
608
  }
@@ -774,7 +753,7 @@
774
753
  border-color: var(--ui-border);
775
754
  }
776
755
 
777
- .j-radio.is-group label input[type='radio']:disabled + .radio-text {
756
+ .j-radio.is-group label input[type='radio']:disabled+.radio-text {
778
757
  cursor: not-allowed;
779
758
  background-color: var(--ui-disabled-bg);
780
759
  color: var(--ui-disabled-fg);
@@ -819,4 +798,4 @@
819
798
  .mobile .j-textarea {
820
799
  width: 100%;
821
800
  }
822
- }
801
+ }