@draftbit/core 46.7.8-5681f1.2 → 46.7.8-8eb72d.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 (62) hide show
  1. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
  2. package/lib/commonjs/components/Divider.js +14 -1
  3. package/lib/commonjs/components/Elevation.js +14 -2
  4. package/lib/commonjs/components/Picker/Picker.js +7 -13
  5. package/lib/commonjs/constants.js +1 -1
  6. package/lib/commonjs/index.js +0 -13
  7. package/lib/module/components/AvatarEdit.js +4 -15
  8. package/lib/module/components/Banner.js +4 -25
  9. package/lib/module/components/Button.js +10 -33
  10. package/lib/module/components/Checkbox/CheckboxGroup.js +2 -16
  11. package/lib/module/components/CircularProgress.js +8 -28
  12. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  13. package/lib/module/components/Divider.js +1 -18
  14. package/lib/module/components/FAB.js +4 -22
  15. package/lib/module/components/FieldSearchBarFull.js +2 -1
  16. package/lib/module/components/FormRow.js +2 -17
  17. package/lib/module/components/Image.js +2 -18
  18. package/lib/module/components/Picker/Picker.js +7 -13
  19. package/lib/module/components/Picker/PickerComponent.web.js +3 -21
  20. package/lib/module/components/ProgressBar.js +7 -39
  21. package/lib/module/components/ScreenContainer.js +4 -21
  22. package/lib/module/components/StarRating.js +4 -24
  23. package/lib/module/components/Text.js +4 -50
  24. package/lib/module/index.js +0 -1
  25. package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
  26. package/lib/typescript/src/index.d.ts +0 -1
  27. package/lib/typescript/src/index.d.ts.map +1 -1
  28. package/package.json +3 -4
  29. package/src/components/Picker/Picker.js +5 -11
  30. package/src/components/Picker/Picker.tsx +6 -16
  31. package/src/index.js +0 -1
  32. package/src/index.tsx +0 -2
  33. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +0 -73
  34. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -35
  35. package/lib/commonjs/components/DeckSwiper/index.js +0 -20
  36. package/lib/commonjs/mappings/DeckSwiper.js +0 -52
  37. package/lib/commonjs/mappings/DeckSwiperCard.js +0 -16
  38. package/lib/module/components/DeckSwiper/DeckSwiper.js +0 -65
  39. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -27
  40. package/lib/module/components/DeckSwiper/index.js +0 -2
  41. package/lib/module/mappings/DeckSwiper.js +0 -45
  42. package/lib/module/mappings/DeckSwiperCard.js +0 -9
  43. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +0 -15
  44. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +0 -1
  45. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +0 -13
  46. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +0 -1
  47. package/lib/typescript/src/components/DeckSwiper/index.d.ts +0 -3
  48. package/lib/typescript/src/components/DeckSwiper/index.d.ts.map +0 -1
  49. package/lib/typescript/src/mappings/DeckSwiper.d.ts +0 -83
  50. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +0 -1
  51. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -9
  52. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +0 -1
  53. package/src/components/DeckSwiper/DeckSwiper.js +0 -34
  54. package/src/components/DeckSwiper/DeckSwiper.tsx +0 -93
  55. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -22
  56. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -42
  57. package/src/components/DeckSwiper/index.js +0 -2
  58. package/src/components/DeckSwiper/index.tsx +0 -2
  59. package/src/mappings/DeckSwiper.js +0 -45
  60. package/src/mappings/DeckSwiper.ts +0 -54
  61. package/src/mappings/DeckSwiperCard.js +0 -9
  62. package/src/mappings/DeckSwiperCard.ts +0 -13
@@ -48,7 +48,6 @@ const Picker = _ref => {
48
48
  placeholder,
49
49
  value,
50
50
  disabled = false,
51
- theme,
52
51
  assistiveText,
53
52
  label,
54
53
  iconColor = unstyledColor,
@@ -86,9 +85,6 @@ const Picker = _ref => {
86
85
  value: placeholder,
87
86
  label: placeholder
88
87
  }, ...normalizedOptions] : normalizedOptions;
