@draftbit/core 46.4.4-fedda6.2 → 46.5.1-c6140a.2

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.
Files changed (304) hide show
  1. package/lib/commonjs/Provider.js +0 -9
  2. package/lib/commonjs/components/Accordion/AccordionGroup.js +0 -14
  3. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -17
  4. package/lib/commonjs/components/Accordion/index.js +0 -3
  5. package/lib/commonjs/components/ActionSheet/ActionSheet.js +0 -9
  6. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js +0 -5
  7. package/lib/commonjs/components/ActionSheet/ActionSheetItem.js +0 -7
  8. package/lib/commonjs/components/ActionSheet/index.js +0 -4
  9. package/lib/commonjs/components/AnimatedCircularProgress.js +0 -15
  10. package/lib/commonjs/components/AspectRatio.js +0 -10
  11. package/lib/commonjs/components/AvatarEdit.js +0 -12
  12. package/lib/commonjs/components/Banner.js +9 -23
  13. package/lib/commonjs/components/Button.js +35 -29
  14. package/lib/commonjs/components/Card.js +0 -14
  15. package/lib/commonjs/components/CardBlock.js +0 -15
  16. package/lib/commonjs/components/CardContainer.js +0 -18
  17. package/lib/commonjs/components/CardContainerRating.js +2 -20
  18. package/lib/commonjs/components/CardContainerShortImage.js +0 -12
  19. package/lib/commonjs/components/CardInline.js +1 -14
  20. package/lib/commonjs/components/Carousel.js +2 -19
  21. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -18
  22. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +0 -11
  23. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +0 -20
  24. package/lib/commonjs/components/Checkbox/CheckboxRow.js +25 -29
  25. package/lib/commonjs/components/Checkbox/context.js +0 -5
  26. package/lib/commonjs/components/Checkbox/index.js +0 -4
  27. package/lib/commonjs/components/CircleImage.js +15 -10
  28. package/lib/commonjs/components/CircularProgress.js +26 -18
  29. package/lib/commonjs/components/Config.js +2 -10
  30. package/lib/commonjs/components/Container.js +15 -15
  31. package/lib/commonjs/components/DatePicker/DatePicker.js +32 -54
  32. package/lib/commonjs/components/DatePicker/DatePickerComponent.js +0 -7
  33. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +0 -10
  34. package/lib/commonjs/components/DeprecatedButton.js +0 -23
  35. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -11
  36. package/lib/commonjs/components/DeprecatedFAB.js +0 -26
  37. package/lib/commonjs/components/Divider.js +0 -9
  38. package/lib/commonjs/components/Elevation.js +14 -13
  39. package/lib/commonjs/components/FAB.js +0 -10
  40. package/lib/commonjs/components/FieldSearchBarFull.js +0 -18
  41. package/lib/commonjs/components/FormRow.js +0 -10
  42. package/lib/commonjs/components/Header.js +0 -13
  43. package/lib/commonjs/components/HeaderLarge.js +0 -9
  44. package/lib/commonjs/components/HeaderMedium.js +0 -9
  45. package/lib/commonjs/components/HeaderOverline.js +0 -9
  46. package/lib/commonjs/components/IconButton.js +0 -10
  47. package/lib/commonjs/components/Image.js +0 -17
  48. package/lib/commonjs/components/Layout.js +2 -12
  49. package/lib/commonjs/components/NumberInput.js +8 -21
  50. package/lib/commonjs/components/Picker/Picker.js +7 -40
  51. package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -24
  52. package/lib/commonjs/components/Picker/PickerComponent.ios.js +6 -25
  53. package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -24
  54. package/lib/commonjs/components/Portal/Portal.js +4 -14
  55. package/lib/commonjs/components/Portal/PortalConsumer.js +5 -15
  56. package/lib/commonjs/components/Portal/PortalHost.js +4 -31
  57. package/lib/commonjs/components/Portal/PortalManager.js +38 -24
  58. package/lib/commonjs/components/ProgressBar.js +5 -25
  59. package/lib/commonjs/components/ProgressCircle.js +0 -10
  60. package/lib/commonjs/components/ProgressIndicator.js +0 -9
  61. package/lib/commonjs/components/RadioButton/RadioButton.js +0 -13
  62. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +0 -10
  63. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +0 -14
  64. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +0 -20
  65. package/lib/commonjs/components/RadioButton/context.js +0 -5
  66. package/lib/commonjs/components/RadioButton/index.js +0 -5
  67. package/lib/commonjs/components/Row.js +0 -11
  68. package/lib/commonjs/components/RowBodyIcon.js +0 -10
  69. package/lib/commonjs/components/RowHeadlineImageCaption.js +2 -11
  70. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -10
  71. package/lib/commonjs/components/SVG.js +0 -9
  72. package/lib/commonjs/components/ScreenContainer.js +0 -14
  73. package/lib/commonjs/components/Slider.js +0 -21
  74. package/lib/commonjs/components/StarRating.js +0 -10
  75. package/lib/commonjs/components/StepIndicator.js +4 -38
  76. package/lib/commonjs/components/Stepper.js +2 -18
  77. package/lib/commonjs/components/Surface.js +0 -14
  78. package/lib/commonjs/components/Swiper/Swiper.js +0 -8
  79. package/lib/commonjs/components/Swiper/SwiperItem.js +0 -6
  80. package/lib/commonjs/components/Swiper/index.js +0 -3
  81. package/lib/commonjs/components/Switch.js +5 -18
  82. package/lib/commonjs/components/Text.js +3 -18
  83. package/lib/commonjs/components/TextField.js +12 -62
  84. package/lib/commonjs/components/ToggleButton.js +0 -14
  85. package/lib/commonjs/components/Touchable.js +0 -5
  86. package/lib/commonjs/components/Touchable.web.js +0 -2
  87. package/lib/commonjs/components/Typography.js +0 -5
  88. package/lib/commonjs/components/useAuthState.js +0 -9
  89. package/lib/commonjs/constants.js +0 -4
  90. package/lib/commonjs/hooks.js +5 -9
  91. package/lib/commonjs/index.js +0 -52
  92. package/lib/commonjs/interfaces/Icon.js +3 -5
  93. package/lib/commonjs/mappings/Accordion.js +0 -2
  94. package/lib/commonjs/mappings/AccordionItem.js +0 -2
  95. package/lib/commonjs/mappings/ActionSheet.js +0 -2
  96. package/lib/commonjs/mappings/ActionSheetCancel.js +0 -2
  97. package/lib/commonjs/mappings/ActionSheetItem.js +0 -2
  98. package/lib/commonjs/mappings/ActivityIndicator.js +0 -2
  99. package/lib/commonjs/mappings/AudioPlayer.js +0 -2
  100. package/lib/commonjs/mappings/AvatarEdit.js +0 -2
  101. package/lib/commonjs/mappings/Banner.js +0 -2
  102. package/lib/commonjs/mappings/BlurView.js +0 -2
  103. package/lib/commonjs/mappings/Button.js +6 -5
  104. package/lib/commonjs/mappings/Card.js +3 -4
  105. package/lib/commonjs/mappings/CardBlock.js +6 -5
  106. package/lib/commonjs/mappings/CardContainer.js +5 -7
  107. package/lib/commonjs/mappings/CardContainerRating.js +4 -4
  108. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -2
  109. package/lib/commonjs/mappings/CardInline.js +0 -2
  110. package/lib/commonjs/mappings/Carousel.js +0 -2
  111. package/lib/commonjs/mappings/Checkbox.js +0 -2
  112. package/lib/commonjs/mappings/CheckboxGroup.js +0 -2
  113. package/lib/commonjs/mappings/CheckboxRow.js +0 -2
  114. package/lib/commonjs/mappings/CircleImage.js +0 -2
  115. package/lib/commonjs/mappings/Container.js +0 -2
  116. package/lib/commonjs/mappings/CustomCode.js +0 -2
  117. package/lib/commonjs/mappings/DatePicker.js +27 -14
  118. package/lib/commonjs/mappings/Divider.js +0 -2
  119. package/lib/commonjs/mappings/FAB.js +0 -2
  120. package/lib/commonjs/mappings/Fetch.js +0 -2
  121. package/lib/commonjs/mappings/FieldSearchBarFull.js +2 -3
  122. package/lib/commonjs/mappings/FlashList.js +0 -2
  123. package/lib/commonjs/mappings/FlatList.js +0 -2
  124. package/lib/commonjs/mappings/HeaderLarge.js +0 -2
  125. package/lib/commonjs/mappings/HeaderMedium.js +0 -2
  126. package/lib/commonjs/mappings/HeaderOverline.js +0 -2
  127. package/lib/commonjs/mappings/Icon.js +2 -3
  128. package/lib/commonjs/mappings/IconButton.js +0 -2
  129. package/lib/commonjs/mappings/Image.js +0 -2
  130. package/lib/commonjs/mappings/ImageBackground.js +0 -2
  131. package/lib/commonjs/mappings/KeyboardAvoidingView.js +0 -2
  132. package/lib/commonjs/mappings/KeyboardAwareScrollView.js +0 -2
  133. package/lib/commonjs/mappings/Layout.js +0 -2
  134. package/lib/commonjs/mappings/LinearGradient.js +0 -2
  135. package/lib/commonjs/mappings/MapCallout.js +0 -2
  136. package/lib/commonjs/mappings/MapMarker.js +0 -2
  137. package/lib/commonjs/mappings/MapView.js +0 -2
  138. package/lib/commonjs/mappings/Modal.js +0 -2
  139. package/lib/commonjs/mappings/NumberInput.js +4 -4
  140. package/lib/commonjs/mappings/Picker.js +4 -4
  141. package/lib/commonjs/mappings/ProgressBar.js +0 -2
  142. package/lib/commonjs/mappings/ProgressCircle.js +0 -2
  143. package/lib/commonjs/mappings/ProgressIndicator.js +0 -2
  144. package/lib/commonjs/mappings/RadioButton.js +0 -2
  145. package/lib/commonjs/mappings/RadioButtonGroup.js +0 -2
  146. package/lib/commonjs/mappings/RadioButtonRow.js +0 -2
  147. package/lib/commonjs/mappings/RowBodyIcon.js +0 -2
  148. package/lib/commonjs/mappings/RowHeadlineImageCaption.js +0 -2
  149. package/lib/commonjs/mappings/RowHeadlineImageIcon.js +12 -8
  150. package/lib/commonjs/mappings/SVG.js +0 -2
  151. package/lib/commonjs/mappings/SafeAreaView.js +0 -2
  152. package/lib/commonjs/mappings/ScrollView.js +0 -2
  153. package/lib/commonjs/mappings/Slider.js +0 -2
  154. package/lib/commonjs/mappings/StarRating.js +1 -3
  155. package/lib/commonjs/mappings/Stepper.js +0 -2
  156. package/lib/commonjs/mappings/Surface.js +0 -2
  157. package/lib/commonjs/mappings/Swiper.js +0 -2
  158. package/lib/commonjs/mappings/SwiperItem.js +0 -2
  159. package/lib/commonjs/mappings/Switch.js +0 -2
  160. package/lib/commonjs/mappings/Text.js +5 -5
  161. package/lib/commonjs/mappings/TextArea.js +16 -6
  162. package/lib/commonjs/mappings/TextField.js +21 -12
  163. package/lib/commonjs/mappings/TextInput.js +16 -6
  164. package/lib/commonjs/mappings/ToggleButton.js +0 -2
  165. package/lib/commonjs/mappings/Touchable.js +0 -2
  166. package/lib/commonjs/mappings/Video.js +0 -2
  167. package/lib/commonjs/mappings/View.js +0 -2
  168. package/lib/commonjs/mappings/WebView.js +0 -2
  169. package/lib/commonjs/styles/DarkTheme.js +5 -6
  170. package/lib/commonjs/styles/DefaultTheme.js +26 -17
  171. package/lib/commonjs/styles/fonts.js +3 -5
  172. package/lib/commonjs/styles/overlay.js +5 -14
  173. package/lib/commonjs/styles/shadow.js +0 -9
  174. package/lib/commonjs/theming.js +0 -4
  175. package/lib/commonjs/utilities.js +1 -13
  176. package/lib/module/Provider.js +0 -1
  177. package/lib/module/components/Accordion/AccordionGroup.js +0 -4
  178. package/lib/module/components/Accordion/AccordionItem.js +0 -3
  179. package/lib/module/components/ActionSheet/ActionSheet.js +0 -2
  180. package/lib/module/components/ActionSheet/ActionSheetCancel.js +0 -2
  181. package/lib/module/components/ActionSheet/ActionSheetItem.js +0 -2
  182. package/lib/module/components/AnimatedCircularProgress.js +0 -6
  183. package/lib/module/components/AspectRatio.js +0 -6
  184. package/lib/module/components/AvatarEdit.js +0 -3
  185. package/lib/module/components/Banner.js +9 -10
  186. package/lib/module/components/Button.js +2 -10
  187. package/lib/module/components/Card.js +0 -2
  188. package/lib/module/components/CardBlock.js +14 -10
  189. package/lib/module/components/CardContainer.js +14 -11
  190. package/lib/module/components/CardContainerRating.js +2 -8
  191. package/lib/module/components/CardContainerShortImage.js +0 -3
  192. package/lib/module/components/CardInline.js +0 -2
  193. package/lib/module/components/Carousel.js +34 -15
  194. package/lib/module/components/Checkbox/Checkbox.js +3 -9
  195. package/lib/module/components/Checkbox/CheckboxGroup.js +0 -5
  196. package/lib/module/components/Checkbox/CheckboxGroupRow.js +0 -8
  197. package/lib/module/components/Checkbox/CheckboxRow.js +3 -11
  198. package/lib/module/components/Checkbox/context.js +0 -2
  199. package/lib/module/components/CircleImage.js +0 -3
  200. package/lib/module/components/CircularProgress.js +3 -9
  201. package/lib/module/components/Config.js +2 -8
  202. package/lib/module/components/Container.js +0 -3
  203. package/lib/module/components/DatePicker/DatePicker.js +32 -39
  204. package/lib/module/components/DatePicker/DatePickerComponent.js +0 -2
  205. package/lib/module/components/DatePicker/DatePickerComponent.web.js +0 -2
  206. package/lib/module/components/DeprecatedButton.js +0 -9
  207. package/lib/module/components/DeprecatedCardWrapper.js +0 -6
  208. package/lib/module/components/DeprecatedFAB.js +0 -13
  209. package/lib/module/components/Divider.js +0 -3
  210. package/lib/module/components/Elevation.js +0 -3
  211. package/lib/module/components/FAB.js +0 -3
  212. package/lib/module/components/FieldSearchBarFull.js +1 -11
  213. package/lib/module/components/FormRow.js +17 -3
  214. package/lib/module/components/Header.js +0 -2
  215. package/lib/module/components/HeaderLarge.js +0 -2
  216. package/lib/module/components/HeaderMedium.js +0 -2
  217. package/lib/module/components/HeaderOverline.js +0 -2
  218. package/lib/module/components/IconButton.js +21 -7
  219. package/lib/module/components/Image.js +18 -12
  220. package/lib/module/components/Layout.js +4 -3
  221. package/lib/module/components/NumberInput.js +8 -16
  222. package/lib/module/components/Picker/Picker.js +3 -20
  223. package/lib/module/components/Picker/PickerComponent.android.js +4 -8
  224. package/lib/module/components/Picker/PickerComponent.ios.js +6 -9
  225. package/lib/module/components/Picker/PickerComponent.web.js +4 -8
  226. package/lib/module/components/Portal/Portal.js +4 -6
  227. package/lib/module/components/Portal/PortalConsumer.js +5 -10
  228. package/lib/module/components/Portal/PortalHost.js +4 -22
  229. package/lib/module/components/Portal/PortalManager.js +7 -14
  230. package/lib/module/components/ProgressBar.js +5 -17
  231. package/lib/module/components/ProgressCircle.js +0 -2
  232. package/lib/module/components/ProgressIndicator.js +0 -2
  233. package/lib/module/components/RadioButton/RadioButton.js +0 -5
  234. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +0 -3
  235. package/lib/module/components/RadioButton/RadioButtonGroup.js +0 -7
  236. package/lib/module/components/RadioButton/RadioButtonRow.js +0 -8
  237. package/lib/module/components/RadioButton/context.js +0 -2
  238. package/lib/module/components/Row.js +0 -2
  239. package/lib/module/components/RowBodyIcon.js +0 -2
  240. package/lib/module/components/RowHeadlineImageCaption.js +2 -3
  241. package/lib/module/components/RowHeadlineImageIcon.js +0 -2
  242. package/lib/module/components/SVG.js +0 -2
  243. package/lib/module/components/ScreenContainer.js +0 -6
  244. package/lib/module/components/Slider.js +0 -10
  245. package/lib/module/components/StarRating.js +0 -3
  246. package/lib/module/components/StepIndicator.js +4 -28
  247. package/lib/module/components/Stepper.js +2 -8
  248. package/lib/module/components/Surface.js +0 -5
  249. package/lib/module/components/Swiper/Swiper.js +0 -4
  250. package/lib/module/components/Swiper/SwiperItem.js +0 -2
  251. package/lib/module/components/Switch.js +5 -7
  252. package/lib/module/components/Text.js +3 -10
  253. package/lib/module/components/TextField.js +12 -50
  254. package/lib/module/components/ToggleButton.js +0 -5
  255. package/lib/module/components/Touchable.js +0 -1
  256. package/lib/module/components/useAuthState.js +0 -4
  257. package/lib/module/constants.js +2 -1
  258. package/lib/module/hooks.js +4 -2
  259. package/lib/module/index.js +4 -2
  260. package/lib/module/interfaces/Icon.js +2 -1
  261. package/lib/module/mappings/Button.js +6 -3
  262. package/lib/module/mappings/Card.js +3 -2
  263. package/lib/module/mappings/CardBlock.js +6 -3
  264. package/lib/module/mappings/CardContainer.js +5 -5
  265. package/lib/module/mappings/CardContainerRating.js +4 -2
  266. package/lib/module/mappings/DatePicker.js +28 -13
  267. package/lib/module/mappings/Fetch.js +0 -1
  268. package/lib/module/mappings/FieldSearchBarFull.js +2 -1
  269. package/lib/module/mappings/Icon.js +2 -1
  270. package/lib/module/mappings/NumberInput.js +4 -2
  271. package/lib/module/mappings/Picker.js +4 -2
  272. package/lib/module/mappings/RowHeadlineImageIcon.js +12 -6
  273. package/lib/module/mappings/StarRating.js +1 -1
  274. package/lib/module/mappings/Text.js +5 -3
  275. package/lib/module/mappings/TextArea.js +17 -5
  276. package/lib/module/mappings/TextField.js +21 -10
  277. package/lib/module/mappings/TextInput.js +17 -5
  278. package/lib/module/styles/DarkTheme.js +4 -2
  279. package/lib/module/styles/DefaultTheme.js +26 -13
  280. package/lib/module/styles/fonts.js +2 -1
  281. package/lib/module/styles/overlay.js +4 -10
  282. package/lib/module/styles/shadow.js +0 -6
  283. package/lib/module/utilities.js +1 -4
  284. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +6 -2
  285. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts.map +1 -1
  286. package/lib/typescript/src/mappings/DatePicker.d.ts +45 -3
  287. package/lib/typescript/src/mappings/DatePicker.d.ts.map +1 -1
  288. package/lib/typescript/src/mappings/TextArea.d.ts +21 -1
  289. package/lib/typescript/src/mappings/TextArea.d.ts.map +1 -1
  290. package/lib/typescript/src/mappings/TextField.d.ts +22 -2
  291. package/lib/typescript/src/mappings/TextField.d.ts.map +1 -1
  292. package/lib/typescript/src/mappings/TextInput.d.ts +21 -1
  293. package/lib/typescript/src/mappings/TextInput.d.ts.map +1 -1
  294. package/package.json +3 -3
  295. package/src/components/DatePicker/DatePicker.js +19 -10
  296. package/src/components/DatePicker/DatePicker.tsx +29 -11
  297. package/src/mappings/DatePicker.js +30 -11
  298. package/src/mappings/DatePicker.ts +32 -10
  299. package/src/mappings/TextArea.js +15 -4
  300. package/src/mappings/TextArea.ts +15 -3
  301. package/src/mappings/TextField.js +14 -4
  302. package/src/mappings/TextField.ts +14 -4
  303. package/src/mappings/TextInput.js +15 -4
  304. package/src/mappings/TextInput.ts +15 -3
