@draftbit/core 46.10.1 → 46.10.2-078a87.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 (53) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +2 -17
  2. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  3. package/lib/commonjs/components/Checkbox/context.js +1 -1
  4. package/lib/commonjs/components/CircleImage.js +1 -15
  5. package/lib/commonjs/components/CircularProgress.js +8 -26
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/Picker/PickerComponent.android.js +3 -20
  8. package/lib/commonjs/components/Pressable.js +2 -15
  9. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
  10. package/lib/commonjs/components/RadioButton/context.js +1 -1
  11. package/lib/commonjs/components/Slider.js +4 -21
  12. package/lib/commonjs/components/TabView/TabView.js +7 -13
  13. package/lib/commonjs/constants.js +1 -1
  14. package/lib/commonjs/index.js +0 -21
  15. package/lib/commonjs/mappings/NativeBase/Layout.js +98 -0
  16. package/lib/commonjs/mappings/StarRating.js +2 -6
  17. package/lib/module/components/DeckSwiper/DeckSwiper.js +3 -0
  18. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  19. package/lib/module/index.js +0 -3
  20. package/lib/module/mappings/NativeBase/Layout.js +91 -0
  21. package/lib/typescript/src/index.d.ts +0 -3
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +97 -0
  24. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  25. package/package.json +3 -3
  26. package/src/index.js +0 -3
  27. package/src/index.tsx +0 -3
  28. package/src/mappings/NativeBase/Layout.js +102 -0
  29. package/src/mappings/NativeBase/Layout.ts +117 -0
  30. package/lib/commonjs/components/Row.js +0 -73
  31. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  32. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  33. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  34. package/lib/module/components/Row.js +0 -63
  35. package/lib/module/components/RowBodyIcon.js +0 -35
  36. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  37. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  38. package/lib/typescript/src/components/Row.d.ts +0 -21
  39. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  40. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  41. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  42. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  43. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  44. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  45. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  46. package/src/components/Row.js +0 -48
  47. package/src/components/Row.tsx +0 -108
  48. package/src/components/RowBodyIcon.js +0 -8
  49. package/src/components/RowBodyIcon.tsx +0 -47
  50. package/src/components/RowHeadlineImageCaption.js +0 -12
  51. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  52. package/src/components/RowHeadlineImageIcon.js +0 -14
  53. package/src/components/RowHeadlineImageIcon.tsx +0 -61
@@ -24,6 +24,7 @@ const DeckSwiper = _ref => {
24
24
  console.warn("'children' of DeckSwiper ignored due to usage of 'data' and 'renderItem'");
25
25
  }
26
26
  const childrenArray = React.useMemo(() => React.Children.toArray(children), [children]);
27
+
27
28
  // an array of indices based on children count
28
29
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
29
30
  const cardsData = data || cardsFillerData;
@@ -50,6 +51,7 @@ const DeckSwiper = _ref => {
50
51
  return card === null || card === void 0 ? void 0 : card.toString();
51
52
  }
52
53
  };
54
+
53
55
  /**
54
56
  * By default react-native-deck-swiper positions everything with absolute position.
55
57
  * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
@@ -59,6 +61,7 @@ const DeckSwiper = _ref => {
59
61
  * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
60
62
  * This effectivley makes the default height of the container be the height of the first card.
61
63
  */
64
+
62
65
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
63
66
  style: styles.containerHeightFiller