89
- const {
90
- colors
91
- } = theme;
92
88
  const {
93
89
  viewStyles,
94
90
  textStyles
@@ -211,12 +207,10 @@ const Picker = _ref => {
211
207
  style: styles.primaryTextContainer
212
208
  }, labelText, /*#__PURE__*/React.createElement(Text, {
213
209
  style: primaryTextStyle
214
- }, String(selectedLabel !== null && selectedLabel !== void 0 ? selectedLabel : placeholder))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
215
- style: [styles.iosPicker, {
216
- backgroundColor: colors.divider
217
- }]
218
- }, /*#__PURE__*/React.createElement(SafeAreaView, {
219
- style: styles.iosSafeArea
210
+ }, String(selectedLabel !== null && selectedLabel !== void 0 ? selectedLabel : placeholder))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(SafeAreaView, {
211
+ style: styles.iosPicker
212
+ }, /*#__PURE__*/React.createElement(View, {
213
+ style: styles.iosPickerContent
220
214
  }, /*#__PURE__*/React.createElement(Button, {
221
215
  Icon: Icon,
222
216
  type: "text",
@@ -288,10 +282,10 @@ const styles = StyleSheet.create({
288
282
  justifyContent: "center",
289
283
  width: "100%",
290
284
  maxWidth: deviceWidth,
291
- maxHeight: deviceHeight
285
+ maxHeight: deviceHeight,
286
+ backgroundColor: "white"
292
287
  },
293
- iosSafeArea: {
294
- backgroundColor: "white",
288
+ iosPickerContent: {
295
289
  flexDirection: "column",
296
290
  width: "100%",
297
291
  maxWidth: deviceWidth
@@ -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,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); }
2
+ 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; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ 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); }
1
5
  import React, { Component } from "react";
2
6
  import { Animated, Easing, View, I18nManager } from "react-native";
3
7
  const INDETERMINATE_WIDTH_FACTOR = 0.3;
@@ -5,7 +9,7 @@ const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_
5
9
  export default class ProgressBar extends Component {
6
10
  constructor(props) {
7
11
  super(props);
8
- this.handleLayout = event => {
12
+ _defineProperty(this, "handleLayout", event => {
9
13
  const {
10
14
  width = 150,
11
15
  onLayout
@@ -18,7 +22,7 @@ export default class ProgressBar extends Component {
18
22
  if (onLayout) {
19
23
  onLayout(event);
20
24
  }
21
- };
25
+ });
22
26
  const {
23
27
  progress: progressP = 0,
24
28
  indeterminate = false
@@ -66,6 +70,7 @@ export default class ProgressBar extends Component {
66
70
  ...animationConfig,
67
71
  toValue: progress,
68
72
  velocity: 0,
73
+ //adjust this value if animation fails - velocity is required
69
74
  useNativeDriver
70
75
  }).start();
71
76
  } else {
@@ -134,43 +139,6 @@ export default class ProgressBar extends Component {
134
139
  })
135
140
  }]
136
141
  };
137
- return /*#__PURE__*/React.createElement(View, {
138
- style: [containerStyle, style],
139
- onLayout: this.handleLayout,
140
- ...restProps
141
- }, /*#__PURE__*/React.createElement(Animated.View, {
142
- style: progressStyle
143
- }), children);
144
- }
145
- } width,
146
- borderWidth,
147
- borderColor: borderColor || color,
148
- borderRadius,
149
- overflow: "hidden",
150
- backgroundColor: unfilledColor
151
- };
152
- const progressStyle = {
153
- backgroundColor: color,
154
- // Always take up full height of container.
155
- height: "100%",
156
- transform: [{
157
- translateX: this.state.animationValue.interpolate({
158
- inputRange: [0, 1],
159
- outputRange: [innerWidth * -INDETERMINATE_WIDTH_FACTOR, innerWidth]
160
- })
161
- }, {
162
- translateX: this.state.progress.interpolate({
163
- inputRange: [0, 1],
164
- outputRange: [innerWidth / (I18nManager.isRTL ? 2 : -2), 0]
165
- })
166
- }, {
167
- // Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
168
- scaleX: this.state.progress.interpolate({
169
- inputRange: [0, 1],
170
- outputRange: [0.0001, 1]
171
- })
172
- }]
173
- };
174
142
  return /*#__PURE__*/React.createElement(View, _extends({
175
143
  style: [containerStyle, style],
176
144
  onLayout: this.handleLayout
@@ -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 { StyleSheet, ScrollView, View } from "react-native";
3
4
  import { SafeAreaView } from "react-native-safe-area-context";
@@ -21,13 +22,12 @@ function ScreenContainer(_ref) {
21
22
  if (hasSafeArea || hasBottomSafeArea) {
22
23
  edges.push("bottom");
23
24
  }
24
- return /*#__PURE__*/React.createElement(SafeAreaView, {
25
+ return /*#__PURE__*/React.createElement(SafeAreaView, _extends({
25
26
  edges: edges,
26
27
  style: [styles.container, {
27
28
  backgroundColor
28
- }],
29
- ...rest
30
- }, scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
29
+ }]
30
+ }, rest), scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
31
31
  contentContainerStyle: [styles.scrollViewContainer, {
32
32
  backgroundColor
33
33
  }, style]
@@ -46,21 +46,4 @@ const styles = StyleSheet.create({
46
46
  flex: undefined
47
47
  }
48
48
  });
49
- export default withTheme(ScreenContainer);olor
50
- }, style]
51
- }, children) : /*#__PURE__*/React.createElement(View, {
52
- style: [styles.container, {
53
- backgroundColor
54
- }, style]
55
- }, children));
56
- }
57
- const styles = StyleSheet.create({
58
- container: {
59
- flex: 1
60
- },
61
- scrollViewContainer: {
62
- flexGrow: 1,
63
- flex: undefined
64
- }
65
- });
66
49
  export default withTheme(ScreenContainer);
