maquinaweb-ui 2.16.0 → 2.16.2
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/container-animation.js +1 -1
- package/dist/{input-help-DDUMkr-D.js → input-help-BJr1B5ZZ.js} +3 -3
- package/dist/{input-help-DDUMkr-D.js.map → input-help-BJr1B5ZZ.js.map} +1 -1
- package/dist/input-suggest.d.ts +2 -2
- package/dist/input-suggest.js +3 -3
- package/dist/{label-Dv2z7Q8q.js → label-BqtcCyMj.js} +2 -2
- package/dist/{label-Dv2z7Q8q.js.map → label-BqtcCyMj.js.map} +1 -1
- package/dist/split-text-poor.js +1 -1
- package/dist/text-field.d.ts +5 -5
- package/dist/text-field.js +33 -4
- package/dist/text-field.js.map +1 -1
- package/dist/toggle-field.d.ts.map +1 -1
- package/dist/toggle-field.js +7 -1133
- package/dist/toggle-field.js.map +1 -1
- package/dist/{utils-1eFZwGI2.js → utils-C0f9Ma6r.js} +1 -1
- package/dist/{utils-1eFZwGI2.js.map → utils-C0f9Ma6r.js.map} +1 -1
- package/package.json +5 -4
- package/dist/chunk-BLXvPPr8.js +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ElementType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { ContainerAnimation, type ContainerAnimationProps };
|
|
29
29
|
//# sourceMappingURL=container-animation.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
2
|
-
import { Label } from "./label-
|
|
1
|
+
import { cn } from "./utils-C0f9Ma6r.js";
|
|
2
|
+
import { Label } from "./label-BqtcCyMj.js";
|
|
3
3
|
import { Controller, useFormContext, useFormState } from "react-hook-form";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -154,4 +154,4 @@ const InputHelp = ({ help, name, className }) => {
|
|
|
154
154
|
|
|
155
155
|
//#endregion
|
|
156
156
|
export { FormField, FormItem, FormLabel, FormMessage, Input, InputHelp };
|
|
157
|
-
//# sourceMappingURL=input-help-
|
|
157
|
+
//# sourceMappingURL=input-help-BJr1B5ZZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-help-DDUMkr-D.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/form.tsx","../src/components/ui/input.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/content-help.tsx","../src/components/ui/input-help.tsx"],"sourcesContent":["'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"],"mappings":";;;;;;;;;;;AA2BA,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,O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}
|
|
1
|
+
{"version":3,"file":"input-help-BJr1B5ZZ.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/form.tsx","../src/components/ui/input.tsx","../src/components/ui/tooltip.tsx","../src/components/ui/content-help.tsx","../src/components/ui/input-help.tsx"],"sourcesContent":["'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"],"mappings":";;;;;;;;;;;AA2BA,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,SAA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C,iBAAiB;EAChB,WAAW,GACT,qaACA,UACD;EACD,aAAU;EACE;EACZ,GAAI;aAEH,UACD,oBAAC,iBAAiB,SAAM,WAAU,uGAAuG;GAChH,GACH;;;;;ACpD9B,MAAMA,eAMA,EAAE,UAAU,MAAM,WAAW,OAAO,OAAO,aAAa,SAAS;AACrE,QAAO,OACL,qBAAC;EAAQ,eAAe;aACtB,oBAAC;GAAe;GAAS;IAAiC,EAC1D,oBAACC,oBACC,oBAAC;GACC,WAAW,GAAG,uCAAuC,UAAU;GACzD;GACN,YAAY;aAEZ,oBAAC;IAAE,WAAU;cAA4C;KAAS;IACnD,GACH;GACR,GAEV;;;;;ACjBJ,MAAMC,aAIA,EAAE,MAAM,MAAM,gBAAgB;CAClC,MAAM,EAAE,WAAW,sBAAsB;CACzC,MAAM,WAAY,QAAQ,SAAS,SAAU;AAE7C,QACE,YACE,oBAAC;EACC,WAAW,GACT,2DACD;EACD,MAAM;YAEN,oBAAC;GACC,WAAW,GACT,iDACA,UACD;GACD,MAAK;aAEL,oBAAC,QAAK,WAAU,aAAa;IACtB;GACG"}
|
package/dist/input-suggest.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
2
|
import { Dispatch, SetStateAction } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
4
4
|
import { Mask, Options } from "use-mask-input";
|
|
5
5
|
import { PopoverProps } from "@radix-ui/react-popover";
|
|
6
6
|
|
|
@@ -64,7 +64,7 @@ declare function InputSuggest<TFieldValues extends FieldValues = FieldValues, TF
|
|
|
64
64
|
children,
|
|
65
65
|
initialParams,
|
|
66
66
|
...props
|
|
67
|
-
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps):
|
|
67
|
+
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime4.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { InputSuggest, type InputSuggestProps };
|
|
70
70
|
//# sourceMappingURL=input-suggest.d.ts.map
|
package/dist/input-suggest.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { cn } from "./utils-
|
|
5
|
-
import "./label-
|
|
6
|
-
import { FormItem, FormLabel, FormMessage, Input, InputHelp } from "./input-help-
|
|
4
|
+
import { cn } from "./utils-C0f9Ma6r.js";
|
|
5
|
+
import "./label-BqtcCyMj.js";
|
|
6
|
+
import { FormItem, FormLabel, FormMessage, Input, InputHelp } from "./input-help-BJr1B5ZZ.js";
|
|
7
7
|
import { useController, useFormContext } from "react-hook-form";
|
|
8
8
|
import { useCallback, useEffect, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from "./utils-
|
|
1
|
+
import { cn } from "./utils-C0f9Ma6r.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -14,4 +14,4 @@ function Label({ className,...props }) {
|
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Label };
|
|
17
|
-
//# sourceMappingURL=label-
|
|
17
|
+
//# sourceMappingURL=label-BqtcCyMj.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-
|
|
1
|
+
{"version":3,"file":"label-BqtcCyMj.js","names":[],"sources":["../src/components/ui/label.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"],"mappings":";;;;;;AAQA,SAAS,MAAM,EACb,UACA,GAAG,SACgD;AACnD,QACE,oBAAC,eAAe;EACd,WAAW,GACT,uNACA,UACD;EACD,aAAU;EACV,GAAI;GACJ"}
|
package/dist/split-text-poor.js
CHANGED
package/dist/text-field.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldPathValue, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
import { Options } from "use-mask-input";
|
|
4
4
|
import { Options as Options$1 } from "nuqs";
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ declare function CookieTextField({
|
|
|
12
12
|
name,
|
|
13
13
|
maxAge,
|
|
14
14
|
...inputProps
|
|
15
|
-
}: CookieTextFieldProps):
|
|
15
|
+
}: CookieTextFieldProps): react_jsx_runtime2.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/components/text-field/TextField.d.ts
|
|
18
18
|
type Mask$1 = 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
|
|
@@ -64,7 +64,7 @@ declare function InputText({
|
|
|
64
64
|
name,
|
|
65
65
|
onChange,
|
|
66
66
|
...props
|
|
67
|
-
}: InputTextProps):
|
|
67
|
+
}: InputTextProps): react_jsx_runtime2.JSX.Element;
|
|
68
68
|
interface TextFieldProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends UseControllerProps<TFieldValues, TFieldName> {
|
|
69
69
|
disabled?: boolean;
|
|
70
70
|
required?: boolean;
|
|
@@ -81,7 +81,7 @@ declare function TextField<TFieldValues extends FieldValues = FieldValues, TFiel
|
|
|
81
81
|
onChange,
|
|
82
82
|
transform,
|
|
83
83
|
...props
|
|
84
|
-
}: TextFieldProps<TFieldValues, TFieldName> & Omit<InputTextProps, 'onChange'>):
|
|
84
|
+
}: TextFieldProps<TFieldValues, TFieldName> & Omit<InputTextProps, 'onChange'>): react_jsx_runtime2.JSX.Element;
|
|
85
85
|
interface QueryTextFieldProps extends Omit<InputTextProps, 'onChange'> {
|
|
86
86
|
name: string;
|
|
87
87
|
defaultValue?: string;
|
|
@@ -93,7 +93,7 @@ declare function QueryTextField({
|
|
|
93
93
|
defaultValue,
|
|
94
94
|
options,
|
|
95
95
|
...props
|
|
96
|
-
}: QueryTextFieldProps):
|
|
96
|
+
}: QueryTextFieldProps): react_jsx_runtime2.JSX.Element;
|
|
97
97
|
//#endregion
|
|
98
98
|
export { CookieTextField, type CookieTextFieldProps, InputText, type InputTextProps, QueryTextField, type QueryTextFieldProps, TextField, type TextFieldProps };
|
|
99
99
|
//# sourceMappingURL=text-field.d.ts.map
|
package/dist/text-field.js
CHANGED
|
@@ -1,16 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { FormField, FormItem, FormMessage, Input, InputHelp } from "./input-help-DDUMkr-D.js";
|
|
4
|
+
import { cn } from "./utils-C0f9Ma6r.js";
|
|
5
|
+
import { Label } from "./label-BqtcCyMj.js";
|
|
6
|
+
import { FormField, FormItem, FormMessage, Input, InputHelp } from "./input-help-BJr1B5ZZ.js";
|
|
8
7
|
import { useFormContext } from "react-hook-form";
|
|
9
8
|
import { useEffect, useId, useState } from "react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { withMask } from "use-mask-input";
|
|
12
11
|
import { parseAsString, useQueryState } from "nuqs";
|
|
13
12
|
|
|
13
|
+
//#region rolldown:runtime
|
|
14
|
+
var __create = Object.create;
|
|
15
|
+
var __defProp = Object.defineProperty;
|
|
16
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
17
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
18
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
19
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
20
|
+
var __commonJS = (cb, mod) => function() {
|
|
21
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
22
|
+
};
|
|
23
|
+
var __copyProps = (to, from, except, desc) => {
|
|
24
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
25
|
+
key = keys[i];
|
|
26
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
27
|
+
get: ((k) => from[k]).bind(null, key),
|
|
28
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
34
|
+
value: mod,
|
|
35
|
+
enumerable: true
|
|
36
|
+
}) : target, mod));
|
|
37
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
38
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
39
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
14
43
|
//#region node_modules/cookies-next/lib/common/types.js
|
|
15
44
|
var require_types = /* @__PURE__ */ __commonJS({ "node_modules/cookies-next/lib/common/types.js": ((exports) => {
|
|
16
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|