@tachui/forms 0.7.0-alpha1 → 0.8.0-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 +136 -0
- 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/{state → components/advanced}/index.js.map +1 -1
- 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/{index.js.map → date-picker/index.js.map} +1 -1
- 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/index-D3WfkqVv.js +249 -0
- 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 +196 -376
- package/dist/index.js.map +1 -1
- 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 +687 -17
- package/dist/validation/index.js.map +1 -1
- package/package.json +54 -41
- 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/Form-ueYEcSg1.cjs +0 -2
- package/dist/Form-ueYEcSg1.cjs.map +0 -1
- package/dist/Form-ylAr3o_e.js +0 -376
- package/dist/Form-ylAr3o_e.js.map +0 -1
- package/dist/components/Form.d.ts +0 -76
- package/dist/components/Form.d.ts.map +0 -1
- package/dist/components/index.cjs +0 -2
- package/dist/components/index.cjs.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 -31
- 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/forms-complex-BiQsZZlT.js +0 -361
- package/dist/forms-complex-BiQsZZlT.js.map +0 -1
- package/dist/forms-complex-DLEnXXJ5.cjs +0 -2
- package/dist/forms-complex-DLEnXXJ5.cjs.map +0 -1
- package/dist/forms-core-B1bx1drO.js +0 -839
- package/dist/forms-core-B1bx1drO.js.map +0 -1
- package/dist/forms-core-W_JGVLAI.cjs +0 -9
- package/dist/forms-core-W_JGVLAI.cjs.map +0 -1
- package/dist/forms-inputs-6QdeMWFk.js +0 -1075
- package/dist/forms-inputs-6QdeMWFk.js.map +0 -1
- package/dist/forms-inputs-DQ5QI_SU.cjs +0 -2
- package/dist/forms-inputs-DQ5QI_SU.cjs.map +0 -1
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
- package/dist/state/index.cjs +0 -2
- package/dist/state/index.cjs.map +0 -1
- package/dist/state/index.js +0 -9
- package/dist/utils/validators.d.ts +0 -101
- package/dist/utils/validators.d.ts.map +0 -1
- package/dist/validation/index.cjs +0 -2
- package/dist/validation/index.cjs.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
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TextField Validators
|
|
3
|
-
*
|
|
4
|
-
* Pre-built validation functions for common input types.
|
|
5
|
-
* Migrated and enhanced from core TextField to forms plugin.
|
|
6
|
-
*/
|
|
7
|
-
import type { ValidationResult } from '../types';
|
|
8
|
-
/**
|
|
9
|
-
* Validation function type
|
|
10
|
-
*/
|
|
11
|
-
export type ValidationFunction = (value: string) => ValidationResult;
|
|
12
|
-
/**
|
|
13
|
-
* Common validation functions
|
|
14
|
-
*/
|
|
15
|
-
export declare const TextFieldValidators: {
|
|
16
|
-
/**
|
|
17
|
-
* Email validation
|
|
18
|
-
*/
|
|
19
|
-
email: (value: string) => ValidationResult;
|
|
20
|
-
/**
|
|
21
|
-
* Phone number validation
|
|
22
|
-
*/
|
|
23
|
-
phone: (value: string) => ValidationResult;
|
|
24
|
-
/**
|
|
25
|
-
* URL validation
|
|
26
|
-
*/
|
|
27
|
-
url: (value: string) => ValidationResult;
|
|
28
|
-
/**
|
|
29
|
-
* Minimum length validation
|
|
30
|
-
*/
|
|
31
|
-
minLength: (min: number) => (value: string) => ValidationResult;
|
|
32
|
-
/**
|
|
33
|
-
* Maximum length validation
|
|
34
|
-
*/
|
|
35
|
-
maxLength: (max: number) => (value: string) => ValidationResult;
|
|
36
|
-
/**
|
|
37
|
-
* Required field validation
|
|
38
|
-
*/
|
|
39
|
-
required: (value: string) => ValidationResult;
|
|
40
|
-
/**
|
|
41
|
-
* Pattern validation
|
|
42
|
-
*/
|
|
43
|
-
pattern: (regex: RegExp, message?: string) => (value: string) => ValidationResult;
|
|
44
|
-
/**
|
|
45
|
-
* Numeric validation
|
|
46
|
-
*/
|
|
47
|
-
numeric: (value: string) => ValidationResult;
|
|
48
|
-
/**
|
|
49
|
-
* Integer validation
|
|
50
|
-
*/
|
|
51
|
-
integer: (value: string) => ValidationResult;
|
|
52
|
-
/**
|
|
53
|
-
* Minimum value validation
|
|
54
|
-
*/
|
|
55
|
-
min: (minValue: number) => (value: string) => ValidationResult;
|
|
56
|
-
/**
|
|
57
|
-
* Maximum value validation
|
|
58
|
-
*/
|
|
59
|
-
max: (maxValue: number) => (value: string) => ValidationResult;
|
|
60
|
-
/**
|
|
61
|
-
* Range validation
|
|
62
|
-
*/
|
|
63
|
-
range: (min: number, max: number) => (value: string) => ValidationResult;
|
|
64
|
-
/**
|
|
65
|
-
* Credit card validation (Luhn algorithm)
|
|
66
|
-
*/
|
|
67
|
-
creditCard: (value: string) => ValidationResult;
|
|
68
|
-
/**
|
|
69
|
-
* Social Security Number validation
|
|
70
|
-
*/
|
|
71
|
-
ssn: (value: string) => ValidationResult;
|
|
72
|
-
/**
|
|
73
|
-
* US ZIP code validation
|
|
74
|
-
*/
|
|
75
|
-
zipCode: (value: string) => ValidationResult;
|
|
76
|
-
/**
|
|
77
|
-
* Strong password validation
|
|
78
|
-
*/
|
|
79
|
-
strongPassword: (value: string) => ValidationResult;
|
|
80
|
-
/**
|
|
81
|
-
* Date validation (YYYY-MM-DD format)
|
|
82
|
-
*/
|
|
83
|
-
date: (value: string) => ValidationResult;
|
|
84
|
-
/**
|
|
85
|
-
* Time validation (HH:MM format)
|
|
86
|
-
*/
|
|
87
|
-
time: (value: string) => ValidationResult;
|
|
88
|
-
/**
|
|
89
|
-
* Composite validator - combines multiple validators with AND logic
|
|
90
|
-
*/
|
|
91
|
-
and: (...validators: ValidationFunction[]) => (value: string) => ValidationResult;
|
|
92
|
-
/**
|
|
93
|
-
* Composite validator - combines multiple validators with OR logic
|
|
94
|
-
*/
|
|
95
|
-
or: (...validators: ValidationFunction[]) => (value: string) => ValidationResult;
|
|
96
|
-
/**
|
|
97
|
-
* Custom validator factory
|
|
98
|
-
*/
|
|
99
|
-
custom: (validateFn: (value: string) => ValidationResult) => ValidationFunction;
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,CAAA;AAEpE;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;OAEG;mBACY,MAAM,KAAG,gBAAgB;IAWxC;;OAEG;mBACY,MAAM,KAAG,gBAAgB;IAYxC;;OAEG;iBACU,MAAM,KAAG,gBAAgB;IAWtC;;OAEG;qBAEK,MAAM,MACX,OAAO,MAAM,KAAG,gBAAgB;IAQnC;;OAEG;qBAEK,MAAM,MACX,OAAO,MAAM,KAAG,gBAAgB;IAQnC;;OAEG;sBACe,MAAM,KAAG,gBAAgB;IAQ3C;;OAEG;qBAEO,MAAM,YAAW,MAAM,MAC9B,OAAO,MAAM,KAAG,gBAAgB;IAUnC;;OAEG;qBACc,MAAM,KAAG,gBAAgB;IAU1C;;OAEG;qBACc,MAAM,KAAG,gBAAgB;IAW1C;;OAEG;oBAEU,MAAM,MAChB,OAAO,MAAM,KAAG,gBAAgB;IAWnC;;OAEG;oBAEU,MAAM,MAChB,OAAO,MAAM,KAAG,gBAAgB;IAWnC;;OAEG;iBAEK,MAAM,OAAO,MAAM,MACxB,OAAO,MAAM,KAAG,gBAAgB;IAanC;;OAEG;wBACiB,MAAM,KAAG,gBAAgB;IAwC7C;;OAEG;iBACU,MAAM,KAAG,gBAAgB;IActC;;OAEG;qBACc,MAAM,KAAG,gBAAgB;IAW1C;;OAEG;4BACqB,MAAM,KAAG,gBAAgB;IA4BjD;;OAEG;kBACW,MAAM,KAAG,gBAAgB;IAWvC;;OAEG;kBACW,MAAM,KAAG,gBAAgB;IAWvC;;OAEG;yBAEe,kBAAkB,EAAE,MACnC,OAAO,MAAM,KAAG,gBAAgB;IAUnC;;OAEG;wBAEe,kBAAkB,EAAE,MACnC,OAAO,MAAM,KAAG,gBAAgB;IAanC;;OAEG;yBACkB,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,KAAG,kBAAkB;CAC9E,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../forms-core-W_JGVLAI.cjs");exports.CrossFieldValidators=a.CrossFieldValidators;exports.FormsComponentValidation=a.FormsComponentValidation;exports.FormsValidationError=a.FormsValidationError;exports.VALIDATION_RULES=a.VALIDATION_RULES;exports.ValidationMessageFormatter=a.ValidationMessageFormatter;exports.ValidationPresets=a.ValidationPresets;exports.ValidationUtils=a.ValidationUtils;exports.createDebouncedValidator=a.createDebouncedValidator;exports.createFormsValidators=a.createFormsValidators;exports.defaultMessageFormatter=a.defaultMessageFormatter;exports.getValidationRules=a.getValidationRules;exports.registerFormsValidators=a.registerFormsValidators;exports.registerValidationRule=a.registerValidationRule;exports.unregisterValidationRule=a.unregisterValidationRule;exports.validateField=a.validateField;exports.validateValue=a.validateValue;exports.validateValueAsync=a.validateValueAsync;
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|