maquinaweb-ui 2.6.0 → 2.7.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/dist/container-animation.d.ts +2 -2
- package/dist/text-field.js +2 -2
- package/dist/text-field.js.map +1 -1
- package/package.json +1 -20
- package/dist/index.d.ts +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ElementType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/container-animation/container-animation.d.ts
|
|
5
5
|
type ContainerAnimationProps<T extends ElementType = 'div'> = ComponentProps<'div'> & ComponentProps<T> & {
|
|
@@ -23,7 +23,7 @@ declare const ContainerAnimation: <T extends ElementType = "div">({
|
|
|
23
23
|
distance,
|
|
24
24
|
hideNotInView,
|
|
25
25
|
...props
|
|
26
|
-
}: ContainerAnimationProps<T>) =>
|
|
26
|
+
}: ContainerAnimationProps<T>) => react_jsx_runtime0.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { ContainerAnimation, type ContainerAnimationProps };
|
|
29
29
|
//# sourceMappingURL=container-animation.d.ts.map
|
package/dist/text-field.js
CHANGED
|
@@ -170,7 +170,7 @@ function InputText({ label, description, placeholder, className, children, disab
|
|
|
170
170
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
171
171
|
className: cn("flex !gap-0 flex-col", className),
|
|
172
172
|
children: [label && /* @__PURE__ */ jsxs(Label, {
|
|
173
|
-
className: cn(error && "text-destructive", className, disabled && "text-muted-foreground", "inline-flex items-center flex-row gap-0.5"),
|
|
173
|
+
className: cn(error && "text-destructive", className, disabled && "text-muted-foreground", "inline-flex items-center flex-row gap-0.5 leading-none"),
|
|
174
174
|
htmlFor: id,
|
|
175
175
|
children: [
|
|
176
176
|
label,
|
|
@@ -181,7 +181,7 @@ function InputText({ label, description, placeholder, className, children, disab
|
|
|
181
181
|
})
|
|
182
182
|
]
|
|
183
183
|
}), detail && /* @__PURE__ */ jsx(Label, {
|
|
184
|
-
className: cn("text-sm text-muted-foreground font-normal", detailClassName),
|
|
184
|
+
className: cn("text-sm text-muted-foreground font-normal leading-none", detailClassName),
|
|
185
185
|
htmlFor: id,
|
|
186
186
|
children: detail
|
|
187
187
|
})]
|
package/dist/text-field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","names":["ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}>","TooltipPortal","InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}>"],"sources":["../src/components/ui/label.tsx","../src/components/ui/form.tsx","../src/components/ui/input.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/content-help.tsx","../src/components/ui/input-help.tsx","../src/components/text-field/TextField.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n data-slot=\"label\"\n {...props}\n />\n );\n}\n\nexport { Label };\n","'use client';\n\nimport * as React from 'react';\n\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport { Label } from '@/components/ui/label';\n\nimport { cn } from '@/lib/utils';\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>(\n {} as FormFieldContextValue\n);\n\nconst FormContext = React.createContext<{\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n}>({});\n\nexport const useFormContextSubmit = () => {\n const context = React.useContext(FormContext);\n if (!context) {\n return {};\n }\n return context;\n};\n\nconst Form: React.FC<\n React.ComponentProps<typeof FormProvider<FieldValues>> & {\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n }\n> = ({ onSubmit, helper, ...props }) => {\n return (\n <FormContext.Provider value={{ onSubmit, helper }}>\n <FormProvider {...props} />\n </FormContext.Provider>\n );\n};\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 } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\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>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n className={cn('flex flex-col gap-1', className)}\n data-slot=\"form-item\"\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n className={cn('data-[error=true]:text-destructive', className)}\n data-error={!!error}\n data-slot=\"form-label\"\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n data-slot=\"form-control\"\n id={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n className={cn('text-muted-foreground text-sm', className)}\n data-slot=\"form-description\"\n id={formDescriptionId}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n className={cn('text-destructive text-xs', className)}\n data-slot=\"form-message\"\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n","import type * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/75 focus-visible:ring-[2px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive ring-offset-[2px] transition-all duration-300',\n className\n )}\n data-slot=\"input\"\n type={type}\n {...props}\n />\n );\n}\n\nexport { Input };\n","'use client';\n\nimport * as React from 'react';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import { Portal as TooltipPortal } from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\nimport { Tooltip, TooltipContent, TooltipTrigger } from './tooltip';\n\nconst ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}> = ({ children, help, className, side = 'top', sideOffset = 10 }) => {\n return help ? (\n <Tooltip delayDuration={250}>\n <TooltipTrigger asChild>{children as any}</TooltipTrigger>\n <TooltipPortal>\n <TooltipContent\n className={cn('flex items-center px-2 leading-none', className)}\n side={side}\n sideOffset={10}\n >\n <p className=\"w-full text-wrap whitespace-break-spaces\">{help}</p>\n </TooltipContent>\n </TooltipPortal>\n </Tooltip>\n ) : (\n children\n );\n};\n\nexport { ContentHelp };\n","'use client';\n\nimport { ContentHelp } from '@/components/ui/content-help';\n\nimport { Info } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { useFormContextSubmit } from './form';\n\nconst InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}> = ({ help, name, className }) => {\n const { helper } = useFormContextSubmit();\n const helpText = (name && helper?.[name]) || help;\n\n return (\n helpText && (\n <ContentHelp\n className={cn(\n 'whitespace-pre-line leading-relaxed max-w-96 text-[13px]'\n )}\n help={helpText}\n >\n <button\n className={cn(\n 'mb-0.5 size-fit p-1 hover:bg-muted rounded-sm',\n className\n )}\n type=\"button\"\n >\n <Info className=\"size-3.5\" />\n </button>\n </ContentHelp>\n )\n );\n};\nexport { InputHelp };\n","'use client';\n\nimport { useId } from 'react';\n\nimport {\n type FieldPath,\n type FieldPathValue,\n type FieldValues,\n type UseControllerProps,\n useFormContext,\n} from 'react-hook-form';\nimport { type Options as MaskOptions, withMask } from 'use-mask-input';\n\nimport { FormField, FormItem, FormMessage } from '@/components/ui/form';\nimport { Input } from '@/components/ui/input';\nimport { InputHelp } from '@/components/ui/input-help';\nimport { Label } from '@/components/ui/label';\n\nimport { cn } from '@/lib/utils';\nimport { type Options, parseAsString, useQueryState } from 'nuqs';\n\ntype Mask =\n | 'datetime'\n | 'email'\n | 'numeric'\n | 'currency'\n | 'decimal'\n | 'integer'\n | 'percentage'\n | 'url'\n | 'ip'\n | 'mac'\n | 'ssn'\n | 'brl-currency'\n | 'cpf'\n | 'cnpj'\n | (string & {})\n | (string[] & {})\n | null;\n\nexport interface InputTextProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n placeholder?: string;\n description?: string;\n className?: string;\n disabled?: boolean;\n type?: string;\n required?: boolean;\n maskRef?: React.ForwardedRef<any>;\n children?: React.ReactNode;\n mask?: Mask;\n maskOptions?: MaskOptions;\n error?: React.ReactNode;\n id?: string;\n detail?: string;\n detailClassName?: string;\n inputClassName?: string;\n help?: string;\n}\n\nfunction InputText({\n label,\n description,\n placeholder,\n className,\n children,\n disabled,\n type,\n required,\n maskRef,\n mask,\n maskOptions,\n error,\n id,\n ref,\n detail,\n detailClassName,\n inputClassName,\n help,\n name,\n ...props\n}: InputTextProps) {\n return (\n <div\n className={cn('w-full flex flex-col gap-1', className)}\n id={`input-${name?.replace('.', '-')}`}\n ref={ref}\n >\n <div className=\"flex items-end gap-1.5\">\n <div className={cn('flex !gap-0 flex-col', className)}>\n {label && (\n <Label\n className={cn(\n error && 'text-destructive',\n className,\n disabled && 'text-muted-foreground',\n 'inline-flex items-center flex-row gap-0.5'\n )}\n htmlFor={id}\n >\n {label}:\n {required && (\n <span className=\"text-red-500 text-lg leading-[1px]\">*</span>\n )}\n </Label>\n )}\n {detail && (\n <Label\n className={cn(\n 'text-sm text-muted-foreground font-normal',\n detailClassName\n )}\n htmlFor={id}\n >\n {detail}\n </Label>\n )}\n </div>\n\n <InputHelp help={help} name={name} />\n </div>\n <div className=\"flex flex-col gap-0.5\">\n <div className=\"relative\">\n <Input\n className={cn(error && 'border-destructive', inputClassName)}\n disabled={disabled}\n id={id}\n placeholder={placeholder}\n ref={\n maskRef ||\n ((mask\n ? withMask(mask, {\n autoUnmask: true,\n ...maskOptions,\n showMaskOnHover: false,\n showMaskOnFocus: false,\n clearMaskOnLostFocus: true,\n })\n : undefined) as any)\n }\n type={type}\n {...props}\n />\n {children}\n </div>\n {description && (\n <p className={cn('text-sm text-muted-foreground', className)}>\n {description}\n </p>\n )}\n {error && error}\n </div>\n </div>\n );\n}\n\nexport interface TextFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> extends UseControllerProps<TFieldValues, TFieldName> {\n disabled?: boolean;\n required?: boolean;\n children?: React.ReactNode;\n defaultValue?: FieldPathValue<TFieldValues, TFieldName>;\n onChange?: (value: string) => Promise<void> | void;\n transform?: (value: string) => string;\n}\n\nconst defaultTransform = (value: string) => value;\n\nfunction TextField<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n name,\n className,\n required,\n defaultValue,\n onChange,\n transform = defaultTransform,\n ...props\n}: TextFieldProps<TFieldValues, TFieldName> &\n Omit<InputTextProps, 'onChange'>) {\n const { control } = useFormContext();\n const id = useId();\n\n return (\n <FormField\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field, fieldState }) => (\n <FormItem className={cn('w-full', className)}>\n <InputText\n {...field}\n {...props}\n disabled={props.disabled}\n error={fieldState?.error && <FormMessage />}\n id={`${id}-${name}`}\n name={name}\n onChange={(e) => {\n field.onChange(transform(e.target.value));\n onChange?.(transform(e.target.value));\n }}\n required={required}\n value={field.value || ''}\n />\n </FormItem>\n )}\n rules={{\n required: required ? 'Campo obrigatório' : false,\n }}\n />\n );\n}\n\nexport interface QueryTextFieldProps extends Omit<InputTextProps, 'onChange'> {\n name: string;\n defaultValue?: string;\n options?: Options;\n onChange?: (value: string) => void;\n}\n\nfunction QueryTextField({\n name,\n defaultValue,\n options,\n ...props\n}: QueryTextFieldProps) {\n const id = useId();\n const [filter, setFilter] = useQueryState(\n name,\n parseAsString\n .withOptions({\n clearOnDefault: true,\n shallow: false,\n limitUrlUpdates: {\n method: 'debounce',\n timeMs: 400,\n },\n ...options,\n })\n .withDefault(defaultValue ?? '')\n );\n\n return (\n <InputText\n id={`${id}-${name}`}\n name={name}\n value={filter}\n {...props}\n onChange={(e) => {\n setFilter(e.target.value);\n props.onChange?.(e.target.value);\n }}\n />\n );\n}\n\nexport { InputText, TextField, QueryTextField };\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,SAAS,MAAM,EACb,UACA,GAAG,SACgD;AACnD,QACE,oBAAC,eAAe;EACd,WAAW,GACT,uNACA,UACD;EACD,aAAU;EACV,GAAI;GACJ;;;;;ACON,MAAM,mBAAmB,MAAM,cAC7B,EAAE,CACH;AAED,MAAM,cAAc,MAAM,cAGvB,EAAE,CAAC;AAEN,MAAa,6BAA6B;CACxC,MAAM,UAAU,MAAM,WAAW,YAAY;AAC7C,KAAI,CAAC,QACH,QAAO,EAAE;AAEX,QAAO;;AAgBT,MAAM,aAGJ,EACA,GAAG,YACuC;AAC1C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAe,MAAM,WAAW,iBAAiB;CACvD,MAAM,cAAc,MAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,YAAY,aAAa,EAAE,MAAM,aAAa,MAAM,CAAC;CAC3D,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;AAE9D,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,iDAAiD;CAGnE,MAAM,EAAE,OAAO;AAEf,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,GAAG;EAClB,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAA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AM;;GAElC"}
|
|
1
|
+
{"version":3,"file":"text-field.js","names":["ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}>","TooltipPortal","InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}>"],"sources":["../src/components/ui/label.tsx","../src/components/ui/form.tsx","../src/components/ui/input.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/content-help.tsx","../src/components/ui/input-help.tsx","../src/components/text-field/TextField.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n className={cn(\n 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n data-slot=\"label\"\n {...props}\n />\n );\n}\n\nexport { Label };\n","'use client';\n\nimport * as React from 'react';\n\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport { Label } from '@/components/ui/label';\n\nimport { cn } from '@/lib/utils';\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>(\n {} as FormFieldContextValue\n);\n\nconst FormContext = React.createContext<{\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n}>({});\n\nexport const useFormContextSubmit = () => {\n const context = React.useContext(FormContext);\n if (!context) {\n return {};\n }\n return context;\n};\n\nconst Form: React.FC<\n React.ComponentProps<typeof FormProvider<FieldValues>> & {\n onSubmit?: (data?: FieldValues) => void;\n helper?: Record<string, string>;\n }\n> = ({ onSubmit, helper, ...props }) => {\n return (\n <FormContext.Provider value={{ onSubmit, helper }}>\n <FormProvider {...props} />\n </FormContext.Provider>\n );\n};\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 } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\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>(\n {} as FormItemContextValue\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n className={cn('flex flex-col gap-1', className)}\n data-slot=\"form-item\"\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n className={cn('data-[error=true]:text-destructive', className)}\n data-error={!!error}\n data-slot=\"form-label\"\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n data-slot=\"form-control\"\n id={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n className={cn('text-muted-foreground text-sm', className)}\n data-slot=\"form-description\"\n id={formDescriptionId}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n className={cn('text-destructive text-xs', className)}\n data-slot=\"form-message\"\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n","import type * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/75 focus-visible:ring-[2px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive ring-offset-[2px] transition-all duration-300',\n className\n )}\n data-slot=\"input\"\n type={type}\n {...props}\n />\n );\n}\n\nexport { Input };\n","'use client';\n\nimport * as React from 'react';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({\n delayDuration = 0,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delayDuration={delayDuration}\n {...props}\n />\n );\n}\n\nfunction Tooltip({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className\n )}\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n","import { Portal as TooltipPortal } from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\nimport { Tooltip, TooltipContent, TooltipTrigger } from './tooltip';\n\nconst ContentHelp: React.FC<{\n children: React.ReactNode;\n help?: React.ReactNode | string;\n className?: string;\n side?: 'top' | 'right' | 'bottom' | 'left';\n sideOffset?: number;\n}> = ({ children, help, className, side = 'top', sideOffset = 10 }) => {\n return help ? (\n <Tooltip delayDuration={250}>\n <TooltipTrigger asChild>{children as any}</TooltipTrigger>\n <TooltipPortal>\n <TooltipContent\n className={cn('flex items-center px-2 leading-none', className)}\n side={side}\n sideOffset={10}\n >\n <p className=\"w-full text-wrap whitespace-break-spaces\">{help}</p>\n </TooltipContent>\n </TooltipPortal>\n </Tooltip>\n ) : (\n children\n );\n};\n\nexport { ContentHelp };\n","'use client';\n\nimport { ContentHelp } from '@/components/ui/content-help';\n\nimport { Info } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { useFormContextSubmit } from './form';\n\nconst InputHelp: React.FC<{\n help?: string;\n name?: string;\n className?: string;\n}> = ({ help, name, className }) => {\n const { helper } = useFormContextSubmit();\n const helpText = (name && helper?.[name]) || help;\n\n return (\n helpText && (\n <ContentHelp\n className={cn(\n 'whitespace-pre-line leading-relaxed max-w-96 text-[13px]'\n )}\n help={helpText}\n >\n <button\n className={cn(\n 'mb-0.5 size-fit p-1 hover:bg-muted rounded-sm',\n className\n )}\n type=\"button\"\n >\n <Info className=\"size-3.5\" />\n </button>\n </ContentHelp>\n )\n );\n};\nexport { InputHelp };\n","'use client';\n\nimport { useId } from 'react';\n\nimport {\n type FieldPath,\n type FieldPathValue,\n type FieldValues,\n type UseControllerProps,\n useFormContext,\n} from 'react-hook-form';\nimport { type Options as MaskOptions, withMask } from 'use-mask-input';\n\nimport { FormField, FormItem, FormMessage } from '@/components/ui/form';\nimport { Input } from '@/components/ui/input';\nimport { InputHelp } from '@/components/ui/input-help';\nimport { Label } from '@/components/ui/label';\n\nimport { cn } from '@/lib/utils';\nimport { type Options, parseAsString, useQueryState } from 'nuqs';\n\ntype Mask =\n | 'datetime'\n | 'email'\n | 'numeric'\n | 'currency'\n | 'decimal'\n | 'integer'\n | 'percentage'\n | 'url'\n | 'ip'\n | 'mac'\n | 'ssn'\n | 'brl-currency'\n | 'cpf'\n | 'cnpj'\n | (string & {})\n | (string[] & {})\n | null;\n\nexport interface InputTextProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n ref?: React.ForwardedRef<HTMLInputElement>;\n label?: string;\n placeholder?: string;\n description?: string;\n className?: string;\n disabled?: boolean;\n type?: string;\n required?: boolean;\n maskRef?: React.ForwardedRef<any>;\n children?: React.ReactNode;\n mask?: Mask;\n maskOptions?: MaskOptions;\n error?: React.ReactNode;\n id?: string;\n detail?: string;\n detailClassName?: string;\n inputClassName?: string;\n help?: string;\n}\n\nfunction InputText({\n label,\n description,\n placeholder,\n className,\n children,\n disabled,\n type,\n required,\n maskRef,\n mask,\n maskOptions,\n error,\n id,\n ref,\n detail,\n detailClassName,\n inputClassName,\n help,\n name,\n ...props\n}: InputTextProps) {\n return (\n <div\n className={cn('w-full flex flex-col gap-1', className)}\n id={`input-${name?.replace('.', '-')}`}\n ref={ref}\n >\n <div className=\"flex items-end gap-1.5\">\n <div className={cn('flex !gap-0 flex-col', className)}>\n {label && (\n <Label\n className={cn(\n error && 'text-destructive',\n className,\n disabled && 'text-muted-foreground',\n 'inline-flex items-center flex-row gap-0.5 leading-none'\n )}\n htmlFor={id}\n >\n {label}:\n {required && (\n <span className=\"text-red-500 text-lg leading-[1px]\">*</span>\n )}\n </Label>\n )}\n {detail && (\n <Label\n className={cn(\n 'text-sm text-muted-foreground font-normal leading-none',\n detailClassName\n )}\n htmlFor={id}\n >\n {detail}\n </Label>\n )}\n </div>\n\n <InputHelp help={help} name={name} />\n </div>\n <div className=\"flex flex-col gap-0.5\">\n <div className=\"relative\">\n <Input\n className={cn(error && 'border-destructive', inputClassName)}\n disabled={disabled}\n id={id}\n placeholder={placeholder}\n ref={\n maskRef ||\n ((mask\n ? withMask(mask, {\n autoUnmask: true,\n ...maskOptions,\n showMaskOnHover: false,\n showMaskOnFocus: false,\n clearMaskOnLostFocus: true,\n })\n : undefined) as any)\n }\n type={type}\n {...props}\n />\n {children}\n </div>\n {description && (\n <p className={cn('text-sm text-muted-foreground', className)}>\n {description}\n </p>\n )}\n {error && error}\n </div>\n </div>\n );\n}\n\nexport interface TextFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> extends UseControllerProps<TFieldValues, TFieldName> {\n disabled?: boolean;\n required?: boolean;\n children?: React.ReactNode;\n defaultValue?: FieldPathValue<TFieldValues, TFieldName>;\n onChange?: (value: string) => Promise<void> | void;\n transform?: (value: string) => string;\n}\n\nconst defaultTransform = (value: string) => value;\n\nfunction TextField<\n TFieldValues extends FieldValues = FieldValues,\n TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n name,\n className,\n required,\n defaultValue,\n onChange,\n transform = defaultTransform,\n ...props\n}: TextFieldProps<TFieldValues, TFieldName> &\n Omit<InputTextProps, 'onChange'>) {\n const { control } = useFormContext();\n const id = useId();\n\n return (\n <FormField\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field, fieldState }) => (\n <FormItem className={cn('w-full', className)}>\n <InputText\n {...field}\n {...props}\n disabled={props.disabled}\n error={fieldState?.error && <FormMessage />}\n id={`${id}-${name}`}\n name={name}\n onChange={(e) => {\n field.onChange(transform(e.target.value));\n onChange?.(transform(e.target.value));\n }}\n required={required}\n value={field.value || ''}\n />\n </FormItem>\n )}\n rules={{\n required: required ? 'Campo obrigatório' : false,\n }}\n />\n );\n}\n\nexport interface QueryTextFieldProps extends Omit<InputTextProps, 'onChange'> {\n name: string;\n defaultValue?: string;\n options?: Options;\n onChange?: (value: string) => void;\n}\n\nfunction QueryTextField({\n name,\n defaultValue,\n options,\n ...props\n}: QueryTextFieldProps) {\n const id = useId();\n const [filter, setFilter] = useQueryState(\n name,\n parseAsString\n .withOptions({\n clearOnDefault: true,\n shallow: false,\n limitUrlUpdates: {\n method: 'debounce',\n timeMs: 400,\n },\n ...options,\n })\n .withDefault(defaultValue ?? '')\n );\n\n return (\n <InputText\n id={`${id}-${name}`}\n name={name}\n value={filter}\n {...props}\n onChange={(e) => {\n setFilter(e.target.value);\n props.onChange?.(e.target.value);\n }}\n />\n );\n}\n\nexport { InputText, TextField, QueryTextField };\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,SAAS,MAAM,EACb,UACA,GAAG,SACgD;AACnD,QACE,oBAAC,eAAe;EACd,WAAW,GACT,uNACA,UACD;EACD,aAAU;EACV,GAAI;GACJ;;;;;ACON,MAAM,mBAAmB,MAAM,cAC7B,EAAE,CACH;AAED,MAAM,cAAc,MAAM,cAGvB,EAAE,CAAC;AAEN,MAAa,6BAA6B;CACxC,MAAM,UAAU,MAAM,WAAW,YAAY;AAC7C,KAAI,CAAC,QACH,QAAO,EAAE;AAEX,QAAO;;AAgBT,MAAM,aAGJ,EACA,GAAG,YACuC;AAC1C,QACE,oBAAC,iBAAiB;EAAS,OAAO,EAAE,MAAM,MAAM,MAAM;YACpD,oBAAC,cAAW,GAAI,QAAS;GACC;;AAIhC,MAAM,qBAAqB;CACzB,MAAM,eAAe,MAAM,WAAW,iBAAiB;CACvD,MAAM,cAAc,MAAM,WAAW,gBAAgB;CACrD,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,YAAY,aAAa,EAAE,MAAM,aAAa,MAAM,CAAC;CAC3D,MAAM,aAAa,cAAc,aAAa,MAAM,UAAU;AAE9D,KAAI,CAAC,aACH,OAAM,IAAI,MAAM,iDAAiD;CAGnE,MAAM,EAAE,OAAO;AAEf,QAAO;EACL;EACA,MAAM,aAAa;EACnB,YAAY,GAAG,GAAG;EAClB,mBAAmB,GAAG,GAAG;EACzB,eAAe,GAAG,GAAG;EACrB,GAAG;EACJ;;AAOH,MAAM,kBAAkB,MAAM,cAC5B,EAAE,CACH;AAED,SAAS,SAAS,EAAE,UAAW,GAAG,SAAsC;CACtE,MAAM,KAAK,MAAM,OAAO;AAExB,QACE,oBAAC,gBAAgB;EAAS,OAAO,EAAE,IAAI;YACrC,oBAAC;GACC,WAAW,GAAG,uBAAuB,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;GACF;;AAgBV,MAAM,oBAAoB,UAAkB;AAE5C,SAAS,UAGP,EACA,MACA,WACA,UACA,cACA,UACA,YAAY,iBACZ,GAAG,SAE+B;CAClC,MAAM,EAAE,YAAY,gBAAgB;CACpC,MAAM,KAAK,OAAO;AAElB,QACE,oBAAC;EACU;EACK;EACR;EACN,SAAS,EAAE,OAAO,iBAChB,oBAAC;GAAS,WAAW,GAAG,UAAU,UAAU;aAC1C,oBAAC;IACC,GAAI;IACJ,GAAI;IACJ,UAAU,MAAM;IAChB,OAAO,YAAY,SAAS,oBAAC,gBAAc;IAC3C,IAAI,GAAG,GAAG,GAAG;IACP;IACN,WAAW,MAAM;AACf,WAAM,SAAS,UAAU,EAAE,OAAO,MAAM,CAAC;AACzC,gBAAW,UAAU,EAAE,OAAO,MAAM,CAAC;;IAE7B;IACV,OAAO,MAAM,SAAS;KACtB;IACO;EAEb,OAAO,EACL,UAAU,WAAW,sBAAsB,OAC5C;GACD;;AAWN,SAAS,eAAe,EACtB,MACA,cACA,QACA,GAAG,SACmB;CACtB,MAAM,KAAK,OAAO;CAClB,MAAM,CAAC,QAAQ,aAAa,cAC1B,MACA,cACG,YAAY;EACX,gBAAgB;EAChB,SAAS;EACT,iBAAiB;GACf,QAAQ;GACR,QAAQ;GACT;EACD,GAAG;EACJ,CAAC,CACD,YAAY,gBAAgB,GAAG,CACnC;AAED,QACE,oBAAC;EACC,IAAI,GAAG,GAAG,GAAG;EACP;EACN,OAAO;EACP,GAAI;EACJ,WAAW,MAAM;AACf,aAAU,EAAE,OAAO,MAAM;AACzB,SAAM,WAAW,EAAE,OAAO,MAAM;;GAElC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maquinaweb-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "A minimal React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts"
|
|
10
|
-
},
|
|
11
8
|
"./text-field": {
|
|
12
9
|
"import": "./dist/text-field.js",
|
|
13
10
|
"types": "./dist/text-field.d.ts"
|
|
@@ -109,21 +106,5 @@
|
|
|
109
106
|
},
|
|
110
107
|
"publishConfig": {
|
|
111
108
|
"access": "public"
|
|
112
|
-
},
|
|
113
|
-
"main": "./dist/index.d.ts",
|
|
114
|
-
"types": "./dist/index.d.ts",
|
|
115
|
-
"typings": "./dist/index.d.ts",
|
|
116
|
-
"typesVersions": {
|
|
117
|
-
"*": {
|
|
118
|
-
"text-field": [
|
|
119
|
-
"./dist/text-field.d.ts"
|
|
120
|
-
],
|
|
121
|
-
"container-animation": [
|
|
122
|
-
"./dist/container-animation.d.ts"
|
|
123
|
-
],
|
|
124
|
-
"split-text-poor": [
|
|
125
|
-
"./dist/split-text-poor.d.ts"
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
109
|
}
|
|
129
110
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Auto-generated type declarations for IDE auto-import support
|
|
2
|
-
// Components must be imported from their specific subpaths:
|
|
3
|
-
// Example: import { SplitTextPoor } from 'maquinaweb-ui/split-text-poor'
|
|
4
|
-
//
|
|
5
|
-
// DO NOT import from 'maquinaweb-ui' directly - there is no default export.
|
|
6
|
-
// The package exports only subpaths for optimal tree-shaking.
|
|
7
|
-
|
|
8
|
-
// Module declarations for auto-import discovery
|
|
9
|
-
declare module "maquinaweb-ui/text-field" {
|
|
10
|
-
export { InputText } from "maquinaweb-ui/dist/text-field";
|
|
11
|
-
export { InputTextProps } from "maquinaweb-ui/dist/text-field";
|
|
12
|
-
export { QueryTextField } from "maquinaweb-ui/dist/text-field";
|
|
13
|
-
export { QueryTextFieldProps } from "maquinaweb-ui/dist/text-field";
|
|
14
|
-
export { TextField } from "maquinaweb-ui/dist/text-field";
|
|
15
|
-
export { TextFieldProps } from "maquinaweb-ui/dist/text-field";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare module "maquinaweb-ui/container-animation" {
|
|
19
|
-
export { ContainerAnimation } from "maquinaweb-ui/dist/container-animation";
|
|
20
|
-
export { ContainerAnimationProps } from "maquinaweb-ui/dist/container-animation";
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
declare module "maquinaweb-ui/split-text-poor" {
|
|
24
|
-
export { SplitTextPoor } from "maquinaweb-ui/dist/split-text-poor";
|
|
25
|
-
export { SplitTextPoorProps } from "maquinaweb-ui/dist/split-text-poor";
|
|
26
|
-
}
|