@draftbit/core 47.1.0 → 47.1.1-1883fa.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 (207) hide show
  1. package/lib/commonjs/components/Justification.js +5 -1
  2. package/lib/commonjs/components/ResizeMode.js +5 -1
  3. package/lib/commonjs/mappings/DatePicker.js +1 -1
  4. package/lib/commonjs/mappings/FlashList.js +37 -3
  5. package/lib/commonjs/mappings/FlatList.js +17 -2
  6. package/lib/commonjs/mappings/ScrollView.js +6 -0
  7. package/lib/commonjs/mappings/TextField.js +2 -2
  8. package/lib/module/components/Justification.js +1 -0
  9. package/lib/module/components/ResizeMode.js +1 -0
  10. package/lib/module/mappings/DatePicker.js +1 -1
  11. package/lib/module/mappings/FlashList.js +38 -4
  12. package/lib/module/mappings/FlatList.js +18 -3
  13. package/lib/module/mappings/ScrollView.js +7 -1
  14. package/lib/module/mappings/TextField.js +2 -2
  15. package/lib/typescript/src/mappings/DatePicker.d.ts +1 -1
  16. package/lib/typescript/src/mappings/FlashList.d.ts +75 -4
  17. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  18. package/lib/typescript/src/mappings/FlatList.d.ts +33 -2
  19. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  20. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  21. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  22. package/package.json +3 -3
  23. package/src/Provider.js +9 -0
  24. package/src/components/Accordion/AccordionGroup.js +44 -0
  25. package/src/components/Accordion/AccordionItem.js +32 -0
  26. package/src/components/Accordion/index.js +2 -0
  27. package/src/components/ActionSheet/ActionSheet.js +45 -0
  28. package/src/components/ActionSheet/ActionSheetCancel.js +6 -0
  29. package/src/components/ActionSheet/ActionSheetItem.js +30 -0
  30. package/src/components/ActionSheet/index.js +3 -0
  31. package/src/components/AnimatedCircularProgress.js +43 -0
  32. package/src/components/AspectRatio.js +18 -0
  33. package/src/components/AvatarEdit.js +30 -0
  34. package/src/components/Banner.js +109 -0
  35. package/src/components/Button.js +114 -0
  36. package/src/components/Card.js +57 -0
  37. package/src/components/CardBlock.js +54 -0
  38. package/src/components/CardContainer.js +69 -0
  39. package/src/components/CardContainerRating.js +79 -0
  40. package/src/components/CardContainerShortImage.js +33 -0
  41. package/src/components/CardInline.js +36 -0
  42. package/src/components/Carousel.js +68 -0
  43. package/src/components/Checkbox/Checkbox.js +62 -0
  44. package/src/components/Checkbox/CheckboxGroup.js +21 -0
  45. package/src/components/Checkbox/CheckboxGroupRow.js +76 -0
  46. package/src/components/Checkbox/CheckboxRow.js +77 -0
  47. package/src/components/Checkbox/context.js +14 -0
  48. package/src/components/Checkbox/index.js +3 -0
  49. package/src/components/CircleImage.js +8 -0
  50. package/src/components/CircularProgress.js +81 -0
  51. package/src/components/Config.js +64 -0
  52. package/src/components/Container.js +43 -0
  53. package/src/components/DatePicker/DatePicker.js +377 -0
  54. package/src/components/DatePicker/DatePickerComponent.js +13 -0
  55. package/src/components/DatePicker/DatePickerComponent.web.js +30 -0
  56. package/src/components/DatePicker/DatePickerComponentType.js +1 -0
  57. package/src/components/DeprecatedButton.js +83 -0
  58. package/src/components/DeprecatedCardWrapper.js +18 -0
  59. package/src/components/DeprecatedFAB.js +114 -0
  60. package/src/components/Divider.js +13 -0
  61. package/src/components/Elevation.js +20 -0
  62. package/src/components/FAB.js +46 -0
  63. package/src/components/FieldSearchBarFull.js +53 -0
  64. package/src/components/FormRow.js +19 -0
  65. package/src/components/Header.js +44 -0
  66. package/src/components/HeaderLarge.js +7 -0
  67. package/src/components/HeaderMedium.js +7 -0
  68. package/src/components/HeaderOverline.js +7 -0
  69. package/src/components/IconButton.js +35 -0
  70. package/src/components/Image.js +47 -0
  71. package/src/components/Justification.js +1 -0
  72. package/src/components/Layout.js +50 -0
  73. package/src/components/NumberInput.js +49 -0
  74. package/src/components/Picker/Picker.js +267 -0
  75. package/src/components/Picker/PickerComponent.android.js +69 -0
  76. package/src/components/Picker/PickerComponent.ios.js +79 -0
  77. package/src/components/Picker/PickerComponent.web.js +70 -0
  78. package/src/components/Picker/PickerTypes.js +1 -0
  79. package/src/components/Portal/Portal.js +35 -0
  80. package/src/components/Portal/PortalConsumer.js +27 -0
  81. package/src/components/Portal/PortalHost.js +107 -0
  82. package/src/components/Portal/PortalManager.js +32 -0
  83. package/src/components/Pressable.js +12 -0
  84. package/src/components/ProgressBar.js +118 -0
  85. package/src/components/ProgressCircle.js +13 -0
  86. package/src/components/ProgressIndicator.js +27 -0
  87. package/src/components/RadioButton/RadioButton.js +17 -0
  88. package/src/components/RadioButton/RadioButtonFieldGroup.js +17 -0
  89. package/src/components/RadioButton/RadioButtonGroup.js +43 -0
  90. package/src/components/RadioButton/RadioButtonRow.js +76 -0
  91. package/src/components/RadioButton/context.js +14 -0
  92. package/src/components/RadioButton/index.js +4 -0
  93. package/src/components/ResizeMode.js +1 -0
  94. package/src/components/Row.js +48 -0
  95. package/src/components/RowBodyIcon.js +8 -0
  96. package/src/components/RowHeadlineImageCaption.js +12 -0
  97. package/src/components/RowHeadlineImageIcon.js +14 -0
  98. package/src/components/SVG.js +13 -0
  99. package/src/components/ScreenContainer.js +34 -0
  100. package/src/components/Slider.js +63 -0
  101. package/src/components/StarRating.js +50 -0
  102. package/src/components/StepIndicator.js +346 -0
  103. package/src/components/Stepper.js +41 -0
  104. package/src/components/Surface.js +32 -0
  105. package/src/components/Swiper/Swiper.js +29 -0
  106. package/src/components/Swiper/SwiperItem.js +9 -0
  107. package/src/components/Swiper/index.js +2 -0
  108. package/src/components/Switch.js +56 -0
  109. package/src/components/Text.js +33 -0
  110. package/src/components/TextField.js +428 -0
  111. package/src/components/ToggleButton.js +39 -0
  112. package/src/components/Touchable.js +12 -0
  113. package/src/components/Touchable.web.js +2 -0
  114. package/src/components/Typography.js +36 -0
  115. package/src/components/useAuthState.js +31 -0
  116. package/src/constants.js +10 -0
  117. package/src/hooks.js +12 -0
  118. package/src/index.js +53 -0
  119. package/src/interfaces/Icon.js +8 -0
  120. package/src/mappings/Accordion.js +41 -0
  121. package/src/mappings/AccordionItem.js +16 -0
  122. package/src/mappings/ActionSheet.js +13 -0
  123. package/src/mappings/ActionSheetCancel.js +19 -0
  124. package/src/mappings/ActionSheetItem.js +23 -0
  125. package/src/mappings/ActivityIndicator.js +58 -0
  126. package/src/mappings/AudioPlayer.js +57 -0
  127. package/src/mappings/AvatarEdit.js +38 -0
  128. package/src/mappings/Banner.js +32 -0
  129. package/src/mappings/BlurView.js +42 -0
  130. package/src/mappings/Button.js +116 -0
  131. package/src/mappings/Card.js +52 -0
  132. package/src/mappings/CardBlock.js +123 -0
  133. package/src/mappings/CardContainer.js +104 -0
  134. package/src/mappings/CardContainerRating.js +126 -0
  135. package/src/mappings/CardContainerShortImage.js +120 -0
  136. package/src/mappings/CardInline.js +52 -0
  137. package/src/mappings/Carousel.js +19 -0
  138. package/src/mappings/Checkbox.js +46 -0
  139. package/src/mappings/CheckboxGroup.js +26 -0
  140. package/src/mappings/CheckboxRow.js +61 -0
  141. package/src/mappings/CircleImage.js +25 -0
  142. package/src/mappings/Container.js +30 -0
  143. package/src/mappings/CustomCode.js +8 -0
  144. package/src/mappings/DatePicker.js +176 -0
  145. package/src/mappings/DatePicker.ts +1 -1
  146. package/src/mappings/Divider.js +27 -0
  147. package/src/mappings/FAB.js +37 -0
  148. package/src/mappings/Fetch.js +13 -0
  149. package/src/mappings/FieldSearchBarFull.js +50 -0
  150. package/src/mappings/FlashList.js +113 -0
  151. package/src/mappings/FlashList.ts +42 -4
  152. package/src/mappings/FlatList.js +51 -0
  153. package/src/mappings/FlatList.ts +20 -2
  154. package/src/mappings/HeaderLarge.js +29 -0
  155. package/src/mappings/HeaderMedium.js +55 -0
  156. package/src/mappings/HeaderOverline.js +55 -0
  157. package/src/mappings/Icon.js +32 -0
  158. package/src/mappings/IconButton.js +35 -0
  159. package/src/mappings/Image.js +35 -0
  160. package/src/mappings/ImageBackground.js +29 -0
  161. package/src/mappings/KeyboardAvoidingView.js +41 -0
  162. package/src/mappings/KeyboardAwareScrollView.js +50 -0
  163. package/src/mappings/Layout.js +200 -0
  164. package/src/mappings/LinearGradient.js +77 -0
  165. package/src/mappings/MapCallout.js +21 -0
  166. package/src/mappings/MapMarker.js +47 -0
  167. package/src/mappings/MapView.js +139 -0
  168. package/src/mappings/Modal.js +42 -0
  169. package/src/mappings/NumberInput.js +254 -0
  170. package/src/mappings/Picker.js +148 -0
  171. package/src/mappings/ProgressBar.js +101 -0
  172. package/src/mappings/ProgressCircle.js +109 -0
  173. package/src/mappings/ProgressIndicator.js +181 -0
  174. package/src/mappings/RadioButton.js +51 -0
  175. package/src/mappings/RadioButtonGroup.js +17 -0
  176. package/src/mappings/RadioButtonRow.js +42 -0
  177. package/src/mappings/RowBodyIcon.js +75 -0
  178. package/src/mappings/RowHeadlineImageCaption.js +167 -0
  179. package/src/mappings/RowHeadlineImageIcon.js +99 -0
  180. package/src/mappings/SVG.js +20 -0
  181. package/src/mappings/SafeAreaView.js +33 -0
  182. package/src/mappings/ScrollView.js +37 -0
  183. package/src/mappings/ScrollView.ts +9 -0
  184. package/src/mappings/Slider.js +60 -0
  185. package/src/mappings/StarRating.js +43 -0
  186. package/src/mappings/Stepper.js +32 -0
  187. package/src/mappings/Surface.js +14 -0
  188. package/src/mappings/Swiper.js +62 -0
  189. package/src/mappings/SwiperItem.js +8 -0
  190. package/src/mappings/Switch.js +81 -0
  191. package/src/mappings/Text.js +251 -0
  192. package/src/mappings/TextArea.js +274 -0
  193. package/src/mappings/TextField.js +391 -0
  194. package/src/mappings/TextField.ts +2 -2
  195. package/src/mappings/TextInput.js +402 -0
  196. package/src/mappings/ToggleButton.js +50 -0
  197. package/src/mappings/Touchable.js +60 -0
  198. package/src/mappings/Video.js +81 -0
  199. package/src/mappings/View.js +207 -0
  200. package/src/mappings/WebView.js +88 -0
  201. package/src/styles/DarkTheme.js +26 -0
  202. package/src/styles/DefaultTheme.js +111 -0
  203. package/src/styles/fonts.js +62 -0
  204. package/src/styles/overlay.js +60 -0
  205. package/src/styles/shadow.js +51 -0
  206. package/src/theming.js +3 -0
  207. package/src/utilities.js +102 -0
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -156,7 +156,7 @@ const SEED_DATA = [{
156
156
  category: _types.COMPONENT_TYPES.input,
157
157
  layout: null,
158
158
  triggers: [_types.Triggers.OnDateChange],
159
- StylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
159
+ stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
160
160
  props: {
161
161
  ...SEED_DATA_PROPS,
162
162
  type: {
@@ -30,14 +30,29 @@ const SEED_DATA = [{
30
30
  step: 1,
31
31
  precision: 0
32
32
  }),
33
- optimizeItemArrangement: (0, _types.createStaticBoolProp)({
34
- label: "Optimize Item Arrangement",
35
- description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
33
+ initialNumToRender: (0, _types.createStaticNumberProp)({
34
+ label: "Initial Num To Render",
35
+ description: "How many items to render in the initial batch",
36
+ defaultValue: null
36
37
  }),
37
38
  onEndReachedThreshold: (0, _types.createStaticNumberProp)({
38
39
  label: "End Reached Threshold",
39
40
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
40
41
  defaultValue: 0.5
42
+ }),
43
+ refreshColor: (0, _types.createColorProp)({
44
+ label: "Refreshing Color",
45
+ description: "Color of the refresh indicator"
46
+ }),
47
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
48
+ label: "Show Horizontal Scroll Indicator",
49
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
50
+ defaultValue: false
51
+ }),
52
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
53
+ label: "Show Vertical Scroll Indicator",
54
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
55
+ defaultValue: true
41
56
  })
42
57
  }
43
58
  }, {
@@ -73,10 +88,29 @@ const SEED_DATA = [{
73
88
  numColumns: (0, _types.createNumColumnsType)({
74
89
  editable: true
75
90
  }),
91
+ initialNumToRender: (0, _types.createStaticNumberProp)({
92
+ label: "Initial Num To Render",
93
+ description: "How many items to render in the initial batch",
94
+ defaultValue: null
95
+ }),
76
96
  onEndReachedThreshold: (0, _types.createStaticNumberProp)({
77
97
  label: "End Reached Threshold",
78
98
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
79
99
  defaultValue: 0.5
100
+ }),
101
+ refreshColor: (0, _types.createColorProp)({
102
+ label: "Refreshing Color",
103
+ description: "Color of the refresh indicator"
104
+ }),
105
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
106
+ label: "Show Horizontal Scroll Indicator",
107
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
108
+ defaultValue: false
109
+ }),
110
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
111
+ label: "Show Vertical Scroll Indicator",
112
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
113
+ defaultValue: true
80
114
  })
