@draftbit/core 47.0.1-df014a.2 → 47.0.1-e04fa3.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 (95) hide show
  1. package/lib/commonjs/index.js +25 -82
  2. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +102 -0
  3. package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
  4. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +61 -0
  5. package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
  6. package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
  7. package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
  8. package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
  9. package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
  10. package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
  11. package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
  12. package/lib/commonjs/mappings/NativeBase/Select.js +65 -0
  13. package/lib/commonjs/mappings/NativeBase/Slider.js +81 -0
  14. package/lib/module/components/AvatarEdit.js +4 -15
  15. package/lib/module/components/CardBlock.js +4 -14
  16. package/lib/module/components/CircleImage.js +1 -16
  17. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  18. package/lib/module/components/FAB.js +4 -22
  19. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  20. package/lib/module/components/Picker/PickerComponent.web.js +3 -21
  21. package/lib/module/components/Switch.js +10 -21
  22. package/lib/module/components/TextField.js +28 -78
  23. package/lib/module/components/Touchable.js +1 -18
  24. package/lib/module/index.js +121 -31
  25. package/lib/module/mappings/NativeBase/AlertDialog.js +95 -0
  26. package/lib/module/mappings/NativeBase/Button.js +86 -0
  27. package/lib/module/mappings/NativeBase/DataDisplay.js +54 -0
  28. package/lib/module/mappings/NativeBase/Feedback.js +67 -0
  29. package/lib/module/mappings/NativeBase/Layout.js +107 -0
  30. package/lib/module/mappings/NativeBase/Media.js +42 -0
  31. package/lib/module/mappings/NativeBase/Menu.js +104 -0
  32. package/lib/module/mappings/NativeBase/Modal.js +86 -0
  33. package/lib/module/mappings/NativeBase/Other.js +87 -0
  34. package/lib/module/mappings/NativeBase/Popover.js +92 -0
  35. package/lib/module/mappings/NativeBase/Select.js +58 -0
  36. package/lib/module/mappings/NativeBase/Slider.js +74 -0
  37. package/lib/typescript/src/index.d.ts +102 -29
  38. package/lib/typescript/src/index.d.ts.map +1 -1
  39. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +146 -0
  40. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
  41. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
  42. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
  43. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +96 -0
  44. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
  45. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
  46. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
  47. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
  48. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  49. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
  50. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
  51. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
  52. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
  53. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
  54. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
  55. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
  56. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
  57. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
  58. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
  59. package/lib/typescript/src/mappings/NativeBase/Select.d.ts +156 -0
  60. package/lib/typescript/src/mappings/NativeBase/Select.d.ts.map +1 -0
  61. package/lib/typescript/src/mappings/NativeBase/Slider.d.ts +200 -0
  62. package/lib/typescript/src/mappings/NativeBase/Slider.d.ts.map +1 -0
  63. package/package.json +3 -3
  64. package/src/index.js +112 -31
  65. package/src/index.tsx +123 -43
  66. package/src/mappings/NativeBase/AlertDialog.js +112 -0
  67. package/src/mappings/NativeBase/AlertDialog.ts +128 -0
  68. package/src/mappings/NativeBase/Button.js +84 -0
  69. package/src/mappings/NativeBase/Button.ts +83 -0
  70. package/src/mappings/NativeBase/DataDisplay.js +67 -0
  71. package/src/mappings/NativeBase/DataDisplay.ts +79 -0
  72. package/src/mappings/NativeBase/Feedback.js +89 -0
  73. package/src/mappings/NativeBase/Feedback.ts +100 -0
  74. package/src/mappings/NativeBase/Layout.js +140 -0
  75. package/src/mappings/NativeBase/Layout.ts +152 -0
  76. package/src/mappings/NativeBase/Media.js +56 -0
  77. package/src/mappings/NativeBase/Media.ts +65 -0
  78. package/src/mappings/NativeBase/Menu.js +134 -0
  79. package/src/mappings/NativeBase/Menu.ts +150 -0
  80. package/src/mappings/NativeBase/Modal.js +103 -0
  81. package/src/mappings/NativeBase/Modal.ts +118 -0
  82. package/src/mappings/NativeBase/Other.js +123 -0
  83. package/src/mappings/NativeBase/Other.ts +139 -0
  84. package/src/mappings/NativeBase/Popover.js +123 -0
  85. package/src/mappings/NativeBase/Popover.ts +136 -0
  86. package/src/mappings/NativeBase/Select.js +71 -0
  87. package/src/mappings/NativeBase/Select.ts +85 -0
  88. package/src/mappings/NativeBase/Slider.js +89 -0
  89. package/src/mappings/NativeBase/Slider.ts +105 -0
  90. package/lib/commonjs/mappings/DatePickerModal.js +0 -74
  91. package/lib/module/mappings/DatePickerModal.js +0 -65
  92. package/lib/typescript/src/mappings/DatePickerModal.d.ts +0 -153
  93. package/lib/typescript/src/mappings/DatePickerModal.d.ts.map +0 -1
  94. package/src/mappings/DatePickerModal.js +0 -73
  95. package/src/mappings/DatePickerModal.ts +0 -91
