@draftbit/core 46.7.9-9ce779.2 → 46.7.9-b47217.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 (59) hide show
  1. package/lib/commonjs/components/DeprecatedFAB.js +21 -3
  2. package/lib/commonjs/components/Divider.js +14 -1
  3. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  4. package/lib/commonjs/index.js +0 -13
  5. package/lib/commonjs/mappings/DatePickerModal.js +145 -0
  6. package/lib/commonjs/styles/overlay.js +1 -3
  7. package/lib/module/components/AnimatedCircularProgress.js +1 -13
  8. package/lib/module/components/Container.js +4 -17
  9. package/lib/module/components/Divider.js +1 -18
  10. package/lib/module/components/Picker/PickerComponent.web.js +3 -21
  11. package/lib/module/components/Pressable.js +2 -15
  12. package/lib/module/components/Slider.js +4 -21
  13. package/lib/module/components/StarRating.js +4 -24
  14. package/lib/module/components/StepIndicator.js +18 -58
  15. package/lib/module/components/Switch.js +10 -21
  16. package/lib/module/constants.js +0 -1
  17. package/lib/module/hooks.js +2 -1
  18. package/lib/module/index.js +0 -1
  19. package/lib/module/mappings/DatePickerModal.js +139 -0
  20. package/lib/module/styles/overlay.js +3 -1
  21. package/lib/typescript/src/index.d.ts +0 -1
  22. package/lib/typescript/src/index.d.ts.map +1 -1
  23. package/lib/typescript/src/mappings/DatePickerModal.d.ts +241 -0
  24. package/lib/typescript/src/mappings/DatePickerModal.d.ts.map +1 -0
  25. package/package.json +3 -4
  26. package/src/index.js +0 -1
  27. package/src/index.tsx +0 -2
  28. package/src/mappings/DatePickerModal.js +146 -0
  29. package/src/mappings/DatePickerModal.ts +168 -0
  30. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +0 -73
  31. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -35
  32. package/lib/commonjs/components/DeckSwiper/index.js +0 -20
  33. package/lib/commonjs/mappings/DeckSwiper.js +0 -52
  34. package/lib/commonjs/mappings/DeckSwiperCard.js +0 -16
  35. package/lib/module/components/DeckSwiper/DeckSwiper.js +0 -65
  36. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -27
  37. package/lib/module/components/DeckSwiper/index.js +0 -2
  38. package/lib/module/mappings/DeckSwiper.js +0 -45
  39. package/lib/module/mappings/DeckSwiperCard.js +0 -9
  40. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +0 -15
  41. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +0 -1
  42. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +0 -13
  43. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +0 -1
  44. package/lib/typescript/src/components/DeckSwiper/index.d.ts +0 -3
  45. package/lib/typescript/src/components/DeckSwiper/index.d.ts.map +0 -1
  46. package/lib/typescript/src/mappings/DeckSwiper.d.ts +0 -83
  47. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +0 -1
  48. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -9
  49. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +0 -1
  50. package/src/components/DeckSwiper/DeckSwiper.js +0 -34
  51. package/src/components/DeckSwiper/DeckSwiper.tsx +0 -93
  52. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -22
  53. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -42
  54. package/src/components/DeckSwiper/index.js +0 -2
  55. package/src/components/DeckSwiper/index.tsx +0 -2
  56. package/src/mappings/DeckSwiper.js +0 -45
  57. package/src/mappings/DeckSwiper.ts +0 -54
  58. package/src/mappings/DeckSwiperCard.js +0 -9
  59. package/src/mappings/DeckSwiperCard.ts +0 -13