81
115
  }
82
116
  }];
@@ -29,14 +29,29 @@ const SEED_DATA = {
29
29
  numColumns: (0, _types.createNumColumnsType)({
30
30
  editable: true
31
31
  }),
32
- initialNumToRender: (0, _types.createStaticBoolProp)({
32
+ initialNumToRender: (0, _types.createStaticNumberProp)({
33
33
  label: "Initial Num To Render",
34
- descriprion: "How many items to render in the initial batch"
34
+ description: "How many items to render in the initial batch",
35
+ defaultValue: null
35
36
  }),
36
37
  onEndReachedThreshold: (0, _types.createStaticNumberProp)({
37
38
  label: "End Reached Threshold",
38
39
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
39
40
  defaultValue: 0.5
41
+ }),
42
+ refreshColor: (0, _types.createColorProp)({
43
+ label: "Refreshing Color",
44
+ description: "Color of the refresh indicator"
45
+ }),
46
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
47
+ label: "Show Horizontal Scroll Indicator",
48
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
49
+ defaultValue: false
50
+ }),
51
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
52
+ label: "Show Vertical Scroll Indicator",
53
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
54
+ defaultValue: true
40
55
  })
41
56
  }
42
57
  };
@@ -12,7 +12,9 @@ const SEED_DATA = {
12
12
  category: _types.COMPONENT_TYPES.view,
13
13
  stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
14
  layout: {},
15
+ triggers: [_types.Triggers.OnRefresh],
15
16
  props: {
17
+ onRefresh: (0, _types.createActionProp)(),
16
18
  horizontal: (0, _types.createStaticBoolProp)({
17
19
  label: "Horizontal",
18
20
  description: "Render your list horizontally",
@@ -32,6 +34,10 @@ const SEED_DATA = {
32
34
  label: "Bounce",
33
35
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
34
36
  defaultValue: true
37
+ }),
38
+ refreshColor: (0, _types.createColorProp)({
39
+ label: "Refreshing Color",
40
+ description: "Color of the refresh indicator"
35
41
  })
36
42
  }
37
43
  };
@@ -283,7 +283,7 @@ const SEED_DATA = [{
283
283
  ...SEED_DATA_PROPS,
284
284
  type: {
285
285
  label: "Appearance",
286
- description: "Type of Datepicker",
286
+ description: "Type of Field",
287
287
  formType: _types.FORM_TYPES.flatArray,
288
288
  propType: _types.PROP_TYPES.STRING,
289
289
  defaultValue: "solid",
@@ -325,7 +325,7 @@ const SEED_DATA = [{
325
325
  ...SEED_DATA_PROPS,
326
326
  type: {
327
327
  label: "Appearance",
328
- description: "Type of Datepicker",
328
+ description: "Type of Field",
329
329
  formType: _types.FORM_TYPES.flatArray,
330
330
  propType: _types.PROP_TYPES.STRING,
331
331
  defaultValue: "solid",
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -150,7 +150,7 @@ export const SEED_DATA = [{
150
150
  category: COMPONENT_TYPES.input,
151
151
  layout: null,
152
152
  triggers: [Triggers.OnDateChange],
153
- StylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
153
+ stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
154
154
  props: {
155
155
  ...SEED_DATA_PROPS,
156
156
  type: {
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
@@ -24,14 +24,29 @@ export const SEED_DATA = [{
24
24
  step: 1,
25
25
  precision: 0
26
26
  }),
27
- optimizeItemArrangement: createStaticBoolProp({
28
- label: "Optimize Item Arrangement",
29
- description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
27
+ initialNumToRender: createStaticNumberProp({
28
+ label: "Initial Num To Render",
29
+ description: "How many items to render in the initial batch",
30
+ defaultValue: null
30
31
  }),
31
32
  onEndReachedThreshold: createStaticNumberProp({
32
33
  label: "End Reached Threshold",
33
34
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
34
35
  defaultValue: 0.5
36
+ }),
37
+ refreshColor: createColorProp({
38
+ label: "Refreshing Color",
39
+ description: "Color of the refresh indicator"
40
+ }),
41
+ showsHorizontalScrollIndicator: createStaticBoolProp({
42
+ label: "Show Horizontal Scroll Indicator",
43
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
44
+ defaultValue: false
45
+ }),
46
+ showsVerticalScrollIndicator: createStaticBoolProp({
47
+ label: "Show Vertical Scroll Indicator",
48
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
49
+ defaultValue: true
35
50
  })
36
51
  }
37
52
  }, {
@@ -67,10 +82,29 @@ export const SEED_DATA = [{
67
82
  numColumns: createNumColumnsType({
68
83
  editable: true
69
84
  }),
85
+ initialNumToRender: createStaticNumberProp({
86
+ label: "Initial Num To Render",
87
+ description: "How many items to render in the initial batch",
88
+ defaultValue: null
89
+ }),
70
90
  onEndReachedThreshold: createStaticNumberProp({
71
91
  label: "End Reached Threshold",
72
92
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
73
93
  defaultValue: 0.5
94
+ }),
95
+ refreshColor: createColorProp({
96
+ label: "Refreshing Color",
97
+ description: "Color of the refresh indicator"
98
+ }),
99
+ showsHorizontalScrollIndicator: createStaticBoolProp({
100
+ label: "Show Horizontal Scroll Indicator",
101
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
102
+ defaultValue: false
103
+ }),
104
+ showsVerticalScrollIndicator: createStaticBoolProp({
105
+ label: "Show Vertical Scroll Indicator",
106
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
107
+ defaultValue: true
74
108
  })
75
109
  }
76
110
  }];
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -23,14 +23,29 @@ export const SEED_DATA = {
23
23
  numColumns: createNumColumnsType({
24
24
  editable: true
25
25
  }),
26
- initialNumToRender: createStaticBoolProp({
26
+ initialNumToRender: createStaticNumberProp({
27
27
  label: "Initial Num To Render",
28
- descriprion: "How many items to render in the initial batch"
28
+ description: "How many items to render in the initial batch",
29
+ defaultValue: null
29
30
  }),
30
31
  onEndReachedThreshold: createStaticNumberProp({
31
32
  label: "End Reached Threshold",
32
33
  description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
33
34
  defaultValue: 0.5
35
+ }),
36
+ refreshColor: createColorProp({
37
+ label: "Refreshing Color",
38
+ description: "Color of the refresh indicator"
39
+ }),
40
+ showsHorizontalScrollIndicator: createStaticBoolProp({
41
+ label: "Show Horizontal Scroll Indicator",
42
+ description: "When true, shows a horizontal scroll indicator. The default value is false.",
43
+ defaultValue: false
44
+ }),
45
+ showsVerticalScrollIndicator: createStaticBoolProp({
46
+ label: "Show Vertical Scroll Indicator",
47
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
48
+ defaultValue: true
34
49
  })
35
50
  }
36
51
  };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createColorProp } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Scroll View",
4
4
  tag: "ScrollView",
@@ -6,7 +6,9 @@ export const SEED_DATA = {
6
6
  category: COMPONENT_TYPES.view,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
8
  layout: {},
9
+ triggers: [Triggers.OnRefresh],
9
10
  props: {
11
+ onRefresh: createActionProp(),
10
12
  horizontal: createStaticBoolProp({
11
13
  label: "Horizontal",
12
14
  description: "Render your list horizontally",
@@ -26,6 +28,10 @@ export const SEED_DATA = {
26
28
  label: "Bounce",
27
29
  description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
28
30
  defaultValue: true
31
+ }),
32
+ refreshColor: createColorProp({
33
+ label: "Refreshing Color",
34
+ description: "Color of the refresh indicator"
29
35
  })
30
36
  }
31
37
  };
@@ -277,7 +277,7 @@ export const SEED_DATA = [{
277
277
  ...SEED_DATA_PROPS,
278
278
  type: {
279
279
  label: "Appearance",
280
- description: "Type of Datepicker",
280
+ description: "Type of Field",
281
281
  formType: FORM_TYPES.flatArray,
282
282
  propType: PROP_TYPES.STRING,
283
283
  defaultValue: "solid",
@@ -319,7 +319,7 @@ export const SEED_DATA = [{
319
319
  ...SEED_DATA_PROPS,
320
320
  type: {
321
321
  label: "Appearance",
322
- description: "Type of Datepicker",
322
+ description: "Type of Field",
323
323
  formType: FORM_TYPES.flatArray,
324
324
  propType: PROP_TYPES.STRING,
325
325
  defaultValue: "solid",
@@ -5,7 +5,7 @@ export declare const SEED_DATA: {
5
5
  category: string;
6
6
  layout: null;
7
7
  triggers: string[];
8
- StylesPanelSections: string[];
8
+ stylesPanelSections: string[];
9
9
  props: {
10
10
  type: {
11
11
  label: string;
@@ -51,15 +51,16 @@ export declare const SEED_DATA: ({
51
51
  required: boolean;
52
52
  step: number;
53
53
  };
54
- optimizeItemArrangement: {
54
+ initialNumToRender: {
55
55
  label: string;
56
56
  description: string;
57
57
  formType: string;
58
58
  propType: string;
59
- defaultValue: boolean;
59
+ group: string;
60
+ defaultValue: null;
60
61
  editable: boolean;
61
62
  required: boolean;
62
- group: string;
63
+ step: number;
63
64
  };
64
65
  onEndReachedThreshold: {
65
66
  label: string;
@@ -72,6 +73,36 @@ export declare const SEED_DATA: ({
72
73
  required: boolean;
73
74
  step: number;
74
75
  };
76
+ refreshColor: {
77
+ group: string;
78
+ label: string;
79
+ description: string;
80
+ editable: boolean;
81
+ required: boolean;
82
+ defaultValue: null;
83
+ formType: string;
84
+ propType: string;
85
+ };
86
+ showsHorizontalScrollIndicator: {
87
+ label: string;
88
+ description: string;
89
+ formType: string;
90
+ propType: string;
91
+ defaultValue: boolean;
92
+ editable: boolean;
93
+ required: boolean;
94
+ group: string;
95
+ };
96
+ showsVerticalScrollIndicator: {
97
+ label: string;
98
+ description: string;
99
+ formType: string;
100
+ propType: string;
101
+ defaultValue: boolean;
102
+ editable: boolean;
103
+ required: boolean;
104
+ group: string;
105
+ };
75
106
  horizontal?: undefined;
76
107
  inverted?: undefined;
77
108
  };
@@ -148,6 +179,17 @@ export declare const SEED_DATA: ({
148
179
  editable: boolean;
149
180
  required: boolean;
150
181
  };
182
+ initialNumToRender: {
183
+ label: string;
184
+ description: string;
185
+ formType: string;
186
+ propType: string;
187
+ group: string;
188
+ defaultValue: null;
189
+ editable: boolean;
190
+ required: boolean;
191
+ step: number;
192
+ };
151
193
  onEndReachedThreshold: {
152
194
  label: string;
153
195
  description: string;
@@ -159,7 +201,36 @@ export declare const SEED_DATA: ({
159
201
  required: boolean;
160
202
  step: number;
161
203
  };
162
- optimizeItemArrangement?: undefined;
204
+ refreshColor: {
205
+ group: string;
206
+ label: string;
207
+ description: string;
208
+ editable: boolean;
209
+ required: boolean;
210
+ defaultValue: null;
211
+ formType: string;
212
+ propType: string;
213
+ };
214
+ showsHorizontalScrollIndicator: {
215
+ label: string;
216
+ description: string;
217
+ formType: string;
218
+ propType: string;
219
+ defaultValue: boolean;
220
+ editable: boolean;
221
+ required: boolean;
222
+ group: string;
223
+ };
224
+ showsVerticalScrollIndicator: {
225
+ label: string;
226
+ description: string;
227
+ formType: string;
228
+ propType: string;
229
+ defaultValue: boolean;
230
+ editable: boolean;
231
+ required: boolean;
232
+ group: string;
233
+ };
163
234
  };
164
235
  })[];
165
236
  //# sourceMappingURL=FlashList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgFrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
@@ -64,10 +64,11 @@ export declare const SEED_DATA: {
64
64
  description: string;
65
65
  formType: string;
66
66
  propType: string;
67
- defaultValue: boolean;
67
+ group: string;
68
+ defaultValue: null;
68
69
  editable: boolean;
69
70
  required: boolean;
70
- group: string;
71
+ step: number;
71
72
  };
72
73
  onEndReachedThreshold: {
73
74
  label: string;
@@ -80,6 +81,36 @@ export declare const SEED_DATA: {
80
81
  required: boolean;
81
82
  step: number;
82
83
  };
84
+ refreshColor: {
85
+ group: string;
86
+ label: string;
87
+ description: string;
88
+ editable: boolean;
89
+ required: boolean;
90
+ defaultValue: null;
91
+ formType: string;
92
+ propType: string;
93
+ };
94
+ showsHorizontalScrollIndicator: {
95
+ label: string;
96
+ description: string;
97
+ formType: string;
98
+ propType: string;
99
+ defaultValue: boolean;
100
+ editable: boolean;
101
+ required: boolean;
102
+ group: string;
103
+ };
104
+ showsVerticalScrollIndicator: {
105
+ label: string;
106
+ description: string;
107
+ formType: string;
108
+ propType: string;
109
+ defaultValue: boolean;
110
+ editable: boolean;
111
+ required: boolean;
112
+ group: string;
113
+ };
83
114
  };
84
115
  };
85
116
  //# sourceMappingURL=FlatList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCrB,CAAC"}
1
+ {"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDrB,CAAC"}
@@ -5,7 +5,18 @@ export declare const SEED_DATA: {
5
5
  category: string;
6
6
  stylesPanelSections: string[];
7
7
  layout: {};
8
+ triggers: string[];
8
9
  props: {
10
+ onRefresh: {
11
+ label: string;
12
+ description: string;
13
+ editable: boolean;
14
+ required: boolean;
15
+ formType: string;
16
+ propType: string;
17
+ defaultValue: null;
18
+ group: string;
19
+ };
9
20
  horizontal: {
10
21
  label: string;
11
22
  description: string;
@@ -46,6 +57,16 @@ export declare const SEED_DATA: {
46
57
  required: boolean;
47
58
  group: string;
48
59
  };
60
+ refreshColor: {
61
+ group: string;
62
+ label: string;
63
+ description: string;
64
+ editable: boolean;
65
+ required: boolean;
66
+ defaultValue: null;
67
+ formType: string;
68
+ propType: string;
69
+ };
49
70
  };
50
71
  };
51
72
  //# sourceMappingURL=ScrollView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCrB,CAAC"}
1
+ {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/mappings/ScrollView.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.1.0",
3
+ "version": "47.1.1-1883fa.2+1883fa4",
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": "^47.1.0",
44
+ "@draftbit/types": "^47.1.1-1883fa.2+1883fa4",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "e7f85a3c5b7add2a2373492120ba2fd2a0d7eeda"
94
+ "gitHead": "1883fa44605deb2fd7f248b170c8503e0bc4c768"
95
95
  }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { ThemeProvider } from "./theming";
3
+ import PortalHost from "./components/Portal/PortalHost";
4
+ export default class Provider extends React.Component {
5
+ render() {
6
+ return (React.createElement(PortalHost, null,
7
+ React.createElement(ThemeProvider, { theme: this.props.theme }, this.props.children)));
8
+ }
9
+ }
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import { View, StyleSheet, Pressable, } from "react-native";
3
+ import Text from "../Text";
4
+ import { withTheme } from "../../theming";
5
+ import { extractStyles } from "../../utilities";
6
+ const AccordionGroup = ({ label, expanded: expandedProp = false, openColor, closedColor, caretColor: caretColorProp, caretSize = 24, icon, iconSize = 24, style, children, theme, Icon, }) => {
7
+ const [expanded, setExpanded] = React.useState(expandedProp);
8
+ const { textStyles, viewStyles } = extractStyles(style);
9
+ const expandedColor = openColor || theme.colors.primary;
10
+ const collapsedColor = closedColor || theme.colors.primary;
11
+ const labelColor = expanded ? expandedColor : collapsedColor;
12
+ const caretColor = caretColorProp || labelColor;
13
+ const handlePressAction = () => {
14
+ setExpanded(!expanded);
15
+ };
16
+ return (React.createElement(React.Fragment, null,
17
+ React.createElement(Pressable, { style: [styles.row, viewStyles], onPress: handlePressAction, accessibilityRole: "button" },
18
+ icon ? (React.createElement(Icon, { name: icon, size: iconSize, color: labelColor, style: styles.icon })) : null,
19
+ React.createElement(View, { style: styles.content },
20
+ React.createElement(Text, { selectable: false, style: [
21
+ textStyles,
22
+ {
23
+ color: labelColor,
24
+ },
25
+ ] }, label)),
26
+ React.createElement(Icon, { name: expanded
27
+ ? "MaterialIcons/keyboard-arrow-up"
28
+ : "MaterialIcons/keyboard-arrow-down", color: caretColor, size: caretSize })),
29
+ expanded ? children : null));
30
+ };
31
+ const styles = StyleSheet.create({
32
+ row: {
33
+ flexDirection: "row",
34
+ alignItems: "center",
35
+ },
36
+ content: {
37
+ flex: 1,
38
+ justifyContent: "center",
39
+ },
40
+ icon: {
41
+ marginRight: 8,
42
+ },
43
+ });
44
+ export default withTheme(AccordionGroup);