@draftbit/core 46.10.3-6f5759.2 → 46.10.3-7476ab.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 (184) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -1
  2. package/lib/commonjs/components/AspectRatio.js +17 -1
  3. package/lib/commonjs/components/BottomSheet/BottomSheet.js +22 -4
  4. package/lib/commonjs/components/Button.js +33 -10
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
  6. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  7. package/lib/commonjs/components/Checkbox/context.js +1 -1
  8. package/lib/commonjs/components/CircleImage.js +15 -1
  9. package/lib/commonjs/components/CircularProgress.js +26 -8
  10. package/lib/commonjs/components/DatePicker/DatePicker.js +26 -13
  11. package/lib/commonjs/components/Divider.js +14 -1
  12. package/lib/commonjs/components/Elevation.js +14 -2
  13. package/lib/commonjs/components/Image.js +17 -2
  14. package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -3
  15. package/lib/commonjs/components/Portal/PortalHost.js +44 -15
  16. package/lib/commonjs/components/RadioButton/RadioButton.js +13 -2
  17. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
  18. package/lib/commonjs/components/RadioButton/context.js +1 -1
  19. package/lib/commonjs/components/Shadow.js +15 -2
  20. package/lib/commonjs/components/StarRating.js +23 -4
  21. package/lib/commonjs/components/Switch.js +19 -10
  22. package/lib/commonjs/components/Table/Table.js +123 -0
  23. package/lib/commonjs/components/Table/TableCell.js +49 -0
  24. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  25. package/lib/commonjs/components/Table/TableRow.js +61 -0
  26. package/lib/commonjs/components/Table/index.js +27 -0
  27. package/lib/commonjs/constants.js +1 -1
  28. package/lib/commonjs/index.js +19 -7
  29. package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
  30. package/lib/commonjs/mappings/NativeBase/Layout.js +13 -12
  31. package/lib/commonjs/mappings/StarRating.js +6 -2
  32. package/lib/commonjs/mappings/Table.js +140 -0
  33. package/lib/module/components/AspectRatio.js +18 -1
  34. package/lib/module/components/BottomSheet/BottomSheet.js +24 -4
  35. package/lib/module/components/Button.js +33 -10
  36. package/lib/module/components/Checkbox/Checkbox.js +3 -4
  37. package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
  38. package/lib/module/components/Checkbox/context.js +1 -1
  39. package/lib/module/components/DatePicker/DatePicker.js +27 -13
  40. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -4
  41. package/lib/module/components/DeprecatedButton.js +21 -3
  42. package/lib/module/components/Divider.js +18 -1
  43. package/lib/module/components/FormRow.js +17 -2
  44. package/lib/module/components/NumberInput.js +11 -3
  45. package/lib/module/components/Picker/PickerComponent.android.js +21 -3
  46. package/lib/module/components/Portal/PortalHost.js +45 -15
  47. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +10 -1
  48. package/lib/module/components/Shadow.js +15 -2
  49. package/lib/module/components/StarRating.js +24 -4
  50. package/lib/module/components/StepIndicator.js +58 -18
  51. package/lib/module/components/TabView/TabView.js +17 -7
  52. package/lib/module/components/Table/Table.js +115 -0
  53. package/lib/module/components/Table/TableCell.js +41 -0
  54. package/lib/module/components/Table/TableCommon.js +21 -0
  55. package/lib/module/components/Table/TableRow.js +52 -0
  56. package/lib/module/components/Table/index.js +3 -0
  57. package/lib/module/constants.js +1 -0
  58. package/lib/module/index.js +1 -1
  59. package/lib/module/mappings/FieldSearchBarFull.js +4 -1
  60. package/lib/module/mappings/NativeBase/Layout.js +14 -13
  61. package/lib/module/mappings/StarRating.js +7 -2
  62. package/lib/module/mappings/Table.js +133 -0
  63. package/lib/module/utilities.js +1 -2
  64. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  65. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  66. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  67. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  68. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  69. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  70. package/lib/typescript/src/components/{DeprecatedCardWrapper.d.ts → Table/TableRow.d.ts} +7 -8
  71. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  72. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  73. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  74. package/lib/typescript/src/index.d.ts +1 -1
  75. package/lib/typescript/src/index.d.ts.map +1 -1
  76. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +36 -20
  77. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
  78. package/lib/typescript/src/mappings/{CardBlock.d.ts → Table.d.ts} +129 -81
  79. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  80. package/package.json +3 -3
  81. package/src/components/Table/Table.js +93 -0
  82. package/src/components/Table/Table.tsx +176 -0
  83. package/src/components/Table/TableCell.js +31 -0
  84. package/src/components/Table/TableCell.tsx +63 -0
  85. package/src/components/Table/TableCommon.js +12 -0
  86. package/src/components/Table/TableCommon.ts +40 -0
  87. package/src/components/Table/TableRow.js +37 -0
  88. package/src/components/Table/TableRow.tsx +77 -0
  89. package/src/components/Table/index.js +3 -0
  90. package/src/components/Table/index.tsx +3 -0
  91. package/src/index.js +1 -1
  92. package/src/index.tsx +2 -1
  93. package/src/mappings/NativeBase/Layout.js +24 -12
  94. package/src/mappings/NativeBase/Layout.ts +24 -12
  95. package/src/mappings/Table.js +150 -0
  96. package/src/mappings/Table.ts +170 -0
  97. package/lib/commonjs/components/Container.js +0 -93
  98. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
  99. package/lib/commonjs/components/DeprecatedFAB.js +0 -157
  100. package/lib/commonjs/components/ProgressIndicator.js +0 -55
  101. package/lib/commonjs/components/ResizeMode.js +0 -5
  102. package/lib/commonjs/mappings/CardBlock.js +0 -126
  103. package/lib/commonjs/mappings/CardContainer.js +0 -108
  104. package/lib/commonjs/mappings/CardContainerRating.js +0 -130
  105. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
  106. package/lib/commonjs/mappings/CardInline.js +0 -59
  107. package/lib/commonjs/mappings/Container.js +0 -37
  108. package/lib/commonjs/mappings/HeaderLarge.js +0 -34
  109. package/lib/commonjs/mappings/HeaderMedium.js +0 -60
  110. package/lib/commonjs/mappings/HeaderOverline.js +0 -60
  111. package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
  112. package/lib/module/components/Container.js +0 -83
  113. package/lib/module/components/DeprecatedCardWrapper.js +0 -32
  114. package/lib/module/components/DeprecatedFAB.js +0 -147
  115. package/lib/module/components/ProgressIndicator.js +0 -45
  116. package/lib/module/components/ResizeMode.js +0 -1
  117. package/lib/module/mappings/CardBlock.js +0 -119
  118. package/lib/module/mappings/CardContainer.js +0 -101
  119. package/lib/module/mappings/CardContainerRating.js +0 -123
  120. package/lib/module/mappings/CardContainerShortImage.js +0 -117
  121. package/lib/module/mappings/CardInline.js +0 -52
  122. package/lib/module/mappings/Container.js +0 -30
  123. package/lib/module/mappings/HeaderLarge.js +0 -27
  124. package/lib/module/mappings/HeaderMedium.js +0 -53
  125. package/lib/module/mappings/HeaderOverline.js +0 -53
  126. package/lib/module/mappings/ProgressIndicator.js +0 -181
  127. package/lib/typescript/src/components/Container.d.ts +0 -21
  128. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  129. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  130. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  131. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  132. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  133. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  134. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  135. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  136. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  137. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  138. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  139. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  140. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  141. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  142. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  143. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  144. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  145. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  146. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  147. package/lib/typescript/src/mappings/HeaderLarge.d.ts +0 -34
  148. package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +0 -1
  149. package/lib/typescript/src/mappings/HeaderMedium.d.ts +0 -53
  150. package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +0 -1
  151. package/lib/typescript/src/mappings/HeaderOverline.d.ts +0 -53
  152. package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +0 -1
  153. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  154. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  155. package/src/components/Container.js +0 -43
  156. package/src/components/Container.tsx +0 -116
  157. package/src/components/DeprecatedCardWrapper.js +0 -18
  158. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  159. package/src/components/DeprecatedFAB.js +0 -114
  160. package/src/components/DeprecatedFAB.tsx +0 -231
  161. package/src/components/ProgressIndicator.js +0 -27
  162. package/src/components/ProgressIndicator.tsx +0 -71
  163. package/src/components/ResizeMode.js +0 -1
  164. package/src/components/ResizeMode.ts +0 -7
  165. package/src/mappings/CardBlock.js +0 -123
  166. package/src/mappings/CardBlock.ts +0 -136
  167. package/src/mappings/CardContainer.js +0 -104
  168. package/src/mappings/CardContainer.ts +0 -116
  169. package/src/mappings/CardContainerRating.js +0 -126
  170. package/src/mappings/CardContainerRating.ts +0 -137
  171. package/src/mappings/CardContainerShortImage.js +0 -120
  172. package/src/mappings/CardContainerShortImage.ts +0 -130
  173. package/src/mappings/CardInline.js +0 -52
  174. package/src/mappings/CardInline.ts +0 -61
  175. package/src/mappings/Container.js +0 -30
  176. package/src/mappings/Container.ts +0 -41
  177. package/src/mappings/HeaderLarge.js +0 -29
  178. package/src/mappings/HeaderLarge.ts +0 -38
  179. package/src/mappings/HeaderMedium.js +0 -55
  180. package/src/mappings/HeaderMedium.ts +0 -63
  181. package/src/mappings/HeaderOverline.js +0 -55
  182. package/src/mappings/HeaderOverline.ts +0 -63
  183. package/src/mappings/ProgressIndicator.js +0 -181
  184. package/src/mappings/ProgressIndicator.ts +0 -190
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _TableCommon = require("./TableCommon");
10
+ var _theming = require("../../theming");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ const TableRow = _ref => {
13
+ let {
14
+ borderWidth,
15
+ borderColor,
16
+ borderStyle,
17
+ drawTopBorder = false,
18
+ drawBottomBorder = true,
19
+ drawStartBorder = true,
20
+ drawEndBorder = false,
21
+ cellVerticalPadding,
22
+ cellHorizontalPadding,
23
+ isTableHeader = false,
24
+ children,
25
+ style,
26
+ theme
27
+ } = _ref;
28
+ const parentContextValue = _react.default.useContext(_TableCommon.TableStyleContext);
29
+
30
+ //Create context to use and pass to children based on own props or fall back to parent provided context
31
+ const contextValue = {
32
+ borderColor: borderColor || parentContextValue.borderColor,
33
+ borderStyle: borderStyle || parentContextValue.borderStyle,
34
+ borderWidth: borderWidth || parentContextValue.borderWidth,
35
+ cellHorizontalPadding: cellHorizontalPadding || parentContextValue.cellHorizontalPadding,
36
+ cellVerticalPadding: cellVerticalPadding || parentContextValue.cellVerticalPadding
37
+ };
38
+ const borderViewStyle = (0, _TableCommon.generateBorderStyles)({
39
+ borderColor: contextValue.borderColor,
40
+ borderWidth: contextValue.borderWidth,
41
+ borderStyle: contextValue.borderStyle,
42
+ drawTopBorder,
43
+ drawBottomBorder,
44
+ drawStartBorder,
45
+ drawEndBorder
46
+ });
47
+ return /*#__PURE__*/_react.default.createElement(_TableCommon.TableStyleContext.Provider, {
48
+ value: contextValue
49
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
50
+ style: [borderViewStyle, isTableHeader ? {
51
+ backgroundColor: theme.colors.primary
52
+ } : {}, style, styles.cellsContainer]
53
+ }, children));
54
+ };
55
+ const styles = _reactNative.StyleSheet.create({
56
+ cellsContainer: {
57
+ flexDirection: "row"
58
+ }
59
+ });
60
+ var _default = (0, _theming.withTheme)(TableRow);
61
+ exports.default = _default;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Table", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Table.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "TableCell", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _TableCell.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "TableRow", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _TableRow.default;
22
+ }
23
+ });
24
+ var _Table = _interopRequireDefault(require("./Table"));
25
+ var _TableRow = _interopRequireDefault(require("./TableRow"));
26
+ var _TableCell = _interopRequireDefault(require("./TableCell"));
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -117,12 +117,6 @@ Object.defineProperty(exports, "CircleImage", {
117
117
  return _CircleImage.default;
118
118
  }
119
119
  });
