@nomos-ui/form 0.0.19 → 0.0.21

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.
@@ -0,0 +1,6 @@
1
+ import { type ReactElement } from "react";
2
+ import { UseFormReturn } from "react-hook-form";
3
+ export default function FormDebugInfo({ form, }: {
4
+ form: UseFormReturn<any>;
5
+ }): ReactElement;
6
+ //# sourceMappingURL=form-debug-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-debug-info.d.ts","sourceRoot":"","sources":["../../src/components/form-debug-info.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,GACL,EAAE;IACD,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CAC1B,GAAG,YAAY,CAoBf"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = FormDebugInfo;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ function FormDebugInfo({ form, }) {
6
+ ///@ts-ignore
7
+ return process?.env?.NODE_ENV === "development" ||
8
+ ///@ts-ignore
9
+ import.meta?.env?.NODE_ENV === "development" ? ((0, jsx_runtime_1.jsxs)("details", { className: "", children: [(0, jsx_runtime_1.jsx)("summary", { className: "cursor-pointer text-sm text-gray-500", children: "Debug Info" }), (0, jsx_runtime_1.jsxs)("pre", { className: "text-xs bg-gray-100 p-4 rounded mt-2 overflow-auto", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Form Errors:" }), JSON.stringify(form.formState.errors, null, 2), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Form Values:" }), JSON.stringify(form.watch(), null, 2)] })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
10
+ }
11
+ //# sourceMappingURL=form-debug-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-debug-info.js","sourceRoot":"","sources":["../../src/components/form-debug-info.tsx"],"names":[],"mappings":";;AAGA,gCAwBC;;AAxBD,SAAwB,aAAa,CAAC,EACpC,IAAI,GAGL;IACC,aAAa;IACb,OAAQ,OAAe,EAAE,GAAG,EAAE,QAAQ,KAAK,aAAa;QACtD,aAAa;QACZ,MAAM,CAAC,IAAY,EAAE,GAAG,EAAE,QAAQ,KAAK,aAAa,CAAC,CAAC,CAAC,CACxD,qCAAS,SAAS,EAAC,EAAE,aACnB,oCAAS,SAAS,EAAC,sCAAsC,2BAE/C,EACV,iCAAK,SAAS,EAAC,oDAAoD,aACjE,8DAA6B,EAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAC/C,gCAAM,EACN,8DAA6B,EAC5B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAClC,IACE,CACX,CAAC,CAAC,CAAC,CACF,kDAAK,CACN,CAAC;AACJ,CAAC"}
@@ -9,7 +9,8 @@ import FormImageInput from "../components/form-image-input";
9
9
  import ImageInput from "../components/image-input";
10
10
  import FileInput, { FileInputProps, FileInputFile } from "../components/file-input";
11
11
  import FormFileInput, { FormFileInputProps } from "../components/form-file-input";
12
- export { Button, FormInput, Input, Select, FormSelect, Textarea, FormTextarea, ImageInput, FormImageInput, FileInput, FormFileInput, };
12
+ import FormDebugInfo from "../components/form-debug-info";
13
+ export { Button, FormDebugInfo, FormInput, Input, Select, FormSelect, Textarea, FormTextarea, ImageInput, FormImageInput, FileInput, FormFileInput, };
13
14
  export type { SelectOption, SelectProps, FormSelectProps, FormFileInputProps, FileInputProps, FileInputFile, };
14
15
  export * from "../components/input";
15
16
  export * from "../components/form-input";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,SAAS,EAAE,EAChB,cAAc,EACd,aAAa,EACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,aAAa,EAAE,EACpB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,GACd,CAAC;AACF,YAAY,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,CAAC;AACF,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,MAAM,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,UAAU,EAAE,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAC5D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,SAAS,EAAE,EAChB,cAAc,EACd,aAAa,EACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,aAAa,EAAE,EACpB,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAE1D,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,KAAK,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,GACd,CAAC;AACF,YAAY,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,CAAC;AACF,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.FormFileInput = exports.FileInput = exports.FormImageInput = exports.ImageInput = exports.FormTextarea = exports.Textarea = exports.FormSelect = exports.Select = exports.Input = exports.FormInput = exports.Button = void 0;
