@draftbit/core 46.9.1-20b4a7.2 → 46.9.1-26da3e.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.
Files changed (69) hide show
  1. package/lib/commonjs/components/CircleImage.js +1 -15
  2. package/lib/commonjs/components/Container.js +15 -4
  3. package/lib/commonjs/components/Table/Table.js +50 -0
  4. package/lib/commonjs/components/Table/TableCell.js +49 -0
  5. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  6. package/lib/commonjs/components/Table/TableRow.js +57 -0
  7. package/lib/commonjs/components/Table/index.js +27 -0
  8. package/lib/commonjs/index.js +19 -7
  9. package/lib/commonjs/mappings/Table.js +143 -0
  10. package/lib/module/components/Table/Table.js +42 -0
  11. package/lib/module/components/Table/TableCell.js +41 -0
  12. package/lib/module/components/Table/TableCommon.js +21 -0
  13. package/lib/module/components/Table/TableRow.js +49 -0
  14. package/lib/module/components/Table/index.js +3 -0
  15. package/lib/module/index.js +1 -1
  16. package/lib/module/mappings/Table.js +136 -0
  17. package/lib/typescript/src/components/Table/Table.d.ts +13 -0
  18. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  19. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  20. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  21. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  22. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  23. package/lib/typescript/src/components/Table/TableRow.d.ts +9 -0
  24. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  25. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  26. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  27. package/lib/typescript/src/index.d.ts +1 -1
  28. package/lib/typescript/src/index.d.ts.map +1 -1
  29. package/lib/typescript/src/mappings/Table.d.ts +314 -0
  30. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  31. package/package.json +3 -5
  32. package/src/components/Table/Table.js +25 -0
  33. package/src/components/Table/Table.tsx +56 -0
  34. package/src/components/Table/TableCell.js +31 -0
  35. package/src/components/Table/TableCell.tsx +63 -0
  36. package/src/components/Table/TableCommon.js +12 -0
  37. package/src/components/Table/TableCommon.ts +40 -0
  38. package/src/components/Table/TableRow.js +32 -0
  39. package/src/components/Table/TableRow.tsx +65 -0
  40. package/src/components/Table/index.js +3 -0
  41. package/src/components/Table/index.tsx +3 -0
  42. package/src/index.js +1 -1
  43. package/src/index.tsx +1 -1
  44. package/src/mappings/Table.js +137 -0
  45. package/src/mappings/Table.ts +161 -0
  46. package/lib/commonjs/components/BottomSheet/BottomSheet.js +0 -88
  47. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -464
  48. package/lib/commonjs/components/BottomSheet/index.js +0 -13
  49. package/lib/commonjs/mappings/BottomSheet.js +0 -70
  50. package/lib/module/components/BottomSheet/BottomSheet.js +0 -80
  51. package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -470
  52. package/lib/module/components/BottomSheet/index.js +0 -1
  53. package/lib/module/mappings/BottomSheet.js +0 -63
  54. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +0 -20
  55. package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +0 -1
  56. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +0 -170
  57. package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +0 -1
  58. package/lib/typescript/src/components/BottomSheet/index.d.ts +0 -2
  59. package/lib/typescript/src/components/BottomSheet/index.d.ts.map +0 -1
  60. package/lib/typescript/src/mappings/BottomSheet.d.ts +0 -115
  61. package/lib/typescript/src/mappings/BottomSheet.d.ts.map +0 -1
  62. package/src/components/BottomSheet/BottomSheet.js +0 -56
  63. package/src/components/BottomSheet/BottomSheet.tsx +0 -120
  64. package/src/components/BottomSheet/BottomSheetComponent.js +0 -437
  65. package/src/components/BottomSheet/BottomSheetComponent.tsx +0 -895
  66. package/src/components/BottomSheet/index.js +0 -1
  67. package/src/components/BottomSheet/index.ts +0 -1
  68. package/src/mappings/BottomSheet.js +0 -63
  69. package/src/mappings/BottomSheet.ts +0 -77