120
- Object.defineProperty(exports, "Container", {
121
- enumerable: true,
122
- get: function () {
123
- return _Container.default;
124
- }
125
- });
126
120
  Object.defineProperty(exports, "DatePicker", {
127
121
  enumerable: true,
128
122
  get: function () {
@@ -351,6 +345,24 @@ Object.defineProperty(exports, "TabViewItem", {
351
345
  return _TabView.TabViewItem;
352
346
  }
353
347
  });
348
+ Object.defineProperty(exports, "Table", {
349
+ enumerable: true,
350
+ get: function () {
351
+ return _Table.Table;
352
+ }
353
+ });
354
+ Object.defineProperty(exports, "TableCell", {
355
+ enumerable: true,
356
+ get: function () {
357
+ return _Table.TableCell;
358
+ }
359
+ });
360
+ Object.defineProperty(exports, "TableRow", {
361
+ enumerable: true,
362
+ get: function () {
363
+ return _Table.TableRow;
364
+ }
365
+ });
354
366
  Object.defineProperty(exports, "TextField", {
355
367
  enumerable: true,
356
368
  get: function () {
@@ -410,7 +422,6 @@ var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
410
422
  var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
411
423
  var _Card = _interopRequireDefault(require("./components/Card"));
412
424
  var _Checkbox = require("./components/Checkbox");
413
- var _Container = _interopRequireDefault(require("./components/Container"));
414
425
  var _Divider = _interopRequireDefault(require("./components/Divider"));
415
426
  var _FAB = _interopRequireDefault(require("./components/FAB"));
416
427
  var _FieldSearchBarFull = _interopRequireDefault(require("./components/FieldSearchBarFull"));
@@ -437,6 +448,7 @@ var _TabView = require("./components/TabView");
437
448
  var _Markdown = _interopRequireDefault(require("./components/Markdown"));
438
449
  var _BottomSheet = require("./components/BottomSheet");
439
450
  var _YoutubePlayer = require("./components/YoutubePlayer");
451
+ var _Table = require("./components/Table");
440
452
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
441
453
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
442
454
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -14,7 +14,6 @@ const SEED_DATA = [{
14
14
  preview_image_url: "{CLOUDINARY_URL}/Field_SearchBar_Full.png",
15
15
  supports_list_render: false,
16
16
  triggers: [_types.Triggers.OnChange],
17
- // TODO Triggers.OnSubmit for multiple triggers
18
17
  props: {
19
18
  icon: {
20
19
  group: _types.GROUPS.basic,
@@ -53,4 +52,7 @@ const SEED_DATA = [{
53
52
  },
54
53
  layout: {}
55
54
  }];
55
+ exports.SEED_DATA = SEED_DATA;},
56
+ layout: {}
57
+ }];
56
58
  exports.SEED_DATA = SEED_DATA;
@@ -22,7 +22,8 @@ const SEED_DATA = [{
22
22
  description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
23
23
  defaultValue: 1.33
24
24
  })
25
- }
25
+ },
26
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects]
26
27
  }, {
27
28
  name: "Box",
28
29
  tag: "Box",
@@ -44,6 +45,13 @@ const SEED_DATA = [{
44
45
  name: "Container",
45
46
  tag: "Container",
46
47
  description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
48
+ props: {
49
+ centerContent: (0, _types.createStaticBoolProp)({
50
+ label: "Center content",
51
+ description: "Center child elements based on their content width",
52
+ defaultValue: true
53
+ })
54
+ },
47
55
  ...SHARED_SEED_DATA
48
56
  }, {
49
57
  name: "Column",
@@ -65,24 +73,17 @@ const SEED_DATA = [{
65
73
  name: "Spacer",
66
74
  tag: "Spacer",
67
75
  description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
76
+ layout: {
77
+ flex: 1
78
+ },
68
79
  ...SHARED_SEED_DATA,
69
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
80
+ stylesPanelSections: [_types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Margins]
70
81
  }, {
71
82
  name: "Stack",
72
83
  tag: "Stack",
73
84
  description: "Stack aligns items vertically or horizontally based on the direction prop",
74
85
  ...SHARED_SEED_DATA,
75
86
  props: {
76
- direction: (0, _types.createTextEnumProp)({
77
- label: "Direction",
78
- description: "The direction of the Stack",
79
- options: ["row", "column"],
80
- defaultValue: "column"
81
- }),
82
- reversed: (0, _types.createBoolProp)({
83
- label: "Reversed",
84
- description: "Determines whether to reverse the direction of items"
85
- }),
86
87
  isDisabled: (0, _types.createBoolProp)({
87
88
  label: "Disabled",
88
89
  description: "If true, the Stack will be disabled"
@@ -23,9 +23,7 @@ const SEED_DATA = {
23
23
  }),
24
24
  fieldName: (0, _types.createFieldNameProp)({
25
25
  defaultValue: "ratingValue",
26
- // this is the name of the variable declared on the screen in Draftbit
27
26
  handlerPropName: "onPress",
28
- // the change handler prop in this component
29
27
  valuePropName: "rating" // the value prop in this component
30
28
  }),
31
29
 
@@ -50,4 +48,10 @@ const SEED_DATA = {
50
48
  })
51
49
  }
52
50
  };
51
+ exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
52
+ label: "Inactive Color",
53
+ defaultValue: "divider"
54
+ })
55
+ }
56
+ };
53
57
  exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SHARED_SEED_DATA_PROPS = {
9
+ borderWidth: (0, _types.createStaticNumberProp)({
10
+ label: "Border Width",
11
+ description: "Specifies the width of the border. Passed down to child Table(Row/Cell) components unless overridden",
12
+ required: false,
13
+ defaultValue: null
14
+ }),
15
+ borderColor: (0, _types.createColorProp)({
16
+ label: "Border Color",
17
+ description: "Specifies the color of the border. Passed down to child Table(Row/Cell) components unless overridden",
18
+ defaultValue: null
19
+ }),
20
+ borderStyle: (0, _types.createTextEnumProp)({
21
+ label: "Border Style",
22
+ description: "Specifies the style of the border. Passed down to child Table(Row/Cell) components unless overridden",
23
+ options: ["solid", "dotted", "dashed"],
24
+ defaultValue: null
25
+ }),
26
+ drawTopBorder: (0, _types.createStaticBoolProp)({
27
+ label: "Draw Top Border",
28
+ description: "Whether to draw the top border at this layer of the Table tree or not",
29
+ defaultValue: false
30
+ }),
31
+ drawBottomBorder: (0, _types.createStaticBoolProp)({
32
+ label: "Draw Bottom Border",
33
+ description: "Whether to draw the bottom border at this layer of the Table tree or not",
34
+ defaultValue: false
35
+ }),
36
+ drawStartBorder: (0, _types.createStaticBoolProp)({
37
+ label: "Draw Start Border",
38
+ description: "Whether to draw the start border at this layer of the Table tree or not",
39
+ defaultValue: false
40
+ }),
41
+ drawEndBorder: (0, _types.createStaticBoolProp)({
42
+ label: "Draw End Border",
43
+ description: "Whether to draw the end border at this layer of the Table tree or not",
44
+ defaultValue: false
45
+ }),
46
+ cellVerticalPadding: (0, _types.createStaticNumberProp)({
47
+ label: "Cell Vertical Padding",
48
+ description: "Specifies the vertical padding of the cell. Passed down to TableCell components unless overridden",
49
+ required: false,
50
+ defaultValue: null
51
+ }),
52
+ cellHorizontalPadding: (0, _types.createStaticNumberProp)({
53
+ label: "Cell Horizontal Padding",
54
+ description: "Specifies the horizontal padding of the cell. Passed down to TableCell components unless overridden",
55
+ required: false,
56
+ defaultValue: null
57
+ })
58
+ };
59
+ const SEED_DATA = [{
60
+ name: "Table",
61
+ tag: "Table",
62
+ description: "Top level table container",
63
+ category: _types.COMPONENT_TYPES.table,
64
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects, _types.StylesPanelSections.Background, _types.StylesPanelSections.LayoutSelectedItem],
65
+ layout: {
66
+ flex: 1
67
+ },
68
+ props: {
69
+ ...SHARED_SEED_DATA_PROPS,
70
+ borderWidth: {
71
+ ...SHARED_SEED_DATA_PROPS.borderWidth,
72
+ defaultValue: 1
73
+ },
74
+ borderColor: {
75
+ ...SHARED_SEED_DATA_PROPS.borderColor,
76
+ defaultValue: "divider"
77
+ },
78
+ borderStyle: {
79
+ ...SHARED_SEED_DATA_PROPS.borderStyle,
80
+ defaultValue: "solid"
81
+ },
82
+ drawTopBorder: {
83
+ ...SHARED_SEED_DATA_PROPS.drawTopBorder,
84
+ defaultValue: true
85
+ },
86
+ cellVerticalPadding: {
87
+ ...SHARED_SEED_DATA_PROPS.cellVerticalPadding,
88
+ defaultValue: 10
89
+ },
90
+ cellHorizontalPadding: {
91
+ ...SHARED_SEED_DATA_PROPS.cellHorizontalPadding,
92
+ defaultValue: 10
93
+ },
94
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
95
+ label: "Show Vertical Scroll Indicator",
96
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
97
+ defaultValue: true
98
+ })
99
+ }
100
+ }, {
101
+ name: "Table Row",
102
+ tag: "TableRow",
103
+ description: "Table Row container",
104
+ category: _types.COMPONENT_TYPES.table,
105
+ stylesPanelSections: [_types.StylesPanelSections.Background],
106
+ props: {
107
+ ...SHARED_SEED_DATA_PROPS,
108
+ drawStartBorder: {
109
+ ...SHARED_SEED_DATA_PROPS.drawStartBorder,
110
+ defaultValue: true
111
+ },
112
+ drawBottomBorder: {
113
+ ...SHARED_SEED_DATA_PROPS.drawBottomBorder,
114
+ defaultValue: true
115
+ },
116
+ isTableHeader: (0, _types.createStaticBoolProp)({
117
+ label: "Header",
118
+ description: "Whether this row is a header or not (changes background and sticks while scrolling)",
119
+ defaultValue: false
120
+ })
121
+ }
122
+ }, {
123
+ name: "Table Cell",
124
+ tag: "TableCell",
125
+ description: "Table Cell container",
126
+ category: _types.COMPONENT_TYPES.table,
127
+ stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
128
+ layout: {
129
+ flex: 1,
130
+ flexDirection: "row"
131
+ },
132
+ props: {
133
+ ...SHARED_SEED_DATA_PROPS,
134
+ drawEndBorder: {
135
+ ...SHARED_SEED_DATA_PROPS.drawEndBorder,
136
+ defaultValue: true
137
+ }
138
+ }
139
+ }];
140
+ exports.SEED_DATA = SEED_DATA;
@@ -1,4 +1,3 @@
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); }
2
1
  import React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  const AspectRatio = props => {
@@ -27,6 +26,24 @@ const AspectRatio = props => {
27
26
  });
