@draftbit/core 46.10.3-1ab4b6.2 → 46.10.3-258cfa.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 (47) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +2 -17
  3. package/lib/commonjs/components/Shadow.js +2 -15
  4. package/lib/commonjs/components/Table/Table.js +5 -7
  5. package/lib/commonjs/components/Table/TableCell.js +3 -3
  6. package/lib/commonjs/components/Table/TableRow.js +4 -4
  7. package/lib/commonjs/components/Table/index.js +25 -1
  8. package/lib/commonjs/constants.js +1 -1
  9. package/lib/commonjs/mappings/Layout.js +177 -85
  10. package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
  11. package/lib/module/components/Table/Table.js +5 -5
  12. package/lib/module/components/Table/TableCell.js +1 -1
  13. package/lib/module/components/Table/TableRow.js +1 -1
  14. package/lib/module/components/Table/index.js +21 -0
  15. package/lib/module/mappings/Layout.js +178 -86
  16. package/lib/module/mappings/NativeBase/Layout.js +101 -0
  17. package/lib/typescript/src/components/Table/Table.d.ts +3 -7
  18. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -1
  19. package/lib/typescript/src/components/Table/TableCell.d.ts +1 -1
  20. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -1
  21. package/lib/typescript/src/components/Table/TableRow.d.ts +1 -1
  22. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -1
  23. package/lib/typescript/src/components/Table/index.d.ts +18 -0
  24. package/lib/typescript/src/components/Table/index.d.ts.map +1 -1
  25. package/lib/typescript/src/mappings/Layout.d.ts +108 -72
  26. package/lib/typescript/src/mappings/Layout.d.ts.map +1 -1
  27. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
  28. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  29. package/package.json +3 -3
  30. package/src/components/Table/Table.js +3 -4
  31. package/src/components/Table/Table.tsx +3 -7
  32. package/src/components/Table/TableCell.js +1 -1
  33. package/src/components/Table/TableCell.tsx +1 -5
  34. package/src/components/Table/TableRow.js +1 -1
  35. package/src/components/Table/TableRow.tsx +1 -1
  36. package/src/components/Table/index.js +12 -0
  37. package/src/components/Table/index.tsx +41 -0
  38. package/src/mappings/Layout.js +176 -100
  39. package/src/mappings/Layout.ts +178 -116
  40. package/src/mappings/NativeBase/Layout.js +124 -0
  41. package/src/mappings/NativeBase/Layout.ts +145 -0
  42. package/lib/commonjs/components/Table/TableCommon.js +0 -30
  43. package/lib/module/components/Table/TableCommon.js +0 -21
  44. package/lib/typescript/src/components/Table/TableCommon.d.ts +0 -20
  45. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +0 -1
  46. package/src/components/Table/TableCommon.js +0 -12
  47. package/src/components/Table/TableCommon.ts +0 -40
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { View, StyleSheet } from "react-native";
3
- import { generateBorderStyles, TableStyleContext } from "./TableCommon";
3
+ import { generateBorderStyles, TableStyleContext } from "./index";
4
4
  import { withTheme } from "../../theming";
