@me1a/ui 2.2.5 → 2.2.6
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/index.mjs
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./sidebar/index.mjs"
|
|
|
38
38
|
export * from "./dropdown-menu/index.mjs"
|
|
39
39
|
export * from "./drawer/index.mjs"
|
|
40
40
|
export * from "./rhf-textarea/index.mjs"
|
|
41
|
+
export * from "./rhf-text-field/index.mjs"
|
|
41
42
|
export * from "./rhf-switch/index.mjs"
|
|
42
43
|
export * from "./rhf-select/index.mjs"
|
|
43
44
|
export * from "./rhf-radio-group/index.mjs"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { FieldValues, FieldPath } from 'react-hook-form';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Input component for creating accessible input fields.
|
|
7
|
+
* Built on top of shadcn/ui's Input component.
|
|
8
|
+
*
|
|
9
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
13
|
+
|
|
14
|
+
interface RHFTextFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<React.ComponentProps<typeof Input>, "name"> {
|
|
15
|
+
/** The name of the field in the form */
|
|
16
|
+
name: TName;
|
|
17
|
+
/** Optional label for the field */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** Optional description text below the field */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Optional warning text to display */
|
|
22
|
+
warningText?: string;
|
|
23
|
+
/** Whether the field is required */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Whether the field is disabled */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Whether the field is read-only */
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** The type of input (text, number, email, etc.) */
|
|
30
|
+
type?: React.HTMLInputTypeAttribute;
|
|
31
|
+
/** Optional placeholder text */
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/** Optional aria-label for accessibility */
|
|
34
|
+
"aria-label"?: string;
|
|
35
|
+
/** Optional aria-describedby for accessibility */
|
|
36
|
+
"aria-describedby"?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A text field component that integrates with React Hook Form.
|
|
41
|
+
* Provides form validation, error handling, and accessibility features.
|
|
42
|
+
*
|
|
43
|
+
* @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs
|
|
44
|
+
*
|
|
45
|
+
* * @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Form>
|
|
48
|
+
* <RHFTextField name="name" label="Name" />
|
|
49
|
+
* <RHFTextField name="email" label="Email" />
|
|
50
|
+
* </Form>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function RHFTextField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, description, className, type, warningText, required, disabled, readOnly, placeholder, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, onBlur, ...other }: RHFTextFieldProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
export { RHFTextField };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{useFormContext as K}from"react-hook-form";import*as V from"react";import{clsx as A}from"clsx";import{twMerge as W}from"tailwind-merge";function m(...e){return W(A(e))}import{jsx as B}from"react/jsx-runtime";var C=V.forwardRef(({className:e,type:o,...t},r)=>B("input",{type:o,className:m("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));C.displayName="Input";import*as i from"react";import{Slot as z}from"@radix-ui/react-slot";import{Controller as G,FormProvider as ne,useFormContext as J}from"react-hook-form";import*as L from"react";import*as v from"@radix-ui/react-label";import{cva as k}from"class-variance-authority";import{jsx as q}from"react/jsx-runtime";var O=k("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),f=L.forwardRef(({className:e,...o},t)=>q(v.Root,{ref:t,className:m(O(),e),...o}));f.displayName=v.Root.displayName;import{jsx as n}from"react/jsx-runtime";var T=i.createContext({}),g=({...e})=>n(T.Provider,{value:{name:e.name},children:n(G,{...e})}),u=()=>{let e=i.useContext(T),o=i.useContext(I),{getFieldState:t,formState:r}=J(),a=t(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:l}=o;return{id:l,name:e.name,formItemId:`${l}-form-item`,formDescriptionId:`${l}-form-item-description`,formMessageId:`${l}-form-item-message`,...a}},I=i.createContext({}),x=i.forwardRef(({className:e,...o},t)=>{let r=i.useId();return n(I.Provider,{value:{id:r},children:n("div",{ref:t,className:m("space-y-2",e),...o})})});x.displayName="FormItem";var b=i.forwardRef(({className:e,...o},t)=>{let{error:r,formItemId:a}=u();return n(f,{ref:t,className:m(r&&"text-destructive",e),htmlFor:a,...o})});b.displayName="FormLabel";var R=i.forwardRef(({...e},o)=>{let{error:t,formItemId:r,formDescriptionId:a,formMessageId:l}=u();return n(z,{ref:o,id:r,"aria-describedby":t?`${a} ${l}`:`${a}`,"aria-invalid":!!t,...e})});R.displayName="FormControl";var P=i.forwardRef(({className:e,...o},t)=>{let{formDescriptionId:r}=u();return n("p",{ref:t,id:r,className:m("text-sm text-muted-foreground",e),...o})});P.displayName="FormDescription";var y=i.forwardRef(({className:e,children:o,...t},r)=>{let{error:a,formMessageId:l}=u(),p=a?String(a?.message??""):o;return p?n("p",{ref:r,id:l,className:m("text-sm font-medium text-destructive",e),...t,children:p}):null});y.displayName="FormMessage";import{jsx as d,jsxs as h}from"react/jsx-runtime";function Ce({name:e,label:o,description:t,className:r,type:a="text",warningText:l,required:p,disabled:N,readOnly:M,placeholder:w,"aria-label":H,"aria-describedby":D,onBlur:E,...S}){let{control:$}=K();return d(g,{name:e,control:$,render:({field:s,fieldState:{error:c}})=>h(x,{children:[o&&h(b,{children:[o,p&&d("span",{className:"text-destructive ml-1",children:"*"})]}),d(R,{children:d(C,{...s,type:a,value:a==="number"&&s.value===0?"":s.value,onChange:F=>{a==="number"?s.onChange(Number(F.target.value)):s.onChange(F.target.value)},onBlur:F=>{a!=="number"&&typeof s.value=="string"&&s.onChange(s.value.trim()),s.onBlur(),E?.(F)},className:m(c&&"border-destructive focus-visible:ring-destructive",r),disabled:N,readOnly:M,required:p,placeholder:w,"aria-label":H,"aria-describedby":D,"aria-invalid":!!c,"aria-required":p,...S})}),t&&d(P,{children:t}),c&&d(y,{children:c.message}),!c&&l&&d("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:l})]})})}export{Ce as RHFTextField};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/rhf/rhf-text-field/rhf-text-field.tsx","../../src/components/atoms/input/input.tsx","../../src/utils/cn.ts","../../src/components/rhf/form/form.tsx","../../src/components/atoms/label/label.tsx"],"sourcesContent":["\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Input } from \"@/components/atoms/input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextFieldProps } from \"./rhf-text-field.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A text field component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs\n *\n * * @example\n * ```tsx\n * <Form>\n * <RHFTextField name=\"name\" label=\"Name\" />\n * <RHFTextField name=\"email\" label=\"Email\" />\n * </Form>\n * ```\n */\nexport function RHFTextField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n type = \"text\",\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextFieldProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Input\n {...field}\n type={type}\n value={type === \"number\" && field.value === 0 ? \"\" : field.value}\n onChange={(e) => {\n if (type === \"number\") {\n field.onChange(Number(e.target.value))\n } else {\n field.onChange(e.target.value)\n }\n }}\n onBlur={(e) => {\n // trim if a string\n if (type !== \"number\" && typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","\"use client\";\n\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n }\n)\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-sm font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField\n}\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"],"mappings":"aAIA,OAAS,kBAAAA,MAAwD,kBCJjE,UAAYC,MAAW,QCAvB,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CA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a,EAAM,OAAU,UAC9CA,EAAM,SAASA,EAAM,MAAM,KAAK,CAAC,EAEnCA,EAAM,OAAO,EACbL,IAASW,CAAC,CACZ,EACA,UAAWC,EACTN,GAAS,oDACTf,CACF,EACA,SAAUI,EACV,SAAUC,EACV,SAAUF,EACV,YAAaG,EACb,aAAYC,EACZ,mBAAkBC,EAClB,eAAc,CAAC,CAACO,EAChB,gBAAeZ,EACd,GAAGO,EACN,EACF,EACCX,GAAeL,EAAC4B,EAAA,CAAiB,SAAAvB,EAAY,EAC7CgB,GAASrB,EAAC6B,EAAA,CAAa,SAAAR,EAAM,QAAQ,EACrC,CAACA,GAASb,GACTR,EAAC,KAAE,UAAU,+CAA+C,KAAK,QAC9D,SAAAQ,EACH,GAEJ,EAEJ,CAEJ","names":["useFormContext","React","clsx","twMerge","cn","inputs","jsx","Input","className","type","props","ref","cn","React","Slot","Controller","FormProvider","useFormContext","React","LabelPrimitive","cva","jsx","labelVariants","cva","Label","className","props","ref","cn","jsx","FormFieldContext","FormField","props","jsx","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","jsx","jsxs","RHFTextField","name","label","description","className","type","warningText","required","disabled","readOnly","placeholder","ariaLabel","ariaDescribedby","onBlur","other","control","useFormContext","FormField","field","error","FormItem","FormLabel","FormControl","Input","e","cn","FormDescription","FormMessage"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@me1a/ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -177,6 +177,10 @@
|
|
|
177
177
|
"types": "./dist/rhf-textarea/index.d.mts",
|
|
178
178
|
"import": "./dist/rhf-textarea/index.mjs"
|
|
179
179
|
},
|
|
180
|
+
"./rhf-text-field": {
|
|
181
|
+
"types": "./dist/rhf-text-field/index.d.mts",
|
|
182
|
+
"import": "./dist/rhf-text-field/index.mjs"
|
|
183
|
+
},
|
|
180
184
|
"./rhf-switch": {
|
|
181
185
|
"types": "./dist/rhf-switch/index.d.mts",
|
|
182
186
|
"import": "./dist/rhf-switch/index.mjs"
|