@@ -125,7 +125,17 @@ export declare const SEED_DATA: ({
125
125
  description: string;
126
126
  editable: boolean;
127
127
  required: boolean;
128
- defaultValue: boolean;
128
+ defaultValue: null;
129
+ formType: string;
130
+ propType: string;
131
+ };
132
+ blurOnSubmit: {
133
+ group: string;
134
+ label: string;
135
+ description: string;
136
+ editable: boolean;
137
+ required: boolean;
138
+ defaultValue: null;
129
139
  formType: string;
130
140
  propType: string;
131
141
  };
@@ -432,7 +442,17 @@ export declare const SEED_DATA: ({
432
442
  description: string;
433
443
  editable: boolean;
434
444
  required: boolean;
435
- defaultValue: boolean;
445
+ defaultValue: null;
446
+ formType: string;
447
+ propType: string;
448
+ };
449
+ blurOnSubmit: {
450
+ group: string;
451
+ label: string;
452
+ description: string;
453
+ editable: boolean;
454
+ required: boolean;
455
+ defaultValue: null;
436
456
  formType: string;
437
457
  propType: string;
438
458
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextField.ts"],"names":[],"mappings":"AAmTA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgGrB,CAAC"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextField.ts"],"names":[],"mappings":"AA6TA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgGrB,CAAC"}
@@ -108,6 +108,16 @@ export declare const SEED_DATA: {
108
108
  formType: string;
109
109
  propType: string;
110
110
  };
111
+ disabled: {
112
+ label: string;
113
+ description: string;
114
+ group: string;
115
+ editable: boolean;
116
+ required: boolean;
117
+ formType: string;
118
+ propType: string;
119
+ defaultValue: null;
120
+ };
111
121
  scrollEnabled: {
112
122
  group: string;
113
123
  label: string;
@@ -280,7 +290,7 @@ export declare const SEED_DATA: {
280
290
  description: string;
281
291
  editable: boolean;
282
292
  required: boolean;
283
- defaultValue: boolean;
293
+ defaultValue: null;
284
294
  formType: string;
285
295
  propType: string;
286
296
  };
@@ -349,6 +359,16 @@ export declare const SEED_DATA: {
349
359
  formType: string;
350
360
  propType: string;
351
361
  };
362
+ blurOnSubmit: {
363
+ group: string;
364
+ label: string;
365
+ description: string;
366
+ editable: boolean;
367
+ required: boolean;
368
+ defaultValue: null;
369
+ formType: string;
370
+ propType: string;
371
+ };
352
372
  returnKeyType: {
353
373
  group: string;
354
374
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextInput.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyVrB,CAAC"}
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextInput.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoWrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.4.4-fedda6.2+fedda68",
3
+ "version": "46.5.1-c6140a.2+c6140a4",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.4.4-fedda6.2+fedda68",
44
+ "@draftbit/types": "^46.5.1-c6140a.2+c6140a4",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "fedda68963151dca4aff9eae15447682aa414f88"
94
+ "gitHead": "c6140a4a4efdea7038713bfe7a11f1caf6d18615"
95
95
  }
@@ -6,6 +6,7 @@ import { withTheme } from "../../theming";
6
6
  import Portal from "../Portal/Portal";
7
7
  import Touchable from "../Touchable";
8
8
  import DateTimePicker from "./DatePickerComponent";
9
+ import { extractStyles } from "../../utilities";
9
10
  const AnimatedText = Animated.createAnimatedComponent(Text);
10
11
  const FOCUS_ANIMATION_DURATION = 150;
11
12
  const BLUR_ANIMATION_DURATION = 180;
@@ -24,7 +25,7 @@ const MONTHS = [
24
25
  "November",
25
26
  "December",
26
27
  ];
27
- const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = "date", format, type = "underline", leftIconName, rightIconName, leftIconMode = "inset", label, placeholder, ...props }) => {
28
+ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = "date", format, type = "underline", leftIconName, rightIconName, leftIconMode = "inset", label, labelSize, labelColor, placeholder, borderColor: inputBorderColor, borderColorActive: inputBorderColorActive, ...props }) => {
28
29
  const [value, setValue] = React.useState(date || defaultValue);
29
30
  React.useEffect(() => {
30
31
  if (defaultValue != null) {
@@ -36,6 +37,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
36
37
  const [placeholder1, setPlaceholder1] = React.useState("");
37
38
  const [focused, setFocused] = React.useState(false);
38
39
  const [labelLayout, setLabelLayout] = React.useState({ measured: false, width: 0 });
40
+ const { viewStyles, textStyles } = extractStyles(style);
39
41
  const getValidDate = () => {
40
42
  if (!value) {
41
43
  return new Date();
@@ -125,8 +127,10 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
125
127
  };
126
128
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
127
129
  const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
128
- const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
129
- const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
130
+ const MAXIMIZED_LABEL_FONT_SIZE = textStyles.fontSize || typography.subtitle1.fontSize;
131
+ const MINIMIZED_LABEL_FONT_SIZE = labelSize
132
+ ? labelSize
133
+ : typography.caption.fontSize;
130
134
  const hasActiveOutline = focused;
131
135
  let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
132
136
  inputTextColor = colors.strong;
@@ -138,9 +142,9 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
138
142
  backgroundColor = colors.divider;
139
143
  }
140
144
  else {
141
- activeColor = colors.primary;
142
- placeholderColor = borderColor = colors.light;
143
- underlineColor = colors.light;
145
+ activeColor = inputBorderColorActive || colors.primary;
146
+ placeholderColor = inputBorderColor || colors.light;
147
+ underlineColor = inputBorderColor || colors.light;
144
148
  backgroundColor = colors.background;
145
149
  }
146
150
  const { lineHeight, ...subtitle1 } = typography.subtitle1;
@@ -202,6 +206,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
202
206
  const labelStyle = {
203
207
  ...typography.subtitle1,
204
208
  top: type === "solid" ? 16 : 0,
209
+ fontFamily: textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontFamily,
205
210
  left: leftIconName && leftIconMode === "inset"
206
211
  ? ICON_SIZE + (type === "solid" ? 16 : 12)
207
212
  : 0,
@@ -252,7 +257,11 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
252
257
  React.createElement(View, { pointerEvents: "none" },
253
258
  React.createElement(View, { style: [styles.container, style] },
254
259
  leftIconName && leftIconMode === "outset" ? (React.createElement(Icon, { ...leftIconProps, style: leftIconStyle })) : null,
255
- React.createElement(View, { style: [containerStyle, style ? { height: style.height } : {}] },
260
+ React.createElement(View, { style: [
261
+ containerStyle,
262
+ style ? { height: style.height } : {},
263
+ viewStyles,
264
+ ] },
256
265
  type === "underline" ? (
257
266
  // When type === 'flat', render an underline
258
267
  React.createElement(Animated.View, { style: [
@@ -282,7 +291,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
282
291
  type === "solid" ? { paddingHorizontal: 12 } : {},
283
292
  labelStyle,
284
293
  {
285
- color: colors.light,
294
+ color: labelColor || colors.light,
286
295
  opacity: labeled.interpolate({
287
296
  inputRange: [0, 1],
288
297
  outputRange: [hasActiveOutline ? 1 : 0, 0],
@@ -294,7 +303,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
294
303
  type === "solid" ? { paddingHorizontal: 12 } : {},
295
304
  labelStyle,
296
305
  {
297
- color: placeholderColor,
306
+ color: labelColor || placeholderColor,
298
307
  opacity: hasActiveOutline ? labeled : 1,
299
308
  },
300
309
  ], numberOfLines: 1 }, label))) : null,
@@ -302,7 +311,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
302
311
  ...leftIconStyle,
303
312
  marginLeft: type === "solid" ? 16 : 0,
304
313
  } })) : null,
305
- React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: inputStyles, ...props })),
314
+ React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles], ...props })),
306
315
  rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