5
5
  const TableRow = _ref => {
6
6
  let {
@@ -1,3 +1,24 @@
1
+ import React from "react";
2
+ export const TableStyleContext = /*#__PURE__*/React.createContext({});
3
+ export function generateBorderStyles(_ref) {
4
+ let {
5
+ borderColor,
6
+ borderWidth,
7
+ borderStyle,
8
+ drawTopBorder,
9
+ drawBottomBorder,
10
+ drawStartBorder,
11
+ drawEndBorder
12
+ } = _ref;
13
+ return {
14
+ borderColor,
15
+ borderStyle,
16
+ borderTopWidth: drawTopBorder ? borderWidth : 0,
17
+ borderBottomWidth: drawBottomBorder ? borderWidth : 0,
18
+ borderStartWidth: drawStartBorder ? borderWidth : 0,
19
+ borderEndWidth: drawEndBorder ? borderWidth : 0
20
+ };
21
+ }
1
22
  export { default as Table } from "./Table";
2
23
  export { default as TableRow } from "./TableRow";
3
24
  export { default as TableCell } from "./TableCell";
@@ -1,101 +1,193 @@
1
- import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp } from "@draftbit/types";
2
- const SHARED_SEED_DATA = {
3
- category: COMPONENT_TYPES.layout,
4
- packageName: "native-base",
5
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
6
- };
7
- const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
1
+ import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, StylesPanelSections } from "@draftbit/types";
8
2
  export const SEED_DATA = [{
9
- name: "Aspect Ratio",
10
- tag: "AspectRatio",
11
- description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
12
- ...SHARED_SEED_DATA,
13
- props: {
14
- ratio: createStaticNumberProp({
15
- label: "Ratio",
16
- description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
17
- defaultValue: 1.33
18
- })
19
- },
20
- stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
21
- }, {
22
- name: "Box",
23
- tag: "Box",
24
- description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
25
- ...SHARED_SEED_DATA
26
- }, {
27
- name: "Center",
28
- tag: "Center",
29
- description: "Center aligns its contents to the center within itself",
30
- ...SHARED_SEED_DATA,
31
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
32
- }, {
33
- name: "Circle",
34
- tag: "Circle",
35
- description: "Center aligns its contents to the center within itself with a round border radius",
36
- ...SHARED_SEED_DATA,
37
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
38
- }, {
39
- name: "Container",
40
- tag: "Container",
41
- description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
42
- props: {
43
- centerContent: createStaticBoolProp({
44
- label: "Center content",
45
- description: "Center child elements based on their content width",
46
- defaultValue: true
47
- })
48
- },
49
- ...SHARED_SEED_DATA
50
- }, {
51
- name: "Column",
52
- tag: "Column",
53
- description: "Column aligns items vertically",
54
- layout: {
55
- flexDirection: "column"
56
- },
57
- ...SHARED_SEED_DATA
58
- }, {
59
3
  name: "Row",
60
4
  tag: "Row",
61
- description: "Column aligns items horizontally",
62
- layout: {
63
- flexDirection: "row"
64
- },
65
- ...SHARED_SEED_DATA
5
+ category: COMPONENT_TYPES.deprecated,
6
+ stylesPanelSections: [StylesPanelSections.NoStyles],
7
+ props: {
8
+ justifyContent: {
9
+ label: "Align Horizontally",
10
+ group: GROUPS.style,
11
+ description: "Align Items Horizontally (on the X Axis)",
12
+ formType: FORM_TYPES.string,
13
+ propType: PROP_TYPES.STRING,
14
+ defaultValue: "flex-start",
15
+ editable: true,
16
+ required: false
17
+ },
18
+ alignItems: {
19
+ label: "Align Vertically",
20
+ group: GROUPS.style,
21
+ description: "Align Items Vertically (on the Y Axis)",
22
+ formType: FORM_TYPES.string,
23
+ propType: PROP_TYPES.STRING,
24
+ defaultValue: "flex-start",
25
+ editable: true,
26
+ required: false
27
+ }
28
+ }
66
29
  }, {
67
30
  name: "Spacer",
68
31
  tag: "Spacer",
69
- description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
70
- layout: {
71
- flex: 1
72
- },
73
- ...SHARED_SEED_DATA,
74
- stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
32
+ category: COMPONENT_TYPES.layout,
33
+ props: {
34
+ top: {
35
+ label: "Top",
36
+ description: "Top",
37
+ formType: FORM_TYPES.number,
38
+ propType: PROP_TYPES.NUMBER,
39
+ group: GROUPS.style,
40
+ defaultValue: 8,
41
+ editable: true,
42
+ required: false
43
+ },
44
+ right: {
45
+ label: "Right",
46
+ description: "Right",
47
+ formType: FORM_TYPES.number,
48
+ propType: PROP_TYPES.NUMBER,
49
+ group: GROUPS.style,
50
+ defaultValue: 8,
51
+ editable: true,
52
+ required: false
53
+ },
54
+ bottom: {
55
+ label: "Bottom",
56
+ description: "Bottom",
57
+ formType: FORM_TYPES.number,
58
+ propType: PROP_TYPES.NUMBER,
59
+ group: GROUPS.style,
60
+ defaultValue: 8,
61
+ editable: true,
62
+ required: false
63
+ },
64
+ left: {
65
+ label: "Left",
66
+ description: "Left",
67
+ formType: FORM_TYPES.number,
68
+ propType: PROP_TYPES.NUMBER,
69
+ group: GROUPS.style,
70
+ defaultValue: 8,
71
+ editable: true,
72
+ required: false
73
+ }
74
+ }
75
75
  }, {
76
76
  name: "Stack",
77
77
  tag: "Stack",
78
- description: "Stack aligns items vertically or horizontally based on the direction prop",
79
- ...SHARED_SEED_DATA,
78
+ category: COMPONENT_TYPES.deprecated,
79
+ stylesPanelSections: [StylesPanelSections.NoStyles],
80
+ props: {
81
+ justifyContent: {
82
+ group: GROUPS.style,
83
+ label: "Justify",
84
+ description: "Justify horizontally",
85
+ formType: FORM_TYPES.string,
86
+ propType: PROP_TYPES.STRING,
87
+ defaultValue: "flex-start",
88
+ editable: true,
89
+ required: false
90
+ },
91
+ alignItems: {
92
+ group: GROUPS.style,
93
+ label: "Align",
94
+ description: "Vertical align",
95
+ formType: FORM_TYPES.string,
96
+ propType: PROP_TYPES.STRING,
97
+ defaultValue: "flex-start",
98
+ editable: true,
99
+ required: false
100
+ }
101
+ }
102
+ }, {
103
+ name: "Center",
104
+ tag: "Center",
105
+ category: COMPONENT_TYPES.layout,
106
+ stylesPanelSections: [StylesPanelSections.NoStyles],
80
107
  props: {
81
- isDisabled: createBoolProp({
82
- label: "Disabled",
83
- description: "If true, the Stack will be disabled"
84
- }),
85
- isInvalid: createBoolProp({
86
- label: "Invalid",
87
- description: "If true, the Stack will be invalid"
88
- })
108
+ width: {
109
+ label: "Width",
110
+ description: "Width",
111
+ formType: FORM_TYPES.number,
112
+ propType: PROP_TYPES.NUMBER,
113
+ group: GROUPS.style,
114
+ defaultValue: 240,
115
+ editable: true,
116
+ required: false
117
+ },
118
+ height: {
119
+ label: "Height",
120
+ description: "Height",
121
+ formType: FORM_TYPES.number,
122
+ propType: PROP_TYPES.NUMBER,
123
+ group: GROUPS.style,
124
+ defaultValue: 200,
125
+ editable: true,
126
+ required: false
127
+ },
128
+ bgColor: {
129
+ label: "Background Color",
130
+ description: "Background color",
131
+ formType: FORM_TYPES.color,
132
+ propType: PROP_TYPES.THEME,
133
+ editable: true,
134
+ required: false,
135
+ defaultValue: "light",
136
+ group: GROUPS.style
137
+ }
89
138
  }
90
139
  }, {
91
- name: "ZStack",
92
- tag: "ZStack",
93
- description: "ZStack aligns items to the z-axis",
94
- ...SHARED_SEED_DATA,
140
+ name: "Circle",
141
+ tag: "Circle",
142
+ category: COMPONENT_TYPES.layout,
143
+ stylesPanelSections: [StylesPanelSections.NoStyles],
144
+ props: {
145
+ size: {
146
+ label: "Size",
147
+ description: "Size",
148
+ formType: FORM_TYPES.number,
149
+ propType: PROP_TYPES.NUMBER,
150
+ group: GROUPS.style,
151
+ defaultValue: 50,
152
+ editable: true,
153
+ required: false
154
+ },
155
+ bgColor: {
156
+ label: "Background Color",
157
+ description: "Background color",
158
+ formType: FORM_TYPES.color,
159
+ propType: PROP_TYPES.THEME,
160
+ editable: true,
161
+ required: false,
162
+ defaultValue: "light",
163
+ group: GROUPS.style
164
+ }
165
+ }
166
+ }, {
167
+ name: "Square",
168
+ tag: "Square",
169
+ category: COMPONENT_TYPES.layout,
170
+ stylesPanelSections: [StylesPanelSections.NoStyles],
95
171
  props: {
96
- reversed: createBoolProp({
97
- label: "Reversed",
98
- description: "Determines whether to reverse the direction of items"
99
- })
172
+ size: {
173
+ label: "Size",
174
+ description: "Size",
175
+ formType: FORM_TYPES.number,
176
+ propType: PROP_TYPES.NUMBER,
177
+ group: GROUPS.style,
178
+ defaultValue: 50,
179
+ editable: true,
180
+ required: false
181
+ },
182
+ bgColor: {
183
+ label: "Background Color",
184
+ description: "Background color",
185
+ formType: FORM_TYPES.color,
186
+ propType: PROP_TYPES.THEME,
187
+ editable: true,
188
+ required: false,
189
+ defaultValue: "light",
190
+ group: GROUPS.style
191
+ }
100
192
  }
101
193
  }];
