@draftbit/core 46.4.1-2f2c24.2 → 46.4.1-2fa4f7.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 (192) hide show
  1. package/lib/commonjs/components/Container.js +5 -17
  2. package/lib/commonjs/index.js +0 -38
  3. package/lib/commonjs/mappings/ActionSheet.js +1 -1
  4. package/lib/commonjs/mappings/ActionSheetCancel.js +1 -1
  5. package/lib/commonjs/mappings/ActionSheetItem.js +1 -1
  6. package/lib/commonjs/mappings/ActivityIndicator.js +1 -1
  7. package/lib/commonjs/mappings/Banner.js +1 -1
  8. package/lib/commonjs/mappings/BlurView.js +1 -1
  9. package/lib/commonjs/mappings/Button.js +4 -12
  10. package/lib/commonjs/mappings/Checkbox.js +1 -1
  11. package/lib/commonjs/mappings/CheckboxRow.js +1 -1
  12. package/lib/commonjs/mappings/CircleImage.js +1 -1
  13. package/lib/commonjs/mappings/CustomCode.js +1 -1
  14. package/lib/commonjs/mappings/FAB.js +1 -1
  15. package/lib/commonjs/mappings/FieldSearchBarFull.js +1 -1
  16. package/lib/commonjs/mappings/Image.js +15 -2
  17. package/lib/commonjs/mappings/KeyboardAvoidingView.js +1 -1
  18. package/lib/commonjs/mappings/KeyboardAwareScrollView.js +1 -1
  19. package/lib/commonjs/mappings/Layout.js +2 -2
  20. package/lib/commonjs/mappings/MapCallout.js +1 -1
  21. package/lib/commonjs/mappings/MapMarker.js +1 -1
  22. package/lib/commonjs/mappings/MapView.js +1 -1
  23. package/lib/commonjs/mappings/Modal.js +1 -1
  24. package/lib/commonjs/mappings/RadioButton.js +1 -1
  25. package/lib/commonjs/mappings/RadioButtonGroup.js +1 -1
  26. package/lib/commonjs/mappings/RadioButtonRow.js +1 -1
  27. package/lib/commonjs/mappings/ScrollView.js +1 -1
  28. package/lib/commonjs/mappings/Slider.js +1 -1
  29. package/lib/commonjs/mappings/StarRating.js +1 -1
  30. package/lib/commonjs/mappings/Stepper.js +1 -1
  31. package/lib/commonjs/mappings/Surface.js +1 -1
  32. package/lib/commonjs/mappings/Swiper.js +1 -1
  33. package/lib/commonjs/mappings/SwiperItem.js +1 -1
  34. package/lib/commonjs/mappings/Switch.js +2 -2
  35. package/lib/commonjs/mappings/WebView.js +1 -1
  36. package/lib/commonjs/utilities.js +2 -2
  37. package/lib/module/components/AvatarEdit.js +16 -5
  38. package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -6
  39. package/lib/module/components/IconButton.js +22 -5
  40. package/lib/module/components/Layout.js +43 -21
  41. package/lib/module/components/Portal/Portal.js +3 -6
  42. package/lib/module/constants.js +1 -0
  43. package/lib/module/index.js +0 -1
  44. package/lib/module/mappings/ActionSheet.js +1 -1
  45. package/lib/module/mappings/ActionSheetCancel.js +1 -1
  46. package/lib/module/mappings/ActionSheetItem.js +1 -1
  47. package/lib/module/mappings/ActivityIndicator.js +1 -1
  48. package/lib/module/mappings/Banner.js +1 -1
  49. package/lib/module/mappings/BlurView.js +1 -1
  50. package/lib/module/mappings/Button.js +5 -13
  51. package/lib/module/mappings/Checkbox.js +1 -1
  52. package/lib/module/mappings/CheckboxRow.js +1 -1
  53. package/lib/module/mappings/CircleImage.js +1 -1
  54. package/lib/module/mappings/CustomCode.js +1 -1
  55. package/lib/module/mappings/FAB.js +1 -1
  56. package/lib/module/mappings/FieldSearchBarFull.js +1 -1
  57. package/lib/module/mappings/Image.js +16 -3
  58. package/lib/module/mappings/KeyboardAvoidingView.js +1 -1
  59. package/lib/module/mappings/KeyboardAwareScrollView.js +1 -1
  60. package/lib/module/mappings/Layout.js +2 -2
  61. package/lib/module/mappings/MapCallout.js +1 -1
  62. package/lib/module/mappings/MapMarker.js +1 -1
  63. package/lib/module/mappings/MapView.js +1 -1
  64. package/lib/module/mappings/Modal.js +1 -1
  65. package/lib/module/mappings/RadioButton.js +1 -1
  66. package/lib/module/mappings/RadioButtonGroup.js +1 -1
  67. package/lib/module/mappings/RadioButtonRow.js +1 -1
  68. package/lib/module/mappings/ScrollView.js +1 -1
  69. package/lib/module/mappings/Slider.js +1 -1
  70. package/lib/module/mappings/StarRating.js +1 -1
  71. package/lib/module/mappings/Stepper.js +1 -1
  72. package/lib/module/mappings/Surface.js +1 -1
  73. package/lib/module/mappings/Swiper.js +1 -1
  74. package/lib/module/mappings/SwiperItem.js +1 -1
  75. package/lib/module/mappings/Switch.js +2 -2
  76. package/lib/module/mappings/WebView.js +1 -1
  77. package/lib/module/utilities.js +3 -3
  78. package/lib/typescript/src/index.d.ts +0 -1
  79. package/lib/typescript/src/mappings/Button.d.ts +16 -16
  80. package/lib/typescript/src/mappings/Image.d.ts +13 -0
  81. package/lib/typescript/src/utilities.d.ts +3 -3
  82. package/package.json +3 -3
  83. package/src/index.js +0 -1
  84. package/src/index.tsx +0 -9
  85. package/src/mappings/ActionSheet.js +1 -1
  86. package/src/mappings/ActionSheet.ts +1 -1
  87. package/src/mappings/ActionSheetCancel.js +1 -1
  88. package/src/mappings/ActionSheetCancel.ts +1 -1
  89. package/src/mappings/ActionSheetItem.js +1 -1
  90. package/src/mappings/ActionSheetItem.ts +1 -1
  91. package/src/mappings/ActivityIndicator.js +1 -1
  92. package/src/mappings/ActivityIndicator.ts +1 -1
  93. package/src/mappings/Banner.js +1 -1
  94. package/src/mappings/Banner.ts +1 -1
  95. package/src/mappings/BlurView.js +1 -1
  96. package/src/mappings/BlurView.ts +1 -1
  97. package/src/mappings/Button.js +5 -13
  98. package/src/mappings/Button.ts +6 -14
  99. package/src/mappings/Checkbox.js +1 -1
  100. package/src/mappings/Checkbox.ts +1 -1
  101. package/src/mappings/CheckboxRow.js +1 -1
  102. package/src/mappings/CheckboxRow.ts +1 -1
  103. package/src/mappings/CircleImage.js +1 -1
  104. package/src/mappings/CircleImage.ts +1 -1
  105. package/src/mappings/CustomCode.js +1 -1
  106. package/src/mappings/CustomCode.ts +1 -1
  107. package/src/mappings/FAB.js +1 -1
  108. package/src/mappings/FAB.ts +1 -1
  109. package/src/mappings/FieldSearchBarFull.js +1 -1
  110. package/src/mappings/FieldSearchBarFull.ts +1 -1
  111. package/src/mappings/Image.js +15 -1
  112. package/src/mappings/Image.ts +17 -0
  113. package/src/mappings/KeyboardAvoidingView.js +1 -1
  114. package/src/mappings/KeyboardAvoidingView.ts +1 -1
  115. package/src/mappings/KeyboardAwareScrollView.js +1 -1
  116. package/src/mappings/KeyboardAwareScrollView.ts +1 -1
  117. package/src/mappings/Layout.js +2 -2
  118. package/src/mappings/Layout.ts +2 -2
  119. package/src/mappings/MapCallout.js +1 -1
  120. package/src/mappings/MapCallout.ts +1 -1
  121. package/src/mappings/MapMarker.js +1 -1
  122. package/src/mappings/MapMarker.ts +1 -1
  123. package/src/mappings/MapView.js +1 -1
  124. package/src/mappings/MapView.ts +1 -1
  125. package/src/mappings/Modal.js +1 -1
  126. package/src/mappings/Modal.ts +1 -1
  127. package/src/mappings/RadioButton.js +1 -1
  128. package/src/mappings/RadioButton.ts +1 -1
  129. package/src/mappings/RadioButtonGroup.js +1 -1
  130. package/src/mappings/RadioButtonGroup.ts +1 -1
  131. package/src/mappings/RadioButtonRow.js +1 -1
  132. package/src/mappings/RadioButtonRow.ts +1 -1
  133. package/src/mappings/ScrollView.js +1 -1
  134. package/src/mappings/ScrollView.ts +1 -1
  135. package/src/mappings/Slider.js +1 -1
  136. package/src/mappings/Slider.ts +1 -1
  137. package/src/mappings/StarRating.js +1 -1
  138. package/src/mappings/StarRating.ts +1 -1
  139. package/src/mappings/Stepper.js +1 -1
  140. package/src/mappings/Stepper.ts +1 -1
  141. package/src/mappings/Surface.js +1 -1
  142. package/src/mappings/Surface.ts +1 -1
  143. package/src/mappings/Swiper.js +1 -1
  144. package/src/mappings/Swiper.ts +1 -1
  145. package/src/mappings/SwiperItem.js +1 -1
  146. package/src/mappings/SwiperItem.ts +1 -1
  147. package/src/mappings/Switch.js +2 -2
  148. package/src/mappings/Switch.ts +2 -2
  149. package/src/mappings/WebView.js +1 -1
  150. package/src/mappings/WebView.ts +1 -1
  151. package/src/utilities.js +2 -5
  152. package/src/utilities.ts +2 -13
  153. package/lib/commonjs/components/Table/Table.js +0 -35
  154. package/lib/commonjs/components/Table/TableCell.js +0 -50
  155. package/lib/commonjs/components/Table/TableHeader.js +0 -41
  156. package/lib/commonjs/components/Table/TablePaginator.js +0 -17
  157. package/lib/commonjs/components/Table/TableRow.js +0 -47
  158. package/lib/commonjs/components/Table/TableTitle.js +0 -60
  159. package/lib/commonjs/components/Table/index.js +0 -55
  160. package/lib/commonjs/mappings/Table.js +0 -103
  161. package/lib/module/components/Table/Table.js +0 -23
  162. package/lib/module/components/Table/TableCell.js +0 -37
  163. package/lib/module/components/Table/TableHeader.js +0 -27
  164. package/lib/module/components/Table/TablePaginator.js +0 -6
  165. package/lib/module/components/Table/TableRow.js +0 -33
  166. package/lib/module/components/Table/TableTitle.js +0 -47
  167. package/lib/module/components/Table/index.js +0 -6
  168. package/lib/module/mappings/Table.js +0 -94
  169. package/lib/typescript/src/components/Table/Table.d.ts +0 -8
  170. package/lib/typescript/src/components/Table/TableCell.d.ts +0 -10
  171. package/lib/typescript/src/components/Table/TableHeader.d.ts +0 -12
  172. package/lib/typescript/src/components/Table/TablePaginator.d.ts +0 -3
  173. package/lib/typescript/src/components/Table/TableRow.d.ts +0 -12
  174. package/lib/typescript/src/components/Table/TableTitle.d.ts +0 -12
  175. package/lib/typescript/src/components/Table/index.d.ts +0 -6
  176. package/lib/typescript/src/mappings/Table.d.ts +0 -153
  177. package/src/components/Table/Table.js +0 -10
  178. package/src/components/Table/Table.tsx +0 -22
  179. package/src/components/Table/TableCell.js +0 -21
  180. package/src/components/Table/TableCell.tsx +0 -44
  181. package/src/components/Table/TableHeader.js +0 -11
  182. package/src/components/Table/TableHeader.tsx +0 -28
  183. package/src/components/Table/TablePaginator.js +0 -5
  184. package/src/components/Table/TablePaginator.tsx +0 -10
  185. package/src/components/Table/TableRow.js +0 -16
  186. package/src/components/Table/TableRow.tsx +0 -31
  187. package/src/components/Table/TableTitle.js +0 -28
  188. package/src/components/Table/TableTitle.tsx +0 -58
  189. package/src/components/Table/index.js +0 -6
  190. package/src/components/Table/index.tsx +0 -6
  191. package/src/mappings/Table.js +0 -137
  192. package/src/mappings/Table.ts +0 -145