307
316
  position: "absolute",
308
317
  right: 16,
@@ -23,6 +23,7 @@ import DateTimePicker from "./DatePickerComponent";
23
23
 
24
24
  import type { Theme } from "../../styles/DefaultTheme";
25
25
  import type { IconSlot } from "../../interfaces/Icon";
26
+ import { extractStyles } from "../../utilities";
26
27
 
27
28
  const AnimatedText = Animated.createAnimatedComponent(Text);
28
29
 
@@ -31,14 +32,13 @@ const BLUR_ANIMATION_DURATION = 180;
31
32
  const ICON_SIZE = 24;
32
33
 
33
34
  type Props = {
34
- style?: StyleProp<ViewStyle> & { height?: number };
35
+ style?: StyleProp<ViewStyle | TextStyle> & { height?: number };
35
36
  theme: Theme;
36
37
  // initialDate?: string;
37
38
  // locale?: string;
38
39
  // minuteInterval?: number;
39
40
  // timeZoneOffsetInMinutes?: number;
40
41
  // error?: boolean;
41
- // type?: string;
42
42
  date?: Date;
43
43
  format?: string;
44
44
  onDateChange?: (data?: Date) => void;
@@ -47,10 +47,14 @@ type Props = {
47
47
  mode?: "date" | "time" | "datetime";
48
48
  type?: "solid" | "underline";
49
49
  label?: string;
50
+ labelSize?: number;
51
+ labelColor?: string;
50
52
  placeholder?: string;
51
53
  leftIconName?: string;
52
54
  leftIconMode?: "outset" | "inset";
53
55
  rightIconName?: string;
56
+ borderColor?: string;
57
+ borderColorActive?: string;
54
58
  } & IconSlot &
55
59
  TextInputProps;
56
60
 
@@ -84,7 +88,11 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
84
88
  rightIconName,
85
89
  leftIconMode = "inset",
86
90
  label,
91
+ labelSize,
92
+ labelColor,
87
93
  placeholder,
94
+ borderColor: inputBorderColor,
95
+ borderColorActive: inputBorderColorActive,
88
96
  ...props
89
97
  }) => {
90
98
  const [value, setValue] = React.useState<any>(date || defaultValue);
@@ -106,6 +114,8 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
106
114
  width: number;
107
115
  }>({ measured: false, width: 0 });
