@draftbit/core 47.0.1-2935a8.2 → 47.0.1-2aab54.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 (80) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
  2. package/lib/commonjs/index.js +25 -82
  3. package/lib/commonjs/mappings/FlashList.js +2 -38
  4. package/lib/commonjs/mappings/FlatList.js +0 -9
  5. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +93 -0
  6. package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
  7. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +48 -0
  8. package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
  9. package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
  10. package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
  11. package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
  12. package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
  13. package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
  14. package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
  15. package/lib/module/index.js +121 -31
  16. package/lib/module/mappings/FlashList.js +3 -39
  17. package/lib/module/mappings/FlatList.js +1 -10
  18. package/lib/module/mappings/NativeBase/AlertDialog.js +86 -0
  19. package/lib/module/mappings/NativeBase/Button.js +86 -0
  20. package/lib/module/mappings/NativeBase/DataDisplay.js +41 -0
  21. package/lib/module/mappings/NativeBase/Feedback.js +67 -0
  22. package/lib/module/mappings/NativeBase/Layout.js +107 -0
  23. package/lib/module/mappings/NativeBase/Media.js +42 -0
  24. package/lib/module/mappings/NativeBase/Menu.js +104 -0
  25. package/lib/module/mappings/NativeBase/Modal.js +86 -0
  26. package/lib/module/mappings/NativeBase/Other.js +87 -0
  27. package/lib/module/mappings/NativeBase/Popover.js +92 -0
  28. package/lib/typescript/src/index.d.ts +102 -29
  29. package/lib/typescript/src/index.d.ts.map +1 -1
  30. package/lib/typescript/src/mappings/FlashList.d.ts +2 -130
  31. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  32. package/lib/typescript/src/mappings/FlatList.d.ts +0 -51
  33. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  34. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +134 -0
  35. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
  36. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
  37. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
  38. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +70 -0
  39. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
  40. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
  41. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
  42. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
  43. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  44. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
  45. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
  46. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
  47. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
  48. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
  49. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
  50. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
  51. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
  52. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
  53. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
  54. package/package.json +3 -3
  55. package/src/index.js +112 -31
  56. package/src/index.tsx +123 -43
  57. package/src/mappings/FlashList.js +31 -75
  58. package/src/mappings/FlashList.ts +30 -77
  59. package/src/mappings/FlatList.js +1 -15
  60. package/src/mappings/FlatList.ts +0 -16
  61. package/src/mappings/NativeBase/AlertDialog.js +103 -0
  62. package/src/mappings/NativeBase/AlertDialog.ts +118 -0
  63. package/src/mappings/NativeBase/Button.js +84 -0
  64. package/src/mappings/NativeBase/Button.ts +83 -0
  65. package/src/mappings/NativeBase/DataDisplay.js +54 -0
  66. package/src/mappings/NativeBase/DataDisplay.ts +64 -0
  67. package/src/mappings/NativeBase/Feedback.js +89 -0
  68. package/src/mappings/NativeBase/Feedback.ts +100 -0
  69. package/src/mappings/NativeBase/Layout.js +140 -0
  70. package/src/mappings/NativeBase/Layout.ts +152 -0
  71. package/src/mappings/NativeBase/Media.js +56 -0
  72. package/src/mappings/NativeBase/Media.ts +65 -0
  73. package/src/mappings/NativeBase/Menu.js +134 -0
  74. package/src/mappings/NativeBase/Menu.ts +150 -0
  75. package/src/mappings/NativeBase/Modal.js +103 -0
  76. package/src/mappings/NativeBase/Modal.ts +118 -0
  77. package/src/mappings/NativeBase/Other.js +123 -0
  78. package/src/mappings/NativeBase/Other.ts +139 -0
  79. package/src/mappings/NativeBase/Popover.js +123 -0
  80. package/src/mappings/NativeBase/Popover.ts +136 -0
@@ -2,53 +2,143 @@ export { injectIcon } from "./interfaces/Icon";
2
2
  export { withTheme, ThemeProvider } from "./theming";
3
3
  export { default as Provider } from "./Provider";
