@draftbit/core 43.2.3-ab8de6.0 → 43.2.3-bd5c77.0
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 +5 -21
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheet.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -19
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +4 -20
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +6 -20
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle.js.map +1 -1
- package/lib/commonjs/components/TabView/TabView.js +103 -0
- package/lib/commonjs/components/TabView/TabView.js.map +1 -0
- package/lib/commonjs/components/TabView/TabViewItem.js +27 -0
- package/lib/commonjs/components/TabView/TabViewItem.js.map +1 -0
- package/lib/commonjs/components/TabView/index.js +24 -0
- package/lib/commonjs/components/TabView/index.js.map +1 -0
- package/lib/commonjs/index.js +6 -30
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/Card.js +1 -3
- package/lib/commonjs/mappings/Card.js.map +1 -1
- package/lib/commonjs/mappings/ImageBackground.js.map +1 -1
- package/lib/commonjs/mappings/Layout.js.map +1 -1
- package/lib/commonjs/mappings/TabView.js +80 -0
- package/lib/commonjs/mappings/TabView.js.map +1 -0
- package/lib/commonjs/utilities.js +2 -8
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/ProgressIndicator.js.map +1 -1
- package/lib/module/components/TabView/TabView.js +88 -0
- package/lib/module/components/TabView/TabView.js.map +1 -0
- package/lib/module/components/TabView/TabViewItem.js +19 -0
- package/lib/module/components/TabView/TabViewItem.js.map +1 -0
- package/lib/module/components/TabView/index.js +3 -0
- package/lib/module/components/TabView/index.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/ActionSheetCancel.js.map +1 -1
- package/lib/module/mappings/TabView.js +71 -0
- package/lib/module/mappings/TabView.js.map +1 -0
- package/lib/module/utilities.js +2 -4
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/TabView/TabView.d.ts +19 -0
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +10 -0
- package/lib/typescript/src/components/TabView/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/TabView.d.ts +111 -0
- package/lib/typescript/src/utilities.d.ts +3 -4
- package/package.json +4 -2
- package/src/components/TabView/TabView.js +33 -0
- package/src/components/TabView/TabView.tsx +97 -0
- package/src/components/TabView/TabViewItem.js +5 -0
- package/src/components/TabView/TabViewItem.tsx +21 -0
- package/src/components/TabView/index.js +2 -0
- package/src/components/TabView/index.ts +2 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -9
- package/src/mappings/TabView.js +73 -0
- package/src/mappings/TabView.ts +80 -0
- package/src/utilities.js +1 -6
- package/src/utilities.ts +1 -6
- package/lib/commonjs/components/Table/index.js +0 -56
- package/lib/commonjs/components/Table/index.js.map +0 -1
- package/lib/commonjs/components/Table/table.js +0 -36
- package/lib/commonjs/components/Table/table.js.map +0 -1
- package/lib/commonjs/components/Table/tableCell.js +0 -44
- package/lib/commonjs/components/Table/tableCell.js.map +0 -1
- package/lib/commonjs/components/Table/tableHeader.js +0 -56
- package/lib/commonjs/components/Table/tableHeader.js.map +0 -1
- package/lib/commonjs/components/Table/tablePaginator.js +0 -18
- package/lib/commonjs/components/Table/tablePaginator.js.map +0 -1
- package/lib/commonjs/components/Table/tableRow.js +0 -48
- package/lib/commonjs/components/Table/tableRow.js.map +0 -1
- package/lib/commonjs/components/Table/tableTitle.js +0 -61
- package/lib/commonjs/components/Table/tableTitle.js.map +0 -1
- package/lib/commonjs/mappings/Table.js +0 -99
- package/lib/commonjs/mappings/Table.js.map +0 -1
- package/lib/module/components/Table/index.js +0 -7
- package/lib/module/components/Table/index.js.map +0 -1
- package/lib/module/components/Table/table.js +0 -24
- package/lib/module/components/Table/table.js.map +0 -1
- package/lib/module/components/Table/tableCell.js +0 -32
- package/lib/module/components/Table/tableCell.js.map +0 -1
- package/lib/module/components/Table/tableHeader.js +0 -28
- package/lib/module/components/Table/tableHeader.js.map +0 -1
- package/lib/module/components/Table/tablePaginator.js +0 -7
- package/lib/module/components/Table/tablePaginator.js.map +0 -1
- package/lib/module/components/Table/tableRow.js +0 -34
- package/lib/module/components/Table/tableRow.js.map +0 -1
- package/lib/module/components/Table/tableTitle.js +0 -48
- package/lib/module/components/Table/tableTitle.js.map +0 -1
- package/lib/module/mappings/Table.js +0 -90
- package/lib/module/mappings/Table.js.map +0 -1
- package/lib/typescript/src/components/Table/index.d.ts +0 -6
- package/lib/typescript/src/components/Table/table.d.ts +0 -8
- package/lib/typescript/src/components/Table/tableCell.d.ts +0 -10
- package/lib/typescript/src/components/Table/tableHeader.d.ts +0 -12
- package/lib/typescript/src/components/Table/tablePaginator.d.ts +0 -3
- package/lib/typescript/src/components/Table/tableRow.d.ts +0 -12
- package/lib/typescript/src/components/Table/tableTitle.d.ts +0 -12
- package/src/components/Table/index.js +0 -6
- package/src/components/Table/index.tsx +0 -6
- package/src/components/Table/table.js +0 -10
- package/src/components/Table/table.tsx +0 -22
- package/src/components/Table/tableCell.js +0 -17
- package/src/components/Table/tableCell.tsx +0 -37
- package/src/components/Table/tableHeader.js +0 -11
- package/src/components/Table/tableHeader.tsx +0 -28
- package/src/components/Table/tablePaginator.js +0 -5
- package/src/components/Table/tablePaginator.tsx +0 -10
- package/src/components/Table/tableRow.js +0 -16
- package/src/components/Table/tableRow.tsx +0 -31
- package/src/components/Table/tableTitle.js +0 -28
- package/src/components/Table/tableTitle.tsx +0 -59
- package/src/mappings/Table.js +0 -102
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
5
|
-
|
|
6
|
-
const TableCell = _ref => {
|
|
7
|
-
let {
|
|
8
|
-
children,
|
|
9
|
-
style,
|
|
10
|
-
numeric,
|
|
11
|
-
value,
|
|
12
|
-
...rest
|
|
13
|
-
} = _ref;
|
|
14
|
-
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
15
|
-
style: [styles.wrapper, numeric && styles.right, style]
|
|
16
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
17
|
-
numberOfLines: 1
|
|
18
|
-
}, children, value));
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const styles = StyleSheet.create({
|
|
22
|
-
wrapper: {
|
|
23
|
-
flex: 1,
|
|
24
|
-
display: "flex",
|
|
25
|
-
flexDirection: "row"
|
|
26
|
-
},
|
|
27
|
-
right: {
|
|
28
|
-
justifyContent: "flex-end"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
export default TableCell;
|
|
32
|
-
//# sourceMappingURL=tableCell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tableCell.tsx"],"names":["React","View","Text","StyleSheet","TableCell","children","style","numeric","value","rest","styles","wrapper","right","create","flex","display","flexDirection","justifyContent"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,EAA2CC,UAA3C,QAA6D,cAA7D;;AASA,MAAMC,SAAS,GAAG;AAAA,MAAC;AACjBC,IAAAA,QADiB;AAEjBC,IAAAA,KAFiB;AAGjBC,IAAAA,OAHiB;AAIjBC,IAAAA,KAJiB;AAKjB,OAAGC;AALc,GAAD;AAAA,sBAOhB,oBAAC,IAAD,eAAUA,IAAV;AAAgB,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,OAAR,EAAiBJ,OAAO,IAAIG,MAAM,CAACE,KAAnC,EAA0CN,KAA1C;AAAvB,mBACE,oBAAC,IAAD;AAAM,IAAA,aAAa,EAAE;AAArB,KACGD,QADH,EAEGG,KAFH,CADF,CAPgB;AAAA,CAAlB;;AAeA,MAAME,MAAM,GAAGP,UAAU,CAACU,MAAX,CAAkB;AAC/BF,EAAAA,OAAO,EAAE;AACPG,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,OAAO,EAAE,MAFF;AAGPC,IAAAA,aAAa,EAAE;AAHR,GADsB;AAM/BJ,EAAAA,KAAK,EAAE;AACLK,IAAAA,cAAc,EAAE;AADX;AANwB,CAAlB,CAAf;AAWA,eAAeb,SAAf","sourcesContent":["import React from \"react\";\nimport { View, Text, StyleProp, ViewStyle, StyleSheet } from \"react-native\";\n\nexport interface TableCellProps {\n children: React.ReactNode;\n numeric?: boolean;\n style?: StyleProp<ViewStyle>;\n value: string;\n}\n\nconst TableCell = ({\n children,\n style,\n numeric,\n value,\n ...rest\n}: TableCellProps) => (\n <View {...rest} style={[styles.wrapper, numeric && styles.right, style]}>\n <Text numberOfLines={1}>\n {children}\n {value}\n </Text>\n </View>\n);\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n },\n right: {\n justifyContent: \"flex-end\",\n },\n});\n\nexport default TableCell;\n"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View, StyleSheet } from "react-native";
|
|
5
|
-
import { withTheme } from "../../theming";
|
|
6
|
-
|
|
7
|
-
const TableHeader = _ref => {
|
|
8
|
-
let {
|
|
9
|
-
children,
|
|
10
|
-
style,
|
|
11
|
-
theme,
|
|
12
|
-
...rest
|
|
13
|
-
} = _ref;
|
|
14
|
-
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
15
|
-
style: [styles.wrapper, {
|
|
16
|
-
borderBottomColor: theme.colors.medium
|
|
17
|
-
}, style]
|
|
18
|
-
}), children);
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const styles = StyleSheet.create({
|
|
22
|
-
wrapper: {
|
|
23
|
-
display: "flex",
|
|
24
|
-
flexDirection: "row"
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export default withTheme(TableHeader);
|
|
28
|
-
//# sourceMappingURL=tableHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tableHeader.tsx"],"names":["React","View","StyleSheet","withTheme","TableHeader","children","style","theme","rest","styles","wrapper","borderBottomColor","colors","medium","create","display","flexDirection"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAqCC,UAArC,QAAuD,cAAvD;AAEA,SAASC,SAAT,QAA0B,eAA1B;;AAQA,MAAMC,WAAW,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,KAAZ;AAAmBC,IAAAA,KAAnB;AAA0B,OAAGC;AAA7B,GAAD;AAAA,sBAClB,oBAAC,IAAD,eACMA,IADN;AAEE,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,OAAR,EAAiB;AAAEC,MAAAA,iBAAiB,EAAEJ,KAAK,CAACK,MAAN,CAAaC;AAAlC,KAAjB,EAA6DP,KAA7D;AAFT,MAIGD,QAJH,CADkB;AAAA,CAApB;;AASA,MAAMI,MAAM,GAAGP,UAAU,CAACY,MAAX,CAAkB;AAC/BJ,EAAAA,OAAO,EAAE;AACPK,IAAAA,OAAO,EAAE,MADF;AAEPC,IAAAA,aAAa,EAAE;AAFR;AADsB,CAAlB,CAAf;AAOA,eAAeb,SAAS,CAACC,WAAD,CAAxB","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle, StyleSheet } from \"react-native\";\nimport { Theme } from \"../../styles/DefaultTheme\";\nimport { withTheme } from \"../../theming\";\n\nexport interface TableHeaderProps {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n}\n\nconst TableHeader = ({ children, style, theme, ...rest }: TableHeaderProps) => (\n <View\n {...rest}\n style={[styles.wrapper, { borderBottomColor: theme.colors.medium }, style]}\n >\n {children}\n </View>\n);\n\nconst styles = StyleSheet.create({\n wrapper: {\n display: \"flex\",\n flexDirection: \"row\",\n },\n});\n\nexport default withTheme(TableHeader);\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, Text } from "react-native";
|
|
3
|
-
|
|
4
|
-
const TablePaginator = () => /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, null, "Table Paginator"));
|
|
5
|
-
|
|
6
|
-
export default TablePaginator;
|
|
7
|
-
//# sourceMappingURL=tablePaginator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tablePaginator.tsx"],"names":["React","View","Text","TablePaginator"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;;AAEA,MAAMC,cAAc,GAAG,mBACrB,oBAAC,IAAD,qBACE,oBAAC,IAAD,0BADF,CADF;;AAMA,eAAeA,cAAf","sourcesContent":["import React from \"react\";\nimport { View, Text } from \"react-native\";\n\nconst TablePaginator = () => (\n <View>\n <Text>Table Paginator</Text>\n </View>\n);\n\nexport default TablePaginator;\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View, StyleSheet } from "react-native";
|
|
5
|
-
import { withTheme } from "../../theming";
|
|
6
|
-
|
|
7
|
-
const TableRow = _ref => {
|
|
8
|
-
let {
|
|
9
|
-
children,
|
|
10
|
-
style,
|
|
11
|
-
theme,
|
|
12
|
-
...rest
|
|
13
|
-
} = _ref;
|
|
14
|
-
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
15
|
-
style: [styles.container, {
|
|
16
|
-
borderBottomColor: theme.colors.light
|
|
17
|
-
}, style]
|
|
18
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
19
|
-
style: styles.content
|
|
20
|
-
}, children));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
container: {
|
|
25
|
-
display: "flex",
|
|
26
|
-
flexDirection: "row"
|
|
27
|
-
},
|
|
28
|
-
content: {
|
|
29
|
-
flex: 1,
|
|
30
|
-
flexDirection: "row"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export default withTheme(TableRow);
|
|
34
|
-
//# sourceMappingURL=tableRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tableRow.tsx"],"names":["React","View","StyleSheet","withTheme","TableRow","children","style","theme","rest","styles","container","borderBottomColor","colors","light","content","create","display","flexDirection","flex"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAqCC,UAArC,QAAuD,cAAvD;AAEA,SAASC,SAAT,QAA0B,eAA1B;;AAOA,MAAMC,QAAQ,GAAG;AAAA,MAAC;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,KAAZ;AAAmBC,IAAAA,KAAnB;AAA0B,OAAGC;AAA7B,GAAD;AAAA,sBACf,oBAAC,IAAD,eACMA,IADN;AAEE,IAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmB;AAAEC,MAAAA,iBAAiB,EAAEJ,KAAK,CAACK,MAAN,CAAaC;AAAlC,KAAnB,EAA8DP,KAA9D;AAFT,mBAIE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEG,MAAM,CAACK;AAApB,KAA8BT,QAA9B,CAJF,CADe;AAAA,CAAjB;;AASA,MAAMI,MAAM,GAAGP,UAAU,CAACa,MAAX,CAAkB;AAC/BL,EAAAA,SAAS,EAAE;AACTM,IAAAA,OAAO,EAAE,MADA;AAETC,IAAAA,aAAa,EAAE;AAFN,GADoB;AAK/BH,EAAAA,OAAO,EAAE;AACPI,IAAAA,IAAI,EAAE,CADC;AAEPD,IAAAA,aAAa,EAAE;AAFR;AALsB,CAAlB,CAAf;AAWA,eAAed,SAAS,CAACC,QAAD,CAAxB","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle, StyleSheet } from \"react-native\";\nimport { Theme } from \"../../styles/DefaultTheme\";\nimport { withTheme } from \"../../theming\";\nexport interface TableRowProps {\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n}\n\nconst TableRow = ({ children, style, theme, ...rest }: TableRowProps) => (\n <View\n {...rest}\n style={[styles.container, { borderBottomColor: theme.colors.light }, style]}\n >\n <View style={styles.content}>{children}</View>\n </View>\n);\n\nconst styles = StyleSheet.create({\n container: {\n display: \"flex\",\n flexDirection: \"row\",\n },\n content: {\n flex: 1,\n flexDirection: \"row\",\n },\n});\n\nexport default withTheme(TableRow);\n"]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
5
|
-
import { extractStyles } from "../../utilities";
|
|
6
|
-
|
|
7
|
-
const TableTitle = _ref => {
|
|
8
|
-
let {
|
|
9
|
-
children,
|
|
10
|
-
style,
|
|
11
|
-
numeric = false,
|
|
12
|
-
isAscending = false,
|
|
13
|
-
numberOfLines = 1,
|
|
14
|
-
title,
|
|
15
|
-
...rest
|
|
16
|
-
} = _ref;
|
|
17
|
-
const {
|
|
18
|
-
textStyles,
|
|
19
|
-
viewStyles
|
|
20
|
-
} = extractStyles(style);
|
|
21
|
-
return /*#__PURE__*/React.createElement(View, _extends({}, rest, {
|
|
22
|
-
style: [styles.wrapper, numeric && styles.right, viewStyles]
|
|
23
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
24
|
-
style: [isAscending ? styles.sorted : {
|
|
25
|
-
color: "gray"
|
|
26
|
-
}, textStyles],
|
|
27
|
-
numberOfLines: numberOfLines
|
|
28
|
-
}, children, title));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const styles = StyleSheet.create({
|
|
32
|
-
wrapper: {
|
|
33
|
-
flex: 1,
|
|
34
|
-
display: "flex",
|
|
35
|
-
flexDirection: "row"
|
|
36
|
-
},
|
|
37
|
-
right: {
|
|
38
|
-
justifyContent: "flex-end"
|
|
39
|
-
},
|
|
40
|
-
sorted: {// marginLeft: 8,
|
|
41
|
-
},
|
|
42
|
-
icon: {
|
|
43
|
-
height: 24,
|
|
44
|
-
justifyContent: "center"
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export default TableTitle;
|
|
48
|
-
//# sourceMappingURL=tableTitle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["tableTitle.tsx"],"names":["React","View","Text","StyleSheet","extractStyles","TableTitle","children","style","numeric","isAscending","numberOfLines","title","rest","textStyles","viewStyles","styles","wrapper","right","sorted","color","create","flex","display","flexDirection","justifyContent","icon","height"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,EAA2CC,UAA3C,QAA6D,cAA7D;AACA,SAASC,aAAT,QAA8B,iBAA9B;;AAWA,MAAMC,UAAU,GAAG,QAQG;AAAA,MARF;AAClBC,IAAAA,QADkB;AAElBC,IAAAA,KAFkB;AAGlBC,IAAAA,OAAO,GAAG,KAHQ;AAIlBC,IAAAA,WAAW,GAAG,KAJI;AAKlBC,IAAAA,aAAa,GAAG,CALE;AAMlBC,IAAAA,KANkB;AAOlB,OAAGC;AAPe,GAQE;AACpB,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6BV,aAAa,CAACG,KAAD,CAAhD;AAEA,sBACE,oBAAC,IAAD,eACMK,IADN;AAEE,IAAA,KAAK,EAAE,CAACG,MAAM,CAACC,OAAR,EAAiBR,OAAO,IAAIO,MAAM,CAACE,KAAnC,EAA0CH,UAA1C;AAFT,mBAIE,oBAAC,IAAD;AACE,IAAA,KAAK,EAAE,CAACL,WAAW,GAAGM,MAAM,CAACG,MAAV,GAAmB;AAAEC,MAAAA,KAAK,EAAE;AAAT,KAA/B,EAAkDN,UAAlD,CADT;AAEE,IAAA,aAAa,EAAEH;AAFjB,KAIGJ,QAJH,EAKGK,KALH,CAJF,CADF;AAcD,CAzBD;;AA2BA,MAAMI,MAAM,GAAGZ,UAAU,CAACiB,MAAX,CAAkB;AAC/BJ,EAAAA,OAAO,EAAE;AACPK,IAAAA,IAAI,EAAE,CADC;AAEPC,IAAAA,OAAO,EAAE,MAFF;AAGPC,IAAAA,aAAa,EAAE;AAHR,GADsB;AAM/BN,EAAAA,KAAK,EAAE;AACLO,IAAAA,cAAc,EAAE;AADX,GANwB;AAS/BN,EAAAA,MAAM,EAAE,CACN;AADM,GATuB;AAY/BO,EAAAA,IAAI,EAAE;AACJC,IAAAA,MAAM,EAAE,EADJ;AAEJF,IAAAA,cAAc,EAAE;AAFZ;AAZyB,CAAlB,CAAf;AAkBA,eAAenB,UAAf","sourcesContent":["import React from \"react\";\nimport { View, Text, StyleProp, ViewStyle, StyleSheet } from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\nexport interface TableCellProps {\n children: React.ReactNode;\n numeric?: boolean;\n isAscending: boolean;\n numberOfLines?: number;\n title?: string;\n style?: StyleProp<ViewStyle>;\n}\n\nconst TableTitle = ({\n children,\n style,\n numeric = false,\n isAscending = false,\n numberOfLines = 1,\n title,\n ...rest\n}: TableCellProps) => {\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <View\n {...rest}\n style={[styles.wrapper, numeric && styles.right, viewStyles]}\n >\n <Text\n style={[isAscending ? styles.sorted : { color: \"gray\" }, textStyles]}\n numberOfLines={numberOfLines}\n >\n {children}\n {title}\n </Text>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n },\n right: {\n justifyContent: \"flex-end\",\n },\n sorted: {\n // marginLeft: 8,\n },\n icon: {\n height: 24,\n justifyContent: \"center\",\n },\n});\n\nexport default TableTitle;\n"]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, GROUPS, createBoolProp, createTextProp, createNumberProp } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = [{
|
|
3
|
-
name: "Table",
|
|
4
|
-
tag: "Table",
|
|
5
|
-
category: COMPONENT_TYPES.container,
|
|
6
|
-
layout: {
|
|
7
|
-
width: "100%"
|
|
8
|
-
},
|
|
9
|
-
props: {}
|
|
10
|
-
}, {
|
|
11
|
-
name: "Table Row",
|
|
12
|
-
tag: "TableRow",
|
|
13
|
-
category: COMPONENT_TYPES.container,
|
|
14
|
-
layout: {
|
|
15
|
-
paddingLeft: 16,
|
|
16
|
-
paddingRight: 16,
|
|
17
|
-
borderBottomWidth: 1,
|
|
18
|
-
borderStyle: "solid"
|
|
19
|
-
},
|
|
20
|
-
props: {}
|
|
21
|
-
}, {
|
|
22
|
-
name: "Table Cell",
|
|
23
|
-
tag: "TableCell",
|
|
24
|
-
category: COMPONENT_TYPES.container,
|
|
25
|
-
layout: {
|
|
26
|
-
paddingTop: 16,
|
|
27
|
-
paddingBottom: 16,
|
|
28
|
-
paddingLeft: 8,
|
|
29
|
-
paddingRight: 8
|
|
30
|
-
},
|
|
31
|
-
props: {
|
|
32
|
-
numeric: createBoolProp({
|
|
33
|
-
label: "Is Numeric Cell?",
|
|
34
|
-
description: "Does the cell contain a numeric value?",
|
|
35
|
-
group: GROUPS.data
|
|
36
|
-
}),
|
|
37
|
-
value: createTextProp({
|
|
38
|
-
label: "Cell Value",
|
|
39
|
-
description: "Table Cell Value",
|
|
40
|
-
group: GROUPS.data
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
name: "Table Header",
|
|
45
|
-
tag: "TableHeader",
|
|
46
|
-
category: COMPONENT_TYPES.container,
|
|
47
|
-
layout: {
|
|
48
|
-
paddingLeft: 16,
|
|
49
|
-
paddingRight: 16,
|
|
50
|
-
borderBottomWidth: 1,
|
|
51
|
-
borderStyle: "solid",
|
|
52
|
-
backgroundColor: "#EFEFEF"
|
|
53
|
-
},
|
|
54
|
-
props: {}
|
|
55
|
-
}, {
|
|
56
|
-
name: "Table Title",
|
|
57
|
-
tag: "TableTitle",
|
|
58
|
-
category: COMPONENT_TYPES.container,
|
|
59
|
-
layout: {
|
|
60
|
-
fontSize: 14,
|
|
61
|
-
fontWeight: "500",
|
|
62
|
-
paddingTop: 16,
|
|
63
|
-
paddingBottom: 16,
|
|
64
|
-
paddingLeft: 8,
|
|
65
|
-
paddingRight: 8
|
|
66
|
-
},
|
|
67
|
-
props: {
|
|
68
|
-
numeric: createBoolProp({
|
|
69
|
-
label: "Is Numeric Cell?",
|
|
70
|
-
description: "Does the cell contain a numeric value?",
|
|
71
|
-
group: GROUPS.data
|
|
72
|
-
}),
|
|
73
|
-
value: createTextProp({
|
|
74
|
-
label: "Cell Value",
|
|
75
|
-
description: "Table Cell Value",
|
|
76
|
-
group: GROUPS.data
|
|
77
|
-
}),
|
|
78
|
-
isAscending: createBoolProp({
|
|
79
|
-
label: "Is Ascending?",
|
|
80
|
-
description: "Does the cell contain a numeric value?",
|
|
81
|
-
group: GROUPS.data
|
|
82
|
-
}),
|
|
83
|
-
numberOfLines: createNumberProp({
|
|
84
|
-
label: "Number of Lines",
|
|
85
|
-
description: "Number of Lines",
|
|
86
|
-
group: GROUPS.basic
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
}];
|
|
90
|
-
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["Table.js"],"names":["COMPONENT_TYPES","GROUPS","createBoolProp","createTextProp","createNumberProp","SEED_DATA","name","tag","category","container","layout","width","props","paddingLeft","paddingRight","borderBottomWidth","borderStyle","paddingTop","paddingBottom","numeric","label","description","group","data","value","backgroundColor","fontSize","fontWeight","isAscending","numberOfLines","basic"],"mappings":"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","sourcesContent":["import {\n COMPONENT_TYPES,\n GROUPS,\n createBoolProp,\n createTextProp,\n createNumberProp,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Table\",\n tag: \"Table\",\n category: COMPONENT_TYPES.container,\n layout: {\n width: \"100%\",\n },\n props: {},\n },\n {\n name: \"Table Row\",\n tag: \"TableRow\",\n category: COMPONENT_TYPES.container,\n layout: {\n paddingLeft: 16,\n paddingRight: 16,\n borderBottomWidth: 1,\n borderStyle: \"solid\",\n },\n props: {},\n },\n {\n name: \"Table Cell\",\n tag: \"TableCell\",\n category: COMPONENT_TYPES.container,\n layout: {\n paddingTop: 16,\n paddingBottom: 16,\n paddingLeft: 8,\n paddingRight: 8,\n },\n props: {\n numeric: createBoolProp({\n label: \"Is Numeric Cell?\",\n description: \"Does the cell contain a numeric value?\",\n group: GROUPS.data,\n }),\n value: createTextProp({\n label: \"Cell Value\",\n description: \"Table Cell Value\",\n group: GROUPS.data,\n }),\n },\n },\n {\n name: \"Table Header\",\n tag: \"TableHeader\",\n category: COMPONENT_TYPES.container,\n layout: {\n paddingLeft: 16,\n paddingRight: 16,\n borderBottomWidth: 1,\n borderStyle: \"solid\",\n backgroundColor: \"#EFEFEF\",\n },\n props: {},\n },\n {\n name: \"Table Title\",\n tag: \"TableTitle\",\n category: COMPONENT_TYPES.container,\n layout: {\n fontSize: 14,\n fontWeight: \"500\",\n paddingTop: 16,\n paddingBottom: 16,\n paddingLeft: 8,\n paddingRight: 8,\n },\n props: {\n numeric: createBoolProp({\n label: \"Is Numeric Cell?\",\n description: \"Does the cell contain a numeric value?\",\n group: GROUPS.data,\n }),\n value: createTextProp({\n label: \"Cell Value\",\n description: \"Table Cell Value\",\n group: GROUPS.data,\n }),\n isAscending: createBoolProp({\n label: \"Is Ascending?\",\n description: \"Does the cell contain a numeric value?\",\n group: GROUPS.data,\n }),\n numberOfLines: createNumberProp({\n label: \"Number of Lines\",\n description: \"Number of Lines\",\n group: GROUPS.basic,\n }),\n },\n },\n];\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as Table } from "./table";
|
|
2
|
-
export { default as TableHeader } from "./tableHeader";
|
|
3
|
-
export { default as TablePaginator } from "./tablePaginator";
|
|
4
|
-
export { default as TableRow } from "./tableRow";
|
|
5
|
-
export { default as TableCell } from "./tableCell";
|
|
6
|
-
export { default as TableTitle } from "./tableTitle";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface TableProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
style?: StyleProp<ViewStyle>;
|
|
6
|
-
}
|
|
7
|
-
declare const Table: ({ children, style, ...rest }: TableProps) => JSX.Element;
|
|
8
|
-
export default Table;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface TableCellProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
numeric?: boolean;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
value: string;
|
|
8
|
-
}
|
|
9
|
-
declare const TableCell: ({ children, style, numeric, value, ...rest }: TableCellProps) => JSX.Element;
|
|
10
|
-
export default TableCell;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { Theme } from "../../styles/DefaultTheme";
|
|
4
|
-
export interface TableHeaderProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
theme: Theme;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<TableHeaderProps, "theme"> & {
|
|
10
|
-
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
11
|
-
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<TableHeaderProps> & (({ children, style, theme, ...rest }: TableHeaderProps) => JSX.Element), {}>;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { Theme } from "../../styles/DefaultTheme";
|
|
4
|
-
export interface TableRowProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
theme: Theme;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<TableRowProps, "theme"> & {
|
|
10
|
-
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
11
|
-
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<TableRowProps> & (({ children, style, theme, ...rest }: TableRowProps) => JSX.Element), {}>;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface TableCellProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
numeric?: boolean;
|
|
6
|
-
isAscending: boolean;
|
|
7
|
-
numberOfLines?: number;
|
|
8
|
-
title?: string;
|
|
9
|
-
style?: StyleProp<ViewStyle>;
|
|
10
|
-
}
|
|
11
|
-
declare const TableTitle: ({ children, style, numeric, isAscending, numberOfLines, title, ...rest }: TableCellProps) => JSX.Element;
|
|
12
|
-
export default TableTitle;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as Table } from "./table";
|
|
2
|
-
export { default as TableHeader } from "./tableHeader";
|
|
3
|
-
export { default as TablePaginator } from "./tablePaginator";
|
|
4
|
-
export { default as TableRow } from "./tableRow";
|
|
5
|
-
export { default as TableCell } from "./tableCell";
|
|
6
|
-
export { default as TableTitle } from "./tableTitle";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { default as Table } from "./table";
|
|
2
|
-
export { default as TableHeader } from "./tableHeader";
|
|
3
|
-
export { default as TablePaginator } from "./tablePaginator";
|
|
4
|
-
export { default as TableRow } from "./tableRow";
|
|
5
|
-
export { default as TableCell } from "./tableCell";
|
|
6
|
-
export { default as TableTitle } from "./tableTitle";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
const Table = ({ children, style, ...rest }) => (React.createElement(View, { ...rest, style: [styles.wrapper, style] }, children));
|
|
4
|
-
const styles = StyleSheet.create({
|
|
5
|
-
wrapper: {
|
|
6
|
-
display: "flex",
|
|
7
|
-
flexDirection: "column",
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
export default Table;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
|
|
4
|
-
export interface TableProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const Table = ({ children, style, ...rest }: TableProps) => (
|
|
10
|
-
<View {...rest} style={[styles.wrapper, style]}>
|
|
11
|
-
{children}
|
|
12
|
-
</View>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const styles = StyleSheet.create({
|
|
16
|
-
wrapper: {
|
|
17
|
-
display: "flex",
|
|
18
|
-
flexDirection: "column",
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default Table;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
3
|
-
const TableCell = ({ children, style, numeric, value, ...rest }) => (React.createElement(View, { ...rest, style: [styles.wrapper, numeric && styles.right, style] },
|
|
4
|
-
React.createElement(Text, { numberOfLines: 1 },
|
|
5
|
-
children,
|
|
6
|
-
value)));
|
|
7
|
-
const styles = StyleSheet.create({
|
|
8
|
-
wrapper: {
|
|
9
|
-
flex: 1,
|
|
10
|
-
display: "flex",
|
|
11
|
-
flexDirection: "row",
|
|
12
|
-
},
|
|
13
|
-
right: {
|
|
14
|
-
justifyContent: "flex-end",
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
export default TableCell;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, Text, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
|
|
4
|
-
export interface TableCellProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
numeric?: boolean;
|
|
7
|
-
style?: StyleProp<ViewStyle>;
|
|
8
|
-
value: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const TableCell = ({
|
|
12
|
-
children,
|
|
13
|
-
style,
|
|
14
|
-
numeric,
|
|
15
|
-
value,
|
|
16
|
-
...rest
|
|
17
|
-
}: TableCellProps) => (
|
|
18
|
-
<View {...rest} style={[styles.wrapper, numeric && styles.right, style]}>
|
|
19
|
-
<Text numberOfLines={1}>
|
|
20
|
-
{children}
|
|
21
|
-
{value}
|
|
22
|
-
</Text>
|
|
23
|
-
</View>
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const styles = StyleSheet.create({
|
|
27
|
-
wrapper: {
|
|
28
|
-
flex: 1,
|
|
29
|
-
display: "flex",
|
|
30
|
-
flexDirection: "row",
|
|
31
|
-
},
|
|
32
|
-
right: {
|
|
33
|
-
justifyContent: "flex-end",
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export default TableCell;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { withTheme } from "../../theming";
|
|
4
|
-
const TableHeader = ({ children, style, theme, ...rest }) => (React.createElement(View, { ...rest, style: [styles.wrapper, { borderBottomColor: theme.colors.medium }, style] }, children));
|
|
5
|
-
const styles = StyleSheet.create({
|
|
6
|
-
wrapper: {
|
|
7
|
-
display: "flex",
|
|
8
|
-
flexDirection: "row",
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
export default withTheme(TableHeader);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
import { Theme } from "../../styles/DefaultTheme";
|
|
4
|
-
import { withTheme } from "../../theming";
|
|
5
|
-
|
|
6
|
-
export interface TableHeaderProps {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
style?: StyleProp<ViewStyle>;
|
|
9
|
-
theme: Theme;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const TableHeader = ({ children, style, theme, ...rest }: TableHeaderProps) => (
|
|
13
|
-
<View
|
|
14
|
-
{...rest}
|
|
15
|
-
style={[styles.wrapper, { borderBottomColor: theme.colors.medium }, style]}
|
|
16
|
-
>
|
|
17
|
-
{children}
|
|
18
|
-
</View>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
const styles = StyleSheet.create({
|
|
22
|
-
wrapper: {
|
|
23
|
-
display: "flex",
|
|
24
|
-
flexDirection: "row",
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export default withTheme(TableHeader);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { withTheme } from "../../theming";
|
|
4
|
-
const TableRow = ({ children, style, theme, ...rest }) => (React.createElement(View, { ...rest, style: [styles.container, { borderBottomColor: theme.colors.light }, style] },
|
|
5
|
-
React.createElement(View, { style: styles.content }, children)));
|
|
6
|
-
const styles = StyleSheet.create({
|
|
7
|
-
container: {
|
|
8
|
-
display: "flex",
|
|
9
|
-
flexDirection: "row",
|
|
10
|
-
},
|
|
11
|
-
content: {
|
|
12
|
-
flex: 1,
|
|
13
|
-
flexDirection: "row",
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
export default withTheme(TableRow);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
import { Theme } from "../../styles/DefaultTheme";
|
|
4
|
-
import { withTheme } from "../../theming";
|
|
5
|
-
export interface TableRowProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
style?: StyleProp<ViewStyle>;
|
|
8
|
-
theme: Theme;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const TableRow = ({ children, style, theme, ...rest }: TableRowProps) => (
|
|
12
|
-
<View
|
|
13
|
-
{...rest}
|
|
14
|
-
style={[styles.container, { borderBottomColor: theme.colors.light }, style]}
|
|
15
|
-
>
|
|
16
|
-
<View style={styles.content}>{children}</View>
|
|
17
|
-
</View>
|
|
18
|
-
);
|
|
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
|
-
|
|
31
|
-
export default withTheme(TableRow);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, Text, StyleSheet } from "react-native";
|
|
3
|
-
import { extractStyles } from "../../utilities";
|
|
4
|
-
const TableTitle = ({ children, style, numeric = false, isAscending = false, numberOfLines = 1, title, ...rest }) => {
|
|
5
|
-
const { textStyles, viewStyles } = extractStyles(style);
|
|
6
|
-
return (React.createElement(View, { ...rest, style: [styles.wrapper, numeric && styles.right, viewStyles] },
|
|
7
|
-
React.createElement(Text, { style: [isAscending ? styles.sorted : { color: "gray" }, textStyles], numberOfLines: numberOfLines },
|
|
8
|
-
children,
|
|
9
|
-
title)));
|
|
10
|
-
};
|
|
11
|
-
const styles = StyleSheet.create({
|
|
12
|
-
wrapper: {
|
|
13
|
-
flex: 1,
|
|
14
|
-
display: "flex",
|
|
15
|
-
flexDirection: "row",
|
|
16
|
-
},
|
|
17
|
-
right: {
|
|
18
|
-
justifyContent: "flex-end",
|
|
19
|
-
},
|
|
20
|
-
sorted: {
|
|
21
|
-
// marginLeft: 8,
|
|
22
|
-
},
|
|
23
|
-
icon: {
|
|
24
|
-
height: 24,
|
|
25
|
-
justifyContent: "center",
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
export default TableTitle;
|