108
116
 
117
+ const { viewStyles, textStyles } = extractStyles(style);
118
+
109
119
  const getValidDate = (): Date => {
110
120
  if (!value) {
111
121
  return new Date();
@@ -211,8 +221,11 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
211
221
 
212
222
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
213
223
  const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
214
- const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
215
- const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
224
+ const MAXIMIZED_LABEL_FONT_SIZE =
225
+ textStyles.fontSize || typography.subtitle1.fontSize;
226
+ const MINIMIZED_LABEL_FONT_SIZE = labelSize
227
+ ? labelSize
228
+ : typography.caption.fontSize;
216
229
 
217
230
  const hasActiveOutline = focused;
218
231
 
@@ -233,9 +246,9 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
233
246
  underlineColor = "transparent";
234
247
  backgroundColor = colors.divider;
235
248
  } else {
236
- activeColor = colors.primary;
237
- placeholderColor = borderColor = colors.light;
238
- underlineColor = colors.light;
249
+ activeColor = inputBorderColorActive || colors.primary;
250
+ placeholderColor = inputBorderColor || colors.light;
251
+ underlineColor = inputBorderColor || colors.light;
239
252
  backgroundColor = colors.background;
240
253
  }
241
254
 
@@ -306,6 +319,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
306
319
  const labelStyle = {
307
320
  ...typography.subtitle1,
308
321
  top: type === "solid" ? 16 : 0,
322
+ fontFamily: textStyles?.fontFamily,
309
323
  left:
310
324
  leftIconName && leftIconMode === "inset"
311
325
  ? ICON_SIZE + (type === "solid" ? 16 : 12)
@@ -364,7 +378,11 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
364
378
  <Icon {...leftIconProps} style={leftIconStyle} />
365
379
  ) : null}