4
4
  export { default as DefaultTheme } from "./styles/DefaultTheme";
5
- export { Link } from "./components/Text";
5
+
6
+ /** Replaced By NativeBase
7
+ * export { default as Avatar } from "./components/CircleImage";
8
+ * export { default as Container } from "./components/Container";
9
+ * export { default as FAB } from "./components/FAB";
10
+ * export {
11
+ Center,
12
+ Circle,
13
+ Square,
14
+ Row,
15
+ Stack,
16
+ Spacer,
17
+ } from "./components/Layout";
18
+ */
19
+
20
+ // BASIC
21
+ export { default as ScreenContainer } from "./components/ScreenContainer";
6
22
  export { default as Banner } from "./components/Banner";
23
+
24
+ // BUTTONS
7
25
  export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
8
- export { default as Avatar } from "./components/CircleImage";
9
- export { default as AvatarEdit } from "./components/AvatarEdit";
10
- export { default as Card } from "./components/Card";
11
- export { default as Carousel } from "./components/Carousel";
12
- export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
13
- export { default as CircleImage } from "./components/CircleImage";
14
- export { default as Container } from "./components/Container";
15
- export { default as Divider } from "./components/Divider";
16
- export { default as FAB } from "./components/FAB";
17
- export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
26
+ export { Link } from "./components/Text";
18
27
  export { default as IconButton } from "./components/IconButton";
19
- export { default as Image } from "./components/Image";
20
- export { default as SVG } from "./components/SVG";
28
+ export { default as Touchable } from "./components/Touchable";
29
+ export { default as ToggleButton } from "./components/ToggleButton";
30
+
31
+ // INPUTS
32
+ export { default as DatePicker } from "./components/DatePicker/DatePicker";
21
33
  export { default as NumberInput } from "./components/NumberInput";
22
- export { default as ScreenContainer } from "./components/ScreenContainer";
34
+ export { default as TextField } from "./components/TextField";
35
+ export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
36
+ export { default as Picker } from "./components/Picker/Picker";
37
+
38
+ // CONTROLS
39
+ export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
40
+ export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
41
+ export { default as Slider } from "./components/Slider";
42
+ export { default as Stepper } from "./components/Stepper";
23
43
  export { default as StarRating } from "./components/StarRating";
24
- export { default as Surface } from "./components/Surface";
25
44
  export { default as Switch, SwitchRow } from "./components/Switch";
26
- export { default as TextField } from "./components/TextField";
27
- export { default as ToggleButton } from "./components/ToggleButton";
28
- export { default as Touchable } from "./components/Touchable";
45
+
46
+ // MEDIA
47
+ export { default as SVG } from "./components/SVG";
48
+ export { default as Image } from "./components/Image";
49
+ // export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
50
+ export { default as AvatarEdit } from "./components/AvatarEdit";
51
+ export { default as CircleImage } from "./components/CircleImage";
52
+
53
+ // SWIPER
54
+ export { Swiper, SwiperItem } from "./components/Swiper";
55
+
56
+ // CONTAINERS
29
57
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
58
+ export { default as Surface } from "./components/Surface";
59
+
60
+ // ACTIONSHEET
30
61
  export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
31
- export { Swiper, SwiperItem } from "./components/Swiper";
32
- export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
- export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
62
 
35
- /* Deprecated: Fix or Delete! */
36
- export { default as CardBlock } from "./components/CardBlock";
37
- export { default as CardContainer } from "./components/CardContainer";
38
- export { default as CardContainerRating } from "./components/CardContainerRating";
39
- export { default as CardInline } from "./components/CardInline";
40
- export { default as DatePicker } from "./components/DatePicker/DatePicker";
63
+ // OTHER
64
+ export { default as Carousel } from "./components/Carousel";
65
+ export { default as Divider } from "./components/Divider";
41
66
  export { default as HeaderLarge } from "./components/HeaderLarge";
42
67
  export { default as HeaderMedium } from "./components/HeaderMedium";
43
68
  export { default as HeaderOverline } from "./components/HeaderOverline";
44
- export { default as Picker } from "./components/Picker/Picker";
45
69
  export { default as ProgressBar } from "./components/ProgressBar";