28
27
  }
29
28
  }
29
+ return /*#__PURE__*/React.createElement(View, {
30
+ ...props,
31
+ style: style,
32
+ onLayout: _ref => {
33
+ let {
34
+ nativeEvent: {
35
+ layout: l
36
+ }
37
+ } = _ref;
38
+ return setLayout(l);
39
+ }
40
+ }, props.children);
41
+ };
42
+ export default AspectRatio;idth,
43
+ height: width * (1 / aspectRatio)
44
+ });
45
+ }
46
+ }
30
47
  return /*#__PURE__*/React.createElement(View, _extends({}, props, {
31
48
  style: style,
32
49
  onLayout: _ref => {
@@ -1,4 +1,3 @@
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); }
2
1
  import React from "react";
3
2
  import { StyleSheet, View } from "react-native";
4
3
  import BottomSheetComponent from "./BottomSheetComponent";
@@ -22,7 +21,7 @@ const BottomSheet = _ref => {
22
21
  return /*#__PURE__*/React.createElement(View, {
23
22
  style: styles.parentContainer,
24
23
  pointerEvents: "box-none"
25
- }, /*#__PURE__*/React.createElement(BottomSheetComponent, _extends({
24
+ }, /*#__PURE__*/React.createElement(BottomSheetComponent, {
26
25
  componentType: "ScrollView",
27
26
  snapPoints: snapPoints,
28
27
  initialSnapIndex: initialSnapIndex,
@@ -45,8 +44,9 @@ const BottomSheet = _ref => {
45
44
  borderWidth,
46
45
  borderColor
47
46
  }]),
48
- onSettle: onSettle
49
- }, rest), children));
47
+ onSettle: onSettle,
48
+ ...rest
49
+ }, children));
50
50
  };
