@draftbit/core 46.2.4-54d316.5 → 46.2.4-5875f8.8

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 (66) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +5 -25
  2. package/lib/commonjs/components/Config.js +1 -1
  3. package/lib/commonjs/components/SVG.js +4 -5
  4. package/lib/commonjs/index.js +0 -38
  5. package/lib/commonjs/mappings/SVG.js +2 -1
  6. package/lib/commonjs/utilities.js +2 -2
  7. package/lib/module/components/Config.js +1 -1
  8. package/lib/module/components/SVG.js +4 -5
  9. package/lib/module/index.js +0 -1
  10. package/lib/module/mappings/SVG.js +3 -2
  11. package/lib/module/utilities.js +3 -3
  12. package/lib/typescript/src/components/SVG.d.ts +2 -2
  13. package/lib/typescript/src/index.d.ts +0 -1
  14. package/lib/typescript/src/mappings/SVG.d.ts +1 -0
  15. package/lib/typescript/src/utilities.d.ts +3 -3
  16. package/package.json +4 -4
  17. package/src/components/Config.js +1 -1
  18. package/src/components/Config.ts +1 -1
  19. package/src/components/SVG.js +4 -5
  20. package/src/components/SVG.tsx +7 -7
  21. package/src/index.js +0 -1
  22. package/src/index.tsx +0 -9
  23. package/src/mappings/SVG.js +8 -2
  24. package/src/mappings/SVG.ts +12 -2
  25. package/src/utilities.js +2 -5
  26. package/src/utilities.ts +2 -13
  27. package/lib/commonjs/components/Table/index.js +0 -55
  28. package/lib/commonjs/components/Table/table.js +0 -35
  29. package/lib/commonjs/components/Table/tableCell.js +0 -50
  30. package/lib/commonjs/components/Table/tableHeader.js +0 -41
  31. package/lib/commonjs/components/Table/tablePaginator.js +0 -17
  32. package/lib/commonjs/components/Table/tableRow.js +0 -47
  33. package/lib/commonjs/components/Table/tableTitle.js +0 -60
  34. package/lib/commonjs/mappings/table.js +0 -103
  35. package/lib/module/components/Table/index.js +0 -6
  36. package/lib/module/components/Table/table.js +0 -23
  37. package/lib/module/components/Table/tableCell.js +0 -37
  38. package/lib/module/components/Table/tableHeader.js +0 -27
  39. package/lib/module/components/Table/tablePaginator.js +0 -6
  40. package/lib/module/components/Table/tableRow.js +0 -33
  41. package/lib/module/components/Table/tableTitle.js +0 -47
  42. package/lib/module/mappings/table.js +0 -94
  43. package/lib/typescript/src/components/Table/index.d.ts +0 -6
  44. package/lib/typescript/src/components/Table/table.d.ts +0 -8
  45. package/lib/typescript/src/components/Table/tableCell.d.ts +0 -10
  46. package/lib/typescript/src/components/Table/tableHeader.d.ts +0 -12
  47. package/lib/typescript/src/components/Table/tablePaginator.d.ts +0 -3
  48. package/lib/typescript/src/components/Table/tableRow.d.ts +0 -12
  49. package/lib/typescript/src/components/Table/tableTitle.d.ts +0 -12
  50. package/lib/typescript/src/mappings/table.d.ts +0 -153
  51. package/src/components/Table/index.js +0 -6
  52. package/src/components/Table/index.tsx +0 -6
  53. package/src/components/Table/table.js +0 -10
  54. package/src/components/Table/table.tsx +0 -22
  55. package/src/components/Table/tableCell.js +0 -21
  56. package/src/components/Table/tableCell.tsx +0 -44
  57. package/src/components/Table/tableHeader.js +0 -11
  58. package/src/components/Table/tableHeader.tsx +0 -28
  59. package/src/components/Table/tablePaginator.js +0 -5
  60. package/src/components/Table/tablePaginator.tsx +0 -10
  61. package/src/components/Table/tableRow.js +0 -16
  62. package/src/components/Table/tableRow.tsx +0 -31
  63. package/src/components/Table/tableTitle.js +0 -28
  64. package/src/components/Table/tableTitle.tsx +0 -58
  65. package/src/mappings/table.js +0 -137
  66. package/src/mappings/table.ts +0 -145
@@ -21,6 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  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; }
23
23
 
