@overgaming/valiform 0.1.4

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.
Files changed (66) hide show
  1. package/README.md +0 -0
  2. package/dist/index.d.ts +8 -0
  3. package/dist/index.js +948 -0
  4. package/dist/index.umd.cjs +1 -0
  5. package/dist/src/components/Field.vue.d.ts +56 -0
  6. package/dist/src/components/Form.vue.d.ts +39 -0
  7. package/dist/src/components/__tests__/Field.test.d.ts +1 -0
  8. package/dist/src/components/__tests__/Form.test.d.ts +1 -0
  9. package/dist/src/components/__tests__/components/CustomInput.vue.d.ts +9 -0
  10. package/dist/src/components/__tests__/components/CustomSelect.vue.d.ts +19 -0
  11. package/dist/src/components/__tests__/components/ExampleField.vue.d.ts +53 -0
  12. package/dist/src/components/__tests__/components/ExampleForm.vue.d.ts +40 -0
  13. package/dist/src/components/__tests__/components/ExampleFormWithNestedFields.vue.d.ts +51 -0
  14. package/dist/src/composables/useFormContext.d.ts +1 -0
  15. package/dist/src/composables/useLocale.d.ts +2 -0
  16. package/dist/src/composables/useValidation.d.ts +14 -0
  17. package/dist/src/context/useFieldContext.d.ts +5 -0
  18. package/dist/src/context/useFormContext.d.ts +5 -0
  19. package/dist/src/context/useFormStateContext.d.ts +5 -0
  20. package/dist/src/context/useLocaleContext.d.ts +4 -0
  21. package/dist/src/locales/en.d.ts +2 -0
  22. package/dist/src/locales/es.d.ts +2 -0
  23. package/dist/src/plugins/FormsPlugin.d.ts +5 -0
  24. package/dist/src/test/setup.d.ts +1 -0
  25. package/dist/src/types.d.ts +84 -0
  26. package/dist/src/utils/parseRules.d.ts +2 -0
  27. package/dist/src/utils/validation.d.ts +1 -0
  28. package/dist/src/utils/valueByPath.d.ts +2 -0
  29. package/dist/src/validation/index.d.ts +3 -0
  30. package/dist/src/validation/registry.d.ts +5 -0
  31. package/dist/src/validation/rules/accepted.d.ts +2 -0
  32. package/dist/src/validation/rules/alpha.d.ts +2 -0
  33. package/dist/src/validation/rules/alphaSpaces.d.ts +2 -0
  34. package/dist/src/validation/rules/alphanumeric.d.ts +2 -0
  35. package/dist/src/validation/rules/between.d.ts +2 -0
  36. package/dist/src/validation/rules/confirm.d.ts +2 -0
  37. package/dist/src/validation/rules/containsAlpha.d.ts +2 -0
  38. package/dist/src/validation/rules/containsAlphaSpaces.d.ts +2 -0
  39. package/dist/src/validation/rules/containsAlphanumeric.d.ts +2 -0
  40. package/dist/src/validation/rules/containsLowercase.d.ts +2 -0
  41. package/dist/src/validation/rules/containsNumeric.d.ts +2 -0
  42. package/dist/src/validation/rules/containsSymbol.d.ts +2 -0
  43. package/dist/src/validation/rules/containsUppercase.d.ts +2 -0
  44. package/dist/src/validation/rules/dateAfter.d.ts +2 -0
  45. package/dist/src/validation/rules/dateAfterOrEqual.d.ts +2 -0
  46. package/dist/src/validation/rules/dateBefore.d.ts +2 -0
  47. package/dist/src/validation/rules/dateBeforeOrEqual.d.ts +2 -0
  48. package/dist/src/validation/rules/dateBetween.d.ts +2 -0
  49. package/dist/src/validation/rules/dateFormat.d.ts +2 -0
  50. package/dist/src/validation/rules/email.d.ts +2 -0
  51. package/dist/src/validation/rules/endsWith.d.ts +2 -0
  52. package/dist/src/validation/rules/index.d.ts +34 -0
  53. package/dist/src/validation/rules/is.d.ts +2 -0
  54. package/dist/src/validation/rules/length.d.ts +2 -0
  55. package/dist/src/validation/rules/lowercase.d.ts +2 -0
  56. package/dist/src/validation/rules/matches.d.ts +2 -0
  57. package/dist/src/validation/rules/max.d.ts +2 -0
  58. package/dist/src/validation/rules/min.d.ts +2 -0
  59. package/dist/src/validation/rules/not.d.ts +2 -0
  60. package/dist/src/validation/rules/number.d.ts +2 -0
  61. package/dist/src/validation/rules/required.d.ts +2 -0
  62. package/dist/src/validation/rules/startsWith.d.ts +2 -0
  63. package/dist/src/validation/rules/symbol.d.ts +2 -0
  64. package/dist/src/validation/rules/uppercase.d.ts +2 -0
  65. package/dist/src/validation/rules/url.d.ts +2 -0
  66. package/package.json +60 -0