366
380
  <View
367
- style={[containerStyle, style ? { height: style.height } : {}]}
381
+ style={[
382
+ containerStyle,
383
+ style ? { height: style.height } : {},
384
+ viewStyles,
385
+ ]}
368
386
  >
369
387
  {type === "underline" ? (
370
388
  // When type === 'flat', render an underline
@@ -406,7 +424,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
406
424
  type === "solid" ? { paddingHorizontal: 12 } : {},
407
425
  labelStyle,
408
426
  {
409
- color: colors.light,
427
+ color: labelColor || colors.light,
410
428
  opacity: labeled.interpolate({
411
429
  inputRange: [0, 1],
412
430
  outputRange: [hasActiveOutline ? 1 : 0, 0],
@@ -423,7 +441,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
423
441
  type === "solid" ? { paddingHorizontal: 12 } : {},
424
442
  labelStyle,
425
443
  {
426
- color: placeholderColor,
444
+ color: labelColor || placeholderColor,
427
445
  opacity: hasActiveOutline ? labeled : 1,
428
446
  },
429
447
  ]}
@@ -453,7 +471,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
453
471
  onFocus={_handleFocus}
454
472
  onBlur={_handleBlur}
455
473
  underlineColorAndroid={"transparent"}
456
- style={inputStyles}
474
+ style={[inputStyles, textStyles]}
457
475
  {...props}
458
476
  />
459
477
  </View>
@@ -1,15 +1,5 @@
1
- import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, createNumberProp, createColorProp, } from "@draftbit/types";
2
2
  const SEED_DATA_PROPS = {
3
- label: {
4
- label: "Label",
5
- description: "The label to be displayed on the picker",
6
- formType: FORM_TYPES.string,
7
- propType: PROP_TYPES.STRING,
8
- defaultValue: "Date",
9
- editable: true,
10
- required: true,
11
- group: GROUPS.data,
12
- },
13
3
  mode: {
14
4
  label: "Mode",
15
5
  description: "Choose between date, time and datetime",
@@ -21,6 +11,28 @@ const SEED_DATA_PROPS = {
21
11
  options: ["date", "time", "datetime"],
22
12
  group: GROUPS.basic,
23
13
  },
14
+ label: {
15
+ label: "Label",
16
+ description: "The label to be displayed on the picker",
17
+ formType: FORM_TYPES.string,
18
+ propType: PROP_TYPES.STRING,
19
+ defaultValue: "Date",
20
+ editable: true,
21
+ required: true,
22
+ group: GROUPS.data,
23
+ },
24
+ labelSize: createNumberProp({
25
+ label: "Label Size",
26
+ }),
27
+ labelColor: createColorProp({
28
+ label: "Label Color",
29
+ }),
30
+ borderColor: createColorProp({
31
+ label: "Border Color",
32
+ }),
33
+ borderColorActive: createColorProp({
34
+ label: "Border Color",
35
+ }),
24
36
  format: {
25
37
  label: "Format",
26
38
  description: "Create an output format for the date.",
@@ -139,6 +151,13 @@ export const SEED_DATA = [
139
151
  category: COMPONENT_TYPES.input,
140
152
  layout: null,
141
153
  triggers: [Triggers.OnDateChange],
154
+ StylesPanelSections: [
155
+ StylesPanelSections.Typography,
156
+ StylesPanelSections.Background,
157
+ StylesPanelSections.Size,
158
+ StylesPanelSections.MarginsAndPaddings,
159
+ StylesPanelSections.Position,
160
+ ],
142
161
  props: {
143
162
  ...SEED_DATA_PROPS,
144
163
  type: {
@@ -5,19 +5,12 @@ import {
5
5
  FIELD_NAME,
6
6
  GROUPS,
7
7
  Triggers,
8
+ StylesPanelSections,
9
+ createNumberProp,
10
+ createColorProp,
8
11
  } from "@draftbit/types";
9
12
 
10
13
  const SEED_DATA_PROPS = {
11
- label: {
12
- label: "Label",
13
- description: "The label to be displayed on the picker",
14
- formType: FORM_TYPES.string,
15
- propType: PROP_TYPES.STRING,
16
- defaultValue: "Date",
17
- editable: true,
18
- required: true,
19
- group: GROUPS.data,
20
- },
21
14
  mode: {
22
15
  label: "Mode",
23
16
  description: "Choose between date, time and datetime",
@@ -29,6 +22,28 @@ const SEED_DATA_PROPS = {
29
22
  options: ["date", "time", "datetime"],
30
23
  group: GROUPS.basic,
31
24
  },
25
+ label: {
26
+ label: "Label",
27
+ description: "The label to be displayed on the picker",
28
+ formType: FORM_TYPES.string,
29
+ propType: PROP_TYPES.STRING,
30
+ defaultValue: "Date",
31
+ editable: true,
32
+ required: true,
33
+ group: GROUPS.data,
34
+ },
35
+ labelSize: createNumberProp({
36
+ label: "Label Size",
37
+ }),
38
+ labelColor: createColorProp({
39
+ label: "Label Color",
40
+ }),
41
+ borderColor: createColorProp({
42
+ label: "Border Color",
43
+ }),
44
+ borderColorActive: createColorProp({
45
+ label: "Border Color",
46
+ }),
32
47
  format: {
33
48
  label: "Format",
34
49
  description: "Create an output format for the date.",
@@ -150,6 +165,13 @@ export const SEED_DATA = [
150
165
  category: COMPONENT_TYPES.input,
151
166
  layout: null,
152
167
  triggers: [Triggers.OnDateChange],
168
+ StylesPanelSections: [
169
+ StylesPanelSections.Typography,
170
+ StylesPanelSections.Background,
171
+ StylesPanelSections.Size,
172
+ StylesPanelSections.MarginsAndPaddings,
173
+ StylesPanelSections.Position,
174
+ ],
153
175
  props: {
154
176
  ...SEED_DATA_PROPS,
155
177
  type: {
@@ -1,4 +1,4 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Text Area",
4
4
  tag: "TextInput",
@@ -59,6 +59,17 @@ export const SEED_DATA = {
59
59
  formType: FORM_TYPES.boolean,
60
60
  propType: PROP_TYPES.BOOLEAN,
61
61
  },
62
+ blurOnSubmit: {
63
+ group: GROUPS.advanced,
64
+ label: "Blur On Submit",
65
+ description: "If true, the text field will blur when submitted. ",
66
+ editable: true,
67
+ required: false,
68
+ defaultValue: null,
69
+ formType: FORM_TYPES.boolean,
70
+ propType: PROP_TYPES.BOOLEAN,
71
+ },
72
+ disabled: createDisabledProp(),
62
73
  caretHidden: {
63
74
  group: GROUPS.advanced,
64
75
  label: "Hide Caret",
@@ -80,12 +91,12 @@ export const SEED_DATA = {
80
91
  propType: PROP_TYPES.BOOLEAN,
81
92
  },
82
93
  editable: {
83
- group: GROUPS.advanced,
84
- label: "Editable",
94
+ group: GROUPS.data,
95
+ label: "Editable?",
85
96
  description: "If false, the text is not editable",
86
97
  editable: true,
87
98
  required: false,
88
- defaultValue: true,
99
+ defaultValue: null,
89
100
  formType: FORM_TYPES.boolean,
90
101
  propType: PROP_TYPES.BOOLEAN,
91
102
  },
@@ -5,6 +5,7 @@ import {
5
5
  PROP_TYPES,
6
6
  FIELD_NAME,
7
7
  Triggers,
8
+ createDisabledProp,
8
9
  } from "@draftbit/types";
9
10
 
10
11
  export const SEED_DATA = {
@@ -69,6 +70,17 @@ export const SEED_DATA = {
69
70
  formType: FORM_TYPES.boolean,
70
71
  propType: PROP_TYPES.BOOLEAN,
71
72
  },
73
+ blurOnSubmit: {
74
+ group: GROUPS.advanced,
75
+ label: "Blur On Submit",
76
+ description: "If true, the text field will blur when submitted. ",
77
+ editable: true,
78
+ required: false,
79
+ defaultValue: null,
80
+ formType: FORM_TYPES.boolean,
81
+ propType: PROP_TYPES.BOOLEAN,
82
+ },
83
+ disabled: createDisabledProp(),
72
84
  caretHidden: {
73
85
  group: GROUPS.advanced,
74
86
  label: "Hide Caret",
@@ -91,12 +103,12 @@ export const SEED_DATA = {
91
103
  propType: PROP_TYPES.BOOLEAN,
92
104
  },
93
105
  editable: {
94
- group: GROUPS.advanced,
95
- label: "Editable",
106
+ group: GROUPS.data,
107
+ label: "Editable?",
96
108
  description: "If false, the text is not editable",
97
109
  editable: true,
98
110
  required: false,
99
- defaultValue: true,
111
+ defaultValue: null,
100
112
  formType: FORM_TYPES.boolean,
101
113
  propType: PROP_TYPES.BOOLEAN,
102
114
  },
@@ -62,7 +62,7 @@ const SEED_DATA_PROPS = {
62
62
  propType: PROP_TYPES.BOOLEAN,
63
63
  },
64
64
  disabled: {
65
- group: GROUPS.basic,
65
+ group: GROUPS.data,
66
66
  label: "Disabled",
67
67
  description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
68
68
  formType: FORM_TYPES.boolean,
@@ -72,12 +72,22 @@ const SEED_DATA_PROPS = {
72
72
  required: false,
73
73
  },
74
74
  editable: {
75
- group: GROUPS.advanced,
76
- label: "Editable",
75
+ group: GROUPS.data,
76
+ label: "Editable?",
77
77
  description: "If false, the text is not editable",
78
78
  editable: true,
79
79
  required: false,
80
- defaultValue: true,
80
+ defaultValue: null,
81
+ formType: FORM_TYPES.boolean,
82
+ propType: PROP_TYPES.BOOLEAN,
83
+ },
84
+ blurOnSubmit: {
85
+ group: GROUPS.advanced,
86
+ label: "Blur On Submit",
87
+ description: "If true, the text field will blur when submitted. ",
88
+ editable: true,
89
+ required: false,
90
+ defaultValue: null,
81
91
  formType: FORM_TYPES.boolean,
82
92
  propType: PROP_TYPES.BOOLEAN,
83
93
  },
@@ -77,7 +77,7 @@ const SEED_DATA_PROPS = {
77
77
  propType: PROP_TYPES.BOOLEAN,
78
78
  },
79
79
  disabled: {
80
- group: GROUPS.basic,
80
+ group: GROUPS.data,
81
81
  label: "Disabled",
82
82
  description:
83
83
  "Whether the input should be disabled. Will prevent input and show a greyed out state.",
@@ -88,12 +88,22 @@ const SEED_DATA_PROPS = {
88
88
  required: false,
89
89
  },
90
90
  editable: {
91
- group: GROUPS.advanced,
92
- label: "Editable",
91
+ group: GROUPS.data,
92
+ label: "Editable?",
93
93
  description: "If false, the text is not editable",
94
94
  editable: true,
95
95
  required: false,
96
- defaultValue: true,
96
+ defaultValue: null,
97
+ formType: FORM_TYPES.boolean,
98
+ propType: PROP_TYPES.BOOLEAN,
99
+ },
100
+ blurOnSubmit: {
101
+ group: GROUPS.advanced,
102
+ label: "Blur On Submit",
103
+ description: "If true, the text field will blur when submitted. ",
104
+ editable: true,
105
+ required: false,
106
+ defaultValue: null,
97
107
  formType: FORM_TYPES.boolean,
98
108
  propType: PROP_TYPES.BOOLEAN,
99
109
  },
@@ -1,4 +1,4 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, } from "@draftbit/types";
1
+ import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
2
2
  export const SEED_DATA_PROPS = {
3
3
  style: {
4
4
  group: GROUPS.basic,
@@ -150,12 +150,12 @@ export const SEED_DATA = [
150
150
  propType: PROP_TYPES.BOOLEAN,
151
151
  },
152
152
  editable: {
153
- group: GROUPS.advanced,
154
- label: "Editable",
153
+ group: GROUPS.data,
154
+ label: "Editable?",
155
155
  description: "If false, the text is not editable",
156
156
  editable: true,
157
157
  required: false,
158
- defaultValue: true,
158
+ defaultValue: null,
159
159
  formType: FORM_TYPES.boolean,
160
160
  propType: PROP_TYPES.BOOLEAN,
161
161
  },
@@ -238,6 +238,16 @@ export const SEED_DATA = [
238
238
  formType: FORM_TYPES.string,
239
239
  propType: PROP_TYPES.STRING,
240
240
  },
241
+ blurOnSubmit: {
242
+ group: GROUPS.advanced,
243
+ label: "Blur On Submit",
244
+ description: "If true, the text field will blur when submitted. ",
245
+ editable: true,
246
+ required: false,
247
+ defaultValue: null,
248
+ formType: FORM_TYPES.boolean,
249
+ propType: PROP_TYPES.BOOLEAN,
250
+ },
241
251
  returnKeyType: {
242
252
  group: GROUPS.advanced,
243
253
  label: "Return Key Type",
@@ -317,6 +327,7 @@ export const SEED_DATA = [
317
327
  formType: FORM_TYPES.number,
318
328
  propType: PROP_TYPES.NUMBER,
319
329
  },
330
+ disabled: createDisabledProp(),
320
331
  scrollEnabled: {
321
332
  group: GROUPS.basic,
322
333
  label: "Scroll Enabled",