24
+ 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); }
25
+
24
26
  const AccordionItem = _ref => {
25
27
  let {
26
28
  Icon,
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
35
37
  textStyles,
36
38
  viewStyles
37
39
  } = (0, _utilities.extractStyles)(style);
38
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
39
- style: [styles.container, viewStyles],
40
- ...rest
41
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
40
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
41
+ style: [styles.container, viewStyles]
42
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
42
43
  style: styles.row
43
44
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
44
45
  name: icon,
@@ -73,25 +74,4 @@ const styles = _reactNative.StyleSheet.create({
73
74
 
74
75
  var _default = (0, _theming.withTheme)(AccordionItem);
75
76
 
76
- exports.default = _default;StyleSheet.create({
77
- container: {
78
- padding: 8
79
- },
80
- row: {
81
- flexDirection: "row",
82
- alignItems: "center",
83
- paddingLeft: 8
84
- },
85
- item: {
86
- marginVertical: 6,
87
- paddingLeft: 8
88
- },
89
- content: {
90
- flex: 1,
91
- justifyContent: "center"
92
- }
93
- });
94
-
95
- var _default = (0, _theming.withTheme)(AccordionItem);
96
-
97
77
  exports.default = _default;
@@ -62,7 +62,7 @@ var _default = {
62
62
  width: size.width,
63
63
  height: size.height
64
64
  }, "image-placeholder_1"),
65
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
65
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
66
66
  squareImageUrl: buildImageUrl({
67
67
  width: 100,
68
68
  height: 100
@@ -21,26 +21,25 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  const SVG = _ref => {
23
23
  let {
24
- source,
24
+ source = _Config.default.placeholderSvgURL,
25
25
  style
26
26
  } = _ref;
27
- let svgSource = source === null || source === undefined ? _Config.default.placeholderSvgURL : source;
28
27
  return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
29
28
  style: style
30
29
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
31
30
  width: "100%",
32
31
  height: "100%",
33
- uri: svgSource
32
+ uri: source
34
33
  })), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
35
34
  style: style
36
35
  }, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
37
36
  width: "100%",
38
37
  height: "100%",
39
- uri: svgSource
38
+ uri: source
40
39
  })), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
41
40
  style: style,
42
41
  source: {
43
- uri: svgSource
42
+ uri: source
44
43
  }
45
44
  }));
46
45
  };
@@ -369,42 +369,6 @@ Object.defineProperty(exports, "SwitchRow", {
369
369
  return _Switch.SwitchRow;
370
370
  }
371
371
  });
372
- Object.defineProperty(exports, "Table", {
373
- enumerable: true,
374
- get: function () {
375
- return _Table.Table;
376
- }
377
- });
378
- Object.defineProperty(exports, "TableCell", {
379
- enumerable: true,
380
- get: function () {
381
- return _Table.TableCell;
382
- }
383
- });
384
- Object.defineProperty(exports, "TableHeader", {
385
- enumerable: true,
386
- get: function () {
387
- return _Table.TableHeader;
388
- }
389
- });
390
- Object.defineProperty(exports, "TablePaginator", {
391
- enumerable: true,
392
- get: function () {
393
- return _Table.TablePaginator;
394
- }
395
- });
396
- Object.defineProperty(exports, "TableRow", {
397
- enumerable: true,
398
- get: function () {
399
- return _Table.TableRow;
400
- }
401
- });
402
- Object.defineProperty(exports, "TableTitle", {
403
- enumerable: true,
404
- get: function () {
405
- return _Table.TableTitle;
406
- }
407
- });
408
372
  Object.defineProperty(exports, "TextField", {
409
373
  enumerable: true,
410
374
  get: function () {
@@ -512,8 +476,6 @@ var _Layout = require("./components/Layout");
512
476
 
513
477
  var _index = require("./components/RadioButton/index");
514
478
 
515
- var _Table = require("./components/Table");
516
-
517
479
  var _DeprecatedButton = _interopRequireDefault(require("./components/DeprecatedButton"));
518
480
 
519
481
  var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
@@ -16,8 +16,9 @@ const SEED_DATA = {
16
16
  width: 100,
17
17
  height: 100
18
18
  },
19
+ stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
19
20
  props: {
20
- source: (0, _types.createSvgProp)()
21
+ source: (0, _types.createSVGProp)()
21
22
  }
22
23
  };
23
24
  exports.SEED_DATA = SEED_DATA;
@@ -44,8 +44,8 @@ function extractStyles(style) {
44
44
  textDecorationStyle
45
45
  };
46
46
  return {
47
- viewStyles: (0, _lodash.omitBy)(viewStyles, _lodash.isNil),
48
- textStyles: (0, _lodash.omitBy)(textStyles, _lodash.isNil)
47
+ viewStyles,
48
+ textStyles
49
49
  };
50
50
  }
51
51
 
@@ -54,7 +54,7 @@ export default {
54
54
  width: size.width,
55
55
  height: size.height
56
56
  }, "image-placeholder_1"),