@@ -14,7 +14,6 @@ var _theming = require("../theming");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- 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); }
18
17
  const FAB = _ref => {
19
18
  let {
20
19
  Icon,
@@ -106,7 +105,8 @@ const FAB = _ref => {
106
105
  style: [{
107
106
  elevation
108
107
  }, style]
109
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
108
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
109
+ ...rest,
110
110
  onPress: onPress,
111
111
  accessibilityState: {
112
112
  disabled
@@ -114,7 +114,7 @@ const FAB = _ref => {
114
114
  accessibilityRole: "button",
115
115
  disabled: disabled || loading,
116
116
  style: buttonStyles
117
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
117
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
118
118
  style: styles.content
119
119
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
120
120
  style: iconStyle
@@ -154,4 +154,22 @@ const styles = _reactNative.StyleSheet.create({
154
154
  }
155
155
  });
156
156
  var _default = (0, _theming.withTheme)(FAB);
157
+ exports.default = _default;ow",
158
+ alignItems: "center",
159
+ justifyContent: "center"
160
+ },
161
+ icon: {
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ width: _Config.default.buttonIconSize
165
+ },
166
+ fixed: {
167
+ left: 0,
168
+ right: 0,
169
+ bottom: 0,
170
+ height: 64,
171
+ borderRadius: 0
172
+ }
173
+ });
174
+ var _default = (0, _theming.withTheme)(FAB);
157
175
  exports.default = _default;
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _theming = require("../theming");
10
10
  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); }
11
11
  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; }
12
- 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); }
13
12
  const Divider = _ref => {
14
13
  let {
15
14
  style,
@@ -19,6 +18,20 @@ const Divider = _ref => {
19
18
  },
20
19
  ...rest
21
20
  } = _ref;
21
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
22
+ style: [{
23
+ backgroundColor: color || colors.divider,
24
+ height: _reactNative.StyleSheet.hairlineWidth
25
+ }, style],
26
+ ...rest
27
+ });
28
+ };
29
+ var _default = (0, _theming.withTheme)(Divider);
30
+ exports.default = _default;eme: {
31
+ colors
32
+ },
33
+ ...rest
34
+ } = _ref;
22
35
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
23
36
  style: [{
24
37
  backgroundColor: color || colors.divider,
@@ -8,54 +8,28 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  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); }
10
10
  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; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
14
  /**
12
15
  * Portal host is the component which actually renders all Portals.
13
16
  */