@@ -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);
@@ -1,56 +1,10 @@
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
+ 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; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
4
+ 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); }
1
5
  import * as React from "react";
2
6
  import { Text as NativeText, I18nManager } from "react-native";
3
7
  import { withTheme } from "../theming";
4
- class Text extends React.Component {
5
- constructor() {
6
- super(...arguments);
7
- this.state = {
8
- nativeProps: {}
9
- };
10
- }
11
- setNativeProps(args) {
12
- this.state.nativeProps = args || {};
13
- }
14
- render() {
15
- const {
16
- style,
17
- ...rest
18
- } = this.props;
19
- const writingDirection = I18nManager.isRTL ? "rtl" : "ltr";
20
- return /*#__PURE__*/React.createElement(NativeText, {
21
- ...rest,
22
- ...this.state.nativeProps,
23
- ref: c => {
24
- this._root = c;
25
- },
26
- style: [{
27
- textAlign: "left",
28
- writingDirection
29
- }, style]
30
- });
31
- }
32
- }
33
- export const BaseLink = _ref => {
34
- let {
35
- style,
36
- theme,
37
- title,
38
- ...props
39
- } = _ref;
40
- return /*#__PURE__*/React.createElement(Text, {
41
- hitSlop: 8,
42
- style: [{
43
- color: theme.colors.primary
44
- }, style],
45
- theme: theme,
46
- ...props
47
- }, title);
48
- };
49
- const Link = withTheme(BaseLink);
50
- export { Link };
51
- export default withTheme(Text); as React from "react";
52
- import { Text as NativeText, I18nManager } from "react-native";
53
- import { withTheme } from "../theming";
54
8
  class Text extends React.Component {
55
9
  constructor() {
56
10
  super(...arguments);
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
34
 
36
35
  /* Deprecated: Fix or Delete! */
37
36
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
@@ -1 +1 @@
1
- {"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAKL,SAAS,EACT,SAAS,EAEV,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQtD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EA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MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;;;;AAiaF,wBAAiC"}
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
34
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
36
35
  export { default as Picker } from "./components/Picker/Picker";
37
36
  export { default as ProgressBar } from "./components/ProgressBar";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d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,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,GAAG,EACH,KAAK,EACL,MAAM,GACP,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GACtB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.7.8-5681f1.2+5681f19",
3
+ "version": "46.7.8-8eb72d.2+8eb72d9",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.7.8-5681f1.2+5681f19",
44
+ "@draftbit/types": "^46.7.8-8eb72d.2+8eb72d9",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -53,7 +53,6 @@
53
53
  "lodash.isnumber": "^3.0.3",
54
54
  "lodash.omit": "^4.5.0",
55
55
  "lodash.tonumber": "^4.0.3",
56
- "react-native-deck-swiper": "^2.0.12",
57
56
  "react-native-modal-datetime-picker": "^13.0.0",
58
57
  "react-native-svg": "12.3.0",
59
58
  "react-native-typography": "^1.4.1",
@@ -92,5 +91,5 @@
92
91
  ]
93
92
  ]
94
93
  },
95
- "gitHead": "5681f195c4eae45825ace461b3f441aaa6374482"
94
+ "gitHead": "8eb72d98b8394516ca2d63b414d5501a9f685bef"
96
95
  }
@@ -35,7 +35,7 @@ const isIos = Platform.OS === "ios";
35
35
  const unstyledColor = "rgba(165, 173, 183, 1)";
36
36
  const disabledColor = "rgb(240, 240, 240)";
37
37
  const errorColor = "rgba(255, 69, 100, 1)";
