55 FormInput ,
66 FormTextarea ,
77 FormSelect ,
8+ FormNativeSelect ,
89 FormCheckbox ,
910 FormRadio ,
1011 FormSwitch ,
@@ -19,6 +20,7 @@ import {
1920 InputDesignProperties ,
2021 TextareaDesignProperties ,
2122 SelectDesignProperties ,
23+ NativeSelectDesignProperties ,
2224 CheckboxDesignProperties ,
2325 RadioDesignProperties ,
2426 SwitchDesignProperties ,
@@ -31,6 +33,7 @@ import {
3133 getReactCodeInput ,
3234 getReactCodeTextarea ,
3335 getReactCodeSelect ,
36+ getReactCodeNativeSelect ,
3437 getReactCodeCheckbox ,
3538 getReactCodeRadio ,
3639 getReactCodeSwitch ,
@@ -152,6 +155,26 @@ const formComponents: FormComponentModel[] = [
152155 { value : "option2" , label : "Option 2" , labelDescription : "Option 2 Description" } ,
153156 ] ,
154157 } ) ,
158+ new FormComponentModel ( {
159+ id : "native-select" ,
160+ label : "Native Select" ,
161+ label_info : "Browser select element" ,
162+ type : "native-select" ,
163+ category : "form" ,
164+ icon : "ChevronsUpDown" ,
165+ options : [
166+ {
167+ value : "option1" ,
168+ label : "Option 1" ,
169+ labelDescription : "Option 1 Description" ,
170+ } ,
171+ {
172+ value : "option2" ,
173+ label : "Option 2" ,
174+ labelDescription : "Option 2 Description" ,
175+ } ,
176+ ] ,
177+ } ) ,
155178 new FormComponentModel ( {
156179 id : "checkbox" ,
157180 label : "Checkbox" ,
@@ -250,7 +273,7 @@ const formComponents: FormComponentModel[] = [
250273
251274export const AVAILABLE_COMPONENTS : FormComponentModel [ ] = [ ...typographyComponents , ...formComponents ] ;
252275
253- export const NEW_COMPONENTS : string [ ] = [ "credit-card" ] ;
276+ export const NEW_COMPONENTS : string [ ] = [ "credit-card" , "native-select" ] ;
254277
255278const typographyViews = {
256279 text : { render : ( component : FormComponentModel , form : UseFormReturn < FieldValues , undefined > , field : ControllerRenderProps ) => Text ( component , form , field ) , renderDesignProperties : TextDesignProperties , reactCode : getReactCodeText } ,
@@ -261,6 +284,7 @@ const formViews = {
261284 "credit-card" : { render : FormCreditCard , renderDesignProperties : CreditCardDesignProperties , reactCode : getReactCodeCreditCard } ,
262285 textarea : { render : FormTextarea , renderDesignProperties : TextareaDesignProperties , reactCode : getReactCodeTextarea } ,
263286 select : { render : FormSelect , renderDesignProperties : SelectDesignProperties , reactCode : getReactCodeSelect } ,
287+ "native-select" : { render : FormNativeSelect , renderDesignProperties : NativeSelectDesignProperties , reactCode : getReactCodeNativeSelect } ,
264288 checkbox : { render : FormCheckbox , renderDesignProperties : CheckboxDesignProperties , reactCode : getReactCodeCheckbox } ,
265289 "checkbox-group" : { render : FormCheckboxGroup , renderDesignProperties : CheckboxGroupDesignProperties , reactCode : getReactCodeCheckboxGroup } ,
266290 radio : { render : FormRadio , renderDesignProperties : RadioDesignProperties , reactCode : getReactCodeRadio } ,
0 commit comments