1- import { input } from "../variables" ;
2- import { DropDown } from "./dropdown.js " ;
1+ import { border , contrast , font , input } from "../variables" ;
2+ import { DropDown } from "./dropdown" ;
33import { TextBox , TextBoxVertical } from "./textbox" ;
44/*
55
@@ -14,47 +14,97 @@ To customize any core styling, copy the part you want to customize to styles/nat
1414 Default Class For Mendix Reference Selector Widget
1515========================================================================== */
1616export const ReferenceSelector = {
17- container : Object . assign ( { } , TextBox . container ) ,
18- label : Object . assign ( { } , TextBox . label ) ,
19- pickerIOS : {
17+ container : {
2018 // All ViewStyle properties are allowed
21- backgroundColor : input . backgroundColor ,
22- } ,
23- pickerItemIOS : {
24- // All TextStyle properties are allowed
19+ ...TextBox . container ,
2520 } ,
26- pickerBackdropIOS : {
27- // All ViewStyle properties are allowed
28- } ,
29- pickerTopIOS : {
30- // All ViewStyle properties are allowed
31- backgroundColor : input . backgroundColor ,
21+ label : {
22+ // numberOfLines and all TextStyle properties are allowed
23+ ...TextBox . label ,
3224 } ,
3325 value : {
34- // All TextStyle properties are allowed
26+ // All TextStyle properties & placeholderTextColor are allowed
3527 color : input . color ,
3628 borderColor : input . borderColor ,
3729 backgroundColor : input . backgroundColor ,
3830 fontSize : input . fontSize ,
3931 fontFamily : input . fontFamily ,
4032 borderWidth : input . borderWidth ,
4133 borderRadius : input . borderRadius ,
34+ overflow : "hidden" ,
4235 paddingHorizontal : input . paddingHorizontal ,
4336 paddingVertical : input . paddingVertical ,
37+ placeholderTextColor : input . placeholderTextColor ,
4438 } ,
4539 valueDisabled : {
4640 // All TextStyle properties are allowed
4741 backgroundColor : input . disabledBackgroundColor ,
4842 } ,
49- validationMessage : Object . assign ( { } , TextBox . validationMessage ) ,
43+ validationMessage : {
44+ // All TextStyle properties are allowed
45+ ...TextBox . validationMessage ,
46+ } ,
47+ /* New dropdown styles start */
48+ valueContainer : {
49+ // All ViewStyle properties & rippleColor are allowed
50+ } ,
51+ menuWrapper : {
52+ // All ViewStyle properties are allowed
53+ borderRadius : border . radius ,
54+ shadowColor : "#000" ,
55+ shadowOpacity : 0.2 ,
56+ shadowRadius : 10 ,
57+ elevation : 16 ,
58+ } ,
59+ itemContainer : {
60+ // All ViewStyle properties are allowed
61+ maxWidth : 500 ,
62+ paddingVertical : 6 ,
63+ paddingHorizontal : 16 ,
64+ backgroundColor : input . backgroundColor ,
65+ } ,
66+ item : {
67+ // All TextStlye properties are allowed
68+ color : input . color ,
69+ } ,
70+ selectedItem : {
71+ // All TextStlye properties are allowed
72+ fontWeight : font . weightBold ,
73+ } ,
74+ selectedItemContainer : {
75+ // All ViewStyle properties are allowed
76+ backgroundColor : contrast . lowest ,
77+ } ,
78+ /* New dropdown styles end */
79+ useUniformDesign : true ,
80+ /* Old dropdown styles start */
81+ pickerIOS : {
82+ // All ViewStyle properties are allowed
83+ backgroundColor : input . backgroundColor ,
84+ } ,
85+ pickerItemIOS : {
86+ // All TextStyle properties are allowed
87+ } ,
88+ pickerBackdropIOS : {
89+ // All ViewStyle properties are allowed
90+ } ,
91+ pickerTopIOS : {
92+ // All ViewStyle properties are allowed
93+ backgroundColor : input . backgroundColor ,
94+ } ,
5095} ;
5196export const ReferenceSelectorVertical = {
5297 container : TextBoxVertical . container ,
5398 label : TextBoxVertical . label ,
54- pickerIOS : ReferenceSelector . pickerIOS ,
55- pickerItemIOS : ReferenceSelector . pickerItemIOS ,
56- pickerBackdropIOS : ReferenceSelector . pickerBackdropIOS ,
57- pickerTopIOS : ReferenceSelector . pickerTopIOS ,
5899 value : DropDown . value ,
59100 validationMessage : TextBoxVertical . validationMessage ,
101+ valueContainer : DropDown . valueContainer ,
102+ menuWrapper : DropDown . menuWrapper ,
103+ itemContainer : DropDown . itemContainer ,
104+ item : DropDown . item ,
105+ useUniformDesign : DropDown . useUniformDesign ,
106+ pickerIOS : DropDown . pickerIOS ,
107+ pickerItemIOS : DropDown . pickerItemIOS ,
108+ pickerBackdropIOS : DropDown . pickerBackdropIOS ,
109+ pickerTopIOS : DropDown . pickerTopIOS ,
60110} ;
0 commit comments