64
67
  }, renderFirstCard()), /*#__PURE__*/React.createElement(DeckSwiperComponent, {
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet } from "react-native";
3
4
  import { SafeAreaView } from "react-native-safe-area-context";
@@ -10,6 +11,7 @@ import TextField from "../TextField";
10
11
  import Touchable from "../Touchable";
11
12
  import { extractStyles } from "../../utilities";
12
13
  const Picker = _ref => {
14
+ var _options$find$label, _options$find;
13
15
  let {
14
16
  Icon,
15
17
  style,
@@ -23,7 +25,6 @@ const Picker = _ref => {
23
25
  },
24
26
  ...props
25
27
  } = _ref;
26
- var _a, _b;
27
28
  const {
28
29
  viewStyles: {
29
30
  borderRadius,
@@ -64,24 +65,26 @@ const Picker = _ref => {
64
65
  };
65
66
 
66
67
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
67
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
68
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
68
69
  return /*#__PURE__*/React.createElement(View, {
69
70
  style: [styles.container, viewStyles]
70
71
  }, /*#__PURE__*/React.createElement(Touchable, {
71
72
  disabled: disabled,
72
73
  onPress: toggleVisibility
73
- }, /*#__PURE__*/React.createElement(TextField, {
74
- ...props,
74
+ }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
75
75
  value: String(selectedLabel),
76
- placeholder: placeholder,
76
+ placeholder: placeholder
77
77
  // @ts-ignore
78
- ref: textField,
78
+ ,
79
+ ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
80
+ ,
79
81
  disabled: disabled,
80
- pointerEvents: "none",
82
+ pointerEvents: "none"
81
83
  // @ts-expect-error
84
+ ,
82
85
  style: stylesWithoutMargin,
83
86
  Icon: Icon
84
- })), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
87
+ }))), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
85
88
  style: [styles.picker, {
86
89
  backgroundColor: colors.divider
87
90
  }]
@@ -125,32 +128,4 @@ const styles = StyleSheet.create({
125
128
  alignSelf: "flex-end"
126
129
  }
127
130
  });
128
- export default withTheme(Picker);nValueChange
129
- }, options.map(o => /*#__PURE__*/React.createElement(NativePicker.Item, {
130
- label: o.label,
131
- value: o.value,
132
- key: o.value
133
- })))))));
134
- };
135
- const styles = StyleSheet.create({
136
- container: {
137
- alignSelf: "stretch"
138
- },
139
- picker: {
140
- position: "absolute",
141
- bottom: 0,
142
- left: 0,
143
- right: 0,
144
- flexDirection: "row",
145
- justifyContent: "center"
146
- },
147
- pickerContainer: {
148
- backgroundColor: "white",
149
- flexDirection: "column",
150
- width: "100%"
151
- },
152
- closeButton: {
153
- alignSelf: "flex-end"
154
- }
155
- });
156
131
  export default withTheme(Picker);
@@ -43,9 +43,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
43
43
  export { default as Picker } from "./components/Picker/Picker";
44
44
  export { default as ProgressBar } from "./components/ProgressBar";
45
45
  export { default as ProgressCircle } from "./components/ProgressCircle";
46
- export { default as RowBodyIcon } from "./components/RowBodyIcon";
47
- export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
48
- export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
49
46
  export { default as Slider } from "./components/Slider";
50
47
  export { default as Stepper } from "./components/Stepper";
51
48
  export { useAuthState } from "./components/useAuthState";