38
- const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style, placeholder, value, disabled = false, theme, assistiveText, label, iconColor = unstyledColor, iconSize = 24, leftIconMode = "inset", leftIconName, placeholderTextColor = unstyledColor, rightIconName, type = "solid", }) => {
38
+ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style, placeholder, value, disabled = false, assistiveText, label, iconColor = unstyledColor, iconSize = 24, leftIconMode = "inset", leftIconName, placeholderTextColor = unstyledColor, rightIconName, type = "solid", }) => {
39
39
  var _a, _b;
40
40
  const androidPickerRef = React.useRef(undefined);
41
41
  const [internalValue, setInternalValue] = React.useState(value || defaultValue);
@@ -63,7 +63,6 @@ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style,
63
63
  const pickerOptions = placeholder
64
64
  ? [{ value: placeholder, label: placeholder }, ...normalizedOptions]
65
65
  : normalizedOptions;
66
- const { colors } = theme;
67
66
  const { viewStyles, textStyles } = extractStyles(style);
68
67
  const additionalBorderStyles = ["backgroundColor"];
69
68
  const additionalMarginStyles = [
@@ -183,13 +182,8 @@ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style,
183
182
  rightIcon)),
184
183
  assistiveTextLabel),
185
184
  isIos && pickerVisible ? (React.createElement(Portal, null,
186
- React.createElement(View, { style: [
187
- styles.iosPicker,
188
- {
189
- backgroundColor: colors.divider,
190
- },
191
- ] },
192
- React.createElement(SafeAreaView, { style: styles.iosSafeArea },
185
+ React.createElement(SafeAreaView, { style: styles.iosPicker },
186
+ React.createElement(View, { style: styles.iosPickerContent },
193
187
  React.createElement(Button, { Icon: Icon, type: "text", onPress: togglePickerVisible, style: styles.iosButton }, "Close"),
194
188
  React.createElement(NativePicker, { style: styles.iosNativePicker, selectedValue: internalValue, onValueChange: handleValueChange }, pickerOptions.map((option) => (React.createElement(NativePicker.Item, { label: option.label, value: option.value, key: option.value })))))))) : null,
195
189
  !isIos && pickerVisible ? (React.createElement(NativePicker, { enabled: pickerVisible, selectedValue: internalValue, onValueChange: handleValueChange, style: styles.nonIosPicker, ref: androidPickerRef, onBlur: () => setPickerVisible(false) }, pickerOptions.map((option) => (React.createElement(NativePicker.Item, { label: option.label, value: option.value, key: option.value }))))) : null));