@@ -0,0 +1,136 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, createColorProp, createStaticBoolProp, createStaticNumberProp, BLOCK_STYLES_SECTIONS, CONTAINER_COMPONENT_STYLES_SECTIONS, createTextEnumProp } from "@draftbit/types";
2
+ const SHARED_SEED_DATA_PROPS = {
3
+ borderWidth: createStaticNumberProp({
4
+ label: "Border Width",
5
+ description: "Specifies the width of the border. Passed down to child Table(Row/Cell) components unless overridden",
6
+ required: false,
7
+ defaultValue: null
8
+ }),
9
+ borderColor: createColorProp({
10
+ label: "Border Color",
11
+ description: "Specifies the color of the border. Passed down to child Table(Row/Cell) components unless overridden",
12
+ defaultValue: null
13
+ }),
14
+ borderStyle: createTextEnumProp({
15
+ label: "Border Style",
16
+ description: "Specifies the style of the border. Passed down to child Table(Row/Cell) components unless overridden",
17
+ options: ["solid", "dotted", "dashed"],
18
+ defaultValue: null
19
+ }),
20
+ drawTopBorder: createStaticBoolProp({
21
+ label: "Draw Top Border",
22
+ description: "Whether to draw the top border at this layer of the Table tree or not",
23
+ defaultValue: false
24
+ }),
25
+ drawBottomBorder: createStaticBoolProp({
26
+ label: "Draw Bottom Border",
27
+ description: "Whether to draw the bottom border at this layer of the Table tree or not",
28
+ defaultValue: false
29
+ }),
30
+ drawStartBorder: createStaticBoolProp({
31
+ label: "Draw Start Border",
32
+ description: "Whether to draw the start border at this layer of the Table tree or not",
33
+ defaultValue: false
34
+ }),
35
+ drawEndBorder: createStaticBoolProp({
36
+ label: "Draw End Border",
37
+ description: "Whether to draw the end border at this layer of the Table tree or not",
38
+ defaultValue: false
39
+ })
40
+ };
41
+ export const SEED_DATA = [{
42
+ name: "Table",
43
+ tag: "Table",
44
+ description: "Top level table container",
45
+ category: COMPONENT_TYPES.table,
46
+ stylesPanelSections: BLOCK_STYLES_SECTIONS,
47
+ props: {
48
+ ...SHARED_SEED_DATA_PROPS,
49
+ borderWidth: {
50
+ ...SHARED_SEED_DATA_PROPS.borderWidth,
51
+ defaultValue: 1
52
+ },
53
+ borderColor: {
54
+ ...SHARED_SEED_DATA_PROPS.borderColor,
55
+ defaultValue: "divider"
56
+ },
57
+ borderStyle: {
58
+ ...SHARED_SEED_DATA_PROPS.borderStyle,
59
+ defaultValue: "solid"
60
+ },
61
+ drawTopBorder: {
62
+ ...SHARED_SEED_DATA_PROPS.drawTopBorder,
63
+ defaultValue: true
64
+ },
65
+ cellVerticalPadding: createStaticNumberProp({
66
+ label: "Cell Vertical Padding",
67
+ description: "Specifies the vertical padding of the cell. Passed down to child Table Row components unless overridden",
68
+ required: false,
69
+ defaultValue: 10
70
+ }),
71
+ cellHorizontalPadding: createStaticNumberProp({
72
+ label: "Cell Horizontal Padding",
73
+ description: "Specifies the horizontal padding of the cell. Passed down to child Table Row components unless overridden",
74
+ required: false,
75
+ defaultValue: 10
76
+ })
77
+ }
78
+ }, {
79
+ name: "Table Row",
80
+ tag: "TableRow",
81
+ description: "Table Row container",
82
+ category: COMPONENT_TYPES.table,
83
+ stylesPanelSections: [StylesPanelSections.Background],
84
+ props: {
85
+ ...SHARED_SEED_DATA_PROPS,
86
+ drawStartBorder: {
87
+ ...SHARED_SEED_DATA_PROPS.drawStartBorder,
88
+ defaultValue: true
89
+ },
90
+ drawBottomBorder: {
91
+ ...SHARED_SEED_DATA_PROPS.drawBottomBorder,
92
+ defaultValue: true
93
+ },
94
+ cellVerticalPadding: createStaticNumberProp({
95
+ label: "Cell Vertical Padding",
96
+ description: "Specifies the vertical padding of the cell. Passed down to child Table Cell components unless overridden",
97
+ required: false,
98
+ defaultValue: null
99
+ }),
100
+ cellHorizontalPadding: createStaticNumberProp({
101
+ label: "Cell Horizontal Padding",
102
+ description: "Specifies the horizontal padding of the cell. Passed down to child Table Cell components unless overridden",
103
+ required: false,
104
+ defaultValue: null
105
+ })
106
+ }
107
+ }, {
108
+ name: "Table Cell",
109
+ tag: "TableCell",
110
+ description: "Table Cell container",
111
+ category: COMPONENT_TYPES.table,
112
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.Borders),
113
+ layout: {
114
+ flex: 1,
115
+ flexDirection: "row"
116
+ },
117
+ props: {
118
+ ...SHARED_SEED_DATA_PROPS,
119
+ drawEndBorder: {
120
+ ...SHARED_SEED_DATA_PROPS.drawEndBorder,
121
+ defaultValue: true
122
+ },
123
+ cellVerticalPadding: createStaticNumberProp({
124
+ label: "Vertical Padding",
125
+ description: "Specifies the vertical padding of the cell",
126
+ required: false,
127
+ defaultValue: null
128
+ }),
129
+ cellHorizontalPadding: createStaticNumberProp({
130
+ label: "Horizontal Padding",
131
+ description: "Specifies the horizontal padding of the cell",
132
+ required: false,
133
+ defaultValue: null
134
+ })
135
+ }
136
+ }];
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { Theme } from "../../styles/DefaultTheme";
4
+ import { TableProps } from "./TableCommon";
5
+ export interface Props extends TableProps {
6
+ style?: StyleProp<ViewStyle>;
7
+ theme: Theme;
8
+ }
9
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "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<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
12
+ export default _default;
13
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAEL,UAAU,EAGX,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AAyCD,wBAAgC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { TableProps } from "./TableCommon";
4
+ export interface Props extends TableProps {
5
+ style?: StyleProp<ViewStyle>;
6
+ }
7
+ declare const TableCell: React.FC<React.PropsWithChildren<Props>>;
8
+ export default TableCell;
9
+ //# sourceMappingURL=TableCell.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ import { TableProps } from "./TableCommon";
4
+ export interface Props extends TableProps {
5
+ style?: StyleProp<ViewStyle>;
6
+ }
7
+ declare const TableRow: React.FC<React.PropsWithChildren<Props>>;
8
+ export default TableRow;
9
+ //# sourceMappingURL=TableRow.d.ts.map
@@ -0,0 +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,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CA0CtD,CAAC;AASF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as Table } from "./Table";
2
+ export { default as TableRow } from "./TableRow";
3
+ export { default as TableCell } from "./TableCell";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -35,7 +35,7 @@ export { default as Shadow } from "./components/Shadow";
35
35
  export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
