@datum-cloud/datum-ui 0.5.0 → 0.6.0-alpha.a9a8815
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/README.md +78 -40
- package/dist/adapter-context-rWveHhDd.mjs +25 -0
- package/dist/combobox/index.mjs +2 -0
- package/dist/combobox-cKTFK4uN.mjs +96 -0
- package/dist/components/features/combobox/combobox.d.ts +27 -0
- package/dist/components/features/combobox/combobox.d.ts.map +1 -0
- package/dist/components/features/combobox/index.d.ts +3 -0
- package/dist/components/features/combobox/index.d.ts.map +1 -0
- package/dist/components/features/combobox/types.d.ts +78 -0
- package/dist/components/features/combobox/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +9 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/types.d.ts +53 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts +13 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts +23 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts.map +1 -0
- package/dist/components/features/form/adapter-context.d.ts +17 -0
- package/dist/components/features/form/adapter-context.d.ts.map +1 -0
- package/dist/components/features/form/adapter-types.d.ts +120 -0
- package/dist/components/features/form/adapter-types.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts +9 -0
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/conform/conform-provider.d.ts.map +1 -0
- package/dist/components/features/form/adapters/conform/index.d.ts +3 -0
- package/dist/components/features/form/adapters/conform/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts +3 -0
- package/dist/components/features/form/adapters/rhf/index.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts +10 -0
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts +22 -0
- package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts.map +1 -0
- package/dist/components/features/form/components/form-autocomplete.d.ts.map +1 -1
- package/dist/components/features/form/components/form-autosearch.d.ts +25 -0
- package/dist/components/features/form/components/form-autosearch.d.ts.map +1 -0
- package/dist/components/features/form/components/form-checkbox.d.ts.map +1 -1
- package/dist/components/features/form/components/form-combobox.d.ts +76 -0
- package/dist/components/features/form/components/form-combobox.d.ts.map +1 -0
- package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
- package/dist/components/features/form/components/form-custom.d.ts.map +1 -1
- package/dist/components/features/form/components/form-date-picker.d.ts +38 -0
- package/dist/components/features/form/components/form-date-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts +37 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-field-array.d.ts +5 -17
- package/dist/components/features/form/components/form-field-array.d.ts.map +1 -1
- package/dist/components/features/form/components/form-field.d.ts +7 -21
- package/dist/components/features/form/components/form-field.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input-group.d.ts +4 -4
- package/dist/components/features/form/components/form-input-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-input.d.ts.map +1 -1
- package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-root.d.ts +5 -25
- package/dist/components/features/form/components/form-root.d.ts.map +1 -1
- package/dist/components/features/form/components/form-select.d.ts.map +1 -1
- package/dist/components/features/form/components/form-switch.d.ts.map +1 -1
- package/dist/components/features/form/components/form-textarea.d.ts.map +1 -1
- package/dist/components/features/form/components/form-time-picker.d.ts +21 -0
- package/dist/components/features/form/components/form-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-transfer.d.ts +37 -0
- package/dist/components/features/form/components/form-transfer.d.ts.map +1 -0
- package/dist/components/features/form/components/index.d.ts +6 -1
- package/dist/components/features/form/components/index.d.ts.map +1 -1
- package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
- package/dist/components/features/form/context/form-context.d.ts +2 -2
- package/dist/components/features/form/context/form-context.d.ts.map +1 -1
- package/dist/components/features/form/hooks/index.d.ts +1 -1
- package/dist/components/features/form/hooks/index.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-field.d.ts +12 -18
- package/dist/components/features/form/hooks/use-field.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-form-state.d.ts +36 -0
- package/dist/components/features/form/hooks/use-form-state.d.ts.map +1 -0
- package/dist/components/features/form/hooks/use-watch.d.ts +9 -20
- package/dist/components/features/form/hooks/use-watch.d.ts.map +1 -1
- package/dist/components/features/form/index.d.ts +69 -44
- package/dist/components/features/form/index.d.ts.map +1 -1
- package/dist/components/features/form/stepper/index.d.ts +17 -0
- package/dist/components/features/form/stepper/index.d.ts.map +1 -0
- package/dist/components/features/form/types/index.d.ts +68 -32
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts +43 -0
- package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -0
- package/dist/components/features/form/utils/get-schema-defaults.d.ts +24 -0
- package/dist/components/features/form/utils/get-schema-defaults.d.ts.map +1 -0
- package/dist/components/features/time-picker/index.d.ts +3 -0
- package/dist/components/features/time-picker/index.d.ts.map +1 -0
- package/dist/components/features/time-picker/time-picker.d.ts +22 -0
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/features/time-picker/types.d.ts +31 -0
- package/dist/components/features/time-picker/types.d.ts.map +1 -0
- package/dist/components/features/transfer/components/index.d.ts +9 -0
- package/dist/components/features/transfer/components/index.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts +7 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts +10 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts +18 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts +9 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts +26 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts +20 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts.map +1 -0
- package/dist/components/features/transfer/index.d.ts +3 -0
- package/dist/components/features/transfer/index.d.ts.map +1 -0
- package/dist/components/features/transfer/transfer.d.ts +6 -0
- package/dist/components/features/transfer/transfer.d.ts.map +1 -0
- package/dist/components/features/transfer/types.d.ts +69 -0
- package/dist/components/features/transfer/types.d.ts.map +1 -0
- package/dist/date-picker/index.mjs +1 -1
- package/dist/date-time-picker/index.mjs +2 -0
- package/dist/date-time-picker-Bx_n4nEJ.mjs +177 -0
- package/dist/form/adapters/conform/index.mjs +326 -0
- package/dist/form/adapters/rhf/index.mjs +275 -0
- package/dist/form/index.mjs +3 -2
- package/dist/form/stepper/index.mjs +542 -0
- package/dist/form-context-Ccxm-wqL.mjs +17 -0
- package/dist/form-zf5QOnAk.mjs +1611 -0
- package/dist/get-field-constraints-CxfZ753o.mjs +49 -0
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +14 -13
- package/dist/input-number/index.mjs +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/{map-ClxB41Hg.mjs → map-CWIQ-eql.mjs} +1 -1
- package/dist/more-actions/index.mjs +1 -1
- package/dist/page-title/index.mjs +1 -1
- package/dist/stepper/index.mjs +1 -320
- package/dist/stepper-DvIOp0hh.mjs +321 -0
- package/dist/tag-input/index.mjs +1 -1
- package/dist/task-queue/index.mjs +1 -1
- package/dist/time-picker/index.mjs +2 -0
- package/dist/time-picker-BoF7pZZ2.mjs +43 -0
- package/dist/transfer/index.mjs +2 -0
- package/dist/transfer-C55XfEXy.mjs +243 -0
- package/package.json +58 -2
- package/dist/form-Co3fM4B7.mjs +0 -2114
- /package/dist/{col-q-J99UHe.mjs → col-1T0Q3SlH.mjs} +0 -0
- /package/dist/{hooks-Cb7YlxN4.mjs → hooks-D8r2M2U6.mjs} +0 -0
- /package/dist/{input-number-mDB-5M5C.mjs → input-number-a7uydAsw.mjs} +0 -0
- /package/dist/{map-leaflet-imports-CaMm_rdF.mjs → map-leaflet-imports-CRSKA79m.mjs} +0 -0
- /package/dist/{more-actions-CGagbIDT.mjs → more-actions-ILnEZq_E.mjs} +0 -0
- /package/dist/{page-title-R7QbfbWp.mjs → page-title-ChsnpBiH.mjs} +0 -0
- /package/dist/{tag-input-BVSwNcRd.mjs → tag-input-T9cUX9-G.mjs} +0 -0
- /package/dist/{task-queue-dropdown-DyM5R8KF.mjs → task-queue-dropdown-Wcbj-f0V.mjs} +0 -0
- /package/dist/{to-api-format-BnbRFYQI.mjs → to-api-format-Bh3c01gr.mjs} +0 -0
- /package/dist/{use-copy-to-clipboard-BGdTmkFV.mjs → use-copy-to-clipboard-uNeeVHC4.mjs} +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
export interface NormalizedFieldMeta {
|
|
3
|
+
/** Unique field ID for accessibility */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Validation errors for this field */
|
|
6
|
+
errors: string[];
|
|
7
|
+
/** Whether the field is required (derived from schema) */
|
|
8
|
+
required: boolean;
|
|
9
|
+
/** Whether the field value differs from its default value */
|
|
10
|
+
isDirty: boolean;
|
|
11
|
+
/** Whether the field has been focused and blurred */
|
|
12
|
+
isTouched: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface NormalizedFieldState extends NormalizedFieldMeta {
|
|
15
|
+
/** Field name (supports dot-notation paths) */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Current field value (native JS type: string, boolean, number, etc.) */
|
|
18
|
+
value: unknown;
|
|
19
|
+
/** Update the field value */
|
|
20
|
+
change: (value: unknown) => void;
|
|
21
|
+
/** Mark field as blurred (triggers validation in onBlur mode) */
|
|
22
|
+
blur: () => void;
|
|
23
|
+
/** Focus the field */
|
|
24
|
+
focus: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Optional props object for uncontrolled inputs (Conform uses hidden inputs).
|
|
27
|
+
* When present, spread onto native `<input>` elements instead of using value/change.
|
|
28
|
+
* When absent, components fall back to controlled mode (value + change).
|
|
29
|
+
*/
|
|
30
|
+
inputProps?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface NormalizedFieldArray {
|
|
33
|
+
/** Array of field items with id, key, and name prefix */
|
|
34
|
+
items: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
key: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}>;
|
|
39
|
+
/** Append a new item to the array */
|
|
40
|
+
append: (defaultValue?: Record<string, unknown>) => void;
|
|
41
|
+
/** Remove an item at the given index */
|
|
42
|
+
remove: (index: number) => void;
|
|
43
|
+
/** Move an item from one index to another */
|
|
44
|
+
move: (from: number, to: number) => void;
|
|
45
|
+
}
|
|
46
|
+
export interface NormalizedFormState {
|
|
47
|
+
/** Whether any field value differs from its default value */
|
|
48
|
+
isDirty: boolean;
|
|
49
|
+
/** Whether the form currently passes validation */
|
|
50
|
+
isValid: boolean;
|
|
51
|
+
/** Whether the form has been submitted at least once */
|
|
52
|
+
isSubmitted: boolean;
|
|
53
|
+
/** Number of times the form has been submitted */
|
|
54
|
+
submitCount: number;
|
|
55
|
+
/** Record of which fields have been modified from defaults */
|
|
56
|
+
dirtyFields: Record<string, boolean>;
|
|
57
|
+
/** Record of which fields have been focused and blurred */
|
|
58
|
+
touchedFields: Record<string, boolean>;
|
|
59
|
+
}
|
|
60
|
+
export interface NormalizedFormInstance {
|
|
61
|
+
/** Form ID */
|
|
62
|
+
id: string;
|
|
63
|
+
/** Field metadata keyed by field name */
|
|
64
|
+
fields: Record<string, NormalizedFieldMeta>;
|
|
65
|
+
/** Props to spread on the <form> element (id, onSubmit, noValidate, etc.) */
|
|
66
|
+
formProps: Record<string, unknown>;
|
|
67
|
+
/** Reactive form-level state (dirty, valid, submitted, etc.) */
|
|
68
|
+
formState: NormalizedFormState;
|
|
69
|
+
/** Programmatically submit the form */
|
|
70
|
+
submit: () => void;
|
|
71
|
+
/** Reset the form to default values */
|
|
72
|
+
reset: () => void;
|
|
73
|
+
/** Get all current form values (for stepper prev() save-without-validate) */
|
|
74
|
+
getValues: () => Record<string, unknown>;
|
|
75
|
+
/** The raw underlying library instance (opaque - never read by shared components) */
|
|
76
|
+
raw: unknown;
|
|
77
|
+
}
|
|
78
|
+
export interface CreateFormProps {
|
|
79
|
+
/** Zod schema for validation */
|
|
80
|
+
schema: z.ZodType;
|
|
81
|
+
/** Default values for form fields */
|
|
82
|
+
defaultValues?: Record<string, unknown>;
|
|
83
|
+
/** Validation mode */
|
|
84
|
+
mode: 'onBlur' | 'onChange' | 'onSubmit';
|
|
85
|
+
/** Form ID */
|
|
86
|
+
id?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Submit handler called with validated data.
|
|
89
|
+
* When absent, the form submits natively (server-side / framework integration).
|
|
90
|
+
*/
|
|
91
|
+
onSubmit?: (data: Record<string, unknown>) => void | Promise<void>;
|
|
92
|
+
/** Form ref callback for programmatic submit via requestSubmit */
|
|
93
|
+
formRef?: React.RefObject<HTMLFormElement | null>;
|
|
94
|
+
}
|
|
95
|
+
export interface FormAdapter {
|
|
96
|
+
/** Display name for error messages (e.g., "Conform", "React Hook Form") */
|
|
97
|
+
name: string;
|
|
98
|
+
/** Create a new form instance. Called once per Form.Root mount. */
|
|
99
|
+
useCreateForm: (props: CreateFormProps) => NormalizedFormInstance;
|
|
100
|
+
/**
|
|
101
|
+
* Resolve a field by dot-notation path and return its normalized state.
|
|
102
|
+
* Must be called within the adapter's FormProvider.
|
|
103
|
+
*/
|
|
104
|
+
useField: (name: string) => NormalizedFieldState;
|
|
105
|
+
/** Watch a single field's value reactively. */
|
|
106
|
+
useWatch: (name: string) => unknown;
|
|
107
|
+
/** Watch multiple fields' values reactively. */
|
|
108
|
+
useWatchAll: (names: string[]) => Record<string, unknown>;
|
|
109
|
+
/** Get field array helpers for a given array field name. */
|
|
110
|
+
useFieldArray: (name: string) => NormalizedFieldArray;
|
|
111
|
+
/**
|
|
112
|
+
* Provider component that wraps the form element.
|
|
113
|
+
* Provides library-specific context (e.g., ConformFormProvider, RHF FormProvider).
|
|
114
|
+
*/
|
|
115
|
+
FormProvider: React.ComponentType<{
|
|
116
|
+
instance: NormalizedFormInstance;
|
|
117
|
+
children: React.ReactNode;
|
|
118
|
+
}>;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=adapter-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../../../../src/components/features/form/adapter-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FormAdapter } from '../../adapter-types';
|
|
2
|
+
/**
|
|
3
|
+
* Conform.js adapter implementing the `FormAdapter` interface.
|
|
4
|
+
*
|
|
5
|
+
* Maps Conform's `useForm` / `useInputControl` / `useFormMetadata` APIs
|
|
6
|
+
* to the normalized form adapter contract.
|
|
7
|
+
*/
|
|
8
|
+
export declare const conformAdapter: FormAdapter;
|
|
9
|
+
//# sourceMappingURL=conform-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conform-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAMZ,MAAM,qBAAqB,CAAA;AA0c5B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,WAQ5B,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ConformAdapterProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Wrap your application with this provider to use Conform.js as the form backend.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { ConformAdapter } from '@datum-cloud/datum-ui/form/adapters/conform'
|
|
11
|
+
*
|
|
12
|
+
* function App() {
|
|
13
|
+
* return (
|
|
14
|
+
* <ConformAdapter>
|
|
15
|
+
* <MyApp />
|
|
16
|
+
* </ConformAdapter>
|
|
17
|
+
* )
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function ConformAdapter({ children }: ConformAdapterProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=conform-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conform-provider.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/conform-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAM/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/conform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/rhf/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FormAdapter } from '../../adapter-types';
|
|
2
|
+
/**
|
|
3
|
+
* React Hook Form adapter implementing the `FormAdapter` interface.
|
|
4
|
+
*
|
|
5
|
+
* Maps react-hook-form's `useForm` / `useController` / `useWatch` APIs
|
|
6
|
+
* to the normalized form adapter contract. Uses `@hookform/resolvers/zod`
|
|
7
|
+
* for Zod schema validation.
|
|
8
|
+
*/
|
|
9
|
+
export declare const rhfAdapter: FormAdapter;
|
|
10
|
+
//# sourceMappingURL=rhf-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rhf-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/rhf/rhf-adapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EAMZ,MAAM,qBAAqB,CAAA;AAoO5B;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,WAQxB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface RHFAdapterProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Wrap your application with this provider to use React Hook Form as the form backend.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { RHFAdapter } from '@datum-cloud/datum-ui/form/adapters/rhf'
|
|
11
|
+
*
|
|
12
|
+
* function App() {
|
|
13
|
+
* return (
|
|
14
|
+
* <RHFAdapter>
|
|
15
|
+
* <MyApp />
|
|
16
|
+
* </RHFAdapter>
|
|
17
|
+
* )
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function RHFAdapter({ children }: RHFAdapterProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=rhf-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rhf-provider.d.ts","sourceRoot":"","sources":["../../../../../../src/components/features/form/adapters/rhf/rhf-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAMvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"form-autocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAKtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,EAAE,EAClF,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAmB1B;yBAvBe,gBAAgB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { FormAutocompleteProps } from '../../autocomplete/autocomplete.types';
|
|
2
|
+
/**
|
|
3
|
+
* Form.Autosearch - Alias to Form.Autocomplete with search-first focus
|
|
4
|
+
*
|
|
5
|
+
* This is a convenience wrapper around Form.Autocomplete that emphasizes
|
|
6
|
+
* the search functionality. It's functionally identical to Form.Autocomplete.
|
|
7
|
+
*
|
|
8
|
+
* @example Basic usage
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Form.Field name="search" label="Search">
|
|
11
|
+
* <Form.Autosearch
|
|
12
|
+
* options={options}
|
|
13
|
+
* placeholder="Type to search..."
|
|
14
|
+
* />
|
|
15
|
+
* </Form.Field>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function FormAutosearch<T extends {
|
|
19
|
+
value: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}>(props: FormAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare namespace FormAutosearch {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=form-autosearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-autosearch.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-autosearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAGlF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACvE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CAGhC;yBAJe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"form-checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAOjD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CA+B7E;yBA/Be,YAAY"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ComboboxGroup, ComboboxOption } from '../../combobox';
|
|
2
|
+
/**
|
|
3
|
+
* Form.Combobox - Single-select dropdown with search for forms
|
|
4
|
+
*
|
|
5
|
+
* Automatically wired to the parent Form.Field context.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const options = [
|
|
10
|
+
* { value: '1', label: 'Option 1' },
|
|
11
|
+
* { value: '2', label: 'Option 2' },
|
|
12
|
+
* ]
|
|
13
|
+
*
|
|
14
|
+
* <Form.Field name="country" label="Country" required>
|
|
15
|
+
* <Form.Combobox options={options} placeholder="Select a country" />
|
|
16
|
+
* </Form.Field>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface FormComboboxProps {
|
|
20
|
+
/**
|
|
21
|
+
* Available options (flat or grouped)
|
|
22
|
+
*/
|
|
23
|
+
'options': ComboboxOption[] | ComboboxGroup[];
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder for trigger button
|
|
26
|
+
*/
|
|
27
|
+
'placeholder'?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Placeholder for search input
|
|
30
|
+
*/
|
|
31
|
+
'searchPlaceholder'?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Message shown when no options match
|
|
34
|
+
*/
|
|
35
|
+
'emptyMessage'?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Disable the combobox
|
|
38
|
+
*/
|
|
39
|
+
'disabled'?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Additional CSS classes
|
|
42
|
+
*/
|
|
43
|
+
'className'?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Additional CSS classes for trigger button
|
|
46
|
+
*/
|
|
47
|
+
'triggerClassName'?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Additional CSS classes for popover content
|
|
50
|
+
*/
|
|
51
|
+
'contentClassName'?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Enable search functionality
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
'searchable'?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Show dropdown arrow icon
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
'showDropdownArrow'?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Allow clearing the selection
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
'clearable'?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Test ID
|
|
69
|
+
*/
|
|
70
|
+
'data-testid'?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function FormCombobox({ options, placeholder, searchPlaceholder, emptyMessage, disabled, className, triggerClassName, contentClassName, searchable, showDropdownArrow, clearable, 'data-testid': testId, }: FormComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare namespace FormCombobox {
|
|
74
|
+
var displayName: string;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=form-combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAE7C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAE7B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAiB,EACjB,iBAAwB,EACxB,SAAiB,EACjB,aAAa,EAAE,MAAM,GACtB,EAAE,iBAAiB,2CA+BnB;yBA5Ce,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-copy-box.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-copy-box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form-copy-box.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-copy-box.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IACjC,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,WAAgB,GACjB,EAAE,gBAAgB,2CA6DlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-custom.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-custom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAA;AAItE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"form-custom.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-custom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAA;AAItE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,eAAe,2CAkBvD;yBAlBe,UAAU"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form.DatePicker - Date picker component for forms
|
|
3
|
+
*
|
|
4
|
+
* Automatically wired to the parent Form.Field context.
|
|
5
|
+
* Extracts minDate/maxDate constraints from Zod schema.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Form.Field name="startDate" label="Start Date" required>
|
|
10
|
+
* <Form.DatePicker />
|
|
11
|
+
* </Form.Field>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export interface FormDatePickerProps {
|
|
15
|
+
/** Placeholder text */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Disable the picker */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Additional CSS classes */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Custom trigger button className */
|
|
22
|
+
triggerClassName?: string;
|
|
23
|
+
/** Number of months to display (1 = single date, 2 = date range) */
|
|
24
|
+
numberOfMonths?: 1 | 2;
|
|
25
|
+
/** Minimum selectable date (overrides schema) */
|
|
26
|
+
minDate?: Date;
|
|
27
|
+
/** Maximum selectable date (overrides schema) */
|
|
28
|
+
maxDate?: Date;
|
|
29
|
+
/** Disable future dates */
|
|
30
|
+
disableFuture?: boolean;
|
|
31
|
+
/** Disable past dates */
|
|
32
|
+
disablePast?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function FormDatePicker({ placeholder, disabled, className, triggerClassName, numberOfMonths, minDate: minDateProp, maxDate: maxDateProp, disableFuture, disablePast, }: FormDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace FormDatePicker {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=form-date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-date-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-date-picker.tsx"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,oEAAoE;IACpE,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACtB,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,2BAA2B;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,yBAAyB;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,cAAkB,EAClB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,aAAa,EACb,WAAW,GACZ,EAAE,mBAAmB,2CA+ErB;yBAzFe,cAAc"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form.DateTimePicker - Date and time picker component for forms
|
|
3
|
+
*
|
|
4
|
+
* Automatically wired to the parent Form.Field context.
|
|
5
|
+
* Extracts minDate/maxDate constraints from Zod schema.
|
|
6
|
+
* Value is stored as UTC ISO string.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Form.Field name="scheduledAt" label="Scheduled At" required>
|
|
11
|
+
* <Form.DateTimePicker />
|
|
12
|
+
* </Form.Field>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export interface FormDateTimePickerProps {
|
|
16
|
+
/** Minimum selectable date (overrides schema) */
|
|
17
|
+
minDate?: Date;
|
|
18
|
+
/** Maximum selectable date (overrides schema) */
|
|
19
|
+
maxDate?: Date;
|
|
20
|
+
/** Function to disable specific dates */
|
|
21
|
+
disabledDates?: (date: Date) => boolean;
|
|
22
|
+
/** User's timezone (defaults to browser timezone) */
|
|
23
|
+
timezone?: string;
|
|
24
|
+
/** Show timezone indicator */
|
|
25
|
+
showTimezoneIndicator?: boolean;
|
|
26
|
+
/** Placeholder text */
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Disable the picker */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Additional CSS classes */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function FormDateTimePicker({ minDate: minDateProp, maxDate: maxDateProp, disabledDates, timezone, showTimezoneIndicator, placeholder, disabled, className, }: FormDateTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare namespace FormDateTimePicker {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=form-date-time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-date-time-picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-date-time-picker.tsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,uBAAuB;IACtC,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAA;IACd,yCAAyC;IACzC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAA;IACvC,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8BAA8B;IAC9B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,aAAa,EACb,QAAQ,EACR,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,2CA6CzB;yBAtDe,kBAAkB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { FormFieldArrayProps } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Form.FieldArray - Dynamic array of fields
|
|
4
|
-
*
|
|
5
|
-
* Provides helpers for managing arrays of form fields.
|
|
3
|
+
* Form.FieldArray - Dynamic array of fields with append/remove/move helpers.
|
|
6
4
|
*
|
|
7
5
|
* @example
|
|
8
6
|
* ```tsx
|
|
@@ -10,30 +8,20 @@ import type { FormFieldArrayProps } from '../types';
|
|
|
10
8
|
* {({ fields, append, remove }) => (
|
|
11
9
|
* <>
|
|
12
10
|
* {fields.map((field, index) => (
|
|
13
|
-
* <div key={field.key}
|
|
11
|
+
* <div key={field.key}>
|
|
14
12
|
* <Form.Field name={`members.${index}.email`} label="Email">
|
|
15
13
|
* <Form.Input type="email" />
|
|
16
14
|
* </Form.Field>
|
|
17
|
-
* <
|
|
18
|
-
* <Form.Select>
|
|
19
|
-
* <Form.SelectItem value="admin">Admin</Form.SelectItem>
|
|
20
|
-
* <Form.SelectItem value="user">User</Form.SelectItem>
|
|
21
|
-
* </Form.Select>
|
|
22
|
-
* </Form.Field>
|
|
23
|
-
* <button type="button" onClick={() => remove(index)}>
|
|
24
|
-
* Remove
|
|
25
|
-
* </button>
|
|
15
|
+
* <button onClick={() => remove(index)}>Remove</button>
|
|
26
16
|
* </div>
|
|
27
17
|
* ))}
|
|
28
|
-
* <button
|
|
29
|
-
* Add Member
|
|
30
|
-
* </button>
|
|
18
|
+
* <button onClick={() => append({})}>Add Member</button>
|
|
31
19
|
* </>
|
|
32
20
|
* )}
|
|
33
21
|
* </Form.FieldArray>
|
|
34
22
|
* ```
|
|
35
23
|
*/
|
|
36
|
-
export declare function FormFieldArray({ name, children }: FormFieldArrayProps): import("react/jsx-runtime").JSX.Element
|
|
24
|
+
export declare function FormFieldArray({ name, children }: FormFieldArrayProps): import("react/jsx-runtime").JSX.Element;
|
|
37
25
|
export declare namespace FormFieldArray {
|
|
38
26
|
var displayName: string;
|
|
39
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-array.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-field-array.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAA6B,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"form-field-array.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-field-array.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAA6B,MAAM,UAAU,CAAA;AAI9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAYrE;yBAZe,cAAc"}
|
|
@@ -1,39 +1,25 @@
|
|
|
1
1
|
import type { FormFieldProps } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Form.Field - Field wrapper
|
|
4
|
-
*
|
|
5
|
-
* Provides field context to children with:
|
|
6
|
-
* - Automatic label rendering
|
|
7
|
-
* - Error display
|
|
8
|
-
* - Description text
|
|
9
|
-
* - Required indicator
|
|
10
|
-
* - Accessibility attributes
|
|
11
|
-
*
|
|
12
|
-
* Supports two patterns:
|
|
13
|
-
* 1. ReactNode children - for standard Form inputs
|
|
14
|
-
* 2. Render function - for custom components needing field access
|
|
3
|
+
* Form.Field - Field wrapper that provides label, errors, and description.
|
|
4
|
+
* Uses the active adapter to resolve field state by name.
|
|
15
5
|
*
|
|
16
6
|
* @example Standard usage
|
|
17
7
|
* ```tsx
|
|
18
|
-
* <Form.Field name="email" label="Email
|
|
8
|
+
* <Form.Field name="email" label="Email" required>
|
|
19
9
|
* <Form.Input type="email" />
|
|
20
10
|
* </Form.Field>
|
|
21
11
|
* ```
|
|
22
12
|
*
|
|
23
13
|
* @example Render function for custom components
|
|
24
14
|
* ```tsx
|
|
25
|
-
* <Form.Field name="role" label="Role"
|
|
26
|
-
* {({ control, meta
|
|
27
|
-
* <CustomSelect
|
|
28
|
-
* name={meta.name}
|
|
29
|
-
* value={control.value}
|
|
30
|
-
* onChange={control.change}
|
|
31
|
-
* />
|
|
15
|
+
* <Form.Field name="role" label="Role">
|
|
16
|
+
* {({ control, meta }) => (
|
|
17
|
+
* <CustomSelect value={control.value} onChange={control.change} />
|
|
32
18
|
* )}
|
|
33
19
|
* </Form.Field>
|
|
34
20
|
* ```
|
|
35
21
|
*/
|
|
36
|
-
export declare function FormField({ name, children, label, description, tooltip, required, disabled, className, labelClassName, }: FormFieldProps): import("react/jsx-runtime").JSX.Element
|
|
22
|
+
export declare function FormField({ name, children, label, description, tooltip, required, disabled, className, labelClassName, }: FormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
37
23
|
export declare namespace FormField {
|
|
38
24
|
var displayName: string;
|
|
39
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,cAAc,EAAwB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyB,cAAc,EAAwB,MAAM,UAAU,CAAA;AAyE3F;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAgB,EAChB,QAAgB,EAChB,SAAS,EACT,cAAc,GACf,EAAE,cAAc,2CAyGhB;yBAnHe,SAAS"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { InputWithAddonsProps } from '../../input-with-addons';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* Form.
|
|
4
|
+
* Form.InputGroup - Input with leading/trailing addons
|
|
5
5
|
*
|
|
6
6
|
* Automatically wired to the parent Form.Field context.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* <Form.Field name="
|
|
11
|
-
* <Form.
|
|
10
|
+
* <Form.Field name="website" label="Website" required>
|
|
11
|
+
* <Form.InputGroup leading="https://" placeholder="example.com" />
|
|
12
12
|
* </Form.Field>
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export declare function FormInputGroup({ ref,
|
|
15
|
+
export declare function FormInputGroup({ ref, className, disabled, ...props }: Omit<InputWithAddonsProps, 'name'> & {
|
|
16
16
|
ref?: React.RefObject<HTMLInputElement | null>;
|
|
17
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export declare namespace FormInputGroup {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-input-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-input-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"form-input-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-input-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAAE,2CAoB7J;yBApBe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"form-input.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EAAE,GAAG,EAAE,IAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAAE,2CAqBnJ;yBArBe,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-radio-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"form-radio-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/features/form/components/form-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAOvE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,EAC7B,WAAwB,EACxB,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,2CAsBrB;yBA3Be,cAAc;;;AA+B9B;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAoBxF;yBApBe,aAAa"}
|