@draftbit/core 46.10.3-e89832.2 → 46.10.3-f6ea70.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 (119) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  3. package/lib/commonjs/components/AvatarEdit.js +4 -15
  4. package/lib/commonjs/components/Banner.js +4 -23
  5. package/lib/commonjs/components/Button.js +10 -33
  6. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
  7. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  8. package/lib/commonjs/components/CircleImage.js +15 -1
  9. package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
  10. package/lib/commonjs/components/Divider.js +1 -14
  11. package/lib/commonjs/components/FieldSearchBarFull.js +2 -1
  12. package/lib/commonjs/components/Layout.js +19 -40
  13. package/lib/commonjs/components/NumberInput.js +3 -12
  14. package/lib/commonjs/components/Picker/PickerComponent.android.js +3 -20
  15. package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -3
  16. package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
  17. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  18. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +1 -9
  19. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +2 -15
  20. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
  21. package/lib/commonjs/components/ScreenContainer.js +6 -24
  22. package/lib/commonjs/components/Shadow.js +2 -15
  23. package/lib/commonjs/components/Slider.js +4 -21
  24. package/lib/commonjs/components/StarRating.js +4 -23
  25. package/lib/commonjs/components/StepIndicator.js +18 -57
  26. package/lib/commonjs/components/Surface.js +2 -14
  27. package/lib/commonjs/components/TabView/TabView.js +7 -13
  28. package/lib/commonjs/components/Table/Table.js +123 -0
  29. package/lib/commonjs/components/Table/TableCell.js +49 -0
  30. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  31. package/lib/commonjs/components/Table/TableRow.js +61 -0
  32. package/lib/commonjs/components/Table/index.js +27 -0
  33. package/lib/commonjs/components/Text.js +4 -50
  34. package/lib/commonjs/components/TextField.js +28 -76
  35. package/lib/commonjs/components/ToggleButton.js +2 -15
  36. package/lib/commonjs/components/Touchable.js +2 -15
  37. package/lib/commonjs/index.js +19 -28
  38. package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
  39. package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
  40. package/lib/commonjs/mappings/StarRating.js +6 -2
  41. package/lib/commonjs/mappings/Table.js +140 -0
  42. package/lib/commonjs/styles/overlay.js +3 -1
  43. package/lib/commonjs/utilities.js +2 -1
  44. package/lib/module/components/Table/Table.js +114 -0
  45. package/lib/module/components/Table/TableCell.js +41 -0
  46. package/lib/module/components/Table/TableCommon.js +21 -0
  47. package/lib/module/components/Table/TableRow.js +53 -0
  48. package/lib/module/components/Table/index.js +3 -0
  49. package/lib/module/index.js +1 -4
  50. package/lib/module/mappings/NativeBase/Layout.js +101 -0
  51. package/lib/module/mappings/Table.js +133 -0
  52. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  53. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  54. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  55. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  56. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  57. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  58. package/lib/typescript/src/components/{RowBodyIcon.d.ts → Table/TableRow.d.ts} +7 -9
  59. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  60. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  61. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  62. package/lib/typescript/src/index.d.ts +1 -4
  63. package/lib/typescript/src/index.d.ts.map +1 -1
  64. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
  65. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  66. package/lib/typescript/src/mappings/Table.d.ts +337 -0
  67. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  68. package/package.json +3 -3
  69. package/src/components/Table/Table.js +93 -0
  70. package/src/components/Table/Table.tsx +176 -0
  71. package/src/components/Table/TableCell.js +31 -0
  72. package/src/components/Table/TableCell.tsx +63 -0
  73. package/src/components/Table/TableCommon.js +12 -0
  74. package/src/components/Table/TableCommon.ts +40 -0
  75. package/src/components/Table/TableRow.js +37 -0
  76. package/src/components/Table/TableRow.tsx +77 -0
  77. package/src/components/Table/index.js +3 -0
  78. package/src/components/Table/index.tsx +3 -0
  79. package/src/index.js +1 -4
  80. package/src/index.tsx +2 -4
  81. package/src/mappings/NativeBase/Layout.js +124 -0
  82. package/src/mappings/NativeBase/Layout.ts +145 -0
  83. package/src/mappings/Table.js +150 -0
  84. package/src/mappings/Table.ts +170 -0
  85. package/lib/commonjs/components/Container.js +0 -104
  86. package/lib/commonjs/components/Row.js +0 -73
  87. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  88. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  89. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  90. package/lib/commonjs/mappings/Container.js +0 -37
  91. package/lib/module/components/Container.js +0 -83
  92. package/lib/module/components/Row.js +0 -63
  93. package/lib/module/components/RowBodyIcon.js +0 -35
  94. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  95. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  96. package/lib/module/mappings/Container.js +0 -30
  97. package/lib/typescript/src/components/Container.d.ts +0 -21
  98. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  99. package/lib/typescript/src/components/Row.d.ts +0 -21
  100. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  101. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  102. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  103. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  104. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  105. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  106. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  107. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  108. package/src/components/Container.js +0 -43
  109. package/src/components/Container.tsx +0 -116
  110. package/src/components/Row.js +0 -48
  111. package/src/components/Row.tsx +0 -108
  112. package/src/components/RowBodyIcon.js +0 -8
  113. package/src/components/RowBodyIcon.tsx +0 -47
  114. package/src/components/RowHeadlineImageCaption.js +0 -12
  115. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  116. package/src/components/RowHeadlineImageIcon.js +0 -14
  117. package/src/components/RowHeadlineImageIcon.tsx +0 -61
  118. package/src/mappings/Container.js +0 -30
  119. package/src/mappings/Container.ts +0 -41