14
17
  class PortalManager extends React.PureComponent {
15
18
  constructor() {
16
19
  super(...arguments);
17
- this.state = {
20
+ _defineProperty(this, "state", {
18
21
  portals: []
19
- };
20
- this.mount = (key, children) => {
22
+ });
23
+ _defineProperty(this, "mount", (key, children) => {
21
24
  this.setState(state => ({
22
25
  portals: [...state.portals, {
23
26
  key,
24
27
  children
25
28
  }]
26
29
  }));
27
- };
28
- this.update = (key, children) => this.setState(state => ({
29
- portals: state.portals.map(item => {
30
- if (item.key === key) {
31
- return {
32
- ...item,
33
- children
34
- };
35
- }
36
- return item;
37
- })
38
- }));
39
- this.unmount = key => this.setState(state => ({
40
- portals: state.portals.filter(item => item.key !== key)
41
- }));
42
- }
43
- render() {
44
- return this.state.portals.map(_ref => {
45
- let {
46
- key,
47
- children
48
- } = _ref;
49
- return /*#__PURE__*/React.createElement(_reactNative.View, {
50
- key: key,
51
- collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */,
52
- pointerEvents: "box-none",
53
- style: _reactNative.StyleSheet.absoluteFill
54
- }, children);
55
30
  });
56
- }
57
- }
58
- exports.default = PortalManager;tate.portals.map(item => {
31
+ _defineProperty(this, "update", (key, children) => this.setState(state => ({
32
+ portals: state.portals.map(item => {
59
33
  if (item.key === key) {
60
34
  return {
61
35
  ...item,
@@ -123,18 +123,6 @@ Object.defineProperty(exports, "DatePicker", {
123
123
  return _DatePicker.default;
124
124
  }
125
125
  });
126
- Object.defineProperty(exports, "DeckSwiper", {
127
- enumerable: true,
128
- get: function () {
129
- return _DeckSwiper.DeckSwiper;
130
- }
131
- });
132
- Object.defineProperty(exports, "DeckSwiperCard", {
133
- enumerable: true,
134
- get: function () {
135
- return _DeckSwiper.DeckSwiperCard;
136
- }
137
- });
138
126
  Object.defineProperty(exports, "DefaultTheme", {
139
127
  enumerable: true,
140
128
  get: function () {
@@ -413,7 +401,6 @@ var _ActionSheet = require("./components/ActionSheet");
413
401
  var _Swiper = require("./components/Swiper");
414
402
  var _Layout = require("./components/Layout");
415
403
  var _index = require("./components/RadioButton/index");
416
- var _DeckSwiper = require("./components/DeckSwiper");
417
404
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
418
405
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
419
406
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ /**
9
+ * Maps react-native-paper-dates DatePickerModal in modes: "single" and "multiple"
10
+ * Cannot map mode "range" because it relies on 2 fieldNames (startDate and endDate)
11
+ */
12
+
13
+ const SHARED_SEED_DATA = {
14
+ tag: "DatePickerModal",
15
+ packageName: "react-native-paper-dates",
16
+ triggers: [_types.Triggers.OnDismiss, _types.Triggers.OnConfirm, _types.Triggers.OnChange],
17
+ category: _types.COMPONENT_TYPES.input,
18
+ StylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position]
19
+ };
20
+ const SHARED_SEED_DATA_PROPS = {
21
+ onDismiss: (0, _types.createActionProp)({
22
+ label: "On Dismiss",
23
+ description: "Called when date picker dimissed",
24
+ required: true
25
+ }),
26
+ locale: (0, _types.createTextProp)({
27
+ label: "Locale",
28
+ description: "A locale can be composed of both a base language, the country (territory) of use, and possibly codeset (which is usually assumed). For example, German is de",
29
+ defaultValue: "en",
30
+ required: true
31
+ }),
32
+ visible: (0, _types.createBoolProp)({
33
+ label: "Visible",
34
+ description: "Flag indicating if the component should be displayed",
35
+ required: true
36
+ }),
37
+ label: (0, _types.createTextProp)({
38
+ label: "Label",
39
+ description: "The label used as the header in the component",
40
+ defaultValue: "Select date"
41
+ }),
42
+ saveLabel: (0, _types.createTextProp)({
43
+ label: "Save Label",
44
+ description: "Label used to confirm a date selection",
45
+ defaultValue: "Save"
46
+ }),
47
+ saveLabelDisabled: (0, _types.createStaticBoolProp)({
48
+ label: "Disable Save Label",
49
+ description: "Flag indicating if the save label should be disabled and unable to receive events"
50
+ }),
51
+ uppercase: (0, _types.createStaticBoolProp)({
52
+ label: "Uppercase",
53
+ description: "Flag indicating if the text in the component should be uppercase",
54
+ defaultValue: true
55
+ }),
56
+ startYear: (0, _types.createStaticNumberProp)({
57
+ label: "Start Year",
58
+ description: "The start year when the component is rendered",
59
+ required: false,
60
+ defaultValue: 1800
61
+ }),
62
+ endYear: (0, _types.createStaticNumberProp)({
63
+ label: "End Year",
64
+ description: "The end year when the component is rendered",
65
+ required: false,
66
+ defaultValue: 2200
67
+ })
68
+ };
69
+ const SEED_DATA = [{
70
+ ...SHARED_SEED_DATA,
71
+ name: "Date Picker Modal",
72
+ description: "Date Picker modal for date selection",
73
+ props: {
74
+ ...SHARED_SEED_DATA_PROPS,
75
+ onConfirm: (0, _types.createActionProp)({
76
+ label: "On Confirm",
77
+ description: "Called when date selected and confirmed",
78
+ required: true
79
+ }),
80
+ onChange: (0, _types.createActionProp)({
81
+ label: "On Change",
82
+ description: "Called when date selection changes"
83
+ }),
84
+ mode: (0, _types.createTextEnumProp)({
85
+ label: "Mode",
86
+ description: "The selection mode of the date picker",
87
+ required: true,
88
+ options: ["single"],
89
+ editable: false,
90
+ defaultValue: "single",
91
+ formType: _types.FORM_TYPES.flatArray
92
+ }),
93
+ fieldName: (0, _types.createFieldNameProp)({
94
+ defaultValue: "date",
95
+ handlerPropName: "onConfirm",
96
+ valuePropName: "date"
97
+ })
98
+ }
99
+ }, {
100
+ ...SHARED_SEED_DATA,
101
+ name: "Multiple Date Picker Modal",
102
+ description: "Date Picker modal for multiple date selection",
103
+ props: {
104
+ ...SHARED_SEED_DATA_PROPS,
105
+ onConfirm: (0, _types.createActionProp)({
106
+ label: "On Confirm",
107
+ description: "Called when dates selected and confirmed",
108
+ required: true
109
+ }),
110
+ onChange: (0, _types.createActionProp)({
111
+ label: "On Change",
112
+ description: "Called when dates selection changes"
113
+ }),
114
+ mode: (0, _types.createTextEnumProp)({
115
+ label: "Mode",
116
+ description: "The selection mode of the date picker",
117
+ required: true,
118
+ options: ["multiple"],
119
+ editable: false,
120
+ defaultValue: "multiple",
121
+ formType: _types.FORM_TYPES.flatArray
122
+ }),
123
+ moreLabel: (0, _types.createTextProp)({
124
+ label: "More Label",
125
+ description: "The label used display when multiple dates have been selected in the component",
126
+ defaultValue: "More"
127
+ }),
128
+ startLabel: (0, _types.createTextProp)({
129
+ label: "Start Label",
130
+ description: "The label used as the prefix to the starting date in the component",
131
+ defaultValue: "Start"
132
+ }),
133
+ endLabel: (0, _types.createTextProp)({
134
+ label: "End Label",
135
+ description: "The label used as the suffix to the ending date in the component",
136
+ defaultValue: "End"
137
+ }),
138
+ fieldName: (0, _types.createFieldNameProp)({
139
+ defaultValue: "dates",
140
+ handlerPropName: "onConfirm",
141
+ valuePropName: "dates"
142
+ })
143
+ }
144
+ }];
145
+ exports.SEED_DATA = SEED_DATA;
@@ -15,7 +15,6 @@ 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
-
19
18
  // @ts-expect-error: TS doesn't seem to refine the type correctly
20
19
  return elevation.interpolate({
21
20
  inputRange,
@@ -24,7 +23,6 @@ function overlay(elevation) {
24
23
  })
25
24
  });
26
25
  }
27
-
28
26
  // @ts-expect-error: TS doesn't seem to refine the type correctly
29
27
  return calculateColor(surfaceColor, elevation);
30
28
  }
@@ -65,4 +63,4 @@ const elevationOverlayTransparency = {
65
63
  22: 15.72,
66
64
  23: 15.84,
67
65
  24: 16
68
- };
66
+ };};
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { Animated, Easing } from "react-native";
3
4
  import CircularProgress from "./CircularProgress";
@@ -45,19 +46,6 @@ const AnimatedCircularProgress = _ref => {
45
46
  React.useEffect(() => {
46
47
  animate();
47
48
  }, [fill, animate]);
48
- return /*#__PURE__*/React.createElement(AnimatedProgress, {
49
- ...other,
50
- style: other.style,
51
- childrenContainerStyle: other.childrenContainerStyle,
52
- fill: fillAnimation,
53
- tintColor: animateColor()
54
- });
55
- };
56
- export default AnimatedCircularProgress;imation;
57
- };
58
- React.useEffect(() => {
59
- animate();
60
- }, [fill, animate]);
61
49
  return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
62
50
  style: other.style,
63
51
  childrenContainerStyle: other.childrenContainerStyle,
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, ImageBackground, StyleSheet } from "react-native";
3
4
  import { withTheme } from "../theming";
@@ -63,10 +64,9 @@ const Container = _ref => {
63
64
  };
64
65
  const Wrap = elevation ? Elevation : View;
65
66
  if (elevation) containerStyle.elevation = elevation;
66
- return /*#__PURE__*/React.createElement(Wrap, {
67
- style: [containerStyle, style],
68
- ...rest
69
- }, backgroundImage ? /*#__PURE__*/React.createElement(ImageBackground, {
67
+ return /*#__PURE__*/React.createElement(Wrap, _extends({
68
+ style: [containerStyle, style]
69
+ }, rest), backgroundImage ? /*#__PURE__*/React.createElement(ImageBackground, {
70
70
  source: typeof backgroundImage === "string" ? {
71
71
  uri: backgroundImage
72
72
  } : backgroundImage,
@@ -80,17 +80,4 @@ const Container = _ref => {
80
80
  style: innerStyle
81
81
  }, children));
82
82
  };
83
- export default withTheme(Container);ring" ? {
84
- uri: backgroundImage
85
- } : backgroundImage,
86
- resizeMode: backgroundImageResizeMode,
87
- style: {
88
- flex: 1
89
- }
90
- }, /*#__PURE__*/React.createElement(View, {
91
- style: innerStyle
92
- }, children)) : /*#__PURE__*/React.createElement(View, {
93
- style: innerStyle
94
- }, children));
95
- };
96
83
  export default withTheme(Container);
@@ -1,24 +1,7 @@
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); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  import { withTheme } from "../theming";
4
- const Divider = _ref => {
5
- let {
6
- style,
7
- color,
8
- theme: {
9
- colors
10
- },
11
- ...rest
12
- } = _ref;
13
- return /*#__PURE__*/React.createElement(View, {
14
- style: [{
15
- backgroundColor: color || colors.divider,
16
- height: StyleSheet.hairlineWidth
17
- }, style],
18
- ...rest
19
- });
20
- };
21
- export default withTheme(Divider);ing";
22
5
  const Divider = _ref => {
23
6
  let {
24
7
  style,
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet } from "react-native";
3
4
  import { Picker as NativePicker } from "@react-native-picker/picker";
@@ -7,6 +8,7 @@ import { extractStyles } from "../../utilities";
7
8
  import TextField from "../TextField";
8
9
  import Touchable from "../Touchable";
9
10
  const Picker = _ref => {
11
+ var _options$find$label, _options$find;
10
12
  let {
11
13
  style,
12
14
  options,
@@ -16,7 +18,6 @@ const Picker = _ref => {
16
18
  onValueChange: onValueChangeOverride = () => {},
17
19
  ...props
18
20
  } = _ref;
19
- var _a, _b;
20
21
  const {
21
22
  viewStyles: {
22
23
  borderRadius,
@@ -61,7 +62,7 @@ const Picker = _ref => {
61
62
  };
62
63
 
63
64
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
64
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
65
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
65
66
  return /*#__PURE__*/React.createElement(Touchable, {
66
67
  disabled: disabled,
67
68
  onPress: toggleFocus,
@@ -84,25 +85,6 @@ const Picker = _ref => {
84
85
  label: o.label,
85
86
  value: o.value,
86
87
  key: o.value
87
- }))), /*#__PURE__*/React.createElement(View, {
88
- pointerEvents: "none"
89
- }, /*#__PURE__*/React.createElement(TextField, {
90
- ...props,
91
- value: selectedLabel,
92
- placeholder: placeholder,
93
- // @ts-ignore
94
- ref: textField,
95
- disabled: disabled,
96
- // @ts-expect-error
97
- style: stylesWithoutMargin
98
- }))));
99
- };
100
- const styles = StyleSheet.create({
101
- container: {
102
- alignSelf: "stretch"
103
- }
104
- });
105
- export default withTheme(Picker);y: o.value
106
88
  }))), /*#__PURE__*/React.createElement(View, {
107
89
  pointerEvents: "none"
108
90
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -1,3 +1,4 @@
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); }
1
2
  import React from "react";