@@ -0,0 +1,101 @@
1
+ import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp } from "@draftbit/types";
2
+ const SHARED_SEED_DATA = {
3
+ category: COMPONENT_TYPES.layout,
4
+ packageName: "native-base",
5
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
6
+ };
7
+ const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX = CONTAINER_COMPONENT_STYLES_SECTIONS.filter(item => item !== StylesPanelSections.LayoutFlexItems && item !== StylesPanelSections.LayoutContent);
8
+ export const SEED_DATA = [{
9
+ name: "Aspect Ratio",
10
+ tag: "AspectRatio",
11
+ description: "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
12
+ ...SHARED_SEED_DATA,
13
+ props: {
14
+ ratio: createStaticNumberProp({
15
+ label: "Ratio",
16
+ description: "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
17
+ defaultValue: 1.33
18
+ })
19
+ },
20
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects]
21
+ }, {
22
+ name: "Box",
23
+ tag: "Box",
24
+ description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
25
+ ...SHARED_SEED_DATA
26
+ }, {
27
+ name: "Center",
28
+ tag: "Center",
29
+ description: "Center aligns its contents to the center within itself",
30
+ ...SHARED_SEED_DATA,
31
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
32
+ }, {
33
+ name: "Circle",
34
+ tag: "Circle",
35
+ description: "Center aligns its contents to the center within itself with a round border radius",
36
+ ...SHARED_SEED_DATA,
37
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX
38
+ }, {
39
+ name: "Container",
40
+ tag: "Container",
41
+ description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
42
+ props: {
43
+ centerContent: createStaticBoolProp({
44
+ label: "Center content",
45
+ description: "Center child elements based on their content width",
46
+ defaultValue: true
47
+ })
48
+ },
49
+ ...SHARED_SEED_DATA
50
+ }, {
51
+ name: "Column",
52
+ tag: "Column",
53
+ description: "Column aligns items vertically",
54
+ layout: {
55
+ flexDirection: "column"
56
+ },
57
+ ...SHARED_SEED_DATA
58
+ }, {
59
+ name: "Row",
60
+ tag: "Row",
61
+ description: "Column aligns items horizontally",
62
+ layout: {
63
+ flexDirection: "row"
64
+ },
65
+ ...SHARED_SEED_DATA
66
+ }, {
67
+ name: "Spacer",
68
+ tag: "Spacer",
69
+ description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
70
+ layout: {
71
+ flex: 1
72
+ },
73
+ ...SHARED_SEED_DATA,
74
+ stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Background, StylesPanelSections.Margins]
75
+ }, {
76
+ name: "Stack",
77
+ tag: "Stack",
78
+ description: "Stack aligns items vertically or horizontally based on the direction prop",
79
+ ...SHARED_SEED_DATA,
80
+ props: {
81
+ isDisabled: createBoolProp({
82
+ label: "Disabled",
83
+ description: "If true, the Stack will be disabled"
84
+ }),
85
+ isInvalid: createBoolProp({
86
+ label: "Invalid",
87
+ description: "If true, the Stack will be invalid"
88
+ })
89
+ }
90
+ }, {
91
+ name: "ZStack",
92
+ tag: "ZStack",
93
+ description: "ZStack aligns items to the z-axis",
94
+ ...SHARED_SEED_DATA,
95
+ props: {
96
+ reversed: createBoolProp({
97
+ label: "Reversed",
98
+ description: "Determines whether to reverse the direction of items"
99
+ })
100
+ }
101
+ }];
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle, ScrollViewProps } from "react-native";
3
- import { Theme } from "../../styles/DefaultTheme";
4
- import { TableProps } from "./TableCommon";
3
+ import { TableProps } from "./index";
5
4
  export interface Props<T> extends TableProps, ScrollViewProps {
6
5
  data?: Array<T>;
7
6
  keyExtractor?: (item: T, index: number) => string;
@@ -10,10 +9,7 @@ export interface Props<T> extends TableProps, ScrollViewProps {
10
9
  index: number;
11
10
  }) => JSX.Element;
