@acmekit/ui 4.1.17 → 4.1.19
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/dist/cjs/components/form/form.d.ts +15 -0
- package/dist/cjs/components/form/form.d.ts.map +1 -0
- package/dist/cjs/components/form/form.js +80 -0
- package/dist/cjs/components/form/form.js.map +1 -0
- package/dist/cjs/components/form/index.d.ts +2 -0
- package/dist/cjs/components/form/index.d.ts.map +1 -0
- package/dist/cjs/components/form/index.js +6 -0
- package/dist/cjs/components/form/index.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/form/form.d.ts +15 -0
- package/dist/esm/components/form/form.d.ts.map +1 -0
- package/dist/esm/components/form/form.js +76 -0
- package/dist/esm/components/form/form.js.map +1 -0
- package/dist/esm/components/form/index.d.ts +2 -0
- package/dist/esm/components/form/index.d.ts.map +1 -0
- package/dist/esm/components/form/index.js +2 -0
- package/dist/esm/components/form/index.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
3
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>): React.JSX.Element;
|
|
4
|
+
export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
|
|
5
|
+
Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
Control: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Hint: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
ErrorMessage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
Field: typeof FormField;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAMN,MAAM,OAAO,CAAA;AACd,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAIjB,MAAM,iBAAiB,CAAA;AAexB,iBAAS,SAAS,CAChB,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,KAAK,EAAE,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,qBAM5C;AAgJD,eAAO,MAAM,IAAI;;;;mBAhFgC,KAAK,CAAC,SAAS;;;;;CAuF9D,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Form = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const label_1 = require("../label");
|
|
7
|
+
const text_1 = require("../text");
|
|
8
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
9
|
+
const react_hook_form_1 = require("react-hook-form");
|
|
10
|
+
const FormProviderContext = react_hook_form_1.FormProvider;
|
|
11
|
+
const FormFieldContext = (0, react_1.createContext)({});
|
|
12
|
+
function FormField(props) {
|
|
13
|
+
return (react_1.default.createElement(FormFieldContext.Provider, { value: { name: props.name } },
|
|
14
|
+
react_1.default.createElement(react_hook_form_1.Controller, { ...props })));
|
|
15
|
+
}
|
|
16
|
+
const FormItemContext = (0, react_1.createContext)({});
|
|
17
|
+
const useFormField = () => {
|
|
18
|
+
const fieldContext = (0, react_1.useContext)(FormFieldContext);
|
|
19
|
+
const itemContext = (0, react_1.useContext)(FormItemContext);
|
|
20
|
+
const { getFieldState } = (0, react_hook_form_1.useFormContext)();
|
|
21
|
+
const formState = (0, react_hook_form_1.useFormState)({ name: fieldContext.name });
|
|
22
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
23
|
+
if (!fieldContext) {
|
|
24
|
+
throw new Error("useFormField must be used within a Form.Field");
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
id: itemContext.id,
|
|
28
|
+
name: fieldContext.name,
|
|
29
|
+
formItemId: `${itemContext.id}-form-item`,
|
|
30
|
+
formLabelId: `${itemContext.id}-form-label`,
|
|
31
|
+
formDescriptionId: `${itemContext.id}-form-description`,
|
|
32
|
+
formErrorMessageId: `${itemContext.id}-form-message`,
|
|
33
|
+
...fieldState,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const FormItem = (0, react_1.forwardRef)(({ className, ...props }, ref) => {
|
|
37
|
+
const id = (0, react_1.useId)();
|
|
38
|
+
return (react_1.default.createElement(FormItemContext.Provider, { value: { id } },
|
|
39
|
+
react_1.default.createElement("div", { ref: ref, className: className, ...props })));
|
|
40
|
+
});
|
|
41
|
+
FormItem.displayName = "FormItem";
|
|
42
|
+
const FormLabel = (0, react_1.forwardRef)(({ className, ...props }, ref) => {
|
|
43
|
+
const { formLabelId, formItemId } = useFormField();
|
|
44
|
+
return (react_1.default.createElement(label_1.Label, { ref: ref, id: formLabelId, htmlFor: formItemId, className: className, size: "small", weight: "plus", ...props }));
|
|
45
|
+
});
|
|
46
|
+
FormLabel.displayName = "FormLabel";
|
|
47
|
+
const FormControl = (0, react_1.forwardRef)(({ children, ...props }, ref) => {
|
|
48
|
+
const { error, formItemId, formDescriptionId, formErrorMessageId, formLabelId, } = useFormField();
|
|
49
|
+
const child = react_1.default.Children.only(children);
|
|
50
|
+
const mergedProps = react_1.default.isValidElement(child) && typeof child.type !== "string"
|
|
51
|
+
? { id: formItemId, "aria-invalid": !!error }
|
|
52
|
+
: {};
|
|
53
|
+
return (react_1.default.createElement("div", { ref: ref, role: "group", "aria-describedby": error ? `${formDescriptionId} ${formErrorMessageId}` : formDescriptionId, "aria-labelledby": formLabelId, ...props }, react_1.default.isValidElement(child)
|
|
54
|
+
? react_1.default.cloneElement(child, mergedProps)
|
|
55
|
+
: children));
|
|
56
|
+
});
|
|
57
|
+
FormControl.displayName = "FormControl";
|
|
58
|
+
const FormErrorMessage = (0, react_1.forwardRef)(({ className, children, ...props }, ref) => {
|
|
59
|
+
var _a;
|
|
60
|
+
const { error, formErrorMessageId } = useFormField();
|
|
61
|
+
const msg = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : children;
|
|
62
|
+
if (!msg)
|
|
63
|
+
return null;
|
|
64
|
+
return (react_1.default.createElement(text_1.Text, { ref: ref, id: formErrorMessageId, size: "small", className: className, ...props }, String(msg)));
|
|
65
|
+
});
|
|
66
|
+
FormErrorMessage.displayName = "FormErrorMessage";
|
|
67
|
+
const FormHint = (0, react_1.forwardRef)(({ className, ...props }, ref) => {
|
|
68
|
+
const { formDescriptionId } = useFormField();
|
|
69
|
+
return (react_1.default.createElement(text_1.Text, { ref: ref, id: formDescriptionId, size: "small", className: className, ...props }));
|
|
70
|
+
});
|
|
71
|
+
FormHint.displayName = "FormHint";
|
|
72
|
+
exports.Form = Object.assign(FormProviderContext, {
|
|
73
|
+
Item: FormItem,
|
|
74
|
+
Label: FormLabel,
|
|
75
|
+
Control: FormControl,
|
|
76
|
+
Hint: FormHint,
|
|
77
|
+
ErrorMessage: FormErrorMessage,
|
|
78
|
+
Field: FormField,
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,8CAA0C;AAC1C,4CAAwC;AACxC,uDAMc;AACd,qDAQwB;AAExB,MAAM,mBAAmB,GAAG,8BAAY,CAAA;AASxC,MAAM,gBAAgB,GAAG,IAAA,qBAAa,EACpC,EAA2B,CAC5B,CAAA;AAED,SAAS,SAAS,CAGhB,KAA2C;IAC3C,OAAO,CACL,8BAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;QACpD,8BAAC,4BAAU,OAAK,KAAK,GAAI,CACC,CAC7B,CAAA;AACH,CAAC;AAID,MAAM,eAAe,GAAG,IAAA,qBAAa,EACnC,EAA0B,CAC3B,CAAA;AAED,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,YAAY,GAAG,IAAA,kBAAU,EAAC,gBAAgB,CAAC,CAAA;IACjD,MAAM,WAAW,GAAG,IAAA,kBAAU,EAAC,eAAe,CAAC,CAAA;IAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAc,GAAE,CAAA;IAC1C,MAAM,SAAS,GAAG,IAAA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,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,YAAY,EAAE,CAAA;IACpD,MAAM,GAAG,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,QAAQ,CAAA;IAEtC,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAA;IAErB,OAAO,CACL,8BAAC,WAAI,IACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,MAAM,CAAC,GAAG,CAAC,CACP,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEjD,MAAM,QAAQ,GAAG,IAAA,kBAAU,EAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAAA;IAC5C,OAAO,CACL,8BAAC,WAAI,IACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,iBAAiB,EACrB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEpB,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;IACrD,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,SAAS;CACjB,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport { Label } from \"@/components/label\"\nimport { Text } from \"@/components/text\"\nimport React, {\n createContext,\n forwardRef,\n useContext,\n useId,\n type ComponentPropsWithoutRef,\n} from \"react\"\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from \"react-hook-form\"\n\nconst FormProviderContext = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\ntype FormItemContextValue = { id: string }\n\nconst FormItemContext = createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext)\n const itemContext = useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField must be used within a Form.Field\")\n }\n\n return {\n id: itemContext.id,\n name: fieldContext.name,\n formItemId: `${itemContext.id}-form-item`,\n formLabelId: `${itemContext.id}-form-label`,\n formDescriptionId: `${itemContext.id}-form-description`,\n formErrorMessageId: `${itemContext.id}-form-message`,\n ...fieldState,\n }\n}\n\nconst FormItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => {\n const id = useId()\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={className} {...props} />\n </FormItemContext.Provider>\n )\n})\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<\"label\">\n>(({ className, ...props }, ref) => {\n const { formLabelId, formItemId } = useFormField()\n return (\n <Label\n ref={ref}\n id={formLabelId}\n htmlFor={formItemId}\n className={className}\n size=\"small\"\n weight=\"plus\"\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<\"div\"> & { children?: React.ReactNode }\n>(({ children, ...props }, ref) => {\n const {\n error,\n formItemId,\n formDescriptionId,\n formErrorMessageId,\n formLabelId,\n } = useFormField()\n\n const child = React.Children.only(children)\n const mergedProps =\n React.isValidElement(child) && typeof child.type !== \"string\"\n ? { id: formItemId, \"aria-invalid\": !!error }\n : {}\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-describedby={\n error ? `${formDescriptionId} ${formErrorMessageId}` : formDescriptionId\n }\n aria-labelledby={formLabelId}\n {...props}\n >\n {React.isValidElement(child)\n ? React.cloneElement(\n child as React.ReactElement<{\n id?: string\n \"aria-invalid\"?: boolean\n }>,\n mergedProps\n )\n : children}\n </div>\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormErrorMessage = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(({ className, children, ...props }, ref) => {\n const { error, formErrorMessageId } = useFormField()\n const msg = error?.message ?? children\n\n if (!msg) return null\n\n return (\n <Text\n ref={ref}\n id={formErrorMessageId}\n size=\"small\"\n className={className}\n {...props}\n >\n {String(msg)}\n </Text>\n )\n})\nFormErrorMessage.displayName = \"FormErrorMessage\"\n\nconst FormHint = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n return (\n <Text\n ref={ref}\n id={formDescriptionId}\n size=\"small\"\n className={className}\n {...props}\n />\n )\n})\nFormHint.displayName = \"FormHint\"\n\nexport const Form = Object.assign(FormProviderContext, {\n Item: FormItem,\n Label: FormLabel,\n Control: FormControl,\n Hint: FormHint,\n ErrorMessage: FormErrorMessage,\n Field: FormField,\n})\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Form = void 0;
|
|
4
|
+
var form_1 = require("./form");
|
|
5
|
+
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return form_1.Form; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":";;;AAAA,+BAA6B;AAApB,4FAAA,IAAI,OAAA","sourcesContent":["export { Form } from \"./form\"\n"]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { Divider } from "./components/divider";
|
|
|
16
16
|
export { Drawer } from "./components/drawer";
|
|
17
17
|
export { DropdownMenu } from "./components/dropdown-menu";
|
|
18
18
|
export { FocusModal } from "./components/focus-modal";
|
|
19
|
+
export { Form } from "./components/form";
|
|
19
20
|
export { Heading } from "./components/heading";
|
|
20
21
|
export { Hint } from "./components/hint";
|
|
21
22
|
export { I18nProvider } from "./components/i18n-provider";
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,oBAAoB,EA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exports.clx = exports.useToggleState = exports.usePrompt = exports.TooltipProvider = exports.Tooltip = exports.Toaster = exports.Toast = exports.Textarea = exports.Text = exports.Tabs = exports.Table = exports.Switch = exports.StatusBadge = exports.Skeleton = exports.Select = exports.RadioGroup = exports.Prompt = exports.ProgressTabs = exports.ProgressAccordion = exports.Popover = exports.Label = exports.Kbd = exports.Input = exports.InlineTip = exports.IconButton = exports.IconBadge = exports.I18nProvider = exports.Hint = exports.Heading = exports.FocusModal = exports.DropdownMenu = exports.Drawer = exports.Divider = exports.DatePicker = exports.CurrencyInput = exports.Copy = exports.Container = exports.CommandBar = exports.Command = exports.CodeBlock = exports.Code = exports.Checkbox = exports.Calendar = exports.Button = exports.Badge = exports.Avatar = exports.Alert = void 0;
|
|
3
|
+
exports.toast = exports.clx = exports.useToggleState = exports.usePrompt = exports.TooltipProvider = exports.Tooltip = exports.Toaster = exports.Toast = exports.Textarea = exports.Text = exports.Tabs = exports.Table = exports.Switch = exports.StatusBadge = exports.Skeleton = exports.Select = exports.RadioGroup = exports.Prompt = exports.ProgressTabs = exports.ProgressAccordion = exports.Popover = exports.Label = exports.Kbd = exports.Input = exports.InlineTip = exports.IconButton = exports.IconBadge = exports.I18nProvider = exports.Hint = exports.Heading = exports.Form = exports.FocusModal = exports.DropdownMenu = exports.Drawer = exports.Divider = exports.DatePicker = exports.CurrencyInput = exports.Copy = exports.Container = exports.CommandBar = exports.Command = exports.CodeBlock = exports.Code = exports.Checkbox = exports.Calendar = exports.Button = exports.Badge = exports.Avatar = exports.Alert = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
// Components
|
|
6
6
|
var alert_1 = require("./components/alert");
|
|
@@ -39,6 +39,8 @@ var dropdown_menu_1 = require("./components/dropdown-menu");
|
|
|
39
39
|
Object.defineProperty(exports, "DropdownMenu", { enumerable: true, get: function () { return dropdown_menu_1.DropdownMenu; } });
|
|
40
40
|
var focus_modal_1 = require("./components/focus-modal");
|
|
41
41
|
Object.defineProperty(exports, "FocusModal", { enumerable: true, get: function () { return focus_modal_1.FocusModal; } });
|
|
42
|
+
var form_1 = require("./components/form");
|
|
43
|
+
Object.defineProperty(exports, "Form", { enumerable: true, get: function () { return form_1.Form; } });
|
|
42
44
|
var heading_1 = require("./components/heading");
|
|
43
45
|
Object.defineProperty(exports, "Heading", { enumerable: true, get: function () { return heading_1.Heading; } });
|
|
44
46
|
var hint_1 = require("./components/hint");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,aAAa;AACb,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,kDAA2E;AAAlE,oGAAA,QAAQ,OAAA;AACjB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,sDAAmD;AAA1C,uGAAA,SAAS,OAAA;AAClB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,oDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,8DAA2D;AAAlD,+GAAA,aAAa,OAAA;AACtB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,4DAAyD;AAAhD,6GAAA,YAAY,OAAA;AACrB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,4DAAyD;AAAhD,6GAAA,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"\nexport { Badge } from \"./components/badge\"\nexport { Button } from \"./components/button\"\nexport { Calendar } from \"./components/calendar\"\nexport { Checkbox, type CheckboxCheckedState } from \"./components/checkbox\"\nexport { Code } from \"./components/code\"\nexport { CodeBlock } from \"./components/code-block\"\nexport { Command } from \"./components/command\"\nexport { CommandBar } from \"./components/command-bar\"\nexport { Container } from \"./components/container\"\nexport { Copy } from \"./components/copy\"\nexport { CurrencyInput } from \"./components/currency-input\"\nexport { DatePicker } from \"./components/date-picker\"\nexport { Divider } from \"./components/divider\"\nexport { Drawer } from \"./components/drawer\"\nexport { DropdownMenu } from \"./components/dropdown-menu\"\nexport { FocusModal } from \"./components/focus-modal\"\nexport { Heading } from \"./components/heading\"\nexport { Hint } from \"./components/hint\"\nexport { I18nProvider } from \"./components/i18n-provider\"\nexport { IconBadge } from \"./components/icon-badge\"\nexport { IconButton } from \"./components/icon-button\"\nexport { InlineTip } from \"./components/inline-tip\"\nexport { Input } from \"./components/input\"\nexport { Kbd } from \"./components/kbd\"\nexport { Label } from \"./components/label\"\nexport { Popover } from \"./components/popover\"\nexport { ProgressAccordion } from \"./components/progress-accordion\"\nexport { ProgressTabs } from \"./components/progress-tabs\"\nexport { Prompt } from \"./components/prompt\"\nexport { RadioGroup } from \"./components/radio-group\"\nexport { Select } from \"./components/select\"\nexport { Skeleton } from \"./components/skeleton\"\nexport { StatusBadge } from \"./components/status-badge\"\nexport { Switch } from \"./components/switch\"\nexport { Table } from \"./components/table\"\nexport { Tabs } from \"./components/tabs\"\nexport { Text } from \"./components/text\"\nexport { Textarea } from \"./components/textarea\"\nexport { Toast } from \"./components/toast\"\nexport { Toaster } from \"./components/toaster\"\nexport { Tooltip, TooltipProvider } from \"./components/tooltip\"\n\n// Blocks\nexport * from \"./blocks/data-table\"\n\n// Hooks\nexport { usePrompt } from \"./hooks/use-prompt\"\nexport { useToggleState } from \"./hooks/use-toggle-state\"\n\n// Utils\nexport { clx } from \"./utils/clx\"\nexport { toast } from \"./utils/toast\"\n\n// Types\nexport * from \"./types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,aAAa;AACb,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,kDAA2E;AAAlE,oGAAA,QAAQ,OAAA;AACjB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,sDAAmD;AAA1C,uGAAA,SAAS,OAAA;AAClB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,oDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,8DAA2D;AAAlD,+GAAA,aAAa,OAAA;AACtB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,4DAAyD;AAAhD,6GAAA,YAAY,OAAA;AACrB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,4DAAyD;AAAhD,6GAAA,YAAY,OAAA;AACrB,sDAAmD;AAA1C,uGAAA,SAAS,OAAA;AAClB,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,sDAAmD;AAA1C,uGAAA,SAAS,OAAA;AAClB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,wCAAsC;AAA7B,0FAAA,GAAG,OAAA;AACZ,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,sEAAmE;AAA1D,uHAAA,iBAAiB,OAAA;AAC1B,4DAAyD;AAAhD,6GAAA,YAAY,OAAA;AACrB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,wDAAqD;AAA5C,yGAAA,UAAU,OAAA;AACnB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,0DAAuD;AAA9C,2GAAA,WAAW,OAAA;AACpB,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,0CAAwC;AAA/B,4FAAA,IAAI,OAAA;AACb,kDAAgD;AAAvC,oGAAA,QAAQ,OAAA;AACjB,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,gDAA8C;AAArC,kGAAA,OAAO,OAAA;AAChB,gDAA+D;AAAtD,kGAAA,OAAO,OAAA;AAAE,0GAAA,eAAe,OAAA;AAEjC,SAAS;AACT,8DAAmC;AAEnC,QAAQ;AACR,iDAA8C;AAArC,uGAAA,SAAS,OAAA;AAClB,6DAAyD;AAAhD,kHAAA,cAAc,OAAA;AAEvB,QAAQ;AACR,mCAAiC;AAAxB,0FAAA,GAAG,OAAA;AACZ,uCAAqC;AAA5B,8FAAA,KAAK,OAAA;AAEd,QAAQ;AACR,kDAAuB","sourcesContent":["// Components\nexport { Alert } from \"./components/alert\"\nexport { Avatar } from \"./components/avatar\"\nexport { Badge } from \"./components/badge\"\nexport { Button } from \"./components/button\"\nexport { Calendar } from \"./components/calendar\"\nexport { Checkbox, type CheckboxCheckedState } from \"./components/checkbox\"\nexport { Code } from \"./components/code\"\nexport { CodeBlock } from \"./components/code-block\"\nexport { Command } from \"./components/command\"\nexport { CommandBar } from \"./components/command-bar\"\nexport { Container } from \"./components/container\"\nexport { Copy } from \"./components/copy\"\nexport { CurrencyInput } from \"./components/currency-input\"\nexport { DatePicker } from \"./components/date-picker\"\nexport { Divider } from \"./components/divider\"\nexport { Drawer } from \"./components/drawer\"\nexport { DropdownMenu } from \"./components/dropdown-menu\"\nexport { FocusModal } from \"./components/focus-modal\"\nexport { Form } from \"./components/form\"\nexport { Heading } from \"./components/heading\"\nexport { Hint } from \"./components/hint\"\nexport { I18nProvider } from \"./components/i18n-provider\"\nexport { IconBadge } from \"./components/icon-badge\"\nexport { IconButton } from \"./components/icon-button\"\nexport { InlineTip } from \"./components/inline-tip\"\nexport { Input } from \"./components/input\"\nexport { Kbd } from \"./components/kbd\"\nexport { Label } from \"./components/label\"\nexport { Popover } from \"./components/popover\"\nexport { ProgressAccordion } from \"./components/progress-accordion\"\nexport { ProgressTabs } from \"./components/progress-tabs\"\nexport { Prompt } from \"./components/prompt\"\nexport { RadioGroup } from \"./components/radio-group\"\nexport { Select } from \"./components/select\"\nexport { Skeleton } from \"./components/skeleton\"\nexport { StatusBadge } from \"./components/status-badge\"\nexport { Switch } from \"./components/switch\"\nexport { Table } from \"./components/table\"\nexport { Tabs } from \"./components/tabs\"\nexport { Text } from \"./components/text\"\nexport { Textarea } from \"./components/textarea\"\nexport { Toast } from \"./components/toast\"\nexport { Toaster } from \"./components/toaster\"\nexport { Tooltip, TooltipProvider } from \"./components/tooltip\"\n\n// Blocks\nexport * from \"./blocks/data-table\"\n\n// Hooks\nexport { usePrompt } from \"./hooks/use-prompt\"\nexport { useToggleState } from \"./hooks/use-toggle-state\"\n\n// Utils\nexport { clx } from \"./utils/clx\"\nexport { toast } from \"./utils/toast\"\n\n// Types\nexport * from \"./types\"\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
3
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>): React.JSX.Element;
|
|
4
|
+
export declare const Form: (<TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element) & {
|
|
5
|
+
Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Label: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
Control: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Hint: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
ErrorMessage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
Field: typeof FormField;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAMN,MAAM,OAAO,CAAA;AACd,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EAIjB,MAAM,iBAAiB,CAAA;AAexB,iBAAS,SAAS,CAChB,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,KAAK,EAAE,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,qBAM5C;AAgJD,eAAO,MAAM,IAAI;;;;mBAhFgC,KAAK,CAAC,SAAS;;;;;CAuF9D,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Label } from "../label";
|
|
3
|
+
import { Text } from "../text";
|
|
4
|
+
import React, { createContext, forwardRef, useContext, useId, } from "react";
|
|
5
|
+
import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
|
|
6
|
+
const FormProviderContext = FormProvider;
|
|
7
|
+
const FormFieldContext = createContext({});
|
|
8
|
+
function FormField(props) {
|
|
9
|
+
return (React.createElement(FormFieldContext.Provider, { value: { name: props.name } },
|
|
10
|
+
React.createElement(Controller, { ...props })));
|
|
11
|
+
}
|
|
12
|
+
const FormItemContext = createContext({});
|
|
13
|
+
const useFormField = () => {
|
|
14
|
+
const fieldContext = useContext(FormFieldContext);
|
|
15
|
+
const itemContext = useContext(FormItemContext);
|
|
16
|
+
const { getFieldState } = useFormContext();
|
|
17
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
18
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
19
|
+
if (!fieldContext) {
|
|
20
|
+
throw new Error("useFormField must be used within a Form.Field");
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
id: itemContext.id,
|
|
24
|
+
name: fieldContext.name,
|
|
25
|
+
formItemId: `${itemContext.id}-form-item`,
|
|
26
|
+
formLabelId: `${itemContext.id}-form-label`,
|
|
27
|
+
formDescriptionId: `${itemContext.id}-form-description`,
|
|
28
|
+
formErrorMessageId: `${itemContext.id}-form-message`,
|
|
29
|
+
...fieldState,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const FormItem = forwardRef(({ className, ...props }, ref) => {
|
|
33
|
+
const id = useId();
|
|
34
|
+
return (React.createElement(FormItemContext.Provider, { value: { id } },
|
|
35
|
+
React.createElement("div", { ref: ref, className: className, ...props })));
|
|
36
|
+
});
|
|
37
|
+
FormItem.displayName = "FormItem";
|
|
38
|
+
const FormLabel = forwardRef(({ className, ...props }, ref) => {
|
|
39
|
+
const { formLabelId, formItemId } = useFormField();
|
|
40
|
+
return (React.createElement(Label, { ref: ref, id: formLabelId, htmlFor: formItemId, className: className, size: "small", weight: "plus", ...props }));
|
|
41
|
+
});
|
|
42
|
+
FormLabel.displayName = "FormLabel";
|
|
43
|
+
const FormControl = forwardRef(({ children, ...props }, ref) => {
|
|
44
|
+
const { error, formItemId, formDescriptionId, formErrorMessageId, formLabelId, } = useFormField();
|
|
45
|
+
const child = React.Children.only(children);
|
|
46
|
+
const mergedProps = React.isValidElement(child) && typeof child.type !== "string"
|
|
47
|
+
? { id: formItemId, "aria-invalid": !!error }
|
|
48
|
+
: {};
|
|
49
|
+
return (React.createElement("div", { ref: ref, role: "group", "aria-describedby": error ? `${formDescriptionId} ${formErrorMessageId}` : formDescriptionId, "aria-labelledby": formLabelId, ...props }, React.isValidElement(child)
|
|
50
|
+
? React.cloneElement(child, mergedProps)
|
|
51
|
+
: children));
|
|
52
|
+
});
|
|
53
|
+
FormControl.displayName = "FormControl";
|
|
54
|
+
const FormErrorMessage = forwardRef(({ className, children, ...props }, ref) => {
|
|
55
|
+
var _a;
|
|
56
|
+
const { error, formErrorMessageId } = useFormField();
|
|
57
|
+
const msg = (_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : children;
|
|
58
|
+
if (!msg)
|
|
59
|
+
return null;
|
|
60
|
+
return (React.createElement(Text, { ref: ref, id: formErrorMessageId, size: "small", className: className, ...props }, String(msg)));
|
|
61
|
+
});
|
|
62
|
+
FormErrorMessage.displayName = "FormErrorMessage";
|
|
63
|
+
const FormHint = forwardRef(({ className, ...props }, ref) => {
|
|
64
|
+
const { formDescriptionId } = useFormField();
|
|
65
|
+
return (React.createElement(Text, { ref: ref, id: formDescriptionId, size: "small", className: className, ...props }));
|
|
66
|
+
});
|
|
67
|
+
FormHint.displayName = "FormHint";
|
|
68
|
+
export const Form = Object.assign(FormProviderContext, {
|
|
69
|
+
Item: FormItem,
|
|
70
|
+
Label: FormLabel,
|
|
71
|
+
Control: FormControl,
|
|
72
|
+
Hint: FormHint,
|
|
73
|
+
ErrorMessage: FormErrorMessage,
|
|
74
|
+
Field: FormField,
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../src/components/form/form.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,GAEN,MAAM,OAAO,CAAA;AACd,OAAO,EACL,UAAU,EAIV,YAAY,EACZ,cAAc,EACd,YAAY,GACb,MAAM,iBAAiB,CAAA;AAExB,MAAM,mBAAmB,GAAG,YAAY,CAAA;AASxC,MAAM,gBAAgB,GAAG,aAAa,CACpC,EAA2B,CAC5B,CAAA;AAED,SAAS,SAAS,CAGhB,KAA2C;IAC3C,OAAO,CACL,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;QACpD,oBAAC,UAAU,OAAK,KAAK,GAAI,CACC,CAC7B,CAAA;AACH,CAAC;AAID,MAAM,eAAe,GAAG,aAAa,CACnC,EAA0B,CAC3B,CAAA;AAED,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAA;IACjD,MAAM,WAAW,GAAG,UAAU,CAAC,eAAe,CAAC,C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AAK,EAAE,EAAE,GAAG,EAAE,EAAE;;IAC3C,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,YAAY,EAAE,CAAA;IACpD,MAAM,GAAG,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,QAAQ,CAAA;IAEtC,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAA;IAErB,OAAO,CACL,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,MAAM,CAAC,GAAG,CAAC,CACP,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEjD,MAAM,QAAQ,GAAG,UAAU,CAGzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,MAAM,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAAA;IAC5C,OAAO,CACL,oBAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,iBAAiB,EACrB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAA;AAEjC,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE;IACrD,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,gBAAgB;IAC9B,KAAK,EAAE,SAAS;CACjB,CAAC,CAAA","sourcesContent":["\"use client\"\n\nimport { Label } from \"@/components/label\"\nimport { Text } from \"@/components/text\"\nimport React, {\n createContext,\n forwardRef,\n useContext,\n useId,\n type ComponentPropsWithoutRef,\n} from \"react\"\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from \"react-hook-form\"\n\nconst FormProviderContext = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>(\n {} as FormFieldContextValue\n)\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\ntype FormItemContextValue = { id: string }\n\nconst FormItemContext = createContext<FormItemContextValue>(\n {} as FormItemContextValue\n)\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext)\n const itemContext = useContext(FormItemContext)\n const { getFieldState } = useFormContext()\n const formState = useFormState({ name: fieldContext.name })\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField must be used within a Form.Field\")\n }\n\n return {\n id: itemContext.id,\n name: fieldContext.name,\n formItemId: `${itemContext.id}-form-item`,\n formLabelId: `${itemContext.id}-form-label`,\n formDescriptionId: `${itemContext.id}-form-description`,\n formErrorMessageId: `${itemContext.id}-form-message`,\n ...fieldState,\n }\n}\n\nconst FormItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => {\n const id = useId()\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={className} {...props} />\n </FormItemContext.Provider>\n )\n})\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<\"label\">\n>(({ className, ...props }, ref) => {\n const { formLabelId, formItemId } = useFormField()\n return (\n <Label\n ref={ref}\n id={formLabelId}\n htmlFor={formItemId}\n className={className}\n size=\"small\"\n weight=\"plus\"\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<\"div\"> & { children?: React.ReactNode }\n>(({ children, ...props }, ref) => {\n const {\n error,\n formItemId,\n formDescriptionId,\n formErrorMessageId,\n formLabelId,\n } = useFormField()\n\n const child = React.Children.only(children)\n const mergedProps =\n React.isValidElement(child) && typeof child.type !== \"string\"\n ? { id: formItemId, \"aria-invalid\": !!error }\n : {}\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-describedby={\n error ? `${formDescriptionId} ${formErrorMessageId}` : formDescriptionId\n }\n aria-labelledby={formLabelId}\n {...props}\n >\n {React.isValidElement(child)\n ? React.cloneElement(\n child as React.ReactElement<{\n id?: string\n \"aria-invalid\"?: boolean\n }>,\n mergedProps\n )\n : children}\n </div>\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormErrorMessage = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(({ className, children, ...props }, ref) => {\n const { error, formErrorMessageId } = useFormField()\n const msg = error?.message ?? children\n\n if (!msg) return null\n\n return (\n <Text\n ref={ref}\n id={formErrorMessageId}\n size=\"small\"\n className={className}\n {...props}\n >\n {String(msg)}\n </Text>\n )\n})\nFormErrorMessage.displayName = \"FormErrorMessage\"\n\nconst FormHint = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n return (\n <Text\n ref={ref}\n id={formDescriptionId}\n size=\"small\"\n className={className}\n {...props}\n />\n )\n})\nFormHint.displayName = \"FormHint\"\n\nexport const Form = Object.assign(FormProviderContext, {\n Item: FormItem,\n Label: FormLabel,\n Control: FormControl,\n Hint: FormHint,\n ErrorMessage: FormErrorMessage,\n Field: FormField,\n})\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA","sourcesContent":["export { Form } from \"./form\"\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { Divider } from "./components/divider";
|
|
|
16
16
|
export { Drawer } from "./components/drawer";
|
|
17
17
|
export { DropdownMenu } from "./components/dropdown-menu";
|
|
18
18
|
export { FocusModal } from "./components/focus-modal";
|
|
19
|
+
export { Form } from "./components/form";
|
|
19
20
|
export { Heading } from "./components/heading";
|
|
20
21
|
export { Hint } from "./components/hint";
|
|
21
22
|
export { I18nProvider } from "./components/i18n-provider";
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CA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,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAG/D,cAAc,qBAAqB,CAAA;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAGzD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAGrC,cAAc,SAAS,CAAA"}
|
package/dist/esm/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { Divider } from "./components/divider";
|
|
|
17
17
|
export { Drawer } from "./components/drawer";
|
|
18
18
|
export { DropdownMenu } from "./components/dropdown-menu";
|
|
19
19
|
export { FocusModal } from "./components/focus-modal";
|
|
20
|
+
export { Form } from "./components/form";
|
|
20
21
|
export { Heading } from "./components/heading";
|
|
21
22
|
export { Hint } from "./components/hint";
|
|
22
23
|
export { I18nProvider } from "./components/i18n-provider";
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cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,QAAQ;AACR,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,QAAQ;AACR,cAAc,SAAS,CAAA","sourcesContent":["// Components\nexport { Alert } from \"./components/alert\"\nexport { Avatar } from \"./components/avatar\"\nexport { Badge } from \"./components/badge\"\nexport { Button } from \"./components/button\"\nexport { Calendar } from \"./components/calendar\"\nexport { Checkbox, type CheckboxCheckedState } from \"./components/checkbox\"\nexport { Code } from \"./components/code\"\nexport { CodeBlock } from \"./components/code-block\"\nexport { Command } from \"./components/command\"\nexport { CommandBar } from \"./components/command-bar\"\nexport { Container } from \"./components/container\"\nexport { Copy } from \"./components/copy\"\nexport { CurrencyInput } from \"./components/currency-input\"\nexport { DatePicker } from \"./components/date-picker\"\nexport { Divider } from \"./components/divider\"\nexport { Drawer } from \"./components/drawer\"\nexport { DropdownMenu } from \"./components/dropdown-menu\"\nexport { FocusModal } from \"./components/focus-modal\"\nexport { Heading } from \"./components/heading\"\nexport { Hint } from \"./components/hint\"\nexport { I18nProvider } from \"./components/i18n-provider\"\nexport { IconBadge } from \"./components/icon-badge\"\nexport { IconButton } from \"./components/icon-button\"\nexport { InlineTip } from \"./components/inline-tip\"\nexport { Input } from \"./components/input\"\nexport { Kbd } from \"./components/kbd\"\nexport { Label } from \"./components/label\"\nexport { Popover } from \"./components/popover\"\nexport { ProgressAccordion } from \"./components/progress-accordion\"\nexport { ProgressTabs } from \"./components/progress-tabs\"\nexport { Prompt } from \"./components/prompt\"\nexport { RadioGroup } from \"./components/radio-group\"\nexport { Select } from \"./components/select\"\nexport { Skeleton } from \"./components/skeleton\"\nexport { StatusBadge } from \"./components/status-badge\"\nexport { Switch } from \"./components/switch\"\nexport { Table } from \"./components/table\"\nexport { Tabs } from \"./components/tabs\"\nexport { Text } from \"./components/text\"\nexport { Textarea } from \"./components/textarea\"\nexport { Toast } from \"./components/toast\"\nexport { Toaster } from \"./components/toaster\"\nexport { Tooltip, TooltipProvider } from \"./components/tooltip\"\n\n// Blocks\nexport * from \"./blocks/data-table\"\n\n// Hooks\nexport { usePrompt } from \"./hooks/use-prompt\"\nexport { useToggleState } from \"./hooks/use-toggle-state\"\n\n// Utils\nexport { clx } from \"./utils/clx\"\nexport { toast } from \"./utils/toast\"\n\n// Types\nexport * from \"./types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAA6B,MAAM,uBAAuB,CAAA;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO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E,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE/D,SAAS;AACT,cAAc,qBAAqB,CAAA;AAEnC,QAAQ;AACR,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,QAAQ;AACR,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,QAAQ;AACR,cAAc,SAAS,CAAA","sourcesContent":["// Components\nexport { Alert } from \"./components/alert\"\nexport { Avatar } from \"./components/avatar\"\nexport { Badge } from \"./components/badge\"\nexport { Button } from \"./components/button\"\nexport { Calendar } from \"./components/calendar\"\nexport { Checkbox, type CheckboxCheckedState } from \"./components/checkbox\"\nexport { Code } from \"./components/code\"\nexport { CodeBlock } from \"./components/code-block\"\nexport { Command } from \"./components/command\"\nexport { CommandBar } from \"./components/command-bar\"\nexport { Container } from \"./components/container\"\nexport { Copy } from \"./components/copy\"\nexport { CurrencyInput } from \"./components/currency-input\"\nexport { DatePicker } from \"./components/date-picker\"\nexport { Divider } from \"./components/divider\"\nexport { Drawer } from \"./components/drawer\"\nexport { DropdownMenu } from \"./components/dropdown-menu\"\nexport { FocusModal } from \"./components/focus-modal\"\nexport { Form } from \"./components/form\"\nexport { Heading } from \"./components/heading\"\nexport { Hint } from \"./components/hint\"\nexport { I18nProvider } from \"./components/i18n-provider\"\nexport { IconBadge } from \"./components/icon-badge\"\nexport { IconButton } from \"./components/icon-button\"\nexport { InlineTip } from \"./components/inline-tip\"\nexport { Input } from \"./components/input\"\nexport { Kbd } from \"./components/kbd\"\nexport { Label } from \"./components/label\"\nexport { Popover } from \"./components/popover\"\nexport { ProgressAccordion } from \"./components/progress-accordion\"\nexport { ProgressTabs } from \"./components/progress-tabs\"\nexport { Prompt } from \"./components/prompt\"\nexport { RadioGroup } from \"./components/radio-group\"\nexport { Select } from \"./components/select\"\nexport { Skeleton } from \"./components/skeleton\"\nexport { StatusBadge } from \"./components/status-badge\"\nexport { Switch } from \"./components/switch\"\nexport { Table } from \"./components/table\"\nexport { Tabs } from \"./components/tabs\"\nexport { Text } from \"./components/text\"\nexport { Textarea } from \"./components/textarea\"\nexport { Toast } from \"./components/toast\"\nexport { Toaster } from \"./components/toaster\"\nexport { Tooltip, TooltipProvider } from \"./components/tooltip\"\n\n// Blocks\nexport * from \"./blocks/data-table\"\n\n// Hooks\nexport { usePrompt } from \"./hooks/use-prompt\"\nexport { useToggleState } from \"./hooks/use-toggle-state\"\n\n// Utils\nexport { clx } from \"./utils/clx\"\nexport { toast } from \"./utils/toast\"\n\n// Types\nexport * from \"./types\"\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acmekit/ui",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.19",
|
|
4
4
|
"author": "Kasper Kristensen <kasper@acmekit.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"typecheck": "yarn run -T tsc --noEmit"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@acmekit/ui-preset": "2.13.
|
|
45
|
+
"@acmekit/ui-preset": "2.13.23",
|
|
46
46
|
"react": "^18.3.1",
|
|
47
47
|
"react-dom": "^18.3.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@acmekit/icons": "2.13.
|
|
50
|
+
"@acmekit/icons": "2.13.23",
|
|
51
51
|
"@dnd-kit/core": "^6.1.0",
|
|
52
52
|
"@dnd-kit/sortable": "^8.0.0",
|
|
53
53
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"radix-ui": "1.1.2",
|
|
63
63
|
"react-aria": "^3.33.1",
|
|
64
64
|
"react-currency-input-field": "^3.6.11",
|
|
65
|
+
"react-hook-form": "^7.54.2",
|
|
65
66
|
"react-stately": "^3.31.1",
|
|
66
67
|
"sonner": "^1.5.0",
|
|
67
68
|
"tailwind-merge": "^2.2.1"
|