@draftbit/core 46.10.3-877a3f.2 → 46.10.3-a0279d.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 (65) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
  2. package/lib/commonjs/components/Table/Table.js +123 -0
  3. package/lib/commonjs/components/Table/TableCell.js +49 -0
  4. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  5. package/lib/commonjs/components/Table/TableRow.js +61 -0
  6. package/lib/commonjs/components/Table/index.js +27 -0
  7. package/lib/commonjs/constants.js +1 -1
  8. package/lib/commonjs/index.js +19 -7
  9. package/lib/commonjs/mappings/NativeBase/Layout.js +9 -14
  10. package/lib/commonjs/mappings/Table.js +140 -0
  11. package/lib/module/components/DeprecatedFAB.js +3 -23
  12. package/lib/module/components/Elevation.js +2 -14
  13. package/lib/module/components/Table/Table.js +114 -0
  14. package/lib/module/components/Table/TableCell.js +41 -0
  15. package/lib/module/components/Table/TableCommon.js +21 -0
  16. package/lib/module/components/Table/TableRow.js +53 -0
  17. package/lib/module/components/Table/index.js +3 -0
  18. package/lib/module/index.js +1 -1
  19. package/lib/module/mappings/NativeBase/Layout.js +10 -15
  20. package/lib/module/mappings/Table.js +133 -0
  21. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  22. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  23. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  24. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  25. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  26. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  27. package/lib/typescript/src/components/Table/TableRow.d.ts +14 -0
  28. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  29. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  30. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  31. package/lib/typescript/src/index.d.ts +1 -1
  32. package/lib/typescript/src/index.d.ts.map +1 -1
  33. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +16 -27
  34. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
  35. package/lib/typescript/src/mappings/Table.d.ts +337 -0
  36. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  37. package/package.json +3 -3
  38. package/src/components/Table/Table.js +93 -0
  39. package/src/components/Table/Table.tsx +176 -0
  40. package/src/components/Table/TableCell.js +31 -0
  41. package/src/components/Table/TableCell.tsx +63 -0
  42. package/src/components/Table/TableCommon.js +12 -0
  43. package/src/components/Table/TableCommon.ts +40 -0
  44. package/src/components/Table/TableRow.js +37 -0
  45. package/src/components/Table/TableRow.tsx +77 -0
  46. package/src/components/Table/index.js +3 -0
  47. package/src/components/Table/index.tsx +3 -0
  48. package/src/index.js +1 -1
  49. package/src/index.tsx +2 -1
  50. package/src/mappings/NativeBase/Layout.js +19 -13
  51. package/src/mappings/NativeBase/Layout.ts +19 -13
  52. package/src/mappings/Table.js +150 -0
  53. package/src/mappings/Table.ts +170 -0
  54. package/lib/commonjs/components/Container.js +0 -93
  55. package/lib/commonjs/mappings/Container.js +0 -37
  56. package/lib/module/components/Container.js +0 -83
  57. package/lib/module/mappings/Container.js +0 -30
  58. package/lib/typescript/src/components/Container.d.ts +0 -21
  59. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  60. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  61. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  62. package/src/components/Container.js +0 -43
  63. package/src/components/Container.tsx +0 -116
  64. package/src/mappings/Container.js +0 -30
  65. package/src/mappings/Container.ts +0 -41
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
3
+ import {
4
+ generateBorderStyles,
5
+ TableProps,
6
+ TableStyleContext,
7
+ } from "./TableCommon";
8
+
9
+ export interface Props extends TableProps {
10
+ style?: StyleProp<ViewStyle>;
11
+ }
12
+
13
+ const TableCell: React.FC<React.PropsWithChildren<Props>> = ({
14
+ borderWidth,
15
+ borderColor,
16
+ borderStyle,
17
+ drawTopBorder = false,
18
+ drawBottomBorder = false,
19
+ drawStartBorder = false,
20
+ drawEndBorder = true,
21
+ cellVerticalPadding,
22
+ cellHorizontalPadding,
23
+ children,
24
+ style,
25
+ }) => {
26
+ const parentContextValue = React.useContext(TableStyleContext);
27
+
28
+ const borderViewStyle = generateBorderStyles({
29
+ borderColor: borderColor || parentContextValue.borderColor,
30
+ borderWidth: borderWidth || parentContextValue.borderWidth,
31
+ borderStyle: borderStyle || parentContextValue.borderStyle,
32
+ drawTopBorder,
33
+ drawBottomBorder,
34
+ drawStartBorder,
35
+ drawEndBorder,
36
+ });
37
+ return (
38
+ <View
39
+ style={[
40
+ styles.cellContainer,
41
+ borderViewStyle,
42
+ {
43
+ paddingVertical:
44
+ cellVerticalPadding || parentContextValue.cellVerticalPadding,
45
+ paddingHorizontal:
46
+ cellHorizontalPadding || parentContextValue.cellHorizontalPadding,
47
+ },
48
+ style,
49
+ ]}
50
+ >
51
+ {children}
52
+ </View>
53
+ );
54
+ };
55
+
56
+ const styles = StyleSheet.create({
57
+ cellContainer: {
58
+ flex: 1,
59
+ flexDirection: "row",
60
+ },
61
+ });
62
+
63
+ export default TableCell;
@@ -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
+ }
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import { View, StyleSheet } from "react-native";
3
+ import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
4
+ import { withTheme } from "../../theming";
5
+ const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, style, theme, }) => {
6
+ const parentContextValue = React.useContext(TableStyleContext);
7
+ //Create context to use and pass to children based on own props or fall back to parent provided context
8
+ const contextValue = {
9
+ borderColor: borderColor || parentContextValue.borderColor,
10
+ borderStyle: borderStyle || parentContextValue.borderStyle,
11
+ borderWidth: borderWidth || parentContextValue.borderWidth,
12
+ cellHorizontalPadding: cellHorizontalPadding || parentContextValue.cellHorizontalPadding,
13
+ cellVerticalPadding: cellVerticalPadding || parentContextValue.cellVerticalPadding,
14
+ };
15
+ const borderViewStyle = generateBorderStyles({
16
+ borderColor: contextValue.borderColor,
17
+ borderWidth: contextValue.borderWidth,
18
+ borderStyle: contextValue.borderStyle,
19
+ drawTopBorder,
20
+ drawBottomBorder,
21
+ drawStartBorder,
22
+ drawEndBorder,
23
+ });
24
+ return (React.createElement(TableStyleContext.Provider, { value: contextValue },
25
+ React.createElement(View, { style: [
26
+ borderViewStyle,
27
+ isTableHeader ? { backgroundColor: theme.colors.primary } : {},
28
+ style,
29
+ styles.cellsContainer,
30
+ ] }, children)));
31
+ };
32
+ const styles = StyleSheet.create({
33
+ cellsContainer: {
34
+ flexDirection: "row",
35
+ },
36
+ });
37
+ export default withTheme(TableRow);
@@ -0,0 +1,77 @@
1
+ import React from "react";
2
+ import { View, StyleProp, ViewStyle, StyleSheet } from "react-native";
3
+ import {
4
+ generateBorderStyles,
5
+ TableProps,
6
+ TableStyleContext,
7
+ TableStyleProps,
8
+ } from "./TableCommon";
9
+ import { Theme } from "../../styles/DefaultTheme";
10
+ import { withTheme } from "../../theming";
11
+
12
+ export interface Props extends TableProps {
13
+ isTableHeader?: boolean;
14
+ style?: StyleProp<ViewStyle>;
15
+ theme: Theme;
16
+ }
17
+
18
+ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
19
+ borderWidth,
20
+ borderColor,
21
+ borderStyle,
22
+ drawTopBorder = false,
23
+ drawBottomBorder = true,
24
+ drawStartBorder = true,
25
+ drawEndBorder = false,
26
+ cellVerticalPadding,
27
+ cellHorizontalPadding,
28
+ isTableHeader = false,
29
+ children,
30
+ style,
31
+ theme,
32
+ }) => {
33
+ const parentContextValue = React.useContext(TableStyleContext);
34
+
35
+ //Create context to use and pass to children based on own props or fall back to parent provided context
36
+ const contextValue: TableStyleProps = {
37
+ borderColor: borderColor || parentContextValue.borderColor,
38
+ borderStyle: borderStyle || parentContextValue.borderStyle,
39
+ borderWidth: borderWidth || parentContextValue.borderWidth,
40
+ cellHorizontalPadding:
41
+ cellHorizontalPadding || parentContextValue.cellHorizontalPadding,
42
+ cellVerticalPadding:
43
+ cellVerticalPadding || parentContextValue.cellVerticalPadding,
44
+ };
45
+
46
+ const borderViewStyle = generateBorderStyles({
47
+ borderColor: contextValue.borderColor,
48
+ borderWidth: contextValue.borderWidth,
49
+ borderStyle: contextValue.borderStyle,
50
+ drawTopBorder,
51
+ drawBottomBorder,
52
+ drawStartBorder,
53
+ drawEndBorder,
54
+ });
55
+ return (
56
+ <TableStyleContext.Provider value={contextValue}>
57
+ <View
58
+ style={[
59
+ borderViewStyle,
60
+ isTableHeader ? { backgroundColor: theme.colors.primary } : {},
61
+ style,
62
+ styles.cellsContainer,
63
+ ]}
64
+ >
65
+ {children}
66
+ </View>
67
+ </TableStyleContext.Provider>
68
+ );
69
+ };
70
+
71
+ const styles = StyleSheet.create({
72
+ cellsContainer: {
73
+ flexDirection: "row",
74
+ },
75
+ });
76
+
77
+ export default withTheme(TableRow);
@@ -0,0 +1,3 @@
1
+ export { default as Table } from "./Table";
2
+ export { default as TableRow } from "./TableRow";
3
+ export { default as TableCell } from "./TableCell";
@@ -0,0 +1,3 @@
1
+ export { default as Table } from "./Table";
2
+ export { default as TableRow } from "./TableRow";
3
+ export { default as TableCell } from "./TableCell";
package/src/index.js CHANGED
@@ -10,7 +10,6 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
10
10
  export { default as Card } from "./components/Card";