36
36
  export { TabView, TabViewItem } from "./components/TabView";
37
37
  export { default as Markdown } from "./components/Markdown";
38
- export { BottomSheet } from "./components/BottomSheet";
38
+ export { Table, TableRow, TableCell } from "./components/Table";
39
39
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
40
40
  export { default as Picker } from "./components/Picker/Picker";
41
41
  export { default as ProgressBar } from "./components/ProgressBar";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,O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B,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,314 @@
1
+ export declare const SEED_DATA: ({
2
+ name: string;
3
+ tag: string;
4
+ description: string;
5
+ category: string;
6
+ stylesPanelSections: string[];
7
+ props: {
8
+ borderWidth: {
9
+ defaultValue: number;
10
+ label: string;
11
+ description: string;
12
+ formType: string;
13
+ propType: string;
14
+ group: string;
15
+ editable: boolean;
16
+ required: boolean;
17
+ step: number;
18
+ };
19
+ borderColor: {
20
+ defaultValue: string;
21
+ group: string;
22
+ label: string;
23
+ description: string;
24
+ editable: boolean;
25
+ required: boolean;
26
+ formType: string;
27
+ propType: string;
28
+ };
29
+ borderStyle: {
30
+ defaultValue: string;
31
+ group: string;
32
+ label: string;
33
+ description: string;
34
+ editable: boolean;
35
+ required: boolean;
36
+ formType: string;
37
+ propType: string;
38
+ options: never[];
39
+ };
40
+ drawTopBorder: {
41
+ defaultValue: boolean;
42
+ label: string;
43
+ description: string;
44
+ formType: string;
45
+ propType: string;
46
+ editable: boolean;
47
+ required: boolean;
48
+ group: string;
49
+ };
50
+ cellVerticalPadding: {
51
+ label: string;
52
+ description: string;
53
+ formType: string;
54
+ propType: string;
55
+ group: string;
56
+ defaultValue: null;
57
+ editable: boolean;
58
+ required: boolean;
59
+ step: number;
60
+ };
61
+ cellHorizontalPadding: {
62
+ label: string;
63
+ description: string;
64
+ formType: string;
65
+ propType: string;
66
+ group: string;
67
+ defaultValue: null;
68
+ editable: boolean;
69
+ required: boolean;
70
+ step: number;
71
+ };
72
+ drawBottomBorder: {
73
+ label: string;
74
+ description: string;
75
+ formType: string;
76
+ propType: string;
77
+ defaultValue: boolean;
78
+ editable: boolean;
79
+ required: boolean;
80
+ group: string;
81
+ };
82
+ drawStartBorder: {
83
+ label: string;
84
+ description: string;
85
+ formType: string;
86
+ propType: string;
87
+ defaultValue: boolean;
88
+ editable: boolean;
89
+ required: boolean;
90
+ group: string;
91
+ };
92
+ drawEndBorder: {
93
+ label: string;
94
+ description: string;
95
+ formType: string;
96
+ propType: string;
97
+ defaultValue: boolean;
98
+ editable: boolean;
99
+ required: boolean;
100
+ group: string;
101
+ };
102
+ };
103
+ layout?: undefined;
104
+ } | {
105
+ name: string;
106
+ tag: string;
107
+ description: string;
108
+ category: string;
109
+ stylesPanelSections: string[];
110
+ props: {
111
+ drawStartBorder: {
112
+ defaultValue: boolean;
113
+ label: string;
114
+ description: string;
115
+ formType: string;
116
+ propType: string;
117
+ editable: boolean;
118
+ required: boolean;
119
+ group: string;
120
+ };
121
+ drawBottomBorder: {
122
+ defaultValue: boolean;
123
+ label: string;
124
+ description: string;
125
+ formType: string;
126
+ propType: string;
127
+ editable: boolean;
128
+ required: boolean;
129
+ group: string;
130
+ };
131
+ cellVerticalPadding: {
132
+ label: string;
133
+ description: string;
134
+ formType: string;
135
+ propType: string;
136
+ group: string;
137
+ defaultValue: null;
138
+ editable: boolean;
139
+ required: boolean;
140
+ step: number;
141
+ };
142
+ cellHorizontalPadding: {
143
+ label: string;
144
+ description: string;
145
+ formType: string;
146
+ propType: string;
147
+ group: string;
148
+ defaultValue: null;
149
+ editable: boolean;
150
+ required: boolean;
151
+ step: number;
152
+ };
153
+ borderWidth: {
154
+ label: string;
155
+ description: string;
156
+ formType: string;
157
+ propType: string;
158
+ group: string;
159
+ defaultValue: null;
160
+ editable: boolean;
161
+ required: boolean;
162
+ step: number;
163
+ };
164
+ borderColor: {
165
+ group: string;
166
+ label: string;
167
+ description: string;
168
+ editable: boolean;
169
+ required: boolean;
170
+ defaultValue: null;
171
+ formType: string;
172
+ propType: string;
173
+ };
174
+ borderStyle: {
175
+ group: string;
176
+ label: string;
177
+ description: string;
178
+ editable: boolean;
179
+ required: boolean;
180
+ formType: string;
181
+ propType: string;
182
+ defaultValue: null;
183
+ options: never[];
184
+ };
185
+ drawTopBorder: {
186
+ label: string;
187
+ description: string;
188
+ formType: string;
189
+ propType: string;
190
+ defaultValue: boolean;
191
+ editable: boolean;
192
+ required: boolean;
193
+ group: string;
194
+ };
195
+ drawEndBorder: {
196
+ label: string;
197
+ description: string;
198
+ formType: string;
199
+ propType: string;
200
+ defaultValue: boolean;
201
+ editable: boolean;
202
+ required: boolean;
203
+ group: string;
204
+ };
205
+ };
206
+ layout?: undefined;
207
+ } | {
208
+ name: string;
209
+ tag: string;
210
+ description: string;
211
+ category: string;
212
+ stylesPanelSections: string[];
213
+ layout: {
214
+ flex: number;
215
+ flexDirection: string;
216
+ };
217
+ props: {
218
+ drawEndBorder: {
219
+ defaultValue: boolean;
220
+ label: string;
221
+ description: string;
222
+ formType: string;
223
+ propType: string;
224
+ editable: boolean;
225
+ required: boolean;
226
+ group: string;
227
+ };
228
+ cellVerticalPadding: {
229
+ label: string;
230
+ description: string;
231
+ formType: string;
232
+ propType: string;
233
+ group: string;
234
+ defaultValue: null;
235
+ editable: boolean;
236
+ required: boolean;
237
+ step: number;
238
+ };
239
+ cellHorizontalPadding: {
240
+ label: string;
241
+ description: string;
242
+ formType: string;
243
+ propType: string;
244
+ group: string;
245
+ defaultValue: null;
246
+ editable: boolean;
247
+ required: boolean;
248
+ step: number;
249
+ };
250
+ borderWidth: {
251
+ label: string;
252
+ description: string;
253
+ formType: string;
254
+ propType: string;
255
+ group: string;
256
+ defaultValue: null;
257
+ editable: boolean;
258
+ required: boolean;
259
+ step: number;
260
+ };
261
+ borderColor: {
262
+ group: string;
263
+ label: string;
264
+ description: string;
265
+ editable: boolean;
266
+ required: boolean;
267
+ defaultValue: null;
268
+ formType: string;
269
+ propType: string;
270
+ };
271
+ borderStyle: {
272
+ group: string;
273
+ label: string;
274
+ description: string;
275
+ editable: boolean;
276
+ required: boolean;
277
+ formType: string;
278
+ propType: string;
279
+ defaultValue: null;
280
+ options: never[];
281
+ };
282
+ drawTopBorder: {
283
+ label: string;
284
+ description: string;
285
+ formType: string;
286
+ propType: string;
287
+ defaultValue: boolean;
288
+ editable: boolean;
289
+ required: boolean;
290
+ group: string;
291
+ };
292
+ drawBottomBorder: {
293
+ label: string;
294
+ description: string;
295
+ formType: string;
296
+ propType: string;
297
+ defaultValue: boolean;
298
+ editable: boolean;
299
+ required: boolean;
300
+ group: string;
301
+ };
302
+ drawStartBorder: {
303
+ label: string;
304
+ description: string;
305
+ formType: string;
306
+ propType: string;
307
+ defaultValue: boolean;
308
+ editable: boolean;
309
+ required: boolean;
310
+ group: string;
311
+ };
312
+ };
313
+ })[];
314
+ //# sourceMappingURL=Table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Table.ts"],"names":[],"mappings":"AA0DA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAsGrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.9.1-20b4a7.2+20b4a72",
3
+ "version": "46.9.1-26da3e.2+26da3e0",
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.9.1-20b4a7.2+20b4a72",
44
+ "@draftbit/types": "^46.9.1-26da3e.2+26da3e0",
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",
@@ -54,11 +54,9 @@
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
56
  "react-native-deck-swiper": "^2.0.12",
