@tachui/forms 0.7.1-alpha → 0.8.1-alpha
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/README.md +87 -272
- package/dist/DatePicker-D5nRFTUm.js +475 -0
- package/dist/DatePicker-D5nRFTUm.js.map +1 -0
- package/dist/Select-yZyKooXk.js +945 -0
- package/dist/Select-yZyKooXk.js.map +1 -0
- package/dist/Slider-0-oal5YR.js +644 -0
- package/dist/Slider-0-oal5YR.js.map +1 -0
- package/dist/TextField-hX15dY3U.js +509 -0
- package/dist/TextField-hX15dY3U.js.map +1 -0
- package/dist/components/advanced/Slider.d.ts +190 -0
- package/dist/components/advanced/Slider.d.ts.map +1 -0
- package/dist/components/advanced/Stepper.d.ts +161 -0
- package/dist/components/advanced/Stepper.d.ts.map +1 -0
- package/dist/components/advanced/index.d.ts +15 -0
- package/dist/components/advanced/index.d.ts.map +1 -0
- package/dist/components/advanced/index.js +6 -0
- package/dist/components/advanced/index.js.map +1 -0
- package/dist/components/date-picker/DatePicker.d.ts +126 -0
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -0
- package/dist/components/date-picker/index.d.ts +14 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/index.js +5 -0
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/form-container/index.d.ts +58 -0
- package/dist/components/form-container/index.d.ts.map +1 -0
- package/dist/components/selection/Checkbox.d.ts.map +1 -0
- package/dist/components/selection/Radio.d.ts.map +1 -0
- package/dist/components/selection/Select.d.ts.map +1 -0
- package/dist/components/selection/index.d.ts +68 -0
- package/dist/components/selection/index.d.ts.map +1 -0
- package/dist/components/selection/index.js +12 -0
- package/dist/components/selection/index.js.map +1 -0
- package/dist/components/text-input/TextField.d.ts.map +1 -0
- package/dist/components/text-input/index.d.ts +8 -0
- package/dist/components/text-input/index.d.ts.map +1 -0
- package/dist/components/text-input/index.js +18 -0
- package/dist/components/text-input/index.js.map +1 -0
- package/dist/{state/index.js → index-D3WfkqVv.js} +15 -8
- package/dist/index-D3WfkqVv.js.map +1 -0
- package/dist/index.d.ts +10 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +198 -376
- package/dist/index.js.map +1 -0
- package/dist/state/index.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/validation/component-validation.d.ts +11 -2
- package/dist/validation/component-validation.d.ts.map +1 -1
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +282 -191
- package/dist/validation/index.js.map +1 -0
- package/package.json +53 -39
- package/src/components/advanced/Slider.ts +722 -0
- package/src/components/advanced/Stepper.ts +715 -0
- package/src/components/advanced/index.ts +20 -0
- package/src/components/date-picker/DatePicker.ts +925 -0
- package/src/components/date-picker/index.ts +20 -0
- package/src/components/form-container/index.ts +266 -0
- package/src/components/selection/Checkbox.ts +478 -0
- package/src/components/selection/Radio.ts +470 -0
- package/src/components/selection/Select.ts +620 -0
- package/src/components/selection/index.ts +81 -0
- package/src/components/text-input/TextField.ts +728 -0
- package/src/components/text-input/index.ts +35 -0
- package/src/index.ts +48 -0
- package/src/state/index.ts +544 -0
- package/src/types/index.ts +579 -0
- package/src/utils/formatters.ts +184 -0
- package/src/utils/index.ts +57 -0
- package/src/validation/component-validation.ts +429 -0
- package/src/validation/index.ts +641 -0
- package/dist/TextField-CGBM3x7K.js +0 -1799
- package/dist/components/Form.d.ts +0 -76
- package/dist/components/Form.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -9
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -28
- package/dist/components/input/Checkbox.d.ts.map +0 -1
- package/dist/components/input/Radio.d.ts.map +0 -1
- package/dist/components/input/Select.d.ts.map +0 -1
- package/dist/components/input/TextField.d.ts.map +0 -1
- package/dist/components/input/index.d.ts +0 -11
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/utils/validators.d.ts +0 -101
- package/dist/utils/validators.d.ts.map +0 -1
- /package/dist/components/{input → selection}/Checkbox.d.ts +0 -0
- /package/dist/components/{input → selection}/Radio.d.ts +0 -0
- /package/dist/components/{input → selection}/Select.d.ts +0 -0
- /package/dist/components/{input → text-input}/TextField.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,381 +1,203 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* Integer validation
|
|
94
|
-
*/
|
|
95
|
-
integer: (e) => {
|
|
96
|
-
if (!e) return { valid: !0 };
|
|
97
|
-
const t = Number(e), r = Number.isInteger(t);
|
|
98
|
-
return {
|
|
99
|
-
valid: r,
|
|
100
|
-
...r ? {} : { message: "Please enter a whole number", code: "INVALID_INTEGER" }
|
|
101
|
-
};
|
|
102
|
-
},
|
|
103
|
-
/**
|
|
104
|
-
* Minimum value validation
|
|
105
|
-
*/
|
|
106
|
-
min: (e) => (t) => {
|
|
107
|
-
if (!t) return { valid: !0 };
|
|
108
|
-
const r = Number(t), a = !Number.isNaN(r) && r >= e;
|
|
109
|
-
return {
|
|
110
|
-
valid: a,
|
|
111
|
-
...a ? {} : { message: `Value must be at least ${e}`, code: "MIN_VALUE" }
|
|
112
|
-
};
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Maximum value validation
|
|
116
|
-
*/
|
|
117
|
-
max: (e) => (t) => {
|
|
118
|
-
if (!t) return { valid: !0 };
|
|
119
|
-
const r = Number(t), a = !Number.isNaN(r) && r <= e;
|
|
120
|
-
return {
|
|
121
|
-
valid: a,
|
|
122
|
-
...a ? {} : { message: `Value must be at most ${e}`, code: "MAX_VALUE" }
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* Range validation
|
|
127
|
-
*/
|
|
128
|
-
range: (e, t) => (r) => {
|
|
129
|
-
if (!r) return { valid: !0 };
|
|
130
|
-
const a = Number(r), o = !Number.isNaN(a) && a >= e && a <= t;
|
|
131
|
-
return {
|
|
132
|
-
valid: o,
|
|
133
|
-
...o ? {} : { message: `Value must be between ${e} and ${t}`, code: "OUT_OF_RANGE" }
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
|
-
/**
|
|
137
|
-
* Credit card validation (Luhn algorithm)
|
|
138
|
-
*/
|
|
139
|
-
creditCard: (e) => {
|
|
140
|
-
if (!e) return { valid: !0 };
|
|
141
|
-
const t = e.replace(/\D/g, "");
|
|
142
|
-
if (t.length < 13 || t.length > 19)
|
|
143
|
-
return {
|
|
144
|
-
valid: !1,
|
|
145
|
-
message: "Credit card number must be 13-19 digits",
|
|
146
|
-
code: "INVALID_CREDIT_CARD"
|
|
147
|
-
};
|
|
148
|
-
let r = 0, a = !1;
|
|
149
|
-
for (let i = t.length - 1; i >= 0; i--) {
|
|
150
|
-
let s = parseInt(t[i]);
|
|
151
|
-
a && (s *= 2, s > 9 && (s -= 9)), r += s, a = !a;
|
|
152
|
-
}
|
|
153
|
-
const o = r % 10 === 0;
|
|
154
|
-
return {
|
|
155
|
-
valid: o,
|
|
156
|
-
...o ? {} : { message: "Please enter a valid credit card number", code: "INVALID_CREDIT_CARD" }
|
|
157
|
-
};
|
|
158
|
-
},
|
|
159
|
-
/**
|
|
160
|
-
* Social Security Number validation
|
|
161
|
-
*/
|
|
162
|
-
ssn: (e) => {
|
|
163
|
-
if (!e) return { valid: !0 };
|
|
164
|
-
const t = e.replace(/\D/g, ""), a = /^(?!666|000|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/.test(t);
|
|
165
|
-
return {
|
|
166
|
-
valid: a,
|
|
167
|
-
...a ? {} : { message: "Please enter a valid Social Security Number", code: "INVALID_SSN" }
|
|
168
|
-
};
|
|
169
|
-
},
|
|
170
|
-
/**
|
|
171
|
-
* US ZIP code validation
|
|
172
|
-
*/
|
|
173
|
-
zipCode: (e) => {
|
|
174
|
-
if (!e) return { valid: !0 };
|
|
175
|
-
const r = /^\d{5}(-\d{4})?$/.test(e);
|
|
176
|
-
return {
|
|
177
|
-
valid: r,
|
|
178
|
-
...r ? {} : { message: "Please enter a valid ZIP code", code: "INVALID_ZIP" }
|
|
179
|
-
};
|
|
180
|
-
},
|
|
181
|
-
/**
|
|
182
|
-
* Strong password validation
|
|
183
|
-
*/
|
|
184
|
-
strongPassword: (e) => {
|
|
185
|
-
if (!e) return { valid: !0 };
|
|
186
|
-
const t = /[a-z]/.test(e), r = /[A-Z]/.test(e), a = /\d/.test(e), o = /[!@#$%^&*(),.?":{}|<>]/.test(e), i = e.length >= 8, s = [];
|
|
187
|
-
i || s.push("at least 8 characters"), t || s.push("lowercase letter"), r || s.push("uppercase letter"), a || s.push("number"), o || s.push("special character");
|
|
188
|
-
const l = s.length === 0;
|
|
189
|
-
return {
|
|
190
|
-
valid: l,
|
|
191
|
-
...l ? {} : {
|
|
192
|
-
message: `Password must contain ${s.join(", ")}`,
|
|
193
|
-
code: "WEAK_PASSWORD"
|
|
1
|
+
import { createSignal as n, createComputed as a } from "@tachui/core";
|
|
2
|
+
import { c as o } from "./index-D3WfkqVv.js";
|
|
3
|
+
import { a as N, b as T } from "./index-D3WfkqVv.js";
|
|
4
|
+
import { f as D, C as M, D as w, E as A, N as L, P, a as R, c as $, b as k, S as O, d as U, T as H, e as I, U as z } from "./TextField-hX15dY3U.js";
|
|
5
|
+
import { C as _, a as j, c as Z, M as q, R as B, b as J, d as K, S as Q } from "./Select-yZyKooXk.js";
|
|
6
|
+
import { a as X, S as Y } from "./Slider-0-oal5YR.js";
|
|
7
|
+
import { D as te } from "./DatePicker-D5nRFTUm.js";
|
|
8
|
+
import { CrossFieldValidators as ie, FormsComponentValidation as se, FormsValidationError as ae, VALIDATION_RULES as ne, ValidationMessageFormatter as oe, ValidationPresets as de, ValidationUtils as pe, createDebouncedValidator as le, createFormsValidators as ce, defaultMessageFormatter as fe, getValidationRules as me, registerFormsValidators as he, registerValidationRule as ue, unregisterValidationRule as Se, validateField as xe, validateValue as ge, validateValueAsync as Ce } from "./validation/index.js";
|
|
9
|
+
class d {
|
|
10
|
+
constructor(e) {
|
|
11
|
+
this.properties = e, this.formState = o(e.initialValues || {}), e.validation && Object.entries(e.validation).forEach(
|
|
12
|
+
([t, r]) => {
|
|
13
|
+
this.formState.register(t, r);
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
type = "form-container";
|
|
18
|
+
formState;
|
|
19
|
+
get state() {
|
|
20
|
+
return this.formState.state;
|
|
21
|
+
}
|
|
22
|
+
async handleSubmit() {
|
|
23
|
+
this.properties.validateOnSubmit !== !1 && !await this.formState.validateForm() || (this.properties.onSubmit && await this.properties.onSubmit(
|
|
24
|
+
this.formState.watch(),
|
|
25
|
+
this.formState.state
|
|
26
|
+
), this.properties.resetOnSubmit && this.formState.resetForm());
|
|
27
|
+
}
|
|
28
|
+
register(e, t) {
|
|
29
|
+
this.formState.register(e, t);
|
|
30
|
+
}
|
|
31
|
+
setValue(e, t) {
|
|
32
|
+
this.formState.setValue(e, t);
|
|
33
|
+
}
|
|
34
|
+
getValue(e) {
|
|
35
|
+
return this.formState.getValue(e);
|
|
36
|
+
}
|
|
37
|
+
getError(e) {
|
|
38
|
+
return this.formState.getError(e);
|
|
39
|
+
}
|
|
40
|
+
async validateField(e) {
|
|
41
|
+
return this.formState.validateField(e);
|
|
42
|
+
}
|
|
43
|
+
async validateForm() {
|
|
44
|
+
return this.formState.validateForm();
|
|
45
|
+
}
|
|
46
|
+
resetForm() {
|
|
47
|
+
this.formState.resetForm();
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const e = document.createElement("form");
|
|
51
|
+
return this.properties.className && (e.className = this.properties.className), this.properties.id && (e.id = this.properties.id), e.addEventListener("submit", (t) => {
|
|
52
|
+
t.preventDefault(), this.handleSubmit();
|
|
53
|
+
}), this.properties.children && (Array.isArray(this.properties.children) ? this.properties.children.forEach((t) => {
|
|
54
|
+
typeof t == "string" ? e.appendChild(document.createTextNode(t)) : t && typeof t.render == "function" ? e.appendChild(t.render()) : t instanceof HTMLElement && e.appendChild(t);
|
|
55
|
+
}) : typeof this.properties.children == "string" ? e.appendChild(document.createTextNode(this.properties.children)) : this.properties.children && typeof this.properties.children.render == "function" ? e.appendChild(this.properties.children.render()) : this.properties.children instanceof HTMLElement && e.appendChild(this.properties.children)), e;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
class p {
|
|
59
|
+
constructor(e) {
|
|
60
|
+
this.properties = e;
|
|
61
|
+
const [t, r] = n(
|
|
62
|
+
e.defaultExpanded ?? !0
|
|
63
|
+
);
|
|
64
|
+
this.expanded = t, this.setExpanded = r;
|
|
65
|
+
}
|
|
66
|
+
type = "form-section";
|
|
67
|
+
expanded;
|
|
68
|
+
setExpanded;
|
|
69
|
+
get isExpanded() {
|
|
70
|
+
return this.expanded();
|
|
71
|
+
}
|
|
72
|
+
toggle() {
|
|
73
|
+
this.properties.collapsible && this.setExpanded(!this.expanded());
|
|
74
|
+
}
|
|
75
|
+
expand() {
|
|
76
|
+
this.setExpanded(!0);
|
|
77
|
+
}
|
|
78
|
+
collapse() {
|
|
79
|
+
this.properties.collapsible && this.setExpanded(!1);
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
const e = document.createElement("section");
|
|
83
|
+
if (this.properties.className && (e.className = this.properties.className), this.properties.title) {
|
|
84
|
+
const r = document.createElement("h3");
|
|
85
|
+
if (r.textContent = this.properties.title, r.style.cssText = "margin: 0 0 1rem 0; font-weight: 600;", this.properties.collapsible) {
|
|
86
|
+
r.style.cursor = "pointer", r.addEventListener("click", () => this.toggle());
|
|
87
|
+
const s = document.createElement("span");
|
|
88
|
+
s.textContent = this.expanded() ? " ▼" : " ▶", s.style.cssText = "font-size: 0.8em; margin-left: 0.5rem;", r.appendChild(s), a(() => {
|
|
89
|
+
s.textContent = this.expanded() ? " ▼" : " ▶";
|
|
90
|
+
});
|
|
194
91
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
date: (e) => {
|
|
201
|
-
if (!e) return { valid: !0 };
|
|
202
|
-
const t = new Date(e), r = !Number.isNaN(t.getTime());
|
|
203
|
-
return {
|
|
204
|
-
valid: r,
|
|
205
|
-
...r ? {} : { message: "Please enter a valid date", code: "INVALID_DATE" }
|
|
206
|
-
};
|
|
207
|
-
},
|
|
208
|
-
/**
|
|
209
|
-
* Time validation (HH:MM format)
|
|
210
|
-
*/
|
|
211
|
-
time: (e) => {
|
|
212
|
-
if (!e) return { valid: !0 };
|
|
213
|
-
const r = /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(e);
|
|
214
|
-
return {
|
|
215
|
-
valid: r,
|
|
216
|
-
...r ? {} : { message: "Please enter a valid time (HH:MM)", code: "INVALID_TIME" }
|
|
217
|
-
};
|
|
218
|
-
},
|
|
219
|
-
/**
|
|
220
|
-
* Composite validator - combines multiple validators with AND logic
|
|
221
|
-
*/
|
|
222
|
-
and: (...e) => (t) => {
|
|
223
|
-
for (const r of e) {
|
|
224
|
-
const a = r(t);
|
|
225
|
-
if (!a.valid)
|
|
226
|
-
return a;
|
|
92
|
+
e.appendChild(r);
|
|
93
|
+
}
|
|
94
|
+
if (this.properties.description) {
|
|
95
|
+
const r = document.createElement("p");
|
|
96
|
+
r.textContent = this.properties.description, r.style.cssText = "margin: 0 0 1rem 0; color: #666; font-size: 0.9em;", e.appendChild(r);
|
|
227
97
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const r = e.map((i) => i(t));
|
|
235
|
-
return r.some((i) => i.valid) ? { valid: !0 } : r.find((i) => !i.valid) || { valid: !1, message: "Validation failed", code: "VALIDATION_FAILED" };
|
|
236
|
-
},
|
|
237
|
-
/**
|
|
238
|
-
* Custom validator factory
|
|
239
|
-
*/
|
|
240
|
-
custom: (e) => e
|
|
241
|
-
}, z = {
|
|
242
|
-
name: "@tachui/forms",
|
|
243
|
-
version: "0.1.0",
|
|
244
|
-
async install(e) {
|
|
245
|
-
const t = (r, a, o) => {
|
|
246
|
-
e.registerComponent(r, a, o);
|
|
247
|
-
};
|
|
248
|
-
t("Form", c, {
|
|
249
|
-
category: "forms",
|
|
250
|
-
tags: ["form", "container", "validation"]
|
|
251
|
-
}), t("FormSection", m, {
|
|
252
|
-
category: "forms",
|
|
253
|
-
tags: ["form", "section", "fieldset"]
|
|
254
|
-
}), t("TextField", u, {
|
|
255
|
-
category: "forms",
|
|
256
|
-
tags: ["input", "text", "validation"]
|
|
257
|
-
}), t("EmailField", g, {
|
|
258
|
-
category: "forms",
|
|
259
|
-
tags: ["input", "email", "validation"]
|
|
260
|
-
}), t("PasswordField", f, {
|
|
261
|
-
category: "forms",
|
|
262
|
-
tags: ["input", "password", "validation"]
|
|
263
|
-
}), t("SearchField", p, {
|
|
264
|
-
category: "forms",
|
|
265
|
-
tags: ["input", "search"]
|
|
266
|
-
}), t("URLField", F, {
|
|
267
|
-
category: "forms",
|
|
268
|
-
tags: ["input", "url", "validation"]
|
|
269
|
-
}), t("PhoneField", h, {
|
|
270
|
-
category: "forms",
|
|
271
|
-
tags: ["input", "phone", "validation"]
|
|
272
|
-
}), t("NumberField", v, {
|
|
273
|
-
category: "forms",
|
|
274
|
-
tags: ["input", "number", "numeric", "validation"]
|
|
275
|
-
}), t("CreditCardField", N, {
|
|
276
|
-
category: "forms",
|
|
277
|
-
tags: ["input", "credit-card", "payment", "validation"]
|
|
278
|
-
}), t("SSNField", b, {
|
|
279
|
-
category: "forms",
|
|
280
|
-
tags: ["input", "ssn", "social-security", "validation"]
|
|
281
|
-
}), t("PostalCodeField", I, {
|
|
282
|
-
category: "forms",
|
|
283
|
-
tags: ["input", "postal-code", "zip", "validation"]
|
|
284
|
-
}), t("TextArea", S, {
|
|
285
|
-
category: "forms",
|
|
286
|
-
tags: ["input", "textarea", "multiline"]
|
|
287
|
-
}), t("DateField", V, {
|
|
288
|
-
category: "forms",
|
|
289
|
-
tags: ["input", "date", "calendar", "validation"]
|
|
290
|
-
}), t("TimeField", x, {
|
|
291
|
-
category: "forms",
|
|
292
|
-
tags: ["input", "time", "clock", "validation"]
|
|
293
|
-
}), t("ColorField", y, {
|
|
294
|
-
category: "forms",
|
|
295
|
-
tags: ["input", "color", "picker"]
|
|
296
|
-
}), t("Checkbox", R, {
|
|
297
|
-
category: "forms",
|
|
298
|
-
tags: ["input", "checkbox", "boolean"]
|
|
299
|
-
}), t("Switch", A, {
|
|
300
|
-
category: "forms",
|
|
301
|
-
tags: ["input", "switch", "toggle", "boolean"]
|
|
302
|
-
}), t("CheckboxGroup", C, {
|
|
303
|
-
category: "forms",
|
|
304
|
-
tags: ["input", "checkbox", "group", "multiple"]
|
|
305
|
-
}), t("Radio", T, {
|
|
306
|
-
category: "forms",
|
|
307
|
-
tags: ["input", "radio", "choice"]
|
|
308
|
-
}), t("RadioGroup", P, {
|
|
309
|
-
category: "forms",
|
|
310
|
-
tags: ["input", "radio", "group", "choice"]
|
|
311
|
-
}), t("Select", L, {
|
|
312
|
-
category: "forms",
|
|
313
|
-
tags: ["input", "select", "dropdown", "choice"]
|
|
314
|
-
}), t("MultiSelect", D, {
|
|
315
|
-
category: "forms",
|
|
316
|
-
tags: ["input", "select", "multiple", "choice"]
|
|
317
|
-
}), t("Combobox", E, {
|
|
318
|
-
category: "forms",
|
|
319
|
-
tags: ["input", "combobox", "search", "choice"]
|
|
320
|
-
}), e.registerService("formsConfig", {
|
|
321
|
-
theme: "default",
|
|
322
|
-
validation: {},
|
|
323
|
-
accessibility: {}
|
|
324
|
-
}), e.registerService("validationMessageFormatter", w), e.registerService("createFormState", _), e.registerService("createField", M), e.registerService("createMultiStepFormState", U), e.registerService("ValidationPresets", $), e.registerService("CrossFieldValidators", k), e.registerService("TextFieldFormatters", n), e.registerService("TextFieldParsers", d), e.registerService("TextFieldValidators", O), await G(), console.log("📝 TachUI Forms plugin installed successfully"), console.log(" • 24 form components (including enhanced TextField variants)"), console.log(` • ${H().length} validation rules`), console.log(" • TextField formatters and validators included");
|
|
325
|
-
},
|
|
326
|
-
async uninstall() {
|
|
327
|
-
console.log("📝 TachUI Forms plugin uninstalled");
|
|
98
|
+
const t = document.createElement("div");
|
|
99
|
+
return a(() => {
|
|
100
|
+
t.style.display = this.expanded() ? "block" : "none";
|
|
101
|
+
}), this.properties.children && (Array.isArray(this.properties.children) ? this.properties.children.forEach((r) => {
|
|
102
|
+
typeof r == "string" ? t.appendChild(document.createTextNode(r)) : r && typeof r.render == "function" ? t.appendChild(r.render()) : r instanceof HTMLElement && t.appendChild(r);
|
|
103
|
+
}) : typeof this.properties.children == "string" ? t.appendChild(document.createTextNode(this.properties.children)) : this.properties.children && typeof this.properties.children.render == "function" ? t.appendChild(this.properties.children.render()) : this.properties.children instanceof HTMLElement && t.appendChild(this.properties.children)), e.appendChild(t), e;
|
|
328
104
|
}
|
|
329
|
-
}
|
|
105
|
+
}
|
|
106
|
+
function f(i) {
|
|
107
|
+
return new d(i);
|
|
108
|
+
}
|
|
109
|
+
function m(i) {
|
|
110
|
+
return new p(i);
|
|
111
|
+
}
|
|
112
|
+
function h() {
|
|
113
|
+
return {
|
|
114
|
+
/* TODO: Implement form state hook */
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function u() {
|
|
118
|
+
return {
|
|
119
|
+
/* TODO: Implement form validation hook */
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function S(i) {
|
|
123
|
+
return i.replace(/\D/g, "").replace(/(\d{4})(?=\d)/g, "$1 ");
|
|
124
|
+
}
|
|
125
|
+
function x(i) {
|
|
126
|
+
return i.replace(/\D/g, "").replace(/(\d{3})(\d{3})(\d{4})/, "($1) $2-$3");
|
|
127
|
+
}
|
|
128
|
+
function g(i) {
|
|
129
|
+
return i.replace(/\D/g, "").replace(/(\d{3})(\d{2})(\d{4})/, "$1-$2-$3");
|
|
130
|
+
}
|
|
131
|
+
function C(i) {
|
|
132
|
+
return i.toUpperCase().replace(/[^A-Z0-9]/g, "");
|
|
133
|
+
}
|
|
134
|
+
function F(i, e = "yyyy-MM-dd") {
|
|
135
|
+
return i.toISOString().split("T")[0];
|
|
136
|
+
}
|
|
137
|
+
function E(i) {
|
|
138
|
+
return new Date(i);
|
|
139
|
+
}
|
|
140
|
+
function y(i) {
|
|
141
|
+
return i instanceof Date && !isNaN(i.getTime());
|
|
142
|
+
}
|
|
330
143
|
export {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
144
|
+
_ as Checkbox,
|
|
145
|
+
j as CheckboxGroup,
|
|
146
|
+
D as ColorField,
|
|
147
|
+
Z as Combobox,
|
|
148
|
+
M as CreditCardField,
|
|
149
|
+
ie as CrossFieldValidators,
|
|
150
|
+
w as DateField,
|
|
151
|
+
te as DatePicker,
|
|
152
|
+
A as EmailField,
|
|
153
|
+
d as Form,
|
|
154
|
+
p as FormSection,
|
|
155
|
+
se as FormsComponentValidation,
|
|
156
|
+
ae as FormsValidationError,
|
|
157
|
+
q as MultiSelect,
|
|
158
|
+
L as NumberField,
|
|
159
|
+
P as PasswordField,
|
|
160
|
+
R as PhoneField,
|
|
161
|
+
$ as PostalCodeField,
|
|
162
|
+
B as Radio,
|
|
163
|
+
J as RadioGroup,
|
|
164
|
+
k as SSNField,
|
|
165
|
+
O as SearchField,
|
|
166
|
+
K as Select,
|
|
167
|
+
X as Slider,
|
|
168
|
+
Y as Stepper,
|
|
169
|
+
Q as Switch,
|
|
170
|
+
U as TextArea,
|
|
171
|
+
H as TextField,
|
|
172
|
+
I as TimeField,
|
|
173
|
+
z as URLField,
|
|
174
|
+
ne as VALIDATION_RULES,
|
|
175
|
+
oe as ValidationMessageFormatter,
|
|
176
|
+
de as ValidationPresets,
|
|
177
|
+
pe as ValidationUtils,
|
|
178
|
+
le as createDebouncedValidator,
|
|
179
|
+
N as createField,
|
|
180
|
+
o as createFormState,
|
|
181
|
+
ce as createFormsValidators,
|
|
182
|
+
T as createMultiStepFormState,
|
|
183
|
+
fe as defaultMessageFormatter,
|
|
184
|
+
f as form,
|
|
185
|
+
m as formSection,
|
|
186
|
+
S as formatCreditCard,
|
|
187
|
+
F as formatDate,
|
|
188
|
+
x as formatPhoneNumber,
|
|
189
|
+
C as formatPostalCode,
|
|
190
|
+
g as formatSSN,
|
|
191
|
+
me as getValidationRules,
|
|
192
|
+
y as isValidDate,
|
|
193
|
+
E as parseDate,
|
|
194
|
+
he as registerFormsValidators,
|
|
195
|
+
ue as registerValidationRule,
|
|
196
|
+
Se as unregisterValidationRule,
|
|
197
|
+
h as useFormState,
|
|
198
|
+
u as useFormValidation,
|
|
199
|
+
xe as validateField,
|
|
200
|
+
ge as validateValue,
|
|
201
|
+
Ce as validateValueAsync
|
|
381
202
|
};
|
|
203
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components/form-container/index.ts","../src/utils/index.ts"],"sourcesContent":["/**\n * Form Container Components\n *\n * Core form structure and state management components\n */\n\nimport { createSignal, createComputed } from '@tachui/core'\nimport { createFormState } from '../../state'\nimport type { FormState, FormSubmitHandler, FieldValidation } from '../../types'\n\nexport interface FormProps {\n onSubmit?: FormSubmitHandler\n validation?: Record<string, FieldValidation>\n initialValues?: Record<string, any>\n children?: any\n className?: string\n id?: string\n resetOnSubmit?: boolean\n validateOnSubmit?: boolean\n [key: string]: any\n}\n\nexport interface FormSectionProps {\n title?: string\n description?: string\n children?: any\n className?: string\n collapsible?: boolean\n defaultExpanded?: boolean\n [key: string]: any\n}\n\nexport class Form {\n readonly type = 'form-container'\n private formState: ReturnType<typeof createFormState>\n\n constructor(public readonly properties: FormProps) {\n this.formState = createFormState(properties.initialValues || {})\n\n // Register field validations\n if (properties.validation) {\n Object.entries(properties.validation).forEach(\n ([fieldName, validation]) => {\n this.formState.register(fieldName, validation)\n }\n )\n }\n }\n\n get state(): FormState {\n return this.formState.state\n }\n\n async handleSubmit(): Promise<void> {\n if (this.properties.validateOnSubmit !== false) {\n const isValid = await this.formState.validateForm()\n if (!isValid) {\n return\n }\n }\n\n if (this.properties.onSubmit) {\n await this.properties.onSubmit(\n this.formState.watch(),\n this.formState.state\n )\n }\n\n if (this.properties.resetOnSubmit) {\n this.formState.resetForm()\n }\n }\n\n register(fieldName: string, validation?: FieldValidation): void {\n this.formState.register(fieldName, validation)\n }\n\n setValue(fieldName: string, value: any): void {\n this.formState.setValue(fieldName, value)\n }\n\n getValue(fieldName: string): any {\n return this.formState.getValue(fieldName)\n }\n\n getError(fieldName: string): string | undefined {\n return this.formState.getError(fieldName)\n }\n\n async validateField(fieldName: string): Promise<boolean> {\n return this.formState.validateField(fieldName)\n }\n\n async validateForm(): Promise<boolean> {\n return this.formState.validateForm()\n }\n\n resetForm(): void {\n this.formState.resetForm()\n }\n\n render(): HTMLElement {\n const element = document.createElement('form')\n\n // Set form attributes\n if (this.properties.className) {\n element.className = this.properties.className\n }\n if (this.properties.id) {\n element.id = this.properties.id\n }\n\n // Prevent default form submission\n element.addEventListener('submit', e => {\n e.preventDefault()\n this.handleSubmit()\n })\n\n // Add children if provided\n if (this.properties.children) {\n if (Array.isArray(this.properties.children)) {\n this.properties.children.forEach(child => {\n if (typeof child === 'string') {\n element.appendChild(document.createTextNode(child))\n } else if (child && typeof child.render === 'function') {\n element.appendChild(child.render())\n } else if (child instanceof HTMLElement) {\n element.appendChild(child)\n }\n })\n } else if (typeof this.properties.children === 'string') {\n element.appendChild(document.createTextNode(this.properties.children))\n } else if (\n this.properties.children &&\n typeof this.properties.children.render === 'function'\n ) {\n element.appendChild(this.properties.children.render())\n } else if (this.properties.children instanceof HTMLElement) {\n element.appendChild(this.properties.children)\n }\n }\n\n return element\n }\n}\n\nexport class FormSection {\n readonly type = 'form-section'\n private expanded: () => boolean\n private setExpanded: (value: boolean) => void\n\n constructor(public readonly properties: FormSectionProps) {\n const [expandedSignal, setExpandedSignal] = createSignal(\n properties.defaultExpanded ?? true\n )\n this.expanded = expandedSignal\n this.setExpanded = setExpandedSignal\n }\n\n get isExpanded(): boolean {\n return this.expanded()\n }\n\n toggle(): void {\n if (this.properties.collapsible) {\n this.setExpanded(!this.expanded())\n }\n }\n\n expand(): void {\n this.setExpanded(true)\n }\n\n collapse(): void {\n if (this.properties.collapsible) {\n this.setExpanded(false)\n }\n }\n\n render(): HTMLElement {\n const section = document.createElement('section')\n\n if (this.properties.className) {\n section.className = this.properties.className\n }\n\n // Add title if provided\n if (this.properties.title) {\n const title = document.createElement('h3')\n title.textContent = this.properties.title\n title.style.cssText = 'margin: 0 0 1rem 0; font-weight: 600;'\n\n if (this.properties.collapsible) {\n title.style.cursor = 'pointer'\n title.addEventListener('click', () => this.toggle())\n\n const indicator = document.createElement('span')\n indicator.textContent = this.expanded() ? ' ▼' : ' ▶'\n indicator.style.cssText = 'font-size: 0.8em; margin-left: 0.5rem;'\n title.appendChild(indicator)\n\n // Update indicator when expanded state changes\n createComputed(() => {\n indicator.textContent = this.expanded() ? ' ▼' : ' ▶'\n })\n }\n\n section.appendChild(title)\n }\n\n // Add description if provided\n if (this.properties.description) {\n const description = document.createElement('p')\n description.textContent = this.properties.description\n description.style.cssText =\n 'margin: 0 0 1rem 0; color: #666; font-size: 0.9em;'\n section.appendChild(description)\n }\n\n // Add content container\n const content = document.createElement('div')\n\n // Handle collapsible behavior\n createComputed(() => {\n content.style.display = this.expanded() ? 'block' : 'none'\n })\n\n // Add children if provided\n if (this.properties.children) {\n if (Array.isArray(this.properties.children)) {\n this.properties.children.forEach(child => {\n if (typeof child === 'string') {\n content.appendChild(document.createTextNode(child))\n } else if (child && typeof child.render === 'function') {\n content.appendChild(child.render())\n } else if (child instanceof HTMLElement) {\n content.appendChild(child)\n }\n })\n } else if (typeof this.properties.children === 'string') {\n content.appendChild(document.createTextNode(this.properties.children))\n } else if (\n this.properties.children &&\n typeof this.properties.children.render === 'function'\n ) {\n content.appendChild(this.properties.children.render())\n } else if (this.properties.children instanceof HTMLElement) {\n content.appendChild(this.properties.children)\n }\n }\n\n section.appendChild(content)\n return section\n }\n}\n\nexport function form(props: FormProps): Form {\n return new Form(props)\n}\n\nexport function formSection(props: FormSectionProps): FormSection {\n return new FormSection(props)\n}\n\n// Re-export types for convenience\nexport type { FormState, FormSubmitHandler, FieldValidation }\n","/**\n * Form Utilities\n *\n * Shared utilities for form handling, formatting, and validation\n */\n\n// TODO: Migrate actual utilities from @tachui/forms\n// Placeholder implementation for unified package structure\n\n// Form state utilities (stubs)\nexport function useFormState() {\n return {\n /* TODO: Implement form state hook */\n }\n}\n\nexport function useFormValidation() {\n return {\n /* TODO: Implement form validation hook */\n }\n}\n\n// Formatting utilities (stubs)\nexport function formatCreditCard(value: string): string {\n return value.replace(/\\D/g, '').replace(/(\\d{4})(?=\\d)/g, '$1 ')\n}\n\nexport function formatPhoneNumber(value: string): string {\n return value.replace(/\\D/g, '').replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')\n}\n\nexport function formatSSN(value: string): string {\n return value.replace(/\\D/g, '').replace(/(\\d{3})(\\d{2})(\\d{4})/, '$1-$2-$3')\n}\n\nexport function formatPostalCode(value: string): string {\n return value.toUpperCase().replace(/[^A-Z0-9]/g, '')\n}\n\n// Date utilities (stubs)\nexport function formatDate(date: Date, _format: string = 'yyyy-MM-dd'): string {\n return date.toISOString().split('T')[0]\n}\n\nexport function parseDate(value: string): Date {\n return new Date(value)\n}\n\nexport function isValidDate(date: Date): boolean {\n return date instanceof Date && !isNaN(date.getTime())\n}\n\n// Type aliases\nexport type FormStateManager = any\nexport type FormatterFunction = (value: string) => string\nexport type DateFormat = string\nexport type FormUtilOptions = any\n"],"names":["Form","properties","createFormState","fieldName","validation","value","element","e","child","FormSection","expandedSignal","setExpandedSignal","createSignal","section","title","indicator","createComputed","description","content","form","props","formSection","useFormState","useFormValidation","formatCreditCard","formatPhoneNumber","formatSSN","formatPostalCode","formatDate","date","_format","parseDate","isValidDate"],"mappings":";;;;;;;;AAgCO,MAAMA,EAAK;AAAA,EAIhB,YAA4BC,GAAuB;AAAvB,SAAA,aAAAA,GAC1B,KAAK,YAAYC,EAAgBD,EAAW,iBAAiB,CAAA,CAAE,GAG3DA,EAAW,cACb,OAAO,QAAQA,EAAW,UAAU,EAAE;AAAA,MACpC,CAAC,CAACE,GAAWC,CAAU,MAAM;AAC3B,aAAK,UAAU,SAASD,GAAWC,CAAU;AAAA,MAC/C;AAAA,IAAA;AAAA,EAGN;AAAA,EAdS,OAAO;AAAA,EACR;AAAA,EAeR,IAAI,QAAmB;AACrB,WAAO,KAAK,UAAU;AAAA,EACxB;AAAA,EAEA,MAAM,eAA8B;AAClC,IAAI,KAAK,WAAW,qBAAqB,MAEnC,CADY,MAAM,KAAK,UAAU,aAAA,MAMnC,KAAK,WAAW,YAClB,MAAM,KAAK,WAAW;AAAA,MACpB,KAAK,UAAU,MAAA;AAAA,MACf,KAAK,UAAU;AAAA,IAAA,GAIf,KAAK,WAAW,iBAClB,KAAK,UAAU,UAAA;AAAA,EAEnB;AAAA,EAEA,SAASD,GAAmBC,GAAoC;AAC9D,SAAK,UAAU,SAASD,GAAWC,CAAU;AAAA,EAC/C;AAAA,EAEA,SAASD,GAAmBE,GAAkB;AAC5C,SAAK,UAAU,SAASF,GAAWE,CAAK;AAAA,EAC1C;AAAA,EAEA,SA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AE,EAAE,QAAQ,yBAAyB,YAAY;AAC/E;AAEO,SAASqB,EAAUrB,GAAuB;AAC/C,SAAOA,EAAM,QAAQ,OAAO,EAAE,EAAE,QAAQ,yBAAyB,UAAU;AAC7E;AAEO,SAASsB,EAAiBtB,GAAuB;AACtD,SAAOA,EAAM,YAAA,EAAc,QAAQ,cAAc,EAAE;AACrD;AAGO,SAASuB,EAAWC,GAAYC,IAAkB,cAAsB;AAC7E,SAAOD,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC;AACxC;AAEO,SAASE,EAAU1B,GAAqB;AAC7C,SAAO,IAAI,KAAKA,CAAK;AACvB;AAEO,SAAS2B,EAAYH,GAAqB;AAC/C,SAAOA,aAAgB,QAAQ,CAAC,MAAMA,EAAK,SAAS;AACtD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAEV,eAAe,EAGf,aAAa,EAEd,MAAM,UAAU,CAAA;AAmEjB;;GAEG;AACH,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAEV,eAAe,EAGf,aAAa,EAEd,MAAM,UAAU,CAAA;AAmEjB;;GAEG;AACH,wBAAgB,eAAe,CAC7B,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACtC,aAAa,CAgOf;AAgCD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,GAAG,EACjC,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,CAAC,EAChB,UAAU,CAAC,EAAE,eAAe,GAC3B;IACD,KAAK,EAAE,MAAM,CAAC,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,KAAK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