@@ -0,0 +1,145 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createBoolProp,
4
+ CONTAINER_COMPONENT_STYLES_SECTIONS,
5
+ createStaticNumberProp,
6
+ StylesPanelSections,
7
+ createStaticBoolProp,
8
+ } from "@draftbit/types";
9
+
10
+ const SHARED_SEED_DATA = {
11
+ category: COMPONENT_TYPES.layout,
12
+ packageName: "native-base",
13
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ };
15
+
16
+ const CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX =
17
+ CONTAINER_COMPONENT_STYLES_SECTIONS.filter(
18
+ (item) =>
19
+ item !== StylesPanelSections.LayoutFlexItems &&
20
+ item !== StylesPanelSections.LayoutContent
21
+ );
22
+
23
+ export const SEED_DATA = [
24
+ {
25
+ name: "Aspect Ratio",
26
+ tag: "AspectRatio",
27
+ description:
28
+ "Controls the size of the undefined dimension of a node or child component using an aspect ratio",
29
+ ...SHARED_SEED_DATA,
30
+ props: {
31
+ ratio: createStaticNumberProp({
32
+ label: "Ratio",
33
+ description:
34
+ "The aspect ratio of the container in decimal format (ex: 3/4 -> 1.33)",
35
+ defaultValue: 1.33,
36
+ }),
37
+ },
38
+ stylesPanelSections: [
39
+ StylesPanelSections.Background,
40
+ StylesPanelSections.Size,
41
+ StylesPanelSections.Margins,
42
+ StylesPanelSections.Position,
43
+ StylesPanelSections.Borders,
44
+ StylesPanelSections.Effects,
45
+ ],
46
+ },
47
+ {
48
+ name: "Box",
49
+ tag: "Box",
50
+ description:
51
+ "This is a generic component for low level layout needs. It is similar to a div in HTML",
52
+ ...SHARED_SEED_DATA,
53
+ },
54
+ {
55
+ name: "Center",
56
+ tag: "Center",
57
+ description: "Center aligns its contents to the center within itself",
58
+ ...SHARED_SEED_DATA,
59
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
60
+ },
61
+ {
62
+ name: "Circle",
63
+ tag: "Circle",
64
+ description:
65
+ "Center aligns its contents to the center within itself with a round border radius",
66
+ ...SHARED_SEED_DATA,
67
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
68
+ },
69
+ {
70
+ name: "Container",
71
+ tag: "Container",
72
+ description:
73
+ "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
74
+ props: {
75
+ centerContent: createStaticBoolProp({
76
+ label: "Center content",
77
+ description: "Center child elements based on their content width",
78
+ defaultValue: true,
79
+ }),
80
+ },
81
+ ...SHARED_SEED_DATA,
82
+ },
83
+ {
84
+ name: "Column",
85
+ tag: "Column",
86
+ description: "Column aligns items vertically",
87
+ layout: {
88
+ flexDirection: "column",
89
+ },
90
+ ...SHARED_SEED_DATA,
91
+ },
92
+ {
93
+ name: "Row",
94
+ tag: "Row",
95
+ description: "Column aligns items horizontally",
96
+ layout: {
97
+ flexDirection: "row",
98
+ },
99
+ ...SHARED_SEED_DATA,
100
+ },
101
+ {
102
+ name: "Spacer",
103
+ tag: "Spacer",
104
+ description:
105
+ "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
106
+ layout: {
107
+ flex: 1,
108
+ },
109
+ ...SHARED_SEED_DATA,
110
+ stylesPanelSections: [
111
+ StylesPanelSections.LayoutSelectedItem,
112
+ StylesPanelSections.Background,
113
+ StylesPanelSections.Margins,
114
+ ],
115
+ },
116
+ {
117
+ name: "Stack",
118
+ tag: "Stack",
119
+ description:
120
+ "Stack aligns items vertically or horizontally based on the direction prop",
121
+ ...SHARED_SEED_DATA,
122
+ props: {
123
+ isDisabled: createBoolProp({
124
+ label: "Disabled",
125
+ description: "If true, the Stack will be disabled",
126
+ }),
127
+ isInvalid: createBoolProp({
128
+ label: "Invalid",
129
+ description: "If true, the Stack will be invalid",
130
+ }),
131
+ },
132
+ },
133
+ {
134
+ name: "ZStack",
135
+ tag: "ZStack",
136
+ description: "ZStack aligns items to the z-axis",
137
+ ...SHARED_SEED_DATA,
138
+ props: {
139
+ reversed: createBoolProp({
140
+ label: "Reversed",
141
+ description: "Determines whether to reverse the direction of items",
142
+ }),
143
+ },
144
+ },
145
+ ];
@@ -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
+ ];
@@ -0,0 +1,170 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ StylesPanelSections,
4
+ createColorProp,
5
+ createStaticBoolProp,
6
+ createStaticNumberProp,
7
+ createTextEnumProp,
8
+ } from "@draftbit/types";
9
+
10
+ const SHARED_SEED_DATA_PROPS = {
11
+ borderWidth: createStaticNumberProp({
12
+ label: "Border Width",
13
+ description:
14
+ "Specifies the width of the border. Passed down to child Table(Row/Cell) components unless overridden",
15
+ required: false,
16
+ defaultValue: null,
17
+ }),
18
+ borderColor: createColorProp({
19
+ label: "Border Color",
20
+ description:
21
+ "Specifies the color of the border. Passed down to child Table(Row/Cell) components unless overridden",
22
+ defaultValue: null,
23
+ }),
24
+ borderStyle: createTextEnumProp({
25
+ label: "Border Style",
26
+ description:
27
+ "Specifies the style of the border. Passed down to child Table(Row/Cell) components unless overridden",
28
+ options: ["solid", "dotted", "dashed"],
29
+ defaultValue: null,
30
+ }),
31
+ drawTopBorder: createStaticBoolProp({
32
+ label: "Draw Top Border",
33
+ description:
34
+ "Whether to draw the top border at this layer of the Table tree or not",
35
+ defaultValue: false,
36
+ }),
37
+ drawBottomBorder: createStaticBoolProp({
38
+ label: "Draw Bottom Border",
39
+ description:
40
+ "Whether to draw the bottom border at this layer of the Table tree or not",
41
+ defaultValue: false,
42
+ }),
43
+ drawStartBorder: createStaticBoolProp({
44
+ label: "Draw Start Border",
45
+ description:
46
+ "Whether to draw the start border at this layer of the Table tree or not",
47
+ defaultValue: false,
48
+ }),
49
+ drawEndBorder: createStaticBoolProp({
50
+ label: "Draw End Border",
51
+ description:
52
+ "Whether to draw the end border at this layer of the Table tree or not",
53
+ defaultValue: false,
54
+ }),
55
+ cellVerticalPadding: createStaticNumberProp({
56
+ label: "Cell Vertical Padding",
57
+ description:
58
+ "Specifies the vertical padding of the cell. Passed down to TableCell components unless overridden",
59
+ required: false,
60
+ defaultValue: null,
61
+ }),
62
+ cellHorizontalPadding: createStaticNumberProp({
63
+ label: "Cell Horizontal Padding",
64
+ description:
65
+ "Specifies the horizontal padding of the cell. Passed down to TableCell components unless overridden",
66
+ required: false,
67
+ defaultValue: null,
68
+ }),
69
+ };
70
+
71
+ export const SEED_DATA = [
72
+ {
73
+ name: "Table",
74
+ tag: "Table",
75
+ description: "Top level table container",
76
+ category: COMPONENT_TYPES.table,
77
+ stylesPanelSections: [
78
+ StylesPanelSections.Size,
79
+ StylesPanelSections.Margins,
80
+ StylesPanelSections.Position,
81
+ StylesPanelSections.Effects,
82
+ StylesPanelSections.Background,
83
+ StylesPanelSections.LayoutSelectedItem,
84
+ ],
85
+ layout: {
86
+ flex: 1,
87
+ },
88
+ props: {
89
+ ...SHARED_SEED_DATA_PROPS,
90
+ borderWidth: { ...SHARED_SEED_DATA_PROPS.borderWidth, defaultValue: 1 },
91
+ borderColor: {
92
+ ...SHARED_SEED_DATA_PROPS.borderColor,
93
+ defaultValue: "divider",
94
+ },
95
+ borderStyle: {
96
+ ...SHARED_SEED_DATA_PROPS.borderStyle,
97
+ defaultValue: "solid",
98
+ },
99
+ drawTopBorder: {
100
+ ...SHARED_SEED_DATA_PROPS.drawTopBorder,
101
+ defaultValue: true,
102
+ },
103
+ cellVerticalPadding: {
104
+ ...SHARED_SEED_DATA_PROPS.cellVerticalPadding,
105
+ defaultValue: 10,
106
+ },
107
+ cellHorizontalPadding: {
108
+ ...SHARED_SEED_DATA_PROPS.cellHorizontalPadding,
109
+ defaultValue: 10,
110
+ },
111
+ showsVerticalScrollIndicator: createStaticBoolProp({
112
+ label: "Show Vertical Scroll Indicator",
113
+ description:
114
+ "When true, shows a vertical scroll indicator. The default value is true.",
115
+ defaultValue: true,
116
+ }),
117
+ },
118
+ },
119
+ {
120
+ name: "Table Row",
121
+ tag: "TableRow",
122
+ description: "Table Row container",
123
+ category: COMPONENT_TYPES.table,
124
+ stylesPanelSections: [StylesPanelSections.Background],
125
+ props: {
126
+ ...SHARED_SEED_DATA_PROPS,
127
+ drawStartBorder: {
128
+ ...SHARED_SEED_DATA_PROPS.drawStartBorder,
129
+ defaultValue: true,
130
+ },
131
+ drawBottomBorder: {
132
+ ...SHARED_SEED_DATA_PROPS.drawBottomBorder,
133
+ defaultValue: true,
134
+ },
135
+ isTableHeader: createStaticBoolProp({
136
+ label: "Header",
137
+ description:
138
+ "Whether this row is a header or not (changes background and sticks while scrolling)",
139
+ defaultValue: false,
140
+ }),
141
+ },
142
+ },
143
+ {
144
+ name: "Table Cell",
145
+ tag: "TableCell",
146
+ description: "Table Cell container",
147
+ category: COMPONENT_TYPES.table,
148
+ stylesPanelSections: [
149
+ StylesPanelSections.LayoutFlexItems,
150
+ StylesPanelSections.LayoutSelectedItem,
151
+ StylesPanelSections.LayoutContent,
152
+ StylesPanelSections.Background,
153
+ StylesPanelSections.Size,
154
+ StylesPanelSections.MarginsAndPaddings,
155
+ StylesPanelSections.Position,
156
+ StylesPanelSections.Effects,
157
+ ],
158
+ layout: {
159
+ flex: 1,
160
+ flexDirection: "row",
161
+ },
162
+ props: {
163
+ ...SHARED_SEED_DATA_PROPS,
164
+ drawEndBorder: {
165
+ ...SHARED_SEED_DATA_PROPS.drawEndBorder,
166
+ defaultValue: true,
167
+ },
168
+ },
169
+ },
170
+ ];
@@ -1,104 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Elevation = _interopRequireDefault(require("./Elevation"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const Container = _ref => {
15
- let {
16
- useThemeGutterPadding,
17
- borderColor,
18
- borderWidth,
19
- backgroundColor,
20
- backgroundImage,
21
- backgroundImageResizeMode,
22
- elevation,
23
- style,
24
- children,
25
- theme,
26
- // eslint-disable-line @typescript-eslint/no-unused-vars
27
- ...rest
28
- } = _ref;
29
- const {
30
- flex,
31
- flexGrow,
32
- flexWrap,
33
- flexBasis,
34
- flexShrink,
35
- flexDirection,
36
- alignContent,
37
- justifyContent,
38
- alignItems,
39
- padding,
40
- paddingTop,
41
- paddingBottom,
42
- paddingLeft,
43
- paddingRight,
44
- paddingVertical,
45
- paddingHorizontal,
46
- ...styleProp
47
- } = _reactNative.StyleSheet.flatten(style) || {};
48
- const containerStyle = {
49
- backgroundColor,
50
- borderColor,
51
- borderWidth,
52
- width: "100%",
53
- ...styleProp
54
- };
55
- const innerStyle = {
56
- flex,
57
- flexGrow,
58
- flexWrap,
59
- flexBasis,
60
- flexShrink,
61
- flexDirection,
62
- alignContent,
63
- justifyContent,
64
- alignItems,
65
- padding,
66
- paddingTop,
67
- paddingBottom,
68
- paddingLeft,
69
- paddingRight,
70
- paddingVertical,
71
- paddingHorizontal: paddingHorizontal || useThemeGutterPadding ? 16 : 0
72
- };
73
- const Wrap = elevation ? _Elevation.default : _reactNative.View;
74
- if (elevation) containerStyle.elevation = elevation;
75
- return /*#__PURE__*/React.createElement(Wrap, {
76
- style: [containerStyle, style],
77
- ...rest
78
- }, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
79
- source: typeof backgroundImage === "string" ? {
80
- uri: backgroundImage
81
- } : backgroundImage,
82
- resizeMode: backgroundImageResizeMode,
83
- style: {
84
- flex: 1
85
- }
86
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
87
- style: innerStyle
88
- }, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
89
- style: innerStyle
90
- }, children));
91
- };
92
- var _default = (0, _theming.withTheme)(Container);
93
- exports.default = _default;sizeMode: backgroundImageResizeMode,
94
- style: {
95
- flex: 1
96
- }
97
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
98
- style: innerStyle
99
- }, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
100
- style: innerStyle
101
- }, children));
102
- };
103
- var _default = (0, _theming.withTheme)(Container);
104
- exports.default = _default;
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../theming");
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const Row = _ref => {
15
- let {
16
- titleTypeStyle,
17
- titleColor,
18
- subtitleTypeStyle,
19
- subtitleColor,
20
- title,
21
- subtitle,
22
- multilineSubtitle,
23
- image,
24
- right,
25
- style
26
- } = _ref;
27
- return /*#__PURE__*/React.createElement(_reactNative.View, {
28
- style: [styles.container, {
29
- padding: 16
30
- }, style]
31
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
32
- style: styles.leftContainer
33
- }, image && /*#__PURE__*/React.createElement(_reactNative.Image, {
34
- source: typeof image === "string" ? {
35
- uri: image
36
- } : image,
37
- style: {
38
- marginRight: 12,
39
- width: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize,
40
- height: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize
41
- }
42
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
43
- style: styles.textContainer
44
- }, /*#__PURE__*/React.createElement(_reactNative.Text, {
45
- style: [titleTypeStyle, {
46
- color: titleColor
47
- }],
48
- numberOfLines: 1
49
- }, title), subtitle ? /*#__PURE__*/React.createElement(_reactNative.Text, {
50
- style: [subtitleTypeStyle, {
51
- color: subtitleColor,
52
- marginTop: 4
53
- }],
54
- numberOfLines: multilineSubtitle ? undefined : 1
55
- }, subtitle) : null)), right && right());
56
- };
57
- const styles = _reactNative.StyleSheet.create({
58
- leftContainer: {
59
- flexDirection: "row",
60
- flex: 1
61
- },
62
- container: {
63
- flexDirection: "row",
64
- justifyContent: "space-between",
65
- alignItems: "center"
66
- },
67
- textContainer: {
68
- flex: 1,
69
- justifyContent: "center"
70
- }
71
- });
72
- var _default = (0, _theming.withTheme)(Row);
73
- exports.default = _default;
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _theming = require("../theming");
9
- var _Row = _interopRequireDefault(require("./Row"));
10
- var _Config = _interopRequireDefault(require("./Config"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- const RowBodyIcon = _ref => {
15
- let {
16
- Icon,
17
- title,
18
- subtitle,
19
- icon,
20
- style,
21
- theme: {
22
- colors,
23
- typography
24
- }
25
- } = _ref;
26
- return /*#__PURE__*/React.createElement(_Row.default, {
27
- titleTypeStyle: typography.body1,
28
- titleColor: colors.medium,
29
- subtitleTypeStyle: typography.subtitle2,
30
- subtitleColor: colors.light,
31
- title: title,
32
- subtitle: subtitle,
33
- right: () => /*#__PURE__*/React.createElement(Icon, {
34
- name: icon,
35
- size: _Config.default.rowSingleLineIconSize,
36
- color: colors.light,
37
- style: {
38
- marginLeft: 16
39
- }
40
- }),
41
- style: style
42
- });
43
- };
44
- var _default = (0, _theming.withTheme)(RowBodyIcon);
45
- exports.default = _default;