@draftbit/core 47.1.1-22301.2 → 47.1.1-832f38.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.
- package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
- package/lib/commonjs/components/Container.js +15 -4
- package/lib/commonjs/components/Table/Table.js +28 -0
- package/lib/commonjs/components/Table/TableCell.js +42 -0
- package/lib/commonjs/components/Table/TableHeader.js +32 -0
- package/lib/commonjs/components/Table/TablePaginator.js +12 -0
- package/lib/commonjs/components/Table/TableRow.js +38 -0
- package/lib/commonjs/components/Table/TableTitle.js +53 -0
- package/lib/commonjs/components/Table/index.js +48 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +37 -0
- package/lib/commonjs/mappings/ScrollView.js +2 -0
- package/lib/commonjs/mappings/Table.js +100 -0
- package/lib/commonjs/utilities.js +2 -2
- package/lib/module/components/Table/Table.js +20 -0
- package/lib/module/components/Table/TableCell.js +34 -0
- package/lib/module/components/Table/TableHeader.js +24 -0
- package/lib/module/components/Table/TablePaginator.js +4 -0
- package/lib/module/components/Table/TableRow.js +30 -0
- package/lib/module/components/Table/TableTitle.js +45 -0
- package/lib/module/components/Table/index.js +6 -0
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/ScrollView.js +3 -1
- package/lib/module/mappings/Table.js +93 -0
- package/lib/module/utilities.js +3 -3
- package/lib/typescript/src/components/Table/Table.d.ts +9 -0
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts +11 -0
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableHeader.d.ts +13 -0
- package/lib/typescript/src/components/Table/TableHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TablePaginator.d.ts +4 -0
- package/lib/typescript/src/components/Table/TablePaginator.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts +13 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableTitle.d.ts +13 -0
- package/lib/typescript/src/components/Table/TableTitle.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/index.d.ts +7 -0
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ScrollView.d.ts +11 -0
- package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Table.d.ts +149 -0
- package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
- package/lib/typescript/src/utilities.d.ts +3 -3
- package/lib/typescript/src/utilities.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Table/Table.js +10 -0
- package/src/components/Table/Table.tsx +22 -0
- package/src/components/Table/TableCell.js +21 -0
- package/src/components/Table/TableCell.tsx +44 -0
- package/src/components/Table/TableHeader.js +11 -0
- package/src/components/Table/TableHeader.tsx +28 -0
- package/src/components/Table/TablePaginator.js +5 -0
- package/src/components/Table/TablePaginator.tsx +10 -0
- package/src/components/Table/TableRow.js +16 -0
- package/src/components/Table/TableRow.tsx +31 -0
- package/src/components/Table/TableTitle.js +28 -0
- package/src/components/Table/TableTitle.tsx +58 -0
- package/src/components/Table/index.js +6 -0
- package/src/components/Table/index.tsx +6 -0
- package/src/index.js +1 -0
- package/src/index.tsx +9 -0
- package/src/mappings/ScrollView.js +3 -1
- package/src/mappings/ScrollView.ts +4 -0
- package/src/mappings/Table.js +136 -0
- package/src/mappings/Table.ts +144 -0
- package/src/utilities.js +5 -2
- package/src/utilities.ts +13 -2
|
@@ -12,7 +12,6 @@ var _theming = require("../../theming");
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
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); }
|
|
14
14
|
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; }
|
|
15
|
-
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); }
|
|
16
15
|
const AccordionItem = _ref => {
|
|
17
16
|
let {
|
|
18
17
|
Icon,
|
|
@@ -27,9 +26,10 @@ const AccordionItem = _ref => {
|
|
|
27
26
|
textStyles,
|
|
28
27
|
viewStyles
|
|
29
28
|
} = (0, _utilities.extractStyles)(style);
|
|
30
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
31
|
-
style: [styles.container, viewStyles]
|
|
32
|
-
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
30
|
+
style: [styles.container, viewStyles],
|
|
31
|
+
...rest
|
|
32
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
33
33
|
style: styles.row
|
|
34
34
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
35
35
|
name: icon,
|
|
@@ -61,4 +61,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
64
|
+
exports.default = _default;.StyleSheet.create({
|
|
65
|
+
container: {
|
|
66
|
+
padding: 8
|
|
67
|
+
},
|
|
68
|
+
row: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
paddingLeft: 8
|
|
72
|
+
},
|
|
73
|
+
item: {
|
|
74
|
+
marginVertical: 6,
|
|
75
|
+
paddingLeft: 8
|
|
76
|
+
},
|
|
77
|
+
content: {
|
|
78
|
+
flex: 1,
|
|
79
|
+
justifyContent: "center"
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
64
83
|
exports.default = _default;
|
|
@@ -11,7 +11,6 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
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
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
|
-
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
14
|
const Container = _ref => {
|
|
16
15
|
let {
|
|
17
16
|
useThemeGutterPadding,
|
|
@@ -73,9 +72,10 @@ const Container = _ref => {
|
|
|
73
72
|
};
|
|
74
73
|
const Wrap = elevation ? _Elevation.default : _reactNative.View;
|
|
75
74
|
if (elevation) containerStyle.elevation = elevation;
|
|
76
|
-
return /*#__PURE__*/React.createElement(Wrap,
|
|
77
|
-
style: [containerStyle, style]
|
|
78
|
-
|
|
75
|
+
return /*#__PURE__*/React.createElement(Wrap, {
|
|
76
|
+
style: [containerStyle, style],
|
|
77
|
+
...rest
|
|
78
|
+
}, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
79
79
|
source: typeof backgroundImage === "string" ? {
|
|
80
80
|
uri: backgroundImage
|
|
81
81
|
} : backgroundImage,
|
|
@@ -90,4 +90,15 @@ const Container = _ref => {
|
|
|
90
90
|
}, children));
|
|
91
91
|
};
|
|
92
92
|
var _default = (0, _theming.withTheme)(Container);
|
|
93
|
+
exports.default = _default;sizeMode: backgroundImageResizeMode,
|
|
94
|
+
style: {
|
|
95
|
+
flex: 1
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
98
|
+
style: innerStyle
|
|
99
|
+
}, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
|
+
style: innerStyle
|
|
101
|
+
}, children));
|
|
102
|
+
};
|
|
103
|
+
var _default = (0, _theming.withTheme)(Container);
|
|
93
104
|
exports.default = _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
const Table = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
children,
|
|
14
|
+
style,
|
|
15
|
+
...rest
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
18
|
+
style: [styles.wrapper, style]
|
|
19
|
+
}), children);
|
|
20
|
+
};
|
|
21
|
+
const styles = _reactNative.StyleSheet.create({
|
|
22
|
+
wrapper: {
|
|
23
|
+
display: "flex",
|
|
24
|
+
flexDirection: "column"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
var _default = Table;
|
|
28
|
+
exports.default = _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 _utilities = require("../../utilities");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
const TableCell = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
style,
|
|
16
|
+
numeric,
|
|
17
|
+
value,
|
|
18
|
+
...rest
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
textStyles,
|
|
22
|
+
viewStyles
|
|
23
|
+
} = (0, _utilities.extractStyles)(style);
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
25
|
+
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
26
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
27
|
+
numberOfLines: 1,
|
|
28
|
+
style: textStyles
|
|
29
|
+
}, children, value));
|
|
30
|
+
};
|
|
31
|
+
const styles = _reactNative.StyleSheet.create({
|
|
32
|
+
wrapper: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
display: "flex",
|
|
35
|
+
flexDirection: "row"
|
|
36
|
+
},
|
|
37
|
+
right: {
|
|
38
|
+
justifyContent: "flex-end"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
var _default = TableCell;
|
|
42
|
+
exports.default = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 _theming = require("../../theming");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
const TableHeader = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
style,
|
|
16
|
+
theme,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
20
|
+
style: [styles.wrapper, {
|
|
21
|
+
borderBottomColor: theme.colors.medium
|
|
22
|
+
}, style]
|
|
23
|
+
}), children);
|
|
24
|
+
};
|
|
25
|
+
const styles = _reactNative.StyleSheet.create({
|
|
26
|
+
wrapper: {
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "row"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var _default = (0, _theming.withTheme)(TableHeader);
|
|
32
|
+
exports.default = _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const TablePaginator = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Table Paginator"));
|
|
11
|
+
var _default = TablePaginator;
|
|
12
|
+
exports.default = _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 _theming = require("../../theming");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
const TableRow = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
style,
|
|
16
|
+
theme,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
20
|
+
style: [styles.container, {
|
|
21
|
+
borderBottomColor: theme.colors.light
|
|
22
|
+
}, style]
|
|
23
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
24
|
+
style: styles.content
|
|
25
|
+
}, children));
|
|
26
|
+
};
|
|
27
|
+
const styles = _reactNative.StyleSheet.create({
|
|
28
|
+
container: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "row"
|
|
31
|
+
},
|
|
32
|
+
content: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
flexDirection: "row"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var _default = (0, _theming.withTheme)(TableRow);
|
|
38
|
+
exports.default = _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 _utilities = require("../../utilities");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
const TableTitle = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
style,
|
|
16
|
+
numeric = false,
|
|
17
|
+
isAscending = false,
|
|
18
|
+
numberOfLines = 1,
|
|
19
|
+
title,
|
|
20
|
+
...rest
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
textStyles,
|
|
24
|
+
viewStyles
|
|
25
|
+
} = (0, _utilities.extractStyles)(style);
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
|
|
27
|
+
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
28
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
29
|
+
style: [isAscending ? styles.sorted : {
|
|
30
|
+
color: "gray"
|
|
31
|
+
}, textStyles],
|
|
32
|
+
numberOfLines: numberOfLines
|
|
33
|
+
}, children, title));
|
|
34
|
+
};
|
|
35
|
+
const styles = _reactNative.StyleSheet.create({
|
|
36
|
+
wrapper: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
display: "flex",
|
|
39
|
+
flexDirection: "row"
|
|
40
|
+
},
|
|
41
|
+
right: {
|
|
42
|
+
justifyContent: "flex-end"
|
|
43
|
+
},
|
|
44
|
+
sorted: {
|
|
45
|
+
// marginLeft: 8,
|
|
46
|
+
},
|
|
47
|
+
icon: {
|
|
48
|
+
height: 24,
|
|
49
|
+
justifyContent: "center"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var _default = TableTitle;
|
|
53
|
+
exports.default = _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
var _Table = _interopRequireDefault(require("./Table"));
|
|
43
|
+
var _TableHeader = _interopRequireDefault(require("./TableHeader"));
|
|
44
|
+
var _TablePaginator = _interopRequireDefault(require("./TablePaginator"));
|
|
45
|
+
var _TableRow = _interopRequireDefault(require("./TableRow"));
|
|
46
|
+
var _TableCell = _interopRequireDefault(require("./TableCell"));
|
|
47
|
+
var _TableTitle = _interopRequireDefault(require("./TableTitle"));
|
|
48
|
+
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;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -375,6 +375,42 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
375
375
|
return _Switch.SwitchRow;
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
|
+
Object.defineProperty(exports, "Table", {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function () {
|
|
381
|
+
return _Table.Table;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
Object.defineProperty(exports, "TableCell", {
|
|
385
|
+
enumerable: true,
|
|
386
|
+
get: function () {
|
|
387
|
+
return _Table.TableCell;
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
Object.defineProperty(exports, "TableHeader", {
|
|
391
|
+
enumerable: true,
|
|
392
|
+
get: function () {
|
|
393
|
+
return _Table.TableHeader;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
Object.defineProperty(exports, "TablePaginator", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function () {
|
|
399
|
+
return _Table.TablePaginator;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
Object.defineProperty(exports, "TableRow", {
|
|
403
|
+
enumerable: true,
|
|
404
|
+
get: function () {
|
|
405
|
+
return _Table.TableRow;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
Object.defineProperty(exports, "TableTitle", {
|
|
409
|
+
enumerable: true,
|
|
410
|
+
get: function () {
|
|
411
|
+
return _Table.TableTitle;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
378
414
|
Object.defineProperty(exports, "TextField", {
|
|
379
415
|
enumerable: true,
|
|
380
416
|
get: function () {
|
|
@@ -450,6 +486,7 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
450
486
|
var _Swiper = require("./components/Swiper");
|
|
451
487
|
var _Layout = require("./components/Layout");
|
|
452
488
|
var _index = require("./components/RadioButton/index");
|
|
489
|
+
var _Table = require("./components/Table");
|
|
453
490
|
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
454
491
|
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
455
492
|
var _CardContainerRating = _interopRequireDefault(require("./components/CardContainerRating"));
|
|
@@ -12,7 +12,9 @@ const SEED_DATA = {
|
|
|
12
12
|
category: _types.COMPONENT_TYPES.view,
|
|
13
13
|
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
14
|
layout: {},
|
|
15
|
+
triggers: [_types.Triggers.OnRefresh],
|
|
15
16
|
props: {
|
|
17
|
+
onRefresh: (0, _types.createActionProp)(),
|
|
16
18
|
horizontal: (0, _types.createStaticBoolProp)({
|
|
17
19
|
label: "Horizontal",
|
|
18
20
|
description: "Render your list horizontally",
|
|
@@ -0,0 +1,100 @@
|
|
|
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 SEED_DATA = [{
|
|
9
|
+
name: "Table",
|
|
10
|
+
tag: "Table",
|
|
11
|
+
category: _types.COMPONENT_TYPES.container,
|
|
12
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
13
|
+
layout: {
|
|
14
|
+
width: "100%"
|
|
15
|
+
},
|
|
16
|
+
props: {}
|
|
17
|
+
}, {
|
|
18
|
+
name: "Table Row",
|
|
19
|
+
tag: "TableRow",
|
|
20
|
+
category: _types.COMPONENT_TYPES.container,
|
|
21
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
22
|
+
layout: {
|
|
23
|
+
paddingLeft: 16,
|
|
24
|
+
paddingRight: 16,
|
|
25
|
+
borderBottomWidth: 1,
|
|
26
|
+
borderStyle: "solid"
|
|
27
|
+
},
|
|
28
|
+
props: {}
|
|
29
|
+
}, {
|
|
30
|
+
name: "Table Cell",
|
|
31
|
+
tag: "TableCell",
|
|
32
|
+
category: _types.COMPONENT_TYPES.container,
|
|
33
|
+
layout: {
|
|
34
|
+
paddingTop: 16,
|
|
35
|
+
paddingBottom: 16,
|
|
36
|
+
paddingLeft: 8,
|
|
37
|
+
paddingRight: 8
|
|
38
|
+
},
|
|
39
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
40
|
+
props: {
|
|
41
|
+
numeric: (0, _types.createBoolProp)({
|
|
42
|
+
label: "Is Numeric Cell?",
|
|
43
|
+
description: "Does the cell contain a numeric value?",
|
|
44
|
+
group: _types.GROUPS.data
|
|
45
|
+
}),
|
|
46
|
+
value: (0, _types.createTextProp)({
|
|
47
|
+
label: "Cell Value",
|
|
48
|
+
description: "Table Cell Value",
|
|
49
|
+
group: _types.GROUPS.data
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
name: "Table Header",
|
|
54
|
+
tag: "TableHeader",
|
|
55
|
+
category: _types.COMPONENT_TYPES.container,
|
|
56
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
57
|
+
layout: {
|
|
58
|
+
paddingLeft: 16,
|
|
59
|
+
paddingRight: 16,
|
|
60
|
+
borderBottomWidth: 1,
|
|
61
|
+
borderStyle: "solid",
|
|
62
|
+
backgroundColor: "#EFEFEF"
|
|
63
|
+
},
|
|
64
|
+
props: {}
|
|
65
|
+
}, {
|
|
66
|
+
name: "Table Title",
|
|
67
|
+
tag: "TableTitle",
|
|
68
|
+
category: _types.COMPONENT_TYPES.container,
|
|
69
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
70
|
+
layout: {
|
|
71
|
+
fontSize: 14,
|
|
72
|
+
paddingTop: 16,
|
|
73
|
+
paddingBottom: 16,
|
|
74
|
+
paddingLeft: 8,
|
|
75
|
+
paddingRight: 8
|
|
76
|
+
},
|
|
77
|
+
props: {
|
|
78
|
+
numeric: (0, _types.createBoolProp)({
|
|
79
|
+
label: "Is Numeric Cell?",
|
|
80
|
+
description: "Does the cell contain a numeric value?",
|
|
81
|
+
group: _types.GROUPS.data
|
|
82
|
+
}),
|
|
83
|
+
value: (0, _types.createTextProp)({
|
|
84
|
+
label: "Cell Value",
|
|
85
|
+
description: "Table Cell Value",
|
|
86
|
+
group: _types.GROUPS.data
|
|
87
|
+
}),
|
|
88
|
+
isAscending: (0, _types.createBoolProp)({
|
|
89
|
+
label: "Is Ascending?",
|
|
90
|
+
description: "Does the cell contain a numeric value?",
|
|
91
|
+
group: _types.GROUPS.data
|
|
92
|
+
}),
|
|
93
|
+
numberOfLines: (0, _types.createNumberProp)({
|
|
94
|
+
label: "Number of Lines",
|
|
95
|
+
description: "Number of Lines",
|
|
96
|
+
group: _types.GROUPS.basic
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
}];
|
|
100
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -40,8 +40,8 @@ function extractStyles(style) {
|
|
|
40
40
|
textDecorationStyle
|
|
41
41
|
};
|
|
42
42
|
return {
|
|
43
|
-
viewStyles,
|
|
44
|
-
textStyles
|
|
43
|
+
viewStyles: (0, _lodash.omitBy)(viewStyles, _lodash.isNil),
|
|
44
|
+
textStyles: (0, _lodash.omitBy)(textStyles, _lodash.isNil)
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
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"];
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import React from "react";
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
const Table = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
children,
|
|
7
|
+
style,
|
|
8
|
+
...rest
|
|
9
|
+
} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
11
|
+
style: [styles.wrapper, style]
|
|
12
|
+
}), children);
|
|
13
|
+
};
|
|
14
|
+
const styles = StyleSheet.create({
|
|
15
|
+
wrapper: {
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export default Table;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
import React from "react";
|
|
3
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
4
|
+
import { extractStyles } from "../../utilities";
|
|
5
|
+
const TableCell = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
style,
|
|
9
|
+
numeric,
|
|
10
|
+
value,
|
|
11
|
+
...rest
|
|
12
|
+
} = _ref;
|
|
13
|
+
const {
|
|
14
|
+
textStyles,
|
|
15
|
+
viewStyles
|
|
16
|
+
} = extractStyles(style);
|
|
17
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
18
|
+
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
20
|
+
numberOfLines: 1,
|
|
21
|
+
style: textStyles
|
|
22
|
+
}, children, value));
|
|
23
|
+
};
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
wrapper: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "row"
|
|
29
|
+
},
|
|
30
|
+
right: {
|
|
31
|
+
justifyContent: "flex-end"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export default TableCell;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import React from "react";
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import { withTheme } from "../../theming";
|
|
5
|
+
const TableHeader = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
style,
|
|
9
|
+
theme,
|
|
10
|
+
...rest
|
|
11
|
+
} = _ref;
|
|
12
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
13
|
+
style: [styles.wrapper, {
|
|
14
|
+
borderBottomColor: theme.colors.medium
|
|
15
|
+
}, style]
|
|
16
|
+
}), children);
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
wrapper: {
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "row"
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export default withTheme(TableHeader);
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import React from "react";
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import { withTheme } from "../../theming";
|
|
5
|
+
const TableRow = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
style,
|
|
9
|
+
theme,
|
|
10
|
+
...rest
|
|
11
|
+
} = _ref;
|
|
12
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
13
|
+
style: [styles.container, {
|
|
14
|
+
borderBottomColor: theme.colors.light
|
|
15
|
+
}, style]
|
|
16
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
style: styles.content
|
|
18
|
+
}, children));
|
|
19
|
+
};
|
|
20
|
+
const styles = StyleSheet.create({
|
|
21
|
+
container: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexDirection: "row"
|
|
24
|
+
},
|
|
25
|
+
content: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
flexDirection: "row"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export default withTheme(TableRow);
|