@@ -0,0 +1,91 @@
1
+ import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createTextProp, GROUPS } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.layout,
4
+ packageName: "native-base",
5
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
6
+ };
7
+ export const SEED_DATA = [{
8
+ name: "Aspect Ratio",
9
+ tag: "AspectRatio",
10
+ description: "Controls the size of the undefined dimension of a node or child component using an aspect ration",
11
+ ...SHARED_SEED_DATA,
12
+ props: {
13
+ ratio: createTextProp({
14
+ label: "Ratio",
15
+ description: "The aspect ratio of the container",
16
+ defaultValue: "4/3",
17
+ group: GROUPS.basic
18
+ })
19
+ }
20
+ }, {
21
+ name: "Box",
22
+ tag: "Box",
23
+ description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
24
+ ...SHARED_SEED_DATA
25
+ }, {
26
+ name: "Center",
27
+ tag: "Center",
28
+ description: "Center aligns its contents to the center within itself",
29
+ ...SHARED_SEED_DATA
30
+ }, {
31
+ name: "Circle",
32
+ tag: "Circle",
33
+ description: "Center aligns its contents to the center within itself with a round border radius",
34
+ ...SHARED_SEED_DATA
35
+ }, {
36
+ name: "Container",
37
+ tag: "Container",
38
+ description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
39
+ ...SHARED_SEED_DATA
40
+ }, {
41
+ name: "Column",
42
+ tag: "Column",
43
+ description: "Column aligns items vertically",
44
+ ...SHARED_SEED_DATA
45
+ }, {
46
+ name: "Row",
47
+ tag: "Row",
48
+ description: "Column aligns items horizontally",
49
+ ...SHARED_SEED_DATA
50
+ }, {
51
+ name: "Spacer",
52
+ tag: "Spacer",
53
+ description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
54
+ ...SHARED_SEED_DATA
55
+ }, {
56
+ name: "Stack",
57
+ tag: "Stack",
58
+ description: "Stack aligns items vertically or horizontally based on the direction prop",
59
+ ...SHARED_SEED_DATA,
60
+ props: {
61
+ direction: createTextEnumProp({
62
+ label: "Direction",
63
+ description: "The direction of the Stack",
64
+ options: ["row", "column"],
65
+ defaultValue: "column"
66
+ }),
67
+ reversed: createBoolProp({
68
+ label: "Reversed",
69
+ description: "Determines whether to reverse the direction of items"
70
+ }),
71
+ isDisabled: createBoolProp({
72
+ label: "Disabled",
73
+ description: "If true, the Stack will be disabled"
74
+ }),
75
+ isInvalid: createBoolProp({
76
+ label: "Invalid",
77
+ description: "If true, the Stack will be invalid"
78
+ })
79
+ }
80
+ }, {
81
+ name: "ZStack",
82
+ tag: "ZStack",
83
+ description: "ZStack aligns items to the z-axis",
84
+ ...SHARED_SEED_DATA,
85
+ props: {
86
+ reversed: createBoolProp({
87
+ label: "Reversed",
88
+ description: "Determines whether to reverse the direction of items"
89
+ })
90
+ }
91
+ }];
@@ -41,9 +41,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
41
41
  export { default as Picker } from "./components/Picker/Picker";
42
42
  export { default as ProgressBar } from "./components/ProgressBar";
43
43
  export { default as ProgressCircle } from "./components/ProgressCircle";
44
- export { default as RowBodyIcon } from "./components/RowBodyIcon";
45
- export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
46
- export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
47
44
  export { default as Slider } from "./components/Slider";
48
45
  export { default as Stepper } from "./components/Stepper";
49
46
  export { useAuthState } from "./components/useAuthState";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA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A2B,CAAC"}