46
70
  export { default as ProgressCircle } from "./components/ProgressCircle";
47
71
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
48
72
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
49
73
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
50
- export { default as Slider } from "./components/Slider";
51
- export { default as Stepper } from "./components/Stepper";
74
+ export { default as Card } from "./components/Card";
75
+ export { default as CardBlock } from "./components/CardBlock";
76
+ export { default as CardContainer } from "./components/CardContainer";
77
+ export { default as CardContainerRating } from "./components/CardContainerRating";
78
+ export { default as CardInline } from "./components/CardInline";
52
79
  export { useAuthState } from "./components/useAuthState";
53
80
 
54
- // a comment to fix sourcemap comment issue
81
+ /**
82
+ * NativeBase Components Jan 2023
83
+ *
84
+ * ALERT
85
+ * - AlertDialog
86
+ * - AlertDialog.Header
87
+ * - AlertDialog.Body
88
+ * - AlertDialog.Footer
89
+ * - AlertDialog.Content
90
+ * - AlertDialog.CloseButton
91
+ *
92
+ * FORMS
93
+ * - Button -- COMMENTED OUT
94
+ * - Button.Group -- COMMENTED OUT
95
+ * - Fab
96
+ *
97
+ * DATA DISPLAY
98
+ * - Badge
99
+ * - Divider
100
+ *
101
+ * FEEDBACK
102
+ * - Alert
103
+ * - Alert.Icon
104
+ * - Progress
105
+ *
106
+ * LAYOUT
107
+ * - AspectRatio
108
+ * - Box
109
+ * - Center
110
+ * - Square
111
+ * - Circle
112
+ * - Column
113
+ * - Container
114
+ * - Flex
115
+ * - Spacer
116
+ * - Row
117
+ * - Stack
118
+ * - ZStack
119
+ *
120
+ * MEDIA
121
+ * - Avatar
122
+ * - Avatar.Badge
123
+ * - Avatar.Group
124
+ *
125
+ * MENU
126
+ * - Menu
127
+ * - Menu.Item
128
+ * - Menu.Group
129
+ * - Menu.OptionGroup
130
+ * - Menu.ItemOption
131
+ * - Menu.Trigger
132
+ *
133
+ * MODAL
134
+ * - Modal
135
+ * - Modal.Content
136
+ * - Modal.Header
137
+ * - Modal.Footer
138
+ * - Modal.Body
139
+ * - Modal.CloseButton
140
+ *
141
+ * OTHER
142
+ * - Tooltip
143
+ *
144
+ * */
@@ -1,37 +1,5 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp } from "@draftbit/types";
2
- export const SEED_DATA = [{
3
- name: "Masonry List",
4
- tag: "MasonryFlashList",
5
- description: "Masonry Flashlist by Shopify",
6
- packageName: "@shopify/flash-list",
7
- category: COMPONENT_TYPES.data,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
- layout: {
10
- flex: 1
11
- },
12
- triggers: [Triggers.OnRefresh, Triggers.OnEndReached, Triggers.OnEndReachedThreshold, Triggers.OnViewableItemsChanged],
13
- props: {
14
- onRefresh: createActionProp(),
15
- onEndReached: createActionProp(),
16
- onEndReachedThreshold: createActionProp(),
17
- onViewableItemsChanged: createActionProp(),
18
- numColumns: createNumColumnsType({
19
- editable: true
20
- }),
21
- estimatedItemSize: createNumberProp({
22
- group: GROUPS.basic,
23
- label: "Est. Item Size",
24
- description: "Approximate size of the items before rendering.",
25
- defaultValue: 50,
26
- step: 1,
27
- precision: 0
28
- }),
29
- optimizeItemArrangement: createStaticBoolProp({
30
- label: "Optimize Item Arrangement",
31
- 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."
32
- })
33
- }
34
- }, {
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
2
+ export const SEED_DATA = {
35
3
  name: "FlashList",
36
4
  tag: "FlashList",
37
5
  description: "Flashlist by Shopify",
@@ -42,10 +10,6 @@ export const SEED_DATA = [{
42
10
  flex: 1
43
11
  },
44
12
  props: {
45
- onRefresh: createActionProp(),
46
- onEndReached: createActionProp(),
47
- onEndReachedThreshold: createActionProp(),
48
- onViewableItemsChanged: createActionProp(),
49
13
  estimatedItemSize: createNumberProp({
50
14
  group: GROUPS.basic,
51
15
  label: "Est. Item Size",
@@ -66,4 +30,4 @@ export const SEED_DATA = [{
66
30
  editable: true
67
31
  })
68
32
  }
69
- }];
33
+ };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -8,12 +8,7 @@ export const SEED_DATA = {
8
8
  layout: {
9
9
  flex: 1
10
10
  },
11
- triggers: [Triggers.OnRefresh, Triggers.OnEndReached, Triggers.OnEndReachedThreshold, Triggers.OnViewableItemsChanged],
12
11
  props: {
13
- onRefresh: createActionProp(),
14
- onEndReached: createActionProp(),
15
- onEndReachedThreshold: createActionProp(),
16
- onViewableItemsChanged: createActionProp(),
17
12
  horizontal: createStaticBoolProp({
18
13
  label: "Horizontal",
19
14
  description: "Render list horizontally"
@@ -24,10 +19,6 @@ export const SEED_DATA = {
24
19
  }),
25
20
  numColumns: createNumColumnsType({
26
21
  editable: true
27
- }),
28
- initialNumToRender: createStaticBoolProp({
29
- label: "Initial Num To Render",
30
- descriprion: "How many items to render in the initial batch"
31
22
  })
32
23
  }
33
24
  };
@@ -0,0 +1,86 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, Triggers, createBoolProp, createStaticBoolProp, createTextEnumProp, createActionProp } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.NBAlert,
4
+ packageName: "native-base",
5
+ stylesPanelSections: [StylesPanelSections.LayoutFlexItems, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.LayoutContent, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects],
6
+ layout: {}
7
+ };
8
+ export const SEED_DATA = [{
9
+ name: "Alert Dialog",
10
+ tag: "AlertDialog",
11
+ description: "AlertDialog is used when a user needs to be interrupted with a mandatory confirmation or call-to-action. AlertDialog composes Modal so you can use all its props.",
12
+ ...SHARED_SEED_DATA,
13
+ triggers: [Triggers.OnClose, Triggers.OnOpen],
14
+ props: {
15
+ isOpen: createBoolProp({
16
+ label: "Is Open",
17
+ description: "If true, the modal will open. Useful for controllable state behavior."
18
+ }),
19
+ defaultIsOpen: createStaticBoolProp({
20
+ label: "Default Is Open",
21
+ description: "If true, the modal will be opened by default."
22
+ }),
23
+ avoidKeyboard: createStaticBoolProp({
24
+ label: "Avoid Keyboard",
25
+ description: "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
26
+ defaultValue: false
27
+ }),
28
+ closeOnOverlayClick: createStaticBoolProp({
29
+ label: "Close on Overlay Click",
30
+ description: "If true, the modal will close when the overlay is clicked.",
31
+ defaultValue: true
32
+ }),
33
+ isKeyboardDismissable: createStaticBoolProp({
34
+ label: "Is Keyboard Dismissable",
35
+ description: "If true, the modal will close when the keyboard is dismissed.",
36
+ defaultValue: true
37
+ }),
38
+ backdropVisible: createStaticBoolProp({
39
+ label: "Backdrop Visible",
40
+ description: "If true, the backdrop element is visible.",
41
+ defaultValue: true
42
+ }),
43
+ animationPreset: createTextEnumProp({
44
+ label: "Animation Preset",
45
+ description: "The animation preset to use for the modal.",
46
+ options: ["slide", "fade", "none"],
47
+ defaultValue: "fade"
48
+ }),
49
+ useRNModal: createStaticBoolProp({
50
+ label: "Use RN Modal",
51
+ description: "If true, the modal will use the RN Modal component."
52
+ }),
53
+ onOpen: createActionProp(),
54
+ onClose: createActionProp()
55
+ }
56
+ }, {
57
+ name: "Alert Header",
58
+ tag: "AlertDialog.Header",
59
+ description: "Contains the title announced by screen readers.",
60
+ ...SHARED_SEED_DATA,
61
+ props: {}
62
+ }, {
63
+ name: "Alert Body",
64
+ tag: "AlertDialog.Body",
65
+ description: "Contains the description announced by screen readers.",
66
+ ...SHARED_SEED_DATA,
67
+ props: {}
68
+ }, {
69
+ name: "Alert Footer",
70
+ tag: "AlertDialog.Footer",
71
+ description: "Contains the actions of the dialog.",
72
+ ...SHARED_SEED_DATA,
73
+ props: {}
74
+ }, {
75
+ name: "Alert Content",
76
+ tag: "AlertDialog.Content",
77
+ description: "The wrapper for the alert dialog's content.",
78
+ ...SHARED_SEED_DATA,
79
+ props: {}
80
+ }, {
81
+ name: "Alert Close Button",
82
+ tag: "AlertDialog.CloseButton",
83
+ description: "The button that closes the dialog",
84
+ ...SHARED_SEED_DATA,
85
+ props: {}
86
+ }];
@@ -0,0 +1,86 @@
1
+ /* Temporarily Commented Out
2
+
3
+
4
+ import {
5
+ COMPONENT_TYPES,
6
+ StylesPanelSections,
7
+ createTextEnumProp,
8
+ createBoolProp,
9
+ createIconProp,
10
+ } from "@draftbit/types";
11
+
12
+ const SHARED_SEED_DATA = {
13
+ category: COMPONENT_TYPES.NBForms,
14
+ packageName: "native-base",
15
+ stylesPanelSections: [
16
+ StylesPanelSections.LayoutFlexItems,
17
+ StylesPanelSections.LayoutSelectedItem,
18
+ StylesPanelSections.LayoutContent,
19
+ StylesPanelSections.Background,
20
+ StylesPanelSections.Size,
21
+ StylesPanelSections.MarginsAndPaddings,
22
+ StylesPanelSections.Position,
23
+ StylesPanelSections.Borders,
24
+ StylesPanelSections.Effects,
25
+ ],
26
+ layout: {},
27
+ triggers: {},
28
+ };
29
+
30
+ export const SEED_DATA = [
31
+ {
32
+ name: "Button",
33
+ tag: "Button",
34
+ description:
35
+ "The Button component triggers an event or an action. Examples can be submitting forms and deleting a data point.",
36
+ ...SHARED_SEED_DATA,
37
+ props: {
38
+ isLoading: createBoolProp({
39
+ label: "Loading",
40
+ description: "If true, the button will show a spinner.",
41
+ }),
42
+ isDisabled: createBoolProp({
43
+ label: "Disabled",
44
+ description: "If true, the button will be disabled.",
45
+ }),
46
+ leftIcon: createIconProp({
47
+ label: "Left Icon",
48
+ description: "The icon to display on the left side of the button",
49
+ }),
50
+ rightIcon: createIconProp({
51
+ label: "Right Icon",
52
+ description: "The icon to display on the right side of the button",
53
+ }),
54
+ spinnerPlacement: createTextEnumProp({
55
+ label: "Spinner Placement",
56
+ description: "The placement of the spinner",
57
+ options: ["start", "end"],
58
+ defaultValue: "start",
59
+ }),
60
+ },
61
+ },
62
+ {
63
+ name: "Button Group",
64
+ tag: "ButtonGroup",
65
+ description:
66
+ "Used to group buttons whose actions are related, with an option to flush them together.",
67
+ ...SHARED_SEED_DATA,
68
+ allowChildren: true,
69
+ props: {
70
+ direction: createTextEnumProp({
71
+ label: "Direction",
72
+ description: "The direction of the button group",
73
+ options: ["row", "column"],
74
+ defaultValue: "row",
75
+ }),
76
+ isAttached: createBoolProp({
77
+ label: "Attached",
78
+ description: "If true, the buttons will be attached",
79
+ }),
80
+ },
81
+ },
82
+ ];
83
+ */ },
84
+ },
85
+ ];
86
+ */
@@ -0,0 +1,41 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, createTextEnumProp, createIconProp, createStaticNumberProp } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.NBDataDisplay,
4
+ packageName: "native-base",
5
+ stylesPanelSections: [StylesPanelSections.LayoutFlexItems, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.LayoutContent, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects],
6
+ layout: {},
7
+ triggers: {}
8
+ };
9
+ export const SEED_DATA = [{
10
+ name: "Badge",
11
+ tag: "Badge",
12
+ description: "Badges allow the highlighting of an item’s status. This provides quick recognition.",
13
+ ...SHARED_SEED_DATA,
14
+ props: {
15
+ leftIcon: createIconProp({
16
+ label: "Left Icon",
17
+ description: "The icon to display on the left side of the button"
18
+ }),
19
+ rightIcon: createIconProp({
20
+ label: "Right Icon",
21
+ description: "The icon to display on the right side of the button"
22
+ })
23
+ }
24
+ }, {
25
+ name: "Divider",
26
+ tag: "Divider",
27
+ description: "Divider can visually separate content in a given list or group.",
28
+ ...SHARED_SEED_DATA,
29
+ props: {
30
+ orientation: createTextEnumProp({
31
+ label: "Orientation",
32
+ description: "The orientation of the divider",
33
+ options: ["horizontal", "vertical"]
34
+ }),
35
+ thickness: createStaticNumberProp({
36
+ label: "Thickness",
37
+ description: "The thickness of the divider",
38
+ defaultValue: 1
39
+ })
40
+ }
41
+ }];
@@ -0,0 +1,67 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, createTextEnumProp, createNumberProp, createIconProp } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.NBFeedback,
4
+ packageName: "native-base",
5
+ stylesPanelSections: [StylesPanelSections.LayoutFlexItems, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.LayoutContent, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects],
6
+ layout: {},
7
+ triggers: {}
8
+ };
9
+ export const SEED_DATA = [{
10
+ name: "Alert",
11
+ tag: "Alert",
12
+ description: "Wrapper component. Alerts convey a state that can influence a system, feature, or page.",
13
+ ...SHARED_SEED_DATA,
14
+ props: {
15
+ status: createTextEnumProp({
16
+ label: "Status",
17
+ description: "The status of the alert",
18
+ options: ["success", "warning", "error", "info"],
19
+ defaultValue: "info"
20
+ }),
21
+ variant: createTextEnumProp({
22
+ label: "Variant",
23
+ description: "The variant of the alert style to use.",
24
+ options: ["subtle", "solid", "outline", "left-accent", "top-accent", "outline-light"],
25
+ defaultValue: "subtle"
26
+ })
27
+ }
28
+ }, {
29
+ name: "Alert Icon",
30
+ tag: "Alert.Icon",
31
+ description: "The visual icon for the alert that changes based on the status prop.",
32
+ ...SHARED_SEED_DATA,
33
+ props: {
34
+ icon: createIconProp({
35
+ label: "Icon",
36
+ description: "The icon to display"
37
+ })
38
+ }
39
+ }, {
40
+ name: "Progress",
41
+ tag: "Progress",
42
+ description: "Progress helps show the progress status for a time-consuming task that consists of several steps.",
43
+ ...SHARED_SEED_DATA,
44
+ props: {
45
+ value: createNumberProp({
46
+ label: "Value",
47
+ description: "The value of the progress bar",
48
+ defaultValue: 0,
49
+ min: 0,
50
+ max: 100
51
+ }),
52
+ min: createNumberProp({
53
+ label: "Min",
54
+ description: "The minimum value of the progress bar",
55
+ defaultValue: 0,
56
+ min: 0,
57
+ max: 100
58
+ }),
59
+ max: createNumberProp({
60
+ label: "Max",
61
+ description: "The maximum value of the progress bar",
62
+ defaultValue: 100,
63
+ min: 0,
64
+ max: 100
65
+ })
66
+ }
67
+ }, {}];
@@ -0,0 +1,107 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, createTextEnumProp, createBoolProp } from "@draftbit/types";
2
+ const NB_LAYOUT_PROPS = {
3
+ category: COMPONENT_TYPES.NBLayout,
4
+ packageName: "native-base",
5
+ doc_link: "https://www.npmjs.com/package/@expo/html-elements",
6
+ code_link: "https://github.com/expo/expo/tree/master/packages/html-elements",
7
+ stylesPanelSections: [StylesPanelSections.LayoutFlexItems, StylesPanelSections.LayoutSelectedItem, StylesPanelSections.LayoutContent, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects],
8
+ allowChildren: true,
9
+ layout: {},
10
+ triggers: {}
11
+ };
12
+ export const SEED_DATA = [{
13
+ name: "Aspect Ratio",
14
+ tag: "AspectRatio",
15
+ description: "AspectRatio controls the size of the undefined dimension of a node or child component.",
16
+ ...NB_LAYOUT_PROPS,
17
+ props: {
18
+ ratio: createTextEnumProp({
19
+ label: "Ratio",
20
+ description: "The aspect ratio of the container",
21
+ options: ["1 / 1", "4 / 3", "3 / 2", "16 / 9", "2 / 1", "3 / 4", "2 / 3", "9 / 16", "1 / 2"],
22
+ defaultValue: "4 / 3"
23
+ })
24
+ }
25
+ }, {
26
+ name: "Box",
27
+ tag: "Box",
28
+ description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
29
+ ...NB_LAYOUT_PROPS
30
+ }, {
31
+ name: "Center",
32
+ tag: "Center",
33
+ description: "Centers its child",
34
+ ...NB_LAYOUT_PROPS
35
+ }, {
36
+ name: "Square",
37
+ tag: "Square",
38
+ description: "Centers its child inside a square",
39
+ ...NB_LAYOUT_PROPS
40
+ }, {
41
+ name: "Circle",
42
+ tag: "Circle",
43
+ description: "Centers its child inside a circle",
44
+ ...NB_LAYOUT_PROPS
45
+ }, {
46
+ name: "Column",
47
+ tag: "Column",
48
+ description: "Column aligns items vertically",
49
+ ...NB_LAYOUT_PROPS
50
+ }, {
51
+ name: "Container",
52
+ tag: "Container",
53
+ description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid.",
54
+ ...NB_LAYOUT_PROPS
55
+ }, {
56
+ name: "Flex",
57
+ tag: "Flex",
58
+ description: "A Box with Flexbox properties. ",
59
+ ...NB_LAYOUT_PROPS
60
+ }, {
61
+ name: "Spacer",
62
+ tag: "Spacer",
63
+ description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
64
+ ...NB_LAYOUT_PROPS
65
+ }, {
66
+ name: "Row",
67
+ tag: "Row",
68
+ description: "Column aligns items horizontally",
69
+ ...NB_LAYOUT_PROPS,
70
+ props: {}
71
+ }, {
72
+ name: "Stack",
73
+ tag: "Stack",
74
+ description: "Stack aligns items vertically or horizontally based on the direction prop.",
75
+ ...NB_LAYOUT_PROPS,
76
+ props: {
77
+ direction: createTextEnumProp({
78
+ label: "Direction",
79
+ description: "The direction of the Stack",
80
+ options: ["row", "column"],
81
+ defaultValue: "column"
82
+ }),
83
+ reversed: createBoolProp({
84
+ label: "Reversed",
85
+ description: "Determines whether to reverse the direction of items."
86
+ }),
87
+ isDisabled: createBoolProp({
88
+ label: "Disabled",
89
+ description: "If true, the Stack will be disabled."
90
+ }),
91
+ isInvalid: createBoolProp({
92
+ label: "Invalid",
93
+ description: "If true, the Stack will be invalid."
94
+ })
95
+ }
96
+ }, {
97
+ name: "ZStack",
98
+ tag: "ZStack",
99
+ description: "ZStack aligns items to the z-axis.",
100
+ ...NB_LAYOUT_PROPS,
101
+ props: {
102
+ reversed: createBoolProp({
103
+ label: "Reversed",
104
+ description: "Determines whether to reverse the direction of items."
105
+ })
106
+ }
107
+ }];