@draftbit/core 47.0.1-17098e.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 (141) hide show
  1. package/lib/commonjs/components/Button.js +15 -27
  2. package/lib/commonjs/components/Checkbox/Checkbox.js +3 -1
  3. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
  4. package/lib/commonjs/components/DeprecatedButton.js +151 -0
  5. package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -2
  6. package/lib/commonjs/components/DeprecatedFAB.js +2 -1
  7. package/lib/commonjs/components/Picker/Picker.js +4 -3
  8. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  9. package/lib/commonjs/components/Touchable.js +11 -27
  10. package/lib/commonjs/components/Touchable.web.js +9 -0
  11. package/lib/commonjs/index.js +25 -82
  12. package/lib/commonjs/mappings/Button.js +10 -14
  13. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +93 -0
  14. package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
  15. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +48 -0
  16. package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
  17. package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
  18. package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
  19. package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
  20. package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
  21. package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
  22. package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
  23. package/lib/commonjs/mappings/Touchable.js +20 -0
  24. package/lib/module/components/Button.js +9 -21
  25. package/lib/module/components/Checkbox/Checkbox.js +3 -2
  26. package/lib/module/components/DeprecatedButton.js +141 -0
  27. package/lib/module/components/DeprecatedCardWrapper.js +2 -2
  28. package/lib/module/components/DeprecatedFAB.js +3 -2
  29. package/lib/module/components/Picker/Picker.js +4 -3
  30. package/lib/module/components/Picker/PickerComponent.ios.js +1 -1
  31. package/lib/module/components/Touchable.js +10 -25
  32. package/lib/module/components/Touchable.web.js +2 -0
  33. package/lib/module/index.js +121 -31
  34. package/lib/module/mappings/Button.js +11 -15
  35. package/lib/module/mappings/NativeBase/AlertDialog.js +86 -0
  36. package/lib/module/mappings/NativeBase/Button.js +86 -0
  37. package/lib/module/mappings/NativeBase/DataDisplay.js +41 -0
  38. package/lib/module/mappings/NativeBase/Feedback.js +67 -0
  39. package/lib/module/mappings/NativeBase/Layout.js +107 -0
  40. package/lib/module/mappings/NativeBase/Media.js +42 -0
  41. package/lib/module/mappings/NativeBase/Menu.js +104 -0
  42. package/lib/module/mappings/NativeBase/Modal.js +86 -0
  43. package/lib/module/mappings/NativeBase/Other.js +87 -0
  44. package/lib/module/mappings/NativeBase/Popover.js +92 -0
  45. package/lib/module/mappings/Touchable.js +13 -0
  46. package/lib/typescript/src/components/Button.d.ts +0 -2
  47. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  48. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  49. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  50. package/lib/typescript/src/components/DeprecatedButton.d.ts +54 -0
  51. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -0
  52. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -1
  53. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  54. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  55. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  56. package/lib/typescript/src/components/Touchable.d.ts +2 -9
  57. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  58. package/lib/typescript/src/components/Touchable.web.d.ts +3 -0
  59. package/lib/typescript/src/components/Touchable.web.d.ts.map +1 -0
  60. package/lib/typescript/src/index.d.ts +102 -29
  61. package/lib/typescript/src/index.d.ts.map +1 -1
  62. package/lib/typescript/src/mappings/Button.d.ts +2 -224
  63. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  64. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +134 -0
  65. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
  66. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
  67. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
  68. package/lib/typescript/src/mappings/{Pressable.d.ts → NativeBase/DataDisplay.d.ts} +34 -40
  69. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
  70. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
  71. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
  72. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
  73. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  74. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
  75. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
  76. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
  77. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
  78. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
  79. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
  80. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
  81. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
  82. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
  83. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
  84. package/lib/typescript/src/mappings/Touchable.d.ts +22 -0
  85. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -0
  86. package/package.json +3 -3
  87. package/src/components/Button.js +11 -18
  88. package/src/components/Button.tsx +11 -45
  89. package/src/components/Checkbox/Checkbox.js +3 -2
  90. package/src/components/Checkbox/Checkbox.tsx +7 -5
  91. package/src/components/DeprecatedButton.js +95 -0
  92. package/src/components/DeprecatedButton.tsx +214 -0
  93. package/src/components/DeprecatedCardWrapper.js +2 -2
  94. package/src/components/DeprecatedCardWrapper.tsx +4 -3
  95. package/src/components/DeprecatedFAB.js +3 -2
  96. package/src/components/DeprecatedFAB.tsx +5 -5
  97. package/src/components/Picker/Picker.js +4 -3
  98. package/src/components/Picker/Picker.tsx +4 -4
  99. package/src/components/Picker/PickerComponent.ios.js +1 -1
  100. package/src/components/Picker/PickerComponent.ios.tsx +1 -1
  101. package/src/components/Touchable.js +11 -16
  102. package/src/components/Touchable.tsx +11 -42
  103. package/src/components/Touchable.web.js +2 -0
  104. package/src/components/Touchable.web.tsx +3 -0
  105. package/src/index.js +112 -31
  106. package/src/index.tsx +123 -43
  107. package/src/mappings/Button.js +10 -14
  108. package/src/mappings/Button.ts +10 -14
  109. package/src/mappings/NativeBase/AlertDialog.js +103 -0
  110. package/src/mappings/NativeBase/AlertDialog.ts +118 -0
  111. package/src/mappings/NativeBase/Button.js +84 -0
  112. package/src/mappings/NativeBase/Button.ts +83 -0
  113. package/src/mappings/NativeBase/DataDisplay.js +54 -0
  114. package/src/mappings/NativeBase/DataDisplay.ts +64 -0
  115. package/src/mappings/NativeBase/Feedback.js +89 -0
  116. package/src/mappings/NativeBase/Feedback.ts +100 -0
  117. package/src/mappings/NativeBase/Layout.js +140 -0
  118. package/src/mappings/NativeBase/Layout.ts +152 -0
  119. package/src/mappings/NativeBase/Media.js +56 -0
  120. package/src/mappings/NativeBase/Media.ts +65 -0
  121. package/src/mappings/NativeBase/Menu.js +134 -0
  122. package/src/mappings/NativeBase/Menu.ts +150 -0
  123. package/src/mappings/NativeBase/Modal.js +103 -0
  124. package/src/mappings/NativeBase/Modal.ts +118 -0
  125. package/src/mappings/NativeBase/Other.js +123 -0
  126. package/src/mappings/NativeBase/Other.ts +139 -0
  127. package/src/mappings/NativeBase/Popover.js +123 -0
  128. package/src/mappings/NativeBase/Popover.ts +136 -0
  129. package/src/mappings/Touchable.js +17 -0
  130. package/src/mappings/Touchable.ts +23 -0
  131. package/lib/commonjs/components/Pressable.js +0 -48
  132. package/lib/commonjs/mappings/Pressable.js +0 -52
  133. package/lib/module/components/Pressable.js +0 -40
  134. package/lib/module/mappings/Pressable.js +0 -45
  135. package/lib/typescript/src/components/Pressable.d.ts +0 -18
  136. package/lib/typescript/src/components/Pressable.d.ts.map +0 -1
  137. package/lib/typescript/src/mappings/Pressable.d.ts.map +0 -1
  138. package/src/components/Pressable.js +0 -17
  139. package/src/components/Pressable.tsx +0 -67
  140. package/src/mappings/Pressable.js +0 -52
  141. package/src/mappings/Pressable.ts +0 -63
