@draftbit/core 43.4.4-3e43ab.0 → 43.4.5-4e19aa.1
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/Elevation.js +14 -3
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
- package/lib/commonjs/components/Table/index.js +56 -0
- package/lib/commonjs/components/Table/index.js.map +1 -0
- package/lib/commonjs/components/Table/table.js +36 -0
- package/lib/commonjs/components/Table/table.js.map +1 -0
- package/lib/commonjs/components/Table/tableCell.js +44 -0
- package/lib/commonjs/components/Table/tableCell.js.map +1 -0
- package/lib/commonjs/components/Table/tableHeader.js +42 -0
- package/lib/commonjs/components/Table/tableHeader.js.map +1 -0
- package/lib/commonjs/components/Table/tablePaginator.js +18 -0
- package/lib/commonjs/components/Table/tablePaginator.js.map +1 -0
- package/lib/commonjs/components/Table/tableRow.js +48 -0
- package/lib/commonjs/components/Table/tableRow.js.map +1 -0
- package/lib/commonjs/components/Table/tableTitle.js +61 -0
- package/lib/commonjs/components/Table/tableTitle.js.map +1 -0
- package/lib/commonjs/index.js +38 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/Table.js +99 -0
- package/lib/commonjs/mappings/Table.js.map +1 -0
- package/lib/commonjs/utilities.js +8 -2
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +5 -22
- package/lib/module/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/module/components/Accordion/index.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.web.js +3 -17
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/module/components/Table/index.js +7 -0
- package/lib/module/components/Table/index.js.map +1 -0
- package/lib/module/components/Table/table.js +24 -0
- package/lib/module/components/Table/table.js.map +1 -0
- package/lib/module/components/Table/tableCell.js +32 -0
- package/lib/module/components/Table/tableCell.js.map +1 -0
- package/lib/module/components/Table/tableHeader.js +28 -0
- package/lib/module/components/Table/tableHeader.js.map +1 -0
- package/lib/module/components/Table/tablePaginator.js +7 -0
- package/lib/module/components/Table/tablePaginator.js.map +1 -0
- package/lib/module/components/Table/tableRow.js +34 -0
- package/lib/module/components/Table/tableRow.js.map +1 -0
- package/lib/module/components/Table/tableTitle.js +48 -0
- package/lib/module/components/Table/tableTitle.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/BlurView.js.map +1 -1
- package/lib/module/mappings/Table.js +90 -0
- package/lib/module/mappings/Table.js.map +1 -0
- package/lib/module/utilities.js +4 -2
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/Table/index.d.ts +6 -0
- package/lib/typescript/src/components/Table/table.d.ts +8 -0
- package/lib/typescript/src/components/Table/tableCell.d.ts +10 -0
- package/lib/typescript/src/components/Table/tableHeader.d.ts +12 -0
- package/lib/typescript/src/components/Table/tablePaginator.d.ts +3 -0
- package/lib/typescript/src/components/Table/tableRow.d.ts +12 -0
- package/lib/typescript/src/components/Table/tableTitle.d.ts +12 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/utilities.d.ts +4 -3
- package/package.json +2 -2
- package/src/components/Table/index.js +6 -0
- package/src/components/Table/index.tsx +6 -0
- package/src/components/Table/table.js +10 -0
- package/src/components/Table/table.tsx +22 -0
- package/src/components/Table/tableCell.js +17 -0
- package/src/components/Table/tableCell.tsx +37 -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 +59 -0
- package/src/index.js +1 -0
- package/src/index.tsx +9 -0
- package/src/mappings/Table.js +102 -0
- package/src/utilities.js +6 -1
- package/src/utilities.ts +6 -1
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
package/lib/module/utilities.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
+
import omitBy from "lodash/omitBy";
|
|
3
|
+
import isNil from "lodash/isNil";
|
|
2
4
|
export function extractStyles(style) {
|
|
3
5
|
const {
|
|
4
6
|
color,
|
|
@@ -28,8 +30,8 @@ export function extractStyles(style) {
|
|
|
28
30
|
textDecorationStyle
|
|
29
31
|
};
|
|
30
32
|
return {
|
|
31
|
-
viewStyles,
|
|
32
|
-
textStyles
|
|
33
|
+
viewStyles: omitBy(viewStyles, isNil),
|
|
34
|
+
textStyles: omitBy(textStyles, isNil)
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utilities.ts"],"names":["StyleSheet","extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","flatten","textStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries"],"mappings":"AAAA,SAASA,UAAT,QAAiD,cAAjD;AAEA,OAAO,SAASC,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,
|
|
1
|
+
{"version":3,"sources":["utilities.ts"],"names":["StyleSheet","omitBy","isNil","extractStyles","style","color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle","viewStyles","flatten","textStyles","applyStyles","baseStyles","stylesToApply","flattenedStyles","key","value","Object","entries"],"mappings":"AAAA,SAASA,UAAT,QAAiD,cAAjD;AACA,OAAOC,MAAP,MAAmB,eAAnB;AACA,OAAOC,KAAP,MAAkB,cAAlB;AAEA,OAAO,SAASC,aAAT,CAAuBC,KAAvB,EAA8C;AACnD,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,UAFI;AAGJC,IAAAA,UAHI;AAIJC,IAAAA,QAJI;AAKJC,IAAAA,UALI;AAMJC,IAAAA,aANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,SARI;AASJC,IAAAA,kBATI;AAUJC,IAAAA,mBAVI;AAWJC,IAAAA,mBAXI;AAYJ,OAAGC;AAZC,MAaFhB,UAAU,CAACiB,OAAX,CAAmBb,KAAK,IAAI,EAA5B,CAbJ;AAeA,QAAMc,UAAqB,GAAG;AAC5Bb,IAAAA,KAD4B;AAE5BC,IAAAA,UAF4B;AAG5BC,IAAAA,UAH4B;AAI5BC,IAAAA,QAJ4B;AAK5BC,IAAAA,UAL4B;AAM5BC,IAAAA,aAN4B;AAO5BC,IAAAA,aAP4B;AAQ5BC,IAAAA,SAR4B;AAS5BC,IAAAA,kBAT4B;AAU5BC,IAAAA,mBAV4B;AAW5BC,IAAAA;AAX4B,GAA9B;AAcA,SAAO;AACLC,IAAAA,UAAU,EAAEf,MAAM,CAACe,UAAD,EAAad,KAAb,CADb;AAELgB,IAAAA,UAAU,EAAEjB,MAAM,CAACiB,UAAD,EAAahB,KAAb;AAFb,GAAP;AAID;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASiB,WAAT,CACLC,UADK,EAELC,aAFK,EAGL;AACA,MAAI,CAACA,aAAL,EAAoB;AAClB;AACD;;AAED,QAAMC,eAAe,GAAGtB,UAAU,CAACiB,OAAX,CAAmBG,UAAnB,CAAxB;;AAEA,OAAK,MAAM,CAACG,GAAD,EAAMC,KAAN,CAAX,IAA2BC,MAAM,CAACC,OAAP,CAAeL,aAAf,CAA3B,EAA0D;AACxD,QAAIG,KAAK,IAAI,IAAb,EAAmB;AACjBF,MAAAA,eAAe,CAACC,GAAD,CAAf,GAAuBC,KAAvB;AACD;AACF;;AAED,SAAOF,eAAP;AACD","sourcesContent":["import { StyleSheet, StyleProp, TextStyle } from \"react-native\";\nimport omitBy from \"lodash/omitBy\";\nimport isNil from \"lodash/isNil\";\n\nexport function extractStyles(style: StyleProp<any>) {\n const {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n ...viewStyles\n } = StyleSheet.flatten(style || {});\n\n const textStyles: TextStyle = {\n color,\n fontFamily,\n fontWeight,\n fontSize,\n lineHeight,\n letterSpacing,\n textTransform,\n textAlign,\n textDecorationLine,\n textDecorationColor,\n textDecorationStyle,\n };\n\n return {\n viewStyles: omitBy(viewStyles, isNil),\n textStyles: omitBy(textStyles, isNil),\n };\n}\n\n/**\n * Merges a style object on top of another style object. In React Native,\n * keys with undefined values in a style object will still override styles\n * that appear earlier in a sequence. This avoids that problem.\n *\n * This lets us avoid the `...(something ? { something } : {})` pattern.\n * There doesn't seem to be a better way to do this. These all seem to not\n * work (i.e. they all result in `{ color: undefined }`:\n * `const mergedStyles = [{ color: \"red\" }, { color: undefined }]`\n * `const mergedStyles = StyleSheet.compose({ color: \"red\" }, { color: undefined })`\n * `const mergedStyles = StyleSheet.flatten([{ color: \"red\" }, { color: undefined }])`\n */\nexport function applyStyles(\n baseStyles: Array<StyleProp<any>>,\n stylesToApply: StyleProp<any> | undefined\n) {\n if (!stylesToApply) {\n return;\n }\n\n const flattenedStyles = StyleSheet.flatten(baseStyles);\n\n for (const [key, value] of Object.entries(stylesToApply)) {\n if (value != null) {\n flattenedStyles[key] = value;\n }\n }\n\n return flattenedStyles;\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
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";
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -29,6 +29,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
29
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
31
31
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
32
|
+
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
|
|
32
33
|
export { default as Button } from "./components/DeprecatedButton";
|
|
33
34
|
export { default as CardBlock } from "./components/CardBlock";
|
|
34
35
|
export { default as CardContainer } from "./components/CardContainer";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { StyleProp } from "react-native";
|
|
2
3
|
export declare function extractStyles(style: StyleProp<any>): {
|
|
3
|
-
viewStyles: any
|
|
4
|
-
textStyles:
|
|
4
|
+
viewStyles: Partial<any>;
|
|
5
|
+
textStyles: import("lodash").Dictionary<any>;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Merges a style object on top of another style object. In React Native,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.4.
|
|
3
|
+
"version": "43.4.5-4e19aa.1+4e19aa2d",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "4e19aa2dc581db7d80d897af2f3bf5e3f3d240d8"
|
|
84
84
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
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";
|
|
@@ -0,0 +1,6 @@
|
|
|
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";
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,37 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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);
|
|
@@ -0,0 +1,28 @@
|
|
|
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);
|
|
@@ -0,0 +1,16 @@
|
|
|
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);
|
|
@@ -0,0 +1,31 @@
|
|
|
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);
|
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
|
@@ -0,0 +1,59 @@
|
|
|
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/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
29
29
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
30
30
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
31
31
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
32
|
+
export { Table, TableRow, TablePaginator, TableHeader, TableCell, TableTitle, } from "./components/Table";
|
|
32
33
|
/* Deprecated: Fix or Delete! */
|
|
33
34
|
export { default as Button } from "./components/DeprecatedButton";
|
|
34
35
|
export { default as CardBlock } from "./components/CardBlock";
|
package/src/index.tsx
CHANGED
|
@@ -49,6 +49,15 @@ export {
|
|
|
49
49
|
RadioButtonFieldGroup,
|
|
50
50
|
} from "./components/RadioButton/index";
|
|
51
51
|
|
|
52
|
+
export {
|
|
53
|
+
Table,
|
|
54
|
+
TableRow,
|
|
55
|
+
TablePaginator,
|
|
56
|
+
TableHeader,
|
|
57
|
+
TableCell,
|
|
58
|
+
TableTitle,
|
|
59
|
+
} from "./components/Table";
|
|
60
|
+
|
|
52
61
|
/* Deprecated: Fix or Delete! */
|
|
53
62
|
export { default as Button } from "./components/DeprecatedButton";
|
|
54
63
|
export { default as CardBlock } from "./components/CardBlock";
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
];
|
package/src/utilities.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
+
import omitBy from "lodash/omitBy";
|
|
3
|
+
import isNil from "lodash/isNil";
|
|
2
4
|
export function extractStyles(style) {
|
|
3
5
|
const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
|
|
4
6
|
const textStyles = {
|
|
@@ -14,7 +16,10 @@ export function extractStyles(style) {
|
|
|
14
16
|
textDecorationColor,
|
|
15
17
|
textDecorationStyle,
|
|
16
18
|
};
|
|
17
|
-
return {
|
|
19
|
+
return {
|
|
20
|
+
viewStyles: omitBy(viewStyles, isNil),
|
|
21
|
+
textStyles: omitBy(textStyles, isNil),
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* Merges a style object on top of another style object. In React Native,
|
package/src/utilities.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { StyleSheet, StyleProp, TextStyle } from "react-native";
|
|
2
|
+
import omitBy from "lodash/omitBy";
|
|
3
|
+
import isNil from "lodash/isNil";
|
|
2
4
|
|
|
3
5
|
export function extractStyles(style: StyleProp<any>) {
|
|
4
6
|
const {
|
|
@@ -30,7 +32,10 @@ export function extractStyles(style: StyleProp<any>) {
|
|
|
30
32
|
textDecorationStyle,
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
return {
|
|
35
|
+
return {
|
|
36
|
+
viewStyles: omitBy(viewStyles, isNil),
|
|
37
|
+
textStyles: omitBy(textStyles, isNil),
|
|
38
|
+
};
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
/**
|