@glob-ui/field 0.0.0-stage → 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kevin Martínez E
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # @glob-ui/field
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Wraps one form control with a label, a description and an error, and wires their ARIA attributes to it.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @glob-ui/field
9
+ ```
10
+
11
+ ## Documentation
12
+
13
+ Full docs, examples and the accessibility table: [Field](https://github.com/kevin-martineze/GlobUI/tree/main/apps/docs/content/docs/components/field.mdx).
14
+
15
+ ## License
16
+
17
+ MIT. See [LICENSE](./LICENSE).
@@ -0,0 +1,17 @@
1
+ import * as react from 'react';
2
+
3
+ type Size = "sm" | "md" | "lg";
4
+ interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
5
+ label?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ /** When truthy, marks the control invalid. The description stays visible. */
8
+ error?: React.ReactNode;
9
+ /** Shows the asterisk only. Put `required` on the control too, for validation and screen readers. */
10
+ required?: boolean;
11
+ size?: Size;
12
+ /** One form control. Field injects id, aria-describedby, aria-labelledby and aria-invalid into it. */
13
+ children: React.ReactElement;
14
+ }
15
+ declare const Field: react.ForwardRefExoticComponent<FieldProps & react.RefAttributes<HTMLDivElement>>;
16
+
17
+ export { Field, type FieldProps };
@@ -0,0 +1,17 @@
1
+ import * as react from 'react';
2
+
3
+ type Size = "sm" | "md" | "lg";
4
+ interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
5
+ label?: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ /** When truthy, marks the control invalid. The description stays visible. */
8
+ error?: React.ReactNode;
9
+ /** Shows the asterisk only. Put `required` on the control too, for validation and screen readers. */
10
+ required?: boolean;
11
+ size?: Size;
12
+ /** One form control. Field injects id, aria-describedby, aria-labelledby and aria-invalid into it. */
13
+ children: React.ReactElement;
14
+ }
15
+ declare const Field: react.ForwardRefExoticComponent<FieldProps & react.RefAttributes<HTMLDivElement>>;
16
+
17
+ export { Field, type FieldProps };
package/dist/index.js ADDED
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/index.ts
50
+ var index_exports = {};
51
+ __export(index_exports, {
52
+ Field: () => Field
53
+ });
54
+ module.exports = __toCommonJS(index_exports);
55
+
56
+ // src/field.tsx
57
+ var import_react = require("react");
58
+ var import_utils = require("@glob-ui/utils");
59
+ var import_label = require("@glob-ui/label");
60
+ var import_jsx_runtime = require("react/jsx-runtime");
61
+ var textSize = {
62
+ sm: "text-xs",
63
+ md: "text-sm",
64
+ lg: "text-base"
65
+ };
66
+ var Field = (0, import_react.forwardRef)(
67
+ (_a, ref) => {
68
+ var _b = _a, { label, description, error, required, size = "md", className, children } = _b, props = __objRest(_b, ["label", "description", "error", "required", "size", "className", "children"]);
69
+ var _a2;
70
+ const baseId = (0, import_react.useId)();
71
+ const child = import_react.Children.only(children);
72
+ const childProps = (0, import_react.isValidElement)(child) ? child.props : {};
73
+ const controlId = (_a2 = childProps.id) != null ? _a2 : `${baseId}-control`;
74
+ const labelId = `${baseId}-label`;
75
+ const descriptionId = `${baseId}-description`;
76
+ const errorId = `${baseId}-error`;
77
+ const hasError = Boolean(error);
78
+ const describedBy = [childProps["aria-describedby"], description ? descriptionId : null, hasError ? errorId : null].filter(Boolean).join(" ") || void 0;
79
+ const labelledBy = [childProps["aria-labelledby"], label ? labelId : null].filter(Boolean).join(" ") || void 0;
80
+ const control = (0, import_react.isValidElement)(child) ? (0, import_react.cloneElement)(child, {
81
+ id: controlId,
82
+ "aria-describedby": describedBy,
83
+ "aria-labelledby": labelledBy,
84
+ "aria-invalid": hasError ? true : childProps["aria-invalid"]
85
+ }) : child;
86
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", __spreadProps(__spreadValues({ ref, className: (0, import_utils.cn)("flex flex-col gap-1.5", className) }, props), { children: [
87
+ label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { id: labelId, htmlFor: controlId, size, required, children: label }),
88
+ control,
89
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: descriptionId, className: (0, import_utils.cn)("text-glob-text-secondary", textSize[size]), children: description }),
90
+ hasError && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: errorId, className: (0, import_utils.cn)("text-glob-danger", textSize[size]), children: error })
91
+ ] }));
92
+ }
93
+ );
94
+ Field.displayName = "Field";
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ Field
98
+ });
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/field.tsx"],"sourcesContent":["export { Field } from \"./field\"\nexport type { FieldProps } from \"./field\"\n","import { Children, cloneElement, forwardRef, isValidElement, useId } from \"react\"\nimport { cn } from \"@glob-ui/utils\"\nimport { Label } from \"@glob-ui/label\"\n\ntype Size = \"sm\" | \"md\" | \"lg\"\n\nconst textSize: Record<Size, string> = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n}\n\ninterface ControlProps {\n id?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-invalid\"?: React.AriaAttributes[\"aria-invalid\"]\n}\n\nexport interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n label?: React.ReactNode\n description?: React.ReactNode\n /** When truthy, marks the control invalid. The description stays visible. */\n error?: React.ReactNode\n /** Shows the asterisk only. Put `required` on the control too, for validation and screen readers. */\n required?: boolean\n size?: Size\n /** One form control. Field injects id, aria-describedby, aria-labelledby and aria-invalid into it. */\n children: React.ReactElement\n}\n\nconst Field = forwardRef<HTMLDivElement, FieldProps>(\n ({ label, description, error, required, size = \"md\", className, children, ...props }, ref) => {\n const baseId = useId()\n const child = Children.only(children)\n const childProps: ControlProps = isValidElement<ControlProps>(child) ? child.props : {}\n\n const controlId = childProps.id ?? `${baseId}-control`\n const labelId = `${baseId}-label`\n const descriptionId = `${baseId}-description`\n const errorId = `${baseId}-error`\n const hasError = Boolean(error)\n\n const describedBy =\n [childProps[\"aria-describedby\"], description ? descriptionId : null, hasError ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined\n\n const labelledBy =\n [childProps[\"aria-labelledby\"], label ? labelId : null].filter(Boolean).join(\" \") || undefined\n\n const control = isValidElement<ControlProps>(child)\n ? cloneElement(child, {\n id: controlId,\n \"aria-describedby\": describedBy,\n \"aria-labelledby\": labelledBy,\n \"aria-invalid\": hasError ? true : childProps[\"aria-invalid\"],\n })\n : child\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1.5\", className)} {...props}>\n {label && (\n <Label id={labelId} htmlFor={controlId} size={size} required={required}>\n {label}\n </Label>\n )}\n {control}\n {description && (\n <p id={descriptionId} className={cn(\"text-glob-text-secondary\", textSize[size])}>\n {description}\n </p>\n )}\n {hasError && (\n <p id={errorId} className={cn(\"text-glob-danger\", textSize[size])}>\n {error}\n </p>\n )}\n </div>\n )\n }\n)\nField.displayName = \"Field\"\n\nexport { Field }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0E;AAC1E,mBAAmB;AACnB,mBAAsB;AA2DhB;AAvDN,IAAM,WAAiC;AAAA,EACrC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAqBA,IAAM,YAAQ;AAAA,EACZ,CAAC,IAAqF,QAAQ;AAA7F,iBAAE,SAAO,aAAa,OAAO,UAAU,OAAO,MAAM,WAAW,SAhClE,IAgCG,IAA4E,kBAA5E,IAA4E,CAA1E,SAAO,eAAa,SAAO,YAAU,QAAa,aAAW;AAhClE,QAAAA;AAiCI,UAAM,aAAS,oBAAM;AACrB,UAAM,QAAQ,sBAAS,KAAK,QAAQ;AACpC,UAAM,iBAA2B,6BAA6B,KAAK,IAAI,MAAM,QAAQ,CAAC;AAEtF,UAAM,aAAYA,MAAA,WAAW,OAAX,OAAAA,MAAiB,GAAG,MAAM;AAC5C,UAAM,UAAU,GAAG,MAAM;AACzB,UAAM,gBAAgB,GAAG,MAAM;AAC/B,UAAM,UAAU,GAAG,MAAM;AACzB,UAAM,WAAW,QAAQ,KAAK;AAE9B,UAAM,cACJ,CAAC,WAAW,kBAAkB,GAAG,cAAc,gBAAgB,MAAM,WAAW,UAAU,IAAI,EAC3F,OAAO,OAAO,EACd,KAAK,GAAG,KAAK;AAElB,UAAM,aACJ,CAAC,WAAW,iBAAiB,GAAG,QAAQ,UAAU,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAEvF,UAAM,cAAU,6BAA6B,KAAK,QAC9C,2BAAa,OAAO;AAAA,MAClB,IAAI;AAAA,MACJ,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,gBAAgB,WAAW,OAAO,WAAW,cAAc;AAAA,IAC7D,CAAC,IACD;AAEJ,WACE,6CAAC,sCAAI,KAAU,eAAW,iBAAG,yBAAyB,SAAS,KAAO,QAArE,EACE;AAAA,eACC,4CAAC,sBAAM,IAAI,SAAS,SAAS,WAAW,MAAY,UACjD,iBACH;AAAA,MAED;AAAA,MACA,eACC,4CAAC,OAAE,IAAI,eAAe,eAAW,iBAAG,4BAA4B,SAAS,IAAI,CAAC,GAC3E,uBACH;AAAA,MAED,YACC,4CAAC,OAAE,IAAI,SAAS,eAAW,iBAAG,oBAAoB,SAAS,IAAI,CAAC,GAC7D,iBACH;AAAA,QAEJ;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["_a"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,75 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
33
+ // src/field.tsx
34
+ import { Children, cloneElement, forwardRef, isValidElement, useId } from "react";
35
+ import { cn } from "@glob-ui/utils";
36
+ import { Label } from "@glob-ui/label";
37
+ import { jsx, jsxs } from "react/jsx-runtime";
38
+ var textSize = {
39
+ sm: "text-xs",
40
+ md: "text-sm",
41
+ lg: "text-base"
42
+ };
43
+ var Field = forwardRef(
44
+ (_a, ref) => {
45
+ var _b = _a, { label, description, error, required, size = "md", className, children } = _b, props = __objRest(_b, ["label", "description", "error", "required", "size", "className", "children"]);
46
+ var _a2;
47
+ const baseId = useId();
48
+ const child = Children.only(children);
49
+ const childProps = isValidElement(child) ? child.props : {};
50
+ const controlId = (_a2 = childProps.id) != null ? _a2 : `${baseId}-control`;
51
+ const labelId = `${baseId}-label`;
52
+ const descriptionId = `${baseId}-description`;
53
+ const errorId = `${baseId}-error`;
54
+ const hasError = Boolean(error);
55
+ const describedBy = [childProps["aria-describedby"], description ? descriptionId : null, hasError ? errorId : null].filter(Boolean).join(" ") || void 0;
56
+ const labelledBy = [childProps["aria-labelledby"], label ? labelId : null].filter(Boolean).join(" ") || void 0;
57
+ const control = isValidElement(child) ? cloneElement(child, {
58
+ id: controlId,
59
+ "aria-describedby": describedBy,
60
+ "aria-labelledby": labelledBy,
61
+ "aria-invalid": hasError ? true : childProps["aria-invalid"]
62
+ }) : child;
63
+ return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ ref, className: cn("flex flex-col gap-1.5", className) }, props), { children: [
64
+ label && /* @__PURE__ */ jsx(Label, { id: labelId, htmlFor: controlId, size, required, children: label }),
65
+ control,
66
+ description && /* @__PURE__ */ jsx("p", { id: descriptionId, className: cn("text-glob-text-secondary", textSize[size]), children: description }),
67
+ hasError && /* @__PURE__ */ jsx("p", { id: errorId, className: cn("text-glob-danger", textSize[size]), children: error })
68
+ ] }));
69
+ }
70
+ );
71
+ Field.displayName = "Field";
72
+ export {
73
+ Field
74
+ };
75
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/field.tsx"],"sourcesContent":["import { Children, cloneElement, forwardRef, isValidElement, useId } from \"react\"\nimport { cn } from \"@glob-ui/utils\"\nimport { Label } from \"@glob-ui/label\"\n\ntype Size = \"sm\" | \"md\" | \"lg\"\n\nconst textSize: Record<Size, string> = {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n}\n\ninterface ControlProps {\n id?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-invalid\"?: React.AriaAttributes[\"aria-invalid\"]\n}\n\nexport interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n label?: React.ReactNode\n description?: React.ReactNode\n /** When truthy, marks the control invalid. The description stays visible. */\n error?: React.ReactNode\n /** Shows the asterisk only. Put `required` on the control too, for validation and screen readers. */\n required?: boolean\n size?: Size\n /** One form control. Field injects id, aria-describedby, aria-labelledby and aria-invalid into it. */\n children: React.ReactElement\n}\n\nconst Field = forwardRef<HTMLDivElement, FieldProps>(\n ({ label, description, error, required, size = \"md\", className, children, ...props }, ref) => {\n const baseId = useId()\n const child = Children.only(children)\n const childProps: ControlProps = isValidElement<ControlProps>(child) ? child.props : {}\n\n const controlId = childProps.id ?? `${baseId}-control`\n const labelId = `${baseId}-label`\n const descriptionId = `${baseId}-description`\n const errorId = `${baseId}-error`\n const hasError = Boolean(error)\n\n const describedBy =\n [childProps[\"aria-describedby\"], description ? descriptionId : null, hasError ? errorId : null]\n .filter(Boolean)\n .join(\" \") || undefined\n\n const labelledBy =\n [childProps[\"aria-labelledby\"], label ? labelId : null].filter(Boolean).join(\" \") || undefined\n\n const control = isValidElement<ControlProps>(child)\n ? cloneElement(child, {\n id: controlId,\n \"aria-describedby\": describedBy,\n \"aria-labelledby\": labelledBy,\n \"aria-invalid\": hasError ? true : childProps[\"aria-invalid\"],\n })\n : child\n\n return (\n <div ref={ref} className={cn(\"flex flex-col gap-1.5\", className)} {...props}>\n {label && (\n <Label id={labelId} htmlFor={controlId} size={size} required={required}>\n {label}\n </Label>\n )}\n {control}\n {description && (\n <p id={descriptionId} className={cn(\"text-glob-text-secondary\", textSize[size])}>\n {description}\n </p>\n )}\n {hasError && (\n <p id={errorId} className={cn(\"text-glob-danger\", textSize[size])}>\n {error}\n </p>\n )}\n </div>\n )\n }\n)\nField.displayName = \"Field\"\n\nexport { Field }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,cAAc,YAAY,gBAAgB,aAAa;AAC1E,SAAS,UAAU;AACnB,SAAS,aAAa;AA2DhB,SAEI,KAFJ;AAvDN,IAAM,WAAiC;AAAA,EACrC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAqBA,IAAM,QAAQ;AAAA,EACZ,CAAC,IAAqF,QAAQ;AAA7F,iBAAE,SAAO,aAAa,OAAO,UAAU,OAAO,MAAM,WAAW,SAhClE,IAgCG,IAA4E,kBAA5E,IAA4E,CAA1E,SAAO,eAAa,SAAO,YAAU,QAAa,aAAW;AAhClE,QAAAA;AAiCI,UAAM,SAAS,MAAM;AACrB,UAAM,QAAQ,SAAS,KAAK,QAAQ;AACpC,UAAM,aAA2B,eAA6B,KAAK,IAAI,MAAM,QAAQ,CAAC;AAEtF,UAAM,aAAYA,MAAA,WAAW,OAAX,OAAAA,MAAiB,GAAG,MAAM;AAC5C,UAAM,UAAU,GAAG,MAAM;AACzB,UAAM,gBAAgB,GAAG,MAAM;AAC/B,UAAM,UAAU,GAAG,MAAM;AACzB,UAAM,WAAW,QAAQ,KAAK;AAE9B,UAAM,cACJ,CAAC,WAAW,kBAAkB,GAAG,cAAc,gBAAgB,MAAM,WAAW,UAAU,IAAI,EAC3F,OAAO,OAAO,EACd,KAAK,GAAG,KAAK;AAElB,UAAM,aACJ,CAAC,WAAW,iBAAiB,GAAG,QAAQ,UAAU,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAEvF,UAAM,UAAU,eAA6B,KAAK,IAC9C,aAAa,OAAO;AAAA,MAClB,IAAI;AAAA,MACJ,oBAAoB;AAAA,MACpB,mBAAmB;AAAA,MACnB,gBAAgB,WAAW,OAAO,WAAW,cAAc;AAAA,IAC7D,CAAC,IACD;AAEJ,WACE,qBAAC,sCAAI,KAAU,WAAW,GAAG,yBAAyB,SAAS,KAAO,QAArE,EACE;AAAA,eACC,oBAAC,SAAM,IAAI,SAAS,SAAS,WAAW,MAAY,UACjD,iBACH;AAAA,MAED;AAAA,MACA,eACC,oBAAC,OAAE,IAAI,eAAe,WAAW,GAAG,4BAA4B,SAAS,IAAI,CAAC,GAC3E,uBACH;AAAA,MAED,YACC,oBAAC,OAAE,IAAI,SAAS,WAAW,GAAG,oBAAoB,SAAS,IAAI,CAAC,GAC7D,iBACH;AAAA,QAEJ;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["_a"]}
package/package.json CHANGED
@@ -1,6 +1,68 @@
1
1
  {
2
2
  "name": "@glob-ui/field",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.mjs",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
+ },
13
+ "require": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
18
+ "./package.json": "./package.json"
19
+ },
20
+ "files": [
21
+ "dist/",
22
+ "LICENSE",
23
+ "README.md"
24
+ ],
25
+ "peerDependencies": {
26
+ "react": "^19"
27
+ },
28
+ "dependencies": {
29
+ "@glob-ui/label": "0.2.0",
30
+ "@glob-ui/utils": "0.2.0"
31
+ },
32
+ "devDependencies": {
33
+ "tsup": "^8.5.1"
34
+ },
35
+ "description": "Wraps one form control with a label, a description and an error, and wires their ARIA attributes to it.",
36
+ "keywords": [
37
+ "react",
38
+ "glob-ui",
39
+ "components",
40
+ "accessible",
41
+ "tailwind",
42
+ "field"
43
+ ],
44
+ "license": "MIT",
45
+ "author": "Kevin Martínez E",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/kevin-martineze/GlobUI.git",
49
+ "directory": "packages/field"
50
+ },
51
+ "homepage": "https://github.com/kevin-martineze/GlobUI#readme",
52
+ "bugs": {
53
+ "url": "https://github.com/kevin-martineze/GlobUI/issues"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public",
57
+ "provenance": true
58
+ },
59
+ "sideEffects": false,
60
+ "type": "commonjs",
61
+ "engines": {
62
+ "node": ">=18.18"
63
+ },
64
+ "scripts": {
65
+ "build": "tsup",
66
+ "dev": "tsup --watch --no-clean"
67
+ }
6
68
  }