51
51
  const styles = StyleSheet.create({
52
52
  //Render on top of everything
@@ -77,4 +77,24 @@ const styles = StyleSheet.create({
77
77
  borderRadius: 4
78
78
  }
79
79
  });
80
+ export default withTheme(BottomSheet); "hidden"
81
+ },
82
+ contentContainerStyle: {
83
+ paddingHorizontal: 16,
84
+ paddingVertical: 10
85
+ },
86
+ containerStyle: {
87
+ flex: 1,
88
+ overflow: "hidden"
89
+ },
90
+ handleContainer: {
91
+ alignItems: "center",
92
+ paddingVertical: 20
93
+ },
94
+ handle: {
95
+ width: 40,
96
+ height: 2,
97
+ borderRadius: 4
98
+ }
99
+ });
80
100
  export default withTheme(BottomSheet);
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
4
3
  import { withTheme } from "../theming";
@@ -53,7 +52,7 @@ function Base(_ref) {
53
52
  if (textAlign === "right") {
54
53
  buttonStyles.justifyContent = "flex-end";
55
54
  }
56
- return /*#__PURE__*/React.createElement(Pressable, _extends({
55
+ return /*#__PURE__*/React.createElement(Pressable, {
57
56
  disabled: disabled || loading,
58
57
  style: _ref2 => {
59
58
  let {
@@ -62,8 +61,9 @@ function Base(_ref) {
62
61
  return [styles.base, {
63
62
  opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
64
63
  }, buttonStyles];
65
- }
66
- }, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
64
+ },
65
+ ...props
66
+ }, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
67
67
  size: "small",
68
68
  color: color,
69
69
  style: styles.loading
@@ -82,13 +82,14 @@ const Solid = _ref3 => {
82
82
  theme,
83
83
  ...props
84
84
  } = _ref3;
85
- return /*#__PURE__*/React.createElement(Base, _extends({
85
+ return /*#__PURE__*/React.createElement(Base, {
86
86
  style: [{
87
87
  color: "#FFF",
88
88
  borderRadius: theme.roundness,
89
89
  backgroundColor: theme.colors.primary
90
- }, style]
91
- }, props));
90
+ }, style],
91
+ ...props
92
+ });
92
93
  };
93
94
  const ButtonSolid = withTheme(Solid);
94
95
  export { ButtonSolid };
@@ -100,13 +101,14 @@ const Outline = _ref4 => {
100
101
  theme,
101
102
  ...props
102
103
  } = _ref4;
103
- return /*#__PURE__*/React.createElement(Base, _extends({
104
+ return /*#__PURE__*/React.createElement(Base, {
104
105
  style: [styles.outline, {
105
106
  borderRadius: theme.roundness,
106
107
  borderColor: theme.colors.primary,
107
108
  color: theme.colors.primary
108
- }, style]
109
- }, props));
109
+ }, style],
110
+ ...props
111
+ });
110
112
  };
