@draftbit/core 43.2.3-ab8de6.0 → 43.2.3
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/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheet.js.map +1 -1
- package/lib/commonjs/components/CardContainer.js +16 -5
- package/lib/commonjs/components/CardContainer.js.map +1 -1
- package/lib/commonjs/components/Divider.js +13 -3
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle.js.map +1 -1
- package/lib/commonjs/components/TextField.js +11 -4
- package/lib/commonjs/components/TextField.js.map +1 -1
- package/lib/commonjs/index.js +0 -38
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheet.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/CardBlock.js.map +1 -1
- package/lib/commonjs/mappings/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/mappings/CircleImage.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/Modal.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/commonjs/mappings/StarRating.js.map +1 -1
- package/lib/commonjs/mappings/Touchable.js.map +1 -1
- package/lib/commonjs/theming.js.map +1 -1
- package/lib/commonjs/utilities.js +2 -8
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/TextField.js +11 -4
- package/lib/module/components/TextField.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utilities.js +2 -4
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/utilities.d.ts +3 -4
- package/package.json +2 -2
- package/src/components/TextField.js +9 -2
- package/src/components/TextField.tsx +8 -2
- package/src/index.js +0 -1
- package/src/index.tsx +0 -9
- 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,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;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View, Text, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
import { extractStyles } from "../../utilities";
|
|
4
|
-
|
|
5
|
-
export interface TableCellProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
numeric?: boolean;
|
|
8
|
-
isAscending: boolean;
|
|
9
|
-
numberOfLines?: number;
|
|
10
|
-
title?: string;
|
|
11
|
-
style?: StyleProp<ViewStyle>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const TableTitle = ({
|
|
15
|
-
children,
|
|
16
|
-
style,
|
|
17
|
-
numeric = false,
|
|
18
|
-
isAscending = false,
|
|
19
|
-
numberOfLines = 1,
|
|
20
|
-
title,
|
|
21
|
-
...rest
|
|
22
|
-
}: TableCellProps) => {
|
|
23
|
-
const { textStyles, viewStyles } = extractStyles(style);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<View
|
|
27
|
-
{...rest}
|
|
28
|
-
style={[styles.wrapper, numeric && styles.right, viewStyles]}
|
|
29
|
-
>
|
|
30
|
-
<Text
|
|
31
|
-
style={[isAscending ? styles.sorted : { color: "gray" }, textStyles]}
|
|
32
|
-
numberOfLines={numberOfLines}
|
|
33
|
-
>
|
|
34
|
-
{children}
|
|
35
|
-
{title}
|
|
36
|
-
</Text>
|
|
37
|
-
</View>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const styles = StyleSheet.create({
|
|
42
|
-
wrapper: {
|
|
43
|
-
flex: 1,
|
|
44
|
-
display: "flex",
|
|
45
|
-
flexDirection: "row",
|
|
46
|
-
},
|
|
47
|
-
right: {
|
|
48
|
-
justifyContent: "flex-end",
|
|
49
|
-
},
|
|
50
|
-
sorted: {
|
|
51
|
-
// marginLeft: 8,
|
|
52
|
-
},
|
|
53
|
-
icon: {
|
|
54
|
-
height: 24,
|
|
55
|
-
justifyContent: "center",
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
export default TableTitle;
|
package/src/mappings/Table.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
GROUPS,
|
|
4
|
-
createBoolProp,
|
|
5
|
-
createTextProp,
|
|
6
|
-
createNumberProp,
|
|
7
|
-
} from "@draftbit/types";
|
|
8
|
-
|
|
9
|
-
export const SEED_DATA = [
|
|
10
|
-
{
|
|
11
|
-
name: "Table",
|
|
12
|
-
tag: "Table",
|
|
13
|
-
category: COMPONENT_TYPES.container,
|
|
14
|
-
layout: {
|
|
15
|
-
width: "100%",
|
|
16
|
-
},
|
|
17
|
-
props: {},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: "Table Row",
|
|
21
|
-
tag: "TableRow",
|
|
22
|
-
category: COMPONENT_TYPES.container,
|
|
23
|
-
layout: {
|
|
24
|
-
paddingLeft: 16,
|
|
25
|
-
paddingRight: 16,
|
|
26
|
-
borderBottomWidth: 1,
|
|
27
|
-
borderStyle: "solid",
|
|
28
|
-
},
|
|
29
|
-
props: {},
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "Table Cell",
|
|
33
|
-
tag: "TableCell",
|
|
34
|
-
category: COMPONENT_TYPES.container,
|
|
35
|
-
layout: {
|
|
36
|
-
paddingTop: 16,
|
|
37
|
-
paddingBottom: 16,
|
|
38
|
-
paddingLeft: 8,
|
|
39
|
-
paddingRight: 8,
|
|
40
|
-
},
|
|
41
|
-
props: {
|
|
42
|
-
numeric: createBoolProp({
|
|
43
|
-
label: "Is Numeric Cell?",
|
|
44
|
-
description: "Does the cell contain a numeric value?",
|
|
45
|
-
group: GROUPS.data,
|
|
46
|
-
}),
|
|
47
|
-
value: createTextProp({
|
|
48
|
-
label: "Cell Value",
|
|
49
|
-
description: "Table Cell Value",
|
|
50
|
-
group: GROUPS.data,
|
|
51
|
-
}),
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "Table Header",
|
|
56
|
-
tag: "TableHeader",
|
|
57
|
-
category: COMPONENT_TYPES.container,
|
|
58
|
-
layout: {
|
|
59
|
-
paddingLeft: 16,
|
|
60
|
-
paddingRight: 16,
|
|
61
|
-
borderBottomWidth: 1,
|
|
62
|
-
borderStyle: "solid",
|
|
63
|
-
backgroundColor: "#EFEFEF",
|
|
64
|
-
},
|
|
65
|
-
props: {},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: "Table Title",
|
|
69
|
-
tag: "TableTitle",
|
|
70
|
-
category: COMPONENT_TYPES.container,
|
|
71
|
-
layout: {
|
|
72
|
-
fontSize: 14,
|
|
73
|
-
fontWeight: "500",
|
|
74
|
-
paddingTop: 16,
|
|
75
|
-
paddingBottom: 16,
|
|
76
|
-
paddingLeft: 8,
|
|
77
|
-
paddingRight: 8,
|
|
78
|
-
},
|
|
79
|
-
props: {
|
|
80
|
-
numeric: createBoolProp({
|
|
81
|
-
label: "Is Numeric Cell?",
|
|
82
|
-
description: "Does the cell contain a numeric value?",
|
|
83
|
-
group: GROUPS.data,
|
|
84
|
-
}),
|
|
85
|
-
value: createTextProp({
|
|
86
|
-
label: "Cell Value",
|
|
87
|
-
description: "Table Cell Value",
|
|
88
|
-
group: GROUPS.data,
|
|
89
|
-
}),
|
|
90
|
-
isAscending: createBoolProp({
|
|
91
|
-
label: "Is Ascending?",
|
|
92
|
-
description: "Does the cell contain a numeric value?",
|
|
93
|
-
group: GROUPS.data,
|
|
94
|
-
}),
|
|
95
|
-
numberOfLines: createNumberProp({
|
|
96
|
-
label: "Number of Lines",
|
|
97
|
-
description: "Number of Lines",
|
|
98
|
-
group: GROUPS.basic,
|
|
99
|
-
}),
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
];
|