yg-sdui-forms 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,263 @@
1
+ # yg-sdui 🚀
2
+
3
+ A lightweight, configuration-driven React form library built on top of [React Hook Form](https://react-hook-form.com/). It makes forms completely configurable so that their structure, validations, and visibility rules can be managed via JSON configuration without modifying React code.
4
+
5
+ ---
6
+
7
+ ## 🔗 Quick Links
8
+ - **NPM Package**: [yg-sdui on npm](https://www.npmjs.com/package/yg-sdui)
9
+
10
+ ---
11
+
12
+ ## 🧠 Server-Driven UI (SDUI)
13
+ Server-Driven UI is an architectural pattern where the server sends a JSON configuration describing which pre-built UI components should be rendered and how they should behave.
14
+
15
+ ### Core Architecture Layers:
16
+ 1. **Component Library**: Pre-built UI components.
17
+ 2. **Component Mapper**: Registry mapping configuration strings (`c_name`) to React components.
18
+ 3. **Component Renderer**: Reads the JSON configuration and instantiates the mapped components with their configured props.
19
+
20
+ ---
21
+
22
+ ## ⚡ State Management
23
+ Form state is divided into:
24
+ - **Server State**: API updates, caching, and background queries (best managed by tools like TanStack Query).
25
+ - **Local State**: Immediate user inputs, validations, and dynamic layouts inside forms (managed by React Hook Form).
26
+
27
+ ### Why React Hook Form?
28
+ - **Zero Boilerplate**: Uses dot-notation paths (e.g., `accountDetail.username`) to register nested objects automatically.
29
+ - **Performance**: Minimizes unnecessary re-renders.
30
+ - **Validation**: Supports standard HTML validation attributes (`required`, `minLength`, `pattern`, etc.).
31
+
32
+ ---
33
+
34
+ ## 👁️ Dynamic Visibility Rules
35
+ Define conditional visibility rules directly within the JSON configuration:
36
+
37
+ ```json
38
+ {
39
+ "c_name": "TextInput",
40
+ "path": "profile.restrictedBio",
41
+ "label": "Restricted Bio",
42
+ "visibility": "profile.age",
43
+ "value": 18
44
+ }
45
+ ```
46
+
47
+ ### How It Works:
48
+ - The `<FormRenderer />` component checks the `visibility` and `value` properties.
49
+ - It uses `useWatch` to listen to the field path specified by `visibility`.
50
+ - If the watched field's value equals the target `value`, the component is rendered. Otherwise, it returns `null`.
51
+ - *Note: For backwards compatibility, the legacy nested format `Visibility: { field: "path", value: val }` is also supported.*
52
+
53
+ ---
54
+
55
+ ## 🚀 Getting Started
56
+
57
+ ### 1. Installation
58
+ Install the package alongside `react-hook-form`:
59
+ ```bash
60
+ npm install yg-sdui react-hook-form
61
+ ```
62
+
63
+ ### 2. Basic Setup
64
+ Wrap the form in `react-hook-form`'s `FormProvider` and render fields using `<FormRenderer />`.
65
+
66
+ ```jsx
67
+ import React from 'react';
68
+ import { useForm, FormProvider } from 'react-hook-form';
69
+ import { FormRenderer } from 'yg-sdui';
70
+
71
+ const formFields = [
72
+ {
73
+ c_name: 'TextInput',
74
+ path: 'accountDetail.username',
75
+ label: 'Username',
76
+ placeholder: 'Enter your username',
77
+ validation: { required: 'Username is required' }
78
+ },
79
+ {
80
+ c_name: 'EmailInput',
81
+ path: 'accountDetail.email',
82
+ label: 'Email Address',
83
+ placeholder: 'Enter your email',
84
+ validation: { required: 'Email is required' }
85
+ }
86
+ ];
87
+
88
+ function MyForm() {
89
+ const methods = useForm({
90
+ defaultValues: {
91
+ accountDetail: { username: '', email: '' }
92
+ }
93
+ });
94
+
95
+ const onSubmit = (data) => {
96
+ console.log('Submitted Data:', data);
97
+ };
98
+
99
+ return (
100
+ <FormProvider {...methods}>
101
+ <form onSubmit={methods.handleSubmit(onSubmit)}>
102
+ {/* Render fields dynamically */}
103
+ <FormRenderer fields={formFields} />
104
+
105
+ <button type="submit" style={submitBtnStyle}>Submit</button>
106
+ </form>
107
+ </FormProvider>
108
+ );
109
+ }
110
+
111
+ const submitBtnStyle = {
112
+ padding: '10px 20px',
113
+ backgroundColor: '#6366f1',
114
+ color: '#fff',
115
+ border: 'none',
116
+ borderRadius: '6px',
117
+ cursor: 'pointer',
118
+ fontWeight: '600'
119
+ };
120
+ ```
121
+
122
+ ---
123
+
124
+ ## 📦 Component Catalog
125
+ **yg-sdui** includes **18** pre-styled components categorized for form data capture. Every component is designed with standard focus states, custom toggle behaviors, and validation error styling.
126
+
127
+ ### 1. Text & Numeric Inputs
128
+ | Component Name (`c_name`) | Purpose / Description | Key Props / Behaviors |
129
+ | :--- | :--- | :--- |
130
+ | **`TextInput`** | General single-line input field. | `placeholder`, standard input props |
131
+ | **`Textarea`** | Multi-line text field. | `rows` (defaults to `4`) |
132
+ | **`NumberInput`** | Input constraint for numbers. | `min`, `max`, `step` |
133
+ | **`EmailInput`** | Specialized email input field. | Auto type validation |
134
+ | **`PasswordInput`** | Secure entry with an eye toggle. | Toggle visibility button |
135
+ | **`PhoneInput`** | Country code and flag selector. | Dynamic country flag alignment |
136
+ | **`URLInput`** | Input with a prefix badge (`https://`). | Prefix labels |
137
+ | **`SearchInput`** | Search field with clean icon integration. | - |
138
+
139
+ ### 2. Selection Components
140
+ | Component Name (`c_name`) | Purpose / Description | Config Options |
141
+ | :--- | :--- | :--- |
142
+ | **`Select`** | Dropdown single selection list. | `options`: `[{ value, label }]` |
143
+ | **`MultiSelect`** | Dropdown list returning selected items as pills. | `options`: `[{ value, label }]` |
144
+ | **`RadioGroup`** | Radio button group. | `options`, `layout` (`'vertical'` \| `'horizontal'`) |
145
+ | **`Checkbox`** | Single checkbox returning boolean. | Standard checked behavior |
146
+ | **`CheckboxGroup`** | Multiple checkboxes returning string arrays. | `options`, `layout` (`'vertical'` \| `'horizontal'`) |
147
+ | **`ToggleSwitch`** | iOS-style sliding boolean switch. | - |
148
+
149
+ ### 3. Date & Time Components
150
+ | Component Name (`c_name`) | Purpose / Description | Key Props / Behaviors |
151
+ | :--- | :--- | :--- |
152
+ | **`DatePicker`** | Calendar dropdown selection. | Native date input |
153
+ | **`TimePicker`** | Digital clock input. | Native time input |
154
+ | **`DateTimePicker`** | Combination calendar and clock. | Native datetime-local input |
155
+ | **`DateRangePicker`** | Dual calendar selection for start/end dates. | `startPath`, `endPath`, `startLabel`, `endLabel` |
156
+
157
+ ---
158
+
159
+ ## ⚙️ Schema Reference
160
+ Every field item in your schema configuration array should follow this structure:
161
+
162
+ | Property | Type | Required | Description |
163
+ | :--- | :--- | :--- | :--- |
164
+ | `c_name` | `string` | **Yes** | The component name matching the registry (e.g. `'TextInput'`). |
165
+ | `path` | `string` | **Yes** | Dot-notation nested state binding path (e.g. `'profile.bio'`). *Note: Excluded in `DateRangePicker` in favor of `startPath`/`endPath`.* |
166
+ | `label` | `string` | No | Label text rendered above the field. |
167
+ | `placeholder`| `string` | No | Suggestive input help text. |
168
+ | `visibility` | `string` | No | The field path to watch for conditional visibility. |
169
+ | `value` | `any` | No | The target value for the visibility condition. If the watched field's value equals this, the field is shown. |
170
+ | `validation` | `object` | No | Hook form validators: `{ required, min, max, pattern, minLength, maxLength }`. |
171
+
172
+ ---
173
+
174
+ ## 🛠️ Showcase Example
175
+ Here is a comprehensive form configuration representing a nested registration system with conditional visibility:
176
+
177
+ ```javascript
178
+ const userRegistrationConfig = [
179
+ {
180
+ c_name: 'TextInput',
181
+ path: 'auth.username',
182
+ label: 'Username',
183
+ placeholder: 'username',
184
+ validation: { required: 'Username is required' }
185
+ },
186
+ {
187
+ c_name: 'PasswordInput',
188
+ path: 'auth.security.password',
189
+ label: 'Account Password',
190
+ placeholder: 'Minimum 8 characters',
191
+ validation: {
192
+ required: 'Password is required',
193
+ minLength: { value: 8, message: 'Password is too short' }
194
+ }
195
+ },
196
+ {
197
+ c_name: 'NumberInput',
198
+ path: 'personal.age',
199
+ label: 'Age',
200
+ placeholder: '21',
201
+ validation: { required: 'Please specify age' }
202
+ },
203
+ {
204
+ c_name: 'Textarea',
205
+ path: 'personal.restrictedBio',
206
+ label: 'Special Bio (Only visible for 18-year-olds)',
207
+ placeholder: 'Tell us your story...',
208
+ visibility: 'personal.age',
209
+ value: 18
210
+ },
211
+ {
212
+ c_name: 'MultiSelect',
213
+ path: 'preferences.techStack',
214
+ label: 'Preferred Technologies',
215
+ options: [
216
+ { value: 'react', label: 'React.js' },
217
+ { value: 'node', label: 'Node.js' },
218
+ { value: 'ts', label: 'TypeScript' },
219
+ { value: 'rust', label: 'Rust' }
220
+ ],
221
+ validation: { required: 'Choose at least one technology' }
222
+ },
223
+ {
224
+ c_name: 'DateRangePicker',
225
+ startPath: 'vacation.start',
226
+ endPath: 'vacation.end',
227
+ label: 'Scheduled Leave',
228
+ startLabel: 'Leave Starts',
229
+ endLabel: 'Leave Ends'
230
+ }
231
+ ];
232
+ ```
233
+
234
+ ---
235
+
236
+ ## 🔌 Extending with Custom Components
237
+ Extend the library by registering custom components to `componentMap`:
238
+
239
+ ```javascript
240
+ import { componentMap, FormRenderer } from 'yg-sdui';
241
+
242
+ // 1. Define custom React input
243
+ const CustomRatingInput = ({ path, label }) => {
244
+ return (
245
+ <div>
246
+ <label>{label}</label>
247
+ {/* custom register fields */}
248
+ </div>
249
+ );
250
+ };
251
+
252
+ // 2. Register it with the componentMap dictionary
253
+ componentMap['RatingInput'] = CustomRatingInput;
254
+
255
+ // 3. Use in JSON configuration
256
+ const config = [
257
+ {
258
+ c_name: 'RatingInput',
259
+ path: 'feedback.stars',
260
+ label: 'Rate your experience'
261
+ }
262
+ ];
263
+ ```
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ var de=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var Ne=Object.getOwnPropertyNames;var qe=Object.prototype.hasOwnProperty;var Ge=(e,o)=>{for(var n in o)de(e,n,{get:o[n],enumerable:!0})},Ae=(e,o,n,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Ne(o))!qe.call(e,i)&&i!==n&&de(e,i,{get:()=>o[i],enumerable:!(s=Me(o,i))||s.enumerable});return e};var $e=e=>Ae(de({},"__esModule",{value:!0}),e);var go={};Ge(go,{Checkbox:()=>oe,CheckboxGroup:()=>te,ComponentRenderer:()=>U,DatePicker:()=>M,DateRangePicker:()=>se,DateTimePicker:()=>ie,EmailInput:()=>_,FormInput:()=>pe,FormRenderer:()=>De,MultiSelect:()=>j,NumberInput:()=>X,PasswordInput:()=>J,PhoneInput:()=>K,RadioGroup:()=>ee,SearchInput:()=>Q,Select:()=>Z,TextInput:()=>w,Textarea:()=>H,TimePicker:()=>ne,ToggleSwitch:()=>re,URLInput:()=>Y});module.exports=$e(go);var yo=require("react"),me=require("react-hook-form"),q=require("react/jsx-runtime");function Ue({name:e,label:o,type:n="text",validation:s={},...i}){let l=(0,me.useFormContext)();if(!l)return console.warn("FormInput must be used within a FormProvider from react-hook-form"),null;let{register:a,formState:{errors:f}}=l,m=f[e];return(0,q.jsxs)("div",{style:{marginBottom:"1rem",display:"flex",flexDirection:"column",fontFamily:"sans-serif"},children:[o&&(0,q.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"500",fontSize:"0.875rem",color:"#374151"},children:o}),(0,q.jsx)("input",{id:e,type:n,...a(e,s),...i,style:{padding:"0.5rem 0.75rem",borderRadius:"6px",border:m?"1px solid #ef4444":"1px solid #d1d5db",fontSize:"0.875rem",outline:"none",transition:"border-color 0.15s ease-in-out"}}),m&&(0,q.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.25rem"},children:m.message||"This field is required"})]})}var pe=Ue;var wo=require("react"),fe=require("react-hook-form");var u=(e,o)=>{if(!(!e||!o))return o.split(".").reduce((n,s)=>n&&n[s]!==void 0?n[s]:void 0,e)};var G=require("react/jsx-runtime");function Oe({path:e,label:o,placeholder:n,type:s="text",validation:i={},...l}){let a=(0,fe.useFormContext)();if(!a)return console.warn("TextInput must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return(0,G.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,G.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,G.jsx)("input",{id:e,type:s,placeholder:n,...f(e,i),...l,style:{padding:"0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onFocus:t=>{t.target.style.borderColor=r?"#ef4444":"#6366f1",t.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:t=>{t.target.style.borderColor=r?"#ef4444":"#e5e7eb",t.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#e5e7eb")}}),r&&(0,G.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var w=Oe;var Io=require("react"),ce=require("react-hook-form");var A=require("react/jsx-runtime");function He({path:e,label:o,placeholder:n,rows:s=4,validation:i={},...l}){let a=(0,ce.useFormContext)();if(!a)return console.warn("Textarea must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return(0,A.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,A.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,A.jsx)("textarea",{id:e,placeholder:n,rows:s,...f(e,i),...l,style:{padding:"0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",resize:"vertical",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",fontFamily:"inherit"},onFocus:t=>{t.target.style.borderColor=r?"#ef4444":"#6366f1",t.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:t=>{t.target.style.borderColor=r?"#ef4444":"#e5e7eb",t.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#e5e7eb")}}),r&&(0,A.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var H=He;var To=require("react");var ue=require("react/jsx-runtime");function Xe(e){return(0,ue.jsx)(w,{type:"number",...e})}var X=Xe;var Eo=require("react");var ge=require("react/jsx-runtime");function _e(e){return(0,ge.jsx)(w,{type:"email",...e})}var _=_e;var xe=require("react"),ye=require("react-hook-form");var k=require("react/jsx-runtime");function Je({path:e,label:o,placeholder:n,validation:s={},...i}){let l=(0,ye.useFormContext)(),[a,f]=(0,xe.useState)(!1);if(!l)return console.warn("PasswordInput must be used within a FormProvider from react-hook-form"),null;let{register:m,formState:{errors:r}}=l,t=u(r,e),c=d=>{d.preventDefault(),f(!a)};return(0,k.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,k.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,k.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[(0,k.jsx)("input",{id:e,type:a?"text":"password",placeholder:n,...m(e,s),...i,style:{width:"100%",padding:"0.625rem 2.5rem 0.625rem 0.875rem",borderRadius:"8px",border:t?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",boxSizing:"border-box"},onFocus:d=>{d.target.style.borderColor=t?"#ef4444":"#6366f1",d.target.style.boxShadow=t?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:d=>{d.target.style.borderColor=t?"#ef4444":"#e5e7eb",d.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:d=>{document.activeElement!==d.target&&(d.target.style.borderColor=t?"#ef4444":"#cbd5e1")},onMouseLeave:d=>{document.activeElement!==d.target&&(d.target.style.borderColor=t?"#ef4444":"#e5e7eb")}}),(0,k.jsx)("button",{type:"button",onClick:c,style:{position:"absolute",right:"0.75rem",background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#6b7280",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1rem",outline:"none"},title:a?"Hide password":"Show password",children:a?(0,k.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,k.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,k.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,k.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),t&&(0,k.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:t.message||"This field is required"})]})}var J=Je;var $=require("react"),he=require("react-hook-form");var h=require("react/jsx-runtime"),be=[{code:"+1",flag:"\u{1F1FA}\u{1F1F8}",name:"United States/Canada"},{code:"+91",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+44",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+61",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+49",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+81",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+86",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+55",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+27",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"}];function Ke({path:e,label:o,placeholder:n="Enter phone number",validation:s={},...i}){let l=(0,he.useFormContext)();if(!l)return console.warn("PhoneInput must be used within a FormProvider from react-hook-form"),null;let{register:a,setValue:f,watch:m,formState:{errors:r}}=l,t=u(r,e),c=m(e),d=x=>{if(!x)return{countryCode:"+1",number:""};for(let z of be)if(x.startsWith(z.code))return{countryCode:z.code,number:x.slice(z.code.length).trim()};return{countryCode:"+1",number:x}},v=d(c),[C,b]=(0,$.useState)(v.countryCode),[L,B]=(0,$.useState)(v.number),[D,p]=(0,$.useState)(!1);(0,$.useEffect)(()=>{let x=d(c);x.countryCode!==C&&b(x.countryCode),x.number!==L&&B(x.number)},[c]);let g=(x,z)=>{let Ve=z.trim()?`${x} ${z.trim()}`:"";f(e,Ve,{shouldValidate:!0,shouldDirty:!0})},R=x=>{let z=x.target.value;b(z),g(z,L)},ae=x=>{let z=x.target.value;B(z),g(C,z)};return(0,h.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,h.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,h.jsx)("input",{type:"hidden",...a(e,s)}),(0,h.jsxs)("div",{style:{display:"flex",alignItems:"center",borderRadius:"8px",border:t?"1.5px solid #ef4444":D?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:D?t?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",backgroundColor:"#ffffff",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[(0,h.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center",backgroundColor:"#f9fafb"},children:[(0,h.jsx)("select",{value:C,onChange:R,onFocus:()=>p(!0),onBlur:()=>p(!1),style:{padding:"0.625rem 2.25rem 0.625rem 0.875rem",fontSize:"0.875rem",fontWeight:"500",color:"#374151",backgroundColor:"transparent",border:"none",outline:"none",appearance:"none",cursor:"pointer",display:"flex",alignItems:"center",zIndex:1},children:be.map(x=>(0,h.jsxs)("option",{value:x.code,children:[x.flag," ",x.code]},x.code))}),(0,h.jsx)("div",{style:{position:"absolute",right:"0.75rem",pointerEvents:"none",display:"flex",alignItems:"center",color:"#6b7280",zIndex:0},children:(0,h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,h.jsx)("polyline",{points:"6 9 12 15 18 9"})})})]}),(0,h.jsx)("div",{style:{width:"1.5px",height:"1.75rem",backgroundColor:"#e5e7eb"}}),(0,h.jsx)("div",{style:{paddingLeft:"0.75rem",display:"flex",alignItems:"center",color:"#9ca3af"},children:(0,h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,h.jsx)("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})})}),(0,h.jsx)("input",{type:"tel",placeholder:n,value:L,onChange:ae,onFocus:()=>p(!0),onBlur:()=>p(!1),...i,style:{flex:1,padding:"0.625rem 0.875rem",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"transparent",border:"none",outline:"none"}})]}),t&&(0,h.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:t.message||"This field is required"})]})}var K=Ke;var O=require("react"),we=require("react-hook-form");var S=require("react/jsx-runtime"),ve=e=>e?e.replace(/^(https?:\/\/)/,""):"",Ye=e=>{if(!e)return"";let o=e.trim();return o?o.startsWith("http://")||o.startsWith("https://")?o:`https://${o}`:""};function Qe({path:e,label:o,placeholder:n="example.com",validation:s={},...i}){let l=(0,we.useFormContext)();if(!l)return console.warn("URLInput must be used within a FormProvider from react-hook-form"),null;let{register:a,setValue:f,watch:m,formState:{errors:r}}=l,t=u(r,e),c=m(e),[d,v]=(0,O.useState)(ve(c)),[C,b]=(0,O.useState)(!1);(0,O.useEffect)(()=>{let B=ve(c);B!==d&&v(B)},[c]);let L=B=>{let D=B.target.value;v(D);let p=Ye(D);f(e,p,{shouldValidate:!0,shouldDirty:!0})};return(0,S.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,S.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,S.jsx)("input",{type:"hidden",...a(e,s)}),(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",borderRadius:"8px",border:t?"1.5px solid #ef4444":C?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:C?t?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",backgroundColor:"#ffffff",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[(0,S.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.625rem 0.875rem",backgroundColor:"#f3f4f6",borderRight:"1.5px solid #e5e7eb",color:"#6b7280",fontSize:"0.875rem",fontWeight:"500",userSelect:"none"},children:[(0,S.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,S.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,S.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),(0,S.jsx)("span",{children:"https://"})]}),(0,S.jsx)("input",{type:"text",placeholder:n,value:d,onChange:L,onFocus:()=>b(!0),onBlur:()=>b(!1),...i,style:{flex:1,padding:"0.625rem 0.875rem",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"transparent",border:"none",outline:"none"}})]}),t&&(0,S.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:t.message||"This field is required"})]})}var Y=Qe;var Xo=require("react");var ke=require("react/jsx-runtime");function Ze(e){return(0,ke.jsx)(w,{type:"search",...e})}var Q=Ze;var Yo=require("react"),Se=require("react-hook-form");var P=require("react/jsx-runtime");function je({path:e,label:o,options:n=[],placeholder:s,validation:i={},...l}){let a=(0,Se.useFormContext)();if(!a)return console.warn("Select must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return(0,P.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,P.jsx)("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,P.jsx)("div",{style:{position:"relative"},children:(0,P.jsxs)("select",{id:e,defaultValue:"",...f(e,i),...l,style:{width:"100%",padding:"0.625rem 2rem 0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",appearance:"none",backgroundImage:`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.75rem center",backgroundSize:"1rem",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",cursor:"pointer"},onFocus:t=>{t.target.style.borderColor=r?"#ef4444":"#6366f1",t.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:t=>{t.target.style.borderColor=r?"#ef4444":"#e5e7eb",t.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:t=>{document.activeElement!==t.target&&(t.target.style.borderColor=r?"#ef4444":"#e5e7eb")},children:[s&&(0,P.jsx)("option",{value:"",disabled:!0,children:s}),n.map((t,c)=>(0,P.jsx)("option",{value:t.value,children:t.label},c))]})}),r&&(0,P.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var Z=je;var V=require("react"),Ce=require("react-hook-form");var y=require("react/jsx-runtime");function eo({path:e,label:o,options:n=[],placeholder:s="Select options...",validation:i={},...l}){let a=(0,Ce.useFormContext)();if(!a)return console.warn("MultiSelect must be used within a FormProvider from react-hook-form"),null;let{register:f,setValue:m,watch:r,formState:{errors:t}}=a,c=u(t,e),[d,v]=(0,V.useState)(!1),C=(0,V.useRef)(null),b=r(e)||[];(0,V.useEffect)(()=>{f(e,i)},[f,e,i]),(0,V.useEffect)(()=>{let p=g=>{C.current&&!C.current.contains(g.target)&&v(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);let L=p=>{let g;b.includes(p)?g=b.filter(R=>R!==p):g=[...b,p],m(e,g,{shouldValidate:!0,shouldDirty:!0})},B=(p,g)=>{p.stopPropagation();let R=b.filter(ae=>ae!==g);m(e,R,{shouldValidate:!0,shouldDirty:!0})},D=p=>{let g=n.find(R=>R.value===p);return g?g.label:p};return(0,y.jsxs)("div",{ref:C,style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif",position:"relative"},children:[o&&(0,y.jsx)("label",{style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,y.jsxs)("div",{onClick:()=>v(!d),style:{minHeight:"38px",padding:"0.5rem 2rem 0.5rem 0.625rem",borderRadius:"8px",border:c?"1.5px solid #ef4444":d?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:d?c?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",fontSize:"0.875rem",backgroundColor:"#ffffff",display:"flex",flexWrap:"wrap",gap:"0.375rem",alignItems:"center",cursor:"pointer",position:"relative",transition:"all 0.2s",boxSizing:"border-box"},children:[b.length===0?(0,y.jsx)("span",{style:{color:"#9ca3af"},children:s}):b.map(p=>(0,y.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",backgroundColor:"#e0e7ff",color:"#4338ca",padding:"0.125rem 0.5rem",borderRadius:"6px",fontSize:"0.75rem",fontWeight:"500",gap:"0.25rem"},children:[D(p),(0,y.jsx)("button",{type:"button",onClick:g=>B(g,p),style:{border:"none",background:"none",padding:0,cursor:"pointer",color:"#6366f1",display:"flex",alignItems:"center",fontWeight:"bold"},children:"\xD7"})]},p)),(0,y.jsx)("div",{style:{position:"absolute",right:"0.75rem",display:"flex",alignItems:"center",color:"#6b7280"},children:(0,y.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("polyline",{points:"6 9 12 15 18 9"})})})]}),d&&(0,y.jsx)("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #e5e7eb",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",zIndex:50,maxHeight:"200px",overflowY:"auto",padding:"4px",boxSizing:"border-box"},children:n.length===0?(0,y.jsx)("div",{style:{padding:"0.5rem 0.75rem",color:"#9ca3af",fontSize:"0.875rem"},children:"No options available"}):n.map(p=>{let g=b.includes(p.value);return(0,y.jsxs)("div",{onClick:()=>L(p.value),style:{padding:"0.5rem 0.75rem",borderRadius:"6px",fontSize:"0.875rem",color:g?"#4338ca":"#1f2937",backgroundColor:g?"#f5f7ff":"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"between",transition:"background-color 0.15s"},onMouseEnter:R=>{g||(R.target.style.backgroundColor="#f3f4f6")},onMouseLeave:R=>{g||(R.target.style.backgroundColor="transparent")},children:[(0,y.jsx)("span",{style:{flexGrow:1},children:p.label}),g&&(0,y.jsx)("span",{style:{color:"#4338ca",fontWeight:"bold"},children:(0,y.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,y.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]},p.value)})}),c&&(0,y.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:c.message||"This field is required"})]})}var j=eo;var rt=require("react"),Ie=require("react-hook-form");var W=require("react/jsx-runtime");function oo({path:e,label:o,options:n=[],layout:s="vertical",validation:i={},...l}){let a=(0,Ie.useFormContext)();if(!a)return console.warn("RadioGroup must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return(0,W.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,W.jsx)("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,W.jsx)("div",{style:{display:"flex",flexDirection:s==="horizontal"?"row":"column",gap:s==="horizontal"?"1.25rem":"0.625rem",flexWrap:"wrap"},children:n.map((t,c)=>{let d=`${e}-${t.value}-${c}`;return(0,W.jsxs)("label",{htmlFor:d,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#4b5563",gap:"0.5rem"},children:[(0,W.jsx)("input",{id:d,type:"radio",value:t.value,...f(e,i),...l,style:{appearance:"none",backgroundColor:"#fff",margin:0,width:"18px",height:"18px",border:r?"1.5px solid #ef4444":"1.5px solid #cbd5e1",borderRadius:"50%",display:"grid",placeContent:"center",transition:"all 0.15s ease-in-out",cursor:"pointer",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",outline:"none"},onFocus:v=>{v.target.style.borderColor=r?"#ef4444":"#6366f1",v.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:v=>{v.target.style.borderColor=r?"#ef4444":"#cbd5e1",v.target.style.boxShadow="none"}}),(0,W.jsx)("span",{children:t.label})]},c)})}),(0,W.jsx)("style",{children:`
2
+ input[type="radio"]:checked {
3
+ border-color: #6366f1 !important;
4
+ background-color: #fff;
5
+ }
6
+ input[type="radio"]:checked::before {
7
+ content: "";
8
+ width: 10px;
9
+ height: 10px;
10
+ border-radius: 50%;
11
+ background-color: #6366f1;
12
+ display: block;
13
+ }
14
+ `}),r&&(0,W.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var ee=oo;var lt=require("react"),Fe=require("react-hook-form");var T=require("react/jsx-runtime");function to({path:e,label:o,validation:n={},...s}){let i=(0,Fe.useFormContext)();if(!i)return console.warn("Checkbox must be used within a FormProvider from react-hook-form"),null;let{register:l,watch:a,formState:{errors:f}}=i,m=u(f,e),r=a(e)||!1;return(0,T.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[(0,T.jsxs)("label",{htmlFor:e,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#374151",gap:"0.625rem",fontWeight:"500"},children:[(0,T.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"18px",height:"18px"},children:[(0,T.jsx)("input",{id:e,type:"checkbox",checked:r,...l(e,n),...s,style:{position:"absolute",opacity:0,width:"18px",height:"18px",margin:0,cursor:"pointer",zIndex:2}}),(0,T.jsx)("div",{style:{width:"18px",height:"18px",border:m?"1.5px solid #ef4444":r?"1.5px solid #6366f1":"1.5px solid #cbd5e1",borderRadius:"4px",backgroundColor:r?"#6366f1":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease-in-out",zIndex:1,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:r&&(0,T.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,T.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]}),(0,T.jsx)("span",{children:o})]}),m&&(0,T.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:m.message||"This field is required"})]})}var oe=to;var pt=require("react"),ze=require("react-hook-form");var I=require("react/jsx-runtime");function ro({path:e,label:o,options:n=[],layout:s="vertical",validation:i={},...l}){let a=(0,ze.useFormContext)();if(!a)return console.warn("CheckboxGroup must be used within a FormProvider from react-hook-form"),null;let{register:f,watch:m,formState:{errors:r}}=a,t=u(r,e),c=m(e)||[];return(0,I.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[o&&(0,I.jsx)("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:o}),(0,I.jsx)("div",{style:{display:"flex",flexDirection:s==="horizontal"?"row":"column",gap:s==="horizontal"?"1.25rem":"0.625rem",flexWrap:"wrap"},children:n.map((d,v)=>{let C=`${e}-${d.value}-${v}`,b=Array.isArray(c)?c.includes(d.value):c===d.value;return(0,I.jsxs)("label",{htmlFor:C,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#4b5563",gap:"0.5rem"},children:[(0,I.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"18px",height:"18px"},children:[(0,I.jsx)("input",{id:C,type:"checkbox",value:d.value,checked:b,...f(e,i),...l,style:{position:"absolute",opacity:0,width:"18px",height:"18px",margin:0,cursor:"pointer",zIndex:2}}),(0,I.jsx)("div",{style:{width:"18px",height:"18px",border:t?"1.5px solid #ef4444":b?"1.5px solid #6366f1":"1.5px solid #cbd5e1",borderRadius:"4px",backgroundColor:b?"#6366f1":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease-in-out",zIndex:1,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:b&&(0,I.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,I.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]}),(0,I.jsx)("span",{children:d.label})]},v)})}),t&&(0,I.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem"},children:t.message||"This field is required"})]})}var te=ro;var gt=require("react"),Re=require("react-hook-form");var E=require("react/jsx-runtime");function no({path:e,label:o,validation:n={},...s}){let i=(0,Re.useFormContext)();if(!i)return console.warn("ToggleSwitch must be used within a FormProvider from react-hook-form"),null;let{register:l,watch:a,formState:{errors:f}}=i,m=u(f,e),r=a(e)||!1;return(0,E.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[(0,E.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#374151",gap:"0.75rem",fontWeight:"500"},children:[(0,E.jsx)("input",{type:"checkbox",id:e,...l(e,n),...s,style:{position:"absolute",opacity:0,width:0,height:0,margin:0}}),(0,E.jsx)("div",{style:{position:"relative",width:"42px",height:"24px",backgroundColor:r?"#6366f1":"#d1d5db",borderRadius:"9999px",transition:"background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1)",border:m?"1.5px solid #ef4444":"1.5px solid transparent",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",display:"flex",alignItems:"center",padding:"2px",boxSizing:"border-box"},children:(0,E.jsx)("div",{style:{width:"18px",height:"18px",backgroundColor:"#ffffff",borderRadius:"50%",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",transform:r?"translateX(18px)":"translateX(0)",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"}})}),(0,E.jsx)("span",{children:o})]}),m&&(0,E.jsx)("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:m.message||"This field is required"})]})}var re=no;var vt=require("react");var Te=require("react/jsx-runtime");function io(e){return(0,Te.jsx)(w,{type:"date",...e})}var M=io;var Ct=require("react");var We=require("react/jsx-runtime");function so(e){return(0,We.jsx)(w,{type:"time",...e})}var ne=so;var Rt=require("react");var Be=require("react/jsx-runtime");function lo(e){return(0,Be.jsx)(w,{type:"datetime-local",...e})}var ie=lo;var Pt=require("react");var F=require("react/jsx-runtime");function ao({startPath:e,endPath:o,label:n,startLabel:s="Start Date",endLabel:i="End Date",validation:l={},...a}){return(0,F.jsxs)("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[n&&(0,F.jsx)("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:n}),(0,F.jsxs)("div",{style:{display:"flex",gap:"1rem",alignItems:"flex-start"},children:[(0,F.jsx)("div",{style:{flex:1},children:(0,F.jsx)(M,{path:e,label:s,validation:l,...a})}),(0,F.jsx)("div",{style:{display:"flex",alignItems:"center",height:"38px",marginTop:"1.75rem",color:"#9ca3af"},children:(0,F.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,F.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,F.jsx)("polyline",{points:"12 5 19 12 12 19"})]})}),(0,F.jsx)("div",{style:{flex:1},children:(0,F.jsx)(M,{path:o,label:i,validation:l,...a})})]})]})}var se=ao;var Pe={TextInput:w,Textarea:H,NumberInput:X,EmailInput:_,PasswordInput:J,PhoneInput:K,URLInput:Y,SearchInput:Q,Select:Z,MultiSelect:j,RadioGroup:ee,Checkbox:oe,CheckboxGroup:te,ToggleSwitch:re,DatePicker:M,TimePicker:ne,DateTimePicker:ie,DateRangePicker:se};var Ee=require("react/jsx-runtime");function mo({config:e}){let{c_name:o,dynamic_props:n=null,...s}=e??{},i=Pe[o];if(!i)return null;let l={...s};return delete l.visibility,delete l.Visibility,e&&("visibility"in e||"Visibility"in e)&&delete l.value,(0,Ee.jsx)(i,{...l})}var U=mo;var Le=require("react"),le=require("react-hook-form");var N=require("react/jsx-runtime"),po=(e,o)=>e===o?!0:e==null||o==null?e==o:String(e)===String(o);function fo({field:e,visibilityField:o,targetValue:n,control:s}){let i=(0,le.useWatch)({name:o,control:s});return po(i,n)?(0,N.jsx)(U,{config:e}):null}function co({field:e}){let o=(0,le.useFormContext)();if(!o)return console.warn("FormRenderer must be used within a FormProvider from react-hook-form for conditional visibility"),(0,N.jsx)(U,{config:e});let n=null,s=null,i=(e==null?void 0:e.visibility)!==void 0?e.visibility:e==null?void 0:e.Visibility;return i&&(typeof i=="object"?(n=i.field,s=i.value):typeof i=="string"&&(n=i,s=e==null?void 0:e.value)),n?(0,N.jsx)(fo,{field:e,visibilityField:n,targetValue:s,control:o.control}):(0,N.jsx)(U,{config:e})}function uo({fields:e}){let o=(0,Le.useMemo)(()=>(e||[]).map((n,s)=>{let i=n.id||n.path||s;return(0,N.jsx)(co,{field:n},i)}),[e]);return(0,N.jsx)("div",{children:o})}var De=uo;0&&(module.exports={Checkbox,CheckboxGroup,ComponentRenderer,DatePicker,DateRangePicker,DateTimePicker,EmailInput,FormInput,FormRenderer,MultiSelect,NumberInput,PasswordInput,PhoneInput,RadioGroup,SearchInput,Select,TextInput,Textarea,TimePicker,ToggleSwitch,URLInput});
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.js","../src/components/FormInput.jsx","../src/components/formfields/TextInput.jsx","../src/components/formfields/formUtils.js","../src/components/formfields/Textarea.jsx","../src/components/formfields/NumberInput.jsx","../src/components/formfields/EmailInput.jsx","../src/components/formfields/PasswordInput.jsx","../src/components/formfields/PhoneInput.jsx","../src/components/formfields/URLInput.jsx","../src/components/formfields/SearchInput.jsx","../src/components/formfields/Select.jsx","../src/components/formfields/MultiSelect.jsx","../src/components/formfields/RadioGroup.jsx","../src/components/formfields/Checkbox.jsx","../src/components/formfields/CheckboxGroup.jsx","../src/components/formfields/ToggleSwitch.jsx","../src/components/formfields/DatePicker.jsx","../src/components/formfields/TimePicker.jsx","../src/components/formfields/DateTimePicker.jsx","../src/components/formfields/DateRangePicker.jsx","../src/components/componentMap.jsx","../src/components/componentRenderer.jsx","../src/components/formRenderer.jsx"],"sourcesContent":["export { default as FormInput } from './components/FormInput';\nexport { default as TextInput } from './components/formfields/TextInput';\nexport { default as Textarea } from './components/formfields/Textarea';\nexport { default as NumberInput } from './components/formfields/NumberInput';\nexport { default as EmailInput } from './components/formfields/EmailInput';\nexport { default as PasswordInput } from './components/formfields/PasswordInput';\nexport { default as PhoneInput } from './components/formfields/PhoneInput';\nexport { default as URLInput } from './components/formfields/URLInput';\nexport { default as SearchInput } from './components/formfields/SearchInput';\nexport { default as Select } from './components/formfields/Select';\nexport { default as MultiSelect } from './components/formfields/MultiSelect';\nexport { default as RadioGroup } from './components/formfields/RadioGroup';\nexport { default as Checkbox } from './components/formfields/Checkbox';\nexport { default as CheckboxGroup } from './components/formfields/CheckboxGroup';\nexport { default as ToggleSwitch } from './components/formfields/ToggleSwitch';\nexport { default as DatePicker } from './components/formfields/DatePicker';\nexport { default as TimePicker } from './components/formfields/TimePicker';\nexport { default as DateTimePicker } from './components/formfields/DateTimePicker';\nexport { default as DateRangePicker } from './components/formfields/DateRangePicker';\nexport { default as ComponentRenderer } from './components/componentRenderer';\nexport { default as FormRenderer } from './components/formRenderer';\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\n\n/**\n * A reusable FormInput component integrated with react-hook-form.\n * Must be used inside a FormProvider component from react-hook-form.\n * \n * @param {Object} props\n * @param {string} props.name - The unique name for the input field.\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.type='text'] - Input type (e.g. 'text', 'email', 'password').\n * @param {Object} [props.validation] - Validation rules (e.g. required, minLength, pattern).\n */\nexport function FormInput({ name, label, type = 'text', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('FormInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = errors[name];\n\n return (\n <div style={{ marginBottom: '1rem', display: 'flex', flexDirection: 'column', fontFamily: 'sans-serif' }}>\n {label && (\n <label \n htmlFor={name} \n style={{ marginBottom: '0.5rem', fontWeight: '500', fontSize: '0.875rem', color: '#374151' }}\n >\n {label}\n </label>\n )}\n <input\n id={name}\n type={type}\n {...register(name, validation)}\n {...rest}\n style={{\n padding: '0.5rem 0.75rem',\n borderRadius: '6px',\n border: error ? '1px solid #ef4444' : '1px solid #d1d5db',\n fontSize: '0.875rem',\n outline: 'none',\n transition: 'border-color 0.15s ease-in-out',\n }}\n />\n {error && (\n <span style={{ color: '#ef4444', fontSize: '0.75rem', marginTop: '0.25rem' }}>\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\nexport default FormInput;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n\n/**\n * A highly styled and premium TextInput component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n *\n * @param {Object} props\n * @param {string} props.path - The nested form state path (e.g., 'accountDetail.username').\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.placeholder] - Input placeholder.\n * @param {string} [props.type='text'] - Input type (text, email, password, etc.).\n * @param {Object} [props.validation] - react-hook-form validation rules.\n */\nexport function TextInput({ path, label, placeholder, type = 'text', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('TextInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <input\n id={path}\n type={type}\n placeholder={placeholder}\n {...register(path, validation)}\n {...rest}\n style={{\n padding: '0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n // Inject dynamic focus ring and hover styles via standard inline pseudo-behavior if possible,\n // or clear standard visual state styling.\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default TextInput;\n","/**\n * Safely retrieve nested error objects using dot-notation.\n * E.g., path: \"accountDetail.username\" will resolve to errors.accountDetail?.username\n */\nexport const getNestedError = (errors, path) => {\n if (!errors || !path) return undefined;\n return path.split('.').reduce((obj, key) => (obj && obj[key] !== undefined ? obj[key] : undefined), errors);\n};\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium Textarea component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n *\n * @param {Object} props\n * @param {string} props.path - The nested form state path (e.g., 'accountDetail.bio').\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.placeholder] - Input placeholder.\n * @param {number} [props.rows=4] - Number of visible text lines.\n * @param {Object} [props.validation] - react-hook-form validation rules.\n */\nexport function Textarea({ path, label, placeholder, rows = 4, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Textarea must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <textarea\n id={path}\n placeholder={placeholder}\n rows={rows}\n {...register(path, validation)}\n {...rest}\n style={{\n padding: '0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n resize: 'vertical',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n fontFamily: 'inherit'\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Textarea;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function NumberInput(props) {\n return <TextInput type=\"number\" {...props} />;\n}\n\nexport default NumberInput;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function EmailInput(props) {\n return <TextInput type=\"email\" {...props} />;\n}\n\nexport default EmailInput;\n","import React, { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium PasswordInput component supporting nested form paths\n * and a visibility toggle.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function PasswordInput({ path, label, placeholder, validation = {}, ...rest }) {\n const methods = useFormContext();\n const [showPassword, setShowPassword] = useState(false);\n\n if (!methods) {\n console.warn('PasswordInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n const toggleVisibility = (e) => {\n e.preventDefault();\n setShowPassword(!showPassword);\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center' }}>\n <input\n id={path}\n type={showPassword ? 'text' : 'password'}\n placeholder={placeholder}\n {...register(path, validation)}\n {...rest}\n style={{\n width: '100%',\n padding: '0.625rem 2.5rem 0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n boxSizing: 'border-box',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n <button\n type=\"button\"\n onClick={toggleVisibility}\n style={{\n position: 'absolute',\n right: '0.75rem',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n padding: '4px',\n color: '#6b7280',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '1rem',\n outline: 'none',\n }}\n title={showPassword ? 'Hide password' : 'Show password'}\n >\n {showPassword ? (\n /* Eye Off Icon SVG */\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\"></path>\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line>\n </svg>\n ) : (\n /* Eye Icon SVG */\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"></path>\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n </svg>\n )}\n </button>\n </div>\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default PasswordInput;\n","import React, { useState, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\nconst countryCodes = [\n { code: '+1', flag: '🇺🇸', name: 'United States/Canada' },\n { code: '+91', flag: '🇮🇳', name: 'India' },\n { code: '+44', flag: '🇬🇧', name: 'United Kingdom' },\n { code: '+61', flag: '🇦🇺', name: 'Australia' },\n { code: '+49', flag: '🇩🇪', name: 'Germany' },\n { code: '+33', flag: '🇫🇷', name: 'France' },\n { code: '+81', flag: '🇯🇵', name: 'Japan' },\n { code: '+86', flag: '🇨🇳', name: 'China' },\n { code: '+55', flag: '🇧🇷', name: 'Brazil' },\n { code: '+27', flag: '🇿🇦', name: 'South Africa' },\n];\n\nexport function PhoneInput({ path, label, placeholder = 'Enter phone number', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('PhoneInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch the current value of this path in the form state (for initial values / external updates)\n const formValue = watch(path);\n\n // Parse initial state from form value or default\n const parsePhoneValue = (val) => {\n if (!val) return { countryCode: '+1', number: '' };\n // Find matching country code prefix\n for (const country of countryCodes) {\n if (val.startsWith(country.code)) {\n return {\n countryCode: country.code,\n number: val.slice(country.code.length).trim()\n };\n }\n }\n return { countryCode: '+1', number: val };\n };\n\n const initialParsed = parsePhoneValue(formValue);\n const [selectedCountry, setSelectedCountry] = useState(initialParsed.countryCode);\n const [numberVal, setNumberVal] = useState(initialParsed.number);\n const [isFocused, setIsFocused] = useState(false);\n\n // Keep local state in sync with external form state updates (e.g., reset)\n useEffect(() => {\n const parsed = parsePhoneValue(formValue);\n if (parsed.countryCode !== selectedCountry) {\n setSelectedCountry(parsed.countryCode);\n }\n if (parsed.number !== numberVal) {\n setNumberVal(parsed.number);\n }\n }, [formValue]);\n\n // Update RHF form state whenever local states change\n const updateFormValue = (country, num) => {\n const combined = num.trim() ? `${country} ${num.trim()}` : '';\n setValue(path, combined, { shouldValidate: true, shouldDirty: true });\n };\n\n const handleCountryChange = (e) => {\n const newCountry = e.target.value;\n setSelectedCountry(newCountry);\n updateFormValue(newCountry, numberVal);\n };\n\n const handleNumberChange = (e) => {\n const newNum = e.target.value;\n setNumberVal(newNum);\n updateFormValue(selectedCountry, newNum);\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n\n {/* Hidden input to register the react-hook-form path and validate it */}\n <input type=\"hidden\" {...register(path, validation)} />\n\n {/* Unified Input Container */}\n <div \n style={{\n display: 'flex',\n alignItems: 'center',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isFocused ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isFocused \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n backgroundColor: '#ffffff',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n overflow: 'hidden'\n }}\n >\n {/* Country Code Select wrapper */}\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', backgroundColor: '#f9fafb' }}>\n <select\n value={selectedCountry}\n onChange={handleCountryChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n style={{\n padding: '0.625rem 2.25rem 0.625rem 0.875rem',\n fontSize: '0.875rem',\n fontWeight: '500',\n color: '#374151',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n appearance: 'none',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n zIndex: 1\n }}\n >\n {countryCodes.map((country) => (\n <option key={country.code} value={country.code}>\n {country.flag} {country.code}\n </option>\n ))}\n </select>\n {/* Custom dropdown arrow */}\n <div style={{\n position: 'absolute',\n right: '0.75rem',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n color: '#6b7280',\n zIndex: 0\n }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n </div>\n </div>\n\n {/* Divider */}\n <div style={{ width: '1.5px', height: '1.75rem', backgroundColor: '#e5e7eb' }} />\n\n {/* Phone Icon */}\n <div style={{ paddingLeft: '0.75rem', display: 'flex', alignItems: 'center', color: '#9ca3af' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\"></path>\n </svg>\n </div>\n\n {/* Phone input field */}\n <input\n type=\"tel\"\n placeholder={placeholder}\n value={numberVal}\n onChange={handleNumberChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n {...rest}\n style={{\n flex: 1,\n padding: '0.625rem 0.875rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n }}\n />\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default PhoneInput;\n","import React, { useState, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\nconst stripProtocol = (val) => {\n if (!val) return '';\n return val.replace(/^(https?:\\/\\/)/, '');\n};\n\nconst formatUrlValue = (val) => {\n if (!val) return '';\n const trimmed = val.trim();\n if (!trimmed) return '';\n if (trimmed.startsWith('http://') || trimmed.startsWith('https://')) {\n return trimmed;\n }\n return `https://${trimmed}`;\n};\n\nexport function URLInput({ path, label, placeholder = 'example.com', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('URLInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch the form state value for initial/external changes\n const formValue = watch(path);\n\n // Local state for the visual (protocol-less) input value\n const [displayVal, setDisplayVal] = useState(stripProtocol(formValue));\n const [isFocused, setIsFocused] = useState(false);\n\n // Sync with external form state changes\n useEffect(() => {\n const stripped = stripProtocol(formValue);\n if (stripped !== displayVal) {\n setDisplayVal(stripped);\n }\n }, [formValue]);\n\n const handleInputChange = (e) => {\n const val = e.target.value;\n setDisplayVal(val);\n const formatted = formatUrlValue(val);\n setValue(path, formatted, { shouldValidate: true, shouldDirty: true });\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n\n {/* Hidden input to register the path in react-hook-form */}\n <input type=\"hidden\" {...register(path, validation)} />\n\n {/* Unified Input Container */}\n <div \n style={{\n display: 'flex',\n alignItems: 'center',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isFocused ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isFocused \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n backgroundColor: '#ffffff',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n overflow: 'hidden'\n }}\n >\n {/* Prefix Badge */}\n <div \n style={{ \n display: 'flex', \n alignItems: 'center', \n gap: '0.375rem',\n padding: '0.625rem 0.875rem',\n backgroundColor: '#f3f4f6',\n borderRight: '1.5px solid #e5e7eb',\n color: '#6b7280',\n fontSize: '0.875rem',\n fontWeight: '500',\n userSelect: 'none'\n }}\n >\n {/* Globe/Link Icon */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"></line>\n <path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\"></path>\n </svg>\n <span>https://</span>\n </div>\n\n {/* Input Field */}\n <input\n type=\"text\"\n placeholder={placeholder}\n value={displayVal}\n onChange={handleInputChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n {...rest}\n style={{\n flex: 1,\n padding: '0.625rem 0.875rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n }}\n />\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default URLInput;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function SearchInput(props) {\n return <TextInput type=\"search\" {...props} />;\n}\n\nexport default SearchInput;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium Select component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function Select({ path, label, options = [], placeholder, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Select must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div style={{ position: 'relative' }}>\n <select\n id={path}\n defaultValue=\"\"\n {...register(path, validation)}\n {...rest}\n style={{\n width: '100%',\n padding: '0.625rem 2rem 0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n appearance: 'none',\n backgroundImage: `url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>\")`,\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.75rem center',\n backgroundSize: '1rem',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n cursor: 'pointer',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n >\n {placeholder && <option value=\"\" disabled>{placeholder}</option>}\n {options.map((opt, idx) => (\n <option key={idx} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Select;\n","import React, { useState, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A premium MultiSelect component that displays selected choices as pills\n * and uses a custom styled dropdown list.\n */\nexport function MultiSelect({ path, label, options = [], placeholder = 'Select options...', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('MultiSelect must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n const [isOpen, setIsOpen] = useState(false);\n const containerRef = useRef(null);\n\n // Watch the field value in react-hook-form\n const selectedValues = watch(path) || [];\n\n // Register the field with validation rules\n useEffect(() => {\n register(path, validation);\n }, [register, path, validation]);\n\n // Handle outside clicks to close the dropdown\n useEffect(() => {\n const handleOutsideClick = (e) => {\n if (containerRef.current && !containerRef.current.contains(e.target)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleOutsideClick);\n return () => document.removeEventListener('mousedown', handleOutsideClick);\n }, []);\n\n const toggleOption = (value) => {\n let updated;\n if (selectedValues.includes(value)) {\n updated = selectedValues.filter((v) => v !== value);\n } else {\n updated = [...selectedValues, value];\n }\n setValue(path, updated, { shouldValidate: true, shouldDirty: true });\n };\n\n const removeOption = (e, value) => {\n e.stopPropagation();\n const updated = selectedValues.filter((v) => v !== value);\n setValue(path, updated, { shouldValidate: true, shouldDirty: true });\n };\n\n const getLabel = (value) => {\n const option = options.find((opt) => opt.value === value);\n return option ? option.label : value;\n };\n\n return (\n <div \n ref={containerRef}\n style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif', position: 'relative' }}\n >\n {label && (\n <label \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div\n onClick={() => setIsOpen(!isOpen)}\n style={{\n minHeight: '38px',\n padding: '0.5rem 2rem 0.5rem 0.625rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isOpen ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isOpen \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n fontSize: '0.875rem',\n backgroundColor: '#ffffff',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '0.375rem',\n alignItems: 'center',\n cursor: 'pointer',\n position: 'relative',\n transition: 'all 0.2s',\n boxSizing: 'border-box',\n }}\n >\n {selectedValues.length === 0 ? (\n <span style={{ color: '#9ca3af' }}>{placeholder}</span>\n ) : (\n selectedValues.map((val) => (\n <span\n key={val}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n backgroundColor: '#e0e7ff',\n color: '#4338ca',\n padding: '0.125rem 0.5rem',\n borderRadius: '6px',\n fontSize: '0.75rem',\n fontWeight: '500',\n gap: '0.25rem',\n }}\n >\n {getLabel(val)}\n <button\n type=\"button\"\n onClick={(e) => removeOption(e, val)}\n style={{\n border: 'none',\n background: 'none',\n padding: 0,\n cursor: 'pointer',\n color: '#6366f1',\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n }}\n >\n &times;\n </button>\n </span>\n ))\n )}\n\n {/* Dropdown Chevron Icon */}\n <div style={{ position: 'absolute', right: '0.75rem', display: 'flex', alignItems: 'center', color: '#6b7280' }}>\n <svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round'>\n <polyline points='6 9 12 15 18 9'></polyline>\n </svg>\n </div>\n </div>\n\n {isOpen && (\n <div\n style={{\n position: 'absolute',\n top: 'calc(100% + 4px)',\n left: 0,\n right: 0,\n backgroundColor: '#ffffff',\n borderRadius: '8px',\n border: '1px solid #e5e7eb',\n boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\n zIndex: 50,\n maxHeight: '200px',\n overflowY: 'auto',\n padding: '4px',\n boxSizing: 'border-box',\n }}\n >\n {options.length === 0 ? (\n <div style={{ padding: '0.5rem 0.75rem', color: '#9ca3af', fontSize: '0.875rem' }}>No options available</div>\n ) : (\n options.map((opt) => {\n const isSelected = selectedValues.includes(opt.value);\n return (\n <div\n key={opt.value}\n onClick={() => toggleOption(opt.value)}\n style={{\n padding: '0.5rem 0.75rem',\n borderRadius: '6px',\n fontSize: '0.875rem',\n color: isSelected ? '#4338ca' : '#1f2937',\n backgroundColor: isSelected ? '#f5f7ff' : 'transparent',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'between',\n transition: 'background-color 0.15s',\n }}\n onMouseEnter={(e) => {\n if (!isSelected) e.target.style.backgroundColor = '#f3f4f6';\n }}\n onMouseLeave={(e) => {\n if (!isSelected) e.target.style.backgroundColor = 'transparent';\n }}\n >\n <span style={{ flexGrow: 1 }}>{opt.label}</span>\n {isSelected && (\n <span style={{ color: '#4338ca', fontWeight: 'bold' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </span>\n )}\n </div>\n );\n })\n )}\n </div>\n )}\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default MultiSelect;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium RadioGroup component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function RadioGroup({ path, label, options = [], layout = 'vertical', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('RadioGroup must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div \n style={{ \n display: 'flex', \n flexDirection: layout === 'horizontal' ? 'row' : 'column', \n gap: layout === 'horizontal' ? '1.25rem' : '0.625rem',\n flexWrap: 'wrap'\n }}\n >\n {options.map((opt, idx) => {\n const id = `${path}-${opt.value}-${idx}`;\n return (\n <label \n key={idx}\n htmlFor={id}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#4b5563',\n gap: '0.5rem',\n }}\n >\n <input\n id={id}\n type=\"radio\"\n value={opt.value}\n {...register(path, validation)}\n {...rest}\n style={{\n appearance: 'none',\n backgroundColor: '#fff',\n margin: 0,\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #cbd5e1',\n borderRadius: '50%',\n display: 'grid',\n placeContent: 'center',\n transition: 'all 0.15s ease-in-out',\n cursor: 'pointer',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n outline: 'none',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n e.target.style.boxShadow = 'none';\n }}\n // We use CSS stylesheet injections or inline custom checks.\n // Since this is pure React, we can handle the checked state dot-coloring visually using a dynamic pseudo-style or simple inline styles.\n // An elegant way for pure React is to style the input visually when checked.\n // In standard CSS, `input:checked::before` works. Let's do that!\n // To do that in inline style, we can use the default stylesheet in HTML, or simply inject style elements if we want custom styling for dot.\n // Let's inject a tiny style tag for radio dot styling to look premium!\n />\n <span>{opt.label}</span>\n </label>\n );\n })}\n </div>\n \n {/* Tiny injected stylesheet for custom checkboxes and radios checking */}\n <style>{`\n input[type=\"radio\"]:checked {\n border-color: #6366f1 !important;\n background-color: #fff;\n }\n input[type=\"radio\"]:checked::before {\n content: \"\";\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: #6366f1;\n display: block;\n }\n `}</style>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default RadioGroup;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium single Checkbox component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function Checkbox({ path, label, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Checkbox must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n const isChecked = watch(path) || false;\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n <label \n htmlFor={path}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#374151',\n gap: '0.625rem',\n fontWeight: '500',\n }}\n >\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', width: '18px', height: '18px' }}>\n <input\n id={path}\n type=\"checkbox\"\n checked={isChecked}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: '18px',\n height: '18px',\n margin: 0,\n cursor: 'pointer',\n zIndex: 2,\n }}\n />\n <div\n style={{\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : isChecked ? '1.5px solid #6366f1' : '1.5px solid #cbd5e1',\n borderRadius: '4px',\n backgroundColor: isChecked ? '#6366f1' : '#ffffff',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s ease-in-out',\n zIndex: 1,\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n >\n {isChecked && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#ffffff\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n )}\n </div>\n </div>\n <span>{label}</span>\n </label>\n\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Checkbox;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium CheckboxGroup component.\n * Registers multiple checkboxes under the same nested path, producing an array of selected values.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function CheckboxGroup({ path, label, options = [], layout = 'vertical', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('CheckboxGroup must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n const watchedValue = watch(path) || [];\n\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div \n style={{ \n display: 'flex', \n flexDirection: layout === 'horizontal' ? 'row' : 'column', \n gap: layout === 'horizontal' ? '1.25rem' : '0.625rem',\n flexWrap: 'wrap'\n }}\n >\n {options.map((opt, idx) => {\n const id = `${path}-${opt.value}-${idx}`;\n const isChecked = Array.isArray(watchedValue)\n ? watchedValue.includes(opt.value)\n : watchedValue === opt.value;\n\n return (\n <label \n key={idx}\n htmlFor={id}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#4b5563',\n gap: '0.5rem',\n }}\n >\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', width: '18px', height: '18px' }}>\n <input\n id={id}\n type=\"checkbox\"\n value={opt.value}\n checked={isChecked}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: '18px',\n height: '18px',\n margin: 0,\n cursor: 'pointer',\n zIndex: 2,\n }}\n />\n <div\n style={{\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : isChecked ? '1.5px solid #6366f1' : '1.5px solid #cbd5e1',\n borderRadius: '4px',\n backgroundColor: isChecked ? '#6366f1' : '#ffffff',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s ease-in-out',\n zIndex: 1,\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n >\n {isChecked && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#ffffff\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n )}\n </div>\n </div>\n <span>{opt.label}</span>\n </label>\n );\n })}\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default CheckboxGroup;\n","import React, { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A premium sliding ToggleSwitch component (works like a boolean checkbox).\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function ToggleSwitch({ path, label, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('ToggleSwitch must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch state to dynamically animate the sliding switch state\n const isChecked = watch(path) || false;\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n <label \n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#374151',\n gap: '0.75rem',\n fontWeight: '500',\n }}\n >\n {/* Hidden native checkbox input to handle form state integration */}\n <input\n type=\"checkbox\"\n id={path}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: 0,\n height: 0,\n margin: 0,\n }}\n />\n \n {/* Visual Switch Body */}\n <div\n style={{\n position: 'relative',\n width: '42px',\n height: '24px',\n backgroundColor: isChecked ? '#6366f1' : '#d1d5db',\n borderRadius: '9999px',\n transition: 'background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n border: error ? '1.5px solid #ef4444' : '1.5px solid transparent',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n display: 'flex',\n alignItems: 'center',\n padding: '2px',\n boxSizing: 'border-box',\n }}\n >\n {/* Visual Sliding Thumb */}\n <div\n style={{\n width: '18px',\n height: '18px',\n backgroundColor: '#ffffff',\n borderRadius: '50%',\n boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',\n transform: isChecked ? 'translateX(18px)' : 'translateX(0)',\n transition: 'transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n }}\n />\n </div>\n \n <span>{label}</span>\n </label>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default ToggleSwitch;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function DatePicker(props) {\n return <TextInput type=\"date\" {...props} />;\n}\n\nexport default DatePicker;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function TimePicker(props) {\n return <TextInput type=\"time\" {...props} />;\n}\n\nexport default TimePicker;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function DateTimePicker(props) {\n return <TextInput type=\"datetime-local\" {...props} />;\n}\n\nexport default DateTimePicker;\n","import React from 'react';\nimport DatePicker from './DatePicker';\n\n/**\n * A highly styled and premium DateRangePicker component.\n * Combines two DatePicker inputs side-by-side using separate form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function DateRangePicker({ \n startPath, \n endPath, \n label, \n startLabel = 'Start Date', \n endLabel = 'End Date', \n validation = {}, \n ...rest \n}) {\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div style={{ display: 'flex', gap: '1rem', alignItems: 'flex-start' }}>\n <div style={{ flex: 1 }}>\n <DatePicker \n path={startPath} \n label={startLabel} \n validation={validation} \n {...rest} \n />\n </div>\n <div style={{ display: 'flex', alignItems: 'center', height: '38px', marginTop: '1.75rem', color: '#9ca3af' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n <polyline points=\"12 5 19 12 12 19\"></polyline>\n </svg>\n </div>\n <div style={{ flex: 1 }}>\n <DatePicker \n path={endPath} \n label={endLabel} \n validation={validation} \n {...rest} \n />\n </div>\n </div>\n </div>\n );\n}\n\nexport default DateRangePicker;\n","import TextInput from './formfields/TextInput';\nimport Textarea from './formfields/Textarea';\nimport NumberInput from './formfields/NumberInput';\nimport EmailInput from './formfields/EmailInput';\nimport PasswordInput from './formfields/PasswordInput';\nimport PhoneInput from './formfields/PhoneInput';\nimport URLInput from './formfields/URLInput';\nimport SearchInput from './formfields/SearchInput';\nimport Select from './formfields/Select';\nimport MultiSelect from './formfields/MultiSelect';\nimport RadioGroup from './formfields/RadioGroup';\nimport Checkbox from './formfields/Checkbox';\nimport CheckboxGroup from './formfields/CheckboxGroup';\nimport ToggleSwitch from './formfields/ToggleSwitch';\nimport DatePicker from './formfields/DatePicker';\nimport TimePicker from './formfields/TimePicker';\nimport DateTimePicker from './formfields/DateTimePicker';\nimport DateRangePicker from './formfields/DateRangePicker';\n\nconst componentMap = {\n TextInput,\n Textarea,\n NumberInput,\n EmailInput,\n PasswordInput,\n PhoneInput,\n URLInput,\n SearchInput,\n Select,\n MultiSelect,\n RadioGroup,\n Checkbox,\n CheckboxGroup,\n ToggleSwitch,\n DatePicker,\n TimePicker,\n DateTimePicker,\n DateRangePicker,\n};\n\nexport { componentMap };\nexport default componentMap;","import { componentMap } from \"./componentMap\";\n\nexport function ComponentRenderer({ config }) {\n const {\n c_name,\n dynamic_props = null,\n ...compProps\n } = config ?? {};\n\n const Component = componentMap[c_name];\n\n if (!Component) return null;\n\n const cleanProps = { ...compProps };\n delete cleanProps.visibility;\n delete cleanProps.Visibility;\n \n if (config && ('visibility' in config || 'Visibility' in config)) {\n delete cleanProps.value;\n }\n\n return (\n <Component {...cleanProps} />\n )\n}\n\nexport default ComponentRenderer;","import React, { useMemo } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport ComponentRenderer from \"./componentRenderer\";\n\nconst compareValues = (val1, val2) => {\n if (val1 === val2) return true;\n if (val1 == null || val2 == null) return val1 == val2;\n return String(val1) === String(val2);\n};\n\nfunction FieldVisibilityEvaluator({ field, visibilityField, targetValue, control }) {\n const watchedValue = useWatch({\n name: visibilityField,\n control,\n });\n\n const isVisible = compareValues(watchedValue, targetValue);\n\n if (!isVisible) {\n return null;\n }\n\n return <ComponentRenderer config={field} />;\n}\n\nfunction FieldVisibilityWrapper({ field }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('FormRenderer must be used within a FormProvider from react-hook-form for conditional visibility');\n return <ComponentRenderer config={field} />;\n }\n\n let visibilityField = null;\n let targetValue = null;\n\n const visProp = field?.visibility !== undefined ? field.visibility : field?.Visibility;\n\n if (visProp) {\n if (typeof visProp === 'object') {\n visibilityField = visProp.field;\n targetValue = visProp.value;\n } else if (typeof visProp === 'string') {\n visibilityField = visProp;\n targetValue = field?.value;\n }\n }\n\n if (!visibilityField) {\n return <ComponentRenderer config={field} />;\n }\n\n return (\n <FieldVisibilityEvaluator\n field={field}\n visibilityField={visibilityField}\n targetValue={targetValue}\n control={methods.control}\n />\n );\n}\n\nexport function FormRenderer({ fields }) {\n const updatedFields = useMemo(() => {\n return (fields || []).map((field, idx) => {\n const key = field.id || field.path || idx;\n return <FieldVisibilityWrapper key={key} field={field} />;\n });\n }, [fields]);\n\n return <div>{updatedFields}</div>;\n}\n\nexport default FormRenderer;"],"mappings":"0aAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,cAAAE,GAAA,kBAAAC,GAAA,sBAAAC,EAAA,eAAAC,EAAA,oBAAAC,GAAA,mBAAAC,GAAA,eAAAC,EAAA,cAAAC,GAAA,iBAAAC,GAAA,gBAAAC,EAAA,gBAAAC,EAAA,kBAAAC,EAAA,eAAAC,EAAA,eAAAC,GAAA,gBAAAC,EAAA,WAAAC,EAAA,cAAAC,EAAA,aAAAC,EAAA,eAAAC,GAAA,iBAAAC,GAAA,aAAAC,IAAA,eAAAC,GAAAvB,ICAA,IAAAwB,GAAkB,iBAClBC,GAA+B,2BAwB3BC,EAAA,6BAZG,SAASC,GAAU,CAAE,KAAAC,EAAM,MAAAC,EAAO,KAAAC,EAAO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AOA,GAAY,UACrBP,EAAkBO,EAAQ,MAC1BN,EAAcM,EAAQ,OACb,OAAOA,GAAY,WAC5BP,EAAkBO,EAClBN,EAAcF,GAAA,YAAAA,EAAO,QAIpBC,KAKH,OAACF,GAAA,CACC,MAAOC,EACP,gBAAiBC,EACjB,YAAaC,EACb,QAASK,EAAQ,QACnB,KATO,OAACF,EAAA,CAAkB,OAAQL,EAAO,CAW7C,CAEO,SAASS,GAAa,CAAE,OAAAC,CAAO,EAAG,CACvC,IAAMC,KAAgB,YAAQ,KACpBD,GAAU,CAAC,GAAG,IAAI,CAACV,EAAOY,IAAQ,CACxC,IAAMC,EAAMb,EAAM,IAAMA,EAAM,MAAQY,EACtC,SAAO,OAACN,GAAA,CAAiC,MAAON,GAAZa,CAAmB,CACzD,CAAC,EACA,CAACH,CAAM,CAAC,EAEX,SAAO,OAAC,OAAK,SAAAC,EAAc,CAC7B,CAEA,IAAOG,GAAQL","names":["index_exports","__export","Checkbox_default","CheckboxGroup_default","componentRenderer_default","DatePicker_default","DateRangePicker_default","DateTimePicker_default","EmailInput_default","FormInput_default","formRenderer_default","MultiSelect_default","NumberInput_default","PasswordInput_default","PhoneInput_default","RadioGroup_default","SearchInput_default","Select_default","TextInput_default","Textarea_default","TimePicker_default","ToggleSwitch_default","URLInput_default","__toCommonJS","import_react","import_react_hook_form","import_jsx_runtime","FormInput","name","label","type","validation","rest","methods","register","errors","error","FormInput_default","import_react","import_react_hook_form","getNestedError","errors","path","obj","key","import_jsx_runtime","TextInput","path","label","placeholder","type","validation","rest","methods","register","errors","error","getNestedError","e","TextInput_default","import_react","import_react_hook_form","import_jsx_runtime","Textarea","path","label","placeholder","rows","validation","rest","methods","register","errors","error","getNestedError","e","Textarea_default","import_react","import_jsx_runtime","NumberInput","props","TextInput_default","NumberInput_default","import_react","import_jsx_runtime","EmailInput","props","TextInput_default","EmailInput_default","import_react","import_react_hook_form","import_jsx_runtime","PasswordInput","path","label","placeholder","validation","rest","methods","showPassword","setShowPassword","register","errors","error","getNestedError","toggleVisibility","e","PasswordInput_default","import_react","import_react_hook_form","import_jsx_runtime","countryCodes","PhoneInput","path","label","placeholder","validation","rest","methods","register","setValue","watch","errors","error","getNestedError","formValue","parsePhoneValue","val","country","initialParsed","selectedCountry","setSelectedCountry","numberVal","setNumberVal","isFocused","setIsFocused","parsed","updateFormValue","num","combined","handleCountryChange","e","newCountry","handleNumberChange","newNum","PhoneInput_default","import_react","import_react_hook_form","import_jsx_runtime","stripProtocol","val","formatUrlValue","trimmed","URLInput","path","label","placeholder","validation","rest","methods","register","setValue","watch","errors","error","getNestedError","formValue","displayVal","setDisplayVal","isFocused","setIsFocused","stripped","handleInputChange","e","formatted","URLInput_default","import_react","import_jsx_runtime","SearchInput","props","TextInput_default","SearchInput_default","import_react","import_react_hook_form","import_jsx_runtime","Select","path","label","options","placeholder","validation","rest","methods","register","errors","error","getNestedError","e","opt","idx","Select_default","import_react","import_react_hook_form","import_jsx_runtime","MultiSelect","path","label","options","placeholder","validation","rest","methods","register","setValue","watch","errors","error","getNestedError","isOpen","setIsOpen","containerRef","selectedValues","handleOutsideClick","e","toggleOption","value","updated","v","removeOption","getLabel","option","opt","val","isSelected","MultiSelect_default","import_react","import_react_hook_form","import_jsx_runtime","RadioGroup","path","label","options","layout","validation","rest","methods","register","errors","error","getNestedError","opt","idx","id","e","RadioGroup_default","import_react","import_react_hook_form","import_jsx_runtime","Checkbox","path","label","validation","rest","methods","register","watch","errors","error","getNestedError","isChecked","Checkbox_default","import_react","import_react_hook_form","import_jsx_runtime","CheckboxGroup","path","label","options","layout","validation","rest","methods","register","watch","errors","error","getNestedError","watchedValue","opt","idx","id","isChecked","CheckboxGroup_default","import_react","import_react_hook_form","import_jsx_runtime","ToggleSwitch","path","label","validation","rest","methods","register","watch","errors","error","getNestedError","isChecked","ToggleSwitch_default","import_react","import_jsx_runtime","DatePicker","props","TextInput_default","DatePicker_default","import_react","import_jsx_runtime","TimePicker","props","TextInput_default","TimePicker_default","import_react","import_jsx_runtime","DateTimePicker","props","TextInput_default","DateTimePicker_default","import_react","import_jsx_runtime","DateRangePicker","startPath","endPath","label","startLabel","endLabel","validation","rest","DatePicker_default","DateRangePicker_default","componentMap","TextInput_default","Textarea_default","NumberInput_default","EmailInput_default","PasswordInput_default","PhoneInput_default","URLInput_default","SearchInput_default","Select_default","MultiSelect_default","RadioGroup_default","Checkbox_default","CheckboxGroup_default","ToggleSwitch_default","DatePicker_default","TimePicker_default","DateTimePicker_default","DateRangePicker_default","import_jsx_runtime","ComponentRenderer","config","c_name","dynamic_props","compProps","Component","componentMap","cleanProps","componentRenderer_default","import_react","import_react_hook_form","import_jsx_runtime","compareValues","val1","val2","FieldVisibilityEvaluator","field","visibilityField","targetValue","control","watchedValue","componentRenderer_default","FieldVisibilityWrapper","methods","visProp","FormRenderer","fields","updatedFields","idx","key","formRenderer_default"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+ import"react";import{useFormContext as ke}from"react-hook-form";import{jsx as O,jsxs as Ie}from"react/jsx-runtime";function Se({name:e,label:t,type:n="text",validation:s={},...i}){let l=ke();if(!l)return console.warn("FormInput must be used within a FormProvider from react-hook-form"),null;let{register:a,formState:{errors:f}}=l,m=f[e];return Ie("div",{style:{marginBottom:"1rem",display:"flex",flexDirection:"column",fontFamily:"sans-serif"},children:[t&&O("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"500",fontSize:"0.875rem",color:"#374151"},children:t}),O("input",{id:e,type:n,...a(e,s),...i,style:{padding:"0.5rem 0.75rem",borderRadius:"6px",border:m?"1px solid #ef4444":"1px solid #d1d5db",fontSize:"0.875rem",outline:"none",transition:"border-color 0.15s ease-in-out"}}),m&&O("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.25rem"},children:m.message||"This field is required"})]})}var Ce=Se;import"react";import{useFormContext as Fe}from"react-hook-form";var u=(e,t)=>{if(!(!e||!t))return t.split(".").reduce((n,s)=>n&&n[s]!==void 0?n[s]:void 0,e)};import{jsx as H,jsxs as Re}from"react/jsx-runtime";function ze({path:e,label:t,placeholder:n,type:s="text",validation:i={},...l}){let a=Fe();if(!a)return console.warn("TextInput must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return Re("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&H("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),H("input",{id:e,type:s,placeholder:n,...f(e,i),...l,style:{padding:"0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onFocus:o=>{o.target.style.borderColor=r?"#ef4444":"#6366f1",o.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:o=>{o.target.style.borderColor=r?"#ef4444":"#e5e7eb",o.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#e5e7eb")}}),r&&H("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var h=ze;import"react";import{useFormContext as Te}from"react-hook-form";import{jsx as X,jsxs as Be}from"react/jsx-runtime";function We({path:e,label:t,placeholder:n,rows:s=4,validation:i={},...l}){let a=Te();if(!a)return console.warn("Textarea must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return Be("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&X("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),X("textarea",{id:e,placeholder:n,rows:s,...f(e,i),...l,style:{padding:"0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",resize:"vertical",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",fontFamily:"inherit"},onFocus:o=>{o.target.style.borderColor=r?"#ef4444":"#6366f1",o.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:o=>{o.target.style.borderColor=r?"#ef4444":"#e5e7eb",o.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#e5e7eb")}}),r&&X("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var _=We;import"react";import{jsx as Ee}from"react/jsx-runtime";function Pe(e){return Ee(h,{type:"number",...e})}var J=Pe;import"react";import{jsx as De}from"react/jsx-runtime";function Le(e){return De(h,{type:"email",...e})}var K=Le;import{useState as Ve}from"react";import{useFormContext as Me}from"react-hook-form";import{jsx as F,jsxs as q}from"react/jsx-runtime";function Ne({path:e,label:t,placeholder:n,validation:s={},...i}){let l=Me(),[a,f]=Ve(!1);if(!l)return console.warn("PasswordInput must be used within a FormProvider from react-hook-form"),null;let{register:m,formState:{errors:r}}=l,o=u(r,e),c=d=>{d.preventDefault(),f(!a)};return q("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&F("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),q("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[F("input",{id:e,type:a?"text":"password",placeholder:n,...m(e,s),...i,style:{width:"100%",padding:"0.625rem 2.5rem 0.625rem 0.875rem",borderRadius:"8px",border:o?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",boxSizing:"border-box"},onFocus:d=>{d.target.style.borderColor=o?"#ef4444":"#6366f1",d.target.style.boxShadow=o?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:d=>{d.target.style.borderColor=o?"#ef4444":"#e5e7eb",d.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:d=>{document.activeElement!==d.target&&(d.target.style.borderColor=o?"#ef4444":"#cbd5e1")},onMouseLeave:d=>{document.activeElement!==d.target&&(d.target.style.borderColor=o?"#ef4444":"#e5e7eb")}}),F("button",{type:"button",onClick:c,style:{position:"absolute",right:"0.75rem",background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#6b7280",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1rem",outline:"none"},title:a?"Hide password":"Show password",children:a?q("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),F("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):q("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[F("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),F("circle",{cx:"12",cy:"12",r:"3"})]})})]}),o&&F("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:o.message||"This field is required"})]})}var Y=Ne;import{useState as Q,useEffect as qe}from"react";import{useFormContext as Ge}from"react-hook-form";import{jsx as S,jsxs as G}from"react/jsx-runtime";var ce=[{code:"+1",flag:"\u{1F1FA}\u{1F1F8}",name:"United States/Canada"},{code:"+91",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+44",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+61",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+49",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+81",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+86",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+55",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+27",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"}];function Ae({path:e,label:t,placeholder:n="Enter phone number",validation:s={},...i}){let l=Ge();if(!l)return console.warn("PhoneInput must be used within a FormProvider from react-hook-form"),null;let{register:a,setValue:f,watch:m,formState:{errors:r}}=l,o=u(r,e),c=m(e),d=x=>{if(!x)return{countryCode:"+1",number:""};for(let k of ce)if(x.startsWith(k.code))return{countryCode:k.code,number:x.slice(k.code.length).trim()};return{countryCode:"+1",number:x}},b=d(c),[v,y]=Q(b.countryCode),[W,I]=Q(b.number),[B,p]=Q(!1);qe(()=>{let x=d(c);x.countryCode!==v&&y(x.countryCode),x.number!==W&&I(x.number)},[c]);let g=(x,k)=>{let we=k.trim()?`${x} ${k.trim()}`:"";f(e,we,{shouldValidate:!0,shouldDirty:!0})},C=x=>{let k=x.target.value;y(k),g(k,W)},U=x=>{let k=x.target.value;I(k),g(v,k)};return G("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&S("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),S("input",{type:"hidden",...a(e,s)}),G("div",{style:{display:"flex",alignItems:"center",borderRadius:"8px",border:o?"1.5px solid #ef4444":B?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:B?o?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",backgroundColor:"#ffffff",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[G("div",{style:{position:"relative",display:"flex",alignItems:"center",backgroundColor:"#f9fafb"},children:[S("select",{value:v,onChange:C,onFocus:()=>p(!0),onBlur:()=>p(!1),style:{padding:"0.625rem 2.25rem 0.625rem 0.875rem",fontSize:"0.875rem",fontWeight:"500",color:"#374151",backgroundColor:"transparent",border:"none",outline:"none",appearance:"none",cursor:"pointer",display:"flex",alignItems:"center",zIndex:1},children:ce.map(x=>G("option",{value:x.code,children:[x.flag," ",x.code]},x.code))}),S("div",{style:{position:"absolute",right:"0.75rem",pointerEvents:"none",display:"flex",alignItems:"center",color:"#6b7280",zIndex:0},children:S("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:S("polyline",{points:"6 9 12 15 18 9"})})})]}),S("div",{style:{width:"1.5px",height:"1.75rem",backgroundColor:"#e5e7eb"}}),S("div",{style:{paddingLeft:"0.75rem",display:"flex",alignItems:"center",color:"#9ca3af"},children:S("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})})}),S("input",{type:"tel",placeholder:n,value:W,onChange:U,onFocus:()=>p(!0),onBlur:()=>p(!1),...i,style:{flex:1,padding:"0.625rem 0.875rem",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"transparent",border:"none",outline:"none"}})]}),o&&S("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:o.message||"This field is required"})]})}var Z=Ae;import{useState as ue,useEffect as $e}from"react";import{useFormContext as Ue}from"react-hook-form";import{jsx as z,jsxs as A}from"react/jsx-runtime";var ge=e=>e?e.replace(/^(https?:\/\/)/,""):"",Oe=e=>{if(!e)return"";let t=e.trim();return t?t.startsWith("http://")||t.startsWith("https://")?t:`https://${t}`:""};function He({path:e,label:t,placeholder:n="example.com",validation:s={},...i}){let l=Ue();if(!l)return console.warn("URLInput must be used within a FormProvider from react-hook-form"),null;let{register:a,setValue:f,watch:m,formState:{errors:r}}=l,o=u(r,e),c=m(e),[d,b]=ue(ge(c)),[v,y]=ue(!1);$e(()=>{let I=ge(c);I!==d&&b(I)},[c]);let W=I=>{let B=I.target.value;b(B);let p=Oe(B);f(e,p,{shouldValidate:!0,shouldDirty:!0})};return A("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&z("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),z("input",{type:"hidden",...a(e,s)}),A("div",{style:{display:"flex",alignItems:"center",borderRadius:"8px",border:o?"1.5px solid #ef4444":v?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:v?o?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",backgroundColor:"#ffffff",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"0.375rem",padding:"0.625rem 0.875rem",backgroundColor:"#f3f4f6",borderRight:"1.5px solid #e5e7eb",color:"#6b7280",fontSize:"0.875rem",fontWeight:"500",userSelect:"none"},children:[A("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[z("circle",{cx:"12",cy:"12",r:"10"}),z("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),z("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),z("span",{children:"https://"})]}),z("input",{type:"text",placeholder:n,value:d,onChange:W,onFocus:()=>y(!0),onBlur:()=>y(!1),...i,style:{flex:1,padding:"0.625rem 0.875rem",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"transparent",border:"none",outline:"none"}})]}),o&&z("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:o.message||"This field is required"})]})}var j=He;import"react";import{jsx as _e}from"react/jsx-runtime";function Xe(e){return _e(h,{type:"search",...e})}var ee=Xe;import"react";import{useFormContext as Je}from"react-hook-form";import{jsx as V,jsxs as xe}from"react/jsx-runtime";function Ke({path:e,label:t,options:n=[],placeholder:s,validation:i={},...l}){let a=Je();if(!a)return console.warn("Select must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return xe("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&V("label",{htmlFor:e,style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),V("div",{style:{position:"relative"},children:xe("select",{id:e,defaultValue:"",...f(e,i),...l,style:{width:"100%",padding:"0.625rem 2rem 0.625rem 0.875rem",borderRadius:"8px",border:r?"1.5px solid #ef4444":"1.5px solid #e5e7eb",fontSize:"0.875rem",color:"#1f2937",backgroundColor:"#ffffff",outline:"none",appearance:"none",backgroundImage:`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 0.75rem center",backgroundSize:"1rem",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",cursor:"pointer"},onFocus:o=>{o.target.style.borderColor=r?"#ef4444":"#6366f1",o.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:o=>{o.target.style.borderColor=r?"#ef4444":"#e5e7eb",o.target.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#cbd5e1")},onMouseLeave:o=>{document.activeElement!==o.target&&(o.target.style.borderColor=r?"#ef4444":"#e5e7eb")},children:[s&&V("option",{value:"",disabled:!0,children:s}),n.map((o,c)=>V("option",{value:o.value,children:o.label},c))]})}),r&&V("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var oe=Ke;import{useState as Ye,useEffect as ye,useRef as Qe}from"react";import{useFormContext as Ze}from"react-hook-form";import{jsx as w,jsxs as $}from"react/jsx-runtime";function je({path:e,label:t,options:n=[],placeholder:s="Select options...",validation:i={},...l}){let a=Ze();if(!a)return console.warn("MultiSelect must be used within a FormProvider from react-hook-form"),null;let{register:f,setValue:m,watch:r,formState:{errors:o}}=a,c=u(o,e),[d,b]=Ye(!1),v=Qe(null),y=r(e)||[];ye(()=>{f(e,i)},[f,e,i]),ye(()=>{let p=g=>{v.current&&!v.current.contains(g.target)&&b(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);let W=p=>{let g;y.includes(p)?g=y.filter(C=>C!==p):g=[...y,p],m(e,g,{shouldValidate:!0,shouldDirty:!0})},I=(p,g)=>{p.stopPropagation();let C=y.filter(U=>U!==g);m(e,C,{shouldValidate:!0,shouldDirty:!0})},B=p=>{let g=n.find(C=>C.value===p);return g?g.label:p};return $("div",{ref:v,style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif",position:"relative"},children:[t&&w("label",{style:{marginBottom:"0.5rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),$("div",{onClick:()=>b(!d),style:{minHeight:"38px",padding:"0.5rem 2rem 0.5rem 0.625rem",borderRadius:"8px",border:c?"1.5px solid #ef4444":d?"1.5px solid #6366f1":"1.5px solid #e5e7eb",boxShadow:d?c?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",fontSize:"0.875rem",backgroundColor:"#ffffff",display:"flex",flexWrap:"wrap",gap:"0.375rem",alignItems:"center",cursor:"pointer",position:"relative",transition:"all 0.2s",boxSizing:"border-box"},children:[y.length===0?w("span",{style:{color:"#9ca3af"},children:s}):y.map(p=>$("span",{style:{display:"inline-flex",alignItems:"center",backgroundColor:"#e0e7ff",color:"#4338ca",padding:"0.125rem 0.5rem",borderRadius:"6px",fontSize:"0.75rem",fontWeight:"500",gap:"0.25rem"},children:[B(p),w("button",{type:"button",onClick:g=>I(g,p),style:{border:"none",background:"none",padding:0,cursor:"pointer",color:"#6366f1",display:"flex",alignItems:"center",fontWeight:"bold"},children:"\xD7"})]},p)),w("div",{style:{position:"absolute",right:"0.75rem",display:"flex",alignItems:"center",color:"#6b7280"},children:w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:w("polyline",{points:"6 9 12 15 18 9"})})})]}),d&&w("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #e5e7eb",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",zIndex:50,maxHeight:"200px",overflowY:"auto",padding:"4px",boxSizing:"border-box"},children:n.length===0?w("div",{style:{padding:"0.5rem 0.75rem",color:"#9ca3af",fontSize:"0.875rem"},children:"No options available"}):n.map(p=>{let g=y.includes(p.value);return $("div",{onClick:()=>W(p.value),style:{padding:"0.5rem 0.75rem",borderRadius:"6px",fontSize:"0.875rem",color:g?"#4338ca":"#1f2937",backgroundColor:g?"#f5f7ff":"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"between",transition:"background-color 0.15s"},onMouseEnter:C=>{g||(C.target.style.backgroundColor="#f3f4f6")},onMouseLeave:C=>{g||(C.target.style.backgroundColor="transparent")},children:[w("span",{style:{flexGrow:1},children:p.label}),g&&w("span",{style:{color:"#4338ca",fontWeight:"bold"},children:w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:w("polyline",{points:"20 6 9 17 4 12"})})})]},p.value)})}),c&&w("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:c.message||"This field is required"})]})}var te=je;import"react";import{useFormContext as eo}from"react-hook-form";import{jsx as P,jsxs as be}from"react/jsx-runtime";function oo({path:e,label:t,options:n=[],layout:s="vertical",validation:i={},...l}){let a=eo();if(!a)return console.warn("RadioGroup must be used within a FormProvider from react-hook-form"),null;let{register:f,formState:{errors:m}}=a,r=u(m,e);return be("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&P("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),P("div",{style:{display:"flex",flexDirection:s==="horizontal"?"row":"column",gap:s==="horizontal"?"1.25rem":"0.625rem",flexWrap:"wrap"},children:n.map((o,c)=>{let d=`${e}-${o.value}-${c}`;return be("label",{htmlFor:d,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#4b5563",gap:"0.5rem"},children:[P("input",{id:d,type:"radio",value:o.value,...f(e,i),...l,style:{appearance:"none",backgroundColor:"#fff",margin:0,width:"18px",height:"18px",border:r?"1.5px solid #ef4444":"1.5px solid #cbd5e1",borderRadius:"50%",display:"grid",placeContent:"center",transition:"all 0.15s ease-in-out",cursor:"pointer",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",outline:"none"},onFocus:b=>{b.target.style.borderColor=r?"#ef4444":"#6366f1",b.target.style.boxShadow=r?"0 0 0 4px rgba(239, 68, 68, 0.15)":"0 0 0 4px rgba(99, 102, 241, 0.15)"},onBlur:b=>{b.target.style.borderColor=r?"#ef4444":"#cbd5e1",b.target.style.boxShadow="none"}}),P("span",{children:o.label})]},c)})}),P("style",{children:`
2
+ input[type="radio"]:checked {
3
+ border-color: #6366f1 !important;
4
+ background-color: #fff;
5
+ }
6
+ input[type="radio"]:checked::before {
7
+ content: "";
8
+ width: 10px;
9
+ height: 10px;
10
+ border-radius: 50%;
11
+ background-color: #6366f1;
12
+ display: block;
13
+ }
14
+ `}),r&&P("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:r.message||"This field is required"})]})}var re=oo;import"react";import{useFormContext as to}from"react-hook-form";import{jsx as E,jsxs as ne}from"react/jsx-runtime";function ro({path:e,label:t,validation:n={},...s}){let i=to();if(!i)return console.warn("Checkbox must be used within a FormProvider from react-hook-form"),null;let{register:l,watch:a,formState:{errors:f}}=i,m=u(f,e),r=a(e)||!1;return ne("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[ne("label",{htmlFor:e,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#374151",gap:"0.625rem",fontWeight:"500"},children:[ne("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"18px",height:"18px"},children:[E("input",{id:e,type:"checkbox",checked:r,...l(e,n),...s,style:{position:"absolute",opacity:0,width:"18px",height:"18px",margin:0,cursor:"pointer",zIndex:2}}),E("div",{style:{width:"18px",height:"18px",border:m?"1.5px solid #ef4444":r?"1.5px solid #6366f1":"1.5px solid #cbd5e1",borderRadius:"4px",backgroundColor:r?"#6366f1":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease-in-out",zIndex:1,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:r&&E("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:E("polyline",{points:"20 6 9 17 4 12"})})})]}),E("span",{children:t})]}),m&&E("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:m.message||"This field is required"})]})}var ie=ro;import"react";import{useFormContext as no}from"react-hook-form";import{jsx as R,jsxs as se}from"react/jsx-runtime";function io({path:e,label:t,options:n=[],layout:s="vertical",validation:i={},...l}){let a=no();if(!a)return console.warn("CheckboxGroup must be used within a FormProvider from react-hook-form"),null;let{register:f,watch:m,formState:{errors:r}}=a,o=u(r,e),c=m(e)||[];return se("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[t&&R("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:t}),R("div",{style:{display:"flex",flexDirection:s==="horizontal"?"row":"column",gap:s==="horizontal"?"1.25rem":"0.625rem",flexWrap:"wrap"},children:n.map((d,b)=>{let v=`${e}-${d.value}-${b}`,y=Array.isArray(c)?c.includes(d.value):c===d.value;return se("label",{htmlFor:v,style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#4b5563",gap:"0.5rem"},children:[se("div",{style:{position:"relative",display:"flex",alignItems:"center",width:"18px",height:"18px"},children:[R("input",{id:v,type:"checkbox",value:d.value,checked:y,...f(e,i),...l,style:{position:"absolute",opacity:0,width:"18px",height:"18px",margin:0,cursor:"pointer",zIndex:2}}),R("div",{style:{width:"18px",height:"18px",border:o?"1.5px solid #ef4444":y?"1.5px solid #6366f1":"1.5px solid #cbd5e1",borderRadius:"4px",backgroundColor:y?"#6366f1":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s ease-in-out",zIndex:1,boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:y&&R("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#ffffff",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",children:R("polyline",{points:"20 6 9 17 4 12"})})})]}),R("span",{children:d.label})]},b)})}),o&&R("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem"},children:o.message||"This field is required"})]})}var le=io;import"react";import{useFormContext as so}from"react-hook-form";import{jsx as M,jsxs as he}from"react/jsx-runtime";function lo({path:e,label:t,validation:n={},...s}){let i=so();if(!i)return console.warn("ToggleSwitch must be used within a FormProvider from react-hook-form"),null;let{register:l,watch:a,formState:{errors:f}}=i,m=u(f,e),r=a(e)||!1;return he("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[he("label",{style:{display:"inline-flex",alignItems:"center",cursor:"pointer",userSelect:"none",fontSize:"0.875rem",color:"#374151",gap:"0.75rem",fontWeight:"500"},children:[M("input",{type:"checkbox",id:e,...l(e,n),...s,style:{position:"absolute",opacity:0,width:0,height:0,margin:0}}),M("div",{style:{position:"relative",width:"42px",height:"24px",backgroundColor:r?"#6366f1":"#d1d5db",borderRadius:"9999px",transition:"background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1)",border:m?"1.5px solid #ef4444":"1.5px solid transparent",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",display:"flex",alignItems:"center",padding:"2px",boxSizing:"border-box"},children:M("div",{style:{width:"18px",height:"18px",backgroundColor:"#ffffff",borderRadius:"50%",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",transform:r?"translateX(18px)":"translateX(0)",transition:"transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)"}})}),M("span",{children:t})]}),m&&M("span",{style:{color:"#ef4444",fontSize:"0.75rem",marginTop:"0.375rem",fontWeight:"500",display:"flex",alignItems:"center",gap:"0.25rem",animation:"fadeIn 0.2s ease-in-out"},children:m.message||"This field is required"})]})}var ae=lo;import"react";import{jsx as mo}from"react/jsx-runtime";function ao(e){return mo(h,{type:"date",...e})}var L=ao;import"react";import{jsx as fo}from"react/jsx-runtime";function po(e){return fo(h,{type:"time",...e})}var de=po;import"react";import{jsx as uo}from"react/jsx-runtime";function co(e){return uo(h,{type:"datetime-local",...e})}var me=co;import"react";import{jsx as T,jsxs as pe}from"react/jsx-runtime";function go({startPath:e,endPath:t,label:n,startLabel:s="Start Date",endLabel:i="End Date",validation:l={},...a}){return pe("div",{style:{marginBottom:"1.25rem",display:"flex",flexDirection:"column",fontFamily:"system-ui, -apple-system, sans-serif"},children:[n&&T("span",{style:{marginBottom:"0.625rem",fontWeight:"600",fontSize:"0.875rem",color:"#374151",letterSpacing:"-0.01em"},children:n}),pe("div",{style:{display:"flex",gap:"1rem",alignItems:"flex-start"},children:[T("div",{style:{flex:1},children:T(L,{path:e,label:s,validation:l,...a})}),T("div",{style:{display:"flex",alignItems:"center",height:"38px",marginTop:"1.75rem",color:"#9ca3af"},children:pe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),T("polyline",{points:"12 5 19 12 12 19"})]})}),T("div",{style:{flex:1},children:T(L,{path:t,label:i,validation:l,...a})})]})]})}var fe=go;var ve={TextInput:h,Textarea:_,NumberInput:J,EmailInput:K,PasswordInput:Y,PhoneInput:Z,URLInput:j,SearchInput:ee,Select:oe,MultiSelect:te,RadioGroup:re,Checkbox:ie,CheckboxGroup:le,ToggleSwitch:ae,DatePicker:L,TimePicker:de,DateTimePicker:me,DateRangePicker:fe};import{jsx as yo}from"react/jsx-runtime";function xo({config:e}){let{c_name:t,dynamic_props:n=null,...s}=e??{},i=ve[t];if(!i)return null;let l={...s};return delete l.visibility,delete l.Visibility,e&&("visibility"in e||"Visibility"in e)&&delete l.value,yo(i,{...l})}var N=xo;import{useMemo as bo}from"react";import{useFormContext as ho,useWatch as vo}from"react-hook-form";import{jsx as D}from"react/jsx-runtime";var wo=(e,t)=>e===t?!0:e==null||t==null?e==t:String(e)===String(t);function ko({field:e,visibilityField:t,targetValue:n,control:s}){let i=vo({name:t,control:s});return wo(i,n)?D(N,{config:e}):null}function So({field:e}){let t=ho();if(!t)return console.warn("FormRenderer must be used within a FormProvider from react-hook-form for conditional visibility"),D(N,{config:e});let n=null,s=null,i=(e==null?void 0:e.visibility)!==void 0?e.visibility:e==null?void 0:e.Visibility;return i&&(typeof i=="object"?(n=i.field,s=i.value):typeof i=="string"&&(n=i,s=e==null?void 0:e.value)),n?D(ko,{field:e,visibilityField:n,targetValue:s,control:t.control}):D(N,{config:e})}function Co({fields:e}){let t=bo(()=>(e||[]).map((n,s)=>{let i=n.id||n.path||s;return D(So,{field:n},i)}),[e]);return D("div",{children:t})}var Io=Co;export{ie as Checkbox,le as CheckboxGroup,N as ComponentRenderer,L as DatePicker,fe as DateRangePicker,me as DateTimePicker,K as EmailInput,Ce as FormInput,Io as FormRenderer,te as MultiSelect,J as NumberInput,Y as PasswordInput,Z as PhoneInput,re as RadioGroup,ee as SearchInput,oe as Select,h as TextInput,_ as Textarea,de as TimePicker,ae as ToggleSwitch,j as URLInput};
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/FormInput.jsx","../src/components/formfields/TextInput.jsx","../src/components/formfields/formUtils.js","../src/components/formfields/Textarea.jsx","../src/components/formfields/NumberInput.jsx","../src/components/formfields/EmailInput.jsx","../src/components/formfields/PasswordInput.jsx","../src/components/formfields/PhoneInput.jsx","../src/components/formfields/URLInput.jsx","../src/components/formfields/SearchInput.jsx","../src/components/formfields/Select.jsx","../src/components/formfields/MultiSelect.jsx","../src/components/formfields/RadioGroup.jsx","../src/components/formfields/Checkbox.jsx","../src/components/formfields/CheckboxGroup.jsx","../src/components/formfields/ToggleSwitch.jsx","../src/components/formfields/DatePicker.jsx","../src/components/formfields/TimePicker.jsx","../src/components/formfields/DateTimePicker.jsx","../src/components/formfields/DateRangePicker.jsx","../src/components/componentMap.jsx","../src/components/componentRenderer.jsx","../src/components/formRenderer.jsx"],"sourcesContent":["import React from 'react';\nimport { useFormContext } from 'react-hook-form';\n\n/**\n * A reusable FormInput component integrated with react-hook-form.\n * Must be used inside a FormProvider component from react-hook-form.\n * \n * @param {Object} props\n * @param {string} props.name - The unique name for the input field.\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.type='text'] - Input type (e.g. 'text', 'email', 'password').\n * @param {Object} [props.validation] - Validation rules (e.g. required, minLength, pattern).\n */\nexport function FormInput({ name, label, type = 'text', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('FormInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = errors[name];\n\n return (\n <div style={{ marginBottom: '1rem', display: 'flex', flexDirection: 'column', fontFamily: 'sans-serif' }}>\n {label && (\n <label \n htmlFor={name} \n style={{ marginBottom: '0.5rem', fontWeight: '500', fontSize: '0.875rem', color: '#374151' }}\n >\n {label}\n </label>\n )}\n <input\n id={name}\n type={type}\n {...register(name, validation)}\n {...rest}\n style={{\n padding: '0.5rem 0.75rem',\n borderRadius: '6px',\n border: error ? '1px solid #ef4444' : '1px solid #d1d5db',\n fontSize: '0.875rem',\n outline: 'none',\n transition: 'border-color 0.15s ease-in-out',\n }}\n />\n {error && (\n <span style={{ color: '#ef4444', fontSize: '0.75rem', marginTop: '0.25rem' }}>\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\nexport default FormInput;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n\n/**\n * A highly styled and premium TextInput component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n *\n * @param {Object} props\n * @param {string} props.path - The nested form state path (e.g., 'accountDetail.username').\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.placeholder] - Input placeholder.\n * @param {string} [props.type='text'] - Input type (text, email, password, etc.).\n * @param {Object} [props.validation] - react-hook-form validation rules.\n */\nexport function TextInput({ path, label, placeholder, type = 'text', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('TextInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <input\n id={path}\n type={type}\n placeholder={placeholder}\n {...register(path, validation)}\n {...rest}\n style={{\n padding: '0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n // Inject dynamic focus ring and hover styles via standard inline pseudo-behavior if possible,\n // or clear standard visual state styling.\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default TextInput;\n","/**\n * Safely retrieve nested error objects using dot-notation.\n * E.g., path: \"accountDetail.username\" will resolve to errors.accountDetail?.username\n */\nexport const getNestedError = (errors, path) => {\n if (!errors || !path) return undefined;\n return path.split('.').reduce((obj, key) => (obj && obj[key] !== undefined ? obj[key] : undefined), errors);\n};\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium Textarea component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n *\n * @param {Object} props\n * @param {string} props.path - The nested form state path (e.g., 'accountDetail.bio').\n * @param {string} [props.label] - Optional label text.\n * @param {string} [props.placeholder] - Input placeholder.\n * @param {number} [props.rows=4] - Number of visible text lines.\n * @param {Object} [props.validation] - react-hook-form validation rules.\n */\nexport function Textarea({ path, label, placeholder, rows = 4, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Textarea must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <textarea\n id={path}\n placeholder={placeholder}\n rows={rows}\n {...register(path, validation)}\n {...rest}\n style={{\n padding: '0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n resize: 'vertical',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n fontFamily: 'inherit'\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Textarea;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function NumberInput(props) {\n return <TextInput type=\"number\" {...props} />;\n}\n\nexport default NumberInput;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function EmailInput(props) {\n return <TextInput type=\"email\" {...props} />;\n}\n\nexport default EmailInput;\n","import React, { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium PasswordInput component supporting nested form paths\n * and a visibility toggle.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function PasswordInput({ path, label, placeholder, validation = {}, ...rest }) {\n const methods = useFormContext();\n const [showPassword, setShowPassword] = useState(false);\n\n if (!methods) {\n console.warn('PasswordInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n const toggleVisibility = (e) => {\n e.preventDefault();\n setShowPassword(!showPassword);\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center' }}>\n <input\n id={path}\n type={showPassword ? 'text' : 'password'}\n placeholder={placeholder}\n {...register(path, validation)}\n {...rest}\n style={{\n width: '100%',\n padding: '0.625rem 2.5rem 0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n boxSizing: 'border-box',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n />\n <button\n type=\"button\"\n onClick={toggleVisibility}\n style={{\n position: 'absolute',\n right: '0.75rem',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n padding: '4px',\n color: '#6b7280',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '1rem',\n outline: 'none',\n }}\n title={showPassword ? 'Hide password' : 'Show password'}\n >\n {showPassword ? (\n /* Eye Off Icon SVG */\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24\"></path>\n <line x1=\"1\" y1=\"1\" x2=\"23\" y2=\"23\"></line>\n </svg>\n ) : (\n /* Eye Icon SVG */\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\"></path>\n <circle cx=\"12\" cy=\"12\" r=\"3\"></circle>\n </svg>\n )}\n </button>\n </div>\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default PasswordInput;\n","import React, { useState, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\nconst countryCodes = [\n { code: '+1', flag: '🇺🇸', name: 'United States/Canada' },\n { code: '+91', flag: '🇮🇳', name: 'India' },\n { code: '+44', flag: '🇬🇧', name: 'United Kingdom' },\n { code: '+61', flag: '🇦🇺', name: 'Australia' },\n { code: '+49', flag: '🇩🇪', name: 'Germany' },\n { code: '+33', flag: '🇫🇷', name: 'France' },\n { code: '+81', flag: '🇯🇵', name: 'Japan' },\n { code: '+86', flag: '🇨🇳', name: 'China' },\n { code: '+55', flag: '🇧🇷', name: 'Brazil' },\n { code: '+27', flag: '🇿🇦', name: 'South Africa' },\n];\n\nexport function PhoneInput({ path, label, placeholder = 'Enter phone number', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('PhoneInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch the current value of this path in the form state (for initial values / external updates)\n const formValue = watch(path);\n\n // Parse initial state from form value or default\n const parsePhoneValue = (val) => {\n if (!val) return { countryCode: '+1', number: '' };\n // Find matching country code prefix\n for (const country of countryCodes) {\n if (val.startsWith(country.code)) {\n return {\n countryCode: country.code,\n number: val.slice(country.code.length).trim()\n };\n }\n }\n return { countryCode: '+1', number: val };\n };\n\n const initialParsed = parsePhoneValue(formValue);\n const [selectedCountry, setSelectedCountry] = useState(initialParsed.countryCode);\n const [numberVal, setNumberVal] = useState(initialParsed.number);\n const [isFocused, setIsFocused] = useState(false);\n\n // Keep local state in sync with external form state updates (e.g., reset)\n useEffect(() => {\n const parsed = parsePhoneValue(formValue);\n if (parsed.countryCode !== selectedCountry) {\n setSelectedCountry(parsed.countryCode);\n }\n if (parsed.number !== numberVal) {\n setNumberVal(parsed.number);\n }\n }, [formValue]);\n\n // Update RHF form state whenever local states change\n const updateFormValue = (country, num) => {\n const combined = num.trim() ? `${country} ${num.trim()}` : '';\n setValue(path, combined, { shouldValidate: true, shouldDirty: true });\n };\n\n const handleCountryChange = (e) => {\n const newCountry = e.target.value;\n setSelectedCountry(newCountry);\n updateFormValue(newCountry, numberVal);\n };\n\n const handleNumberChange = (e) => {\n const newNum = e.target.value;\n setNumberVal(newNum);\n updateFormValue(selectedCountry, newNum);\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n\n {/* Hidden input to register the react-hook-form path and validate it */}\n <input type=\"hidden\" {...register(path, validation)} />\n\n {/* Unified Input Container */}\n <div \n style={{\n display: 'flex',\n alignItems: 'center',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isFocused ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isFocused \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n backgroundColor: '#ffffff',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n overflow: 'hidden'\n }}\n >\n {/* Country Code Select wrapper */}\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', backgroundColor: '#f9fafb' }}>\n <select\n value={selectedCountry}\n onChange={handleCountryChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n style={{\n padding: '0.625rem 2.25rem 0.625rem 0.875rem',\n fontSize: '0.875rem',\n fontWeight: '500',\n color: '#374151',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n appearance: 'none',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n zIndex: 1\n }}\n >\n {countryCodes.map((country) => (\n <option key={country.code} value={country.code}>\n {country.flag} {country.code}\n </option>\n ))}\n </select>\n {/* Custom dropdown arrow */}\n <div style={{\n position: 'absolute',\n right: '0.75rem',\n pointerEvents: 'none',\n display: 'flex',\n alignItems: 'center',\n color: '#6b7280',\n zIndex: 0\n }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n </div>\n </div>\n\n {/* Divider */}\n <div style={{ width: '1.5px', height: '1.75rem', backgroundColor: '#e5e7eb' }} />\n\n {/* Phone Icon */}\n <div style={{ paddingLeft: '0.75rem', display: 'flex', alignItems: 'center', color: '#9ca3af' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z\"></path>\n </svg>\n </div>\n\n {/* Phone input field */}\n <input\n type=\"tel\"\n placeholder={placeholder}\n value={numberVal}\n onChange={handleNumberChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n {...rest}\n style={{\n flex: 1,\n padding: '0.625rem 0.875rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n }}\n />\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default PhoneInput;\n","import React, { useState, useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\nconst stripProtocol = (val) => {\n if (!val) return '';\n return val.replace(/^(https?:\\/\\/)/, '');\n};\n\nconst formatUrlValue = (val) => {\n if (!val) return '';\n const trimmed = val.trim();\n if (!trimmed) return '';\n if (trimmed.startsWith('http://') || trimmed.startsWith('https://')) {\n return trimmed;\n }\n return `https://${trimmed}`;\n};\n\nexport function URLInput({ path, label, placeholder = 'example.com', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('URLInput must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch the form state value for initial/external changes\n const formValue = watch(path);\n\n // Local state for the visual (protocol-less) input value\n const [displayVal, setDisplayVal] = useState(stripProtocol(formValue));\n const [isFocused, setIsFocused] = useState(false);\n\n // Sync with external form state changes\n useEffect(() => {\n const stripped = stripProtocol(formValue);\n if (stripped !== displayVal) {\n setDisplayVal(stripped);\n }\n }, [formValue]);\n\n const handleInputChange = (e) => {\n const val = e.target.value;\n setDisplayVal(val);\n const formatted = formatUrlValue(val);\n setValue(path, formatted, { shouldValidate: true, shouldDirty: true });\n };\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n\n {/* Hidden input to register the path in react-hook-form */}\n <input type=\"hidden\" {...register(path, validation)} />\n\n {/* Unified Input Container */}\n <div \n style={{\n display: 'flex',\n alignItems: 'center',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isFocused ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isFocused \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n backgroundColor: '#ffffff',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n overflow: 'hidden'\n }}\n >\n {/* Prefix Badge */}\n <div \n style={{ \n display: 'flex', \n alignItems: 'center', \n gap: '0.375rem',\n padding: '0.625rem 0.875rem',\n backgroundColor: '#f3f4f6',\n borderRight: '1.5px solid #e5e7eb',\n color: '#6b7280',\n fontSize: '0.875rem',\n fontWeight: '500',\n userSelect: 'none'\n }}\n >\n {/* Globe/Link Icon */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"></line>\n <path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\"></path>\n </svg>\n <span>https://</span>\n </div>\n\n {/* Input Field */}\n <input\n type=\"text\"\n placeholder={placeholder}\n value={displayVal}\n onChange={handleInputChange}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n {...rest}\n style={{\n flex: 1,\n padding: '0.625rem 0.875rem',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: 'transparent',\n border: 'none',\n outline: 'none',\n }}\n />\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default URLInput;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function SearchInput(props) {\n return <TextInput type=\"search\" {...props} />;\n}\n\nexport default SearchInput;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium Select component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function Select({ path, label, options = [], placeholder, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Select must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <label \n htmlFor={path} \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div style={{ position: 'relative' }}>\n <select\n id={path}\n defaultValue=\"\"\n {...register(path, validation)}\n {...rest}\n style={{\n width: '100%',\n padding: '0.625rem 2rem 0.625rem 0.875rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #e5e7eb',\n fontSize: '0.875rem',\n color: '#1f2937',\n backgroundColor: '#ffffff',\n outline: 'none',\n appearance: 'none',\n backgroundImage: `url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>\")`,\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'right 0.75rem center',\n backgroundSize: '1rem',\n transition: 'all 0.2s cubic-bezier(0.4, 0, 0.2, 1)',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n cursor: 'pointer',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n e.target.style.boxShadow = '0 1px 2px 0 rgba(0, 0, 0, 0.05)';\n }}\n onMouseEnter={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n }\n }}\n onMouseLeave={(e) => {\n if (document.activeElement !== e.target) {\n e.target.style.borderColor = error ? '#ef4444' : '#e5e7eb';\n }\n }}\n >\n {placeholder && <option value=\"\" disabled>{placeholder}</option>}\n {options.map((opt, idx) => (\n <option key={idx} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Select;\n","import React, { useState, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A premium MultiSelect component that displays selected choices as pills\n * and uses a custom styled dropdown list.\n */\nexport function MultiSelect({ path, label, options = [], placeholder = 'Select options...', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('MultiSelect must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, setValue, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n const [isOpen, setIsOpen] = useState(false);\n const containerRef = useRef(null);\n\n // Watch the field value in react-hook-form\n const selectedValues = watch(path) || [];\n\n // Register the field with validation rules\n useEffect(() => {\n register(path, validation);\n }, [register, path, validation]);\n\n // Handle outside clicks to close the dropdown\n useEffect(() => {\n const handleOutsideClick = (e) => {\n if (containerRef.current && !containerRef.current.contains(e.target)) {\n setIsOpen(false);\n }\n };\n document.addEventListener('mousedown', handleOutsideClick);\n return () => document.removeEventListener('mousedown', handleOutsideClick);\n }, []);\n\n const toggleOption = (value) => {\n let updated;\n if (selectedValues.includes(value)) {\n updated = selectedValues.filter((v) => v !== value);\n } else {\n updated = [...selectedValues, value];\n }\n setValue(path, updated, { shouldValidate: true, shouldDirty: true });\n };\n\n const removeOption = (e, value) => {\n e.stopPropagation();\n const updated = selectedValues.filter((v) => v !== value);\n setValue(path, updated, { shouldValidate: true, shouldDirty: true });\n };\n\n const getLabel = (value) => {\n const option = options.find((opt) => opt.value === value);\n return option ? option.label : value;\n };\n\n return (\n <div \n ref={containerRef}\n style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif', position: 'relative' }}\n >\n {label && (\n <label \n style={{ \n marginBottom: '0.5rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </label>\n )}\n <div\n onClick={() => setIsOpen(!isOpen)}\n style={{\n minHeight: '38px',\n padding: '0.5rem 2rem 0.5rem 0.625rem',\n borderRadius: '8px',\n border: error ? '1.5px solid #ef4444' : isOpen ? '1.5px solid #6366f1' : '1.5px solid #e5e7eb',\n boxShadow: isOpen \n ? (error ? '0 0 0 4px rgba(239, 68, 68, 0.15)' : '0 0 0 4px rgba(99, 102, 241, 0.15)')\n : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n fontSize: '0.875rem',\n backgroundColor: '#ffffff',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '0.375rem',\n alignItems: 'center',\n cursor: 'pointer',\n position: 'relative',\n transition: 'all 0.2s',\n boxSizing: 'border-box',\n }}\n >\n {selectedValues.length === 0 ? (\n <span style={{ color: '#9ca3af' }}>{placeholder}</span>\n ) : (\n selectedValues.map((val) => (\n <span\n key={val}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n backgroundColor: '#e0e7ff',\n color: '#4338ca',\n padding: '0.125rem 0.5rem',\n borderRadius: '6px',\n fontSize: '0.75rem',\n fontWeight: '500',\n gap: '0.25rem',\n }}\n >\n {getLabel(val)}\n <button\n type=\"button\"\n onClick={(e) => removeOption(e, val)}\n style={{\n border: 'none',\n background: 'none',\n padding: 0,\n cursor: 'pointer',\n color: '#6366f1',\n display: 'flex',\n alignItems: 'center',\n fontWeight: 'bold',\n }}\n >\n &times;\n </button>\n </span>\n ))\n )}\n\n {/* Dropdown Chevron Icon */}\n <div style={{ position: 'absolute', right: '0.75rem', display: 'flex', alignItems: 'center', color: '#6b7280' }}>\n <svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round'>\n <polyline points='6 9 12 15 18 9'></polyline>\n </svg>\n </div>\n </div>\n\n {isOpen && (\n <div\n style={{\n position: 'absolute',\n top: 'calc(100% + 4px)',\n left: 0,\n right: 0,\n backgroundColor: '#ffffff',\n borderRadius: '8px',\n border: '1px solid #e5e7eb',\n boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\n zIndex: 50,\n maxHeight: '200px',\n overflowY: 'auto',\n padding: '4px',\n boxSizing: 'border-box',\n }}\n >\n {options.length === 0 ? (\n <div style={{ padding: '0.5rem 0.75rem', color: '#9ca3af', fontSize: '0.875rem' }}>No options available</div>\n ) : (\n options.map((opt) => {\n const isSelected = selectedValues.includes(opt.value);\n return (\n <div\n key={opt.value}\n onClick={() => toggleOption(opt.value)}\n style={{\n padding: '0.5rem 0.75rem',\n borderRadius: '6px',\n fontSize: '0.875rem',\n color: isSelected ? '#4338ca' : '#1f2937',\n backgroundColor: isSelected ? '#f5f7ff' : 'transparent',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'between',\n transition: 'background-color 0.15s',\n }}\n onMouseEnter={(e) => {\n if (!isSelected) e.target.style.backgroundColor = '#f3f4f6';\n }}\n onMouseLeave={(e) => {\n if (!isSelected) e.target.style.backgroundColor = 'transparent';\n }}\n >\n <span style={{ flexGrow: 1 }}>{opt.label}</span>\n {isSelected && (\n <span style={{ color: '#4338ca', fontWeight: 'bold' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n </span>\n )}\n </div>\n );\n })\n )}\n </div>\n )}\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default MultiSelect;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium RadioGroup component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function RadioGroup({ path, label, options = [], layout = 'vertical', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('RadioGroup must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div \n style={{ \n display: 'flex', \n flexDirection: layout === 'horizontal' ? 'row' : 'column', \n gap: layout === 'horizontal' ? '1.25rem' : '0.625rem',\n flexWrap: 'wrap'\n }}\n >\n {options.map((opt, idx) => {\n const id = `${path}-${opt.value}-${idx}`;\n return (\n <label \n key={idx}\n htmlFor={id}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#4b5563',\n gap: '0.5rem',\n }}\n >\n <input\n id={id}\n type=\"radio\"\n value={opt.value}\n {...register(path, validation)}\n {...rest}\n style={{\n appearance: 'none',\n backgroundColor: '#fff',\n margin: 0,\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : '1.5px solid #cbd5e1',\n borderRadius: '50%',\n display: 'grid',\n placeContent: 'center',\n transition: 'all 0.15s ease-in-out',\n cursor: 'pointer',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n outline: 'none',\n }}\n onFocus={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#6366f1';\n e.target.style.boxShadow = error \n ? '0 0 0 4px rgba(239, 68, 68, 0.15)' \n : '0 0 0 4px rgba(99, 102, 241, 0.15)';\n }}\n onBlur={(e) => {\n e.target.style.borderColor = error ? '#ef4444' : '#cbd5e1';\n e.target.style.boxShadow = 'none';\n }}\n // We use CSS stylesheet injections or inline custom checks.\n // Since this is pure React, we can handle the checked state dot-coloring visually using a dynamic pseudo-style or simple inline styles.\n // An elegant way for pure React is to style the input visually when checked.\n // In standard CSS, `input:checked::before` works. Let's do that!\n // To do that in inline style, we can use the default stylesheet in HTML, or simply inject style elements if we want custom styling for dot.\n // Let's inject a tiny style tag for radio dot styling to look premium!\n />\n <span>{opt.label}</span>\n </label>\n );\n })}\n </div>\n \n {/* Tiny injected stylesheet for custom checkboxes and radios checking */}\n <style>{`\n input[type=\"radio\"]:checked {\n border-color: #6366f1 !important;\n background-color: #fff;\n }\n input[type=\"radio\"]:checked::before {\n content: \"\";\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: #6366f1;\n display: block;\n }\n `}</style>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default RadioGroup;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium single Checkbox component supporting nested form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function Checkbox({ path, label, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('Checkbox must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n const isChecked = watch(path) || false;\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n <label \n htmlFor={path}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#374151',\n gap: '0.625rem',\n fontWeight: '500',\n }}\n >\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', width: '18px', height: '18px' }}>\n <input\n id={path}\n type=\"checkbox\"\n checked={isChecked}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: '18px',\n height: '18px',\n margin: 0,\n cursor: 'pointer',\n zIndex: 2,\n }}\n />\n <div\n style={{\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : isChecked ? '1.5px solid #6366f1' : '1.5px solid #cbd5e1',\n borderRadius: '4px',\n backgroundColor: isChecked ? '#6366f1' : '#ffffff',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s ease-in-out',\n zIndex: 1,\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n >\n {isChecked && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#ffffff\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n )}\n </div>\n </div>\n <span>{label}</span>\n </label>\n\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default Checkbox;\n","import React from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A highly styled and premium CheckboxGroup component.\n * Registers multiple checkboxes under the same nested path, producing an array of selected values.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function CheckboxGroup({ path, label, options = [], layout = 'vertical', validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('CheckboxGroup must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n const watchedValue = watch(path) || [];\n\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div \n style={{ \n display: 'flex', \n flexDirection: layout === 'horizontal' ? 'row' : 'column', \n gap: layout === 'horizontal' ? '1.25rem' : '0.625rem',\n flexWrap: 'wrap'\n }}\n >\n {options.map((opt, idx) => {\n const id = `${path}-${opt.value}-${idx}`;\n const isChecked = Array.isArray(watchedValue)\n ? watchedValue.includes(opt.value)\n : watchedValue === opt.value;\n\n return (\n <label \n key={idx}\n htmlFor={id}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#4b5563',\n gap: '0.5rem',\n }}\n >\n <div style={{ position: 'relative', display: 'flex', alignItems: 'center', width: '18px', height: '18px' }}>\n <input\n id={id}\n type=\"checkbox\"\n value={opt.value}\n checked={isChecked}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: '18px',\n height: '18px',\n margin: 0,\n cursor: 'pointer',\n zIndex: 2,\n }}\n />\n <div\n style={{\n width: '18px',\n height: '18px',\n border: error ? '1.5px solid #ef4444' : isChecked ? '1.5px solid #6366f1' : '1.5px solid #cbd5e1',\n borderRadius: '4px',\n backgroundColor: isChecked ? '#6366f1' : '#ffffff',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s ease-in-out',\n zIndex: 1,\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n }}\n >\n {isChecked && (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#ffffff\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\"></polyline>\n </svg>\n )}\n </div>\n </div>\n <span>{opt.label}</span>\n </label>\n );\n })}\n </div>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default CheckboxGroup;\n","import React, { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { getNestedError } from './formUtils';\n\n/**\n * A premium sliding ToggleSwitch component (works like a boolean checkbox).\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function ToggleSwitch({ path, label, validation = {}, ...rest }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('ToggleSwitch must be used within a FormProvider from react-hook-form');\n return null;\n }\n\n const { register, watch, formState: { errors } } = methods;\n const error = getNestedError(errors, path);\n\n // Watch state to dynamically animate the sliding switch state\n const isChecked = watch(path) || false;\n\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n <label \n style={{\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n userSelect: 'none',\n fontSize: '0.875rem',\n color: '#374151',\n gap: '0.75rem',\n fontWeight: '500',\n }}\n >\n {/* Hidden native checkbox input to handle form state integration */}\n <input\n type=\"checkbox\"\n id={path}\n {...register(path, validation)}\n {...rest}\n style={{\n position: 'absolute',\n opacity: 0,\n width: 0,\n height: 0,\n margin: 0,\n }}\n />\n \n {/* Visual Switch Body */}\n <div\n style={{\n position: 'relative',\n width: '42px',\n height: '24px',\n backgroundColor: isChecked ? '#6366f1' : '#d1d5db',\n borderRadius: '9999px',\n transition: 'background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n border: error ? '1.5px solid #ef4444' : '1.5px solid transparent',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\n display: 'flex',\n alignItems: 'center',\n padding: '2px',\n boxSizing: 'border-box',\n }}\n >\n {/* Visual Sliding Thumb */}\n <div\n style={{\n width: '18px',\n height: '18px',\n backgroundColor: '#ffffff',\n borderRadius: '50%',\n boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',\n transform: isChecked ? 'translateX(18px)' : 'translateX(0)',\n transition: 'transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)',\n }}\n />\n </div>\n \n <span>{label}</span>\n </label>\n\n {error && (\n <span \n style={{ \n color: '#ef4444', \n fontSize: '0.75rem', \n marginTop: '0.375rem',\n fontWeight: '500',\n display: 'flex',\n alignItems: 'center',\n gap: '0.25rem',\n animation: 'fadeIn 0.2s ease-in-out'\n }}\n >\n {error.message || 'This field is required'}\n </span>\n )}\n </div>\n );\n}\n\nexport default ToggleSwitch;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function DatePicker(props) {\n return <TextInput type=\"date\" {...props} />;\n}\n\nexport default DatePicker;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function TimePicker(props) {\n return <TextInput type=\"time\" {...props} />;\n}\n\nexport default TimePicker;\n","import React from 'react';\nimport TextInput from './TextInput';\n\nexport function DateTimePicker(props) {\n return <TextInput type=\"datetime-local\" {...props} />;\n}\n\nexport default DateTimePicker;\n","import React from 'react';\nimport DatePicker from './DatePicker';\n\n/**\n * A highly styled and premium DateRangePicker component.\n * Combines two DatePicker inputs side-by-side using separate form paths.\n * Must be used inside a FormProvider from react-hook-form.\n */\nexport function DateRangePicker({ \n startPath, \n endPath, \n label, \n startLabel = 'Start Date', \n endLabel = 'End Date', \n validation = {}, \n ...rest \n}) {\n return (\n <div style={{ marginBottom: '1.25rem', display: 'flex', flexDirection: 'column', fontFamily: 'system-ui, -apple-system, sans-serif' }}>\n {label && (\n <span \n style={{ \n marginBottom: '0.625rem', \n fontWeight: '600', \n fontSize: '0.875rem', \n color: '#374151',\n letterSpacing: '-0.01em'\n }}\n >\n {label}\n </span>\n )}\n <div style={{ display: 'flex', gap: '1rem', alignItems: 'flex-start' }}>\n <div style={{ flex: 1 }}>\n <DatePicker \n path={startPath} \n label={startLabel} \n validation={validation} \n {...rest} \n />\n </div>\n <div style={{ display: 'flex', alignItems: 'center', height: '38px', marginTop: '1.75rem', color: '#9ca3af' }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line>\n <polyline points=\"12 5 19 12 12 19\"></polyline>\n </svg>\n </div>\n <div style={{ flex: 1 }}>\n <DatePicker \n path={endPath} \n label={endLabel} \n validation={validation} \n {...rest} \n />\n </div>\n </div>\n </div>\n );\n}\n\nexport default DateRangePicker;\n","import TextInput from './formfields/TextInput';\nimport Textarea from './formfields/Textarea';\nimport NumberInput from './formfields/NumberInput';\nimport EmailInput from './formfields/EmailInput';\nimport PasswordInput from './formfields/PasswordInput';\nimport PhoneInput from './formfields/PhoneInput';\nimport URLInput from './formfields/URLInput';\nimport SearchInput from './formfields/SearchInput';\nimport Select from './formfields/Select';\nimport MultiSelect from './formfields/MultiSelect';\nimport RadioGroup from './formfields/RadioGroup';\nimport Checkbox from './formfields/Checkbox';\nimport CheckboxGroup from './formfields/CheckboxGroup';\nimport ToggleSwitch from './formfields/ToggleSwitch';\nimport DatePicker from './formfields/DatePicker';\nimport TimePicker from './formfields/TimePicker';\nimport DateTimePicker from './formfields/DateTimePicker';\nimport DateRangePicker from './formfields/DateRangePicker';\n\nconst componentMap = {\n TextInput,\n Textarea,\n NumberInput,\n EmailInput,\n PasswordInput,\n PhoneInput,\n URLInput,\n SearchInput,\n Select,\n MultiSelect,\n RadioGroup,\n Checkbox,\n CheckboxGroup,\n ToggleSwitch,\n DatePicker,\n TimePicker,\n DateTimePicker,\n DateRangePicker,\n};\n\nexport { componentMap };\nexport default componentMap;","import { componentMap } from \"./componentMap\";\n\nexport function ComponentRenderer({ config }) {\n const {\n c_name,\n dynamic_props = null,\n ...compProps\n } = config ?? {};\n\n const Component = componentMap[c_name];\n\n if (!Component) return null;\n\n const cleanProps = { ...compProps };\n delete cleanProps.visibility;\n delete cleanProps.Visibility;\n \n if (config && ('visibility' in config || 'Visibility' in config)) {\n delete cleanProps.value;\n }\n\n return (\n <Component {...cleanProps} />\n )\n}\n\nexport default ComponentRenderer;","import React, { useMemo } from 'react';\nimport { useFormContext, useWatch } from 'react-hook-form';\nimport ComponentRenderer from \"./componentRenderer\";\n\nconst compareValues = (val1, val2) => {\n if (val1 === val2) return true;\n if (val1 == null || val2 == null) return val1 == val2;\n return String(val1) === String(val2);\n};\n\nfunction FieldVisibilityEvaluator({ field, visibilityField, targetValue, control }) {\n const watchedValue = useWatch({\n name: visibilityField,\n control,\n });\n\n const isVisible = compareValues(watchedValue, targetValue);\n\n if (!isVisible) {\n return null;\n }\n\n return <ComponentRenderer config={field} />;\n}\n\nfunction FieldVisibilityWrapper({ field }) {\n const methods = useFormContext();\n\n if (!methods) {\n console.warn('FormRenderer must be used within a FormProvider from react-hook-form for conditional visibility');\n return <ComponentRenderer config={field} />;\n }\n\n let visibilityField = null;\n let targetValue = null;\n\n const visProp = field?.visibility !== undefined ? field.visibility : field?.Visibility;\n\n if (visProp) {\n if (typeof visProp === 'object') {\n visibilityField = visProp.field;\n targetValue = visProp.value;\n } else if (typeof visProp === 'string') {\n visibilityField = visProp;\n targetValue = field?.value;\n }\n }\n\n if (!visibilityField) {\n return <ComponentRenderer config={field} />;\n }\n\n return (\n <FieldVisibilityEvaluator\n field={field}\n visibilityField={visibilityField}\n targetValue={targetValue}\n control={methods.control}\n />\n );\n}\n\nexport function FormRenderer({ fields }) {\n const updatedFields = useMemo(() => {\n return (fields || []).map((field, idx) => {\n const key = field.id || field.path || idx;\n return <FieldVisibilityWrapper key={key} field={field} />;\n });\n }, [fields]);\n\n return <div>{updatedFields}</div>;\n}\n\nexport default FormRenderer;"],"mappings":"AAAA,MAAkB,QAClB,OAAS,kBAAAA,OAAsB,kBAwB3B,OAEI,OAAAC,EAFJ,QAAAC,OAAA,oBAZG,SAASC,GAAU,CAAE,KAAAC,EAAM,MAAAC,EAAO,KAAAC,EAAO,OAAQ,WAAAC,EAAa,CAAC,EAAG,GAAGC,CAAK,EAAG,CAClF,IAAMC,EAAUT,GAAe,EAE/B,GAAI,CAACS,EACH,eAAQ,KAAK,mEAAmE,EACzE,KAGT,GAAM,CAAE,SAAAC,EAAU,UAAW,CAAE,OAAAC,CAAO,CAAE,EAAIF,EACtCG,EAAQD,EAAOP,CAAI,EAEzB,OACEF,GAAC,OAAI,MAAO,CAAE,aAAc,OAAQ,QAAS,OAAQ,cAAe,SAAU,WAAY,YAAa,EACpG,UAAAG,GACCJ,EAAC,SACC,QAASG,EACT,MAAO,CAAE,aAAc,SAAU,WAAY,MAAO,SAAU,WAAY,MAAO,SAAU,EAE1F,SAAAC,EACH,EAEFJ,EAAC,SACC,GAAIG,EACJ,KAAME,EACL,GAAGI,EAASN,EAAMG,CAAU,EAC5B,GAAGC,EACJ,MAAO,CACL,QAAS,iBACT,aAAc,M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,GAAI,CAACD,EACH,eAAQ,KAAK,iGAAiG,EACvGb,EAACW,EAAA,CAAkB,OAAQN,EAAO,EAG3C,IAAIC,EAAkB,KAClBC,EAAc,KAEZQ,GAAUV,GAAA,YAAAA,EAAO,cAAe,OAAYA,EAAM,WAAaA,GAAA,YAAAA,EAAO,WAY5E,OAVIU,IACE,OAAOA,GAAY,UACrBT,EAAkBS,EAAQ,MAC1BR,EAAcQ,EAAQ,OACb,OAAOA,GAAY,WAC5BT,EAAkBS,EAClBR,EAAcF,GAAA,YAAAA,EAAO,QAIpBC,EAKHN,EAACI,GAAA,CACC,MAAOC,EACP,gBAAiBC,EACjB,YAAaC,EACb,QAASM,EAAQ,QACnB,EATOb,EAACW,EAAA,CAAkB,OAAQN,EAAO,CAW7C,CAEO,SAASW,GAAa,CAAE,OAAAC,CAAO,EAAG,CACvC,IAAMC,EAAgBC,GAAQ,KACpBF,GAAU,CAAC,GAAG,IAAI,CAACZ,EAAOe,IAAQ,CACxC,IAAMC,EAAMhB,EAAM,IAAMA,EAAM,MAAQe,EACtC,OAAOpB,EAACY,GAAA,CAAiC,MAAOP,GAAZgB,CAAmB,CACzD,CAAC,EACA,CAACJ,CAAM,CAAC,EAEX,OAAOjB,EAAC,OAAK,SAAAkB,EAAc,CAC7B,CAEA,IAAOI,GAAQN","names":["useFormContext","jsx","jsxs","FormInput","name","label","type","validation","rest","methods","register","errors","error","FormInput_default","useFormContext","getNestedError","errors","path","obj","key","jsx","jsxs","TextInput","path","label","placeholder","type","validation","rest","methods","useFormContext","register","errors","error","getNestedError","e","TextInput_default","useFormContext","jsx","jsxs","Textarea","path","label","placeholder","rows","validation","rest","methods","useFormContext","register","errors","error","getNestedError","e","Textarea_default","jsx","NumberInput","props","TextInput_default","NumberInput_default","jsx","EmailInput","props","TextInput_default","EmailInput_default","useState","useFormContext","jsx","jsxs","PasswordInput","path","label","placeholder","validation","rest","methods","useFormContext","showPassword","setShowPassword","useState","register","errors","error","getNestedError","toggleVisibility","e","PasswordInput_default","useState","useEffect","useFormContext","jsx","jsxs","countryCodes","PhoneInput","path","label","placeholder","validation","rest","methods","useFormContext","register","setValue","watch","errors","error","getNestedError","formValue","parsePhoneValue","val","country","initialParsed","selectedCountry","setSelectedCountry","useState","numberVal","setNumberVal","isFocused","setIsFocused","useEffect","parsed","updateFormValue","num","combined","handleCountryChange","e","newCountry","handleNumberChange","newNum","PhoneInput_default","useState","useEffect","useFormContext","jsx","jsxs","stripProtocol","val","formatUrlValue","trimmed","URLInput","path","label","placeholder","validation","rest","methods","useFormContext","register","setValue","watch","errors","error","getNestedError","formValue","displayVal","setDisplayVal","useState","isFocused","setIsFocused","useEffect","stripped","handleInputChange","e","formatted","URLInput_default","jsx","SearchInput","props","TextInput_default","SearchInput_default","useFormContext","jsx","jsxs","Select","path","label","options","placeholder","validation","rest","methods","useFormContext","register","errors","error","getNestedError","e","opt","idx","Select_default","useState","useEffect","useRef","useFormContext","jsx","jsxs","MultiSelect","path","label","options","placeholder","validation","rest","methods","useFormContext","register","setValue","watch","errors","error","getNestedError","isOpen","setIsOpen","useState","containerRef","useRef","selectedValues","useEffect","handleOutsideClick","e","toggleOption","value","updated","v","removeOption","getLabel","option","opt","val","isSelected","MultiSelect_default","useFormContext","jsx","jsxs","RadioGroup","path","label","options","layout","validation","rest","methods","useFormContext","register","errors","error","getNestedError","opt","idx","id","e","RadioGroup_default","useFormContext","jsx","jsxs","Checkbox","path","label","validation","rest","methods","useFormContext","register","watch","errors","error","getNestedError","isChecked","Checkbox_default","useFormContext","jsx","jsxs","CheckboxGroup","path","label","options","layout","validation","rest","methods","useFormContext","register","watch","errors","error","getNestedError","watchedValue","opt","idx","id","isChecked","CheckboxGroup_default","useFormContext","jsx","jsxs","ToggleSwitch","path","label","validation","rest","methods","useFormContext","register","watch","errors","error","getNestedError","isChecked","ToggleSwitch_default","jsx","DatePicker","props","TextInput_default","DatePicker_default","jsx","TimePicker","props","TextInput_default","TimePicker_default","jsx","DateTimePicker","props","TextInput_default","DateTimePicker_default","jsx","jsxs","DateRangePicker","startPath","endPath","label","startLabel","endLabel","validation","rest","DatePicker_default","DateRangePicker_default","componentMap","TextInput_default","Textarea_default","NumberInput_default","EmailInput_default","PasswordInput_default","PhoneInput_default","URLInput_default","SearchInput_default","Select_default","MultiSelect_default","RadioGroup_default","Checkbox_default","CheckboxGroup_default","ToggleSwitch_default","DatePicker_default","TimePicker_default","DateTimePicker_default","DateRangePicker_default","jsx","ComponentRenderer","config","c_name","dynamic_props","compProps","Component","componentMap","cleanProps","componentRenderer_default","useMemo","useFormContext","useWatch","jsx","compareValues","val1","val2","FieldVisibilityEvaluator","field","visibilityField","targetValue","control","watchedValue","useWatch","componentRenderer_default","FieldVisibilityWrapper","methods","useFormContext","visProp","FormRenderer","fields","updatedFields","useMemo","idx","key","formRenderer_default"]}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "yg-sdui-forms",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "React UI Component Library using React Hook Form",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.mjs",
10
+ "exports": {
11
+ ".": {
12
+ "require": "./dist/index.js",
13
+ "import": "./dist/index.mjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup",
21
+ "dev": "tsup --watch",
22
+ "playground:install": "npm --prefix playground install",
23
+ "playground:dev": "npm --prefix playground run dev"
24
+ },
25
+ "peerDependencies": {
26
+ "react": ">=16.8.0",
27
+ "react-dom": ">=16.8.0"
28
+ },
29
+ "dependencies": {
30
+ "react-hook-form": "^7.51.0"
31
+ },
32
+ "devDependencies": {
33
+ "react": "^18.3.1",
34
+ "react-dom": "^18.3.1",
35
+ "tsup": "^8.0.2",
36
+ "typescript": "^5.4.5"
37
+ }
38
+ }