@draftbit/core 43.2.5-6f3224.3 → 43.2.5-7c93d7.3
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.
- package/lib/commonjs/components/Carousel.js +8 -14
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -5
- package/lib/commonjs/components/Text.js +1 -1
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/module/components/Carousel.js +8 -14
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/CircularProgress.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.ios.js +10 -7
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
- package/lib/module/components/ProgressBar.js +3 -16
- package/lib/module/components/Text.js +1 -1
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/mappings/View.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Carousel.js +7 -17
- package/src/components/Carousel.tsx +7 -22
- package/src/components/Text.js +1 -1
- package/src/components/Text.tsx +1 -1
|
@@ -65,19 +65,14 @@ function Carousel(_ref2) {
|
|
|
65
65
|
const slides = Array.isArray(data) ? data : [];
|
|
66
66
|
|
|
67
67
|
const {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
marginRight
|
|
68
|
+
width,
|
|
69
|
+
height
|
|
71
70
|
} = _reactNative.StyleSheet.flatten(style || {});
|
|
72
71
|
|
|
72
|
+
const slideWidth = width || screenWidth;
|
|
73
73
|
const slideHeight = height || 250;
|
|
74
|
-
const containerWidth = screenWidth - (marginLeft ? Number(marginLeft) : 0) - (marginRight ? Number(marginRight) : 0);
|
|
75
74
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
76
|
-
style: [styles.container,
|
|
77
|
-
width: containerWidth,
|
|
78
|
-
height: slideHeight,
|
|
79
|
-
maxWidth: containerWidth
|
|
80
|
-
}, style]
|
|
75
|
+
style: [styles.container, style]
|
|
81
76
|
}, rest), /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
82
77
|
pagingEnabled: true,
|
|
83
78
|
horizontal: true,
|
|
@@ -101,7 +96,7 @@ function Carousel(_ref2) {
|
|
|
101
96
|
uri: item
|
|
102
97
|
} : item,
|
|
103
98
|
style: [{
|
|
104
|
-
width:
|
|
99
|
+
width: slideWidth,
|
|
105
100
|
height: slideHeight
|
|
106
101
|
}]
|
|
107
102
|
});
|
|
@@ -111,12 +106,11 @@ function Carousel(_ref2) {
|
|
|
111
106
|
const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
|
|
112
107
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
113
108
|
style: {
|
|
114
|
-
width:
|
|
109
|
+
width: slideWidth
|
|
115
110
|
}
|
|
116
111
|
}, /*#__PURE__*/React.cloneElement(child, {
|
|
117
112
|
style: { ...s,
|
|
118
|
-
width:
|
|
119
|
-
height: slideHeight
|
|
113
|
+
width: slideWidth
|
|
120
114
|
}
|
|
121
115
|
}));
|
|
122
116
|
})), /*#__PURE__*/React.createElement(Pager, {
|
|
@@ -128,7 +122,7 @@ function Carousel(_ref2) {
|
|
|
128
122
|
|
|
129
123
|
const styles = _reactNative.StyleSheet.create({
|
|
130
124
|
container: {
|
|
131
|
-
backgroundColor: "#
|
|
125
|
+
backgroundColor: "#eee"
|
|
132
126
|
},
|
|
133
127
|
pager: {
|
|
134
128
|
position: "absolute",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.tsx"],"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","
|
|
1
|
+
{"version":3,"sources":["Carousel.tsx"],"names":["screenWidth","Dimensions","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","React","useState","Children","count","itemsLength","slides","isArray","StyleSheet","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,wBAAWC,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AASA,SAASC,KAAT,OAQG;AAAA,MARY;AACbC,IAAAA,KADa;AAEbC,IAAAA,KAFa;AAGbC,IAAAA;AAHa,GAQZ;AACD,sBACE,oBAAC,iBAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KACGC,KAAK,CAACC,IAAN,CAAW;AAAEJ,IAAAA;AAAF,GAAX,EAAuBK,GAAvB,CAA2B,CAACC,CAAD,EAAIC,CAAJ,KAAU;AACpC,UAAMC,OAAO,GAAGT,KAAK,KAAKQ,CAA1B;AACA,UAAME,OAAO,GAAGD,OAAO,GAAG,CAAH,GAAO,GAA9B;AACA,UAAME,IAAI,GAAGF,OAAO,GAAG,EAAH,GAAQ,CAA5B;AACA,wBACE,oBAAC,iBAAD;AACE,MAAA,GAAG,EAAED,CADP;AAEE,MAAA,KAAK,EAAE,CACLN,MAAM,CAACU,MADF,EAEL;AAAEC,QAAAA,eAAe,EAAEd,KAAnB;AAA0BW,QAAAA,OAA1B;AAAmCb,QAAAA,KAAK,EAAEc,IAA1C;AAAgDG,QAAAA,MAAM,EAAEH;AAAxD,OAFK;AAFT,MADF;AASD,GAbA,CADH,CADF;AAkBD;;AAED,SAASI,QAAT,QAMU;AAAA;;AAAA,MANQ;AAChBC,IAAAA,IADgB;AAEhBC,IAAAA,QAFgB;AAGhBC,IAAAA,QAAQ,GAAG,QAHK;A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AAQ,EAAE,UADL;AAELC,IAAAA,MAAM,EAAE,EAFH;AAGLC,IAAAA,IAAI,EAAE,CAHD;AAILC,IAAAA,KAAK,EAAE,CAJF;AAKLC,IAAAA,aAAa,EAAE,KALV;AAMLC,IAAAA,cAAc,EAAE,QANX;AAOLC,IAAAA,UAAU,EAAE;AAPP,GAJwB;AAa/B5C,EAAAA,MAAM,EAAE;AACN6C,IAAAA,gBAAgB,EAAE,CADZ;AAEN5D,IAAAA,KAAK,EAAE,EAFD;AAGNiB,IAAAA,MAAM,EAAE,EAHF;AAIN4C,IAAAA,YAAY,EAAE,EAJR;AAKN7C,IAAAA,eAAe,EAAE;AALX;AAbuB,CAAlB,CAAf;;eAsBe,wBAAUE,QAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: Props) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\n"]}
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
19
|
-
|
|
20
18
|
const {
|
|
21
19
|
Provider
|
|
22
20
|
} = _context.radioButtonGroupContext;
|
|
@@ -58,11 +56,12 @@ const RadioButtonGroup = _ref => {
|
|
|
58
56
|
});
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
59
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
62
60
|
style: [{
|
|
63
61
|
minHeight: 40
|
|
64
|
-
}, style]
|
|
65
|
-
|
|
62
|
+
}, style],
|
|
63
|
+
...rest
|
|
64
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
66
65
|
value: {
|
|
67
66
|
value: internalValue || "",
|
|
68
67
|
onValueChange: handleValueChange,
|
|
@@ -73,6 +72,18 @@ const RadioButtonGroup = _ref => {
|
|
|
73
72
|
}, children)));
|
|
74
73
|
};
|
|
75
74
|
|
|
75
|
+
var _default = RadioButtonGroup;
|
|
76
|
+
exports.default = _default;
|
|
77
|
+
//# sourceMappingURL=RadioButtonGroup.js.map value: {
|
|
78
|
+
value: internalValue || "",
|
|
79
|
+
onValueChange: handleValueChange,
|
|
80
|
+
direction
|
|
81
|
+
}
|
|
82
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
83
|
+
style: _containerStyle
|
|
84
|
+
}, children)));
|
|
85
|
+
};
|
|
86
|
+
|
|
76
87
|
var _default = RadioButtonGroup;
|
|
77
88
|
exports.default = _default;
|
|
78
89
|
//# sourceMappingURL=RadioButtonGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Text.tsx"],"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,iBAAD,eACMJ,IADN;AAEE,MAAA,GAAG,EAAGK,CAAD,IAAO;AACV,aAAKR,KAAL,GAAaQ,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEJ,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6BnC,MAAMQ,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBR,IAAAA,KADuB;AAEvBS,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGR;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAES,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,
|
|
1
|
+
{"version":3,"sources":["Text.tsx"],"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,iBAAD,eACMJ,IADN;AAEE,MAAA,GAAG,EAAGK,CAAD,IAAO;AACV,aAAKR,KAAL,GAAaQ,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEJ,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6BnC,MAAMQ,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBR,IAAAA,KADuB;AAEvBS,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGR;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAES,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,EAA2Dd,KAA3D,CAFT;AAGE,IAAA,KAAK,EAAES;AAHT,KAIMP,KAJN,GAMGQ,KANH,CADF;AAUD,CAhBM;;;AAkBP,MAAMK,IAAS,GAAG,wBAAUP,QAAV,CAAlB;;;eAGe,wBAAUf,IAAV,C","sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n setNativeProps(args: TextProps) {\n return this._root && this._root.setNativeProps(args);\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary, alignSelf: \"flex-start\" }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\n"]}
|
|
@@ -47,18 +47,13 @@ function Carousel(_ref2) {
|
|
|
47
47
|
const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
|
|
48
48
|
const slides = Array.isArray(data) ? data : [];
|
|
49
49
|
const {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
marginRight
|
|
50
|
+
width,
|
|
51
|
+
height
|
|
53
52
|
} = StyleSheet.flatten(style || {});
|
|
53
|
+
const slideWidth = width || screenWidth;
|
|
54
54
|
const slideHeight = height || 250;
|
|
55
|
-
const containerWidth = screenWidth - (marginLeft ? Number(marginLeft) : 0) - (marginRight ? Number(marginRight) : 0);
|
|
56
55
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
57
|
-
style: [styles.container,
|
|
58
|
-
width: containerWidth,
|
|
59
|
-
height: slideHeight,
|
|
60
|
-
maxWidth: containerWidth
|
|
61
|
-
}, style]
|
|
56
|
+
style: [styles.container, style]
|
|
62
57
|
}, rest), /*#__PURE__*/React.createElement(ScrollView, {
|
|
63
58
|
pagingEnabled: true,
|
|
64
59
|
horizontal: true,
|
|
@@ -82,7 +77,7 @@ function Carousel(_ref2) {
|
|
|
82
77
|
uri: item
|
|
83
78
|
} : item,
|
|
84
79
|
style: [{
|
|
85
|
-
width:
|
|
80
|
+
width: slideWidth,
|
|
86
81
|
height: slideHeight
|
|
87
82
|
}]
|
|
88
83
|
});
|
|
@@ -92,12 +87,11 @@ function Carousel(_ref2) {
|
|
|
92
87
|
const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
|
|
93
88
|
return /*#__PURE__*/React.createElement(View, {
|
|
94
89
|
style: {
|
|
95
|
-
width:
|
|
90
|
+
width: slideWidth
|
|
96
91
|
}
|
|
97
92
|
}, /*#__PURE__*/React.cloneElement(child, {
|
|
98
93
|
style: { ...s,
|
|
99
|
-
width:
|
|
100
|
-
height: slideHeight
|
|
94
|
+
width: slideWidth
|
|
101
95
|
}
|
|
102
96
|
}));
|
|
103
97
|
})), /*#__PURE__*/React.createElement(Pager, {
|
|
@@ -109,7 +103,7 @@ function Carousel(_ref2) {
|
|
|
109
103
|
|
|
110
104
|
const styles = StyleSheet.create({
|
|
111
105
|
container: {
|
|
112
|
-
backgroundColor: "#
|
|
106
|
+
backgroundColor: "#eee"
|
|
113
107
|
},
|
|
114
108
|
pager: {
|
|
115
109
|
position: "absolute",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Carousel.tsx"],"names":["React","withTheme","ScrollView","View","StyleSheet","Dimensions","Image","screenWidth","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","useState","Children","count","itemsLength","slides","isArray","
|
|
1
|
+
{"version":3,"sources":["Carousel.tsx"],"names":["React","withTheme","ScrollView","View","StyleSheet","Dimensions","Image","screenWidth","get","width","Pager","color","index","length","styles","pager","Array","from","map","_","i","current","opacity","size","bullet","backgroundColor","height","Carousel","data","children","dotColor","style","rest","setIndex","useState","Children","count","itemsLength","slides","isArray","flatten","slideWidth","slideHeight","container","nativeEvent","layoutWidth","layoutMeasurement","offset","contentOffset","x","currentIndex","Math","ceil","item","uri","child","s","props","cloneElement","create","position","bottom","left","right","flexDirection","justifyContent","alignItems","marginHorizontal","borderRadius"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,YAA1B;AACA,SACEC,UADF,EAEEC,IAFF,EAGEC,UAHF,EAIEC,UAJF,QAOO,cAPP;AAQA,OAAOC,KAAP,MAAkB,SAAlB;AAEA,MAAMC,WAAW,GAAGF,UAAU,CAACG,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;AASA,SAASC,KAAT,OAQG;AAAA,MARY;AACbC,IAAAA,KADa;AAEbC,IAAAA,KAFa;AAGbC,IAAAA;AAHa,GAQZ;AACD,sBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEC,MAAM,CAACC;AAApB,KACGC,KAAK,CAACC,IAAN,CAAW;AAAEJ,IAAAA;AAAF,GAAX,EAAuBK,GAAvB,CAA2B,CAACC,CAAD,EAAIC,CAAJ,KAAU;AACpC,UAAMC,OAAO,GAAGT,KAAK,KAAKQ,CAA1B;AACA,UAAME,OAAO,GAAGD,OAAO,GAAG,CAAH,GAAO,GAA9B;AACA,UAAME,IAAI,GAAGF,OAAO,GAAG,EAAH,GAAQ,CAA5B;AACA,wBACE,oBAAC,IAAD;AACE,MAAA,GAAG,EAAED,CADP;AAEE,MAAA,KAAK,EAAE,CACLN,MAAM,CAACU,MADF,EAEL;AAAEC,QAAAA,eAAe,EAAEd,KAAnB;AAA0BW,QAAAA,OAA1B;AAAmCb,QAAAA,KAAK,EAAEc,IAA1C;AAAgDG,QAAAA,MAAM,EAAEH;AAAxD,OAFK;AAFT,MADF;AASD,GAbA,CADH,CADF;AAkBD;;AAED,SAASI,QAAT,QAMU;AAAA;;AAAA,MANQ;A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S,EAAE;AACTlB,IAAAA,eAAe,EAAE;AADR,GADoB;AAI/BV,EAAAA,KAAK,EAAE;AACL6C,IAAAA,QAAQ,EAAE,UADL;AAELC,IAAAA,MAAM,EAAE,EAFH;AAGLC,IAAAA,IAAI,EAAE,CAHD;AAILC,IAAAA,KAAK,EAAE,CAJF;AAKLC,IAAAA,aAAa,EAAE,KALV;AAMLC,IAAAA,cAAc,EAAE,QANX;AAOLC,IAAAA,UAAU,EAAE;AAPP,GAJwB;AAa/B1C,EAAAA,MAAM,EAAE;AACN2C,IAAAA,gBAAgB,EAAE,CADZ;AAEN1D,IAAAA,KAAK,EAAE,EAFD;AAGNiB,IAAAA,MAAM,EAAE,EAHF;AAIN0C,IAAAA,YAAY,EAAE,EAJR;AAKN3C,IAAAA,eAAe,EAAE;AALX;AAbuB,CAAlB,CAAf;AAsBA,eAAexB,SAAS,CAAC0B,QAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport {\n ScrollView,\n View,\n StyleSheet,\n Dimensions,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\nimport Image from \"./Image\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\n\ntype Props = {\n data?: any[];\n children?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n dotColor?: string;\n};\n\nfunction Pager({\n color,\n index,\n length,\n}: {\n color: string;\n index: number;\n length: number;\n}) {\n return (\n <View style={styles.pager}>\n {Array.from({ length }).map((_, i) => {\n const current = index === i;\n const opacity = current ? 1 : 0.5;\n const size = current ? 10 : 8;\n return (\n <View\n key={i}\n style={[\n styles.bullet,\n { backgroundColor: color, opacity, width: size, height: size },\n ]}\n />\n );\n })}\n </View>\n );\n}\n\nfunction Carousel({\n data,\n children,\n dotColor = \"strong\",\n style,\n ...rest\n}: Props) {\n const [index, setIndex] = React.useState(0);\n\n const length = React.Children.count(children);\n const itemsLength = (data?.length ?? 0) + length;\n const slides = Array.isArray(data) ? data : [];\n\n const { width, height } = StyleSheet.flatten(style || {});\n const slideWidth = width || screenWidth;\n const slideHeight = height || 250;\n\n return (\n <View style={[styles.container, style]} {...rest}>\n <ScrollView\n pagingEnabled\n horizontal\n decelerationRate=\"fast\"\n scrollEventThrottle={200}\n showsHorizontalScrollIndicator={false}\n onScroll={({ nativeEvent }) => {\n const layoutWidth = nativeEvent.layoutMeasurement.width;\n const offset = nativeEvent.contentOffset.x;\n const currentIndex = Math.ceil(offset / layoutWidth);\n setIndex(currentIndex);\n }}\n >\n {slides.length > 0\n ? slides.map((item, i) => {\n return (\n <Image\n key={i}\n resizeMode=\"cover\"\n source={typeof item === \"string\" ? { uri: item } : item}\n style={[{ width: slideWidth, height: slideHeight }]}\n />\n );\n })\n : null}\n {React.Children.map(children, (child: any) => {\n const s = child?.props?.style || {};\n return (\n <View style={{ width: slideWidth }}>\n {React.cloneElement(child, {\n style: { ...s, width: slideWidth },\n })}\n </View>\n );\n })}\n </ScrollView>\n <Pager color={dotColor} index={index} length={itemsLength} />\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: \"#eee\",\n },\n pager: {\n position: \"absolute\",\n bottom: 12,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n bullet: {\n marginHorizontal: 2,\n width: 10,\n height: 10,\n borderRadius: 20,\n backgroundColor: \"#000\",\n },\n});\n\nexport default withTheme(Carousel);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CircularProgress.js"],"names":["React","View","Svg","Path","G","CircularProgress","Component","centerX","centerY","radius","angleInDegrees","angleInRadians","Math","PI","x","cos","y","sin","startAngle","endAngle","start","polarToCartesian","end","largeArcFlag","d","join","fill","min","max","render","size","width","backgroundWidth","tintColor","tintTransparency","backgroundColor","style","rotation","lineCap","arcSweepAngle","children","childrenContainerStyle","padding","renderCap","dashedBackground","gap","dashedTint","props","maxWidthCircle","sizeWithPadding","currentFillAngle","clampFill","backgroundPath","circlePath","circlePathItem","coordinate","cap","center","offset","localChildrenContainerStyle","position","left","top","height","borderRadius","alignItems","justifyContent","overflow","strokeDasharrayTint","Object","values","map","value","toString","strokeDasharrayBackground","createElement","originX","originY","stroke","strokeWidth","strokeLinecap","strokeDasharray"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,GAAT,EAAcC,IAAd,EAAoBC,CAApB,QAA6B,kBAA7B;;AACA,MAAMC,gBAAN,SAA+BL,KAAK,CAACM,SAArC,CAA+C;AAAA;AAAA;;AAAA,8CACxB,CAACC,OAAD,EAAUC,OAAV,EAAmBC,MAAnB,EAA2BC,cAA3B,KAA8C;AAC7D,UAAIC,cAAc,GAAI,CAACD,cAAc,GAAG,EAAlB,IAAwBE,IAAI,CAACC,EAA9B,GAAoC,KAAzD;AACA,aAAO;AACHC,QAAAA,CAAC,EAAEP,OAAO,GAAGE,MAAM,GAAGG,IAAI,CAACG,GAAL,CAASJ,cAAT,CADnB;AAEHK,QAAAA,CAAC,EAAER,OAAO,GAAGC,MAAM,GAAGG,IAAI,CAACK,GAAL,CAASN,cAAT;AAFnB,OAAP;AAIH,KAP0C;;AAAA,wCAQ9B,CAACG,CAAD,EAAIE,CAAJ,EAAOP,MAAP,EAAeS,UAAf,EAA2BC,QAA3B,KAAwC;AACjD,UAAIC,KAAK,GAAG,KAAKC,gBAAL,CAAsBP,CAAtB,EAAyBE,CAAzB,EAA4BP,MAA5B,EAAoCU,QAAQ,GAAG,MAA/C,CAAZ;AACA,UAAIG,GAAG,GAAG,KAAKD,gBAAL,CAAsBP,CAAtB,EAAyBE,CAAzB,EAA4BP,MAA5B,EAAoCS,UAApC,CAAV;AACA,UAAIK,YAAY,GAAGJ,QAAQ,GAAGD,UAAX,IAAyB,GAAzB,GAA+B,GAA/B,GAAqC,GAAxD;AACA,UAAIM,CAAC,GAAG,CACJ,GADI,EAEJJ,KAAK,CAACN,CAFF,EAGJM,KAAK,C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EAA0B;AAAEqB,MAAAA,CAAC,EAAE8B,cAAL;AAAqBwB,MAAAA,MAAM,EAAE7C,SAA7B;AAAwC8C,MAAAA,WAAW,EAAEhD,KAArD;AAA4DiD,MAAAA,aAAa,EAAE1C,OAA3E;AAAoF2C,MAAAA,eAAe,EAAEb,mBAArG;AAA0H1C,MAAAA,IAAI,EAAE;AAAhI,KAA1B,CAFjB,EAGI8B,GAHJ,CADJ,CADI,EAMJhB,QAAQ,iBAAKxC,KAAK,CAAC2E,aAAN,CAAoB1E,IAApB,EAA0B;AAAEmC,MAAAA,KAAK,EAAEuB;AAAT,KAA1B,EAAkEnB,QAAQ,CAACd,IAAD,CAA1E,CANT,CAAR;AAOH;;AAxE0C;;AA0E/C,eAAerB,gBAAf","sourcesContent":["import React from \"react\";\nimport { View } from \"react-native\";\nimport { Svg, Path, G } from \"react-native-svg\";\nclass CircularProgress extends React.Component {\n polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {\n var angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians),\n };\n };\n circlePath = (x, y, radius, startAngle, endAngle) => {\n var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);\n var end = this.polarToCartesian(x, y, radius, startAngle);\n var largeArcFlag = endAngle - startAngle <= 180 ? \"0\" : \"1\";\n var d = [\n \"M\",\n start.x,\n start.y,\n \"A\",\n radius,\n radius,\n 0,\n largeArcFlag,\n 0,\n end.x,\n end.y,\n ];\n return d.join(\" \");\n };\n clampFill = (fill) => Math.min(100, Math.max(0, fill));\n render() {\n const { size, width, backgroundWidth, tintColor = \"black\", tintTransparency = true, backgroundColor, style, rotation = 90, lineCap = \"butt\", arcSweepAngle = 360, fill, children, childrenContainerStyle, padding = 0, renderCap, dashedBackground = { width: 0, gap: 0 }, dashedTint = { width: 0, gap: 0 }, } = this.props;\n const maxWidthCircle = backgroundWidth\n ? Math.max(width, backgroundWidth)\n : width;\n const sizeWithPadding = size / 2 + padding / 2;\n const radius = size / 2 - maxWidthCircle / 2 - padding / 2;\n const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;\n const backgroundPath = this.circlePath(sizeWithPadding, sizeWithPadding, radius, tintTransparency ? 0 : currentFillAngle, arcSweepAngle);\n const circlePathItem = this.circlePath(sizeWithPadding, sizeWithPadding, radius, 0, currentFillAngle);\n const coordinate = this.polarToCartesian(sizeWithPadding, sizeWithPadding, radius, currentFillAngle);\n const cap = renderCap ? renderCap({ center: coordinate }) : null;\n const offset = size - maxWidthCircle * 2;\n const localChildrenContainerStyle = [\n {\n position: \"absolute\",\n left: maxWidthCircle + padding / 2,\n top: maxWidthCircle + padding / 2,\n width: offset,\n height: offset,\n borderRadius: offset / 2,\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n },\n childrenContainerStyle,\n ];\n const strokeDasharrayTint = dashedTint.gap > 0\n ? Object.values(dashedTint)\n .map((value) => value.toString())\n .join(\" \")\n : \"\";\n const strokeDasharrayBackground = dashedBackground.gap > 0\n ? Object.values(dashedBackground)\n .map((value) => value.toString())\n .join(\" \")\n : \"\";\n return (React.createElement(View, { style: style },\n React.createElement(Svg, { width: size + padding, height: size + padding },\n React.createElement(G, { rotation: rotation, originX: (size + padding) / 2, originY: (size + padding) / 2 },\n backgroundColor && (React.createElement(Path, { d: backgroundPath, stroke: backgroundColor, strokeWidth: backgroundWidth || width, strokeLinecap: lineCap, strokeDasharray: strokeDasharrayBackground, fill: \"transparent\" })),\n fill > 0 && (React.createElement(Path, { d: circlePathItem, stroke: tintColor, strokeWidth: width, strokeLinecap: lineCap, strokeDasharray: strokeDasharrayTint, fill: \"transparent\" })),\n cap)),\n children && (React.createElement(View, { style: localChildrenContainerStyle }, children(fill)))));\n }\n}\nexport default CircularProgress;\n"]}
|
|
1
|
+
{"version":3,"sources":["CircularProgress.tsx"],"names":["React","View","Svg","Path","G","CircularProgress","Component","centerX","centerY","radius","angleInDegrees","angleInRadians","Math","PI","x","cos","y","sin","startAngle","endAngle","start","polarToCartesian","end","largeArcFlag","d","join","fill","min","max","render","size","width","backgroundWidth","tintColor","tintTransparency","backgroundColor","style","rotation","lineCap","arcSweepAngle","children","childrenContainerStyle","padding","renderCap","dashedBackground","gap","dashedTint","props","maxWidthCircle","sizeWithPadding","currentFillAngle","clampFill","backgroundPath","circlePath","circlePathItem","coordinate","cap","center","offset","localChildrenContainerStyle","position","left","top","height","borderRadius","alignItems","justifyContent","overflow","strokeDasharrayTint","Object","values","map","value","toString","strokeDasharrayBackground"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAA2C,cAA3C;AACA,SAASC,GAAT,EAAcC,IAAd,EAAoBC,CAApB,QAA6B,kBAA7B;;AAsBA,MAAMC,gBAAN,SAA+BL,KAAK,CAACM,SAArC,CAAsD;AAAA;AAAA;;AAAA,8CACjC,CACjBC,OADiB,EAEjBC,OAFiB,EAGjBC,MAHiB,EAIjBC,cAJiB,KAKY;AAC7B,UAAIC,cAAc,GAAI,CAACD,cAAc,GAAG,EAAlB,IAAwBE,IAAI,CAACC,EAA9B,GAAoC,KAAzD;AACA,aAAO;AACLC,QAAAA,CAAC,EAAEP,OAAO,GAAGE,MAAM,GAAGG,IAAI,CAACG,GAAL,CAASJ,cAAT,CADjB;AAELK,QAAAA,CAAC,EAAER,OAAO,GAAGC,MAAM,GAAGG,IAAI,CAACK,GAAL,CAASN,cAAT;AAFjB,OAAP;AAID,KAZmD;;AAAA,wCAcvC,CACXG,CADW,EAEXE,CAFW,EAGXP,MAHW,EAIXS,UAJW,EAKXC,QALW,KAMA;AACX,UAAIC,KAAK,GAAG,KAAKC,gBAAL,CAAsBP,CAAtB,EAAyBE,CAAzB,EAA4BP,MAA5B,EAAoCU,QAAQ,GAAG,MAA/C,CAAZ;AACA,UAAIG,GAAG,GAAG,KAAKD,gBAAL,CAAsBP,CAAtB,EAAyBE,CAAzB,EAA4BP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AAEO,OAJjB;AAKE,MAAA,eAAe,EAAE8B,mBALnB;AAME,MAAA,IAAI,EAAC;AANP,MAhBJ,EAyBGZ,GAzBH,CADF,CADF,EA8BGhB,QAAQ,iBACP,oBAAC,IAAD;AAAM,MAAA,KAAK,EAAEmB;AAAb,OAA2CnB,QAAQ,CAACd,IAAD,CAAnD,CA/BJ,CADF;AAoCD;;AA/JmD;;AAkKtD,eAAerB,gBAAf","sourcesContent":["import React from \"react\";\nimport { View, StyleProp, ViewStyle } from \"react-native\";\nimport { Svg, Path, G } from \"react-native-svg\";\n\nexport type Props = {\n size: number;\n width: number;\n backgroundWidth?: number;\n tintColor?: string;\n tintTransparency?: boolean;\n backgroundColor?: string;\n style?: StyleProp<ViewStyle>;\n rotation?: string | number | undefined;\n lineCap?: \"butt\" | \"square\" | \"round\" | undefined;\n arcSweepAngle?: number;\n fill: number;\n children?: (fill: number) => React.ReactNode;\n childrenContainerStyle?: StyleProp<ViewStyle>;\n padding?: number;\n renderCap?: (obj: { center: { x: number; y: number } }) => React.ReactNode;\n dashedBackground?: { width: number; gap: number };\n dashedTint?: { width: number; gap: number };\n};\n\nclass CircularProgress extends React.Component<Props> {\n polarToCartesian = (\n centerX: number,\n centerY: number,\n radius: number,\n angleInDegrees: number\n ): { x: number; y: number } => {\n var angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians),\n };\n };\n\n circlePath = (\n x: number,\n y: number,\n radius: number,\n startAngle: number,\n endAngle: number\n ): string => {\n var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);\n var end = this.polarToCartesian(x, y, radius, startAngle);\n var largeArcFlag = endAngle - startAngle <= 180 ? \"0\" : \"1\";\n var d = [\n \"M\",\n start.x,\n start.y,\n \"A\",\n radius,\n radius,\n 0,\n largeArcFlag,\n 0,\n end.x,\n end.y,\n ];\n return d.join(\" \");\n };\n\n clampFill = (fill: number) => Math.min(100, Math.max(0, fill));\n\n render() {\n const {\n size,\n width,\n backgroundWidth,\n tintColor = \"black\",\n tintTransparency = true,\n backgroundColor,\n style,\n rotation = 90,\n lineCap = \"butt\",\n arcSweepAngle = 360,\n fill,\n children,\n childrenContainerStyle,\n padding = 0,\n renderCap,\n dashedBackground = { width: 0, gap: 0 },\n dashedTint = { width: 0, gap: 0 },\n } = this.props;\n\n const maxWidthCircle = backgroundWidth\n ? Math.max(width, backgroundWidth)\n : width;\n const sizeWithPadding = size / 2 + padding / 2;\n const radius = size / 2 - maxWidthCircle / 2 - padding / 2;\n\n const currentFillAngle = (arcSweepAngle * this.clampFill(fill)) / 100;\n const backgroundPath = this.circlePath(\n sizeWithPadding,\n sizeWithPadding,\n radius,\n tintTransparency ? 0 : currentFillAngle,\n arcSweepAngle\n );\n const circlePathItem = this.circlePath(\n sizeWithPadding,\n sizeWithPadding,\n radius,\n 0,\n currentFillAngle\n );\n const coordinate = this.polarToCartesian(\n sizeWithPadding,\n sizeWithPadding,\n radius,\n currentFillAngle\n );\n const cap = renderCap ? renderCap({ center: coordinate }) : null;\n\n const offset = size - maxWidthCircle * 2;\n\n const localChildrenContainerStyle: StyleProp<ViewStyle>[] = [\n {\n position: \"absolute\",\n left: maxWidthCircle + padding / 2,\n top: maxWidthCircle + padding / 2,\n width: offset,\n height: offset,\n borderRadius: offset / 2,\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n },\n childrenContainerStyle,\n ];\n\n const strokeDasharrayTint =\n dashedTint.gap > 0\n ? Object.values(dashedTint)\n .map((value) => value.toString())\n .join(\" \")\n : \"\";\n\n const strokeDasharrayBackground =\n dashedBackground.gap > 0\n ? Object.values(dashedBackground)\n .map((value) => value.toString())\n .join(\" \")\n : \"\";\n\n return (\n <View style={style}>\n <Svg width={size + padding} height={size + padding}>\n <G\n rotation={rotation}\n originX={(size + padding) / 2}\n originY={(size + padding) / 2}\n >\n {backgroundColor && (\n <Path\n d={backgroundPath}\n stroke={backgroundColor}\n strokeWidth={backgroundWidth || width}\n strokeLinecap={lineCap}\n strokeDasharray={strokeDasharrayBackground}\n fill=\"transparent\"\n />\n )}\n {fill > 0 && (\n <Path\n d={circlePathItem}\n stroke={tintColor}\n strokeWidth={width}\n strokeLinecap={lineCap}\n strokeDasharray={strokeDasharrayTint}\n fill=\"transparent\"\n />\n )}\n {cap}\n </G>\n </Svg>\n {children && (\n <View style={localChildrenContainerStyle}>{children(fill)}</View>\n )}\n </View>\n );\n }\n}\n\nexport default CircularProgress;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DatePickerComponent.web.
|
|
1
|
+
{"version":3,"sources":["DatePickerComponent.web.tsx"],"names":["React","DateFnsUtils","MuiPickersUtilsProvider","DatePicker","TimePicker","DateTimePicker","createMuiTheme","ThemeProvider","withTheme","Theme","DatePickerComponent","value","onChange","mode","toggleVisibility","isVisible","theme","internalTheme","palette","primary","main","colors","secondary","Picker","d"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,YAAP,MAAyB,mBAAzB;AACA,SACEC,uBADF,EAEEC,UAFF,EAGEC,UAHF,EAIEC,cAJF,QAKO,sBALP;AAMA,SAASC,cAAT,EAAyBC,aAAzB,QAA8C,0BAA9C;AAEA,SAASC,SAAT,QAA0B,eAA1B;AACA,OAAOC,KAAP,MAAkB,2BAAlB;;AAEA,MAAMC,mBAA8D,GAAG,QAOjE;AAAA;;AAAA,MAPkE;AACtEC,IAAAA,KADsE;AAEtEC,IAAAA,QAFsE;AAGtEC,IAAAA,IAHsE;AAItEC,IAAAA,gBAJsE;AAKtEC,IAAAA,SALsE;AAMtEC,IAAAA;AANsE,GAOlE;AACJ,QAAMC,aAAa,GAAGX,cAAc,CAAC;AACnCY,IAAAA,OAAO,EAAE;AACPC,MAAAA,OAAO,EAAE;AACPC,QAAAA,IAAI,2BAAEJ,KAAF,aAAEA,KAAF,wCAAEA,KAAK,CAAEK,MAAT,kDAAE,cAAeF,OAAjB,yEAA4BV,KAAK,CAACY,MAAN,CAAaF;AADtC,OADF;AAIPG,MAAAA,SAAS,EAAE;AACTF,QAAAA,IAAI,2BAAEJ,KAAF,aAAEA,KAAF,yCAAEA,KAAK,CAAEK,MAAT,mDAAE,eAAeC,SAAjB,yEAA8Bb,KAAK,CAACY,MAAN,CAAaC;AADtC;AAJJ;AAD0B,GAAD,CAApC;AAWA,QAAMC,MAAM,GACVV,IAAI,KAAK,MAAT,GACIV,UADJ,GAEIU,IAAI,KAAK,MAAT,GACAT,UADA,GAEAC,cALN;AAOA,sBACE,oBAAC,uBAAD;AAAyB,IAAA,KAAK,EAAEJ;AAAhC,kBACE,oBAAC,aAAD;AAAe,IAAA,KAAK,EAAEgB;AAAtB,kBACE,oBAAC,MAAD;AACE,IAAA,KAAK,EAAEN,KADT;AAEE,IAAA,IAAI,EAAEI,SAFR;AAGE,IAAA,QAAQ,EAAGS,CAAD,IAAO;AACfV,MAAAA,gBAAgB;AAChBF,MAAAA,QAAQ,CAAC,IAAD,EAAOY,CAAP,CAAR;AACD,KANH;AAOE,IAAA,OAAO,EAAE,MAAMV,gBAAgB,EAPjC;AAQE,IAAA,OAAO,EAAC,QARV;AASE,IAAA,kBAAkB,EAAE,MAAM;AAT5B,IADF,CADF,CADF;AAiBD,CA3CD;;AA6CA,eAAeN,SAAS,CAACE,mBAAD,CAAxB","sourcesContent":["import React from \"react\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport {\n MuiPickersUtilsProvider,\n DatePicker,\n TimePicker,\n DateTimePicker,\n} from \"@material-ui/pickers\";\nimport { createMuiTheme, ThemeProvider } from \"@material-ui/core/styles\";\nimport { DatePickerComponentProps as Props } from \"./DatePickerComponentType\";\nimport { withTheme } from \"../../theming\";\nimport Theme from \"../../styles/DefaultTheme\";\n\nconst DatePickerComponent: React.FC<Props & { theme: typeof Theme }> = ({\n value,\n onChange,\n mode,\n toggleVisibility,\n isVisible,\n theme,\n}) => {\n const internalTheme = createMuiTheme({\n palette: {\n primary: {\n main: theme?.colors?.primary ?? Theme.colors.primary,\n },\n secondary: {\n main: theme?.colors?.secondary ?? Theme.colors.secondary,\n },\n },\n });\n\n const Picker =\n mode === \"date\"\n ? DatePicker\n : mode === \"time\"\n ? TimePicker\n : DateTimePicker;\n\n return (\n <MuiPickersUtilsProvider utils={DateFnsUtils}>\n <ThemeProvider theme={internalTheme}>\n <Picker\n value={value}\n open={isVisible}\n onChange={(d) => {\n toggleVisibility();\n onChange(null, d);\n }}\n onClose={() => toggleVisibility()}\n variant=\"dialog\"\n TextFieldComponent={() => null}\n />\n </ThemeProvider>\n </MuiPickersUtilsProvider>\n );\n};\n\nexport default withTheme(DatePickerComponent);\n"]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
@@ -73,17 +75,18 @@ const Picker = _ref => {
|
|
|
73
75
|
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
74
76
|
disabled: disabled,
|
|
75
77
|
onPress: toggleVisibility
|
|
76
|
-
}, /*#__PURE__*/React.createElement(TextField, {
|
|
78
|
+
}, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
|
|
77
79
|
value: String(selectedLabel),
|
|
78
|
-
placeholder: placeholder
|
|
79
|
-
|
|
80
|
-
ref: textField
|
|
80
|
+
placeholder: placeholder // @ts-ignore
|
|
81
|
+
,
|
|
82
|
+
ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
|
|
83
|
+
,
|
|
81
84
|
disabled: disabled,
|
|
82
|
-
pointerEvents: "none"
|
|
83
|
-
|
|
85
|
+
pointerEvents: "none" // @ts-expect-error
|
|
86
|
+
,
|
|
84
87
|
style: stylesWithoutMargin,
|
|
85
88
|
Icon: Icon
|
|
86
|
-
})), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
|
|
89
|
+
}))), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
|
|
87
90
|
style: [styles.picker, {
|
|
88
91
|
backgroundColor: colors.divider
|
|
89
92
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PickerComponent.ios.
|
|
1
|
+
{"version":3,"sources":["PickerComponent.ios.tsx"],"names":["React","View","StyleSheet","SafeAreaView","omit","Picker","NativePicker","withTheme","Portal","Button","TextField","Touchable","extractStyles","Icon","style","options","placeholder","selectedValue","disabled","onValueChange","theme","colors","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","textField","useRef","undefined","pickerVisible","setIsPickerVisible","useState","toggleVisibility","current","toggleFocus","stylesWithoutMargin","flatten","selectedLabel","find","o","value","label","styles","container","String","picker","divider","pickerContainer","closeButton","map","create","alignSelf","position","bottom","left","right","flexDirection","justifyContent","width"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,cAAjC;AACA,SAASC,YAAT,QAA6B,gCAA7B;AACA,OAAOC,IAAP,MAAiB,aAAjB;AAEA,SAASC,MAAM,IAAIC,YAAnB,QAAuC,6BAAvC;AAEA,SAASC,SAAT,QAA0B,eAA1B;AAEA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,MAAP,MAAmB,qBAAnB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;AAEA,SAASC,aAAT,QAA8B,iBAA9B;;AAGA,MAAMP,MAAiD,GA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AAHjB,KAKGJ,OAAO,CAAC6C,GAAR,CAAaV,CAAD,iBACX,oBAAC,YAAD,CAAc,IAAd;AACE,IAAA,KAAK,EAAEA,CAAC,CAACE,KADX;AAEE,IAAA,KAAK,EAAEF,CAAC,CAACC,KAFX;AAGE,IAAA,GAAG,EAAED,CAAC,CAACC;AAHT,IADD,CALH,CATF,CADF,CADF,CAhBJ,CADF;AA+CD,CApGD;;AAsGA,MAAME,MAAM,GAAGnD,UAAU,CAAC2D,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,SAAS,EAAE;AADF,GADoB;AAI/BN,EAAAA,MAAM,EAAE;AACNO,IAAAA,QAAQ,EAAE,UADJ;AAENC,IAAAA,MAAM,EAAE,CAFF;AAGNC,IAAAA,IAAI,EAAE,CAHA;AAINC,IAAAA,KAAK,EAAE,CAJD;AAKNC,IAAAA,aAAa,EAAE,KALT;AAMNC,IAAAA,cAAc,EAAE;AANV,GAJuB;AAY/BV,EAAAA,eAAe,EAAE;AACf3B,IAAAA,eAAe,EAAE,OADF;AAEfoC,IAAAA,aAAa,EAAE,QAFA;AAGfE,IAAAA,KAAK,EAAE;AAHQ,GAZc;AAiB/BV,EAAAA,WAAW,EAAE;AACXG,IAAAA,SAAS,EAAE;AADA;AAjBkB,CAAlB,CAAf;AAsBA,eAAevD,SAAS,CAACF,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport omit from \"lodash.omit\";\n\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\n\nimport { withTheme } from \"../../theming\";\n\nimport Portal from \"../Portal/Portal\";\nimport Button from \"../DeprecatedButton\";\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nimport { PickerComponentProps } from \"./PickerTypes\";\nimport { extractStyles } from \"../../utilities\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nconst Picker: React.FC<PickerComponentProps & IconSlot> = ({\n Icon,\n style,\n options,\n placeholder,\n selectedValue,\n disabled = false,\n onValueChange = () => {},\n theme: { colors },\n ...props\n}) => {\n const {\n viewStyles: {\n borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles\n },\n } = extractStyles(style);\n\n const textField = React.useRef<typeof TextField | undefined>(undefined);\n const [pickerVisible, setIsPickerVisible] = React.useState(false);\n\n const toggleVisibility = () => {\n setIsPickerVisible(!pickerVisible);\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n };\n\n const stylesWithoutMargin =\n style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n\n const selectedLabel =\n selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n\n return (\n <View style={[styles.container, viewStyles]}>\n <Touchable disabled={disabled} onPress={toggleVisibility}>\n <TextField\n {...props}\n value={String(selectedLabel)}\n placeholder={placeholder}\n // @ts-ignore\n ref={textField} // cannot determine if ref is of correct type due to component being wrapped in a withTheme()\n disabled={disabled}\n pointerEvents=\"none\"\n // @ts-expect-error\n style={stylesWithoutMargin}\n Icon={Icon}\n />\n </Touchable>\n {pickerVisible && (\n <Portal>\n <View style={[styles.picker, { backgroundColor: colors.divider }]}>\n <SafeAreaView style={styles.pickerContainer}>\n <Button\n Icon={Icon}\n type=\"text\"\n onPress={toggleVisibility}\n style={styles.closeButton}\n >\n Close\n </Button>\n <NativePicker\n style={{ backgroundColor: \"white\" }}\n selectedValue={selectedValue}\n onValueChange={onValueChange}\n >\n {options.map((o: any) => (\n <NativePicker.Item\n label={o.label}\n value={o.value}\n key={o.value}\n />\n ))}\n </NativePicker>\n </SafeAreaView>\n </View>\n </Portal>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n picker: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n },\n pickerContainer: {\n backgroundColor: \"white\",\n flexDirection: \"column\",\n width: \"100%\",\n },\n closeButton: {\n alignSelf: \"flex-end\",\n },\n});\n\nexport default withTheme(Picker);\n"]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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
3
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
4
|
|
|
3
5
|
import React, { Component } from "react";
|
|
@@ -77,6 +79,7 @@ export default class ProgressBar extends Component {
|
|
|
77
79
|
Animated[animationType](this.state.progress, { ...animationConfig,
|
|
78
80
|
toValue: progress,
|
|
79
81
|
velocity: 0,
|
|
82
|
+
//adjust this value if animation fails - velocity is required
|
|
80
83
|
useNativeDriver
|
|
81
84
|
}).start();
|
|
82
85
|
} else {
|
|
@@ -147,22 +150,6 @@ export default class ProgressBar extends Component {
|
|
|
147
150
|
})
|
|
148
151
|
}]
|
|
149
152
|
};
|
|
150
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
151
|
-
style: [containerStyle, style],
|
|
152
|
-
onLayout: this.handleLayout,
|
|
153
|
-
...restProps
|
|
154
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
155
|
-
style: progressStyle
|
|
156
|
-
}), children);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
//# sourceMappingURL=ProgressBar.js.mapate({
|
|
161
|
-
inputRange: [0, 1],
|
|
162
|
-
outputRange: [0.0001, 1]
|
|
163
|
-
})
|
|
164
|
-
}]
|
|
165
|
-
};
|
|
166
153
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
167
154
|
style: [containerStyle, style],
|
|
168
155
|
onLayout: this.handleLayout
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Text.tsx"],"names":["React","Text","NativeText","I18nManager","withTheme","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAI,IAAIC,UAAjB,EAA6BC,WAA7B,QAA2D,cAA3D;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAOA,MAAMH,IAAN,SAAmBD,KAAK,CAACK,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGV,WAAW,CAACW,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,UAAD,eACMH,IADN;AAEE,MAAA,GAAG,EAAGI,CAAD,IAAO;AACV,aAAKP,KAAL,GAAaO,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEH,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6B1C,OAAO,MAAMO,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBP,IAAAA,KADuB;AAEvBQ,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGP;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEQ,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,
|
|
1
|
+
{"version":3,"sources":["Text.tsx"],"names":["React","Text","NativeText","I18nManager","withTheme","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","alignSelf","Link"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAI,IAAIC,UAAjB,EAA6BC,WAA7B,QAA2D,cAA3D;AACA,SAASC,SAAT,QAA0B,YAA1B;;AAOA,MAAMH,IAAN,SAAmBD,KAAK,CAACK,SAAzB,CAA0C;AAAA;AAAA;;AAAA;AAAA;;AAGxCC,EAAAA,cAAc,CAACC,IAAD,EAAkB;AAC9B,WAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;AACD;;AAEDE,EAAAA,MAAM,GAAG;AACP,UAAM;AAAEC,MAAAA,KAAF;AAAS,SAAGC;AAAZ,QAAqB,KAAKC,KAAhC;AACA,UAAMC,gBAAgB,GAAGV,WAAW,CAACW,KAAZ,GAAoB,KAApB,GAA4B,KAArD;AAEA,wBACE,oBAAC,UAAD,eACMH,IADN;AAEE,MAAA,GAAG,EAAGI,CAAD,IAAO;AACV,aAAKP,KAAL,GAAaO,CAAb;AACD,OAJH;AAKE,MAAA,KAAK,EAAE,CACL;AACEC,QAAAA,SAAS,EAAE,MADb;AAEEH,QAAAA;AAFF,OADK,EAKLH,KALK;AALT,OADF;AAeD;;AA1BuC;;AA6B1C,OAAO,MAAMO,QAAQ,GAAG,QAKA;AAAA,MALC;AACvBP,IAAAA,KADuB;AAEvBQ,IAAAA,KAFuB;AAGvBC,IAAAA,KAHuB;AAIvB,OAAGP;AAJoB,GAKD;AACtB,sBACE,oBAAC,IAAD;AACE,IAAA,OAAO,EAAE,CADX;AAEE,IAAA,KAAK,EAAE,CAAC;AAAEQ,MAAAA,KAAK,EAAEF,KAAK,CAACG,MAAN,CAAaC,OAAtB;AAA+BC,MAAAA,SAAS,EAAE;AAA1C,KAAD,EAA2Db,KAA3D,CAFT;AAGE,IAAA,KAAK,EAAEQ;AAHT,KAIMN,KAJN,GAMGO,KANH,CADF;AAUD,CAhBM;AAkBP,MAAMK,IAAS,GAAGpB,SAAS,CAACa,QAAD,CAA3B;AACA,SAASO,IAAT;AAEA,eAAepB,SAAS,CAACH,IAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager, TextProps } from \"react-native\";\nimport { withTheme } from \"../theming\";\nimport type { Theme } from \"../styles/DefaultTheme\";\n\ntype Props = {\n theme: Theme;\n} & TextProps;\n\nclass Text extends React.Component<Props> {\n _root: any;\n\n setNativeProps(args: TextProps) {\n return this._root && this._root.setNativeProps(args);\n }\n\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n\n return (\n <NativeText\n {...rest}\n ref={(c) => {\n this._root = c;\n }}\n style={[\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ]}\n />\n );\n }\n}\n\nexport const BaseLink = ({\n style,\n theme,\n title,\n ...props\n}: any): JSX.Element => {\n return (\n <Text\n hitSlop={8}\n style={[{ color: theme.colors.primary, alignSelf: \"flex-start\" }, style]}\n theme={theme}\n {...props}\n >\n {title}\n </Text>\n );\n};\n\nconst Link: any = withTheme(BaseLink);\nexport { Link };\n\nexport default withTheme(Text);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["View.ts"],"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","description","category","basic","props","accessible","group","accessibility","label","editable","required","formType","boolean","propType","BOOLEAN","defaultValue","accessibilityLabel","string","STRING","accessibilityHint","accessibilityRole","options","flatArray","accessibilityElementsHidden","accessibilityIgnoresInvertColors","accessibilityLiveRegion","importantForAccessibility","hitSlop","advanced","position","OBJECT","pointerEvents","removeClippedSubviews","collapsable","needsOffscreenAlphaCompositing","renderToHardwareTextureAndroid","shouldRasterizeIOS"],"mappings":"AAAA,SACEA,MADF,EAEEC,eAFF,EAGEC,UAHF,EAIEC,UAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,MADiB;AAEvBC,EAAAA,GAAG,EAAE,MAFkB;AAGvBC,EAAAA,WAAW,EAAE,wBAHU;AAIvBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,KAJH;AAKvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAEZ,MAAM,CAACa,aADJ;AAEVR,MAAAA,IAAI,EAAE,YAFI;AAGVS,MAAAA,KAAK,EAAE,YAHG;AAIVP,MAAAA,WAAW,EACT,wHALQ;AAMVQ,MAAAA,QAAQ,EAAE,IANA;AAOVC,MAAAA,QAAQ,EAAE,KAPA;AAQVC,MAAAA,QAAQ,EAAEf,UAAU,CAACgB,OARX;AASVC,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,OATX;AAUVC,MAAAA,YAAY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ENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"View\",\n tag: \"View\",\n description: \"A basic View component\",\n category: COMPONENT_TYPES.basic,\n props: {\n accessible: {\n group: GROUPS.accessibility,\n name: \"accessible\",\n label: \"accessible\",\n description:\n \"When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityLabel: {\n group: GROUPS.accessibility,\n name: \"accessibilityLabel\",\n label: \"accessibilityLabel\",\n description:\n \"Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n editable: true,\n required: false,\n defaultValue: null,\n },\n accessibilityHint: {\n group: GROUPS.accessibility,\n name: \"accessibilityHint\",\n label: \"accessibilityHint\",\n description:\n \"An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n accessibilityRole: {\n group: GROUPS.accessibility,\n name: \"accessibilityRole\",\n label: \"accessibilityRole\",\n description:\n \"accessibilityRole communicates the purpose of a component to the user of an assistive technology.accessibilityRole can be one of the following:\\n'none' - Used when the element has no role.\\n'button' - Used when the element should be treated as a button.\\n'link' - Used when the element should be treated as a link.\\n'search' - Used when the text field element should also be treated as a search field.\\n'image' - Used when the element should be treated as an image. Can be combined with button or link, for example.\\n'keyboardkey' - Used when the element acts as a keyboard key.\\n'text' - Used when the element should be treated as static text that cannot change.\\n'adjustable' - Used when an element can be \\\"adjusted\\\" (e.g. a slider).\\n'imagebutton' - Used when the element should be treated as a button and is also an image.\\n'header' - Used when an element acts as a header for a content section (e.g. the title of a navigation bar).\\n'summary' - Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.\\n'alert' - Used when an element contains important text to be presented to the user.\\n'checkbox' - Used when an element represents a checkbox which can be checked, unchecked, or have mixed checked state.\\n'combobox' - Used when an element represents a combo box, which allows the user to select among several choices.\\n'menu' - Used when the component is a menu of choices.\\n'menubar' - Used when a component is a container of multiple menus.\\n'menuitem' - Used to represent an item within a menu.\\n'progressbar' - Used to represent a component which indicates progress of a task.\\n'radio' - Used to represent a radio button.\\n'radiogroup' - Used to represent a group of radio buttons.\\n'scrollbar' - Used to represent a scroll bar.\\n'spinbutton' - Used to represent a button which opens a list of choices.\\n'switch' - Used to represent a switch which can be turned on and off.\\n'tab' - Used to represent a tab.\\n'tablist' - Used to represent a list of tabs.\\n'timer' - Used to represent a timer.\\n'toolbar' - Used to represent a tool bar (a container of action buttons or components).\\n\",\n options: [\n \"none\",\n \"button\",\n \"link\",\n \"search\",\n \"image\",\n \"keyboardkey\",\n \"text\",\n \"adjustable\",\n \"imagebutton\",\n \"header\",\n \"summary\",\n \"alert\",\n \"checkbox\",\n \"combobox\",\n \"menu\",\n \"menubar\",\n \"menuitem\",\n \"progressbar\",\n \"radio\",\n \"radiogroup\",\n \"scrollbar\",\n \"spinbutton\",\n \"switch\",\n \"tab\",\n \"tablist\",\n \"timer\",\n \"toolbar\",\n ],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n accessibilityElementsHidden: {\n group: GROUPS.accessibility,\n name: \"accessibilityElementsHidden\",\n label: \"accessibilityElementsHidden\",\n description:\n \"A value indicating whether the accessibility elements contained within this accessibility element are hidden. Default is false.See the Accessibility guide for more information.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityIgnoresInvertColors: {\n group: GROUPS.accessibility,\n name: \"accessibilityIgnoresInvertColors\",\n label: \"accessibilityIgnoresInvertColors\",\n description:\n \"A value indicating this view should or should not be inverted when color inversion is turned on. A value of true will tell the view to not be inverted even if color inversion is turned on.See the Accessibility guide for more information.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityLiveRegion: {\n group: GROUPS.accessibility,\n name: \"accessibilityLiveRegion\",\n label: \"accessibilityLiveRegion\",\n description:\n \"Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. Possible values:\\n'none' - Accessibility services should not announce changes to this view.\\n'polite'- Accessibility services should announce changes to this view.\\n'assertive' - Accessibility services should interrupt ongoing speech to immediately announce changes to this view.\\nSee the Android View docs for reference.\",\n options: [\"none\", \"polite\", \"assertive\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n importantForAccessibility: {\n group: GROUPS.accessibility,\n name: \"importantForAccessibility\",\n label: \"importantForAccessibility\",\n defaultValue: null,\n description:\n \"Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only.Possible values:\\n'auto' - The system determines whether the view is important for accessibility - default (recommended).\\n'yes' - The view is important for accessibility.\\n'no' - The view is not important for accessibility.\\n'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.\\nSee the Android importantForAccessibility docs for reference.\",\n options: [\"auto\", \"yes\", \"no\", \"no-hide-descendants\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n hitSlop: {\n group: GROUPS.advanced,\n name: \"hitSlop\",\n label: \"hitSlop\",\n description:\n \"This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels.For example, if a touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}}\\nThe touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.\\n\",\n editable: true,\n required: false,\n formType: FORM_TYPES.position,\n propType: PROP_TYPES.OBJECT,\n defaultValue: null,\n },\n pointerEvents: {\n group: GROUPS.advanced,\n name: \"pointerEvents\",\n label: \"pointerEvents\",\n description:\n \"Controls whether the View can be the target of touch events.\\n'auto': The View can be the target of touch events.\\n'none': The View is never the target of touch events.\\n'box-none': The View is never the target of touch events but its subviews can be. It behaves like if the view had the following classes in CSS:\\n.box-none {\\n pointer-events: none;\\n}\\n.box-none * {\\n pointer-events: auto;\\n}\\n\\n'box-only': The view can be the target of touch events but its subviews cannot be. It behaves like if the view had the following classes in CSS:\\n.box-only {\\n pointer-events: auto;\\n}\\n.box-only * {\\n pointer-events: none;\\n}\\n\\nSince pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.\\n\",\n options: [\"auto\", \"none\", \"box-none\", \"box-only\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"auto\",\n },\n removeClippedSubviews: {\n group: GROUPS.advanced,\n name: \"removeClippedSubviews\",\n label: \"removeClippedSubviews\",\n description:\n \"This is a reserved performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n collapsable: {\n group: GROUPS.advanced,\n name: \"collapsable\",\n label: \"collapsable\",\n description:\n \"Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n needsOffscreenAlphaCompositing: {\n group: GROUPS.advanced,\n name: \"needsOffscreenAlphaCompositing\",\n label: \"needsOffscreenAlphaCompositing\",\n description:\n \"Whether this View needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background).Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n renderToHardwareTextureAndroid: {\n group: GROUPS.advanced,\n name: \"renderToHardwareTextureAndroid\",\n label: \"renderToHardwareTextureAndroid\",\n description:\n \"Whether this View should render itself (and all of its children) into a single hardware texture on the GPU.On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n shouldRasterizeIOS: {\n group: GROUPS.advanced,\n name: \"shouldRasterizeIOS\",\n label: \"shouldRasterizeIOS\",\n description:\n \"Whether this View should be rendered as a bitmap before compositing.On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame.Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n },\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["View.js"],"names":["GROUPS","COMPONENT_TYPES","FORM_TYPES","PROP_TYPES","SEED_DATA","name","tag","description","category","basic","props","accessible","group","accessibility","label","editable","required","formType","boolean","propType","BOOLEAN","defaultValue","accessibilityLabel","string","STRING","accessibilityHint","accessibilityRole","options","flatArray","accessibilityElementsHidden","accessibilityIgnoresInvertColors","accessibilityLiveRegion","importantForAccessibility","hitSlop","advanced","position","OBJECT","pointerEvents","removeClippedSubviews","collapsable","needsOffscreenAlphaCompositing","renderToHardwareTextureAndroid","shouldRasterizeIOS"],"mappings":"AAAA,SAASA,MAAT,EAAiBC,eAAjB,EAAkCC,UAAlC,EAA8CC,UAA9C,QAAiE,iBAAjE;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,MADe;AAErBC,EAAAA,GAAG,EAAE,MAFgB;AAGrBC,EAAAA,WAAW,EAAE,wBAHQ;AAIrBC,EAAAA,QAAQ,EAAEP,eAAe,CAACQ,KAJL;AAKrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,UAAU,EAAE;AACRC,MAAAA,KAAK,EAAEZ,MAAM,CAACa,aADN;AAERR,MAAAA,IAAI,EAAE,YAFE;AAGRS,MAAAA,KAAK,EAAE,YAHC;AAIRP,MAAAA,WAAW,EAAE,wHAJL;AAKRQ,MAAAA,QAAQ,EAAE,IALF;AAMRC,MAAAA,QAAQ,EAAE,KANF;AAORC,MAAAA,QAAQ,EAAEf,UAAU,CAACgB,OAPb;AAQRC,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,OARb;AASRC,MAAAA,YAAY,EAAE;AATN,KADT;AAYHC,IAAAA,kBAAkB,EAAE;AAChBV,MAAAA,KAAK,EAAEZ,MAAM,CAACa,aADE;AAEhBR,MAAAA,IAAI,EAAE,oBAFU;AAGhBS,MAAAA,KAAK,EAAE,oBAHS;AAIhBP,MAAAA,WAAW,EAAE,2NAJG;AAKhBU,MAA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QAAQ,EAAE,KANkB;AAO5BC,MAAAA,QAAQ,EAAEf,UAAU,CAACgB,OAPO;AAQ5BC,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,OARO;AAS5BC,MAAAA,YAAY,EAAE;AATc,KArK7B;AAgLHoB,IAAAA,8BAA8B,EAAE;AAC5B7B,MAAAA,KAAK,EAAEZ,MAAM,CAACkC,QADc;AAE5B7B,MAAAA,IAAI,EAAE,gCAFsB;AAG5BS,MAAAA,KAAK,EAAE,gCAHqB;AAI5BP,MAAAA,WAAW,EAAE,+hBAJe;AAK5BQ,MAAAA,QAAQ,EAAE,IALkB;AAM5BC,MAAAA,QAAQ,EAAE,KANkB;AAO5BC,MAAAA,QAAQ,EAAEf,UAAU,CAACgB,OAPO;AAQ5BC,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,OARO;AAS5BC,MAAAA,YAAY,EAAE;AATc,KAhL7B;AA2LHqB,IAAAA,kBAAkB,EAAE;AAChB9B,MAAAA,KAAK,EAAEZ,MAAM,CAACkC,QADE;AAEhB7B,MAAAA,IAAI,EAAE,oBAFU;AAGhBS,MAAAA,KAAK,EAAE,oBAHS;AAIhBP,MAAAA,WAAW,EAAE,4eAJG;AAKhBQ,MAAAA,QAAQ,EAAE,IALM;AAMhBC,MAAAA,QAAQ,EAAE,KANM;AAOhBC,MAAAA,QAAQ,EAAEf,UAAU,CAACgB,OAPL;AAQhBC,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,OARL;AAShBC,MAAAA,YAAY,EAAE;AATE;AA3LjB;AALc,CAAlB","sourcesContent":["import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"View\",\n tag: \"View\",\n description: \"A basic View component\",\n category: COMPONENT_TYPES.basic,\n props: {\n accessible: {\n group: GROUPS.accessibility,\n name: \"accessible\",\n label: \"accessible\",\n description: \"When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityLabel: {\n group: GROUPS.accessibility,\n name: \"accessibilityLabel\",\n label: \"accessibilityLabel\",\n description: \"Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n editable: true,\n required: false,\n defaultValue: null,\n },\n accessibilityHint: {\n group: GROUPS.accessibility,\n name: \"accessibilityHint\",\n label: \"accessibilityHint\",\n description: \"An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n accessibilityRole: {\n group: GROUPS.accessibility,\n name: \"accessibilityRole\",\n label: \"accessibilityRole\",\n description: \"accessibilityRole communicates the purpose of a component to the user of an assistive technology.accessibilityRole can be one of the following:\\n'none' - Used when the element has no role.\\n'button' - Used when the element should be treated as a button.\\n'link' - Used when the element should be treated as a link.\\n'search' - Used when the text field element should also be treated as a search field.\\n'image' - Used when the element should be treated as an image. Can be combined with button or link, for example.\\n'keyboardkey' - Used when the element acts as a keyboard key.\\n'text' - Used when the element should be treated as static text that cannot change.\\n'adjustable' - Used when an element can be \\\"adjusted\\\" (e.g. a slider).\\n'imagebutton' - Used when the element should be treated as a button and is also an image.\\n'header' - Used when an element acts as a header for a content section (e.g. the title of a navigation bar).\\n'summary' - Used when an element can be used to provide a quick summary of current conditions in the app when the app first launches.\\n'alert' - Used when an element contains important text to be presented to the user.\\n'checkbox' - Used when an element represents a checkbox which can be checked, unchecked, or have mixed checked state.\\n'combobox' - Used when an element represents a combo box, which allows the user to select among several choices.\\n'menu' - Used when the component is a menu of choices.\\n'menubar' - Used when a component is a container of multiple menus.\\n'menuitem' - Used to represent an item within a menu.\\n'progressbar' - Used to represent a component which indicates progress of a task.\\n'radio' - Used to represent a radio button.\\n'radiogroup' - Used to represent a group of radio buttons.\\n'scrollbar' - Used to represent a scroll bar.\\n'spinbutton' - Used to represent a button which opens a list of choices.\\n'switch' - Used to represent a switch which can be turned on and off.\\n'tab' - Used to represent a tab.\\n'tablist' - Used to represent a list of tabs.\\n'timer' - Used to represent a timer.\\n'toolbar' - Used to represent a tool bar (a container of action buttons or components).\\n\",\n options: [\n \"none\",\n \"button\",\n \"link\",\n \"search\",\n \"image\",\n \"keyboardkey\",\n \"text\",\n \"adjustable\",\n \"imagebutton\",\n \"header\",\n \"summary\",\n \"alert\",\n \"checkbox\",\n \"combobox\",\n \"menu\",\n \"menubar\",\n \"menuitem\",\n \"progressbar\",\n \"radio\",\n \"radiogroup\",\n \"scrollbar\",\n \"spinbutton\",\n \"switch\",\n \"tab\",\n \"tablist\",\n \"timer\",\n \"toolbar\",\n ],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n accessibilityElementsHidden: {\n group: GROUPS.accessibility,\n name: \"accessibilityElementsHidden\",\n label: \"accessibilityElementsHidden\",\n description: \"A value indicating whether the accessibility elements contained within this accessibility element are hidden. Default is false.See the Accessibility guide for more information.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityIgnoresInvertColors: {\n group: GROUPS.accessibility,\n name: \"accessibilityIgnoresInvertColors\",\n label: \"accessibilityIgnoresInvertColors\",\n description: \"A value indicating this view should or should not be inverted when color inversion is turned on. A value of true will tell the view to not be inverted even if color inversion is turned on.See the Accessibility guide for more information.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n accessibilityLiveRegion: {\n group: GROUPS.accessibility,\n name: \"accessibilityLiveRegion\",\n label: \"accessibilityLiveRegion\",\n description: \"Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API >= 19 only. Possible values:\\n'none' - Accessibility services should not announce changes to this view.\\n'polite'- Accessibility services should announce changes to this view.\\n'assertive' - Accessibility services should interrupt ongoing speech to immediately announce changes to this view.\\nSee the Android View docs for reference.\",\n options: [\"none\", \"polite\", \"assertive\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n importantForAccessibility: {\n group: GROUPS.accessibility,\n name: \"importantForAccessibility\",\n label: \"importantForAccessibility\",\n defaultValue: null,\n description: \"Controls how view is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. Works for Android only.Possible values:\\n'auto' - The system determines whether the view is important for accessibility - default (recommended).\\n'yes' - The view is important for accessibility.\\n'no' - The view is not important for accessibility.\\n'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views.\\nSee the Android importantForAccessibility docs for reference.\",\n options: [\"auto\", \"yes\", \"no\", \"no-hide-descendants\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n },\n hitSlop: {\n group: GROUPS.advanced,\n name: \"hitSlop\",\n label: \"hitSlop\",\n description: \"This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets that are at least 30 - 40 points/density-independent pixels.For example, if a touchable view has a height of 20 the touchable height can be extended to 40 with hitSlop={{top: 10, bottom: 10, left: 0, right: 0}}\\nThe touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.\\n\",\n editable: true,\n required: false,\n formType: FORM_TYPES.position,\n propType: PROP_TYPES.OBJECT,\n defaultValue: null,\n },\n pointerEvents: {\n group: GROUPS.advanced,\n name: \"pointerEvents\",\n label: \"pointerEvents\",\n description: \"Controls whether the View can be the target of touch events.\\n'auto': The View can be the target of touch events.\\n'none': The View is never the target of touch events.\\n'box-none': The View is never the target of touch events but its subviews can be. It behaves like if the view had the following classes in CSS:\\n.box-none {\\n pointer-events: none;\\n}\\n.box-none * {\\n pointer-events: auto;\\n}\\n\\n'box-only': The view can be the target of touch events but its subviews cannot be. It behaves like if the view had the following classes in CSS:\\n.box-only {\\n pointer-events: auto;\\n}\\n.box-only * {\\n pointer-events: none;\\n}\\n\\nSince pointerEvents does not affect layout/appearance, and we are already deviating from the spec by adding additional modes, we opt to not include pointerEvents on style. On some platforms, we would need to implement it as a className anyways. Using style or not is an implementation detail of the platform.\\n\",\n options: [\"auto\", \"none\", \"box-none\", \"box-only\"],\n editable: true,\n required: false,\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n defaultValue: \"auto\",\n },\n removeClippedSubviews: {\n group: GROUPS.advanced,\n name: \"removeClippedSubviews\",\n label: \"removeClippedSubviews\",\n description: \"This is a reserved performance property exposed by RCTView and is useful for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view (or one of its superviews).\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n collapsable: {\n group: GROUPS.advanced,\n name: \"collapsable\",\n label: \"collapsable\",\n description: \"Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from the native hierarchy as an optimization. Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n needsOffscreenAlphaCompositing: {\n group: GROUPS.advanced,\n name: \"needsOffscreenAlphaCompositing\",\n label: \"needsOffscreenAlphaCompositing\",\n description: \"Whether this View needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors and blending behavior. The default (false) falls back to drawing the component and its children with an alpha applied to the paint used to draw each element instead of rendering the full component offscreen and compositing it back with an alpha value. This default may be noticeable and undesired in the case where the View you are setting an opacity on has multiple overlapping elements (e.g. multiple overlapping Views, or text and a background).Rendering offscreen to preserve correct alpha behavior is extremely expensive and hard to debug for non-native developers, which is why it is not turned on by default. If you do need to enable this property for an animation, consider combining it with renderToHardwareTextureAndroid if the view contents are static (i.e. it doesn't need to be redrawn each frame). If that property is enabled, this View will be rendered off-screen once, saved in a hardware texture, and then composited onto the screen with an alpha each frame without having to switch rendering targets on the GPU.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n renderToHardwareTextureAndroid: {\n group: GROUPS.advanced,\n name: \"renderToHardwareTextureAndroid\",\n label: \"renderToHardwareTextureAndroid\",\n description: \"Whether this View should render itself (and all of its children) into a single hardware texture on the GPU.On Android, this is useful for animations and interactions that only modify opacity, rotation, translation, and/or scale: in those cases, the view doesn't have to be redrawn and display lists don't need to be re-executed. The texture can be re-used and re-composited with different parameters. The downside is that this can use up limited video memory, so this prop should be set back to false at the end of the interaction/animation.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n shouldRasterizeIOS: {\n group: GROUPS.advanced,\n name: \"shouldRasterizeIOS\",\n label: \"shouldRasterizeIOS\",\n description: \"Whether this View should be rendered as a bitmap before compositing.On iOS, this is useful for animations and interactions that do not modify this component's dimensions nor its children; for example, when translating the position of a static view, rasterization allows the renderer to reuse a cached bitmap of a static view and quickly composite it during each frame.Rasterization incurs an off-screen drawing pass and the bitmap consumes memory. Test and measure when using this property.\",\n editable: true,\n required: false,\n formType: FORM_TYPES.boolean,\n propType: PROP_TYPES.BOOLEAN,\n defaultValue: null,\n },\n },\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.2.5-
|
|
3
|
+
"version": "43.2.5-7c93d7.3+7c93d7c4",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
]
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "7c93d7c40299ed16d04b393d01e8b461be7916a3"
|
|
83
83
|
}
|
|
@@ -19,20 +19,10 @@ function Carousel({ data, children, dotColor = "strong", style, ...rest }) {
|
|
|
19
19
|
const length = React.Children.count(children);
|
|
20
20
|
const itemsLength = (data?.length ?? 0) + length;
|
|
21
21
|
const slides = Array.isArray(data) ? data : [];
|
|
22
|
-
const {
|
|
22
|
+
const { width, height } = StyleSheet.flatten(style || {});
|
|
23
|
+
const slideWidth = width || screenWidth;
|
|
23
24
|
const slideHeight = height || 250;
|
|
24
|
-
|
|
25
|
-
(marginLeft ? Number(marginLeft) : 0) -
|
|
26
|
-
(marginRight ? Number(marginRight) : 0);
|
|
27
|
-
return (React.createElement(View, { style: [
|
|
28
|
-
styles.container,
|
|
29
|
-
{
|
|
30
|
-
width: containerWidth,
|
|
31
|
-
height: slideHeight,
|
|
32
|
-
maxWidth: containerWidth,
|
|
33
|
-
},
|
|
34
|
-
style,
|
|
35
|
-
], ...rest },
|
|
25
|
+
return (React.createElement(View, { style: [styles.container, style], ...rest },
|
|
36
26
|
React.createElement(ScrollView, { pagingEnabled: true, horizontal: true, decelerationRate: "fast", scrollEventThrottle: 200, showsHorizontalScrollIndicator: false, onScroll: ({ nativeEvent }) => {
|
|
37
27
|
const layoutWidth = nativeEvent.layoutMeasurement.width;
|
|
38
28
|
const offset = nativeEvent.contentOffset.x;
|
|
@@ -41,20 +31,20 @@ function Carousel({ data, children, dotColor = "strong", style, ...rest }) {
|
|
|
41
31
|
} },
|
|
42
32
|
slides.length > 0
|
|
43
33
|
? slides.map((item, i) => {
|
|
44
|
-
return (React.createElement(Image, { key: i, resizeMode: "cover", source: typeof item === "string" ? { uri: item } : item, style: [{ width:
|
|
34
|
+
return (React.createElement(Image, { key: i, resizeMode: "cover", source: typeof item === "string" ? { uri: item } : item, style: [{ width: slideWidth, height: slideHeight }] }));
|
|
45
35
|
})
|
|
46
36
|
: null,
|
|
47
37
|
React.Children.map(children, (child) => {
|
|
48
38
|
const s = child?.props?.style || {};
|
|
49
|
-
return (React.createElement(View, { style: { width:
|
|
50
|
-
style: { ...s, width:
|
|
39
|
+
return (React.createElement(View, { style: { width: slideWidth } }, React.cloneElement(child, {
|
|
40
|
+
style: { ...s, width: slideWidth },
|
|
51
41
|
})));
|
|
52
42
|
})),
|
|
53
43
|
React.createElement(Pager, { color: dotColor, index: index, length: itemsLength })));
|
|
54
44
|
}
|
|
55
45
|
const styles = StyleSheet.create({
|
|
56
46
|
container: {
|
|
57
|
-
backgroundColor: "#
|
|
47
|
+
backgroundColor: "#eee",
|
|
58
48
|
},
|
|
59
49
|
pager: {
|
|
60
50
|
position: "absolute",
|
|
@@ -61,27 +61,12 @@ function Carousel({
|
|
|
61
61
|
const itemsLength = (data?.length ?? 0) + length;
|
|
62
62
|
const slides = Array.isArray(data) ? data : [];
|
|
63
63
|
|
|
64
|
-
const {
|
|
64
|
+
const { width, height } = StyleSheet.flatten(style || {});
|
|
65
|
+
const slideWidth = width || screenWidth;
|
|
65
66
|
const slideHeight = height || 250;
|
|
66
67
|
|
|
67
|
-
const containerWidth =
|
|
68
|
-
screenWidth -
|
|
69
|
-
(marginLeft ? Number(marginLeft) : 0) -
|
|
70
|
-
(marginRight ? Number(marginRight) : 0);
|
|
71
|
-
|
|
72
68
|
return (
|
|
73
|
-
<View
|
|
74
|
-
style={[
|
|
75
|
-
styles.container,
|
|
76
|
-
{
|
|
77
|
-
width: containerWidth,
|
|
78
|
-
height: slideHeight,
|
|
79
|
-
maxWidth: containerWidth,
|
|
80
|
-
},
|
|
81
|
-
style,
|
|
82
|
-
]}
|
|
83
|
-
{...rest}
|
|
84
|
-
>
|
|
69
|
+
<View style={[styles.container, style]} {...rest}>
|
|
85
70
|
<ScrollView
|
|
86
71
|
pagingEnabled
|
|
87
72
|
horizontal
|
|
@@ -102,7 +87,7 @@ function Carousel({
|
|
|
102
87
|
key={i}
|
|
103
88
|
resizeMode="cover"
|
|
104
89
|
source={typeof item === "string" ? { uri: item } : item}
|
|
105
|
-
style={[{ width:
|
|
90
|
+
style={[{ width: slideWidth, height: slideHeight }]}
|
|
106
91
|
/>
|
|
107
92
|
);
|
|
108
93
|
})
|
|
@@ -110,9 +95,9 @@ function Carousel({
|
|
|
110
95
|
{React.Children.map(children, (child: any) => {
|
|
111
96
|
const s = child?.props?.style || {};
|
|
112
97
|
return (
|
|
113
|
-
<View style={{ width:
|
|
98
|
+
<View style={{ width: slideWidth }}>
|
|
114
99
|
{React.cloneElement(child, {
|
|
115
|
-
style: { ...s, width:
|
|
100
|
+
style: { ...s, width: slideWidth },
|
|
116
101
|
})}
|
|
117
102
|
</View>
|
|
118
103
|
);
|
|
@@ -125,7 +110,7 @@ function Carousel({
|
|
|
125
110
|
|
|
126
111
|
const styles = StyleSheet.create({
|
|
127
112
|
container: {
|
|
128
|
-
backgroundColor: "#
|
|
113
|
+
backgroundColor: "#eee",
|
|
129
114
|
},
|
|
130
115
|
pager: {
|
|
131
116
|
position: "absolute",
|
package/src/components/Text.js
CHANGED
|
@@ -21,7 +21,7 @@ class Text extends React.Component {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export const BaseLink = ({ style, theme, title, ...props }) => {
|
|
24
|
-
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary, alignSelf: "
|
|
24
|
+
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary, alignSelf: "flex-start" }, style], theme: theme, ...props }, title));
|
|
25
25
|
};
|
|
26
26
|
const Link = withTheme(BaseLink);
|
|
27
27
|
export { Link };
|
package/src/components/Text.tsx
CHANGED