12
11
  style?: StyleProp<ViewStyle>;
13
- theme: Theme;
14
12
  }
15
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props<object>>, "theme"> & {
16
- theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
17
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props<object>>> & (<T extends object>({ theme, borderWidth, borderColor, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, cellVerticalPadding, cellHorizontalPadding, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }: React.PropsWithChildren<Props<T>>) => JSX.Element), {}>;
18
- export default _default;
13
+ declare const Table: <T extends object>({ borderWidth, borderColor, borderStyle, drawTopBorder, drawBottomBorder, drawStartBorder, drawEndBorder, cellVerticalPadding, cellHorizontalPadding, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }: React.PropsWithChildren<Props<T>>) => JSX.Element;
14
+ export default Table;
19
15
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +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,EAEL,SAAS,EACT,SAAS,EAGT,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAEL,UAAU,EAGX,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,KAAK,CAAC,CAAC,CAAE,SAAQ,UAAU,EAAE,eAAe;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;CACd;;;;AAuJD,wBAAgC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,SAAS,EACT,SAAS,EAGT,eAAe,EAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,UAAU,EAGX,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,KAAK,CAAC,CAAC,CAAE,SAAQ,UAAU,EAAE,eAAe;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,KAAK,sSA4IV,CAAC;AAQF,eAAe,KAAK,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
- import { TableProps } from "./TableCommon";
3
+ import { TableProps } from "./index";
4
4
  export interface Props extends TableProps {
5
5
  style?: StyleProp<ViewStyle>;
6
6
  }
@@ -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,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"}
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,EAAwB,UAAU,EAAqB,MAAM,SAAS,CAAC;AAE9E,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"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { StyleProp, ViewStyle } from "react-native";
3
- import { TableProps } from "./TableCommon";
3
+ import { TableProps } from "./index";
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,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
+ {"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,SAAS,CAAC;AACjB,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,3 +1,21 @@
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;
1
19
  export { default as Table } from "./Table";
2
20
  export { default as TableRow } from "./TableRow";
3
21
  export { default as TableCell } from "./TableCell";
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Table/index.tsx"],"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;AAED,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"}