@draftbit/core 46.5.2-b02f9e.2 → 46.6.0

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 (143) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/AspectRatio.js +1 -17
  3. package/lib/commonjs/components/Banner.js +23 -4
  4. package/lib/commonjs/components/Button.js +36 -13
  5. package/lib/commonjs/components/CardBlock.js +4 -13
  6. package/lib/commonjs/components/CardContainer.js +13 -4
  7. package/lib/commonjs/components/CardContainerShortImage.js +15 -4
  8. package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
  9. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
  10. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -2
  11. package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
  12. package/lib/commonjs/components/Container.js +15 -4
  13. package/lib/commonjs/components/DatePicker/DatePicker.js +13 -9
  14. package/lib/commonjs/components/DeprecatedButton.js +3 -27
  15. package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
  16. package/lib/commonjs/components/DeprecatedFAB.js +3 -22
  17. package/lib/commonjs/components/Elevation.js +14 -2
  18. package/lib/commonjs/components/FAB.js +18 -4
  19. package/lib/commonjs/components/FieldSearchBarFull.js +1 -2
  20. package/lib/commonjs/components/Image.js +17 -2
  21. package/lib/commonjs/components/Layout.js +40 -19
  22. package/lib/commonjs/components/Picker/Picker.js +9 -4
  23. package/lib/commonjs/components/Picker/PickerComponent.ios.js +36 -11
  24. package/lib/commonjs/components/Picker/PickerComponent.web.js +20 -3
  25. package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
  26. package/lib/commonjs/components/Portal/PortalManager.js +34 -8
  27. package/lib/commonjs/components/Pressable.js +50 -0
  28. package/lib/commonjs/components/ProgressBar.js +37 -7
  29. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +9 -1
  30. package/lib/commonjs/components/ScreenContainer.js +20 -4
  31. package/lib/commonjs/components/Surface.js +14 -2
  32. package/lib/commonjs/components/Swiper/Swiper.js +2 -0
  33. package/lib/commonjs/components/Switch.js +19 -10
  34. package/lib/commonjs/components/TextField.js +76 -28
  35. package/lib/commonjs/components/ToggleButton.js +15 -2
  36. package/lib/commonjs/components/Touchable.js +23 -5
  37. package/lib/commonjs/constants.js +1 -1
  38. package/lib/commonjs/index.js +7 -0
  39. package/lib/commonjs/mappings/Button.js +39 -10
  40. package/lib/commonjs/mappings/FlashList.js +45 -2
  41. package/lib/commonjs/mappings/FlatList.js +12 -0
  42. package/lib/commonjs/mappings/Swiper.js +2 -0
  43. package/lib/commonjs/mappings/Touchable.js +47 -7
  44. package/lib/commonjs/styles/overlay.js +3 -1
  45. package/lib/module/components/AvatarEdit.js +15 -4
  46. package/lib/module/components/Button.js +36 -13
  47. package/lib/module/components/Carousel.js +32 -8
  48. package/lib/module/components/Checkbox/Checkbox.js +26 -6
  49. package/lib/module/components/Checkbox/CheckboxGroup.js +16 -2
  50. package/lib/module/components/Checkbox/CheckboxGroupRow.js +25 -7
  51. package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
  52. package/lib/module/components/CircularProgress.js +28 -8
  53. package/lib/module/components/DatePicker/DatePicker.js +27 -13
  54. package/lib/module/components/DeprecatedButton.js +24 -30
  55. package/lib/module/components/DeprecatedFAB.js +2 -3
  56. package/lib/module/components/Elevation.js +14 -2
  57. package/lib/module/components/FieldSearchBarFull.js +1 -2
  58. package/lib/module/components/Image.js +18 -2
  59. package/lib/module/components/Layout.js +42 -21
  60. package/lib/module/components/NumberInput.js +12 -3
  61. package/lib/module/components/Picker/Picker.js +10 -4
  62. package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
  63. package/lib/module/components/Picker/PickerComponent.web.js +21 -3
  64. package/lib/module/components/Portal/PortalConsumer.js +22 -7
  65. package/lib/module/components/Pressable.js +30 -0
  66. package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
  67. package/lib/module/components/ScreenContainer.js +21 -4
  68. package/lib/module/components/Swiper/Swiper.js +2 -0
  69. package/lib/module/components/Switch.js +21 -10
  70. package/lib/module/components/Text.js +50 -4
  71. package/lib/module/components/TextField.js +78 -28
  72. package/lib/module/components/Touchable.js +8 -3
  73. package/lib/module/constants.js +1 -2
  74. package/lib/module/index.js +1 -0
  75. package/lib/module/mappings/Button.js +40 -11
  76. package/lib/module/mappings/FieldSearchBarFull.js +4 -1
  77. package/lib/module/mappings/FlashList.js +46 -3
  78. package/lib/module/mappings/FlatList.js +13 -1
  79. package/lib/module/mappings/StarRating.js +7 -2
  80. package/lib/module/mappings/Swiper.js +3 -1
  81. package/lib/module/mappings/Touchable.js +49 -9
  82. package/lib/typescript/src/components/Button.d.ts.map +1 -1
  83. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
  84. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
  85. package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
  86. package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
  87. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  88. package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
  89. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  90. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
  91. package/lib/typescript/src/components/Pressable.d.ts +10 -0
  92. package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
  93. package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -1
  94. package/lib/typescript/src/components/Swiper/Swiper.d.ts.map +1 -1
  95. package/lib/typescript/src/components/Touchable.d.ts +5 -6
  96. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  97. package/lib/typescript/src/index.d.ts +1 -0
  98. package/lib/typescript/src/index.d.ts.map +1 -1
  99. package/lib/typescript/src/mappings/Button.d.ts +113 -4
  100. package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
  101. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  102. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  103. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  104. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  105. package/lib/typescript/src/mappings/Swiper.d.ts +11 -0
  106. package/lib/typescript/src/mappings/Swiper.d.ts.map +1 -1
  107. package/lib/typescript/src/mappings/Touchable.d.ts +59 -5
  108. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  109. package/lib/typescript/src/styles/overlay.d.ts +1 -1
  110. package/lib/typescript/src/styles/overlay.d.ts.map +1 -1
  111. package/lib/typescript/src/styles/shadow.d.ts +2 -2
  112. package/package.json +7 -7
  113. package/src/components/Button.js +3 -3
  114. package/src/components/Button.tsx +14 -4
  115. package/src/components/Checkbox/Checkbox.js +2 -3
  116. package/src/components/Checkbox/Checkbox.tsx +5 -7
  117. package/src/components/Checkbox/CheckboxGroupRow.js +2 -3
  118. package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
  119. package/src/components/Checkbox/CheckboxRow.js +2 -3
  120. package/src/components/Checkbox/CheckboxRow.tsx +3 -3
  121. package/src/components/DeprecatedButton.js +4 -16
  122. package/src/components/DeprecatedButton.tsx +7 -31
  123. package/src/components/DeprecatedFAB.js +2 -3
  124. package/src/components/DeprecatedFAB.tsx +5 -5
  125. package/src/components/Pressable.js +12 -0
  126. package/src/components/Pressable.tsx +44 -0
  127. package/src/components/Swiper/Swiper.js +2 -2
  128. package/src/components/Swiper/Swiper.tsx +3 -0
  129. package/src/components/Touchable.js +3 -3
  130. package/src/components/Touchable.tsx +11 -7
  131. package/src/index.js +1 -0
  132. package/src/index.tsx +1 -0
  133. package/src/mappings/Button.js +39 -10
  134. package/src/mappings/Button.ts +41 -10
  135. package/src/mappings/FlashList.js +77 -31
  136. package/src/mappings/FlashList.ts +82 -30
  137. package/src/mappings/FlatList.js +13 -1
  138. package/src/mappings/FlatList.ts +16 -0
  139. package/src/mappings/Swiper.js +3 -1
  140. package/src/mappings/Swiper.ts +4 -0
  141. package/src/mappings/Touchable.js +50 -7
  142. package/src/mappings/Touchable.ts +53 -6
  143. package/src/styles/overlay.tsx +2 -2
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress];
8
+ const SEED_DATA_TRIGGERS = [_types.Triggers.OnPress, _types.Triggers.OnLongPress];
9
9
  const SEED_DATA_PROPS = {
10
10
  onPress: (0, _types.createActionProp)(),
11
+ onLongPress: (0, _types.createActionProp)(),
11
12
  icon: (0, _types.createIconProp)({
12
13
  defaultValue: null,
13
14
  required: false
@@ -18,12 +19,37 @@ const SEED_DATA_PROPS = {
18
19
  defaultValue: "Get Started"
19
20
  }),
20
21
  disabled: (0, _types.createDisabledProp)(),
21
- loading: (0, _types.createLoadingProp)()
22
- };
23
- const LAYOUT = {
24
- backgroundColor: "transparent",
25
- borderRadius: 8,
26
- fontFamily: "system-700"
22
+ loading: (0, _types.createLoadingProp)(),
23
+ activeOpacity: (0, _types.createStaticNumberProp)({
24
+ label: "Active Opacity",
25
+ description: "Opacity of the button when active.",
26
+ defaultValue: 0.8,
27
+ min: 0,
28
+ max: 1,
29
+ step: 0.01,
30
+ precision: 2,
31
+ required: false
32
+ }),
33
+ disabledOpacity: (0, _types.createStaticNumberProp)({
34
+ label: "Disabled Opacity",
35
+ description: "Opacity of the button when disabled.",
36
+ defaultValue: 0.8,
37
+ min: 0,
38
+ max: 1,
39
+ step: 0.01,
40
+ precision: 2,
41
+ required: false
42
+ }),
43
+ delayLongPress: (0, _types.createStaticNumberProp)({
44
+ label: "Delay Long Press",
45
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
46
+ required: false
47
+ }),
48
+ hitSlop: (0, _types.createStaticNumberProp)({
49
+ label: "Hit Slop",
50
+ description: "Sets additional distance outside of element in which a press can be detected",
51
+ required: false
52
+ })
27
53
  };
28
54
  const SEED_DATA = [{
29
55
  name: "Button Outline",
@@ -31,7 +57,8 @@ const SEED_DATA = [{
31
57
  category: _types.COMPONENT_TYPES.deprecated,
32
58
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
33
59
  layout: {
34
- ...LAYOUT,
60
+ borderRadius: 8,
61
+ fontFamily: "system-700",
35
62
  backgroundColor: "transparent",
36
63
  borderWidth: 1,
37
64
  textAlign: "center"
@@ -44,7 +71,8 @@ const SEED_DATA = [{
44
71
  category: _types.COMPONENT_TYPES.deprecated,
45
72
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
46
73
  layout: {
47
- ...LAYOUT,
74
+ borderRadius: 8,
75
+ fontFamily: "system-700",
48
76
  backgroundColor: "primary",
49
77
  textAlign: "center"
50
78
  },
@@ -56,7 +84,8 @@ const SEED_DATA = [{
56
84
  category: _types.COMPONENT_TYPES.button,
57
85
  stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
58
86
  layout: {
59
- ...LAYOUT,
87
+ borderRadius: 8,
88
+ fontFamily: "system-700",
60
89
  backgroundColor: "primary",
61
90
  textAlign: "center"
62
91
  },
@@ -5,7 +5,42 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA = {
8
+ const SEED_DATA = [{
9
+ name: "Masonry List",
10
+ tag: "MasonryFlashList",
11
+ description: "Masonry Flashlist by Shopify",
12
+ packageName: "@shopify/flash-list",
13
+ category: _types.COMPONENT_TYPES.data,
14
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
15
+ layout: {
16
+ flex: 1
17
+ },
18
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
19
+ props: {
20
+ onRefresh: (0, _types.createActionProp)(),
21
+ onEndReached: (0, _types.createActionProp)(),
22
+ numColumns: (0, _types.createNumColumnsType)({
23
+ editable: true
24
+ }),
25
+ estimatedItemSize: (0, _types.createNumberProp)({
26
+ group: _types.GROUPS.basic,
27
+ label: "Est. Item Size",
28
+ description: "Approximate size of the items before rendering.",
29
+ defaultValue: 50,
30
+ step: 1,
31
+ precision: 0
32
+ }),
33
+ optimizeItemArrangement: (0, _types.createStaticBoolProp)({
34
+ label: "Optimize Item Arrangement",
35
+ description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
36
+ }),
37
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
38
+ label: "End Reached Threshold",
39
+ description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
40
+ defaultValue: 0.5
41
+ })
42
+ }
43
+ }, {
9
44
  name: "FlashList",
10
45
  tag: "FlashList",
11
46
  description: "Flashlist by Shopify",
@@ -15,7 +50,10 @@ const SEED_DATA = {
15
50
  layout: {
16
51
  flex: 1
17
52
  },
53
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
18
54
  props: {
55
+ onRefresh: (0, _types.createActionProp)(),
56
+ onEndReached: (0, _types.createActionProp)(),
19
57
  estimatedItemSize: (0, _types.createNumberProp)({
20
58
  group: _types.GROUPS.basic,
21
59
  label: "Est. Item Size",
@@ -34,7 +72,12 @@ const SEED_DATA = {
34
72
  }),
35
73
  numColumns: (0, _types.createNumColumnsType)({
36
74
  editable: true
75
+ }),
76
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
77
+ label: "End Reached Threshold",
78
+ description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
79
+ defaultValue: 0.5
37
80
  })
38
81
  }
39
- };
82
+ }];
40
83
  exports.SEED_DATA = SEED_DATA;
@@ -14,7 +14,10 @@ const SEED_DATA = {
14
14
  layout: {
15
15
  flex: 1
16
16
  },
17
+ triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
17
18
  props: {
19
+ onRefresh: (0, _types.createActionProp)(),
20
+ onEndReached: (0, _types.createActionProp)(),
18
21
  horizontal: (0, _types.createStaticBoolProp)({
19
22
  label: "Horizontal",
20
23
  description: "Render list horizontally"
@@ -25,6 +28,15 @@ const SEED_DATA = {
25
28
  }),
26
29
  numColumns: (0, _types.createNumColumnsType)({
27
30
  editable: true
31
+ }),
32
+ initialNumToRender: (0, _types.createStaticBoolProp)({
33
+ label: "Initial Num To Render",
34
+ descriprion: "How many items to render in the initial batch"
35
+ }),
36
+ onEndReachedThreshold: (0, _types.createStaticNumberProp)({
37
+ label: "End Reached Threshold",
38
+ description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
39
+ defaultValue: 0.5
28
40
  })
29
41
  }
30
42
  };
@@ -14,7 +14,9 @@ const SEED_DATA = {
14
14
  height: 300,
15
15
  width: "100%"
16
16
  },
17
+ triggers: [_types.Triggers.OnIndexChanged],
17
18
  props: {
19
+ onIndexChanged: (0, _types.createActionProp)(),
18
20
  from: (0, _types.createNumberProp)({
19
21
  group: _types.GROUPS.basic,
20
22
  label: "Initial Slide"
@@ -5,16 +5,56 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SEED_DATA = void 0;
7
7
  var _types = require("@draftbit/types");
8
- const SEED_DATA = {
9
- name: "Touchable",
10
- tag: "Touchable",
11
- description: "Simple button with no styles",
12
- category: _types.COMPONENT_TYPES.button,
8
+ const SEED_DATA_PROPS = {
13
9
  stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Borders],
14
10
  layout: {},
15
- triggers: [_types.Triggers.OnPress],
11
+ triggers: [_types.Triggers.OnPress, _types.Triggers.OnLongPress],
16
12
  props: {
17
- onPress: (0, _types.createActionProp)()
13
+ onPress: (0, _types.createActionProp)(),
14
+ onLongPress: (0, _types.createActionProp)(),
15
+ activeOpacity: (0, _types.createStaticNumberProp)({
16
+ label: "Active Opacity",
17
+ description: "The opacity when the button is pressed.",
18
+ defaultValue: 0.8,
19
+ min: 0,
20
+ max: 1,
21
+ step: 0.01,
22
+ precision: 2,
23
+ required: false
24
+ }),
25
+ disabledOpacity: (0, _types.createStaticNumberProp)({
26
+ label: "Disabled Opacity",
27
+ description: "The opacity when the button is disabled.",
28
+ defaultValue: 0.8,
29
+ min: 0,
30
+ max: 1,
31
+ step: 0.01,
32
+ precision: 2,
33
+ required: false
34
+ }),
35
+ delayLongPress: (0, _types.createStaticNumberProp)({
36
+ label: "Delay Long Press",
37
+ description: "Duration (in milliseconds) from onPressIn before onLongPress is called.",
38
+ required: false
39
+ }),
40
+ hitSlop: (0, _types.createStaticNumberProp)({
41
+ label: "Hit Slop",
42
+ description: "Sets additional distance outside of element in which a press can be detected.",
43
+ required: false
44
+ })
18
45
  }
19
46
  };
47
+ const SEED_DATA = [{
48
+ name: "Touchable",
49
+ tag: "Touchable",
50
+ description: "An interactive view with no styles",
51
+ category: _types.COMPONENT_TYPES.button,
52
+ ...SEED_DATA_PROPS
53
+ }, {
54
+ name: "Pressable",
55
+ tag: "Pressable",
56
+ description: "An interactive view with no styles",
57
+ category: _types.COMPONENT_TYPES.button,
58
+ ...SEED_DATA_PROPS
59
+ }];
20
60
  exports.SEED_DATA = SEED_DATA;
@@ -15,6 +15,7 @@ function overlay(elevation) {
15
15
  let surfaceColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _DarkTheme.default.colors.surface;
16
16
  if (isAnimatedValue(elevation)) {
17
17
  const inputRange = [0, 1, 2, 3, 8, 24];
18
+
18
19
  // @ts-expect-error: TS doesn't seem to refine the type correctly
19
20
  return elevation.interpolate({
20
21
  inputRange,
@@ -23,6 +24,7 @@ function overlay(elevation) {
23
24
  })
24
25
  });
25
26
  }
27
+
26
28
  // @ts-expect-error: TS doesn't seem to refine the type correctly
27
29
  return calculateColor(surfaceColor, elevation);
28
30
  }
@@ -63,4 +65,4 @@ const elevationOverlayTransparency = {
63
65
  22: 15.72,
64
66
  23: 15.84,
65
67
  24: 16
66
- };};
68
+ };
@@ -1,4 +1,3 @@
1
- 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); }
2
1
  import * as React from "react";
3
2
  import { View } from "react-native";
4
3
  import Touchable from "./Touchable";
@@ -23,9 +22,10 @@ const AvatarEdit = _ref => {
23
22
  width: size,
24
23
  height: size
25
24
  };
26
- return /*#__PURE__*/React.createElement(View, _extends({
27
- style: [style, dimensions]
28
- }, rest), /*#__PURE__*/React.createElement(Touchable, {
25
+ return /*#__PURE__*/React.createElement(View, {
26
+ style: [style, dimensions],
27
+ ...rest
28
+ }, /*#__PURE__*/React.createElement(Touchable, {
29
29
  onPress: onPress
30
30
  }, /*#__PURE__*/React.createElement(CircleImage, {
31
31
  source: image,
@@ -46,4 +46,15 @@ const AvatarEdit = _ref => {
46
46
  size: size * (3 / 16)
47
47
  }))));
48
48
  };
49
+ export default withTheme(AvatarEdit);yles.editBorderColor,
50
+ backgroundColor: colorStyles.editBackgroundColor,
51
+ borderRadius: size * (3 / 16),
52
+ padding: size * (3 / 32)
53
+ }
54
+ }, /*#__PURE__*/React.createElement(Icon, {
55
+ name: "MaterialIcons/edit",
56
+ color: colorStyles.editIconColor,
57
+ size: size * (3 / 16)
58
+ }))));
59
+ };
49
60
  export default withTheme(AvatarEdit);
@@ -1,4 +1,3 @@
1
- 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); }
2
1
  import * as React from "react";
3
2
  import { Text, Pressable, Platform, StyleSheet, ActivityIndicator } from "react-native";
4
3
  import { withTheme } from "../theming";
@@ -13,10 +12,11 @@ function Base(_ref) {
13
12
  Icon,
14
13
  icon,
15
14
  title,
16
- onPress,
17
15
  loading,
18
16
  disabled,
19
17
  style,
18
+ activeOpacity,
19
+ disabledOpacity,
20
20
  ...props
21
21
  } = _ref;
22
22
  const {
@@ -52,18 +52,18 @@ function Base(_ref) {
52
52
  if (textAlign === "right") {
53
53
  buttonStyles.justifyContent = "flex-end";
54
54
  }
55
- return /*#__PURE__*/React.createElement(Pressable, _extends({
56
- onPress: onPress,
55
+ return /*#__PURE__*/React.createElement(Pressable, {
57
56
  disabled: disabled || loading,
58
57
  style: _ref2 => {
59
58
  let {
60
59
  pressed
61
60
  } = _ref2;
62
61
  return [styles.base, {
63
- opacity: pressed || disabled ? 0.75 : 1
62
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
64
63
  }, buttonStyles];
65
- }
66
- }, props), loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
64
+ },
65
+ ...props
66
+ }, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
67
67
  size: "small",
68
68
  color: color,
69
69
  style: styles.loading
@@ -82,13 +82,14 @@ const Solid = _ref3 => {
82
82
  theme,
83
83
  ...props
84
84
  } = _ref3;
85
- return /*#__PURE__*/React.createElement(Base, _extends({
85
+ return /*#__PURE__*/React.createElement(Base, {
86
86
  style: [{
87
87
  color: "#FFF",
88
88
  borderRadius: theme.roundness,
89
89
  backgroundColor: theme.colors.primary
90
- }, style]
91
- }, props));
90
+ }, style],
91
+ ...props
92
+ });
92
93
  };
93
94
  const ButtonSolid = withTheme(Solid);
94
95
  export { ButtonSolid };
@@ -100,13 +101,14 @@ const Outline = _ref4 => {
100
101
  theme,
101
102
  ...props
102
103
  } = _ref4;
103
- return /*#__PURE__*/React.createElement(Base, _extends({
104
+ return /*#__PURE__*/React.createElement(Base, {
104
105
  style: [styles.outline, {
105
106
  borderRadius: theme.roundness,
106
107
  borderColor: theme.colors.primary,
107
108
  color: theme.colors.primary
108
- }, style]
109
- }, props));
109
+ }, style],
110
+ ...props
111
+ });
110
112
  };