package/src/index.js CHANGED
@@ -2,51 +2,132 @@ 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
+ /** Replaced By NativeBase
6
+ * export { default as Avatar } from "./components/CircleImage";
7
+ * export { default as Container } from "./components/Container";
8
+ * export { default as FAB } from "./components/FAB";
9
+ * export {
10
+ Center,
11
+ Circle,
12
+ Square,
13
+ Row,
14
+ Stack,
15
+ Spacer,
16
+ } from "./components/Layout";
17
+ */
18
+ // BASIC
19
+ export { default as ScreenContainer } from "./components/ScreenContainer";
6
20
  export { default as Banner } from "./components/Banner";
21
+ // BUTTONS
7
22
  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";
23
+ export { Link } from "./components/Text";
18
24
  export { default as IconButton } from "./components/IconButton";
19
- export { default as Image } from "./components/Image";
20
- export { default as SVG } from "./components/SVG";
25
+ export { default as Touchable } from "./components/Touchable";
26
+ export { default as ToggleButton } from "./components/ToggleButton";
27
+ // INPUTS
28
+ export { default as DatePicker } from "./components/DatePicker/DatePicker";
21
29
  export { default as NumberInput } from "./components/NumberInput";
22
- export { default as ScreenContainer } from "./components/ScreenContainer";
30
+ export { default as TextField } from "./components/TextField";
31
+ export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
32
+ export { default as Picker } from "./components/Picker/Picker";
33
+ // CONTROLS
34
+ export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
35
+ export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
36
+ export { default as Slider } from "./components/Slider";
37
+ export { default as Stepper } from "./components/Stepper";
23
38
  export { default as StarRating } from "./components/StarRating";
24
- export { default as Surface } from "./components/Surface";
25
39
  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";
40
+ // MEDIA
41
+ export { default as SVG } from "./components/SVG";
42
+ export { default as Image } from "./components/Image";
43
+ // export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
44
+ export { default as AvatarEdit } from "./components/AvatarEdit";
45
+ export { default as CircleImage } from "./components/CircleImage";
46
+ // SWIPER
47
+ export { Swiper, SwiperItem } from "./components/Swiper";
48
+ // CONTAINERS
29
49
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
50
+ export { default as Surface } from "./components/Surface";
51
+ // ACTIONSHEET
30
52
  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
- /* Deprecated: Fix or Delete! */
35
- export { default as CardBlock } from "./components/CardBlock";
36
- export { default as CardContainer } from "./components/CardContainer";
37
- export { default as CardContainerRating } from "./components/CardContainerRating";
38
- export { default as CardInline } from "./components/CardInline";
39
- export { default as DatePicker } from "./components/DatePicker/DatePicker";
53
+ // OTHER
54
+ export { default as Carousel } from "./components/Carousel";
55
+ export { default as Divider } from "./components/Divider";
40
56
  export { default as HeaderLarge } from "./components/HeaderLarge";
41
57
  export { default as HeaderMedium } from "./components/HeaderMedium";
42
58
  export { default as HeaderOverline } from "./components/HeaderOverline";
43
- export { default as Picker } from "./components/Picker/Picker";
44
59
  export { default as ProgressBar } from "./components/ProgressBar";
45
60
  export { default as ProgressCircle } from "./components/ProgressCircle";
46
61
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
47
62
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
48
63
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
49
- export { default as Slider } from "./components/Slider";
50
- export { default as Stepper } from "./components/Stepper";
64
+ export { default as Card } from "./components/Card";
65
+ export { default as CardBlock } from "./components/CardBlock";
66
+ export { default as CardContainer } from "./components/CardContainer";
67
+ export { default as CardContainerRating } from "./components/CardContainerRating";
68
+ export { default as CardInline } from "./components/CardInline";
51
69
  export { useAuthState } from "./components/useAuthState";
