@skybin-tech/nebula-ui 0.0.1 → 0.0.3
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/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/cjs/_virtual/index.cjs +6 -0
- package/dist/cjs/_virtual/index.cjs.map +1 -0
- package/dist/cjs/_virtual/index2.cjs +5 -0
- package/dist/cjs/_virtual/index2.cjs.map +1 -0
- package/dist/cjs/_virtual/use-sync-external-store-shim.development.cjs +5 -0
- package/dist/cjs/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/cjs/_virtual/use-sync-external-store-shim.production.cjs +5 -0
- package/dist/cjs/_virtual/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/cjs/components/ui/avatar.cjs +60 -0
- package/dist/cjs/components/ui/avatar.cjs.map +1 -0
- package/dist/cjs/components/ui/badge.cjs +28 -0
- package/dist/cjs/components/ui/badge.cjs.map +1 -0
- package/dist/cjs/components/ui/card.cjs +82 -0
- package/dist/cjs/components/ui/card.cjs.map +1 -0
- package/dist/cjs/components/ui/dropdown-menu.cjs +169 -0
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/cjs/components/ui/separator.cjs +42 -0
- package/dist/cjs/components/ui/separator.cjs.map +1 -0
- package/dist/cjs/index.cjs +32 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/ui/avatar.js +43 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.js +28 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/card.js +65 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/dropdown-menu.js +152 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/separator.js +25 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/package.json +96 -23
- package/dist/components/Button/Button.d.ts +0 -18
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/index.d.ts +0 -3
- package/dist/components/Button/index.d.ts.map +0 -1
- package/dist/components/Form/Checkbox.d.ts +0 -32
- package/dist/components/Form/Checkbox.d.ts.map +0 -1
- package/dist/components/Form/Form.d.ts +0 -62
- package/dist/components/Form/Form.d.ts.map +0 -1
- package/dist/components/Form/Radio.d.ts +0 -80
- package/dist/components/Form/Radio.d.ts.map +0 -1
- package/dist/components/Form/Select.d.ts +0 -75
- package/dist/components/Form/Select.d.ts.map +0 -1
- package/dist/components/Form/Switch.d.ts +0 -34
- package/dist/components/Form/Switch.d.ts.map +0 -1
- package/dist/components/Form/TextArea.d.ts +0 -47
- package/dist/components/Form/TextArea.d.ts.map +0 -1
- package/dist/components/Form/TextBox.d.ts +0 -61
- package/dist/components/Form/TextBox.d.ts.map +0 -1
- package/dist/components/Form/context.d.ts +0 -107
- package/dist/components/Form/context.d.ts.map +0 -1
- package/dist/components/Form/hooks.d.ts +0 -21
- package/dist/components/Form/hooks.d.ts.map +0 -1
- package/dist/components/Form/index.d.ts +0 -18
- package/dist/components/Form/index.d.ts.map +0 -1
- package/dist/components/Input/Input.d.ts +0 -18
- package/dist/components/Input/Input.d.ts.map +0 -1
- package/dist/components/Input/index.d.ts +0 -3
- package/dist/components/Input/index.d.ts.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -5
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts +0 -16
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -11
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -6
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts +0 -14
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -11
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/hooks/useDebounce.d.ts +0 -8
- package/dist/hooks/useDebounce.d.ts.map +0 -1
- package/dist/hooks/useToggle.d.ts +0 -7
- package/dist/hooks/useToggle.d.ts.map +0 -1
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/cn.d.ts +0 -7
- package/dist/utils/cn.d.ts.map +0 -1
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import type * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
|
-
declare const checkboxSizeVariants: (props?: ({
|
|
6
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface CheckboxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, "name" | "checked" | "onCheckedChange" | "required">, VariantProps<typeof checkboxSizeVariants> {
|
|
9
|
-
/** Field name - required for form integration */
|
|
10
|
-
name: TName;
|
|
11
|
-
/** Label text for the checkbox */
|
|
12
|
-
label?: ReactNode;
|
|
13
|
-
/** Helper text displayed below the checkbox */
|
|
14
|
-
helperText?: string;
|
|
15
|
-
/** Whether to show the error message */
|
|
16
|
-
showError?: boolean;
|
|
17
|
-
/** Custom error message (overrides form error) */
|
|
18
|
-
error?: string;
|
|
19
|
-
/** External control (for use outside Form) */
|
|
20
|
-
control?: Control<TFieldValues>;
|
|
21
|
-
/** Variant style */
|
|
22
|
-
variant?: "default" | "error";
|
|
23
|
-
/** Field is required (must be checked) */
|
|
24
|
-
required?: boolean | string;
|
|
25
|
-
/** Custom validation function */
|
|
26
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
27
|
-
}
|
|
28
|
-
export declare const Checkbox: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: CheckboxProps<TFieldValues, TName> & {
|
|
29
|
-
ref?: React.ForwardedRef<React.ElementRef<typeof CheckboxPrimitive.Root>>;
|
|
30
|
-
}) => React.ReactElement;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,KAAK,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAEnE,QAAA,MAAM,oBAAoB;;8EAczB,CAAC;AAsBF,MAAM,WAAW,aAAa,CAC5B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAC/D,SAAQ,IAAI,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,GAAG,UAAU,CAAC,EACxH,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC3C,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;IACZ,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAChC,oBAAoB;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAG9B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CAC7E;AAmJD,eAAO,MAAM,QAAQ,EAAgC,CACnD,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAE/D,KAAK,EAAE,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAA;CAAE,KACtH,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { UseFormReturn, FieldValues, UseFormProps, SubmitHandler, SubmitErrorHandler, Resolver } from 'react-hook-form';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { FormConfig } from './context';
|
|
5
|
-
/**
|
|
6
|
-
* Props for the Form component
|
|
7
|
-
*/
|
|
8
|
-
export interface FormProps<TFieldValues extends FieldValues = FieldValues, TContext = unknown> extends Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "onError"> {
|
|
9
|
-
/** Base Zod schema for validation (will be extended by field props) */
|
|
10
|
-
schema?: z.ZodType<TFieldValues, any, any>;
|
|
11
|
-
/** Default values for the form */
|
|
12
|
-
defaultValues?: UseFormProps<TFieldValues, TContext>["defaultValues"];
|
|
13
|
-
/** Values to reset the form to */
|
|
14
|
-
values?: UseFormProps<TFieldValues, TContext>["values"];
|
|
15
|
-
/** Submit handler */
|
|
16
|
-
onSubmit?: SubmitHandler<TFieldValues>;
|
|
17
|
-
/** Error handler */
|
|
18
|
-
onError?: SubmitErrorHandler<TFieldValues>;
|
|
19
|
-
/** Form configuration */
|
|
20
|
-
config?: FormConfig;
|
|
21
|
-
/** Children */
|
|
22
|
-
children?: ReactNode;
|
|
23
|
-
/** External form instance (for controlled forms) */
|
|
24
|
-
form?: UseFormReturn<TFieldValues>;
|
|
25
|
-
/** Validation mode */
|
|
26
|
-
mode?: UseFormProps<TFieldValues, TContext>["mode"];
|
|
27
|
-
/** Revalidation mode */
|
|
28
|
-
reValidateMode?: UseFormProps<TFieldValues, TContext>["reValidateMode"];
|
|
29
|
-
/** Custom resolver (overrides schema) */
|
|
30
|
-
resolver?: Resolver<TFieldValues>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Form component that provides form context and validation
|
|
34
|
-
*
|
|
35
|
-
* Child components like TextBox can register their validation rules automatically.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* // Validation is automatically built from component props
|
|
40
|
-
* <Form onSubmit={handleSubmit} defaultValues={{ username: "", email: "" }}>
|
|
41
|
-
* <TextBox name="username" label="Username" required minLength={3} maxLength={50} />
|
|
42
|
-
* <TextBox name="email" label="Email" type="email" required email />
|
|
43
|
-
* <Button type="submit">Submit</Button>
|
|
44
|
-
* </Form>
|
|
45
|
-
*
|
|
46
|
-
* // Or with a base schema that gets extended
|
|
47
|
-
* const baseSchema = z.object({
|
|
48
|
-
* username: z.string(),
|
|
49
|
-
* email: z.string(),
|
|
50
|
-
* });
|
|
51
|
-
*
|
|
52
|
-
* <Form schema={baseSchema} onSubmit={handleSubmit}>
|
|
53
|
-
* <TextBox name="username" required minLength={3} /> // Adds required + minLength
|
|
54
|
-
* <TextBox name="email" required email /> // Adds required + email validation
|
|
55
|
-
* </Form>
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
export declare function Form<TFieldValues extends FieldValues = FieldValues, TContext = unknown>({ schema: baseSchema, defaultValues, values, onSubmit, onError, config, children, form: externalForm, mode, reValidateMode, resolver: customResolver, ...formProps }: FormProps<TFieldValues, TContext>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export declare namespace Form {
|
|
60
|
-
var displayName: string;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,WAAW,SAAS,CACxB,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,OAAO,CAClB,SAAQ,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAA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AS,EACb,EAAE,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,2CAqGnC;yBArHe,IAAI"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import type * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
5
|
-
declare const radioSizeVariants: (props?: ({
|
|
6
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface RadioOption {
|
|
9
|
-
label: ReactNode;
|
|
10
|
-
value: string | number;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface RadioGroupProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends VariantProps<typeof radioSizeVariants> {
|
|
14
|
-
/** Field name - required for form integration */
|
|
15
|
-
name: TName;
|
|
16
|
-
/** Label text for the radio group */
|
|
17
|
-
label?: string;
|
|
18
|
-
/** Helper text displayed below the radio group */
|
|
19
|
-
helperText?: string;
|
|
20
|
-
/** Whether to show the error message */
|
|
21
|
-
showError?: boolean;
|
|
22
|
-
/** Custom error message (overrides form error) */
|
|
23
|
-
error?: string;
|
|
24
|
-
/** Options for the radio group */
|
|
25
|
-
options?: RadioOption[];
|
|
26
|
-
/** Layout direction */
|
|
27
|
-
direction?: "horizontal" | "vertical";
|
|
28
|
-
/** External control (for use outside Form) */
|
|
29
|
-
control?: Control<TFieldValues>;
|
|
30
|
-
/** Children (alternative to options prop) */
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
/** Disabled state */
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
/** Additional class name */
|
|
35
|
-
className?: string;
|
|
36
|
-
/** Variant style */
|
|
37
|
-
variant?: "default" | "error";
|
|
38
|
-
/** Field is required */
|
|
39
|
-
required?: boolean | string;
|
|
40
|
-
/** Custom validation function */
|
|
41
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* RadioGroup component with form integration
|
|
45
|
-
*
|
|
46
|
-
* This is a wrapper around the shadcn/ui RadioGroup primitive that adds:
|
|
47
|
-
* - Form integration with react-hook-form
|
|
48
|
-
* - Automatic validation registration
|
|
49
|
-
* - Label, helper text, and error message support
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```tsx
|
|
53
|
-
* // Inside a Form component
|
|
54
|
-
* <RadioGroup
|
|
55
|
-
* name="gender"
|
|
56
|
-
* label="Gender"
|
|
57
|
-
* required
|
|
58
|
-
* options={[
|
|
59
|
-
* { label: "Male", value: "male" },
|
|
60
|
-
* { label: "Female", value: "female" },
|
|
61
|
-
* { label: "Other", value: "other" },
|
|
62
|
-
* ]}
|
|
63
|
-
* />
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
export declare function RadioGroup<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, helperText, showError, error: customError, size, variant, options, direction, control: externalControl, children, disabled, className, required, validate, }: RadioGroupProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
67
|
-
export declare namespace RadioGroup {
|
|
68
|
-
var displayName: string;
|
|
69
|
-
}
|
|
70
|
-
export interface RadioItemProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "value">, VariantProps<typeof radioSizeVariants> {
|
|
71
|
-
/** Value for this radio option */
|
|
72
|
-
value: string | number;
|
|
73
|
-
/** Label for this radio option */
|
|
74
|
-
children?: ReactNode;
|
|
75
|
-
/** Variant style */
|
|
76
|
-
variant?: "default" | "error";
|
|
77
|
-
}
|
|
78
|
-
export declare const RadioItem: import('react').ForwardRefExoticComponent<RadioItemProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
79
|
-
export {};
|
|
80
|
-
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Radio.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,KAAK,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,iBAAiB;;8EActB,CAAC;AA4BF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe,CAC9B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAC/D,SAAQ,YAAY,CAAC,OAAO,iBAAiB,CAAC;IAC9C,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,uBAAuB;IACvB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAA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eAAO,MAAM,SAAS,8GAA6B,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const selectSizeVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface SelectOption {
|
|
8
|
-
label: string;
|
|
9
|
-
value: string | number;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface SelectProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends VariantProps<typeof selectSizeVariants> {
|
|
13
|
-
/** Field name - required for form integration */
|
|
14
|
-
name: TName;
|
|
15
|
-
/** Label text for the select */
|
|
16
|
-
label?: string;
|
|
17
|
-
/** Helper text displayed below the select */
|
|
18
|
-
helperText?: string;
|
|
19
|
-
/** Whether to show the error message */
|
|
20
|
-
showError?: boolean;
|
|
21
|
-
/** Custom error message (overrides form error) */
|
|
22
|
-
error?: string;
|
|
23
|
-
/** Whether the select should take full width */
|
|
24
|
-
fullWidth?: boolean;
|
|
25
|
-
/** Options for the select */
|
|
26
|
-
options?: SelectOption[];
|
|
27
|
-
/** Placeholder text */
|
|
28
|
-
placeholder?: string;
|
|
29
|
-
/** Allow clear selection */
|
|
30
|
-
allowClear?: boolean;
|
|
31
|
-
/** External control (for use outside Form) */
|
|
32
|
-
control?: Control<TFieldValues>;
|
|
33
|
-
/** Children (alternative to options prop) */
|
|
34
|
-
children?: ReactNode;
|
|
35
|
-
/** Disabled state */
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
/** Additional class name */
|
|
38
|
-
className?: string;
|
|
39
|
-
/** ID for the select */
|
|
40
|
-
id?: string;
|
|
41
|
-
/** Variant style */
|
|
42
|
-
variant?: "default" | "error" | "success";
|
|
43
|
-
/** Field is required */
|
|
44
|
-
required?: boolean | string;
|
|
45
|
-
/** Custom validation function */
|
|
46
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Select component with form integration
|
|
50
|
-
*
|
|
51
|
-
* This is a wrapper around the shadcn/ui Select primitive that adds:
|
|
52
|
-
* - Form integration with react-hook-form
|
|
53
|
-
* - Automatic validation registration
|
|
54
|
-
* - Label, helper text, and error message support
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* ```tsx
|
|
58
|
-
* // Inside a Form component
|
|
59
|
-
* <Select
|
|
60
|
-
* name="country"
|
|
61
|
-
* label="Country"
|
|
62
|
-
* required
|
|
63
|
-
* options={[
|
|
64
|
-
* { label: "USA", value: "us" },
|
|
65
|
-
* { label: "Canada", value: "ca" },
|
|
66
|
-
* ]}
|
|
67
|
-
* />
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
export declare function Select<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ name, label, helperText, showError, error: customError, size, variant, fullWidth, className, disabled, options, placeholder, allowClear, id: providedId, control: externalControl, children, required, validate, }: SelectProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
71
|
-
export declare namespace Select {
|
|
72
|
-
var displayName: string;
|
|
73
|
-
}
|
|
74
|
-
export {};
|
|
75
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,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C,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CAC7E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,MAAM,CACpB,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,EACA,IAAI,EACJ,KAAK,EACL,UAAU,EACV,SAAgB,EAChB,KAAK,EAAE,WAAW,EAClB,IAAI,EACJ,OAAO,EACP,SAAgB,EAChB,SAAS,EACT,QAAQ,EACR,OAAY,EACZ,WAAW,EACX,UAAU,EACV,EAAE,EAAE,UAAU,EACd,OAAO,EAAE,eAAe,EACxB,QAAQ,EAER,QAAQ,EACR,QAAQ,GACT,EAAE,WAAW,CAAC,YAAY,EAAE,KAAK,CAAC,2CAkIlC;yBAzJe,MAAM"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
import type * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
|
-
declare const switchSizeVariants: (props?: ({
|
|
6
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface SwitchProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, "name" | "checked" | "onCheckedChange" | "required">, VariantProps<typeof switchSizeVariants> {
|
|
9
|
-
/** Field name - required for form integration */
|
|
10
|
-
name: TName;
|
|
11
|
-
/** Label text for the switch */
|
|
12
|
-
label?: ReactNode;
|
|
13
|
-
/** Helper text displayed below the switch */
|
|
14
|
-
helperText?: string;
|
|
15
|
-
/** Whether to show the error message */
|
|
16
|
-
showError?: boolean;
|
|
17
|
-
/** Custom error message (overrides form error) */
|
|
18
|
-
error?: string;
|
|
19
|
-
/** External control (for use outside Form) */
|
|
20
|
-
control?: Control<TFieldValues>;
|
|
21
|
-
/** Text to show when checked */
|
|
22
|
-
checkedText?: ReactNode;
|
|
23
|
-
/** Text to show when unchecked */
|
|
24
|
-
uncheckedText?: ReactNode;
|
|
25
|
-
/** Field is required (must be on) */
|
|
26
|
-
required?: boolean | string;
|
|
27
|
-
/** Custom validation function */
|
|
28
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
29
|
-
}
|
|
30
|
-
export declare const Switch: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: SwitchProps<TFieldValues, TName> & {
|
|
31
|
-
ref?: React.ForwardedRef<React.ElementRef<typeof SwitchPrimitives.Root>>;
|
|
32
|
-
}) => React.ReactElement;
|
|
33
|
-
export {};
|
|
34
|
-
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,KAAK,KAAK,gBAAgB,MAAM,wBAAwB,CAAC;AAEhE,QAAA,MAAM,kBAAkB;;8EAcvB,CAAC;AAiBF,MAAM,WAAW,WAAW,CAC1B,YAAY,SAAS,WAAW,G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AAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const textAreaSizeVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
variant?: "error" | "success" | "default" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Validation rule with optional custom message
|
|
10
|
-
*/
|
|
11
|
-
type ValidationRule<T> = T | {
|
|
12
|
-
value: T;
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
export interface TextAreaProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "name" | "required" | "minLength" | "maxLength">, VariantProps<typeof textAreaSizeVariants> {
|
|
16
|
-
/** Field name - required for form integration */
|
|
17
|
-
name: TName;
|
|
18
|
-
/** Label text for the textarea */
|
|
19
|
-
label?: string;
|
|
20
|
-
/** Helper text displayed below the textarea */
|
|
21
|
-
helperText?: string;
|
|
22
|
-
/** Whether to show the error message */
|
|
23
|
-
showError?: boolean;
|
|
24
|
-
/** Custom error message (overrides form error) */
|
|
25
|
-
error?: string;
|
|
26
|
-
/** Whether the textarea should take full width */
|
|
27
|
-
fullWidth?: boolean;
|
|
28
|
-
/** Show character count */
|
|
29
|
-
showCount?: boolean;
|
|
30
|
-
/** Maximum character count (for display) */
|
|
31
|
-
maxCount?: number;
|
|
32
|
-
/** External control (for use outside Form) */
|
|
33
|
-
control?: Control<TFieldValues>;
|
|
34
|
-
/** Field is required */
|
|
35
|
-
required?: boolean | string;
|
|
36
|
-
/** Minimum length */
|
|
37
|
-
minLength?: ValidationRule<number>;
|
|
38
|
-
/** Maximum length */
|
|
39
|
-
maxLength?: ValidationRule<number>;
|
|
40
|
-
/** Custom validation function */
|
|
41
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
42
|
-
}
|
|
43
|
-
export declare const TextArea: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: TextAreaProps<TFieldValues, TName> & {
|
|
44
|
-
ref?: React.ForwardedRef<HTMLTextAreaElement>;
|
|
45
|
-
}) => React.ReactElement;
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/Form/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,QAAA,MAAM,oBAAoB;;;8EAoBzB,CAAC;AAiBF;;GAEG;AACH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,MAAM,WAAW,aAAa,CAC5B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAC/D,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC,EACxG,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC3C,iDAAiD;IACjD,IAAI,EAAE,KAAK,CAAC;IACZ,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAGhC,wBAAwB;IACxB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,qBAAqB;IACrB,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC,qBAAqB;IACrB,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CAC7E;AA6KD,eAAO,MAAM,QAAQ,EAAgC,CACnD,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAE/D,KAAK,EAAE,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAA;CAAE,KAC1F,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { FieldValues, FieldPath, Control } from 'react-hook-form';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const textBoxVariants: (props?: ({
|
|
5
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
|
-
variant?: "error" | "success" | "default" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
/**
|
|
9
|
-
* Validation rule with optional custom message
|
|
10
|
-
*/
|
|
11
|
-
type ValidationRule<T> = T | {
|
|
12
|
-
value: T;
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
export interface TextBoxProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "name" | "prefix" | "pattern" | "required" | "minLength" | "maxLength">, VariantProps<typeof textBoxVariants> {
|
|
16
|
-
/** Field name - required for form integration */
|
|
17
|
-
name: TName;
|
|
18
|
-
/** Label text for the input */
|
|
19
|
-
label?: string;
|
|
20
|
-
/** Helper text displayed below the input */
|
|
21
|
-
helperText?: string;
|
|
22
|
-
/** Whether to show the error message */
|
|
23
|
-
showError?: boolean;
|
|
24
|
-
/** Custom error message (overrides form error) */
|
|
25
|
-
error?: string;
|
|
26
|
-
/** Whether the input should take full width */
|
|
27
|
-
fullWidth?: boolean;
|
|
28
|
-
/** Prefix element */
|
|
29
|
-
prefix?: ReactNode;
|
|
30
|
-
/** Suffix element */
|
|
31
|
-
suffix?: ReactNode;
|
|
32
|
-
/** Allow clear button */
|
|
33
|
-
allowClear?: boolean;
|
|
34
|
-
/** Callback when clear is clicked */
|
|
35
|
-
onClear?: () => void;
|
|
36
|
-
/** External control (for use outside Form) */
|
|
37
|
-
control?: Control<TFieldValues>;
|
|
38
|
-
/** Field is required */
|
|
39
|
-
required?: boolean | string;
|
|
40
|
-
/** Minimum length for strings */
|
|
41
|
-
minLength?: ValidationRule<number>;
|
|
42
|
-
/** Maximum length for strings */
|
|
43
|
-
maxLength?: ValidationRule<number>;
|
|
44
|
-
/** Minimum value for numbers */
|
|
45
|
-
minValue?: ValidationRule<number>;
|
|
46
|
-
/** Maximum value for numbers */
|
|
47
|
-
maxValue?: ValidationRule<number>;
|
|
48
|
-
/** Regex pattern for validation */
|
|
49
|
-
pattern?: ValidationRule<RegExp>;
|
|
50
|
-
/** Email validation */
|
|
51
|
-
email?: boolean | string;
|
|
52
|
-
/** URL validation */
|
|
53
|
-
url?: boolean | string;
|
|
54
|
-
/** Custom validation function */
|
|
55
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
56
|
-
}
|
|
57
|
-
export declare const TextBox: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: TextBoxProps<TFieldValues, TName> & {
|
|
58
|
-
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
59
|
-
}) => React.ReactElement;
|
|
60
|
-
export {};
|
|
61
|
-
//# sourceMappingURL=TextBox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextBox.d.ts","sourceRoot":"","sources":["../../../src/components/Form/TextBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,QAAA,MAAM,eAAe;;;8EAoBpB,CAAC;AAiBF;;GAEG;AACH,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,MAAM,WAAW,YAAY,CAC3B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,CAC/D,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM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vB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;CAC7E;AAqOD,eAAO,MAAM,OAAO,EAA+B,CACjD,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAE/D,KAAK,EAAE,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACtF,KAAK,CAAC,YAAY,CAAC"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { UseFormReturn, FieldValues } from 'react-hook-form';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
/**
|
|
4
|
-
* Validation rule types that can be applied to form fields
|
|
5
|
-
*/
|
|
6
|
-
export interface FieldValidationRules {
|
|
7
|
-
/** Field is required */
|
|
8
|
-
required?: boolean | string;
|
|
9
|
-
/** Minimum length for strings */
|
|
10
|
-
minLength?: number | {
|
|
11
|
-
value: number;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
/** Maximum length for strings */
|
|
15
|
-
maxLength?: number | {
|
|
16
|
-
value: number;
|
|
17
|
-
message: string;
|
|
18
|
-
};
|
|
19
|
-
/** Minimum value for numbers */
|
|
20
|
-
min?: number | {
|
|
21
|
-
value: number;
|
|
22
|
-
message: string;
|
|
23
|
-
};
|
|
24
|
-
/** Maximum value for numbers */
|
|
25
|
-
max?: number | {
|
|
26
|
-
value: number;
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
/** Regex pattern for validation */
|
|
30
|
-
pattern?: RegExp | {
|
|
31
|
-
value: RegExp;
|
|
32
|
-
message: string;
|
|
33
|
-
};
|
|
34
|
-
/** Email validation */
|
|
35
|
-
email?: boolean | string;
|
|
36
|
-
/** URL validation */
|
|
37
|
-
url?: boolean | string;
|
|
38
|
-
/** Custom validation function */
|
|
39
|
-
validate?: (value: unknown) => boolean | string | Promise<boolean | string>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Form configuration options
|
|
43
|
-
*/
|
|
44
|
-
export interface FormConfig {
|
|
45
|
-
/** Show validation errors inline */
|
|
46
|
-
showInlineErrors?: boolean;
|
|
47
|
-
/** Validate on blur */
|
|
48
|
-
validateOnBlur?: boolean;
|
|
49
|
-
/** Validate on change */
|
|
50
|
-
validateOnChange?: boolean;
|
|
51
|
-
/** Size of form controls */
|
|
52
|
-
size?: "sm" | "md" | "lg";
|
|
53
|
-
/** Layout direction */
|
|
54
|
-
layout?: "horizontal" | "vertical" | "inline";
|
|
55
|
-
/** Label width for horizontal layout */
|
|
56
|
-
labelWidth?: string | number;
|
|
57
|
-
/** Whether form is disabled */
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
/** Colon after label */
|
|
60
|
-
colon?: boolean;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Field registration info
|
|
64
|
-
*/
|
|
65
|
-
export interface FieldRegistration {
|
|
66
|
-
name: string;
|
|
67
|
-
type: "string" | "number" | "boolean" | "date" | "array";
|
|
68
|
-
rules: FieldValidationRules;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Form context value
|
|
72
|
-
*/
|
|
73
|
-
export interface FormContextValue<TFieldValues extends FieldValues = FieldValues> extends FormConfig {
|
|
74
|
-
form: UseFormReturn<TFieldValues>;
|
|
75
|
-
/** Register a field's validation rules */
|
|
76
|
-
registerFieldValidation: (field: FieldRegistration) => void;
|
|
77
|
-
/** Unregister a field's validation rules */
|
|
78
|
-
unregisterFieldValidation: (name: string) => void;
|
|
79
|
-
/** Get current validation schema */
|
|
80
|
-
getValidationSchema: () => z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
81
|
-
/** Trigger validation for a specific field */
|
|
82
|
-
triggerValidation: (name: string) => Promise<boolean>;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Default form configuration
|
|
86
|
-
*/
|
|
87
|
-
export declare const defaultFormConfig: FormConfig;
|
|
88
|
-
/**
|
|
89
|
-
* Form context for sharing form state and configuration
|
|
90
|
-
*/
|
|
91
|
-
export declare const FormConfigContext: import('react').Context<FormContextValue<FieldValues> | null>;
|
|
92
|
-
/**
|
|
93
|
-
* Build a Zod schema from validation rules
|
|
94
|
-
*/
|
|
95
|
-
export declare function buildZodSchemaFromRules(type: FieldRegistration["type"], rules: FieldValidationRules): z.ZodTypeAny;
|
|
96
|
-
/**
|
|
97
|
-
* Hook to manage field validations
|
|
98
|
-
*/
|
|
99
|
-
export declare function useFieldValidationRegistry(): {
|
|
100
|
-
registerFieldValidation: (field: FieldRegistration) => void;
|
|
101
|
-
unregisterFieldValidation: (name: string) => void;
|
|
102
|
-
getValidationSchema: () => z.ZodObject<{
|
|
103
|
-
[x: string]: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
104
|
-
}, z.core.$strip>;
|
|
105
|
-
fieldsRef: import('react').RefObject<Map<string, FieldRegistration>>;
|
|
106
|
-
};
|
|
107
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/Form/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,wBAAwB;IACxB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KA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;IACnB,wBAAwB;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACzD,KAAK,EAAE,oBAAoB,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,CAC9E,SAAQ,UAAU;IAClB,IAAI,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAClC,0CAA0C;IAC1C,uBAAuB,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,4CAA4C;IAC5C,yBAAyB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,oCAAoC;IACpC,mBAAmB,EAAE,MAAM,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,8CAA8C;IAC9C,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAQ/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,+DAA+C,CAAC;AAE9E;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAC/B,KAAK,EAAE,oBAAoB,GAC1B,CAAC,CAAC,UAAU,CAuHd;AAED;;GAEG;AACH,wBAAgB,0BAA0B;qCAGY,iBAAiB;sCAIhB,MAAM;;;;;EAoB5D"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FieldValues, FieldPath, UseControllerProps, UseControllerReturn } from 'react-hook-form';
|
|
2
|
-
import { FormContextValue, FormConfig } from './context';
|
|
3
|
-
/**
|
|
4
|
-
* Hook to access form configuration context
|
|
5
|
-
*/
|
|
6
|
-
export declare function useFormConfig<TFieldValues extends FieldValues = FieldValues>(): FormContextValue<TFieldValues>;
|
|
7
|
-
/**
|
|
8
|
-
* Hook to access react-hook-form context directly
|
|
9
|
-
*/
|
|
10
|
-
export declare function useForm<TFieldValues extends FieldValues = FieldValues>(): import('react-hook-form').UseFormReturn<TFieldValues, any, TFieldValues>;
|
|
11
|
-
/**
|
|
12
|
-
* Hook to create a controlled field with form context awareness
|
|
13
|
-
*/
|
|
14
|
-
export declare function useFormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: UseControllerProps<TFieldValues, TName>): UseControllerReturn<TFieldValues, TName> & {
|
|
15
|
-
config: FormConfig;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Hook to get field error
|
|
19
|
-
*/
|
|
20
|
-
export declare function useFieldError<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TName): string | undefined;
|
|
21
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/Form/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAqB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtF;;GAEG;AACH,wBAAgB,aAAa,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,KAAK,gBAAgB,CAAC,YAAY,CAAC,CAM9G;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,YAAY,SAAS,WAAW,GAAG,WAAW,8EAErE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAE/D,KAAK,EAAE,kBAAkB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC7C,mBAAmB,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,CAWnE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAIjC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { Form } from './Form';
|
|
2
|
-
export type { FormProps } from './Form';
|
|
3
|
-
export { TextBox } from './TextBox';
|
|
4
|
-
export type { TextBoxProps } from './TextBox';
|
|
5
|
-
export { TextArea } from './TextArea';
|
|
6
|
-
export type { TextAreaProps } from './TextArea';
|
|
7
|
-
export { Select } from './Select';
|
|
8
|
-
export type { SelectProps, SelectOption } from './Select';
|
|
9
|
-
export { Checkbox } from './Checkbox';
|
|
10
|
-
export type { CheckboxProps } from './Checkbox';
|
|
11
|
-
export { RadioGroup, RadioItem } from './Radio';
|
|
12
|
-
export type { RadioGroupProps, RadioItemProps, RadioOption } from './Radio';
|
|
13
|
-
export { Switch } from './Switch';
|
|
14
|
-
export type { SwitchProps } from './Switch';
|
|
15
|
-
export { FormConfigContext, defaultFormConfig, buildZodSchemaFromRules, useFieldValidationRegistry, } from './context';
|
|
16
|
-
export type { FormConfig, FormContextValue, FieldValidationRules, FieldRegistration, } from './context';
|
|
17
|
-
export { useFormConfig, useForm, useFormField, useFieldError } from './hooks';
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE5E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
-
/** Label text for the input */
|
|
4
|
-
label?: string;
|
|
5
|
-
/** Helper text displayed below the input */
|
|
6
|
-
helperText?: string;
|
|
7
|
-
/** Error message to display */
|
|
8
|
-
error?: string;
|
|
9
|
-
/** The size of the input */
|
|
10
|
-
inputSize?: "sm" | "md" | "lg";
|
|
11
|
-
/** Whether the input should take full width */
|
|
12
|
-
fullWidth?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* A customizable input component with label, helper text, and error states
|
|
16
|
-
*/
|
|
17
|
-
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
18
|
-
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,UAAW,SAAQ,mBAAmB,CAAC,gBAAgB,CAAC;IACvE,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,yGAiDjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|