111
113
  const ButtonOutline = withTheme(Outline);
112
114
  export { ButtonOutline };
@@ -153,4 +155,25 @@ const styles = StyleSheet.create({
153
155
  }
154
156
  })
155
157
  }
158
+ });or: "transparent",
159
+ padding: 0,
160
+ minHeight: undefined
161
+ },
162
+ loading: {
163
+ marginRight: 6
164
+ },
165
+ icon: {
166
+ ...Platform.select({
167
+ web: {
168
+ marginTop: 1,
169
+ marginRight: 4,
170
+ alignSelf: "center"
171
+ },
172
+ default: {
173
+ marginBottom: 2,
174
+ marginRight: 4,
175
+ alignSelf: "center"
176
+ }
177
+ })
178
+ }
156
179
  });
@@ -1,4 +1,3 @@
1
- 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); }
2
1
  import * as React from "react";
3
2
  import { withTheme } from "../theming";
4
3
  import { ScrollView, View, StyleSheet, Dimensions } from "react-native";
@@ -30,7 +29,6 @@ function Pager(_ref) {
30
29
  }));
31
30
  }
32
31
  function Carousel(_ref2) {
33
- var _data$length;
34
32
  let {
35
33
  data,
36
34
  children,
@@ -38,9 +36,10 @@ function Carousel(_ref2) {
38
36
  style,
39
37
  ...rest
40
38
  } = _ref2;
39
+ var _a;
41
40
  const [index, setIndex] = React.useState(0);
42
41
  const length = React.Children.count(children);
43
- const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
42
+ const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
44
43
  const slides = Array.isArray(data) ? data : [];
45
44
  const {
46
45
  width,
@@ -48,9 +47,10 @@ function Carousel(_ref2) {
48
47
  } = StyleSheet.flatten(style || {});
49
48
  const slideWidth = width || screenWidth;
50
49
  const slideHeight = height || 250;
51
- return /*#__PURE__*/React.createElement(View, _extends({
52
- style: [styles.container, style]
53
- }, rest), /*#__PURE__*/React.createElement(ScrollView, {
50
+ return /*#__PURE__*/React.createElement(View, {
51
+ style: [styles.container, style],
52
+ ...rest
53
+ }, /*#__PURE__*/React.createElement(ScrollView, {
54
54
  pagingEnabled: true,
55
55
  horizontal: true,
56
56
  decelerationRate: "fast",
@@ -78,8 +78,8 @@ function Carousel(_ref2) {
78
78
  }]
79
79
  });
80
80
  }) : null, React.Children.map(children, child => {
81
- var _child$props;
82
- const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
81
+ var _a;
82
+ const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
83
83
  return /*#__PURE__*/React.createElement(View, {
84
84
  style: {
85
85
  width: slideWidth
@@ -117,4 +117,28 @@ const styles = StyleSheet.create({
117
117
  backgroundColor: "#000"
118
118
  }
119
119
  });
120
+ export default withTheme(Carousel);gth
121
+ }));
122
+ }
123
+ const styles = StyleSheet.create({
124
+ container: {
125
+ backgroundColor: "#eee"
126
+ },
127
+ pager: {
128
+ position: "absolute",
129
+ bottom: 12,
130
+ left: 0,
131
+ right: 0,
132
+ flexDirection: "row",
133
+ justifyContent: "center",
134
+ alignItems: "center"
135
+ },
136
+ bullet: {
137
+ marginHorizontal: 2,
138
+ width: 10,
139
+ height: 10,
140
+ borderRadius: 20,
141
+ backgroundColor: "#000"
142
+ }
143
+ });
120
144
  export default withTheme(Carousel);
@@ -1,8 +1,6 @@
1
- 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); }
2
1
  import * as React from "react";
3
- import { View, StyleSheet } from "react-native";
2
+ import { View, StyleSheet, Pressable } from "react-native";
4
3
  import { useTheme } from "../../theming";
5
- import Touchable from "../Touchable";
6
4
  import { usePrevious } from "../../hooks";
7
5
  const Checkbox = _ref => {
8
6
  let {
@@ -27,7 +25,6 @@ const Checkbox = _ref => {
27
25
  setInternalValue(status);
28
26
  }
29
27
  }, [status]);
30
-
31
28
  // This special logic is to handle weird APIs like Airtable that return
32
29
  // true or undefined for a boolean
33
30
  const previousDefaultValue = usePrevious(defaultValue);
@@ -51,7 +48,8 @@ const Checkbox = _ref => {
51
48
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
52
49
  }
53
50
  };
54
- return /*#__PURE__*/React.createElement(Touchable, _extends({}, rest, {
51
+ return /*#__PURE__*/React.createElement(Pressable, {
52
+ ...rest,
55
53
  onPress: handlePress,
56
54
  disabled: disabled,
57
55
  accessibilityState: {
@@ -63,7 +61,7 @@ const Checkbox = _ref => {
63
61
  width: size,
64
62
  height: size
65
63
  }]
66
- }), /*#__PURE__*/React.createElement(Icon, {
64
+ }, /*#__PURE__*/React.createElement(Icon, {
67
65
  style: styles.icon,
68
66
  name: internalValue ? checkedIcon : uncheckedIcon,
69
67
  size: size,
@@ -96,4 +94,26 @@ const styles = StyleSheet.create({
96
94
  alignSelf: "center"
97
95
  }
98
96
  });
97
+ export default Checkbox;or: checkboxColor
98
+ }]
99
+ })));
100
+ };
101
+ const styles = StyleSheet.create({
102
+ container: {
103
+ borderRadius: 18
104
+ },
105
+ fillContainer: {
106
+ alignItems: "center",
107
+ justifyContent: "center"
108
+ },
109
+ icon: {
110
+ alignSelf: "center"
111
+ },
112
+ fill: {
113
+ borderRadius: 5,
114
+ width: 30,
115
+ height: 30,
116
+ alignSelf: "center"
117
+ }
118
+ });
99
119
  export default Checkbox;