@@ -0,0 +1,97 @@
1
+ export declare const SEED_DATA: ({
2
+ props: {
3
+ ratio: any;
4
+ direction?: undefined;
5
+ reversed?: undefined;
6
+ isDisabled?: undefined;
7
+ isInvalid?: undefined;
8
+ };
9
+ category: string;
10
+ packageName: string;
11
+ stylesPanelSections: string[];
12
+ name: string;
13
+ tag: string;
14
+ description: string;
15
+ } | {
16
+ category: string;
17
+ packageName: string;
18
+ stylesPanelSections: string[];
19
+ name: string;
20
+ tag: string;
21
+ description: string;
22
+ } | {
23
+ props: {
24
+ direction: {
25
+ group: string;
26
+ label: string;
27
+ description: string;
28
+ editable: boolean;
29
+ required: boolean;
30
+ formType: string;
31
+ propType: string;
32
+ defaultValue: null;
33
+ options: never[];
34
+ };
35
+ reversed: {
36
+ label: string;
37
+ description: string;
38
+ formType: string;
39
+ propType: string;
40
+ defaultValue: boolean;
41
+ editable: boolean;
42
+ required: boolean;
43
+ group: string;
44
+ };
45
+ isDisabled: {
46
+ label: string;
47
+ description: string;
48
+ formType: string;
49
+ propType: string;
50
+ defaultValue: boolean;
51
+ editable: boolean;
52
+ required: boolean;
53
+ group: string;
54
+ };
55
+ isInvalid: {
56
+ label: string;
57
+ description: string;
58
+ formType: string;
59
+ propType: string;
60
+ defaultValue: boolean;
61
+ editable: boolean;
62
+ required: boolean;
63
+ group: string;
64
+ };
65
+ ratio?: undefined;
66
+ };
67
+ category: string;
68
+ packageName: string;
69
+ stylesPanelSections: string[];
70
+ name: string;
71
+ tag: string;
72
+ description: string;
73
+ } | {
74
+ props: {
75
+ reversed: {
76
+ label: string;
77
+ description: string;
78
+ formType: string;
79
+ propType: string;
80
+ defaultValue: boolean;
81
+ editable: boolean;
82
+ required: boolean;
83
+ group: string;
84
+ };
85
+ ratio?: undefined;
86
+ direction?: undefined;
87
+ isDisabled?: undefined;
88
+ isInvalid?: undefined;
89
+ };
90
+ category: string;
91
+ packageName: string;
92
+ stylesPanelSections: string[];
93
+ name: string;
94
+ tag: string;
95
+ description: string;
96
+ })[];
97
+ //# sourceMappingURL=Layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqGrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.10.1",
3
+ "version": "46.10.2-078a87.2+078a874",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "46.10.1",
44
+ "@draftbit/types": "^46.10.2-078a87.2+078a874",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -100,5 +100,5 @@
100
100
  ]
101
101
  ]
102
102
  },
103
- "gitHead": "c0490f94c9794128f3d318f17319ee7411797fb4"
103
+ "gitHead": "078a874dab9ed643b296fad0dde629918e0cb8be"
104
104
  }
package/src/index.js CHANGED
@@ -42,9 +42,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
42
42
  export { default as Picker } from "./components/Picker/Picker";
43
43
  export { default as ProgressBar } from "./components/ProgressBar";
44
44
  export { default as ProgressCircle } from "./components/ProgressCircle";
45
- export { default as RowBodyIcon } from "./components/RowBodyIcon";
46
- export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
47
- export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
48
45
  export { default as Slider } from "./components/Slider";
49
46
  export { default as Stepper } from "./components/Stepper";
50
47
  export { useAuthState } from "./components/useAuthState";
package/src/index.tsx CHANGED
@@ -67,9 +67,6 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
67
67
  export { default as Picker } from "./components/Picker/Picker";
68
68
  export { default as ProgressBar } from "./components/ProgressBar";
69
69
  export { default as ProgressCircle } from "./components/ProgressCircle";
70
- export { default as RowBodyIcon } from "./components/RowBodyIcon";
71
- export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
72
- export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
73
70
  export { default as Slider } from "./components/Slider";
74
71
  export { default as Stepper } from "./components/Stepper";
75
72
  export { useAuthState } from "./components/useAuthState";