2
3
  import { Pressable as NativePressable } from "react-native";
3
4
  export default function Pressable(_ref) {
@@ -12,22 +13,8 @@ export default function Pressable(_ref) {
12
13
  style,
13
14
  ...props
14
15
  } = _ref;
15
- return /*#__PURE__*/React.createElement(NativePressable, {
16
+ return /*#__PURE__*/React.createElement(NativePressable, _extends({
16
17
  onPress: onPress,
17
- disabled: disabled,
18
- delayLongPress: delayLongPress ? delayLongPress : 500,
19
- hitSlop: hitSlop ? hitSlop : 8,
20
- style: _ref2 => {
21
- let {
22
- pressed
23
- } = _ref2;
24
- return [{
25
- opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
26
- }, style];
27
- },
28
- ...props
29
- }, children);
30
- } onPress: onPress,
31
18
  disabled: disabled,
32
19
  delayLongPress: delayLongPress ? delayLongPress : 500,
33
20
  hitSlop: hitSlop ? hitSlop : 8,
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet } from "react-native";
3
4
  import NativeSlider from "@react-native-community/slider";
@@ -63,10 +64,9 @@ function Slider(_ref) {
63
64
  setInternalValue(newValue);
64
65
  onValueChange(newValue);
65
66
  };
66
- return /*#__PURE__*/React.createElement(View, {
67
- style: [styles.container, style],
68
- ...rest
69
- }, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
67
+ return /*#__PURE__*/React.createElement(View, _extends({
68
+ style: [styles.container, style]
69
+ }, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
70
70
  color: leftIconThemeColor,
71
71
  name: leftIcon,
72
72
  size: 24
@@ -98,21 +98,4 @@ const styles = StyleSheet.create({
98
98
  marginHorizontal: 12
99
99
  }
100
100
  });
101
- export default withTheme(Slider);Icon ? /*#__PURE__*/React.createElement(Icon, {
102
- color: rightIconThemeColor,
103
- name: rightIcon,
104
- size: 24
105
- }) : null);
106
- }
107
- const styles = StyleSheet.create({
108
- container: {
109
- height: 40,
110
- flexDirection: "row",
111
- alignItems: "center"
112
- },
113
- slider: {
114
- flex: 1,
115
- marginHorizontal: 12
116
- }
117
- });
118
101
  export default withTheme(Slider);
@@ -1,3 +1,4 @@
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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet, Pressable } from "react-native";
3
4
  import { withTheme } from "../theming";
@@ -31,10 +32,9 @@ const StarRating = _ref => {
31
32
  !!onPress && onPress(r);
32
33
  }, [onPress]);
33
34
  const ratingRounded = Math.round(localRating * 2) / 2;
34
- return /*#__PURE__*/React.createElement(View, {
35
- style: [styles.container, style],
36
- ...rest
37
- }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
35
+ return /*#__PURE__*/React.createElement(View, _extends({
36
+ style: [styles.container, style]
37
+ }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
38
38
  key: i,
39
39
  style: {
40
40
  display: "flex"
@@ -74,24 +74,4 @@ const styles = StyleSheet.create({
74
74
  width: "50%"
75
75
  }
76
76
  });
77
- export default withTheme(StarRating);ntainer: {
78
- flexDirection: "row",
79
- alignItems: "center"
80
- },
81
- touchContainer: {
82
- display: "flex",
83
- flexDirection: "row",
84
- position: "absolute",
85
- top: 0,
86
- right: 0,
87
- left: 0,
88
- bottom: 0,
89
- zIndex: 1
90
- },
91
- pressable: {
92
- flex: 1,
93
- height: "100%",
94
- width: "50%"
95
- }
96
- });
97
77
  export default withTheme(StarRating);