remix-validated-form 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/browser/ValidatedForm.d.ts +11 -0
  2. package/browser/ValidatedForm.js +69 -0
  3. package/browser/hooks.d.ts +8 -0
  4. package/browser/hooks.js +17 -0
  5. package/{src/index.ts → browser/index.d.ts} +0 -0
  6. package/browser/index.js +5 -0
  7. package/browser/internal/formContext.d.ts +13 -0
  8. package/browser/internal/formContext.js +7 -0
  9. package/browser/internal/util.d.ts +3 -0
  10. package/browser/internal/util.js +19 -0
  11. package/browser/server.d.ts +2 -0
  12. package/browser/server.js +2 -0
  13. package/browser/validation/types.d.ts +15 -0
  14. package/browser/validation/types.js +1 -0
  15. package/browser/validation/validation.test.d.ts +1 -0
  16. package/browser/validation/validation.test.js +56 -0
  17. package/browser/validation/withYup.d.ts +3 -0
  18. package/browser/validation/withYup.js +34 -0
  19. package/build/ValidatedForm.d.ts +11 -0
  20. package/build/ValidatedForm.js +76 -0
  21. package/build/hooks.d.ts +8 -0
  22. package/build/hooks.js +23 -0
  23. package/build/index.d.ts +5 -0
  24. package/build/index.js +17 -0
  25. package/build/internal/formContext.d.ts +13 -0
  26. package/build/internal/formContext.js +10 -0
  27. package/build/internal/util.d.ts +3 -0
  28. package/build/internal/util.js +24 -0
  29. package/build/server.d.ts +2 -0
  30. package/build/server.js +6 -0
  31. package/build/validation/types.d.ts +15 -0
  32. package/build/validation/types.js +2 -0
  33. package/build/validation/validation.test.d.ts +1 -0
  34. package/build/validation/validation.test.js +77 -0
  35. package/build/validation/withYup.d.ts +3 -0
  36. package/build/validation/withYup.js +38 -0
  37. package/package.json +5 -1
  38. package/.eslintrc.js +0 -46
  39. package/.github/workflows/test.yml +0 -35
  40. package/.husky/pre-commit +0 -4
  41. package/src/ValidatedForm.tsx +0 -130
  42. package/src/hooks.ts +0 -27
  43. package/src/internal/formContext.ts +0 -18
  44. package/src/internal/util.ts +0 -23
  45. package/src/server.ts +0 -5
  46. package/src/validation/types.ts +0 -12
  47. package/src/validation/validation.test.ts +0 -76
  48. package/src/validation/withYup.ts +0 -37
  49. package/test-app/README.md +0 -53
  50. package/test-app/app/components/Input.tsx +0 -24
  51. package/test-app/app/components/SubmitButton.tsx +0 -18
  52. package/test-app/app/entry.client.tsx +0 -4
  53. package/test-app/app/entry.server.tsx +0 -21
  54. package/test-app/app/root.tsx +0 -246
  55. package/test-app/app/routes/default-values.tsx +0 -34
  56. package/test-app/app/routes/index.tsx +0 -100
  57. package/test-app/app/routes/noscript.tsx +0 -10
  58. package/test-app/app/routes/submission.alt.tsx +0 -6
  59. package/test-app/app/routes/submission.fetcher.tsx +0 -6
  60. package/test-app/app/routes/submission.tsx +0 -47
  61. package/test-app/app/routes/validation.tsx +0 -40
  62. package/test-app/app/styles/dark.css +0 -7
  63. package/test-app/app/styles/demos/about.css +0 -26
  64. package/test-app/app/styles/demos/remix.css +0 -120
  65. package/test-app/app/styles/global.css +0 -98
  66. package/test-app/cypress/fixtures/example.json +0 -5
  67. package/test-app/cypress/integration/default-values.ts +0 -15
  68. package/test-app/cypress/integration/sanity.ts +0 -19
  69. package/test-app/cypress/integration/submission.ts +0 -26
  70. package/test-app/cypress/integration/validation.ts +0 -70
  71. package/test-app/cypress/plugins/config.ts +0 -38
  72. package/test-app/cypress/plugins/index.ts +0 -9
  73. package/test-app/cypress/support/commands/index.ts +0 -13
  74. package/test-app/cypress/support/commands/types.d.ts +0 -11
  75. package/test-app/cypress/support/index.ts +0 -20
  76. package/test-app/cypress/tsconfig.json +0 -11
  77. package/test-app/cypress.json +0 -3
  78. package/test-app/package-lock.json +0 -11675
  79. package/test-app/package.json +0 -40
  80. package/test-app/public/favicon.ico +0 -0
  81. package/test-app/remix.config.js +0 -10
  82. package/test-app/remix.env.d.ts +0 -2
  83. package/test-app/tsconfig.json +0 -18
  84. package/tsconfig.json +0 -15