111
113
  const ButtonOutline = withTheme(Outline);
112
114
  export { ButtonOutline };
@@ -153,4 +155,25 @@ const styles = StyleSheet.create({
153
155
  }
154
156
  })
155
157
  }
158
+ });or: "transparent",
159
+ padding: 0,
160
+ minHeight: undefined
161
+ },
162
+ loading: {
163
+ marginRight: 6
164
+ },
165
+ icon: {
166
+ ...Platform.select({
167
+ web: {
168
+ marginTop: 1,
169
+ marginRight: 4,
170
+ alignSelf: "center"
171
+ },
172
+ default: {
173
+ marginBottom: 2,
174
+ marginRight: 4,
175
+ alignSelf: "center"
176
+ }
177
+ })
178
+ }
156
179
  });
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { View, StyleSheet, Pressable } from "react-native";
4
3
  import { useTheme } from "../../theming";
@@ -26,7 +25,6 @@ const Checkbox = _ref => {
26
25
  setInternalValue(status);
27
26
  }
28
27
  }, [status]);
29
-
30
28
  // This special logic is to handle weird APIs like Airtable that return
31
29
  // true or undefined for a boolean
32
30
  const previousDefaultValue = usePrevious(defaultValue);
@@ -50,7 +48,8 @@ const Checkbox = _ref => {
50
48
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
51
49
  }