11
11
  export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
12
12
  export { default as CircleImage } from "./components/CircleImage";
13
- export { default as Container } from "./components/Container";
14
13
  export { default as Divider } from "./components/Divider";
15
14
  export { default as FAB } from "./components/FAB";
16
15
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
@@ -37,6 +36,7 @@ export { TabView, TabViewItem } from "./components/TabView";
37
36
  export { default as Markdown } from "./components/Markdown";
38
37
  export { BottomSheet } from "./components/BottomSheet";
39
38
  export { YoutubePlayer } from "./components/YoutubePlayer";
39
+ export { Table, TableRow, TableCell } from "./components/Table";
40
40
  /* Deprecated: Fix or Delete! */
41
41
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
42
42
  export { default as Picker } from "./components/Picker/Picker";
package/src/index.tsx CHANGED
@@ -11,7 +11,6 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
11
11
  export { default as Card } from "./components/Card";
12
12
  export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
13
13
  export { default as CircleImage } from "./components/CircleImage";
14
- export { default as Container } from "./components/Container";
15
14
  export { default as Divider } from "./components/Divider";
16
15
  export { default as FAB } from "./components/FAB";
17
16
  export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
@@ -62,6 +61,8 @@ export { BottomSheet } from "./components/BottomSheet";
62
61
 