@@ -239,9 +233,9 @@ const styles = StyleSheet.create({
239
233
  width: "100%",
240
234
  maxWidth: deviceWidth,
241
235
  maxHeight: deviceHeight,
242
- },
243
- iosSafeArea: {
244
236
  backgroundColor: "white",
237
+ },
238
+ iosPickerContent: {
245
239
  flexDirection: "column",
246
240
  width: "100%",
247
241
  maxWidth: deviceWidth,
@@ -98,7 +98,6 @@ const Picker: React.FC<PickerProps> = ({
98
98
  placeholder,
99
99
  value,
100
100
  disabled = false,
101
- theme,
102
101
  assistiveText,
103
102
  label,
104
103
  iconColor = unstyledColor,
@@ -145,8 +144,6 @@ const Picker: React.FC<PickerProps> = ({
145
144
  ? [{ value: placeholder, label: placeholder }, ...normalizedOptions]
146
145
  : normalizedOptions;
147
146
 
148
- const { colors } = theme;
149
-
150
147
  const { viewStyles, textStyles } = extractStyles(style);
151
148
 
152
149
  const additionalBorderStyles = ["backgroundColor"];
@@ -347,15 +344,8 @@ const Picker: React.FC<PickerProps> = ({
347
344
  {/* iosPicker */}
348
345
  {isIos && pickerVisible ? (
349
346
  <Portal>
350
- <View
351
- style={[
352
- styles.iosPicker,
353
- {
354
- backgroundColor: colors.divider,
355
- },
356
- ]}
357
- >
358
- <SafeAreaView style={styles.iosSafeArea}>
347
+ <SafeAreaView style={styles.iosPicker}>
348
+ <View style={styles.iosPickerContent}>
359
349
  <Button
360
350
  Icon={Icon}
361
351
  type="text"
@@ -378,8 +368,8 @@ const Picker: React.FC<PickerProps> = ({
378
368
  />
379
369
  ))}
380
370
  </NativePicker>
381
- </SafeAreaView>
382
- </View>
371
+ </View>
372
+ </SafeAreaView>
383
373
  </Portal>
384
374
  ) : null}
385
375
 
@@ -451,9 +441,9 @@ const styles = StyleSheet.create({
451
441
  width: "100%",
452
442
  maxWidth: deviceWidth,
453
443
  maxHeight: deviceHeight,
454
- },
455
- iosSafeArea: {
456
444
  backgroundColor: "white",
445
+ },
446
+ iosPickerContent: {
457
447
  flexDirection: "column",
458
448
  width: "100%",
459
449
  maxWidth: deviceWidth,
package/src/index.js CHANGED
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
35
34
  /* Deprecated: Fix or Delete! */
36
35
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
37
36
  export { default as Picker } from "./components/Picker/Picker";
package/src/index.tsx CHANGED
@@ -51,8 +51,6 @@ export {
51
51
  RadioButtonFieldGroup,
52
52
  } from "./components/RadioButton/index";
53
53
 
54
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
55
-
56
54
  /* Deprecated: Fix or Delete! */
57
55
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
58
56
  export { default as Picker } from "./components/Picker/Picker";
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _reactNativeDeckSwiper = _interopRequireDefault(require("react-native-deck-swiper"));
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- const DeckSwiper = _ref => {
12
- let {
13
- onIndexChanged,
14
- onEndReached,
15
- startCardIndex = 0,
16
- infiniteSwiping = false,
17
- verticalEnabled = true,
18
- horizontalEnabled = true,
19
- visibleCardCount = 1,
20
- style,
21
- children
22
- } = _ref;
23
- const childrenArray = _react.default.useMemo(() => _react.default.Children.toArray(children), [children]);
24
-
25
- // an array of indices based on children count
26
- const cardsFillerData = _react.default.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
27
-
28
- /**
29
- * By default react-native-deck-swiper positions everything with absolute position
30
- * To overcome this, it is wrapped in a View to be able to add the component in any layout structure
31
- *
32
- * Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird
33
- * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
34
- * This effectivley makes the default height of the container be the height of the first card
35
- */
36
-
37
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
38
- style: styles.containerHeightFiller
39
- }, childrenArray.length && childrenArray[0]), /*#__PURE__*/_react.default.createElement(_reactNativeDeckSwiper.default, {
40
- cards: cardsFillerData,
41
- renderCard: (_, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, childrenArray[i]),
42
- keyExtractor: card => card === null || card === void 0 ? void 0 : card.toString(),
43
- containerStyle: _reactNative.StyleSheet.flatten([styles.cardsContainer, style]),
44
- cardStyle: styles.card,
45
- onSwiped: onIndexChanged,
46
- onSwipedAll: onEndReached,
47
- cardIndex: startCardIndex,
48
- infinite: infiniteSwiping,
49
- verticalSwipe: verticalEnabled,
50
- horizontalSwipe: horizontalEnabled,
51
- showSecondCard: visibleCardCount > 1,
52
- stackSize: visibleCardCount,
53
- backgroundColor: "transparent",
54
- cardVerticalMargin: 0,
55
- cardHorizontalMargin: 0
56
- }));
57
- };
58
- const styles = _reactNative.StyleSheet.create({
59
- cardsContainer: {
60
- width: "100%"
61
- },
62
- card: {
63
- left: 0,
64
- right: 0,
65
- width: "auto",
66
- height: "auto"
67
- },
68
- containerHeightFiller: {
69
- opacity: 0.0
70
- }
71
- });
72
- var _default = DeckSwiper;
73
- exports.default = _default;
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _reactNative = require("react-native");
9
- var _theming = require("../../theming");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- const DeckSwiperCard = _ref => {
12
- let {
13
- style,
14
- children,
15
- theme
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
18
- style: [styles.card, {
19
- backgroundColor: theme.colors.background,
20
- borderRadius: theme.borderRadius.global,
21
- borderColor: theme.colors.divider
22
- }, style]
23
- }, children);
24
- };
25
- const styles = _reactNative.StyleSheet.create({
26
- card: {
27
- flex: 1,
28
- alignItems: "center",
29
- justifyContent: "center",
30
- padding: 20,
31
- borderWidth: 2
32
- }
33
- });
34
- var _default = (0, _theming.withTheme)(DeckSwiperCard);
35
- exports.default = _default;
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "DeckSwiper", {
7
- enumerable: true,
8
- get: function () {
9
- return _DeckSwiper.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "DeckSwiperCard", {
13
- enumerable: true,
14
- get: function () {
15
- return _DeckSwiperCard.default;
16
- }
17
- });
18
- var _DeckSwiper = _interopRequireDefault(require("./DeckSwiper"));
19
- var _DeckSwiperCard = _interopRequireDefault(require("./DeckSwiperCard"));
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }