@draftbit/core 46.9.1-fe76aa.2 → 46.9.1

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 (211) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/DeprecatedFAB.js +3 -21
  3. package/lib/commonjs/components/Justification.js +1 -5
  4. package/lib/commonjs/components/ResizeMode.js +1 -5
  5. package/lib/commonjs/mappings/ActionSheet.js +1 -1
  6. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
  7. package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
  8. package/lib/commonjs/mappings/MapCallout.js +1 -1
  9. package/lib/commonjs/mappings/MapMarker.js +1 -1
  10. package/lib/module/components/Justification.js +0 -1
  11. package/lib/module/components/ResizeMode.js +0 -1
  12. package/lib/module/mappings/ActionSheet.js +1 -1
  13. package/lib/module/mappings/ActionSheetCancel.js +1 -1
  14. package/lib/module/mappings/ActionSheetItem.js +1 -1
  15. package/lib/module/mappings/MapCallout.js +2 -2
  16. package/lib/module/mappings/MapMarker.js +2 -2
  17. package/lib/typescript/src/mappings/ActionSheet.d.ts.map +1 -1
  18. package/lib/typescript/src/mappings/ActionSheetCancel.d.ts.map +1 -1
  19. package/lib/typescript/src/mappings/ActionSheetItem.d.ts.map +1 -1
  20. package/lib/typescript/src/mappings/MapCallout.d.ts.map +1 -1
  21. package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
  22. package/package.json +3 -3
  23. package/src/mappings/ActionSheet.ts +1 -4
  24. package/src/mappings/ActionSheetCancel.ts +1 -4
  25. package/src/mappings/ActionSheetItem.ts +1 -4
  26. package/src/mappings/MapCallout.ts +2 -6
  27. package/src/mappings/MapMarker.ts +2 -6
  28. package/src/Provider.js +0 -9
  29. package/src/components/Accordion/AccordionGroup.js +0 -44
  30. package/src/components/Accordion/AccordionItem.js +0 -32
  31. package/src/components/Accordion/index.js +0 -2
  32. package/src/components/ActionSheet/ActionSheet.js +0 -45
  33. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  34. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  35. package/src/components/ActionSheet/index.js +0 -3
  36. package/src/components/AnimatedCircularProgress.js +0 -43
  37. package/src/components/AspectRatio.js +0 -18
  38. package/src/components/AvatarEdit.js +0 -30
  39. package/src/components/Banner.js +0 -109
  40. package/src/components/Button.js +0 -114
  41. package/src/components/Card.js +0 -57
  42. package/src/components/Checkbox/Checkbox.js +0 -62
  43. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  44. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  45. package/src/components/Checkbox/CheckboxRow.js +0 -77
  46. package/src/components/Checkbox/context.js +0 -14
  47. package/src/components/Checkbox/index.js +0 -3
  48. package/src/components/CircleImage.js +0 -8
  49. package/src/components/CircularProgress.js +0 -81
  50. package/src/components/Config.js +0 -64
  51. package/src/components/Container.js +0 -43
  52. package/src/components/DatePicker/DatePicker.js +0 -382
  53. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  54. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  55. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  56. package/src/components/DeckSwiper/DeckSwiper.js +0 -65
  57. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  58. package/src/components/DeckSwiper/index.js +0 -2
  59. package/src/components/DeprecatedButton.js +0 -83
  60. package/src/components/DeprecatedCardWrapper.js +0 -18
  61. package/src/components/DeprecatedFAB.js +0 -114
  62. package/src/components/Divider.js +0 -13
  63. package/src/components/Elevation.js +0 -20
  64. package/src/components/FAB.js +0 -46
  65. package/src/components/FieldSearchBarFull.js +0 -53
  66. package/src/components/FormRow.js +0 -19
  67. package/src/components/IconButton.js +0 -35
  68. package/src/components/Image.js +0 -47
  69. package/src/components/Justification.js +0 -1
  70. package/src/components/Layout.js +0 -50
  71. package/src/components/Markdown.js +0 -10
  72. package/src/components/NumberInput.js +0 -49
  73. package/src/components/Picker/Picker.js +0 -266
  74. package/src/components/Picker/PickerComponent.android.js +0 -69
  75. package/src/components/Picker/PickerComponent.ios.js +0 -79
  76. package/src/components/Picker/PickerComponent.web.js +0 -70
  77. package/src/components/Picker/PickerTypes.js +0 -1
  78. package/src/components/Portal/Portal.js +0 -35
  79. package/src/components/Portal/PortalConsumer.js +0 -27
  80. package/src/components/Portal/PortalHost.js +0 -107
  81. package/src/components/Portal/PortalManager.js +0 -32
  82. package/src/components/Pressable.js +0 -12
  83. package/src/components/ProgressBar.js +0 -118
  84. package/src/components/ProgressCircle.js +0 -13
  85. package/src/components/ProgressIndicator.js +0 -27
  86. package/src/components/RadioButton/RadioButton.js +0 -17
  87. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  88. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  89. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  90. package/src/components/RadioButton/context.js +0 -14
  91. package/src/components/RadioButton/index.js +0 -4
  92. package/src/components/ResizeMode.js +0 -1
  93. package/src/components/Row.js +0 -48
  94. package/src/components/RowBodyIcon.js +0 -8
  95. package/src/components/RowHeadlineImageCaption.js +0 -12
  96. package/src/components/RowHeadlineImageIcon.js +0 -14
  97. package/src/components/SVG.js +0 -13
  98. package/src/components/ScreenContainer.js +0 -35
  99. package/src/components/Shadow.js +0 -16
  100. package/src/components/Slider.js +0 -63
  101. package/src/components/StarRating.js +0 -50
  102. package/src/components/StepIndicator.js +0 -346
  103. package/src/components/Stepper.js +0 -41
  104. package/src/components/Surface.js +0 -32
  105. package/src/components/Swiper/Swiper.js +0 -29
  106. package/src/components/Swiper/SwiperItem.js +0 -9
  107. package/src/components/Swiper/index.js +0 -2
  108. package/src/components/Switch.js +0 -56
  109. package/src/components/TabView/TabView.js +0 -54
  110. package/src/components/TabView/TabViewItem.js +0 -11
  111. package/src/components/TabView/index.js +0 -2
  112. package/src/components/Text.js +0 -33
  113. package/src/components/TextField.js +0 -428
  114. package/src/components/ToggleButton.js +0 -39
  115. package/src/components/Touchable.js +0 -12
  116. package/src/components/Touchable.web.js +0 -2
  117. package/src/components/Typography.js +0 -36
  118. package/src/components/useAuthState.js +0 -31
  119. package/src/constants.js +0 -10
  120. package/src/hooks.js +0 -12
  121. package/src/index.js +0 -49
  122. package/src/interfaces/Icon.js +0 -8
  123. package/src/mappings/Accordion.js +0 -50
  124. package/src/mappings/AccordionItem.js +0 -17
  125. package/src/mappings/ActionSheet.js +0 -17
  126. package/src/mappings/ActionSheetCancel.js +0 -23
  127. package/src/mappings/ActionSheetItem.js +0 -27
  128. package/src/mappings/ActivityIndicator.js +0 -58
  129. package/src/mappings/AudioPlayer.js +0 -57
  130. package/src/mappings/AvatarEdit.js +0 -38
  131. package/src/mappings/Banner.js +0 -32
  132. package/src/mappings/BlurView.js +0 -42
  133. package/src/mappings/Button.js +0 -116
  134. package/src/mappings/Card.js +0 -52
  135. package/src/mappings/CardBlock.js +0 -123
  136. package/src/mappings/CardContainer.js +0 -104
  137. package/src/mappings/CardContainerRating.js +0 -126
  138. package/src/mappings/CardContainerShortImage.js +0 -120
  139. package/src/mappings/CardInline.js +0 -52
  140. package/src/mappings/Carousel.js +0 -19
  141. package/src/mappings/Checkbox.js +0 -46
  142. package/src/mappings/CheckboxGroup.js +0 -26
  143. package/src/mappings/CheckboxRow.js +0 -61
  144. package/src/mappings/CircleImage.js +0 -25
  145. package/src/mappings/Container.js +0 -30
  146. package/src/mappings/CustomCode.js +0 -8
  147. package/src/mappings/DatePicker.js +0 -182
  148. package/src/mappings/DeckSwiper.js +0 -48
  149. package/src/mappings/DeckSwiperCard.js +0 -16
  150. package/src/mappings/Divider.js +0 -27
  151. package/src/mappings/FAB.js +0 -37
  152. package/src/mappings/Fetch.js +0 -13
  153. package/src/mappings/FieldSearchBarFull.js +0 -50
  154. package/src/mappings/FlashList.js +0 -113
  155. package/src/mappings/FlatList.js +0 -51
  156. package/src/mappings/HeaderLarge.js +0 -29
  157. package/src/mappings/HeaderMedium.js +0 -55
  158. package/src/mappings/HeaderOverline.js +0 -55
  159. package/src/mappings/Icon.js +0 -32
  160. package/src/mappings/IconButton.js +0 -33
  161. package/src/mappings/Image.js +0 -35
  162. package/src/mappings/ImageBackground.js +0 -29
  163. package/src/mappings/KeyboardAvoidingView.js +0 -41
  164. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  165. package/src/mappings/Layout.js +0 -200
  166. package/src/mappings/LinearGradient.js +0 -82
  167. package/src/mappings/MapCallout.js +0 -26
  168. package/src/mappings/MapMarker.js +0 -52
  169. package/src/mappings/MapView.js +0 -142
  170. package/src/mappings/Markdown.js +0 -25
  171. package/src/mappings/Modal.js +0 -42
  172. package/src/mappings/NumberInput.js +0 -254
  173. package/src/mappings/Picker.js +0 -153
  174. package/src/mappings/ProgressBar.js +0 -101
  175. package/src/mappings/ProgressCircle.js +0 -109
  176. package/src/mappings/ProgressIndicator.js +0 -181
  177. package/src/mappings/RadioButton.js +0 -51
  178. package/src/mappings/RadioButtonGroup.js +0 -17
  179. package/src/mappings/RadioButtonRow.js +0 -42
  180. package/src/mappings/RowBodyIcon.js +0 -75
  181. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  182. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  183. package/src/mappings/SVG.js +0 -20
  184. package/src/mappings/SafeAreaView.js +0 -33
  185. package/src/mappings/ScrollView.js +0 -37
  186. package/src/mappings/Shadow.js +0 -95
  187. package/src/mappings/Slider.js +0 -60
  188. package/src/mappings/StarRating.js +0 -43
  189. package/src/mappings/Stepper.js +0 -32
  190. package/src/mappings/Surface.js +0 -14
  191. package/src/mappings/Swiper.js +0 -71
  192. package/src/mappings/SwiperItem.js +0 -9
  193. package/src/mappings/Switch.js +0 -81
  194. package/src/mappings/TabView.js +0 -75
  195. package/src/mappings/TabViewItem.js +0 -30
  196. package/src/mappings/Text.js +0 -251
  197. package/src/mappings/TextArea.js +0 -283
  198. package/src/mappings/TextField.js +0 -400
  199. package/src/mappings/TextInput.js +0 -402
  200. package/src/mappings/ToggleButton.js +0 -50
  201. package/src/mappings/Touchable.js +0 -67
  202. package/src/mappings/Video.js +0 -81
  203. package/src/mappings/View.js +0 -207
  204. package/src/mappings/WebView.js +0 -88
  205. package/src/styles/DarkTheme.js +0 -26
  206. package/src/styles/DefaultTheme.js +0 -111
  207. package/src/styles/fonts.js +0 -62
  208. package/src/styles/overlay.js +0 -60
  209. package/src/styles/shadow.js +0 -51
  210. package/src/theming.js +0 -3
  211. package/src/utilities.js +0 -102
@@ -1,81 +0,0 @@
1
- import { COMPONENT_TYPES, GROUPS, createBoolProp, createColorProp, createFieldNameProp, createTextProp, createRowDirectionProp, Triggers, StylesPanelSections, BLOCK_STYLES_SECTIONS, } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnValueChange];
3
- export const SEED_DATA = [
4
- {
5
- name: "Switch",
6
- tag: "Switch",
7
- category: COMPONENT_TYPES.control,
8
- stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
- layout: {},
10
- triggers: SEED_DATA_TRIGGERS,
11
- props: {
12
- disabled: createBoolProp({
13
- label: "Disabled",
14
- description: "Boolean to handle disabling the switch",
15
- }),
16
- fieldName: createFieldNameProp({
17
- handlerPropName: "onValueChange",
18
- valuePropName: "value",
19
- defaultValue: "switchValue",
20
- }),
21
- activeTrackColor: createColorProp({
22
- label: "Active Track Color",
23
- }),
24
- inactiveTrackColor: createColorProp({
25
- label: "Inactive Track Color",
26
- }),
27
- activeThumbColor: createColorProp({
28
- label: "Active Thumb Color",
29
- }),
30
- inactiveThumbColor: createColorProp({
31
- label: "Inactive Thumb Color",
32
- }),
33
- },
34
- },
35
- {
36
- name: "Switch Row",
37
- tag: "SwitchRow",
38
- category: COMPONENT_TYPES.control,
39
- stylesPanelSections: [
40
- StylesPanelSections.Typography,
41
- StylesPanelSections.Margins,
42
- StylesPanelSections.Effects,
43
- ],
44
- layout: {
45
- marginLeft: 0,
46
- marginRight: 0,
47
- },
48
- triggers: SEED_DATA_TRIGGERS,
49
- props: {
50
- label: createTextProp({
51
- label: "Label",
52
- description: "Label to show with the checkbox",
53
- required: true,
54
- defaultValue: "First Option",
55
- }),
56
- direction: createRowDirectionProp(),
57
- disabled: createBoolProp({
58
- label: "Disabled",
59
- description: "Boolean to handle disabling the switch",
60
- group: GROUPS.data,
61
- }),
62
- fieldName: createFieldNameProp({
63
- handlerPropName: "onValueChange",
64
- valuePropName: "value",
65
- defaultValue: "switchValue",
66
- }),
67
- activeTrackColor: createColorProp({
68
- label: "Active Track Color",
69
- }),
70
- inactiveTrackColor: createColorProp({
71
- label: "Inactive Track Color",
72
- }),
73
- activeThumbColor: createColorProp({
74
- label: "Active Thumb Color",
75
- }),
76
- inactiveThumbColor: createColorProp({
77
- label: "Inactive Thumb Color",
78
- }),
79
- },
80
- },
81
- ];
@@ -1,75 +0,0 @@
1
- import { COMPONENT_TYPES, createTextEnumProp, createColorProp, StylesPanelSections, Triggers, createActionProp, createStaticBoolProp, GROUPS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Tab View",
4
- tag: "TabView",
5
- description: "Tab view container",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: [
8
- StylesPanelSections.Size,
9
- StylesPanelSections.MarginsAndPaddings,
10
- StylesPanelSections.Position,
11
- StylesPanelSections.Effects,
12
- StylesPanelSections.LayoutSelectedItem,
13
- StylesPanelSections.Background,
14
- StylesPanelSections.Typography,
15
- ],
16
- triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
17
- props: {
18
- onIndexChanged: createActionProp({
19
- label: "On index changed",
20
- description: "Action to execute when swipe to new index",
21
- }),
22
- onEndReached: createActionProp({
23
- label: "On end reached",
24
- description: "Action to execute when end of swiping reached",
25
- }),
26
- tabBarPosition: createTextEnumProp({
27
- label: "Tab Bar Position",
28
- description: "Position of tab bar",
29
- options: ["top", "bottom"],
30
- defaultValue: "top",
31
- }),
32
- keyboardDismissMode: createTextEnumProp({
33
- label: "Keyboard Dismiss Mode",
34
- description: "Keyboard Dismiss Mode",
35
- options: ["auto", "on-drag", "none"],
36
- defaultValue: "auto",
37
- }),
38
- swipeEnabled: createStaticBoolProp({
39
- label: "Swipe Enabled",
40
- description: "Whether swiping is enabled or not",
41
- defaultValue: true,
42
- }),
43
- scrollEnabled: createStaticBoolProp({
44
- label: "Tab Scroll Enabled",
45
- description: "Whether scrolling of tabs is enabled or not",
46
- defaultValue: false,
47
- }),
48
- activeColor: createColorProp({
49
- label: "Active Color",
50
- description: "Color of icon and text of active tab",
51
- defaultValue: "primary",
52
- }),
53
- inactiveColor: createColorProp({
54
- label: "Inactive Color",
55
- description: "Color of icon and text of inactive tab(s)",
56
- defaultValue: null,
57
- }),
58
- pressColor: createColorProp({
59
- label: "Press Color",
60
- description: "Color of ripple when pressed",
61
- defaultValue: "primary",
62
- group: GROUPS.android,
63
- }),
64
- indicatorColor: createColorProp({
65
- label: "Indicator Color",
66
- description: "Color of indicator",
67
- defaultValue: "primary",
68
- }),
69
- tabsBackgroundColor: createColorProp({
70
- label: "Tabs Background Color",
71
- description: "Background color of tabs container",
72
- defaultValue: "background",
73
- }),
74
- },
75
- };
@@ -1,30 +0,0 @@
1
- import { COMPONENT_TYPES, createTextProp, createIconProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, } from "@draftbit/types";
2
- export const SEED_DATA = {
3
- name: "Tab View Item",
4
- tag: "TabViewItem",
5
- description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
6
- category: COMPONENT_TYPES.swiper,
7
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
- layout: {
9
- flex: 1,
10
- },
11
- props: {
12
- title: createTextProp({
13
- label: "Title",
14
- description: "Title of tab item",
15
- defaultValue: "Title",
16
- required: true,
17
- group: GROUPS.basic,
18
- }),
19
- icon: createIconProp({
20
- defaultValue: null,
21
- required: false,
22
- }),
23
- accessibilityLabel: createTextProp({
24
- label: "Accessibility Label",
25
- description: "Accessibility Label",
26
- defaultValue: null,
27
- group: GROUPS.accessibility,
28
- }),
29
- },
30
- };
@@ -1,251 +0,0 @@
1
- import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, Triggers, createActionProp, createTextProp, StylesPanelSections, } from "@draftbit/types";
2
- const SEED_DATA_PROPS = {
3
- accessibilityLabel: {
4
- group: GROUPS.accessibility,
5
- name: "accessibilityLabel",
6
- label: "accessibilityLabel",
7
- description: "Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.",
8
- editable: true,
9
- required: false,
10
- formType: FORM_TYPES.string,
11
- propType: PROP_TYPES.STRING,
12
- defaultValue: null,
13
- },
14
- accessibilityHint: {
15
- group: GROUPS.accessibility,
16
- name: "accessibilityHint",
17
- label: "accessibilityHint",
18
- description: "An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.",
19
- editable: true,
20
- required: false,
21
- formType: FORM_TYPES.string,
22
- propType: PROP_TYPES.STRING,
23
- defaultValue: null,
24
- },
25
- accessibilityRole: {
26
- group: GROUPS.accessibility,
27
- name: "accessibilityRole",
28
- label: "accessibilityRole",
29
- description: "Tells the screen reader to treat the currently focused on element as having a specific role.Possible values for AccessibilityRole is one of:\n'none' - The element has no role.\n'button' - The element should be treated as a button.\n'link' - The element should be treated as a link.\n'header' - The element is a header that divides content into sections.\n'search' - The element should be treated as a search field.\n'image' - The element should be treated as an image.\n'key' - The element should be treated like a keyboard key.\n'text' - The element should be treated as text.\n'summary' - The element provides app summary information.\n'imagebutton' - The element has the role of both an image and also a button.\n'adjustable' - The element allows adjustment over a range of values.\nOn iOS, these roles map to corresponding Accessibility Traits. Image button has the same functionality as if the trait was set to both 'image' and 'button'. See the Accessibility guide for more information.On Android, these roles have similar functionality on TalkBack as adding Accessibility Traits does on Voiceover in iOS",
30
- options: [
31
- "none",
32
- "button",
33
- "link",
34
- "header",
35
- "search",
36
- "image",
37
- "key",
38
- "text",
39
- "summary",
40
- "imagebutton",
41
- "adjustable",
42
- ],
43
- editable: true,
44
- required: false,
45
- formType: FORM_TYPES.flatArray,
46
- propType: PROP_TYPES.STRING,
47
- defaultValue: null,
48
- },
49
- accessible: {
50
- group: GROUPS.accessibility,
51
- name: "accessible",
52
- label: "accessible",
53
- description: "When set to true, indicates that the view is an accessibility element. The default value for a Text element is true. See the Accessibility guide for more information.",
54
- editable: true,
55
- required: false,
56
- formType: FORM_TYPES.boolean,
57
- propType: PROP_TYPES.BOOLEAN,
58
- defaultValue: null,
59
- },
60
- adjustsFontSizeToFit: {
61
- group: GROUPS.advanced,
62
- name: "adjustsFontSizeToFit",
63
- label: "adjustsFontSizeToFit",
64
- description: "Specifies whether fonts should be scaled down automatically to fit given style constraints.",
65
- editable: true,
66
- required: false,
67
- formType: FORM_TYPES.boolean,
68
- propType: PROP_TYPES.BOOLEAN,
69
- defaultValue: null,
70
- },
71
- allowFontScaling: {
72
- group: GROUPS.advanced,
73
- name: "allowFontScaling",
74
- label: "allowFontScaling",
75
- description: "Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true.",
76
- editable: true,
77
- required: false,
78
- formType: FORM_TYPES.boolean,
79
- propType: PROP_TYPES.BOOLEAN,
80
- defaultValue: null,
81
- },
82
- dataDetectorType: {
83
- group: GROUPS.advanced,
84
- name: "dataDetectorType",
85
- label: "dataDetectorType",
86
- description: "Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. You can provide only one type. Possible values for dataDetectorType are:\n'phoneNumber'\n'link'\n'email'\n'none'\n'all'\n",
87
- options: ["phoneNumber", "link", "email", "none", "all"],
88
- editable: true,
89
- required: false,
90
- formType: FORM_TYPES.flatArray,
91
- propType: PROP_TYPES.STRING,
92
- defaultValue: null,
93
- },
94
- disabled: {
95
- group: GROUPS.basic,
96
- name: "disabled",
97
- label: "disabled",
98
- description: "Specifies the disabled state of the text view for testing purposes",
99
- editable: true,
100
- required: false,
101
- formType: FORM_TYPES.boolean,
102
- propType: PROP_TYPES.BOOLEAN,
103
- defaultValue: null,
104
- },
105
- ellipsizeMode: {
106
- group: GROUPS.basic,
107
- name: "ellipsizeMode",
108
- label: "Truncate Text?",
109
- description: 'When numberOfLines is set, this prop defines how text will be truncated. numberOfLines must be set in conjunction with this prop.This can be one of the following values:\nhead - The line is displayed so that the end fits in the container and the missing text at the beginning of the line is indicated by an ellipsis glyph. e.g., "...wxyz"\nmiddle - The line is displayed so that the beginning and end fit in the container and the missing text in the middle is indicated by an ellipsis glyph. "ab...yz"\ntail - The line is displayed so that the beginning fits in the container and the missing text at the end of the line is indicated by an ellipsis glyph. e.g., "abcd..."\nclip - Lines are not drawn past the edge of the text container.\nThe default is tail.',
110
- options: ["head", "middle", "tail", "clip"],
111
- editable: true,
112
- required: false,
113
- formType: FORM_TYPES.flatArray,
114
- propType: PROP_TYPES.STRING,
115
- defaultValue: null,
116
- },
117
- maxFontSizeMultiplier: {
118
- group: GROUPS.advanced,
119
- name: "maxFontSizeMultiplier",
120
- label: "maxFontSizeMultiplier",
121
- description: "Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values:\nnull/undefined (default): inherit from the parent node or the global default (0)\n0: no max, ignore parent/global default\n>= 1: sets the maxFontSizeMultiplier of this node to this value\n",
122
- editable: true,
123
- required: false,
124
- formType: FORM_TYPES.number,
125
- propType: PROP_TYPES.NUMBER,
126
- defaultValue: null,
127
- },
128
- nativeID: {
129
- group: GROUPS.accessibility,
130
- name: "nativeID",
131
- label: "nativeID",
132
- description: "Used to locate this view from native code.",
133
- editable: true,
134
- required: false,
135
- formType: FORM_TYPES.string,
136
- propType: PROP_TYPES.STRING,
137
- defaultValue: null,
138
- },
139
- numberOfLines: {
140
- group: GROUPS.basic,
141
- name: "numberOfLines",
142
- label: "Max # of Lines",
143
- defaultValue: null,
144
- description: "Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines does not exceed this number.This prop is commonly used with ellipsizeMode.",
145
- editable: true,
146
- required: false,
147
- formType: FORM_TYPES.number,
148
- propType: PROP_TYPES.NUMBER,
149
- step: 1,
150
- precision: 1,
151
- },
152
- selectable: {
153
- group: GROUPS.advanced,
154
- name: "selectable",
155
- label: "selectable",
156
- description: "Lets the user select text, to use the native copy and paste functionality.",
157
- editable: true,
158
- required: false,
159
- formType: FORM_TYPES.boolean,
160
- propType: PROP_TYPES.BOOLEAN,
161
- defaultValue: null,
162
- },
163
- selectionColor: {
164
- group: GROUPS.advanced,
165
- name: "selectionColor",
166
- label: "selectionColor",
167
- description: "The highlight color of the text.",
168
- editable: true,
169
- required: false,
170
- formType: FORM_TYPES.color,
171
- propType: PROP_TYPES.THEME,
172
- defaultValue: null,
173
- },
174
- suppressHighlighting: {
175
- group: GROUPS.advanced,
176
- name: "suppressHighlighting",
177
- label: "suppressHighlighting",
178
- description: "When true, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.",
179
- editable: true,
180
- required: false,
181
- formType: FORM_TYPES.boolean,
182
- propType: PROP_TYPES.BOOLEAN,
183
- defaultValue: null,
184
- },
185
- textBreakStrategy: {
186
- group: GROUPS.advanced,
187
- name: "textBreakStrategy",
188
- label: "textBreakStrategy",
189
- description: "Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced The default value is highQuality.",
190
- options: ["simple", "highQuality", "balanced"],
191
- editable: true,
192
- required: false,
193
- formType: FORM_TYPES.flatArray,
194
- propType: PROP_TYPES.STRING,
195
- defaultValue: null,
196
- },
197
- };
198
- export const SEED_DATA = [
199
- {
200
- name: "Text",
201
- tag: "Text",
202
- description: "A basic Text component",
203
- category: COMPONENT_TYPES.basic,
204
- stylesPanelSections: [
205
- StylesPanelSections.Typography,
206
- StylesPanelSections.LayoutSelectedItem,
207
- StylesPanelSections.MarginsAndPaddings,
208
- StylesPanelSections.Effects,
209
- ],
210
- layout: {
211
- color: "strong", // This is translated on collector script run by the extractValueAndType function
212
- },
213
- props: {
214
- ...SEED_DATA_PROPS,
215
- children: {
216
- group: GROUPS.data,
217
- label: "Text",
218
- description: "Text",
219
- editable: true,
220
- required: true,
221
- formType: FORM_TYPES.string,
222
- propType: PROP_TYPES.STRING,
223
- defaultValue: "Double click me to edit 👀",
224
- },
225
- },
226
- },
227
- {
228
- name: "Link",
229
- tag: "Link",
230
- category: COMPONENT_TYPES.button,
231
- stylesPanelSections: [
232
- StylesPanelSections.Typography,
233
- StylesPanelSections.LayoutSelectedItem,
234
- StylesPanelSections.MarginsAndPaddings,
235
- StylesPanelSections.Effects,
236
- ],
237
- layout: {
238
- color: "primary",
239
- },
240
- triggers: [Triggers.OnPress],
241
- props: {
242
- ...SEED_DATA_PROPS,
243
- onPress: createActionProp(),
244
- title: createTextProp({
245
- label: "Title",
246
- description: "Link title",
247
- defaultValue: "Get Started",
248
- }),
249
- },
250
- },
251
- ];