57
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
57
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
58
58
  squareImageUrl: buildImageUrl({
59
59
  width: 100,
60
60
  height: 100
@@ -5,26 +5,25 @@ import Config from "./Config";
5
5
 
6
6
  const SVG = _ref => {
7
7
  let {
8
- source,
8
+ source = Config.placeholderSvgURL,
9
9
  style
10
10
  } = _ref;
11
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
12
11
  return /*#__PURE__*/React.createElement(React.Fragment, null, Platform.OS === "ios" && /*#__PURE__*/React.createElement(View, {
13
12
  style: style
14
13
  }, /*#__PURE__*/React.createElement(SvgUri, {
15
14
  width: "100%",
16
15
  height: "100%",
17
- uri: svgSource
16
+ uri: source
18
17
  })), Platform.OS === "android" && /*#__PURE__*/React.createElement(View, {
19
18
  style: style
20
19
  }, /*#__PURE__*/React.createElement(SvgUri, {
21
20
  width: "100%",
22
21
  height: "100%",
23
- uri: svgSource
22
+ uri: source
24
23
  })), Platform.OS === "web" && /*#__PURE__*/React.createElement(Image, {
25
24
  style: style,
26
25
  source: {
27
- uri: svgSource
26
+ uri: source
28
27
  }
29
28
  }));
30
29
  };
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle } from "./components/Table";
35
34
  /* Deprecated: Fix or Delete! */
36
35
 
37
36
  export { default as Button } from "./components/DeprecatedButton";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
@@ -8,7 +8,8 @@ export const SEED_DATA = {
8
8
  width: 100,
9
9
  height: 100
10
10
  },
11
+ stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Effects],
11
12
  props: {
12
- source: createSvgProp()
13
+ source: createSVGProp()
13
14
  }
14
15
  };
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { isString, isNumber, pick, pickBy, identity, omitBy, isNil } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
3
3
  export function extractStyles(style) {
4
4
  const {
5
5
  color,
@@ -29,8 +29,8 @@ export function extractStyles(style) {
29
29
  textDecorationStyle
30
30
  };
31
31
  return {
32
- viewStyles: omitBy(viewStyles, isNil),
33
- textStyles: omitBy(textStyles, isNil)
32
+ viewStyles,
33
+ textStyles
34
34
  };
35
35
  }
36
36
  export const borderStyleNames = ["borderRadius", "borderBottomColor", "borderBottomEndRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStartRadius", "borderBottomWidth", "borderColor", "borderEndColor", "borderLeftColor", "borderLeftWidth", "borderRadius", "borderRightColor", "borderRightWidth", "borderStartColor", "borderStyle", "borderTopColor", "borderTopEndRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStartRadius", "borderTopWidth", "borderWidth"];
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import { StyleProp, ImageStyle } from "react-native";
3
3
  declare type SVGComponentProps = {
4
4
  source: string;
5
5
  style?: StyleProp<ImageStyle>;
6
6
  };
7
- declare const SVG: ({ source, style }: SVGComponentProps) => JSX.Element;
7
+ declare const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>>;
8
8
  export default SVG;
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
35
34
  export { default as Button } from "./components/DeprecatedButton";
36
35
  export { default as CardBlock } from "./components/CardBlock";
37
36
  export { default as CardContainer } from "./components/CardContainer";
@@ -7,6 +7,7 @@ export declare const SEED_DATA: {
7
7
  width: number;
8
8
  height: number;
9
9
  };
10
+ stylesPanelSections: string[];
10
11
  props: {
11
12
  source: {
12
13
  label: string;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="lodash" />
2
- import { StyleProp } from "react-native";
2
+ import { StyleProp, TextStyle } from "react-native";
3
3
  export declare function extractStyles(style: StyleProp<any>): {
4
- viewStyles: Partial<any>;
5
- textStyles: import("lodash").Dictionary<any>;
4
+ viewStyles: any;
5
+ textStyles: TextStyle;
6
6
  };
7
7
  export declare const borderStyleNames: string[];
8
8
  export declare const marginStyleNames: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.4-54d316.5+54d3168f",
3
+ "version": "46.2.4-5875f8.8+5875f85e",
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.2.4",
44
+ "@draftbit/types": "^46.2.4-5875f8.8+5875f85e",
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",
@@ -53,7 +53,7 @@
53
53
  "lodash.omit": "^4.5.0",
54
54
  "lodash.tonumber": "^4.0.3",
55
55
  "react-native-modal-datetime-picker": "^13.0.0",
56
- "react-native-svg": "^12.3.0",
56
+ "react-native-svg": "12.3.0",
57
57
  "react-native-typography": "^1.4.1",
58
58
  "react-native-web-swiper": "^2.2.3"
59
59
  },
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  ]
82
82
  },