@@ -4,7 +4,7 @@ export const SEED_DATA = {
4
4
  tag: "MapMarker",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A marker to show inside map view",
7
- category: COMPONENT_TYPES.media,
7
+ category: COMPONENT_TYPES.map,
8
8
  layout: {},
9
9
  props: {
10
10
  latitude: createNumberProp({
@@ -12,7 +12,7 @@ export const SEED_DATA = {
12
12
  tag: "MapMarker",
13
13
  packageName: "@draftbit/maps",
14
14
  description: "A marker to show inside map view",
15
- category: COMPONENT_TYPES.media,
15
+ category: COMPONENT_TYPES.map,
16
16
  layout: {},
17
17
  props: {
18
18
  latitude: createNumberProp({
@@ -4,7 +4,7 @@ export const SEED_DATA = {
4
4
  tag: "MapView",
5
5
  packageName: "@draftbit/maps",
6
6
  description: "A map view",
7
- category: COMPONENT_TYPES.media,
7
+ category: COMPONENT_TYPES.map,
8
8
  layout: {
9
9
  flex: 1,
10
10
  },
@@ -14,7 +14,7 @@ export const SEED_DATA = {
14
14
  tag: "MapView",
15
15
  packageName: "@draftbit/maps",
16
16
  description: "A map view",
17
- category: COMPONENT_TYPES.media,
17
+ category: COMPONENT_TYPES.map,
18
18
  layout: {
19
19
  flex: 1,
20
20
  },
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Modal",
4
4
  tag: "Modal",
5
5
  description: "A basic Modal Component",
6
- category: COMPONENT_TYPES.container,
6
+ category: COMPONENT_TYPES.layout,
7
7
  stylesPanelSections: [StylesPanelSections.NoStyles],
8
8
  props: {
9
9
  animationType: {
@@ -11,7 +11,7 @@ export const SEED_DATA = {
11
11
  name: "Modal",
12
12
  tag: "Modal",
13
13
  description: "A basic Modal Component",
14
- category: COMPONENT_TYPES.container,
14
+ category: COMPONENT_TYPES.layout,
15
15
  stylesPanelSections: [StylesPanelSections.NoStyles],
16
16
  props: {
17
17
  animationType: {
@@ -2,7 +2,7 @@ import { GROUPS, COMPONENT_TYPES, createBoolProp, createColorProp, createNumberP
2
2
  export const SEED_DATA = {
3
3
  name: "Radio Button",
4
4
  tag: "RadioButton",
5
- category: COMPONENT_TYPES.input,
5
+ category: COMPONENT_TYPES.control,
6
6
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
7
7
  triggers: [Triggers.OnPress],
8
8
  props: {
@@ -13,7 +13,7 @@ import {
13
13
  export const SEED_DATA = {
14
14
  name: "Radio Button",
15
15
  tag: "RadioButton",
16
- category: COMPONENT_TYPES.input,
16
+ category: COMPONENT_TYPES.control,
17
17
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
18
18
  triggers: [Triggers.OnPress],
19
19
  props: {
@@ -2,7 +2,7 @@ import { COMPONENT_TYPES, createFieldNameProp, createDirectionProp, Triggers, St
2
2
  export const SEED_DATA = {
3
3
  name: "Radio Button Group",
4
4
  tag: "RadioButtonGroup",
5
- category: COMPONENT_TYPES.input,
5
+ category: COMPONENT_TYPES.control,
6
6
  stylesPanelSections: [StylesPanelSections.Margins],
7
7
  layout: {},
8
8
  triggers: [Triggers.OnValueChange],
@@ -9,7 +9,7 @@ import {
9
9
  export const SEED_DATA = {
10
10
  name: "Radio Button Group",
11
11
  tag: "RadioButtonGroup",
12
- category: COMPONENT_TYPES.input,
12
+ category: COMPONENT_TYPES.control,
13
13
  stylesPanelSections: [StylesPanelSections.Margins],
14
14
  layout: {},
15
15
  triggers: [Triggers.OnValueChange],
@@ -2,7 +2,7 @@ import { createTextProp, createTextEnumProp, COMPONENT_TYPES, createColorProp, G
2
2
  export const SEED_DATA = {
3
3
  name: "Radio Button Row",
4
4
  tag: "RadioButtonRow",
5
- category: COMPONENT_TYPES.input,
5
+ category: COMPONENT_TYPES.control,
6
6
  stylesPanelSections: [
7
7
  StylesPanelSections.Typography,
8
8
  StylesPanelSections.Margins,
@@ -10,7 +10,7 @@ import {
10
10
  export const SEED_DATA = {
11
11
  name: "Radio Button Row",
12
12
  tag: "RadioButtonRow",
13
- category: COMPONENT_TYPES.input,
13
+ category: COMPONENT_TYPES.control,
14
14
  stylesPanelSections: [
15
15
  StylesPanelSections.Typography,
16
16
  StylesPanelSections.Margins,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Scroll View",
4
4
  tag: "ScrollView",
5
5
  description: "A basic ScrollView component",
6
- category: COMPONENT_TYPES.layout,
6
+ category: COMPONENT_TYPES.view,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
8
  layout: {},
9
9
  props: {
@@ -8,7 +8,7 @@ export const SEED_DATA = {
8
8
  name: "Scroll View",
9
9
  tag: "ScrollView",
10
10
  description: "A basic ScrollView component",
11
- category: COMPONENT_TYPES.layout,
11
+ category: COMPONENT_TYPES.view,
12
12
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
13
13
  layout: {},
14
14
  props: {
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Slider",
4
4
  tag: "Slider",
5
5
  description: "A component used to set a value in a range",
6
- category: COMPONENT_TYPES.input,
6
+ category: COMPONENT_TYPES.control,
7
7
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
8
  layout: {
9
9
  marginLeft: 12,
@@ -13,7 +13,7 @@ export const SEED_DATA = {
13
13
  name: "Slider",
14
14
  tag: "Slider",
15
15
  description: "A component used to set a value in a range",
16
- category: COMPONENT_TYPES.input,
16
+ category: COMPONENT_TYPES.control,
17
17
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
18
18
  layout: {
19
19
  marginLeft: 12,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Star Rating",
4
4
  tag: "StarRating",
5
5
  description: "A star rating component",
6
- category: COMPONENT_TYPES.button,
6
+ category: COMPONENT_TYPES.control,
7
7
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
8
8
  triggers: [Triggers.OnPress],
9
9
  props: {
@@ -12,7 +12,7 @@ export const SEED_DATA = {
12
12
  name: "Star Rating",
13
13
  tag: "StarRating",
14
14
  description: "A star rating component",
15
- category: COMPONENT_TYPES.button,
15
+ category: COMPONENT_TYPES.control,
16
16
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
17
17
  triggers: [Triggers.OnPress],
18
18
  props: {
@@ -4,7 +4,7 @@ export const SEED_DATA = [
4
4
  name: "Stepper",
5
5
  tag: "Stepper",
6
6
  description: "A component used to control the quantity of something",
7
- category: COMPONENT_TYPES.input,
7
+ category: COMPONENT_TYPES.control,
8
8
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
9
  layout: {},
10
10
  triggers: [Triggers.OnChange],
@@ -13,7 +13,7 @@ export const SEED_DATA = [
13
13
  name: "Stepper",
14
14
  tag: "Stepper",
15
15
  description: "A component used to control the quantity of something",
16
- category: COMPONENT_TYPES.input,
16
+ category: COMPONENT_TYPES.control,
17
17
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
18
18
  layout: {},
19
19
  triggers: [Triggers.OnChange],
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Surface",
4
4
  tag: "Surface",
5
5
  description: "An elevated container",
6
- category: COMPONENT_TYPES.layout,
6
+ category: COMPONENT_TYPES.container,
7
7
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
8
  layout: {
9
9
  minHeight: 40,
@@ -8,7 +8,7 @@ export const SEED_DATA = {
8
8
  name: "Surface",
9
9
  tag: "Surface",
10
10
  description: "An elevated container",
11
- category: COMPONENT_TYPES.layout,
11
+ category: COMPONENT_TYPES.container,
12
12
  stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
13
13
  layout: {
14
14
  minHeight: 40,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Swiper",
4
4
  tag: "Swiper",
5
5
  description: "Swiper container",
6
- category: COMPONENT_TYPES.container,
6
+ category: COMPONENT_TYPES.swiper,
7
7
  layout: {
8
8
  height: 300,
9
9
  width: "100%",
@@ -11,7 +11,7 @@ export const SEED_DATA = {
11
11
  name: "Swiper",
12
12
  tag: "Swiper",
13
13
  description: "Swiper container",
14
- category: COMPONENT_TYPES.container,
14
+ category: COMPONENT_TYPES.swiper,
15
15
  layout: {
16
16
  height: 300,
17
17
  width: "100%",
@@ -3,6 +3,6 @@ export const SEED_DATA = {
3
3
  name: "Swiper Item",
4
4
  tag: "SwiperItem",
5
5
  description: "Swiper item",
6
- category: COMPONENT_TYPES.button,
6
+ category: COMPONENT_TYPES.swiper,
7
7
  props: {},
8
8
  };
@@ -4,6 +4,6 @@ export const SEED_DATA = {
4
4
  name: "Swiper Item",
5
5
  tag: "SwiperItem",
6
6
  description: "Swiper item",
7
- category: COMPONENT_TYPES.button,
7
+ category: COMPONENT_TYPES.swiper,
8
8
  props: {},
9
9
  };
@@ -4,7 +4,7 @@ export const SEED_DATA = [
4
4
  {
5
5
  name: "Switch",
6
6
  tag: "Switch",
7
- category: COMPONENT_TYPES.input,
7
+ category: COMPONENT_TYPES.control,
8
8
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
9
9
  layout: {},
10
10
  triggers: SEED_DATA_TRIGGERS,
@@ -35,7 +35,7 @@ export const SEED_DATA = [
35
35
  {
36
36
  name: "Switch Row",
37
37
  tag: "SwitchRow",
38
- category: COMPONENT_TYPES.input,
38
+ category: COMPONENT_TYPES.control,
39
39
  stylesPanelSections: [
40
40
  StylesPanelSections.Typography,
41
41
  StylesPanelSections.Margins,
@@ -15,7 +15,7 @@ export const SEED_DATA = [
15
15
  {
16
16
  name: "Switch",
17
17
  tag: "Switch",
18
- category: COMPONENT_TYPES.input,
18
+ category: COMPONENT_TYPES.control,
19
19
  stylesPanelSections: BLOCK_STYLES_SECTIONS,
20
20
  layout: {},
21
21
  triggers: SEED_DATA_TRIGGERS,
@@ -46,7 +46,7 @@ export const SEED_DATA = [
46
46
  {
47
47
  name: "Switch Row",
48
48
  tag: "SwitchRow",
49
- category: COMPONENT_TYPES.input,
49
+ category: COMPONENT_TYPES.control,
50
50
  stylesPanelSections: [
51
51
  StylesPanelSections.Typography,
52
52
  StylesPanelSections.Margins,
@@ -3,7 +3,7 @@ export const SEED_DATA = {
3
3
  name: "Web View",
4
4
  tag: "WebView",
5
5
  description: "Render web content inside a view",
6
- category: COMPONENT_TYPES.media,
6
+ category: COMPONENT_TYPES.utility,
7
7
  stylesPanelSections: [
8
8
  StylesPanelSections.Size,
9
9
  StylesPanelSections.Margins,
@@ -11,7 +11,7 @@ export const SEED_DATA = {
11
11
  name: "Web View",
12
12
  tag: "WebView",
13
13
  description: "Render web content inside a view",
14
- category: COMPONENT_TYPES.media,
14
+ category: COMPONENT_TYPES.utility,
15
15
  stylesPanelSections: [
16
16
  StylesPanelSections.Size,
17
17
  StylesPanelSections.Margins,
package/src/utilities.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from "react-native";
2
- import { isString, isNumber, pick, pickBy, identity, omitBy, isNil, } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
3
3
  export function extractStyles(style) {
4
4
  const { color, fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textTransform, textAlign, textDecorationLine, textDecorationColor, textDecorationStyle, ...viewStyles } = StyleSheet.flatten(style || {});
5
5
  const textStyles = {
@@ -15,10 +15,7 @@ export function extractStyles(style) {
15
15
  textDecorationColor,
16
16
  textDecorationStyle,
17
17
  };
18
- return {
19
- viewStyles: omitBy(viewStyles, isNil),
20
- textStyles: omitBy(textStyles, isNil),
21
- };
18
+ return { viewStyles, textStyles };
22
19
  }
23
20
  export const borderStyleNames = [
24
21
  "borderRadius",
package/src/utilities.ts CHANGED
@@ -1,13 +1,5 @@
1
1
  import { StyleSheet, StyleProp, TextStyle } from "react-native";
2
- import {
3
- isString,
4
- isNumber,
5
- pick,
6
- pickBy,
7
- identity,
8
- omitBy,
9
- isNil,
10
- } from "lodash";
2
+ import { isString, isNumber, pick, pickBy, identity } from "lodash";
11
3
 
12
4
  export function extractStyles(style: StyleProp<any>) {
13
5
  const {
@@ -39,10 +31,7 @@ export function extractStyles(style: StyleProp<any>) {
39
31
  textDecorationStyle,
40
32
  };
41
33
 
42
- return {
43
- viewStyles: omitBy(viewStyles, isNil),
44
- textStyles: omitBy(textStyles, isNil),
45
- };
34
+ return { viewStyles, textStyles };
46
35
  }
47
36
 
48
37
  export const borderStyleNames = [
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
- const Table = _ref => {
17
- let {
18
- children,
19
- style,
20
- ...rest
21
- } = _ref;
22
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
23
- style: [styles.wrapper, style]
24
- }), children);
25
- };
26
-
27
- const styles = _reactNative.StyleSheet.create({
28
- wrapper: {
29
- display: "flex",
30
- flexDirection: "column"
31
- }
32
- });
33
-
34
- var _default = Table;
35
- exports.default = _default;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _utilities = require("../../utilities");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- const TableCell = _ref => {
19
- let {
20
- children,
21
- style,
22
- numeric,
23
- value,
24
- ...rest
25
- } = _ref;
26
- const {
27
- textStyles,
28
- viewStyles
29
- } = (0, _utilities.extractStyles)(style);
30
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
31
- style: [styles.wrapper, numeric && styles.right, viewStyles]
32
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
33
- numberOfLines: 1,
34
- style: textStyles
35
- }, children, value));
36
- };
37
-
38
- const styles = _reactNative.StyleSheet.create({
39
- wrapper: {
40
- flex: 1,
41
- display: "flex",
42
- flexDirection: "row"
43
- },
44
- right: {
45
- justifyContent: "flex-end"
46
- }
47
- });
48
-
49
- var _default = TableCell;
50
- exports.default = _default;
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _theming = require("../../theming");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- const TableHeader = _ref => {
19
- let {
20
- children,
21
- style,
22
- theme,
23
- ...rest
24
- } = _ref;
25
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
26
- style: [styles.wrapper, {
27
- borderBottomColor: theme.colors.medium
28
- }, style]
29
- }), children);
30
- };
31
-
32
- const styles = _reactNative.StyleSheet.create({
33
- wrapper: {
34
- display: "flex",
35
- flexDirection: "row"
36
- }
37
- });
38
-
39
- var _default = (0, _theming.withTheme)(TableHeader);
40
-
41
- exports.default = _default;
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- const TablePaginator = () => /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Table Paginator"));
15
-
16
- var _default = TablePaginator;
17
- exports.default = _default;
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _theming = require("../../theming");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- const TableRow = _ref => {
19
- let {
20
- children,
21
- style,
22
- theme,
23
- ...rest
24
- } = _ref;
25
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
26
- style: [styles.container, {
27
- borderBottomColor: theme.colors.light
28
- }, style]
29
- }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
30
- style: styles.content
31
- }, children));
32
- };
33
-
34
- const styles = _reactNative.StyleSheet.create({
35
- container: {
36
- display: "flex",
37
- flexDirection: "row"
38
- },
39
- content: {
40
- flex: 1,
41
- flexDirection: "row"
42
- }
43
- });
44
-
45
- var _default = (0, _theming.withTheme)(TableRow);
46
-
47
- exports.default = _default;
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _utilities = require("../../utilities");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- const TableTitle = _ref => {
19
- let {
20
- children,
21
- style,
22
- numeric = false,
23
- isAscending = false,
24
- numberOfLines = 1,
25
- title,
26
- ...rest
27
- } = _ref;
28
- const {
29
- textStyles,
30
- viewStyles
31
- } = (0, _utilities.extractStyles)(style);
32
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, rest, {
33
- style: [styles.wrapper, numeric && styles.right, viewStyles]
34
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
35
- style: [isAscending ? styles.sorted : {
36
- color: "gray"
37
- }, textStyles],
38
- numberOfLines: numberOfLines
39
- }, children, title));
40
- };
41
-
42
- const styles = _reactNative.StyleSheet.create({
43
- wrapper: {
44
- flex: 1,
45
- display: "flex",
46
- flexDirection: "row"
47
- },
48
- right: {
49
- justifyContent: "flex-end"
50
- },
51
- sorted: {// marginLeft: 8,
52
- },
53
- icon: {
54
- height: 24,
55
- justifyContent: "center"
56
- }
57
- });
58
-
59
- var _default = TableTitle;
60
- exports.default = _default;