@@ -0,0 +1,34 @@
1
+ export { accepted } from './accepted';
2
+ export { alpha } from './alpha';
3
+ export { alphanumeric } from './alphanumeric';
4
+ export { alphaSpaces } from './alphaSpaces';
5
+ export { between } from './between';
6
+ export { confirm } from './confirm';
7
+ export { containsAlpha } from './containsAlpha';
8
+ export { containsAlphanumeric } from './containsAlphanumeric';
9
+ export { containsAlphaSpaces } from './containsAlphaSpaces';
10
+ export { containsLowercase } from './containsLowercase';
11
+ export { containsNumeric } from './containsNumeric';
12
+ export { containsSymbol } from './containsSymbol';
13
+ export { containsUppercase } from './containsUppercase';
14
+ export { dateAfter } from './dateAfter';
15
+ export { dateAfterOrEqual } from './dateAfterOrEqual';
16
+ export { dateBefore } from './dateBefore';
17
+ export { dateBeforeOrEqual } from './dateBeforeOrEqual';
18
+ export { dateBetween } from './dateBetween';
19
+ export { dateFormat } from './dateFormat';
20
+ export { email } from './email';
21
+ export { endsWith } from './endsWith';
22
+ export { is } from './is';
23
+ export { length } from './length';
24
+ export { lowercase } from './lowercase';
25
+ export { matches } from './matches';
26
+ export { max } from './max';
27
+ export { min } from './min';
28
+ export { not } from './not';
29
+ export { number } from './number';
30
+ export { required } from './required';
31
+ export { startsWith } from './startsWith';
32
+ export { symbol } from './symbol';
33
+ export { uppercase } from './uppercase';
34
+ export { url } from './url';
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function is(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function length(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function lowercase(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function matches(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function max(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function min(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function not(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function number(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function required(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function startsWith(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function symbol(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function uppercase(value: unknown, options?: Partial<RuleOptions>): true | string;
@@ -0,0 +1,2 @@
1
+ import type { RuleOptions } from '../../types';
2
+ export declare function url(value: unknown, options?: Partial<RuleOptions>): true | string;
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@overgaming/valiform",
3
+ "version": "0.1.4",
4
+ "description": "Vue 3 form validation library",
5
+ "keywords": [
6
+ "form",
7
+ "nuxt",
8
+ "validation",
9
+ "vue",
10
+ "vue3"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "OverGaming",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "type": "module",
18
+ "main": "./dist/index.cjs",
19
+ "module": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "exports": {
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js",
25
+ "require": "./dist/index.cjs"
26
+ }
27
+ },
28
+ "scripts": {
29
+ "build": "vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist",
30
+ "dev": "vite build --watch",
31
+ "test": "vitest",
32
+ "test:run": "vitest run",
33
+ "lint": "oxlint src index.ts",
34
+ "lint:fix": "oxlint src index.ts --fix",
35
+ "format": "oxfmt .",
36
+ "format:check": "oxfmt . --check",
37
+ "typecheck": "vue-tsc --noEmit",
38
+ "prepublishOnly": "npm run build"
39
+ },
40
+ "devDependencies": {
41
+ "@testing-library/jest-dom": "^6.9.1",
42
+ "@testing-library/user-event": "^14.6.1",
43
+ "@testing-library/vue": "^8.1.0",
44
+ "@vitejs/plugin-vue": "^5.0.0",
45
+ "@vueuse/core": "^14.2.1",
46
+ "jsdom": "^28.1.0",
47
+ "oxfmt": "^0.36.0",
48
+ "oxlint": "^1.51.0",
49
+ "typescript": "^5.0.0",
50
+ "vite": "^5.0.0",
51
+ "vite-plugin-dts": "^3.0.0",
52
+ "vitest": "^4.0.18",
53
+ "vue": "^3.4.0",
54
+ "vue-tsc": "^2.0.0"
55
+ },
56
+ "peerDependencies": {
57
+ "@vueuse/core": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
58
+ "vue": "^3.0.0"
59
+ }
60
+ }