83
- "gitHead": "54d3168fcd7786b51099bb324e615f1d2bcf3ddd"
83
+ "gitHead": "5875f85eb6701a3c4d0224bc75c21c95318339ba"
84
84
  }
@@ -42,7 +42,7 @@ export default {
42
42
  cardIconElevation: 1,
43
43
  placeholderImageURL: "https://static.draftbit.com/images/placeholder-image" + getExtension(),
44
44
  getPlaceholderImageUrl: (size) => buildImageUrl({ width: size.width, height: size.height }, "image-placeholder_1"),
45
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
45
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
46
46
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
47
47
  FABSize: 40,
48
48
  FABBorderRadius: 20,
@@ -60,7 +60,7 @@ export default {
60
60
  { width: size.width, height: size.height },
61
61
  "image-placeholder_1"
62
62
  ),
63
- placeholderSvgURL: "https://static.draftbit.com/images/placeholder-svg.svg",
63
+ placeholderSvgURL: "https://static.draftbit.com/images/placeholder-image.svg",
64
64
  squareImageUrl: buildImageUrl({ width: 100, height: 100 }, "Avatar"),
65
65
  FABSize: 40,
66
66
  FABBorderRadius: 20,
@@ -2,13 +2,12 @@ import * as React from "react";
2
2
  import { View, Platform, Image } from "react-native";
3
3
  import { SvgUri } from "react-native-svg";
4
4
  import Config from "./Config";
5
- const SVG = ({ source, style }) => {
6
- let svgSource = source === null || source === undefined ? Config.placeholderSvgURL : source;
5
+ const SVG = ({ source = Config.placeholderSvgURL, style, }) => {
7
6
  return (React.createElement(React.Fragment, null,
8
7
  Platform.OS === "ios" && (React.createElement(View, { style: style },
9
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
8
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
10
9
  Platform.OS === "android" && (React.createElement(View, { style: style },
11
- React.createElement(SvgUri, { width: "100%", height: "100%", uri: svgSource }))),
12
- Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: svgSource } }))));
10
+ React.createElement(SvgUri, { width: "100%", height: "100%", uri: source }))),
11
+ Platform.OS === "web" && (React.createElement(Image, { style: style, source: { uri: source } }))));
13
12
  };
14
13
  export default SVG;
@@ -9,24 +9,24 @@ type SVGComponentProps = {
9
9
  style?: StyleProp<ImageStyle>;
10
10
  };
11
11
 
12
- const SVG = ({ source, style }: SVGComponentProps) => {
13
- let svgSource =
14
- source === null || source === undefined ? Config.placeholderSvgURL : source;
15
-
12
+ const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
13
+ source = Config.placeholderSvgURL,
14
+ style,
15
+ }) => {
16
16
  return (
17
17
  <>
18
18
  {Platform.OS === "ios" && (
19
19
  <View style={style}>
20
- <SvgUri width="100%" height="100%" uri={svgSource} />
20
+ <SvgUri width="100%" height="100%" uri={source} />
21
21
  </View>
22
22
  )}
23
23
  {Platform.OS === "android" && (
24
24
  <View style={style}>
25
- <SvgUri width="100%" height="100%" uri={svgSource} />
25
+ <SvgUri width="100%" height="100%" uri={source} />
26
26
  </View>
27
27
  )}
28
28
  {Platform.OS === "web" && (
29
- <Image style={style} source={{ uri: svgSource }} />
29
+ <Image style={style} source={{ uri: source }} />
30
30
  )}
31
31
  </>
32
32
  );
package/src/index.js CHANGED
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
35
34
  /* Deprecated: Fix or Delete! */
36
35
  export { default as Button } from "./components/DeprecatedButton";
37
36
  export { default as CardBlock } from "./components/CardBlock";
package/src/index.tsx CHANGED
@@ -51,15 +51,6 @@ export {
51
51
  RadioButtonFieldGroup,
52
52
  } from "./components/RadioButton/index";
53
53
 
54
- export {
55
- Table,
56
- TableRow,
57
- TablePaginator,
58
- TableHeader,
59
- TableCell,
60
- TableTitle,
61
- } from "./components/Table";
62
-
63
54
  /* Deprecated: Fix or Delete! */
64
55
  export { default as Button } from "./components/DeprecatedButton";
65
56
  export { default as CardBlock } from "./components/CardBlock";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSVGProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "SVG",
4
4
  tag: "SVG",
@@ -8,7 +8,13 @@ export const SEED_DATA = {
8
8
  width: 100,
9
9
  height: 100,
10
10
  },
11
+ stylesPanelSections: [
12
+ StylesPanelSections.Size,
13
+ StylesPanelSections.Margins,
14
+ StylesPanelSections.Position,
15
+ StylesPanelSections.Effects,
16
+ ],
11
17
  props: {
12
- source: createSvgProp(),
18
+ source: createSVGProp(),
13
19
  },
14
20
  };