@@ -0,0 +1,102 @@
1
+ import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createTextProp, GROUPS, } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.layout,
4
+ packageName: "native-base",
5
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ };
7
+ export const SEED_DATA = [
8
+ {
9
+ name: "Aspect Ratio",
10
+ tag: "AspectRatio",
11
+ description: "Controls the size of the undefined dimension of a node or child component using an aspect ration",
12
+ ...SHARED_SEED_DATA,
13
+ props: {
14
+ ratio: createTextProp({
15
+ label: "Ratio",
16
+ description: "The aspect ratio of the container",
17
+ defaultValue: "4/3",
18
+ group: GROUPS.basic,
19
+ }),
20
+ },
21
+ },
22
+ {
23
+ name: "Box",
24
+ tag: "Box",
25
+ description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
26
+ ...SHARED_SEED_DATA,
27
+ },
28
+ {
29
+ name: "Center",
30
+ tag: "Center",
31
+ description: "Center aligns its contents to the center within itself",
32
+ ...SHARED_SEED_DATA,
33
+ },
34
+ {
35
+ name: "Circle",
36
+ tag: "Circle",
37
+ description: "Center aligns its contents to the center within itself with a round border radius",
38
+ ...SHARED_SEED_DATA,
39
+ },
40
+ {
41
+ name: "Container",
42
+ tag: "Container",
43
+ description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
44
+ ...SHARED_SEED_DATA,
45
+ },
46
+ {
47
+ name: "Column",
48
+ tag: "Column",
49
+ description: "Column aligns items vertically",
50
+ ...SHARED_SEED_DATA,
51
+ },
52
+ {
53
+ name: "Row",
54
+ tag: "Row",
55
+ description: "Column aligns items horizontally",
56
+ ...SHARED_SEED_DATA,
57
+ },
58
+ {
59
+ name: "Spacer",
60
+ tag: "Spacer",
61
+ description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
62
+ ...SHARED_SEED_DATA,
63
+ },
64
+ {
65
+ name: "Stack",
66
+ tag: "Stack",
67
+ description: "Stack aligns items vertically or horizontally based on the direction prop",
68
+ ...SHARED_SEED_DATA,
69
+ props: {
70
+ direction: createTextEnumProp({
71
+ label: "Direction",
72
+ description: "The direction of the Stack",
73
+ options: ["row", "column"],
74
+ defaultValue: "column",
75
+ }),
76
+ reversed: createBoolProp({
77
+ label: "Reversed",
78
+ description: "Determines whether to reverse the direction of items",
79
+ }),
80
+ isDisabled: createBoolProp({
81
+ label: "Disabled",
82
+ description: "If true, the Stack will be disabled",
83
+ }),
84
+ isInvalid: createBoolProp({
85
+ label: "Invalid",
86
+ description: "If true, the Stack will be invalid",
87
+ }),
88
+ },
89
+ },
90
+ {
91
+ name: "ZStack",
92
+ tag: "ZStack",
93
+ description: "ZStack aligns items to the z-axis",
94
+ ...SHARED_SEED_DATA,
95
+ props: {
96
+ reversed: createBoolProp({
97
+ label: "Reversed",
98
+ description: "Determines whether to reverse the direction of items",
99
+ }),
100
+ },
101
+ },
102
+ ];
@@ -0,0 +1,117 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createTextEnumProp,
4
+ createBoolProp,
5
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ createTextProp,
7
+ GROUPS,
8
+ } from "@draftbit/types";
9
+
10
+ const SHARED_SEED_DATA = {
11
+ category: COMPONENT_TYPES.layout,
12
+ packageName: "native-base",
13
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ };
15
+
16
+ export const SEED_DATA = [
17
+ {
18
+ name: "Aspect Ratio",
19
+ tag: "AspectRatio",
20
+ description:
21
+ "Controls the size of the undefined dimension of a node or child component using an aspect ration",
22
+ ...SHARED_SEED_DATA,
23
+ props: {
24
+ ratio: createTextProp({
25
+ label: "Ratio",
26
+ description: "The aspect ratio of the container",
27
+ defaultValue: "4/3",
28
+ group: GROUPS.basic,
29
+ }),
30
+ },
31
+ },
32
+ {
33
+ name: "Box",
34
+ tag: "Box",
35
+ description:
36
+ "This is a generic component for low level layout needs. It is similar to a div in HTML",
37
+ ...SHARED_SEED_DATA,
38
+ },
39
+ {
40
+ name: "Center",
41
+ tag: "Center",
42
+ description: "Center aligns its contents to the center within itself",
43
+ ...SHARED_SEED_DATA,
44
+ },
45
+ {
46
+ name: "Circle",
47
+ tag: "Circle",
48
+ description:
49
+ "Center aligns its contents to the center within itself with a round border radius",
50
+ ...SHARED_SEED_DATA,
51
+ },
52
+ {
53
+ name: "Container",
54
+ tag: "Container",
55
+ description:
56
+ "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
57
+ ...SHARED_SEED_DATA,
58
+ },
59
+ {
60
+ name: "Column",
61
+ tag: "Column",
62
+ description: "Column aligns items vertically",
63
+ ...SHARED_SEED_DATA,
64
+ },
65
+ {
66
+ name: "Row",
67
+ tag: "Row",
68
+ description: "Column aligns items horizontally",
69
+ ...SHARED_SEED_DATA,
70
+ },
71
+ {
72
+ name: "Spacer",
73
+ tag: "Spacer",
74
+ description:
75
+ "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
76
+ ...SHARED_SEED_DATA,
77
+ },
78
+ {
79
+ name: "Stack",
80
+ tag: "Stack",
81
+ description:
82
+ "Stack aligns items vertically or horizontally based on the direction prop",
83
+ ...SHARED_SEED_DATA,
84
+ props: {
85
+ direction: createTextEnumProp({
86
+ label: "Direction",
87
+ description: "The direction of the Stack",
88
+ options: ["row", "column"],
89
+ defaultValue: "column",
90
+ }),
91
+ reversed: createBoolProp({
92
+ label: "Reversed",
93
+ description: "Determines whether to reverse the direction of items",
94
+ }),
95
+ isDisabled: createBoolProp({
96
+ label: "Disabled",
97
+ description: "If true, the Stack will be disabled",
98
+ }),
99
+ isInvalid: createBoolProp({
100
+ label: "Invalid",
101
+ description: "If true, the Stack will be invalid",
102
+ }),
103
+ },
104
+ },
105
+ {
106
+ name: "ZStack",
107
+ tag: "ZStack",
108
+ description: "ZStack aligns items to the z-axis",
109
+ ...SHARED_SEED_DATA,
110
+ props: {
111
+ reversed: createBoolProp({
112
+ label: "Reversed",
113
+ description: "Determines whether to reverse the direction of items",
114
+ }),
115
+ },
116
+ },
117
+ ];
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const Row = _ref => {
15
- let {
16
- titleTypeStyle,
17
- titleColor,
18
- subtitleTypeStyle,
19
- subtitleColor,
20
- title,
21
- subtitle,
22
- multilineSubtitle,
23
- image,
24
- right,
25
- style
26
- } = _ref;
27
- return /*#__PURE__*/React.createElement(_reactNative.View, {
28
- style: [styles.container, {
29
- padding: 16
30
- }, style]
31
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
32
- style: styles.leftContainer
33
- }, image && /*#__PURE__*/React.createElement(_reactNative.Image, {
34
- source: typeof image === "string" ? {
35
- uri: image
36
- } : image,
37
- style: {
38
- marginRight: 12,
39
- width: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize,
40
- height: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize
41
- }
42
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
43
- style: styles.textContainer
44
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
45
- style: [titleTypeStyle, {
46
- color: titleColor
47
- }],
48
- numberOfLines: 1
49
- }, title), subtitle ? /*#__PURE__*/React.createElement(_reactNative.Text, {
50
- style: [subtitleTypeStyle, {
51
- color: subtitleColor,
52
- marginTop: 4
53
- }],
54
- numberOfLines: multilineSubtitle ? undefined : 1
55
- }, subtitle) : null)), right && right());
56
- };
57
- const styles = _reactNative.StyleSheet.create({
58
- leftContainer: {
59
- flexDirection: "row",
60
- flex: 1
61
- },
62
- container: {
63
- flexDirection: "row",
64
- justifyContent: "space-between",
65
- alignItems: "center"
66
- },
67
- textContainer: {
68
- flex: 1,
69
- justifyContent: "center"
70
- }
71
- });
72
- var _default = (0, _theming.withTheme)(Row);
73
- exports.default = _default;