@@ -1,40 +0,0 @@
1
- {
2
- "private": true,
3
- "name": "remix-app-template",
4
- "description": "",
5
- "license": "",
6
- "scripts": {
7
- "build": "remix build",
8
- "dev": "start-server-and-test dev:remix http-get://localhost:3000 cy:open",
9
- "test": "start-server-and-test dev:remix http-get://localhost:3000 cy:run",
10
- "dev:remix": "remix dev",
11
- "cy:open": "cypress open",
12
- "cy:run": "cypress run",
13
- "postinstall": "remix setup node",
14
- "start": "remix-serve build"
15
- },
16
- "dependencies": {
17
- "@remix-run/react": "^1.0.5",
18
- "@remix-run/serve": "^1.0.5",
19
- "@remix-run/server-runtime": "^1.0.5",
20
- "react": "^17.0.2",
21
- "react-dom": "^17.0.2",
22
- "remix": "^1.0.5",
23
- "yup": "^0.32.11"
24
- },
25
- "devDependencies": {
26
- "@remix-run/dev": "^1.0.5",
27
- "@testing-library/cypress": "^8.0.2",
28
- "@types/react": "^17.0.24",
29
- "@types/react-dom": "^17.0.9",
30
- "cypress": "^9.1.0",
31
- "har-validator": "^5.1.5",
32
- "start-server-and-test": "^1.14.0",
33
- "tiny-invariant": "^1.2.0",
34
- "typescript": "^4.1.2"
35
- },
36
- "engines": {
37
- "node": ">=14"
38
- },
39
- "sideEffects": false
40
- }
Binary file
@@ -1,10 +0,0 @@
1
- /**
2
- * @type {import('@remix-run/dev/config').AppConfig}
3
- */
4
- module.exports = {
5
- appDirectory: "app",
6
- browserBuildDirectory: "public/build",
7
- publicPath: "/build/",
8
- serverBuildDirectory: "build",
9
- devServerPort: 8002,
10
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="@remix-run/dev" />
2
- /// <reference types="@remix-run/node/globals" />
@@ -1,18 +0,0 @@
1
- {
2
- "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
3
- "compilerOptions": {
4
- "lib": ["DOM", "DOM.Iterable", "ES2019"],
5
- "esModuleInterop": true,
6
- "jsx": "react-jsx",
7
- "moduleResolution": "node",
8
- "resolveJsonModule": true,
9
- "target": "ES2019",
10
- "strict": true,
11
- "paths": {
12
- "~/*": ["./app/*"]
13
- },
14
-
15
- // Remix takes care of building everything in `remix build`.
16
- "noEmit": true
17
- }
18
- }
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "lib": ["DOM", "DOM.Iterable", "ES2019"],
5
- "esModuleInterop": true,
6
- "moduleResolution": "Node",
7
- "target": "ES2019",
8
- "strict": true,
9
- "skipLibCheck": true,
10
- "declaration": true,
11
- "jsx": "react-jsx"
12
- },
13
- "exclude": ["node_modules"],
14
- "include": ["src/**/*.ts", "src/**/*.tsx"]
15
- }