@@ -1,4 +1,8 @@
1
- import { COMPONENT_TYPES, createSvgProp } from "@draftbit/types";
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createSVGProp,
4
+ StylesPanelSections,
5
+ } from "@draftbit/types";
2
6
 
3
7
  export const SEED_DATA = {
4
8
  name: "SVG",
@@ -9,7 +13,13 @@ export const SEED_DATA = {
9
13
  width: 100,
10
14
  height: 100,
11
15
  },
16
+ stylesPanelSections: [
17
+ StylesPanelSections.Size,
18
+ StylesPanelSections.Margins,
19
+ StylesPanelSections.Position,
20
+ StylesPanelSections.Effects,
21
+ ],
12
22
  props: {
13
- source: createSvgProp(),
23
+ source: createSVGProp(),
14
24
  },
15
25
  };
package/src/utilities.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { isString, isNumber, pick, pickBy, identity, omitBy, isNil, } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
3
3
  export function extractStyles(style) {
4
4
  const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
5
5
  const textStyles = {
@@ -15,10 +15,7 @@ export function extractStyles(style) {
15
15
  textDecorationColor,
16
16
  textDecorationStyle,
17
17
  };
18
- return {
19
- viewStyles: omitBy(viewStyles, isNil),
20
- textStyles: omitBy(textStyles, isNil),
21
- };
18
+ return { viewStyles, textStyles };
22
19
  }
23
20
  export const borderStyleNames = [
24
21
  "borderRadius",
package/src/utilities.ts CHANGED
@@ -1,13 +1,5 @@
1
1
  import { StyleSheet, StyleProp, TextStyle } from "react-native";
2
- import {
3
- isString,
4
- isNumber,
5
- pick,
6
- pickBy,
7
- identity,
8
- omitBy,
9
- isNil,
10
- } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
11
3
 
12
4
  export function extractStyles(style: StyleProp<any>) {
13
5
  const {
@@ -39,10 +31,7 @@ export function extractStyles(style: StyleProp<any>) {
39
31
  textDecorationStyle,
40
32
  };
41
33
 
42
- return {
43
- viewStyles: omitBy(viewStyles, isNil),
44
- textStyles: omitBy(textStyles, isNil),
45
- };
34
+ return { viewStyles, textStyles };
46
35
  }
47
36
 
48
37
  export const borderStyleNames = [
@@ -1,55 +0,0 @@
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, "TableHeader", {
19
- enumerable: true,
20
- get: function () {
21
- return _tableHeader.default;
22
- }
23
- });
24
- Object.defineProperty(exports, "TablePaginator", {
25
- enumerable: true,
26
- get: function () {
27
- return _tablePaginator.default;
28
- }
29
- });
30
- Object.defineProperty(exports, "TableRow", {
31
- enumerable: true,
32
- get: function () {
33
- return _tableRow.default;
34
- }
35
- });
36
- Object.defineProperty(exports, "TableTitle", {
37
- enumerable: true,
38
- get: function () {
39
- return _tableTitle.default;
40
- }
41
- });
42
-
43
- var _table = _interopRequireDefault(require("./table"));
44
-
45
- var _tableHeader = _interopRequireDefault(require("./tableHeader"));
46
-
47
- var _tablePaginator = _interopRequireDefault(require("./tablePaginator"));
48
-
49
- var _tableRow = _interopRequireDefault(require("./tableRow"));
50
-
51
- var _tableCell = _interopRequireDefault(require("./tableCell"));
52
-
53
- var _tableTitle = _interopRequireDefault(require("./tableTitle"));
54
-
55
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- 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); }
15
-
16
- const Table = _ref => {
17
- let {
18
- children,
19
- style,
20
- ...rest
21
- } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
23
- style: [styles.wrapper, style]
24
- }), children);
25
- };
26
-
27
- const styles = _reactNative.StyleSheet.create({
28
- wrapper: {
29
- display: "flex",
30
- flexDirection: "column"
31
- }
32
- });
33
-
34
- var _default = Table;
35
- exports.default = _default;