@draftbit/core 46.10.3-106fd0.2 → 46.10.3-177666.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/Table/Table.js +11 -10
- package/lib/commonjs/components/Table/TableCell.js +3 -3
- package/lib/commonjs/components/Table/TableCommon.js +30 -0
- package/lib/commonjs/components/Table/TableRow.js +4 -4
- package/lib/commonjs/components/Table/index.js +3 -27
- package/lib/module/components/Accordion/AccordionItem.js +25 -4
- package/lib/module/components/AspectRatio.js +1 -18
- package/lib/module/components/Checkbox/CheckboxGroup.js +2 -16
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/CircleImage.js +1 -16
- package/lib/module/components/DeprecatedButton.js +3 -21
- package/lib/module/components/IconButton.js +4 -21
- package/lib/module/components/Pressable.js +2 -15
- package/lib/module/components/Shadow.js +2 -15
- package/lib/module/components/Table/Table.js +7 -7
- package/lib/module/components/Table/TableCell.js +1 -1
- package/lib/module/components/Table/TableCommon.js +21 -0
- package/lib/module/components/Table/TableRow.js +3 -2
- package/lib/module/components/Table/index.js +1 -22
- package/lib/module/components/ToggleButton.js +2 -16
- package/lib/module/constants.js +0 -1
- package/lib/typescript/src/components/Table/Table.d.ts +7 -2
- package/lib/typescript/src/components/Table/Table.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
- package/lib/typescript/src/components/Table/TableRow.d.ts +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -1
- package/lib/typescript/src/components/Table/index.d.ts +1 -19
- package/lib/typescript/src/components/Table/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Table/Table.js +4 -2
- package/src/components/Table/Table.tsx +9 -3
- package/src/components/Table/TableCell.js +1 -1
- package/src/components/Table/TableCell.tsx +5 -1
- package/src/components/Table/TableCommon.js +12 -0
- package/src/components/Table/TableCommon.ts +40 -0
- package/src/components/Table/TableRow.js +1 -1
- package/src/components/Table/TableRow.tsx +1 -1
- package/src/components/Table/index.js +1 -13
- package/src/components/Table/index.tsx +1 -42
- package/lib/commonjs/mappings/HeaderLarge.js +0 -34
- package/lib/commonjs/mappings/HeaderMedium.js +0 -60
- package/lib/commonjs/mappings/HeaderOverline.js +0 -60
- package/lib/module/mappings/HeaderLarge.js +0 -27
- package/lib/module/mappings/HeaderMedium.js +0 -53
- package/lib/module/mappings/HeaderOverline.js +0 -53
- package/lib/typescript/src/mappings/HeaderLarge.d.ts +0 -34
- package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +0 -1
- package/lib/typescript/src/mappings/HeaderMedium.d.ts +0 -53
- package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +0 -1
- package/lib/typescript/src/mappings/HeaderOverline.d.ts +0 -53
- package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +0 -1
- package/src/mappings/HeaderLarge.js +0 -29
- package/src/mappings/HeaderLarge.ts +0 -38
- package/src/mappings/HeaderMedium.js +0 -55
- package/src/mappings/HeaderMedium.ts +0 -63
- package/src/mappings/HeaderOverline.js +0 -55
- package/src/mappings/HeaderOverline.ts +0 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AACtE,OAAO,EAEL,UAAU,EAEX,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAyCvD,CAAC;AASF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
declare type BorderStyle = "solid" | "dotted" | "dashed";
|
|
4
|
+
export declare const TableStyleContext: React.Context<TableStyleProps>;
|
|
5
|
+
export interface TableStyleProps {
|
|
6
|
+
borderWidth?: number;
|
|
7
|
+
borderColor?: string;
|
|
8
|
+
borderStyle?: BorderStyle;
|
|
9
|
+
cellVerticalPadding?: number;
|
|
10
|
+
cellHorizontalPadding?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface TableProps extends TableStyleProps {
|
|
13
|
+
drawTopBorder?: boolean;
|
|
14
|
+
drawBottomBorder?: boolean;
|
|
15
|
+
drawStartBorder?: boolean;
|
|
16
|
+
drawEndBorder?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }: TableProps): ViewStyle;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=TableCommon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCommon.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableCommon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,aAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjD,eAAO,MAAM,iBAAiB,gCAA2C,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,aAAa,GACd,EAAE,UAAU,GAAG,SAAS,CASxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { TableProps } from "./
|
|
3
|
+
import { TableProps } from "./TableCommon";
|
|
4
4
|
import { Theme } from "../../styles/DefaultTheme";
|
|
5
5
|
export interface Props extends TableProps {
|
|
6
6
|
isTableHeader?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AACtE,OAAO,EAEL,UAAU,EAGX,MAAM,
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AACtE,OAAO,EAEL,UAAU,EAGX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAGlD,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AA6DD,wBAAmC"}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ViewStyle } from "react-native";
|
|
3
|
-
declare type BorderStyle = "solid" | "dotted" | "dashed";
|
|
4
|
-
export declare const TableStyleContext: React.Context<TableStyleProps>;
|
|
5
|
-
export interface TableStyleProps {
|
|
6
|
-
borderWidth?: number;
|
|
7
|
-
borderColor?: string;
|
|
8
|
-
borderStyle?: BorderStyle;
|
|
9
|
-
cellVerticalPadding?: number;
|
|
10
|
-
cellHorizontalPadding?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface TableProps extends TableStyleProps {
|
|
13
|
-
drawTopBorder?: boolean;
|
|
14
|
-
drawBottomBorder?: boolean;
|
|
15
|
-
drawStartBorder?: boolean;
|
|
16
|
-
drawEndBorder?: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }: TableProps): ViewStyle;
|
|
19
|
-
export { Table } from "./Table";
|
|
1
|
+
export { default as Table } from "./Table";
|
|
20
2
|
export { default as TableRow } from "./TableRow";
|
|
21
3
|
export { default as TableCell } from "./TableCell";
|
|
22
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.10.3-
|
|
3
|
+
"version": "46.10.3-177666.2+177666e",
|
|
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.10.3-
|
|
44
|
+
"@draftbit/types": "^46.10.3-177666.2+177666e",
|
|
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",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
]
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "177666ee8ef3cc890c08bb938748ee789b2fb194"
|
|
104
104
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ScrollView, View, StyleSheet, } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { withTheme } from "../../theming";
|
|
4
|
+
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
5
|
+
const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.divider, borderStyle = "solid", drawTopBorder = true, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = false, cellVerticalPadding = 10, cellHorizontalPadding = 10, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }) => {
|
|
5
6
|
//Both 'renderItem' and 'data' are optional to allow direct children. But if one is included, both need to be included
|
|
6
7
|
if ((data && !renderItem) || (renderItem && !data)) {
|
|
7
8
|
throw new Error("'renderItem' and 'data' need to both be provided to render from 'data'. Either remove them entirley or include both");
|
|
@@ -89,3 +90,4 @@ const styles = StyleSheet.create({
|
|
|
89
90
|
flex: 1,
|
|
90
91
|
},
|
|
91
92
|
});
|
|
93
|
+
export default withTheme(Table);
|
|
@@ -7,23 +7,27 @@ import {
|
|
|
7
7
|
StyleSheet,
|
|
8
8
|
ScrollViewProps,
|
|
9
9
|
} from "react-native";
|
|
10
|
+
import { Theme } from "../../styles/DefaultTheme";
|
|
11
|
+
import { withTheme } from "../../theming";
|
|
10
12
|
import {
|
|
11
13
|
generateBorderStyles,
|
|
12
14
|
TableProps,
|
|
13
15
|
TableStyleContext,
|
|
14
16
|
TableStyleProps,
|
|
15
|
-
} from "./
|
|
17
|
+
} from "./TableCommon";
|
|
16
18
|
|
|
17
19
|
export interface Props<T> extends TableProps, ScrollViewProps {
|
|
18
20
|
data?: Array<T>;
|
|
19
21
|
keyExtractor?: (item: T, index: number) => string;
|
|
20
22
|
renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;
|
|
21
23
|
style?: StyleProp<ViewStyle>;
|
|
24
|
+
theme: Theme;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
const Table = <T extends object>({
|
|
28
|
+
theme,
|
|
25
29
|
borderWidth = 1,
|
|
26
|
-
borderColor =
|
|
30
|
+
borderColor = theme.colors.divider,
|
|
27
31
|
borderStyle = "solid",
|
|
28
32
|
drawTopBorder = true,
|
|
29
33
|
drawBottomBorder = false,
|
|
@@ -168,3 +172,5 @@ const styles = StyleSheet.create({
|
|
|
168
172
|
flex: 1,
|
|
169
173
|
},
|
|
170
174
|
});
|
|
175
|
+
|
|
176
|
+
export default withTheme(Table);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { generateBorderStyles, TableStyleContext } from "./
|
|
3
|
+
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
4
|
const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = true, cellVerticalPadding, cellHorizontalPadding, children, style, }) => {
|
|
5
5
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
6
6
|
const borderViewStyle = generateBorderStyles({
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
generateBorderStyles,
|
|
5
|
+
TableProps,
|
|
6
|
+
TableStyleContext,
|
|
7
|
+
} from "./TableCommon";
|
|
4
8
|
|
|
5
9
|
export interface Props extends TableProps {
|
|
6
10
|
style?: StyleProp<ViewStyle>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const TableStyleContext = React.createContext({});
|
|
3
|
+
export function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }) {
|
|
4
|
+
return {
|
|
5
|
+
borderColor,
|
|
6
|
+
borderStyle,
|
|
7
|
+
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
8
|
+
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
9
|
+
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
10
|
+
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
|
|
4
|
+
type BorderStyle = "solid" | "dotted" | "dashed";
|
|
5
|
+
|
|
6
|
+
export const TableStyleContext = React.createContext<TableStyleProps>({});
|
|
7
|
+
|
|
8
|
+
export interface TableStyleProps {
|
|
9
|
+
borderWidth?: number;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
borderStyle?: BorderStyle;
|
|
12
|
+
cellVerticalPadding?: number;
|
|
13
|
+
cellHorizontalPadding?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface TableProps extends TableStyleProps {
|
|
17
|
+
drawTopBorder?: boolean;
|
|
18
|
+
drawBottomBorder?: boolean;
|
|
19
|
+
drawStartBorder?: boolean;
|
|
20
|
+
drawEndBorder?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function generateBorderStyles({
|
|
24
|
+
borderColor,
|
|
25
|
+
borderWidth,
|
|
26
|
+
borderStyle,
|
|
27
|
+
drawTopBorder,
|
|
28
|
+
drawBottomBorder,
|
|
29
|
+
drawStartBorder,
|
|
30
|
+
drawEndBorder,
|
|
31
|
+
}: TableProps): ViewStyle {
|
|
32
|
+
return {
|
|
33
|
+
borderColor,
|
|
34
|
+
borderStyle,
|
|
35
|
+
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
36
|
+
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
37
|
+
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
38
|
+
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import { generateBorderStyles, TableStyleContext, } from "./
|
|
3
|
+
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
4
|
import { withTheme } from "../../theming";
|
|
5
5
|
const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, style, theme, }) => {
|
|
6
6
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export const TableStyleContext = React.createContext({});
|
|
3
|
-
export function generateBorderStyles({ borderColor, borderWidth, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, }) {
|
|
4
|
-
return {
|
|
5
|
-
borderColor,
|
|
6
|
-
borderStyle,
|
|
7
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
8
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
9
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
10
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export { Table } from "./Table";
|
|
1
|
+
export { default as Table } from "./Table";
|
|
14
2
|
export { default as TableRow } from "./TableRow";
|
|
15
3
|
export { default as TableCell } from "./TableCell";
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { ViewStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
type BorderStyle = "solid" | "dotted" | "dashed";
|
|
5
|
-
|
|
6
|
-
export const TableStyleContext = React.createContext<TableStyleProps>({});
|
|
7
|
-
|
|
8
|
-
export interface TableStyleProps {
|
|
9
|
-
borderWidth?: number;
|
|
10
|
-
borderColor?: string;
|
|
11
|
-
borderStyle?: BorderStyle;
|
|
12
|
-
cellVerticalPadding?: number;
|
|
13
|
-
cellHorizontalPadding?: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface TableProps extends TableStyleProps {
|
|
17
|
-
drawTopBorder?: boolean;
|
|
18
|
-
drawBottomBorder?: boolean;
|
|
19
|
-
drawStartBorder?: boolean;
|
|
20
|
-
drawEndBorder?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function generateBorderStyles({
|
|
24
|
-
borderColor,
|
|
25
|
-
borderWidth,
|
|
26
|
-
borderStyle,
|
|
27
|
-
drawTopBorder,
|
|
28
|
-
drawBottomBorder,
|
|
29
|
-
drawStartBorder,
|
|
30
|
-
drawEndBorder,
|
|
31
|
-
}: TableProps): ViewStyle {
|
|
32
|
-
return {
|
|
33
|
-
borderColor,
|
|
34
|
-
borderStyle,
|
|
35
|
-
borderTopWidth: drawTopBorder ? borderWidth : 0,
|
|
36
|
-
borderBottomWidth: drawBottomBorder ? borderWidth : 0,
|
|
37
|
-
borderStartWidth: drawStartBorder ? borderWidth : 0,
|
|
38
|
-
borderEndWidth: drawEndBorder ? borderWidth : 0,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { Table } from "./Table";
|
|
1
|
+
export { default as Table } from "./Table";
|
|
43
2
|
export { default as TableRow } from "./TableRow";
|
|
44
3
|
export { default as TableCell } from "./TableCell";
|
|
@@ -1,34 +0,0 @@
|
|
|
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: "Header Large",
|
|
10
|
-
tag: "HeaderLarge",
|
|
11
|
-
description: "A large header with an optional touchable right aligned text and icon.",
|
|
12
|
-
category: _types.COMPONENT_TYPES.header,
|
|
13
|
-
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
-
layout: {},
|
|
15
|
-
triggers: [_types.Triggers.OnPress],
|
|
16
|
-
props: {
|
|
17
|
-
onPress: (0, _types.createActionProp)(),
|
|
18
|
-
title: (0, _types.createTextProp)({
|
|
19
|
-
label: "Title",
|
|
20
|
-
description: "Text to display",
|
|
21
|
-
defaultValue: "Title"
|
|
22
|
-
}),
|
|
23
|
-
buttonText: (0, _types.createTextProp)({
|
|
24
|
-
label: "Button text",
|
|
25
|
-
description: "Right aligned button text to display",
|
|
26
|
-
defaultValue: "See All"
|
|
27
|
-
}),
|
|
28
|
-
icon: (0, _types.createIconProp)({
|
|
29
|
-
defaultValue: null,
|
|
30
|
-
required: false
|
|
31
|
-
})
|
|
32
|
-
}
|
|
33
|
-
}];
|
|
34
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,60 +0,0 @@
|
|
|
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: "Header Medium",
|
|
10
|
-
tag: "HeaderMedium",
|
|
11
|
-
description: "A medium header with an optional touchable right aligned text and icon.",
|
|
12
|
-
category: _types.COMPONENT_TYPES.header,
|
|
13
|
-
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
-
preview_image_url: "{CLOUDINARY_URL}/Header_HeadlineMediumIconText.png",
|
|
15
|
-
supports_list_render: false,
|
|
16
|
-
props: {
|
|
17
|
-
title: {
|
|
18
|
-
group: _types.GROUPS.data,
|
|
19
|
-
label: "Title",
|
|
20
|
-
description: "Text to display",
|
|
21
|
-
formType: _types.FORM_TYPES.string,
|
|
22
|
-
propType: _types.PROP_TYPES.STRING,
|
|
23
|
-
defaultValue: "Title",
|
|
24
|
-
editable: true,
|
|
25
|
-
required: false
|
|
26
|
-
},
|
|
27
|
-
buttonText: {
|
|
28
|
-
group: _types.GROUPS.data,
|
|
29
|
-
label: "Button text",
|
|
30
|
-
description: "Right aligned button text to display",
|
|
31
|
-
formType: _types.FORM_TYPES.string,
|
|
32
|
-
propType: _types.PROP_TYPES.STRING,
|
|
33
|
-
defaultValue: "See All",
|
|
34
|
-
editable: true,
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
icon: {
|
|
38
|
-
group: _types.GROUPS.basic,
|
|
39
|
-
label: "Icon",
|
|
40
|
-
description: "Name of icon to display",
|
|
41
|
-
formType: _types.FORM_TYPES.icon,
|
|
42
|
-
propType: _types.PROP_TYPES.ASSET,
|
|
43
|
-
defaultValue: null,
|
|
44
|
-
editable: true,
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
onPress: {
|
|
48
|
-
group: _types.GROUPS.basic,
|
|
49
|
-
label: "Action",
|
|
50
|
-
description: "Action to execute when button pressed",
|
|
51
|
-
editable: true,
|
|
52
|
-
required: false,
|
|
53
|
-
formType: _types.FORM_TYPES.action,
|
|
54
|
-
propType: _types.PROP_TYPES.STRING,
|
|
55
|
-
defaultValue: null
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
layout: {}
|
|
59
|
-
}];
|
|
60
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,60 +0,0 @@
|
|
|
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: "Header Overline",
|
|
10
|
-
tag: "HeaderOverline",
|
|
11
|
-
description: "A small header with an optional touchable right aligned text and icon.",
|
|
12
|
-
category: _types.COMPONENT_TYPES.header,
|
|
13
|
-
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
-
preview_image_url: "{CLOUDINARY_URL}/Header_OverlineIconText.png",
|
|
15
|
-
supports_list_render: false,
|
|
16
|
-
props: {
|
|
17
|
-
title: {
|
|
18
|
-
group: _types.GROUPS.data,
|
|
19
|
-
label: "Title",
|
|
20
|
-
description: "Text to display",
|
|
21
|
-
formType: _types.FORM_TYPES.string,
|
|
22
|
-
propType: _types.PROP_TYPES.STRING,
|
|
23
|
-
defaultValue: "Title",
|
|
24
|
-
editable: true,
|
|
25
|
-
required: false
|
|
26
|
-
},
|
|
27
|
-
buttonText: {
|
|
28
|
-
group: _types.GROUPS.data,
|
|
29
|
-
label: "Button text",
|
|
30
|
-
description: "Right aligned button text to display",
|
|
31
|
-
formType: _types.FORM_TYPES.string,
|
|
32
|
-
propType: _types.PROP_TYPES.STRING,
|
|
33
|
-
defaultValue: "See All",
|
|
34
|
-
editable: true,
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
icon: {
|
|
38
|
-
group: _types.GROUPS.basic,
|
|
39
|
-
label: "Icon",
|
|
40
|
-
description: "Name of icon to display",
|
|
41
|
-
formType: _types.FORM_TYPES.icon,
|
|
42
|
-
propType: _types.PROP_TYPES.ASSET,
|
|
43
|
-
defaultValue: null,
|
|
44
|
-
editable: true,
|
|
45
|
-
required: false
|
|
46
|
-
},
|
|
47
|
-
onPress: {
|
|
48
|
-
group: _types.GROUPS.basic,
|
|
49
|
-
label: "Action",
|
|
50
|
-
description: "Action to execute when button pressed",
|
|
51
|
-
editable: true,
|
|
52
|
-
required: false,
|
|
53
|
-
formType: _types.FORM_TYPES.action,
|
|
54
|
-
propType: _types.PROP_TYPES.STRING,
|
|
55
|
-
defaultValue: null
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
layout: {}
|
|
59
|
-
}];
|
|
60
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createIconProp, createTextProp, createActionProp, Triggers, BLOCK_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = [{
|
|
3
|
-
name: "Header Large",
|
|
4
|
-
tag: "HeaderLarge",
|
|
5
|
-
description: "A large header with an optional touchable right aligned text and icon.",
|
|
6
|
-
category: COMPONENT_TYPES.header,
|
|
7
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
8
|
-
layout: {},
|
|
9
|
-
triggers: [Triggers.OnPress],
|
|
10
|
-
props: {
|
|
11
|
-
onPress: createActionProp(),
|
|
12
|
-
title: createTextProp({
|
|
13
|
-
label: "Title",
|
|
14
|
-
description: "Text to display",
|
|
15
|
-
defaultValue: "Title"
|
|
16
|
-
}),
|
|
17
|
-
buttonText: createTextProp({
|
|
18
|
-
label: "Button text",
|
|
19
|
-
description: "Right aligned button text to display",
|
|
20
|
-
defaultValue: "See All"
|
|
21
|
-
}),
|
|
22
|
-
icon: createIconProp({
|
|
23
|
-
defaultValue: null,
|
|
24
|
-
required: false
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
}];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, BLOCK_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = [{
|
|
3
|
-
name: "Header Medium",
|
|
4
|
-
tag: "HeaderMedium",
|
|
5
|
-
description: "A medium header with an optional touchable right aligned text and icon.",
|
|
6
|
-
category: COMPONENT_TYPES.header,
|
|
7
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
8
|
-
preview_image_url: "{CLOUDINARY_URL}/Header_HeadlineMediumIconText.png",
|
|
9
|
-
supports_list_render: false,
|
|
10
|
-
props: {
|
|
11
|
-
title: {
|
|
12
|
-
group: GROUPS.data,
|
|
13
|
-
label: "Title",
|
|
14
|
-
description: "Text to display",
|
|
15
|
-
formType: FORM_TYPES.string,
|
|
16
|
-
propType: PROP_TYPES.STRING,
|
|
17
|
-
defaultValue: "Title",
|
|
18
|
-
editable: true,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
buttonText: {
|
|
22
|
-
group: GROUPS.data,
|
|
23
|
-
label: "Button text",
|
|
24
|
-
description: "Right aligned button text to display",
|
|
25
|
-
formType: FORM_TYPES.string,
|
|
26
|
-
propType: PROP_TYPES.STRING,
|
|
27
|
-
defaultValue: "See All",
|
|
28
|
-
editable: true,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
icon: {
|
|
32
|
-
group: GROUPS.basic,
|
|
33
|
-
label: "Icon",
|
|
34
|
-
description: "Name of icon to display",
|
|
35
|
-
formType: FORM_TYPES.icon,
|
|
36
|
-
propType: PROP_TYPES.ASSET,
|
|
37
|
-
defaultValue: null,
|
|
38
|
-
editable: true,
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
onPress: {
|
|
42
|
-
group: GROUPS.basic,
|
|
43
|
-
label: "Action",
|
|
44
|
-
description: "Action to execute when button pressed",
|
|
45
|
-
editable: true,
|
|
46
|
-
required: false,
|
|
47
|
-
formType: FORM_TYPES.action,
|
|
48
|
-
propType: PROP_TYPES.STRING,
|
|
49
|
-
defaultValue: null
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
layout: {}
|
|
53
|
-
}];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, BLOCK_STYLES_SECTIONS } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = [{
|
|
3
|
-
name: "Header Overline",
|
|
4
|
-
tag: "HeaderOverline",
|
|
5
|
-
description: "A small header with an optional touchable right aligned text and icon.",
|
|
6
|
-
category: COMPONENT_TYPES.header,
|
|
7
|
-
stylesPanelSections: BLOCK_STYLES_SECTIONS,
|
|
8
|
-
preview_image_url: "{CLOUDINARY_URL}/Header_OverlineIconText.png",
|
|
9
|
-
supports_list_render: false,
|
|
10
|
-
props: {
|
|
11
|
-
title: {
|
|
12
|
-
group: GROUPS.data,
|
|
13
|
-
label: "Title",
|
|
14
|
-
description: "Text to display",
|
|
15
|
-
formType: FORM_TYPES.string,
|
|
16
|
-
propType: PROP_TYPES.STRING,
|
|
17
|
-
defaultValue: "Title",
|
|
18
|
-
editable: true,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
buttonText: {
|
|
22
|
-
group: GROUPS.data,
|
|
23
|
-
label: "Button text",
|
|
24
|
-
description: "Right aligned button text to display",
|
|
25
|
-
formType: FORM_TYPES.string,
|
|
26
|
-
propType: PROP_TYPES.STRING,
|
|
27
|
-
defaultValue: "See All",
|
|
28
|
-
editable: true,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
icon: {
|
|
32
|
-
group: GROUPS.basic,
|
|
33
|
-
label: "Icon",
|
|
34
|
-
description: "Name of icon to display",
|
|
35
|
-
formType: FORM_TYPES.icon,
|
|
36
|
-
propType: PROP_TYPES.ASSET,
|
|
37
|
-
defaultValue: null,
|
|
38
|
-
editable: true,
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
onPress: {
|
|
42
|
-
group: GROUPS.basic,
|
|
43
|
-
label: "Action",
|
|
44
|
-
description: "Action to execute when button pressed",
|
|
45
|
-
editable: true,
|
|
46
|
-
required: false,
|
|
47
|
-
formType: FORM_TYPES.action,
|
|
48
|
-
propType: PROP_TYPES.STRING,
|
|
49
|
-
defaultValue: null
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
layout: {}
|
|
53
|
-
}];
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: {
|
|
2
|
-
name: string;
|
|
3
|
-
tag: string;
|
|
4
|
-
description: string;
|
|
5
|
-
category: string;
|
|
6
|
-
stylesPanelSections: string[];
|
|
7
|
-
layout: {};
|
|
8
|
-
triggers: string[];
|
|
9
|
-
props: {
|
|
10
|
-
onPress: {
|
|
11
|
-
label: string;
|
|
12
|
-
description: string;
|
|
13
|
-
editable: boolean;
|
|
14
|
-
required: boolean;
|
|
15
|
-
formType: string;
|
|
16
|
-
propType: string;
|
|
17
|
-
defaultValue: null;
|
|
18
|
-
group: string;
|
|
19
|
-
};
|
|
20
|
-
title: any;
|
|
21
|
-
buttonText: any;
|
|
22
|
-
icon: {
|
|
23
|
-
label: string;
|
|
24
|
-
description: string;
|
|
25
|
-
formType: string;
|
|
26
|
-
propType: string;
|
|
27
|
-
defaultValue: string;
|
|
28
|
-
required: boolean;
|
|
29
|
-
editable: boolean;
|
|
30
|
-
group: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
}[];
|
|
34
|
-
//# sourceMappingURL=HeaderLarge.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderLarge.d.ts","sourceRoot":"","sources":["../../../../src/mappings/HeaderLarge.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BrB,CAAC"}
|