|
1 | | -import { border, contrast, font, input } from "../variables"; |
2 | | -import { DropDown } from "./dropdown"; |
3 | | -import { TextBox, TextBoxVertical } from "./textbox"; |
4 | | -/* |
5 | | -
|
6 | | -DISCLAIMER: |
7 | | -Do not change this file because it is core styling. |
8 | | -Customizing core files will make updating Atlas much more difficult in the future. |
9 | | -To customize any core styling, copy the part you want to customize to styles/native/app/ so the core styling is overwritten. |
10 | | -
|
11 | | -========================================================================== |
12 | | - Reference Selector |
13 | | -
|
14 | | - Default Class For Mendix Reference Selector Widget |
15 | | -========================================================================== */ |
16 | | -export const ReferenceSelector = { |
17 | | - container: { |
18 | | - // All ViewStyle properties are allowed |
19 | | - ...TextBox.container, |
20 | | - }, |
21 | | - containerDisabled: { |
22 | | - // All ViewStyle properties are allowed |
23 | | - ...TextBox.containerDisabled, |
24 | | - }, |
25 | | - label: { |
26 | | - // numberOfLines and all TextStyle properties are allowed |
27 | | - ...TextBox.label, |
28 | | - }, |
29 | | - labelDisabled: { |
30 | | - // All TextStyle properties are allowed |
31 | | - ...TextBox.labelDisabled, |
32 | | - }, |
33 | | - value: { |
34 | | - // All TextStyle properties & placeholderTextColor are allowed |
35 | | - color: input.color, |
36 | | - borderColor: input.borderColor, |
37 | | - backgroundColor: input.backgroundColor, |
38 | | - fontSize: input.fontSize, |
39 | | - fontFamily: input.fontFamily, |
40 | | - borderWidth: input.borderWidth, |
41 | | - borderRadius: input.borderRadius, |
42 | | - overflow: "hidden", |
43 | | - paddingHorizontal: input.paddingHorizontal, |
44 | | - paddingVertical: input.paddingVertical, |
45 | | - placeholderTextColor: input.placeholderTextColor, |
46 | | - }, |
47 | | - valueDisabled: { |
48 | | - // All TextStyle properties are allowed |
49 | | - ...TextBox.inputDisabled |
50 | | - }, |
51 | | - validationMessage: { |
52 | | - // All TextStyle properties are allowed |
53 | | - ...TextBox.validationMessage, |
54 | | - }, |
55 | | - /* New dropdown styles start */ |
56 | | - valueContainer: { |
57 | | - // All ViewStyle properties & rippleColor are allowed |
58 | | - }, |
59 | | - valueContainerDisabled: { |
60 | | - // All ViewStyle properties are allowed |
61 | | - }, |
62 | | - menuWrapper: { |
63 | | - // All ViewStyle properties are allowed |
64 | | - borderRadius: border.radius, |
65 | | - shadowColor: "#000", |
66 | | - shadowOpacity: 0.2, |
67 | | - shadowRadius: 10, |
68 | | - elevation: 16, |
69 | | - }, |
70 | | - itemContainer: { |
71 | | - // All ViewStyle properties are allowed |
72 | | - maxWidth: 500, |
73 | | - paddingVertical: 6, |
74 | | - paddingHorizontal: 16, |
75 | | - backgroundColor: input.backgroundColor, |
76 | | - }, |
77 | | - item: { |
78 | | - // All TextStyle properties are allowed |
79 | | - color: input.color, |
80 | | - }, |
81 | | - selectedItem: { |
82 | | - // All TextStyle properties are allowed |
83 | | - fontWeight: font.weightBold, |
84 | | - }, |
85 | | - selectedItemContainer: { |
86 | | - // All ViewStyle properties are allowed |
87 | | - backgroundColor: contrast.lowest, |
88 | | - }, |
89 | | - /* New dropdown styles end */ |
90 | | - useUniformDesign: true, |
91 | | - /* Old dropdown styles start */ |
92 | | - pickerIOS: { |
93 | | - // All ViewStyle properties are allowed |
94 | | - backgroundColor: input.backgroundColor, |
95 | | - }, |
96 | | - pickerItemIOS: { |
97 | | - // All TextStyle properties are allowed |
98 | | - }, |
99 | | - pickerBackdropIOS: { |
100 | | - // All ViewStyle properties are allowed |
101 | | - }, |
102 | | - pickerTopIOS: { |
103 | | - // All ViewStyle properties are allowed |
104 | | - backgroundColor: input.backgroundColor, |
105 | | - }, |
106 | | -}; |
107 | | -export const ReferenceSelectorVertical = { |
108 | | - container: TextBoxVertical.container, |
109 | | - containerDisabled: TextBoxVertical.containerDisabled, |
110 | | - label: TextBoxVertical.label, |
111 | | - labelDisabled: TextBoxVertical.labelDisabled, |
112 | | - value: DropDown.value, |
113 | | - valueContainer: DropDown.valueContainer, |
114 | | - valueContainerDisabled: DropDown.valueContainerDisabled, |
115 | | - validationMessage: TextBoxVertical.validationMessage, |
116 | | - menuWrapper: DropDown.menuWrapper, |
117 | | - itemContainer: DropDown.itemContainer, |
118 | | - item: DropDown.item, |
119 | | - useUniformDesign: DropDown.useUniformDesign, |
120 | | - pickerIOS: DropDown.pickerIOS, |
121 | | - pickerItemIOS: DropDown.pickerItemIOS, |
122 | | - pickerBackdropIOS: DropDown.pickerBackdropIOS, |
123 | | - pickerTopIOS: DropDown.pickerTopIOS, |
124 | | -}; |
| 1 | +import { border, contrast, font, input } from "../variables"; |
| 2 | +import { DropDown } from "./dropdown"; |
| 3 | +import { TextBox, TextBoxVertical } from "./textbox"; |
| 4 | +/* |
| 5 | +
|
| 6 | +DISCLAIMER: |
| 7 | +Do not change this file because it is core styling. |
| 8 | +Customizing core files will make updating Atlas much more difficult in the future. |
| 9 | +To customize any core styling, copy the part you want to customize to styles/native/app/ so the core styling is overwritten. |
| 10 | +
|
| 11 | +========================================================================== |
| 12 | + Reference Selector |
| 13 | +
|
| 14 | + Default Class For Mendix Reference Selector Widget |
| 15 | +========================================================================== */ |
| 16 | +export const ReferenceSelector = { |
| 17 | + container: { |
| 18 | + // All ViewStyle properties are allowed |
| 19 | + ...TextBox.container, |
| 20 | + }, |
| 21 | + containerDisabled: { |
| 22 | + // All ViewStyle properties are allowed |
| 23 | + ...TextBox.containerDisabled, |
| 24 | + }, |
| 25 | + label: { |
| 26 | + // numberOfLines and all TextStyle properties are allowed |
| 27 | + ...TextBox.label, |
| 28 | + }, |
| 29 | + labelDisabled: { |
| 30 | + // All TextStyle properties are allowed |
| 31 | + ...TextBox.labelDisabled, |
| 32 | + }, |
| 33 | + value: { |
| 34 | + // All TextStyle properties & placeholderTextColor are allowed |
| 35 | + color: input.color, |
| 36 | + borderColor: input.borderColor, |
| 37 | + backgroundColor: input.backgroundColor, |
| 38 | + fontSize: input.fontSize, |
| 39 | + fontFamily: input.fontFamily, |
| 40 | + borderWidth: input.borderWidth, |
| 41 | + borderRadius: input.borderRadius, |
| 42 | + overflow: "hidden", |
| 43 | + paddingHorizontal: input.paddingHorizontal, |
| 44 | + paddingVertical: input.paddingVertical, |
| 45 | + placeholderTextColor: input.placeholderTextColor, |
| 46 | + }, |
| 47 | + valueDisabled: { |
| 48 | + // All TextStyle properties are allowed |
| 49 | + ...TextBox.inputDisabled |
| 50 | + }, |
| 51 | + validationMessage: { |
| 52 | + // All TextStyle properties are allowed |
| 53 | + ...TextBox.validationMessage, |
| 54 | + }, |
| 55 | + /* New dropdown styles start */ |
| 56 | + valueContainer: { |
| 57 | + // All ViewStyle properties & rippleColor & activeOpacity & underlayColor are allowed |
| 58 | + }, |
| 59 | + valueContainerDisabled: { |
| 60 | + // All ViewStyle properties are allowed |
| 61 | + }, |
| 62 | + menuWrapper: { |
| 63 | + // All ViewStyle properties are allowed |
| 64 | + borderRadius: border.radius, |
| 65 | + shadowColor: "#000", |
| 66 | + shadowOpacity: 0.2, |
| 67 | + shadowRadius: 10, |
| 68 | + elevation: 16, |
| 69 | + backgroundColor: input.backgroundColor |
| 70 | + }, |
| 71 | + itemContainer: { |
| 72 | + // All ViewStyle properties & rippleColor & activeOpacity & underlayColor are allowed |
| 73 | + maxWidth: 500, |
| 74 | + paddingVertical: 6, |
| 75 | + paddingHorizontal: 16, |
| 76 | + backgroundColor: input.backgroundColor, |
| 77 | + underlayColor: input.inputContainerUnderlayColor, |
| 78 | + }, |
| 79 | + item: { |
| 80 | + // All TextStyle properties are allowed |
| 81 | + color: input.color, |
| 82 | + }, |
| 83 | + selectedItem: { |
| 84 | + // All TextStyle properties are allowed |
| 85 | + fontWeight: font.weightBold, |
| 86 | + }, |
| 87 | + selectedItemContainer: { |
| 88 | + // All ViewStyle properties are allowed |
| 89 | + backgroundColor: contrast.lowest, |
| 90 | + }, |
| 91 | + /* New dropdown styles end */ |
| 92 | + useUniformDesign: true, |
| 93 | + /* Old dropdown styles start */ |
| 94 | + pickerIOS: { |
| 95 | + // All ViewStyle properties are allowed |
| 96 | + backgroundColor: input.backgroundColor, |
| 97 | + }, |
| 98 | + pickerItemIOS: { |
| 99 | + // All TextStyle properties are allowed |
| 100 | + }, |
| 101 | + pickerBackdropIOS: { |
| 102 | + // All ViewStyle properties are allowed |
| 103 | + }, |
| 104 | + pickerTopIOS: { |
| 105 | + // All ViewStyle properties are allowed |
| 106 | + backgroundColor: input.backgroundColor, |
| 107 | + }, |
| 108 | +}; |
| 109 | +export const ReferenceSelectorVertical = { |
| 110 | + container: TextBoxVertical.container, |
| 111 | + containerDisabled: TextBoxVertical.containerDisabled, |
| 112 | + label: TextBoxVertical.label, |
| 113 | + labelDisabled: TextBoxVertical.labelDisabled, |
| 114 | + value: DropDown.value, |
| 115 | + valueContainer: DropDown.valueContainer, |
| 116 | + valueContainerDisabled: DropDown.valueContainerDisabled, |
| 117 | + validationMessage: TextBoxVertical.validationMessage, |
| 118 | + menuWrapper: DropDown.menuWrapper, |
| 119 | + itemContainer: DropDown.itemContainer, |
| 120 | + item: DropDown.item, |
| 121 | + useUniformDesign: DropDown.useUniformDesign, |
| 122 | + pickerIOS: DropDown.pickerIOS, |
| 123 | + pickerItemIOS: DropDown.pickerItemIOS, |
| 124 | + pickerBackdropIOS: DropDown.pickerBackdropIOS, |
| 125 | + pickerTopIOS: DropDown.pickerTopIOS, |
| 126 | +}; |
0 commit comments