57
- "react-native-gesture-handler": "~2.5.0",
58
57
  "react-native-markdown-display": "^7.0.0-alpha.2",
59
58
  "react-native-modal-datetime-picker": "^13.0.0",
60
59
  "react-native-pager-view": "5.4.24",
61
- "react-native-reanimated": "~2.9.1",
62
60
  "react-native-shadow-2": "^7.0.6",
63
61
  "react-native-svg": "12.3.0",
64
62
  "react-native-tab-view": "^3.4.0",
@@ -98,5 +96,5 @@
98
96
  ]
99
97
  ]
100
98
  },
101
- "gitHead": "20b4a726683f84a6c5b84d333bbbd8ce0f2bab46"
99
+ "gitHead": "26da3e0a70219fd9adfc72ec67f50cb8a6ca8742"
102
100
  }
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { ScrollView } from "react-native";
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, children, style, }) => {
6
+ const contextValue = {
7
+ borderColor,
8
+ borderStyle,
9
+ borderWidth,
10
+ cellHorizontalPadding,
11
+ cellVerticalPadding,
12
+ };
13
+ const borderViewStyle = generateBorderStyles({
14
+ borderColor,
15
+ borderWidth,
16
+ borderStyle,
17
+ drawTopBorder,
18
+ drawBottomBorder,
19
+ drawStartBorder,
20
+ drawEndBorder,
21
+ });
22
+ return (React.createElement(TableStyleContext.Provider, { value: contextValue },
23
+ React.createElement(ScrollView, { style: [borderViewStyle, style] }, children)));
24
+ };
25
+ export default withTheme(Table);
@@ -0,0 +1,56 @@
1
+ import React from "react";
2
+ import { ScrollView, StyleProp, ViewStyle } from "react-native";
3
+ import { Theme } from "../../styles/DefaultTheme";
4
+ import { withTheme } from "../../theming";
5
+ import {
6
+ generateBorderStyles,
7
+ TableProps,
8
+ TableStyleContext,
9
+ TableStyleProps,
10
+ } from "./TableCommon";
11
+
12
+ export interface Props extends TableProps {
13
+ style?: StyleProp<ViewStyle>;
14
+ theme: Theme;
15
+ }
16
+
17
+ const Table: React.FC<React.PropsWithChildren<Props>> = ({
18
+ theme,
19
+ borderWidth = 1,
20
+ borderColor = theme.colors.divider,
21
+ borderStyle = "solid",
22
+ drawTopBorder = true,
23
+ drawBottomBorder = false,
24
+ drawStartBorder = false,
25
+ drawEndBorder = false,
26
+ cellVerticalPadding = 10,
27
+ cellHorizontalPadding = 10,
28
+ children,
29
+ style,
30
+ }) => {
31
+ const contextValue: TableStyleProps = {
32
+ borderColor,
33
+ borderStyle,
34
+ borderWidth,
35
+ cellHorizontalPadding,
36
+ cellVerticalPadding,
37
+ };
38
+
39
+ const borderViewStyle = generateBorderStyles({
40
+ borderColor,
41
+ borderWidth,
42
+ borderStyle,
43
+ drawTopBorder,
44
+ drawBottomBorder,
45
+ drawStartBorder,
46
+ drawEndBorder,
47
+ });
48
+
49
+ return (
50
+ <TableStyleContext.Provider value={contextValue}>
51
+ <ScrollView style={[borderViewStyle, style]}>{children}</ScrollView>
52
+ </TableStyleContext.Provider>
53
+ );
54
+ };
55
+
56
+ export default withTheme(Table);