52
50
  };
53
- return /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
51
+ return /*#__PURE__*/React.createElement(Pressable, {
52
+ ...rest,
54
53
  onPress: handlePress,
55
54
  disabled: disabled,
56
55
  accessibilityState: {
@@ -62,7 +61,7 @@ const Checkbox = _ref => {
62
61
  width: size,
63
62
  height: size
64
63
  }]
65
- }), /*#__PURE__*/React.createElement(Icon, {
64
+ }, /*#__PURE__*/React.createElement(Icon, {
66
65
  style: styles.icon,
67
66
  name: internalValue ? checkedIcon : uncheckedIcon,
68
67
  size: size,
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { StyleSheet, View, Platform, Pressable } from "react-native";
4
3
  import { isString } from "lodash";
@@ -6,7 +5,7 @@ import { extractStyles } from "../../utilities";
6
5
  import { usePrevious } from "../../hooks";
7
6
  import Text from "../Text";
8
7
  import Checkbox from "./Checkbox";
9
- export let Direction;
8
+ export var Direction;
10
9
  (function (Direction) {
11
10
  Direction["Row"] = "row";
12
11
  Direction["RowReverse"] = "row-reverse";
@@ -48,7 +47,6 @@ const CheckboxRow = _ref => {
48
47
  setInternalValue(status);
49
48
  }
50
49
  }, [status]);
51
-
52
50
  // This special logic is to handle weird APIs like Airtable that return
53
51
  // true or undefined for a boolean
54
52
  const previousDefaultValue = usePrevious(defaultValue);
@@ -72,13 +70,14 @@ const CheckboxRow = _ref => {
72
70
  textStyles,
73
71
  viewStyles
74
72
  } = extractStyles(style);
75
- return /*#__PURE__*/React.createElement(Pressable, _extends({
73
+ return /*#__PURE__*/React.createElement(Pressable, {
76
74
  onPress: handlePress,
77
75
  style: [viewStyles, styles.mainParent, {
78
76
  flexDirection: direction
79
77
  }],
80
- disabled: disabled
81
- }, rest), /*#__PURE__*/React.createElement(View, {
78
+ disabled: disabled,
79
+ ...rest
80
+ }, /*#__PURE__*/React.createElement(View, {
82
81
  style: [styles.label, {
83
82
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
83
  }, labelContainerStyle]
@@ -114,4 +113,23 @@ const styles = StyleSheet.create({
114
113
  flex: 3
115
114
  }
116
115
  });
116
+ export default CheckboxRow;heet.create({
117
+ mainParent: {
118
+ alignItems: "center",
119
+ justifyContent: "space-around",
120
+ paddingStart: 20,
121
+ minHeight: 50,
122
+ paddingEnd: 20,
123
+ display: "flex",
124
+ ...Platform.select({
125
+ web: {
126
+ cursor: "pointer",
127
+ userSelect: "none"
128
+ }
129
+ })
130
+ },
131
+ label: {
132
+ flex: 3
133
+ }
134
+ });
117
135
  export default CheckboxRow;
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export let Direction;
2
+ export var Direction;
3
3
  (function (Direction) {
4
4
  Direction["Horizontal"] = "horizontal";
5
5
  Direction["Vertical"] = "vertical";