20
+ exports.FormFileInput = exports.FileInput = exports.FormImageInput = exports.ImageInput = exports.FormTextarea = exports.Textarea = exports.FormSelect = exports.Select = exports.Input = exports.FormInput = exports.FormDebugInfo = exports.Button = void 0;
21
21
  const button_1 = __importDefault(require("../components/button"));
22
22
  exports.Button = button_1.default;
23
23
  const form_input_1 = __importDefault(require("../components/form-input"));
@@ -40,6 +40,8 @@ const file_input_1 = __importDefault(require("../components/file-input"));
40
40
  exports.FileInput = file_input_1.default;
41
41
  const form_file_input_1 = __importDefault(require("../components/form-file-input"));
42
42
  exports.FormFileInput = form_file_input_1.default;
43
+ const form_debug_info_1 = __importDefault(require("../components/form-debug-info"));
44
+ exports.FormDebugInfo = form_debug_info_1.default;
43
45
  __exportStar(require("../components/input"), exports);
44
46
  __exportStar(require("../components/form-input"), exports);
45
47
  __exportStar(require("../components/button"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kEAA0C;AAkBxC,iBAlBK,gBAAM,CAkBL;AAjBR,0EAAiD;AAkB/C,oBAlBK,oBAAS,CAkBL;AAjBX,gEAAwC;AAkBtC,gBAlBK,eAAK,CAkBL;AAjBP,kEAAyE;AAkBvE,iBAlBK,gBAAM,CAkBL;AAjBR,4EAAwE;AAkBtE,qBAlBK,qBAAU,CAkBL;AAjBZ,sEAA8C;AAkB5C,mBAlBK,kBAAQ,CAkBL;AAjBV,gFAAuD;AAkBrD,uBAlBK,uBAAY,CAkBL;AAjBd,sFAA4D;AAmB1D,yBAnBK,0BAAc,CAmBL;AAlBhB,4EAAmD;AAiBjD,qBAjBK,qBAAU,CAiBL;AAhBZ,0EAGkC;AAehC,oBAlBK,oBAAS,CAkBL;AAdX,oFAEuC;AAarC,wBAfK,yBAAa,CAeL;AAUf,sDAAoC;AACpC,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC;AACzC,gEAA8C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kEAA0C;AAmBxC,iBAnBK,gBAAM,CAmBL;AAlBR,0EAAiD;AAoB/C,oBApBK,oBAAS,CAoBL;AAnBX,gEAAwC;AAoBtC,gBApBK,eAAK,CAoBL;AAnBP,kEAAyE;AAoBvE,iBApBK,gBAAM,CAoBL;AAnBR,4EAAwE;AAoBtE,qBApBK,qBAAU,CAoBL;AAnBZ,sEAA8C;AAoB5C,mBApBK,kBAAQ,CAoBL;AAnBV,gFAAuD;AAoBrD,uBApBK,uBAAY,CAoBL;AAnBd,sFAA4D;AAqB1D,yBArBK,0BAAc,CAqBL;AApBhB,4EAAmD;AAmBjD,qBAnBK,qBAAU,CAmBL;AAlBZ,0EAGkC;AAiBhC,oBApBK,oBAAS,CAoBL;AAhBX,oFAEuC;AAerC,wBAjBK,yBAAa,CAiBL;AAdf,oFAA0D;AAIxD,wBAJK,yBAAa,CAIL;AAoBf,sDAAoC;AACpC,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC;AACzC,gEAA8C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomos-ui/form",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "description": "The Shadcn library for building robust React forms",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/exports/index.js",