vanilla-jui 1.7.24 → 1.7.26
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/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/form.ts +2 -1
- package/src/css/layout.css +72 -4
- package/src/css/themes/default/captcha.css +125 -0
- package/src/css/themes/default/index.css +2 -1
package/package.json
CHANGED
package/src/components/form.ts
CHANGED
|
@@ -921,7 +921,8 @@ 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;
|
|
924
|
+
// if (isGroupedControl()) return jsx('legend', labelProps) as HTMLElement;
|
|
925
|
+
if (isGroupedControl()) return jsx('label', labelProps) as HTMLElement;
|
|
925
926
|
return jsx('label', { ...labelProps, for: id }) as HTMLElement;
|
|
926
927
|
};
|
|
927
928
|
const controlContainer = (): HTMLElement =>
|
package/src/css/layout.css
CHANGED
|
@@ -679,9 +679,6 @@
|
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
|
|
682
|
-
/**
|
|
683
|
-
* 为减少体积,md/lg/xl 断点只保留常用列数(如 1/2/3/4/6/12)
|
|
684
|
-
*/
|
|
685
682
|
@media (min-width: 768px) {
|
|
686
683
|
.grid-col-md-1 {
|
|
687
684
|
grid-template-columns: repeat(1, 1fr);
|
|
@@ -691,7 +688,6 @@
|
|
|
691
688
|
grid-template-columns: repeat(2, 1fr);
|
|
692
689
|
}
|
|
693
690
|
|
|
694
|
-
/* ... 可按需补充 md-3 ~ md-12 */
|
|
695
691
|
.grid-col-md-3 {
|
|
696
692
|
grid-template-columns: repeat(3, 1fr);
|
|
697
693
|
}
|
|
@@ -700,10 +696,34 @@
|
|
|
700
696
|
grid-template-columns: repeat(4, 1fr);
|
|
701
697
|
}
|
|
702
698
|
|
|
699
|
+
.grid-col-md-5 {
|
|
700
|
+
grid-template-columns: repeat(5, 1fr);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
703
|
.grid-col-md-6 {
|
|
704
704
|
grid-template-columns: repeat(6, 1fr);
|
|
705
705
|
}
|
|
706
706
|
|
|
707
|
+
.grid-col-md-7 {
|
|
708
|
+
grid-template-columns: repeat(7, 1fr);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.grid-col-md-8 {
|
|
712
|
+
grid-template-columns: repeat(8, 1fr);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.grid-col-md-9 {
|
|
716
|
+
grid-template-columns: repeat(9, 1fr);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.grid-col-md-10 {
|
|
720
|
+
grid-template-columns: repeat(10, 1fr);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.grid-col-md-11 {
|
|
724
|
+
grid-template-columns: repeat(11, 1fr);
|
|
725
|
+
}
|
|
726
|
+
|
|
707
727
|
.grid-col-md-12 {
|
|
708
728
|
grid-template-columns: repeat(12, 1fr);
|
|
709
729
|
}
|
|
@@ -726,10 +746,34 @@
|
|
|
726
746
|
grid-template-columns: repeat(4, 1fr);
|
|
727
747
|
}
|
|
728
748
|
|
|
749
|
+
.grid-col-lg-5 {
|
|
750
|
+
grid-template-columns: repeat(5, 1fr);
|
|
751
|
+
}
|
|
752
|
+
|
|
729
753
|
.grid-col-lg-6 {
|
|
730
754
|
grid-template-columns: repeat(6, 1fr);
|
|
731
755
|
}
|
|
732
756
|
|
|
757
|
+
.grid-col-lg-7 {
|
|
758
|
+
grid-template-columns: repeat(7, 1fr);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.grid-col-lg-8 {
|
|
762
|
+
grid-template-columns: repeat(8, 1fr);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.grid-col-lg-9 {
|
|
766
|
+
grid-template-columns: repeat(9, 1fr);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.grid-col-lg-10 {
|
|
770
|
+
grid-template-columns: repeat(10, 1fr);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.grid-col-lg-11 {
|
|
774
|
+
grid-template-columns: repeat(11, 1fr);
|
|
775
|
+
}
|
|
776
|
+
|
|
733
777
|
.grid-col-lg-12 {
|
|
734
778
|
grid-template-columns: repeat(12, 1fr);
|
|
735
779
|
}
|
|
@@ -752,10 +796,34 @@
|
|
|
752
796
|
grid-template-columns: repeat(4, 1fr);
|
|
753
797
|
}
|
|
754
798
|
|
|
799
|
+
.grid-col-xl-5 {
|
|
800
|
+
grid-template-columns: repeat(5, 1fr);
|
|
801
|
+
}
|
|
802
|
+
|
|
755
803
|
.grid-col-xl-6 {
|
|
756
804
|
grid-template-columns: repeat(6, 1fr);
|
|
757
805
|
}
|
|
758
806
|
|
|
807
|
+
.grid-col-xl-7 {
|
|
808
|
+
grid-template-columns: repeat(7, 1fr);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.grid-col-xl-8 {
|
|
812
|
+
grid-template-columns: repeat(8, 1fr);
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.grid-col-xl-9 {
|
|
816
|
+
grid-template-columns: repeat(9, 1fr);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.grid-col-xl-10 {
|
|
820
|
+
grid-template-columns: repeat(10, 1fr);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.grid-col-xl-11 {
|
|
824
|
+
grid-template-columns: repeat(11, 1fr);
|
|
825
|
+
}
|
|
826
|
+
|
|
759
827
|
.grid-col-xl-12 {
|
|
760
828
|
grid-template-columns: repeat(12, 1fr);
|
|
761
829
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/* cap captcha */
|
|
2
|
+
.j-cap-field {
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
height: 56px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.j-cap-field .cap-control {
|
|
10
|
+
display: flex;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
padding: 8px 12px;
|
|
17
|
+
border: 1px solid var(--ui-border);
|
|
18
|
+
border-radius: 6px;
|
|
19
|
+
background: var(--ui-bg);
|
|
20
|
+
color: var(--ui-fg);
|
|
21
|
+
font: inherit;
|
|
22
|
+
font-size: var(--font-size-md);
|
|
23
|
+
line-height: 18px;
|
|
24
|
+
text-align: start;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
transition:
|
|
27
|
+
background-color 150ms,
|
|
28
|
+
border-color 150ms;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.j-cap-field .cap-control[data-state='idle']:hover {
|
|
32
|
+
border-color: var(--tone-border-strong);
|
|
33
|
+
background: var(--tone-soft);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.j-cap-field .cap-control:focus-visible {
|
|
37
|
+
outline: 2px solid var(--tone-solid);
|
|
38
|
+
outline-offset: 2px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.j-cap-field .cap-control[data-state='loading'],
|
|
42
|
+
.j-cap-field .cap-control[data-state='verifying'] {
|
|
43
|
+
cursor: wait;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.j-cap-field .cap-control[data-state='verified'] {
|
|
47
|
+
border-color: var(--state-success-border);
|
|
48
|
+
background: var(--state-success-subtle);
|
|
49
|
+
color: var(--state-success-text);
|
|
50
|
+
cursor: default;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.j-cap-field .cap-control[data-state='error'],
|
|
54
|
+
.j-cap-field .cap-control[data-state='rate-limited'] {
|
|
55
|
+
border-color: var(--state-danger-border);
|
|
56
|
+
color: var(--state-danger-text);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.j-cap-field .cap-control-icon,
|
|
60
|
+
.j-cap-field .cap-control-icon>svg,
|
|
61
|
+
.j-cap-field .cap-control-box {
|
|
62
|
+
display: block;
|
|
63
|
+
width: 20px;
|
|
64
|
+
height: 20px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.j-cap-field .cap-control-icon {
|
|
68
|
+
flex: 0 0 20px;
|
|
69
|
+
color: var(--tone-text);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.j-cap-field .cap-control[data-state='verified'] .cap-control-icon,
|
|
73
|
+
.j-cap-field .cap-control[data-state='error'] .cap-control-icon,
|
|
74
|
+
.j-cap-field .cap-control[data-state='rate-limited'] .cap-control-icon {
|
|
75
|
+
color: inherit;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.j-cap-field .cap-control-box {
|
|
79
|
+
border: 1.5px solid var(--ui-border);
|
|
80
|
+
border-radius: 4px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.j-cap-field .cap-control-label {
|
|
84
|
+
flex: 1 1 0;
|
|
85
|
+
min-width: 0;
|
|
86
|
+
overflow-wrap: anywhere;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.j-cap-field .cap-control-percent {
|
|
90
|
+
flex: 0 0 4ch;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
color: var(--tone-caption);
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
font-variant-numeric: tabular-nums;
|
|
95
|
+
text-align: end;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.j-cap-field .cap-progress {
|
|
99
|
+
position: absolute;
|
|
100
|
+
inset: auto 1px 1px;
|
|
101
|
+
height: 2px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
border-radius: 0 0 5px 5px;
|
|
104
|
+
pointer-events: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.j-cap-field .cap-progress>span {
|
|
108
|
+
display: block;
|
|
109
|
+
height: 100%;
|
|
110
|
+
background: var(--tone-solid);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.j-cap-field .cap-spinner {
|
|
114
|
+
animation: animate-spin 800ms linear infinite;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media (prefers-reduced-motion: reduce) {
|
|
118
|
+
.j-cap-field .cap-control {
|
|
119
|
+
transition: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.j-cap-field .cap-spinner {
|
|
123
|
+
animation: none;
|
|
124
|
+
}
|
|
125
|
+
}
|