52
- // a comment to fix sourcemap comment issue
70
+ /**
71
+ * NativeBase Components Jan 2023
72
+ *
73
+ * ALERT
74
+ * - AlertDialog
75
+ * - AlertDialog.Header
76
+ * - AlertDialog.Body
77
+ * - AlertDialog.Footer
78
+ * - AlertDialog.Content
79
+ * - AlertDialog.CloseButton
80
+ *
81
+ * FORMS
82
+ * - Button -- COMMENTED OUT
83
+ * - Button.Group -- COMMENTED OUT
84
+ * - Fab
85
+ *
86
+ * DATA DISPLAY
87
+ * - Badge
88
+ * - Divider
89
+ *
90
+ * FEEDBACK
91
+ * - Alert
92
+ * - Alert.Icon
93
+ * - Progress
94
+ *
95
+ * LAYOUT
96
+ * - AspectRatio
97
+ * - Box
98
+ * - Center
99
+ * - Square
100
+ * - Circle
101
+ * - Column
102
+ * - Container
103
+ * - Flex
104
+ * - Spacer
105
+ * - Row
106
+ * - Stack
107
+ * - ZStack
108
+ *
109
+ * MEDIA
110
+ * - Avatar
111
+ * - Avatar.Badge
112
+ * - Avatar.Group
113
+ *
114
+ * MENU
115
+ * - Menu
116
+ * - Menu.Item
117
+ * - Menu.Group
118
+ * - Menu.OptionGroup
119
+ * - Menu.ItemOption
120
+ * - Menu.Trigger
121
+ *
122
+ * MODAL
123
+ * - Modal
124
+ * - Modal.Content
125
+ * - Modal.Header
126
+ * - Modal.Footer
127
+ * - Modal.Body
128
+ * - Modal.CloseButton
129
+ *
130
+ * OTHER
131
+ * - Tooltip
132
+ *
133
+ * */
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
+ * */
@@ -0,0 +1,112 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, Triggers, createBoolProp, createStaticBoolProp, createTextEnumProp, createActionProp, createStaticNumberProp, } 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],
25
+ props: {
26
+ /* https://github.com/GeekyAnts/NativeBase/blob/master/src/components/composites/AlertDialog/types.tsx */
27
+ isOpen: createBoolProp({
28
+ label: "Is Open",
29
+ description: "If true, the modal will open. Useful for controllable state behavior.",
30
+ }),
31
+ defaultIsOpen: createStaticBoolProp({
32
+ label: "Default Is Open",
33
+ description: "If true, the modal will be opened by default.",
34
+ }),
35
+ size: createStaticNumberProp({
36
+ label: "Size",
37
+ description: "The size of the AlertDialog",
38
+ }),
39
+ avoidKeyboard: createStaticBoolProp({
40
+ label: "Avoid Keyboard",
41
+ description: "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
42
+ defaultValue: false,
43
+ }),
44
+ closeOnOverlayClick: createStaticBoolProp({
45
+ label: "Close on Overlay Click",
46
+ description: "If true, the modal will close when the overlay is clicked.",
47
+ defaultValue: true,
48
+ }),
49
+ isKeyboardDismissable: createStaticBoolProp({
50
+ label: "Is Keyboard Dismissable",
51
+ description: "If true, the modal will close when the keyboard is dismissed.",
52
+ defaultValue: true,
53
+ }),
54
+ overlayVisible: createStaticBoolProp({
55
+ label: "Overlay Visible",
56
+ description: "If true, the overlay element is visible.",
57
+ defaultValue: true,
58
+ }),
59
+ backdropVisible: createStaticBoolProp({
60
+ label: "Backdrop Visible",
61
+ description: "If true, the backdrop element is visible.",
62
+ defaultValue: true,
63
+ }),
64
+ animationPreset: createTextEnumProp({
65
+ label: "Animation Preset",
66
+ description: "The animation preset to use for the modal.",
67
+ options: ["slide", "fade", "none"],
68
+ defaultValue: "fade",
69
+ }),
70
+ useRNModal: createStaticBoolProp({
71
+ label: "Use RN Modal",
72
+ description: "If true, the modal will use the RN Modal component.",
73
+ }),
74
+ onClose: createActionProp(),
75
+ },
76
+ },
77
+ {
78
+ name: "Alert Header",
79
+ tag: "AlertDialog.Header",
80
+ description: "Contains the title announced by screen readers.",
81
+ ...SHARED_SEED_DATA,
82
+ props: {},
83
+ },
84
+ {
85
+ name: "Alert Body",
86
+ tag: "AlertDialog.Body",
87
+ description: "Contains the description announced by screen readers.",
88
+ ...SHARED_SEED_DATA,
89
+ props: {},
90
+ },
91
+ {
92
+ name: "Alert Footer",
93
+ tag: "AlertDialog.Footer",
94
+ description: "Contains the actions of the dialog.",
95
+ ...SHARED_SEED_DATA,
96
+ props: {},
97
+ },
98
+ {
99
+ name: "Alert Content",
100
+ tag: "AlertDialog.Content",
101
+ description: "The wrapper for the alert dialog's content.",
102
+ ...SHARED_SEED_DATA,
103
+ props: {},
104
+ },
105
+ {
106
+ name: "Alert Close Button",
107
+ tag: "AlertDialog.CloseButton",
108
+ description: "The button that closes the dialog",
109
+ ...SHARED_SEED_DATA,
110
+ props: {},
111
+ },
112
+ ];
@@ -0,0 +1,128 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ StylesPanelSections,
4
+ Triggers,
5
+ createBoolProp,
6
+ createStaticBoolProp,
7
+ createTextEnumProp,
8
+ createActionProp,
9
+ createStaticNumberProp,
10
+ } from "@draftbit/types";
11
+
12
+ const SHARED_SEED_DATA = {
13
+ category: COMPONENT_TYPES.NBAlert,
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
+ };
28
+
29
+ export const SEED_DATA = [
30
+ {
31
+ name: "Alert Dialog",
32
+ tag: "AlertDialog",
33
+ description:
34
+ "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.",
35
+ ...SHARED_SEED_DATA,
36
+ triggers: [Triggers.OnClose],
37
+ props: {
38
+ /* https://github.com/GeekyAnts/NativeBase/blob/master/src/components/composites/AlertDialog/types.tsx */
39
+ isOpen: createBoolProp({
40
+ label: "Is Open",
41
+ description:
42
+ "If true, the modal will open. Useful for controllable state behavior.",
43
+ }),
44
+ defaultIsOpen: createStaticBoolProp({
45
+ label: "Default Is Open",
46
+ description: "If true, the modal will be opened by default.",
47
+ }),
48
+ size: createStaticNumberProp({
49
+ label: "Size",
50
+ description: "The size of the AlertDialog",
51
+ }),
52
+ avoidKeyboard: createStaticBoolProp({
53
+ label: "Avoid Keyboard",
54
+ description:
55
+ "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
56
+ defaultValue: false,
57
+ }),
58
+ closeOnOverlayClick: createStaticBoolProp({
59
+ label: "Close on Overlay Click",
60
+ description:
61
+ "If true, the modal will close when the overlay is clicked.",
62
+ defaultValue: true,
63
+ }),
64
+ isKeyboardDismissable: createStaticBoolProp({
65
+ label: "Is Keyboard Dismissable",
66
+ description:
67
+ "If true, the modal will close when the keyboard is dismissed.",
68
+ defaultValue: true,
69
+ }),
70
+ overlayVisible: createStaticBoolProp({
71
+ label: "Overlay Visible",
72
+ description: "If true, the overlay element is visible.",
73
+ defaultValue: true,
74
+ }),
75
+ backdropVisible: createStaticBoolProp({
76
+ label: "Backdrop Visible",
77
+ description: "If true, the backdrop element is visible.",
78
+ defaultValue: true,
79
+ }),
80
+ animationPreset: createTextEnumProp({
81
+ label: "Animation Preset",
82
+ description: "The animation preset to use for the modal.",
83
+ options: ["slide", "fade", "none"],
84
+ defaultValue: "fade",
85
+ }),
86
+ useRNModal: createStaticBoolProp({
87
+ label: "Use RN Modal",
88
+ description: "If true, the modal will use the RN Modal component.",
89
+ }),
90
+ onClose: createActionProp(),
91
+ },
92
+ },
93
+ {
94
+ name: "Alert Header",
95
+ tag: "AlertDialog.Header",
96
+ description: "Contains the title announced by screen readers.",
97
+ ...SHARED_SEED_DATA,
98
+ props: {},
99
+ },
100
+ {
101
+ name: "Alert Body",
102
+ tag: "AlertDialog.Body",
103
+ description: "Contains the description announced by screen readers.",
104
+ ...SHARED_SEED_DATA,
105
+ props: {},
106
+ },
107
+ {
108
+ name: "Alert Footer",
109
+ tag: "AlertDialog.Footer",
110
+ description: "Contains the actions of the dialog.",
111
+ ...SHARED_SEED_DATA,
112
+ props: {},
113
+ },
114
+ {
115
+ name: "Alert Content",
116
+ tag: "AlertDialog.Content",
117
+ description: "The wrapper for the alert dialog's content.",
118
+ ...SHARED_SEED_DATA,
119
+ props: {},
120
+ },
121
+ {
122
+ name: "Alert Close Button",
123
+ tag: "AlertDialog.CloseButton",
124
+ description: "The button that closes the dialog",
125
+ ...SHARED_SEED_DATA,
126
+ props: {},
127
+ },
128
+ ];
@@ -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
+ */