package/src/index.tsx CHANGED
@@ -3,39 +3,11 @@ export { withTheme, ThemeProvider } from "./theming";
3
3
  export { default as Provider } from "./Provider";
4
4
  export { default as DefaultTheme } from "./styles/DefaultTheme";
5
5
 
6
- export { Link } from "./components/Text";
7
- export { default as Banner } from "./components/Banner";
8
- export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
9
- export { default as Avatar } from "./components/CircleImage";
10
- export { default as AvatarEdit } from "./components/AvatarEdit";
11
- export { default as Card } from "./components/Card";
12
- export { default as Carousel } from "./components/Carousel";
13
- export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
14
- export { default as CircleImage } from "./components/CircleImage";
15
- export { default as Container } from "./components/Container";
16
- export { default as Divider } from "./components/Divider";
17
- export { default as FAB } from "./components/FAB";
18
- export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
19
- export { default as IconButton } from "./components/IconButton";
20
- export { default as Image } from "./components/Image";
21
- export { default as SVG } from "./components/SVG";
22
- export { default as NumberInput } from "./components/NumberInput";
23
- export { default as ScreenContainer } from "./components/ScreenContainer";
24
- export { default as StarRating } from "./components/StarRating";
25
- export { default as Surface } from "./components/Surface";
26
- export { default as Switch, SwitchRow } from "./components/Switch";
27
- export { default as TextField } from "./components/TextField";
28
- export { default as ToggleButton } from "./components/ToggleButton";
29
- export { default as Touchable } from "./components/Touchable";
30
- export { AccordionGroup, AccordionItem } from "./components/Accordion";
31
- export {
32
- ActionSheet,
33
- ActionSheetItem,
34
- ActionSheetCancel,
35
- } from "./components/ActionSheet";
36
- export { Swiper, SwiperItem } from "./components/Swiper";
37
-
38
- export {
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 {
39
11
  Center,
40
12
  Circle,
41
13
  Square,
@@ -43,31 +15,139 @@ export {
43
15
  Stack,
44
16
  Spacer,
45
17
  } from "./components/Layout";
18
+ */
19
+
20
+ // BASIC
21
+ export { default as ScreenContainer } from "./components/ScreenContainer";
22
+ export { default as Banner } from "./components/Banner";
23
+
24
+ // BUTTONS
25
+ export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
26
+ export { Link } from "./components/Text";
27
+ export { default as IconButton } from "./components/IconButton";
28
+ export { default as Touchable } from "./components/Touchable";
29
+ export { default as ToggleButton } from "./components/ToggleButton";
46
30
 
31
+ // INPUTS
32
+ export { default as DatePicker } from "./components/DatePicker/DatePicker";
33
+ export { default as NumberInput } from "./components/NumberInput";
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";
47
40
  export {
48
41
  RadioButton,
49
42
  RadioButtonGroup,
50
43
  RadioButtonRow,
51
44
  RadioButtonFieldGroup,
52
45
  } from "./components/RadioButton/index";
46
+ export { default as Slider } from "./components/Slider";
47
+ export { default as Stepper } from "./components/Stepper";
48
+ export { default as StarRating } from "./components/StarRating";
49
+ export { default as Switch, SwitchRow } from "./components/Switch";
53
50
 
54
- /* Deprecated: Fix or Delete! */
55
- export { default as CardBlock } from "./components/CardBlock";
56
- export { default as CardContainer } from "./components/CardContainer";
57
- export { default as CardContainerRating } from "./components/CardContainerRating";
58
- export { default as CardInline } from "./components/CardInline";
59
- export { default as DatePicker } from "./components/DatePicker/DatePicker";
51
+ // MEDIA
52
+ export { default as SVG } from "./components/SVG";
53
+ export { default as Image } from "./components/Image";
54
+ // export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
55
+ export { default as AvatarEdit } from "./components/AvatarEdit";
56
+ export { default as CircleImage } from "./components/CircleImage";
57
+
58
+ // SWIPER
59
+ export { Swiper, SwiperItem } from "./components/Swiper";
60
+
61
+ // CONTAINERS
62
+ export { AccordionGroup, AccordionItem } from "./components/Accordion";
63
+ export { default as Surface } from "./components/Surface";
64
+
65
+ // ACTIONSHEET
66
+ export {
67
+ ActionSheet,
68
+ ActionSheetItem,
69
+ ActionSheetCancel,
70
+ } from "./components/ActionSheet";
71
+
72
+ // OTHER
73
+ export { default as Carousel } from "./components/Carousel";
74
+ export { default as Divider } from "./components/Divider";
60
75
  export { default as HeaderLarge } from "./components/HeaderLarge";
61
76
  export { default as HeaderMedium } from "./components/HeaderMedium";
62
77
  export { default as HeaderOverline } from "./components/HeaderOverline";
63
- export { default as Picker } from "./components/Picker/Picker";
64
78
  export { default as ProgressBar } from "./components/ProgressBar";
65
79
  export { default as ProgressCircle } from "./components/ProgressCircle";
66
80
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
67
81
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
68
82
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
69
- export { default as Slider } from "./components/Slider";
70
- export { default as Stepper } from "./components/Stepper";
83
+ export { default as Card } from "./components/Card";
84
+ export { default as CardBlock } from "./components/CardBlock";
85
+ export { default as CardContainer } from "./components/CardContainer";
86
+ export { default as CardContainerRating } from "./components/CardContainerRating";
87
+ export { default as CardInline } from "./components/CardInline";
71
88
  export { useAuthState } from "./components/useAuthState";
72
89
 
73
- // a comment to fix sourcemap comment issue
90
+ /**
91
+ * NativeBase Components Jan 2023
92
+ *
93
+ * ALERT
94
+ * - AlertDialog
95
+ * - AlertDialog.Header
96
+ * - AlertDialog.Body
97
+ * - AlertDialog.Footer
98
+ * - AlertDialog.Content
99
+ * - AlertDialog.CloseButton
100
+ *
101
+ * FORMS
102
+ * - Button -- COMMENTED OUT
103
+ * - Button.Group -- COMMENTED OUT
104
+ * - Fab
105
+ *
106
+ * DATA DISPLAY
107
+ * - Badge
108
+ * - Divider
109
+ *
110
+ * FEEDBACK
111
+ * - Alert
112
+ * - Alert.Icon
113
+ * - Progress
114
+ *
115
+ * LAYOUT
116
+ * - AspectRatio
117
+ * - Box
118
+ * - Center
119
+ * - Square
120
+ * - Circle
121
+ * - Column
122
+ * - Container
123
+ * - Flex
124
+ * - Spacer
125
+ * - Row
126
+ * - Stack
127
+ * - ZStack
128
+ *
129
+ * MEDIA
130
+ * - Avatar
131
+ * - Avatar.Badge
132
+ * - Avatar.Group
133
+ *
134
+ * MENU
135
+ * - Menu
136
+ * - Menu.Item
137
+ * - Menu.Group
138
+ * - Menu.OptionGroup
139
+ * - Menu.ItemOption
140
+ * - Menu.Trigger
141
+ *
142
+ * MODAL
143
+ * - Modal
144
+ * - Modal.Content
145
+ * - Modal.Header
146
+ * - Modal.Footer
147
+ * - Modal.Body
148
+ * - Modal.CloseButton
149
+ *
150
+ * OTHER
151
+ * - Tooltip
152
+ *
153
+ * */
@@ -1,8 +1,7 @@
1
- import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, createNumberProp, } from "@draftbit/types";
2
- const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
1
+ import { COMPONENT_TYPES, createIconProp, createTextProp, createDisabledProp, createLoadingProp, createActionProp, Triggers, StylesPanelSections, } from "@draftbit/types";
2
+ const SEED_DATA_TRIGGERS = [Triggers.OnPress];
3
3
  const SEED_DATA_PROPS = {
4
4
  onPress: createActionProp(),
5
- onLongPress: createActionProp(),
6
5
  icon: createIconProp({
7
6
  defaultValue: null,
8
7
  required: false,
@@ -14,10 +13,11 @@ const SEED_DATA_PROPS = {
14
13
  }),
15
14
  disabled: createDisabledProp(),
16
15
  loading: createLoadingProp(),
17
- activeOpacity: createNumberProp(),
18
- disabledOpacity: createNumberProp(),
19
- delayLongPress: createNumberProp(),
20
- hitSlop: createNumberProp(),
16
+ };
17
+ const LAYOUT = {
18
+ backgroundColor: "transparent",
19
+ borderRadius: 8,
20
+ fontFamily: "system-700",
21
21
  };
22
22
  export const SEED_DATA = [
23
23
  {
@@ -34,9 +34,8 @@ export const SEED_DATA = [
34
34
  StylesPanelSections.Effects,
35
35
  ],
36
36
  layout: {
37
+ ...LAYOUT,
37
38
  backgroundColor: "transparent",
38
- borderRadius: 8,
39
- fontFamily: "system-700",
40
39
  borderWidth: 1,
41
40
  textAlign: "center",
42
41
  },
@@ -57,8 +56,7 @@ export const SEED_DATA = [
57
56
  StylesPanelSections.Effects,
58
57
  ],
59
58
  layout: {
60
- borderRadius: 8,
61
- fontFamily: "system-700",
59
+ ...LAYOUT,
62
60
  backgroundColor: "primary",
63
61
  textAlign: "center",
64
62
  },
@@ -79,9 +77,7 @@ export const SEED_DATA = [
79
77
  StylesPanelSections.Effects,
80
78
  ],
81
79
  layout: {
82
- borderRadius: 8,
83
- height: 42,
84
- fontFamily: "system-700",
80
+ ...LAYOUT,
85
81
  backgroundColor: "primary",
86
82
  textAlign: "center",
87
83
  },
@@ -7,13 +7,11 @@ import {
7
7
  createActionProp,
8
8
  Triggers,
9
9
  StylesPanelSections,
10
- createNumberProp,
11
10
  } from "@draftbit/types";
12
11
 
13
- const SEED_DATA_TRIGGERS = [Triggers.OnPress, Triggers.OnLongPress];
12
+ const SEED_DATA_TRIGGERS = [Triggers.OnPress];
14
13
  const SEED_DATA_PROPS = {
15
14
  onPress: createActionProp(),
16
- onLongPress: createActionProp(),
17
15
  icon: createIconProp({
18
16
  defaultValue: null,
19
17
  required: false,
@@ -25,10 +23,12 @@ const SEED_DATA_PROPS = {
25
23
  }),
26
24
  disabled: createDisabledProp(),
27
25
  loading: createLoadingProp(),
28
- activeOpacity: createNumberProp(),
29
- disabledOpacity: createNumberProp(),
30
- delayLongPress: createNumberProp(),
31
- hitSlop: createNumberProp(),
26
+ };
27
+
28
+ const LAYOUT = {
29
+ backgroundColor: "transparent",
30
+ borderRadius: 8,
31
+ fontFamily: "system-700",
32
32
  };
33
33
 
34
34
  export const SEED_DATA = [
@@ -46,9 +46,8 @@ export const SEED_DATA = [
46
46
  StylesPanelSections.Effects,
47
47
  ],
48
48
  layout: {
49
+ ...LAYOUT,
49
50
  backgroundColor: "transparent",
50
- borderRadius: 8,
51
- fontFamily: "system-700",
52
51
  borderWidth: 1,
53
52
  textAlign: "center",
54
53
  },
@@ -69,8 +68,7 @@ export const SEED_DATA = [
69
68
  StylesPanelSections.Effects,
70
69
  ],
71
70
  layout: {
72
- borderRadius: 8,
73
- fontFamily: "system-700",
71
+ ...LAYOUT,
74
72
  backgroundColor: "primary",
75
73
  textAlign: "center",
76
74
  },
@@ -91,9 +89,7 @@ export const SEED_DATA = [
91
89
  StylesPanelSections.Effects,
92
90
  ],
93
91
  layout: {
94
- borderRadius: 8,
95
- height: 42,
96
- fontFamily: "system-700",
92
+ ...LAYOUT,
97
93
  backgroundColor: "primary",
98
94
  textAlign: "center",
99
95
  },
@@ -0,0 +1,103 @@
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: [
6
+ StylesPanelSections.LayoutFlexItems,
7
+ StylesPanelSections.LayoutSelectedItem,
8
+ StylesPanelSections.LayoutContent,
9
+ StylesPanelSections.Background,
10
+ StylesPanelSections.Size,
11
+ StylesPanelSections.MarginsAndPaddings,
12
+ StylesPanelSections.Position,
13
+ StylesPanelSections.Borders,
14
+ StylesPanelSections.Effects,
15
+ ],
16
+ layout: {},
17
+ };
18
+ export const SEED_DATA = [
19
+ {
20
+ name: "Alert Dialog",
21
+ tag: "AlertDialog",
22
+ 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.",
23
+ ...SHARED_SEED_DATA,
24
+ triggers: [Triggers.OnClose, Triggers.OnOpen],
25
+ props: {
26
+ isOpen: createBoolProp({
27
+ label: "Is Open",
28
+ description: "If true, the modal will open. Useful for controllable state behavior.",
29
+ }),
30
+ defaultIsOpen: createStaticBoolProp({
31
+ label: "Default Is Open",
32
+ description: "If true, the modal will be opened by default.",
33
+ }),
34
+ avoidKeyboard: createStaticBoolProp({
35
+ label: "Avoid Keyboard",
36
+ description: "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
37
+ defaultValue: false,
38
+ }),
39
+ closeOnOverlayClick: createStaticBoolProp({
40
+ label: "Close on Overlay Click",
41
+ description: "If true, the modal will close when the overlay is clicked.",
42
+ defaultValue: true,
43
+ }),
44
+ isKeyboardDismissable: createStaticBoolProp({
45
+ label: "Is Keyboard Dismissable",
46
+ description: "If true, the modal will close when the keyboard is dismissed.",
47
+ defaultValue: true,
48
+ }),
49
+ backdropVisible: createStaticBoolProp({
50
+ label: "Backdrop Visible",
51
+ description: "If true, the backdrop element is visible.",
52
+ defaultValue: true,
53
+ }),
54
+ animationPreset: createTextEnumProp({
55
+ label: "Animation Preset",
56
+ description: "The animation preset to use for the modal.",
57
+ options: ["slide", "fade", "none"],
58
+ defaultValue: "fade",
59
+ }),
60
+ useRNModal: createStaticBoolProp({
61
+ label: "Use RN Modal",
62
+ description: "If true, the modal will use the RN Modal component.",
63
+ }),
64
+ onOpen: createActionProp(),
65
+ onClose: createActionProp(),
66
+ },
67
+ },
68
+ {
69
+ name: "Alert Header",
70
+ tag: "AlertDialog.Header",
71
+ description: "Contains the title announced by screen readers.",
72
+ ...SHARED_SEED_DATA,
73
+ props: {},
74
+ },
75
+ {
76
+ name: "Alert Body",
77
+ tag: "AlertDialog.Body",
78
+ description: "Contains the description announced by screen readers.",
79
+ ...SHARED_SEED_DATA,
80
+ props: {},
81
+ },
82
+ {
83
+ name: "Alert Footer",
84
+ tag: "AlertDialog.Footer",
85
+ description: "Contains the actions of the dialog.",
86
+ ...SHARED_SEED_DATA,
87
+ props: {},
88
+ },
89
+ {
90
+ name: "Alert Content",
91
+ tag: "AlertDialog.Content",
92
+ description: "The wrapper for the alert dialog's content.",
93
+ ...SHARED_SEED_DATA,
94
+ props: {},
95
+ },
96
+ {
97
+ name: "Alert Close Button",
98
+ tag: "AlertDialog.CloseButton",
99
+ description: "The button that closes the dialog",
100
+ ...SHARED_SEED_DATA,
101
+ props: {},
102
+ },
103
+ ];
@@ -0,0 +1,118 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ StylesPanelSections,
4
+ Triggers,
5
+ createBoolProp,
6
+ createStaticBoolProp,
7
+ createTextEnumProp,
8
+ createActionProp,
9
+ } from "@draftbit/types";
10
+
11
+ const SHARED_SEED_DATA = {
12
+ category: COMPONENT_TYPES.NBAlert,
13
+ packageName: "native-base",
14
+ stylesPanelSections: [
15
+ StylesPanelSections.LayoutFlexItems,
16
+ StylesPanelSections.LayoutSelectedItem,
17
+ StylesPanelSections.LayoutContent,
18
+ StylesPanelSections.Background,
19
+ StylesPanelSections.Size,
20
+ StylesPanelSections.MarginsAndPaddings,
21
+ StylesPanelSections.Position,
22
+ StylesPanelSections.Borders,
23
+ StylesPanelSections.Effects,
24
+ ],
25
+ layout: {},
26
+ };
27
+
28
+ export const SEED_DATA = [
29
+ {
30
+ name: "Alert Dialog",
31
+ tag: "AlertDialog",
32
+ description:
33
+ "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.",
34
+ ...SHARED_SEED_DATA,
35
+ triggers: [Triggers.OnClose, Triggers.OnOpen],
36
+ props: {
37
+ isOpen: createBoolProp({
38
+ label: "Is Open",
39
+ description:
40
+ "If true, the modal will open. Useful for controllable state behavior.",
41
+ }),
42
+ defaultIsOpen: createStaticBoolProp({
43
+ label: "Default Is Open",
44
+ description: "If true, the modal will be opened by default.",
45
+ }),
46
+ avoidKeyboard: createStaticBoolProp({
47
+ label: "Avoid Keyboard",
48
+ description:
49
+ "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
50
+ defaultValue: false,
51
+ }),
52
+ closeOnOverlayClick: createStaticBoolProp({
53
+ label: "Close on Overlay Click",
54
+ description:
55
+ "If true, the modal will close when the overlay is clicked.",
56
+ defaultValue: true,
57
+ }),
58
+ isKeyboardDismissable: createStaticBoolProp({
59
+ label: "Is Keyboard Dismissable",
60
+ description:
61
+ "If true, the modal will close when the keyboard is dismissed.",
62
+ defaultValue: true,
63
+ }),
64
+ backdropVisible: createStaticBoolProp({
65
+ label: "Backdrop Visible",
66
+ description: "If true, the backdrop element is visible.",
67
+ defaultValue: true,
68
+ }),
69
+ animationPreset: createTextEnumProp({
70
+ label: "Animation Preset",
71
+ description: "The animation preset to use for the modal.",
72
+ options: ["slide", "fade", "none"],
73
+ defaultValue: "fade",
74
+ }),
75
+ useRNModal: createStaticBoolProp({
76
+ label: "Use RN Modal",
77
+ description: "If true, the modal will use the RN Modal component.",
78
+ }),
79
+ onOpen: createActionProp(),
80
+ onClose: createActionProp(),
81
+ },
82
+ },
83
+ {
84
+ name: "Alert Header",
85
+ tag: "AlertDialog.Header",
86
+ description: "Contains the title announced by screen readers.",
87
+ ...SHARED_SEED_DATA,
88
+ props: {},
89
+ },
90
+ {
91
+ name: "Alert Body",
92
+ tag: "AlertDialog.Body",
93
+ description: "Contains the description announced by screen readers.",
94
+ ...SHARED_SEED_DATA,
95
+ props: {},
96
+ },
97
+ {
98
+ name: "Alert Footer",
99
+ tag: "AlertDialog.Footer",
100
+ description: "Contains the actions of the dialog.",
101
+ ...SHARED_SEED_DATA,
102
+ props: {},
103
+ },
104
+ {
105
+ name: "Alert Content",
106
+ tag: "AlertDialog.Content",
107
+ description: "The wrapper for the alert dialog's content.",
108
+ ...SHARED_SEED_DATA,
109
+ props: {},
110
+ },
111
+ {
112
+ name: "Alert Close Button",
113
+ tag: "AlertDialog.CloseButton",
114
+ description: "The button that closes the dialog",
115
+ ...SHARED_SEED_DATA,
116
+ props: {},
117
+ },
118
+ ];
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /* Temporarily Commented Out
3
+
4
+
5
+ import {
6
+ COMPONENT_TYPES,
7
+ StylesPanelSections,
8
+ createTextEnumProp,
9
+ createBoolProp,
10
+ createIconProp,
11
+ } from "@draftbit/types";
12
+
13
+ const SHARED_SEED_DATA = {
14
+ category: COMPONENT_TYPES.NBForms,
15
+ packageName: "native-base",
16
+ stylesPanelSections: [
17
+ StylesPanelSections.LayoutFlexItems,
18
+ StylesPanelSections.LayoutSelectedItem,
19
+ StylesPanelSections.LayoutContent,
20
+ StylesPanelSections.Background,
21
+ StylesPanelSections.Size,
22
+ StylesPanelSections.MarginsAndPaddings,
23
+ StylesPanelSections.Position,
24
+ StylesPanelSections.Borders,
25
+ StylesPanelSections.Effects,
26
+ ],
27
+ layout: {},
28
+ triggers: {},
29
+ };
30
+
31
+ export const SEED_DATA = [
32
+ {
33
+ name: "Button",
34
+ tag: "Button",
35
+ description:
36
+ "The Button component triggers an event or an action. Examples can be submitting forms and deleting a data point.",
37
+ ...SHARED_SEED_DATA,
38
+ props: {
39
+ isLoading: createBoolProp({
40
+ label: "Loading",
41
+ description: "If true, the button will show a spinner.",
42
+ }),
43
+ isDisabled: createBoolProp({
44
+ label: "Disabled",
45
+ description: "If true, the button will be disabled.",
46
+ }),
47
+ leftIcon: createIconProp({
48
+ label: "Left Icon",
49
+ description: "The icon to display on the left side of the button",
50
+ }),
51
+ rightIcon: createIconProp({
52
+ label: "Right Icon",
53
+ description: "The icon to display on the right side of the button",
54
+ }),
55
+ spinnerPlacement: createTextEnumProp({
56
+ label: "Spinner Placement",
57
+ description: "The placement of the spinner",
58
+ options: ["start", "end"],
59
+ defaultValue: "start",
60
+ }),
61
+ },
62
+ },
63
+ {
64
+ name: "Button Group",
65
+ tag: "ButtonGroup",
66
+ description:
67
+ "Used to group buttons whose actions are related, with an option to flush them together.",
68
+ ...SHARED_SEED_DATA,
69
+ allowChildren: true,
70
+ props: {
71
+ direction: createTextEnumProp({
72
+ label: "Direction",
73
+ description: "The direction of the button group",
74
+ options: ["row", "column"],
75
+ defaultValue: "row",
76
+ }),
77
+ isAttached: createBoolProp({
78
+ label: "Attached",
79
+ description: "If true, the buttons will be attached",
80
+ }),
81
+ },
82
+ },
83
+ ];
84
+ */