@@ -1,4 +1,3 @@
1
- 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); }
2
1
  import * as React from "react";
3
2
  import { View } from "react-native";
4
3
  import { checkboxGroupContext, Direction } from "./context";
@@ -23,7 +22,22 @@ const CheckboxGroup = _ref => {
23
22
  alignItems: "center"
24
23
  });
25
24
  }
26
- return /*#__PURE__*/React.createElement(View, _extends({
25
+ return /*#__PURE__*/React.createElement(View, {
26
+ style: [{
27
+ minHeight: 40
28
+ }, style],
29
+ ...rest
30
+ }, /*#__PURE__*/React.createElement(Provider, {
31
+ value: {
32
+ values,
33
+ onValueChange,
34
+ direction
35
+ }
36
+ }, /*#__PURE__*/React.createElement(View, {
37
+ style: _containerStyle
38
+ }, children)));
39
+ };
40
+ export default CheckboxGroup;PURE__*/React.createElement(View, _extends({
27
41
  style: [{
28
42
  minHeight: 40
29
43
  }, style]
@@ -1,13 +1,11 @@
1
- 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); }
2
1
  import * as React from "react";
3
- import { StyleSheet, View, Platform } from "react-native";
2
+ import { StyleSheet, View, Platform, Pressable } from "react-native";
4
3
  import Checkbox from "./Checkbox";
5
4
  import Text from "../Text";
6
5
  import { useCheckboxGroupContext } from "./context";
7
6
  import { Direction as GroupDirection } from "./context";
8
- import Touchable from "../Touchable";
9
7
  import { extractStyles } from "../../utilities";
10
- export let Direction;
8
+ export var Direction;
11
9
  (function (Direction) {
12
10
  Direction["Row"] = "row";
13
11
  Direction["RowReverse"] = "row-reverse";
@@ -64,13 +62,14 @@ const CheckboxGroupRow = _ref => {
64
62
  textStyles,
65
63
  viewStyles
66
64
  } = extractStyles(style);
67
- return /*#__PURE__*/React.createElement(Touchable, _extends({
65
+ return /*#__PURE__*/React.createElement(Pressable, {
68
66
  onPress: handlePress,
69
67
  style: [styles.mainParent, {
70
68
  flexDirection: direction
71
69
  }, viewStyles],
72
- disabled: disabled
73
- }, rest), /*#__PURE__*/React.createElement(View, {
70
+ disabled: disabled,
71
+ ...rest
72
+ }, /*#__PURE__*/React.createElement(View, {
74
73
  style: [styles.label, {
75
74
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
76
75
  }, labelContainerStyle]
@@ -108,4 +107,23 @@ const styles = StyleSheet.create({
108
107
  flex: 3
109
108
  }
110
109
  });
110
+ export default CheckboxGroupRow;reate({
111
+ mainParent: {
112
+ alignItems: "center",
113
+ justifyContent: "space-around",
114
+ paddingStart: 20,
115
+ minHeight: 50,
116
+ paddingEnd: 20,
117
+ display: "flex",
118
+ ...Platform.select({
119
+ web: {
120
+ cursor: "pointer",
121
+ userSelect: "none"
122
+ }
123
+ })
124
+ },
125
+ label: {
126
+ flex: 3
127
+ }
128
+ });
111
129
  export default CheckboxGroupRow;
@@ -1,11 +1,10 @@
1
1
  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); }
2
2
  import * as React from "react";
3
- import { StyleSheet, View, Platform } from "react-native";
3
+ import { StyleSheet, View, Platform, Pressable } from "react-native";
4
4
  import { isString } from "lodash";
5
5
  import { extractStyles } from "../../utilities";
6
6
  import { usePrevious } from "../../hooks";
7
7
  import Text from "../Text";
8
- import Touchable from "../Touchable";
9
8
  import Checkbox from "./Checkbox";
10
9
  export let Direction;
11
10
  (function (Direction) {
@@ -73,7 +72,7 @@ const CheckboxRow = _ref => {
73
72
  textStyles,
74
73
  viewStyles
75
74
  } = extractStyles(style);
76
- return /*#__PURE__*/React.createElement(Touchable, _extends({
75
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
77
76
  onPress: handlePress,
78
77
  style: [viewStyles, styles.mainParent, {
79
78
  flexDirection: direction