63
62
  export { YoutubePlayer } from "./components/YoutubePlayer";
64
63
 
64
+ export { Table, TableRow, TableCell } from "./components/Table";
65
+
65
66
  /* Deprecated: Fix or Delete! */
66
67
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
67
68
  export { default as Picker } from "./components/Picker/Picker";
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, createStaticBoolProp, } from "@draftbit/types";
2
2
  const SHARED_SEED_DATA = {
3
3
  category: COMPONENT_TYPES.layout,
4
4
  packageName: "native-base",
@@ -19,6 +19,14 @@ export const SEED_DATA = [
19
19
  defaultValue: 1.33,
20
20
  }),
21
21
  },
22
+ stylesPanelSections: [
23
+ StylesPanelSections.Background,
24
+ StylesPanelSections.Size,
25
+ StylesPanelSections.Margins,
26
+ StylesPanelSections.Position,
27
+ StylesPanelSections.Borders,
28
+ StylesPanelSections.Effects,
29
+ ],
22
30
  },
23
31
  {
24
32
  name: "Box",
@@ -45,9 +53,10 @@ export const SEED_DATA = [
45
53
  tag: "Container",
46
54
  description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
47
55
  props: {
48
- centerContent: createBoolProp({
56
+ centerContent: createStaticBoolProp({
49
57
  label: "Center content",
50
58
  description: "Center child elements based on their content width",
59
+ defaultValue: true,
51
60
  }),
52
61
  },
53
62
  ...SHARED_SEED_DATA,
@@ -74,8 +83,15 @@ export const SEED_DATA = [
74
83
  name: "Spacer",
75
84
  tag: "Spacer",
76
85
  description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
86
+ layout: {
87
+ flex: 1,
88
+ },
77
89
  ...SHARED_SEED_DATA,
78
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
90
+ stylesPanelSections: [
91
+ StylesPanelSections.LayoutSelectedItem,
92
+ StylesPanelSections.Background,
93
+ StylesPanelSections.Margins,
94
+ ],
79
95
  },
80
96
  {
81
97
  name: "Stack",
@@ -83,16 +99,6 @@ export const SEED_DATA = [
83
99
  description: "Stack aligns items vertically or horizontally based on the direction prop",
84
100
  ...SHARED_SEED_DATA,
85
101
  props: {
86
- direction: createTextEnumProp({
87
- label: "Direction",
88
- description: "The direction of the Stack",
89
- options: ["row", "column"],
90
- defaultValue: "column",
91
- }),
92
- reversed: createBoolProp({
93
- label: "Reversed",
94
- description: "Determines whether to reverse the direction of items",
95
- }),
96
102
  isDisabled: createBoolProp({
97
103
  label: "Disabled",
98
104
  description: "If true, the Stack will be disabled",
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  COMPONENT_TYPES,
3
- createTextEnumProp,
4
3
  createBoolProp,
5
4
  CONTAINER_COMPONENT_STYLES_SECTIONS,
6
5
  createStaticNumberProp,
7
6
  StylesPanelSections,
7
+ createStaticBoolProp,
8
8
  } from "@draftbit/types";
9
9
 
10
10
  const SHARED_SEED_DATA = {
@@ -35,6 +35,14 @@ export const SEED_DATA = [
35
35
  defaultValue: 1.33,
36
36
  }),
37
37
  },
38
+ stylesPanelSections: [
39
+ StylesPanelSections.Background,
40
+ StylesPanelSections.Size,
41
+ StylesPanelSections.Margins,
42
+ StylesPanelSections.Position,
43
+ StylesPanelSections.Borders,
44
+ StylesPanelSections.Effects,
45
+ ],
38
46
  },
39
47
  {
40
48
  name: "Box",
@@ -64,9 +72,10 @@ export const SEED_DATA = [
64
72
  description:
65
73
  "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
66
74
  props: {
67
- centerContent: createBoolProp({
75
+ centerContent: createStaticBoolProp({
68
76
  label: "Center content",
69
77
  description: "Center child elements based on their content width",
78
+ defaultValue: true,
70
79
  }),
71
80
  },
72
81
  ...SHARED_SEED_DATA,
@@ -94,8 +103,15 @@ export const SEED_DATA = [
94
103
  tag: "Spacer",
95
104
  description:
96
105
  "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
106
+ layout: {
107
+ flex: 1,
108
+ },
97
109
  ...SHARED_SEED_DATA,
98
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
110
+ stylesPanelSections: [
111
+ StylesPanelSections.LayoutSelectedItem,
112
+ StylesPanelSections.Background,
113
+ StylesPanelSections.Margins,
114
+ ],
99
115
  },
100
116
  {
101
117
  name: "Stack",
@@ -104,16 +120,6 @@ export const SEED_DATA = [
104
120
  "Stack aligns items vertically or horizontally based on the direction prop",
105
121
  ...SHARED_SEED_DATA,
106
122
  props: {
107
- direction: createTextEnumProp({
108
- label: "Direction",
109
- description: "The direction of the Stack",
110
- options: ["row", "column"],
111
- defaultValue: "column",
112
- }),
113
- reversed: createBoolProp({
114
- label: "Reversed",
115
- description: "Determines whether to reverse the direction of items",
116
- }),
117
123
  isDisabled: createBoolProp({
118
124
  label: "Disabled",
119
125
  description: "If true, the Stack will be disabled",
@@ -0,0 +1,150 @@
1
+ import { COMPONENT_TYPES, StylesPanelSections, createColorProp, createStaticBoolProp, createStaticNumberProp, 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
+ cellVerticalPadding: createStaticNumberProp({
41
+ label: "Cell Vertical Padding",
42
+ description: "Specifies the vertical padding of the cell. Passed down to TableCell components unless overridden",
43
+ required: false,
44
+ defaultValue: null,
45
+ }),
46
+ cellHorizontalPadding: createStaticNumberProp({
47
+ label: "Cell Horizontal Padding",
48
+ description: "Specifies the horizontal padding of the cell. Passed down to TableCell components unless overridden",
49
+ required: false,
50
+ defaultValue: null,
51
+ }),
52
+ };
53
+ export const SEED_DATA = [
54
+ {
55
+ name: "Table",
56
+ tag: "Table",
57
+ description: "Top level table container",
58
+ category: COMPONENT_TYPES.table,
59
+ stylesPanelSections: [
60
+ StylesPanelSections.Size,
61
+ StylesPanelSections.Margins,
62
+ StylesPanelSections.Position,
63
+ StylesPanelSections.Effects,
64
+ StylesPanelSections.Background,
65
+ StylesPanelSections.LayoutSelectedItem,
66
+ ],
67
+ layout: {
68
+ flex: 1,
69
+ },
70
+ props: {
71
+ ...SHARED_SEED_DATA_PROPS,
72
+ borderWidth: { ...SHARED_SEED_DATA_PROPS.borderWidth, defaultValue: 1 },
73
+ borderColor: {
74
+ ...SHARED_SEED_DATA_PROPS.borderColor,
75
+ defaultValue: "divider",
76
+ },
77
+ borderStyle: {
78
+ ...SHARED_SEED_DATA_PROPS.borderStyle,
79
+ defaultValue: "solid",
80
+ },
81
+ drawTopBorder: {
82
+ ...SHARED_SEED_DATA_PROPS.drawTopBorder,
83
+ defaultValue: true,
84
+ },
85
+ cellVerticalPadding: {
86
+ ...SHARED_SEED_DATA_PROPS.cellVerticalPadding,
87
+ defaultValue: 10,
88
+ },
89
+ cellHorizontalPadding: {
90
+ ...SHARED_SEED_DATA_PROPS.cellHorizontalPadding,
91
+ defaultValue: 10,
92
+ },
93
+ showsVerticalScrollIndicator: createStaticBoolProp({
94
+ label: "Show Vertical Scroll Indicator",
95
+ description: "When true, shows a vertical scroll indicator. The default value is true.",
96
+ defaultValue: true,
97
+ }),
98
+ },
99
+ },
100
+ {
101
+ name: "Table Row",
102
+ tag: "TableRow",
103
+ description: "Table Row container",
104
+ category: COMPONENT_TYPES.table,
105
+ stylesPanelSections: [StylesPanelSections.Background],
106
+ props: {
107
+ ...SHARED_SEED_DATA_PROPS,
108
+ drawStartBorder: {
109
+ ...SHARED_SEED_DATA_PROPS.drawStartBorder,
110
+ defaultValue: true,
111
+ },
112
+ drawBottomBorder: {
113
+ ...SHARED_SEED_DATA_PROPS.drawBottomBorder,
114
+ defaultValue: true,
115
+ },
116
+ isTableHeader: createStaticBoolProp({
117
+ label: "Header",
118
+ description: "Whether this row is a header or not (changes background and sticks while scrolling)",
119
+ defaultValue: false,
120
+ }),
121
+ },
122
+ },
123
+ {
124
+ name: "Table Cell",
125
+ tag: "TableCell",
126
+ description: "Table Cell container",
127
+ category: COMPONENT_TYPES.table,
128
+ stylesPanelSections: [
129
+ StylesPanelSections.LayoutFlexItems,
130
+ StylesPanelSections.LayoutSelectedItem,
131
+ StylesPanelSections.LayoutContent,
132
+ StylesPanelSections.Background,
133
+ StylesPanelSections.Size,
134
+ StylesPanelSections.MarginsAndPaddings,
135
+ StylesPanelSections.Position,
136
+ StylesPanelSections.Effects,
137
+ ],
138
+ layout: {
139
+ flex: 1,
140
+ flexDirection: "row",
141
+ },
142
+ props: {
143
+ ...SHARED_SEED_DATA_PROPS,
144
+ drawEndBorder: {
145
+ ...SHARED_SEED_DATA_PROPS.drawEndBorder,
146
+ defaultValue: true,
147
+ },
148
+ },
149
+ },
150
+ ];